@heycys/gallery 0.0.0-stage → 0.1.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 (806) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +50 -2
  3. package/THIRD-PARTY-NOTICES.md +3303 -0
  4. package/assets/writing-preferences.md +107 -0
  5. package/bin/gallery.mjs +10 -0
  6. package/browser/editor/components/bookmark/icons.mjs +6 -0
  7. package/browser/editor/components/bookmark/index.mjs +80 -0
  8. package/browser/editor/components/bookmark/page.mjs +147 -0
  9. package/browser/editor/components/builders.mjs +19 -0
  10. package/browser/editor/components/callout/index.mjs +64 -0
  11. package/browser/editor/components/code/index.mjs +327 -0
  12. package/browser/editor/components/code/page.mjs +561 -0
  13. package/browser/editor/components/colors.mjs +50 -0
  14. package/browser/editor/components/columns/index.mjs +104 -0
  15. package/browser/editor/components/columns/page.mjs +310 -0
  16. package/browser/editor/components/details/index.mjs +73 -0
  17. package/browser/editor/components/details/page.mjs +86 -0
  18. package/browser/editor/components/dialog/index.mjs +84 -0
  19. package/browser/editor/components/dialog/page.mjs +201 -0
  20. package/browser/editor/components/divider/index.mjs +48 -0
  21. package/browser/editor/components/embed/icons.mjs +11 -0
  22. package/browser/editor/components/embed/index.mjs +123 -0
  23. package/browser/editor/components/embed/page.mjs +309 -0
  24. package/browser/editor/components/figure/index.mjs +87 -0
  25. package/browser/editor/components/figure/page.mjs +42 -0
  26. package/browser/editor/components/file/icons.mjs +14 -0
  27. package/browser/editor/components/file/index.mjs +77 -0
  28. package/browser/editor/components/file/page.mjs +114 -0
  29. package/browser/editor/components/flowchart/add.mjs +123 -0
  30. package/browser/editor/components/flowchart/index.mjs +246 -0
  31. package/browser/editor/components/flowchart/page.mjs +453 -0
  32. package/browser/editor/components/heading/index.mjs +53 -0
  33. package/browser/editor/components/heading/page.mjs +6 -0
  34. package/browser/editor/components/highlight/index.mjs +63 -0
  35. package/browser/editor/components/icon/index.mjs +57 -0
  36. package/browser/editor/components/icon/page.mjs +286 -0
  37. package/browser/editor/components/icons.mjs +48 -0
  38. package/browser/editor/components/image/crop.mjs +189 -0
  39. package/browser/editor/components/image/index.mjs +104 -0
  40. package/browser/editor/components/image/page.mjs +385 -0
  41. package/browser/editor/components/image/viewer.mjs +213 -0
  42. package/browser/editor/components/installed/index.mjs +179 -0
  43. package/browser/editor/components/installed/page.mjs +523 -0
  44. package/browser/editor/components/installed/served.mjs +35 -0
  45. package/browser/editor/components/kit.mjs +67 -0
  46. package/browser/editor/components/list/index.mjs +194 -0
  47. package/browser/editor/components/list/join.mjs +68 -0
  48. package/browser/editor/components/list/numbers.mjs +107 -0
  49. package/browser/editor/components/list/page.mjs +632 -0
  50. package/browser/editor/components/math/index.mjs +88 -0
  51. package/browser/editor/components/math/page.mjs +236 -0
  52. package/browser/editor/components/math/tex-logo.mjs +6 -0
  53. package/browser/editor/components/media/icons.mjs +19 -0
  54. package/browser/editor/components/media/page.mjs +192 -0
  55. package/browser/editor/components/media/parts.mjs +60 -0
  56. package/browser/editor/components/media/size.mjs +20 -0
  57. package/browser/editor/components/media/toolbar.mjs +37 -0
  58. package/browser/editor/components/media/write.mjs +7 -0
  59. package/browser/editor/components/pages.mjs +46 -0
  60. package/browser/editor/components/paragraph/index.mjs +43 -0
  61. package/browser/editor/components/paragraph/page.mjs +52 -0
  62. package/browser/editor/components/placeholder-bar.mjs +17 -0
  63. package/browser/editor/components/placeholder.mjs +128 -0
  64. package/browser/editor/components/quote/index.mjs +33 -0
  65. package/browser/editor/components/registry.mjs +859 -0
  66. package/browser/editor/components/rows.mjs +16 -0
  67. package/browser/editor/components/section/index.mjs +42 -0
  68. package/browser/editor/components/section/page.mjs +141 -0
  69. package/browser/editor/components/set-apart.mjs +24 -0
  70. package/browser/editor/components/sheets/index.mjs +137 -0
  71. package/browser/editor/components/sheets/page.mjs +227 -0
  72. package/browser/editor/components/sheets/pills.mjs +226 -0
  73. package/browser/editor/components/table/grid.mjs +73 -0
  74. package/browser/editor/components/table/index.mjs +308 -0
  75. package/browser/editor/components/table/page.mjs +683 -0
  76. package/browser/editor/components/table/slots.mjs +41 -0
  77. package/browser/editor/components/widget/index.mjs +50 -0
  78. package/browser/editor/page/annotate/anchors.mjs +230 -0
  79. package/browser/editor/page/annotate/card.mjs +102 -0
  80. package/browser/editor/page/annotate/index.mjs +1656 -0
  81. package/browser/editor/page/at-menu/index.mjs +317 -0
  82. package/browser/editor/page/autosave.mjs +1023 -0
  83. package/browser/editor/page/beside.mjs +21 -0
  84. package/browser/editor/page/block-info.mjs +63 -0
  85. package/browser/editor/page/block-menu/colors.mjs +84 -0
  86. package/browser/editor/page/block-menu/index.mjs +217 -0
  87. package/browser/editor/page/blocks.mjs +255 -0
  88. package/browser/editor/page/caret.mjs +682 -0
  89. package/browser/editor/page/changes/bar.mjs +102 -0
  90. package/browser/editor/page/changes/ghost.mjs +206 -0
  91. package/browser/editor/page/changes/gone-words.mjs +94 -0
  92. package/browser/editor/page/changes/index.mjs +447 -0
  93. package/browser/editor/page/changes/words.mjs +27 -0
  94. package/browser/editor/page/chip-fills.mjs +126 -0
  95. package/browser/editor/page/clipboard/import/colors.mjs +192 -0
  96. package/browser/editor/page/clipboard/import/html.mjs +792 -0
  97. package/browser/editor/page/clipboard/import/inline.mjs +232 -0
  98. package/browser/editor/page/clipboard/import/languages.mjs +42 -0
  99. package/browser/editor/page/clipboard/import/markdown.mjs +760 -0
  100. package/browser/editor/page/clipboard/import/math.mjs +100 -0
  101. package/browser/editor/page/clipboard/import/office.mjs +245 -0
  102. package/browser/editor/page/clipboard/import/read.mjs +120 -0
  103. package/browser/editor/page/clipboard/import/rich.mjs +29 -0
  104. package/browser/editor/page/clipboard/import/to-blocks.mjs +290 -0
  105. package/browser/editor/page/clipboard/index.mjs +816 -0
  106. package/browser/editor/page/clipboard/own/blocks.mjs +211 -0
  107. package/browser/editor/page/clipboard/own/chart-keys.mjs +58 -0
  108. package/browser/editor/page/clipboard/own/describe.mjs +124 -0
  109. package/browser/editor/page/clipboard/own/export.mjs +167 -0
  110. package/browser/editor/page/clipboard/own/ids.mjs +39 -0
  111. package/browser/editor/page/clipboard/own/index.mjs +13 -0
  112. package/browser/editor/page/clipboard/own/rules.mjs +44 -0
  113. package/browser/editor/page/clipboard/own/selection.mjs +159 -0
  114. package/browser/editor/page/clipboard/own/writers.mjs +315 -0
  115. package/browser/editor/page/columns/index.mjs +360 -0
  116. package/browser/editor/page/commit.mjs +1813 -0
  117. package/browser/editor/page/conflicts.mjs +249 -0
  118. package/browser/editor/page/convert.mjs +831 -0
  119. package/browser/editor/page/core.mjs +1693 -0
  120. package/browser/editor/page/drag/drop.mjs +307 -0
  121. package/browser/editor/page/drag/index.mjs +351 -0
  122. package/browser/editor/page/drag/preview.mjs +126 -0
  123. package/browser/editor/page/edge-scroll.mjs +50 -0
  124. package/browser/editor/page/editor.mjs +1780 -0
  125. package/browser/editor/page/emoji-picker/emoji-tab.mjs +287 -0
  126. package/browser/editor/page/emoji-picker/glyph-html.mjs +26 -0
  127. package/browser/editor/page/emoji-picker/grid.mjs +81 -0
  128. package/browser/editor/page/emoji-picker/icon-tab.mjs +217 -0
  129. package/browser/editor/page/emoji-picker/icons.mjs +31 -0
  130. package/browser/editor/page/emoji-picker/index.mjs +166 -0
  131. package/browser/editor/page/emoji-picker/styles.mjs +161 -0
  132. package/browser/editor/page/emoji-picker/support.mjs +204 -0
  133. package/browser/editor/page/emoji-picker/upload.mjs +236 -0
  134. package/browser/editor/page/export-report.mjs +23 -0
  135. package/browser/editor/page/fills.mjs +62 -0
  136. package/browser/editor/page/find/index.mjs +107 -0
  137. package/browser/editor/page/flags.mjs +70 -0
  138. package/browser/editor/page/fold/index.mjs +348 -0
  139. package/browser/editor/page/fold/rule.mjs +125 -0
  140. package/browser/editor/page/folded.mjs +23 -0
  141. package/browser/editor/page/format-bar/bar.mjs +449 -0
  142. package/browser/editor/page/format-bar/brush.mjs +77 -0
  143. package/browser/editor/page/format-bar/colors.mjs +46 -0
  144. package/browser/editor/page/format-bar/index.mjs +404 -0
  145. package/browser/editor/page/formula/index.mjs +236 -0
  146. package/browser/editor/page/formula/panel.mjs +336 -0
  147. package/browser/editor/page/formula/symbols.mjs +156 -0
  148. package/browser/editor/page/frame.mjs +74 -0
  149. package/browser/editor/page/frames.mjs +196 -0
  150. package/browser/editor/page/geometry.mjs +402 -0
  151. package/browser/editor/page/gesture.mjs +45 -0
  152. package/browser/editor/page/handle/index.mjs +650 -0
  153. package/browser/editor/page/handle-sizes.mjs +14 -0
  154. package/browser/editor/page/hints/index.mjs +84 -0
  155. package/browser/editor/page/history.mjs +401 -0
  156. package/browser/editor/page/insert/index.mjs +256 -0
  157. package/browser/editor/page/kept.mjs +38 -0
  158. package/browser/editor/page/links/address.mjs +40 -0
  159. package/browser/editor/page/links/index.mjs +866 -0
  160. package/browser/editor/page/links/pages.mjs +131 -0
  161. package/browser/editor/page/links/views.mjs +369 -0
  162. package/browser/editor/page/long-runs.mjs +75 -0
  163. package/browser/editor/page/look.mjs +77 -0
  164. package/browser/editor/page/made.mjs +24 -0
  165. package/browser/editor/page/margin.mjs +373 -0
  166. package/browser/editor/page/markdown/index.mjs +88 -0
  167. package/browser/editor/page/markdown/rules.mjs +33 -0
  168. package/browser/editor/page/marks.mjs +377 -0
  169. package/browser/editor/page/media-menu/index.mjs +158 -0
  170. package/browser/editor/page/menu.mjs +544 -0
  171. package/browser/editor/page/merge.mjs +124 -0
  172. package/browser/editor/page/notices.mjs +142 -0
  173. package/browser/editor/page/offered.mjs +32 -0
  174. package/browser/editor/page/outline/folds.mjs +53 -0
  175. package/browser/editor/page/outline/index.mjs +783 -0
  176. package/browser/editor/page/outline/list.mjs +184 -0
  177. package/browser/editor/page/outline/read.mjs +201 -0
  178. package/browser/editor/page/outline/strip.mjs +287 -0
  179. package/browser/editor/page/outline/tree.mjs +248 -0
  180. package/browser/editor/page/overlay-layer.mjs +227 -0
  181. package/browser/editor/page/overlays.mjs +205 -0
  182. package/browser/editor/page/own.mjs +28 -0
  183. package/browser/editor/page/pads.mjs +71 -0
  184. package/browser/editor/page/page-objects.mjs +105 -0
  185. package/browser/editor/page/panel.mjs +65 -0
  186. package/browser/editor/page/placement.mjs +58 -0
  187. package/browser/editor/page/post.mjs +41 -0
  188. package/browser/editor/page/present-links.mjs +50 -0
  189. package/browser/editor/page/quiet.mjs +48 -0
  190. package/browser/editor/page/resize/index.mjs +327 -0
  191. package/browser/editor/page/select-all/index.mjs +262 -0
  192. package/browser/editor/page/selection/delete.mjs +61 -0
  193. package/browser/editor/page/selection/index.mjs +164 -0
  194. package/browser/editor/page/selection/marquee.mjs +174 -0
  195. package/browser/editor/page/session.mjs +168 -0
  196. package/browser/editor/page/slash-menu/index.mjs +291 -0
  197. package/browser/editor/page/storage.mjs +48 -0
  198. package/browser/editor/page/sync-state.mjs +267 -0
  199. package/browser/editor/page/table/aligns.mjs +29 -0
  200. package/browser/editor/page/table/cell-bar.mjs +141 -0
  201. package/browser/editor/page/table/cells.mjs +527 -0
  202. package/browser/editor/page/table/icons.mjs +40 -0
  203. package/browser/editor/page/table/index.mjs +990 -0
  204. package/browser/editor/page/table/lists.mjs +187 -0
  205. package/browser/editor/page/table/widths.mjs +313 -0
  206. package/browser/editor/page/tex.mjs +32 -0
  207. package/browser/editor/page/text-select/index.mjs +671 -0
  208. package/browser/editor/page/tooltip.mjs +98 -0
  209. package/browser/editor/page/type-grid.mjs +83 -0
  210. package/browser/editor/page/typing/code-edges.mjs +274 -0
  211. package/browser/editor/page/typing/index.mjs +282 -0
  212. package/browser/editor/page/typing/leave.mjs +68 -0
  213. package/browser/editor/page/ui.mjs +160 -0
  214. package/browser/shared/annotations.mjs +569 -0
  215. package/browser/shared/code-folds.mjs +14 -0
  216. package/browser/shared/code-languages.mjs +70 -0
  217. package/browser/shared/code-lines.mjs +30 -0
  218. package/browser/shared/colors.mjs +30 -0
  219. package/browser/shared/component-catalog.mjs +573 -0
  220. package/browser/shared/components/bookmark.mjs +26 -0
  221. package/browser/shared/components/callout.mjs +9 -0
  222. package/browser/shared/components/chart.mjs +20 -0
  223. package/browser/shared/components/code.mjs +37 -0
  224. package/browser/shared/components/columns.mjs +16 -0
  225. package/browser/shared/components/details.mjs +15 -0
  226. package/browser/shared/components/dialog.mjs +28 -0
  227. package/browser/shared/components/diff.mjs +18 -0
  228. package/browser/shared/components/divider.mjs +6 -0
  229. package/browser/shared/components/embed.mjs +25 -0
  230. package/browser/shared/components/figure.mjs +14 -0
  231. package/browser/shared/components/file.mjs +23 -0
  232. package/browser/shared/components/heading.mjs +6 -0
  233. package/browser/shared/components/highlight.mjs +9 -0
  234. package/browser/shared/components/icon.mjs +18 -0
  235. package/browser/shared/components/image.mjs +39 -0
  236. package/browser/shared/components/index.mjs +396 -0
  237. package/browser/shared/components/installed.mjs +232 -0
  238. package/browser/shared/components/list.mjs +146 -0
  239. package/browser/shared/components/math.mjs +49 -0
  240. package/browser/shared/components/mention.mjs +33 -0
  241. package/browser/shared/components/page.mjs +46 -0
  242. package/browser/shared/components/paragraph.mjs +9 -0
  243. package/browser/shared/components/quote.mjs +6 -0
  244. package/browser/shared/components/section.mjs +8 -0
  245. package/browser/shared/components/sheets.mjs +80 -0
  246. package/browser/shared/components/state.mjs +20 -0
  247. package/browser/shared/components/table.mjs +49 -0
  248. package/browser/shared/components/text.mjs +14 -0
  249. package/browser/shared/components/widget.mjs +10 -0
  250. package/browser/shared/copy-ids.mjs +72 -0
  251. package/browser/shared/css-references.mjs +110 -0
  252. package/browser/shared/document-look.mjs +178 -0
  253. package/browser/shared/emoji/custom.mjs +91 -0
  254. package/browser/shared/emoji/data/LICENSE-lucide.txt +43 -0
  255. package/browser/shared/emoji/data/LICENSE-mingcute.txt +202 -0
  256. package/browser/shared/emoji/data/LICENSE-tabler.txt +21 -0
  257. package/browser/shared/emoji/data/README.md +28 -0
  258. package/browser/shared/emoji/data/categories.json +1 -0
  259. package/browser/shared/emoji/data/icons.json +1 -0
  260. package/browser/shared/emoji/data/keywords-en.json +1 -0
  261. package/browser/shared/emoji/data/keywords-zh.json +1 -0
  262. package/browser/shared/emoji/data/names.json +1 -0
  263. package/browser/shared/emoji/data/positions.json +1 -0
  264. package/browser/shared/emoji/data/twemoji-index.json +1 -0
  265. package/browser/shared/emoji/data/twemoji-svg.bin +0 -0
  266. package/browser/shared/emoji/data.mjs +194 -0
  267. package/browser/shared/emoji/emoji.mjs +38 -0
  268. package/browser/shared/emoji/glyphs.mjs +134 -0
  269. package/browser/shared/emoji/icon-value.mjs +91 -0
  270. package/browser/shared/escape.mjs +20 -0
  271. package/browser/shared/export-wrap.mjs +89 -0
  272. package/browser/shared/files.mjs +33 -0
  273. package/browser/shared/html-tree.mjs +59 -0
  274. package/browser/shared/http.mjs +22 -0
  275. package/browser/shared/i18n/en.mjs +1223 -0
  276. package/browser/shared/i18n/index.mjs +132 -0
  277. package/browser/shared/ids.mjs +24 -0
  278. package/browser/shared/import-types.mjs +23 -0
  279. package/browser/shared/inline-spacing.mjs +97 -0
  280. package/browser/shared/layers.mjs +42 -0
  281. package/browser/shared/long-runs.mjs +39 -0
  282. package/browser/shared/media.mjs +162 -0
  283. package/browser/shared/new-names.mjs +67 -0
  284. package/browser/shared/number-reading.mjs +92 -0
  285. package/browser/shared/old-names.mjs +143 -0
  286. package/browser/shared/outline.mjs +194 -0
  287. package/browser/shared/page-address.mjs +140 -0
  288. package/browser/shared/page-links.mjs +86 -0
  289. package/browser/shared/paths.mjs +73 -0
  290. package/browser/shared/preferences.mjs +116 -0
  291. package/browser/shared/preview-server.mjs +247 -0
  292. package/browser/shared/qa-levels.mjs +93 -0
  293. package/browser/shared/reading-place.mjs +91 -0
  294. package/browser/shared/renamed-storage.mjs +220 -0
  295. package/browser/shared/reports.mjs +46 -0
  296. package/browser/shared/search.mjs +85 -0
  297. package/browser/shared/session.mjs +77 -0
  298. package/browser/shared/table-chart.mjs +113 -0
  299. package/browser/shared/table-hides.mjs +120 -0
  300. package/browser/shared/table-slots.mjs +75 -0
  301. package/browser/shared/words.mjs +23 -0
  302. package/browser/shared/workspace-look.mjs +91 -0
  303. package/browser/shared/workspace.mjs +535 -0
  304. package/browser/shared/writing-preferences.mjs +68 -0
  305. package/browser/shared/zoom.mjs +57 -0
  306. package/dist/chunk-2B5E4CDJ.mjs +2 -0
  307. package/dist/chunk-342HXE3Q.mjs +2 -0
  308. package/dist/chunk-3HIRPVLU.mjs +2 -0
  309. package/dist/chunk-43B75J5T.mjs +2 -0
  310. package/dist/chunk-4FS7Z7WR.mjs +2 -0
  311. package/dist/chunk-4K5KC6V2.mjs +2 -0
  312. package/dist/chunk-5L7RYZCL.mjs +2 -0
  313. package/dist/chunk-5MHMDLZD.mjs +4 -0
  314. package/dist/chunk-5ZKJ3H4P.mjs +8 -0
  315. package/dist/chunk-64K7IPLO.mjs +255 -0
  316. package/dist/chunk-6QXGZM36.mjs +8 -0
  317. package/dist/chunk-6RGJOMJP.mjs +16 -0
  318. package/dist/chunk-742D2WWJ.mjs +19 -0
  319. package/dist/chunk-7DTINW6U.mjs +48 -0
  320. package/dist/chunk-A55HN5OK.mjs +2 -0
  321. package/dist/chunk-AGDILNWB.mjs +2 -0
  322. package/dist/chunk-AJ73XJF3.mjs +2 -0
  323. package/dist/chunk-AUZGSZJH.mjs +13 -0
  324. package/dist/chunk-BFE45AKL.mjs +2 -0
  325. package/dist/chunk-BGGDRNYQ.mjs +10 -0
  326. package/dist/chunk-BXO2ZY5P.mjs +2 -0
  327. package/dist/chunk-C564NU2H.mjs +77 -0
  328. package/dist/chunk-CEH4MRCC.mjs +2 -0
  329. package/dist/chunk-CY2FNNAB.mjs +16 -0
  330. package/dist/chunk-DFUDV4LX.mjs +2 -0
  331. package/dist/chunk-DKXG4XDG.mjs +2 -0
  332. package/dist/chunk-E7LWZRXY.mjs +4 -0
  333. package/dist/chunk-EZQ34M3F.mjs +124 -0
  334. package/dist/chunk-EZY3WC6Z.mjs +15 -0
  335. package/dist/chunk-FDLXYYG4.mjs +4 -0
  336. package/dist/chunk-FUKQNOQS.mjs +9 -0
  337. package/dist/chunk-GB5SOYQJ.mjs +7 -0
  338. package/dist/chunk-GRAXKKG4.mjs +2 -0
  339. package/dist/chunk-HYMEEXKN.mjs +4 -0
  340. package/dist/chunk-IVDLMMBD.mjs +2 -0
  341. package/dist/chunk-JPOSLGOC.mjs +6 -0
  342. package/dist/chunk-JVHHHGEA.mjs +3 -0
  343. package/dist/chunk-L3QKH4OK.mjs +26 -0
  344. package/dist/chunk-LAE5NQ4B.mjs +2 -0
  345. package/dist/chunk-LCTHTZIL.mjs +960 -0
  346. package/dist/chunk-LEF6DRCK.mjs +59 -0
  347. package/dist/chunk-LKX55H76.mjs +2 -0
  348. package/dist/chunk-LS4F7JUM.mjs +2 -0
  349. package/dist/chunk-MAFIGVXY.mjs +2 -0
  350. package/dist/chunk-NO5NJCHO.mjs +2 -0
  351. package/dist/chunk-NQPVAU63.mjs +2 -0
  352. package/dist/chunk-NSKUTQ5J.mjs +5 -0
  353. package/dist/chunk-O35FIXRB.mjs +2 -0
  354. package/dist/chunk-P2CAZPDP.mjs +3 -0
  355. package/dist/chunk-PL6GHLGD.mjs +15 -0
  356. package/dist/chunk-QAIHRH3I.mjs +13 -0
  357. package/dist/chunk-QJIR2BLP.mjs +6 -0
  358. package/dist/chunk-QR6A54KJ.mjs +3 -0
  359. package/dist/chunk-QUPLVPB2.mjs +7 -0
  360. package/dist/chunk-R7BNENLY.mjs +4 -0
  361. package/dist/chunk-S6O4UHLC.mjs +2 -0
  362. package/dist/chunk-SGJWQKEI.mjs +2 -0
  363. package/dist/chunk-SYGN7GLU.mjs +2 -0
  364. package/dist/chunk-TMYZB6AV.mjs +2 -0
  365. package/dist/chunk-TX6JH7TR.mjs +2 -0
  366. package/dist/chunk-TYK6VNAB.mjs +10 -0
  367. package/dist/chunk-U3SSPL4K.mjs +8 -0
  368. package/dist/chunk-U6KNPJPR.mjs +2 -0
  369. package/dist/chunk-UALRNVSE.mjs +4 -0
  370. package/dist/chunk-UH4SIXTR.mjs +2 -0
  371. package/dist/chunk-UMHUSOPJ.mjs +2 -0
  372. package/dist/chunk-V3HXVQEM.mjs +2 -0
  373. package/dist/chunk-V5JTW2LH.mjs +27 -0
  374. package/dist/chunk-V5VXUJKG.mjs +2 -0
  375. package/dist/chunk-V6XZ4VIR.mjs +2 -0
  376. package/dist/chunk-VBXMADMP.mjs +2 -0
  377. package/dist/chunk-VNV55RUA.mjs +2 -0
  378. package/dist/chunk-VPD2PS35.mjs +2 -0
  379. package/dist/chunk-W3BGBJQW.mjs +2 -0
  380. package/dist/chunk-W4VKN3GF.mjs +7 -0
  381. package/dist/chunk-W5BXXPDJ.mjs +3 -0
  382. package/dist/chunk-W7XHE4CT.mjs +2 -0
  383. package/dist/chunk-XNROSH2T.mjs +4 -0
  384. package/dist/chunk-XUNHRCOG.mjs +6 -0
  385. package/dist/chunk-Y34NR5JL.mjs +2 -0
  386. package/dist/chunk-Y6RLRPG3.mjs +3 -0
  387. package/dist/chunk-YEY3RSFQ.mjs +2 -0
  388. package/dist/cli.mjs +2 -0
  389. package/dist/server.mjs +2 -0
  390. package/dist/worker.mjs +5 -0
  391. package/kit/charts.js +355 -0
  392. package/kit/code.js +164 -0
  393. package/kit/dialogs.js +157 -0
  394. package/kit/math.js +2004 -0
  395. package/kit/report.css +2932 -0
  396. package/kit/runtime.js +1782 -0
  397. package/kit/sheets.js +123 -0
  398. package/kit/state.js +217 -0
  399. package/kit/tables.js +1499 -0
  400. package/kit/tokens.js +29 -0
  401. package/kit/ui.js +658 -0
  402. package/package.json +41 -4
  403. package/release.json +25 -0
  404. package/sdk/column-widths.d.ts +56 -0
  405. package/sdk/doc-charts.d.ts +82 -0
  406. package/sdk/doc-code.d.ts +28 -0
  407. package/sdk/doc-dialogs.d.ts +4 -0
  408. package/sdk/doc-kit.d.ts +147 -0
  409. package/sdk/doc-math.d.ts +3 -0
  410. package/sdk/doc-sheets.d.ts +15 -0
  411. package/sdk/doc-state.d.ts +41 -0
  412. package/sdk/doc-tables.d.ts +24 -0
  413. package/sdk/doc-tokens.d.ts +22 -0
  414. package/sdk/index.d.ts +30 -0
  415. package/skill/SKILL.md +150 -0
  416. package/skill/agents/openai.yaml +5 -0
  417. package/skill/references/building-components.md +367 -0
  418. package/skill/references/example-report.html +356 -0
  419. package/skill/references/writing-html.md +187 -0
  420. package/skill/sdk/column-widths.d.ts +56 -0
  421. package/skill/sdk/doc-charts.d.ts +82 -0
  422. package/skill/sdk/doc-code.d.ts +28 -0
  423. package/skill/sdk/doc-dialogs.d.ts +4 -0
  424. package/skill/sdk/doc-kit.d.ts +147 -0
  425. package/skill/sdk/doc-math.d.ts +3 -0
  426. package/skill/sdk/doc-sheets.d.ts +15 -0
  427. package/skill/sdk/doc-state.d.ts +41 -0
  428. package/skill/sdk/doc-tables.d.ts +24 -0
  429. package/skill/sdk/doc-tokens.d.ts +22 -0
  430. package/skill/sdk/index.d.ts +30 -0
  431. package/starter/doc.html +21 -0
  432. package/starter/doc.json +5 -0
  433. package/vendor/d3.v7.9.0.min.js +2 -0
  434. package/vendor/katex/auto-render.min.js +1 -0
  435. package/vendor/katex/contrib/mhchem.min.js +1 -0
  436. package/vendor/katex/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  437. package/vendor/katex/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  438. package/vendor/katex/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  439. package/vendor/katex/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  440. package/vendor/katex/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  441. package/vendor/katex/fonts/KaTeX_Main-Bold.woff2 +0 -0
  442. package/vendor/katex/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  443. package/vendor/katex/fonts/KaTeX_Main-Italic.woff2 +0 -0
  444. package/vendor/katex/fonts/KaTeX_Main-Regular.woff2 +0 -0
  445. package/vendor/katex/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  446. package/vendor/katex/fonts/KaTeX_Math-Italic.woff2 +0 -0
  447. package/vendor/katex/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  448. package/vendor/katex/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  449. package/vendor/katex/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  450. package/vendor/katex/fonts/KaTeX_Script-Regular.woff2 +0 -0
  451. package/vendor/katex/fonts/KaTeX_Size1-Regular.woff2 +0 -0
  452. package/vendor/katex/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  453. package/vendor/katex/fonts/KaTeX_Size3-Regular.woff2 +0 -0
  454. package/vendor/katex/fonts/KaTeX_Size4-Regular.woff2 +0 -0
  455. package/vendor/katex/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  456. package/vendor/katex/katex.min.css +1 -0
  457. package/vendor/katex/katex.min.js +1 -0
  458. package/vendor/pdfjs/LICENSE +177 -0
  459. package/vendor/pdfjs/cmaps/78-EUC-H.bcmap +0 -0
  460. package/vendor/pdfjs/cmaps/78-EUC-V.bcmap +0 -0
  461. package/vendor/pdfjs/cmaps/78-H.bcmap +0 -0
  462. package/vendor/pdfjs/cmaps/78-RKSJ-H.bcmap +0 -0
  463. package/vendor/pdfjs/cmaps/78-RKSJ-V.bcmap +0 -0
  464. package/vendor/pdfjs/cmaps/78-V.bcmap +0 -0
  465. package/vendor/pdfjs/cmaps/78ms-RKSJ-H.bcmap +0 -0
  466. package/vendor/pdfjs/cmaps/78ms-RKSJ-V.bcmap +0 -0
  467. package/vendor/pdfjs/cmaps/83pv-RKSJ-H.bcmap +0 -0
  468. package/vendor/pdfjs/cmaps/90ms-RKSJ-H.bcmap +0 -0
  469. package/vendor/pdfjs/cmaps/90ms-RKSJ-V.bcmap +0 -0
  470. package/vendor/pdfjs/cmaps/90msp-RKSJ-H.bcmap +0 -0
  471. package/vendor/pdfjs/cmaps/90msp-RKSJ-V.bcmap +0 -0
  472. package/vendor/pdfjs/cmaps/90pv-RKSJ-H.bcmap +0 -0
  473. package/vendor/pdfjs/cmaps/90pv-RKSJ-V.bcmap +0 -0
  474. package/vendor/pdfjs/cmaps/Add-H.bcmap +0 -0
  475. package/vendor/pdfjs/cmaps/Add-RKSJ-H.bcmap +0 -0
  476. package/vendor/pdfjs/cmaps/Add-RKSJ-V.bcmap +0 -0
  477. package/vendor/pdfjs/cmaps/Add-V.bcmap +0 -0
  478. package/vendor/pdfjs/cmaps/Adobe-CNS1-0.bcmap +0 -0
  479. package/vendor/pdfjs/cmaps/Adobe-CNS1-1.bcmap +0 -0
  480. package/vendor/pdfjs/cmaps/Adobe-CNS1-2.bcmap +0 -0
  481. package/vendor/pdfjs/cmaps/Adobe-CNS1-3.bcmap +0 -0
  482. package/vendor/pdfjs/cmaps/Adobe-CNS1-4.bcmap +0 -0
  483. package/vendor/pdfjs/cmaps/Adobe-CNS1-5.bcmap +0 -0
  484. package/vendor/pdfjs/cmaps/Adobe-CNS1-6.bcmap +0 -0
  485. package/vendor/pdfjs/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
  486. package/vendor/pdfjs/cmaps/Adobe-GB1-0.bcmap +0 -0
  487. package/vendor/pdfjs/cmaps/Adobe-GB1-1.bcmap +0 -0
  488. package/vendor/pdfjs/cmaps/Adobe-GB1-2.bcmap +0 -0
  489. package/vendor/pdfjs/cmaps/Adobe-GB1-3.bcmap +0 -0
  490. package/vendor/pdfjs/cmaps/Adobe-GB1-4.bcmap +0 -0
  491. package/vendor/pdfjs/cmaps/Adobe-GB1-5.bcmap +0 -0
  492. package/vendor/pdfjs/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
  493. package/vendor/pdfjs/cmaps/Adobe-Japan1-0.bcmap +0 -0
  494. package/vendor/pdfjs/cmaps/Adobe-Japan1-1.bcmap +0 -0
  495. package/vendor/pdfjs/cmaps/Adobe-Japan1-2.bcmap +0 -0
  496. package/vendor/pdfjs/cmaps/Adobe-Japan1-3.bcmap +0 -0
  497. package/vendor/pdfjs/cmaps/Adobe-Japan1-4.bcmap +0 -0
  498. package/vendor/pdfjs/cmaps/Adobe-Japan1-5.bcmap +0 -0
  499. package/vendor/pdfjs/cmaps/Adobe-Japan1-6.bcmap +0 -0
  500. package/vendor/pdfjs/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
  501. package/vendor/pdfjs/cmaps/Adobe-Korea1-0.bcmap +0 -0
  502. package/vendor/pdfjs/cmaps/Adobe-Korea1-1.bcmap +0 -0
  503. package/vendor/pdfjs/cmaps/Adobe-Korea1-2.bcmap +0 -0
  504. package/vendor/pdfjs/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
  505. package/vendor/pdfjs/cmaps/B5-H.bcmap +0 -0
  506. package/vendor/pdfjs/cmaps/B5-V.bcmap +0 -0
  507. package/vendor/pdfjs/cmaps/B5pc-H.bcmap +0 -0
  508. package/vendor/pdfjs/cmaps/B5pc-V.bcmap +0 -0
  509. package/vendor/pdfjs/cmaps/CNS-EUC-H.bcmap +0 -0
  510. package/vendor/pdfjs/cmaps/CNS-EUC-V.bcmap +0 -0
  511. package/vendor/pdfjs/cmaps/CNS1-H.bcmap +0 -0
  512. package/vendor/pdfjs/cmaps/CNS1-V.bcmap +0 -0
  513. package/vendor/pdfjs/cmaps/CNS2-H.bcmap +0 -0
  514. package/vendor/pdfjs/cmaps/CNS2-V.bcmap +3 -0
  515. package/vendor/pdfjs/cmaps/ETHK-B5-H.bcmap +0 -0
  516. package/vendor/pdfjs/cmaps/ETHK-B5-V.bcmap +0 -0
  517. package/vendor/pdfjs/cmaps/ETen-B5-H.bcmap +0 -0
  518. package/vendor/pdfjs/cmaps/ETen-B5-V.bcmap +0 -0
  519. package/vendor/pdfjs/cmaps/ETenms-B5-H.bcmap +3 -0
  520. package/vendor/pdfjs/cmaps/ETenms-B5-V.bcmap +0 -0
  521. package/vendor/pdfjs/cmaps/EUC-H.bcmap +0 -0
  522. package/vendor/pdfjs/cmaps/EUC-V.bcmap +0 -0
  523. package/vendor/pdfjs/cmaps/Ext-H.bcmap +0 -0
  524. package/vendor/pdfjs/cmaps/Ext-RKSJ-H.bcmap +0 -0
  525. package/vendor/pdfjs/cmaps/Ext-RKSJ-V.bcmap +0 -0
  526. package/vendor/pdfjs/cmaps/Ext-V.bcmap +0 -0
  527. package/vendor/pdfjs/cmaps/GB-EUC-H.bcmap +0 -0
  528. package/vendor/pdfjs/cmaps/GB-EUC-V.bcmap +0 -0
  529. package/vendor/pdfjs/cmaps/GB-H.bcmap +4 -0
  530. package/vendor/pdfjs/cmaps/GB-V.bcmap +0 -0
  531. package/vendor/pdfjs/cmaps/GBK-EUC-H.bcmap +0 -0
  532. package/vendor/pdfjs/cmaps/GBK-EUC-V.bcmap +0 -0
  533. package/vendor/pdfjs/cmaps/GBK2K-H.bcmap +0 -0
  534. package/vendor/pdfjs/cmaps/GBK2K-V.bcmap +0 -0
  535. package/vendor/pdfjs/cmaps/GBKp-EUC-H.bcmap +0 -0
  536. package/vendor/pdfjs/cmaps/GBKp-EUC-V.bcmap +0 -0
  537. package/vendor/pdfjs/cmaps/GBT-EUC-H.bcmap +0 -0
  538. package/vendor/pdfjs/cmaps/GBT-EUC-V.bcmap +0 -0
  539. package/vendor/pdfjs/cmaps/GBT-H.bcmap +0 -0
  540. package/vendor/pdfjs/cmaps/GBT-V.bcmap +0 -0
  541. package/vendor/pdfjs/cmaps/GBTpc-EUC-H.bcmap +0 -0
  542. package/vendor/pdfjs/cmaps/GBTpc-EUC-V.bcmap +0 -0
  543. package/vendor/pdfjs/cmaps/GBpc-EUC-H.bcmap +0 -0
  544. package/vendor/pdfjs/cmaps/GBpc-EUC-V.bcmap +0 -0
  545. package/vendor/pdfjs/cmaps/H.bcmap +0 -0
  546. package/vendor/pdfjs/cmaps/HKdla-B5-H.bcmap +0 -0
  547. package/vendor/pdfjs/cmaps/HKdla-B5-V.bcmap +0 -0
  548. package/vendor/pdfjs/cmaps/HKdlb-B5-H.bcmap +0 -0
  549. package/vendor/pdfjs/cmaps/HKdlb-B5-V.bcmap +0 -0
  550. package/vendor/pdfjs/cmaps/HKgccs-B5-H.bcmap +0 -0
  551. package/vendor/pdfjs/cmaps/HKgccs-B5-V.bcmap +0 -0
  552. package/vendor/pdfjs/cmaps/HKm314-B5-H.bcmap +0 -0
  553. package/vendor/pdfjs/cmaps/HKm314-B5-V.bcmap +0 -0
  554. package/vendor/pdfjs/cmaps/HKm471-B5-H.bcmap +0 -0
  555. package/vendor/pdfjs/cmaps/HKm471-B5-V.bcmap +0 -0
  556. package/vendor/pdfjs/cmaps/HKscs-B5-H.bcmap +0 -0
  557. package/vendor/pdfjs/cmaps/HKscs-B5-V.bcmap +0 -0
  558. package/vendor/pdfjs/cmaps/Hankaku.bcmap +0 -0
  559. package/vendor/pdfjs/cmaps/Hiragana.bcmap +0 -0
  560. package/vendor/pdfjs/cmaps/KSC-EUC-H.bcmap +0 -0
  561. package/vendor/pdfjs/cmaps/KSC-EUC-V.bcmap +0 -0
  562. package/vendor/pdfjs/cmaps/KSC-H.bcmap +0 -0
  563. package/vendor/pdfjs/cmaps/KSC-Johab-H.bcmap +0 -0
  564. package/vendor/pdfjs/cmaps/KSC-Johab-V.bcmap +0 -0
  565. package/vendor/pdfjs/cmaps/KSC-V.bcmap +0 -0
  566. package/vendor/pdfjs/cmaps/KSCms-UHC-H.bcmap +0 -0
  567. package/vendor/pdfjs/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
  568. package/vendor/pdfjs/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
  569. package/vendor/pdfjs/cmaps/KSCms-UHC-V.bcmap +0 -0
  570. package/vendor/pdfjs/cmaps/KSCpc-EUC-H.bcmap +0 -0
  571. package/vendor/pdfjs/cmaps/KSCpc-EUC-V.bcmap +0 -0
  572. package/vendor/pdfjs/cmaps/Katakana.bcmap +0 -0
  573. package/vendor/pdfjs/cmaps/LICENSE +36 -0
  574. package/vendor/pdfjs/cmaps/NWP-H.bcmap +0 -0
  575. package/vendor/pdfjs/cmaps/NWP-V.bcmap +0 -0
  576. package/vendor/pdfjs/cmaps/RKSJ-H.bcmap +0 -0
  577. package/vendor/pdfjs/cmaps/RKSJ-V.bcmap +0 -0
  578. package/vendor/pdfjs/cmaps/Roman.bcmap +0 -0
  579. package/vendor/pdfjs/cmaps/UniCNS-UCS2-H.bcmap +0 -0
  580. package/vendor/pdfjs/cmaps/UniCNS-UCS2-V.bcmap +0 -0
  581. package/vendor/pdfjs/cmaps/UniCNS-UTF16-H.bcmap +0 -0
  582. package/vendor/pdfjs/cmaps/UniCNS-UTF16-V.bcmap +0 -0
  583. package/vendor/pdfjs/cmaps/UniCNS-UTF32-H.bcmap +0 -0
  584. package/vendor/pdfjs/cmaps/UniCNS-UTF32-V.bcmap +0 -0
  585. package/vendor/pdfjs/cmaps/UniCNS-UTF8-H.bcmap +0 -0
  586. package/vendor/pdfjs/cmaps/UniCNS-UTF8-V.bcmap +0 -0
  587. package/vendor/pdfjs/cmaps/UniGB-UCS2-H.bcmap +0 -0
  588. package/vendor/pdfjs/cmaps/UniGB-UCS2-V.bcmap +0 -0
  589. package/vendor/pdfjs/cmaps/UniGB-UTF16-H.bcmap +0 -0
  590. package/vendor/pdfjs/cmaps/UniGB-UTF16-V.bcmap +0 -0
  591. package/vendor/pdfjs/cmaps/UniGB-UTF32-H.bcmap +0 -0
  592. package/vendor/pdfjs/cmaps/UniGB-UTF32-V.bcmap +0 -0
  593. package/vendor/pdfjs/cmaps/UniGB-UTF8-H.bcmap +0 -0
  594. package/vendor/pdfjs/cmaps/UniGB-UTF8-V.bcmap +0 -0
  595. package/vendor/pdfjs/cmaps/UniJIS-UCS2-H.bcmap +0 -0
  596. package/vendor/pdfjs/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
  597. package/vendor/pdfjs/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
  598. package/vendor/pdfjs/cmaps/UniJIS-UCS2-V.bcmap +0 -0
  599. package/vendor/pdfjs/cmaps/UniJIS-UTF16-H.bcmap +0 -0
  600. package/vendor/pdfjs/cmaps/UniJIS-UTF16-V.bcmap +0 -0
  601. package/vendor/pdfjs/cmaps/UniJIS-UTF32-H.bcmap +0 -0
  602. package/vendor/pdfjs/cmaps/UniJIS-UTF32-V.bcmap +0 -0
  603. package/vendor/pdfjs/cmaps/UniJIS-UTF8-H.bcmap +0 -0
  604. package/vendor/pdfjs/cmaps/UniJIS-UTF8-V.bcmap +0 -0
  605. package/vendor/pdfjs/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
  606. package/vendor/pdfjs/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
  607. package/vendor/pdfjs/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
  608. package/vendor/pdfjs/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
  609. package/vendor/pdfjs/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
  610. package/vendor/pdfjs/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
  611. package/vendor/pdfjs/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
  612. package/vendor/pdfjs/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
  613. package/vendor/pdfjs/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
  614. package/vendor/pdfjs/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
  615. package/vendor/pdfjs/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
  616. package/vendor/pdfjs/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
  617. package/vendor/pdfjs/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
  618. package/vendor/pdfjs/cmaps/UniKS-UCS2-H.bcmap +0 -0
  619. package/vendor/pdfjs/cmaps/UniKS-UCS2-V.bcmap +0 -0
  620. package/vendor/pdfjs/cmaps/UniKS-UTF16-H.bcmap +0 -0
  621. package/vendor/pdfjs/cmaps/UniKS-UTF16-V.bcmap +0 -0
  622. package/vendor/pdfjs/cmaps/UniKS-UTF32-H.bcmap +0 -0
  623. package/vendor/pdfjs/cmaps/UniKS-UTF32-V.bcmap +0 -0
  624. package/vendor/pdfjs/cmaps/UniKS-UTF8-H.bcmap +0 -0
  625. package/vendor/pdfjs/cmaps/UniKS-UTF8-V.bcmap +0 -0
  626. package/vendor/pdfjs/cmaps/V.bcmap +0 -0
  627. package/vendor/pdfjs/cmaps/WP-Symbol.bcmap +0 -0
  628. package/vendor/pdfjs/legacy/build/pdf.min.mjs +27 -0
  629. package/vendor/pdfjs/legacy/build/pdf.worker.min.mjs +27 -0
  630. package/vendor/pdfjs/standard_fonts/FoxitDingbats.pfb +0 -0
  631. package/vendor/pdfjs/standard_fonts/FoxitFixed.pfb +0 -0
  632. package/vendor/pdfjs/standard_fonts/FoxitFixedBold.pfb +0 -0
  633. package/vendor/pdfjs/standard_fonts/FoxitFixedBoldItalic.pfb +0 -0
  634. package/vendor/pdfjs/standard_fonts/FoxitFixedItalic.pfb +0 -0
  635. package/vendor/pdfjs/standard_fonts/FoxitSerif.pfb +0 -0
  636. package/vendor/pdfjs/standard_fonts/FoxitSerifBold.pfb +0 -0
  637. package/vendor/pdfjs/standard_fonts/FoxitSerifBoldItalic.pfb +0 -0
  638. package/vendor/pdfjs/standard_fonts/FoxitSerifItalic.pfb +0 -0
  639. package/vendor/pdfjs/standard_fonts/FoxitSymbol.pfb +0 -0
  640. package/vendor/pdfjs/standard_fonts/LICENSE_FOXIT +27 -0
  641. package/vendor/pdfjs/standard_fonts/LICENSE_LIBERATION +363 -0
  642. package/vendor/pdfjs/standard_fonts/LiberationSans-Bold.ttf +0 -0
  643. package/vendor/pdfjs/standard_fonts/LiberationSans-BoldItalic.ttf +0 -0
  644. package/vendor/pdfjs/standard_fonts/LiberationSans-Italic.ttf +0 -0
  645. package/vendor/pdfjs/standard_fonts/LiberationSans-Regular.ttf +0 -0
  646. package/vendor/types/@types/d3/LICENSE +21 -0
  647. package/vendor/types/@types/d3/index.d.ts +39 -0
  648. package/vendor/types/@types/d3/package.json +81 -0
  649. package/vendor/types/@types/d3-array/LICENSE +21 -0
  650. package/vendor/types/@types/d3-array/index.d.ts +1118 -0
  651. package/vendor/types/@types/d3-array/package.json +56 -0
  652. package/vendor/types/@types/d3-axis/LICENSE +21 -0
  653. package/vendor/types/@types/d3-axis/index.d.ts +293 -0
  654. package/vendor/types/@types/d3-axis/package.json +47 -0
  655. package/vendor/types/@types/d3-brush/LICENSE +21 -0
  656. package/vendor/types/@types/d3-brush/index.d.ts +255 -0
  657. package/vendor/types/@types/d3-brush/package.json +42 -0
  658. package/vendor/types/@types/d3-chord/LICENSE +21 -0
  659. package/vendor/types/@types/d3-chord/index.d.ts +471 -0
  660. package/vendor/types/@types/d3-chord/package.json +40 -0
  661. package/vendor/types/@types/d3-color/LICENSE +21 -0
  662. package/vendor/types/@types/d3-color/index.d.ts +669 -0
  663. package/vendor/types/@types/d3-color/package.json +55 -0
  664. package/vendor/types/@types/d3-contour/LICENSE +21 -0
  665. package/vendor/types/@types/d3-contour/index.d.ts +222 -0
  666. package/vendor/types/@types/d3-contour/package.json +38 -0
  667. package/vendor/types/@types/d3-delaunay/LICENSE +21 -0
  668. package/vendor/types/@types/d3-delaunay/index.d.ts +316 -0
  669. package/vendor/types/@types/d3-delaunay/package.json +30 -0
  670. package/vendor/types/@types/d3-dispatch/LICENSE +21 -0
  671. package/vendor/types/@types/d3-dispatch/index.d.ts +96 -0
  672. package/vendor/types/@types/d3-dispatch/package.json +51 -0
  673. package/vendor/types/@types/d3-drag/LICENSE +21 -0
  674. package/vendor/types/@types/d3-drag/index.d.ts +395 -0
  675. package/vendor/types/@types/d3-drag/package.json +42 -0
  676. package/vendor/types/@types/d3-dsv/LICENSE +21 -0
  677. package/vendor/types/@types/d3-dsv/index.d.ts +482 -0
  678. package/vendor/types/@types/d3-dsv/package.json +45 -0
  679. package/vendor/types/@types/d3-ease/LICENSE +21 -0
  680. package/vendor/types/@types/d3-ease/index.d.ts +316 -0
  681. package/vendor/types/@types/d3-ease/package.json +40 -0
  682. package/vendor/types/@types/d3-fetch/LICENSE +21 -0
  683. package/vendor/types/@types/d3-fetch/index.d.ts +282 -0
  684. package/vendor/types/@types/d3-fetch/package.json +37 -0
  685. package/vendor/types/@types/d3-force/LICENSE +21 -0
  686. package/vendor/types/@types/d3-force/index.d.ts +899 -0
  687. package/vendor/types/@types/d3-force/package.json +45 -0
  688. package/vendor/types/@types/d3-format/LICENSE +21 -0
  689. package/vendor/types/@types/d3-format/index.d.ts +337 -0
  690. package/vendor/types/@types/d3-format/package.json +45 -0
  691. package/vendor/types/@types/d3-geo/LICENSE +21 -0
  692. package/vendor/types/@types/d3-geo/index.d.ts +1371 -0
  693. package/vendor/types/@types/d3-geo/package.json +48 -0
  694. package/vendor/types/@types/d3-hierarchy/LICENSE +21 -0
  695. package/vendor/types/@types/d3-hierarchy/index.d.ts +928 -0
  696. package/vendor/types/@types/d3-hierarchy/package.json +50 -0
  697. package/vendor/types/@types/d3-interpolate/LICENSE +21 -0
  698. package/vendor/types/@types/d3-interpolate/index.d.ts +387 -0
  699. package/vendor/types/@types/d3-interpolate/package.json +47 -0
  700. package/vendor/types/@types/d3-path/LICENSE +21 -0
  701. package/vendor/types/@types/d3-path/index.d.ts +108 -0
  702. package/vendor/types/@types/d3-path/package.json +41 -0
  703. package/vendor/types/@types/d3-polygon/LICENSE +21 -0
  704. package/vendor/types/@types/d3-polygon/index.d.ts +41 -0
  705. package/vendor/types/@types/d3-polygon/package.json +40 -0
  706. package/vendor/types/@types/d3-quadtree/LICENSE +21 -0
  707. package/vendor/types/@types/d3-quadtree/index.d.ts +204 -0
  708. package/vendor/types/@types/d3-quadtree/package.json +45 -0
  709. package/vendor/types/@types/d3-random/LICENSE +21 -0
  710. package/vendor/types/@types/d3-random/index.d.ts +313 -0
  711. package/vendor/types/@types/d3-random/package.json +41 -0
  712. package/vendor/types/@types/d3-scale/LICENSE +21 -0
  713. package/vendor/types/@types/d3-scale/index.d.ts +2669 -0
  714. package/vendor/types/@types/d3-scale/package.json +53 -0
  715. package/vendor/types/@types/d3-scale-chromatic/LICENSE +21 -0
  716. package/vendor/types/@types/d3-scale-chromatic/index.d.ts +520 -0
  717. package/vendor/types/@types/d3-scale-chromatic/package.json +46 -0
  718. package/vendor/types/@types/d3-selection/LICENSE +21 -0
  719. package/vendor/types/@types/d3-selection/index.d.ts +1210 -0
  720. package/vendor/types/@types/d3-selection/package.json +56 -0
  721. package/vendor/types/@types/d3-shape/LICENSE +21 -0
  722. package/vendor/types/@types/d3-shape/index.d.ts +2792 -0
  723. package/vendor/types/@types/d3-shape/package.json +53 -0
  724. package/vendor/types/@types/d3-time/LICENSE +21 -0
  725. package/vendor/types/@types/d3-time/index.d.ts +697 -0
  726. package/vendor/types/@types/d3-time/package.json +46 -0
  727. package/vendor/types/@types/d3-time-format/LICENSE +21 -0
  728. package/vendor/types/@types/d3-time-format/index.d.ts +202 -0
  729. package/vendor/types/@types/d3-time-format/package.json +40 -0
  730. package/vendor/types/@types/d3-timer/LICENSE +21 -0
  731. package/vendor/types/@types/d3-timer/index.d.ts +68 -0
  732. package/vendor/types/@types/d3-timer/package.json +45 -0
  733. package/vendor/types/@types/d3-transition/LICENSE +21 -0
  734. package/vendor/types/@types/d3-transition/index.d.ts +664 -0
  735. package/vendor/types/@types/d3-transition/package.json +47 -0
  736. package/vendor/types/@types/d3-zoom/LICENSE +21 -0
  737. package/vendor/types/@types/d3-zoom/index.d.ts +611 -0
  738. package/vendor/types/@types/d3-zoom/package.json +48 -0
  739. package/vendor/types/@types/geojson/LICENSE +21 -0
  740. package/vendor/types/@types/geojson/index.d.ts +202 -0
  741. package/vendor/types/@types/geojson/package.json +46 -0
  742. package/vendor/typescript/LICENSE.txt +55 -0
  743. package/vendor/typescript/lib.decorators.d.ts +384 -0
  744. package/vendor/typescript/lib.decorators.legacy.d.ts +22 -0
  745. package/vendor/typescript/lib.dom.d.ts +39429 -0
  746. package/vendor/typescript/lib.dom.iterable.d.ts +571 -0
  747. package/vendor/typescript/lib.es2015.collection.d.ts +147 -0
  748. package/vendor/typescript/lib.es2015.core.d.ts +597 -0
  749. package/vendor/typescript/lib.es2015.d.ts +28 -0
  750. package/vendor/typescript/lib.es2015.generator.d.ts +77 -0
  751. package/vendor/typescript/lib.es2015.iterable.d.ts +605 -0
  752. package/vendor/typescript/lib.es2015.promise.d.ts +81 -0
  753. package/vendor/typescript/lib.es2015.proxy.d.ts +128 -0
  754. package/vendor/typescript/lib.es2015.reflect.d.ts +144 -0
  755. package/vendor/typescript/lib.es2015.symbol.d.ts +46 -0
  756. package/vendor/typescript/lib.es2015.symbol.wellknown.d.ts +326 -0
  757. package/vendor/typescript/lib.es2016.array.include.d.ts +116 -0
  758. package/vendor/typescript/lib.es2016.d.ts +21 -0
  759. package/vendor/typescript/lib.es2016.intl.d.ts +31 -0
  760. package/vendor/typescript/lib.es2017.arraybuffer.d.ts +21 -0
  761. package/vendor/typescript/lib.es2017.d.ts +26 -0
  762. package/vendor/typescript/lib.es2017.date.d.ts +31 -0
  763. package/vendor/typescript/lib.es2017.intl.d.ts +44 -0
  764. package/vendor/typescript/lib.es2017.object.d.ts +49 -0
  765. package/vendor/typescript/lib.es2017.sharedmemory.d.ts +135 -0
  766. package/vendor/typescript/lib.es2017.string.d.ts +45 -0
  767. package/vendor/typescript/lib.es2017.typedarrays.d.ts +53 -0
  768. package/vendor/typescript/lib.es2018.asyncgenerator.d.ts +77 -0
  769. package/vendor/typescript/lib.es2018.asynciterable.d.ts +53 -0
  770. package/vendor/typescript/lib.es2018.d.ts +24 -0
  771. package/vendor/typescript/lib.es2018.intl.d.ts +83 -0
  772. package/vendor/typescript/lib.es2018.promise.d.ts +30 -0
  773. package/vendor/typescript/lib.es2018.regexp.d.ts +37 -0
  774. package/vendor/typescript/lib.es2019.array.d.ts +79 -0
  775. package/vendor/typescript/lib.es2019.d.ts +24 -0
  776. package/vendor/typescript/lib.es2019.intl.d.ts +23 -0
  777. package/vendor/typescript/lib.es2019.object.d.ts +33 -0
  778. package/vendor/typescript/lib.es2019.string.d.ts +37 -0
  779. package/vendor/typescript/lib.es2019.symbol.d.ts +24 -0
  780. package/vendor/typescript/lib.es2020.bigint.d.ts +765 -0
  781. package/vendor/typescript/lib.es2020.d.ts +27 -0
  782. package/vendor/typescript/lib.es2020.date.d.ts +42 -0
  783. package/vendor/typescript/lib.es2020.intl.d.ts +474 -0
  784. package/vendor/typescript/lib.es2020.number.d.ts +28 -0
  785. package/vendor/typescript/lib.es2020.promise.d.ts +47 -0
  786. package/vendor/typescript/lib.es2020.sharedmemory.d.ts +99 -0
  787. package/vendor/typescript/lib.es2020.string.d.ts +44 -0
  788. package/vendor/typescript/lib.es2020.symbol.wellknown.d.ts +41 -0
  789. package/vendor/typescript/lib.es2021.d.ts +23 -0
  790. package/vendor/typescript/lib.es2021.intl.d.ts +166 -0
  791. package/vendor/typescript/lib.es2021.promise.d.ts +48 -0
  792. package/vendor/typescript/lib.es2021.string.d.ts +33 -0
  793. package/vendor/typescript/lib.es2021.weakref.d.ts +78 -0
  794. package/vendor/typescript/lib.es2022.array.d.ts +121 -0
  795. package/vendor/typescript/lib.es2022.d.ts +25 -0
  796. package/vendor/typescript/lib.es2022.error.d.ts +75 -0
  797. package/vendor/typescript/lib.es2022.intl.d.ts +145 -0
  798. package/vendor/typescript/lib.es2022.object.d.ts +26 -0
  799. package/vendor/typescript/lib.es2022.regexp.d.ts +39 -0
  800. package/vendor/typescript/lib.es2022.string.d.ts +25 -0
  801. package/vendor/typescript/lib.es5.d.ts +4601 -0
  802. package/vendor/typescript/package.json +4 -0
  803. package/vendor/typescript/typescript.js +446 -0
  804. package/web/assets/index-Bh74DfsV.css +1 -0
  805. package/web/assets/index-UW0RyFFt.js +13 -0
  806. package/web/index.html +14 -0
