initI18n (src/lib/i18n/index.ts) registers three locales and picks the
initial one in order: kon_locale in localStorage > navigator.language short
code > en. +layout.svelte calls it once at app boot; guarded so per-window
re-init is a no-op.
Locale files are deliberately sparse — this is a scaffolding pass so strings
can be migrated incrementally. The Settings → Appearance → Language picker
plus its own description is the first real consumer; everything else
continues to render as hardcoded text until extracted.
Also: split the @chenglou/pretext ambient shim into src/lib/shims.d.ts. The
declaration previously lived in app.d.ts alongside a top-level `export {}`,
which made app.d.ts a module — scoping `declare module` to its own imports
and breaking resolution from src/lib/utils/textMeasure.ts. The fresh
.svelte-kit sync triggered by installing svelte-i18n surfaced it. Ambient
shim files must stay script-scoped (no top-level imports/exports).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
37 lines
1.0 KiB
JSON
37 lines
1.0 KiB
JSON
{
|
|
"name": "kon",
|
|
"version": "0.1.0",
|
|
"description": "Kon — Think out loud",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "npm run dev:frontend",
|
|
"dev:frontend": "svelte-kit sync && vite dev",
|
|
"build": "vite build",
|
|
"preview": "vite preview",
|
|
"check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json",
|
|
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch",
|
|
"tauri": "tauri"
|
|
},
|
|
"license": "MIT",
|
|
"dependencies": {
|
|
"@tauri-apps/api": "^2",
|
|
"@tauri-apps/plugin-dialog": "^2.6.0",
|
|
"@tauri-apps/plugin-global-shortcut": "^2.3.1",
|
|
"@tauri-apps/plugin-opener": "^2",
|
|
"lucide-svelte": "^0.577.0",
|
|
"svelte-i18n": "^4.0.1"
|
|
},
|
|
"devDependencies": {
|
|
"@sveltejs/adapter-static": "^3.0.6",
|
|
"@sveltejs/kit": "^2.9.0",
|
|
"@sveltejs/vite-plugin-svelte": "^5.0.0",
|
|
"@tailwindcss/vite": "^4.2.1",
|
|
"@tauri-apps/cli": "^2",
|
|
"svelte": "^5.0.0",
|
|
"svelte-check": "^4.0.0",
|
|
"tailwindcss": "^4.2.1",
|
|
"typescript": "~5.6.2",
|
|
"vite": "^6.0.3"
|
|
}
|
|
}
|