zenno: format

This commit is contained in:
2026-03-31 12:07:38 -04:00
parent 08deedea8f
commit 22ca5c98f3
15 changed files with 196 additions and 179 deletions

View File

@@ -1,8 +1,8 @@
{ {
"useTabs": true, "useTabs": true,
"singleQuote": true, "singleQuote": true,
"trailingComma": "none", "trailingComma": "all",
"printWidth": 100, "printWidth": 130,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"], "plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"overrides": [ "overrides": [
{ {

View File

@@ -22,8 +22,8 @@ export default defineConfig(
rules: { rules: {
// typescript-eslint strongly recommend that you do not use the no-undef lint rule on TypeScript projects. // typescript-eslint strongly recommend that you do not use the no-undef lint rule on TypeScript projects.
// see: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors // see: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
'no-undef': 'off' 'no-undef': 'off',
} },
}, },
{ {
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'], files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
@@ -32,8 +32,8 @@ export default defineConfig(
projectService: true, projectService: true,
extraFileExtensions: ['.svelte'], extraFileExtensions: ['.svelte'],
parser: ts.parser, parser: ts.parser,
svelteConfig svelteConfig,
} },
} },
} },
); );

View File

@@ -1,23 +1,23 @@
<script lang="ts"> <script lang="ts">
import { character } from '$lib/data/character' import { character } from '$lib/data/character';
interface Props { interface Props {
id: string id: string;
value: number value: number;
label?: string label?: string;
region?: keyof typeof character region?: keyof typeof character;
required?: boolean required?: boolean;
} }
let { id, value = $bindable(), label, region = 'global', required = false }: Props = $props() let { id, value = $bindable(), label, region = 'global', required = false }: Props = $props();
</script> </script>
{#if label} {#if label}
<label for={id}>{label}</label> <label for={id}>{label}</label>
{/if} {/if}
<select id={id} bind:value={value} required={required}> <select {id} bind:value {required}>
{#if !required} {#if !required}
<option value=0></option> <option value="0"></option>
{/if} {/if}
{#each character[region] as c} {#each character[region] as c}
<option value={c.chara_id}>{c.name}</option> <option value={c.chara_id}>{c.name}</option>

View File

@@ -1,5 +1,5 @@
import type { RegionalName } from '$lib/regional-name' import type { RegionalName } from '$lib/regional-name';
import globalJSON from '../../../../global/character.json' import globalJSON from '../../../../global/character.json';
/** /**
* Character definitions. * Character definitions.
@@ -8,16 +8,19 @@ export interface Character {
/** /**
* Character ID. * Character ID.
*/ */
chara_id: number chara_id: number;
/** /**
* Regional name of the character. * Regional name of the character.
* E.g., Special Week for Global, or スペシャルウィーク for JP. * E.g., Special Week for Global, or スペシャルウィーク for JP.
*/ */
name: string name: string;
} }
export const character = { export const character = {
global: globalJSON as Character[], global: globalJSON as Character[],
} };
export const charaNames = globalJSON.reduce((m, c) => m.set(c.chara_id, {en: c.name}), new Map<Character['chara_id'], RegionalName>()); export const charaNames = globalJSON.reduce(
(m, c) => m.set(c.chara_id, { en: c.name }),
new Map<Character['chara_id'], RegionalName>(),
);

View File

@@ -1,5 +1,5 @@
import type { RegionalName } from '$lib/regional-name'; import type { RegionalName } from '$lib/regional-name';
import globalJSON from '../../../../global/conversation.json' import globalJSON from '../../../../global/conversation.json';
/** /**
* Lobby conversation data. * Lobby conversation data.
@@ -42,33 +42,36 @@ export interface Conversation {
export const conversation = { export const conversation = {
global: globalJSON as Conversation[], global: globalJSON as Conversation[],
} };
export const byChara = { export const byChara = {
global: globalJSON.reduce((m, c) => m.set(c.chara_id, (m.get(c.chara_id) ?? []).concat(c as Conversation)), new Map<Conversation['chara_id'], Conversation[]>()), global: globalJSON.reduce(
} (m, c) => m.set(c.chara_id, (m.get(c.chara_id) ?? []).concat(c as Conversation)),
new Map<Conversation['chara_id'], Conversation[]>(),
),
};
export const locations: Record<Conversation['location'], {name: RegionalName, group: 1 | 2 | 3 | 4 | 5}> = { export const locations: Record<Conversation['location'], { name: RegionalName; group: 1 | 2 | 3 | 4 | 5 }> = {
110: {name: {en: 'right side front'}, group: 1}, 110: { name: { en: 'right side front' }, group: 1 },
120: {name: {en: 'right side front'}, group: 1}, 120: { name: { en: 'right side front' }, group: 1 },
130: {name: {en: 'right side front'}, group: 1}, 130: { name: { en: 'right side front' }, group: 1 },
210: {name: {en: 'left side table'}, group: 2}, 210: { name: { en: 'left side table' }, group: 2 },
220: {name: {en: 'left side table'}, group: 2}, 220: { name: { en: 'left side table' }, group: 2 },
310: {name: {en: 'center back seat'}, group: 3}, 310: { name: { en: 'center back seat' }, group: 3 },
410: {name: {en: 'center posters'}, group: 4}, 410: { name: { en: 'center posters' }, group: 4 },
420: {name: {en: 'center posters'}, group: 4}, 420: { name: { en: 'center posters' }, group: 4 },
430: {name: {en: 'center posters'}, group: 4}, 430: { name: { en: 'center posters' }, group: 4 },
510: {name: {en: 'left side school map'}, group: 5}, 510: { name: { en: 'left side school map' }, group: 5 },
520: {name: {en: 'left side school map'}, group: 5}, 520: { name: { en: 'left side school map' }, group: 5 },
530: {name: {en: 'left side school map'}, group: 5}, 530: { name: { en: 'left side school map' }, group: 5 },
} };
function locCharas(convos: Conversation[], locGroup: 1 | 2 | 3 | 4 | 5) { function locCharas(convos: Conversation[], locGroup: 1 | 2 | 3 | 4 | 5) {
const m = convos const m = convos
.filter((c) => locations[c.location].group === locGroup) .filter((c) => locations[c.location].group === locGroup)
.flatMap((c) => [c.chara_1, c.chara_2, c.chara_3].filter((x) => x != null)) .flatMap((c) => [c.chara_1, c.chara_2, c.chara_3].filter((x) => x != null))
.reduce((m, id) => m.set(id, 1 + (m.get(id) ?? 0)), new Map<number, number>()) .reduce((m, id) => m.set(id, 1 + (m.get(id) ?? 0)), new Map<number, number>());
return [...m].toSorted((a, b) => b[1] - a[1]) // descending return [...m].toSorted((a, b) => b[1] - a[1]); // descending
} }
export const groupPopulars = { export const groupPopulars = {
@@ -79,4 +82,4 @@ export const groupPopulars = {
4: locCharas(conversation.global, 4), 4: locCharas(conversation.global, 4),
5: locCharas(conversation.global, 5), 5: locCharas(conversation.global, 5),
}, },
} };

View File

@@ -3,5 +3,5 @@
* Currently English is the only supported language. * Currently English is the only supported language.
*/ */
export interface RegionalName { export interface RegionalName {
en: string en: string;
} }

View File

@@ -7,9 +7,7 @@ describe('Welcome.svelte', () => {
it('renders greetings for host and guest', async () => { it('renders greetings for host and guest', async () => {
render(Welcome, { host: 'SvelteKit', guest: 'Vitest' }); render(Welcome, { host: 'SvelteKit', guest: 'Vitest' });
await expect await expect.element(page.getByRole('heading', { level: 1 })).toHaveTextContent('Hello, SvelteKit!');
.element(page.getByRole('heading', { level: 1 }))
.toHaveTextContent('Hello, SvelteKit!');
await expect.element(page.getByText('Hello, Vitest!')).toBeInTheDocument(); await expect.element(page.getByText('Hello, Vitest!')).toBeInTheDocument();
}); });
}); });

