From 0bb36660ec4bceeb4bd9b18cf47a30ba8eded427 Mon Sep 17 00:00:00 2001 From: Bobby Date: Wed, 22 Apr 2026 08:10:30 +0530 Subject: Rename ui-lib to lib, split Begin into smaller components, add Credits, bump version to 1.0 from package.json --- eslint.config.js | 2 +- lib/components/AppTitle.svelte | 41 +++++++++ lib/components/AppVersion.svelte | 20 +++++ lib/components/BeginActions.svelte | 50 +++++++++++ lib/components/BeginScreen.svelte | 48 ++++++++++ lib/components/InitialLoadScreen.svelte | 56 ++++++++++++ lib/components/MenuButton.svelte | 51 +++++++++++ lib/components/ProgressBar.svelte | 34 +++++++ lib/version.ts | 12 +++ package.json | 4 +- routes/+page.svelte | 6 +- svelte.config.js | 2 +- tsconfig.json | 4 +- ui-lib/components/BeginScreen.svelte | 138 ----------------------------- ui-lib/components/InitialLoadScreen.svelte | 57 ------------ ui-lib/components/ProgressBar.svelte | 34 ------- 16 files changed, 322 insertions(+), 237 deletions(-) create mode 100644 lib/components/AppTitle.svelte create mode 100644 lib/components/AppVersion.svelte create mode 100644 lib/components/BeginActions.svelte create mode 100644 lib/components/BeginScreen.svelte create mode 100644 lib/components/InitialLoadScreen.svelte create mode 100644 lib/components/MenuButton.svelte create mode 100644 lib/components/ProgressBar.svelte create mode 100644 lib/version.ts delete mode 100644 ui-lib/components/BeginScreen.svelte delete mode 100644 ui-lib/components/InitialLoadScreen.svelte delete mode 100644 ui-lib/components/ProgressBar.svelte diff --git a/eslint.config.js b/eslint.config.js index 37bdda7..71da530 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -20,7 +20,7 @@ const gameplayDirectories = [ 'rng/**/*.{ts,js,svelte}', 'time/**/*.{ts,js,svelte}', 'loading/**/*.{ts,js,svelte}', - 'ui-lib/**/*.{ts,js,svelte}', + 'lib/**/*.{ts,js,svelte}', 'routes/**/*.{ts,js,svelte}', 'utils/**/*.{ts,js,svelte}' ] diff --git a/lib/components/AppTitle.svelte b/lib/components/AppTitle.svelte new file mode 100644 index 0000000..ce5c859 --- /dev/null +++ b/lib/components/AppTitle.svelte @@ -0,0 +1,41 @@ + + +
+

+ Hollowdark +

