Files
404-Layers/package.json
ncode 956dc57763 Phase 2: React scaffolding, self-hosted fonts, design tokens
Vite builds to dist/, deliberately not www/. www/ is still produced by
sync-www.sh for the Phase 1 APK, which stays installable throughout the
port; cutover is a one-line webDir change in capacitor.config.json.
base is relative because Capacitor serves the bundle from the APK, where
absolute asset paths would 404.

index.html omits viewport-fit=cover on purpose. That string is what
makes Capacitor's SystemBars plugin pass insets through to the page;
without it the plugin pads the decor view and the layout is always
between the status and gesture bars. Phase 1 learned this the hard way.

Fonts are self-hosted for offline use, latin subsets only: three files
at 68K, against the 133K Barlow costs today. Space Grotesk is variable,
so one file covers 400-700. Dropped latin-ext and vietnamese.

Carets are drawn as SVG, not typed. U+25BE and U+23EE sit outside every
Latin subset and would fall back to a system font mid-label.

base.css carries the settled palette and the measured vertical budget as
tokens, so a component cannot quietly exceed it:
  8 + 44 + 8 + 525 + 8 + 84 + 8 + 50 = 735

Verified: typecheck clean, 103 tests, vite build emits with the fonts
copied, and www/ is untouched.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 01:05:09 +03:00

45 lines
1.5 KiB
JSON

{
"name": "sp404-layers",
"version": "1.0.0",
"private": true,
"type": "module",
"description": "SP-404MK2 combo trainer, wrapped as an Android app",
"scripts": {
"sync:www": "bash scripts/sync-www.sh",
"sync": "npm run sync:www && npx cap sync android",
"apk": "npm run sync && cd android && ./gradlew assembleDebug",
"install:apk": "adb install -r android/app/build/outputs/apk/debug/app-debug.apk",
"device:awake": "bash scripts/device.sh awake",
"device:keep-awake": "bash scripts/device.sh keep-awake",
"device:sleep-normal": "bash scripts/device.sh sleep-normal",
"device:launch": "bash scripts/device.sh launch",
"run:android": "npm run apk && npm run install:apk && npm run device:launch",
"logcat": "adb logcat -s Capacitor:V Capacitor/Console:V chromium:V",
"test": "vitest run",
"test:watch": "vitest",
"typecheck": "tsc --noEmit",
"extract:data": "node scripts/extract-reference-data.mjs",
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"@capacitor/android": "^8.5.2",
"@capacitor/app": "^8.1.1",
"@capacitor/core": "^8.5.2",
"@capacitor/haptics": "^8.0.2",
"@capacitor/preferences": "^8.0.1",
"react": "^19.3.0",
"react-dom": "^19.3.0"
},
"devDependencies": {
"@capacitor/cli": "^8.5.2",
"@types/react": "^19.3.0",
"@types/react-dom": "^19.3.0",
"@vitejs/plugin-react": "^6.1.1",
"typescript": "^7.0.2",
"vite": "^8.3.0",
"vitest": "^5.0.1"
}
}