allyhub 0.15.2 → 0.17.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 (467) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/commands/add.js +1 -1
  3. package/dist/commands/cloud-tools.js +1 -1
  4. package/dist/commands/dev.js +6 -2
  5. package/dist/commands/doctor.js +3 -3
  6. package/dist/commands/frames/doc.js +1 -1
  7. package/dist/commands/inspect/common.js +3 -3
  8. package/dist/commands/inspect/facts.js +2 -2
  9. package/dist/commands/inspect/index.js +1 -1
  10. package/dist/commands/inspect/layout.js +1 -1
  11. package/dist/commands/inspect/uses.js +3 -0
  12. package/dist/commands/mail.js +6 -6
  13. package/dist/commands/render.js +1 -1
  14. package/dist/main.js +8 -8
  15. package/dist/node_modules/@allyhub/3d-extension/dist/cli/scenery-text.js +2 -2
  16. package/dist/node_modules/@allyhub/3d-extension/package.json +1 -1
  17. package/dist/node_modules/@allyhub/audio/dist/index.js +1 -1
  18. package/dist/node_modules/@allyhub/audio/dist/place.js +2 -0
  19. package/dist/node_modules/@allyhub/audio/package.json +1 -1
  20. package/dist/node_modules/@allyhub/browser/package.json +1 -1
  21. package/dist/node_modules/@allyhub/build/dist/content.d.ts +7 -0
  22. package/dist/node_modules/@allyhub/build/dist/file-check.d.ts +2 -2
  23. package/dist/node_modules/@allyhub/build/dist/imports.d.ts +17 -0
  24. package/dist/node_modules/@allyhub/build/dist/imports.js +2 -0
  25. package/dist/node_modules/@allyhub/build/dist/index.d.ts +3 -2
  26. package/dist/node_modules/@allyhub/build/dist/index.js +1 -1
  27. package/dist/node_modules/@allyhub/build/dist/inspect-view.d.ts +1 -1
  28. package/dist/node_modules/@allyhub/build/dist/inspect-view.js +1 -1
  29. package/dist/node_modules/@allyhub/build/dist/kind-build.d.ts +19 -3
  30. package/dist/node_modules/@allyhub/build/dist/prepare.js +3 -3
  31. package/dist/node_modules/@allyhub/build/dist/uses.d.ts +27 -6
  32. package/dist/node_modules/@allyhub/build/dist/uses.js +1 -1
  33. package/dist/node_modules/@allyhub/build/dist/work.d.ts +9 -1
  34. package/dist/node_modules/@allyhub/build/dist/work.js +3 -3
  35. package/dist/node_modules/@allyhub/build/package.json +1 -1
  36. package/dist/node_modules/@allyhub/canvas-extension/package.json +1 -1
  37. package/dist/node_modules/@allyhub/canvas-extension/skills/allyhub/references/canvas.md +2 -2
  38. package/dist/node_modules/@allyhub/canvas-model/package.json +1 -1
  39. package/dist/node_modules/@allyhub/chart/package.json +1 -1
  40. package/dist/node_modules/@allyhub/check/package.json +1 -1
  41. package/dist/node_modules/@allyhub/cloud/dist/blobs.js +1 -1
  42. package/dist/node_modules/@allyhub/cloud/dist/client.d.ts +12 -3
  43. package/dist/node_modules/@allyhub/cloud/dist/client.js +1 -1
  44. package/dist/node_modules/@allyhub/cloud/dist/index.d.ts +1 -1
  45. package/dist/node_modules/@allyhub/cloud/dist/index.js +1 -1
  46. package/dist/node_modules/@allyhub/cloud/package.json +1 -1
  47. package/dist/node_modules/@allyhub/components/package.json +1 -1
  48. package/dist/node_modules/@allyhub/dev-server/dist/deletion.js +2 -0
  49. package/dist/node_modules/@allyhub/dev-server/dist/index.js +1 -1
  50. package/dist/node_modules/@allyhub/dev-server/dist/inputs.js +1 -1
  51. package/dist/node_modules/@allyhub/dev-server/dist/live.js +1 -1
  52. package/dist/node_modules/@allyhub/dev-server/dist/project.js +1 -1
  53. package/dist/node_modules/@allyhub/dev-server/dist/record.js +1 -1
  54. package/dist/node_modules/@allyhub/dev-server/dist/writer.js +3 -2
  55. package/dist/node_modules/@allyhub/dev-server/package.json +1 -1
  56. package/dist/node_modules/@allyhub/diagnostics/package.json +1 -1
  57. package/dist/node_modules/@allyhub/doc/dist/docx.js +4 -4
  58. package/dist/node_modules/@allyhub/doc/dist/html.js +40 -40
  59. package/dist/node_modules/@allyhub/doc/dist/index.js +1 -1
  60. package/dist/node_modules/@allyhub/doc/dist/markdown.js +1 -1
  61. package/dist/node_modules/@allyhub/doc/dist/parse.js +4 -4
  62. package/dist/node_modules/@allyhub/doc/dist/table.js +1 -1
  63. package/dist/node_modules/@allyhub/doc/dist/write.js +26 -26
  64. package/dist/node_modules/@allyhub/doc/package.json +1 -1
  65. package/dist/node_modules/@allyhub/doc-extension/dist/build.js +2 -2
  66. package/dist/node_modules/@allyhub/doc-extension/dist/inspect.js +1 -1
  67. package/dist/node_modules/@allyhub/doc-extension/package.json +1 -1
  68. package/dist/node_modules/@allyhub/doc-print/package.json +1 -1
  69. package/dist/node_modules/@allyhub/export/dist/export.js +1 -1
  70. package/dist/node_modules/@allyhub/export/package.json +1 -1
  71. package/dist/node_modules/@allyhub/extension-api/package.json +1 -1
  72. package/dist/node_modules/@allyhub/extension-host/dist/points.js +1 -1
  73. package/dist/node_modules/@allyhub/extension-host/package.json +1 -1
  74. package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +15 -3
  75. package/dist/node_modules/@allyhub/formats/dist/data/slides.js +1 -1
  76. package/dist/node_modules/@allyhub/formats/dist/data/website.js +1 -1
  77. package/dist/node_modules/@allyhub/formats/dist/items.d.ts +70 -11
  78. package/dist/node_modules/@allyhub/formats/dist/items.js +1 -1
  79. package/dist/node_modules/@allyhub/formats/dist/layout.d.ts +15 -4
  80. package/dist/node_modules/@allyhub/formats/dist/layout.js +1 -1
  81. package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +4 -0
  82. package/dist/node_modules/@allyhub/formats/package.json +1 -1
  83. package/dist/node_modules/@allyhub/i18n/dist/index.js +1 -1
  84. package/dist/node_modules/@allyhub/i18n/package.json +1 -1
  85. package/dist/node_modules/@allyhub/image-draw/dist/stage.js +1 -1
  86. package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
  87. package/dist/node_modules/@allyhub/image-extension/dist/tools.js +1 -1
  88. package/dist/node_modules/@allyhub/image-extension/dist/workspace.js +1 -1
  89. package/dist/node_modules/@allyhub/image-extension/package.json +2 -2
  90. package/dist/node_modules/@allyhub/image-extension/skills/allyhub/references/images.md +3 -3
  91. package/dist/node_modules/@allyhub/image-measure/package.json +1 -1
  92. package/dist/node_modules/@allyhub/image-psd/package.json +1 -1
  93. package/dist/node_modules/@allyhub/image-render/package.json +1 -1
  94. package/dist/node_modules/@allyhub/image-runtime/dist/load.js +2 -2
  95. package/dist/node_modules/@allyhub/image-runtime/package.json +1 -1
  96. package/dist/node_modules/@allyhub/image-sdk/package.json +1 -1
  97. package/dist/node_modules/@allyhub/jobs/package.json +1 -1
  98. package/dist/node_modules/@allyhub/linkedin-extension/package.json +3 -1
  99. package/dist/node_modules/@allyhub/linkedin-extension/skills/allyhub/references/linkedin.md +1 -1
  100. package/dist/node_modules/@allyhub/linkedin-model/package.json +1 -1
  101. package/dist/node_modules/@allyhub/linkedin-view/package.json +1 -1
  102. package/dist/node_modules/@allyhub/measure/package.json +1 -1
  103. package/dist/node_modules/@allyhub/media/package.json +1 -1
  104. package/dist/node_modules/@allyhub/media-extension/package.json +1 -1
  105. package/dist/node_modules/@allyhub/model/package.json +1 -1
  106. package/dist/node_modules/@allyhub/office-extension/LICENSE +241 -0
  107. package/dist/node_modules/@allyhub/office-extension/markup/csv/allyhub.yaml +2 -0
  108. package/dist/node_modules/@allyhub/office-extension/markup/csv/data/leads.csv +5 -0
  109. package/dist/node_modules/@allyhub/office-extension/markup/csv/markup.json +19 -0
  110. package/dist/node_modules/@allyhub/office-extension/markup/document/allyhub.yaml +2 -0
  111. package/dist/node_modules/@allyhub/office-extension/markup/document/briefs/launch.docx +0 -0
  112. package/dist/node_modules/@allyhub/office-extension/markup/document/markup.json +11 -0
  113. package/dist/node_modules/@allyhub/office-extension/markup/presentation/allyhub.yaml +2 -0
  114. package/dist/node_modules/@allyhub/office-extension/markup/presentation/decks/pitch.pptx +0 -0
  115. package/dist/node_modules/@allyhub/office-extension/markup/presentation/markup.json +11 -0
  116. package/dist/node_modules/@allyhub/office-extension/markup/workbook/allyhub.yaml +2 -0
  117. package/dist/node_modules/@allyhub/office-extension/markup/workbook/data/plans.xlsx +0 -0
  118. package/dist/node_modules/@allyhub/office-extension/markup/workbook/markup.json +10 -0
  119. package/dist/node_modules/@allyhub/office-extension/package.json +124 -0
  120. package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
  121. package/dist/node_modules/@allyhub/piece/dist/layer.d.ts +15 -0
  122. package/dist/node_modules/@allyhub/piece/dist/page/index.d.ts +1 -0
  123. package/dist/node_modules/@allyhub/piece/dist/page/index.js +1 -1
  124. package/dist/node_modules/@allyhub/piece/dist/page/runtimes.d.ts +9 -0
  125. package/dist/node_modules/@allyhub/piece/dist/page/runtimes.js +2 -0
  126. package/dist/node_modules/@allyhub/piece/dist/source.d.ts +53 -10
  127. package/dist/node_modules/@allyhub/piece/dist/source.js +1 -1
  128. package/dist/node_modules/@allyhub/piece/package.json +1 -1
  129. package/dist/node_modules/@allyhub/project/dist/digest.js +1 -1
  130. package/dist/node_modules/@allyhub/project/dist/part-keys.js +1 -1
  131. package/dist/node_modules/@allyhub/project/package.json +1 -1
  132. package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +10 -11
  133. package/dist/node_modules/@allyhub/protocol/dist/account.js +1 -1
  134. package/dist/node_modules/@allyhub/protocol/dist/auth.d.ts +7 -0
  135. package/dist/node_modules/@allyhub/protocol/dist/auth.js +1 -1
  136. package/dist/node_modules/@allyhub/protocol/dist/blobs.d.ts +9 -0
  137. package/dist/node_modules/@allyhub/protocol/dist/blobs.js +1 -1
  138. package/dist/node_modules/@allyhub/protocol/dist/cli.d.ts +2 -0
  139. package/dist/node_modules/@allyhub/protocol/dist/cli.js +1 -1
  140. package/dist/node_modules/@allyhub/protocol/dist/cloud-computer.d.ts +77 -0
  141. package/dist/node_modules/@allyhub/protocol/dist/cloud-computer.js +2 -0
  142. package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +39 -9
  143. package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
  144. package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +15 -15
  145. package/dist/node_modules/@allyhub/protocol/dist/events.d.ts +441 -5
  146. package/dist/node_modules/@allyhub/protocol/dist/events.js +1 -1
  147. package/dist/node_modules/@allyhub/protocol/dist/files.d.ts +2 -2
  148. package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +4 -1
  149. package/dist/node_modules/@allyhub/protocol/dist/frame.js +1 -1
  150. package/dist/node_modules/@allyhub/protocol/dist/index.d.ts +8 -0
  151. package/dist/node_modules/@allyhub/protocol/dist/index.js +1 -1
  152. package/dist/node_modules/@allyhub/protocol/dist/jobs.d.ts +5 -5
  153. package/dist/node_modules/@allyhub/protocol/dist/kinds.d.ts +45 -0
  154. package/dist/node_modules/@allyhub/protocol/dist/kinds.js +1 -1
  155. package/dist/node_modules/@allyhub/protocol/dist/paywall.d.ts +134 -0
  156. package/dist/node_modules/@allyhub/protocol/dist/paywall.js +2 -0
  157. package/dist/node_modules/@allyhub/protocol/dist/place.js +1 -1
  158. package/dist/node_modules/@allyhub/protocol/dist/presence.d.ts +3 -3
  159. package/dist/node_modules/@allyhub/protocol/dist/purposes.d.ts +47 -0
  160. package/dist/node_modules/@allyhub/protocol/dist/purposes.js +2 -0
  161. package/dist/node_modules/@allyhub/protocol/dist/routes.js +1 -1
  162. package/dist/node_modules/@allyhub/protocol/dist/shares.d.ts +52 -5
  163. package/dist/node_modules/@allyhub/protocol/dist/shares.js +1 -1
  164. package/dist/node_modules/@allyhub/protocol/dist/sidebar-deletion.d.ts +34 -0
  165. package/dist/node_modules/@allyhub/protocol/dist/sidebar-deletion.js +2 -0
  166. package/dist/node_modules/@allyhub/protocol/dist/sites.d.ts +1 -0
  167. package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +21 -52
  168. package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +1 -1
  169. package/dist/node_modules/@allyhub/protocol/dist/studio-server.d.ts +264 -0
  170. package/dist/node_modules/@allyhub/protocol/dist/studio-server.js +2 -0
  171. package/dist/node_modules/@allyhub/protocol/dist/studio-tool-calls.d.ts +18 -0
  172. package/dist/node_modules/@allyhub/protocol/dist/studio-tool-calls.js +2 -0
  173. package/dist/node_modules/@allyhub/protocol/dist/studio-window-requests.d.ts +97 -0
  174. package/dist/node_modules/@allyhub/protocol/dist/studio-window-requests.js +2 -0
  175. package/dist/node_modules/@allyhub/protocol/dist/teams.d.ts +3 -2
  176. package/dist/node_modules/@allyhub/protocol/dist/teams.js +1 -1
  177. package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +26 -20
  178. package/dist/node_modules/@allyhub/protocol/dist/tools.js +1 -1
  179. package/dist/node_modules/@allyhub/protocol/dist/turns.d.ts +71 -0
  180. package/dist/node_modules/@allyhub/protocol/dist/turns.js +2 -0
  181. package/dist/node_modules/@allyhub/protocol/package.json +1 -1
  182. package/dist/node_modules/@allyhub/registry/package.json +1 -1
  183. package/dist/node_modules/@allyhub/render/package.json +1 -1
  184. package/dist/node_modules/@allyhub/runtime/dist/compose.js +1 -1
  185. package/dist/node_modules/@allyhub/runtime/dist/embed.js +1 -1
  186. package/dist/node_modules/@allyhub/runtime/dist/film.js +1 -1
  187. package/dist/node_modules/@allyhub/runtime/dist/piece.js +2 -2
  188. package/dist/node_modules/@allyhub/runtime/dist/player/player.js +1 -1
  189. package/dist/node_modules/@allyhub/runtime/package.json +1 -1
  190. package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
  191. package/dist/node_modules/@allyhub/scaffold/dist/index.js +4 -4
  192. package/dist/node_modules/@allyhub/scaffold/package.json +1 -1
  193. package/dist/node_modules/@allyhub/scenery/package.json +1 -1
  194. package/dist/node_modules/@allyhub/scenery-host/package.json +1 -1
  195. package/dist/node_modules/@allyhub/sheet/dist/calc/coerce.js +1 -1
  196. package/dist/node_modules/@allyhub/sheet/dist/calc/engine.js +1 -1
  197. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/criteria.js +1 -1
  198. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/date.js +1 -1
  199. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/dynamic.js +1 -1
  200. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/info.js +1 -1
  201. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/logical.js +1 -1
  202. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/lookup.js +1 -1
  203. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/text.js +1 -1
  204. package/dist/node_modules/@allyhub/sheet/dist/formula/parse.js +1 -1
  205. package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.js +1 -1
  206. package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.js +1 -1
  207. package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.js +2 -2
  208. package/dist/node_modules/@allyhub/sheet/dist/xlsx/write.js +1 -1
  209. package/dist/node_modules/@allyhub/sheet/package.json +1 -1
  210. package/dist/node_modules/@allyhub/sheet-extension/dist/build.js +1 -1
  211. package/dist/node_modules/@allyhub/sheet-extension/dist/cli/sheet.js +1 -1
  212. package/dist/node_modules/@allyhub/sheet-extension/package.json +3 -3
  213. package/dist/node_modules/@allyhub/slides-core/dist/animation.js +1 -1
  214. package/dist/node_modules/@allyhub/slides-core/dist/api.js +1 -1
  215. package/dist/node_modules/@allyhub/slides-core/dist/components.js +1 -1
  216. package/dist/node_modules/@allyhub/slides-core/dist/resolve.js +1 -1
  217. package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
  218. package/dist/node_modules/@allyhub/slides-extension/dist/build.js +2 -1
  219. package/dist/node_modules/@allyhub/slides-extension/dist/cli/slides.js +2 -2
  220. package/dist/node_modules/@allyhub/slides-extension/dist/deck-pptx.js +1 -1
  221. package/dist/node_modules/@allyhub/slides-extension/dist/evaluate.js +2 -2
  222. package/dist/node_modules/@allyhub/slides-extension/dist/export.js +1 -1
  223. package/dist/node_modules/@allyhub/slides-extension/package.json +2 -2
  224. package/dist/node_modules/@allyhub/slides-pptx/dist/audio-icon.js +1 -1
  225. package/dist/node_modules/@allyhub/slides-pptx/dist/write.js +2 -2
  226. package/dist/node_modules/@allyhub/slides-pptx/package.json +5 -1
  227. package/dist/node_modules/@allyhub/slides-runtime/dist/component.js +1 -1
  228. package/dist/node_modules/@allyhub/slides-runtime/dist/draw.js +2 -2
  229. package/dist/node_modules/@allyhub/slides-runtime/dist/item.js +2 -0
  230. package/dist/node_modules/@allyhub/slides-runtime/dist/load.js +5 -5
  231. package/dist/node_modules/@allyhub/slides-runtime/dist/slide-css.js +20 -0
  232. package/dist/node_modules/@allyhub/slides-runtime/package.json +1 -1
  233. package/dist/node_modules/@allyhub/stage/package.json +1 -1
  234. package/dist/node_modules/@allyhub/stage-page/dist/install.js +1 -1
  235. package/dist/node_modules/@allyhub/stage-page/dist/runtime/stage.html +1 -1
  236. package/dist/node_modules/@allyhub/stage-page/dist/runtime/stage.js +2 -2
  237. package/dist/node_modules/@allyhub/stage-page/package.json +1 -1
  238. package/dist/node_modules/@allyhub/stage-runtime/dist/runtime.js +20 -20
  239. package/dist/node_modules/@allyhub/stage-runtime/package.json +1 -1
  240. package/dist/node_modules/@allyhub/telemetry/dist/doc.js +17 -2
  241. package/dist/node_modules/@allyhub/telemetry/dist/level.js +2 -2
  242. package/dist/node_modules/@allyhub/telemetry/dist/levels.js +2 -0
  243. package/dist/node_modules/@allyhub/telemetry/dist/scrub.js +1 -1
  244. package/dist/node_modules/@allyhub/telemetry/package.json +5 -1
  245. package/dist/node_modules/@allyhub/text-extension/markup/markup.json +1 -1
  246. package/dist/node_modules/@allyhub/text-extension/markup-file/allyhub.yaml +2 -0
  247. package/dist/node_modules/@allyhub/text-extension/markup-file/archive/assets.zip +0 -0
  248. package/dist/node_modules/@allyhub/text-extension/markup-file/markup.json +10 -0
  249. package/dist/node_modules/@allyhub/text-extension/package.json +35 -1
  250. package/dist/node_modules/@allyhub/video-core/package.json +1 -1
  251. package/dist/node_modules/@allyhub/video-extension/dist/build.js +1 -1
  252. package/dist/node_modules/@allyhub/video-extension/dist/cli/reference-text.js +3 -3
  253. package/dist/node_modules/@allyhub/video-extension/package.json +2 -2
  254. package/dist/node_modules/@allyhub/video-measure/package.json +1 -1
  255. package/dist/node_modules/@allyhub/video-sdk/package.json +1 -1
  256. package/dist/node_modules/@allyhub/website/package.json +1 -1
  257. package/dist/node_modules/@allyhub/website-extension/package.json +1 -1
  258. package/dist/node_modules/@allyhub/x-extension/package.json +3 -1
  259. package/dist/node_modules/@allyhub/x-extension/skills/allyhub/references/x.md +1 -1
  260. package/dist/node_modules/@allyhub/x-model/package.json +1 -1
  261. package/dist/node_modules/@allyhub/x-view/package.json +1 -1
  262. package/dist/package.json +13 -12
  263. package/dist/project.js +1 -1
  264. package/dist/telemetry.js +3 -3
  265. package/dist/text/console-text.js +2 -2
  266. package/dist/works.js +1 -1
  267. package/editor-web/assets/{abnfDiagram-WEYOIA3C-9z0ZEYUq.js → abnfDiagram-WEYOIA3C-CHNpVSPv.js} +1 -1
  268. package/editor-web/assets/{architecture-WOLXFQ4H-ELMO_PA6.js → architecture-WOLXFQ4H-gPsJqQwV.js} +1 -1
  269. package/editor-web/assets/{architectureDiagram-ZHVYKT53-C0yuCWU3.js → architectureDiagram-ZHVYKT53-CEIDcC6r.js} +1 -1
  270. package/editor-web/assets/arrow-down-B8VUPCGi.js +1 -0
  271. package/editor-web/assets/arrow-up-Ds4juY8X.js +1 -0
  272. package/editor-web/assets/article-BHTjq0_Y.js +3 -0
  273. package/editor-web/assets/article-DfELjJ2o.js +7 -0
  274. package/editor-web/assets/{audio-lines-1s1eRs4Q.js → audio-lines-PZj77e7t.js} +1 -1
  275. package/editor-web/assets/bar-button-J9vbfzTx.js +1 -0
  276. package/editor-web/assets/{blockDiagram-RJAE7QA3-vi6JOg4o.js → blockDiagram-RJAE7QA3-CUzEGVet.js} +4 -4
  277. package/editor-web/assets/browser-C1XuTMlp.js +1 -0
  278. package/editor-web/assets/{c4Diagram-XDPPPE54-Agf_H8uS.js → c4Diagram-XDPPPE54-CB94NR9s.js} +1 -1
  279. package/editor-web/assets/calc-worker-BdHh5LXM.js +45 -0
  280. package/editor-web/assets/channel-DCDCx5Es.js +1 -0
  281. package/editor-web/assets/chart-amT4lgX3.js +2 -0
  282. package/editor-web/assets/chart-file-CfbWK9l1.js +1 -0
  283. package/editor-web/assets/{chart-no-axes-column-CJmeYOSo.js → chart-no-axes-column-Be0lFcGF.js} +1 -1
  284. package/editor-web/assets/{chunk-2E7WHVMD-XalaZaha.js → chunk-2E7WHVMD-DFYo_Boi.js} +1 -1
  285. package/editor-web/assets/{chunk-4EMNKR2T-DUlRZkCS.js → chunk-4EMNKR2T-CLLjmweX.js} +1 -1
  286. package/editor-web/assets/{chunk-55XCU76K-DTa7whGr.js → chunk-55XCU76K-CkwQ_3m1.js} +1 -1
  287. package/editor-web/assets/{chunk-7S6XSTFO-85zCPzj0.js → chunk-7S6XSTFO-V-AvHpAB.js} +1 -1
  288. package/editor-web/assets/{chunk-AQDTSKZB-CWBseIyh.js → chunk-AQDTSKZB-PjHyYpb8.js} +1 -1
  289. package/editor-web/assets/chunk-DSNLSHJZ-QaczBS3J.js +127 -0
  290. package/editor-web/assets/{chunk-HAGFOTED-DFWda2Rk.js → chunk-HAGFOTED-aLaQB5Xu.js} +1 -1
  291. package/editor-web/assets/{chunk-HNE4Q36P-aXibFitC.js → chunk-HNE4Q36P-De3ftDQR.js} +1 -1
  292. package/editor-web/assets/{chunk-NQOKRVIF-CtJUuFdN.js → chunk-NQOKRVIF-CrhVQyvP.js} +17 -17
  293. package/editor-web/assets/{chunk-UHW7PFBP-B6QKSKWE.js → chunk-UHW7PFBP-BFmZ5ZLn.js} +1 -1
  294. package/editor-web/assets/{chunk-VQ5W62QI-CF6Al55P.js → chunk-VQ5W62QI-CzppUHLA.js} +1 -1
  295. package/editor-web/assets/{chunk-WQQL4CDK-w2TKLkyw.js → chunk-WQQL4CDK-BrAU7V6v.js} +1 -1
  296. package/editor-web/assets/{chunk-YZO67HFG-DVGOATM3.js → chunk-YZO67HFG-BSiF71qj.js} +1 -1
  297. package/editor-web/assets/{chunk-ZAUX2LTX-Cq7MMjDP.js → chunk-ZAUX2LTX-BJc4r5b1.js} +1 -1
  298. package/editor-web/assets/{chunk-ZCHMQSOR-GMW_lBh4.js → chunk-ZCHMQSOR-CkGTuehB.js} +1 -1
  299. package/editor-web/assets/{classDiagram-v2-4MYWR3UA-C7AK5Bkj.js → classDiagram-v2-4MYWR3UA-Byxc7J88.js} +7 -7
  300. package/editor-web/assets/code-CD-CbJG9.js +1 -0
  301. package/editor-web/assets/collaborator-BU4qU7O3.js +1 -0
  302. package/editor-web/assets/{copy-DvOiv9Ra.js → copy-CuJSs0nI.js} +1 -1
  303. package/editor-web/assets/{createLucideIcon-REX213UO.js → createLucideIcon-lm_6n8YT.js} +1 -1
  304. package/editor-web/assets/csv-Bwre9FdI.js +11 -0
  305. package/editor-web/assets/{cynefin-EF2NZ3EQ-ZnDieQsN.js → cynefin-EF2NZ3EQ-BSxkVbdf.js} +1 -1
  306. package/editor-web/assets/{cynefinDiagram-WF24UDRP-BrukKIBF.js → cynefinDiagram-WF24UDRP-IkCgARNs.js} +1 -1
  307. package/editor-web/assets/{dagre-NK4GIZVX-DfO0S2p_.js → dagre-NK4GIZVX-9PgeH6nY.js} +1 -1
  308. package/editor-web/assets/deck-tTzKONci.js +1 -0
  309. package/editor-web/assets/{diagram-CBK3MWTC-D43RLesi.js → diagram-CBK3MWTC-DRzeg3Ds.js} +1 -1
  310. package/editor-web/assets/{diagram-I5XIIV2D-bA1B1QQG.js → diagram-I5XIIV2D-B_zeKMN6.js} +1 -1
  311. package/editor-web/assets/{diagram-ODIL2UCW-DAdXBD2K.js → diagram-ODIL2UCW-FFm0O8SN.js} +1 -1
  312. package/editor-web/assets/{diagram-PFBEJUXE-C_KyEaws.js → diagram-PFBEJUXE-DrtCT8OA.js} +1 -1
  313. package/editor-web/assets/{diagram-RJA3I4VV-oXTtENF7.js → diagram-RJA3I4VV-DtxJ3V0q.js} +1 -1
  314. package/editor-web/assets/{diagram-TYUNFSNR-Czupe6mO.js → diagram-TYUNFSNR-DmxF_8H_.js} +16 -16
  315. package/editor-web/assets/dist-BEpzsYn_.js +6 -0
  316. package/editor-web/assets/dist-BUD4ywMB.js +18 -0
  317. package/editor-web/assets/{dist-BrGYx10E.js → dist-Bd8IxQPP.js} +1 -1
  318. package/editor-web/assets/dist-C21CkR7Z.js +531 -0
  319. package/editor-web/assets/dist-C56mWAec.js +5 -0
  320. package/editor-web/assets/dist-CAb3W9_P.js +43 -0
  321. package/editor-web/assets/dist-CEknsRDd.js +24 -0
  322. package/editor-web/assets/dist-CbZAznNW.js +19 -0
  323. package/editor-web/assets/{dist-2lNSE-G_.js → dist-D3C6FyrO.js} +1 -1
  324. package/editor-web/assets/dist-DDzjbKIg.js +4 -0
  325. package/editor-web/assets/dist-DaEbElXI.js +3 -0
  326. package/editor-web/assets/dist-Dr3o4vee.js +1 -0
  327. package/editor-web/assets/{dist-BtRMClDw.js → dist-DruvDNQe.js} +1 -1
  328. package/editor-web/assets/dist-JLyDtl9X.js +1 -0
  329. package/editor-web/assets/dist-PBbWAsrV.js +17 -0
  330. package/editor-web/assets/dist-ZZlQa66J.js +1 -0
  331. package/editor-web/assets/dist-bQKpw3Zz.js +16 -0
  332. package/editor-web/assets/dist-d4dayaWE.js +17 -0
  333. package/editor-web/assets/docx-draw-9Q_fArBC.js +4 -0
  334. package/editor-web/assets/docx-preview-pcg9ioe3.js +21 -0
  335. package/editor-web/assets/{ebnfDiagram-V4P3TTPT-BOhNZmtp.js → ebnfDiagram-V4P3TTPT-DSX1Aoty.js} +1 -1
  336. package/editor-web/assets/{elk-QONTBCTQ-DoZH3OoE.js → elk-QONTBCTQ-C7gy9q56.js} +1 -1
  337. package/editor-web/assets/{erDiagram-KYQIGQAA-Bv0KDJi4.js → erDiagram-KYQIGQAA-CKx_HoY4.js} +2 -2
  338. package/editor-web/assets/esm-BZb5QMQf.js +21 -0
  339. package/editor-web/assets/{eventmodeling-K75KTNOO-C-_xzqfj.js → eventmodeling-K75KTNOO-DL4HvSrd.js} +1 -1
  340. package/editor-web/assets/{file-exclamation-point-C_fX4fpI.js → file-exclamation-point-_L3ElCJ5.js} +1 -1
  341. package/editor-web/assets/file-question-mark-DlIjUK37.js +1 -0
  342. package/editor-web/assets/flowDiagram-IUGLLWBU-BUnRtJ8q.js +1 -0
  343. package/editor-web/assets/{ganttDiagram-R7GPNTJY-CAuJlaZX.js → ganttDiagram-R7GPNTJY-N-AP4slN.js} +1 -1
  344. package/editor-web/assets/{gitGraph-VSP46ZUC-Dx2xLi5C.js → gitGraph-VSP46ZUC-BKRGJKWm.js} +1 -1
  345. package/editor-web/assets/{gitGraphDiagram-PDYL7XHY-DHsk_UOT.js → gitGraphDiagram-PDYL7XHY-ClwL7w2_.js} +1 -1
  346. package/editor-web/assets/{group-pebHQTdP.js → group-BdrTp7gi.js} +1 -1
  347. package/editor-web/assets/hint-rlht0uxG.js +1 -0
  348. package/editor-web/assets/index-BedbINE5.css +2 -0
  349. package/editor-web/assets/index-DG2nHq4D.js +28 -0
  350. package/editor-web/assets/{info-OHQRW6UA-CnKQHx5m.js → info-OHQRW6UA-DpcY8t23.js} +1 -1
  351. package/editor-web/assets/{infoDiagram-MVDRKAX5-ibAVFw_2.js → infoDiagram-MVDRKAX5-ChtmtWni.js} +1 -1
  352. package/editor-web/assets/{ishikawaDiagram-HPEHV2GE-C1OCHt3y.js → ishikawaDiagram-HPEHV2GE-BZNTuG_F.js} +1 -1
  353. package/editor-web/assets/iso-ahTwmFwH.js +56 -0
  354. package/editor-web/assets/{italic-CtlNOXN9.js → italic-zw4_eUNF.js} +1 -1
  355. package/editor-web/assets/{journeyDiagram-BOSHW7O7-BDdqMOM1.js → journeyDiagram-BOSHW7O7-C3uVmZbL.js} +1 -1
  356. package/editor-web/assets/{kanban-definition-FNSA4HC5-CSAS_zGn.js → kanban-definition-FNSA4HC5-puEhftGG.js} +4 -4
  357. package/editor-web/assets/{link-CW2KxKT_.js → link-DopSU3aa.js} +1 -1
  358. package/editor-web/assets/{mermaid-parser.core-DTLyYXbn.js → mermaid-parser.core-Bw8re-WE.js} +3 -3
  359. package/editor-web/assets/mermaid.core-Cc2GIqBr.js +44 -0
  360. package/editor-web/assets/{mindmap-definition-6OY57UG3-DSWHcglH.js → mindmap-definition-6OY57UG3-C6MUl_S_.js} +3 -3
  361. package/editor-web/assets/minus-CbPnUIOy.js +1 -0
  362. package/editor-web/assets/{packet-JDAUHWVQ-_k1BF29s.js → packet-JDAUHWVQ-C75RnvC5.js} +1 -1
  363. package/editor-web/assets/{pegDiagram-ECIUJNBX-B22YyWAa.js → pegDiagram-ECIUJNBX-ChjmsdV4.js} +1 -1
  364. package/editor-web/assets/{pie-XZMESJXO-CSwV32hj.js → pie-XZMESJXO-BaKxJQpj.js} +1 -1
  365. package/editor-web/assets/{pieDiagram-GNMPY74T-rSFNeWnq.js → pieDiagram-GNMPY74T-CT2ez8pr.js} +1 -1
  366. package/editor-web/assets/progress-CwKcXARv.js +6 -0
  367. package/editor-web/assets/props-form-D5oKHfpk.js +1 -0
  368. package/editor-web/assets/purify.es-B9ve_eFf.js +3 -0
  369. package/editor-web/assets/{quadrantDiagram-D57K4MC3-Xrntfg4j.js → quadrantDiagram-D57K4MC3-BJItlTfk.js} +1 -1
  370. package/editor-web/assets/{radar-ABXABTNO-Dwq5qiNw.js → radar-ABXABTNO-DnLzBlTo.js} +1 -1
  371. package/editor-web/assets/{railroad-I3PHUGI6-sIUGWcZh.js → railroad-I3PHUGI6-D5hj6Yv3.js} +1 -1
  372. package/editor-web/assets/{railroad-abnf-LNEFI6M7-1rWlT9BX.js → railroad-abnf-LNEFI6M7-DUZlZoPu.js} +1 -1
  373. package/editor-web/assets/{railroad-ebnf-DWYD2UWJ-DWdkzEHc.js → railroad-ebnf-DWYD2UWJ-CDyyDC6d.js} +1 -1
  374. package/editor-web/assets/{railroad-peg-JR7BVNR7-CME0JBbV.js → railroad-peg-JR7BVNR7-CC3ImNnT.js} +1 -1
  375. package/editor-web/assets/{railroadDiagram-Y72NRBL7-Ch4BpP22.js → railroadDiagram-Y72NRBL7-Bjw-8Se5.js} +1 -1
  376. package/editor-web/assets/{react-Bk7NnOLX.js → react-Edyoga_4.js} +1 -1
  377. package/editor-web/assets/{requirementDiagram-EQYSW5RA-CgE-x3wN.js → requirementDiagram-EQYSW5RA-CDFnuEIO.js} +1 -1
  378. package/editor-web/assets/row-C_svyL8o.js +1 -0
  379. package/editor-web/assets/{sankeyDiagram-SY24JHO5-DBf4G6n3.js → sankeyDiagram-SY24JHO5-CQPVLY1w.js} +1 -1
  380. package/editor-web/assets/schemas-moE_A7Nj.js +1 -0
  381. package/editor-web/assets/{scissors-BURkYWPv.js → scissors-B_xOiUhd.js} +1 -1
  382. package/editor-web/assets/{search-jKDvFIEU.js → search-Ba2BbT6T.js} +1 -1
  383. package/editor-web/assets/{sequenceDiagram-BLEHNHQU-Bz07CoUS.js → sequenceDiagram-BLEHNHQU-BQzuLmBX.js} +1 -1
  384. package/editor-web/assets/{session-CUCSWPTE.js → session-s1I85rox.js} +1 -1
  385. package/editor-web/assets/{sigma-CY2Chbro.js → sigma-DSUsJhMn.js} +1 -1
  386. package/editor-web/assets/slides-oQ_C0SVJ.js +1 -0
  387. package/editor-web/assets/snapshots-BPJKywuN.js +1 -0
  388. package/editor-web/assets/{sound-DUCxe9eC.js → sound-bTlco_K3.js} +1 -1
  389. package/editor-web/assets/split-7CVjIkSU.js +3 -0
  390. package/editor-web/assets/square-arrow-out-up-right-DF5dvsSp.js +1 -0
  391. package/editor-web/assets/{stateDiagram-v2-A6IESKWZ-DuqAmDPP.js → stateDiagram-v2-A6IESKWZ-DOuageUf.js} +7 -7
  392. package/editor-web/assets/{sticky-note-C5qUDHhC.js → sticky-note-BdkIu5_D.js} +1 -1
  393. package/editor-web/assets/{strikethrough-DP-7tMz0.js → strikethrough-BwXWi4zg.js} +1 -1
  394. package/editor-web/assets/surface-DtCjIlrq.js +1 -0
  395. package/editor-web/assets/svg-CWIBMIQ9.js +1 -0
  396. package/editor-web/assets/swatch-DhztHwPU.js +1 -0
  397. package/editor-web/assets/{swimlanes-B3ENRKFQ-C7sOL6rB.js → swimlanes-B3ENRKFQ-CXKkok7X.js} +1 -1
  398. package/editor-web/assets/swimlanesDiagram-AYQRV4AK-C3Car2M0.js +8 -0
  399. package/editor-web/assets/switch-8MU4Nfxe.js +1 -0
  400. package/editor-web/assets/{syntax-DSsHrzWF.js → syntax-CU_WPKxt.js} +1 -1
  401. package/editor-web/assets/{table-CTjNpE4W.js → table-DRbddzx0.js} +1 -1
  402. package/editor-web/assets/tabs-CiF1N-pL.js +1 -0
  403. package/editor-web/assets/tag-CIfWT8B_.js +1 -0
  404. package/editor-web/assets/text-align-start-Cic2-TLh.js +1 -0
  405. package/editor-web/assets/textarea-D7TnPwv1.js +1 -0
  406. package/editor-web/assets/{timeline-definition-JXYKGLGB-CaLYz9mc.js → timeline-definition-JXYKGLGB-DgAjAeZp.js} +3 -3
  407. package/editor-web/assets/{treeView-D4JQ5SDB-D1P1Kyxc.js → treeView-D4JQ5SDB-C0Xvnhck.js} +1 -1
  408. package/editor-web/assets/{treemap-SAJKECNS-2YaFL53t.js → treemap-SAJKECNS-aXfKAeSX.js} +1 -1
  409. package/editor-web/assets/{undo-2-DUGGyBdX.js → undo-2-C47jrRp5.js} +1 -1
  410. package/editor-web/assets/{usecaseDiagram-WPOLBNNX-uYdbUhUS.js → usecaseDiagram-WPOLBNNX-CvUlBa-L.js} +1 -1
  411. package/editor-web/assets/{vennDiagram-Q3Y3IDCW-DHepmX4t.js → vennDiagram-Q3Y3IDCW-qMJ1iCxs.js} +3 -3
  412. package/editor-web/assets/{video-Xl-OaXRc.js → video-DQrjo1TI.js} +1 -1
  413. package/editor-web/assets/{wardley-7MLQ67FV-Dx0MOPV1.js → wardley-7MLQ67FV-DEdnH0by.js} +1 -1
  414. package/editor-web/assets/{wardleyDiagram-IVAIDKWA-BX8ElwDW.js → wardleyDiagram-IVAIDKWA-Bt-B2hQ5.js} +1 -1
  415. package/editor-web/assets/{whole-word-6DliXke2.js → whole-word-D3ZAtnkw.js} +1 -1
  416. package/editor-web/assets/{words-B2FXYyeZ.js → words-0Ww2RyT4.js} +1 -1
  417. package/editor-web/assets/{words-DFIhHhHF.js → words-XlXG79Ur.js} +1 -1
  418. package/editor-web/assets/workbook-FSSUiIp9.js +45 -0
  419. package/editor-web/assets/x-DlhyIKuu.js +41 -0
  420. package/editor-web/assets/{xychartDiagram-4URNHDU4-DoWQRJUS.js → xychartDiagram-4URNHDU4-DV4bSzTb.js} +1 -1
  421. package/editor-web/assets/{zoom-in-C4lxmIDE.js → zoom-in-PgsC94hP.js} +1 -1
  422. package/editor-web/index.html +8 -6
  423. package/package.json +2 -2
  424. package/editor-web/assets/arrow-down-DzZjFrBL.js +0 -1
  425. package/editor-web/assets/arrow-up-hdmh9LVD.js +0 -1
  426. package/editor-web/assets/article-DHFgHYjv.js +0 -3
  427. package/editor-web/assets/article-Dt9id9Y9.js +0 -7
  428. package/editor-web/assets/button-BVQH7zxz.js +0 -41
  429. package/editor-web/assets/calc-worker-jImBXoeb.js +0 -45
  430. package/editor-web/assets/channel-Dkg198L0.js +0 -1
  431. package/editor-web/assets/chart-BC3kUUDD.js +0 -2
  432. package/editor-web/assets/chunk-DSNLSHJZ-BFnyvrWg.js +0 -129
  433. package/editor-web/assets/code-BID_OoRp.js +0 -1
  434. package/editor-web/assets/collaborator-2qfw-8OJ.js +0 -1
  435. package/editor-web/assets/dist-5HNrQ9AU.js +0 -45
  436. package/editor-web/assets/dist-BPecIPz6.js +0 -530
  437. package/editor-web/assets/dist-BXJKASX4.js +0 -24
  438. package/editor-web/assets/dist-BeDRTqQ8.js +0 -38
  439. package/editor-web/assets/dist-BlL-4sl3.js +0 -43
  440. package/editor-web/assets/dist-BuqBg8k8.js +0 -1
  441. package/editor-web/assets/dist-BwW08gSh.js +0 -1
  442. package/editor-web/assets/dist-C30Thvb3.js +0 -1
  443. package/editor-web/assets/dist-Cj5AmpVb.js +0 -5
  444. package/editor-web/assets/dist-CjjnDOa8.js +0 -3
  445. package/editor-web/assets/dist-D7ur8721.js +0 -6
  446. package/editor-web/assets/dist-DOHhp09C.js +0 -4
  447. package/editor-web/assets/dist-LhFEYZza.js +0 -16
  448. package/editor-web/assets/flowDiagram-IUGLLWBU-C7ZmHJZW.js +0 -1
  449. package/editor-web/assets/hint-mQB8slJ2.js +0 -1
  450. package/editor-web/assets/index-BGAXezRR.js +0 -28
  451. package/editor-web/assets/index-Br4a-QEv.css +0 -2
  452. package/editor-web/assets/mermaid.core-B8478wZ1.js +0 -44
  453. package/editor-web/assets/minus-D1tgAHbU.js +0 -1
  454. package/editor-web/assets/progress-udl4pNsP.js +0 -6
  455. package/editor-web/assets/props-form-B6mYjTgZ.js +0 -1
  456. package/editor-web/assets/row-dgHEAE7h.js +0 -1
  457. package/editor-web/assets/schemas-B89k2jEC.js +0 -1
  458. package/editor-web/assets/slides-BdaWgL_N.js +0 -1
  459. package/editor-web/assets/snapshots-CTS2iez5.js +0 -56
  460. package/editor-web/assets/split-mDSkdQkd.js +0 -3
  461. package/editor-web/assets/surface-D9qJjJQL.js +0 -1
  462. package/editor-web/assets/svg-nJtFNJ-7.js +0 -1
  463. package/editor-web/assets/swatch-S8YuBYyj.js +0 -1
  464. package/editor-web/assets/swimlanesDiagram-AYQRV4AK-CQ2aWYP-.js +0 -8
  465. package/editor-web/assets/switch-D5kPl2jO.js +0 -1
  466. package/editor-web/assets/tabs-C0AHyuE5.js +0 -1
  467. package/editor-web/assets/textarea-mzr9Kfuf.js +0 -1
