Commit Graph

33 Commits

Author SHA1 Message Date
hypercross 894f1735e5 refactor: replace stat system with variable system
Replaces the specialized `stat` system with a more general-purpose
variable system. This includes:

- Renaming `ReactiveStatManager` to `ReactiveVariableManager`
- Changing template syntax from `${key}` to `{{$key}}`
- Replacing `StatsView` with `VariableView` to show declared, plain,
  and tag-typed variables
- Updating command `/stat` to `/set`
- Refactoring the reactivity engine to support variable declarations
  and tag modifiers via `csv role=declare` blocks
2026-07-12 17:29:03 +08:00
hypercross 182d7ff28d feat: add CommandLinkManager to intercept command links
Implement a component that uses event delegation to intercept clicks
on markdown links starting with command prefixes (e.g., >roll, >spark).
It dispatches these as journal stream messages based on the user's
role (Observer, Player, or GM).
2026-07-12 13:48:34 +08:00
hypercross 736bcf4bb2 feat: add ReactiveStatManager for markdown template support
Introduce ReactiveStatManager to allow dynamic stat replacement within
rendered markdown content. This component scans the article DOM for
`${key}` patterns and reactively updates them based on the journal
stream.

As part of this change, the SVG-based StatSheet system is removed in
favor of this more flexible text-based approach.
2026-07-12 13:32:49 +08:00
hypercross d95615f210 refactor: remove token and token-viewer components
Remove the `md-token` and `md-token-viewer` components along with their
associated 3D generation and image tracing utilities. Update
documentation and project metadata to reflect these changes and rename
the project title to "Tabletop Tools".
2026-07-08 15:09:22 +08:00
hypercross aa326f38a0 refactor: introduce RevealManager and Article DOM context
Decouple the reveal logic from the `Article` component by introducing
a `RevealManager` component and an `ArticleDomCtx`. This allows the
reveal logic to reactively manage DOM injections and classes without
polluting the `Article` component's props or lifecycle.

Additionally, implements a robust `cleanupInjections` mechanism to
ensure that injected buttons and styling artifacts are properly removed
during navigation, role changes, or disconnections.
2026-07-07 22:19:04 +08:00
hyper 53c8ce0677 feat(viewer): Add data source dialog
Introduce a dialog for switching between built-in content and a
user-selected local folder. Persist the folder handle in IndexedDB
so the selection survives page refreshes. Scan the folder for .md,
.yarn, and .csv files to build the file index.

Update App and Sidebar to pass file tree and heading data, and
add TypeScript declarations for the File System Access API.
2026-06-30 19:20:08 +08:00
hyper e861b80f57 feat(components): add md-border custom element 2026-06-26 11:10:06 +08:00
hyper 110451ae04 feat: Add command documentation dialog
Introduce a modal dialog that displays documentation for all available
markdown commands, accessible via a '?' button in the header.
2026-06-25 21:04:53 +08:00
hyper f734da6acd feat(viewer): Add md-embed component 2026-06-25 20:43:40 +08:00
hyper 1a4ae417fe feat: Add multi-source font and style manager
Rename md-emfont to md-font with support for Google, emfont, and local
sources. Introduce article-style-manager.ts for centralized lifecycle
management of article-level styles and external stylesheet link
injection with reference counting. Refactor md-bg to use the new
manager, removing direct createEffect on article styles.
2026-06-25 20:26:34 +08:00
hypercross 4038d67ea0 feat: add md-emfont component and format code
- Add `md-emfont` custom element for dynamic font loading
- Register `md-emfont` in component index
- Reformat `Article.tsx` and `index.ts` using double quotes and
  consistent spacing
- Fix indentation in `index.html`
2026-05-11 11:25:57 +08:00
hypercross e92065d14c refactor: token viewer 2026-03-15 19:14:39 +08:00
hypercross 8c33dc282b feat: md-token 2026-03-15 19:01:39 +08:00
hypercross 0594fef9ac feat: ai's attempt 2026-03-02 16:49:55 +08:00
hypercross 5d026dfd80 refactor: impl 2026-03-01 12:41:03 +08:00
hypercross 80a6b4526c refactor: attribute editing 2026-03-01 10:28:44 +08:00
hypercross f7eabbdeba feat: ai's attempt 2026-03-01 09:36:09 +08:00
hypercross 1f5ee24a0f chore: clean up 2026-02-28 17:44:38 +08:00
hypercross a4023c994f feat: ai's attempt 2026-02-28 16:28:07 +08:00
hyper 7e95c44d8d refactor: add fit prop to bg 2026-02-27 21:26:51 +08:00
hyper 95be758bcc feat: md-bg 2026-02-27 21:22:13 +08:00
hypercross 807ce5a406 refactor: reorg 2026-02-27 12:34:55 +08:00
hypercross 907cabe9a0 feat: md-deck 2026-02-27 00:52:29 +08:00
hypercross ca1801e1a7 refactor: md-pins 2026-02-27 00:27:04 +08:00
hypercross 9a858918fe feat: pin editor 2026-02-26 23:51:27 +08:00
hypercross f7eb116aa3 feat: a pin component 2026-02-26 18:11:33 +08:00
hypercross 2ab6ed9687 feat: reactive sidebar 2026-02-26 15:22:40 +08:00
hypercross c923d80d30 refactor: FileTree 2026-02-26 15:04:17 +08:00
hypercross ba7b264a97 feat: ai's attempt 2026-02-26 14:24:48 +08:00
hypercross f4a6d6978b fix: data loading 2026-02-26 09:31:12 +08:00
hypercross d2a383c5d8 feat: ai's attempt 2026-02-26 09:24:26 +08:00
hypercross 795c2c4389 fix: solid-element 2026-02-26 00:47:26 +08:00
hypercross 3c9cf552e5 feat: ai's first take... 2026-02-26 00:17:23 +08:00