allyhub 0.19.0 → 0.20.0

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 (699) hide show
  1. package/dist/commands/align.js +1 -1
  2. package/dist/commands/check.js +1 -1
  3. package/dist/commands/cloud-tools.js +1 -1
  4. package/dist/commands/cloud.js +1 -1
  5. package/dist/commands/dev.js +5 -5
  6. package/dist/commands/export.js +3 -0
  7. package/dist/commands/frames/doc.js +1 -1
  8. package/dist/commands/frames/piece.js +1 -1
  9. package/dist/commands/frames/sheet.js +1 -1
  10. package/dist/commands/frames.js +9 -9
  11. package/dist/commands/index.js +1 -1
  12. package/dist/commands/inspect/combos.js +1 -1
  13. package/dist/commands/inspect/common.js +2 -2
  14. package/dist/commands/inspect/facts.js +2 -2
  15. package/dist/commands/migrate.js +3 -0
  16. package/dist/commands/skills.js +3 -3
  17. package/dist/commands/upgrade.js +5 -0
  18. package/dist/commands.json +1 -1
  19. package/dist/help.js +3 -3
  20. package/dist/main.js +8 -7
  21. package/dist/node_modules/@allyhub/3d-extension/package.json +2 -2
  22. package/dist/node_modules/@allyhub/audio/package.json +1 -1
  23. package/dist/node_modules/@allyhub/blocks/LICENSE +241 -0
  24. package/dist/node_modules/@allyhub/blocks/dist/alt.js +2 -0
  25. package/dist/node_modules/@allyhub/blocks/dist/elements.js +2 -0
  26. package/dist/node_modules/@allyhub/blocks/dist/flow-resolve.js +2 -0
  27. package/dist/node_modules/@allyhub/blocks/dist/flow-table.js +2 -0
  28. package/dist/node_modules/@allyhub/blocks/dist/format.js +2 -0
  29. package/dist/node_modules/@allyhub/blocks/dist/gantt.js +2 -0
  30. package/dist/node_modules/@allyhub/blocks/dist/grids.js +2 -0
  31. package/dist/node_modules/@allyhub/blocks/dist/html.js +75 -0
  32. package/dist/node_modules/@allyhub/blocks/dist/icons.generated.js +2 -0
  33. package/dist/node_modules/@allyhub/blocks/dist/icons.js +2 -0
  34. package/dist/node_modules/@allyhub/blocks/dist/index.js +2 -0
  35. package/dist/node_modules/@allyhub/blocks/dist/layout.js +2 -0
  36. package/dist/node_modules/@allyhub/blocks/dist/look.js +2 -0
  37. package/dist/node_modules/@allyhub/blocks/dist/measure.js +3 -0
  38. package/dist/node_modules/@allyhub/blocks/dist/model.js +2 -0
  39. package/dist/node_modules/@allyhub/blocks/dist/page.js +2 -0
  40. package/dist/node_modules/@allyhub/blocks/dist/palette.js +2 -0
  41. package/dist/node_modules/@allyhub/blocks/dist/path.js +2 -0
  42. package/dist/node_modules/@allyhub/blocks/dist/resolve.js +2 -0
  43. package/dist/node_modules/@allyhub/blocks/dist/samples.js +2 -0
  44. package/dist/node_modules/@allyhub/blocks/dist/sankey.js +2 -0
  45. package/dist/node_modules/@allyhub/blocks/dist/svg.js +2 -0
  46. package/dist/node_modules/@allyhub/blocks/dist/tidy.js +2 -0
  47. package/dist/node_modules/@allyhub/blocks/dist/trees.js +2 -0
  48. package/dist/node_modules/@allyhub/blocks/package.json +19 -0
  49. package/dist/node_modules/@allyhub/browser/dist/html.js +1 -1
  50. package/dist/node_modules/@allyhub/browser/package.json +1 -1
  51. package/dist/node_modules/@allyhub/build/dist/fonts.js +9 -3
  52. package/dist/node_modules/@allyhub/build/dist/index.js +1 -1
  53. package/dist/node_modules/@allyhub/build/dist/inspect-view.js +1 -1
  54. package/dist/node_modules/@allyhub/build/dist/migrate.js +2 -0
  55. package/dist/node_modules/@allyhub/build/dist/prepare.js +3 -3
  56. package/dist/node_modules/@allyhub/build/dist/work.js +3 -3
  57. package/dist/node_modules/@allyhub/build/package.json +5 -1
  58. package/dist/node_modules/@allyhub/canvas-extension/package.json +1 -1
  59. package/dist/node_modules/@allyhub/canvas-model/package.json +1 -1
  60. package/dist/node_modules/@allyhub/chart/dist/chart-file.js +2 -1
  61. package/dist/node_modules/@allyhub/chart/dist/chart-xml.js +4 -3
  62. package/dist/node_modules/@allyhub/chart/dist/chart.js +4 -2
  63. package/dist/node_modules/@allyhub/chart/dist/chartex-xml.js +4 -0
  64. package/dist/node_modules/@allyhub/chart/dist/classic.js +2 -0
  65. package/dist/node_modules/@allyhub/chart/dist/embedded.js +2 -2
  66. package/dist/node_modules/@allyhub/chart/dist/extended.js +2 -0
  67. package/dist/node_modules/@allyhub/chart/dist/index.js +1 -1
  68. package/dist/node_modules/@allyhub/chart/dist/svg.js +1 -1
  69. package/dist/node_modules/@allyhub/chart/dist/tree.js +2 -0
  70. package/dist/node_modules/@allyhub/chart/package.json +1 -1
  71. package/dist/node_modules/@allyhub/check/dist/check.js +1 -1
  72. package/dist/node_modules/@allyhub/check/package.json +1 -1
  73. package/dist/node_modules/@allyhub/cloud/dist/blobs.js +1 -1
  74. package/dist/node_modules/@allyhub/cloud/dist/call.js +4 -4
  75. package/dist/node_modules/@allyhub/cloud/dist/client.js +1 -1
  76. package/dist/node_modules/@allyhub/cloud/dist/storage.js +2 -0
  77. package/dist/node_modules/@allyhub/cloud/dist/uploads.js +2 -2
  78. package/dist/node_modules/@allyhub/cloud/package.json +1 -1
  79. package/dist/node_modules/@allyhub/components/package.json +1 -1
  80. package/dist/node_modules/@allyhub/dev-server/dist/background.js +1 -1
  81. package/dist/node_modules/@allyhub/dev-server/dist/item-process.js +2 -0
  82. package/dist/node_modules/@allyhub/dev-server/dist/item-worker.js +2 -0
  83. package/dist/node_modules/@allyhub/dev-server/dist/live.js +1 -1
  84. package/dist/node_modules/@allyhub/dev-server/dist/pages.js +20 -1
  85. package/dist/node_modules/@allyhub/dev-server/dist/project.js +1 -1
  86. package/dist/node_modules/@allyhub/dev-server/dist/record.js +1 -1
  87. package/dist/node_modules/@allyhub/dev-server/dist/server.js +2 -2
  88. package/dist/node_modules/@allyhub/dev-server/dist/tools.js +1 -1
  89. package/dist/node_modules/@allyhub/dev-server/dist/validate.js +2 -2
  90. package/dist/node_modules/@allyhub/dev-server/dist/writer.js +3 -3
  91. package/dist/node_modules/@allyhub/dev-server/package.json +1 -1
  92. package/dist/node_modules/@allyhub/diagnostics/dist/rules.js +1 -1
  93. package/dist/node_modules/@allyhub/diagnostics/package.json +1 -1
  94. package/dist/node_modules/@allyhub/doc/dist/blocks.js +2 -0
  95. package/dist/node_modules/@allyhub/doc/dist/chart.js +1 -1
  96. package/dist/node_modules/@allyhub/doc/dist/color.js +1 -1
  97. package/dist/node_modules/@allyhub/doc/dist/docx-read.js +12 -0
  98. package/dist/node_modules/@allyhub/doc/dist/docx.js +5 -4
  99. package/dist/node_modules/@allyhub/doc/dist/html.js +83 -48
  100. package/dist/node_modules/@allyhub/doc/dist/index.js +1 -1
  101. package/dist/node_modules/@allyhub/doc/dist/markdown.js +1 -1
  102. package/dist/node_modules/@allyhub/doc/dist/merges.js +2 -0
  103. package/dist/node_modules/@allyhub/doc/dist/model.js +1 -1
  104. package/dist/node_modules/@allyhub/doc/dist/numbering.js +2 -0
  105. package/dist/node_modules/@allyhub/doc/dist/omml.js +3 -0
  106. package/dist/node_modules/@allyhub/doc/dist/page.js +2 -1
  107. package/dist/node_modules/@allyhub/doc/dist/paper.js +1 -1
  108. package/dist/node_modules/@allyhub/doc/dist/parse.js +5 -4
  109. package/dist/node_modules/@allyhub/doc/dist/redline.js +2 -0
  110. package/dist/node_modules/@allyhub/doc/dist/revisions.js +2 -0
  111. package/dist/node_modules/@allyhub/doc/dist/shapes.js +4 -0
  112. package/dist/node_modules/@allyhub/doc/dist/styles.js +2 -0
  113. package/dist/node_modules/@allyhub/doc/dist/table.js +1 -1
  114. package/dist/node_modules/@allyhub/doc/dist/write.js +65 -39
  115. package/dist/node_modules/@allyhub/doc/package.json +5 -1
  116. package/dist/node_modules/@allyhub/doc-extension/dist/build.js +2 -2
  117. package/dist/node_modules/@allyhub/doc-extension/dist/cli/find.js +1 -1
  118. package/dist/node_modules/@allyhub/doc-extension/dist/cli/import.js +3 -0
  119. package/dist/node_modules/@allyhub/doc-extension/dist/cli/index.js +1 -1
  120. package/dist/node_modules/@allyhub/doc-extension/dist/cli/styles.js +4 -0
  121. package/dist/node_modules/@allyhub/doc-extension/dist/export.js +1 -1
  122. package/dist/node_modules/@allyhub/doc-extension/dist/inspect.js +1 -1
  123. package/dist/node_modules/@allyhub/doc-extension/dist/project-tools.js +1 -1
  124. package/dist/node_modules/@allyhub/doc-extension/dist/tools.js +1 -1
  125. package/dist/node_modules/@allyhub/doc-extension/package.json +22 -2
  126. package/dist/node_modules/@allyhub/doc-print/dist/drawn.js +4 -4
  127. package/dist/node_modules/@allyhub/doc-print/dist/index.js +1 -1
  128. package/dist/node_modules/@allyhub/doc-print/dist/layout.js +8 -7
  129. package/dist/node_modules/@allyhub/doc-print/dist/print.js +22 -16
  130. package/dist/node_modules/@allyhub/doc-print/package.json +1 -1
  131. package/dist/node_modules/@allyhub/export/dist/export.js +1 -1
  132. package/dist/node_modules/@allyhub/export/package.json +1 -1
  133. package/dist/node_modules/@allyhub/extension-api/package.json +1 -1
  134. package/dist/node_modules/@allyhub/extension-host/dist/points.js +1 -1
  135. package/dist/node_modules/@allyhub/extension-host/package.json +1 -1
  136. package/dist/node_modules/@allyhub/formats/dist/data/blocks-flow.js +2 -0
  137. package/dist/node_modules/@allyhub/formats/dist/data/blocks.d.ts +146 -0
  138. package/dist/node_modules/@allyhub/formats/dist/data/blocks.js +2 -0
  139. package/dist/node_modules/@allyhub/formats/dist/data/cell-styles.d.ts +9 -0
  140. package/dist/node_modules/@allyhub/formats/dist/data/cell-styles.js +2 -0
  141. package/dist/node_modules/@allyhub/formats/dist/data/deck-code.d.ts +47 -40
  142. package/dist/node_modules/@allyhub/formats/dist/data/deck-code.js +1 -1
  143. package/dist/node_modules/@allyhub/formats/dist/data/diagram-kinds.d.ts +6 -0
  144. package/dist/node_modules/@allyhub/formats/dist/data/diagram-kinds.js +2 -0
  145. package/dist/node_modules/@allyhub/formats/dist/data/diagrams.d.ts +29 -0
  146. package/dist/node_modules/@allyhub/formats/dist/data/diagrams.js +2 -0
  147. package/dist/node_modules/@allyhub/formats/dist/data/faces.d.ts +18 -0
  148. package/dist/node_modules/@allyhub/formats/dist/data/faces.js +1 -1
  149. package/dist/node_modules/@allyhub/formats/dist/data/page-data.d.ts +59 -0
  150. package/dist/node_modules/@allyhub/formats/dist/data/page-data.js +2 -0
  151. package/dist/node_modules/@allyhub/formats/dist/data/reference.d.ts +1 -1
  152. package/dist/node_modules/@allyhub/formats/dist/data/sheet.d.ts +698 -258
  153. package/dist/node_modules/@allyhub/formats/dist/data/sheet.js +1 -1
  154. package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +14104 -2167
  155. package/dist/node_modules/@allyhub/formats/dist/data/slides.js +1 -1
  156. package/dist/node_modules/@allyhub/formats/dist/data/themes.d.ts +82 -0
  157. package/dist/node_modules/@allyhub/formats/dist/data/themes.js +2 -0
  158. package/dist/node_modules/@allyhub/formats/dist/data/tokens.d.ts +67 -0
  159. package/dist/node_modules/@allyhub/formats/dist/data/tokens.js +2 -0
  160. package/dist/node_modules/@allyhub/formats/dist/data/work.d.ts +42 -0
  161. package/dist/node_modules/@allyhub/formats/dist/data/work.js +1 -1
  162. package/dist/node_modules/@allyhub/formats/dist/index.d.ts +7 -0
  163. package/dist/node_modules/@allyhub/formats/dist/index.js +1 -1
  164. package/dist/node_modules/@allyhub/formats/dist/items.d.ts +12 -3
  165. package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +3260 -290
  166. package/dist/node_modules/@allyhub/formats/dist/schemas.js +1 -1
  167. package/dist/node_modules/@allyhub/formats/dist/tolerant.d.ts +45 -0
  168. package/dist/node_modules/@allyhub/formats/dist/tolerant.js +2 -0
  169. package/dist/node_modules/@allyhub/formats/package.json +1 -1
  170. package/dist/node_modules/@allyhub/html-extension/dist/project-tools.js +21 -9
  171. package/dist/node_modules/@allyhub/html-extension/dist/tools.js +1 -1
  172. package/dist/node_modules/@allyhub/html-extension/markup/allyhub.yaml +2 -0
  173. package/dist/node_modules/@allyhub/html-extension/markup/markup.json +14 -4
  174. package/dist/node_modules/@allyhub/html-extension/markup/pages/budget.html +22 -1
  175. package/dist/node_modules/@allyhub/html-extension/package.json +9 -1
  176. package/dist/node_modules/@allyhub/i18n/package.json +1 -1
  177. package/dist/node_modules/@allyhub/image-draw/dist/fonts.js +1 -1
  178. package/dist/node_modules/@allyhub/image-draw/dist/inspect.js +2 -2
  179. package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
  180. package/dist/node_modules/@allyhub/image-extension/dist/build-plugins.js +1 -1
  181. package/dist/node_modules/@allyhub/image-extension/dist/cli.js +1 -1
  182. package/dist/node_modules/@allyhub/image-extension/package.json +2 -2
  183. package/dist/node_modules/@allyhub/image-extension/skills/allyhub/references/images.md +1 -1
  184. package/dist/node_modules/@allyhub/image-measure/dist/layout.js +2 -2
  185. package/dist/node_modules/@allyhub/image-measure/package.json +1 -1
  186. package/dist/node_modules/@allyhub/image-psd/package.json +1 -1
  187. package/dist/node_modules/@allyhub/image-render/package.json +1 -1
  188. package/dist/node_modules/@allyhub/image-runtime/package.json +1 -1
  189. package/dist/node_modules/@allyhub/image-sdk/dist/block.js +2 -0
  190. package/dist/node_modules/@allyhub/image-sdk/dist/blocks.js +2 -0
  191. package/dist/node_modules/@allyhub/image-sdk/dist/index.js +1 -1
  192. package/dist/node_modules/@allyhub/image-sdk/package.json +1 -1
  193. package/dist/node_modules/@allyhub/jobs/package.json +1 -1
  194. package/dist/node_modules/@allyhub/linkedin-extension/package.json +1 -3
  195. package/dist/node_modules/@allyhub/linkedin-extension/skills/allyhub/references/linkedin.md +3 -3
  196. package/dist/node_modules/@allyhub/linkedin-model/package.json +1 -1
  197. package/dist/node_modules/@allyhub/linkedin-view/package.json +1 -1
  198. package/dist/node_modules/@allyhub/measure/package.json +1 -1
  199. package/dist/node_modules/@allyhub/media/package.json +1 -1
  200. package/dist/node_modules/@allyhub/media-extension/dist/analyses/faces.js +1 -1
  201. package/dist/node_modules/@allyhub/media-extension/dist/asr/transcribe.js +1 -1
  202. package/dist/node_modules/@allyhub/media-extension/dist/ocr/text.js +1 -1
  203. package/dist/node_modules/@allyhub/media-extension/dist/vision/faces.js +1 -1
  204. package/dist/node_modules/@allyhub/media-extension/dist/vision/index-media.js +3 -2
  205. package/dist/node_modules/@allyhub/media-extension/package.json +1 -1
  206. package/dist/node_modules/@allyhub/model/package.json +1 -1
  207. package/dist/node_modules/@allyhub/office-extension/markup/csv/allyhub.yaml +2 -0
  208. package/dist/node_modules/@allyhub/office-extension/markup/csv/markup.json +1 -1
  209. package/dist/node_modules/@allyhub/office-extension/markup/document/allyhub.yaml +2 -0
  210. package/dist/node_modules/@allyhub/office-extension/markup/presentation/allyhub.yaml +2 -0
  211. package/dist/node_modules/@allyhub/office-extension/markup/workbook/allyhub.yaml +2 -0
  212. package/dist/node_modules/@allyhub/office-extension/markup/workbook/markup.json +1 -1
  213. package/dist/node_modules/@allyhub/office-extension/package.json +1 -1
  214. package/dist/node_modules/@allyhub/ooxml/dist/ext.js +1 -1
  215. package/dist/node_modules/@allyhub/ooxml/dist/mce.js +1 -1
  216. package/dist/node_modules/@allyhub/ooxml/dist/node.js +1 -1
  217. package/dist/node_modules/@allyhub/ooxml/dist/ns.js +1 -1
  218. package/dist/node_modules/@allyhub/ooxml/dist/opc.js +1 -1
  219. package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
  220. package/dist/node_modules/@allyhub/piece/dist/export.d.ts +1 -1
  221. package/dist/node_modules/@allyhub/piece/dist/layout.d.ts +2 -0
  222. package/dist/node_modules/@allyhub/piece/dist/look.d.ts +10 -2
  223. package/dist/node_modules/@allyhub/piece/dist/look.js +1 -1
  224. package/dist/node_modules/@allyhub/piece/dist/media.d.ts +8 -2
  225. package/dist/node_modules/@allyhub/piece/dist/script.js +1 -1
  226. package/dist/node_modules/@allyhub/piece/dist/source.d.ts +3 -0
  227. package/dist/node_modules/@allyhub/piece/package.json +1 -1
  228. package/dist/node_modules/@allyhub/project/dist/media-index.js +1 -1
  229. package/dist/node_modules/@allyhub/project/package.json +1 -1
  230. package/dist/node_modules/@allyhub/protocol/dist/cli.js +1 -1
  231. package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
  232. package/dist/node_modules/@allyhub/protocol/dist/events.js +1 -1
  233. package/dist/node_modules/@allyhub/protocol/dist/index.js +1 -1
  234. package/dist/node_modules/@allyhub/protocol/dist/kinds.js +1 -1
  235. package/dist/node_modules/@allyhub/protocol/dist/page-frame.js +2 -0
  236. package/dist/node_modules/@allyhub/protocol/package.json +1 -1
  237. package/dist/node_modules/@allyhub/registry/package.json +1 -1
  238. package/dist/node_modules/@allyhub/render/package.json +1 -1
  239. package/dist/node_modules/@allyhub/runtime/dist/footage.js +1 -1
  240. package/dist/node_modules/@allyhub/runtime/package.json +1 -1
  241. package/dist/node_modules/@allyhub/runtimes/dist/packages.js +2 -2
  242. package/dist/node_modules/@allyhub/runtimes/dist/runtimes.js +3 -3
  243. package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
  244. package/dist/node_modules/@allyhub/scaffold/dist/index.js +12 -8
  245. package/dist/node_modules/@allyhub/scaffold/package.json +1 -1
  246. package/dist/node_modules/@allyhub/scenery/package.json +1 -1
  247. package/dist/node_modules/@allyhub/scenery-host/package.json +1 -1
  248. package/dist/node_modules/@allyhub/sheet/dist/api/capabilities.js +1 -1
  249. package/dist/node_modules/@allyhub/sheet/dist/api/charts.js +1 -1
  250. package/dist/node_modules/@allyhub/sheet/dist/api/index.js +1 -1
  251. package/dist/node_modules/@allyhub/sheet/dist/api/styles.js +1 -1
  252. package/dist/node_modules/@allyhub/sheet/dist/api/workbook.js +1 -1
  253. package/dist/node_modules/@allyhub/sheet/dist/calc/engine.js +1 -1
  254. package/dist/node_modules/@allyhub/sheet/dist/calc/server.js +1 -1
  255. package/dist/node_modules/@allyhub/sheet/dist/cell-styles.js +2 -0
  256. package/dist/node_modules/@allyhub/sheet/dist/chart.js +1 -1
  257. package/dist/node_modules/@allyhub/sheet/dist/check.js +1 -1
  258. package/dist/node_modules/@allyhub/sheet/dist/file.js +2 -2
  259. package/dist/node_modules/@allyhub/sheet/dist/heatmap.js +2 -0
  260. package/dist/node_modules/@allyhub/sheet/dist/html.js +10 -10
  261. package/dist/node_modules/@allyhub/sheet/dist/index.js +1 -1
  262. package/dist/node_modules/@allyhub/sheet/dist/inspect.js +1 -1
  263. package/dist/node_modules/@allyhub/sheet/dist/paginate.js +1 -1
  264. package/dist/node_modules/@allyhub/sheet/dist/printed.js +1 -1
  265. package/dist/node_modules/@allyhub/sheet/dist/sdk.js +1 -1
  266. package/dist/node_modules/@allyhub/sheet/dist/sparklines.js +2 -0
  267. package/dist/node_modules/@allyhub/sheet/dist/table-style.js +1 -1
  268. package/dist/node_modules/@allyhub/sheet/dist/table-styles.js +1 -1
  269. package/dist/node_modules/@allyhub/sheet/dist/theme.js +2 -0
  270. package/dist/node_modules/@allyhub/sheet/dist/tiles.js +2 -0
  271. package/dist/node_modules/@allyhub/sheet/dist/units.js +2 -0
  272. package/dist/node_modules/@allyhub/sheet/dist/workbook.js +1 -1
  273. package/dist/node_modules/@allyhub/sheet/dist/write.js +14 -14
  274. package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.js +1 -1
  275. package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.js +1 -1
  276. package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.js +2 -2
  277. package/dist/node_modules/@allyhub/sheet/dist/xlsx/styles.js +1 -1
  278. package/dist/node_modules/@allyhub/sheet/dist/xlsx/theme.js +1 -1
  279. package/dist/node_modules/@allyhub/sheet/dist/xlsx/write.js +1 -1
  280. package/dist/node_modules/@allyhub/sheet/package.json +1 -1
  281. package/dist/node_modules/@allyhub/sheet-extension/dist/build.js +1 -1
  282. package/dist/node_modules/@allyhub/sheet-extension/dist/cli/sheet.js +7 -7
  283. package/dist/node_modules/@allyhub/sheet-extension/dist/code.js +1 -1
  284. package/dist/node_modules/@allyhub/sheet-extension/dist/evaluate.js +2 -2
  285. package/dist/node_modules/@allyhub/sheet-extension/dist/export.js +2 -2
  286. package/dist/node_modules/@allyhub/sheet-extension/dist/inspect.js +2 -2
  287. package/dist/node_modules/@allyhub/sheet-extension/dist/migrations.js +4 -0
  288. package/dist/node_modules/@allyhub/sheet-extension/dist/project-tools.js +1 -1
  289. package/dist/node_modules/@allyhub/sheet-extension/dist/tools.js +1 -1
  290. package/dist/node_modules/@allyhub/sheet-extension/package.json +7 -3
  291. package/dist/node_modules/@allyhub/slides-core/dist/api.js +2 -2
  292. package/dist/node_modules/@allyhub/slides-core/dist/blocks.js +2 -0
  293. package/dist/node_modules/@allyhub/slides-core/dist/capabilities.js +1 -1
  294. package/dist/node_modules/@allyhub/slides-core/dist/chart-api.js +1 -1
  295. package/dist/node_modules/@allyhub/slides-core/dist/code.js +1 -1
  296. package/dist/node_modules/@allyhub/slides-core/dist/enums.js +1 -1
  297. package/dist/node_modules/@allyhub/slides-core/dist/file.js +3 -3
  298. package/dist/node_modules/@allyhub/slides-core/dist/index.js +1 -1
  299. package/dist/node_modules/@allyhub/slides-core/dist/measure.js +1 -1
  300. package/dist/node_modules/@allyhub/slides-core/dist/model.js +1 -1
  301. package/dist/node_modules/@allyhub/slides-core/dist/office-layouts.js +2 -0
  302. package/dist/node_modules/@allyhub/slides-core/dist/office.js +1 -1
  303. package/dist/node_modules/@allyhub/slides-core/dist/resolve.js +1 -1
  304. package/dist/node_modules/@allyhub/slides-core/dist/script.js +2 -2
  305. package/dist/node_modules/@allyhub/slides-core/dist/styles/brief.js +2 -0
  306. package/dist/node_modules/@allyhub/slides-core/dist/styles/editorial.js +2 -0
  307. package/dist/node_modules/@allyhub/slides-core/dist/styles/index.js +2 -0
  308. package/dist/node_modules/@allyhub/slides-core/dist/styles/kit.js +2 -0
  309. package/dist/node_modules/@allyhub/slides-core/dist/styles/layouts.js +2 -0
  310. package/dist/node_modules/@allyhub/slides-core/dist/styles/pitch.js +2 -0
  311. package/dist/node_modules/@allyhub/slides-core/dist/styles/stage.js +2 -0
  312. package/dist/node_modules/@allyhub/slides-core/dist/styles/tiles.js +2 -0
  313. package/dist/node_modules/@allyhub/slides-core/dist/theme.js +1 -1
  314. package/dist/node_modules/@allyhub/slides-core/dist/units.js +1 -1
  315. package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
  316. package/dist/node_modules/@allyhub/slides-extension/dist/check.js +1 -1
  317. package/dist/node_modules/@allyhub/slides-extension/dist/cli/slides.js +2 -2
  318. package/dist/node_modules/@allyhub/slides-extension/dist/deck-fonts.js +1 -1
  319. package/dist/node_modules/@allyhub/slides-extension/dist/project-tools.js +1 -1
  320. package/dist/node_modules/@allyhub/slides-extension/package.json +24 -1
  321. package/dist/node_modules/@allyhub/slides-pptx/dist/charts.js +1 -1
  322. package/dist/node_modules/@allyhub/slides-pptx/dist/fonts.js +1 -1
  323. package/dist/node_modules/@allyhub/slides-pptx/dist/image-size.js +2 -0
  324. package/dist/node_modules/@allyhub/slides-pptx/dist/import/code.js +3 -3
  325. package/dist/node_modules/@allyhub/slides-pptx/dist/import/index.js +7 -2
  326. package/dist/node_modules/@allyhub/slides-pptx/dist/import/names.js +1 -1
  327. package/dist/node_modules/@allyhub/slides-pptx/dist/import/script.js +1 -1
  328. package/dist/node_modules/@allyhub/slides-pptx/dist/index.js +1 -1
  329. package/dist/node_modules/@allyhub/slides-pptx/dist/mtx.js +2 -0
  330. package/dist/node_modules/@allyhub/slides-pptx/dist/read/chart.js +3 -2
  331. package/dist/node_modules/@allyhub/slides-pptx/dist/read/chartex.js +3 -0
  332. package/dist/node_modules/@allyhub/slides-pptx/dist/read/common.js +1 -1
  333. package/dist/node_modules/@allyhub/slides-pptx/dist/read/index.js +2 -2
  334. package/dist/node_modules/@allyhub/slides-pptx/dist/read/shapes.js +1 -1
  335. package/dist/node_modules/@allyhub/slides-pptx/dist/read/table.js +1 -1
  336. package/dist/node_modules/@allyhub/slides-pptx/dist/read/text.js +1 -1
  337. package/dist/node_modules/@allyhub/slides-pptx/dist/read/timing.js +1 -1
  338. package/dist/node_modules/@allyhub/slides-pptx/dist/shapes.js +1 -1
  339. package/dist/node_modules/@allyhub/slides-pptx/dist/text.js +1 -1
  340. package/dist/node_modules/@allyhub/slides-pptx/dist/write.js +2 -2
  341. package/dist/node_modules/@allyhub/slides-pptx/dist/xml.js +3 -2
  342. package/dist/node_modules/@allyhub/slides-pptx/package.json +1 -1
  343. package/dist/node_modules/@allyhub/slides-runtime/dist/draw.js +2 -2
  344. package/dist/node_modules/@allyhub/slides-runtime/dist/load.js +1 -1
  345. package/dist/node_modules/@allyhub/slides-runtime/package.json +1 -1
  346. package/dist/node_modules/@allyhub/stage/package.json +1 -1
  347. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/LICENSE +93 -0
  348. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-400-italic.woff2 +0 -0
  349. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-400-normal.woff2 +0 -0
  350. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-700-italic.woff2 +0 -0
  351. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-700-normal.woff2 +0 -0
  352. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-ext-400-italic.woff2 +0 -0
  353. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-ext-400-normal.woff2 +0 -0
  354. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-ext-700-italic.woff2 +0 -0
  355. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-ext-700-normal.woff2 +0 -0
  356. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-400-italic.css +1 -0
  357. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-400.css +1 -0
  358. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-700-italic.css +1 -0
  359. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-700.css +1 -0
  360. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-ext-400-italic.css +1 -0
  361. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-ext-400.css +1 -0
  362. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-ext-700-italic.css +1 -0
  363. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-ext-700.css +1 -0
  364. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo-black/LICENSE +93 -0
  365. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo-black/files/archivo-black-latin-400-normal.woff2 +0 -0
  366. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo-black/files/archivo-black-latin-ext-400-normal.woff2 +0 -0
  367. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo-black/latin-400.css +1 -0
  368. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo-black/latin-ext-400.css +1 -0
  369. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/LICENSE +93 -0
  370. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-400-italic.woff2 +0 -0
  371. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-400-normal.woff2 +0 -0
  372. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-700-italic.woff2 +0 -0
  373. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-700-normal.woff2 +0 -0
  374. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-ext-400-italic.woff2 +0 -0
  375. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-ext-400-normal.woff2 +0 -0
  376. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-ext-700-italic.woff2 +0 -0
  377. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-ext-700-normal.woff2 +0 -0
  378. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-400-italic.css +1 -0
  379. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-400.css +1 -0
  380. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-700-italic.css +1 -0
  381. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-700.css +1 -0
  382. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-ext-400-italic.css +1 -0
  383. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-ext-400.css +1 -0
  384. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-ext-700-italic.css +1 -0
  385. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-ext-700.css +1 -0
  386. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/LICENSE +93 -0
  387. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-400-italic.woff2 +0 -0
  388. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-400-normal.woff2 +0 -0
  389. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-700-italic.woff2 +0 -0
  390. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-700-normal.woff2 +0 -0
  391. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-ext-400-italic.woff2 +0 -0
  392. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-ext-400-normal.woff2 +0 -0
  393. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-ext-700-italic.woff2 +0 -0
  394. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-ext-700-normal.woff2 +0 -0
  395. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-400-italic.css +1 -0
  396. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-400.css +1 -0
  397. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-700-italic.css +1 -0
  398. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-700.css +1 -0
  399. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-ext-400-italic.css +1 -0
  400. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-ext-400.css +1 -0
  401. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-ext-700-italic.css +1 -0
  402. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-ext-700.css +1 -0
  403. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/LICENSE +93 -0
  404. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-400-italic.woff2 +0 -0
  405. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-400-normal.woff2 +0 -0
  406. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-700-italic.woff2 +0 -0
  407. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-700-normal.woff2 +0 -0
  408. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-ext-400-italic.woff2 +0 -0
  409. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-ext-400-normal.woff2 +0 -0
  410. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-ext-700-italic.woff2 +0 -0
  411. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-ext-700-normal.woff2 +0 -0
  412. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-400-italic.css +1 -0
  413. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-400.css +1 -0
  414. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-700-italic.css +1 -0
  415. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-700.css +1 -0
  416. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-ext-400-italic.css +1 -0
  417. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-ext-400.css +1 -0
  418. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-ext-700-italic.css +1 -0
  419. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-ext-700.css +1 -0
  420. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/LICENSE +93 -0
  421. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-400-italic.woff2 +0 -0
  422. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-400-normal.woff2 +0 -0
  423. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-700-italic.woff2 +0 -0
  424. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-700-normal.woff2 +0 -0
  425. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-ext-400-italic.woff2 +0 -0
  426. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-ext-400-normal.woff2 +0 -0
  427. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-ext-700-italic.woff2 +0 -0
  428. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-ext-700-normal.woff2 +0 -0
  429. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-400-italic.css +1 -0
  430. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-400.css +1 -0
  431. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-700-italic.css +1 -0
  432. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-700.css +1 -0
  433. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-ext-400-italic.css +1 -0
  434. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-ext-400.css +1 -0
  435. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-ext-700-italic.css +1 -0
  436. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-ext-700.css +1 -0
  437. package/dist/node_modules/@allyhub/stage-page/dist/host.js +1 -1
  438. package/dist/node_modules/@allyhub/stage-page/dist/runtime/stage.html +42 -0
  439. package/dist/node_modules/@allyhub/stage-page/dist/style-faces.js +2 -0
  440. package/dist/node_modules/@allyhub/stage-page/package.json +1 -1
  441. package/dist/node_modules/@allyhub/stage-runtime/dist/runtime.js +96 -92
  442. package/dist/node_modules/@allyhub/stage-runtime/package.json +1 -1
  443. package/dist/node_modules/@allyhub/telemetry/dist/limit.js +2 -0
  444. package/dist/node_modules/@allyhub/telemetry/package.json +5 -1
  445. package/dist/node_modules/@allyhub/text-extension/markup/allyhub.yaml +2 -0
  446. package/dist/node_modules/@allyhub/text-extension/markup-file/allyhub.yaml +2 -0
  447. package/dist/node_modules/@allyhub/text-extension/package.json +1 -1
  448. package/dist/node_modules/@allyhub/video-core/dist/footage-motion.js +1 -1
  449. package/dist/node_modules/@allyhub/video-core/dist/measure.js +1 -1
  450. package/dist/node_modules/@allyhub/video-core/dist/seams.js +1 -1
  451. package/dist/node_modules/@allyhub/video-core/package.json +1 -1
  452. package/dist/node_modules/@allyhub/video-extension/dist/cli/reference-text.js +1 -1
  453. package/dist/node_modules/@allyhub/video-extension/dist/inspect/index.js +1 -1
  454. package/dist/node_modules/@allyhub/video-extension/dist/inspect/joins.js +1 -1
  455. package/dist/node_modules/@allyhub/video-extension/dist/inspect/loop.js +3 -0
  456. package/dist/node_modules/@allyhub/video-extension/package.json +2 -25
  457. package/dist/node_modules/@allyhub/video-measure/dist/check.js +2 -2
  458. package/dist/node_modules/@allyhub/video-measure/dist/index.js +1 -1
  459. package/dist/node_modules/@allyhub/video-measure/dist/seams.js +1 -1
  460. package/dist/node_modules/@allyhub/video-measure/dist/version.js +1 -1
  461. package/dist/node_modules/@allyhub/video-measure/package.json +1 -1
  462. package/dist/node_modules/@allyhub/video-sdk/dist/free.js +1 -1
  463. package/dist/node_modules/@allyhub/video-sdk/package.json +1 -1
  464. package/dist/node_modules/@allyhub/website/dist/index.js +1 -1
  465. package/dist/node_modules/@allyhub/website/dist/website.js +2 -2
  466. package/dist/node_modules/@allyhub/website/package.json +1 -1
  467. package/dist/node_modules/@allyhub/website-extension/package.json +3 -3
  468. package/dist/node_modules/@allyhub/x-extension/package.json +1 -3
  469. package/dist/node_modules/@allyhub/x-extension/skills/allyhub/references/x.md +3 -3
  470. package/dist/node_modules/@allyhub/x-model/package.json +1 -1
  471. package/dist/node_modules/@allyhub/x-view/package.json +1 -1
  472. package/dist/package.json +14 -14
  473. package/dist/self-upgrade.js +2 -0
  474. package/dist/text/batch-text.js +1 -1
  475. package/dist/text/facts-text.js +5 -5
  476. package/dist/text/format.js +2 -2
  477. package/dist/update-notice.js +3 -0
  478. package/dist/version.js +1 -1
  479. package/dist/works.js +1 -1
  480. package/editor-web/assets/{abnfDiagram-WEYOIA3C-DYaMS_BB.js → abnfDiagram-WEYOIA3C-BkVJMd53.js} +1 -1
  481. package/editor-web/assets/{architecture-WOLXFQ4H-g_Tjfl_y.js → architecture-WOLXFQ4H-C6rnaynZ.js} +1 -1
  482. package/editor-web/assets/{architectureDiagram-ZHVYKT53-CqdhofOL.js → architectureDiagram-ZHVYKT53-D3vrh8LK.js} +1 -1
  483. package/editor-web/assets/arrow-down-D-QZrqcz.js +1 -0
  484. package/editor-web/assets/arrow-up-B1zjKUHX.js +1 -0
  485. package/editor-web/assets/article-DHf6mOY_.js +7 -0
  486. package/editor-web/assets/article-Dns1-Xh-.js +3 -0
  487. package/editor-web/assets/{audio-lines-PZj77e7t.js → audio-lines-BFoW_IeO.js} +1 -1
  488. package/editor-web/assets/bar-button-CKPfx2AB.js +1 -0
  489. package/editor-web/assets/{blockDiagram-RJAE7QA3-Bc-28Bci.js → blockDiagram-RJAE7QA3-BKngt8H7.js} +1 -1
  490. package/editor-web/assets/{browser-C9NP0ZYz.js → browser-DEGNhKTV.js} +1 -1
  491. package/editor-web/assets/{c4Diagram-XDPPPE54-CTGJb8FB.js → c4Diagram-XDPPPE54-j7sUELqF.js} +1 -1
  492. package/editor-web/assets/calc-worker-Cr4a0xmt.js +168 -0
  493. package/editor-web/assets/channel-CVWSV3su.js +1 -0
  494. package/editor-web/assets/{chart-no-axes-column-Be0lFcGF.js → chart-no-axes-column-Dyy25XZ_.js} +1 -1
  495. package/editor-web/assets/chip-Bn_9JRRG.js +1 -0
  496. package/editor-web/assets/{chunk-2E7WHVMD-B2MPOVTU.js → chunk-2E7WHVMD-BXa-uRSi.js} +1 -1
  497. package/editor-web/assets/{chunk-4EMNKR2T-BUV1ZHP0.js → chunk-4EMNKR2T-B3ntcsZN.js} +1 -1
  498. package/editor-web/assets/{chunk-55XCU76K-BZlpspL5.js → chunk-55XCU76K-AMvnFwUg.js} +1 -1
  499. package/editor-web/assets/{chunk-7S6XSTFO-CpKeisWE.js → chunk-7S6XSTFO-BA6esfFu.js} +1 -1
  500. package/editor-web/assets/{chunk-AQDTSKZB-BJqwAPyo.js → chunk-AQDTSKZB-BT_vANXs.js} +1 -1
  501. package/editor-web/assets/{chunk-DSNLSHJZ-D6oPWl_W.js → chunk-DSNLSHJZ-DoUgmzGB.js} +1 -1
  502. package/editor-web/assets/{chunk-HAGFOTED-B5pk4MZF.js → chunk-HAGFOTED-DtnIrCZb.js} +1 -1
  503. package/editor-web/assets/{chunk-HNE4Q36P-DHbSPvxQ.js → chunk-HNE4Q36P-BlPwQx3_.js} +1 -1
  504. package/editor-web/assets/{chunk-NQOKRVIF-CcL_GcRA.js → chunk-NQOKRVIF-D2r7jp2r.js} +1 -1
  505. package/editor-web/assets/{chunk-UHW7PFBP-YgiOL6XE.js → chunk-UHW7PFBP-Cmc0_F5o.js} +1 -1
  506. package/editor-web/assets/{chunk-VQ5W62QI-p14b4UYc.js → chunk-VQ5W62QI-nJSMqAr0.js} +1 -1
  507. package/editor-web/assets/{chunk-WQQL4CDK-BWW0x-XH.js → chunk-WQQL4CDK-Btq2nbF6.js} +1 -1
  508. package/editor-web/assets/{chunk-YZO67HFG-oG3qd68C.js → chunk-YZO67HFG-DTbcCoGt.js} +1 -1
  509. package/editor-web/assets/{chunk-ZAUX2LTX-CpcheH0u.js → chunk-ZAUX2LTX-DVwkg-2N.js} +1 -1
  510. package/editor-web/assets/{chunk-ZCHMQSOR-cWQvLl1w.js → chunk-ZCHMQSOR-BV39jOOE.js} +1 -1
  511. package/editor-web/assets/{classDiagram-v2-4MYWR3UA-7PG7YcdU.js → classDiagram-v2-4MYWR3UA-Cj74-fhM.js} +1 -1
  512. package/editor-web/assets/code-Ch6AB5bZ.js +1 -0
  513. package/editor-web/assets/collaborator-XiHOxwGM.js +1 -0
  514. package/editor-web/assets/{copy-CuJSs0nI.js → copy-SoaMYqsN.js} +1 -1
  515. package/editor-web/assets/{createLucideIcon-lm_6n8YT.js → createLucideIcon-euu7Wcd9.js} +1 -1
  516. package/editor-web/assets/{cynefin-EF2NZ3EQ-CtcknEQ_.js → cynefin-EF2NZ3EQ-C0CkiipV.js} +1 -1
  517. package/editor-web/assets/{cynefinDiagram-WF24UDRP-Ca7VIsjN.js → cynefinDiagram-WF24UDRP-hdsnJ4cI.js} +1 -1
  518. package/editor-web/assets/{dagre-NK4GIZVX-BzcSLtsr.js → dagre-NK4GIZVX-CC7WSgaK.js} +1 -1
  519. package/editor-web/assets/deck-DQpNIS2p.js +1 -0
  520. package/editor-web/assets/{diagram-CBK3MWTC-DpRmTGlG.js → diagram-CBK3MWTC-DmaVm13J.js} +1 -1
  521. package/editor-web/assets/{diagram-I5XIIV2D-BTrs_AX8.js → diagram-I5XIIV2D-De8jqp7b.js} +1 -1
  522. package/editor-web/assets/{diagram-ODIL2UCW-CkIVjPqH.js → diagram-ODIL2UCW-B5pBTulX.js} +1 -1
  523. package/editor-web/assets/{diagram-PFBEJUXE-BlFMbAG1.js → diagram-PFBEJUXE-BYsXg5_w.js} +1 -1
  524. package/editor-web/assets/{diagram-RJA3I4VV-D3f8VJ-D.js → diagram-RJA3I4VV-DZ8f6bYe.js} +1 -1
  525. package/editor-web/assets/{diagram-TYUNFSNR-Bbpngj6F.js → diagram-TYUNFSNR-qXHUsauD.js} +1 -1
  526. package/editor-web/assets/dist--z0ZHp4T.js +16 -0
  527. package/editor-web/assets/dist-9kuRjUTN.js +41 -0
  528. package/editor-web/assets/dist-B3rd02Cg.js +6 -0
  529. package/editor-web/assets/dist-B5GOGGEe.js +1 -0
  530. package/editor-web/assets/dist-Bx6q9kCu.js +1 -0
  531. package/editor-web/assets/dist-C4hHtrJr.js +1 -0
  532. package/editor-web/assets/dist-CCXJewsi.js +19 -0
  533. package/editor-web/assets/dist-CfK2BLl8.js +4 -0
  534. package/editor-web/assets/dist-Cmux3oJ_.js +1 -0
  535. package/editor-web/assets/dist-Cspf85KV.js +6 -0
  536. package/editor-web/assets/dist-DA72-4WB.js +82 -0
  537. package/editor-web/assets/{dist-DruvDNQe.js → dist-DAhe-kFC.js} +5 -5
  538. package/editor-web/assets/dist-DIJnhQFK.js +9 -0
  539. package/editor-web/assets/dist-DOrGo1GD.js +19 -0
  540. package/editor-web/assets/{dist-Bd8IxQPP.js → dist-DQ6RpEJD.js} +2 -2
  541. package/editor-web/assets/dist-DjiCHlSu.js +35 -0
  542. package/editor-web/assets/dist-Do4a40Wn.js +19 -0
  543. package/editor-web/assets/dist-FKEWS3Co.js +547 -0
  544. package/editor-web/assets/dist-QKd2i6kG.js +5 -0
  545. package/editor-web/assets/dist-SGnOfLhx.js +24 -0
  546. package/editor-web/assets/dist-VmVB7tl4.js +3 -0
  547. package/editor-web/assets/{docx-draw-CoK1oqQD.js → docx-draw-L54blreB.js} +1 -1
  548. package/editor-web/assets/{ebnfDiagram-V4P3TTPT-BaKj-yL6.js → ebnfDiagram-V4P3TTPT-B7-IfVI-.js} +1 -1
  549. package/editor-web/assets/{elk-QONTBCTQ-Cn2qv1_U.js → elk-QONTBCTQ-Gj_WaeBn.js} +1 -1
  550. package/editor-web/assets/{erDiagram-KYQIGQAA-Bd7AEIDo.js → erDiagram-KYQIGQAA-BDF6Qoqx.js} +1 -1
  551. package/editor-web/assets/esm-PQD5Pn8a.js +21 -0
  552. package/editor-web/assets/{eventmodeling-K75KTNOO-Sfp7_461.js → eventmodeling-K75KTNOO-elxVXXEe.js} +1 -1
  553. package/editor-web/assets/{file-question-mark-DlIjUK37.js → file-question-mark-PeZgyqkK.js} +1 -1
  554. package/editor-web/assets/flowDiagram-IUGLLWBU-B-25n8zE.js +1 -0
  555. package/editor-web/assets/{ganttDiagram-R7GPNTJY-CBqcGdHI.js → ganttDiagram-R7GPNTJY-CEogW3jW.js} +1 -1
  556. package/editor-web/assets/{gitGraph-VSP46ZUC-WTokXKTW.js → gitGraph-VSP46ZUC-Bh9cRWFa.js} +1 -1
  557. package/editor-web/assets/{gitGraphDiagram-PDYL7XHY-BIWZHD9q.js → gitGraphDiagram-PDYL7XHY-BQAvdM_V.js} +1 -1
  558. package/editor-web/assets/{group-BdrTp7gi.js → group-DwM2yqU8.js} +1 -1
  559. package/editor-web/assets/hint-CbwoSBMw.js +1 -0
  560. package/editor-web/assets/index-CXisi0Cj.css +2 -0
  561. package/editor-web/assets/index-wMlfx8aT.js +28 -0
  562. package/editor-web/assets/{info-OHQRW6UA-COC6G-_J.js → info-OHQRW6UA-CdPrqere.js} +1 -1
  563. package/editor-web/assets/{infoDiagram-MVDRKAX5-DpaqdKBD.js → infoDiagram-MVDRKAX5-uwIMeP44.js} +1 -1
  564. package/editor-web/assets/{ishikawaDiagram-HPEHV2GE-Dyn2MAy1.js → ishikawaDiagram-HPEHV2GE-rtfvqK7E.js} +1 -1
  565. package/editor-web/assets/iso-UwGLGD3F.js +1 -0
  566. package/editor-web/assets/{italic-zw4_eUNF.js → italic-BV7iHxoP.js} +1 -1
  567. package/editor-web/assets/{journeyDiagram-BOSHW7O7-DeSVfmm7.js → journeyDiagram-BOSHW7O7-mmhfIyVG.js} +1 -1
  568. package/editor-web/assets/{kanban-definition-FNSA4HC5-Bfg0lj7B.js → kanban-definition-FNSA4HC5-Fe7jBsi-.js} +1 -1
  569. package/editor-web/assets/{link-DopSU3aa.js → link-CFOv3nz-.js} +1 -1
  570. package/editor-web/assets/{mermaid-parser.core-CyhovuYE.js → mermaid-parser.core-BxOSjBH9.js} +3 -3
  571. package/editor-web/assets/{mermaid.core-Dx1fBVUG.js → mermaid.core-BOln9YdH.js} +4 -4
  572. package/editor-web/assets/{mindmap-definition-6OY57UG3-QEU2HF_m.js → mindmap-definition-6OY57UG3-M3Q1LOtO.js} +1 -1
  573. package/editor-web/assets/minus-ngE8owxs.js +1 -0
  574. package/editor-web/assets/{packet-JDAUHWVQ-ReJTa_hw.js → packet-JDAUHWVQ-Dbb0TUG6.js} +1 -1
  575. package/editor-web/assets/{pegDiagram-ECIUJNBX-Bo1jFrvb.js → pegDiagram-ECIUJNBX-BZMRpSFC.js} +1 -1
  576. package/editor-web/assets/{pie-XZMESJXO-BrtYafNA.js → pie-XZMESJXO-Ctm9XdKp.js} +1 -1
  577. package/editor-web/assets/{pieDiagram-GNMPY74T-Cj0zQqs_.js → pieDiagram-GNMPY74T-cGbs5ZTl.js} +1 -1
  578. package/editor-web/assets/progress-DZQTiRLv.js +6 -0
  579. package/editor-web/assets/{quadrantDiagram-D57K4MC3-D5npDAVn.js → quadrantDiagram-D57K4MC3-BUe_zsxT.js} +1 -1
  580. package/editor-web/assets/{radar-ABXABTNO-C8RDrRqi.js → radar-ABXABTNO-CCmKtqLs.js} +1 -1
  581. package/editor-web/assets/{railroad-I3PHUGI6-ebDrmYTK.js → railroad-I3PHUGI6-k-yhjhjA.js} +1 -1
  582. package/editor-web/assets/{railroad-abnf-LNEFI6M7-BxKuqg6V.js → railroad-abnf-LNEFI6M7-B-PvntB3.js} +1 -1
  583. package/editor-web/assets/{railroad-ebnf-DWYD2UWJ-DOclnfpr.js → railroad-ebnf-DWYD2UWJ-Ds2rua1h.js} +1 -1
  584. package/editor-web/assets/{railroad-peg-JR7BVNR7-DN0A1fpq.js → railroad-peg-JR7BVNR7-jNZ2wEp2.js} +1 -1
  585. package/editor-web/assets/{railroadDiagram-Y72NRBL7-B3PjoVWw.js → railroadDiagram-Y72NRBL7-CTqSQ15w.js} +1 -1
  586. package/editor-web/assets/react-Byupo4pA.js +1 -0
  587. package/editor-web/assets/replace-CLLMtF4e.js +1 -0
  588. package/editor-web/assets/{requirementDiagram-EQYSW5RA-DLdzkQk5.js → requirementDiagram-EQYSW5RA-CUblhR5M.js} +1 -1
  589. package/editor-web/assets/ribbon-DajdQ_Ya.js +1 -0
  590. package/editor-web/assets/row-Bei9HNEe.js +1 -0
  591. package/editor-web/assets/{sankeyDiagram-SY24JHO5-Dip4Piv_.js → sankeyDiagram-SY24JHO5-nSz6zDX3.js} +1 -1
  592. package/editor-web/assets/schemas-C21MyseF.js +1 -0
  593. package/editor-web/assets/{iso-DoC-ZoBr.js → schemas-DlRAoVtq.js} +1 -1
  594. package/editor-web/assets/{scissors-B_xOiUhd.js → scissors-m6QcoEf2.js} +1 -1
  595. package/editor-web/assets/search-D75Bi2GU.js +1 -0
  596. package/editor-web/assets/{sequenceDiagram-BLEHNHQU-QnPcoybL.js → sequenceDiagram-BLEHNHQU-DxTpOYuo.js} +1 -1
  597. package/editor-web/assets/{session-DMlLCFWg.js → session-BhClkDyr.js} +1 -1
  598. package/editor-web/assets/{sigma-DSUsJhMn.js → sigma-B4AWtnVA.js} +1 -1
  599. package/editor-web/assets/snapshots-DwGHDN3t.js +1 -0
  600. package/editor-web/assets/sound-DkR3qxSt.js +1 -0
  601. package/editor-web/assets/split-DBAbwPZ5.js +3 -0
  602. package/editor-web/assets/{square-arrow-out-up-right-DF5dvsSp.js → square-arrow-out-up-right-1NqFsNDe.js} +1 -1
  603. package/editor-web/assets/{stateDiagram-v2-A6IESKWZ-D103CiMX.js → stateDiagram-v2-A6IESKWZ-C3e14iHY.js} +1 -1
  604. package/editor-web/assets/{sticky-note-BdkIu5_D.js → sticky-note-s4QfzaBB.js} +1 -1
  605. package/editor-web/assets/surface-CIF0Ae0z.js +1 -0
  606. package/editor-web/assets/swatch-BUzr_XmH.js +1 -0
  607. package/editor-web/assets/{swimlanes-B3ENRKFQ-y4gCqEoa.js → swimlanes-B3ENRKFQ-DPPdzNzu.js} +1 -1
  608. package/editor-web/assets/swimlanesDiagram-AYQRV4AK-B8n3zOw_.js +8 -0
  609. package/editor-web/assets/switch-DrZxoPQS.js +1 -0
  610. package/editor-web/assets/{syntax-CU_WPKxt.js → syntax-emXV4DnN.js} +1 -1
  611. package/editor-web/assets/table-BW43XXVd.js +1 -0
  612. package/editor-web/assets/tabs-BwU2E7bU.js +1 -0
  613. package/editor-web/assets/text-wrap-Baus6l-V.js +1 -0
  614. package/editor-web/assets/textarea-BX_ax3X8.js +1 -0
  615. package/editor-web/assets/{timeline-definition-JXYKGLGB-BMp76v4V.js → timeline-definition-JXYKGLGB-DRTJ1_Er.js} +1 -1
  616. package/editor-web/assets/tolerant-DM9s0Mt1.js +1 -0
  617. package/editor-web/assets/{treeView-D4JQ5SDB-Q_GYyk0b.js → treeView-D4JQ5SDB-BYJ_m-i5.js} +1 -1
  618. package/editor-web/assets/{treemap-SAJKECNS-B5lRWdQB.js → treemap-SAJKECNS-BcU6I6Rg.js} +1 -1
  619. package/editor-web/assets/type-CvZ0HZsV.js +41 -0
  620. package/editor-web/assets/{undo-2-C47jrRp5.js → undo-2-DCbMWoug.js} +1 -1
  621. package/editor-web/assets/{usecaseDiagram-WPOLBNNX--QRllA-U.js → usecaseDiagram-WPOLBNNX-YV92pS4o.js} +1 -1
  622. package/editor-web/assets/{vennDiagram-Q3Y3IDCW-CzkATPA3.js → vennDiagram-Q3Y3IDCW-oAvfHZtf.js} +1 -1
  623. package/editor-web/assets/video-SJvDRCJK.js +1 -0
  624. package/editor-web/assets/{wardley-7MLQ67FV-BXzwcdJa.js → wardley-7MLQ67FV-BLNiqxtt.js} +1 -1
  625. package/editor-web/assets/{wardleyDiagram-IVAIDKWA-BQvC8Agx.js → wardleyDiagram-IVAIDKWA-SppgC6xW.js} +1 -1
  626. package/editor-web/assets/{whole-word-D3ZAtnkw.js → whole-word-C9TkGBCY.js} +1 -1
  627. package/editor-web/assets/{words-CaUHhQHf.js → words-BUlNNuH2.js} +3 -3
  628. package/editor-web/assets/words-zMedmPWc.js +3 -0
  629. package/editor-web/assets/workbook-BZKYx4WB.js +41 -0
  630. package/editor-web/assets/{xychartDiagram-4URNHDU4-aY-lsD5o.js → xychartDiagram-4URNHDU4-BHMn_jwJ.js} +1 -1
  631. package/editor-web/assets/{zoom-in-PgsC94hP.js → zoom-in-yAGKspfC.js} +1 -1
  632. package/editor-web/index.html +9 -8
  633. package/package.json +3 -3
  634. package/CHANGELOG.md +0 -251
  635. package/dist/commands/render.js +0 -3
  636. package/dist/node_modules/@allyhub/video-extension/dist/inspect/motion.js +0 -4
  637. package/dist/node_modules/@allyhub/video-measure/dist/still.js +0 -2
  638. package/editor-web/assets/arrow-down-B8VUPCGi.js +0 -1
  639. package/editor-web/assets/arrow-up-Ds4juY8X.js +0 -1
  640. package/editor-web/assets/article-8evPh712.js +0 -3
  641. package/editor-web/assets/article-BhRtWYMd.js +0 -7
  642. package/editor-web/assets/bar-button-J9vbfzTx.js +0 -1
  643. package/editor-web/assets/calc-worker-oEIqrrTM.js +0 -45
  644. package/editor-web/assets/channel-wIj_OqDm.js +0 -1
  645. package/editor-web/assets/chart-amT4lgX3.js +0 -2
  646. package/editor-web/assets/chart-file-dGiRgFcH.js +0 -1
  647. package/editor-web/assets/code-CD-CbJG9.js +0 -1
  648. package/editor-web/assets/collaborator-BU4qU7O3.js +0 -1
  649. package/editor-web/assets/deck-C7fN0Qtn.js +0 -1
  650. package/editor-web/assets/dist-3iovns9K.js +0 -16
  651. package/editor-web/assets/dist-BkHnbOEj.js +0 -4
  652. package/editor-web/assets/dist-BvOrNcK-.js +0 -19
  653. package/editor-web/assets/dist-CEIszq39.js +0 -1
  654. package/editor-web/assets/dist-CU5RbLNH.js +0 -1
  655. package/editor-web/assets/dist-CWZj8IAm.js +0 -1
  656. package/editor-web/assets/dist-C_Mtrnif.js +0 -17
  657. package/editor-web/assets/dist-CdqpwdCV.js +0 -24
  658. package/editor-web/assets/dist-CjT76RAw.js +0 -43
  659. package/editor-web/assets/dist-CpzEn9T8.js +0 -6
  660. package/editor-web/assets/dist-CrFYWl5-.js +0 -3
  661. package/editor-web/assets/dist-D3C6FyrO.js +0 -82
  662. package/editor-web/assets/dist-D4eBFGVL.js +0 -1
  663. package/editor-web/assets/dist-DTcjb3cP.js +0 -18
  664. package/editor-web/assets/dist-D_WSM29I.js +0 -17
  665. package/editor-web/assets/dist-Dp_9ISjP.js +0 -531
  666. package/editor-web/assets/dist-J-tPYKGS.js +0 -5
  667. package/editor-web/assets/dist-YW8hS4IM.js +0 -9
  668. package/editor-web/assets/esm-Cjv8ogpP.js +0 -21
  669. package/editor-web/assets/file-exclamation-point-_L3ElCJ5.js +0 -1
  670. package/editor-web/assets/flowDiagram-IUGLLWBU-BlVUglzw.js +0 -1
  671. package/editor-web/assets/hint-rlht0uxG.js +0 -1
  672. package/editor-web/assets/index-BQWZnyAQ.js +0 -28
  673. package/editor-web/assets/index-Dvh1t1om.css +0 -2
  674. package/editor-web/assets/minus-CbPnUIOy.js +0 -1
  675. package/editor-web/assets/progress-CwKcXARv.js +0 -6
  676. package/editor-web/assets/props-form-BpSXbrSF.js +0 -1
  677. package/editor-web/assets/react-Edyoga_4.js +0 -1
  678. package/editor-web/assets/row-C_svyL8o.js +0 -1
  679. package/editor-web/assets/schemas-CQ_UU8-Z.js +0 -1
  680. package/editor-web/assets/search-Ba2BbT6T.js +0 -1
  681. package/editor-web/assets/slides-7xWhREpt.js +0 -1
  682. package/editor-web/assets/snapshots-BLX4NTQC.js +0 -1
  683. package/editor-web/assets/sound-bTlco_K3.js +0 -1
  684. package/editor-web/assets/split-tFGKk-x8.js +0 -3
  685. package/editor-web/assets/strikethrough-BwXWi4zg.js +0 -1
  686. package/editor-web/assets/surface-DtCjIlrq.js +0 -1
  687. package/editor-web/assets/svg-CWIBMIQ9.js +0 -1
  688. package/editor-web/assets/swatch-DhztHwPU.js +0 -1
  689. package/editor-web/assets/swimlanesDiagram-AYQRV4AK-DKzB_wSf.js +0 -8
  690. package/editor-web/assets/switch-8MU4Nfxe.js +0 -1
  691. package/editor-web/assets/table-DRbddzx0.js +0 -1
  692. package/editor-web/assets/tabs-CuEawka3.js +0 -1
  693. package/editor-web/assets/tag-CIfWT8B_.js +0 -1
  694. package/editor-web/assets/text-align-start-Cic2-TLh.js +0 -1
  695. package/editor-web/assets/textarea-D7TnPwv1.js +0 -1
  696. package/editor-web/assets/video-D0uTbHWx.js +0 -1
  697. package/editor-web/assets/words-XlXG79Ur.js +0 -3
  698. package/editor-web/assets/workbook-CiCXkjmN.js +0 -45
  699. package/editor-web/assets/x-DlhyIKuu.js +0 -41