@@ -1,70 +1,70 @@
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 M,CALLOUT_TAG as E,CARD_TAG as R,STAT_TAG as J,STATS_TAG as I,TAG_TAG as B,CHART_TAG as O,PAGE_BREAK_TAG as Q,COLUMN_TAG as N,COLUMNS_TAG as U,COMPONENT_TAG as V,TABLE_TAG as W,TOC_TAG as X,BIBLIOGRAPHY_TAG as Z}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 s=(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 i=Array.from(e);return i.forEach((a,d)=>{const u=i[d-1],c=i[d+1];switch(a){case"\\":case"*":case"`":case"[":case"]":case"<":case">":case"{":case"}":case"~":t+=`\\${a}`;break;case"_":t+=_(u)&&_(c)?a:`\\${a}`;break;case"&":t+=/^&(#\d+|#x[0-9a-f]+|[a-z][a-z0-9]*);/i.test(i.slice(d,d+34).join(""))?"&amp;":a;break;case"|":t+=n?"\\|":a;break;case"!":t+=c===void 0?"\\!":a;break;case`
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
4
  `:t+=r?"<br />":`\\
5
- `;break;default:t+=a}}),t}function b(e){const n=Math.max(0,...(e.match(/`+/g)??[]).map(i=>i.length)),r="`".repeat(n+1),t=e.startsWith("`")||e.endsWith("`")||e.startsWith(" ")&&e.endsWith(" ")&&e.trim()!==""?" ":"";return`${r}${t}${e}${t}${r}`}const k={bold:"**",italic:"*",strike:"~~"},q={underline:"u",bold:"strong",italic:"em",strike:"del",code:"code"};function T(e,n){let r="",t=0,i=!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}]`,i=!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),i=!0,t++;continue}const u=g(a,d);let c=t+1;for(;c<e.length;){const $=e[c];if($===void 0||g($,d)!==u||d==="code"&&A.some(p=>p!=="code"&&!n.used.has(p)&&g($,p)!==void 0))break;c++}const o=e.slice(t,c),f=new Set([...n.used,d]),h=o.map($=>$.text).join(""),j=e[c],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>`:b(h);else if(d==="link"){const $=T(o,{...n,used:f}),p=(u??"").replace(/[\s<>\\]/g,L=>encodeURIComponent(L)),x=ee(p)?p:p.replace(/[()]/g,"\\$&");r+=`[${$}](${x})`}else if(d==="tag"){const $=T(o,{...n,used:f});r+=`<${B}${s("color",u)}>${$}</${B}>`}else if(d==="span"){const $=T(o,{...n,used:f}),p=o[0];r+=`<span${s("color",p?.styles.color)}${s("bg",p?.styles.background)}>${$}</span>`}else{const $=T(o,{...n,used:f}),p=k[d],x=Array.from(h),L=t===0&&c===e.length,P=n.used.has("bold")||n.used.has("italic")||n.used.has("strike"),C=w=>w!==void 0&&A.every(y=>f.has(y)||g(w,y)===void 0),z=d==="bold"&&o.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
- `)&&i&&D&&(!P||L&&d==="italic"&&n.used.has("bold"))&&(C(o[0])&&C(o.at(-1))||z);r+=H?`${p}${$}${p}`:`<${q[d]}>${$}</${q[d]}>`}i=!1,t=c}return r}function ee(e){let n=0;for(const r of e)if(r==="(")n+=1;else if(r===")"&&--n<0)return!1;return n===0}function ne(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,c)=>{if(d.note===void 0)return d;const o=c.slice(0,u).findLast(f=>f.note===void 0);return o===void 0?d:{...d,styles:{...o.styles},...o.href===void 0?{}:{href:o.href}}}),i=T(t,{inTable:n,oneLine:r,used:new Set}),a=d=>d.replace(/ +$/,"").replace(/^ +/,u=>"&#x20;".repeat(u.length));return r?a(i):i.split(`
8
- `).map(d=>ne(a(d))).join(`
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
9
  `)}const S=(e,n)=>e.split(`
10
10
  `).map((r,t)=>t===0||r===""?r:`${n}${r}`).join(`
11
- `),m=e=>e.type==="bullet"||e.type==="numbered"||e.type==="check",te=e=>`${s("align",e?.align)}${s("color",e?.color)}${s("bg",e?.background)}`,re=e=>e!==void 0&&Object.keys(e).length>0;function v(e){return!("content"in e)||e.type==="callout"?!1:re(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 ie(e,n,r){const t=e.type==="numbered"?`${String(n)}${r} `:e.type==="check"?`- [${e.checked?"x":" "}] `:"- ",i=" ".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,i)}`.trimEnd();const u=d===""?"<br />":d,[c]=a,o=c!==void 0&&m(c)&&l(c.content)!==""&&!(c.type==="numbered"&&(c.start??1)!==1),f=a.every(m)&&d!==""&&o;return`${t}${S(u,i)}${f?`
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?`
12
12
  `:`
13
13
 
14
- `}${i}${S(writeBlocks(a),i)}`}function de(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}${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(`
15
15
 