+ {#if subtitle} +

{subtitle}

+ {/if} +
+ + diff --git a/lib/components/AppVersion.svelte b/lib/components/AppVersion.svelte new file mode 100644 index 0000000..315a47b --- /dev/null +++ b/lib/components/AppVersion.svelte @@ -0,0 +1,20 @@ + + +

v {APP_VERSION}

+ + diff --git a/lib/components/BeginActions.svelte b/lib/components/BeginActions.svelte new file mode 100644 index 0000000..3ed96c4 --- /dev/null +++ b/lib/components/BeginActions.svelte @@ -0,0 +1,50 @@ + + +
+ {#if state.kind === 'first-ever'} + Begin + {:else if state.kind === 'returning-active'} + + Continue {state.characterName}'s life + + Begin a new life + {:else} + Continue + Begin a new life + {/if} + + Settings + Credits +
+ + diff --git a/lib/components/BeginScreen.svelte b/lib/components/BeginScreen.svelte new file mode 100644 index 0000000..5832a42 --- /dev/null +++ b/lib/components/BeginScreen.svelte @@ -0,0 +1,48 @@ + + +
+
+ +
+ + + + +
+ + diff --git a/lib/components/InitialLoadScreen.svelte b/lib/components/InitialLoadScreen.svelte new file mode 100644 index 0000000..3800715 --- /dev/null +++ b/lib/components/InitialLoadScreen.svelte @@ -0,0 +1,56 @@ + + +
+
+ +
+ +
+ +
+ +

{progress.currentMessage}

+

This will happen once. It will not happen again.

+
+ + diff --git a/lib/components/MenuButton.svelte b/lib/components/MenuButton.svelte new file mode 100644 index 0000000..1753155 --- /dev/null +++ b/lib/components/MenuButton.svelte @@ -0,0 +1,51 @@ + + + + + diff --git a/lib/components/ProgressBar.svelte b/lib/components/ProgressBar.svelte new file mode 100644 index 0000000..21c9e68 --- /dev/null +++ b/lib/components/ProgressBar.svelte @@ -0,0 +1,34 @@ + + +
+
+
+ + diff --git a/lib/version.ts b/lib/version.ts new file mode 100644 index 0000000..e8322e3 --- /dev/null +++ b/lib/version.ts @@ -0,0 +1,12 @@ +import pkg from '@hollowdark/package.json' + +const [major, minor] = pkg.version.split('.') + +/** + * The app's version in short display form (`.`), derived from + * the `version` field in `package.json`. Displayed in the UI footer. + */ +export const APP_VERSION: string = `${major}.${minor}` + +/** The full semver string from `package.json`. */ +export const APP_VERSION_FULL: string = pkg.version diff --git a/package.json b/package.json index 7f1b2f1..534b382 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { "name": "hollowdark", - "version": "0.1.0", + "version": "1.0.0", "private": true, "type": "module", - "description": "A literary life simulation. Modern invented world. One continuous timeline.", + "description": "A literary life simulation. Characters live, love, suffer, choose, die. The game tells their lives.", "packageManager": "pnpm@10.33.0", "engines": { "node": ">=20.11" diff --git a/routes/+page.svelte b/routes/+page.svelte index b7a0146..6ffde47 100644 --- a/routes/+page.svelte +++ b/routes/+page.svelte @@ -1,7 +1,7 @@ {#if view === 'loading'} @@ -29,5 +30,6 @@ onBegin={handleBegin} onContinue={handleContinue} onSettings={handleSettings} + onCredits={handleCredits} /> {/if} diff --git a/svelte.config.js b/svelte.config.js index 9c9ccc0..f6a0a05 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -23,7 +23,7 @@ const config = { hooks: { client: 'hooks/client.ts' }, - lib: 'ui-lib', + lib: 'lib', params: 'params', routes: 'routes', serviceWorker: 'service-worker.ts' diff --git a/tsconfig.json b/tsconfig.json index 3af4c48..6e2b9d0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -40,8 +40,8 @@ "hooks/**/*.ts", "routes/**/*.ts", "routes/**/*.svelte", - "ui-lib/**/*.ts", - "ui-lib/**/*.svelte", + "lib/**/*.ts", + "lib/**/*.svelte", "engine/**/*.ts", "events/**/*.ts", "content-system/**/*.ts", diff --git a/ui-lib/components/BeginScreen.svelte b/ui-lib/components/BeginScreen.svelte deleted file mode 100644 index c095f61..0000000 --- a/ui-lib/components/BeginScreen.svelte +++ /dev/null @@ -1,138 +0,0 @@ - - -
-
-

Hollowdark

-

A life simulation

-
- -
- {#if state.kind === 'first-ever'} - - {:else if state.kind === 'returning-active'} - - - {:else} - - - {/if} - - -
- -

{appVersion}

-
- - diff --git a/ui-lib/components/InitialLoadScreen.svelte b/ui-lib/components/InitialLoadScreen.svelte deleted file mode 100644 index 105d283..0000000 --- a/ui-lib/components/InitialLoadScreen.svelte +++ /dev/null @@ -1,57 +0,0 @@ - - -
-

Hollowdark

- -
- -
- -

{progress.currentMessage}

-

This will happen once. It will not happen again.

-
- - diff --git a/ui-lib/components/ProgressBar.svelte b/ui-lib/components/ProgressBar.svelte deleted file mode 100644 index 21c9e68..0000000 --- a/ui-lib/components/ProgressBar.svelte +++ /dev/null @@ -1,34 +0,0 @@ - - -
-
-
- - -- cgit v1.2.3