navigator.clipboard is only available in a secure context (HTTPS or
localhost), so the Copy URL button threw over plain HTTP. Fall back to
the deprecated document.execCommand("copy") when the Clipboard API is
unavailable.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a small Go + SQLite service (server/) that stores character-sheet
JSON blobs and returns short, content-addressed IDs, so sheets can be
shared via a compact ?s=<id> link instead of an oversized inline payload.
CharacterSheet.tsx now POSTs to the service on share and fetches by ID on
load, falling back to the self-contained ?c= inline link when the backend
is unreachable. Legacy ?c= links still decode.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Use URL-safe base64 (base64url) for the ?c= payload so it no longer
needs percent-encoding, and prune empty string/array fields before
encoding. Decoding accepts standard base64, so existing links still load.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Convert the React app from JS/JSX to TS/TSX and add type-checking:
- Rename sheet-main, book, BookIndex, CharacterSheet to .ts(x) and
add types (Fields, Bond, ClassEntry, Spell, CheckMap; loose
SavedData for abbreviated save/share payloads)
- Add globals.d.ts for CSS imports and the __BOOK_DATA__ global
- tsconfig.json (strict, noEmit) and a 'typecheck' npm script
- webpack: handle ts/tsx via @babel/preset-typescript
- Enforce types with a tracked pre-commit hook (core.hooksPath),
wired up automatically via the 'prepare' script
- Update stale Justfile format target for the src/ layout
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>