16
16
  `).split(`
17
17
  `).map(t=>t===""?">":`> ${t}`).join(`
18
18
  `)}case"callout":{const n=l(e.content),r=[n===""?"<br />":n,...e.children?.length?[writeBlocks(e.children)]:[]].join(`
19
19
 
20
- `);return`<${E}${s("icon",e.icon)}${s("color",e.look?.color)}${s("bg",e.look?.background)}>
20
+ `);return`<${I}${i("icon",e.icon)}${i("color",e.look?.color)}${i("bg",e.look?.background)}>
21
21
 
22
22
  ${r}
23
23
 
24
- </${E}>`}case"card":{const n=e.children?.length?writeBlocks(e.children):"";return`<${R}${s("title",e.title)}${s("subtitle",e.subtitle)}>
24
+ </${I}>`}case"card":{const n=e.children?.length?writeBlocks(e.children):"";return`<${R}${i("title",e.title)}${i("subtitle",e.subtitle)}>
25
25
 
26
26
  ${n===""?"<br />":n}
27
27
 
28
- </${R}>`}case"stats":return[`<${I}>`,...e.stats.map(n=>`<${J}${s("label",n.label)}${s("value",n.value)}${s("delta",n.delta)}${s("note",n.note)}${n.downIsGood?" down-is-good":""}${s("trend",n.trend?.join(","))} />`),`</${I}>`].join(`
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
29
  `);case"code":{const n=se(e.code);return`${n}${e.language??""}
30
30
  ${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${s("src",e.src)}${s("alt",e.alt)}${s("title",e.caption)}${s("width",e.width===void 0?void 0:String(e.width))}${s("align",e.align)}${s("id",e.id)} />`;const r=e.caption===void 0?"":` "${e.caption.replace(/["\\]/g,"\\$&")}"`;return`![${G(e.alt??"",!1)}](${n}${r})`}case"table":{const n=Math.max(1,...e.rows.map(u=>u.length)),r=u=>`| ${Array.from({length:n},(c,o)=>l(u[o]??[],!0)).join(" | ")} |`,[t,...i]=e.rows,a=[r(t??[]),`| ${Array.from({length:n},()=>"---").join(" | ")} |`,...i.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:`<${W}${s("widths",d)}${s("head",e.head)}${s("caption",e.caption)}${s("id",e.id)}>
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)}>
33
33
 
34
34
  ${a}
35
35
 
36
- </${W}>`}case"divider":return"---";case"component":{const n=t=>t===void 0?void 0:String(t),r=Object.entries(e.props).map(([t,i])=>s(t,i)).join("");return`<${V}${s("of",e.of)}${s("width",n(e.width))}${s("height",n(e.height))}${s("at",n(e.at))}${r}${s("alt",e.alt)}${s("title",e.caption)}${s("align",e.align)}${s("id",e.id)} />`}case"chart":return ae(e);case"pagebreak":return`<${Q}${s("orientation",e.orientation)} />`;case"bibliography":return`<${Z} />`;case"toc":return`<${X}${s("levels",e.levels===void 0?void 0:String(e.levels))}${s("title",e.title)} />`;case"note":{const n=l(e.content)||"<br />",r=e.children?.length?`
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?`
37
37
 
38
38
  ${writeBlocks(e.children).split(`
39
39
  `).map(t=>t===""?t:` ${t}`).join(`
40
- `)}`:"";return`[^${e.label}]: ${S(n," ")}${r}`}case"columns":return[`<${U}>`,...e.columns.map(n=>{const r=writeBlocks(n.blocks);return`<${N}${s("width",n.width===void 0?void 0:String(n.width))}>
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))}>
41
41
 
42
42
  ${r===""?"<br />":r}
43
43
 
44
- </${N}>`}),`</${U}>`].join(`
44
+ </${U}>`}),`</${W}>`].join(`
45
45
 
46
- `);case"embed":case"source":return e.source}}function ae(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":s("labels",r(e.labels)),i=[s("type",e.kind),s("title",e.title),s("data",e.data),s("categories",e.categories),s("series",r(e.series)),s("legend",e.legend),t,s("format",e.format),s("min",n(e.min)),s("max",n(e.max)),s("colors",r(e.colors)),e.smooth?" smooth":"",s("width",n(e.width)),s("height",n(e.height)),s("alt",e.alt),s("id",e.id)].join("");if(e.table===void 0)return`<${O}${i} />`;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,...c]=e.table,o=[d(u??[]),`| ${Array.from({length:a},()=>"---").join(" | ")} |`,...c.map(d)].join(`
47
- `);return`<${O}${i}>
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}>
48
48
 
