Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .changes/frontend-svelte-core.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
kind: chore
---
Consume the shared @openshock/svelte-core library in the captive portal

## Release Note
The captive portal frontend now consumes the shared `@openshock/svelte-core` component library instead of vendoring its own copies. This is an internal refactor with no user-facing change; the update is applied automatically with the firmware flash.

- Replace the vendored shadcn UI, components, theme, and utilities with `@openshock/svelte-core` (^0.2.2), imported by package name through its JS barrels
- Import the library's `theme.css` (shared design tokens + self-registering Tailwind source) instead of an inlined theme copy
- Use the library's self-contained `LightSwitch`/`Toaster` and color-scheme state, removing the local `LightSwitch` and `ColorSchemeStore`
1 change: 1 addition & 0 deletions .github/actions/build-frontend/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ runs:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
if: ${{ !inputs.skip-checkout }}
with:
submodules: recursive
sparse-checkout: |
frontend
path: ${{ github.repository }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
submodules: recursive
sparse-checkout: |
.github
frontend
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
submodules: recursive

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ data/www

# ignore generated files
.vs
packages
/packages
*.sln
compile_commands.json

Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
path = schemas
url = https://github.com/OpenShock/flatbuffers-schemas
branch = local-comms-revamp
[submodule "frontend/packages/svelte-core"]
path = frontend/packages/svelte-core
url = git@github.com:OpenShock/svelte-core.git
3 changes: 3 additions & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ test-results
playwright-report
node_modules

# Turborepo
.turbo

# Output
.output
.vercel
Expand Down
2 changes: 1 addition & 1 deletion frontend/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24.12.0
24.14.0
3 changes: 3 additions & 0 deletions frontend/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ yarn.lock
/components.json
/src/lib/_fbs
/src/lib/components/ui

# Workspace packages (e.g. svelte-core submodule) own their own formatting
/packages
2 changes: 1 addition & 1 deletion frontend/components.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://shadcn-svelte.com/schema.json",
"tailwind": {
"css": "src\\app.css",
"css": "src/app.css",
"baseColor": "neutral"
},
"aliases": {
Expand Down
24 changes: 4 additions & 20 deletions frontend/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ export default defineConfig(
// 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
'no-undef': 'off',
'no-control-regex': 'off',
'no-misleading-character-class': 'off',
'no-useless-assignment': 'warn',
'svelte/no-unused-svelte-ignore': 'off',
'@typescript-eslint/no-unused-vars': [
Expand All @@ -43,26 +45,6 @@ export default defineConfig(
},
},
},
{
files: ['**/*.svelte'],

languageOptions: {
parserOptions: {
parser: ts.parser,
ecmaVersion: 2020,
},
},
},
{
files: ['**/*.svelte.ts', '**/*.svelte.js'],

languageOptions: {
parser: ts.parser,
parserOptions: {
ecmaVersion: 2020,
},
},
},
{
ignores: [
'.DS_Store',
Expand All @@ -78,6 +60,8 @@ export default defineConfig(
'yarn.lock',
'src/lib/_fbs',
'src/lib/components/ui',
// Workspace packages (e.g. svelte-core submodule) own their own linting
'packages/**',
],
}
);
74 changes: 37 additions & 37 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,53 +16,53 @@
"test:e2e": "playwright test"
},
"devDependencies": {
"@eslint/compat": "^2.0.3",
"@eslint/js": "^10.0.1",
"@internationalized/date": "^3.12.0",
"@lucide/svelte": "^0.577.0",
"@playwright/test": "^1.58.2",
"@sveltejs/vite-plugin-svelte": "^7.0.0",
"@tailwindcss/vite": "^4.2.2",
"@types/node": "^25.5.0",
"bits-ui": "2.16.3",
"@eslint/compat": "^2.1.0",
"@eslint/js": "latest",
"@internationalized/date": "^3.12.2",
"@lucide/svelte": "^1.17.0",
"@openshock/svelte-core": "workspace:*",
"@playwright/test": "^1.60.0",
"@sveltejs/vite-plugin-svelte": "^7.1.2",
"@tailwindcss/vite": "^4.3.0",
"@types/node": "^25.9.2",
"bits-ui": "2.18.1",
"clsx": "^2.1.1",
"eslint": "^10.1.0",
"core": "workspace:@openshock/svelte-core@*",
"eslint": "^10.4.1",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-compat": "^7.0.1",
"eslint-plugin-svelte": "^3.16.0",
"eslint-plugin-compat": "^7.0.2",
"eslint-plugin-svelte": "^3.19.0",
"flatbuffers": "^25.9.23",
"globals": "^17.4.0",
"prettier": "^3.8.1",
"globals": "^17.6.0",
"prettier": "^3.8.4",
"prettier-plugin-organize-imports": "^4.3.0",
"prettier-plugin-svelte": "^3.5.1",
"prettier-plugin-tailwindcss": "^0.7.2",
"rollup-plugin-license": "^3.7.0",
"prettier-plugin-svelte": "^4.1.0",
"prettier-plugin-tailwindcss": "^0.8.0",
"rollup-plugin-license": "^3.7.1",
"rollup-plugin-visualizer": "^7.0.1",
"svelte": "^5.55.0",
"svelte-check": "^4.4.5",
"svelte-sonner": "^1.1.0",
"tailwind-merge": "^3.5.0",
"svelte": "^5.56.4",
"svelte-check": "^4.6.0",
"svelte-sonner": "^1.1.1",
"tailwind-merge": "^3.6.0",
"tailwind-variants": "^3.2.2",
"tailwindcss": "^4.2.2",
"tailwindcss": "^4.3.0",
"turbo": "^2.5.0",
"tw-animate-css": "^1.4.0",
"typescript": "^5.9.3",
"typescript-eslint": "^8.57.2",
"vite": "^8.0.2",
"vite-plugin-singlefile": "^2.3.2",
"vitest": "^4.1.1"
"typescript": "^6.0.3",
"typescript-eslint": "^8.61.0",
"vite": "^8.0.16",
"vite-plugin-singlefile": "^2.3.3",
"vitest": "^4.1.8"
},
"engines": {
"node": "^24.12.0",
"pnpm": "^10.30.1"
"node": ">=24 <25",
"pnpm": ">=10"
},
"volta": {
"node": "24.12.0"
"node": "24.14.0"
},
"packageManager": "pnpm@10.30.3",
"pnpm": {
"onlyBuiltDependencies": [
"@tailwindcss/oxide",
"esbuild"
]
}
"packageManager": "pnpm@11.1.2",
"browserslist": [
"> 0.5%, last 2 versions, Firefox ESR, not dead, not op_mini all"
]
}
1 change: 1 addition & 0 deletions frontend/packages/svelte-core
Submodule svelte-core added at 6b24d6
Loading
Loading