Each history entry now has a third action: a real anchor (rendered via
the Button's href, target="_blank") linking to the editor with that
entry's serialized state. Being a normal link, users can also copy it or
open it in a new tab via the context menu.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adding the `svelte-check` CI gate surfaced pre-existing type errors and
warnings under develop's TypeScript 6 / Svelte 5.56 bump. Fixes them so
`pnpm check` reports 0 errors / 0 warnings:
- Add `lang="ts"` to Share/Privacy (and a script to PrivacyPolicyLink) so
importers get real declarations instead of implicit `any`.
- Replace the deprecated `monaco.languages.json` with the new top-level
`monaco.json` namespace (proper API, no casts).
- Navbar: use `resolve('/', {})` instead of the deprecated `base`.
- Type the promo `component` as `Component<{ closeBanner: Snippet }>` and
MainMenu's `renderer` as `Snippet<[Omit<MenuItem, 'renderer'>]>`.
- Index-by-string casts in state.ts / Preset / DiagramDocumentationButton.
- Make Actions' clipboard handler accept an optional event.
- toggle-group: expose variant/size via getters to fix the
state_referenced_locally warning.
- Make the History e2e save/delete cases change state via a sample
diagram (deterministic) instead of editor typing.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Migrate the Timeline/Saved history state module to idiomatic Svelte 5
runes and wire up type-checking.
- Rename history.ts -> historyState.svelte.ts and replace the Svelte
stores with $state-backed reactive values, removing the get() calls
(the only remaining one reads the external inputStateStore). A small
localStorage-backed `persisted()` helper keeps the same keys, so user
data is preserved. Consumers read via the reactive `historyState`
getter object instead of store auto-subscriptions.
- The gist loader now replaces the in-memory revisions in one call
(setLoaderEntries) instead of appending, so loading a new gist no
longer accumulates stale revisions.
- Add svelte-check: new `check` script, a "Type check" step in the
unit-tests CI workflow, and skipLibCheck so the check passes on the
dependency .d.ts files. svelte-check reports 0 errors / 0 warnings.
- Add accessible labels to the History toggle and the per-item
Restore/Delete buttons (a11y + testability).
- Unskip tests/history.spec.ts and rewrite it against the new UI:
load-from-localStorage + restore, tab-highlight follows the mode,
save/dedupe, auto-vs-manual isolation, and delete/clear. All pass.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>