49
- ${o}
49
+ ${c}
50
50
 
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,i)=>{i.flow=!0},Map:(t,i,a)=>{a.length>1&&(i.flow=!0)}}),r.toString({lineWidth:0}).trimEnd()}export function withPage(e,n){const r=frontMatterOf(n),t=r===""?"":`---
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
52
  ${r}
53
- ---`,i=e.frontMatter;if(i===void 0){if(t==="")return e.source;const d=e.source.replace(/^\s+/u,"");return d===""?`${t}
53
+ ---`,s=e.frontMatter;if(s===void 0){if(t==="")return e.source;const d=e.source.replace(/^\s+/u,"");return d===""?`${t}
54
54
  `:`${t}
55
55
 
56
- ${d}`}const a=e.source.slice(i.end).replace(/^\s+/u,"");return t===""?a:a===""?`${t}
56
+ ${d}`}const a=e.source.slice(s.end).replace(/^\s+/u,"");return t===""?a:a===""?`${t}
57
57
  `:`${t}
58
58
 
59
- ${a}`}function oe(e){const n=e.type==="toggle"||e.type==="heading"&&e.toggle,{children:r}=e,t={...e};delete t.look,delete t.children;const i=t.type==="toggle"?{type:"paragraph",content:t.content}:t.type==="heading"?{type:"heading",level:t.level,content:t.content}:t,a=m(i)||i.type==="quote",d=writeBlocks(a?[{...i,...r?{children:r}:{}}]:[i,...r??[]]);return`<${M}${te(e.look)}${n?" toggle":""}>
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":""}>
60
60
 
61
61
  ${d}
62
62
 
63
- </${M}>`}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 i=e[r];if(i===void 0)break;if(v(i)){n.push(oe(i)),t=void 0,r++;continue}if(!m(i)){n.push(r===0&&i.type==="divider"?"***":de(i)),t=void 0,r++;continue}const a=i.type==="numbered",d=i.type==="numbered"?i.start??1:1,u=a&&t==="."?")":".",c=[];let o=r;for(;o<e.length;){const h=e[o];if(h===void 0||!m(h)||v(h)||h.type==="numbered"!==a||o>r&&!continuesList(i,h))break;c.push(ie(h,d+(o-r),u)),o++}const f=c.some(h=>h.includes(`
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(`
64
64
 
65
- `));n.push(c.join(f?`
65
+ `));n.push(o.join(f?`
66
66
 
67
67
  `:`
68
- `)),t=a?u:void 0,r=o}return n.join(`
68
+ `)),t=a?u:void 0,r=c}return n.join(`
69
69
 
70
70
  `)}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/doc",
3
- "version": "0.15.2",
3
+ "version": "0.17.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -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 S}from"node:fs/promises";import{join as D,posix as m}from"node:path";import{problem as d}from"@allyhub/diagnostics";import{parseComponentRef as J,readPropsText as W,stageName as q}from"@allyhub/build";import{DRAWN_CODE as x,citedKeys as B,docChart as P,everyBlock as v,readSources as U,mathHtml as G,parseDoc as C,shownBlocks as H,splitTitle as X,titleText as _}from"@allyhub/doc";const z=180,Q=/^([a-z][a-z0-9+.-]*:|\/\/)/iu;function V(r){for(const o of r){if(o.type!=="paragraph")continue;const t=o.content.map(i=>i.text).join("").replace(/\s+/gu," ").trim();if(t!=="")return t.length>z?`${t.slice(0,z-1)}…`:t}}function*E(r){let o=0,t=1;for(const i of r.segments){for(;o<i.start;o++)r.source[o]===`
3
- `&&t++;for(const h of i.blocks)for(const s of v([h]))yield{block:s,line:t}}}function O(r){const o=new Map;return(t,i,h)=>{const s=`${t}#${i}`;let n=o.get(s);return n||(n=(async()=>{if(!r)return{};const a=await r.request({type:"component",file:t,name:i});if(h.push(...a.problems),!a.ok)return{not:a.error??`${t} could not be read`};const u=a.value;return u.not===void 0?{props:u.props??{}}:{not:u.not}})(),o.set(s,n)),n}}async function R(r,o,t,i,h){const s=[],n=o.entry,a=C(await S(D(r,n),"utf8"));for(const e of a.problems)s.push(d("AK-M008",`${n}: ${e.message}.`,{where:{file:n,...e.line===void 0?{}:{line:e.line}}}));const u=X(H(a.blocks)),M=_(u.title).trim()||void 0,b=V(u.body),g=new Set,L=[...a.page.cover===void 0?[]:[a.page.cover],...[...v(a.blocks)].flatMap(e=>e.type==="image"?[e.src]:[])];for(const e of L){if(Q.test(e))continue;const c=m.normalize(m.join(o.dir,decodeURIComponent(e)));g.add(c),t.has(c)||s.push(d("AK-M008",`${n} shows the picture ${e}, which is not in the project (${c}).`,{where:{file:n}}))}const j=new Map;for(const{block:e,line:c}of E(a)){if(e.type!=="component")continue;const p={where:{file:n,line:c}},$=J(e.of);if(!$){s.push(d("AK-M008",`${n}: of="${e.of}" names no component: write the module's path from the doc's folder and its export (../../components/ui.ts#Dialog).`,p));continue}const f=m.normalize(m.join(o.dir,$.path));if(!t.has(f)){s.push(d("AK-M008",`${n} shows the component ${e.of}, whose module is not in the project (${f}).`,p));continue}const l=await i(f,$.name,s);if(l.not!==void 0){s.push(d("AK-M008",`${n}: ${l.not}.`,p));continue}if(l.props)for(const I of W({name:$.name,props:l.props},e.props).problems)s.push(d("AK-M008",`${n}: ${I}.`,p));j.set(e.of,{of:e.of,module:f,name:$.name,...l.props?{props:l.props}:{}})}const A={};for(const{block:e,line:c}of E(a)){const p={where:{file:n,line:c}};if(e.type==="code"&&e.language===x.math){const{error:f}=G(e.code);f!==void 0&&s.push(d("AK-M008",`${n}: an equation: ${f}.`,p));continue}if(e.type!=="chart")continue;if(e.data!==void 0){const f=m.normalize(m.join(o.dir,e.data)),l=h[f];if(l===void 0){s.push(d("AK-M008",`${n}: a chart reads ${e.data}, which is not a data file or a sheet's table of the project (${f}).`,p));continue}if(l.error!==void 0){s.push(d("AK-M008",`${n}: a chart reads ${e.data}, which cannot be read: ${l.error}.`,p));continue}A[e.data]=l.value,t.has(f)&&g.add(f)}const $=P(e,{base:o.dir,data:f=>A[f]});for(const f of $.problems)s.push(d("AK-M008",`${n}: the chart${e.title===void 0?"":` "${e.title}"`}: ${f}.`,p))}let y,k;const w=a.page.bibliography,K=B(a.blocks);if(w!==void 0){const e=m.normalize(m.join(o.dir,decodeURIComponent(w)));if(k=e,!t.has(e))s.push(d("AK-M008",`${n}: its bibliography ${w} is not in the project (${e}).`,{where:{file:n}}));else{g.add(e);try{const c=JSON.parse(await S(D(r,e),"utf8"));if(!Array.isArray(c))throw new Error("not a list of sources");y=U(c)}catch(c){s.push(d("AK-M008",`${n}: its bibliography ${w} is not CSL-JSON (a list of sources, each with an id): ${c instanceof Error?c.message:String(c)}.`,{where:{file:n}}))}}}if(K.length>0){const e=new Set((y??[]).map(p=>p.id)),c=K.filter(p=>!e.has(p));w===void 0?s.push(d("AK-M008",`${n} cites ${K.map(p=>`@${p}`).join(", ")}: name its sources' CSL-JSON file in its front matter (bibliography: ./references.json).`,{where:{file:n}})):y!==void 0&&c.length>0&&s.push(d("AK-M008",`${n} cites ${c.map(p=>`@${p}`).join(", ")}, which ${w} does not hold.`,{where:{file:n}}))}const T={dir:o.dir,place:o.id,file:n,...M?{title:M}:{},...b?{glimpse:b}:{},shows:[...g],components:[...j.values()],data:A,...y===void 0?{}:{sources:y}},F=[...[...g].map(e=>({path:e,role:"shows"})),...k===void 0?[]:[{path:k,role:"sources"}]];return{doc:T,problems:s,files:F}}export async function readDocs(r,o,t,i,h={}){const s=new Set(t),n=O(i),a=[],u=[];for(const M of o){const b=await R(r,M,s,n,h);a.push(b.doc),u.push(...b.problems)}return{docs:a,problems:u}}const N=new WeakMap,Y={async read(r,o){let t=N.get(o.meta);t||(t={known:new Set(o.files),reads:O(o.meta)},N.set(o.meta,t));const{doc:i,problems:h,files:s}=await R(o.root,r,t.known,t.reads,o.data);return{doc:i,problems:h,files:s,...i.components.length>0?{stage:{name:q(i.place),of:i.file,components:i.components}}:{}}},unreadable(r){const o=C(r),t=o.blocks.length===0?o.problems[0]:void 0;return t&&r.trim()!==""?[`not MDX${t.line===void 0?"":` (line ${String(t.line)})`}: ${t.message}`]:[]},render:async(r,o)=>(await import("./export.js")).renderDocFiles(r,o)};export default Y;
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;
@@ -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 w=F.get(t);w!==void 0&&t.type!=="columns"&&g.set(P,String(w))}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)}),b=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:b,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,b)} (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, not problems; 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 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(`
3
3
  `)}}}),x={pages:Z};export default x;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/doc-extension",
