@qnroa/qtype 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/CHANGELOG.md +97 -0
  2. package/CHANGELOG.zh.md +82 -0
  3. package/LICENSE +201 -0
  4. package/README.md +113 -0
  5. package/README.zh.md +114 -0
  6. package/dist/cli/bootstrap.js +190 -0
  7. package/dist/cli/commands/check/action.js +56 -0
  8. package/dist/cli/commands/check/i18n.js +26 -0
  9. package/dist/cli/commands/check/index.js +20 -0
  10. package/dist/cli/commands/config/action.js +236 -0
  11. package/dist/cli/commands/config/i18n.js +64 -0
  12. package/dist/cli/commands/config/index.js +72 -0
  13. package/dist/cli/commands/content/index.js +22 -0
  14. package/dist/cli/commands/content/lint/action.js +102 -0
  15. package/dist/cli/commands/content/lint/i18n.js +32 -0
  16. package/dist/cli/commands/content/lint/index.js +19 -0
  17. package/dist/cli/commands/content/search/action.js +64 -0
  18. package/dist/cli/commands/content/search/i18n.js +20 -0
  19. package/dist/cli/commands/content/search/index.js +24 -0
  20. package/dist/cli/commands/content/validate/action.js +145 -0
  21. package/dist/cli/commands/content/validate/i18n.js +32 -0
  22. package/dist/cli/commands/content/validate/index.js +19 -0
  23. package/dist/cli/commands/index.js +19 -0
  24. package/dist/cli/commands/init/index.js +53 -0
  25. package/dist/cli/commands/pack/i18n.js +20 -0
  26. package/dist/cli/commands/pack/index.js +48 -0
  27. package/dist/cli/commands/plugin/i18n.js +28 -0
  28. package/dist/cli/commands/plugin/index.js +41 -0
  29. package/dist/cli/commands/publish/build/action.js +208 -0
  30. package/dist/cli/commands/publish/build/i18n.js +50 -0
  31. package/dist/cli/commands/publish/build/index.js +24 -0
  32. package/dist/cli/commands/publish/build/mermaidPass.js +93 -0
  33. package/dist/cli/commands/publish/build/mermaidPrerender.js +199 -0
  34. package/dist/cli/commands/publish/index.js +21 -0
  35. package/dist/cli/commands/publish/init/action.js +74 -0
  36. package/dist/cli/commands/publish/init/i18n.js +22 -0
  37. package/dist/cli/commands/publish/init/index.js +26 -0
  38. package/dist/cli/commands/publish/password/action.js +158 -0
  39. package/dist/cli/commands/publish/password/i18n.js +44 -0
  40. package/dist/cli/commands/publish/password/index.js +35 -0
  41. package/dist/cli/commands/publish/serve/action.js +117 -0
  42. package/dist/cli/commands/publish/serve/i18n.js +32 -0
  43. package/dist/cli/commands/publish/serve/index.js +37 -0
  44. package/dist/cli/commands/repo/index.js +19 -0
  45. package/dist/cli/commands/repo/new/action.js +98 -0
  46. package/dist/cli/commands/repo/new/i18n.js +46 -0
  47. package/dist/cli/commands/repo/new/index.js +57 -0
  48. package/dist/cli/commands/repo/sync/action.js +202 -0
  49. package/dist/cli/commands/repo/sync/i18n.js +44 -0
  50. package/dist/cli/commands/repo/sync/index.js +47 -0
  51. package/dist/cli/commands/repo/templates.js +87 -0
  52. package/dist/cli/i18n/index.js +141 -0
  53. package/dist/cli/i18n/shared.js +142 -0
  54. package/dist/cli/index.js +79 -0
  55. package/dist/cli/registry/command.js +1 -0
  56. package/dist/cli/registry/commander-i18n.js +76 -0
  57. package/dist/cli/registry/help.js +142 -0
  58. package/dist/cli/registry/mount.js +71 -0
  59. package/dist/cli/utils/output.js +92 -0
  60. package/dist/cli/utils/paths.js +13 -0
  61. package/dist/cli/utils/prompt.js +72 -0
  62. package/dist/cli/utils/repoGuard.js +41 -0
  63. package/dist/core/encrypt.js +113 -0
  64. package/dist/core/index.js +8 -0
  65. package/dist/core/keystroke/asciiMap.js +39 -0
  66. package/dist/core/keystroke/chineseMap.js +32 -0
  67. package/dist/core/keystroke/fullwidthMap.js +41 -0
  68. package/dist/core/keystroke/index.js +22 -0
  69. package/dist/core/keystroke/textNormalize.js +68 -0
  70. package/dist/core/keystroke/types.js +1 -0
  71. package/dist/core/parser/frontmatter.js +58 -0
  72. package/dist/core/parser/index.js +2 -0
  73. package/dist/core/parser/parseMaterial.js +42 -0
  74. package/dist/core/types.js +1 -0
  75. package/dist/core/typing/engine.js +112 -0
  76. package/dist/core/typing/index.js +2 -0
  77. package/dist/core/typing/metrics.js +20 -0
  78. package/dist/store/index.js +44 -0
  79. package/dist/store/kv.js +276 -0
  80. package/dist/store/storage/browser.js +61 -0
  81. package/dist/store/storage/json.js +113 -0
  82. package/dist/store/storage/memory.js +24 -0
  83. package/dist/store/types.js +47 -0
  84. package/dist/store/validators.js +71 -0
  85. package/dist/view/assets/index-DBABH3dG.js +111 -0
  86. package/dist/view/assets/index-RTLZ-zOC.css +1 -0
  87. package/dist/view/index.html +14 -0
  88. package/dist/view/qtype-logo.svg +49 -0
  89. package/dist/view/qtype-mark.svg +21 -0
  90. package/docs/README.md +23 -0
  91. package/docs/README.zh.md +20 -0
  92. package/docs/en/authoring.md +138 -0
  93. package/docs/en/cli-reference.md +171 -0
  94. package/docs/zh/authoring.md +131 -0
  95. package/docs/zh/cli-reference.md +162 -0
  96. package/package.json +85 -0
  97. package/templates/en/QTYPE.md +618 -0
  98. package/templates/en/README.md +64 -0
  99. package/templates/en/TODO.md +7 -0
  100. package/templates/en/index.md +7 -0
  101. package/templates/en/log.md +3 -0
  102. package/templates/en/material/.gitkeep +0 -0
  103. package/templates/en/material/example.md +47 -0
  104. package/templates/zh/QTYPE.md +618 -0
  105. package/templates/zh/README.md +64 -0
  106. package/templates/zh/TODO.md +7 -0
  107. package/templates/zh/index.md +7 -0
  108. package/templates/zh/log.md +3 -0
  109. package/templates/zh/material/.gitkeep +0 -0
  110. package/templates/zh/material/example.md +47 -0