@@ -1,70 +1,96 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{Document as K,visit as Y}from"yaml";import{pageLookYaml as F}from"./page.js";import{BLOCK_TAG as E,CALLOUT_TAG as I,CARD_TAG as R,STAT_TAG as J,STATS_TAG as B,TAG_TAG as N,CHART_TAG as O,PAGE_BREAK_TAG as Q,COLUMN_TAG as U,COLUMNS_TAG as W,COMPONENT_TAG as V,ITEM_TAG as X,TABLE_TAG as C,TOC_TAG as Z,BIBLIOGRAPHY_TAG as b}from"./parse.js";const A=["link","span","tag","underline","bold","italic","strike","code"];function g(e,n){switch(n){case"link":return e.href;case"tag":return e.styles.tag;case"span":return e.styles.color!==void 0||e.styles.background!==void 0?`${e.styles.color??""}
3
- ${e.styles.background??""}`:void 0;default:return e.styles[n]?"on":void 0}}const i=(e,n)=>n===void 0?"":` ${e}="${n.replace(/&/g,"&amp;").replace(/"/g,"&quot;")}"`,_=e=>e!==void 0&&/[\p{L}\p{N}]/u.test(e);function G(e,n,r=n){let t="";const s=Array.from(e);return s.forEach((a,d)=>{const u=s[d-1],o=s[d+1];switch(a){case"\\":case"*":case"`":case"[":case"]":case"<":case">":case"{":case"}":case"~":t+=`\\${a}`;break;case"_":t+=_(u)&&_(o)?a:`\\${a}`;break;case"&":t+=/^&(#\d+|#x[0-9a-f]+|[a-z][a-z0-9]*);/i.test(s.slice(d,d+34).join(""))?"&amp;":a;break;case"|":t+=n?"\\|":a;break;case"!":t+=o===void 0?"\\!":a;break;case`
4
- `:t+=r?"<br />":`\\
5
- `;break;default:t+=a}}),t}function k(e){const n=Math.max(0,...(e.match(/`+/g)??[]).map(s=>s.length)),r="`".repeat(n+1),t=e.startsWith("`")||e.endsWith("`")||e.startsWith(" ")&&e.endsWith(" ")&&e.trim()!==""?" ":"";return`${r}${t}${e}${t}${r}`}const ee={bold:"**",italic:"*",strike:"~~"},q={underline:"u",bold:"strong",italic:"em",strike:"del",code:"code"};function T(e,n){let r="",t=0,s=!0;for(;t<e.length;){const a=e[t];if(a===void 0)break;if(a.note!==void 0||a.cite!==void 0){r+=a.note===void 0?`[${a.cite??""}]`:`[^${a.note}]`,s=!1,t++;continue}const d=A.find($=>!n.used.has($)&&g(a,$)!==void 0);if(d===void 0){r+=G(a.text,n.inTable,n.oneLine),s=!0,t++;continue}const u=g(a,d);let o=t+1;for(;o<e.length;){const $=e[o];if($===void 0||g($,d)!==u||d==="code"&&A.some(p=>p!=="code"&&!n.used.has(p)&&g($,p)!==void 0))break;o++}const c=e.slice(t,o),f=new Set([...n.used,d]),h=c.map($=>$.text).join(""),j=e[o],D=j===void 0||A.every($=>n.used.has($)||g(j,$)===void 0);if(d==="code")r+=h.includes(`
6
- `)||n.inTable&&h.includes("|")?`<code>${G(h,n.inTable,n.oneLine)}</code>`:k(h);else if(d==="link"){const $=T(c,{...n,used:f}),p=(u??"").replace(/[\s<>\\]/g,L=>encodeURIComponent(L)),x=ne(p)?p:p.replace(/[()]/g,"\\$&");r+=`[${$}](${x})`}else if(d==="tag"){const $=T(c,{...n,used:f});r+=`<${N}${i("color",u)}>${$}</${N}>`}else if(d==="span"){const $=T(c,{...n,used:f}),p=c[0];r+=`<span${i("color",p?.styles.color)}${i("bg",p?.styles.background)}>${$}</span>`}else{const $=T(c,{...n,used:f}),p=ee[d],x=Array.from(h),L=t===0&&o===e.length,P=n.used.has("bold")||n.used.has("italic")||n.used.has("strike"),M=w=>w!==void 0&&A.every(y=>f.has(y)||g(w,y)===void 0),z=d==="bold"&&c.every(w=>w.styles.italic===!0&&A.every(y=>y==="italic"||f.has(y)||g(w,y)===void 0)),H=p!==void 0&&_(x[0])&&_(x.at(-1))&&!h.includes(`
7
- `)&&s&&D&&(!P||L&&d==="italic"&&n.used.has("bold"))&&(M(c[0])&&M(c.at(-1))||z);r+=H?`${p}${$}${p}`:`<${q[d]}>${$}</${q[d]}>`}s=!1,t=o}return r}function ne(e){let n=0;for(const r of e)if(r==="(")n+=1;else if(r===")"&&--n<0)return!1;return n===0}function te(e){if(/^[ \t]/.test(e))return`&#x${e.charCodeAt(0).toString(16)};${e.slice(1)}`;if(/^(import|export)(\s|$)/.test(e))return`&#x${e.charCodeAt(0).toString(16)};${e.slice(1)}`;if(/^(#{1,6}(\s|$)|[-+](\s|$)|[=-]+\s*$|[|:\-\s]*-[|:\-\s]*$)/.test(e))return`\\${e}`;const n=/^(\d{1,9})([.)])(\s|$)/.exec(e);return n?.[1]!==void 0?`${n[1]}\\${e.slice(n[1].length)}`:e}function l(e,n=!1,r=n){const t=e.filter(d=>d.text!==""||d.href!==void 0).map((d,u,o)=>{if(d.note===void 0)return d;const c=o.slice(0,u).findLast(f=>f.note===void 0);return c===void 0?d:{...d,styles:{...c.styles},...c.href===void 0?{}:{href:c.href}}}),s=T(t,{inTable:n,oneLine:r,used:new Set}),a=d=>d.replace(/ +$/,"").replace(/^ +/,u=>"&#x20;".repeat(u.length));return r?a(s):s.split(`
8
- `).map(d=>te(a(d))).join(`
9
- `)}const S=(e,n)=>e.split(`
10
- `).map((r,t)=>t===0||r===""?r:`${n}${r}`).join(`
11
- `),m=e=>e.type==="bullet"||e.type==="numbered"||e.type==="check",re=e=>`${i("align",e?.align)}${i("color",e?.color)}${i("bg",e?.background)}`,ie=e=>e!==void 0&&Object.keys(e).length>0;function v(e){return!("content"in e)||e.type==="callout"?!1:ie(e.look)||e.type==="toggle"||e.type==="heading"&&e.toggle?!0:(e.type==="paragraph"||e.type==="heading")&&(e.children?.length??0)>0}function se(e){const n=Math.max(2,...(e.match(/^\s*`{3,}/gm)??[]).map(r=>r.trim().length));return"`".repeat(n+1)}function de(e,n,r){const t=e.type==="numbered"?`${String(n)}${r} `:e.type==="check"?`- [${e.checked?"x":" "}] `:"- ",s=" ".repeat(e.type==="numbered"?t.length:2),a=e.children??[],d=l(e.content)||(e.type==="check"&&(e.children??[]).length===0?"<br />":"");if(a.length===0)return`${t}${S(d,s)}`.trimEnd();const u=d===""?"<br />":d,[o]=a,c=o!==void 0&&m(o)&&l(o.content)!==""&&!(o.type==="numbered"&&(o.start??1)!==1),f=a.every(m)&&d!==""&&c;return`${t}${S(u,s)}${f?`
2
+ import{Document as ie,isMap as re,visit as se}from"yaml";import{pageLookYaml as de}from"./page.js";import{writeAligns as ae,writeMerges as ue}from"./merges.js";import{writtenAttributes as U}from"./styles.js";import{BLOCK_TAG as P,CALLOUT_TAG as W,CARD_TAG as K,TEXT_BOX_TAG as J,STAT_TAG as oe,STATS_TAG as F,TAG_TAG as H,INSERTED_TAG as N,CELL_TAG as Q,FORMATTED_TAG as O,DELETED_TAG as R,COMMENT_TAG as x,FIELD_TAG as X,CHART_TAG as I,PAGE_BREAK_TAG as fe,SECTION_BREAK_TAG as $e,COLUMN_TAG as Y,COLUMNS_TAG as Z,COMPONENT_TAG as ce,ITEM_TAG as pe,TABLE_TAG as B,TOC_TAG as he,BIBLIOGRAPHY_TAG as ge}from"./parse.js";const S=["comment","inserted","deleted","formatted","link","span","tag","underline","bold","italic","strike","superscript","subscript","code"],me=["style","font","size","caps","smallCaps","letterSpacing"];function le(e){const n=e.styles;return[t("style",n.style),t("font",n.font),t("size",n.size===void 0?void 0:String(n.size)),n.caps===!0?" caps":"",n.smallCaps===!0?" small-caps":"",t("letter-spacing",n.letterSpacing===void 0?void 0:String(n.letterSpacing)),t("color",n.color),t("bg",n.background)].join("")}function w(e,n){switch(n){case"comment":return e.styles.comments===void 0||e.styles.comments.length===0?void 0:e.styles.comments.join(" ");case"inserted":case"deleted":{const i=e.styles[n];return i===void 0?void 0:`${i.author}
3
+ ${i.date??""}`}case"formatted":return e.styles.formatted===void 0?void 0:JSON.stringify(e.styles.formatted);case"link":return e.href;case"tag":return e.styles.tag;case"span":return e.styles.color!==void 0||e.styles.background!==void 0||me.some(i=>e.styles[i]!==void 0)?le(e):void 0;default:return e.styles[n]?"on":void 0}}const t=(e,n)=>n===void 0?"":` ${e}="${n.replace(/&/g,"&amp;").replace(/"/g,"&quot;")}"`,ye=(e,n)=>n.includes('"')&&!n.includes("'")?` ${e}='${n.replace(/&/g,"&amp;")}'`:t(e,n),v=e=>e!==void 0&&/[\p{L}\p{N}]/u.test(e);function _(e,n,i=n){let r="";const s=Array.from(e);return s.forEach((a,d)=>{const p=s[d-1],f=s[d+1];switch(a){case"\\":case"*":case"`":case"[":case"]":case"<":case">":case"{":case"}":case"~":r+=`\\${a}`;break;case"_":r+=v(p)&&v(f)?a:`\\${a}`;break;case"&":r+=/^&(#\d+|#x[0-9a-f]+|[a-z][a-z0-9]*);/i.test(s.slice(d,d+34).join(""))?"&amp;":a;break;case"|":r+=n?"\\|":a;break;case"!":r+=f===void 0?"\\!":a;break;case`
4
+ `:r+=i?"<br />":`\\
5
+ `;break;default:r+=a}}),r}function we(e){const n=Math.max(0,...(e.match(/`+/g)??[]).map(s=>s.length)),i="`".repeat(n+1),r=e.startsWith("`")||e.endsWith("`")||e.startsWith(" ")&&e.endsWith(" ")&&e.trim()!==""?" ":"";return`${i}${r}${e}${r}${i}`}const Ae={bold:"**",italic:"*",strike:"~~"},V={underline:"u",bold:"strong",italic:"em",strike:"del",superscript:"sup",subscript:"sub",code:"code"};function l(e,n){let i="",r=0,s=!0;for(;r<e.length;){const a=e[r];if(a===void 0)break;if(a.note!==void 0||a.cite!==void 0){i+=a.note===void 0?`[${a.cite??""}]`:`[^${a.note}]`,s=!1,r++;continue}const d=S.find(c=>!n.used.has(c)&&w(a,c)!==void 0);if(d===void 0){i+=a.field===void 0?_(a.text,n.inTable,n.oneLine):`<${X}${ye("code",a.field)}${a.text===""?" />":`>${_(a.text,n.inTable,!0)}</${X}>`}`,s=!0,r++;continue}const p=w(a,d);let f=r+1;for(;f<e.length;){const c=e[f];if(c===void 0||w(c,d)!==p||d==="code"&&S.some(h=>h!=="code"&&!n.used.has(h)&&w(c,h)!==void 0))break;f++}const u=e.slice(r,f),$=new Set([...n.used,d]),o=u.map(c=>c.text).join(""),g=e[f],C=g===void 0||S.every(c=>n.used.has(c)||w(g,c)===void 0);if(d==="code")i+=o.includes(`
6
+ `)||n.inTable&&o.includes("|")?`<code>${_(o,n.inTable,n.oneLine)}</code>`:we(o);else if(d==="link"){const c=l(u,{...n,used:$}),h=(p??"").replace(/[\s<>\\]/g,M=>encodeURIComponent(M)),y=Te(h)?h:h.replace(/[()]/g,"\\$&");i+=`[${c}](${y})`}else if(d==="comment"){let c=l(u,{...n,used:$});for(const h of[...(p??"").split(" ")].reverse())c=`<${x}${t("id",h)}>${c}</${x}>`;i+=c}else if(d==="inserted"||d==="deleted"){const c=l(u,{...n,used:$}),h=u[0]?.styles[d],y=d==="inserted"?N:R;i+=`<${y}${t("author",h?.author)}${t("date",h?.date)}${t("move",h?.move)}>${c}</${y}>`}else if(d==="formatted"){const c=l(u,{...n,used:$}),h=u[0]?.styles.formatted;i+=`<${O}${t("author",h?.author)}${t("date",h?.date)} was={${L(h?.was??{})}}>${c}</${O}>`}else if(d==="tag"){const c=l(u,{...n,used:$});i+=`<${H}${t("color",p)}>${c}</${H}>`}else if(d==="span"){const c=l(u,{...n,used:$});i+=`<span${p??""}>${c}</span>`}else{const c=l(u,{...n,used:$}),h=Ae[d],y=Array.from(o),M=r===0&&f===e.length,ee=n.used.has("bold")||n.used.has("italic")||n.used.has("strike"),z=j=>j!==void 0&&S.every(T=>$.has(T)||w(j,T)===void 0),ne=d==="bold"&&u.every(j=>j.styles.italic===!0&&S.every(T=>T==="italic"||$.has(T)||w(j,T)===void 0)),te=h!==void 0&&v(y[0])&&v(y.at(-1))&&!o.includes(`
7
+ `)&&s&&C&&(!ee||M&&d==="italic"&&n.used.has("bold"))&&(z(u[0])&&z(u.at(-1))||ne);i+=te?`${h}${c}${h}`:`<${V[d]}>${c}</${V[d]}>`}s=!1,r=f}return i}function Te(e){let n=0;for(const i of e)if(i==="(")n+=1;else if(i===")"&&--n<0)return!1;return n===0}function je(e){if(/^[ \t]/.test(e))return`&#x${e.charCodeAt(0).toString(16)};${e.slice(1)}`;if(/^(import|export)(\s|$)/.test(e))return`&#x${e.charCodeAt(0).toString(16)};${e.slice(1)}`;if(/^(#{1,6}(\s|$)|[-+](\s|$)|[=-]+\s*$|[|:\-\s]*-[|:\-\s]*$)/.test(e))return`\\${e}`;const n=/^(\d{1,9})([.)])(\s|$)/.exec(e);return n?.[1]!==void 0?`${n[1]}\\${e.slice(n[1].length)}`:e}function m(e,n=!1,i=n){const r=e.filter(d=>d.text!==""||d.href!==void 0||d.field!==void 0).map((d,p,f)=>{if(d.note===void 0)return d;const u=f.slice(0,p).findLast($=>$.note===void 0);return u===void 0?d:{...d,styles:{...u.styles},...u.href===void 0?{}:{href:u.href}}}),s=l(r,{inTable:n,oneLine:i,used:new Set}),a=d=>d.replace(/ +$/,"").replace(/^ +/,p=>"&#x20;".repeat(p.length));return i?a(s):s.split(`
8
+ `).map(d=>je(a(d))).join(`
9
+ `)}const Se=e=>{const n=e.mark;return n===void 0?"":`<${n.kind==="inserted"?N:R}${t("author",n.author)}${t("date",n.date)}${t("move",n.move)} />`},D=(e,n)=>n.mark===void 0?e:`${e}${Se(n)}`,G=(e,n)=>e.split(`
10
+ `).map((i,r)=>r===0||i===""?i:`${n}${i}`).join(`
11
+ `),A=e=>e.type==="bullet"||e.type==="numbered"||e.type==="check";function _e(e){if(e===void 0)return"";const{color:n,background:i,style:r,...s}=e,a=U(s).map(([d,p])=>p===!0?` ${d}`:t(d,p)).join("");return`${t("style",r)}${a}${t("color",n)}${t("bg",i)}`}function Oe(e){const{color:n,background:i,style:r,...s}=e;return{...r===void 0?{}:{style:r},...Object.fromEntries(U(s)),...n===void 0?{}:{color:n},...i===void 0?{}:{bg:i}}}const xe=e=>e!==void 0&&Object.keys(e).length>0;function E(e){return!("content"in e)||e.type==="callout"?!1:xe(e.look)||e.type==="toggle"||e.type==="heading"&&e.toggle?!0:(e.type==="paragraph"||e.type==="heading")&&(e.children?.length??0)>0}function ve(e){const n=Math.max(2,...(e.match(/^\s*`{3,}/gm)??[]).map(i=>i.trim().length));return"`".repeat(n+1)}function Ge(e,n,i){const r=e.type==="numbered"?`${String(n)}${i} `:e.type==="check"?`- [${e.checked?"x":" "}] `:"- ",s=" ".repeat(e.type==="numbered"?r.length:2),a=e.children??[],d=D(m(e.content)||(e.type==="check"&&(e.children??[]).length===0?"<br />":""),e);if(a.length===0)return`${r}${G(d,s)}`.trimEnd();const p=d===""?"<br />":d,[f]=a,u=f!==void 0&&A(f)&&m(f.content)!==""&&!(f.type==="numbered"&&(f.start??1)!==1),$=a.every(A)&&d!==""&&u;return`${r}${G(p,s)}${$?`
12
12
  `:`
13
13
 
14
- `}${s}${S(writeBlocks(a),s)}`}function ae(e){switch(e.type){case"paragraph":{const n=l(e.content);return n===""?"<br />":n}case"heading":return`${"#".repeat(e.level)} ${l(e.content,!1,!0).replace(/(^| )(#+)$/,"$1\\$2")}`.trimEnd();case"toggle":return l(e.content)||"<br />";case"quote":{const n=l(e.content);return(e.children?.length?[n===""?"<br />":n,writeBlocks(e.children)]:[n]).join(`
14
+ `}${s}${G(writeBlocks(a),s)}`}function Ee(e){switch(e.type){case"paragraph":{const n=D(m(e.content),e);return n===""?"<br />":n}case"heading":return`${"#".repeat(e.level)} ${D(m(e.content,!1,!0).replace(/(^| )(#+)$/,"$1\\$2"),e)}`.trimEnd();case"toggle":return m(e.content)||"<br />";case"quote":{const n=m(e.content);return(e.children?.length?[n===""?"<br />":n,writeBlocks(e.children)]:[n]).join(`
15
15
 
16
16
  `).split(`
17
- `).map(t=>t===""?">":`> ${t}`).join(`
18
- `)}case"callout":{const n=l(e.content),r=[n===""?"<br />":n,...e.children?.length?[writeBlocks(e.children)]:[]].join(`
17
+ `).map(r=>r===""?">":`> ${r}`).join(`
18
+ `)}case"callout":{const n=m(e.content),i=[n===""?"<br />":n,...e.children?.length?[writeBlocks(e.children)]:[]].join(`
19
19
 
20
- `);return`<${I}${i("icon",e.icon)}${i("color",e.look?.color)}${i("bg",e.look?.background)}>
20
+ `);return`<${W}${t("icon",e.icon)}${t("tone",e.tone)}${t("color",e.look?.color)}${t("bg",e.look?.background)}>
21
21
 
22
- ${r}
22
+ ${i}
23
23
 
24
- </${I}>`}case"card":{const n=e.children?.length?writeBlocks(e.children):"";return`<${R}${i("title",e.title)}${i("subtitle",e.subtitle)}>
24
+ </${W}>`}case"card":{const n=e.children?.length?writeBlocks(e.children):"";return`<${K}${t("title",e.title)}${t("subtitle",e.subtitle)}${t("icon",e.icon)}${t("tag",e.tag)}${e.featured?" featured":""}>
25
25
 
26
26
  ${n===""?"<br />":n}
27
27
 
28
- </${R}>`}case"stats":return[`<${B}>`,...e.stats.map(n=>`<${J}${i("label",n.label)}${i("value",n.value)}${i("delta",n.delta)}${i("note",n.note)}${n.downIsGood?" down-is-good":""}${i("trend",n.trend?.join(","))} />`),`</${B}>`].join(`
29
- `);case"code":{const n=se(e.code);return`${n}${e.language??""}
28
+ </${K}>`}case"textbox":{const n=e.children?.length?writeBlocks(e.children):"",i=r=>r===void 0?void 0:String(r);return`<${J}${t("float",e.float)}${t("width",i(e.width))}${t("wrap",e.wrap)}${e.wrap===void 0?"":`${t("x",i(e.x))}${t("y",i(e.y))}`}>
29
+
30
+ ${n===""?"<br />":n}
31
+
32
+ </${J}>`}case"block":{const n=i=>Object.entries(i).map(([r,s])=>t(r,s)).join("");return e.items===void 0||e.items.length===0?`<${e.tag}${n(e.props)} />`:[`<${e.tag}${n(e.props)}>`,...e.items.map(i=>`<${i.tag}${n(i.props)} />`),`</${e.tag}>`].join(`
33
+ `)}case"stats":return[`<${F}>`,...e.stats.map(n=>`<${oe}${t("label",n.label)}${t("value",n.value)}${t("delta",n.delta)}${t("note",n.note)}${n.downIsGood?" down-is-good":""}${t("trend",n.trend?.join(","))}${t("status",n.status)}${t("target",n.target)}${t("icon",n.icon)} />`),`</${F}>`].join(`
34
+ `);case"code":{const n=ve(e.code);return`${n}${e.language??""}
30
35
  ${e.code}
31
- ${n}`}case"image":{const n=e.src.replace(/[\s()<>\\]/g,t=>encodeURIComponent(t));if(e.width!==void 0||e.align!==void 0||e.id!==void 0)return`<img${i("src",e.src)}${i("alt",e.alt)}${i("title",e.caption)}${i("width",e.width===void 0?void 0:String(e.width))}${i("align",e.align)}${i("id",e.id)} />`;const r=e.caption===void 0?"":` "${e.caption.replace(/["\\]/g,"\\$&")}"`;return`![${G(e.alt??"",!1)}](${n}${r})`}case"table":{if(e.data!==void 0){const u=e.widths?.some(o=>o!==null)?e.widths.map(o=>o===null?"":String(o)).join(","):void 0;return`<${C}${i("data",e.data)}${i("fields",e.fields?.join(","))}${i("widths",u)}${i("head",e.head)}${i("caption",e.caption)}${i("id",e.id)} />`}const n=Math.max(1,...e.rows.map(u=>u.length)),r=u=>`| ${Array.from({length:n},(o,c)=>l(u[c]??[],!0)).join(" | ")} |`,[t,...s]=e.rows,a=[r(t??[]),`| ${Array.from({length:n},()=>"---").join(" | ")} |`,...s.map(r)].join(`
32
- `),d=e.widths?.some(u=>u!==null)?e.widths.map(u=>u===null?"":String(u)).join(","):void 0;return d===void 0&&e.head===void 0&&e.caption===void 0&&e.id===void 0?a:`<${C}${i("widths",d)}${i("head",e.head)}${i("caption",e.caption)}${i("id",e.id)}>
36
+ ${n}`}case"image":{const n=e.src.replace(/[\s()<>\\]/g,r=>encodeURIComponent(r));if(e.width!==void 0||e.align!==void 0||e.float!==void 0||e.wrap!==void 0||e.id!==void 0){const r=s=>s===void 0?void 0:String(s);return`<img${t("src",e.src)}${t("alt",e.alt)}${t("title",e.caption)}${t("width",r(e.width))}${t("align",e.align)}${t("float",e.float)}${t("wrap",e.wrap)}${e.wrap===void 0?"":`${t("x",r(e.x))}${t("y",r(e.y))}`}${t("id",e.id)} />`}const i=e.caption===void 0?"":` "${e.caption.replace(/["\\]/g,"\\$&")}"`;return`![${_(e.alt??"",!1)}](${n}${i})`}case"table":{if(e.data!==void 0){const o=e.widths?.some(g=>g!==null)?e.widths.map(g=>g===null?"":String(g)).join(","):void 0;return`<${B}${t("data",e.data)}${t("style",e.style)}${t("fields",e.fields?.join(","))}${t("widths",o)}${t("head",e.head)}${t("caption",e.caption)}${t("id",e.id)} />`}const n=Math.max(1,...e.rows.map(o=>o.length)),i=o=>`| ${Array.from({length:n},(g,C)=>m(o[C]??[],!0)).join(" | ")} |`,[r,...s]=e.rows,a=[i(r??[]),`| ${Array.from({length:n},()=>"---").join(" | ")} |`,...s.map(i)].join(`
37
+ `),d=e.widths?.some(o=>o!==null)?e.widths.map(o=>o===null?"":String(o)).join(","):void 0,p=e.merges===void 0||e.merges.length===0?void 0:ue(e.merges),f=e.heights?.some(o=>o!==null)?e.heights.map(o=>o===null?"":String(o)).join(","):void 0,u=e.valign===void 0||e.valign.length===0?void 0:ae(e.valign),$=Object.entries(e.cells??{}).map(([o,g])=>`
38
+
39
+ <${Q}${t("at",o)}>
33
40
 
34
- ${a}
41
+ ${writeBlocks(g)}
35
42
 
36
- </${C}>`}case"divider":return"---";case"component":{const n=t=>t===void 0?void 0:String(t),r=Object.entries(e.props).map(([t,s])=>i(t,s)).join("");return`<${e.item===!0?X:V}${i("of",e.of)}${i("width",n(e.width))}${i("height",n(e.height))}${i("at",n(e.at))}${r}${i("alt",e.alt)}${i("title",e.caption)}${i("align",e.align)}${i("id",e.id)} />`}case"chart":return oe(e);case"pagebreak":return`<${Q}${i("orientation",e.orientation)} />`;case"bibliography":return`<${b} />`;case"toc":return`<${Z}${i("levels",e.levels===void 0?void 0:String(e.levels))}${i("title",e.title)} />`;case"note":{const n=l(e.content)||"<br />",r=e.children?.length?`
43
+ </${Q}>`).join("");return d===void 0&&e.head===void 0&&e.caption===void 0&&e.id===void 0&&e.style===void 0&&p===void 0&&f===void 0&&u===void 0&&$===""?a:`<${B}${t("style",e.style)}${t("widths",d)}${t("heights",f)}${t("head",e.head)}${t("merge",p)}${t("valign",u)}${t("caption",e.caption)}${t("id",e.id)}>
44
+
45
+ ${a}${$}
46
+
47
+ </${B}>`}case"divider":return"---";case"component":{const n=r=>r===void 0?void 0:String(r),i=Object.entries(e.props).map(([r,s])=>t(r,s)).join("");return`<${e.item===!0?pe:ce}${t("of",e.of)}${t("width",n(e.width))}${t("height",n(e.height))}${t("at",n(e.at))}${i}${t("alt",e.alt)}${t("title",e.caption)}${t("align",e.align)}${t("id",e.id)} />`}case"chart":return Le(e);case"pagebreak":return e.continuous===!0?`<${$e}${t("columns",e.columns===void 0?void 0:String(e.columns))} />`:`<${fe}${t("orientation",e.orientation)}${t("columns",e.columns===void 0?void 0:String(e.columns))}${t("margins",e.margins===void 0?void 0:typeof e.margins=="number"?String(e.margins):e.margins.join(" "))}${b("header",e.header)}${b("footer",e.footer)} />`;case"bibliography":return`<${ge} />`;case"toc":return`<${he}${t("levels",e.levels===void 0?void 0:String(e.levels))}${t("title",e.title)} />`;case"note":{const n=m(e.content)||"<br />",i=e.children?.length?`
37
48
 
38
49
  ${writeBlocks(e.children).split(`
39
- `).map(t=>t===""?t:` ${t}`).join(`
40
- `)}`:"";return`[^${e.label}]: ${S(n," ")}${r}`}case"columns":return[`<${W}>`,...e.columns.map(n=>{const r=writeBlocks(n.blocks);return`<${U}${i("width",n.width===void 0?void 0:String(n.width))}>
50
+ `).map(r=>r===""?r:` ${r}`).join(`
51
+ `)}`:"";return`[^${e.label}]: ${G(n," ")}${i}`}case"columns":return[`<${Z}>`,...e.columns.map(n=>{const i=writeBlocks(n.blocks);return`<${Y}${t("width",n.width===void 0?void 0:String(n.width))}>
52
+
53
+ ${i===""?"<br />":i}
41
54
 
42
- ${r===""?"<br />":r}
55
+ </${Y}>`}),`</${Z}>`].join(`
43
56
 
44
- </${U}>`}),`</${W}>`].join(`
57
+ `);case"embed":case"source":return e.source;case"comment":{const n=writeBlocks(e.blocks);return`<${x}${t("id",e.id)}${t("author",e.author)}${t("date",e.date)}${t("reply-to",e.replyTo)}${e.done===!0?" done":""}>
45
58
 
46
- `);case"embed":case"source":return e.source}}function oe(e){const n=f=>f===void 0?void 0:String(f),r=f=>f===void 0?void 0:f.join(","),t=e.labels?.length===1&&e.labels[0]==="value"?" labels":i("labels",r(e.labels)),s=[i("type",e.kind),i("title",e.title),i("data",e.data),i("categories",e.categories),i("series",r(e.series)),i("legend",e.legend),t,i("format",e.format),i("min",n(e.min)),i("max",n(e.max)),i("colors",r(e.colors)),e.smooth?" smooth":"",i("width",n(e.width)),i("height",n(e.height)),i("alt",e.alt),i("id",e.id)].join("");if(e.table===void 0)return`<${O}${s} />`;const a=Math.max(1,...e.table.map(f=>f.length)),d=f=>`| ${Array.from({length:a},(h,j)=>G(f[j]??"",!0)).join(" | ")} |`,[u,...o]=e.table,c=[d(u??[]),`| ${Array.from({length:a},()=>"---").join(" | ")} |`,...o.map(d)].join(`
47
- `);return`<${O}${s}>
59
+ ${n===""?"<br />":n}
60
+
61
+ </${x}>`}}}function Le(e){const n=$=>$===void 0?void 0:String($),i=$=>$===void 0?void 0:$.join(","),r=e.labels?.length===1&&e.labels[0]==="value"?" labels":t("labels",i(e.labels)),s=[t("type",e.kind),t("title",e.title),t("data",e.data),t("categories",e.categories),t("series",i(e.series)),t("legend",e.legend),r,t("format",e.format),t("min",n(e.min)),t("max",n(e.max)),t("colors",i(e.colors)),e.smooth?" smooth":"",t("totals",i(e.totals)),t("quartiles",e.quartiles),t("width",n(e.width)),t("height",n(e.height)),t("alt",e.alt),t("id",e.id)].join("");if(e.table===void 0)return`<${I}${s} />`;const a=Math.max(1,...e.table.map($=>$.length)),d=$=>`| ${Array.from({length:a},(o,g)=>_($[g]??"",!0)).join(" | ")} |`,[p,...f]=e.table,u=[d(p??[]),`| ${Array.from({length:a},()=>"---").join(" | ")} |`,...f.map(d)].join(`
62
+ `);return`<${I}${s}>
48
63
 
49
- ${c}
64
+ ${u}
50
65
 
51
- </${O}>`}export function frontMatterOf(e){const n=F(e);if(Object.keys(n).length===0)return"";const r=new K(n);return Y(r,{Seq:(t,s)=>{s.flow=!0},Map:(t,s,a)=>{a.length>1&&(s.flow=!0)}}),r.toString({lineWidth:0}).trimEnd()}export function withPage(e,n){const r=frontMatterOf(n),t=r===""?"":`---
52
- ${r}
53
- ---`,s=e.frontMatter;if(s===void 0){if(t==="")return e.source;const d=e.source.replace(/^\s+/u,"");return d===""?`${t}
54
- `:`${t}
66
+ </${I}>`}export function frontMatterOf(e){const n=de(e);if(Object.keys(n).length===0)return"";const i=new ie(n);se(i,{Seq:(r,s)=>{s.flow=!0},Map:(r,s,a)=>{a.length>1&&(s.flow=!0)},Scalar:(r,s)=>{typeof s.value=="string"&&s.value.includes(`
67
+ `)&&(s.type="QUOTE_DOUBLE")}});for(const r of["styles","headings"]){const s=i.get(r,!0);re(s)&&(s.flow=!1)}return i.toString({lineWidth:0,doubleQuotedAsJSON:!0}).trimEnd()}export function withPage(e,n){const i=frontMatterOf(n),r=i===""?"":`---
68
+ ${i}
69
+ ---`,s=e.frontMatter;if(s===void 0){if(r==="")return e.source;const d=e.source.replace(/^\s+/u,"");return d===""?`${r}
70
+ `:`${r}
55
71
 
56
- ${d}`}const a=e.source.slice(s.end).replace(/^\s+/u,"");return t===""?a:a===""?`${t}
57
- `:`${t}
72
+ ${d}`}const a=e.source.slice(s.end).replace(/^\s+/u,"");return r===""?a:a===""?`${r}
73
+ `:`${r}
58
74
 
59
- ${a}`}function ue(e){const n=e.type==="toggle"||e.type==="heading"&&e.toggle,{children:r}=e,t={...e};delete t.look,delete t.children;const s=t.type==="toggle"?{type:"paragraph",content:t.content}:t.type==="heading"?{type:"heading",level:t.level,content:t.content}:t,a=m(s)||s.type==="quote",d=writeBlocks(a?[{...s,...r?{children:r}:{}}]:[s,...r??[]]);return`<${E}${re(e.look)}${n?" toggle":""}>
75
+ ${a}`}function Ce(e){const n=e.type==="toggle"||e.type==="heading"&&e.toggle,{children:i}=e,r={...e};delete r.look,delete r.children;const s=r.type==="toggle"?{type:"paragraph",content:r.content}:r.type==="heading"?{type:"heading",level:r.level,content:r.content}:r,a=A(s)||s.type==="quote",d=writeBlocks(a?[{...s,...i?{children:i}:{}}]:[s,...i??[]]);return`<${P}${_e(e.look)}${n?" toggle":""}>
60
76
 
61
77
  ${d}
62
78
 
63
- </${E}>`}export function continuesList(e,n){return m(e)&&m(n)&&!v(e)&&!v(n)&&e.type==="numbered"==(n.type==="numbered")&&!(n.type==="numbered"&&n.start!==void 0)}export function writeBlocks(e){const n=[];let r=0,t;for(;r<e.length;){const s=e[r];if(s===void 0)break;if(v(s)){n.push(ue(s)),t=void 0,r++;continue}if(!m(s)){n.push(r===0&&s.type==="divider"?"***":ae(s)),t=void 0,r++;continue}const a=s.type==="numbered",d=s.type==="numbered"?s.start??1:1,u=a&&t==="."?")":".",o=[];let c=r;for(;c<e.length;){const h=e[c];if(h===void 0||!m(h)||v(h)||h.type==="numbered"!==a||c>r&&!continuesList(s,h))break;o.push(de(h,d+(c-r),u)),c++}const f=o.some(h=>h.includes(`
79
+ </${P}>`}export function continuesList(e,n){return A(e)&&A(n)&&!E(e)&&!E(n)&&e.type==="numbered"==(n.type==="numbered")&&!(n.type==="numbered"&&n.start!==void 0)}function L(e){return e!==null&&typeof e=="object"&&Object.values(e).every(n=>n===void 0)?"{}":e!==null&&typeof e=="object"?`{ ${Object.entries(e).filter(([,n])=>n!==void 0).map(([n,i])=>`${/^[A-Za-z_]\w*$/u.test(n)?n:JSON.stringify(n)}: ${L(i)}`).join(", ")} }`:JSON.stringify(e)}const b=(e,n)=>n===void 0?"":` ${e}={${L(n)}}`;export function writeBlocks(e){if(!e.some(r=>r.revision!==void 0||r.formatted!==void 0))return q(e);const n=[];let i=0;for(;i<e.length;){const r=e[i];if(r===void 0)break;const s=r.formatted;if(s!==void 0){const u={...r};delete u.formatted,n.push(`<${O}${t("author",s.author)}${t("date",s.date)} was={${L(Oe(s.was))}}>
80
+
81
+ ${writeBlocks([u])}
82
+
83
+ </${O}>`),i++;continue}const a=k(r);let d=i+1;for(;d<e.length;){const u=e[d];if(u===void 0||k(u)!==a)break;d++}const p=e.slice(i,d),f=r.revision;if(f===void 0)n.push(q(p));else{const u=f.kind==="inserted"?N:R,$=q(p.map(o=>Object.fromEntries(Object.entries(o).filter(([g])=>g!=="revision"))));n.push(`<${u}${t("author",f.author)}${t("date",f.date)}${t("move",f.move)}>
84
+
85
+ ${$}
86
+
87
+ </${u}>`)}i=d}return n.join(`
88
+
89
+ `)}const k=e=>e.formatted!==void 0?"\0formatted":e.revision===void 0?"":`${e.revision.kind}\0${e.revision.author}\0${e.revision.date??""}`;function q(e){const n=[];let i=0,r;for(;i<e.length;){const s=e[i];if(s===void 0)break;if(E(s)){n.push(Ce(s)),r=void 0,i++;continue}if(!A(s)){n.push(i===0&&s.type==="divider"?"***":Ee(s)),r=void 0,i++;continue}const a=s.type==="numbered",d=s.type==="numbered"?s.start??1:1,p=a&&r==="."?")":".",f=[];let u=i;for(;u<e.length;){const o=e[u];if(o===void 0||!A(o)||E(o)||o.type==="numbered"!==a||u>i&&!continuesList(s,o))break;f.push(Ge(o,d+(u-i),p)),u++}const $=f.some(o=>o.includes(`
64
90
 
65
- `));n.push(o.join(f?`
91
+ `));n.push(f.join($?`
66
92
 
67
93
  `:`
68
- `)),t=a?u:void 0,r=c}return n.join(`
94
+ `)),r=a?p:void 0,i=u}return n.join(`
69
95
 
70
96
  `)}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/doc",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -10,6 +10,10 @@
10
10
  "./docx": {
11
11
  "types": "./dist/docx.d.ts",
12
12
  "default": "./dist/docx.js"
13
+ },
14
+ "./docx-read": {
15
+ "types": "./dist/docx-read.d.ts",
16
+ "default": "./dist/docx-read.js"
13
17
  }
14
18
  },
