Go to file
hypercross 42e8971ff7 refactor: replace command link interception with :cmd[] directive
Replace the previous mechanism of intercepting specific command-prefixed
anchor tags with a dedicated `:cmd[]` markdown directive.

- Implement `cmdDirective` for `marked-directive` support.
- Update `CommandLinkManager` to listen for clicks on `[data-cmd]` spans
  instead of parsing `href` attributes.
- Add CSS styles for the new `.cmd-link` class.
2026-07-12 14:05:07 +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 refactor(cli): Extract shared deck and frontmatter utils 2026-07-09 14:31:08 +08:00
src refactor: replace command link interception with :cmd[] directive 2026-07-12 14:05:07 +08:00
.gitignore fix: inline-schema type file write 2026-03-31 16:20:42 +08:00
LICENSE chore: Prepare package for npm publication 2026-07-09 16:23:40 +08:00
QWEN.md refactor: qwen 2026-03-01 11:38:19 +08:00
README.md feat: rename project to TTTK 2026-07-09 14:14:45 +08:00
jest.config.js chore: test suite 2026-03-15 11:44:23 +08:00
package-lock.json feat: implement journal stream via Shared Worker 2026-07-12 10:08:14 +08:00
package.json feat: implement journal stream via Shared Worker 2026-07-12 10:08:14 +08:00
rsbuild.config.ts fix: update proxy path and MQTT broker URL in dev 2026-07-11 09:29:16 +08:00
todo.md feat: details 2026-03-01 09:49:01 +08:00
tsconfig.cli.json refactor: extract stat parsing logic to shared module 2026-07-09 10:00:17 +08:00
tsconfig.json chore: Prepare package for npm publication 2026-07-09 16:23:40 +08:00

README.md

TTTK — Tabletop Toolkit

A TTRPG content preview and compilation tool based on solid.js and rsbuild. Write markdown, preview in browser.

快速开始

# 无需安装,直接使用
npx tttk serve ./content

文档导航

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

功能概览

  • CLI 工具: tttk serve 预览模式 和 tttk 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