From 8c9708a508c86950d07f6ba562b8a5bdd0f3d422 Mon Sep 17 00:00:00 2001 From: Jake Date: Fri, 15 May 2026 08:38:23 +0100 Subject: [PATCH] v0.2 Phase 4: wrapper alias layer (src/lib/ui/) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Six thin alias wrappers, same prop APIs as the underlying components. Lets pages migrate imports from $lib/components/* to $lib/ui/* one file at a time without touching markup, and gives Phase 5+ a place to tighten grammar without churning every call site. LumotiaCard → Card.svelte LumotiaStatusPill → StatusPill.svelte LumotiaToggle → Toggle.svelte (forwards bind:checked, bind:loading) LumotiaSettingsGroup → SettingsGroup.svelte (typed Props for svelte-check) LumotiaEmptyState → EmptyState.svelte LumotiaPostCaptureCard → PostCaptureCard.svelte Per the plan, the underlying components in src/lib/components/ are untouched. They get retired during the per-page migrations in Phase 7 once no consumer remains. LumotiaSettingsGroup mirrors the underlying Props interface explicitly because Svelte 5's spread-into-typed-component caught a real missing- `title` error during svelte-check. The mirrored interface keeps call sites type-safe when importing via $lib/ui/. Phase 4 per-phase gate green: npm run check (0/0/4135 files), npm test (all green), npm run test:e2e (16/16), npm run guard:no-skeleton (clean). Co-Authored-By: Claude Opus 4.7 (1M context) --- docs/release/v0.2-frontend-overhaul.md | 14 +++++++------- src/lib/ui/LumotiaCard.svelte | 13 +++++++++++++ src/lib/ui/LumotiaEmptyState.svelte | 9 +++++++++ src/lib/ui/LumotiaPostCaptureCard.svelte | 11 +++++++++++ src/lib/ui/LumotiaSettingsGroup.svelte | 21 +++++++++++++++++++++ src/lib/ui/LumotiaStatusPill.svelte | 11 +++++++++++ src/lib/ui/LumotiaToggle.svelte | 24 ++++++++++++++++++++++++ 7 files changed, 96 insertions(+), 7 deletions(-) create mode 100644 src/lib/ui/LumotiaCard.svelte create mode 100644 src/lib/ui/LumotiaEmptyState.svelte create mode 100644 src/lib/ui/LumotiaPostCaptureCard.svelte create mode 100644 src/lib/ui/LumotiaSettingsGroup.svelte create mode 100644 src/lib/ui/LumotiaStatusPill.svelte create mode 100644 src/lib/ui/LumotiaToggle.svelte diff --git a/docs/release/v0.2-frontend-overhaul.md b/docs/release/v0.2-frontend-overhaul.md index 0a2d211..abb7c79 100644 --- a/docs/release/v0.2-frontend-overhaul.md +++ b/docs/release/v0.2-frontend-overhaul.md @@ -85,12 +85,12 @@ Filled progressively during Phases 4–5. Wrappers live in `src/lib/ui/`; bespok | Wrapper | Wraps | Status | |---|---|---| -| `LumotiaCard` | `Card.svelte` | pending | -| `LumotiaStatusPill` | `StatusPill.svelte` | pending | -| `LumotiaToggle` | `Toggle.svelte` | pending | -| `LumotiaSettingsGroup` | `SettingsGroup.svelte` | pending | -| `LumotiaEmptyState` | `EmptyState.svelte` | pending | -| `LumotiaPostCaptureCard` | `PostCaptureCard.svelte` | pending | +| `LumotiaCard` | `Card.svelte` | ✅ Phase 4 | +| `LumotiaStatusPill` | `StatusPill.svelte` | ✅ Phase 4 | +| `LumotiaToggle` | `Toggle.svelte` | ✅ Phase 4 | +| `LumotiaSettingsGroup` | `SettingsGroup.svelte` | ✅ Phase 4 | +| `LumotiaEmptyState` | `EmptyState.svelte` | ✅ Phase 4 | +| `LumotiaPostCaptureCard` | `PostCaptureCard.svelte` | ✅ Phase 4 | ### 6.2 Phase 5 new primitives @@ -201,7 +201,7 @@ Filled during execution. Each entry: phase #, date, what landed, what's next. | 1 | ✅ complete | Tooling baseline green: `npm run check` clean, `npm test` clean, `npm run test:e2e` 16/16, `npm run guard:no-skeleton` clean, 10 screenshot artefacts. Browser-preview OS detection fixed (see Regression diary). | | 2 | ✅ complete | bits-ui 2.18.1, formsnap 2.0.1, sveltekit-superforms 2.30.1, zod 4.4.3, @internationalized/date 3.12.1. `npm audit signatures` 273 verified + 93 attestations. | | 3 | ✅ complete | New tokens `--color-caution`, `--color-info`, `--color-accent-environment` (dark + light), `--color-warning` aliased to `var(--color-caution)`. KI-05 resolved: `theme` dropped from SettingsState type + defaults, all four route-layout migration `$effect`s deleted, two SettingsPage SegmentedButton bindings repointed to `preferences.theme` via Svelte 5 function bindings, one-shot legacy-theme migration on first mount strips the field after copying. Gate green (check 0/0, vitest 13/13, e2e 16/16). | -| 4 | pending | Wrapper alias layer | +| 4 | ✅ complete | Six wrapper aliases under `src/lib/ui/`: Lumotia{Card,StatusPill,Toggle,SettingsGroup,EmptyState,PostCaptureCard}. Same prop APIs, $bindable forwarded for Toggle. Underlying `src/lib/components/*.svelte` untouched. | | 5 | pending | New primitives + design-system-v2 preview | | 6 | pending | Shell split | | 7.1 ShutdownRitualPage | pending | | diff --git a/src/lib/ui/LumotiaCard.svelte b/src/lib/ui/LumotiaCard.svelte new file mode 100644 index 0000000..a72bf5f --- /dev/null +++ b/src/lib/ui/LumotiaCard.svelte @@ -0,0 +1,13 @@ + + + + {#if children}{@render children()}{/if} + diff --git a/src/lib/ui/LumotiaEmptyState.svelte b/src/lib/ui/LumotiaEmptyState.svelte new file mode 100644 index 0000000..0ce1e16 --- /dev/null +++ b/src/lib/ui/LumotiaEmptyState.svelte @@ -0,0 +1,9 @@ + + + diff --git a/src/lib/ui/LumotiaPostCaptureCard.svelte b/src/lib/ui/LumotiaPostCaptureCard.svelte new file mode 100644 index 0000000..6bad95f --- /dev/null +++ b/src/lib/ui/LumotiaPostCaptureCard.svelte @@ -0,0 +1,11 @@ + + + diff --git a/src/lib/ui/LumotiaSettingsGroup.svelte b/src/lib/ui/LumotiaSettingsGroup.svelte new file mode 100644 index 0000000..de99be8 --- /dev/null +++ b/src/lib/ui/LumotiaSettingsGroup.svelte @@ -0,0 +1,21 @@ + + + + {#if children}{@render children()}{/if} + diff --git a/src/lib/ui/LumotiaStatusPill.svelte b/src/lib/ui/LumotiaStatusPill.svelte new file mode 100644 index 0000000..ef9e48b --- /dev/null +++ b/src/lib/ui/LumotiaStatusPill.svelte @@ -0,0 +1,11 @@ + + + diff --git a/src/lib/ui/LumotiaToggle.svelte b/src/lib/ui/LumotiaToggle.svelte new file mode 100644 index 0000000..bd9fafb --- /dev/null +++ b/src/lib/ui/LumotiaToggle.svelte @@ -0,0 +1,24 @@ + + +