Commit Graph
38 Commits
Author SHA1 Message Date
hypercross b7a804f1cf refactor: remove as= override and render data-spark at runtime
- Drop resolveBlockAs and the as= attribute; scanDoc now switches
  directly on role and warns on unknown roles instead of silently
  stripping
- md-table derives data-spark from its loaded CSV via
  parseSparkTableCsv; delete injectSparkDirectives and the second
  registry pass so pathIndex is exactly scanDoc output
- Align spark-table dice header regex with isSparkTableHeader
2026-09-08 22:18:12 +08:00
hypercross 256c685f6c refactor: remove implicit content sniffing and table conversion
- Split loadCSV into parseCSVString (content) and loadCSVFromPath
  (path); drop isCSV/looksLikeCsv heuristics
- Delete coerceSparkTables and markedTable label-header magic;
  plain markdown tables now render as plain tables
- Add explicit markdown role=spark-table fence syntax that converts
  pipe tables to CSV at scan time, with dice-header validation
- Map ESM-only github-slugger and csv-parse browser build to CJS in
  jest config; add content-registry tests
2026-09-08 21:33:12 +08:00
hyper c03528a293 feat: Unify spark table detection and content resolution
Export isSparkTableHeader from content-registry and use it in both CLI
and frontend table parsing. Add resolveContentRef to resolve content
references consistently. Write processed registry content back to the
file index so browser mode renders identically to CLI mode.
2026-08-07 13:15:51 +08:00
hypercross 2068ecad10 feat: add remix mode for spark table rolling
Introduces a `remix` option that allows each data column in a spark
table to be rolled independently. This is enabled via a `remix=true`
attribute in the directive's extra attributes.

Also refactors spark table scanning by moving markdown parsing logic
from the frontend to a new CLI-side `spark-scanner.ts` utility,
improving separation of concerns.
2026-07-11 11:58:01 +08:00
hypercross 719bb6ad8a refactor: use CSV path instead of markdown file for spark tables
Switch the spark table resolution logic to use the direct path to the
backing CSV file rather than attempting to parse the containing
markdown file. This simplifies the lookup process and improves
reliability.

Also refactor `SparkTableMeta` to store rows as objects keyed by
header instead of raw string arrays.
2026-07-11 11:45:38 +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 376dde44b5 feat: add range support for spark table cell matching 2026-07-08 00:37:01 +08:00
hypercross e801ac9b5f refactor: improve spark table lookup and error reporting
Replace the heuristic-based slug parsing with a more robust
combined-slug lookup to correctly handle page names containing
hyphens. Added `scanSparkTables` to provide better error messages
when a table is not found.
2026-07-07 19:13:11 +08:00
hypercross 2f29f8774d feat: add spark table completion and rolling support
Implement "spark tables" functionality, which allows users to roll
dice against markdown tables to retrieve specific values.

- Add `sparkTablesSource` to scan markdown files for tables starting
  with a dice notation (e.g., d6, d20).
- Implement `/spark` command in the journal to resolve and roll
  spark tables.
- Add a new message type `spark` with a dedicated UI component to
  render the results.
- Update completions API to include spark table metadata.
2026-07-07 19:02:17 +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 831955e16e fix: csv loading 2026-03-31 22:32:52 +08:00
hypercross f9d0620d3e fix: chinese prop names 2026-03-21 18:52:40 +08:00
hypercross 66e8564a34 feat: md-table weighted random 2026-03-21 18:42:50 +08:00
hypercross 6b411c2f24 feat: inline md-table 2026-03-21 17:48:30 +08:00
hyper b099d5695d refactor: move centering to 3mf gen 2026-03-17 12:49:49 +08:00
hyper 352b17071c fix: cleanup 2026-03-17 12:19:15 +08:00
hyper c3f71f8be1 Merge branch 'master' of https://gitea.ayi-games.online/hypercross/ttrpg-tools 2026-03-17 12:10:43 +08:00
hypercross 342cf97a50 fix: parameters 2026-03-16 09:39:43 +08:00
hypercross cde2134b4b fix: svg parsing 2026-03-16 09:29:32 +08:00
hypercross c99f602efa refactor: some tweaks 2026-03-16 09:02:35 +08:00
hyper 2476659fc6 refactor: stl->3mf 2026-03-15 23:17:16 +08:00
hypercross a4e8e31921 fix: render issues 2026-03-15 19:24:40 +08:00
hypercross 8c33dc282b feat: md-token 2026-03-15 19:01:39 +08:00
hypercross 748f57dd55 fix: refactor stuff 2026-03-13 16:02:09 +08:00
hypercross 27bc2fc747 refactor: cached and reloaded file-index 2026-03-13 15:50:50 +08:00
hypercross 97923c8d35 fix: icons 2026-03-13 11:53:41 +08:00
hypercross 346b97153f fix: bug 2026-03-13 10:59:24 +08:00
hypercross b2e10d847e feat: front matter in decks 2026-03-13 10:50:08 +08:00
hypercross a02edabc41 fix: yarn spinner runner 2026-03-02 17:54:40 +08:00
hypercross 3e14bff1e9 feat: command template csv 2026-03-01 11:52:09 +08:00
hypercross 9d189bd842 refactor: move cardlayer to just load store 2026-02-28 13:31:27 +08:00
hypercross a2ac902129 feat: csv front matter 2026-02-28 12:16:58 +08:00
hyper 95be758bcc feat: md-bg 2026-02-27 21:22:13 +08:00
hypercross c6580b7c69 refactor: break down & clean up 2026-02-27 15:22:51 +08:00
hypercross 5638b6200b refactor: move utils 2026-02-27 12:40:50 +08:00
hypercross a409efaf95 refactor: csv loader 2026-02-27 12:38:09 +08:00
hypercross 807ce5a406 refactor: reorg 2026-02-27 12:34:55 +08:00
hypercross 88cfe03779 refactor: ai's attempt 2026-02-27 12:24:51 +08:00