View File

@@ -7,22 +7,22 @@
<svelte:head><link rel="icon" href={favicon} /></svelte:head> <svelte:head><link rel="icon" href={favicon} /></svelte:head>
<nav class="flex min-w-full p-4 mb-4 shadow-md"> <nav class="mb-4 flex min-w-full p-4 shadow-md">
<span class="hidden md:inline flex-1"> <span class="hidden flex-1 md:inline">
<a href="/" class="text-7xl">Zenno Rob Roy</a> <a href="/" class="text-7xl">Zenno Rob Roy</a>
</span> </span>
<span class="flex-1 text-center"> <span class="flex-1 text-center">
<a href="/" class="md:hidden block mx-8 my-1 font-semibold">Zenno Rob Roy</a> <a href="/" class="mx-8 my-1 block font-semibold md:hidden">Zenno Rob Roy</a>
<a href="/inherit" class="inline-block mx-8 my-1">Inheritance Chance</a> <a href="/inherit" class="mx-8 my-1 inline-block">Inheritance Chance</a>
<a href="/spark" class="inline-block mx-8 my-1">Spark Chance</a> <a href="/spark" class="mx-8 my-1 inline-block">Spark Chance</a>
<a href="/vet" class="inline-block mx-8 my-1">My Veterans</a> <a href="/vet" class="mx-8 my-1 inline-block">My Veterans</a>
<a href="/convo" class="inline-block mx-8 my-1">Lobby Conversations</a> <a href="/convo" class="mx-8 my-1 inline-block">Lobby Conversations</a>
</span> </span>
</nav> </nav>
<div class="md:min-w-7xl md:max-w-7xl md:m-auto"> <div class="md:m-auto md:max-w-7xl md:min-w-7xl">
{@render children()} {@render children()}
</div> </div>
<footer class="p-4 mt-32 inset-x-0 bottom-0 border-t text-center text-[14px]"> <footer class="inset-x-0 bottom-0 mt-32 border-t p-4 text-center text-[14px]">
Umamusume: Pretty Derby tools by <a href="https://zephyrtronium.date/">zephyrtronium</a>.<br> Umamusume: Pretty Derby tools by <a href="https://zephyrtronium.date/">zephyrtronium</a>.<br />
All data is generated from the game's local database. All data is generated from the game's local database.
</footer> </footer>

