Go to file
hypercross 779722fe85 refactor: preserve URL search params during navigation
Introduce `useNavigateWithParams` to ensure that existing URL search
parameters are maintained when navigating between pages. This is
applied to the Article component, FileTree, and journal links to
prevent losing state (like session or player info) during client-side
navigation.

Also intercepts markdown anchor links in the Article component to use
client-side navigation.
2026-07-07 23:26:44 +08:00
.husky feat(husky): Add post-merge hook and prepare script 2026-06-26 11:22:15 +08:00
.idea chore: todo clean up 2026-02-28 17:40:02 +08:00
content fix(layer-editor): use stable _key for drag-and-drop sorting 2026-07-03 21:49:18 +08:00
docs feat(md-font): Add color attribute 2026-06-30 18:37:46 +08:00
src refactor: preserve URL search params during navigation 2026-07-07 23:26:44 +08:00
.gitignore fix: inline-schema type file write 2026-03-31 16:20:42 +08:00
QWEN.md refactor: qwen 2026-03-01 11:38:19 +08:00
README.md docs: update 2026-03-26 11:24:28 +08:00
jest.config.js chore: test suite 2026-03-15 11:44:23 +08:00
package-lock.json refactor: replace websocket-stream with native ws utility 2026-07-06 15:53:52 +08:00
package.json refactor: replace websocket-stream with native ws utility 2026-07-06 15:53:52 +08:00
rsbuild.config.ts fix: dev server not showing pngs 2026-04-08 19:56:44 +08:00
todo.md feat: details 2026-03-01 09:49:01 +08:00
tsconfig.cli.json feat: ai's first take... 2026-02-26 00:17:23 +08:00
tsconfig.json refactor(markdown): Replace `using` with try-finally 2026-06-25 20:33:08 +08:00

README.md

TTRPG Tools

一个基于 solid.jsrsbuild 的 TTRPG 工具箱,支持 Markdown 解析、自定义组件和 CLI 工具。

快速开始

# 安装依赖
npm install

# 全局安装 CLI
npm link

# 预览内容
ttrpg serve ./content

文档导航

文档 说明
📖 CLI 使用说明 CLI 安装、命令和用法
🛠️ 开发指南 项目结构、开发规范和构建
📝 Markdown 编写说明 Markdown 语法和组件用法
📊 CSV 编写说明 CSV 文件格式、字段定义、变量语法
🤖 MCP 服务器说明 AI 助手集成、卡牌生成工具

功能概览

  • CLI 工具: serve 预览模式 和 compile 编译模式
  • Markdown 解析: 支持指令语法、YAML 标签、mermaid 图表
  • TTRPG 组件: 骰子、表格、卡牌、标记、命令追踪器等

核心组件

组件 语法 说明
🎲 骰子 :dice[2d6+d8] 掷骰并记录结果
📊 表格 :table[./data.csv] 标签页式表格
🃏 卡牌 :md-deck[./cards.csv] 卡牌布局
📍 标记 :md-pin[A]{x=40 y=40} 图片标记
📋 追踪器 :md-commander 命令历史和状态追踪

技术栈

  • 前端: Solid.js 1.9+
  • 构建: Rsbuild
  • 样式: Tailwind CSS 4
  • Markdown: marked + marked-directive
  • 测试: Jest

许可证

MIT