3
- "version": "0.15.2",
3
+ "version": "0.17.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./cli": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/doc-print",
3
- "version": "0.15.2",
3
+ "version": "0.17.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{CACHE_DIR as Se}from"@allyhub/formats";import{mkdir as Ie,stat as je,writeFile as Ae}from"node:fs/promises";import{cpus as Le}from"node:os";import{dirname as Pe,isAbsolute as Ce,join as C,relative as ae,sep as Ne}from"node:path";import{itemKindBuild as Y,usesInOrder as Fe}from"@allyhub/build";import{FILE_TYPES as ce,comboKey as de,exportProblem as Oe,pieceIs as Re,pieceNamed as le,versionLabel as q}from"@allyhub/piece";import{runCheck as Ee}from"@allyhub/check";import{ConsolePool as Te,mergeConsole as _e,dedupe as fe,indexNeeds as De,makeIndex as Ke,CheckSession as We,OpenedVersion as ze,keyedStills as Be,ProjectError as A}from"@allyhub/project";import{batchCsv as He,batchRows as Ve}from"./batch.js";import{processFile as Ye}from"./processors.js";import{batchName as qe,checkName as Ge,exportName as pe,exportNames as Je}from"./names.js";export const exportsAtOnce=e=>Math.max(1,Math.min(e,Math.floor(Le().length/4)));const G=(e,r)=>`${String(e)} ${r}${e===1?"":"s"}`,J=(e,r)=>Re({id:e.id,path:e.entry},r);function Qe(e,r){if(e===void 0)return;const o=new Set([...Object.keys(ce),...r.flatMap(c=>c.renders?.types??[])]);for(const c of e)if(!o.has(c))throw new A("bad-type",`Cannot render ${c}.`,"usage",`Types: ${[...o].join(", ")}.`);return[...e]}const Ue=e=>({...e.steps===!0?{steps:!0}:{},...e.pptx==="picture"?{pptx:"picture"}:{}});function me(e,r){return[...e.docs.filter(o=>o.place===r.id).map(o=>o.file),...e.sheets.filter(o=>o.place===r.id).flatMap(o=>o.files)]}async function Q(e,r,o,c){const{files:m,type:$,...v}=r,{piece:I,...l}=o,y=m[0]??e,E=(await Promise.all(m.map(N=>je(N)))).reduce((N,F)=>N+F.size,0);return{files:[...m],...v,name:we(ae(e,y)),path:y,piece:I,type:$,...l,bytes:E,seconds:Math.round((performance.now()-c)/10)/100}}const ue=e=>"failure"in e;export function exportProject(e){return ge(e,new Map)}export const MADE_DIR=`${Se}/made`;const D=(e,r)=>`${e}\0${r}`;function he(e,r){return o=>{const c=e?.uses?.find($=>$.of===o);if(!c)return;const m=r.get(D(c.item,c.type))?.[0];if(m)return c.part===void 0?m.path:m.partFiles?.[c.part]}}async function ge(e,r){const o=Qe(e.types,e.kinds);e.name!==void 0&&Ge(e.name);const c=e.params??{},m=Ue(c),$=e.items??[],v=$.length>0,I=x=>$.some(S=>J(x,S)),l=[],y=[],E=[],N={root:e.root,out:e.out,params:c,...e.log===void 0?{}:{log:e.log},...e.signal===void 0?{}:{signal:e.signal}},F=async x=>{l.push(await Ye(x,e.processors??[],N))},K=()=>We.open({root:e.root,kinds:e.kinds,...e.gpu===void 0?{}:{gpu:e.gpu},...e.consoleLimit===void 0?{}:{consoleLimit:e.consoleLimit}});let p=await K(),W=!0;const U={componentStills:(x,S,d)=>Be(S,{prepared:p.prepared,item:x,combo:d,gpu:p.gpu,withSession:L=>L(p)})},X=new Set,Z=async(x,S,d)=>{X.has(x)||(X.add(x),await S?.ready?.(d,c))};try{const x=p.prepared.items.filter(n=>!v||I(n)),S=Fe(p.prepared.items,x).filter(n=>!r.has(D(n.item.id,n.type)));if(S.length>0){const n=p.prepared.pieces;W=!1,await p.close();for(const t of S){e.signal?.throwIfAborted();const g=n.find(a=>a.place===t.item.id)?.combos[0];e.log?.(`Making ${t.item.id} as ${t.type} first, which another item uses…`);try{const a=await ge({root:e.root,kinds:e.kinds,items:[t.item.id],types:[t.type],out:C(e.root,MADE_DIR),...g===void 0?{}:{combos:[g]},...e.gpu===void 0?{}:{gpu:e.gpu},...e.consoleLimit===void 0?{}:{consoleLimit:e.consoleLimit},...e.index===void 0?{}:{index:e.index},...e.analyses===void 0?{}:{analyses:e.analyses},...e.log===void 0?{}:{log:e.log},...e.signal===void 0?{}:{signal:e.signal}},r);r.set(D(t.item.id,t.type),a.files.filter(u=>u.type===t.type)),y.push(...a.failed)}catch(a){if(e.signal?.aborted===!0)throw a;r.set(D(t.item.id,t.type),[]),y.push({name:t.item.id,piece:t.item.id,type:t.type,code:a instanceof A?a.code:"failed",message:`${t.item.id}, which another item uses, could not be made: ${a.message}`})}}p=await K(),W=!0}const d=p.prepared,L=n=>d.kinds.find(t=>t.id===n)?.renders,O=[];for(const n of d.items){const t=await Y(d.kinds,n);t?.render&&t.onStage!==!0&&O.push({item:n,build:t})}const j=$.filter(n=>!O.some(t=>J(t.item,n)));for(const n of j)if(!d.pieces.some(t=>le({id:t.id,path:t.place},n))){const t=d.items.find(a=>J(a,n)),g=t&&d.problems.filter(a=>a.level==="error"&&(a.piece===t.id||a.where?.file===t.entry||(a.where?.file?.startsWith(`${t.dir}/`)??!1)));throw t&&g&&g.length>0?new A("item-failed",`${t.id} could not be made: ${g.map(a=>a.message).join(" ")}`,"failed","allyhub check lists every problem."):new A("no-item",`No item ${n}.`,"not-found",`Items: ${[...d.pieces.map(a=>a.id),...O.map(a=>a.item.id)].join(", ")||"none"}.`)}const ee=v&&j.length===0,ye=new Set(d.pieces.flatMap(n=>L(n.kind)?.types??[])),te=o?.filter(n=>n in ce||ye.has(n)),be=ee?[]:d.pieces.filter(n=>j.length===0||j.some(t=>le({id:n.id,path:n.place},t))),z=o?.includes("csv")===!0?be.filter(n=>n.matrix!==void 0):[];if(o?.includes("csv")===!0&&j.length>0&&z.length===0)throw new A("bad-type",`${j.join(", ")} has no slots (matrix.slots), so there is no table of ads to write as csv.`,"usage","csv is a batch's table of ads, or a sheet's rows.");let T=[...d.problems];const B=new Te(p.consoleLimit),ke=new Set(O.flatMap(n=>me(d,n.item))),$e=n=>n.where?.file!==void 0&&ke.has(n.where.file),ne=n=>n.filter(t=>t.level==="error"&&!$e(t)).length;if(!ee&&(te?.length!==0||z.length>0)&&(d.pieces.length>0||ne(d.problems)>0)){e.log?.("Checking…");const n=()=>Ze(p,e.root,j,e.combos);let t=await n();const g=e.index===!1?[]:De(t.results);if(g.length>0){const s=await Ke(d.root,g,e.analyses??[],{env:e.env??process.env,onProgress:et(e.log),signal:e.signal});E.push(...s.failed.map(i=>({file:i.need.file,error:i.error}))),s.done.length>0&&(await p.close(),p=await K(),t=await n())}T=t.problems,B.addReport(t.console);const a=ne(t.problems);if(a>0)throw new A("check-failed",`The check found ${G(a,"must-fix problem")}, so nothing is rendered.`,"failed","allyhub check lists them; fix them, then render.");for(const s of z){const i=performance.now(),b=qe(s.id),M=Ve(s,t.wholes,p.prepared.media,Xe(e.root,e.out),e.name);await Ie(Pe(C(e.out,b)),{recursive:!0}),await Ae(C(e.out,b),He(M));const P=t.targets.filter(h=>h.piece===s.id).length;M.length<P&&e.log?.(`${b}: ${G(P-M.length,"ad")} not listed, which did not load (allyhub check says why).`),await F(await Q(e.out,{type:"csv",files:[C(e.out,b)]},{piece:s.id},i))}const u=[],R=new Set;for(const s of t.targets){const i=p.prepared.pieces.find(k=>k.id===s.piece);if(!i)continue;if(!v&&i.options.deliverable===!1){R.add(s.piece);continue}const b=L(i.kind),M={kind:i.kind,types:b?.types??[]},P=t.wholes.find(k=>k.piece===s.piece&&de(k.combo)===s.key&&k.format===s.format)?.speaks??!1,h={piece:s.piece,output:s.output,combo:s.combo,format:s.format,...s.id===void 0?{}:{id:s.id}};for(const k of te??b?.defaults??[]){const f=Oe({...M,speech:P},k);if(!(f?.code==="bad_type"&&!v)){if(f&&f.code!=="no_speech")throw new A("bad-type",`${q(h)}: ${f.message}`,"usage",f.hint);u.push({target:h,kind:i.kind,type:k,...f?{refused:{name:pe(h,k,m),piece:h.piece,type:k,code:"no-speech",message:`${q(h)}: ${f.message}`,...f.hint?{hint:f.hint}:{}}}:{}})}}}R.size>0&&e.log?.(`Not rendered, shown only inside another video (deliverable: false): ${[...R].join(", ")}. Name one to render it.`);for(const s of new Set(u.map(i=>i.kind)))await Z(s,await Y(d.kinds,{kind:s}),u.filter(i=>i.kind===s).map(i=>i.type));const _=Je(u,e.name,m);u.forEach((s,i)=>{s.refused&&(s.refused.name=_[i]??s.refused.name)});const w=[],H=new Array(u.length).fill(0),V=(s,i)=>{H[s]=Math.max(H[s]??0,i),e.onProgress?.(H.reduce((b,M)=>b+M,0)/u.length)};let se=0,ve=0;const Me=async()=>{for(let s=se++;s<u.length;s=se++){e.signal?.throwIfAborted();const i=u[s];if(!i)continue;const b=_[s]??pe(i.target,i.type,m);if(i.refused){y.push(i.refused),V(s,1);continue}const M=await Y(d.kinds,{kind:i.kind}),P=performance.now(),h=await ze.open({root:e.root,session:p,item:i.target.piece,combos:[i.target.combo],purpose:"render"});try{const k=await M?.render?.(d.items.find(f=>f.id===h.piece.place)??{id:h.piece.place,kind:i.kind,dir:h.piece.dir,entry:h.piece.file,groups:[]},{root:e.root,prepared:p.prepared,types:[i.type],out:()=>C(e.out,b),params:c,version:h,session:U,made:he(d.items.find(f=>f.id===h.piece.place),r),onProgress:f=>{V(s,f)},...e.log===void 0?{}:{log:e.log},...e.signal===void 0?{}:{signal:e.signal}})??[{type:i.type,failure:{code:"no-render",message:`${q(i.target)}: its kind (${i.kind}) makes no files.`}}];for(const f of k){if(ue(f)){y.push({name:b,piece:i.target.piece,type:i.type,code:f.failure.code,message:f.failure.message,...f.failure.hint?{hint:f.failure.hint}:{}});continue}const re=await Q(e.out,f,{piece:i.target.piece,combo:i.target.combo,key:de(i.target.combo),format:i.target.format},P);await F(re),e.log?.(`[${String(++ve)}/${String(u.length)}] ${b} (${re.seconds.toFixed(1)} s)`)}}finally{w.push(...await h.problems()),B.add(i.target,await h.console()),await h.close(),V(s,1)}}};u.length>0&&e.log?.(`Rendering ${G(u.length,"file")}…`);const oe=(await Promise.allSettled(Array.from({length:exportsAtOnce(u.length)},Me))).find(s=>s.status==="rejected");if(oe)throw oe.reason;T=fe([...T,...w])}const xe=n=>d.problems.find(t=>t.level==="error"&&t.where?.file!==void 0&&n.includes(t.where.file)),ie=[];for(const n of O.filter(t=>!v||I(t.item))){const t=xe(me(d,n.item)),g=L(n.item.kind);t?y.push({name:n.item.id,piece:n.item.id,type:g?.defaults[0]??g?.types[0]??"",code:"check-failed",message:`${t.where?.file??n.item.entry}: ${t.message}`,hint:"Fix it, then render again."}):ie.push(n)}e.signal?.throwIfAborted();for(const{item:n,build:t}of ie){const g=L(n.kind),a=o===void 0?g?.defaults??[]:o.filter(w=>g?.types.includes(w)===!0);if(a.length===0)continue;await Z(n.kind,t,a);const u=performance.now(),R=n.id,_=await t.render?.(n,{root:e.root,prepared:p.prepared,types:a,out:w=>C(e.out,`${R}.${w}`),params:c,session:U,made:he(n,r),...e.log===void 0?{}:{log:e.log},...e.signal===void 0?{}:{signal:e.signal}})??[];for(const w of _)ue(w)?y.push({name:n.id,piece:n.id,type:w.type,code:w.failure.code,message:w.failure.message,...w.failure.hint?{hint:w.failure.hint}:{}}):await F(await Q(e.out,w,{piece:n.id},u))}return{out:e.out,files:l,failed:y,problems:T,console:B.report(),unindexed:E}}finally{W&&await p.close()}}const we=e=>e.split(Ne).join("/");function Xe(e,r){const o=ae(e,r);return o===""?".":o.startsWith("..")||Ce(o)?r:we(o)}async function Ze(e,r,o,c){const m=[];for(const l of o.length>0?o:[void 0])m.push(await Ee({dir:r,session:e,facts:!1,...l===void 0?{}:{piece:l},...c?{combos:[...c]}:{}}));const $=new Set,v=m.flatMap(l=>l.targets).filter(l=>{const y=`${l.piece}\0${l.key}\0${l.format}`;return $.has(y)?!1:($.add(y),!0)}),I=fe(m.flatMap(l=>l.problems));return{targets:v,results:m.flatMap(l=>l.results),wholes:m.flatMap(l=>l.wholes),problems:I,errors:I.filter(l=>l.level==="error").length,console:_e(e.consoleLimit,...m.map(l=>l.console))}}function et(e){let r="";return o=>{const c=o.status==="failed"?`Could not index ${o.file}: ${o.message}`:o.message;o.status==="running"&&o.share!==void 0||c!==r&&(r=c,e?.(c))}}
2
+ import{CACHE_DIR as Ie}from"@allyhub/formats";import{mkdir as je,stat as Le,writeFile as Pe}from"node:fs/promises";import{cpus as Ce}from"node:os";import{dirname as Ne,isAbsolute as Fe,join as C,relative as de,sep as Oe}from"node:path";import{itemKindBuild as q,madeType as ce,usesInOrder as Re}from"@allyhub/build";import{FILE_TYPES as le,comboKey as fe,exportProblem as Ee,pieceIs as Te,pieceNamed as pe,versionLabel as G}from"@allyhub/piece";import{runCheck as _e}from"@allyhub/check";import{ConsolePool as De,mergeConsole as Ke,dedupe as ue,indexNeeds as We,makeIndex as ze,CheckSession as Be,OpenedVersion as He,keyedStills as Ve,ProjectError as j}from"@allyhub/project";import{batchCsv as Ye,batchRows as qe}from"./batch.js";import{processFile as Ge}from"./processors.js";import{batchName as Je,checkName as Qe,exportName as me,exportNames as Ue}from"./names.js";export const exportsAtOnce=e=>Math.max(1,Math.min(e,Math.floor(Ce().length/4)));const J=(e,r)=>`${String(e)} ${r}${e===1?"":"s"}`,Q=(e,r)=>Te({id:e.id,path:e.entry},r);function Xe(e,r){if(e===void 0)return;const o=new Set([...Object.keys(le),...r.flatMap(d=>d.renders?.types??[])]);for(const d of e)if(!o.has(d))throw new j("bad-type",`Cannot render ${d}.`,"usage",`Types: ${[...o].join(", ")}.`);return[...e]}const Ze=e=>({...e.steps===!0?{steps:!0}:{},...e.pptx==="picture"?{pptx:"picture"}:{}});function he(e,r){return[...e.docs.filter(o=>o.place===r.id).map(o=>o.file),...e.sheets.filter(o=>o.place===r.id).flatMap(o=>o.files)]}async function U(e,r,o,d){const{files:m,type:b,...$}=r,{piece:S,...c}=o,y=m[0]??e,E=(await Promise.all(m.map(N=>Le(N)))).reduce((N,F)=>N+F.size,0);return{files:[...m],...$,name:ke(de(e,y)),path:y,piece:S,type:b,...c,bytes:E,seconds:Math.round((performance.now()-d)/10)/100}}const ge=e=>"failure"in e;export function exportProject(e){return ye(e,new Map)}export const MADE_DIR=`${Ie}/made`;const K=(e,r)=>`${e}\0${r}`;function we(e,r){return o=>{const d=e?.uses?.find($=>$.of===o&&ce($)!==void 0),m=d===void 0?void 0:ce(d);if(!d||m===void 0)return;const b=r.get(K(d.item,m))?.[0];if(b)return d.part===void 0?b.path:b.partFiles?.[d.part]}}async function ye(e,r){const o=Xe(e.types,e.kinds);e.name!==void 0&&Qe(e.name);const d=e.params??{},m=Ze(d),b=e.items??[],$=b.length>0,S=v=>b.some(A=>Q(v,A)),c=[],y=[],E=[],N={root:e.root,out:e.out,params:d,...e.log===void 0?{}:{log:e.log},...e.signal===void 0?{}:{signal:e.signal}},F=async v=>{c.push(await Ge(v,e.processors??[],N))},W=()=>Be.open({root:e.root,kinds:e.kinds,...e.gpu===void 0?{}:{gpu:e.gpu},...e.consoleLimit===void 0?{}:{consoleLimit:e.consoleLimit}});let p=await W(),z=!0;const X={componentStills:(v,A,L)=>Ve(A,{prepared:p.prepared,item:v,combo:L,gpu:p.gpu,withSession:l=>l(p)})},Z=new Set,ee=async(v,A,L)=>{Z.has(v)||(Z.add(v),await A?.ready?.(L,d))};try{const v=p.prepared.items.filter(n=>!$||S(n)),A=n=>{const t=p.prepared.kinds.find(u=>u.id===n.kind)?.renders;return o===void 0?t?.defaults??[]:o.filter(u=>t?.types.includes(u)===!0)},L=Re(p.prepared.items,v,A).filter(n=>!r.has(K(n.item.id,n.type)));if(L.length>0){const n=p.prepared.pieces;z=!1,await p.close();for(const t of L){e.signal?.throwIfAborted();const u=n.find(a=>a.place===t.item.id)?.combos[0];e.log?.(`Making ${t.item.id} as ${t.type} first, which another item uses…`);try{const a=await ye({root:e.root,kinds:e.kinds,items:[t.item.id],types:[t.type],out:C(e.root,MADE_DIR),...u===void 0?{}:{combos:[u]},...e.gpu===void 0?{}:{gpu:e.gpu},...e.consoleLimit===void 0?{}:{consoleLimit:e.consoleLimit},...e.index===void 0?{}:{index:e.index},...e.analyses===void 0?{}:{analyses:e.analyses},...e.log===void 0?{}:{log:e.log},...e.signal===void 0?{}:{signal:e.signal}},r);r.set(K(t.item.id,t.type),a.files.filter(h=>h.type===t.type)),y.push(...a.failed)}catch(a){if(e.signal?.aborted===!0)throw a;r.set(K(t.item.id,t.type),[]),y.push({name:t.item.id,piece:t.item.id,type:t.type,code:a instanceof j?a.code:"failed",message:`${t.item.id}, which another item uses, could not be made: ${a.message}`})}}p=await W(),z=!0}const l=p.prepared,T=n=>l.kinds.find(t=>t.id===n)?.renders,O=[];for(const n of l.items){const t=await q(l.kinds,n);t?.render&&t.onStage!==!0&&O.push({item:n,build:t})}const I=b.filter(n=>!O.some(t=>Q(t.item,n)));for(const n of I)if(!l.pieces.some(t=>pe({id:t.id,path:t.place},n))){const t=l.items.find(a=>Q(a,n)),u=t&&l.problems.filter(a=>a.level==="error"&&(a.piece===t.id||a.where?.file===t.entry||(a.where?.file?.startsWith(`${t.dir}/`)??!1)));throw t&&u&&u.length>0?new j("item-failed",`${t.id} could not be made: ${u.map(a=>a.message).join(" ")}`,"failed","allyhub check lists every problem."):new j("no-item",`No item ${n}.`,"not-found",`Items: ${[...l.pieces.map(a=>a.id),...O.map(a=>a.item.id)].join(", ")||"none"}.`)}const te=$&&I.length===0,be=new Set(l.pieces.flatMap(n=>T(n.kind)?.types??[])),ne=o?.filter(n=>n in le||be.has(n)),$e=te?[]:l.pieces.filter(n=>I.length===0||I.some(t=>pe({id:n.id,path:n.place},t))),B=o?.includes("csv")===!0?$e.filter(n=>n.matrix!==void 0):[];if(o?.includes("csv")===!0&&I.length>0&&B.length===0)throw new j("bad-type",`${I.join(", ")} has no slots (matrix.slots), so there is no table of ads to write as csv.`,"usage","csv is a batch's table of ads, or a sheet's rows.");let _=[...l.problems];const H=new De(p.consoleLimit),xe=new Set(O.flatMap(n=>he(l,n.item))),ve=n=>n.where?.file!==void 0&&xe.has(n.where.file),ie=n=>n.filter(t=>t.level==="error"&&!ve(t)).length;if(!te&&(ne?.length!==0||B.length>0)&&(l.pieces.length>0||ie(l.problems)>0)){e.log?.("Checking…");const n=()=>tt(p,e.root,I,e.combos);let t=await n();const u=e.index===!1?[]:We(t.results);if(u.length>0){const s=await ze(l.root,u,e.analyses??[],{env:e.env??process.env,onProgress:nt(e.log),signal:e.signal});E.push(...s.failed.map(i=>({file:i.need.file,error:i.error}))),s.done.length>0&&(await p.close(),p=await W(),t=await n())}_=t.problems,H.addReport(t.console);const a=ie(t.problems);if(a>0)throw new j("check-failed",`The check found ${J(a,"must-fix problem")}, so nothing is rendered.`,"failed","allyhub check lists them; fix them, then render.");for(const s of B){const i=performance.now(),k=Je(s.id),M=qe(s,t.wholes,p.prepared.media,et(e.root,e.out),e.name);await je(Ne(C(e.out,k)),{recursive:!0}),await Pe(C(e.out,k),Ye(M));const P=t.targets.filter(g=>g.piece===s.id).length;M.length<P&&e.log?.(`${k}: ${J(P-M.length,"ad")} not listed, which did not load (allyhub check says why).`),await F(await U(e.out,{type:"csv",files:[C(e.out,k)]},{piece:s.id},i))}const h=[],R=new Set;for(const s of t.targets){const i=p.prepared.pieces.find(x=>x.id===s.piece);if(!i)continue;if(!$&&i.options.deliverable===!1){R.add(s.piece);continue}const k=T(i.kind),M={kind:i.kind,types:k?.types??[]},P=t.wholes.find(x=>x.piece===s.piece&&fe(x.combo)===s.key&&x.format===s.format)?.speaks??!1,g={piece:s.piece,output:s.output,combo:s.combo,format:s.format,...s.id===void 0?{}:{id:s.id}};for(const x of ne??k?.defaults??[]){const f=Ee({...M,speech:P},x);if(!(f?.code==="bad_type"&&!$)){if(f&&f.code!=="no_speech")throw new j("bad-type",`${G(g)}: ${f.message}`,"usage",f.hint);h.push({target:g,kind:i.kind,type:x,...f?{refused:{name:me(g,x,m),piece:g.piece,type:x,code:"no-speech",message:`${G(g)}: ${f.message}`,...f.hint?{hint:f.hint}:{}}}:{}})}}}R.size>0&&e.log?.(`Not rendered, shown only inside another video (deliverable: false): ${[...R].join(", ")}. Name one to render it.`);for(const s of new Set(h.map(i=>i.kind)))await ee(s,await q(l.kinds,{kind:s}),h.filter(i=>i.kind===s).map(i=>i.type));const D=Ue(h,e.name,m);h.forEach((s,i)=>{s.refused&&(s.refused.name=D[i]??s.refused.name)});const w=[],V=new Array(h.length).fill(0),Y=(s,i)=>{V[s]=Math.max(V[s]??0,i),e.onProgress?.(V.reduce((k,M)=>k+M,0)/h.length)};let oe=0,Se=0;const Ae=async()=>{for(let s=oe++;s<h.length;s=oe++){e.signal?.throwIfAborted();const i=h[s];if(!i)continue;const k=D[s]??me(i.target,i.type,m);if(i.refused){y.push(i.refused),Y(s,1);continue}const M=await q(l.kinds,{kind:i.kind}),P=performance.now(),g=await He.open({root:e.root,session:p,item:i.target.piece,combos:[i.target.combo],purpose:"render"});try{const x=await M?.render?.(l.items.find(f=>f.id===g.piece.place)??{id:g.piece.place,kind:i.kind,dir:g.piece.dir,entry:g.piece.file,groups:[]},{root:e.root,prepared:p.prepared,types:[i.type],out:()=>C(e.out,k),params:d,version:g,session:X,made:we(l.items.find(f=>f.id===g.piece.place),r),onProgress:f=>{Y(s,f)},...e.log===void 0?{}:{log:e.log},...e.signal===void 0?{}:{signal:e.signal}})??[{type:i.type,failure:{code:"no-render",message:`${G(i.target)}: its kind (${i.kind}) makes no files.`}}];for(const f of x){if(ge(f)){y.push({name:k,piece:i.target.piece,type:i.type,code:f.failure.code,message:f.failure.message,...f.failure.hint?{hint:f.failure.hint}:{}});continue}const ae=await U(e.out,f,{piece:i.target.piece,combo:i.target.combo,key:fe(i.target.combo),format:i.target.format},P);await F(ae),e.log?.(`[${String(++Se)}/${String(h.length)}] ${k} (${ae.seconds.toFixed(1)} s)`)}}finally{w.push(...await g.problems()),H.add(i.target,await g.console()),await g.close(),Y(s,1)}}};h.length>0&&e.log?.(`Rendering ${J(h.length,"file")}…`);const re=(await Promise.allSettled(Array.from({length:exportsAtOnce(h.length)},Ae))).find(s=>s.status==="rejected");if(re)throw re.reason;_=ue([..._,...w])}const Me=n=>l.problems.find(t=>t.level==="error"&&t.where?.file!==void 0&&n.includes(t.where.file)),se=[];for(const n of O.filter(t=>!$||S(t.item))){const t=Me(he(l,n.item)),u=T(n.item.kind);t?y.push({name:n.item.id,piece:n.item.id,type:u?.defaults[0]??u?.types[0]??"",code:"check-failed",message:`${t.where?.file??n.item.entry}: ${t.message}`,hint:"Fix it, then render again."}):se.push(n)}e.signal?.throwIfAborted();for(const{item:n,build:t}of se){const u=T(n.kind),a=o===void 0?u?.defaults??[]:o.filter(w=>u?.types.includes(w)===!0);if(a.length===0)continue;await ee(n.kind,t,a);const h=performance.now(),R=n.id,D=await t.render?.(n,{root:e.root,prepared:p.prepared,types:a,out:w=>C(e.out,`${R}.${w}`),params:d,session:X,made:we(n,r),...e.log===void 0?{}:{log:e.log},...e.signal===void 0?{}:{signal:e.signal}})??[];for(const w of D)ge(w)?y.push({name:n.id,piece:n.id,type:w.type,code:w.failure.code,message:w.failure.message,...w.failure.hint?{hint:w.failure.hint}:{}}):await F(await U(e.out,w,{piece:n.id},h))}return{out:e.out,files:c,failed:y,problems:_,console:H.report(),unindexed:E}}finally{z&&await p.close()}}const ke=e=>e.split(Oe).join("/");function et(e,r){const o=de(e,r);return o===""?".":o.startsWith("..")||Fe(o)?r:ke(o)}async function tt(e,r,o,d){const m=[];for(const c of o.length>0?o:[void 0])m.push(await _e({dir:r,session:e,facts:!1,...c===void 0?{}:{piece:c},...d?{combos:[...d]}:{}}));const b=new Set,$=m.flatMap(c=>c.targets).filter(c=>{const y=`${c.piece}\0${c.key}\0${c.format}`;return b.has(y)?!1:(b.add(y),!0)}),S=ue(m.flatMap(c=>c.problems));return{targets:$,results:m.flatMap(c=>c.results),wholes:m.flatMap(c=>c.wholes),problems:S,errors:S.filter(c=>c.level==="error").length,console:Ke(e.consoleLimit,...m.map(c=>c.console))}}function nt(e){let r="";return o=>{const d=o.status==="failed"?`Could not index ${o.file}: ${o.message}`:o.message;o.status==="running"&&o.share!==void 0||d!==r&&(r=d,e?.(d))}}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/export",
3
- "version": "0.15.2",
3
+ "version": "0.17.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/extension-api",
3
- "version": "0.15.2",
3
+ "version": "0.17.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{CORE as _,declareRules as v,ruleOf as C}from"@allyhub/diagnostics";import{STAGE_LOADS as R}from"@allyhub/formats";import{LOCALES as A}from"@allyhub/i18n";import{PROJECT_TOOLS as L,RuntimeSchema as M,StageFolderSchema as W,StageLoadSchema as V,known as D}from"@allyhub/protocol";import{z as n}from"zod";import{KEY as K,MENUS as U,SETTING_TYPES as E,VIEW_CONTAINERS as p,inMenuBar as G,settingProblem as O,whenProblem as H}from"./shell.js";export const definePoint=e=>e,WordsSchema=n.record(n.string(),n.string().min(1));export function missingLocales(e){return A.filter(t=>!(t in e))}export const wordIn=(e,t)=>e[t]??e.en??Object.values(e)[0]??"";const h=n.string().regex(/^(@[a-z0-9][\w.-]*\/)?[a-z0-9][\w.-]*(\/[\w.-]+)*$/u);function b(e,t,i){if(typeof e!="object"||e===null||Array.isArray(e))return`is not an object of ${t}.`;const o=[];for(const[s,a]of Object.entries(e)){if(!Array.isArray(a))return`.${s} is not a list.`;a.forEach((d,u)=>{o.push([`.${s}[${String(u)}]`,typeof d=="object"&&d!==null?{...d,[i]:s}:d])})}return o}const y=n.string().regex(/^[a-z0-9][\w-]*(\.[\w-]+)+$/u),f=n.string().superRefine((e,t)=>{const i=H(e);i!==void 0&&t.addIssue({code:"custom",message:i})}),J=n.object({id:y,title:WordsSchema,enablement:f.optional(),place:n.enum(["workspace","ui"]).default("workspace")});export const COMMANDS=definePoint({id:"commands",about:"Commands a person runs from the palette, the menus and the keys.",entry:J,key:e=>e.id,activation:(e,t)=>e.place===t?[`onCommand:${e.id}`]:[],check:e=>{const t=missingLocales(e.title);return t.length>0?[`${e.id}'s title has no words in ${t.join(", ")}.`]:[]}});const B=n.object({command:y,key:n.string().regex(K,{message:"A key is modifiers among Mod, Shift and Alt, then a capital letter, a digit, a sign or a key's name (Mod+Shift+H)."}),when:f.optional()});export const KEYBINDING_POINT=definePoint({id:"keybindings",about:"Keys that run commands, each while its when clause holds.",entry:B});const F=n.object({menu:n.string().min(1),command:y,when:f.optional(),group:n.string().min(1).optional()});export const MENU_POINT=definePoint({id:"menus",about:`Commands in menus, by menu (${U.join(", ")}), each while its when clause holds.`,entry:F,entries:e=>b(e,"menus","menu"),check:e=>G(e.menu)?[`${e.command} is not placed in ${e.menu}: Studio's menu bar shows the core's entries alone yet.`]:[]});const x="Studio places no extension's view yet; its work card and its sidebar show the core's alone.",Y=n.object({location:n.string().min(1),id:n.string().regex(/^[a-z0-9][\w-]*(\.[\w-]+)+$/u),title:WordsSchema,icon:n.string().min(1).optional()});export const VIEW_CONTAINER_POINT=definePoint({id:"viewsContainers",about:`Containers of views, by where each goes; the shell gives its own (${p.join(", ")}) and takes none of an extension's yet.`,entry:Y,entries:e=>b(e,"places","location"),key:e=>e.id,check:e=>{const t=missingLocales(e.title);return[...t.length>0?[`${e.id}'s title has no words in ${t.join(", ")}.`]:[],`the container ${e.id} is not placed: ${x}`]}});const Z=n.object({container:n.string().min(1),id:n.string().regex(/^[a-z0-9][\w-]*(\.[\w-]+)+$/u),name:WordsSchema,when:f.optional(),icon:n.string().min(1).optional(),module:h.optional()});export const VIEW_POINT=definePoint({id:"views",about:`Views, by the container each is in (${p.join(", ")}): a page in a frame, as an editor is.`,entry:Z,entries:e=>b(e,"containers","container"),key:e=>e.id,check:e=>{const t=missingLocales(e.name);return[...p.includes(e.container)?[]:[`${e.container} is not a container: a view goes in ${p.join(" or ")}.`],...t.length>0?[`${e.id}'s name has no words in ${t.join(", ")}.`]:[],...e.module===void 0?[`${e.id} names no module: a view is a page's module, as an editor is.`]:[],`the view ${e.id} is not placed: ${x}`]}});const S=n.union([n.string(),n.boolean(),n.number()]),X=n.object({type:n.string().min(1),default:S.optional(),title:WordsSchema,description:WordsSchema.optional(),enum:n.array(S).min(1).optional(),enumItemLabels:n.array(WordsSchema).optional(),enumDescriptions:n.array(WordsSchema).optional(),minimum:n.number().optional(),maximum:n.number().optional(),minLength:n.number().int().min(0).optional(),order:n.number().int().optional()}),q=n.object({title:WordsSchema,order:n.number().int().optional(),properties:n.record(n.string(),X)});function Q(e,t){const i=[],o=(s,a)=>{const d=missingLocales(a);d.length>0&&i.push(`${e}'s ${s} has no words in ${d.join(", ")}.`)};return o("title",t.title),t.description!==void 0&&o("description",t.description),t.enumItemLabels?.forEach((s,a)=>{o(`label of choice ${String(a+1)}`,s)}),t.enumDescriptions?.forEach((s,a)=>{o(`description of choice ${String(a+1)}`,s)}),i}export const CONFIGURATION_POINT=definePoint({id:"configuration",about:"Settings: a title and JSON Schema properties by key, drawn as rows in the shell and read through allyhub.settings.",entry:q,entries:e=>Array.isArray(e)?e.map((t,i)=>[`[${String(i)}]`,t]):typeof e=="object"&&e!==null?[["",e]]:"is not a configuration or a list of them.",check:(e,t)=>{const i=[],o=missingLocales(e.title);o.length>0&&i.push(`a configuration's title has no words in ${o.join(", ")}.`);for(const[s,a]of Object.entries(e.properties)){if((!s.startsWith(`${t}.`)||s===`${t}.`)&&i.push(`${s} is not named by its extension: a setting's key is ${t}. and a name.`),i.push(...Q(s,a)),!E.includes(a.type)){i.push(`${s} is of type ${a.type}: a shell draws ${E.join(", ")}.`);continue}const d={...a,type:a.type};for(const[u,m]of(a.enum??[]).entries()){const c=O({type:d.type},m);c!==void 0&&i.push(`${s}'s choice ${String(u+1)}: ${c}`)}if(a.default!==void 0){const u=O(d,a.default);u!==void 0&&i.push(`${s}'s default: ${u}`)}for(const u of["enumItemLabels","enumDescriptions"]){const m=a[u];m!==void 0&&m.length!==(a.enum?.length??0)&&i.push(`${s}'s ${u} are ${String(m.length)}, and its choices ${String(a.enum?.length??0)}.`)}}return i}});const ee=n.object({name:n.string().regex(/^[a-z0-9][a-z0-9_-]*$/u),title:n.string().min(1),description:n.string().min(1),inputSchema:n.record(n.string(),n.unknown()),annotations:n.object({readOnlyHint:n.boolean(),destructiveHint:n.boolean(),idempotentHint:n.boolean(),openWorldHint:n.boolean()}).partial().optional()});export const WINDOW_TOOL_POINT=definePoint({id:"windowTools",about:"Tools an agent calls that act in the person's window, during its own turn: a name, a description, a JSON Schema of the input.",entry:ee,key:e=>e.name,check:e=>{const t=z(e.inputSchema);return[...t===void 0?[]:[`${e.name}'s inputSchema ${t}`],`the window tool ${e.name} is not given: Studio's MCP server gives the core's tools alone yet.`]}});const ne=n.object({name:n.string().regex(/^[a-z0-9][a-z0-9-]*( [a-z0-9][a-z0-9-]*){0,2}$/u),summary:n.string().min(1),work:n.string().min(1).optional(),module:n.string().min(1)});export const CLI_COMMANDS=definePoint({id:"cliCommands",about:"Commands the agent runs, `allyhub <name>`, listed in `allyhub help` before their module is loaded.",entry:ne,key:e=>e.name});const te=n.object({name:n.string().regex(/^[a-z0-9][a-z0-9.-]*\/[a-z][a-z0-9-]*$/u),source:n.enum(["project","asleep","machine"]),does:n.union([n.object({command:n.string().min(1)}),n.object({files:n.string().min(1)}),n.object({person:n.string().min(1)})]),module:n.string().min(1),readView:h.optional()});export const PROJECT_TOOL_POINT=definePoint({id:"projectTools",about:"Project tools: what an editor asks of a project through tools/call, each with the command or files that do the same for the agent.",entry:te,key:e=>e.name,check:(e,t)=>{if(Object.hasOwn(L,e.name))return[`${e.name} is the core's own project tool.`];const i=e.name.slice(0,e.name.lastIndexOf("/"));return T(t)||i===t?[]:[`the project tool ${e.name} does not start with its extension's id (${t}/…).`]}});const oe=n.object({folder:W,loads:n.array(V),module:n.string().min(1)});export const STAGE_ROUTE_POINT=definePoint({id:"stageRoutes",about:"Stage routes: a folder of the stage's tree an extension answers, what the stage's pages load from it, and what a snapshot records of it.",entry:oe,key:e=>e.folder});const ie=n.object({name:n.string().min(1),only:n.array(n.string().min(1)).min(1),values:n.array(n.string().min(1)).optional()}),se=n.object({files:n.record(n.string().min(1),n.string()),entry:n.string().min(1)}),w=e=>!e.startsWith("/")&&!e.includes("\\")&&e.split("/").every(t=>t!==""&&t!=="."&&t!==".."),ae=n.object({id:n.string().regex(/^[a-z][a-z0-9-]*$/u),name:WordsSchema,plural:WordsSchema.optional(),noun:n.string().min(1),part:n.object({noun:n.string().min(1),plural:n.string().min(1)}).optional(),pages:n.boolean().optional(),editor:n.string().min(1).optional(),shown:n.object({line:WordsSchema,order:n.number()}).optional(),icon:n.string().min(1).optional(),color:n.string().min(1).optional(),exports:n.object({types:n.array(n.string().min(1)).min(1),extras:n.array(n.string().min(1)).default([]),options:n.array(ie).default([]),names:n.record(n.string().min(1),WordsSchema).default({})}).optional(),renders:n.object({types:n.array(n.string().min(1)).min(1),defaults:n.array(n.string().min(1)).min(1)}).optional(),starter:se.optional(),share:n.boolean().optional(),build:n.string().min(1).optional()});export const KIND_POINT=definePoint({id:"kinds",about:"Kinds of item: their names, their editor, their icon and colour, what they export and render, what a new one starts as, whether one is shared alone.",entry:ae,key:e=>e.id,activation:(e,t)=>t==="workspace"?[`onKind:${e.id}`]:[],check:e=>{const t=[],i=missingLocales(e.name);i.length>0&&t.push(`${e.id}'s name has no words in ${i.join(", ")}.`);const o=e.plural&&missingLocales(e.plural);o&&o.length>0&&t.push(`${e.id}'s plural has no words in ${o.join(", ")}.`);for(const[a,d]of Object.entries(e.exports?.names??{})){const u=missingLocales(d);u.length>0&&t.push(`${e.id}'s name for its export ${a} has no words in ${u.join(", ")}.`)}const s=Object.keys(e.starter?.files??{});for(const a of s.filter(d=>!w(d)))t.push(`${e.id}'s starter file ${a} is not inside the new item's folder.`);return e.starter&&!s.includes(e.starter.entry)&&t.push(`${e.id}'s starter's entry ${e.starter.entry} is none of its files.`),t}});const I=n.union([n.string().min(1),n.array(n.string().min(1)).min(1)]),re=n.object({id:n.string().regex(/^[a-z0-9][\w-]*(\.[\w-]+)+$/u),markup:I.optional(),kinds:n.array(n.string().min(1)).default([]),files:n.array(n.string().min(1)).default([]),noun:n.string().min(1).optional(),name:WordsSchema.optional(),plural:WordsSchema.optional(),icon:n.string().min(1).optional(),color:n.string().min(1).optional(),check:n.string().min(1).optional(),priority:n.enum(["default","option"]).default("default"),module:h.optional(),place:n.record(n.string(),n.unknown()).optional()});function z(e){if(e.type!=="object")return'is not of "type": "object".';try{n.fromJSONSchema(e)}catch(t){return`is not a JSON Schema zod reads: ${t instanceof Error?t.message:String(t)}.`}}export const EDITOR_POINT=definePoint({id:"editors",about:"Editors: the kinds each opens, or the files it opens by their names (glob patterns, with their name, sign and check), whether it is their default, the module a page imports for it, and the schema of where a person is in what it opens.",entry:re,key:e=>e.id,activation:(e,t)=>t==="ui"?[`onEditor:${e.id}`]:[],check:e=>{const t=[],i=e.place&&z(e.place);if(i!==void 0&&t.push(`${e.id}'s place ${i}`),e.kinds.length===0&&e.files.length===0&&t.push(`${e.id} opens no kind and no files.`),e.kinds.length>0&&e.files.length>0&&t.push(`${e.id} opens kinds and files: an editor opens one or the other.`),e.files.length>0){e.noun===void 0&&t.push(`${e.id} opens files and has no noun for them.`),e.name===void 0&&t.push(`${e.id} opens files and has no name for them.`);for(const[o,s]of[["name",e.name],["plural",e.plural]]){const a=s===void 0?[]:missingLocales(s);a.length>0&&t.push(`${e.id}'s ${o} has no words in ${a.join(", ")}.`)}for(const o of e.files)(o.startsWith("/")||o.split("/").includes(".."))&&t.push(`${e.id}'s pattern ${o} is not of project paths (no leading /, no ..).`)}else e.check!==void 0&&t.push(`${e.id} has a check and opens no files: a kind's items are checked by its build.`);return t}});export function fileEditorTable(e,t=(i,o)=>o){return e.flatMap(({extension:i,entry:o})=>o.files.length===0||o.name===void 0||o.noun===void 0?[]:[{id:o.id,files:[...o.files],noun:o.noun,name:{...o.name},...o.plural===void 0?{}:{plural:{...o.plural}},...o.icon===void 0?{}:{icon:o.icon},...o.color===void 0?{}:{color:o.color},...o.priority==="option"?{priority:o.priority}:{},...o.check===void 0?{}:{check:t(i,o.check)},extension:i}])}const de=n.object({id:n.string().regex(/^[a-z0-9][\w-]*(\.[\w-]+)+$/u),markup:I.optional(),types:n.array(n.string().regex(/^[a-z]+\/(?:\*|[\w.+-]+)$/u)).min(1),module:h});export const PREVIEW_RENDERER_POINT=definePoint({id:"previewRenderers",about:"Preview renderers: how a file of a media type is drawn wherever one is shown (a canvas's node); each its media types and the module a page imports for it.",entry:de,key:e=>e.id});const T=e=>e.startsWith("allyhub.");function $(e,t,i){return T(e)||t.startsWith(`${e}/`)?[]:[`the ${i} ${t} does not start with its extension's id (${e}/…).`]}const le=n.object({code:n.string().regex(/^(AK-[A-Z]\d{3}|[a-z0-9][a-z0-9-]*\.[a-z0-9][a-z0-9-]*\/[A-Za-z0-9][\w.-]*)$/u),level:n.enum(["error","warn"]),rule:n.string().min(1)});export const RULE_POINT=definePoint({id:"rules",about:"Rules: the codes an extension reports problems under, each with its level and what it says.",entry:le,key:e=>e.code,check:(e,t)=>{const i=C(e.code);return[...$(t,e.code,"rule"),...i&&i.extension!==t?[`${e.code} is ${i.extension===_?"the core's":`${i.extension}'s`} rule already.`]:[]]},added:(e,t)=>v(t,[e])});const ce=n.object({kind:n.string().regex(/^([a-z][a-z0-9-]*|[a-z0-9][a-z0-9-]*\.[a-z0-9][a-z0-9-]*\/[a-z][a-z0-9-]*)$/u),about:n.string().min(1)});export const FACT_POINT=definePoint({id:"facts",about:"Kinds of fact: what an extension measures for the agent to judge, each with what it says.",entry:ce,key:e=>e.kind,check:(e,t)=>$(t,e.kind,"kind of fact")});const ue=n.object({module:n.string().min(1)});export const BUILD_PLUGINS_POINT=definePoint({id:"buildPlugins",about:"Build plugins: a module whose Vite plugins and lent packages every stage bundle of a project takes.",entry:ue});const k=n.string().min(1),me=n.object({name:n.string().regex(/^[a-z][a-z0-9-]*$/u),summary:n.string().min(1),module:k});export const INSPECT_VIEW_POINT=definePoint({id:"inspectViews",about:"Views of `allyhub inspect <name>`: a measurement now, listed in `allyhub help` before its module is loaded.",entry:me,key:e=>e.name});const pe=n.object({id:n.string().regex(/^[a-z0-9][\w-]*(\.[\w-]+)+$/u),types:n.array(n.string().min(1)).min(1),module:k});export const EXPORT_PROCESSOR_POINT=definePoint({id:"exportProcessors",about:"Export processors: a step run on every file of the types it names that an export makes.",entry:pe,key:e=>e.id,check:(e,t)=>e.id.startsWith(`${t}.`)?[]:[`the processor ${e.id} does not start with its extension's id (${t}.…).`]});const he=n.object({id:n.string().regex(/^([a-z][a-z0-9-]*|[a-z0-9][a-z0-9-]*\.[a-z0-9][a-z0-9-]*\/[a-z][a-z0-9-]*)$/u),about:n.string().min(1),what:n.string().min(1),media:n.array(n.enum(["image","audio","video"])).min(1),runtimes:n.array(n.string().regex(/^[a-z0-9][a-z0-9-]*$/u)).default([]),module:k});export const MEDIA_ANALYSIS_POINT=definePoint({id:"mediaAnalyses",about:"Media analyses: what the media index measures of a file once, by its content, when a version needs it.",entry:he,key:e=>e.id,check:(e,t)=>$(t,e.id,"media analysis")});const fe=n.object({id:n.string().regex(/^[a-z0-9][a-z0-9-]*$/u),...M.shape});export const RUNTIME_POINT=definePoint({id:"runtimes",about:"Runtimes: a tool's pinned download (a program, a model), fetched when first needed, checked, cached.",entry:fe,key:e=>e.id}),SKILL_NAME=/^(?=.{1,64}$)[a-z0-9]+(-[a-z0-9]+)*$/u;const g=e=>e.replace(/^\.\//u,"").replace(/\/+$/u,""),ge=n.object({path:n.string().min(1)});export const SKILL_POINT=definePoint({id:"skills",about:"Skills for the agent: a folder laid out as an Agent Skill's, a skill of its own or files of the skill of its name.",entry:ge,check:e=>{const t=g(e.path);if(!w(t))return[`the skill folder ${e.path} is not a folder inside its package.`];const i=t.slice(t.lastIndexOf("/")+1);return SKILL_NAME.test(i)?[]:[`the skill folder ${e.path} is not named as a skill is (lower-case letters, digits and hyphens, at most 64).`]}});const P=n.record(n.string(),n.string()),be=n.union([n.object({name:n.string().regex(/^[a-z0-9][a-z0-9_-]*$/u),command:n.string().min(1),args:n.array(n.string()).default([]),env:P.default({}),cwd:n.string().min(1).optional()}),n.object({name:n.string().regex(/^[a-z0-9][a-z0-9_-]*$/u),url:n.url(),headers:P.default({})})]);export const MCP_SERVER_POINT=definePoint({id:"mcpServers",about:"MCP servers: a local program or an address that gives an agent tools, defined as .mcp.json defines one.",entry:be,key:e=>e.name,check:e=>"cwd"in e&&e.cwd!==void 0&&!w(g(e.cwd))?[`the MCP server ${e.name}'s cwd is not a folder inside its package.`]:[]}),CORE_POINTS=[COMMANDS,KEYBINDING_POINT,MENU_POINT,VIEW_CONTAINER_POINT,VIEW_POINT,CONFIGURATION_POINT,WINDOW_TOOL_POINT,CLI_COMMANDS,KIND_POINT,EDITOR_POINT,PREVIEW_RENDERER_POINT,RULE_POINT,FACT_POINT,BUILD_PLUGINS_POINT,PROJECT_TOOL_POINT,STAGE_ROUTE_POINT,INSPECT_VIEW_POINT,EXPORT_PROCESSOR_POINT,MEDIA_ANALYSIS_POINT,RUNTIME_POINT,SKILL_POINT,MCP_SERVER_POINT];export function kindTable(e,t=(d,u)=>u,i=[],o=[],s=[],a=()=>{}){const d=c=>{const r=i.filter(l=>l.extension===c).map(l=>t(c,l.entry.module));return r.length>0?r:void 0},u=c=>{const r=o.filter(l=>l.extension===c).map(({entry:l})=>({name:l.name,source:l.source,does:l.does,module:t(c,l.module),extension:c}));return r.length>0?r:void 0},m=c=>{const r=s.filter(l=>l.extension===c).map(({entry:l})=>({folder:l.folder,loads:l.loads.filter(N=>D(R,N)),module:t(c,l.module),extension:c}));return r.length>0?r:void 0};return e.map(({extension:c,entry:r})=>({id:r.id,editor:r.editor,noun:r.noun,part:r.part,...r.pages===!0?{pages:!0}:{},name:r.name,plural:r.plural,icon:r.icon,color:r.color,exports:r.exports&&{types:r.exports.types,extras:r.exports.extras,options:r.exports.options.map(l=>({name:l.name,only:l.only,...l.values===void 0?{}:{values:l.values}})),...Object.keys(r.exports.names).length===0?{}:{names:r.exports.names}},renders:r.renders&&{types:r.renders.types,defaults:r.renders.defaults},starter:r.starter&&{files:{...r.starter.files},entry:r.starter.entry},share:r.share,build:r.build===void 0?void 0:t(c,r.build),buildPlugins:d(c),projectTools:u(c),stageRoutes:m(c),points:a(c),extension:c}))}export const inspectViewTable=(e,t)=>e.map(({extension:i,entry:o})=>({name:o.name,summary:o.summary,module:t(i,o.module),extension:i})),cliCommandTable=(e,t)=>e.map(({extension:i,entry:o})=>({name:o.name,summary:o.summary,...o.work===void 0?{}:{work:o.work},module:t(i,o.module),extension:i})),processorTable=(e,t)=>e.map(({extension:i,entry:o})=>({id:o.id,types:o.types,module:t(i,o.module),extension:i})),analysisTable=(e,t)=>e.map(({extension:i,entry:o})=>({id:o.id,about:o.about,what:o.what,media:o.media,runtimes:o.runtimes,module:t(i,o.module),extension:i})),skillTable=(e,t)=>e.map(({extension:i,entry:o})=>{const s=g(o.path);return{name:s.slice(s.lastIndexOf("/")+1),folder:t(i,s),extension:i}});const j=(e,t)=>e.replaceAll("${PLUGIN_ROOT}",t);export const mcpServerTable=(e,t,i)=>e.map(({extension:o,entry:s})=>{if("url"in s)return{name:s.name,url:s.url,headers:{...s.headers},extension:o};const a=t(o);return{name:s.name,command:j(s.command,a),args:s.args.map(d=>j(d,a)),env:Object.fromEntries(Object.entries(s.env).map(([d,u])=>[d,j(u,a)])),cwd:s.cwd===void 0?a:i(o,g(s.cwd)),extension:o}});
2
+ import{CORE as _,declareRules as v,ruleOf as C}from"@allyhub/diagnostics";import{STAGE_LOADS as R}from"@allyhub/formats";import{LOCALES as A}from"@allyhub/i18n";import{PROJECT_TOOLS as L,RuntimeSchema as M,StageFolderSchema as W,StageLoadSchema as V,known as D}from"@allyhub/protocol";import{z as n}from"zod";import{KEY as K,MENUS as U,SETTING_TYPES as E,VIEW_CONTAINERS as p,inMenuBar as G,settingProblem as O,whenProblem as H}from"./shell.js";export const definePoint=e=>e,WordsSchema=n.record(n.string(),n.string().min(1));export function missingLocales(e){return A.filter(t=>!(t in e))}export const wordIn=(e,t)=>e[t]??e.en??Object.values(e)[0]??"";const h=n.string().regex(/^(@[a-z0-9][\w.-]*\/)?[a-z0-9][\w.-]*(\/[\w.-]+)*$/u);function b(e,t,i){if(typeof e!="object"||e===null||Array.isArray(e))return`is not an object of ${t}.`;const o=[];for(const[s,r]of Object.entries(e)){if(!Array.isArray(r))return`.${s} is not a list.`;r.forEach((d,u)=>{o.push([`.${s}[${String(u)}]`,typeof d=="object"&&d!==null?{...d,[i]:s}:d])})}return o}const y=n.string().regex(/^[a-z0-9][\w-]*(\.[\w-]+)+$/u),f=n.string().superRefine((e,t)=>{const i=H(e);i!==void 0&&t.addIssue({code:"custom",message:i})}),J=n.object({id:y,title:WordsSchema,enablement:f.optional(),place:n.enum(["workspace","ui"]).default("workspace")});export const COMMANDS=definePoint({id:"commands",about:"Commands a person runs from the palette, the menus and the keys.",entry:J,key:e=>e.id,activation:(e,t)=>e.place===t?[`onCommand:${e.id}`]:[],check:e=>{const t=missingLocales(e.title);return t.length>0?[`${e.id}'s title has no words in ${t.join(", ")}.`]:[]}});const B=n.object({command:y,key:n.string().regex(K,{message:"A key is modifiers among Mod, Shift and Alt, then a capital letter, a digit, a sign or a key's name (Mod+Shift+H)."}),when:f.optional()});export const KEYBINDING_POINT=definePoint({id:"keybindings",about:"Keys that run commands, each while its when clause holds.",entry:B});const F=n.object({menu:n.string().min(1),command:y,when:f.optional(),group:n.string().min(1).optional()});export const MENU_POINT=definePoint({id:"menus",about:`Commands in menus, by menu (${U.join(", ")}), each while its when clause holds.`,entry:F,entries:e=>b(e,"menus","menu"),check:e=>G(e.menu)?[`${e.command} is not placed in ${e.menu}: Studio's menu bar shows the core's entries alone yet.`]:[]});const x="Studio places no extension's view yet; its work card and its sidebar show the core's alone.",Y=n.object({location:n.string().min(1),id:n.string().regex(/^[a-z0-9][\w-]*(\.[\w-]+)+$/u),title:WordsSchema,icon:n.string().min(1).optional()});export const VIEW_CONTAINER_POINT=definePoint({id:"viewsContainers",about:`Containers of views, by where each goes; the shell gives its own (${p.join(", ")}) and takes none of an extension's yet.`,entry:Y,entries:e=>b(e,"places","location"),key:e=>e.id,check:e=>{const t=missingLocales(e.title);return[...t.length>0?[`${e.id}'s title has no words in ${t.join(", ")}.`]:[],`the container ${e.id} is not placed: ${x}`]}});const Z=n.object({container:n.string().min(1),id:n.string().regex(/^[a-z0-9][\w-]*(\.[\w-]+)+$/u),name:WordsSchema,when:f.optional(),icon:n.string().min(1).optional(),module:h.optional()});export const VIEW_POINT=definePoint({id:"views",about:`Views, by the container each is in (${p.join(", ")}): a page in a frame, as an editor is.`,entry:Z,entries:e=>b(e,"containers","container"),key:e=>e.id,check:e=>{const t=missingLocales(e.name);return[...p.includes(e.container)?[]:[`${e.container} is not a container: a view goes in ${p.join(" or ")}.`],...t.length>0?[`${e.id}'s name has no words in ${t.join(", ")}.`]:[],...e.module===void 0?[`${e.id} names no module: a view is a page's module, as an editor is.`]:[],`the view ${e.id} is not placed: ${x}`]}});const S=n.union([n.string(),n.boolean(),n.number()]),X=n.object({type:n.string().min(1),default:S.optional(),title:WordsSchema,description:WordsSchema.optional(),enum:n.array(S).min(1).optional(),enumItemLabels:n.array(WordsSchema).optional(),enumDescriptions:n.array(WordsSchema).optional(),minimum:n.number().optional(),maximum:n.number().optional(),minLength:n.number().int().min(0).optional(),order:n.number().int().optional()}),q=n.object({title:WordsSchema,order:n.number().int().optional(),properties:n.record(n.string(),X)});function Q(e,t){const i=[],o=(s,r)=>{const d=missingLocales(r);d.length>0&&i.push(`${e}'s ${s} has no words in ${d.join(", ")}.`)};return o("title",t.title),t.description!==void 0&&o("description",t.description),t.enumItemLabels?.forEach((s,r)=>{o(`label of choice ${String(r+1)}`,s)}),t.enumDescriptions?.forEach((s,r)=>{o(`description of choice ${String(r+1)}`,s)}),i}export const CONFIGURATION_POINT=definePoint({id:"configuration",about:"Settings: a title and JSON Schema properties by key, drawn as rows in the shell and read through allyhub.settings.",entry:q,entries:e=>Array.isArray(e)?e.map((t,i)=>[`[${String(i)}]`,t]):typeof e=="object"&&e!==null?[["",e]]:"is not a configuration or a list of them.",check:(e,t)=>{const i=[],o=missingLocales(e.title);o.length>0&&i.push(`a configuration's title has no words in ${o.join(", ")}.`);for(const[s,r]of Object.entries(e.properties)){if((!s.startsWith(`${t}.`)||s===`${t}.`)&&i.push(`${s} is not named by its extension: a setting's key is ${t}. and a name.`),i.push(...Q(s,r)),!E.includes(r.type)){i.push(`${s} is of type ${r.type}: a shell draws ${E.join(", ")}.`);continue}const d={...r,type:r.type};for(const[u,m]of(r.enum??[]).entries()){const c=O({type:d.type},m);c!==void 0&&i.push(`${s}'s choice ${String(u+1)}: ${c}`)}if(r.default!==void 0){const u=O(d,r.default);u!==void 0&&i.push(`${s}'s default: ${u}`)}for(const u of["enumItemLabels","enumDescriptions"]){const m=r[u];m!==void 0&&m.length!==(r.enum?.length??0)&&i.push(`${s}'s ${u} are ${String(m.length)}, and its choices ${String(r.enum?.length??0)}.`)}}return i}});const ee=n.object({name:n.string().regex(/^[a-z0-9][a-z0-9_-]*$/u),title:n.string().min(1),description:n.string().min(1),inputSchema:n.record(n.string(),n.unknown()),annotations:n.object({readOnlyHint:n.boolean(),destructiveHint:n.boolean(),idempotentHint:n.boolean(),openWorldHint:n.boolean()}).partial().optional()});export const WINDOW_TOOL_POINT=definePoint({id:"windowTools",about:"Tools an agent calls that act in the person's window, during its own turn: a name, a description, a JSON Schema of the input.",entry:ee,key:e=>e.name,check:e=>{const t=z(e.inputSchema);return[...t===void 0?[]:[`${e.name}'s inputSchema ${t}`],`the window tool ${e.name} is not given: Studio's MCP server gives the core's tools alone yet.`]}});const ne=n.object({name:n.string().regex(/^[a-z0-9][a-z0-9-]*( [a-z0-9][a-z0-9-]*){0,2}$/u),summary:n.string().min(1),work:n.string().min(1).optional(),module:n.string().min(1)});export const CLI_COMMANDS=definePoint({id:"cliCommands",about:"Commands the agent runs, `allyhub <name>`, listed in `allyhub help` before their module is loaded.",entry:ne,key:e=>e.name});const te=n.object({name:n.string().regex(/^[a-z0-9][a-z0-9.-]*\/[a-z][a-z0-9-]*$/u),source:n.enum(["project","asleep","machine"]),does:n.union([n.object({command:n.string().min(1)}),n.object({files:n.string().min(1)}),n.object({person:n.string().min(1)})]),module:n.string().min(1),readView:h.optional()});export const PROJECT_TOOL_POINT=definePoint({id:"projectTools",about:"Project tools: what an editor asks of a project through tools/call, each with the command or files that do the same for the agent.",entry:te,key:e=>e.name,check:(e,t)=>{if(Object.hasOwn(L,e.name))return[`${e.name} is the core's own project tool.`];const i=e.name.slice(0,e.name.lastIndexOf("/"));return T(t)||i===t?[]:[`the project tool ${e.name} does not start with its extension's id (${t}/…).`]}});const oe=n.object({folder:W,loads:n.array(V),module:n.string().min(1)});export const STAGE_ROUTE_POINT=definePoint({id:"stageRoutes",about:"Stage routes: a folder of the stage's tree an extension answers, what the stage's pages load from it, and what a snapshot records of it.",entry:oe,key:e=>e.folder});const ie=n.object({name:n.string().min(1),only:n.array(n.string().min(1)).min(1),values:n.array(n.string().min(1)).optional()}),se=n.object({files:n.record(n.string().min(1),n.string()),entry:n.string().min(1)}),w=e=>!e.startsWith("/")&&!e.includes("\\")&&e.split("/").every(t=>t!==""&&t!=="."&&t!==".."),ae=n.object({id:n.string().regex(/^[a-z][a-z0-9-]*$/u),name:WordsSchema,plural:WordsSchema.optional(),noun:n.string().min(1),part:n.object({noun:n.string().min(1),plural:n.string().min(1)}).optional(),pages:n.boolean().optional(),editor:n.string().min(1).optional(),shown:n.object({line:WordsSchema,order:n.number()}).optional(),icon:n.string().min(1).optional(),color:n.string().min(1).optional(),exports:n.object({types:n.array(n.string().min(1)).min(1),extras:n.array(n.string().min(1)).default([]),options:n.array(ie).default([]),names:n.record(n.string().min(1),WordsSchema).default({})}).optional(),renders:n.object({types:n.array(n.string().min(1)).min(1),defaults:n.array(n.string().min(1)).min(1)}).optional(),starter:se.optional(),turnInto:n.boolean().optional(),share:n.boolean().optional(),build:n.string().min(1).optional()});export const KIND_POINT=definePoint({id:"kinds",about:"Kinds of item: their names, their editor, their icon and colour, what they export and render, what a new one starts as, whether one is shared alone.",entry:ae,key:e=>e.id,activation:(e,t)=>t==="workspace"?[`onKind:${e.id}`]:[],check:e=>{const t=[],i=missingLocales(e.name);i.length>0&&t.push(`${e.id}'s name has no words in ${i.join(", ")}.`);const o=e.plural&&missingLocales(e.plural);o&&o.length>0&&t.push(`${e.id}'s plural has no words in ${o.join(", ")}.`);for(const[r,d]of Object.entries(e.exports?.names??{})){const u=missingLocales(d);u.length>0&&t.push(`${e.id}'s name for its export ${r} has no words in ${u.join(", ")}.`)}const s=Object.keys(e.starter?.files??{});for(const r of s.filter(d=>!w(d)))t.push(`${e.id}'s starter file ${r} is not inside the new item's folder.`);return e.starter&&!s.includes(e.starter.entry)&&t.push(`${e.id}'s starter's entry ${e.starter.entry} is none of its files.`),t}});const I=n.union([n.string().min(1),n.array(n.string().min(1)).min(1)]),re=n.object({id:n.string().regex(/^[a-z0-9][\w-]*(\.[\w-]+)+$/u),markup:I.optional(),kinds:n.array(n.string().min(1)).default([]),files:n.array(n.string().min(1)).default([]),noun:n.string().min(1).optional(),name:WordsSchema.optional(),plural:WordsSchema.optional(),icon:n.string().min(1).optional(),color:n.string().min(1).optional(),check:n.string().min(1).optional(),priority:n.enum(["default","option"]).default("default"),module:h.optional(),place:n.record(n.string(),n.unknown()).optional()});function z(e){if(e.type!=="object")return'is not of "type": "object".';try{n.fromJSONSchema(e)}catch(t){return`is not a JSON Schema zod reads: ${t instanceof Error?t.message:String(t)}.`}}export const EDITOR_POINT=definePoint({id:"editors",about:"Editors: the kinds each opens, or the files it opens by their names (glob patterns, with their name, sign and check), whether it is their default, the module a page imports for it, and the schema of where a person is in what it opens.",entry:re,key:e=>e.id,activation:(e,t)=>t==="ui"?[`onEditor:${e.id}`]:[],check:e=>{const t=[],i=e.place&&z(e.place);if(i!==void 0&&t.push(`${e.id}'s place ${i}`),e.kinds.length===0&&e.files.length===0&&t.push(`${e.id} opens no kind and no files.`),e.kinds.length>0&&e.files.length>0&&t.push(`${e.id} opens kinds and files: an editor opens one or the other.`),e.files.length>0){e.noun===void 0&&t.push(`${e.id} opens files and has no noun for them.`),e.name===void 0&&t.push(`${e.id} opens files and has no name for them.`);for(const[o,s]of[["name",e.name],["plural",e.plural]]){const r=s===void 0?[]:missingLocales(s);r.length>0&&t.push(`${e.id}'s ${o} has no words in ${r.join(", ")}.`)}for(const o of e.files)(o.startsWith("/")||o.split("/").includes(".."))&&t.push(`${e.id}'s pattern ${o} is not of project paths (no leading /, no ..).`)}else e.check!==void 0&&t.push(`${e.id} has a check and opens no files: a kind's items are checked by its build.`);return t}});export function fileEditorTable(e,t=(i,o)=>o){return e.flatMap(({extension:i,entry:o})=>o.files.length===0||o.name===void 0||o.noun===void 0?[]:[{id:o.id,files:[...o.files],noun:o.noun,name:{...o.name},...o.plural===void 0?{}:{plural:{...o.plural}},...o.icon===void 0?{}:{icon:o.icon},...o.color===void 0?{}:{color:o.color},...o.priority==="option"?{priority:o.priority}:{},...o.check===void 0?{}:{check:t(i,o.check)},extension:i}])}const de=n.object({id:n.string().regex(/^[a-z0-9][\w-]*(\.[\w-]+)+$/u),markup:I.optional(),types:n.array(n.string().regex(/^[a-z]+\/(?:\*|[\w.+-]+)$/u)).min(1),module:h});export const PREVIEW_RENDERER_POINT=definePoint({id:"previewRenderers",about:"Preview renderers: how a file of a media type is drawn wherever one is shown (a canvas's node); each its media types and the module a page imports for it.",entry:de,key:e=>e.id});const T=e=>e.startsWith("allyhub.");function $(e,t,i){return T(e)||t.startsWith(`${e}/`)?[]:[`the ${i} ${t} does not start with its extension's id (${e}/…).`]}const le=n.object({code:n.string().regex(/^(AK-[A-Z]\d{3}|[a-z0-9][a-z0-9-]*\.[a-z0-9][a-z0-9-]*\/[A-Za-z0-9][\w.-]*)$/u),level:n.enum(["error","warn"]),rule:n.string().min(1)});export const RULE_POINT=definePoint({id:"rules",about:"Rules: the codes an extension reports problems under, each with its level and what it says.",entry:le,key:e=>e.code,check:(e,t)=>{const i=C(e.code);return[...$(t,e.code,"rule"),...i&&i.extension!==t?[`${e.code} is ${i.extension===_?"the core's":`${i.extension}'s`} rule already.`]:[]]},added:(e,t)=>v(t,[e])});const ce=n.object({kind:n.string().regex(/^([a-z][a-z0-9-]*|[a-z0-9][a-z0-9-]*\.[a-z0-9][a-z0-9-]*\/[a-z][a-z0-9-]*)$/u),about:n.string().min(1)});export const FACT_POINT=definePoint({id:"facts",about:"Kinds of fact: what an extension measures for the agent to judge, each with what it says.",entry:ce,key:e=>e.kind,check:(e,t)=>$(t,e.kind,"kind of fact")});const ue=n.object({module:n.string().min(1)});export const BUILD_PLUGINS_POINT=definePoint({id:"buildPlugins",about:"Build plugins: a module whose Vite plugins and lent packages every stage bundle of a project takes.",entry:ue});const k=n.string().min(1),me=n.object({name:n.string().regex(/^[a-z][a-z0-9-]*$/u),summary:n.string().min(1),module:k});export const INSPECT_VIEW_POINT=definePoint({id:"inspectViews",about:"Views of `allyhub inspect <name>`: a measurement now, listed in `allyhub help` before its module is loaded.",entry:me,key:e=>e.name});const pe=n.object({id:n.string().regex(/^[a-z0-9][\w-]*(\.[\w-]+)+$/u),types:n.array(n.string().min(1)).min(1),module:k});export const EXPORT_PROCESSOR_POINT=definePoint({id:"exportProcessors",about:"Export processors: a step run on every file of the types it names that an export makes.",entry:pe,key:e=>e.id,check:(e,t)=>e.id.startsWith(`${t}.`)?[]:[`the processor ${e.id} does not start with its extension's id (${t}.…).`]});const he=n.object({id:n.string().regex(/^([a-z][a-z0-9-]*|[a-z0-9][a-z0-9-]*\.[a-z0-9][a-z0-9-]*\/[a-z][a-z0-9-]*)$/u),about:n.string().min(1),what:n.string().min(1),media:n.array(n.enum(["image","audio","video"])).min(1),runtimes:n.array(n.string().regex(/^[a-z0-9][a-z0-9-]*$/u)).default([]),module:k});export const MEDIA_ANALYSIS_POINT=definePoint({id:"mediaAnalyses",about:"Media analyses: what the media index measures of a file once, by its content, when a version needs it.",entry:he,key:e=>e.id,check:(e,t)=>$(t,e.id,"media analysis")});const fe=n.object({id:n.string().regex(/^[a-z0-9][a-z0-9-]*$/u),...M.shape});export const RUNTIME_POINT=definePoint({id:"runtimes",about:"Runtimes: a tool's pinned download (a program, a model), fetched when first needed, checked, cached.",entry:fe,key:e=>e.id}),SKILL_NAME=/^(?=.{1,64}$)[a-z0-9]+(-[a-z0-9]+)*$/u;const g=e=>e.replace(/^\.\//u,"").replace(/\/+$/u,""),ge=n.object({path:n.string().min(1)});export const SKILL_POINT=definePoint({id:"skills",about:"Skills for the agent: a folder laid out as an Agent Skill's, a skill of its own or files of the skill of its name.",entry:ge,check:e=>{const t=g(e.path);if(!w(t))return[`the skill folder ${e.path} is not a folder inside its package.`];const i=t.slice(t.lastIndexOf("/")+1);return SKILL_NAME.test(i)?[]:[`the skill folder ${e.path} is not named as a skill is (lower-case letters, digits and hyphens, at most 64).`]}});const P=n.record(n.string(),n.string()),be=n.union([n.object({name:n.string().regex(/^[a-z0-9][a-z0-9_-]*$/u),command:n.string().min(1),args:n.array(n.string()).default([]),env:P.default({}),cwd:n.string().min(1).optional()}),n.object({name:n.string().regex(/^[a-z0-9][a-z0-9_-]*$/u),url:n.url(),headers:P.default({})})]);export const MCP_SERVER_POINT=definePoint({id:"mcpServers",about:"MCP servers: a local program or an address that gives an agent tools, defined as .mcp.json defines one.",entry:be,key:e=>e.name,check:e=>"cwd"in e&&e.cwd!==void 0&&!w(g(e.cwd))?[`the MCP server ${e.name}'s cwd is not a folder inside its package.`]:[]}),CORE_POINTS=[COMMANDS,KEYBINDING_POINT,MENU_POINT,VIEW_CONTAINER_POINT,VIEW_POINT,CONFIGURATION_POINT,WINDOW_TOOL_POINT,CLI_COMMANDS,KIND_POINT,EDITOR_POINT,PREVIEW_RENDERER_POINT,RULE_POINT,FACT_POINT,BUILD_PLUGINS_POINT,PROJECT_TOOL_POINT,STAGE_ROUTE_POINT,INSPECT_VIEW_POINT,EXPORT_PROCESSOR_POINT,MEDIA_ANALYSIS_POINT,RUNTIME_POINT,SKILL_POINT,MCP_SERVER_POINT];export function kindTable(e,t=(d,u)=>u,i=[],o=[],s=[],r=()=>{}){const d=c=>{const a=i.filter(l=>l.extension===c).map(l=>t(c,l.entry.module));return a.length>0?a:void 0},u=c=>{const a=o.filter(l=>l.extension===c).map(({entry:l})=>({name:l.name,source:l.source,does:l.does,module:t(c,l.module),extension:c}));return a.length>0?a:void 0},m=c=>{const a=s.filter(l=>l.extension===c).map(({entry:l})=>({folder:l.folder,loads:l.loads.filter(N=>D(R,N)),module:t(c,l.module),extension:c}));return a.length>0?a:void 0};return e.map(({extension:c,entry:a})=>({id:a.id,editor:a.editor,noun:a.noun,part:a.part,...a.pages===!0?{pages:!0}:{},name:a.name,plural:a.plural,icon:a.icon,color:a.color,exports:a.exports&&{types:a.exports.types,extras:a.exports.extras,options:a.exports.options.map(l=>({name:l.name,only:l.only,...l.values===void 0?{}:{values:l.values}})),...Object.keys(a.exports.names).length===0?{}:{names:a.exports.names}},renders:a.renders&&{types:a.renders.types,defaults:a.renders.defaults},starter:a.starter&&{files:{...a.starter.files},entry:a.starter.entry},...a.shown===void 0?{}:{order:a.shown.order},...a.turnInto===!1?{turnInto:!1}:{},share:a.share,build:a.build===void 0?void 0:t(c,a.build),buildPlugins:d(c),projectTools:u(c),stageRoutes:m(c),points:r(c),extension:c}))}export const inspectViewTable=(e,t)=>e.map(({extension:i,entry:o})=>({name:o.name,summary:o.summary,module:t(i,o.module),extension:i})),cliCommandTable=(e,t)=>e.map(({extension:i,entry:o})=>({name:o.name,summary:o.summary,...o.work===void 0?{}:{work:o.work},module:t(i,o.module),extension:i})),processorTable=(e,t)=>e.map(({extension:i,entry:o})=>({id:o.id,types:o.types,module:t(i,o.module),extension:i})),analysisTable=(e,t)=>e.map(({extension:i,entry:o})=>({id:o.id,about:o.about,what:o.what,media:o.media,runtimes:o.runtimes,module:t(i,o.module),extension:i})),skillTable=(e,t)=>e.map(({extension:i,entry:o})=>{const s=g(o.path);return{name:s.slice(s.lastIndexOf("/")+1),folder:t(i,s),extension:i}});const j=(e,t)=>e.replaceAll("${PLUGIN_ROOT}",t);export const mcpServerTable=(e,t,i)=>e.map(({extension:o,entry:s})=>{if("url"in s)return{name:s.name,url:s.url,headers:{...s.headers},extension:o};const r=t(o);return{name:s.name,command:j(s.command,r),args:s.args.map(d=>j(d,r)),env:Object.fromEntries(Object.entries(s.env).map(([d,u])=>[d,j(u,r)])),cwd:s.cwd===void 0?r:i(o,g(s.cwd)),extension:o}});
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/extension-host",
3
- "version": "0.15.2",
3
+ "version": "0.17.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -982,8 +982,8 @@ export type PlaybackFile = z.infer<typeof PlaybackSchema>;
982
982
  /**
983
983
  * A shape on a slide, by its name. Without a kind it changes a shape the
984
984
  * slide has already (a layout's placeholder, a generator's shape); with
985
- * one (`textbox`, `picture`, `movie`, `geometry`, `component`) it is a
986
- * shape of the slide's own.
985
+ * one (`textbox`, `picture`, `movie`, `geometry`, `component`, `item`) it
986
+ * is a shape of the slide's own.
987
987
  */
988
988
  export declare const ShapeSchema: z.ZodObject<{
989
989
  frame: z.ZodOptional<z.ZodObject<{
@@ -1495,6 +1495,7 @@ export declare const ShapeSchema: z.ZodObject<{
1495
1495
  }, z.core.$strict>>;
1496
1496
  movie: z.ZodOptional<z.ZodString>;
1497
1497
  audio: z.ZodOptional<z.ZodString>;
1498
+ item: z.ZodOptional<z.ZodString>;
1498
1499
  poster: z.ZodOptional<z.ZodNumber>;
1499
1500
  playback: z.ZodOptional<z.ZodObject<{
1500
1501
  start: z.ZodOptional<z.ZodEnum<{
@@ -1895,6 +1896,9 @@ export declare const ShapeSchema: z.ZodObject<{
1895
1896
  rows: z.ZodOptional<z.ZodInt>;
1896
1897
  columns: z.ZodOptional<z.ZodInt>;
1897
1898
  }, z.core.$strip>>>;
1899
+ data: z.ZodOptional<z.ZodString>;
1900
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
1901
+ head: z.ZodOptional<z.ZodBoolean>;
1898
1902
  style: z.ZodOptional<z.ZodString>;
1899
1903
  first_row: z.ZodOptional<z.ZodBoolean>;
1900
1904
  last_row: z.ZodOptional<z.ZodBoolean>;
@@ -2205,7 +2209,7 @@ export declare function showJumpOf(link: string): ShowJump | undefined;
2205
2209
  /** A link's slide (`#<id>`), if it is one. */
2206
2210
  export declare const slideLinkOf: (link: string) => string | undefined;
2207
2211
  /** The kinds a shape of the slide's own is, by the field that makes it. */
2208
- export declare const SHAPE_KINDS: readonly ["textbox", "picture", "movie", "audio", "geometry", "path", "table", "chart", "component"];
2212
+ export declare const SHAPE_KINDS: readonly ["textbox", "picture", "movie", "audio", "geometry", "path", "table", "chart", "component", "item"];
2209
2213
  /** How a slide comes on from the one before, by PowerPoint's transitions. */
2210
2214
  export declare const SLIDE_TRANSITIONS: readonly ["fade", "push", "wipe", "split", "reveal", "cut", "cover", "uncover", "zoom", "morph"];
2211
2215
  export type SlideTransitionType = (typeof SLIDE_TRANSITIONS)[number];
@@ -2836,6 +2840,7 @@ export declare const SlideSchema: z.ZodObject<{
2836
2840
  }, z.core.$strict>>;
2837
2841
  movie: z.ZodOptional<z.ZodString>;
2838
2842
  audio: z.ZodOptional<z.ZodString>;
2843
+ item: z.ZodOptional<z.ZodString>;
2839
2844
  poster: z.ZodOptional<z.ZodNumber>;
2840
2845
  playback: z.ZodOptional<z.ZodObject<{
2841
2846
  start: z.ZodOptional<z.ZodEnum<{
@@ -3236,6 +3241,9 @@ export declare const SlideSchema: z.ZodObject<{
3236
3241
  rows: z.ZodOptional<z.ZodInt>;
3237
3242
  columns: z.ZodOptional<z.ZodInt>;
3238
3243
  }, z.core.$strip>>>;
3244
+ data: z.ZodOptional<z.ZodString>;
3245
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
3246
+ head: z.ZodOptional<z.ZodBoolean>;
3239
3247
  style: z.ZodOptional<z.ZodString>;
3240
3248
  first_row: z.ZodOptional<z.ZodBoolean>;
3241
3249
  last_row: z.ZodOptional<z.ZodBoolean>;
@@ -4216,6 +4224,7 @@ export declare const SlidesFileSchema: z.ZodObject<{
4216
4224
  }, z.core.$strict>>;
4217
4225
  movie: z.ZodOptional<z.ZodString>;
4218
4226
  audio: z.ZodOptional<z.ZodString>;
4227
+ item: z.ZodOptional<z.ZodString>;
4219
4228
  poster: z.ZodOptional<z.ZodNumber>;
4220
4229
  playback: z.ZodOptional<z.ZodObject<{
4221
4230
  start: z.ZodOptional<z.ZodEnum<{
@@ -4616,6 +4625,9 @@ export declare const SlidesFileSchema: z.ZodObject<{
4616
4625
  rows: z.ZodOptional<z.ZodInt>;
4617
4626
  columns: z.ZodOptional<z.ZodInt>;
4618
4627
  }, z.core.$strip>>>;
4628
+ data: z.ZodOptional<z.ZodString>;
4629
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
4630
+ head: z.ZodOptional<z.ZodBoolean>;
4619
4631
  style: z.ZodOptional<z.ZodString>;
4620
4632
  first_row: z.ZodOptional<z.ZodBoolean>;
4621
4633
  last_row: z.ZodOptional<z.ZodBoolean>;