View File

@@ -1,5 +1,5 @@
<script lang="ts"> <script lang="ts">
import CharaPick from "$lib/CharaPick.svelte"; import CharaPick from '$lib/CharaPick.svelte';
let selChara = $state(0); let selChara = $state(0);
</script> </script>
@@ -8,4 +8,14 @@
<CharaPick id="test-chara" bind:value={selChara} /> <CharaPick id="test-chara" bind:value={selChara} />
<p>selected character is id {selChara}</p> <p>selected character is id {selChara}</p>
<p>Visit <a href="https://svelte.dev/docs/kit">svelte.dev/docs/kit</a> to read the documentation</p> <p>Visit <a href="https://svelte.dev/docs/kit">svelte.dev/docs/kit</a> to read the documentation</p>
<p>Lorem ipsum (/ ˌ l ɔː. r ə m ˈ ɪ p. s ə m/ LOR-əm IP-səm) is a dummy or placeholder text commonly used in graphic design, publishing, and web development. It is typically a corrupted version of De finibus bonorum et malorum, a 1st-century BC text by the Roman statesman and philosopher Cicero, with words altered, added, and removed to make it nonsensical and improper Latin. The first two words are the truncation of dolorem ipsum ("pain itself"). Lorem ipsum's purpose is to permit a page layout to be designed, independently of the copy that will subsequently populate it, or to demonstrate various fonts of a typeface without meaningful text that could be distracting. Versions of the Lorem ipsum text have been used in typesetting since the 1960s, when advertisements for Letraset transfer sheets popularized it. Lorem ipsum was introduced to the digital world in the mid-1980s, when Aldus employed it in graphic and word-processing templates for its desktop publishing program PageMaker. Other popular word processors, including Pages and Microsoft Word, have since adopted Lorem ipsum, as have many LaTeX packages, web content</p> <p>
Lorem ipsum (/ ˌ l ɔː. r ə m ˈ ɪ p. s ə m/ LOR-əm IP-səm) is a dummy or placeholder text commonly used in graphic design,
publishing, and web development. It is typically a corrupted version of De finibus bonorum et malorum, a 1st-century BC text by
the Roman statesman and philosopher Cicero, with words altered, added, and removed to make it nonsensical and improper Latin.
The first two words are the truncation of dolorem ipsum ("pain itself"). Lorem ipsum's purpose is to permit a page layout to be
designed, independently of the copy that will subsequently populate it, or to demonstrate various fonts of a typeface without
meaningful text that could be distracting. Versions of the Lorem ipsum text have been used in typesetting since the 1960s, when
advertisements for Letraset transfer sheets popularized it. Lorem ipsum was introduced to the digital world in the mid-1980s,
when Aldus employed it in graphic and word-processing templates for its desktop publishing program PageMaker. Other popular word
processors, including Pages and Microsoft Word, have since adopted Lorem ipsum, as have many LaTeX packages, web content
</p>