@@ -0,0 +1,64 @@
1
+ # {{name}}
2
+
3
+ 一个由 LLM 维护的 **{{description}}** 打字资料,遵循 [QTYPE 规范](./QTYPE.md)。
4
+
5
+ > 你选主题、扔材料。LLM Agent 生成结构化的 Markdown 卡片。用户练打字,进度存本地。
6
+
7
+ ## 涉及
8
+
9
+ <!-- 在这里用嵌套列表定义资料覆盖的一级 / 二级主题。例如:
10
+
11
+ - **英语**
12
+ - GRE 词汇:list 1 / list 2 / list 3
13
+ - 高频句型:条件句 / 虚拟语气
14
+ - **前端**
15
+ - JavaScript 基础
16
+ - React Hooks
17
+
18
+ `TODO.md` 里的"缺失 / 覆盖薄 / 已覆盖"分类由这里决定。
19
+ -->
20
+
21
+ ## 目录
22
+
23
+ ```
24
+ {{name}}/
25
+ ├── QTYPE.md # 写作规范(权威规则)
26
+ ├── AGENTS.md # 软链 → QTYPE.md(qtype init 自动生成)
27
+ ├── CLAUDE.md # 软链 → QTYPE.md(qtype init 自动生成)
28
+ ├── GEMINI.md # 软链 → QTYPE.md(qtype init 自动生成)
29
+ ├── README.md # 本文件(涉及范围由人维护)
30
+ ├── TODO.md # 待补清单(由 Agent 维护)
31
+ ├── index.md # 全库目录
32
+ ├── log.md # 活动日志(追加)
33
+ ├── material/ # 资料文件(每个 .md 一个 deck)
34
+ │ └── assets/<slug>/
35
+ ├── raw/ # (可选) 原始材料,等 Agent 处理
36
+ │ └── assets/<slug>/
37
+ └── qtype.config.json # 打字/主题/目标速度等配置
38
+ ```
39
+
40
+ ## 常用操作(让 LLM 帮你做的)
41
+
42
+ | 操作 | 触发 | 作用 |
43
+ |---|---|---|
44
+ | ingest | `ingest <path-or-topic>` | 读材料/生成 → 建/更新 deck → 追加 log |
45
+ | quiz-gen | `按<主题>生成 <N> 张卡片` | 从主题生成新 deck |
46
+ | update | `修 <deck-slug> 里的 <字段>` | 修改现有 deck |
47
+ | cascade | `级联检查` | 修完一个 deck 后同步相关的 |
48
+ | check | `check`(或直接跑 CLI) | 校验卡片格式 |
49
+ | level-up | `合并/拆分 <slug>` | 把太小/太大的 deck 重组 |
50
+
51
+ 完整规则见 [QTYPE.md](./QTYPE.md)。
52
+
53
+ ## 你自己跑的 CLI 命令
54
+
55
+ | 命令 | 作用 |
56
+ |---|---|
57
+ | `qtype check` | 校验卡片格式,**不写文件**,CI 推荐 |
58
+ | `qtype publish build` | 构建静态站到 `dist/` |
59
+ | `qtype publish serve` | 本地预览打字 |
60
+ | `qtype pack` | 打包整个资料为可分享文件 |
61
+
62
+ ## 打字设置
63
+
64
+ `qtype.config.json` 里可配:主题、hint、目标速度、Tab 键行为等。首次运行会自动生成默认值。
@@ -0,0 +1,7 @@
1
+ # TODO
2
+
3
+ 这里是待补充的资料主题清单,由 Agent 通过操作维护,也可以由人自己写。
4
+
5
+ - [ ] 缺失
6
+ - [ ] 覆盖薄
7
+ - [x] 已覆盖
@@ -0,0 +1,7 @@
1
+ # 全库目录
2
+
3
+ <!-- 由 Agent 维护。按标签分组列出所有 deck。 -->
4
+
5
+ ## 未分类
6
+
7
+ (空)
@@ -0,0 +1,3 @@
1
+ # 活动日志
2
+
3
+ <!-- 只追加,最新在上。每条记录一次 Agent 操作。 -->
File without changes
@@ -0,0 +1,47 @@
1
+ ---
2
+ tags: [示例, 入门]
3
+ type: normal
4
+ difficulty: 1
5
+ ---
6
+
7
+ ## Q:
8
+
9
+ 一次一句,把它打出来。
10
+
11
+ ## A:
12
+
13
+ 一次一句,把它打出来。
14
+
15
+ ---
16
+
17
+ ---
18
+ tags: [英语, 词汇]
19
+ type: word
20
+ phonetic: /ˌsɪəˈriːəl/
21
+ gloss: 连续的;一系列的
22
+ translation: 表示按顺序发生
23
+ ---
24
+
25
+ ## Q:
26
+
27
+ serial
28
+
29
+ ## A:
30
+
31
+ serial
32
+
33
+ ---
34
+
35
+ ---
36
+ tags: [英语, 句型]
37
+ type: sentence
38
+ translation: 熟能生巧。
39
+ ---
40
+
41
+ ## Q:
42
+
43
+ Practice makes perfect.
44
+
45
+ ## A:
46
+
47
+ Practice makes perfect.