15
19
  "private": true,
@@ -1,3 +1,3 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{readFile as O}from"node:fs/promises";import{join as C,posix as h}from"node:path";import{problem as l}from"@allyhub/diagnostics";import{parseComponentRef as q,readPropsText as x,stageName as B,splitReference as _}from"@allyhub/build";import{DRAWN_CODE as G,citedKeys as H,docChart as X,everyBlock as E,readSources as Q,mathHtml as V,parseDoc as N,shownBlocks as Y,splitTitle as Z,tableRowsOf as ee,titleText as oe}from"@allyhub/doc";import{USE_FORMS as z,shownPath as te}from"@allyhub/formats";const F=180,ne=/^([a-z][a-z0-9+.-]*:|\/\/)/iu;function se(a){for(const t of a){if(t.type!=="paragraph")continue;const n=t.content.map(f=>f.text).join("").replace(/\s+/gu," ").trim();if(n!=="")return n.length>F?`${n.slice(0,F-1)}…`:n}}function*L(a){let t=0,n=1;for(const f of a.segments){for(;t<f.start;t++)a.source[t]===`
3
- `&&n++;for(const u of f.blocks)for(const s of E([u]))yield{block:s,line:n}}}function T(a){const t=new Map;return(n,f,u)=>{const s=`${n}#${f}`;let o=t.get(s);return o||(o=(async()=>{if(!a)return{};const p=await a.request({type:"component",file:n,name:f});if(u.push(...p.problems),!p.ok)return{not:p.error??`${n} could not be read`};const m=p.value;return m.not===void 0?{props:m.props??{}}:{not:m.not}})(),t.set(s,o)),o}}async function I(a,t,n,f,u){const s=[],o=t.entry,p=N(await O(C(a,o),"utf8"));for(const e of p.problems)s.push(l("AK-M008",`${o}: ${e.message}.`,{where:{file:o,...e.line===void 0?{}:{line:e.line}}}));const m=Z(Y(p.blocks)),j=oe(m.title).trim()||void 0,y=se(m.body),w=new Set,P=[...p.page.cover===void 0?[]:[p.page.cover],...[...E(p.blocks)].flatMap(e=>e.type==="image"?[e.src]:[])];for(const e of P){if(ne.test(e))continue;const i=h.normalize(h.join(t.dir,decodeURIComponent(e)));w.add(i),n.has(i)||s.push(l("AK-M008",`${o} shows the picture ${e}, which is not in the project (${i}).`,{where:{file:o}}))}const S=new Map,D=new Set,K=[];for(const{block:e,line:i}of L(p)){if(e.type!=="component")continue;const c={where:{file:o,line:i}};if(e.item===!0){const{path:A,part:R}=_(e.of);D.has(e.of)||S.set(e.of,{of:e.of,module:h.normalize(h.join(t.dir,A)),name:R??"",item:!0}),D.add(e.of),K.push({of:e.of,from:o,line:i,types:[z.live],role:"item"});continue}const $=q(e.of);if(!$){s.push(l("AK-M008",`${o}: of="${e.of}" names no component: write the module's path from the doc's folder and its export (../../components/ui.ts#Dialog).`,c));continue}const r=h.normalize(h.join(t.dir,$.path));if(!n.has(r)){s.push(l("AK-M008",`${o} shows the component ${e.of}, whose module is not in the project (${r}).`,c));continue}const d=await f(r,$.name,s);if(d.not!==void 0){s.push(l("AK-M008",`${o}: ${d.not}.`,c));continue}if(d.props)for(const A of x({name:$.name,props:d.props},e.props).problems)s.push(l("AK-M008",`${o}: ${A}.`,c));S.set(e.of,{of:e.of,module:r,name:$.name,...d.props?{props:d.props}:{}})}const b={};for(const{block:e,line:i}of L(p)){const c={where:{file:o,line:i}};if(e.type==="code"&&e.language===G.math){const{error:r}=V(e.code);r!==void 0&&s.push(l("AK-M008",`${o}: an equation: ${r}.`,c));continue}if(e.type==="table"&&e.data!==void 0){const r=h.normalize(h.join(t.dir,e.data)),d=u[r];if(d?.value===void 0){s.push(l("AK-M008",d===void 0?`${o}: a table reads ${e.data}, which is not a data file or a sheet's table of the project (${r}).`:`${o}: a table reads ${e.data}, which cannot be read: ${d.error??"it holds nothing"}.`,c));continue}b[e.data]=d.value,d.shown!==void 0&&(b[te(e.data)]=d.shown),n.has(r)&&w.add(r);for(const A of ee(e,{data:R=>b[R]}).problems)s.push(l("AK-M008",`${o}: a table: ${A}.`,c));e.data.includes("#")&&K.push({of:e.data,from:o,line:i,types:[z.data],role:"data"});continue}if(e.type!=="chart")continue;if(e.data!==void 0){const r=h.normalize(h.join(t.dir,e.data)),d=u[r];if(d===void 0){s.push(l("AK-M008",`${o}: a chart reads ${e.data}, which is not a data file or a sheet's table of the project (${r}).`,c));continue}if(d.error!==void 0){s.push(l("AK-M008",`${o}: a chart reads ${e.data}, which cannot be read: ${d.error}.`,c));continue}b[e.data]=d.value,n.has(r)&&w.add(r),e.data.includes("#")&&K.push({of:e.data,from:o,line:i,types:[z.data],role:"data"})}const $=X(e,{base:t.dir,data:r=>b[r]});for(const r of $.problems)s.push(l("AK-M008",`${o}: the chart${e.title===void 0?"":` "${e.title}"`}: ${r}.`,c))}let M,k;const g=p.page.bibliography,v=H(p.blocks);if(g!==void 0){const e=h.normalize(h.join(t.dir,decodeURIComponent(g)));if(k=e,!n.has(e))s.push(l("AK-M008",`${o}: its bibliography ${g} is not in the project (${e}).`,{where:{file:o}}));else{w.add(e);try{const i=JSON.parse(await O(C(a,e),"utf8"));if(!Array.isArray(i))throw new Error("not a list of sources");M=Q(i)}catch(i){s.push(l("AK-M008",`${o}: its bibliography ${g} is not CSL-JSON (a list of sources, each with an id): ${i instanceof Error?i.message:String(i)}.`,{where:{file:o}}))}}}if(v.length>0){const e=new Set((M??[]).map(c=>c.id)),i=v.filter(c=>!e.has(c));g===void 0?s.push(l("AK-M008",`${o} cites ${v.map(c=>`@${c}`).join(", ")}: name its sources' CSL-JSON file in its front matter (bibliography: ./references.json).`,{where:{file:o}})):M!==void 0&&i.length>0&&s.push(l("AK-M008",`${o} cites ${i.map(c=>`@${c}`).join(", ")}, which ${g} does not hold.`,{where:{file:o}}))}const U={dir:t.dir,place:t.id,file:o,...j?{title:j}:{},...y?{glimpse:y}:{},shows:[...w],components:[...S.values()],data:b,...M===void 0?{}:{sources:M}},W=[...[...w].map(e=>({path:e,role:"shows"})),...k===void 0?[]:[{path:k,role:"sources"}]];return{doc:U,problems:s,files:W,uses:K}}export async function readDocs(a,t,n,f,u={}){const s=new Set(n),o=T(f),p=[],m=[];for(const j of t){const y=await I(a,j,s,o,u);p.push(y.doc),m.push(...y.problems)}return{docs:p,problems:m}}const J=new WeakMap,re={async read(a,t){let n=J.get(t.meta);n||(n={known:new Set(t.files),reads:T(t.meta)},J.set(t.meta,n));const{doc:f,problems:u,files:s,uses:o}=await I(t.root,a,n.known,n.reads,t.data);return{doc:f,problems:u,files:s,...o.length>0?{uses:o}:{},...f.components.length>0?{stage:{name:B(f.place),of:f.file,components:f.components}}:{}}},unreadable(a){const t=N(a),n=t.blocks.length===0?t.problems[0]:void 0;return n&&a.trim()!==""?[`not MDX${n.line===void 0?"":` (line ${String(n.line)})`}: ${n.message}`]:[]},render:async(a,t)=>(await import("./export.js")).renderDocFiles(a,t)};export default re;
2
+ import{readFile as C}from"node:fs/promises";import{join as E,posix as u}from"node:path";import{problem as l}from"@allyhub/diagnostics";import{parseComponentRef as x,readPropsText as _,stageName as G,splitReference as H}from"@allyhub/build";import{DRAWN_CODE as X,citedKeys as Q,docChart as V,everyBlock as N,runningPictures as Y,readSources as Z,mathHtml as ee,parseDoc as P,shownBlocks as oe,splitTitle as te,tableRowsOf as ne,titleText as se}from"@allyhub/doc";import{USE_FORMS as v,isBlockReference as ae,shownPath as F}from"@allyhub/formats";import{addressParts as ie}from"@allyhub/blocks";const L=180,re=/^([a-z][a-z0-9+.-]*:|\/\/)/iu;function ce(f){for(const t of f){if(t.type!=="paragraph")continue;const s=t.content.map(p=>p.text).join("").replace(/\s+/gu," ").trim();if(s!=="")return s.length>L?`${s.slice(0,L-1)}…`:s}}function*T(f){let t=0,s=1;for(const p of f.segments){for(;t<p.start;t++)f.source[t]===`
3
+ `&&s++;for(const h of p.blocks)for(const a of N([h]))yield{block:a,line:s}}}function B(f){const t=new Map;return(s,p,h)=>{const a=`${s}#${p}`;let o=t.get(a);return o||(o=(async()=>{if(!f)return{};const d=await f.request({type:"component",file:s,name:p});if(h.push(...d.problems),!d.ok)return{not:d.error??`${s} could not be read`};const m=d.value;return m.not===void 0?{props:m.props??{}}:{not:m.not}})(),t.set(a,o)),o}}async function I(f,t,s,p,h){const a=[],o=t.entry,d=P(await C(E(f,o),"utf8"));for(const e of d.problems)a.push(l("AK-M008",`${o}: ${e.message}.`,{where:{file:o,...e.line===void 0?{}:{line:e.line}}}));const m=te(oe(d.blocks)),K=se(m.title).trim()||void 0,j=ce(m.body),y=new Set,U=[...d.page.cover===void 0?[]:[d.page.cover],...Y(d.page,d.blocks),...[...N(d.blocks)].flatMap(e=>e.type==="image"?[e.src]:[])];for(const e of U){if(re.test(e))continue;const r=u.normalize(u.join(t.dir,decodeURIComponent(e)));y.add(r),s.has(r)||a.push(l("AK-M008",`${o} shows the picture ${e}, which is not in the project (${r}).`,{where:{file:o}}))}const O=new Map,D=new Set,k=[];for(const{block:e,line:r}of T(d)){if(e.type!=="component")continue;const c={where:{file:o,line:r}};if(e.item===!0){const{path:b,part:$}=H(e.of);D.has(e.of)||O.set(e.of,{of:e.of,module:u.normalize(u.join(t.dir,b)),name:$??"",item:!0}),D.add(e.of),k.push({of:e.of,from:o,line:r,types:[v.live],role:"item"});continue}const g=x(e.of);if(!g){a.push(l("AK-M008",`${o}: of="${e.of}" names no component: write the module's path from the doc's folder and its export (../../components/ui.ts#Dialog).`,c));continue}const i=u.normalize(u.join(t.dir,g.path));if(!s.has(i)){a.push(l("AK-M008",`${o} shows the component ${e.of}, whose module is not in the project (${i}).`,c));continue}const n=await p(i,g.name,a);if(n.not!==void 0){a.push(l("AK-M008",`${o}: ${n.not}.`,c));continue}if(n.props)for(const b of _({name:g.name,props:n.props},e.props).problems)a.push(l("AK-M008",`${o}: ${b}.`,c));O.set(e.of,{of:e.of,module:i,name:g.name,...n.props?{props:n.props}:{}})}const w={};for(const{block:e,line:r}of T(d)){const c={where:{file:o,line:r}};if(e.type==="code"&&e.language===X.math){const{error:i}=ee(e.code);i!==void 0&&a.push(l("AK-M008",`${o}: an equation: ${i}.`,c));continue}if(e.type==="block"||e.type==="stats"){const i=e.type==="block"?[...Object.values(e.props),...(e.items??[]).flatMap(n=>Object.values(n.props))]:e.stats.flatMap(n=>[n.value,n.delta,n.target,n.status]);for(const n of i){if(n===void 0||!ae(n)||!/^(?:\.{1,2}\/|\/)/u.test(n))continue;let b=!1;for(const $ of ie(n)){const S=h[u.normalize(u.join(t.dir,$))];S?.value!==void 0&&(w[$]=S.value,S.shown!==void 0&&(w[F($)]=S.shown),b=!0,$.includes("#")&&k.push({of:$,from:o,line:r,types:[v.data],role:"data"}))}b||a.push(l("AK-M008",`${o}: a block reads ${n}, which is not a data file, a sheet's table, defined name or cell of the project.`,c))}continue}if(e.type==="table"&&e.data!==void 0){const i=u.normalize(u.join(t.dir,e.data)),n=h[i];if(n?.value===void 0){a.push(l("AK-M008",n===void 0?`${o}: a table reads ${e.data}, which is not a data file or a sheet's table of the project (${i}).`:`${o}: a table reads ${e.data}, which cannot be read: ${n.error??"it holds nothing"}.`,c));continue}w[e.data]=n.value,n.shown!==void 0&&(w[F(e.data)]=n.shown),s.has(i)&&y.add(i);for(const b of ne(e,{data:$=>w[$]}).problems)a.push(l("AK-M008",`${o}: a table: ${b}.`,c));e.data.includes("#")&&k.push({of:e.data,from:o,line:r,types:[v.data],role:"data"});continue}if(e.type!=="chart")continue;if(e.data!==void 0){const i=u.normalize(u.join(t.dir,e.data)),n=h[i];if(n===void 0){a.push(l("AK-M008",`${o}: a chart reads ${e.data}, which is not a data file or a sheet's table of the project (${i}).`,c));continue}if(n.error!==void 0){a.push(l("AK-M008",`${o}: a chart reads ${e.data}, which cannot be read: ${n.error}.`,c));continue}w[e.data]=n.value,s.has(i)&&y.add(i),e.data.includes("#")&&k.push({of:e.data,from:o,line:r,types:[v.data],role:"data"})}const g=V(e,{base:t.dir,data:i=>w[i]});for(const i of g.problems)a.push(l("AK-M008",`${o}: the chart${e.title===void 0?"":` "${e.title}"`}: ${i}.`,c))}let A,R;const M=d.page.bibliography,z=Q(d.blocks);if(M!==void 0){const e=u.normalize(u.join(t.dir,decodeURIComponent(M)));if(R=e,!s.has(e))a.push(l("AK-M008",`${o}: its bibliography ${M} is not in the project (${e}).`,{where:{file:o}}));else{y.add(e);try{const r=JSON.parse(await C(E(f,e),"utf8"));if(!Array.isArray(r))throw new Error("not a list of sources");A=Z(r)}catch(r){a.push(l("AK-M008",`${o}: its bibliography ${M} is not CSL-JSON (a list of sources, each with an id): ${r instanceof Error?r.message:String(r)}.`,{where:{file:o}}))}}}if(z.length>0){const e=new Set((A??[]).map(c=>c.id)),r=z.filter(c=>!e.has(c));M===void 0?a.push(l("AK-M008",`${o} cites ${z.map(c=>`@${c}`).join(", ")}: name its sources' CSL-JSON file in its front matter (bibliography: ./references.json).`,{where:{file:o}})):A!==void 0&&r.length>0&&a.push(l("AK-M008",`${o} cites ${r.map(c=>`@${c}`).join(", ")}, which ${M} does not hold.`,{where:{file:o}}))}const W={dir:t.dir,place:t.id,file:o,...K?{title:K}:{},...j?{glimpse:j}:{},shows:[...y],components:[...O.values()],data:w,...A===void 0?{}:{sources:A}},q=[...[...y].map(e=>({path:e,role:"shows"})),...R===void 0?[]:[{path:R,role:"sources"}]];return{doc:W,problems:a,files:q,uses:k}}export async function readDocs(f,t,s,p,h={}){const a=new Set(s),o=B(p),d=[],m=[];for(const K of t){const j=await I(f,K,a,o,h);d.push(j.doc),m.push(...j.problems)}return{docs:d,problems:m}}const J=new WeakMap,fe={async read(f,t){let s=J.get(t.meta);s||(s={known:new Set(t.files),reads:B(t.meta)},J.set(t.meta,s));const{doc:p,problems:h,files:a,uses:o}=await I(t.root,f,s.known,s.reads,t.data);return{doc:p,problems:h,files:a,...o.length>0?{uses:o}:{},...p.components.length>0?{stage:{name:G(p.place),of:p.file,components:p.components}}:{}}},unreadable(f){const t=P(f),s=t.blocks.length===0?t.problems[0]:void 0;return s&&f.trim()!==""?[`not MDX${s.line===void 0?"":` (line ${String(s.line)})`}: ${s.message}`]:[]},render:async(f,t)=>(await import("./export.js")).renderDocFiles(f,t)};export default fe;
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{readFile as l,stat as b}from"node:fs/promises";import{join as g,relative as y,resolve as x,sep as D}from"node:path";import{readWork as $}from"@allyhub/build";import{itemIdOf as j,listedWork as v}from"@allyhub/formats";import{CommandError as W,EXIT as B}from"@allyhub/protocol";const C=/\.mdx?$/iu;export async function findDoc(o,c,d){const e=x(c,d),t=y(o,e).split(D).join("/"),s=v((await $(o)).work);if(C.test(e)&&(await b(e).catch(()=>{}))?.isFile())return s.some(a=>a.file===t&&a.kind!=="doc")?void 0:e;const r=new Set([t,d.replace(/^\.\//u,"").replace(/\/+$/u,"")]),p=s.find(a=>a.kind==="doc"&&r.has(j(a.file)));return p===void 0?void 0:g(o,p.file)}export function pagesOf(o){const c=[];for(const d of o.split(",")){const e=/^\s*(\d+)\s*(?:-\s*(\d+)\s*)?$/u.exec(d),t=Number(e?.[1]),s=e?.[2]===void 0?t:Number(e[2]);if(!e||t<1||s<t)throw new W("bad-page",`Cannot read the pages "${o}".`,{exit:B.usage,hint:"Write pages from 1, joined with commas: --page 2, --page 2-4, --page 1,5."});for(let r=t;r<=s;r++)c.push(r)}return c}export async function fromBuild(o,c,d){const e=await l(o,"utf8"),{componentDraws:t,everyBlock:s,parseDoc:r}=await import("@allyhub/doc"),p=n=>n.type==="component"||n.type==="chart"&&n.data!==void 0,a=r(e);return![...s(a.blocks)].some(p)&&a.page.bibliography===void 0?{}:d(async n=>{const i=n.prepared.docs.find(k=>k.place===c);if(!i)return{};const u=n.prepared.messages.locales[0],f=i.components.length===0?[]:t(r(await l(g(n.prepared.root,i.file),"utf8")).blocks),m=u===void 0?{}:{lang:u},h=f.length===0?void 0:await n.componentStills(i,f,m),w=f.length===0?void 0:await n.componentMeasures?.(i,f,m);return{stills:h,measures:w,data:i.data,sources:i.sources}})}
2
+ import{readFile as g,stat as v}from"node:fs/promises";import{join as h,relative as x,resolve as b,sep as j}from"node:path";import{readWork as D}from"@allyhub/build";import{itemIdOf as O,listedWork as $}from"@allyhub/formats";import{CommandError as B,EXIT as M}from"@allyhub/protocol";const W=/\.mdx?$/iu;export async function findDoc(a,c,d){const o=b(c,d),n=x(a,o).split(j).join("/"),r=$((await D(a)).work);if(W.test(o)&&(await v(o).catch(()=>{}))?.isFile())return r.some(i=>i.file===n&&i.kind!=="doc")?void 0:o;const s=new Set([n,d.replace(/^\.\//u,"").replace(/\/+$/u,"")]),p=r.find(i=>i.kind==="doc"&&s.has(O(i.file)));return p===void 0?void 0:h(a,p.file)}export function pagesOf(a){const c=[];for(const d of a.split(",")){const o=/^\s*(\d+)\s*(?:-\s*(\d+)\s*)?$/u.exec(d),n=Number(o?.[1]),r=o?.[2]===void 0?n:Number(o[2]);if(!o||n<1||r<n)throw new B("bad-page",`Cannot read the pages "${a}".`,{exit:M.usage,hint:"Write pages from 1, joined with commas: --page 2, --page 2-4, --page 1,5."});for(let s=n;s<=r;s++)c.push(s)}return c}export async function fromBuild(a,c,d){const o=await g(a,"utf8"),{componentDraws:n,everyBlock:r,parseDoc:s}=await import("@allyhub/doc"),{isBlockReference:p}=await import("@allyhub/formats"),i=e=>e.type==="component"||(e.type==="chart"||e.type==="table")&&e.data!==void 0||e.type==="block"&&[...Object.values(e.props),...(e.items??[]).flatMap(t=>Object.values(t.props))].some(p)||e.type==="stats"&&e.stats.some(t=>[t.value,t.delta,t.target,t.status].some(p)),u=s(o);return![...r(u.blocks)].some(i)&&u.page.bibliography===void 0?{}:d(async e=>{const t=e.prepared.docs.find(y=>y.place===c);if(!t)return{};const l=e.prepared.messages.locales[0],f=t.components.length===0?[]:n(s(await g(h(e.prepared.root,t.file),"utf8")).blocks),m=l===void 0?{}:{lang:l},w=f.length===0?void 0:await e.componentStills(t,f,m),k=f.length===0?void 0:await e.componentMeasures?.(t,f,m);return{stills:w,measures:k,data:t.data,sources:t.sources}})}
@@ -0,0 +1,3 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{existsSync as k}from"node:fs";import{copyFile as T,mkdir as E,readFile as j,stat as F,writeFile as x}from"node:fs/promises";import{basename as I,join as s,posix as y,resolve as v}from"node:path";import{z as n}from"zod";import{ZIP_LIMITS as C,itemIdOf as O}from"@allyhub/formats";import{PROJECT_DIR as W,defineCliCommand as z,listWork as N,projectRoot as D}from"@allyhub/build";import{GATHER_DEFAULT as L,importDocx as R}from"@allyhub/doc/docx-read";import{CommandError as h,EXIT as p}from"@allyhub/protocol";const S=n.string().transform(t=>t.replace(/^\/+/gu,"")).refine(t=>t.endsWith(".mdx")&&!t.split("/").some(r=>r===""||r==="."||r===".."),{message:"an .mdx file from the project's root, such as legal/contract.mdx"}),U=t=>I(t).replace(/\.docx$/iu,"").normalize("NFKC").replace(/[^\p{L}\p{N}]+/gu,"-").replace(/^-+|-+$/gu,"").toLowerCase()||"doc";export const docImport=z({input:n.strictObject({file:n.string().describe("The .docx to make a doc of"),to:S.optional().describe("The doc's file, from the project's root (default <the file's name>/<the file's name>.mdx); its pictures beside it, and the Word file it came from as <name>.original.docx"),gather:n.number().int().min(1).default(L).describe("How many paragraphs must share the same direct formatting for it to become a style of the doc's (Style1, Style2); fewer keep it as their own"),maxUnzipped:n.number().positive().default(C.bytes/1024/1024).describe("The most MB the file may unzip to"),dir:W}),positional:["file"],output:n.looseObject({}),examples:["allyhub doc import ~/Downloads/contract.docx --to legal/contract.mdx","allyhub doc import 报告.docx"],run:async(t,r)=>{const o=await D(r.cwd,t.dir),c=v(r.cwd,t.file),g=await j(c).catch(e=>{throw e instanceof Error&&"code"in e&&e.code==="ENOENT"?new h("not-found",`There is no file ${c}.`,{exit:p.notFound}):e}),u=U(c),a=t.to??`${u}/${u}.mdx`,f=y.dirname(a),w=y.basename(a,".mdx"),l=e=>f==="."?e:`${f}/${e}`;let i;try{i=R(new Uint8Array(g),{name:w,gather:t.gather,taken:e=>k(s(o,l(e)))},{bytes:t.maxUnzipped*1024*1024})}catch(e){throw e instanceof Error?new h("bad-file",`${c} is not a Word document this can read: ${e.message}`,{exit:p.usage}):e}const d=l(`${w}.original.docx`),b=[a,d,...[...i.files.keys()].map(l)];for(const e of b)if(await F(s(o,e)).catch(()=>{}))throw new h("place-taken",`${e} is already there.`,{exit:p.conflict,hint:"--to names another file for the doc."});await E(s(o,f),{recursive:!0}),await x(s(o,a),i.mdx,{flag:"wx"}),await T(c,s(o,d));for(const[e,$]of i.files)await x(s(o,l(e)),$,{flag:"wx"});await N(o,{kind:"doc",file:a},r.kinds(o));const m=O(a);return{value:{id:m,files:b,lost:i.lost},text:[`Made ${a}, its pictures beside it, and kept the Word file as ${d}; listed in allyhub.yaml as ${m}.`,...i.lost.length>0?["Not carried over:",...i.lost.map(e=>` ${e}`)]:[],`allyhub check, then allyhub frames ${m}, to see it; allyhub render ${m} --type docx --param since=${d} writes what changes from here as Word's revisions.`].join(`
3
+ `)}}});
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{docCoverList as o,docCoverSet as c}from"./cover.js";const e={"doc cover list":o,"doc cover set":c};export default e;
2
+ import{docCoverList as o,docCoverSet as t}from"./cover.js";import{docImport as r}from"./import.js";import{docStyles as c}from"./styles.js";const d={"doc cover list":o,"doc cover set":t,"doc import":r,"doc styles":c};export default d;
@@ -0,0 +1,4 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{readFile as y,writeFile as b}from"node:fs/promises";import{relative as g,resolve as x}from"node:path";import{z as s}from"zod";import{ZIP_LIMITS as T}from"@allyhub/formats";import{PROJECT_DIR as $,defineCliCommand as E}from"@allyhub/build";import{parseDoc as j,withPage as v}from"@allyhub/doc";import{templateStyles as I}from"@allyhub/doc/docx-read";import{CommandError as a,EXIT as l}from"@allyhub/protocol";import{findDoc as O}from"./find.js";export const docStyles=E({input:s.strictObject({template:s.string().describe("The Word template (.dotx) or document (.docx) whose styles the doc takes"),doc:s.string().describe("The doc, by its file or its id in allyhub.yaml"),maxUnzipped:s.number().positive().default(T.bytes/1024/1024).describe("The most MB the file may unzip to"),dir:$}),positional:["template","doc"],output:s.looseObject({}),examples:["allyhub doc styles ~/Templates/house.dotx reports/q3","allyhub doc styles 公文模板.dotx notice"],async run(r,d){const m=await d.root(r.dir),i=await O(m,d.cwd,r.doc);if(i===void 0)throw new a("not-found",`${r.doc} is not a doc.`,{exit:l.notFound,hint:"A doc is named by its file or its id in allyhub.yaml."});const n=x(d.cwd,r.template),u=await y(n).catch(t=>{throw t instanceof Error&&"code"in t&&t.code==="ENOENT"?new a("not-found",`There is no file ${n}.`,{exit:l.notFound}):t});let e;try{e=I(new Uint8Array(u),{bytes:r.maxUnzipped*1024*1024})}catch(t){throw t instanceof Error?new a("bad-file",`${n} is not a Word file this can read: ${t.message}`,{exit:l.usage}):t}const f=await y(i,"utf8"),o=j(f),w=o.frontMatter===void 0?0:f.slice(0,o.frontMatter.end).split(`
3
+ `).length,h=o.problems.find(t=>t.line!==void 0&&t.line<=w);if(h!==void 0)throw new a("bad-front-matter",h.message,{exit:l.usage,hint:"allyhub check lists the front matter's problems."});const c=Object.keys(e.styles);await b(i,v(o,{...o.page,styles:{...o.page.styles,...e.styles}}));const p=g(m,i);return{value:{doc:p,styles:c,lost:e.lost},text:[`${p}: ${String(c.length)} styles from ${n} (${c.join(", ")}).`,...e.lost.length>0?["Not carried over:",...e.lost.map(t=>` ${t}`)]:[]].join(`
4
+ `)}}});
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{readFile as x}from"node:fs/promises";import{basename as P,dirname as b,join as m}from"node:path";import{componentDraws as M,parseDoc as w}from"@allyhub/doc";import{PAGE_FACT_DEFAULTS as j,pageFacts as v,printDoc as S,renderDoc as A,renderWord as E}from"@allyhub/doc-print";import{createPackages as T}from"@allyhub/runtimes";export const DOC_TYPES=["pdf","docx","png"];async function W(i){const t=T(),e=()=>i?.("Getting docx, once, to write Word documents…"),[s,a]=await Promise.all([t.load("docx",{onFetch:e}),t.load("docx",{module:"fflate",onFetch:e})]);return{docx:s,zip:a}}export async function renderDocFiles(i,t){const e=t.prepared.docs.find(o=>o.place===i.id);if(!e||t.types.length===0)return[];const{root:s,log:a,types:r}=t;a?.(`Rendering ${e.file}…`);const d=[],p={file:e.file,dir:e.dir,path:e.place,title:e.title,data:e.data,sources:e.sources},f=t.prepared.messages.locales[0],c=e.components.length===0?new Map:await t.session.componentStills(e,M(w(await x(m(t.prepared.root,e.file),"utf8")).blocks),f===void 0?{}:{lang:f});if(r.includes("docx")){const o=t.out("docx");await E({root:s,doc:p,out:o,...await W(a),stills:c}),d.push({type:"docx",files:[o]})}const n=r.filter(o=>o==="pdf"||o==="png"),h=async o=>{const l=w(await x(m(s,e.file),"utf8"));for(const F of pagesLines(e.file,e.place,l,o))a?.(F)};if(n.length===0){if(r.includes("docx")){const o=await S({root:s,doc:p,stills:c});await h(o);for(const l of paperNotes(e.file,o))a?.(l)}return d}const g=t.out("pdf"),$={},D=await A({root:s,doc:p,out:b(g),name:P(g,".pdf"),types:n,stills:c,onPrinted:o=>{$.done=o}}),u=$.done??(r.includes("docx")?await S({root:s,doc:p,stills:c}):void 0);u!==void 0&&await h(u);const y=u===void 0?[]:paperNotes(e.file,u);for(const o of D){const l=o.endsWith(".png")?"png":"pdf";d.push({type:l,files:[m(b(g),o)],...l==="pdf"&&y.length>0?{notes:y}:{}})}return d}export function pagesLines(i,t,e,s){const a=v(e,s.layout,t,{...j,all:!1}),r=n=>`${String(Math.round(n*100))}%`,d=a.flatMap(n=>n.kind==="page-fill"?[n.data]:[]),p=a.flatMap(n=>n.kind==="page-split"?[n.data]:[]),f=s.layout.pages.length,c=[`${i}: ${String(f)} page${f===1?"":"s"} as it prints; left empty at each page's foot: ${d.map(n=>`page ${String(n.page)} ${r(n.share)}`).join(", ")}.`];return p.length>0&&c.push(`${i}: broken over pages: ${p.map(n=>`line ${String(n.line)} ${n.block} (pages ${n.pages.join(", ")})`).join("; ")}.`),c.push(`allyhub inspect pages ${t} has every fact, and a picture of the pages.`),c}export function paperNotes(i,t){const e=[],s=[...t.layout.blocks.values()].filter(a=>a.pastPaper>.1).length;return s>0&&e.push(`${i}: ${String(s)} block${s===1?" runs":"s run"} past the paper's edge, which cuts ${s===1?"it":"them"}.`),t.settled||e.push(`${i}: its contents' page numbers did not hold after ${String(t.passes)} printings; one may be a page off.`),e}
2
+ import{existsSync as T}from"node:fs";import{readFile as x}from"node:fs/promises";import{basename as P,dirname as y,join as h,resolve as W}from"node:path";import{ProjectError as b,projectTheme as v}from"@allyhub/build";import{componentDraws as M,parseDoc as w}from"@allyhub/doc";import{importDocx as O}from"@allyhub/doc/docx-read";import{PAGE_FACT_DEFAULTS as k,pageFacts as C,printDoc as j,renderDoc as N,renderWord as _}from"@allyhub/doc-print";import{createPackages as L}from"@allyhub/runtimes";export const DOC_TYPES=["pdf","docx","png"];async function R(r){const t=L(),e=()=>r?.("Getting docx, once, to write Word documents…"),[n,a,d,c]=await Promise.all([t.load("docx",{onFetch:e}),t.load("docx",{module:"fflate",onFetch:e}),t.load("docx",{module:"docx/shapes",onFetch:e}),t.load("docx",{module:"docx/math",onFetch:e})]);return{docx:n,zip:a,shapes:d,math:c}}export async function renderDocFiles(r,t){const e=t.prepared.docs.find(s=>s.place===r.id);if(!e||t.types.length===0)return[];const{root:n,log:a,types:d}=t;a?.(`Rendering ${e.file}…`);const c=[],p={file:e.file,dir:e.dir,path:e.place,title:e.title,data:e.data,sources:e.sources,theme:v(n)},f=t.prepared.messages.locales[0],i=e.components.length===0?new Map:await t.session.componentStills(e,M(w(await x(h(t.prepared.root,e.file),"utf8")).blocks),f===void 0?{}:{lang:f});if(d.includes("docx")){const s=t.out("docx"),l=P(e.file).replace(/\.mdx?$/iu,""),u=h(y(e.file),`${l}.original.docx`),A=t.params.changes===!0&&t.params.since===void 0;if(A&&!T(W(n,u)))throw new b("missing-baseline",`${e.file} came from no Word file: its changes are shown against the Word file allyhub doc import kept (${u}).`,"usage");const g=await U(n,A?{...t.params,since:u}:t.params,l);g!==void 0&&a?.(`${e.file}: its changes since ${g.file}, as Word's revisions by ${g.author}.`),await _({root:n,doc:p,out:s,...await R(a),stills:i,...g===void 0?{}:{changes:g}}),c.push({type:"docx",files:[s]})}const o=d.filter(s=>s==="pdf"||s==="png"),S=async s=>{const l=w(await x(h(n,e.file),"utf8"));for(const u of pagesLines(e.file,e.place,l,s))a?.(u)};if(o.length===0){if(d.includes("docx")){const s=await j({root:n,doc:p,stills:i});await S(s);for(const l of paperNotes(e.file,s))a?.(l)}return c}const $=t.out("pdf"),D={},F=await N({root:n,doc:p,out:y($),name:P($,".pdf"),types:o,stills:i,onPrinted:s=>{D.done=s}}),m=D.done??(d.includes("docx")?await j({root:n,doc:p,stills:i}):void 0);m!==void 0&&await S(m);const E=m===void 0?[]:paperNotes(e.file,m);for(const s of F){const l=s.endsWith(".png")?"png":"pdf";c.push({type:l,files:[h(y($),s)],...l==="pdf"&&E.length>0?{notes:E}:{}})}return c}export const REDLINE_AUTHOR="AllyHub";async function U(r,t,e){const n=t.since;if(typeof n!="string"||n==="")return;const a=/\.docx$/iu.test(n);if(!a&&!/\.mdx?$/iu.test(n))throw new b("bad-baseline",`Cannot compare with ${n}: a baseline is a doc's .mdx, or the Word file it came from.`,"usage");const d=await x(W(r,n)).catch(i=>{throw i instanceof Error&&"code"in i&&i.code==="ENOENT"?new b("missing-baseline",`Cannot compare with ${n}: there is no such file.`,"usage"):i}),c=t.author,p=t.alike;return{since:a?O(new Uint8Array(d),{name:e}).blocks:w(d.toString("utf8")).blocks,file:n,author:typeof c=="string"&&c!==""?c:REDLINE_AUTHOR,date:new Date().toISOString().replace(/\.\d+Z$/u,"Z"),...typeof p=="number"?{alike:p}:{}}}export function pagesLines(r,t,e,n){const a=C(e,n.layout,t,{...k,all:!1}),d=o=>`${String(Math.round(o*100))}%`,c=a.flatMap(o=>o.kind==="page-fill"?[o.data]:[]),p=a.flatMap(o=>o.kind==="page-split"?[o.data]:[]),f=n.layout.pages.length,i=[`${r}: ${String(f)} page${f===1?"":"s"} as it prints; left empty at each page's foot: ${c.map(o=>`page ${String(o.page)} ${d(o.share)}`).join(", ")}.`];return p.length>0&&i.push(`${r}: broken over pages: ${p.map(o=>`line ${String(o.line)} ${o.block} (pages ${o.pages.join(", ")})`).join("; ")}.`),i.push(`allyhub inspect pages ${t} has every fact, and a picture of the pages.`),i}export function paperNotes(r,t){const e=[],n=[...t.layout.blocks.values()].filter(a=>a.pastPaper>.1).length;return n>0&&e.push(`${r}: ${String(n)} block${n===1?" runs":"s run"} past the paper's edge, which cuts ${n===1?"it":"them"}.`),t.settled||e.push(`${r}: its contents' page numbers did not hold after ${String(t.passes)} printings; one may be a page off.`),e}
@@ -1,3 +1,3 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{readFile as D}from"node:fs/promises";import{join as E,relative as y,sep as S}from"node:path";import{z as o}from"zod";import{PROJECT_DIR as T,allFindings as C,defineView as O}from"@allyhub/build";import{countFacts as _,filterFacts as I}from"@allyhub/diagnostics";import{blockNumbers as G,everyBlock as K,parseDoc as N}from"@allyhub/doc";import{DocPageError as z,PAGE_FACT_DEFAULTS as k,PAGE_FACT_KINDS as p,blockLines as B,docPages as R,pageFacts as J}from"@allyhub/doc-print";import{dirOf as M,itemIdOf as U}from"@allyhub/formats";import{CommandError as f,EXIT as h}from"@allyhub/protocol";import{findDoc as V,fromBuild as W,pagesOf as X}from"./cli/find.js";import{looks as q,picturePath as H,save as Q,workPath as Y}from"./cli/pictures.js";const $=(e,i)=>`${String(e)} ${i}${e===1?"":"s"}`,Z=O({input:o.strictObject({doc:o.string().describe("The doc, by its file or its id in allyhub.yaml"),kind:o.array(o.string()).optional().describe(`Only facts of these kinds: ${p.join(", ")}`),headingLines:o.number().int().min(1).default(k.headingLines).describe("A heading is listed when fewer lines than this follow it on its page"),shortLine:o.number().int().min(0).default(k.shortChars).describe("A paragraph's last line is listed when it holds this many letters or fewer (punctuation not counted)"),all:C("every heading and every paragraph's last line"),page:o.string().optional().describe("Draw only these pages, large: 2, 2-4, 1,5"),out:o.string().optional().describe("Where the picture goes; default .allyhub/work/inspect/<doc>/pages.webp"),dir:T}),positional:["doc"],examples:["allyhub inspect pages launch/plan","allyhub inspect pages launch/plan --kind page-split,page-heading","allyhub inspect pages launch/plan --page 3-4 --all"],async run(e,i){const s=await i.root(e.dir),r=await V(s,i.cwd,e.doc);if(r===void 0)throw new f("not-found",`${e.doc} is not a doc.`,{exit:h.notFound,hint:"Name a doc by its file or its id in allyhub.yaml."});for(const t of e.kind??[])if(!p.includes(t))throw new f("bad-kind",`A doc's pages give no fact of kind ${t}.`,{exit:h.usage,hint:`Kinds: ${p.join(", ")}.`});const c=y(s,r).split(S).join("/"),a=U(c),l=N(await D(r,"utf8")),F=B(l),{stills:j,measures:v,data:u,sources:L}=await W(r,a,t=>i.session(s,t)),g=new Map;for(const[t,P]of G(l.blocks)){const b=F.get(t);b!==void 0&&t.type!=="columns"&&g.set(P,String(b))}const A=e.page===void 0?void 0:X(e.page);let n;try{n=await R({root:s,doc:{file:c,dir:M(c),path:a,...u===void 0?{}:{data:u},sources:L},pages:A,stills:j,format:q(),outlines:g,onFetch:()=>{i.progress("Getting pdf.js, once, to draw a doc's pages…")}})}catch(t){throw t instanceof z?new f("not-found",t.message,{exit:h.notFound,hint:`Pages are 1 to ${String(t.count)}.`}):t}const m=J(l,n.layout,a,{headingLines:e.headingLines,shortChars:e.shortLine,all:e.all},[...K(l.blocks)].some(t=>t.type==="toc")?n.printing:void 0,v),d=I(m,{kinds:i.factKinds(e.kind,s)}),w=await Q(H(i.cwd,e.out,E(Y(s,"inspect",a),"pages.png")),n.picture);return{value:{doc:a,pages:n.count,paper:n.paper,picture:w,facts:d,counts:_(d),total:m.length},text:[`${a}: ${$(n.count,"page")} of ${String(n.paper.width)} × ${String(n.paper.height)} mm. The picture: ${y(i.cwd,w)} (each block outlined and labelled by its line in the doc's file, the space at each page's foot shaded).`,`${$(d.length,"fact")}: measurements for you to judge; sizes are mm on the paper, lines are its file's; --json has every one.`,...i.factLines(d,{all:e.all})].join(`
2
+ import{readFile as D}from"node:fs/promises";import{join as E,relative as y,sep as S}from"node:path";import{z as o}from"zod";import{PROJECT_DIR as T,allFindings as C,defineView as O}from"@allyhub/build";import{countFacts as _,filterFacts as I}from"@allyhub/diagnostics";import{blockNumbers as G,everyBlock as K,parseDoc as N}from"@allyhub/doc";import{DocPageError as z,PAGE_FACT_DEFAULTS as k,PAGE_FACT_KINDS as p,blockLines as B,docPages as R,pageFacts as J}from"@allyhub/doc-print";import{dirOf as M,itemIdOf as U}from"@allyhub/formats";import{CommandError as h,EXIT as f}from"@allyhub/protocol";import{findDoc as V,fromBuild as W,pagesOf as X}from"./cli/find.js";import{looks as q,picturePath as H,save as Q,workPath as Y}from"./cli/pictures.js";const $=(e,t)=>`${String(e)} ${t}${e===1?"":"s"}`,Z=O({input:o.strictObject({doc:o.string().describe("The doc, by its file or its id in allyhub.yaml"),kind:o.array(o.string()).optional().describe(`Only facts of these kinds: ${p.join(", ")}`),headingLines:o.number().int().min(1).default(k.headingLines).describe("A heading is listed when fewer lines than this follow it on its page"),shortLine:o.number().int().min(0).default(k.shortChars).describe("A paragraph's last line is listed when it holds this many letters or fewer (punctuation not counted)"),all:C("every heading and every paragraph's last line"),page:o.string().optional().describe("Draw only these pages, large: 2, 2-4, 1,5"),out:o.string().optional().describe("Where the picture goes; default .allyhub/work/inspect/<doc>/pages.webp"),dir:T}),positional:["doc"],examples:["allyhub inspect pages launch/plan","allyhub inspect pages launch/plan --kind page-split,page-heading","allyhub inspect pages launch/plan --page 3-4 --all"],async run(e,t){const s=await t.root(e.dir),r=await V(s,t.cwd,e.doc);if(r===void 0)throw new h("not-found",`${e.doc} is not a doc.`,{exit:f.notFound,hint:"Name a doc by its file or its id in allyhub.yaml."});for(const i of e.kind??[])if(!p.includes(i))throw new h("bad-kind",`A doc's pages give no fact of kind ${i}.`,{exit:f.usage,hint:`Kinds: ${p.join(", ")}.`});const c=y(s,r).split(S).join("/"),a=U(c),l=N(await D(r,"utf8")),F=B(l),{stills:v,measures:L,data:u,sources:j}=await W(r,a,i=>t.session(s,i)),g=new Map;for(const[i,P]of G(l.blocks)){const b=F.get(i);b!==void 0&&i.type!=="columns"&&g.set(P,String(b))}const A=e.page===void 0?void 0:X(e.page);let n;try{n=await R({root:s,doc:{file:c,dir:M(c),path:a,...u===void 0?{}:{data:u},sources:j},pages:A,stills:v,format:q(),outlines:g,onFetch:()=>{t.progress("Getting pdf.js, once, to draw a doc's pages…")}})}catch(i){throw i instanceof z?new h("not-found",i.message,{exit:f.notFound,hint:`Pages are 1 to ${String(i.count)}.`}):i}const m=J(l,n.layout,a,{headingLines:e.headingLines,shortChars:e.shortLine,all:e.all},[...K(l.blocks)].some(i=>i.type==="toc")?n.printing:void 0,L),d=I(m,{kinds:t.factKinds(e.kind,s)}),w=await Q(H(t.cwd,e.out,E(Y(s,"inspect",a),"pages.png")),n.picture);return{value:{doc:a,pages:n.count,paper:n.paper,picture:w,facts:d,counts:_(d),total:m.length},text:[`${a}: ${$(n.count,"page")} of ${String(n.paper.width)} × ${String(n.paper.height)} mm. The picture: ${y(t.cwd,w)} (each block outlined and labelled by its line in the doc's file, the space at each page's foot shaded).`,`${$(d.length,"fact")}: sizes are mm on the paper, lines are its file's; --json has every one.`,...t.factLines(d,{all:e.all})].join(`
3
3
  `)}}}),x={pages:Z};export default x;
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{readFile as g}from"node:fs/promises";import{join as h}from"node:path";import{defineProjectTool as d}from"@allyhub/build";import{componentDraws as O,parseDoc as y}from"@allyhub/doc";import{pagePictures as R,placesOf as b,printDoc as k}from"@allyhub/doc-print";import{RPC_ERROR as D,RpcError as P}from"@allyhub/protocol";import{DOC_TOOLS as l}from"./tools.js";async function m(c,s){const a=await c.prepared(),t=s.replace(/^\.?\/?/u,""),o=a.docs.find(r=>r.place===t||r.file===t);if(!o)throw new P(D.notFound,`${s} is not a doc.`);return{prepared:a,doc:o,place:o.place}}const S={"doc/data":d(l["doc/data"],async({item:c},s)=>{const{doc:a}=await m(s,c);return{data:a.data,...a.sources===void 0?{}:{sources:a.sources.map(t=>({...t}))}}}),"doc/pages":d(l["doc/pages"],async({item:c,width:s},a)=>{const{prepared:t,doc:o,place:r}=await m(a,c),i=t.messages.locales[0],f=o.components.length===0?new Map:await a.componentStills(o,O(y(await g(h(t.root,o.file),"utf8")).blocks),i===void 0?{}:{lang:i}),n=await k({root:a.root,doc:{file:o.file,dir:o.dir,path:r,data:o.data,sources:o.sources},stills:f}),{pages:p}=n.layout,u=await R(n,p.map(e=>e.n),s??900);return{pages:p.map((e,w)=>({n:e.n,width:e.width,height:e.height,landscape:e.landscape,image:{mime:"image/webp",data:(u[w]??Buffer.alloc(0)).toString("base64")}})),blocks:[...n.layout.blocks.values()].map(e=>({n:e.n,places:b(e)}))}})};export default S;
2
+ import{readFile as h}from"node:fs/promises";import{join as O}from"node:path";import{defineProjectTool as d,projectTheme as l}from"@allyhub/build";import{componentDraws as y,parseDoc as R}from"@allyhub/doc";import{pagePictures as b,placesOf as k,printDoc as D}from"@allyhub/doc-print";import{RPC_ERROR as j,RpcError as P}from"@allyhub/protocol";import{DOC_TOOLS as m}from"./tools.js";async function f(s,r){const e=await s.prepared(),t=r.replace(/^\.?\/?/u,""),o=e.docs.find(c=>c.place===t||c.file===t);if(!o)throw new P(j.notFound,`${r} is not a doc.`);return{prepared:e,doc:o,place:o.place}}const S={"doc/data":d(m["doc/data"],async({item:s},r)=>{const{doc:e}=await f(r,s),t=l(r.root);return{data:e.data,...t===void 0?{}:{theme:t},...e.sources===void 0?{}:{sources:e.sources.map(o=>({...o}))}}}),"doc/pages":d(m["doc/pages"],async({item:s,width:r},e)=>{const{prepared:t,doc:o,place:c}=await f(e,s),i=t.messages.locales[0],u=o.components.length===0?new Map:await e.componentStills(o,y(R(await h(O(t.root,o.file),"utf8")).blocks),i===void 0?{}:{lang:i}),n=await D({root:e.root,doc:{file:o.file,dir:o.dir,path:c,data:o.data,sources:o.sources,theme:l(e.root)},stills:u}),{pages:p}=n.layout,w=await b(n,p.map(a=>a.n),r??900);return{pages:p.map((a,g)=>({n:a.n,width:a.width,height:a.height,landscape:a.landscape,image:{mime:"image/webp",data:(w[g]??Buffer.alloc(0)).toString("base64")}})),blocks:[...n.layout.blocks.values()].map(a=>({n:a.n,places:k(a)}))}})};export default S;
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{z as t}from"zod";import{ImageSchema as r,PathSchema as e,method as a,toolCaller as s}from"@allyhub/protocol";export const DOC_TOOLS={"doc/data":a(t.strictObject({item:e}),t.strictObject({data:t.record(t.string(),t.unknown()),sources:t.array(t.looseObject({id:t.string()})).optional()}),"The numbers a doc's charts read from the project's files (a sheet's table, a CSV, a data file of rows): what its editor draws them with."),"doc/pages":a(t.strictObject({item:e,width:t.int().min(100).max(2400).optional()}),t.strictObject({pages:t.array(t.strictObject({n:t.int().positive(),width:t.number().positive(),height:t.number().positive(),landscape:t.boolean(),image:r})),blocks:t.array(t.strictObject({n:t.int().nonnegative(),places:t.array(t.strictObject({page:t.int().positive(),top:t.number(),bottom:t.number(),left:t.number(),right:t.number()}))}))}),"A doc's pages as render prints them, each a picture, and where each of its blocks lies on them: what its page view shows, measured as `allyhub inspect pages` measures them.")},callDocTool=s(DOC_TOOLS);
2
+ import{z as t}from"zod";import{ImageSchema as o,PathSchema as e,method as a,toolCaller as r}from"@allyhub/protocol";export const DOC_TOOLS={"doc/data":a(t.strictObject({item:e}),t.strictObject({data:t.record(t.string(),t.unknown()),sources:t.array(t.looseObject({id:t.string()})).optional(),theme:t.unknown().optional()}),"The numbers a doc's charts read from the project's files (a sheet's table, a CSV, a data file of rows), and the project's theme: what its editor draws them with."),"doc/pages":a(t.strictObject({item:e,width:t.int().min(100).max(2400).optional()}),t.strictObject({pages:t.array(t.strictObject({n:t.int().positive(),width:t.number().positive(),height:t.number().positive(),landscape:t.boolean(),image:o})),blocks:t.array(t.strictObject({n:t.int().nonnegative(),places:t.array(t.strictObject({page:t.int().positive(),top:t.number(),bottom:t.number(),left:t.number(),right:t.number()}))}))}),"A doc's pages as render prints them, each a picture, and where each of its blocks lies on them: what its page view shows, measured as `allyhub inspect pages` measures them.")},callDocTool=r(DOC_TOOLS);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/doc-extension",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./cli": {
@@ -68,7 +68,15 @@
68
68
  "docx",
69
69
  "png"
70
70
  ],
71
- "extras": []
71
+ "extras": [],
72
+ "options": [
73
+ {
74
+ "name": "changes",
75
+ "only": [
76
+ "docx"
77
+ ]
78
+ }
79
+ ]
72
80
  },
73
81
  "renders": {
74
82
  "types": [
@@ -168,6 +176,18 @@
168
176
  "summary": "Sets one of AllyHub's covers on a doc, as the editor's gallery does: its SVG written beside the doc's file (cover-<name>.svg) and named in the front matter's cover; the rest of the file keeps its bytes",
169
177
  "work": "docs",
170
178
  "module": "./dist/cli/index.js"
179
+ },
180
+ {
181
+ "name": "doc import",
182
+ "summary": "Makes a doc of a Word file: its words as MDX, its look as the doc's named styles, its pictures beside it, its revisions as the doc's, the Word file kept beside it as the baseline its changes are shown against; listed in allyhub.yaml; says what the doc does not hold",
183
+ "work": "docs",
184
+ "module": "./dist/cli/index.js"
185
+ },
186
+ {
187
+ "name": "doc styles",
188
+ "summary": "Gives a doc a Word template's styles, as Word's Automatically update document styles takes an attached template's: each style the .dotx (or .docx) defines written into the doc's front matter over the doc's own of that name, the doc's others kept",
189
+ "work": "docs",
190
+ "module": "./dist/cli/index.js"
171
191
  }
172
192
  ],
173
193
  "projectTools": [
@@ -1,7 +1,7 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{readFile as l}from"node:fs/promises";import{createRequire as y}from"node:module";import{dirname as p,join as m}from"node:path";import{openPage as u}from"@allyhub/browser";import{diagramConfig as v}from"@allyhub/doc";import{createPackages as x}from"@allyhub/runtimes";const h=y(import.meta.url);let f;export function katexCss(){return f??=(async()=>{const e=h.resolve("katex/dist/katex.min.css"),a=await l(e,"utf8"),n=[...a.matchAll(/src:url\((fonts\/[^)]+\.woff2)\) format\("woff2"\)[^;}]*/gu)];let r=a;for(const[i,t]of n){if(t===void 0)continue;const o=await l(m(p(e),t));r=r.replace(i,`src:url(data:font/woff2;base64,${o.toString("base64")}) format("woff2")`)}return r})(),f}let c;const b=()=>(c??=(async()=>{let e;try{e=h.resolve("mermaid/dist/mermaid.min.js")}catch{const{dir:a}=await x().ensure("mermaid");e=m(a,"node_modules","mermaid","dist","mermaid.min.js")}return l(e,"utf8")})(),c.catch(()=>{c=void 0}),c);export async function drawDiagrams(e,a,n){const r=v(n),i=new Map,t=[...new Set(a)];if(t.length===0)return i;const o=await u(e,{width:900,height:1200,allow:()=>!1});try{await w(o,`<!doctype html><html><head><meta charset="utf-8"></head><body><script>${(await b()).replace(/<\/script/giu,"<\\/script")}<\/script></body></html>`);const s=await o.evaluate(`(async () => {
3
- const codes = ${JSON.stringify(t)};
4
- window.mermaid.initialize(${JSON.stringify(r)});
2
+ import{readFile as h}from"node:fs/promises";import{createRequire as y}from"node:module";import{dirname as p,join as f}from"node:path";import{openPage as u,startBrowser as v}from"@allyhub/browser";import{diagramConfig as b}from"@allyhub/doc";import{createPackages as x}from"@allyhub/runtimes";const w=y(import.meta.url);let g;export function katexCss(){return g??=(async()=>{const i=w.resolve("katex/dist/katex.min.css"),s=await h(i,"utf8"),n=[...s.matchAll(/src:url\((fonts\/[^)]+\.woff2)\) format\("woff2"\)[^;}]*/gu)];let a=s;for(const[r,e]of n){if(e===void 0)continue;const t=await h(f(p(i),e));a=a.replace(r,`src:url(data:font/woff2;base64,${t.toString("base64")}) format("woff2")`)}return a})(),g}let d;const S=()=>(d??=(async()=>{let i;try{i=w.resolve("mermaid/dist/mermaid.min.js")}catch{const{dir:s}=await x().ensure("mermaid");i=f(s,"node_modules","mermaid","dist","mermaid.min.js")}return h(i,"utf8")})(),d.catch(()=>{d=void 0}),d);export async function drawDiagrams(i,s,n){const a=b(n),r=new Map,e=[...new Set(s)];if(e.length===0)return r;const t=await u(i,{width:900,height:1200,allow:()=>!1});try{await m(t,`<!doctype html><html><head><meta charset="utf-8"></head><body><script>${(await S()).replace(/<\/script/giu,"<\\/script")}<\/script></body></html>`);const o=await t.evaluate(`(async () => {
3
+ const codes = ${JSON.stringify(e)};
4
+ window.mermaid.initialize(${JSON.stringify(a)});
5
5
  const out = [];
6
6
  for (let i = 0; i < codes.length; i++) {
7
7
  try {
@@ -24,4 +24,4 @@ import{readFile as l}from"node:fs/promises";import{createRequire as y}from"node:
24
24
  }
25
25
  }
26
26
  return out;
27
- })()`);t.forEach((d,g)=>{i.set(d,s[g]??{error:"Mermaid drew nothing"})})}finally{await o.close()}return i}async function w(e,a){const{frameTree:n}=await e.session.send("Page.getFrameTree");await e.session.send("Page.setDocumentContent",{frameId:n.frame.id,html:a}),await e.evaluate("new Promise((r) => (document.readyState === 'complete' ? r(true) : addEventListener('load', () => r(true), { once: true })))")}const S=2;export async function mathPictures(e,a){const n=new Map,r=[...new Set(a)];if(r.length===0)return n;const i=await u(e,{width:900,height:1200,scale:S,allow:()=>!1});try{await w(i,`<!doctype html><html><head><meta charset="utf-8"><style>${await katexCss()} body{margin:0;background:#fff} .eq{display:inline-block;padding:2px 4px} .katex-display{margin:0}</style></head><body>${r.map((t,o)=>`<div><div class="eq" id="eq${String(o)}">${t}</div></div>`).join("")}</body></html>`),await i.evaluate("document.fonts.ready.then(() => true)");for(let t=0;t<r.length;t++){const o=r[t];if(o===void 0)continue;const s=await i.evaluate(`(() => { const r = document.getElementById("eq${String(t)}")?.getBoundingClientRect(); return r ? { x: r.x, y: r.y + scrollY, width: r.width, height: r.height } : null; })()`);if(!s||s.width===0||s.height===0)continue;const d=await i.session.send("Page.captureScreenshot",{format:"png",clip:{...s,scale:1},captureBeyondViewport:!0});n.set(o,{data:Buffer.from(d.data,"base64"),width:Math.ceil(s.width),height:Math.ceil(s.height)})}}finally{await i.close()}return n}
27
+ })()`);e.forEach((c,l)=>{r.set(c,o[l]??{error:"Mermaid drew nothing"})})}finally{await t.close()}return r}async function m(i,s){const{frameTree:n}=await i.session.send("Page.getFrameTree");await i.session.send("Page.setDocumentContent",{frameId:n.frame.id,html:s}),await i.evaluate("new Promise((r) => (document.readyState === 'complete' ? r(true) : addEventListener('load', () => r(true), { once: true })))")}const M=2;export async function mathPictures(i,s){const n=new Map,a=[...new Set(s)];if(a.length===0)return n;const r=await u(i,{width:900,height:1200,scale:M,allow:()=>!1});try{await m(r,`<!doctype html><html><head><meta charset="utf-8"><style>${await katexCss()} body{margin:0;background:#fff} .eq{display:inline-block;padding:2px 4px} .katex-display{margin:0}</style></head><body>${a.map((e,t)=>`<div><div class="eq" id="eq${String(t)}">${e}</div></div>`).join("")}</body></html>`),await r.evaluate("document.fonts.ready.then(() => true)");for(let e=0;e<a.length;e++){const t=a[e];if(t===void 0)continue;const o=await r.evaluate(`(() => { const r = document.getElementById("eq${String(e)}")?.getBoundingClientRect(); return r ? { x: r.x, y: r.y + scrollY, width: r.width, height: r.height } : null; })()`);if(!o||o.width===0||o.height===0)continue;const c=await r.session.send("Page.captureScreenshot",{format:"png",clip:{...o,scale:1},captureBeyondViewport:!0});n.set(t,{data:Buffer.from(c.data,"base64"),width:Math.ceil(o.width),height:Math.ceil(o.height)})}}finally{await r.close()}return n}export async function svgPictures(i,s=2){const n=new Map,a=[...new Set(i)];if(a.length===0)return n;const r=await v({gpu:!1,htmlInCanvas:!1});try{const e=await u(r,{width:1600,height:1200,scale:s,allow:()=>!1});await m(e,`<!doctype html><html><head><meta charset="utf-8"><style>body{margin:0;background:#fff} .d{display:inline-block;line-height:0}</style></head><body>${a.map((t,o)=>`<div><div class="d" id="d${String(o)}">${t}</div></div>`).join("")}</body></html>`),await e.evaluate("document.fonts.ready.then(() => true)");for(let t=0;t<a.length;t++){const o=a[t];if(o===void 0)continue;const c=await e.evaluate(`(() => { const r = document.getElementById("d${String(t)}")?.getBoundingClientRect(); return r ? { x: r.x, y: r.y + scrollY, width: r.width, height: r.height } : null; })()`);if(!c||c.width===0||c.height===0)continue;const l=await e.session.send("Page.captureScreenshot",{format:"png",clip:{...c,scale:1},captureBeyondViewport:!0});n.set(o,{data:Buffer.from(l.data,"base64"),width:Math.ceil(c.width),height:Math.ceil(c.height)})}}finally{await r.close()}return n}
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- export{docPage,PICTURE_DPI,printPage,printPdf,renderDoc,renderWord}from"./print.js";export{docFontsCss,SHEET_FONT,sheetFontsCss}from"./fonts.js";export{docPages,DocPageError,pagePictures,placesOf}from"./pages.js";export{printDoc,writeDocPdf}from"./layout.js";export{PdfJoiner}from"./pdf.js";export{PAGE_FACT_DEFAULTS,PAGE_FACT_KINDS,blockLines,pageFacts}from"./facts.js";
2
+ export{docPage,PICTURE_DPI,printPage,printPdf,renderDoc,renderWord}from"./print.js";export{docFontsCss,SHEET_FONT,sheetFontsCss}from"./fonts.js";export{docPages,DocPageError,pagePictures,placesOf}from"./pages.js";export{printDoc,writeDocPdf}from"./layout.js";export{PdfJoiner}from"./pdf.js";export{PAGE_FACT_DEFAULTS,PAGE_FACT_KINDS,blockLines,pageFacts}from"./facts.js";export{svgPictures}from"./drawn.js";