View File

@@ -1,29 +1,30 @@
<script lang="ts"> <script lang="ts">
import { charaNames } from "$lib/data/character"; import { charaNames } from '$lib/data/character';
import { byChara, locations, groupPopulars } from "$lib/data/convo"; import { byChara, locations, groupPopulars } from '$lib/data/convo';
import CharaPick from "$lib/CharaPick.svelte"; import CharaPick from '$lib/CharaPick.svelte';
let charaID = $state(1001) let charaID = $state(1001);
let convo = $state(1) let convo = $state(1);
let options = $derived(byChara.global.get(charaID) ?? []) let options = $derived(byChara.global.get(charaID) ?? []);
let cur = $derived(options.find((c) => c.number === convo)) let cur = $derived(options.find((c) => c.number === convo));
function suggest(n: number, pops: typeof groupPopulars['global']) { function suggest(n: number, pops: (typeof groupPopulars)['global']) {
if (cur == null) { if (cur == null) {
return [] return [];
} }
const u = pops[locations[cur.location].group] const u = pops[locations[cur.location].group].filter(
.filter((s) => charaNames.get(s[0]) != null && s[0] !== cur.chara_1 && s[0] !== cur.chara_2 && s[0] !== cur.chara_3) (s) => charaNames.get(s[0]) != null && s[0] !== cur.chara_1 && s[0] !== cur.chara_2 && s[0] !== cur.chara_3,
);
if (u.length <= n) { if (u.length <= n) {
return u return u;
} }
return u.filter((s) => s[1] >= u[n][1]) return u.filter((s) => s[1] >= u[n][1]);
} }
</script> </script>
<h1>Lobby Conversations</h1> <h1>Lobby Conversations</h1>
<div class="flex text-center mt-8"> <div class="mt-8 flex text-center">
<div class="flex-1"> <div class="flex-1">
<CharaPick id="chara" label="Character" bind:value={charaID} required /> <CharaPick id="chara" label="Character" bind:value={charaID} required />
</div> </div>
@@ -37,8 +38,8 @@
</div> </div>
</div> </div>
{#if cur} {#if cur}
<div class="transition-shadow shadow-sm hover:shadow-md"> <div class="shadow-sm transition-shadow hover:shadow-md">
<div class="flex mt-8 text-center"> <div class="mt-8 flex text-center">
<span class="flex-1">{charaNames.get(cur.chara_1)?.en ?? 'someone not a trainee'}</span> <span class="flex-1">{charaNames.get(cur.chara_1)?.en ?? 'someone not a trainee'}</span>
{#if cur.chara_2} {#if cur.chara_2}
<span class="flex-1">{charaNames.get(cur.chara_2)?.en ?? 'someone not a trainee'}</span> <span class="flex-1">{charaNames.get(cur.chara_2)?.en ?? 'someone not a trainee'}</span>
@@ -47,23 +48,22 @@
<span class="flex-1">{charaNames.get(cur.chara_3)?.en ?? 'someone not a trainee'}</span> <span class="flex-1">{charaNames.get(cur.chara_3)?.en ?? 'someone not a trainee'}</span>
{/if} {/if}
</div> </div>
<div class="flex mt-4 w-full text-center"> <div class="mt-4 flex w-full text-center">
<span class="flex-1">at {locations[cur.location].name.en}</span> <span class="flex-1">at {locations[cur.location].name.en}</span>
</div> </div>
</div> </div>
<div class="block mt-4 text-center"> <div class="mt-4 block text-center">
<span>Characters who appear here most often:</span> <span>Characters who appear here most often:</span>
</div> </div>
<div class="grid md:grid-cols-4 mt-4 text-center transition-shadow ease-in hover:ease-out shadow-sm hover:shadow-md"> <div class="mt-4 grid text-center shadow-sm transition-shadow ease-in hover:shadow-md hover:ease-out md:grid-cols-4">
{#each suggest(8, groupPopulars.global) as s} {#each suggest(8, groupPopulars.global) as s}
<span>{charaNames.get(s[0])?.en}: {s[1]}&#xd7;</span> <span>{charaNames.get(s[0])?.en}: {s[1]}&#xd7;</span>
{/each} {/each}
</div> </div>
<div class="block mt-4 text-center"> <div class="mt-4 block text-center">
<span> <span>
Set characters that appear more often to fixed positions Set characters that appear more often to fixed positions (main, upgrades, story, races) to maximize the chance of getting
(main, upgrades, story, races) this conversation.
to maximize the chance of getting this conversation.
</span> </span>
</div> </div>
{/if} {/if}

View File

@@ -13,7 +13,7 @@
--text: #292222; --text: #292222;
} }
[data-theme="iron goddess"] { [data-theme='iron goddess'] {
--blossom: #424b51; --blossom: #424b51;
--fade: #64707a; --fade: #64707a;
--bg: #fff2e2; --bg: #fff2e2;
@@ -21,7 +21,7 @@
--text: #2c2923; --text: #2c2923;
} }
[data-theme="main sequence"] { [data-theme='main sequence'] {
--blossom: #3a5425; --blossom: #3a5425;
--fade: #698650; --fade: #698650;
--bg: #fffde5; --bg: #fffde5;
@@ -29,7 +29,7 @@
--text: #5e592a; --text: #5e592a;
} }
[data-theme="sorcery"] { [data-theme='sorcery'] {
--blossom: #5a5a69; --blossom: #5a5a69;
--fade: #868698; --fade: #868698;
--bg: #e5f4e5; --bg: #e5f4e5;
@@ -37,7 +37,7 @@
--text: #323932; --text: #323932;
} }
[data-theme="cirrus"] { [data-theme='cirrus'] {
--blossom: #565a4b; --blossom: #565a4b;
--fade: #9da587; --fade: #9da587;
--bg: #e5f6fa; --bg: #e5f6fa;
@@ -45,7 +45,7 @@
--text: #31393b; --text: #31393b;
} }
[data-theme="oxygen"] { [data-theme='oxygen'] {
--blossom: #162011; --blossom: #162011;
--fade: #343932; --fade: #343932;
--bg: #e1e2e4; --bg: #e1e2e4;
@@ -53,7 +53,7 @@
--text: #27282c; --text: #27282c;
} }
[data-theme="dauphin"] { [data-theme='dauphin'] {
--blossom: #171e1c; --blossom: #171e1c;
--fade: #485b58; --fade: #485b58;
--bg: #ebe5f8; --bg: #ebe5f8;
@@ -61,7 +61,7 @@
--text: #1c1a20; --text: #1c1a20;
} }
[data-theme="diamond-burned"] { [data-theme='diamond-burned'] {
--blossom: #0f0d0b; --blossom: #0f0d0b;
--fade: #4d4743; --fade: #4d4743;
--bg: #f8ebf2; --bg: #f8ebf2;
@@ -69,7 +69,7 @@
--text: #3e363a; --text: #3e363a;
} }
[data-theme="chi"] { [data-theme='chi'] {
--blossom: #908975; --blossom: #908975;
--fade: #fff8e5; --fade: #fff8e5;
--bg: #110c0c; --bg: #110c0c;
@@ -77,7 +77,7 @@
--text: #cfa9a9; --text: #cfa9a9;
} }
[data-theme="darjeeling"] { [data-theme='darjeeling'] {
--blossom: #ba949c; --blossom: #ba949c;
--fade: #f8e1e6; --fade: #f8e1e6;
--bg: #1c160d; --bg: #1c160d;
@@ -85,7 +85,7 @@
--text: #c9b9a0; --text: #c9b9a0;
} }
[data-theme="subgiant"] { [data-theme='subgiant'] {
--blossom: #9fad8a; --blossom: #9fad8a;
--fade: #e8f2d7; --fade: #e8f2d7;
--bg: #16130b; --bg: #16130b;
@@ -93,7 +93,7 @@
--text: #bbb396; --text: #bbb396;
} }
[data-theme="goblin"] { [data-theme='goblin'] {
--blossom: #7a808e; --blossom: #7a808e;
--fade: #dae1ef; --fade: #dae1ef;
--bg: #070905; --bg: #070905;
@@ -101,7 +101,7 @@
--text: #acbd9f; --text: #acbd9f;
} }
[data-theme="altostratus"] { [data-theme='altostratus'] {
--blossom: #a8a0b7; --blossom: #a8a0b7;
--fade: #e5dbf7; --fade: #e5dbf7;
--bg: #0c0f0f; --bg: #0c0f0f;
@@ -109,7 +109,7 @@
--text: #8da4a4; --text: #8da4a4;
} }
[data-theme="silicon"] { [data-theme='silicon'] {
--blossom: #717f63; --blossom: #717f63;
--fade: #c4d4b3; --fade: #c4d4b3;
--bg: #050a0f; --bg: #050a0f;
@@ -117,7 +117,7 @@
--text: #838e9a; --text: #838e9a;
} }
[data-theme="imperator"] { [data-theme='imperator'] {
--blossom: #93a0a3; --blossom: #93a0a3;
--fade: #f3fbfd; --fade: #f3fbfd;
--bg: #0e0c12; --bg: #0e0c12;
@@ -125,7 +125,7 @@
--text: #a8a1b1; --text: #a8a1b1;
} }
[data-theme="mædi"] { [data-theme='mædi'] {
--blossom: #ccd3b6; --blossom: #ccd3b6;
--fade: #fdfbf3; --fade: #fdfbf3;
--bg: #10090f; --bg: #10090f;
@@ -136,7 +136,7 @@
/* Body */ /* Body */
html { html {
font-size: 62.5%; font-size: 62.5%;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
} }
body { body {
@@ -168,7 +168,7 @@ h4,
h5, h5,
h6 { h6 {
line-height: 1.1; line-height: 1.1;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
font-weight: 700; font-weight: 700;
margin-top: 3rem; margin-top: 3rem;
margin-bottom: 1.5rem; margin-bottom: 1.5rem;
@@ -281,7 +281,7 @@ samp {
white-space: pre-wrap; white-space: pre-wrap;
} }
pre>code { pre > code {
padding: 0; padding: 0;
background-color: transparent; background-color: transparent;
white-space: pre; white-space: pre;
@@ -319,10 +319,10 @@ textarea {
.button, .button,
button, button,
input[type=submit], input[type='submit'],
input[type=reset], input[type='reset'],
input[type=button], input[type='button'],
input[type=file]::file-selector-button { input[type='file']::file-selector-button {
display: inline-block; display: inline-block;
padding: 5px 10px; padding: 5px 10px;
text-align: center; text-align: center;
@@ -338,20 +338,20 @@ input[type=file]::file-selector-button {
.button[disabled], .button[disabled],
button[disabled], button[disabled],
input[type=submit][disabled], input[type='submit'][disabled],
input[type=reset][disabled], input[type='reset'][disabled],
input[type=button][disabled], input[type='button'][disabled],
input[type=file]::file-selector-button[disabled] { input[type='file']::file-selector-button[disabled] {
cursor: default; cursor: default;
opacity: 0.5; opacity: 0.5;
} }
.button:hover, .button:hover,
button:hover, button:hover,
input[type=submit]:hover, input[type='submit']:hover,
input[type=reset]:hover, input[type='reset']:hover,
input[type=button]:hover, input[type='button']:hover,
input[type=file]::file-selector-button:hover { input[type='file']::file-selector-button:hover {
background-color: var(--fade); background-color: var(--fade);
color: var(--bg); color: var(--bg);
outline: 0; outline: 0;
@@ -359,10 +359,10 @@ input[type=file]::file-selector-button:hover {
.button:focus-visible, .button:focus-visible,
button:focus-visible, button:focus-visible,
input[type=submit]:focus-visible, input[type='submit']:focus-visible,
input[type=reset]:focus-visible, input[type='reset']:focus-visible,
input[type=button]:focus-visible, input[type='button']:focus-visible,
input[type=file]::file-selector-button:focus-visible { input[type='file']::file-selector-button:focus-visible {
outline-style: solid; outline-style: solid;
outline-width: 2px; outline-width: 2px;
} }
@@ -388,7 +388,7 @@ input:focus {
outline: 0; outline: 0;
} }
input[type=checkbox]:focus { input[type='checkbox']:focus {
outline: 1px dotted var(--blossom); outline: 1px dotted var(--blossom);
} }

View File

@@ -1,3 +1,6 @@
<h1>Spark Generation Chance</h1> <h1>Spark Generation Chance</h1>
<p>Given a legacy, calculate the chance of generating each spark if you fulfill the conditions to do so, and the distribution of total spark counts.</p> <p>
Given a legacy, calculate the chance of generating each spark if you fulfill the conditions to do so, and the distribution of
total spark counts.
</p>
<p>TODO</p> <p>TODO</p>

View File

@@ -11,14 +11,14 @@ const config = {
const isExternalLibrary = pathSegments.includes('node_modules'); const isExternalLibrary = pathSegments.includes('node_modules');
return isExternalLibrary ? undefined : true; return isExternalLibrary ? undefined : true;
} },
}, },
kit: { kit: {
// adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list. // adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
// If your environment is not supported, or you settled on a specific environment, switch out the adapter. // If your environment is not supported, or you settled on a specific environment, switch out the adapter.
// See https://svelte.dev/docs/kit/adapters for more information about adapters. // See https://svelte.dev/docs/kit/adapters for more information about adapters.
adapter: adapter() adapter: adapter(),
} },
}; };
export default config; export default config;

View File

@@ -15,11 +15,11 @@ export default defineConfig({
browser: { browser: {
enabled: true, enabled: true,
provider: playwright(), provider: playwright(),
instances: [{ browser: 'chromium', headless: true }] instances: [{ browser: 'chromium', headless: true }],
}, },
include: ['src/**/*.svelte.{test,spec}.{js,ts}'], include: ['src/**/*.svelte.{test,spec}.{js,ts}'],
exclude: ['src/lib/server/**'] exclude: ['src/lib/server/**'],
} },
}, },
{ {
@@ -28,9 +28,9 @@ export default defineConfig({
name: 'server', name: 'server',
environment: 'node', environment: 'node',
include: ['src/**/*.{test,spec}.{js,ts}'], include: ['src/**/*.{test,spec}.{js,ts}'],
exclude: ['src/**/*.svelte.{test,spec}.{js,ts}'] exclude: ['src/**/*.svelte.{test,spec}.{js,ts}'],
} },
} },
] ],
} },
}); });