Consume @openshock/svelte-core in the captive portal#483
Open
hhvrc wants to merge 6 commits into
Open
Conversation
Bump @openshock/svelte-core to ^0.2.2 and consume it through package-name subpaths and JS barrels (components, stepper, typeguards, ui/*) instead of the $core/$hadcn filesystem aliases and raw .svelte file paths, which made Vite's optimizer crawl/pre-bundle the library and break styling/hydration. - LightSwitch and the sonner Toaster are now self-contained; drop the prop wiring and adopt svelte-core's color-scheme state (initializeColorScheme), removing the local ColorSchemeStore. - app.css imports @openshock/svelte-core/theme.css (canonical design tokens + self-registering Tailwind @source) instead of an inlined copy, keeping only the firmware-specific .kbd/.code helpers. - Remove $core/$hadcn aliases from vite.config.ts (keep $lib).
Contributor
Change file check❌ Invalid format — an added change file failed validation: |
|
Ready to review this PR? Stage has broken it down into 8 individual chapters for you: Chapters generated by Stage for commit 0c35251 on Jun 26, 2026 2:18pm UTC. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Migrate the captive-portal frontend to consume the shared @openshock/svelte-core library (
^0.2.2) instead of vendoring its own copies of the shadcn UI, components, theme, and utilities.How it consumes the library
@openshock/svelte-core/ui/*,/components,/stepper,/typeguards, …) — never raw.sveltefile paths or filesystem aliases intodist. Raw.svelte/alias imports make Vite's dep optimizer crawl and pre-bundle the library, which breaks the dependency scan, hydration, and styling.app.cssimports@openshock/svelte-core/theme.css(the canonical design tokens + its self-registering Tailwind@source), replacing the inlined theme copy. Only the firmware-specific.kbd/.codehelpers are kept. This is what makes Tailwind generate the library's component classes (otherwise components render misaligned/unstyled).LightSwitchand the sonnerToasterare used in their self-contained form; the localColorSchemeStoreis removed in favour of svelte-core's color-scheme state (initializeColorScheme).$core/$hadcnaliases are removed fromvite.config.ts($libkept).Verification
svelte-check: 0 errors / 0 warningsMirrors the same migration done in the cloud frontend.