@@ -0,0 +1,356 @@
1
+ <!doctype html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>块的写法</title>
7
+ <style>
8
+ /* An annotated timeline, drawn in its card: one column on a phone, three in a row from 560px. */
9
+ .timeline { display: grid; gap: 16px; }
10
+ .timeline-item { position: relative; padding-left: 22px; }
11
+ .timeline-item p { margin: 0; }
12
+ .timeline-item::before { content: ""; position: absolute; left: 0; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--doc-border); }
13
+ .timeline-item::after { content: ""; position: absolute; left: 4px; top: 21px; bottom: -12px; border-left: 2px solid var(--doc-border); }
14
+ .timeline-item:last-child::after { display: none; }
15
+ .timeline-item-marked::before { background: var(--doc-accent); }
16
+ .timeline-date { color: var(--doc-muted); font-size: var(--doc-small-font-size); }
17
+ .timeline-note { color: var(--doc-accent); font-size: var(--doc-small-font-size); }
18
+ @media (min-width: 560px) {
19
+ .timeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
20
+ .timeline-item { padding: 22px 12px 0 0; }
21
+ .timeline-item::before { top: 0; }
22
+ .timeline-item::after { left: 14px; right: 0; top: 4px; bottom: auto; border-left: 0; border-top: 2px solid var(--doc-border); }
23
+ }
24
+ /* Boxes and arrows in HTML and CSS: each box but the last draws its line (::after) and its
25
+ arrowhead (::before) in the gap after it; one under another, arrows down, on a phone; in a
26
+ row, arrows right, from 560px. */
27
+ .box-path { display: grid; gap: 28px; }
28
+ .box-path-node { position: relative; display: grid; align-content: center; padding: 8px 12px; border: 1px solid var(--doc-border); border-radius: 8px; text-align: center; }
29
+ .box-path-node p { margin: 0; }
30
+ .box-path-node:not(:last-child)::after { content: ""; position: absolute; top: 100%; left: calc(50% - 1px); height: 20px; border-left: 2px solid var(--doc-muted); }
31
+ .box-path-node:not(:last-child)::before { content: ""; position: absolute; top: calc(100% + 20px); left: calc(50% - 5px); border: 5px solid transparent; border-top: 7px solid var(--doc-muted); border-bottom: 0; }
32
+ .box-path-node-marked { border-color: var(--doc-accent); color: var(--doc-accent); font-weight: 600; }
33
+ .box-path-note { color: var(--doc-muted); font-size: var(--doc-small-font-size); font-weight: 400; }
34
+ @media (min-width: 560px) {
35
+ .box-path { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 32px; }
36
+ .box-path-node:not(:last-child)::after { top: calc(50% - 1px); left: 100%; width: 24px; height: 0; border-left: 0; border-top: 2px solid var(--doc-muted); }
37
+ .box-path-node:not(:last-child)::before { top: calc(50% - 5px); left: calc(100% + 24px); border: 5px solid transparent; border-left: 7px solid var(--doc-muted); border-right: 0; }
38
+ }
39
+ /* A branch in inline SVG: a viewBox sized for a phone (its 14-unit text reads at 13px there), so
40
+ a max-width keeps the text from growing with a wide page; colors are the kit's variables. */
41
+ .branch { display: block; width: 100%; max-width: 360px; margin: 0 auto; }
42
+ .branch-box { fill: none; stroke: var(--doc-border); stroke-width: 1.5; }
43
+ .branch-box-marked { stroke: var(--doc-accent); }
44
+ .branch-line { fill: none; stroke: var(--doc-muted); stroke-width: 2; }
45
+ .branch-arrow-head { fill: var(--doc-muted); }
46
+ .branch-text { fill: var(--doc-text); font-size: 14px; text-anchor: middle; dominant-baseline: central; }
47
+ /* A strip of metrics: a layout of the page's own that is no figure (a whole block). One column
48
+ on a phone: two would leave the third metric alone on a row. */
49
+ .metric-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 24px; }
50
+ .metric { border-top: 2px solid var(--doc-border); padding-top: 8px; }
51
+ .metric p { margin: 0; }
52
+ .metric-value { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
53
+ .metric-label { color: var(--doc-muted); font-size: var(--doc-small-font-size); }
54
+ @media (max-width: 420px) { .metric-strip { grid-template-columns: minmax(0, 1fr); } }
55
+ </style>
56
+ </head>
57
+ <body>
58
+ <!-- A catalogue of the blocks, not a document: its words say what each block is, its numbers are placeholders. -->
59
+ <main class="doc-page" data-doc-id="example-report">
60
+ <header class="doc-header">
61
+ <div class="doc-icon">🧱</div>
62
+ <h1 class="doc-title">块的写法</h1>
63
+ <p class="doc-note">来源:块的目录,不是文档;数值都是占位</p>
64
+ </header>
65
+
66
+ <section class="doc-summary" aria-label="概括">
67
+ <p><strong>小标题 A</strong></p>
68
+ <p>开头概括:紧跟页头,在第一节之前;小标题的数目和用词由写作偏好定。</p>
69
+ <p><strong>小标题 B</strong></p>
70
+ <ul>
71
+ <li><strong>列表标题:</strong>内容</li>
72
+ </ul>
73
+ <p><strong>小标题 C</strong></p>
74
+ <p>每个小标题后面一段或一个列表。</p>
75
+ </section>
76
+
77
+ <section class="doc-section">
78
+ <h2>文字</h2>
79
+ <p>段落:正文的一段,行内可以有<strong>粗体</strong>、<code>行内代码</code>、<a href="https://example.com/">链接</a>、<mark>高亮</mark>和<a href="#detail-card">详情卡片</a>的链接。</p>
80
+ <dialog id="detail-card">
81
+ <h3>详情卡片</h3>
82
+ <p>点开链接才看到的说明:一个术语的定义、一个数的来历。</p>
83
+ </dialog>
84
+ <p>行内公式写在句中:\(r = a / b\)。</p>
85
+
86
+ <h3>列表</h3>
87
+ <ul>
88
+ <li>符号列表:没有先后的几项</li>
89
+ <li class="doc-highlight-yellow">带颜色的一项:颜色是块上的类</li>
90
+ </ul>
91
+ <ol>
92
+ <li>编号列表:有先后的步骤
93
+ <ol>
94
+ <li>下一层</li>
95
+ </ol>
96
+ </li>
97
+ <li>第二步</li>
98
+ </ol>
99
+ <h4>待办事项</h4>
100
+ <ul>
101
+ <li><input type="checkbox" checked> 做完的一项</li>
102
+ <li><input type="checkbox"> 没做完的一项</li>
103
+ </ul>
104
+
105
+ <h3>引用、提示、高亮与折叠</h3>
106
+ <blockquote><p>引用块:照录的原话。</p></blockquote>
107
+ <div class="doc-callout"><p><strong>提示块:</strong>风险、口径的变化,读者要留意的事。</p></div>
108
+ <aside>
109
+ <div class="doc-icon">💡</div>
110
+ <p>高亮块:浅色底上的一组块,和提示块一样少用。</p>
111
+ </aside>
112
+ <details>
113
+ <summary>折叠块</summary>
114
+ <p>读者点开才看到的内容:长表格、推导、原文。</p>
115
+ </details>
116
+ </section>
117
+
118
+ <section class="doc-section">
119
+ <hr>
120
+ <h2>表格与图</h2>
121
+ <p class="doc-note">范围:类别 A–C<span class="doc-tab">单位:个</span></p>
122
+ <table data-doc-chart="lollipop">
123
+ <caption>从表格画的图:卡片在表格后面,改表格里的数,图跟着重画</caption>
124
+ <thead><tr><th>类别</th><th>数值</th></tr></thead>
125
+ <tbody>
126
+ <tr><td>A</td><td>12</td></tr>
127
+ <tr><td>B</td><td>18</td></tr>
128
+ <tr><td>C</td><td>9</td></tr>
129
+ </tbody>
130
+ </table>
131
+
132
+ <figure class="doc-figure">
133
+ <h3>自己的图表:类型由页面的脚本定义</h3>
134
+ <p class="doc-figure-caption">斜率图 · 单位:个</p>
135
+ <div data-doc-chart="slope">
136
+ <script type="application/json">
137
+ [{ "label": "类别 A", "from": 12, "to": 15 }, { "label": "类别 B", "from": 18, "to": 14 }, { "label": "类别 C", "from": 9, "to": 11 }]
138
+ </script>
139
+ </div>
140
+ </figure>
141
+ <details>
142
+ <summary>斜率图的数</summary>
143
+ <table>
144
+ <caption>表格:图已标出每个数,表收在折叠块里</caption>
145
+ <thead><tr><th>类别</th><th>之前</th><th>之后</th></tr></thead>
146
+ <tbody>
147
+ <tr><td>类别 A</td><td>12</td><td>15</td></tr>
148
+ <tr><td>类别 B</td><td>18</td><td>14</td></tr>
149
+ <tr><td>类别 C</td><td>9</td><td>11</td></tr>
150
+ </tbody>
151
+ </table>
152
+ </details>
153
+
154
+ <figure class="doc-figure">
155
+ <h3>带注释的时间线:自己画的图</h3>
156
+ <p class="doc-figure-caption">页面自己的 HTML 和 CSS,放在卡片里</p>
157
+ <div class="timeline">
158
+ <div class="timeline-item"><p class="timeline-date">第 1 周</p><p>事件 A</p></div>
159
+ <div class="timeline-item timeline-item-marked"><p class="timeline-date">第 3 周</p><p>事件 B</p><p class="timeline-note">注释:这一步为什么要紧</p></div>
160
+ <div class="timeline-item"><p class="timeline-date">第 6 周</p><p>事件 C</p></div>
161
+ </div>
162
+ </figure>
163
+
164
+ <figure class="doc-figure">
165
+ <h3>方框和箭头:自己的 HTML 和 CSS</h3>
166
+ <p class="doc-figure-caption">部件之间的关系画成箭头;手机上竖排、箭头朝下,宽处横排、箭头朝右;卡片画边框,图里不再画外框</p>
167
+ <div class="box-path">
168
+ <div class="box-path-node"><p>部件 A</p></div>
169
+ <div class="box-path-node box-path-node-marked"><p>部件 B</p><p class="box-path-note">注释:它读 A 的输出</p></div>
170
+ <div class="box-path-node"><p>部件 C</p></div>
171
+ </div>
172
+ </figure>
173
+
174
+ <figure class="doc-figure">
175
+ <h3>分支:内联 SVG</h3>
176
+ <p class="doc-figure-caption">一个分成两个;箭头是 marker,颜色用 kit 的变量,限宽免得宽页面上字变大</p>
177
+ <svg class="branch" viewBox="0 0 320 136" role="img" aria-label="分支:一步分成两步">
178
+ <defs>
179
+ <marker id="fig-branch-arrow" viewBox="0 0 8 8" refX="4" refY="4" markerWidth="8" markerHeight="8" markerUnits="userSpaceOnUse" orient="auto">
180
+ <path class="branch-arrow-head" d="M0 0 L8 4 L0 8 Z"></path>
181
+ </marker>
182
+ </defs>
183
+ <rect class="branch-box branch-box-marked" x="4" y="50" width="96" height="36" rx="6"></rect>
184
+ <text class="branch-text" x="52" y="68">一步</text>
185
+ <rect class="branch-box" x="220" y="6" width="96" height="36" rx="6"></rect>
186
+ <text class="branch-text" x="268" y="24">分支 A</text>
187
+ <rect class="branch-box" x="220" y="94" width="96" height="36" rx="6"></rect>
188
+ <text class="branch-text" x="268" y="112">分支 B</text>
189
+ <path class="branch-line" d="M100 68 H160 V24 H214" marker-end="url(#fig-branch-arrow)"></path>
190
+ <path class="branch-line" d="M160 68 V112 H214" marker-end="url(#fig-branch-arrow)"></path>
191
+ </svg>
192
+ </figure>
193
+
194
+ <h3>整体块</h3>
195
+ <p>不是图的版式:类名和样式是页面自己的,整块移动,文字就地修改。</p>
196
+ <div class="metric-strip">
197
+ <div class="metric"><p class="metric-value">12</p><p class="metric-label">指标 A</p></div>
198
+ <div class="metric"><p class="metric-value">18</p><p class="metric-label">指标 B</p></div>
199
+ <div class="metric"><p class="metric-value">9</p><p class="metric-label">指标 C</p></div>
200
+ </div>
201
+ </section>
202
+
203
+ <section class="doc-section">
204
+ <hr>
205
+ <h2>图片与流程图</h2>
206
+ <figure>
207
+ <img src="assets/picture.png" alt="一张示意图">
208
+ <figcaption>图片:图注写在 figcaption 里</figcaption>
209
+ </figure>
210
+ <ol class="doc-flow">
211
+ <li>
212
+ <p><strong>步骤流程图</strong></p>
213
+ <p>一步一个节点,标题是粗体的一段。</p>
214
+ </li>
215
+ <li>
216
+ <div class="doc-icon">🔧</div>
217
+ <p><strong>带图标的一步</strong></p>
218
+ <p>图标画在序号的位置。</p>
219
+ </li>
220
+ <li><p><strong>最后一步</strong></p></li>
221
+ </ol>
222
+ </section>
223
+
224
+ <section class="doc-section">
225
+ <hr>
226
+ <h2>选项卡与分栏</h2>
227
+ <section data-doc-sheets="pages">
228
+ <section>
229
+ <h3>第一页</h3>
230
+ <p>选项卡:把一部分分成几页,每页放任意的块。</p>
231
+ </section>
232
+ <section>
233
+ <h3>第二页</h3>
234
+ <p>第二页的块。</p>
235
+ </section>
236
+ </section>
237
+ <div class="doc-columns">
238
+ <div class="doc-column"><p><strong>分栏:</strong>二到五栏并排,放读者要对照的内容。</p></div>
239
+ <div class="doc-column"><p><strong>另一栏:</strong>屏幕窄时各栏上下排列。</p></div>
240
+ </div>
241
+ </section>
242
+
243
+ <section class="doc-section">
244
+ <hr>
245
+ <h2>代码与公式</h2>
246
+ <p>\[ r = \frac{a}{b} \]</p>
247
+ <pre data-title="代码块:标题写文件名或用途"><code class="language-python">values = {"A": 12, "B": 18, "C": 9}
248
+ print(sum(values.values()))</code></pre>
249
+ </section>
250
+
251
+ <section class="doc-section">
252
+ <hr>
253
+ <h2>文件、书签与嵌入</h2>
254
+ <figure class="doc-file">
255
+ <a class="doc-file-link" href="assets/data.csv" download="数据.csv"><span class="doc-file-name">数据.csv</span><span class="doc-file-size">0.1 KiB</span></a>
256
+ <figcaption>文件:读者保存的一个文件</figcaption>
257
+ </figure>
258
+ <p><a class="doc-bookmark" href="https://example.com/" title="一个网页做成的卡片:标题、说明和地址。">网页书签</a></p>
259
+ <figure class="doc-embed doc-embed--file" style="--doc-embed-height: 240px">
260
+ <iframe class="doc-embed-frame" src="assets/embed.html" sandbox="allow-scripts" loading="lazy"></iframe>
261
+ <figcaption>嵌入:随文档附带的 HTML 或 PDF 页面</figcaption>
262
+ </figure>
263
+ </section>
264
+ </main>
265
+ <script>
266
+ // Each chart type is defined once; the kit calls it, the host emptied, for every chart declared
267
+ // with it, and again whenever the width, the theme or the card's height change.
268
+
269
+ // A text drawn in the host, measured and taken out: label columns as wide as their longest label.
270
+ /** @param {HTMLElement} host @param {string[]} texts */
271
+ function widest(host, texts) {
272
+ const probe = d3.select(host).append("svg").append("text");
273
+ const width = d3.max(texts, (text) => probe.text(text).node()?.getComputedTextLength() ?? 0) ?? 0;
274
+ probe.node()?.ownerSVGElement?.remove();
275
+ return Math.ceil(width);
276
+ }
277
+
278
+ // data: the card's JSON, a value before and after for each category.
279
+ DocCharts.define("slope", ({ host, data, tokens, width, height }) => {
280
+ /** @type {Array<{ label: string, from: number, to: number }>} */
281
+ const rows = data;
282
+ const tall = height ?? 240; // height: the card's when the reader set one, else null
283
+ // Each end's labels ("类别 A 12") beside its axis, the room for them measured.
284
+ const side = Math.min(widest(host, rows.map((row) => `${row.label} ${Math.max(row.from, row.to)}`)) + 16, width * 0.36);
285
+ const [left, right] = [side, width - side];
286
+ const values = rows.flatMap((row) => [row.from, row.to]);
287
+ const y = d3.scaleLinear([d3.min(values) ?? 0, d3.max(values) ?? 1], [tall - 16, 44]).nice();
288
+ // Labels at least a line apart, pushed down in their order when two values are close.
289
+ /** @param {number[]} at */
290
+ const apart = (at) => {
291
+ const order = at.map((_, index) => index).sort((a, b) => at[a] - at[b]);
292
+ const placed = [...at];
293
+ order.forEach((index, rank) => { if (rank > 0) placed[index] = Math.max(placed[index], placed[order[rank - 1]] + 20); });
294
+ return placed;
295
+ };
296
+ const starts = apart(rows.map((row) => y(row.from)));
297
+ const ends = apart(rows.map((row) => y(row.to)));
298
+ // Into the host, an SVG named for screen readers; its text is the document's (16px), colors from tokens.
299
+ const svg = d3.select(host).append("svg").attr("width", width).attr("height", tall)
300
+ .attr("role", "img").attr("aria-label", "斜率图:各类别之前与之后的数值");
301
+ [["之前", left], ["之后", right]].forEach(([label, at]) => {
302
+ svg.append("line").attr("x1", at).attr("x2", at).attr("y1", 32).attr("y2", tall - 8).attr("stroke", tokens.border);
303
+ svg.append("text").attr("x", at).attr("y", 16).attr("text-anchor", "middle").attr("fill", tokens.muted).style("font-size", "13px").text(label);
304
+ });
305
+ // A rise in the first series color, a fall muted.
306
+ const line = svg.append("g").selectAll("g").data(rows).join("g").attr("fill", (row) => (row.to >= row.from ? tokens.series[0] : tokens.muted));
307
+ line.append("line").attr("x1", left).attr("x2", right).attr("y1", (row) => y(row.from)).attr("y2", (row) => y(row.to))
308
+ .attr("stroke", (row) => (row.to >= row.from ? tokens.series[0] : tokens.muted)).attr("stroke-width", 2);
309
+ line.append("circle").attr("cx", left).attr("cy", (row) => y(row.from)).attr("r", 4);
310
+ line.append("circle").attr("cx", right).attr("cy", (row) => y(row.to)).attr("r", 4);
311
+ line.append("text").attr("x", left - 8).attr("y", (_, index) => starts[index]).attr("dy", "0.35em").attr("text-anchor", "end")
312
+ .attr("fill", tokens.text).text((row) => `${row.label} ${row.from}`);
313
+ line.append("text").attr("x", right + 8).attr("y", (_, index) => ends[index]).attr("dy", "0.35em")
314
+ .attr("fill", tokens.text).text((row) => `${row.to} ${row.label}`);
315
+ });
316
+
317
+ // data: the table's rows, each keyed by its header's words; data.columns the header's words in
318
+ // order. The kit draws it again when the table changes, and the user may add, rename or delete
319
+ // any row: so everything here comes from the rows (the domain, the ticks, the labels), nothing
320
+ // from today's names or numbers.
321
+ DocCharts.define("lollipop", ({ host, data, tokens, width, height }) => {
322
+ /** @type {DocTableRows} */
323
+ const rows = data;
324
+ const [name, value] = rows.columns;
325
+ /** @type {Array<{ label: string, value: number }>} */
326
+ const points = rows.flatMap((row) => {
327
+ const number = row[value];
328
+ return typeof number === "number" ? [{ label: String(row[name] ?? ""), value: number }] : [];
329
+ });
330
+ // Labels wider than 40% of the card (long ones, or a phone's width) go above their rows instead.
331
+ const labelWidth = widest(host, points.map((point) => point.label));
332
+ const above = labelWidth + 24 > width * 0.4;
333
+ const left = above ? 16 : labelWidth + 24;
334
+ const tall = height ?? (above ? 56 : 40) * points.length + 40;
335
+ const x = d3.scaleLinear([0, d3.max(points, (point) => point.value) ?? 1], [left, width - 24]).nice();
336
+ const y = d3.scaleBand(points.map((point) => point.label), [above ? 24 : 8, tall - 28]);
337
+ const svg = d3.select(host).append("svg").attr("width", width).attr("height", tall)
338
+ .attr("role", "img").attr("aria-label", `${value},按${name}`);
339
+ // class "axis": the kit's axis look (13px, muted). Narrow, three ticks: the domain's ends and
340
+ // middle, as tickValues; ticks(3) is only a hint, which d3 may exceed (on 0–8,000 it draws five).
341
+ const [low, high] = x.domain();
342
+ svg.append("g").attr("class", "axis").attr("transform", `translate(0,${tall - 28})`)
343
+ .call(d3.axisBottom(x).tickValues(width < 520 ? [low, (low + high) / 2, high] : x.ticks(6)));
344
+ const row = svg.append("g").selectAll("g").data(points).join("g")
345
+ .attr("transform", (point) => `translate(0,${(y(point.label) ?? 0) + y.bandwidth() / 2})`);
346
+ // A label above its row stands 18px over its stem, its letters ending 4px or more above a dot (r 5)
347
+ // under them: a larger dot or a smaller offset puts the mark on the words.
348
+ row.append("text").attr("x", above ? left : left - 8).attr("y", above ? -18 : 0).attr("dy", "0.35em")
349
+ .attr("text-anchor", above ? "start" : "end").attr("fill", tokens.text).text((point) => point.label);
350
+ // The stem is a length from zero, so the domain starts at 0: never at a number picked to fit.
351
+ row.append("line").attr("x1", x(0)).attr("x2", (point) => x(point.value)).attr("stroke", tokens.border).attr("stroke-width", 2);
352
+ row.append("circle").attr("cx", (point) => x(point.value)).attr("r", 5).attr("fill", tokens.series[0]);
353
+ });
354
+ </script>
355
+ </body>
356
+ </html>
@@ -0,0 +1,187 @@
1
+ # Writing the page
2
+
3
+ The rules behind the blocks of [example-report.html](example-report.html).
4
+
5
+ Write the document as an ordinary web page, with a class only where HTML has no element. `gallery export` rewrites in `doc.html` what the kit has a block for as the kit's markup and gives every block its `data-block-id`; `gallery check <slug>` lists what it would rewrite and changes nothing.
6
+
7
+ The kit's names are `doc-*` classes, `data-doc-*` attributes, `--doc-*` custom properties and `Doc*` globals. The older `report-*`, `data-report-*`, `--report-*` and `Report*` forms are still read: the checks name them by their new names, and the tools write them as the new ones (a 写作偏好 written before may still name them: they are the same blocks).
8
+
9
+ ## Blocks at a glance
10
+
11
+ Each block by the name Gallery's menu gives it (the user's word for it), what you write, what the file holds after an export where it differs, and the section below that holds its rule.
12
+
13
+ <!-- glance -->
14
+ | Block | You write | After export | Rule |
15
+ | --- | --- | --- | --- |
16
+ | 开头概括 | `section.doc-summary` after the header, `<p><strong>` headings | | The page |
17
+ | 文本, 标题 2–4 | `<p>`, `<h2>`–`<h4>` | | Text and lists |
18
+ | 符号列表, 编号列表, 引用块 | `<ul>`, `<ol>` (`start`, `data-continue`), `<blockquote><p>` | | Text and lists |
19
+ | 待办事项 | `<ul><li><input type="checkbox" checked> …` | `ul.doc-todo` | Text and lists |
20
+ | 分割线 | `<hr>` first in a section | | The page |
21
+ | 折叠列表 | `<details><summary>`, never the kit's classes on it | `details.doc-details` | Text and lists |
22
+ | 代码块 | `<pre data-title="…"><code class="language-…">` | `div.doc-code[data-language]` | Text and lists |
23
+ | 公式块, a formula in a line | `<p>\[…\]</p>`, `\(…\)` | | Text and lists |
24
+ | 表格 | `<table>`, its title a `<caption>` | `div.doc-table-wrap` › `table.doc-table`, the caption a `p.doc-note` above it | Tables |
25
+ | 图片 | `<figure><img src="assets/…"><figcaption>`, or a lone `<img>` | `figure.doc-image` | Pictures |
26
+ | 小字 | `<p class="doc-note">`, `span.doc-tab` at its right | | Kit blocks |
27
+ | 提示块, 高亮块 | `div.doc-callout` holding `<p>`; `<aside>` | `aside.doc-panel` (one made in the preview a `div.doc-panel`, the same block) | Kit blocks |
28
+ | 步骤流程图 | `ol.doc-flow`, a step `<li><p><strong>…</strong></p>…</li>` | | Kit blocks |
29
+ | 选项卡 | `<section data-doc-sheets="name">` holding a `<section>` per tab, starting with its heading, the tab's name | `section.doc-sheet-shell`: its row of tabs, a `div[data-doc-sheet]` per tab | Kit blocks |
30
+ | 分栏 | `div.doc-columns` | | Kit blocks |
31
+ | 详情卡片 | `<a href="#x">` in the text, `<dialog id="x"><h3>…</h3>…</dialog>` | | Kit blocks |
32
+ | 文件, 嵌入 | `figure.doc-file`, `figure.doc-embed` | | Kit blocks |
33
+ | 网页书签 | `<p><a class="doc-bookmark" href="https://…" title="…">…</a></p>` | `figure.doc-bookmark` | Kit blocks |
34
+ | 颜色 | `doc-text-<color>`, `doc-highlight-<color>` on the block | | Kit blocks |
35
+ | 图表 | a card holding `<div data-doc-chart="type">` with its data as JSON, the type defined with `DocCharts.define`; or `<table data-doc-chart="type">`, drawn from its rows | for the table: its frame, then a card after it, its caption the card's `h3` | Figures and charts |
36
+ | 图 (示意图、时间线) | `figure.doc-figure` holding your own HTML or SVG | | Figures and charts |
37
+ | 整体块 | an element of a class of your own that is no figure (a strip of metrics, a panel of your own), styled in the page's `<style>` | | Figures and charts |
38
+ <!-- /glance -->
39
+
40
+ ## The page
41
+
42
+ `gallery new` writes the head, the header with the title, and a starter section, which you replace; the source line and the opening summary are yours to write.
43
+
44
+ - `data-doc-id` is the slug, `<html lang>` the page's language.
45
+ - `doc.json`, beside the page, holds its `title`, `description` and `type` (free text naming the kind of document; `gallery new`'s `report` is fine), and may hold `source`: the most precise locator of the dataset, experiment report, document or query the materials come from (say so when that is only a supplied draft or example). Its `title`, `icon` and `description` are the sidebar's; the title and icon are the page's header's too. Change any of them with `gallery set <slug> --title "…" --icon <emoji, or none> --description "…"` (SKILL.md, "Organizing documents"), which writes the header and `doc.json` in step; never by hand in either. It may also hold `look`, the reader's 字体与布局 (the page's font, text size, spacing and column width, chosen in Gallery's 更多 menu: `{ "font": "serif" | "mixed", "size": "small" | "large", "spacing": "compact" | "loose", "width": "narrow" | "wide" }`, where `"font": "sans"` or `"size"`, `"spacing"`, `"width": "default"` say a default chosen over the workspace's). The workspace's `gallery.json` may hold a `look` of the same shape too, the reader's default for every document (字体与布局's 应用到全部文档), which a document's own choices override one by one; a new document has none of its own and shows it. Both are the reader's: keep them as they are whenever you rewrite `doc.json`, never write either into the page, and add or change them only when the user asks (`gallery check` takes either).
46
+ - The header holds the title, an icon before it if any (`.doc-icon`, which `gallery set --icon` writes), and at most one line of small text, the source line. The source line says in words a reader elsewhere understands where the materials come from (组内项目 X 的论文终稿与 rebuttal 材料), or names a file of `materials/`; never a path of this machine (`D:\…`, `C:\Users\…`, `/home/…`), which the checks make a `fix` line. The same holds for a scope line's 来源. Nothing else goes between the title and the opening summary.
47
+ - The opening summary comes right after the header, before the first section: `<section class="doc-summary" aria-label="概括">` (a 写作偏好 written before may write `aria-label="报告概括"`: the same block; keep the label 写作偏好 gives), a few headings as paragraphs of bold words (no `h2`–`h6`), each followed by a paragraph or a list. 写作偏好 may say what it holds; when it says nothing, a document written from materials still has one, unless the user asks for another structure or you convert a finished report. Its headings are short noun phrases that fit the kind of report (实验背景, 用途, 展区与展品 …); 写作偏好 says which.
48
+ - A section groups a chapter and draws nothing: its title is the heading in it, an `<hr>` at its top a line above it. That `<hr>` is a block of its own, with its id: the first section after the summary has none, each after it one. To reorder sections, move the `<hr>` elements themselves, ids and all, so that this still holds; never delete one and write another. Sections are optional; a short document may put its text straight in `main`.
49
+ - The document's own CSS goes in one inline `<style>` using the kit's variables: colors, which follow the dark theme (`--doc-text`, `--doc-muted`, `--doc-border`, `--doc-grid`, `--doc-surface`, `--doc-bg`, `--doc-accent`, `--doc-series-1` … `-6`), and fonts and sizes (`--doc-font`, the text's; `--doc-mono` or `--doc-code-font`, monospace, a code block's the second; `--doc-body-font-size`, 16px; `--doc-small-font-size`, 13px, small text). Use only the `--doc-*` names this page gives: another may name nothing, and its `var()` then quietly falls back (`--doc-mono-font` names nothing). Its code goes in one inline `<script>` at the end of `body`; the kit's own tags are added when the page is shown or exported. The checks read the script as strict TypeScript would: a type error is a note (guard a value where it can really be null), a syntax error or a name nothing defines a failure. Write JavaScript, a type in JSDoc if any (`/** @type {…} */`), never `: number`.
50
+
51
+ ## Text and lists
52
+
53
+ Write semantic elements (`h2`–`h4`, `p`, `ul`, `ol`, `blockquote` holding paragraphs, `hr`) straight in their flow (the page, a section, a Sheet panel, a panel, a disclosure, a dialog or a column), with no wrapper and no class; the kit styles them in every flow. Headings stop at `h4`; for a `<dl>`, write a list or a table.
54
+
55
+ A long path, URL or name breaks at the line's end by itself, in `<code>` too: keep it whole as the materials give it.
56
+
57
+ An item's words go straight in its `<li>`, and any block it holds after them (`<li>要点<p>…</p></li>`) stands under its line. An `<li>` that starts with a block is an item of no words over that block: the kit shows its marker on a line of its own above it, never beside the block's first line. So write `<li>` and the words, not `<li><p>` and the words.
58
+
59
+ The kit draws list markers itself; a list with a class of its own keeps the browser's. A numbered list may start at another number (`<ol start="4">`), or count on from the numbered list before it in the same flow when a paragraph interrupts them (`<ol data-continue start="4">`: write the start it continues at).
60
+
61
+ In a line, `strong`, `em`, `u` (a red underline), `s`, `code`, `a`, `sub`, `sup` and `br` stay; `<mark>` becomes a yellow highlight, `<small>` gray text, `<kbd>` `<code>`, `<del>` `<s>`, `<ins>` `<u>`, `<q>` “quotes”, and a `<span style>` of a color, background, bold, italic or line the kit's nearest colors and formats (a `span` styled otherwise stays as written). An `<abbr>`'s `title` or a `<time>`'s `datetime` is dropped and named in the output: write it in the text.
62
+
63
+ A formula is `\(…\)` in a sentence, or `\[…\]` as a paragraph of its own (a formula block); never `$…$`, and a `<` or `>` in it written `\lt`, `\gt`.
64
+
65
+ A code block's title (`data-title`, or a `<figcaption>` beside it in a `<figure>`) names the file or what the code is for, when the reader needs it. On its `<pre>`, `data-line-start="38"` numbers its lines from 38, their range shown beside the title (leave it out of the title); `data-line-numbers="false"` drops the numbers; `data-folded-lines="3"` folds line 3's structure; `data-wrap="false"` keeps long lines whole, scrolling sideways (a directory tree, a log). The block's frame shows 40 lines and scrolls for the rest; `style="--doc-code-height: none"` on its `<pre>` shows every line.
66
+
67
+ ## Tables
68
+
69
+ In a file that holds the kit's markup (after an export or the user's first edit in the preview), still write what you add as plain HTML: the preview and the export convert it. To chart a table the file already holds, put `data-doc-chart="<type>"` on its `table.doc-table`, the type one your script defines ([below](#figures-and-charts)), with a `<caption>` first in it for the card's title; when the `p.doc-note` right above the table is its former caption (a title, not a scope or unit line), move its words into the `<caption>` and delete the note.
70
+
71
+ A table's scope or unit line (`p.doc-note` right above it, or `p.doc-table-meta` in older documents) moves with the table. When the table becomes another block (Sheet tabs, a chart, a list), its line goes with the data, or is dropped once the new block says the same. A table folded into a disclosure: its former caption (a `p.doc-note` above it that is a title, not a scope or unit line) becomes the words of the `<summary>`, which takes no id, and is deleted; its scope or unit line goes into the disclosure with it, and the table keeps its id. Tables made Sheet tabs: a scope line or caption true of every tab stays above the area as small text (dropped when the section's heading says the same); a tab's table takes no caption of its own. Older documents may hold `data-doc-table-static` (rows kept in their order) and a cell's `data-sort-value` (the number the cell is read as, sorted and charted by): keep them, and change `data-sort-value` with the cell's number.
72
+
73
+ A long table of data shows in a frame at most `min(72vh, 720px)` tall (about 15 rows) and scrolls inside it under its header row, which stays; a short table, or one mostly of words, shows whole. To show every row of a long one, write `style="--doc-table-height: none"` on its `<table>`: the export moves it onto the table's frame (`div.doc-table-wrap`), where you write it on a table already in its frame.
74
+
75
+ ## Pictures
76
+
77
+ A picture comes from a file right in the document's `assets/` (no folder in it), named with 1 to 81 ASCII letters, digits, dots, dashes and underscores, the first a letter or digit, in a format a page shows (png, jpg, gif, webp, avif, svg, ico): rename a file as you copy it in (`古籍 1.png` as `assets/guji-1.png`). Copy it at the size the page needs: its long side about 2000px at most (1400px is enough at the 712px reading width; about 800px in a row of two columns, about 500px in three), photos and scans as JPEG at quality about 80, screenshots and diagrams as PNG. Gallery does not resize pictures: use a tool this machine has (ImageMagick, for example: `magick in.png -resize 1400x1400> -quality 80 out.jpg`), or copy them as they are and let `gallery check` say which are heavy. Each further `<img>` of a picture embeds it again: show one twice only where the reader needs it twice.
78
+
79
+ A picture with no width shows at its own size, at most its column's width and 80% of the window's height (a tall scan shows whole, narrower); `width="360"` (pixels) gives it that share of the 712px reading width, `width="50%"` half the width it stands in. The share holds on a narrow page too: `width="300"` is 0.42 of a phone's 336px, 141px. A picture whose words the reader must read (a scan, a page, a screenshot of text) takes no width. A reader's click on a picture opens it large with its caption; you write nothing for it. A picture in a link follows the link; an icon or a picture shown under 48px does not open.
80
+
81
+ ## Kit blocks
82
+
83
+ The blocks HTML has no element for, written with the kit's classes as the example writes them.
84
+
85
+ **Small text** (`p.doc-note`): a short label, unit or scope note, such as a table's scope line right above it. A scope note may say how a number counts (口径:一条意见写到三家,各算一次). `span.doc-tab` puts the rest of the line at its right end.
86
+
87
+ **Callout** (`div.doc-callout`): a risk, warning, state or caveat, set apart from the text; its words in a `<p>` in it, and a list or a code block after that where it needs one (`<div class="doc-callout"><p>…</p></div>`). **Highlight panel** (`<aside>`): blocks set apart on a light fill, an icon first if any; as rare as a callout.
88
+
89
+ **A block's color** (颜色): a class on the block, never a `style`, of the colors gray, brown, orange, yellow, green, blue, purple, pink and red. A paragraph, a heading, a list item or a flowchart step takes its words' color (`doc-text-<color>`), a fill (`doc-highlight-<color>`) or both; a disclosure, a code block (on its `<pre>`), a callout or a highlight panel a fill only; a table cell one of the two. Words in a line take theirs from `<mark>` or a `<span style>`.
90
+
91
+ **Columns** (`div.doc-columns` of 2 to 5 `div.doc-column`): what the reader compares across, or a picture with its words beside it (the picture's column first, so that on a phone it stands above them). `style="--doc-column-ratio: .4"` on a column gives it that share of the row: write it on every column of the row, the shares adding up to 1, or on none, and the columns share the row equally (one written on some columns only fails the check). Pictures side by side in columns: crop them to one ratio, so that their captions line up. A column holds any block but a row of columns, a section or a Sheet area. On a screen under 640px the columns stand one under another: never point at one as the left or right.
92
+
93
+ **A process or steps** (步骤流程图, `ol.doc-flow`): one step an item, drawn as a card, arrows between them. A step's title is a paragraph of bold words, then any blocks it holds; an icon may stand first in it, drawn in its number's place. The kit numbers the steps (write no 1, ① or 第一步) and lays them out in rows that fill the width; `data-direction="row"` on the list keeps them in one row, `"column"` one a row; on a step it says where the arrow after it goes. A step written the short way (`<li>收集数据<p>…</p></li>`) is rewritten as a node. A flowchart has no title or caption of its own and stands in no `<figure>`: the sentence before it says what it shows; a legend goes in a `p.doc-note` beside it. A step takes a color as a list item does. A flowchart is for steps in order, each after the one before; a flow that branches, merges or loops is a drawing of boxes and arrows like the example's, and a structure or diagram a figure ([below](#figures-and-charts)).
94
+
95
+ **Sheet tabs** (选项卡): a long part split into pages. Write `<section data-doc-sheets="<name>">` holding a `<section>` per tab and nothing else, each of no attribute (no `id`, no `class`) and starting with a heading (`<h2>`–`<h4>`) that is the tab's name, its blocks after it; the tools write the kit's area of it (`section.doc-sheet-shell`, a row of `button.doc-sheet-tab` and a `div[data-doc-sheet]` per tab, their keys made). Give each area of a report a name of its own (one is made when you leave it out). A panel holds any blocks, headings and chart cards included. In an area the file holds as the kit's, a new tab is a button in its row and a panel of the same key.
96
+
97
+ **Detail card** (详情卡片): a term's details over the page, opened by a link in the text; its `<dialog>` stands right after the link's paragraph, its id letters, digits, `-` and `_`, a letter first, and no other element's, and it starts with a plain `<h3>` of its title, the blocks after it (with no title, it starts with its blocks). `gallery qa` opens each one and checks it; its pictures show the blocks in it that changed, and `--tiles` the whole card.
98
+
99
+ **A link to another document** of the workspace is an ordinary relative link between the two files, by the other's folder name (its slug, which `gallery list` prints, `gallery list <address>` for an address the user gave you), never a title or a server's address: `<a href="../<slug>/doc.html">its title</a>`, `<a href="../<slug>/doc.html#<block id>">` for one of its blocks, `<a href="#<block id>">` for a block of this document, the ids being the blocks' `data-block-id`. A click goes there inside Gallery, and an export of the two together links their files; a link to a document left out of an export keeps its words. The editor's page block is the same link shown with the document's icon and title (`<a class="doc-link-mention" href="../<slug>/doc.html"><span class="doc-link-mention-icon"></span>its title</a>`, written exactly so): the words in the file are read when it was made, the page shows the title the document has now. An ordinary link is what you write. `gallery check` notes a link to a document or a block that is not there, and a relative link that leads to no document (a title for the folder, a folder with no `doc.html` after it).
100
+
101
+ **Files, bookmarks and embeds**: cards, written as the example writes them; keep what matters of each in the document's own text. A file's or an embed's caption is always there (`<figcaption></figcaption>` when there is none). A file is one file of `assets/` the reader saves: its link's `download` the name it is saved as, its size if you give it; keep it small, as the export embeds it. A bookmark is a paragraph holding only its link, `<p><a class="doc-bookmark" href="https://…" title="…">…</a></p>`: an `https://` address, its words the page's title, its `title` its description; the tools write the card (`figure.doc-bookmark`) and fetch nothing. In the card, an icon of `assets/` may go first in its address (`<img class="doc-bookmark-icon">`), a cover last in its link (`<span class="doc-bookmark-cover"><img></span>`). An embed shows an HTML or PDF file of `assets/` (`doc-embed--file`; an HTML file's `sandbox` never `allow-same-origin`, a PDF's none), shown offline too, or an `https://` page with a `sandbox`, shown only online; `--doc-embed-height` on the figure sets its height.
102
+
103
+ ## Figures and charts
104
+
105
+ A figure the reader looks at as one picture, with a title, is a card: `<figure class="doc-figure">`, its title an `h3`, a scope or unit line `p.doc-figure-caption`. Data charts are types of your own (`DocCharts.define`); diagrams, timelines and architectures are your own HTML or SVG inside the card. A layout that is no figure is a whole block. Draw what the materials call for in the form that shows it best.
106
+
107
+ The card draws the frame and the surface once: draw no second outer box (a border, a background, a shadow) inside `figure.doc-figure`. The words in a figure or a whole block are the user's to fix in place, not to split: a `<p>`, a heading or an `<li>` in them stays one. The user moves, resizes, retitles and copies a card.
108
+
109
+ **A chart** (intervals, distributions, small multiples, slopes, anything on axes), as the example's slope chart is: a card holding `<div data-doc-chart="type">` with its data as JSON, and the type defined once in the document's script with `DocCharts.define(type, draw)` (`type` lowercase letters, digits and hyphens, a letter first). The same type draws every chart declared with it, each from its own data.
110
+
111
+ - The kit calls `draw({ host, data, tokens, width, height })` with the host emptied, and again whenever its width, the theme or the card's height change; `height` is the card's height when the reader set one, else `null`. Draw into `host` with d3 v7 (on the page), and give the SVG `role="img"` and an `aria-label`.
112
+ - Give the data its shape once in JSDoc, on a line of its own right above the declaration (`/** @type {Array<{ label: string, value: number }>} */` then `const rows = data;`): untyped, d3 reads its values as strings and the checks put type notes on code that is correct. `d3.min` and `d3.max` may give `undefined`: write `?? 0`.
113
+ - Colors come from `tokens`: `text`, `muted`, `border`, `grid`, `surface`, `bg`, `accent`, `accentSoft`, `success`, `warning`, `danger`, `series[0..5]` (the kit's variables: `series[0]` is `--doc-series-1`, `accentSoft` `--doc-accent-soft`), and status colors from `tokens.tone("success" | "danger" | "warning" | "info" | "neutral")` ([sdk/doc-tokens.d.ts](../sdk/doc-tokens.d.ts)).
114
+ - Text in the host is the document's font at 16px, and in a group of class `axis` the kit's axis look (13px, muted): set a `font-size` only to change that, never under 13px. Measure the label column from the longest label (draw a text in the host and read `getComputedTextLength`), never a fixed width; when that leaves the plot too little room (long labels, a phone's width), put the labels above their rows. Draw for 360px as well: fewer ticks, labels that fit. `ticks(n)` is only a hint to d3 and may draw more (on 0–8,000, `ticks(3)` draws five); `tickValues` caps the count: at most four along a phone's axis, such as the domain's ends and middle, as the example's lollipop gives them. `gallery qa` warns `ticks` where an axis's labels crowd.
115
+ - Keep marks off the words: a zero, reference or grid line stops short of a label or a value's text, or the text moves clear of it, and a label stands at least 4px from the mark under or beside it. A length (a bar, a stem) starts at a baseline the reader can name (zero, or the axis's start as it is labeled), never at a number picked to fit the data. A legend belongs to the card: say the encoding in its `p.doc-figure-caption` or draw a key inside the chart, never in a paragraph outside the card; name the marks by shape or series (实心/空心, the series' name), never by light or dark, which the dark theme inverts.
116
+ - Show each set of values once, where it is read. When the chart labels every value, or the text gives them, fold its table (a table of a chart drawn from a table: the keyed form below; of one drawn from JSON: a disclosure right after its card, as the example's slope chart has it) or leave the value labels off. Keep the table in sight only when the reader needs exact numbers the chart does not show (more columns, many rows). The text and the opening summary give the takeaway (the largest, the smallest, a total), not every value again.
117
+ - To change what a chart shows, change its JSON; change its `define` code to change how every chart of that type draws.
118
+ - An interactive one is `DocCharts.define(type, { mount })`: `mount` gets what `draw` gets and a `signal` (for `addEventListener`), starts once in the emptied host with its controls, and may return `update(context)` and `destroy()` ([sdk/doc-charts.d.ts](../sdk/doc-charts.d.ts)).
119
+
120
+ **A chart drawn from a table**, as the example's lollipop is: write `data-doc-chart="<type>"` on the `<table>`, its `<caption>` the title; the tools put the card right after the table and link the two by a key. The kit calls your type's `draw` with `data` the table's rows: an object per body row, in the file's order, keyed by the header's words (give each column words of its own, never none), and `data.columns` the header's words in order. A value is `null` for an empty cell, a dash or `n/a`; a number when the cell writes one number (`12.5%` is 12.5, `3.6亿` 360000000, `约 20` 20; read from a cell's `data-sort-value` when it has one); else the cell's words: a range (`3–5 天`), a ratio (`3 / 4`), and every cell of a column whose header cell has `data-sort-type="text"` or `"date"`. Rows of a `<tfoot>` are left out of the chart, but a table with a `<tfoot>` has no table tools in the preview: keep a total out of a table you chart and say it in the text (a total row in the body is charted as a row). Type it with `/** @type {DocTableRows} */` on the line above `const rows = data;`. The chart draws again whenever the user edits the table, and they may add, rename or delete any row: so draw everything from the rows. Domains and ticks come from the values (`[0, d3.max(…)]` for a length, `d3.extent` for a position, `.nice()`), highlights and groups from a column of the table (a 重点 or 类别 column), never from row labels, numbers or the reason for an empty cell written in the code; an empty cell draws as a gap or a neutral no-value, its reason said in the table or the text. Merged cells, or a key no table carries, draw nothing (the card says why). Give a type drawn from a table a name of its own: drawn from JSON elsewhere, its `data` would have another shape. `gallery check` prints how each one reads its table (`chart …`: its rows, each column numbers or words), and a `note` where a column reads as numbers in some rows and words in others.
121
+
122
+ Written this way, on the `<table>`, the table always shows, its card after it. To fold the table under its card from the start (the chart labels its values, or the text gives them), write the card with a key of your own and the table carrying the same key; once exported, a chart card may stay in a column or a panel while its table's frame moves elsewhere:
123
+
124
+ <!-- you write -->
125
+ ```html
126
+ <figure class="doc-figure">
127
+ <h3>各类别的数值</h3>
128
+ <div data-doc-chart="table-dots" data-doc-chart-data="values"></div>
129
+ </figure>
130
+ <details>
131
+ <summary>数据</summary>
132
+ <table data-doc-chart-source="values">
133
+ <thead><tr><th>类别</th><th>数值</th></tr></thead>
134
+ <tbody><tr><td>类别 A</td><td>12</td></tr><tr><td>类别 B</td><td>18</td></tr></tbody>
135
+ </table>
136
+ </details>
137
+ ```
138
+
139
+ ```js
140
+ // data: the table's rows, each keyed by its header's words; data.columns the header's words in order.
141
+ DocCharts.define("table-dots", ({ host, data, tokens, width }) => {
142
+ /** @type {DocTableRows} */
143
+ const rows = data;
144
+ const [name, value] = rows.columns;
145
+ const points = rows.flatMap((row) => (typeof row[value] === "number" ? [{ label: String(row[name]), value: row[value] }] : []));
146
+ // The label column as wide as its longest label (the example's lollipop also puts long ones above their rows).
147
+ const probe = d3.select(host).append("svg").append("text");
148
+ const left = Math.ceil(d3.max(points, (point) => probe.text(point.label).node()?.getComputedTextLength() ?? 0) ?? 0) + 16;
149
+ probe.node()?.ownerSVGElement?.remove();
150
+ const tall = points.length * 36 + 40;
151
+ const x = d3.scaleLinear([0, d3.max(points, (point) => point.value) ?? 0], [left, width - 24]).nice();
152
+ const y = d3.scaleBand(points.map((point) => point.label), [8, tall - 28]);
153
+ const svg = d3.select(host).append("svg").attr("width", width).attr("height", tall).attr("role", "img").attr("aria-label", `${value},按${name}`);
154
+ // Three ticks when narrow, the domain's ends and middle: ticks(3) is a hint d3 may exceed.
155
+ const [low, high] = x.domain();
156
+ svg.append("g").attr("class", "axis").attr("transform", `translate(0,${tall - 28})`).call(d3.axisBottom(x).tickValues(width < 520 ? [low, (low + high) / 2, high] : x.ticks(5)));
157
+ svg.append("g").attr("class", "axis").attr("transform", `translate(${left},0)`).call(d3.axisLeft(y).tickSize(0));
158
+ svg.append("g").selectAll("circle").data(points).join("circle")
159
+ .attr("cx", (point) => x(point.value)).attr("cy", (point) => (y(point.label) ?? 0) + y.bandwidth() / 2).attr("r", 5).attr("fill", tokens.series[0]);
160
+ });
161
+ ```
162
+
163
+ **A drawing in a card** (a layered structure, a diagram of parts, an architecture, a timeline), as the example's timeline, `.box-path` and `.branch` are: your own HTML and CSS, or inline SVG, inside `figure.doc-figure` after its title and caption. Give its elements classes of your own (never `doc-…`) and style them in the page's `<style>`: draw what the figure needs (boxes, lines, gaps, sizes) but not the card's frame, colored with the kit's variables so that it follows the dark theme.
164
+
165
+ - A `<figure>` inside the drawing is part of it, not a card of its own.
166
+ - How parts relate (who calls, reads or feeds whom; where a flow branches, merges or loops) is drawn as boxes joined by arrows, not said in a caption or repeated in a table. The example draws both kinds. `.box-path`, HTML and CSS: each box but the last draws its line (`::after`) and its arrowhead (`::before`), one box under another with arrows down on a phone, in a row with arrows right from `@media (min-width: 560px)`. `.branch`, inline SVG: one box into two, its lines ending in a `<marker>` arrowhead (`marker-end`), colored by classes with `--doc-muted`, `--doc-border` and `--doc-accent`.
167
+ - Give each figure's SVG `<defs>` ids a prefix of its own (`<marker id="fig-branch-arrow">`, as the example's): two figures with the same id fail the repeated-id check; a copy the user makes gets its own prefix. Write markers, gradients and clip paths as attributes (`marker-end="url(#fig-branch-arrow)"`), not in a `<style>` inside the SVG.
168
+ - A `viewBox` scales the drawing, its text with it: 14-unit text in a viewBox 800 wide reads at 6px on a 360px phone. Size the text in the viewBox's units so that it reads at 11px or more at 360px, or lay the drawing out for narrow widths (HTML that wraps, an `@media` rule, or a chart of your own drawn from its width). The other way too: a viewBox sized for a phone grows its text with the card on a wide page (14 units in a viewBox 320 wide read at 31px drawn 712px wide), so give such an SVG a `max-width` (the example's `.branch`: 360px).
169
+ - `gallery qa` pictures it, warns `overflow-in-block` when its words run past their box at some width (give them room in an `@media` rule), `cut-in-block` when a box of a fixed height cuts off its words or marks (let it grow: `min-height`) and `svg-text-small` when a viewBox draws its text under 11px.
170
+
171
+ **A whole block** (整体块): a layout of your own that is no figure (a strip of metrics, a comparison panel, controls your script handles), as the example's `.metric-strip` is. Give it a class of your own (never `doc-…`) and style it in the page's `<style>` with the kit's variables. The user moves it whole and can fix its words in the preview; `gallery qa` warns `overflow-in-block` and `cut-in-block` as for a drawing. A drawing, a diagram or a timeline is a figure, in a card, not a whole block.
172
+
173
+ **A picture**: a diagram, scan or photo the materials come with ([Pictures](#pictures)).
174
+
175
+ ## Do not write
176
+
177
+ - The kit's classes on what you write as plain HTML (a `<details>` given `doc-details`): write the plain element.
178
+ - Attributes in curly quotes (`class=”x”`, which HTML reads as part of the value): an editing tool keeping a file's “…” may make them; look at the quotes of the tags you add.
179
+ - A bare `<button>` in the text: a link opens a detail card; an interactive figure is a chart of your own (`DocCharts.define(type, { mount })`), and controls of your own a whole block your script handles.
180
+ - `<colgroup>`, column widths or `.number`: the kit measures columns and aligns numbers.
181
+ - base64 `data:` or remote addresses for scripts, styles, fonts and pictures: put the file in `assets/` and write `assets/<file>`, which the export embeds. Links to web pages are fine.
182
+ - Looks of your own on the kit's blocks (a paragraph, a table, a callout): gradients, shadows, frames, margins or type sizes; the kit sets them. The sizes this page names are the exception, each in its block's `style`: `--doc-table-height`, `--doc-code-height`, `--doc-embed-height`.
183
+
184
+ ## Keep what you did not write
185
+
186
+ - Keep every class, `style` and `data-*` attribute you did not write: they hold the user's edits (sizes, colors, folds, crops, column widths, a flowchart's directions and widths) and each block's identity, its `data-block-id` ([SKILL.md](../SKILL.md#revising-a-document)).
187
+ - A whole block's or a figure's own tags, classes and styles stay as written; the user edits its words, not those inside an inline element of its own (a badge).