allyhub 0.9.0 → 0.11.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 (582) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/commands/auth.js +4 -4
  3. package/dist/commands/cloud-tools.js +11 -11
  4. package/dist/commands/dev.js +2 -2
  5. package/dist/commands/frames/compare.js +2 -2
  6. package/dist/commands/frames/piece.js +1 -1
  7. package/dist/commands/frames/report.js +2 -0
  8. package/dist/commands/frames.js +11 -9
  9. package/dist/commands/index.js +1 -1
  10. package/dist/commands/inspect/common.js +4 -2
  11. package/dist/commands/inspect/facts.js +3 -3
  12. package/dist/commands/inspect/layout.js +1 -1
  13. package/dist/commands/orgs.js +2 -2
  14. package/dist/commands/render.js +2 -2
  15. package/dist/help.js +4 -4
  16. package/dist/main.js +8 -7
  17. package/dist/node_modules/@allyhub/3d-extension/dist/stage-routes.js +1 -1
  18. package/dist/node_modules/@allyhub/3d-extension/package.json +34 -2
  19. package/dist/node_modules/@allyhub/audio/package.json +1 -1
  20. package/dist/node_modules/@allyhub/browser/dist/emoji.d.ts +29 -0
  21. package/dist/node_modules/@allyhub/browser/dist/emoji.js +57 -0
  22. package/dist/node_modules/@allyhub/browser/dist/picture.d.ts +18 -0
  23. package/dist/node_modules/@allyhub/browser/dist/picture.js +2 -0
  24. package/dist/node_modules/@allyhub/browser/package.json +9 -1
  25. package/dist/node_modules/@allyhub/build/dist/index.d.ts +1 -0
  26. package/dist/node_modules/@allyhub/build/dist/index.js +1 -1
  27. package/dist/node_modules/@allyhub/build/dist/kind-build.d.ts +7 -0
  28. package/dist/node_modules/@allyhub/build/dist/made-notes.d.ts +9 -0
  29. package/dist/node_modules/@allyhub/build/dist/made-notes.js +2 -0
  30. package/dist/node_modules/@allyhub/build/dist/project-tool.d.ts +17 -0
  31. package/dist/node_modules/@allyhub/build/dist/stage-route.d.ts +7 -0
  32. package/dist/node_modules/@allyhub/build/package.json +1 -1
  33. package/dist/node_modules/@allyhub/canvas-extension/package.json +2 -1
  34. package/dist/node_modules/@allyhub/canvas-extension/skills/allyhub/references/canvas.md +4 -24
  35. package/dist/node_modules/@allyhub/canvas-model/package.json +1 -1
  36. package/dist/node_modules/@allyhub/chart/dist/chart-xml.js +2 -2
  37. package/dist/node_modules/@allyhub/chart/dist/chart.js +1 -1
  38. package/dist/node_modules/@allyhub/chart/package.json +1 -1
  39. package/dist/node_modules/@allyhub/check/package.json +1 -1
  40. package/dist/node_modules/@allyhub/cloud/dist/client.d.ts +10 -0
  41. package/dist/node_modules/@allyhub/cloud/dist/client.js +1 -1
  42. package/dist/node_modules/@allyhub/cloud/dist/config.d.ts +9 -0
  43. package/dist/node_modules/@allyhub/cloud/dist/config.js +1 -1
  44. package/dist/node_modules/@allyhub/cloud/dist/credentials.d.ts +4 -4
  45. package/dist/node_modules/@allyhub/cloud/dist/credentials.js +2 -2
  46. package/dist/node_modules/@allyhub/cloud/dist/device.d.ts +12 -0
  47. package/dist/node_modules/@allyhub/cloud/dist/device.js +2 -0
  48. package/dist/node_modules/@allyhub/cloud/package.json +1 -1
  49. package/dist/node_modules/@allyhub/components/package.json +1 -1
  50. package/dist/node_modules/@allyhub/components/r/callout.json +1 -1
  51. package/dist/node_modules/@allyhub/components/src/callout.ts +98 -13
  52. package/dist/node_modules/@allyhub/dev-server/dist/exports.js +1 -1
  53. package/dist/node_modules/@allyhub/dev-server/dist/index.js +1 -1
  54. package/dist/node_modules/@allyhub/dev-server/dist/inputs.js +2 -0
  55. package/dist/node_modules/@allyhub/dev-server/dist/live.js +1 -1
  56. package/dist/node_modules/@allyhub/dev-server/dist/pages.js +2 -0
  57. package/dist/node_modules/@allyhub/dev-server/dist/ports.js +2 -0
  58. package/dist/node_modules/@allyhub/dev-server/dist/project.js +1 -1
  59. package/dist/node_modules/@allyhub/dev-server/dist/record.js +1 -1
  60. package/dist/node_modules/@allyhub/dev-server/dist/respond.js +2 -0
  61. package/dist/node_modules/@allyhub/dev-server/dist/reveal.js +1 -1
  62. package/dist/node_modules/@allyhub/dev-server/dist/routes.js +1 -1
  63. package/dist/node_modules/@allyhub/dev-server/dist/server.js +2 -2
  64. package/dist/node_modules/@allyhub/dev-server/dist/tools.js +1 -1
  65. package/dist/node_modules/@allyhub/dev-server/dist/watcher.js +1 -1
  66. package/dist/node_modules/@allyhub/dev-server/package.json +1 -1
  67. package/dist/node_modules/@allyhub/diagnostics/dist/problem.d.ts +7 -0
  68. package/dist/node_modules/@allyhub/diagnostics/package.json +1 -1
  69. package/dist/node_modules/@allyhub/doc/dist/captions.js +1 -1
  70. package/dist/node_modules/@allyhub/doc/dist/docx.js +4 -4
  71. package/dist/node_modules/@allyhub/doc/dist/html.js +51 -92
  72. package/dist/node_modules/@allyhub/doc/dist/model.js +1 -1
  73. package/dist/node_modules/@allyhub/doc/dist/page.js +1 -1
  74. package/dist/node_modules/@allyhub/doc/dist/paper.js +1 -1
  75. package/dist/node_modules/@allyhub/doc/dist/table.js +1 -1
  76. package/dist/node_modules/@allyhub/doc/dist/write.js +22 -22
  77. package/dist/node_modules/@allyhub/doc/package.json +1 -1
  78. package/dist/node_modules/@allyhub/doc-extension/dist/export.js +1 -1
  79. package/dist/node_modules/@allyhub/doc-extension/package.json +19 -6
  80. package/dist/node_modules/@allyhub/doc-print/dist/pages.js +5 -5
  81. package/dist/node_modules/@allyhub/doc-print/dist/print.js +10 -10
  82. package/dist/node_modules/@allyhub/doc-print/package.json +1 -1
  83. package/dist/node_modules/@allyhub/export/dist/export.js +1 -1
  84. package/dist/node_modules/@allyhub/export/package.json +1 -1
  85. package/dist/node_modules/@allyhub/extension-api/package.json +1 -1
  86. package/dist/node_modules/@allyhub/extension-host/dist/points.js +1 -1
  87. package/dist/node_modules/@allyhub/extension-host/package.json +1 -1
  88. package/dist/node_modules/@allyhub/formats/dist/data/faces.d.ts +1 -1
  89. package/dist/node_modules/@allyhub/formats/dist/data/sheet.d.ts +87 -1
  90. package/dist/node_modules/@allyhub/formats/dist/data/sheet.js +1 -1
  91. package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +89 -0
  92. package/dist/node_modules/@allyhub/formats/dist/data/slides.js +1 -1
  93. package/dist/node_modules/@allyhub/formats/dist/note-shape.d.ts +20 -0
  94. package/dist/node_modules/@allyhub/formats/dist/note-shape.js +1 -1
  95. package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +50 -0
  96. package/dist/node_modules/@allyhub/formats/package.json +1 -1
  97. package/dist/node_modules/@allyhub/i18n/package.json +1 -1
  98. package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
  99. package/dist/node_modules/@allyhub/image-extension/dist/export.js +4 -1
  100. package/dist/node_modules/@allyhub/image-extension/package.json +16 -6
  101. package/dist/node_modules/@allyhub/image-extension/skills/allyhub/references/images.md +7 -39
  102. package/dist/node_modules/@allyhub/image-measure/package.json +1 -1
  103. package/dist/node_modules/@allyhub/image-psd/package.json +1 -1
  104. package/dist/node_modules/@allyhub/image-render/package.json +1 -1
  105. package/dist/node_modules/@allyhub/image-runtime/package.json +1 -1
  106. package/dist/node_modules/@allyhub/image-sdk/package.json +1 -1
  107. package/dist/node_modules/@allyhub/jobs/package.json +1 -1
  108. package/dist/node_modules/@allyhub/linkedin-extension/LICENSE +241 -0
  109. package/dist/node_modules/@allyhub/linkedin-extension/dist/article-build.js +2 -0
  110. package/dist/node_modules/@allyhub/linkedin-extension/dist/article-kind.js +2 -0
  111. package/dist/node_modules/@allyhub/linkedin-extension/dist/build-plugins.js +2 -0
  112. package/dist/node_modules/@allyhub/linkedin-extension/dist/build.js +5 -0
  113. package/dist/node_modules/@allyhub/linkedin-extension/dist/media.js +2 -0
  114. package/dist/node_modules/@allyhub/linkedin-extension/dist/stage-module.js +82 -0
  115. package/dist/node_modules/@allyhub/linkedin-extension/dist/stage.js +2 -0
  116. package/dist/node_modules/@allyhub/linkedin-extension/dist/workspace.js +2 -0
  117. package/dist/node_modules/@allyhub/linkedin-extension/package.json +287 -0
  118. package/dist/node_modules/@allyhub/linkedin-extension/skills/allyhub/references/linkedin.md +12 -0
  119. package/dist/node_modules/@allyhub/linkedin-model/LICENSE +241 -0
  120. package/dist/node_modules/@allyhub/linkedin-model/dist/article-check.js +5 -0
  121. package/dist/node_modules/@allyhub/linkedin-model/dist/article.js +3 -0
  122. package/dist/node_modules/@allyhub/linkedin-model/dist/check.js +2 -0
  123. package/dist/node_modules/@allyhub/linkedin-model/dist/count.js +3 -0
  124. package/dist/node_modules/@allyhub/linkedin-model/dist/edit.js +3 -0
  125. package/dist/node_modules/@allyhub/linkedin-model/dist/html.js +19 -0
  126. package/dist/node_modules/@allyhub/linkedin-model/dist/index.js +2 -0
  127. package/dist/node_modules/@allyhub/linkedin-model/dist/limits.js +2 -0
  128. package/dist/node_modules/@allyhub/linkedin-model/dist/little.js +2 -0
  129. package/dist/node_modules/@allyhub/linkedin-model/dist/post.js +2 -0
  130. package/dist/node_modules/@allyhub/linkedin-model/dist/requests.js +2 -0
  131. package/dist/node_modules/@allyhub/linkedin-model/package.json +14 -0
  132. package/dist/node_modules/@allyhub/linkedin-view/LICENSE +241 -0
  133. package/dist/node_modules/@allyhub/linkedin-view/dist/article.js +2 -0
  134. package/dist/node_modules/@allyhub/linkedin-view/dist/fold.js +3 -0
  135. package/dist/node_modules/@allyhub/linkedin-view/dist/index.js +2 -0
  136. package/dist/node_modules/@allyhub/linkedin-view/dist/post.js +2 -0
  137. package/dist/node_modules/@allyhub/linkedin-view/dist/stage.js +2 -0
  138. package/dist/node_modules/@allyhub/linkedin-view/dist/text.js +2 -0
  139. package/dist/node_modules/@allyhub/linkedin-view/package.json +21 -0
  140. package/dist/node_modules/@allyhub/linkedin-view/src/style.css +600 -0
  141. package/dist/node_modules/@allyhub/measure/package.json +1 -1
  142. package/dist/node_modules/@allyhub/media/package.json +1 -1
  143. package/dist/node_modules/@allyhub/media-extension/dist/vision/faces.js +1 -1
  144. package/dist/node_modules/@allyhub/media-extension/package.json +7 -4
  145. package/dist/node_modules/@allyhub/model/package.json +1 -1
  146. package/dist/node_modules/@allyhub/ooxml/dist/geometry/index.js +1 -1
  147. package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
  148. package/dist/node_modules/@allyhub/piece/dist/layer.d.ts +2 -0
  149. package/dist/node_modules/@allyhub/piece/dist/layout.d.ts +16 -0
  150. package/dist/node_modules/@allyhub/piece/dist/page/index.d.ts +1 -1
  151. package/dist/node_modules/@allyhub/piece/dist/page/index.js +1 -1
  152. package/dist/node_modules/@allyhub/piece/dist/page/locate.d.ts +14 -1
  153. package/dist/node_modules/@allyhub/piece/dist/page/locate.js +1 -1
  154. package/dist/node_modules/@allyhub/piece/dist/stage.d.ts +18 -0
  155. package/dist/node_modules/@allyhub/piece/package.json +1 -1
  156. package/dist/node_modules/@allyhub/project/dist/version.js +1 -1
  157. package/dist/node_modules/@allyhub/project/package.json +1 -1
  158. package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +140 -0
  159. package/dist/node_modules/@allyhub/protocol/dist/account.js +1 -1
  160. package/dist/node_modules/@allyhub/protocol/dist/auth.d.ts +19 -1
  161. package/dist/node_modules/@allyhub/protocol/dist/auth.js +1 -1
  162. package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +157 -0
  163. package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
  164. package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +10 -2
  165. package/dist/node_modules/@allyhub/protocol/dist/editor.js +1 -1
  166. package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +101 -186
  167. package/dist/node_modules/@allyhub/protocol/dist/frame.js +1 -1
  168. package/dist/node_modules/@allyhub/protocol/dist/mail.d.ts +1 -0
  169. package/dist/node_modules/@allyhub/protocol/dist/mail.js +1 -1
  170. package/dist/node_modules/@allyhub/protocol/dist/notes.d.ts +92 -94
  171. package/dist/node_modules/@allyhub/protocol/dist/notes.js +1 -1
  172. package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +17 -0
  173. package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +1 -1
  174. package/dist/node_modules/@allyhub/protocol/dist/teams.d.ts +7 -0
  175. package/dist/node_modules/@allyhub/protocol/dist/teams.js +1 -1
  176. package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +15 -3
  177. package/dist/node_modules/@allyhub/protocol/dist/tools.js +1 -1
  178. package/dist/node_modules/@allyhub/protocol/package.json +1 -1
  179. package/dist/node_modules/@allyhub/registry/package.json +1 -1
  180. package/dist/node_modules/@allyhub/render/dist/encode.js +1 -1
  181. package/dist/node_modules/@allyhub/render/dist/index.js +1 -1
  182. package/dist/node_modules/@allyhub/render/dist/look.js +1 -1
  183. package/dist/node_modules/@allyhub/render/dist/render.js +2 -2
  184. package/dist/node_modules/@allyhub/render/package.json +1 -1
  185. package/dist/node_modules/@allyhub/report-extension/LICENSE +241 -0
  186. package/dist/node_modules/@allyhub/report-extension/dist/build.js +2 -0
  187. package/dist/node_modules/@allyhub/report-extension/dist/check.js +3 -0
  188. package/dist/node_modules/@allyhub/report-extension/dist/cli/find.js +2 -0
  189. package/dist/node_modules/@allyhub/report-extension/dist/cli/index.js +5 -0
  190. package/dist/node_modules/@allyhub/report-extension/dist/cli/picture.js +2 -0
  191. package/dist/node_modules/@allyhub/report-extension/dist/export.js +2 -0
  192. package/dist/node_modules/@allyhub/report-extension/dist/inline.js +58 -0
  193. package/dist/node_modules/@allyhub/report-extension/dist/page.js +21 -0
  194. package/dist/node_modules/@allyhub/report-extension/dist/project-tools.js +21 -0
  195. package/dist/node_modules/@allyhub/report-extension/dist/styles.js +5 -0
  196. package/dist/node_modules/@allyhub/report-extension/dist/theme.js +2 -0
  197. package/dist/node_modules/@allyhub/report-extension/dist/tools.js +2 -0
  198. package/dist/node_modules/@allyhub/report-extension/dist/workspace.js +2 -0
  199. package/dist/node_modules/@allyhub/report-extension/package.json +182 -0
  200. package/dist/node_modules/@allyhub/report-extension/styles/allyhub/STYLE.md +132 -0
  201. package/dist/node_modules/@allyhub/report-extension/styles/allyhub/style.css +105 -0
  202. package/dist/node_modules/@allyhub/report-extension/styles/allyhub/style.json +17 -0
  203. package/dist/node_modules/@allyhub/report-extension/styles/allyhub/tokens.js +38 -0
  204. package/dist/node_modules/@allyhub/runtime/dist/compose.js +1 -1
  205. package/dist/node_modules/@allyhub/runtime/dist/embed.js +1 -1
  206. package/dist/node_modules/@allyhub/runtime/dist/player/clips.js +1 -1
  207. package/dist/node_modules/@allyhub/runtime/dist/player/player.js +1 -1
  208. package/dist/node_modules/@allyhub/runtime/package.json +1 -1
  209. package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
  210. package/dist/node_modules/@allyhub/scaffold/package.json +1 -1
  211. package/dist/node_modules/@allyhub/scenery/dist/index.d.ts +2 -2
  212. package/dist/node_modules/@allyhub/scenery/dist/index.js +1 -1
  213. package/dist/node_modules/@allyhub/scenery/dist/moire.d.ts +45 -5
  214. package/dist/node_modules/@allyhub/scenery/dist/moire.js +2 -2
  215. package/dist/node_modules/@allyhub/scenery/dist/phone.d.ts +4 -3
  216. package/dist/node_modules/@allyhub/scenery/dist/phone.js +1 -1
  217. package/dist/node_modules/@allyhub/scenery/package.json +1 -1
  218. package/dist/node_modules/@allyhub/scenery-host/dist/layer/grade.d.ts +7 -0
  219. package/dist/node_modules/@allyhub/scenery-host/dist/layer/grade.js +2 -0
  220. package/dist/node_modules/@allyhub/scenery-host/dist/layer/index.d.ts +4 -3
  221. package/dist/node_modules/@allyhub/scenery-host/dist/layer/index.js +1 -1
  222. package/dist/node_modules/@allyhub/scenery-host/dist/layer/screens.d.ts +1 -1
  223. package/dist/node_modules/@allyhub/scenery-host/dist/layer/screens.js +1 -1
  224. package/dist/node_modules/@allyhub/scenery-host/dist/measure/facts.js +1 -1
  225. package/dist/node_modules/@allyhub/scenery-host/dist/page/screens.d.ts +8 -0
  226. package/dist/node_modules/@allyhub/scenery-host/dist/page/screens.js +1 -1
  227. package/dist/node_modules/@allyhub/scenery-host/dist/viewer.d.ts +6 -0
  228. package/dist/node_modules/@allyhub/scenery-host/dist/viewer.js +1 -1
  229. package/dist/node_modules/@allyhub/scenery-host/package.json +1 -1
  230. package/dist/node_modules/@allyhub/sheet/dist/calc/coerce.js +1 -1
  231. package/dist/node_modules/@allyhub/sheet/dist/calc/engine.js +1 -1
  232. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/criteria.js +1 -1
  233. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/date.js +1 -1
  234. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/define.js +1 -1
  235. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/info.js +1 -1
  236. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/kernels.js +1 -1
  237. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/lookup.js +1 -1
  238. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/maths.js +1 -1
  239. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/text.js +1 -1
  240. package/dist/node_modules/@allyhub/sheet/dist/calc/indexes.js +1 -1
  241. package/dist/node_modules/@allyhub/sheet/dist/calc/types.js +1 -1
  242. package/dist/node_modules/@allyhub/sheet/dist/chart.js +1 -1
  243. package/dist/node_modules/@allyhub/sheet/dist/export.js +2 -4
  244. package/dist/node_modules/@allyhub/sheet/dist/formula/move.js +1 -1
  245. package/dist/node_modules/@allyhub/sheet/dist/formula/parse.js +1 -1
  246. package/dist/node_modules/@allyhub/sheet/dist/formula/print.js +1 -1
  247. package/dist/node_modules/@allyhub/sheet/dist/index.js +1 -1
  248. package/dist/node_modules/@allyhub/sheet/dist/inspect.js +1 -1
  249. package/dist/node_modules/@allyhub/sheet/dist/printed.js +2 -0
  250. package/dist/node_modules/@allyhub/sheet/dist/values.js +1 -1
  251. package/dist/node_modules/@allyhub/sheet/dist/workbook.js +1 -1
  252. package/dist/node_modules/@allyhub/sheet/dist/write.js +15 -15
  253. package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.js +1 -1
  254. package/dist/node_modules/@allyhub/sheet/dist/xlsx/formula.js +2 -2
  255. package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.js +1 -1
  256. package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.js +2 -2
  257. package/dist/node_modules/@allyhub/sheet/dist/xlsx/sax.js +3 -1
  258. package/dist/node_modules/@allyhub/sheet/dist/xlsx/styles.js +1 -1
  259. package/dist/node_modules/@allyhub/sheet/dist/xlsx/write.js +1 -1
  260. package/dist/node_modules/@allyhub/sheet/dist/xlsx/xml.js +3 -2
  261. package/dist/node_modules/@allyhub/sheet/package.json +1 -1
  262. package/dist/node_modules/@allyhub/sheet-extension/dist/export.js +2 -6
  263. package/dist/node_modules/@allyhub/sheet-extension/package.json +24 -9
  264. package/dist/node_modules/@allyhub/slides-core/dist/api.js +2 -2
  265. package/dist/node_modules/@allyhub/slides-core/dist/capabilities.js +1 -1
  266. package/dist/node_modules/@allyhub/slides-core/dist/enums.js +1 -1
  267. package/dist/node_modules/@allyhub/slides-core/dist/measure.js +1 -1
  268. package/dist/node_modules/@allyhub/slides-core/dist/resolve.js +1 -1
  269. package/dist/node_modules/@allyhub/slides-core/dist/sdk.js +1 -1
  270. package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
  271. package/dist/node_modules/@allyhub/slides-extension/dist/export.js +1 -1
  272. package/dist/node_modules/@allyhub/slides-extension/package.json +22 -16
  273. package/dist/node_modules/@allyhub/slides-pptx/dist/import/code.js +2 -2
  274. package/dist/node_modules/@allyhub/slides-pptx/dist/import/index.js +2 -2
  275. package/dist/node_modules/@allyhub/slides-pptx/dist/read/common.js +1 -1
  276. package/dist/node_modules/@allyhub/slides-pptx/dist/read/shapes.js +1 -1
  277. package/dist/node_modules/@allyhub/slides-pptx/dist/read/text.js +1 -1
  278. package/dist/node_modules/@allyhub/slides-pptx/dist/shapes.js +1 -1
  279. package/dist/node_modules/@allyhub/slides-pptx/dist/text.js +1 -1
  280. package/dist/node_modules/@allyhub/slides-pptx/dist/write.js +2 -2
  281. package/dist/node_modules/@allyhub/slides-pptx/dist/xml.js +1 -1
  282. package/dist/node_modules/@allyhub/slides-pptx/package.json +1 -1
  283. package/dist/node_modules/@allyhub/slides-runtime/dist/draw.js +2 -2
  284. package/dist/node_modules/@allyhub/slides-runtime/dist/load.js +5 -5
  285. package/dist/node_modules/@allyhub/slides-runtime/package.json +1 -1
  286. package/dist/node_modules/@allyhub/stage/package.json +1 -1
  287. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/400-italic.css +19 -0
  288. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/400.css +19 -0
  289. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/700-italic.css +19 -0
  290. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/700.css +19 -0
  291. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/LICENSE +93 -0
  292. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/cambria.css +76 -0
  293. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-400-italic.woff2 +0 -0
  294. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-400-normal.woff2 +0 -0
  295. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-700-italic.woff2 +0 -0
  296. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-700-normal.woff2 +0 -0
  297. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-ext-400-italic.woff2 +0 -0
  298. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-ext-400-normal.woff2 +0 -0
  299. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-ext-700-italic.woff2 +0 -0
  300. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-ext-700-normal.woff2 +0 -0
  301. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/400-italic.css +79 -0
  302. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/400.css +79 -0
  303. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/700-italic.css +79 -0
  304. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/700.css +79 -0
  305. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/LICENSE +93 -0
  306. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/courier-new.css +316 -0
  307. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-400-italic.woff2 +0 -0
  308. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-400-normal.woff2 +0 -0
  309. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-700-italic.woff2 +0 -0
  310. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-700-normal.woff2 +0 -0
  311. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-ext-400-italic.woff2 +0 -0
  312. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-ext-400-normal.woff2 +0 -0
  313. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-ext-700-italic.woff2 +0 -0
  314. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-ext-700-normal.woff2 +0 -0
  315. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-400-italic.woff2 +0 -0
  316. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-400-normal.woff2 +0 -0
  317. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-700-italic.woff2 +0 -0
  318. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-700-normal.woff2 +0 -0
  319. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-ext-400-italic.woff2 +0 -0
  320. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-ext-400-normal.woff2 +0 -0
  321. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-ext-700-italic.woff2 +0 -0
  322. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-ext-700-normal.woff2 +0 -0
  323. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-hebrew-400-italic.woff2 +0 -0
  324. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-hebrew-400-normal.woff2 +0 -0
  325. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-hebrew-700-italic.woff2 +0 -0
  326. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-hebrew-700-normal.woff2 +0 -0
  327. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-400-italic.woff2 +0 -0
  328. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-400-normal.woff2 +0 -0
  329. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-700-italic.woff2 +0 -0
  330. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-700-normal.woff2 +0 -0
  331. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-ext-400-italic.woff2 +0 -0
  332. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-ext-400-normal.woff2 +0 -0
  333. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-ext-700-italic.woff2 +0 -0
  334. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-ext-700-normal.woff2 +0 -0
  335. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-vietnamese-400-italic.woff2 +0 -0
  336. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-vietnamese-400-normal.woff2 +0 -0
  337. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-vietnamese-700-italic.woff2 +0 -0
  338. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-vietnamese-700-normal.woff2 +0 -0
  339. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/400-italic.css +79 -0
  340. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/400.css +79 -0
  341. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/700-italic.css +79 -0
  342. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/700.css +79 -0
  343. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/LICENSE +93 -0
  344. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-400-italic.woff2 +0 -0
  345. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-400-normal.woff2 +0 -0
  346. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-700-italic.woff2 +0 -0
  347. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-700-normal.woff2 +0 -0
  348. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-ext-400-italic.woff2 +0 -0
  349. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-ext-400-normal.woff2 +0 -0
  350. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-ext-700-italic.woff2 +0 -0
  351. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-ext-700-normal.woff2 +0 -0
  352. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-400-italic.woff2 +0 -0
  353. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-400-normal.woff2 +0 -0
  354. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-700-italic.woff2 +0 -0
  355. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-700-normal.woff2 +0 -0
  356. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-ext-400-italic.woff2 +0 -0
  357. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-ext-400-normal.woff2 +0 -0
  358. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-ext-700-italic.woff2 +0 -0
  359. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-ext-700-normal.woff2 +0 -0
  360. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-hebrew-400-italic.woff2 +0 -0
  361. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-hebrew-400-normal.woff2 +0 -0
  362. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-hebrew-700-italic.woff2 +0 -0
  363. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-hebrew-700-normal.woff2 +0 -0
  364. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-400-italic.woff2 +0 -0
  365. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-400-normal.woff2 +0 -0
  366. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-700-italic.woff2 +0 -0
  367. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-700-normal.woff2 +0 -0
  368. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-ext-400-italic.woff2 +0 -0
  369. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-ext-400-normal.woff2 +0 -0
  370. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-ext-700-italic.woff2 +0 -0
  371. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-ext-700-normal.woff2 +0 -0
  372. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-vietnamese-400-italic.woff2 +0 -0
  373. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-vietnamese-400-normal.woff2 +0 -0
  374. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-vietnamese-700-italic.woff2 +0 -0
  375. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-vietnamese-700-normal.woff2 +0 -0
  376. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/times-new-roman.css +316 -0
  377. package/dist/node_modules/@allyhub/stage-page/dist/host.js +1 -1
  378. package/dist/node_modules/@allyhub/stage-page/dist/install.js +1 -1
  379. package/dist/node_modules/@allyhub/stage-page/dist/runtime/stage.html +3 -0
  380. package/dist/node_modules/@allyhub/stage-page/dist/runtime/stage.js +1 -1
  381. package/dist/node_modules/@allyhub/stage-page/package.json +1 -1
  382. package/dist/node_modules/@allyhub/stage-runtime/dist/runtime.js +18 -18
  383. package/dist/node_modules/@allyhub/stage-runtime/package.json +1 -1
  384. package/dist/node_modules/@allyhub/video-core/dist/schema.js +1 -1
  385. package/dist/node_modules/@allyhub/video-core/package.json +1 -1
  386. package/dist/node_modules/@allyhub/video-extension/dist/export.js +1 -1
  387. package/dist/node_modules/@allyhub/video-extension/package.json +17 -4
  388. package/dist/node_modules/@allyhub/video-measure/dist/version.js +1 -1
  389. package/dist/node_modules/@allyhub/video-measure/package.json +1 -1
  390. package/dist/node_modules/@allyhub/video-sdk/dist/phone.js +1 -1
  391. package/dist/node_modules/@allyhub/video-sdk/package.json +1 -1
  392. package/dist/node_modules/@allyhub/website/package.json +1 -1
  393. package/dist/node_modules/@allyhub/website-extension/dist/held.js +2 -0
  394. package/dist/node_modules/@allyhub/website-extension/dist/preview.js +5 -5
  395. package/dist/node_modules/@allyhub/website-extension/dist/project-tools.js +24 -1
  396. package/dist/node_modules/@allyhub/website-extension/dist/tools.js +1 -1
  397. package/dist/node_modules/@allyhub/website-extension/package.json +49 -2
  398. package/dist/node_modules/@allyhub/x-extension/dist/build.js +4 -3
  399. package/dist/node_modules/@allyhub/x-extension/package.json +43 -15
  400. package/dist/node_modules/@allyhub/x-extension/skills/allyhub/references/x.md +7 -62
  401. package/dist/node_modules/@allyhub/x-model/package.json +1 -1
  402. package/dist/node_modules/@allyhub/x-view/dist/article.js +1 -1
  403. package/dist/node_modules/@allyhub/x-view/dist/index.js +1 -1
  404. package/dist/node_modules/@allyhub/x-view/dist/post.js +2 -2
  405. package/dist/node_modules/@allyhub/x-view/package.json +1 -1
  406. package/dist/package.json +12 -10
  407. package/dist/text/facts-text.js +5 -5
  408. package/dist/text/index.js +1 -1
  409. package/dist/text/long-text.js +4 -0
  410. package/dist/works.js +1 -1
  411. package/editor-web/assets/{abnfDiagram-WEYOIA3C-CN5PiJYY.js → abnfDiagram-WEYOIA3C-BKmMA6gn.js} +1 -1
  412. package/editor-web/assets/{architecture-WOLXFQ4H-BnvZtQYk.js → architecture-WOLXFQ4H-BEFBgb4k.js} +1 -1
  413. package/editor-web/assets/{architectureDiagram-ZHVYKT53-tkcEcFQ8.js → architectureDiagram-ZHVYKT53-_u5YfCjY.js} +1 -1
  414. package/editor-web/assets/{arrow-up-DTP2yVSU.js → arrow-up-B5rJbBv0.js} +1 -1
  415. package/editor-web/assets/article-BUmD3xtR.js +8 -0
  416. package/editor-web/assets/article-DNioBb3p.js +7 -0
  417. package/editor-web/assets/{audio-lines-Ti8-m7H2.js → audio-lines-CzuzsGjI.js} +1 -1
  418. package/editor-web/assets/{blockDiagram-RJAE7QA3-DhqEIpie.js → blockDiagram-RJAE7QA3-DybfaO3Z.js} +1 -1
  419. package/editor-web/assets/bookmark-Dsd3kHJJ.js +1 -0
  420. package/editor-web/assets/button-eGxLxbv9.js +41 -0
  421. package/editor-web/assets/{c4Diagram-XDPPPE54-Bg9G95tl.js → c4Diagram-XDPPPE54-BfqLHB5i.js} +1 -1
  422. package/editor-web/assets/calc-worker-D2pGis6e.js +45 -0
  423. package/editor-web/assets/channel-TNPgFDrw.js +1 -0
  424. package/editor-web/assets/chart-C37xvZT2.js +1 -0
  425. package/editor-web/assets/chart-no-axes-column-BVkeF_Mr.js +1 -0
  426. package/editor-web/assets/{chunk-2E7WHVMD-C8Ve9lAa.js → chunk-2E7WHVMD-BVp1I_d0.js} +1 -1
  427. package/editor-web/assets/{chunk-4EMNKR2T-BDWwPUnT.js → chunk-4EMNKR2T-CTdgWEMr.js} +1 -1
  428. package/editor-web/assets/{chunk-55XCU76K-BQiNPKgx.js → chunk-55XCU76K-7pnsxeaP.js} +1 -1
  429. package/editor-web/assets/{chunk-7S6XSTFO-QoEt-6jf.js → chunk-7S6XSTFO-Dc0Dvkq7.js} +1 -1
  430. package/editor-web/assets/{chunk-AQDTSKZB-BeuwIv0-.js → chunk-AQDTSKZB-VAILIsfx.js} +1 -1
  431. package/editor-web/assets/{chunk-DSNLSHJZ-BHW7sLAz.js → chunk-DSNLSHJZ-CUDx1Rv5.js} +1 -1
  432. package/editor-web/assets/{chunk-HAGFOTED-bbGED0hu.js → chunk-HAGFOTED-DAoEe-dJ.js} +1 -1
  433. package/editor-web/assets/{chunk-HNE4Q36P-FltWp8yo.js → chunk-HNE4Q36P-g0akya12.js} +1 -1
  434. package/editor-web/assets/{chunk-NQOKRVIF-NeQzr6kH.js → chunk-NQOKRVIF-hTGjzXdJ.js} +1 -1
  435. package/editor-web/assets/{chunk-UHW7PFBP-eA4-WUhn.js → chunk-UHW7PFBP-BgLV8BIJ.js} +1 -1
  436. package/editor-web/assets/{chunk-VQ5W62QI-BPPv325z.js → chunk-VQ5W62QI-Bw19OOSD.js} +1 -1
  437. package/editor-web/assets/{chunk-WQQL4CDK-DOCIz7Te.js → chunk-WQQL4CDK-CMST9dyE.js} +1 -1
  438. package/editor-web/assets/{chunk-YZO67HFG-Dc_ihQJi.js → chunk-YZO67HFG-Bbpu36XF.js} +1 -1
  439. package/editor-web/assets/{chunk-ZAUX2LTX-CoqwCPSm.js → chunk-ZAUX2LTX-C48Ri0Gs.js} +1 -1
  440. package/editor-web/assets/{chunk-ZCHMQSOR-CZUQPkJx.js → chunk-ZCHMQSOR-DN1g01Oe.js} +1 -1
  441. package/editor-web/assets/{classDiagram-v2-4MYWR3UA-DUh9c50k.js → classDiagram-v2-4MYWR3UA-U6jbPr2d.js} +1 -1
  442. package/editor-web/assets/collaborator-B1u2td9m.js +1 -0
  443. package/editor-web/assets/createLucideIcon-GFZ_fxLc.js +1 -0
  444. package/editor-web/assets/{cynefin-EF2NZ3EQ-DUTZiog0.js → cynefin-EF2NZ3EQ-gzkai_7-.js} +1 -1
  445. package/editor-web/assets/{cynefinDiagram-WF24UDRP-oAjpfbrU.js → cynefinDiagram-WF24UDRP-DtSekSr6.js} +1 -1
  446. package/editor-web/assets/{dagre-NK4GIZVX-BrKvKCvb.js → dagre-NK4GIZVX-CiUwYVT6.js} +1 -1
  447. package/editor-web/assets/{diagram-CBK3MWTC-GekVRnmm.js → diagram-CBK3MWTC-r9XHCV-k.js} +1 -1
  448. package/editor-web/assets/{diagram-I5XIIV2D-CDd1VFRT.js → diagram-I5XIIV2D-DxVsDZ34.js} +1 -1
  449. package/editor-web/assets/{diagram-ODIL2UCW-535RISTn.js → diagram-ODIL2UCW-B0eNQoHV.js} +1 -1
  450. package/editor-web/assets/{diagram-PFBEJUXE-MXzzKCGG.js → diagram-PFBEJUXE-C7f2MfJT.js} +1 -1
  451. package/editor-web/assets/{diagram-RJA3I4VV-vKVwkQxY.js → diagram-RJA3I4VV-CSXcnvct.js} +1 -1
  452. package/editor-web/assets/{diagram-TYUNFSNR-UwGAiQLx.js → diagram-TYUNFSNR-DXzOD_ii.js} +1 -1
  453. package/editor-web/assets/dist-BGRwhCQO.js +1 -0
  454. package/editor-web/assets/{dist-9ymlIMhr.js → dist-BW4X7BrF.js} +1 -1
  455. package/editor-web/assets/dist-BgDRE85b.js +2 -0
  456. package/editor-web/assets/dist-Blq5nJnU.js +24 -0
  457. package/editor-web/assets/dist-BuWaZ3Y4.js +274 -0
  458. package/editor-web/assets/dist-C1emZ9wX.js +37 -0
  459. package/editor-web/assets/dist-CC7OeU1e.js +6 -0
  460. package/editor-web/assets/dist-CX-fiPSn.js +38 -0
  461. package/editor-web/assets/dist-C_VvG-_9.js +5 -0
  462. package/editor-web/assets/dist-Ce7HrBxv.js +3 -0
  463. package/editor-web/assets/dist-D2k6w-_a.js +1 -0
  464. package/editor-web/assets/dist-DDv_SbKw.js +84 -0
  465. package/editor-web/assets/dist-DEoEO4zs.js +1 -0
  466. package/editor-web/assets/dist-DlDxxPIP.js +16 -0
  467. package/editor-web/assets/dist-Gz6NDS0J.js +4 -0
  468. package/editor-web/assets/{ebnfDiagram-V4P3TTPT-73yGokYa.js → ebnfDiagram-V4P3TTPT-Cs4YRvDD.js} +1 -1
  469. package/editor-web/assets/{elk-QONTBCTQ-BW6V9y6a.js → elk-QONTBCTQ-Bh3LZ9WI.js} +1 -1
  470. package/editor-web/assets/{erDiagram-KYQIGQAA-BPqIJ22h.js → erDiagram-KYQIGQAA-C4vYTYXp.js} +1 -1
  471. package/editor-web/assets/{eventmodeling-K75KTNOO-_VZ8jvuy.js → eventmodeling-K75KTNOO-BN1kkHWS.js} +1 -1
  472. package/editor-web/assets/flowDiagram-IUGLLWBU-B04NGsyi.js +1 -0
  473. package/editor-web/assets/{ganttDiagram-R7GPNTJY-DZ157JN2.js → ganttDiagram-R7GPNTJY-CA1LkkC5.js} +1 -1
  474. package/editor-web/assets/{gitGraph-VSP46ZUC-fmcNL9bq.js → gitGraph-VSP46ZUC-Dy5tA7dG.js} +1 -1
  475. package/editor-web/assets/{gitGraphDiagram-PDYL7XHY-DiZDyksR.js → gitGraphDiagram-PDYL7XHY-hJIB8EkH.js} +1 -1
  476. package/editor-web/assets/hint-B8JpEypy.js +1 -0
  477. package/editor-web/assets/index-CgB5osVc.js +28 -0
  478. package/editor-web/assets/index-Daytem9N.css +2 -0
  479. package/editor-web/assets/{info-OHQRW6UA-V06620kN.js → info-OHQRW6UA-DvzSf7rQ.js} +1 -1
  480. package/editor-web/assets/{infoDiagram-MVDRKAX5-CbIgheWX.js → infoDiagram-MVDRKAX5-BjIMm4Af.js} +1 -1
  481. package/editor-web/assets/{ishikawaDiagram-HPEHV2GE-D5oJQPkG.js → ishikawaDiagram-HPEHV2GE-Bpz71S40.js} +1 -1
  482. package/editor-web/assets/{italic-CDhZKo_q.js → italic-D10w8n6C.js} +1 -1
  483. package/editor-web/assets/{journeyDiagram-BOSHW7O7-BZEv6JI4.js → journeyDiagram-BOSHW7O7-DAB-pZjD.js} +1 -1
  484. package/editor-web/assets/{kanban-definition-FNSA4HC5-CLG1R8y_.js → kanban-definition-FNSA4HC5-cYeyh3P6.js} +1 -1
  485. package/editor-web/assets/katex-5Z2zF-9g.js +257 -0
  486. package/editor-web/assets/link-BC5xK1-1.js +1 -0
  487. package/editor-web/assets/{mermaid-parser.core-DxDwXM7z.js → mermaid-parser.core-req5LE0X.js} +3 -3
  488. package/editor-web/assets/{mermaid.core-tU55ZwVG.js → mermaid.core-zFwZug4C.js} +4 -4
  489. package/editor-web/assets/{mindmap-definition-6OY57UG3-CYf4zzAh.js → mindmap-definition-6OY57UG3-TStWb7DG.js} +1 -1
  490. package/editor-web/assets/minus-DaWs5i8B.js +1 -0
  491. package/editor-web/assets/{packet-JDAUHWVQ-DsHeKYNL.js → packet-JDAUHWVQ-smFhVKcB.js} +1 -1
  492. package/editor-web/assets/palette-BIOudGkm.js +1 -0
  493. package/editor-web/assets/{pegDiagram-ECIUJNBX-CQyh6TTa.js → pegDiagram-ECIUJNBX-DvSNRv0-.js} +1 -1
  494. package/editor-web/assets/{pie-XZMESJXO-3vCIvpNB.js → pie-XZMESJXO-qjaGsBZG.js} +1 -1
  495. package/editor-web/assets/{pieDiagram-GNMPY74T-DF5yGBLn.js → pieDiagram-GNMPY74T-Dd9P-Pdc.js} +1 -1
  496. package/editor-web/assets/play-CrMmPghG.js +1 -0
  497. package/editor-web/assets/progress-DE4C5_3x.js +6 -0
  498. package/editor-web/assets/props-form-CsmDBqzy.js +1 -0
  499. package/editor-web/assets/{quadrantDiagram-D57K4MC3-B7pxlDYP.js → quadrantDiagram-D57K4MC3-h2IIKUUA.js} +1 -1
  500. package/editor-web/assets/{radar-ABXABTNO-cpEA41mL.js → radar-ABXABTNO-DlVrSA1d.js} +1 -1
  501. package/editor-web/assets/{railroad-I3PHUGI6-BLyy5R2c.js → railroad-I3PHUGI6-nFbuLAtc.js} +1 -1
  502. package/editor-web/assets/{railroad-abnf-LNEFI6M7-Y-oyol19.js → railroad-abnf-LNEFI6M7-Daj8h2iV.js} +1 -1
  503. package/editor-web/assets/{railroad-ebnf-DWYD2UWJ-o58wHZsr.js → railroad-ebnf-DWYD2UWJ-eYJyl5PH.js} +1 -1
  504. package/editor-web/assets/{railroad-peg-JR7BVNR7-CcD3PXZ8.js → railroad-peg-JR7BVNR7-BTRhKZQq.js} +1 -1
  505. package/editor-web/assets/{railroadDiagram-Y72NRBL7-BuCC4eyy.js → railroadDiagram-Y72NRBL7-CeLGUjdp.js} +1 -1
  506. package/editor-web/assets/react-WA6wlt8S.js +1 -0
  507. package/editor-web/assets/{repeat-2-C5PCbNsg.js → repeat-2-VQP1EVOZ.js} +1 -1
  508. package/editor-web/assets/{requirementDiagram-EQYSW5RA-Dp-JFGn4.js → requirementDiagram-EQYSW5RA-Dmk9XRM5.js} +1 -1
  509. package/editor-web/assets/row-BRlEWRrK.js +1 -0
  510. package/editor-web/assets/{sankeyDiagram-SY24JHO5-rYuCqEvw.js → sankeyDiagram-SY24JHO5-Yn4zlrAM.js} +1 -1
  511. package/editor-web/assets/schemas-VikZYZIK.js +1 -0
  512. package/editor-web/assets/{sequenceDiagram-BLEHNHQU-DryW8x6d.js → sequenceDiagram-BLEHNHQU-BTRnp_PW.js} +1 -1
  513. package/editor-web/assets/session-Do9AqS38.js +1 -0
  514. package/editor-web/assets/slides-diTEQ3C5.js +1 -0
  515. package/editor-web/assets/snapshots-BUGlKQIB.js +56 -0
  516. package/editor-web/assets/sound-Bj3o9_Fa.js +1 -0
  517. package/editor-web/assets/split-CNU1RHcX.js +3 -0
  518. package/editor-web/assets/{stateDiagram-v2-A6IESKWZ-Bnp0XfpT.js → stateDiagram-v2-A6IESKWZ-kstrRKv2.js} +1 -1
  519. package/editor-web/assets/{strikethrough-DJckA35o.js → strikethrough-CfXx6IYH.js} +1 -1
  520. package/editor-web/assets/{svg-BjM9RazX.js → svg-Cx50MpxK.js} +1 -1
  521. package/editor-web/assets/swatch-WeJD41aW.js +1 -0
  522. package/editor-web/assets/{swimlanes-B3ENRKFQ-BiRRhhbd.js → swimlanes-B3ENRKFQ-DaZsZkeP.js} +1 -1
  523. package/editor-web/assets/swimlanesDiagram-AYQRV4AK-CBZAujYY.js +8 -0
  524. package/editor-web/assets/switch-N0G_sbqt.js +1 -0
  525. package/editor-web/assets/syntax-BVsgRJ4I.js +66 -0
  526. package/editor-web/assets/syntax-oWsKBWFw.js +1 -0
  527. package/editor-web/assets/table-B6hVZAMi.js +1 -0
  528. package/editor-web/assets/tabs-DIFDqj-l.js +1 -0
  529. package/editor-web/assets/{textarea-BGtPqZdB.js → textarea-tEWvBY9p.js} +1 -1
  530. package/editor-web/assets/{timeline-definition-JXYKGLGB-D-Q5ZtDF.js → timeline-definition-JXYKGLGB-CLCvY-Yf.js} +1 -1
  531. package/editor-web/assets/{trash-2-Bjj6cWzP.js → trash-2-BP6nqpg2.js} +1 -1
  532. package/editor-web/assets/{treeView-D4JQ5SDB-B6DDatXq.js → treeView-D4JQ5SDB-BmN0gwdC.js} +1 -1
  533. package/editor-web/assets/{treemap-SAJKECNS-D7j5ZhiI.js → treemap-SAJKECNS-DN29G_E_.js} +1 -1
  534. package/editor-web/assets/{undo-2-yOSG766T.js → undo-2-CHR0nvWL.js} +1 -1
  535. package/editor-web/assets/{usecaseDiagram-WPOLBNNX-tkrdKUJB.js → usecaseDiagram-WPOLBNNX-DTRS54cB.js} +1 -1
  536. package/editor-web/assets/{vennDiagram-Q3Y3IDCW-Ch4XbSnD.js → vennDiagram-Q3Y3IDCW-DAAc11Hx.js} +1 -1
  537. package/editor-web/assets/video-BlvmR8BK.js +1 -0
  538. package/editor-web/assets/{wardley-7MLQ67FV-Bynt7qNQ.js → wardley-7MLQ67FV-B-UYkmdB.js} +1 -1
  539. package/editor-web/assets/{wardleyDiagram-IVAIDKWA-DRuSgm_L.js → wardleyDiagram-IVAIDKWA-BmbwCaky.js} +1 -1
  540. package/editor-web/assets/words-D_4T9Adq.js +3 -0
  541. package/editor-web/assets/words-WgdEQdYP.js +2 -0
  542. package/editor-web/assets/{xychartDiagram-4URNHDU4-DctpvfkL.js → xychartDiagram-4URNHDU4-ChAfAq1U.js} +1 -1
  543. package/editor-web/index.html +6 -5
  544. package/package.json +8 -2
  545. package/editor-web/assets/alt-BOVao_9S.js +0 -4
  546. package/editor-web/assets/article-B6YCzhj8.js +0 -73
  547. package/editor-web/assets/calc-worker-B5-fDWnb.js +0 -45
  548. package/editor-web/assets/channel-C26aBI4o.js +0 -1
  549. package/editor-web/assets/chart-BOnxneyw.js +0 -1
  550. package/editor-web/assets/choice-O5nwc2N0.js +0 -1
  551. package/editor-web/assets/collaborator-BJU5qwHd.js +0 -1
  552. package/editor-web/assets/createLucideIcon-B3B95oX5.js +0 -1
  553. package/editor-web/assets/dist-C6NqUEG4.js +0 -16
  554. package/editor-web/assets/dist-C9UGmCG9.js +0 -6
  555. package/editor-web/assets/dist-CAk5bjBm.js +0 -1
  556. package/editor-web/assets/dist-CKyfo5RM.js +0 -340
  557. package/editor-web/assets/dist-CRaWqNwq.js +0 -37
  558. package/editor-web/assets/dist-CwIBc7HQ.js +0 -1
  559. package/editor-web/assets/dist-DXRmkezB.js +0 -38
  560. package/editor-web/assets/dist-EKK5i0dG.js +0 -219
  561. package/editor-web/assets/dist-hHJlpLWo.js +0 -5
  562. package/editor-web/assets/dist-oYKcwWUj.js +0 -4
  563. package/editor-web/assets/dist-shKo7XVN.js +0 -2
  564. package/editor-web/assets/dist-wrKxBrVu.js +0 -24
  565. package/editor-web/assets/flowDiagram-IUGLLWBU-ouDQYiTr.js +0 -1
  566. package/editor-web/assets/hint-_AQWCDMj.js +0 -1
  567. package/editor-web/assets/index-BsstP-cI.js +0 -28
  568. package/editor-web/assets/index-DQRcmxBO.css +0 -2
  569. package/editor-web/assets/minus-Cgmm6ncD.js +0 -1
  570. package/editor-web/assets/progress-0B_TVsPi.js +0 -6
  571. package/editor-web/assets/react-BP46yLMB.js +0 -1
  572. package/editor-web/assets/react-pgBZqVxJ.js +0 -96
  573. package/editor-web/assets/schemas-Ewwjtbf4.js +0 -1
  574. package/editor-web/assets/session-DiI9KYRI.js +0 -1
  575. package/editor-web/assets/slides-CCwgBcGH.js +0 -1
  576. package/editor-web/assets/sound-CqryteNl.js +0 -1
  577. package/editor-web/assets/swatch-DL3HqIjW.js +0 -1
  578. package/editor-web/assets/swimlanesDiagram-AYQRV4AK-BkOls8Tv.js +0 -8
  579. package/editor-web/assets/switch-DltnKqN-.js +0 -1
  580. package/editor-web/assets/syntax-CC6QYhCz.js +0 -1
  581. package/editor-web/assets/tabs-C-re0Kxn.js +0 -1
  582. package/editor-web/assets/video-DXFiCNGc.js +0 -1
@@ -1,13 +1,13 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{chartColor as Y,chartFrame as Q,docChartSvg as V}from"./chart.js";import{BACKGROUNDS as L,TEXT_COLORS as W}from"./color.js";import{columnWidths as ee,COLUMN_GAP as te}from"./columns.js";import{COMPONENT_WIDTH as G,componentName as ne}from"./component.js";import{citationText as ie,citedOf as oe,sourceList as ae}from"./cite.js";import{blockId as se,captionNumbers as re,contentsTitle as de,numberedCaption as M,writtenInChinese as le}from"./captions.js";import{DRAWN_CODE as B,mathHtml as ce}from"./math.js";import{columnShares as pe,numberColumns as fe}from"./table.js";import{splitTitle as he}from"./title.js";import{PAPER as p,TONE_COLORS as D,tagColors as ge}from"./paper.js";import{COVER_HEIGHT_MM as ue,everyBlock as A,innerBlocks as me,noteNumbers as $e,statTone as be}from"./model.js";import{effectiveLook as R,lineMultiple as xe,resolvePage as q,SINGLE_LINE as I}from"./page.js";export const PAGE_FACES={sans:'Carlito, Calibri, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif',serif:'Caladea, Cambria, "Noto Serif SC", "Songti SC", Georgia, serif',times:'Tinos, "Times New Roman", Times, "Noto Serif SC", serif',mono:'Cousine, "Courier New", "Noto Sans SC", monospace',song:'"Noto Serif SC", "Songti SC", SimSun, "宋体", serif',hei:'"Noto Sans SC", "PingFang SC", SimHei, "黑体", sans-serif',fangsong:'FangSong, STFangsong, "仿宋", "FangSong_GB2312", "Noto Serif SC", serif',kai:'"LXGW WenKai", KaiTi, STKaiti, "楷体", "Noto Serif SC", serif',xiaobiaosong:'"FZXiaoBiaoSong-B05S", "方正小标宋简体", "Noto Serif SC", "Songti SC", serif'};export function pageFaces(i={}){const t=R(i).font??"sans";return{text:PAGE_FACES[t],heading:PAGE_FACES[t],mono:PAGE_FACES.mono}}export const pageAccent=(i={})=>i.accent===void 0?void 0:Y(i.accent);export{BACKGROUNDS,TEXT_COLORS}from"./color.js";export function blockNumbers(i){const t=new Map;for(const e of A(i))t.set(e,t.size);return t}const c=i=>i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"),_=(i,t)=>t[i]??(/^(#[0-9a-f]{3,8}|[a-z]+|(rgb|hsl)a?\([\d\s.,%/]+\))$/i.test(i)?i:void 0),g=(i,t)=>{const e=t.ids?.get(i);return e===void 0?"":` data-b="${String(e)}"`};export function headingAnchors(i){const t=new Map,e=new Map;for(const a of A(i)){if(a.type!=="heading")continue;const s=a.content.map(r=>r.text).join("").trim().toLowerCase().replace(/[^\p{L}\p{N}\s-]/gu,"").replace(/\s/gu,"-"),n=s===""?"section":s,o=e.get(n)??0;e.set(n,o+1),t.set(a,o===0?n:`${n}-${String(o)}`)}return t}function k(i,t){return i.map(e=>{if(e.cite!==void 0){const{items:d,numbers:l,style:f}=t.sources,u=oe(e.cite).keys[0],S=c(ie(e.cite,d,l,f));return u!==void 0&&l.has(u)?`<a class="cite" href="#source-${c(u)}">${S}</a>`:`<span class="cite">${S}</span>`}if(e.note!==void 0){const d=t.notes.get(e.note.toLowerCase());return d===void 0?`<sup class="fn">[${c(e.note)}]</sup>`:`<sup class="fn"><a href="#note-${String(d)}">${String(d)}</a></sup>`}const a=e.text===""&&e.href?.startsWith("#")===!0?t.refs.get(decodeURIComponent(e.href.slice(1)))??"":e.text;let s=c(a).replace(/\n/g,"<br>");const n=e.styles;n.code&&(s=`<code>${s}</code>`),n.strike&&(s=`<s>${s}</s>`),n.italic&&(s=`<em>${s}</em>`),n.bold&&(s=`<strong>${s}</strong>`),n.underline&&(s=`<u>${s}</u>`);const o=n.color===void 0?void 0:_(n.color,W),r=n.background===void 0?void 0:_(n.background,L);if((o!==void 0||r!==void 0)&&(s=`<span style="${o===void 0?"":`color:${o};`}${r===void 0?"":`background:${r};`}">${s}</span>`),n.tag!==void 0){const d=ge(n.tag);s=`<span class="tag" style="background:${d.bg};color:${d.fg}">${s}</span>`}return e.href!==void 0&&/^(https?:|mailto:|#|\/|\.)/i.test(e.href)&&(s=`<a href="${c(e.href)}">${s}</a>`),s}).join("")}function C(i){if(!i)return"";const t=i.color===void 0?void 0:_(i.color,W),e=i.background===void 0?void 0:_(i.background,L),a=[i.align===void 0?"":`text-align:${i.align};`,t===void 0?"":`color:${t};`,e===void 0?"":`background:${e};padding:0.15em 0.4em;border-radius:3px;`].join("");return a===""?"":` style="${a}"`}const U=i=>i.type==="bullet"||i.type==="numbered"||i.type==="check";function y(i,t,e){const a=[];let s=0;for(;s<i.length;){const n=i[s];if(n===void 0)break;if(U(n)){const o=n.type==="numbered";let r=s;const d=[];for(;r<i.length;){const f=i[r];if(!f||!U(f)||f.type==="numbered"!==o)break;const u=f.type==="check"?`<span class="box${f.checked?" done":""}"></span>`:"";d.push(`<li${g(f,e)}${f.type==="check"?` class="task${f.checked?" done":""}"`:""}${C(f.look)}>${u}<span class="words">${k(f.content,e)}</span>${y(f.children??[],t,e)}</li>`),r++}const l=n.type==="numbered"&&n.start!==void 0?` start="${String(n.start)}"`:"";a.push(o?`<ol${l}>${d.join("")}</ol>`:`<ul>${d.join("")}</ul>`),s=r;continue}switch(s++,n.type){case"paragraph":a.push(`<p${g(n,e)}${C(n.look)}>${k(n.content,e)||"&nbsp;"}</p>${O(n.children,t,e)}`);break;case"heading":{const o=`h${String(n.level)}`;a.push(`<${o} id="${c(e.anchors.get(n)??"")}"${g(n,e)}${C(n.look)}>${k(n.content,e)}</${o}>${O(n.children,t,e)}`);break}case"toggle":a.push(`<p${g(n,e)}${C(n.look)}>${k(n.content,e)}</p>${O(n.children,t,e)}`);break;case"quote":a.push(`<blockquote${g(n,e)}${C(n.look)}><p>${k(n.content,e)}</p>${y(n.children??[],t,e)}</blockquote>`);break;case"callout":a.push(`<div class="callout"${g(n,e)}${C(n.look)}><span class="callout-icon">${c(n.icon??"💡")}</span><div><p>${k(n.content,e)}</p>${y(n.children??[],t,e)}</div></div>`);break;case"card":a.push(`<div class="card${cardKept(n,q(t.page))?" kept":""}"${g(n,e)}>${n.title===void 0&&n.subtitle===void 0?"":`<div class="card-head">${n.title===void 0?"":`<p class="card-title">${c(n.title)}</p>`}${n.subtitle===void 0?"":`<p class="card-subtitle">${c(n.subtitle)}</p>`}</div>`}${y(n.children??[],{...t,room:(t.room??G)-2*ye},e)}</div>`);break;case"stats":a.push(`<div class="stats"${g(n,e)} style="grid-template-columns:repeat(${String(n.stats.length)},minmax(0,1fr))">${n.stats.map(o=>{const r=be(o),d=o.delta===void 0&&o.note===void 0?"":`<p class="stat-foot">${o.delta===void 0?"":`<span class="stat-delta" style="color:${D[r]}">${c(o.delta)}</span>`}${o.delta!==void 0&&o.note!==void 0?" ":""}${o.note===void 0?"":c(o.note)}</p>`,l=o.trend===void 0?"":trendSvg(o.trend,D[r==="flat"?"flat":r]);return`<div class="stat"><p class="stat-label">${c(o.label)}</p><p class="stat-value">${c(o.value)}</p>${d}${l}</div>`}).join("")}</div>`);break;case"code":a.push(Se(n,t,g(n,e)));break;case"columns":{const o=n.columns.map(d=>`${String(d.width??1)}fr`).join(" "),r=ee(n,t.room);a.push(`<div class="columns${columnsKept(n,q(t.page))?" kept":""}"${g(n,e)} style="grid-template-columns:${o}">${n.columns.map((d,l)=>`<div class="column">${y(d.blocks,{...t,room:r[l]??G},e)}</div>`).join("")}</div>`);break}case"chart":{const o=e.numbers.get(n),r=o===void 0?n:we(n),{svg:d,problems:l}=V(r,{...t,font:pageFaces(t.page).text}),{width:f}=Q(n,t.room),u=o===void 0||n.title===void 0?"":`<figcaption>${c(M(n.title,o))}</figcaption>`;a.push(d===void 0?`<div class="embed"${g(n,e)} data-chart>${c(n.title??"Chart")}<br><small>${c(l.join("; "))}</small></div>`:`<figure class="chart"${P(n.id)}${g(n,e)} style="max-width:${String(f)}px">${d}${u}</figure>`);break}case"image":{const o=t.image?.(n.src)??n.src;a.push(`<figure${P(n.id)}${g(n,e)}${n.align===void 0?"":` style="text-align:${n.align}"`}><img src="${c(o)}" alt="${c(n.alt??"")}"${n.width===void 0?"":` width="${String(n.width)}"`}>${n.caption===void 0?"":`<figcaption>${c(M(n.caption,e.numbers.get(n)))}</figcaption>`}</figure>`);break}case"table":{const o=n.head===void 0||n.head==="both",r=n.head==="column"||n.head==="both",d=fe(n),l=(h,m,$)=>`<tr${e.ids===void 0?"":` data-row="${String($)}"`}>${h.map((w,j)=>{const F=m||r&&j===0?"th":"td",Z=d.has(j)?' class="num"':"";return`<${F}${Z}>${k(w,e)}</${F}>`}).join("")}</tr>`,f=pe(n),u=f.reduce((h,m,$)=>h+(n.widths?.[$]??0),0),S=f.reduce((h,m,$)=>h+(n.widths?.[$]?0:m),0)||1,N=`<colgroup>${f.map((h,m)=>{const $=n.widths?.[m],w=b(h/S*100);return $?`<col style="width:${String($)}px">`:u===0?`<col style="width:${w}%">`:`<col style="width:calc((100% - ${String(u)}px) * ${b(h/S)})">`}).join("")}</colgroup>`,[v,...E]=n.rows,H=o&&v!==void 0?`<thead>${l(v,!0,0)}</thead>`:"",z=(o?E:n.rows).map((h,m)=>l(h,!1,o?m+1:m)).join(""),T=n.caption===void 0?"":`<caption>${c(M(n.caption,e.numbers.get(n)))}</caption>`;a.push(`<table${P(n.id)}${g(n,e)}>${T}${N}${H}<tbody>${z}</tbody></table>`);break}case"divider":a.push(`<hr${g(n,e)}>`);break;case"pagebreak":a.push(`<div class="page-break"${g(n,e)}></div>`);break;case"toc":a.push(ke(n,e));break;case"bibliography":e.listed||(e.listed=!0,a.push(K(e,g(n,e))));break;case"note":break;case"component":{const o=t.component?.(n),r=n.align===void 0?"":` style="text-align:${n.align}"`;a.push(o===void 0?`<div class="embed"${g(n,e)} data-component>${c(ne(n))}</div>`:`<figure${P(n.id)}${g(n,e)}${r}><img src="${c(o)}" alt="${c(n.alt??"")}"${n.width===void 0?"":` width="${String(n.width)}"`}>${n.caption===void 0?"":`<figcaption>${c(M(n.caption,e.numbers.get(n)))}</figcaption>`}</figure>`);break}case"embed":{const o=t.embed?.(n.source,e.embeds);e.embeds++;const r=/^<\s*([A-Za-z][\w.]*)/.exec(n.source.trim())?.[1];a.push(o===void 0?`<div class="embed"${g(n,e)} data-embed>${c(r??"")}</div>`:`<div${g(n,e)}>${o}</div>`);break}case"source":break}}return a.join(`
3
- `)}function K(i,t=""){const{list:e,style:a}=i.sources;return e.length===0?"":`<section class="sources" data-style="${a}"${t}><ol>${e.map(s=>`<li id="source-${c(s.item.id)}">${s.pieces.map(n=>n.italic?`<i>${c(n.text)}</i>`:c(n.text)).join("")}</li>`).join("")}</ol></section>`}const we=i=>{const t={...i};return delete t.title,t},P=i=>i===void 0?"":` id="${c(i)}"`;function ke(i,t){const e=i.levels??3,a=t.headings.filter(r=>r.block.level<=e),s=Math.min(...a.map(r=>r.block.level)),n=a.map(({block:r,anchor:d})=>{const l=t.headingPage?.(d);return`<li style="padding-left:${String(r.level-s)}em"><a href="#${c(d)}"><span class="toc-words">${k(r.content,t)}</span>${l===void 0?"":`<span class="toc-fill"></span><span class="toc-page">${String(l)}</span>`}</a></li>`}),o=de(i,t.chinese);return`<nav class="toc"${g(i,t)}>${o===""?"":`<p class="toc-title">${c(o)}</p>`}<ol>${n.join("")}</ol></nav>`}export function keptWhole(i,t,e=0){const a=.35277777777777775,s="pt"in t.lineHeight?t.lineHeight.pt:t.lineHeight.multiple*(I[t.font]??1.22)*t.size,n=Math.max(20,(t.textWidth/a-30)/(t.size*.5)),o=r=>r.reduce((d,l)=>{if(l.type==="table")return d+l.rows.length*1.6+1;if(l.type==="chart"||l.type==="image"||l.type==="component")return d+18;if(l.type==="card")return d+2+o(l.children??[]);const f="content"in l?Math.max(1,Math.ceil(l.content.map(u=>u.text).join("").length/n))+.5:2;return d+f+o(me(l))},0);return(e+o(i))*s<t.textHeight/a*.6}export const cardKept=(i,t)=>keptWhole(i.children??[],t,2),columnsKept=(i,t)=>i.columns.every(e=>keptWhole(e.blocks,t));const ye=15;export function trendSvg(i,t){const s=Math.min(...i),o=Math.max(...i)-s||1,d=i.map((l,f)=>[f/Math.max(1,i.length-1)*100,22-(l-s)/o*20]).map(([l,f],u)=>`${u===0?"M":"L"}${(l??0).toFixed(1)} ${(f??0).toFixed(1)}`).join(" ");return`<svg class="stat-trend" viewBox="0 0 ${String(100)} ${String(24)}" preserveAspectRatio="none" aria-hidden="true"><path d="${d}" fill="none" stroke="${t}" stroke-width="1.5" vector-effect="non-scaling-stroke" stroke-linejoin="round" stroke-linecap="round"/></svg>`}function Se(i,t,e=""){if(i.language===B.math)return`<div class="math"${e}>${ce(i.code).html}</div>`;if(i.language===B.mermaid){const a=t.diagram?.(i.code);if(a?.svg!==void 0)return`<figure class="diagram"${e}>${a.svg}</figure>`;if(a?.error!==void 0)return`<pre${e}><code>${c(i.code)}</code></pre><p class="drawn-error">Mermaid: ${c(a.error)}</p>`}return`<pre${e}><code>${ve(i.code)}</code></pre>`}const ve=i=>i.split(`
4
- `).map(t=>`<span class="line">${c(t)}</span>`).join(""),O=(i,t,e)=>i?.length?`<div class="under">${y(i,t,e)}</div>`:"";export const DOC_CSS=`
2
+ import{chartColor as te,chartFrame as ne,docChartSvg as ie}from"./chart.js";import{emojiPicturesScript as oe}from"@allyhub/browser/emoji";export{EMOJI_PATTERN}from"@allyhub/browser/emoji";import{BACKGROUNDS as B,TEXT_COLORS as D}from"./color.js";import{columnWidths as ae,COLUMN_GAP as se}from"./columns.js";import{COMPONENT_WIDTH as U,componentName as re}from"./component.js";import{citationText as de,citedOf as le,sourceList as ce}from"./cite.js";import{blockId as pe,captionNumbers as fe,contentsTitle as he,numberedCaption as R,writtenInChinese as ge,withoutTitle as ue}from"./captions.js";import{DRAWN_CODE as K,mathHtml as me}from"./math.js";import{charsAcross as X,columnShares as $e,emptyHead as be,numberColumns as ke}from"./table.js";import{splitTitle as xe}from"./title.js";import{PAPER as c,TONE_COLORS as Z,tagColors as we}from"./paper.js";import{COVER_HEIGHT_MM as ye,everyBlock as q,innerBlocks as Se,noteNumbers as ve,statTone as Ce}from"./model.js";import{effectiveLook as H,lineMultiple as ze,resolvePage as j,SINGLE_LINE as I}from"./page.js";export const PAGE_FACES={sans:'Carlito, Calibri, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif',serif:'Caladea, Cambria, "Noto Serif SC", "Songti SC", Georgia, serif',times:'Tinos, "Times New Roman", Times, "Noto Serif SC", serif',mono:'Cousine, "Courier New", "Noto Sans SC", monospace',song:'"Noto Serif SC", "Songti SC", SimSun, "宋体", serif',hei:'"Noto Sans SC", "PingFang SC", SimHei, "黑体", sans-serif',fangsong:'FangSong, STFangsong, "仿宋", "FangSong_GB2312", "Noto Serif SC", serif',kai:'"LXGW WenKai", KaiTi, STKaiti, "楷体", "Noto Serif SC", serif',xiaobiaosong:'"FZXiaoBiaoSong-B05S", "方正小标宋简体", "Noto Serif SC", "Songti SC", serif'};export function pageFaces(i={}){const n=H(i).font??"sans";return{text:PAGE_FACES[n],heading:PAGE_FACES[n],mono:PAGE_FACES.mono}}export const pageAccent=(i={})=>i.accent===void 0?void 0:te(i.accent);export{BACKGROUNDS,TEXT_COLORS}from"./color.js";export function blockNumbers(i){const n=new Map;for(const e of q(i))n.set(e,n.size);return n}const p=i=>i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"),O=(i,n)=>n[i]??(/^(#[0-9a-f]{3,8}|[a-z]+|(rgb|hsl)a?\([\d\s.,%/]+\))$/i.test(i)?i:void 0),h=(i,n)=>{const e=n.ids?.get(i);return e===void 0?"":` data-b="${String(e)}"`};export function headingAnchors(i){const n=new Map,e=new Map;for(const a of q(i)){if(a.type!=="heading")continue;const s=a.content.map(r=>r.text).join("").trim().toLowerCase().replace(/[^\p{L}\p{N}\s-]/gu,"").replace(/\s/gu,"-"),t=s===""?"section":s,o=e.get(t)??0;e.set(t,o+1),n.set(a,o===0?t:`${t}-${String(o)}`)}return n}function x(i,n){return i.map(e=>{if(e.cite!==void 0){const{items:d,numbers:l,style:f}=n.sources,g=le(e.cite).keys[0],w=p(de(e.cite,d,l,f));return g!==void 0&&l.has(g)?`<a class="cite" href="#source-${p(g)}">${w}</a>`:`<span class="cite">${w}</span>`}if(e.note!==void 0){const d=n.notes.get(e.note.toLowerCase());return d===void 0?`<sup class="fn">[${p(e.note)}]</sup>`:`<sup class="fn"><a href="#note-${String(d)}">${String(d)}</a></sup>`}const a=e.text===""&&e.href?.startsWith("#")===!0?n.refs.get(decodeURIComponent(e.href.slice(1)))??"":e.text;let s=p(a).replace(/\n/g,"<br>");const t=e.styles;t.code&&(s=`<code>${s}</code>`),t.strike&&(s=`<s>${s}</s>`),t.italic&&(s=`<em>${s}</em>`),t.bold&&(s=`<strong>${s}</strong>`),t.underline&&(s=`<u>${s}</u>`);const o=t.color===void 0?void 0:O(t.color,D),r=t.background===void 0?void 0:O(t.background,B);if((o!==void 0||r!==void 0)&&(s=`<span style="${o===void 0?"":`color:${o};`}${r===void 0?"":`background:${r};`}">${s}</span>`),t.tag!==void 0){const d=we(t.tag);s=`<span class="tag" style="background:${d.bg};color:${d.fg}">${s}</span>`}return e.href!==void 0&&/^(https?:|mailto:|#|\/|\.)/i.test(e.href)&&(s=`<a href="${p(e.href)}">${s}</a>`),s}).join("")}function N(i,n=!1){if(!i)return"";const e=i.color===void 0?void 0:O(i.color,D),a=i.background===void 0?void 0:O(i.background,B),s=[i.align===void 0?"":`text-align:${i.align};`,e===void 0?"":`color:${e};`,a===void 0?"":n?`background:${a};`:`background:${a};padding:0.15em 0.4em;border-radius:3px;`].join("");return s===""?"":` style="${s}"`}const Y=i=>i.type==="bullet"||i.type==="numbered"||i.type==="check";function y(i,n,e){const a=[];let s=0;for(;s<i.length;){const t=i[s];if(t===void 0)break;if(Y(t)){const o=t.type==="numbered";let r=s;const d=[];for(;r<i.length;){const f=i[r];if(!f||!Y(f)||f.type==="numbered"!==o)break;const g=f.type==="check"?`<span class="box${f.checked?" done":""}"></span>`:"";d.push(`<li${h(f,e)}${f.type==="check"?` class="task${f.checked?" done":""}"`:""}${N(f.look)}>${g}<span class="words">${x(f.content,e)}</span>${y(f.children??[],n,e)}</li>`),r++}const l=t.type==="numbered"&&t.start!==void 0?` start="${String(t.start)}"`:"";a.push(o?`<ol${l}>${d.join("")}</ol>`:`<ul>${d.join("")}</ul>`),s=r;continue}switch(s++,t.type){case"paragraph":a.push(`<p${h(t,e)}${N(t.look)}>${x(t.content,e)||"&nbsp;"}</p>${W(t.children,n,e)}`);break;case"heading":{const o=`h${String(t.level)}`;a.push(`<${o} id="${p(e.anchors.get(t)??"")}"${h(t,e)}${N(t.look)}>${x(t.content,e)}</${o}>${W(t.children,n,e)}`);break}case"toggle":a.push(`<p${h(t,e)}${N(t.look)}>${x(t.content,e)}</p>${W(t.children,n,e)}`);break;case"quote":a.push(`<blockquote${h(t,e)}${N(t.look)}><p>${x(t.content,e)}</p>${y(t.children??[],n,e)}</blockquote>`);break;case"callout":a.push(`<div class="callout"${h(t,e)}${N(t.look,!0)}>${t.icon===void 0?"":`<span class="callout-icon">${p(t.icon)}</span>`}<div><p>${x(t.content,e)}</p>${y(t.children??[],n,e)}</div></div>`);break;case"card":a.push(`<div class="card${cardKept(t,j(n.page))?" kept":""}"${h(t,e)}>${t.title===void 0&&t.subtitle===void 0?"":`<div class="card-head">${t.title===void 0?"":`<p class="card-title">${p(t.title)}</p>`}${t.subtitle===void 0?"":`<p class="card-subtitle">${p(t.subtitle)}</p>`}</div>`}${y(t.children??[],{...n,room:(n.room??U)-2*Te},e)}</div>`);break;case"stats":a.push(`<div class="stats"${h(t,e)} style="grid-template-columns:repeat(${String(t.stats.length)},minmax(0,1fr))">${t.stats.map(o=>{const r=Ce(o),d=o.delta===void 0&&o.note===void 0?"":`<p class="stat-foot">${o.delta===void 0?"":`<span class="stat-delta" style="color:${Z[r]}">${p(o.delta)}</span>`}${o.delta!==void 0&&o.note!==void 0?" ":""}${o.note===void 0?"":p(o.note)}</p>`,l=o.trend===void 0?"":trendSvg(o.trend,Z[r==="flat"?"flat":r]);return`<div class="stat"><p class="stat-label">${p(o.label)}</p><p class="stat-value">${p(o.value)}</p>${d}${l}</div>`}).join("")}</div>`);break;case"code":a.push(Ne(t,n,h(t,e)));break;case"columns":{const o=t.columns.map(d=>`${String(d.width??1)}fr`).join(" "),r=ae(t,n.room);a.push(`<div class="columns${columnsKept(t,j(n.page))?" kept":""}"${h(t,e)} style="grid-template-columns:${o}">${t.columns.map((d,l)=>`<div class="column">${y(d.blocks,{...n,room:r[l]??U},e)}</div>`).join("")}</div>`);break}case"chart":{const o=e.numbers.get(t),r=o===void 0?t:ue(t),{svg:d,problems:l}=ie(r,{...n,font:pageFaces(n.page).text}),{width:f}=ne(t,n.room),g=o===void 0||t.title===void 0?"":`<figcaption>${p(R(t.title,o))}</figcaption>`;a.push(d===void 0?`<div class="embed"${h(t,e)} data-chart>${p(t.title??"Chart")}<br><small>${p(l.join("; "))}</small></div>`:`<figure class="chart"${L(t.id)}${h(t,e)} style="max-width:${String(f)}px">${d}${g}</figure>`);break}case"image":{const o=n.image?.(t.src)??t.src;a.push(`<figure${L(t.id)}${h(t,e)}${t.align===void 0?"":` style="text-align:${t.align}"`}><img src="${p(o)}" alt="${p(t.alt??"")}"${t.width===void 0?"":` width="${String(t.width)}"`}>${t.caption===void 0?"":`<figcaption>${p(R(t.caption,e.numbers.get(t)))}</figcaption>`}</figure>`);break}case"table":{const o=t.head===void 0||t.head==="both",r=t.head==="column"||t.head==="both",d=ke(t),l=be(t),f=(m,b,T)=>`<tr${e.ids===void 0?"":` data-row="${String(T)}"`}>${m.map((_,F)=>{const G=b||r&&F===0?"th":"td",ee=d.has(F)?' class="num"':"";return`<${G}${ee}>${x(_,e)}</${G}>`}).join("")}</tr>`,g=j(n.page),w=(t.widths??[]).reduce((m,b)=>m+(b??0),0),M=n.room??g.textWidth*96/25.4,C=$e(t,{across:X(Math.max(M-w,0),g.spacing.small),margins:X(2*g.spacing.cell.side*96/72,g.spacing.small)}),z=C.reduce((m,b,T)=>m+(t.widths?.[T]?0:b),0)||1,P=`<colgroup>${C.map((m,b)=>{const T=t.widths?.[b],_=$(m/z*100);return T?`<col style="width:${String(T)}px">`:w===0?`<col style="width:${_}%">`:`<col style="width:calc((100% - ${String(w)}px) * ${$(m/z)})">`}).join("")}</colgroup>`,[E,...A]=t.rows,u=o&&E!==void 0&&!l?`<thead>${f(E,!0,0)}</thead>`:"",S=(o?A:t.rows).map((m,b)=>f(m,!1,o?b+1:b)).join(""),v=t.caption===void 0?"":`<caption>${p(R(t.caption,e.numbers.get(t)))}</caption>`;a.push(`<table${L(t.id)}${h(t,e)}>${v}${P}${u}<tbody>${S}</tbody></table>`);break}case"divider":a.push(`<hr${h(t,e)}>`);break;case"pagebreak":a.push(`<div class="page-break"${h(t,e)}></div>`);break;case"toc":a.push(Ee(t,e));break;case"bibliography":e.listed||(e.listed=!0,a.push(J(e,h(t,e))));break;case"note":break;case"component":{const o=n.component?.(t),r=t.align===void 0?"":` style="text-align:${t.align}"`;a.push(o===void 0?`<div class="embed"${h(t,e)} data-component>${p(re(t))}</div>`:`<figure${L(t.id)}${h(t,e)}${r}><img src="${p(o)}" alt="${p(t.alt??"")}"${t.width===void 0?"":` width="${String(t.width)}"`}>${t.caption===void 0?"":`<figcaption>${p(R(t.caption,e.numbers.get(t)))}</figcaption>`}</figure>`);break}case"embed":{const o=n.embed?.(t.source,e.embeds);e.embeds++;const r=/^<\s*([A-Za-z][\w.]*)/.exec(t.source.trim())?.[1];a.push(o===void 0?`<div class="embed"${h(t,e)} data-embed>${p(r??"")}</div>`:`<div${h(t,e)}>${o}</div>`);break}case"source":break}}return a.join(`
3
+ `)}function J(i,n=""){const{list:e,style:a}=i.sources;return e.length===0?"":`<section class="sources" data-style="${a}"${n}><ol>${e.map(s=>`<li id="source-${p(s.item.id)}">${s.pieces.map(t=>t.italic?`<i>${p(t.text)}</i>`:p(t.text)).join("")}</li>`).join("")}</ol></section>`}const L=i=>i===void 0?"":` id="${p(i)}"`;function Ee(i,n){const e=i.levels??3,a=n.headings.filter(r=>r.block.level<=e),s=Math.min(...a.map(r=>r.block.level)),t=a.map(({block:r,anchor:d})=>{const l=n.headingPage?.(d);return`<li style="padding-left:${String(r.level-s)}em"><a href="#${p(d)}"><span class="toc-words">${x(r.content,n)}</span>${l===void 0?"":`<span class="toc-fill"></span><span class="toc-page">${String(l)}</span>`}</a></li>`}),o=he(i,n.chinese);return`<nav class="toc"${h(i,n)}>${o===""?"":`<p class="toc-title">${p(o)}</p>`}<ol>${t.join("")}</ol></nav>`}export function keptWhole(i,n,e=0){const a=.35277777777777775,s="pt"in n.lineHeight?n.lineHeight.pt:n.lineHeight.multiple*(I[n.font]??1.22)*n.size,t=Math.max(20,(n.textWidth/a-30)/(n.size*.5)),o=r=>r.reduce((d,l)=>{if(l.type==="table")return d+l.rows.length*1.6+1;if(l.type==="chart"||l.type==="image"||l.type==="component")return d+18;if(l.type==="card")return d+2+o(l.children??[]);const f="content"in l?Math.max(1,Math.ceil(l.content.map(g=>g.text).join("").length/t))+.5:2;return d+f+o(Se(l))},0);return(e+o(i))*s<n.textHeight/a*.6}export const cardKept=(i,n)=>keptWhole(i.children??[],n,2),columnsKept=(i,n)=>i.columns.every(e=>keptWhole(e.blocks,n));const Te=15;export function trendSvg(i,n){const s=Math.min(...i),o=Math.max(...i)-s||1,d=i.map((l,f)=>[f/Math.max(1,i.length-1)*100,22-(l-s)/o*20]).map(([l,f],g)=>`${g===0?"M":"L"}${(l??0).toFixed(1)} ${(f??0).toFixed(1)}`).join(" ");return`<svg class="stat-trend" viewBox="0 0 ${String(100)} ${String(24)}" preserveAspectRatio="none" aria-hidden="true"><path d="${d}" fill="none" stroke="${n}" stroke-width="1.5" vector-effect="non-scaling-stroke" stroke-linejoin="round" stroke-linecap="round"/></svg>`}function Ne(i,n,e=""){if(i.language===K.math)return`<div class="math"${e}>${me(i.code).html}</div>`;if(i.language===K.mermaid){const a=n.diagram?.(i.code);if(a?.svg!==void 0)return`<figure class="diagram"${e}>${a.svg}</figure>`;if(a?.error!==void 0)return`<pre${e}><code>${p(i.code)}</code></pre><p class="drawn-error">Mermaid: ${p(a.error)}</p>`}return`<pre${e}><code>${je(i.code)}</code></pre>`}const je=i=>i.split(`
4
+ `).map(n=>`<span class="line">${p(n)}</span>`).join(""),W=(i,n,e)=>i?.length?`<div class="under">${y(i,n,e)}</div>`:"";export const DOC_CSS=`
5
5
  /* The page's side margins are the text column's own padding, so a cover
6
6
  can reach the page's edges. The default page is Letter (PAGE_DEFAULTS). */
7
7
  @page { size: 215.9mm 279.4mm; margin: 18mm 0; }
8
8
  * { box-sizing: border-box; }
9
9
  html { font-size: 11pt; }
10
- body { margin: 0; color: ${p.ink}; font-family: Carlito, Calibri, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; line-height: 1.4; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
10
+ body { margin: 0; color: ${c.ink}; font-family: Carlito, Calibri, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; line-height: 1.4; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
11
11
  main { max-width: 215.9mm; margin: 0 auto; padding: 0 20mm; overflow-x: clip; }
12
12
  /* Every block's space and step in is the page's (pageCss, from BlockSpacing). */
13
13
  h1, h2, h3, h4, h5, h6 { line-height: inherit; margin: 0; break-after: avoid; }
@@ -19,81 +19,82 @@ h2 { font-size: 1.45em; }
19
19
  .toc-title { font-weight: bold; line-height: inherit; break-after: avoid; }
20
20
  h3 { font-size: 1.15em; }
21
21
  h4, h5, h6 { font-size: 1em; }
22
- h5 { color: ${p.lead}; }
23
- h6 { color: ${p.leadSoft}; font-weight: 500; }
22
+ h5 { color: ${c.lead}; }
23
+ h6 { color: ${c.leadSoft}; font-weight: 500; }
24
24
  p, ul, ol, li { margin: 0; }
25
25
  ul, ol { padding-left: 0; }
26
26
  /* A task as the editor draws it: a box, ticked and the words struck when done. */
27
27
  li.task { list-style: none; }
28
- li.task .box { display: inline-block; width: 0.95em; height: 0.95em; margin-right: 0.55em; border: 1.5px solid ${p.ruleStrong}; border-radius: 3px; vertical-align: -0.14em; }
29
- li.task .box.done { border-color: ${p.ink}; background: ${p.ink} url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-4.9' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 85% no-repeat; }
30
- li.task.done > .words { color: ${p.leadSoft}; text-decoration: line-through; text-decoration-color: ${p.ruleStrong}; }
31
- blockquote { margin: 0; border-left: var(--quote-rule, 1px) solid ${p.ruleStrong}; color: ${p.lead}; }
32
- code { font-family: Cousine, "Courier New", monospace; font-size: 0.88em; background: ${p.stone2}; border-radius: 3px; padding: 0.12em 0.34em; }
33
- pre { margin: 0; font-family: Cousine, "Courier New", monospace; background: ${p.stone}; border: 0.5pt solid ${p.stone}; border-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; break-inside: avoid; }
28
+ li.task .box { display: inline-block; width: 0.95em; height: 0.95em; margin-right: 0.55em; border: 1.5px solid ${c.ruleStrong}; border-radius: 3px; vertical-align: -0.14em; }
29
+ li.task .box.done { border-color: ${c.ink}; background: ${c.ink} url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-4.9' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 85% no-repeat; }
30
+ li.task.done > .words { color: ${c.leadSoft}; text-decoration: line-through; text-decoration-color: ${c.ruleStrong}; }
31
+ blockquote { margin: 0; border-left: var(--quote-rule, 1px) solid ${c.ruleStrong}; color: ${c.lead}; }
32
+ code { font-family: Cousine, "Courier New", monospace; font-size: 0.88em; background: ${c.stone2}; border-radius: 3px; padding: 0.12em 0.34em; }
33
+ pre { margin: 0; font-family: Cousine, "Courier New", monospace; background: ${c.stone}; border: 0.5pt solid ${c.stone}; border-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; break-inside: avoid; }
34
34
  pre code { background: none; padding: 0; }
35
35
  pre .line { display: block; min-height: 1lh; padding-left: 2ch; text-indent: -2ch; }
36
- /* Tables as the editor sets them (Notion's): rows apart by hairlines, no
37
- lines between columns, a head over a stronger rule; laid out as Word
38
- lays them, each column as wide as it is set, the rest shared. */
36
+ /* Tables as the editor sets them, a report's three rules (booktabs): a
37
+ strong rule over and under, the head on its ground over a rule, rows apart
38
+ by lines, no lines between columns; laid
39
+ out as Word lays them, each column as wide as it is set, the rest shared. */
39
40
  table { border-collapse: collapse; width: 100%; table-layout: fixed; }
40
- th, td { border: 0; border-bottom: 0.5pt solid ${p.rule}; text-align: left; vertical-align: top; }
41
+ th, td { border: 0; border-bottom: 0.5pt solid ${c.ruleMid}; text-align: left; vertical-align: top; }
42
+ table > thead > tr:first-child > *, table:not(:has(> thead)) > tbody > tr:first-child > * { border-top: 1pt solid ${c.ruleStrong}; }
43
+ table > tbody > tr:last-child > * { border-bottom: 1pt solid ${c.ruleStrong}; }
41
44
  th { font-weight: 600; }
42
- thead th { border-bottom-color: ${p.ruleStrong}; font-weight: normal; color: ${p.lead}; }
45
+ thead th { border-bottom: 0.75pt solid ${c.ruleStrong}; background: ${c.stone3}; }
43
46
  th.num, td.num { text-align: right; }
44
- /* An emoji drawn as a picture of itself (EMOJI_PICTURES): an em square on the line, as Twemoji sets one. */
45
- img.emoji { display: inline; width: 1em; height: 1em; margin: 0 0.05em; vertical-align: -0.12em; }
46
47
  figure { break-inside: avoid; }
47
48
  img { max-width: 100%; }
48
- figcaption { color: ${p.leadSoft}; }
49
- hr { box-sizing: content-box; border: 0; border-bottom: 0.5pt solid ${p.rule}; }
50
- a { color: inherit; text-decoration: underline; text-decoration-color: ${p.ruleStrong}; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
49
+ figcaption { color: ${c.leadSoft}; }
50
+ hr { box-sizing: content-box; border: 0; border-bottom: 0.5pt solid ${c.rule}; }
51
+ a { color: inherit; text-decoration: underline; text-decoration-color: ${c.ruleStrong}; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
51
52
  /* A callout's sign in a column of its own, as wide as Word's cell for it. */
52
53
  /* A card: blocks in a hairline border under a title and a quieter line. */
53
- .card { border: 0.5pt solid ${p.rule}; border-radius: 8px; background: ${p.sheet}; }
54
+ .card { border: 0.5pt solid ${c.rule}; border-radius: 8px; background: ${c.sheet}; }
54
55
  .card.kept, .columns.kept { break-inside: avoid; }
55
56
  .card-head p { margin: 0; }
56
57
  .card-title { font-weight: 700; }
57
- .card-subtitle { color: ${p.lead}; }
58
+ .card-subtitle { color: ${c.lead}; }
58
59
  /* Figures side by side: each a label over its value, how it moved under it. */
59
60
  .stats { display: grid; break-inside: avoid; }
60
- .stat { border: 0.5pt solid ${p.rule}; border-radius: 8px; background: ${p.sheet}; }
61
+ .stat { border: 0.5pt solid ${c.rule}; border-radius: 8px; background: ${c.sheet}; }
61
62
  .stat p { margin: 0; }
62
- .stat-label, .stat-foot { color: ${p.lead}; }
63
- .stat-value { font-weight: 700; color: ${p.ink}; }
63
+ .stat-label, .stat-foot { color: ${c.lead}; }
64
+ .stat-value { font-weight: 700; color: ${c.ink}; }
64
65
  .stat-trend { display: block; width: 100%; height: 18pt; margin-top: 3pt; }
65
66
  /* A tag: a word or two in a pill of its colour. */
66
67
  .tag { border-radius: 999px; padding: 0 0.4em; font-size: 0.85em; }
67
- .callout { display: flex; border-radius: 6px; background: ${p.stone}; break-inside: avoid; }
68
+ .callout { display: flex; border-radius: 6px; background: ${c.stone}; break-inside: avoid; }
68
69
  .callout-icon { flex: none; width: 1.8em; }
69
70
  .callout > div { flex: 1; min-width: 0; }
70
- .embed { border: 1px dashed ${p.ruleMid}; border-radius: 6px; padding: 1.5em; text-align: center; color: ${p.leadSoft}; break-inside: avoid; }
71
+ .embed { border: 1px dashed ${c.ruleMid}; border-radius: 6px; padding: 1.5em; text-align: center; color: ${c.leadSoft}; break-inside: avoid; }
71
72
  /* A cover: a band of a picture across the top of the first page, edge to
72
73
  edge (Notion's). */
73
- .cover { height: ${String(ue)}mm; margin: 0 -20mm 2.4em; overflow: hidden; break-inside: avoid; }
74
+ .cover { height: ${String(ye)}mm; margin: 0 -20mm 2.4em; overflow: hidden; break-inside: avoid; }
74
75
  .cover img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }
75
76
  /* A footnote's mark, and the notes at the end under a short rule. */
76
77
  sup.fn { font-size: 0.72em; line-height: 0; margin-left: 0.02em; font-variant-numeric: tabular-nums; }
77
- sup.fn a { text-decoration: none; color: ${p.lead}; }
78
- .notes { margin-top: 2.5em; padding-top: 0.8em; border-top: 1px solid ${p.rule}; width: 100%; font-size: 0.85em; color: ${p.lead}; }
78
+ sup.fn a { text-decoration: none; color: ${c.lead}; }
79
+ .notes { margin-top: 2.5em; padding-top: 0.8em; border-top: 1px solid ${c.rule}; width: 100%; font-size: 0.85em; color: ${c.lead}; }
79
80
  .notes ol { padding-left: 1.6em; margin: 0; }
80
81
  .notes li { margin: 0.25em 0; }
81
82
  .notes li p { margin: 0; }
82
83
  .page-break { break-after: page; height: 0; }
83
84
  /* A mark set half wide at a line's end, as Word squeezes it (GRID_SQUEEZE). */
84
85
  .squeezed { letter-spacing: -0.5em; }
85
- caption { caption-side: top; text-align: left; color: ${p.leadSoft}; }
86
+ caption { caption-side: top; text-align: left; color: ${c.leadSoft}; }
86
87
  /* The contents: each heading a link, its page after a line of dots. */
87
88
  .toc ol { list-style: none; padding: 0; }
88
89
  .toc a { display: flex; align-items: baseline; gap: 0.4em; color: inherit; text-decoration: none; }
89
- .toc-fill { flex: 1; min-width: 1em; border-bottom: 1px dotted ${p.ruleMid}; }
90
+ .toc-fill { flex: 1; min-width: 1em; border-bottom: 1px dotted ${c.ruleMid}; }
90
91
  .toc-page { font-variant-numeric: tabular-nums; }
91
92
  /* Citations and the list of sources: numbered with a hanging number (GB/T 7714), or by author with a hanging line (APA, MLA) as deep as a paragraph's first line is set in (--hang). */
92
93
  a.cite { color: inherit; text-decoration: none; }
93
94
  .sources ol { list-style: none; padding-left: 0; }
94
95
  .sources li { text-align: left; text-indent: calc(-1 * var(--hang, 2em)); padding-left: var(--hang, 2em); }
95
96
  .sources[data-style="gbt7714"] li { --hang: 2.2em; }
96
- .columns { display: grid; gap: 0 ${String(te)}px; }
97
+ .columns { display: grid; gap: 0 ${String(se)}px; }
97
98
  .column { min-width: 0; }
98
99
  .column > :first-child, .callout > div > :first-child { margin-top: 0; }
99
100
  figure.chart { margin-left: auto; margin-right: auto; }
@@ -109,52 +110,10 @@ figure.chart svg, figure.diagram svg { display: inline-block; max-width: 100%; h
109
110
  a row never split, a table's head again on each page. */
110
111
  p, li { orphans: 2; widows: 2; }
111
112
  tr { break-inside: avoid; }
112
- `;function Ce(i,t,e){const a=[...A(i)].filter(o=>o.type==="note");return a.length===0?"":`<section class="notes"><ol>${a.map(o=>({note:o,n:e.notes.get(o.label.toLowerCase())})).sort((o,r)=>(o.n??1/0)-(r.n??1/0)).map(({note:o,n:r})=>`<li${g(o,e)}${r===void 0?"":` id="note-${String(r)}" value="${String(r)}"`}><p>${k(o.content,e)}</p>${y(o.children??[],t,e)}</li>`).join("")}</ol></section>`}const X="body > h1:first-child, main > h1:first-child, article > h1:first-child, main > .cover + h1",x=i=>`${String(Math.round(i*100)/100)}mm`,b=i=>String(Math.round(i*1e3)/1e3);function Ee(i){const t=i.spacing,e=o=>`${b(o)}pt`,a=e(t.after),s=e(t.step),n="pt"in i.lineHeight?e(i.lineHeight.pt):b(i.lineHeight.multiple*(I.mono??1));return[`p, ul, ol, blockquote, pre, table, figure, .math, .callout, .card, .stats, .embed, .sources li { margin: 0 0 ${a}; }`,`h1, h2, h3, h4, h5, h6 { margin: ${e(t.heading.before)} 0 ${e(t.heading.after)}; }`,`.toc-title { margin: ${e(t.heading.before)} 0 ${e(t.heading.after)}; }`,`${X} { margin-top: 0; margin-bottom: ${e(t.title)}; }`,`ul, ol { padding-left: ${s}; } li ul, li ol { margin-bottom: 0; } li.task { margin-left: -${s}; } .under { margin-left: ${s}; }`,`:is(ul, ol) + :is(ul, ol) { margin-top: -${a}; }`,`blockquote { padding-left: calc(${e(t.quote)} - var(--quote-rule, 1px)); }`,`pre { padding: ${e(t.box.top)} ${e(t.box.side)}; font-size: ${e(t.small)}; line-height: ${n}; } pre code { font-size: inherit; }`,`.callout { padding: ${e(t.box.top)} ${e(t.box.side)} ${e(Math.max(t.box.top-t.after,0))}; }`,`.card { padding: ${e(t.card.top)} ${e(t.card.side)} ${e(Math.max(t.card.top-t.after,0))}; } .card-head { margin-bottom: ${a}; } .card-subtitle { font-size: ${e(t.small)}; }`,`.stats { gap: ${e(t.gap)}; } .stat { padding: ${e(t.card.top)} ${e(t.card.side)}; } .stat-label, .stat-foot { font-size: ${e(t.small)}; } .stat-value { font-size: ${e(t.figure)}; line-height: ${b(I[i.font]??I.sans??1.22)}; }`,`table { font-size: ${e(t.small)}; } th, td { padding: ${e(t.cell.top)} ${e(t.cell.side)}; } :is(th, td):first-child { padding-left: 0; } :is(th, td):last-child { padding-right: 0; }`,`caption { font-size: ${e(t.small)}; padding-bottom: ${e(t.caption)}; }`,`figcaption { font-size: ${e(t.small)}; margin-top: ${e(t.caption)}; }`,`hr { height: 1pt; margin: ${e(t.divider)} 0; }`,`.toc ol { margin: 0; } .toc li { margin: 0 0 ${e(t.contents)}; } .sources ol { margin: 0; }`]}function J(i,t,e){if(t===void 0)return;const a=[t.font===void 0?"":`font-family: ${PAGE_FACES[e.font]};`,t.size===void 0?"":`font-size: ${b(e.size)}pt;`,e.font==="xiaobiaosong"?"font-weight: 700;":t.weight===void 0?"":`font-weight: ${e.weight==="bold"?"700":"400"};`,t.align===void 0?"":`text-align: ${e.align};`,t.italic===void 0?"":`font-style: ${e.italic?"italic":"normal"};`,e.rule?`border-bottom: 0.5pt solid ${p.rule}; padding-bottom: ${b(HEADING_RULE_SPACE)}pt;`:""].join(" ");return a.trim()===""?void 0:`${i} { ${a.trim()} }`}export const HEADING_RULE_SPACE=3;export function pageCss(i={}){const t=R(i),e=q(i),a=pageFaces(i),s=pageAccent(t),n=[];if(t.paper!==void 0||t.orientation!==void 0||t.margins!==void 0){const{top:r,right:d,bottom:l,left:f}=e.margins;n.push(`@page { size: ${x(e.width)} ${x(e.height)}; margin: ${x(r)} 0 ${x(l)}; }`,`main { max-width: ${x(e.width)}; padding: 0 ${x(d)} 0 ${x(f)}; }`,`.cover { margin-left: -${x(f)}; margin-right: -${x(d)}; }`)}t.font!==void 0&&t.font!=="sans"&&n.push(`body { font-family: ${a.text}; }`,`h1, h2, h3, h4, h5, h6 { font-family: ${a.heading}; }`,`.toc-title { font-family: ${a.heading}; }`),(t.size!==void 0||t.grid!==void 0)&&n.push(`html { font-size: ${b(e.size)}pt; }`),n.push(`body { line-height: ${"pt"in e.lineHeight?`${b(e.lineHeight.pt)}pt`:b(xe(e)??1)}; }`),n.push(...Ee(e)),e.letterSpacing!==0&&n.push(`body { letter-spacing: ${b(e.letterSpacing)}em; }`),t.textIndent!==void 0&&t.textIndent>0&&n.push(`.sources { --hang: ${b(t.textIndent)}em; }`,`p { text-indent: ${b(t.textIndent)}em; }`,"blockquote p, .callout p, .notes p, .toc p { text-indent: 0; }"),t.textAlign==="justify"&&n.push("p, li { text-align: justify; }");const o=J(X,t.title,e.title);o!==void 0&&n.push(o);for(const r of[1,2,3,4,5,6]){const d=J(r===1?"h1, .toc-title":`h${String(r)}`,t.headings?.[r],e.headings[r]);d!==void 0&&n.push(d)}return s!==void 0&&n.push(`a { color: ${s}; text-decoration-color: color-mix(in oklab, ${s} 45%, transparent); }`,`blockquote { --quote-rule: 2px; border-left-color: ${s}; }`),n.join(`
113
- `)}export function docParts(i){const t=[];let e=[],a=!1;for(const s of i)s.type==="pagebreak"&&s.orientation!==void 0?(t.push({blocks:e,landscape:a}),e=[],a=s.orientation==="landscape"):e.push(s);return t.push({blocks:e,landscape:a}),t}export const EMOJI_PATTERN="\\p{RI}\\p{RI}|[#*0-9]\\uFE0F?\\u20E3|(?:\\p{Emoji_Presentation}|\\p{Extended_Pictographic}\\uFE0F)\\p{EMod}?(?:\\u200D(?:\\p{Emoji_Presentation}|\\p{Extended_Pictographic}\\uFE0F?)\\p{EMod}?)*";const ze=`<script>
114
- window.allyhubReady = (async () => {
115
- const pattern = new RegExp(${JSON.stringify(EMOJI_PATTERN)}, "gu");
116
- const walker = document.createTreeWalker(document.querySelector("main"), NodeFilter.SHOW_TEXT);
117
- const nodes = [];
118
- for (let n = walker.nextNode(); n; n = walker.nextNode()) if (pattern.test(n.data)) nodes.push(n);
119
- pattern.lastIndex = 0;
120
- if (nodes.length === 0) return;
121
- const all = nodes.map((n) => n.data.match(pattern).join("")).join("");
122
- const faces = await document.fonts.load('64px "Noto Color Emoji"', all).catch(() => []);
123
- if (faces.length === 0) return;
124
- const size = 128;
125
- const canvas = document.createElement("canvas");
126
- canvas.width = canvas.height = size;
127
- const ctx = canvas.getContext("2d");
128
- ctx.font = (size * 0.86) + 'px "Noto Color Emoji"';
129
- ctx.textAlign = "center";
130
- ctx.textBaseline = "middle";
131
- const drawn = new Map();
132
- const picture = (e) => {
133
- if (!drawn.has(e)) {
134
- ctx.clearRect(0, 0, size, size);
135
- ctx.fillText(e, size / 2, size / 2);
136
- drawn.set(e, canvas.toDataURL("image/png"));
137
- }
138
- const img = document.createElement("img");
139
- img.className = "emoji";
140
- img.alt = e;
141
- img.src = drawn.get(e);
142
- return img;
143
- };
144
- for (const n of nodes) {
145
- const parts = [];
146
- let at = 0;
147
- for (const m of n.data.matchAll(pattern)) {
148
- if (m.index > at) parts.push(document.createTextNode(n.data.slice(at, m.index)));
149
- parts.push(picture(m[0]));
150
- at = m.index + m[0].length;
151
- }
152
- if (at < n.data.length) parts.push(document.createTextNode(n.data.slice(at)));
153
- n.replaceWith(...parts);
154
- }
155
- await Promise.all([...document.querySelectorAll("img.emoji")].map((i) => i.decode().catch(() => undefined)));
156
- })();
157
- <\/script>`,Ne=`<script>
113
+ `;function Me(i,n,e){const a=[...q(i)].filter(o=>o.type==="note");return a.length===0?"":`<section class="notes"><ol>${a.map(o=>({note:o,n:e.notes.get(o.label.toLowerCase())})).sort((o,r)=>(o.n??1/0)-(r.n??1/0)).map(({note:o,n:r})=>`<li${h(o,e)}${r===void 0?"":` id="note-${String(r)}" value="${String(r)}"`}><p>${x(o.content,e)}</p>${y(o.children??[],n,e)}</li>`).join("")}</ol></section>`}const Q="body > h1:first-child, main > h1:first-child, article > h1:first-child, main > .cover + h1",k=i=>`${String(Math.round(i*100)/100)}mm`,$=i=>String(Math.round(i*1e3)/1e3);function Ae(i){const n=i.spacing,e=o=>`${$(o)}pt`,a=e(n.after),s=e(n.step),t="pt"in i.lineHeight?e(i.lineHeight.pt):$(i.lineHeight.multiple*(I.mono??1));return[`p, ul, ol, blockquote, pre, table, figure, .math, .callout, .card, .stats, .embed, .sources li { margin: 0 0 ${a}; }`,`h1, h2, h3, h4, h5, h6 { margin: ${e(n.heading.before)} 0 ${e(n.heading.after)}; }`,`.toc-title { margin: ${e(n.heading.before)} 0 ${e(n.heading.after)}; }`,`${Q} { margin-top: 0; margin-bottom: ${e(n.title)}; }`,`ul, ol { padding-left: ${s}; } li ul, li ol { margin-bottom: 0; } li.task { margin-left: -${s}; } .under { margin-left: ${s}; }`,`:is(ul, ol) + :is(ul, ol) { margin-top: -${a}; }`,`blockquote { padding-left: calc(${e(n.quote)} - var(--quote-rule, 1px)); }`,`pre { padding: ${e(n.box.top)} ${e(n.box.side)}; font-size: ${e(n.small)}; line-height: ${t}; } pre code { font-size: inherit; }`,`.callout { padding: ${e(n.box.top)} ${e(n.box.side)} ${e(Math.max(n.box.top-n.after,0))}; }`,`.card { padding: ${e(n.card.top)} ${e(n.card.side)} ${e(Math.max(n.card.top-n.after,0))}; } .card-head { margin-bottom: ${a}; } .card-subtitle { font-size: ${e(n.small)}; }`,`.stats { gap: ${e(n.gap)}; } .stat { padding: ${e(n.card.top)} ${e(n.card.side)}; } .stat-label, .stat-foot { font-size: ${e(n.small)}; } .stat-value { font-size: ${e(n.figure)}; line-height: ${$(I[i.font]??I.sans??1.22)}; }`,`table { font-size: ${e(n.small)}; } th, td { padding: ${e(n.cell.top)} ${e(n.cell.side)}; }`,`caption { font-size: ${e(n.small)}; padding-bottom: ${e(n.caption)}; }`,`figcaption { font-size: ${e(n.small)}; margin-top: ${e(n.caption)}; }`,`hr { height: 1pt; margin: ${e(n.divider)} 0; }`,`.toc ol { margin: 0; } .toc li { margin: 0 0 ${e(n.contents)}; } .sources ol { margin: 0; }`]}function V(i,n,e){if(n===void 0)return;const a=[n.font===void 0?"":`font-family: ${PAGE_FACES[e.font]};`,n.size===void 0?"":`font-size: ${$(e.size)}pt;`,e.font==="xiaobiaosong"?"font-weight: 700;":n.weight===void 0?"":`font-weight: ${e.weight==="bold"?"700":"400"};`,n.align===void 0?"":`text-align: ${e.align};`,n.italic===void 0?"":`font-style: ${e.italic?"italic":"normal"};`,e.rule?`border-bottom: 0.5pt solid ${c.rule}; padding-bottom: ${$(HEADING_RULE_SPACE)}pt;`:""].join(" ");return a.trim()===""?void 0:`${i} { ${a.trim()} }`}export const HEADING_RULE_SPACE=3;export function pageCss(i={}){const n=H(i),e=j(i),a=pageFaces(i),s=pageAccent(n),t=[];if(n.paper!==void 0||n.orientation!==void 0||n.margins!==void 0){const{top:r,right:d,bottom:l,left:f}=e.margins;t.push(`@page { size: ${k(e.width)} ${k(e.height)}; margin: ${k(r)} 0 ${k(l)}; }`,`main { max-width: ${k(e.width)}; padding: 0 ${k(d)} 0 ${k(f)}; }`,`.cover { margin-left: -${k(f)}; margin-right: -${k(d)}; }`)}n.font!==void 0&&n.font!=="sans"&&t.push(`body { font-family: ${a.text}; }`,`h1, h2, h3, h4, h5, h6 { font-family: ${a.heading}; }`,`.toc-title { font-family: ${a.heading}; }`),(n.size!==void 0||n.grid!==void 0)&&t.push(`html { font-size: ${$(e.size)}pt; }`),t.push(`body { line-height: ${"pt"in e.lineHeight?`${$(e.lineHeight.pt)}pt`:$(ze(e)??1)}; }`),t.push(...Ae(e)),e.letterSpacing!==0&&t.push(`body { letter-spacing: ${$(e.letterSpacing)}em; }`),n.textIndent!==void 0&&n.textIndent>0&&t.push(`.sources { --hang: ${$(n.textIndent)}em; }`,`p { text-indent: ${$(n.textIndent)}em; }`,"blockquote p, .callout p, .notes p, .toc p { text-indent: 0; }"),n.textAlign==="justify"&&t.push("p, li { text-align: justify; }");const o=V(Q,n.title,e.title);o!==void 0&&t.push(o);for(const r of[1,2,3,4,5,6]){const d=V(r===1?"h1, .toc-title":`h${String(r)}`,n.headings?.[r],e.headings[r]);d!==void 0&&t.push(d)}return s!==void 0&&t.push(`a { color: ${s}; text-decoration-color: color-mix(in oklab, ${s} 45%, transparent); }`,`blockquote { --quote-rule: 2px; border-left-color: ${s}; }`),t.join(`
114
+ `)}export function docParts(i){const n=[];let e=[],a=!1;for(const s of i)s.type==="pagebreak"&&s.orientation!==void 0?(n.push({blocks:e,landscape:a}),e=[],a=s.orientation==="landscape"):e.push(s);return n.push({blocks:e,landscape:a}),n}const Re=`<script>
115
+ window.allyhubReady = ${oe({scope:"main",face:"Noto Color Emoji"})};
116
+ <\/script>`,qe=`<script>
158
117
  window.allyhubReady = (async (before) => {
159
118
  await before;
160
119
  await document.fonts.ready;
@@ -170,7 +129,7 @@ window.allyhubReady = (async (before) => {
170
129
  if (el.matches("p") || el.children.length === el.querySelectorAll(":scope > .words, :scope > .box").length)
171
130
  if (lines(el) < 4) el.style.breakInside = "avoid";
172
131
  })(window.allyhubReady);
173
- <\/script>`,Te=`<script>
132
+ <\/script>`,He=`<script>
174
133
  window.allyhubReady = (async (before) => {
175
134
  await before;
176
135
  await document.fonts.ready;
@@ -255,24 +214,24 @@ window.allyhubReady = (async (before) => {
255
214
  }
256
215
  }
257
216
  })(window.allyhubReady);
258
- <\/script>`;export function docHtml(i,t={}){const e=headingAnchors(i),a=re(i,t.page),{title:s}=he(i),n=new Map,o=[];for(const h of A(i)){const m=se(h),$=a.get(h);if(m!==void 0&&$!==void 0&&n.set(m,$.label),h.type==="heading"){const w=e.get(h)??"";n.set(w,h.content.map(j=>j.text).join("")),h!==s&&o.push({block:h,anchor:w})}}const r={embeds:0,notes:$e(i),anchors:e,ids:t.ids?blockNumbers(i):void 0,numbers:a,refs:n,headings:o,headingPage:t.headingPage,chinese:le(i),sources:(()=>{const h=R(t.page??{}).citationStyle??"apa",m=t.sources??[],$=ae(i,m,h);return{items:m,style:h,numbers:new Map($.map(w=>[w.item.id,w.n])),list:$}})(),listed:!1},d=docParts(i),l=t.part,f=l===void 0?void 0:d[l],u=f===void 0?d.flatMap(h=>h.blocks):f.blocks,S=l===void 0||l===0,N=l===void 0||l===d.length-1,v=S?t.page?.cover:void 0,E=v===void 0?void 0:t.image?.(v)??v,H=`${E===void 0?"":`<figure class="cover"><img src="${c(E)}" alt="" style="object-position:50% ${String(t.page?.coverY??50)}%"></figure>
259
- `}${y(u,t,r)}${N&&!r.listed?K(r):""}${N?Ce(i,t,r):""}`,z=q(t.page),T=[pageCss(t.page),...f?.landscape===!0?[`@page { size: ${x(z.height)} ${x(z.width)}; }`,`main { max-width: ${x(z.height)}; }`]:[],...E===void 0?[]:["@page :first { margin-top: 0; }"]].filter(h=>h!=="").join(`
217
+ <\/script>`;export function docHtml(i,n={}){const e=headingAnchors(i),a=fe(i,n.page),{title:s}=xe(i),t=new Map,o=[];for(const u of q(i)){const S=pe(u),v=a.get(u);if(S!==void 0&&v!==void 0&&t.set(S,v.label),u.type==="heading"){const m=e.get(u)??"";t.set(m,u.content.map(b=>b.text).join("")),u!==s&&o.push({block:u,anchor:m})}}const r={embeds:0,notes:ve(i),anchors:e,ids:n.ids?blockNumbers(i):void 0,numbers:a,refs:t,headings:o,headingPage:n.headingPage,chinese:ge(i),sources:(()=>{const u=H(n.page??{}).citationStyle??"apa",S=n.sources??[],v=ce(i,S,u);return{items:S,style:u,numbers:new Map(v.map(m=>[m.item.id,m.n])),list:v}})(),listed:!1},d=docParts(i),l=n.part,f=l===void 0?void 0:d[l],g=f===void 0?d.flatMap(u=>u.blocks):f.blocks,w=l===void 0||l===0,M=l===void 0||l===d.length-1,C=w?n.page?.cover:void 0,z=C===void 0?void 0:n.image?.(C)??C,P=`${z===void 0?"":`<figure class="cover"><img src="${p(z)}" alt="" style="object-position:50% ${String(n.page?.coverY??50)}%"></figure>
218
+ `}${y(g,n,r)}${M&&!r.listed?J(r):""}${M?Me(i,n,r):""}`,E=j(n.page),A=[pageCss(n.page),...f?.landscape===!0?[`@page { size: ${k(E.height)} ${k(E.width)}; }`,`main { max-width: ${k(E.height)}; }`]:[],...z===void 0?[]:["@page :first { margin-top: 0; }"]].filter(u=>u!=="").join(`
260
219
  `);return`<!doctype html>
261
220
  <html>
262
221
  <head>
263
222
  <meta charset="utf-8">
264
- <title>${c(t.title??"")}</title>
265
- ${t.fonts===void 0?"":`<style>${t.fonts}</style>
266
- `}<style>${DOC_CSS}${T===""?"":`
267
- ${T}`}</style>
223
+ <title>${p(n.title??"")}</title>
224
+ ${n.fonts===void 0?"":`<style>${n.fonts}</style>
225
+ `}<style>${DOC_CSS}${A===""?"":`
226
+ ${A}`}</style>
268
227
  </head>
269
228
  <body>
270
229
  <main>
271
- ${H}
230
+ ${P}
272
231
  </main>
273
- ${ze}
274
- ${R(t.page??{}).grid===void 0?"":Te}
275
- ${Ne}
232
+ ${Re}
233
+ ${H(n.page??{}).grid===void 0?"":He}
234
+ ${qe}
276
235
  </body>
277
236
  </html>
278
237
  `}
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- export function statTone(e){const t=e.delta?.trim().charAt(0),r=t==="+"||t==="↑";return!r&&!(t==="-"||t==="−"||t==="–"||t==="↓")?"flat":r!==(e.downIsGood===!0)?"good":"bad"}export const CHART_LABELS=["value","percentage","category","series"];export{PAGE_FONTS}from"./page.js";export const COVER_HEIGHT_MM=64,COVER_ASPECT=COVER_HEIGHT_MM/210,hasText=e=>"content"in e;const h=["bold","italic","underline","strike"],g=(e,t)=>e.note===void 0&&t.note===void 0&&e.cite===void 0&&t.cite===void 0&&e.href===t.href&&JSON.stringify(d(e.styles))===JSON.stringify(d(t.styles));export function plainEdges(e){const t=[],r=(n,o,c)=>{if(n==="")return;const s={text:n,styles:o,...c===void 0?{}:{href:c}},f=t.at(-1);f&&g(f,s)?f.text+=n:t.push(s)};return e.forEach((n,o)=>{if(n.note!==void 0||n.cite!==void 0||n.text===""&&n.href!==void 0){t.push({...n});return}const{styles:c,href:s}=n,f=!c.code&&s===void 0&&h.some(x=>c[x])?/^(\s*)([\s\S]*?)(\s*)$/u.exec(n.text):null;if(!f){r(n.text,c,s);return}const[,u="",l="",p=""]=f,i={...c};delete i.bold,delete i.italic,delete i.underline,delete i.strike;const y=e[o-1]?.note!==void 0,a=e[o+1]?.note!==void 0;r(u,y?c:i,s),r(l,l===""?i:c,s),r(p,a?c:i,s)}),t}const m=e=>e.length>0&&e.every(t=>t!==null&&typeof t=="object"&&typeof t.text=="string"&&typeof t.styles=="object");function d(e){if(Array.isArray(e))return(m(e)?plainEdges(e):e).map(d);if(e!==null&&typeof e=="object"){const t={};for(const r of Object.keys(e).sort()){const n=e[r];n!==void 0&&(t[r]=d(n))}return t}return e}export const blockKey=e=>JSON.stringify(d(e)),sameBlocks=(e,t)=>e.length===t.length&&e.every((r,n)=>{const o=t[n];return o!==void 0&&blockKey(r)===blockKey(o)}),innerBlocks=e=>e.type==="columns"?e.columns.flatMap(t=>t.blocks):"children"in e?e.children??[]:[];export function*everyBlock(e){for(const t of e)yield t,yield*everyBlock(innerBlocks(t))}export function noteNumbers(e){const t=new Map,r=new Set([...everyBlock(e)].flatMap(o=>o.type==="note"?[o.label.toLowerCase()]:[])),n=o=>{for(const c of o){const s=c.note?.toLowerCase();s!==void 0&&r.has(s)&&!t.has(s)&&t.set(s,t.size+1)}};for(const o of everyBlock(e))if(o.type!=="note"&&("content"in o&&n(o.content),o.type==="table"))for(const c of o.rows)for(const s of c)n(s);return t}export const shownBlocks=e=>e.filter(t=>t.type!=="source");
2
+ export function statTone(e){const t=e.delta?.trim().charAt(0),s=t==="+"||t==="↑";return!s&&!(t==="-"||t==="−"||t==="–"||t==="↓")?"flat":s!==(e.downIsGood===!0)?"good":"bad"}export const CHART_LABELS=["value","percentage","category","series"];export{PAGE_FONTS}from"./page.js";export const COVER_HEIGHT_MM=64,COVER_ASPECT=COVER_HEIGHT_MM/210,hasText=e=>"content"in e;const g=["bold","italic","underline","strike"],m=(e,t)=>e.note===void 0&&t.note===void 0&&e.cite===void 0&&t.cite===void 0&&e.href===t.href&&JSON.stringify(d(e.styles))===JSON.stringify(d(t.styles));export function plainEdges(e){const t=[],s=(o,i,n)=>{if(o==="")return;const r={text:o,styles:i,...n===void 0?{}:{href:n}},c=t.at(-1);c&&m(c,r)?c.text+=o:t.push(r)};return e.forEach((o,i)=>{if(o.note!==void 0||o.cite!==void 0||o.text===""&&o.href!==void 0){t.push({...o});return}const{styles:n,href:r}=o,c=!n.code&&r===void 0&&g.some(h=>n[h])?/^(\s*)([\s\S]*?)(\s*)$/u.exec(o.text):null;if(!c){s(o.text,n,r);return}const[,p="",l="",a=""]=c,f={...n};delete f.bold,delete f.italic,delete f.underline,delete f.strike;const y=e[i-1]?.note!==void 0,x=e[i+1]?.note!==void 0;s(p,y?n:f,r),s(l,l===""?f:n,r),s(a,x?n:f,r)}),t}const k=e=>e.length>0&&e.every(t=>t!==null&&typeof t=="object"&&typeof t.text=="string"&&typeof t.styles=="object");function d(e){if(Array.isArray(e))return(k(e)?plainEdges(e):e).map(d);if(e!==null&&typeof e=="object"){const t={};for(const s of Object.keys(e).sort()){const o=e[s];o!==void 0&&(t[s]=d(o))}return t}return e}export const blockKey=e=>JSON.stringify(d(e)),sameBlocks=(e,t)=>e.length===t.length&&e.every((s,o)=>{const i=t[o];return i!==void 0&&blockKey(s)===blockKey(i)}),innerBlocks=e=>e.type==="columns"?e.columns.flatMap(t=>t.blocks):"children"in e?e.children??[]:[];export function*everyBlock(e){for(const t of e)yield t,yield*everyBlock(innerBlocks(t))}export function noteNumbers(e){return u(e).numbers}export function firstNoteMarks(e){return u(e).first}function u(e){const t=new Map,s=new Set,o=new Set([...everyBlock(e)].flatMap(n=>n.type==="note"?[n.label.toLowerCase()]:[])),i=n=>{for(const r of n){const c=r.note?.toLowerCase();c!==void 0&&o.has(c)&&!t.has(c)&&(t.set(c,t.size+1),s.add(r))}};for(const n of everyBlock(e))if(n.type!=="note"&&("content"in n&&i(n.content),n.type==="table"))for(const r of n.rows)for(const c of r)i(c);return{numbers:t,first:s}}export const shownBlocks=e=>e.filter(t=>t.type!=="source");
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{CITATION_STYLES as $}from"./cite.js";export const PAPERS={a3:[297,420],a4:[210,297],a5:[148,210],b5:[176,250],letter:[215.9,279.4],legal:[215.9,355.6]},PAGE_FONTS=["sans","serif","mono","times","song","hei","fangsong","kai","xiaobiaosong"],CHINESE_SIZES={初号:42,小初:36,一号:26,小一:24,二号:22,小二:18,三号:16,小三:15,四号:14,小四:12,五号:10.5,小五:9,六号:7.5,小六:6.5,七号:5.5,八号:5},RUNNING_PLACES=["left","center","right","outside","inside"],PAGE_PRESETS=["apa","mla","report"];const x={apa:{paper:"letter",margins:25.4,font:"times",size:12,lineHeight:2,textIndent:3,paragraphSpacing:0,textAlign:"left",title:{size:12,weight:"bold",align:"center"},headings:{1:{size:12,weight:"bold",align:"center"},2:{size:12,weight:"bold"},3:{size:12,weight:"bold",italic:!0},4:{size:12,weight:"bold"},5:{size:12,weight:"bold",italic:!0},6:{size:12,weight:"bold"}},header:{right:"{page}"},footer:!1,citationStyle:"apa"},mla:{paper:"letter",margins:25.4,font:"times",size:12,lineHeight:2,textIndent:3,paragraphSpacing:0,textAlign:"left",title:{size:12,weight:"normal",align:"center"},headings:{1:{size:12,weight:"bold"},2:{size:12,weight:"bold"},3:{size:12,weight:"bold",italic:!0},4:{size:12,weight:"bold"},5:{size:12,weight:"bold"},6:{size:12,weight:"bold"}},header:{right:"{page}"},footer:!1,citationStyle:"mla"},report:{size:10.5,lineHeight:1.2,paragraphSpacing:.7,title:{size:24,weight:"bold"},headings:{1:{size:18,weight:"bold"},2:{size:14,weight:"bold",rule:!0},3:{size:11.5,weight:"bold"}}}};export const presetLook=e=>x[e];export function effectiveLook(e){if(e.preset===void 0)return e;const i=x[e.preset],n={...i.headings};for(const[a,t]of Object.entries(e.headings??{}))n[Number(a)]={...i.headings?.[Number(a)],...t};return{...i,...e,...i.title||e.title?{title:{...i.title,...e.title}}:{},...Object.keys(n).length>0?{headings:n}:{}}}export const sizePt=e=>typeof e=="number"?e:CHINESE_SIZES[e];export function marginBox(e){return typeof e=="number"?{top:e,right:e,bottom:e,left:e}:e.length===2?{top:e[0],right:e[1],bottom:e[0],left:e[1]}:{top:e[0],right:e[1],bottom:e[2],left:e[3]}}export const PAGE_DEFAULTS={paper:"letter",margins:{top:18,right:20,bottom:18,left:20},size:11,lineHeight:1.15,textIndent:0,paragraphSpacing:.5,headingScale:{title:2.3,1:1.75,2:1.45,3:1.15,4:1,5:1,6:1},footer:{left:"{title}",right:"{page} / {pages}"}};const N=25.4/72;export const paperSize=e=>e===void 0?PAPERS[PAGE_DEFAULTS.paper]:typeof e=="string"?PAPERS[e]:e;export function resolvePage(e={}){const i=effectiveLook(e),[n,a]=paperSize(i.paper),t=i.orientation==="landscape",s=t?Math.max(n,a):Math.min(n,a),r=t?Math.min(n,a):Math.max(n,a),o=i.margins===void 0?{...PAGE_DEFAULTS.margins}:marginBox(i.margins),g=s-o.left-o.right,p=r-o.top-o.bottom,y=i.font??"sans";let c=i.size===void 0?PAGE_DEFAULTS.size:sizePt(i.size),u=i.lineHeight===void 0?{multiple:PAGE_DEFAULTS.lineHeight}:typeof i.lineHeight=="number"?{multiple:i.lineHeight}:{pt:Number.parseFloat(i.lineHeight)},S=0;if(i.grid){u={pt:p/N/i.grid.lines};const f=g/N/i.grid.chars;i.size===void 0&&(c=Math.floor(f*2)/2),S=(f*.998-c)/c}const m=(f,I)=>({font:f?.font??y,size:f?.size===void 0?c*I:sizePt(f.size),weight:f?.weight??"bold",align:f?.align??"left",italic:f?.italic??!1,rule:f?.rule??!1}),z=PAGE_DEFAULTS.headingScale,A=Object.fromEntries([1,2,3,4,5,6].map(f=>[f,m(i.headings?.[f],z[f])])),E=i.footer===!1||i.footer===void 0&&i.pageNumbers===!1?void 0:i.footer??PAGE_DEFAULTS.footer;return{width:s,height:r,margins:o,textWidth:g,textHeight:p,font:y,size:c,lineHeight:u,letterSpacing:S,textIndent:i.textIndent??PAGE_DEFAULTS.textIndent,paragraphSpacing:i.paragraphSpacing??PAGE_DEFAULTS.paragraphSpacing,textAlign:i.textAlign??"left",title:m(i.title,z.title),headings:A,header:i.header===!1?void 0:i.header,footer:E,captions:i.captions==="numbered",spacing:H(c,i.paragraphSpacing??PAGE_DEFAULTS.paragraphSpacing,i.grid===void 0||!("pt"in u)?void 0:u.pt)}}export const LIST_STEP=18;function H(e,i,n){const a=n!==void 0||i===0;return{after:i*e,heading:a?{before:0,after:0}:{before:14,after:6},title:n??(a?0:12),caption:4,box:{top:6,side:8},cell:{top:4,side:7},divider:12,contents:5,quote:12,step:LIST_STEP,small:Math.round(e*.9*2)/2,card:{top:9,side:11},gap:8,figure:Math.round(e*2.2)}}export const SINGLE_LINE={sans:1.2207,serif:1.1719,mono:1.1328,times:1.1499},lineMultiple=e=>"pt"in e.lineHeight?void 0:e.lineHeight.multiple*(SINGLE_LINE[e.font]??1),lineHeightPt=(e,i=e.size)=>"pt"in e.lineHeight?e.lineHeight.pt:(lineMultiple(e)??1)*i,PAGE_KEYS=["preset","paper","orientation","margins","font","size","line-height","text-indent","paragraph-spacing","text-align","grid","title","headings","header","footer","captions","bibliography","citation-style","accent","cover","cover-y","page-numbers","picture-dpi"];const J=["left","center","right"],d=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),l=e=>typeof e=="number"&&Number.isFinite(e)&&e>0;function h(e){if(l(e))return e;if(typeof e=="string"){const i=e.trim();if(Object.hasOwn(CHINESE_SIZES,i))return i;const n=/^(\d+(?:\.\d+)?)\s*pt$/u.exec(i);if(n)return Number(n[1])}}const b=`a size in pt (12) or a Chinese size (${Object.keys(CHINESE_SIZES).join(", ")})`;function O(e,i,n){if(!d(e)){n(`${i} holds font, size, weight, align, italic and rule`);return}const a={};for(const[t,s]of Object.entries(e))if(t==="font")PAGE_FONTS.includes(s)?a.font=s:n(`${i}'s font is ${PAGE_FONTS.join(", ")}, not ${JSON.stringify(s)}`);else if(t==="size"){const r=h(s);r===void 0?n(`${i}'s size is ${b}`):a.size=r}else t==="weight"?s==="normal"||s==="bold"?a.weight=s:n(`${i}'s weight is normal or bold, not ${JSON.stringify(s)}`):t==="align"?J.includes(s)?a.align=s:n(`${i}'s align is left, center or right, not ${JSON.stringify(s)}`):t==="italic"?typeof s=="boolean"?a.italic=s:n(`${i}'s italic is true or false, not ${JSON.stringify(s)}`):t==="rule"?typeof s=="boolean"?a.rule=s:n(`${i}'s rule is true or false, not ${JSON.stringify(s)}`):n(`${i} holds font, size, weight, align, italic and rule: ${t} is not one of them`);return a}function P(e,i,n){if(e===!1)return!1;if(typeof e=="string")return{center:e};if(!d(e)){n(`a page's ${i} is false, words, or words by place (${RUNNING_PLACES.join(", ")}) with a font and a size`);return}const a={};for(const[t,s]of Object.entries(e))if(t==="font")PAGE_FONTS.includes(s)?a.font=s:n(`a page's ${i} font is ${PAGE_FONTS.join(", ")}, not ${JSON.stringify(s)}`);else if(t==="size"){const r=h(s);r===void 0?n(`a page's ${i} size is ${b}`):a.size=r}else RUNNING_PLACES.includes(t)?typeof s!="string"&&typeof s!="number"?n(`a page's ${i} ${t} is words`):a[t]=String(s):n(`a page's ${i} holds ${RUNNING_PLACES.join(", ")}, font and size: ${t} is not one of them`);return a}export function readPageLook(e,i){const n={};for(const[a,t]of Object.entries(e))switch(a){case"preset":PAGE_PRESETS.includes(t)?n.preset=t:i(`a page's preset is ${PAGE_PRESETS.join(" or ")}, not ${JSON.stringify(t)}`);break;case"paper":{const s=typeof t=="string"?t.trim().toLowerCase():void 0;s!==void 0&&Object.hasOwn(PAPERS,s)?n.paper=s:Array.isArray(t)&&t.length===2&&t.every(l)?n.paper=t:i(`a page's paper is ${Object.keys(PAPERS).join(", ")} or its width and height in mm ([210, 297]), not ${JSON.stringify(t)}`);break}case"orientation":t==="portrait"||t==="landscape"?n.orientation=t:i(`a page's orientation is portrait or landscape, not ${JSON.stringify(t)}`);break;case"margins":typeof t=="number"&&t>=0||Array.isArray(t)&&(t.length===2||t.length===4)&&t.every(s=>typeof s=="number"&&s>=0)?n.margins=t:i("a page's margins are mm: one for all four, [top and bottom, sides], or [top, right, bottom, left]");break;case"font":PAGE_FONTS.includes(t)?n.font=t:i(`a page's font is ${PAGE_FONTS.join(", ")}, not ${JSON.stringify(t)}`);break;case"size":{const s=h(t);s===void 0?i(`a page's size is ${b}`):n.size=s;break}case"line-height":l(t)?n.lineHeight=t:typeof t=="string"&&/^\d+(\.\d+)?pt$/u.test(t.trim())?n.lineHeight=t.trim():i(`a page's line-height is a multiple (1.5) or pt (28pt), not ${JSON.stringify(t)}`);break;case"text-indent":typeof t=="number"&&t>=0?n.textIndent=t:i("a page's text-indent is how many characters a paragraph's first line is set in (2)");break;case"paragraph-spacing":typeof t=="number"&&t>=0?n.paragraphSpacing=t:i("a page's paragraph-spacing is the space between paragraphs in em (0.5)");break;case"text-align":t==="left"||t==="justify"?n.textAlign=t:i(`a page's text-align is left or justify, not ${JSON.stringify(t)}`);break;case"grid":{const s=d(t)?t.chars:void 0,r=d(t)?t.lines:void 0;d(t)&&Object.keys(t).length===2&&l(s)&&l(r)&&Number.isInteger(s)&&Number.isInteger(r)?n.grid={chars:s,lines:r}:i("a page's grid is { chars, lines }: characters to a line and lines to a page");break}case"title":{const s=O(t,"the title",i);s&&(n.title=s);break}case"headings":{if(!d(t)){i("a page's headings are by level: { 1: { font, size }, 2: … }");break}const s={};for(const[r,o]of Object.entries(t)){const g=Number(r);if(!Number.isInteger(g)||g<1||g>6){i(`a heading's level is 1 to 6, not ${r}`);continue}const p=O(o,`heading ${r}`,i);p&&(s[g]=p)}n.headings=s;break}case"header":case"footer":{const s=P(t,a,i);s!==void 0&&(n[a]=s);break}case"captions":t==="numbered"?n.captions="numbered":t!=="plain"&&i(`a page's captions are numbered or plain, not ${JSON.stringify(t)}`);break;case"bibliography":typeof t=="string"&&t.trim()!==""?n.bibliography=t.trim():i("a page's bibliography is a CSL-JSON file's path");break;case"citation-style":$.includes(t)?n.citationStyle=t:i(`a page's citation-style is ${$.join(" or ")}, not ${JSON.stringify(t)}`);break;case"accent":typeof t=="string"&&t.trim()!==""?n.accent=t.trim():i("a page's accent is a colour");break;case"cover":typeof t=="string"&&t.trim()!==""?n.cover=t.trim():i("a page's cover is a picture's path");break;case"cover-y":typeof t=="number"&&t>=0&&t<=100?n.coverY=t:i(`a cover's cover-y is 0 (its top) to 100 (its bottom), not ${JSON.stringify(t)}`);break;case"picture-dpi":t===!1?n.pictureDpi=!1:typeof t=="number"&&t>=72&&t<=2400?n.pictureDpi=t:i(`a page's picture-dpi is 72 to 2400 (dots an inch of paper), or false to print pictures as they are, not ${JSON.stringify(t)}`);break;case"page-numbers":t===!1?n.pageNumbers=!1:t!==!0&&i(`a page's page-numbers is true or false, not ${JSON.stringify(t)}`);break;default:i(`the front matter holds ${PAGE_KEYS.join(", ")}: ${a} is not one of them`)}return n}const w=e=>({...e.font===void 0?{}:{font:e.font},...e.size===void 0?{}:{size:e.size},...e.weight===void 0?{}:{weight:e.weight},...e.align===void 0?{}:{align:e.align},...e.italic===void 0?{}:{italic:e.italic},...e.rule===void 0?{}:{rule:e.rule}}),j=e=>e===!1?!1:Object.keys(e).length===1&&e.center!==void 0?e.center:{...e},v=e=>/^[ab]\d$/u.test(e)?e.toUpperCase():`${e.charAt(0).toUpperCase()}${e.slice(1)}`;export function pageLookYaml(e){return{...e.preset===void 0?{}:{preset:e.preset},...e.paper===void 0?{}:{paper:typeof e.paper=="string"?v(e.paper):[...e.paper]},...e.orientation===void 0?{}:{orientation:e.orientation},...e.margins===void 0?{}:{margins:typeof e.margins=="number"?e.margins:[...e.margins]},...e.font===void 0?{}:{font:e.font},...e.size===void 0?{}:{size:e.size},...e.lineHeight===void 0?{}:{"line-height":e.lineHeight},...e.textIndent===void 0?{}:{"text-indent":e.textIndent},...e.paragraphSpacing===void 0?{}:{"paragraph-spacing":e.paragraphSpacing},...e.textAlign===void 0?{}:{"text-align":e.textAlign},...e.grid===void 0?{}:{grid:{...e.grid}},...e.title===void 0?{}:{title:w(e.title)},...e.headings===void 0?{}:{headings:Object.fromEntries(Object.entries(e.headings).map(([n,a])=>[n,w(a)]))},...e.header===void 0?{}:{header:j(e.header)},...e.footer===void 0?{}:{footer:j(e.footer)},...e.captions===void 0?{}:{captions:e.captions},...e.bibliography===void 0?{}:{bibliography:e.bibliography},...e.citationStyle===void 0?{}:{"citation-style":e.citationStyle},...e.accent===void 0?{}:{accent:e.accent},...e.cover===void 0?{}:{cover:e.cover},...e.cover===void 0||e.coverY===void 0?{}:{"cover-y":e.coverY},...e.pageNumbers===!1?{"page-numbers":!1}:{},...e.pictureDpi===void 0?{}:{"picture-dpi":e.pictureDpi}}}
2
+ import{CITATION_STYLES as x}from"./cite.js";export const PAPERS={a3:[297,420],a4:[210,297],a5:[148,210],b5:[176,250],letter:[215.9,279.4],legal:[215.9,355.6]},PAGE_FONTS=["sans","serif","mono","times","song","hei","fangsong","kai","xiaobiaosong"],CHINESE_SIZES={初号:42,小初:36,一号:26,小一:24,二号:22,小二:18,三号:16,小三:15,四号:14,小四:12,五号:10.5,小五:9,六号:7.5,小六:6.5,七号:5.5,八号:5},RUNNING_PLACES=["left","center","right","outside","inside"],PAGE_PRESETS=["apa","mla","brief","memo","business-letter"];const H=new Map([["report","brief"]]),$={apa:{paper:"letter",margins:25.4,font:"times",size:12,lineHeight:2,textIndent:3,paragraphSpacing:0,textAlign:"left",title:{size:12,weight:"bold",align:"center"},headings:{1:{size:12,weight:"bold",align:"center"},2:{size:12,weight:"bold"},3:{size:12,weight:"bold",italic:!0},4:{size:12,weight:"bold"},5:{size:12,weight:"bold",italic:!0},6:{size:12,weight:"bold"}},header:{right:"{page}"},footer:!1,citationStyle:"apa"},mla:{paper:"letter",margins:25.4,font:"times",size:12,lineHeight:2,textIndent:3,paragraphSpacing:0,textAlign:"left",title:{size:12,weight:"normal",align:"center"},headings:{1:{size:12,weight:"bold"},2:{size:12,weight:"bold"},3:{size:12,weight:"bold",italic:!0},4:{size:12,weight:"bold"},5:{size:12,weight:"bold"},6:{size:12,weight:"bold"}},header:{right:"{page}"},footer:!1,citationStyle:"mla"},brief:{size:10.5,lineHeight:1.2,paragraphSpacing:.7,title:{size:24,weight:"bold"},headings:{1:{size:18,weight:"bold"},2:{size:14,weight:"bold",rule:!0},3:{size:11.5,weight:"bold"}}},memo:{paper:"letter",margins:25.4,font:"times",size:12,lineHeight:1,textIndent:0,paragraphSpacing:1,textAlign:"left",title:{size:12,weight:"bold"},headings:{1:{size:12,weight:"bold"},2:{size:12,weight:"bold"},3:{size:12,weight:"bold",italic:!0},4:{size:12,weight:"bold"},5:{size:12,weight:"bold"},6:{size:12,weight:"bold"}},header:!1,footer:{center:"{page}"}},"business-letter":{paper:"letter",margins:25.4,font:"times",size:12,lineHeight:1,textIndent:0,paragraphSpacing:1,textAlign:"left",title:{size:12,weight:"bold"},headings:{1:{size:12,weight:"bold"},2:{size:12,weight:"bold"},3:{size:12,weight:"bold"},4:{size:12,weight:"bold"},5:{size:12,weight:"bold"},6:{size:12,weight:"bold"}},header:!1,footer:!1,pageNumbers:!1}};export const presetLook=e=>$[e];export function effectiveLook(e){if(e.preset===void 0)return e;const i=$[e.preset],n={...i.headings};for(const[a,t]of Object.entries(e.headings??{}))n[Number(a)]={...i.headings?.[Number(a)],...t};return{...i,...e,...i.title||e.title?{title:{...i.title,...e.title}}:{},...Object.keys(n).length>0?{headings:n}:{}}}export const sizePt=e=>typeof e=="number"?e:CHINESE_SIZES[e];export function marginBox(e){return typeof e=="number"?{top:e,right:e,bottom:e,left:e}:e.length===2?{top:e[0],right:e[1],bottom:e[0],left:e[1]}:{top:e[0],right:e[1],bottom:e[2],left:e[3]}}export const PAGE_DEFAULTS={paper:"letter",margins:{top:18,right:20,bottom:18,left:20},size:11,lineHeight:1.15,textIndent:0,paragraphSpacing:.5,headingScale:{title:2.3,1:1.75,2:1.45,3:1.15,4:1,5:1,6:1},footer:{left:"{title}",right:"{page} / {pages}"}};const w=25.4/72;export const paperSize=e=>e===void 0?PAPERS[PAGE_DEFAULTS.paper]:typeof e=="string"?PAPERS[e]:e;export function resolvePage(e={}){const i=effectiveLook(e),[n,a]=paperSize(i.paper),t=i.orientation==="landscape",s=t?Math.max(n,a):Math.min(n,a),r=t?Math.min(n,a):Math.max(n,a),o=i.margins===void 0?{...PAGE_DEFAULTS.margins}:marginBox(i.margins),g=s-o.left-o.right,p=r-o.top-o.bottom,y=i.font??"sans";let d=i.size===void 0?PAGE_DEFAULTS.size:sizePt(i.size),h=i.lineHeight===void 0?{multiple:PAGE_DEFAULTS.lineHeight}:typeof i.lineHeight=="number"?{multiple:i.lineHeight}:{pt:Number.parseFloat(i.lineHeight)},z=0;if(i.grid){h={pt:p/w/i.grid.lines};const f=g/w/i.grid.chars;i.size===void 0&&(d=Math.floor(f*2)/2),z=(f*.998-d)/d}const S=(f,I)=>({font:f?.font??y,size:f?.size===void 0?d*I:sizePt(f.size),weight:f?.weight??"bold",align:f?.align??"left",italic:f?.italic??!1,rule:f?.rule??!1}),m=PAGE_DEFAULTS.headingScale,A=Object.fromEntries([1,2,3,4,5,6].map(f=>[f,S(i.headings?.[f],m[f])])),E=i.footer===!1||i.footer===void 0&&i.pageNumbers===!1?void 0:i.footer??PAGE_DEFAULTS.footer;return{width:s,height:r,margins:o,textWidth:g,textHeight:p,font:y,size:d,lineHeight:h,letterSpacing:z,textIndent:i.textIndent??PAGE_DEFAULTS.textIndent,paragraphSpacing:i.paragraphSpacing??PAGE_DEFAULTS.paragraphSpacing,textAlign:i.textAlign??"left",title:S(i.title,m.title),headings:A,header:i.header===!1?void 0:i.header,footer:E,captions:i.captions!=="plain",spacing:J(d,i.paragraphSpacing??PAGE_DEFAULTS.paragraphSpacing,i.grid===void 0||!("pt"in h)?void 0:h.pt)}}export const LIST_STEP=18;function J(e,i,n){const a=n!==void 0||i===0;return{after:i*e,heading:a?{before:0,after:0}:{before:14,after:6},title:n??(a?0:12),caption:4,box:{top:6,side:8},cell:{top:4,side:7},divider:12,contents:5,quote:12,step:LIST_STEP,small:Math.round(e*.9*2)/2,card:{top:9,side:11},gap:8,figure:Math.round(e*2.2)}}export const SINGLE_LINE={sans:1.2207,serif:1.1719,mono:1.1328,times:1.1499},lineMultiple=e=>"pt"in e.lineHeight?void 0:e.lineHeight.multiple*(SINGLE_LINE[e.font]??1),lineHeightPt=(e,i=e.size)=>"pt"in e.lineHeight?e.lineHeight.pt:(lineMultiple(e)??1)*i,PAGE_KEYS=["preset","paper","orientation","margins","font","size","line-height","text-indent","paragraph-spacing","text-align","grid","title","headings","header","footer","captions","bibliography","citation-style","accent","cover","cover-y","page-numbers","picture-dpi"];const P=["left","center","right"],c=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),l=e=>typeof e=="number"&&Number.isFinite(e)&&e>0;function u(e){if(l(e))return e;if(typeof e=="string"){const i=e.trim();if(Object.hasOwn(CHINESE_SIZES,i))return i;const n=/^(\d+(?:\.\d+)?)\s*pt$/u.exec(i);if(n)return Number(n[1])}}const b=`a size in pt (12) or a Chinese size (${Object.keys(CHINESE_SIZES).join(", ")})`;function N(e,i,n){if(!c(e)){n(`${i} holds font, size, weight, align, italic and rule`);return}const a={};for(const[t,s]of Object.entries(e))if(t==="font")PAGE_FONTS.includes(s)?a.font=s:n(`${i}'s font is ${PAGE_FONTS.join(", ")}, not ${JSON.stringify(s)}`);else if(t==="size"){const r=u(s);r===void 0?n(`${i}'s size is ${b}`):a.size=r}else t==="weight"?s==="normal"||s==="bold"?a.weight=s:n(`${i}'s weight is normal or bold, not ${JSON.stringify(s)}`):t==="align"?P.includes(s)?a.align=s:n(`${i}'s align is left, center or right, not ${JSON.stringify(s)}`):t==="italic"?typeof s=="boolean"?a.italic=s:n(`${i}'s italic is true or false, not ${JSON.stringify(s)}`):t==="rule"?typeof s=="boolean"?a.rule=s:n(`${i}'s rule is true or false, not ${JSON.stringify(s)}`):n(`${i} holds font, size, weight, align, italic and rule: ${t} is not one of them`);return a}function v(e,i,n){if(e===!1)return!1;if(typeof e=="string")return{center:e};if(!c(e)){n(`a page's ${i} is false, words, or words by place (${RUNNING_PLACES.join(", ")}) with a font and a size`);return}const a={};for(const[t,s]of Object.entries(e))if(t==="font")PAGE_FONTS.includes(s)?a.font=s:n(`a page's ${i} font is ${PAGE_FONTS.join(", ")}, not ${JSON.stringify(s)}`);else if(t==="size"){const r=u(s);r===void 0?n(`a page's ${i} size is ${b}`):a.size=r}else RUNNING_PLACES.includes(t)?typeof s!="string"&&typeof s!="number"?n(`a page's ${i} ${t} is words`):a[t]=String(s):n(`a page's ${i} holds ${RUNNING_PLACES.join(", ")}, font and size: ${t} is not one of them`);return a}export function readPageLook(e,i){const n={};for(const[a,t]of Object.entries(e))switch(a){case"preset":{const s=typeof t=="string"?H.get(t):void 0;PAGE_PRESETS.includes(t)?n.preset=t:s!==void 0?n.preset=s:i(`a page's preset is ${PAGE_PRESETS.join(" or ")}, not ${JSON.stringify(t)}`);break}case"paper":{const s=typeof t=="string"?t.trim().toLowerCase():void 0;s!==void 0&&Object.hasOwn(PAPERS,s)?n.paper=s:Array.isArray(t)&&t.length===2&&t.every(l)?n.paper=t:i(`a page's paper is ${Object.keys(PAPERS).join(", ")} or its width and height in mm ([210, 297]), not ${JSON.stringify(t)}`);break}case"orientation":t==="portrait"||t==="landscape"?n.orientation=t:i(`a page's orientation is portrait or landscape, not ${JSON.stringify(t)}`);break;case"margins":typeof t=="number"&&t>=0||Array.isArray(t)&&(t.length===2||t.length===4)&&t.every(s=>typeof s=="number"&&s>=0)?n.margins=t:i("a page's margins are mm: one for all four, [top and bottom, sides], or [top, right, bottom, left]");break;case"font":PAGE_FONTS.includes(t)?n.font=t:i(`a page's font is ${PAGE_FONTS.join(", ")}, not ${JSON.stringify(t)}`);break;case"size":{const s=u(t);s===void 0?i(`a page's size is ${b}`):n.size=s;break}case"line-height":l(t)?n.lineHeight=t:typeof t=="string"&&/^\d+(\.\d+)?pt$/u.test(t.trim())?n.lineHeight=t.trim():i(`a page's line-height is a multiple (1.5) or pt (28pt), not ${JSON.stringify(t)}`);break;case"text-indent":typeof t=="number"&&t>=0?n.textIndent=t:i("a page's text-indent is how many characters a paragraph's first line is set in (2)");break;case"paragraph-spacing":typeof t=="number"&&t>=0?n.paragraphSpacing=t:i("a page's paragraph-spacing is the space between paragraphs in em (0.5)");break;case"text-align":t==="left"||t==="justify"?n.textAlign=t:i(`a page's text-align is left or justify, not ${JSON.stringify(t)}`);break;case"grid":{const s=c(t)?t.chars:void 0,r=c(t)?t.lines:void 0;c(t)&&Object.keys(t).length===2&&l(s)&&l(r)&&Number.isInteger(s)&&Number.isInteger(r)?n.grid={chars:s,lines:r}:i("a page's grid is { chars, lines }: characters to a line and lines to a page");break}case"title":{const s=N(t,"the title",i);s&&(n.title=s);break}case"headings":{if(!c(t)){i("a page's headings are by level: { 1: { font, size }, 2: … }");break}const s={};for(const[r,o]of Object.entries(t)){const g=Number(r);if(!Number.isInteger(g)||g<1||g>6){i(`a heading's level is 1 to 6, not ${r}`);continue}const p=N(o,`heading ${r}`,i);p&&(s[g]=p)}n.headings=s;break}case"header":case"footer":{const s=v(t,a,i);s!==void 0&&(n[a]=s);break}case"captions":t==="numbered"||t==="plain"?n.captions=t:i(`a page's captions are numbered or plain, not ${JSON.stringify(t)}`);break;case"bibliography":typeof t=="string"&&t.trim()!==""?n.bibliography=t.trim():i("a page's bibliography is a CSL-JSON file's path");break;case"citation-style":x.includes(t)?n.citationStyle=t:i(`a page's citation-style is ${x.join(" or ")}, not ${JSON.stringify(t)}`);break;case"accent":typeof t=="string"&&t.trim()!==""?n.accent=t.trim():i("a page's accent is a colour");break;case"cover":typeof t=="string"&&t.trim()!==""?n.cover=t.trim():i("a page's cover is a picture's path");break;case"cover-y":typeof t=="number"&&t>=0&&t<=100?n.coverY=t:i(`a cover's cover-y is 0 (its top) to 100 (its bottom), not ${JSON.stringify(t)}`);break;case"picture-dpi":t===!1?n.pictureDpi=!1:typeof t=="number"&&t>=72&&t<=2400?n.pictureDpi=t:i(`a page's picture-dpi is 72 to 2400 (dots an inch of paper), or false to print pictures as they are, not ${JSON.stringify(t)}`);break;case"page-numbers":t===!1?n.pageNumbers=!1:t!==!0&&i(`a page's page-numbers is true or false, not ${JSON.stringify(t)}`);break;default:i(`the front matter holds ${PAGE_KEYS.join(", ")}: ${a} is not one of them`)}return n}const O=e=>({...e.font===void 0?{}:{font:e.font},...e.size===void 0?{}:{size:e.size},...e.weight===void 0?{}:{weight:e.weight},...e.align===void 0?{}:{align:e.align},...e.italic===void 0?{}:{italic:e.italic},...e.rule===void 0?{}:{rule:e.rule}}),j=e=>e===!1?!1:Object.keys(e).length===1&&e.center!==void 0?e.center:{...e},L=e=>/^[ab]\d$/u.test(e)?e.toUpperCase():`${e.charAt(0).toUpperCase()}${e.slice(1)}`;export function pageLookYaml(e){return{...e.preset===void 0?{}:{preset:e.preset},...e.paper===void 0?{}:{paper:typeof e.paper=="string"?L(e.paper):[...e.paper]},...e.orientation===void 0?{}:{orientation:e.orientation},...e.margins===void 0?{}:{margins:typeof e.margins=="number"?e.margins:[...e.margins]},...e.font===void 0?{}:{font:e.font},...e.size===void 0?{}:{size:e.size},...e.lineHeight===void 0?{}:{"line-height":e.lineHeight},...e.textIndent===void 0?{}:{"text-indent":e.textIndent},...e.paragraphSpacing===void 0?{}:{"paragraph-spacing":e.paragraphSpacing},...e.textAlign===void 0?{}:{"text-align":e.textAlign},...e.grid===void 0?{}:{grid:{...e.grid}},...e.title===void 0?{}:{title:O(e.title)},...e.headings===void 0?{}:{headings:Object.fromEntries(Object.entries(e.headings).map(([n,a])=>[n,O(a)]))},...e.header===void 0?{}:{header:j(e.header)},...e.footer===void 0?{}:{footer:j(e.footer)},...e.captions===void 0?{}:{captions:e.captions},...e.bibliography===void 0?{}:{bibliography:e.bibliography},...e.citationStyle===void 0?{}:{"citation-style":e.citationStyle},...e.accent===void 0?{}:{accent:e.accent},...e.cover===void 0?{}:{cover:e.cover},...e.cover===void 0||e.coverY===void 0?{}:{"cover-y":e.coverY},...e.pageNumbers===!1?{"page-numbers":!1}:{},...e.pictureDpi===void 0?{}:{"picture-dpi":e.pictureDpi}}}
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{BACKGROUNDS as c}from"./color.js";export const CHART_PALETTE=["#2A78D6","#EB6834","#1BAF7A","#EDA100","#E87BA4","#008300"],PAPER={ink:"#1F1D1A",lead:"#605B51",leadSoft:"#847F72",rule:"#EAE6DE",ruleStrong:"#959083",ruleMid:"#D6D1C6",stone:"#F8F6F1",stone2:"#EFECE5",sheet:"#FFFFFF"},tagColors=o=>({bg:c[o??"gray"]??c.gray??PAPER.stone,fg:PAPER.ink}),TONE_COLORS={good:"#448361",bad:"#D44C47",flat:PAPER.lead};const d=o=>{const e=Number.parseInt(o.slice(1),16);return[e>>16&255,e>>8&255,e&255]};function f(o,e){const[n,l,r]=d(o);let i=0,t=1/0;return e.forEach((a,g)=>{const[C,k,u]=d(a),s=2*(n-C)**2+4*(l-k)**2+3*(r-u)**2;s<t&&(t=s,i=g)}),i}export function accentPalette(o){const e=[...CHART_PALETTE];if(o===void 0)return e;const n=f(o,e);return[o,...e.filter((l,r)=>r!==n)]}export function tint(o,e){const n=Number.parseInt(o.slice(1),16),l=r=>Math.round(255-(255-r)*e).toString(16).padStart(2,"0");return`#${l(n>>16&255)}${l(n>>8&255)}${l(n&255)}`.toUpperCase()}export const DIAGRAM_TEXT_PX=14;export function diagramConfig(o){const e=accentPalette(o.accent),n=Object.fromEntries(Array.from({length:12},(i,t)=>{const a=e[t%e.length]??PAPER.leadSoft;return[[`cScale${String(t)}`,tint(a,.22)],[`cScaleLabel${String(t)}`,PAPER.ink],[`cScalePeer${String(t)}`,tint(a,.6)],[`cScaleInv${String(t)}`,tint(a,.7)]]}).flat()),l=Object.fromEntries(e.map((i,t)=>[`pie${String(t+1)}`,i])),r=e[0]??CHART_PALETTE[0];return{startOnLoad:!1,securityLevel:"strict",htmlLabels:!1,fontFamily:o.font,theme:"base",themeCSS:`.grid .tick line { stroke: ${PAPER.rule}; } .grid .tick text { fill: ${PAPER.lead}; } .grid path { stroke-width: 0; } .lineWrapper line, line.lineWrapper { stroke: ${PAPER.leadSoft}; } .cluster-label text, .cluster-label tspan { font-weight: 600; }`,look:"classic",layout:"dagre",elk:{considerModelOrder:"NODES_AND_EDGES",forceNodeModelOrder:!0,mergeEdges:!1},flowchart:{htmlLabels:!1,nodeSpacing:36,rankSpacing:44,padding:10,curve:"basis"},sequence:{actorMargin:40,width:120,height:44,boxMargin:8,messageFontSize:14,mirrorActors:!1},gantt:{barHeight:22,barGap:6,fontSize:12,sectionFontSize:12},themeVariables:{fontFamily:o.font,fontSize:`${String(DIAGRAM_TEXT_PX)}px`,background:PAPER.sheet,primaryColor:PAPER.stone,primaryBorderColor:PAPER.ruleMid,primaryTextColor:PAPER.ink,secondaryColor:PAPER.stone2,secondaryBorderColor:PAPER.ruleMid,secondaryTextColor:PAPER.ink,tertiaryColor:PAPER.sheet,tertiaryBorderColor:PAPER.rule,tertiaryTextColor:PAPER.ink,mainBkg:PAPER.stone,nodeBorder:PAPER.ruleMid,clusterBkg:"#FCFBF8",clusterBorder:PAPER.rule,titleColor:PAPER.ink,textColor:PAPER.ink,lineColor:PAPER.leadSoft,edgeLabelBackground:PAPER.sheet,actorBkg:PAPER.stone,actorBorder:PAPER.ruleMid,actorTextColor:PAPER.ink,actorLineColor:PAPER.ruleMid,signalColor:PAPER.lead,signalTextColor:PAPER.ink,labelBoxBkgColor:PAPER.stone,labelBoxBorderColor:PAPER.ruleMid,noteBkgColor:"#FBF3DB",noteBorderColor:"#E9D9A6",noteTextColor:PAPER.ink,sectionBkgColor:PAPER.stone,altSectionBkgColor:PAPER.sheet,sectionBkgColor2:PAPER.stone,gridColor:PAPER.rule,taskBkgColor:tint(r,.35),taskBorderColor:tint(r,.8),taskTextColor:PAPER.ink,taskTextLightColor:PAPER.ink,taskTextOutsideColor:PAPER.ink,activeTaskBkgColor:tint(r,.18),activeTaskBorderColor:tint(r,.8),doneTaskBkgColor:PAPER.stone2,doneTaskBorderColor:PAPER.ruleMid,critBkgColor:tint("#D6403A",.3),critBorderColor:"#D6403A",...n,...l,pieStrokeColor:PAPER.sheet,pieOuterStrokeColor:PAPER.rule,pieTitleTextColor:PAPER.ink,pieSectionTextColor:PAPER.ink,pieLegendTextColor:PAPER.ink}}}
2
+ import{BACKGROUNDS as c}from"./color.js";export const CHART_PALETTE=["#2A78D6","#EB6834","#1BAF7A","#EDA100","#E87BA4","#008300"],PAPER={ink:"#1F1D1A",lead:"#605B51",leadSoft:"#847F72",rule:"#EAE6DE",ruleStrong:"#959083",ruleMid:"#D6D1C6",stone:"#F8F6F1",stone2:"#EFECE5",stone3:"#E4E0D7",sheet:"#FFFFFF"},tagColors=o=>({bg:c[o??"gray"]??c.gray??PAPER.stone,fg:PAPER.ink}),TONE_COLORS={good:"#448361",bad:"#D44C47",flat:PAPER.lead};const d=o=>{const e=Number.parseInt(o.slice(1),16);return[e>>16&255,e>>8&255,e&255]};function f(o,e){const[n,l,r]=d(o);let i=0,t=1/0;return e.forEach((a,g)=>{const[C,k,u]=d(a),s=2*(n-C)**2+4*(l-k)**2+3*(r-u)**2;s<t&&(t=s,i=g)}),i}export function accentPalette(o){const e=[...CHART_PALETTE];if(o===void 0)return e;const n=f(o,e);return[o,...e.filter((l,r)=>r!==n)]}export function tint(o,e){const n=Number.parseInt(o.slice(1),16),l=r=>Math.round(255-(255-r)*e).toString(16).padStart(2,"0");return`#${l(n>>16&255)}${l(n>>8&255)}${l(n&255)}`.toUpperCase()}export const DIAGRAM_TEXT_PX=14;export function diagramConfig(o){const e=accentPalette(o.accent),n=Object.fromEntries(Array.from({length:12},(i,t)=>{const a=e[t%e.length]??PAPER.leadSoft;return[[`cScale${String(t)}`,tint(a,.22)],[`cScaleLabel${String(t)}`,PAPER.ink],[`cScalePeer${String(t)}`,tint(a,.6)],[`cScaleInv${String(t)}`,tint(a,.7)]]}).flat()),l=Object.fromEntries(e.map((i,t)=>[`pie${String(t+1)}`,i])),r=e[0]??CHART_PALETTE[0];return{startOnLoad:!1,securityLevel:"strict",htmlLabels:!1,fontFamily:o.font,theme:"base",themeCSS:`.grid .tick line { stroke: ${PAPER.rule}; } .grid .tick text { fill: ${PAPER.lead}; } .grid path { stroke-width: 0; } .lineWrapper line, line.lineWrapper { stroke: ${PAPER.leadSoft}; } .cluster-label text, .cluster-label tspan { font-weight: 600; }`,look:"classic",layout:"dagre",elk:{considerModelOrder:"NODES_AND_EDGES",forceNodeModelOrder:!0,mergeEdges:!1},flowchart:{htmlLabels:!1,nodeSpacing:36,rankSpacing:44,padding:10,curve:"basis"},sequence:{actorMargin:40,width:120,height:44,boxMargin:8,messageFontSize:14,mirrorActors:!1},gantt:{barHeight:22,barGap:6,fontSize:12,sectionFontSize:12},themeVariables:{fontFamily:o.font,fontSize:`${String(DIAGRAM_TEXT_PX)}px`,background:PAPER.sheet,primaryColor:PAPER.stone,primaryBorderColor:PAPER.ruleMid,primaryTextColor:PAPER.ink,secondaryColor:PAPER.stone2,secondaryBorderColor:PAPER.ruleMid,secondaryTextColor:PAPER.ink,tertiaryColor:PAPER.sheet,tertiaryBorderColor:PAPER.rule,tertiaryTextColor:PAPER.ink,mainBkg:PAPER.stone,nodeBorder:PAPER.ruleMid,clusterBkg:"#FCFBF8",clusterBorder:PAPER.rule,titleColor:PAPER.ink,textColor:PAPER.ink,lineColor:PAPER.leadSoft,edgeLabelBackground:PAPER.sheet,actorBkg:PAPER.stone,actorBorder:PAPER.ruleMid,actorTextColor:PAPER.ink,actorLineColor:PAPER.ruleMid,signalColor:PAPER.lead,signalTextColor:PAPER.ink,labelBoxBkgColor:PAPER.stone,labelBoxBorderColor:PAPER.ruleMid,noteBkgColor:"#FBF3DB",noteBorderColor:"#E9D9A6",noteTextColor:PAPER.ink,sectionBkgColor:PAPER.stone,altSectionBkgColor:PAPER.sheet,sectionBkgColor2:PAPER.stone,gridColor:PAPER.rule,taskBkgColor:tint(r,.35),taskBorderColor:tint(r,.8),taskTextColor:PAPER.ink,taskTextLightColor:PAPER.ink,taskTextOutsideColor:PAPER.ink,activeTaskBkgColor:tint(r,.18),activeTaskBorderColor:tint(r,.8),doneTaskBkgColor:PAPER.stone2,doneTaskBorderColor:PAPER.ruleMid,critBkgColor:tint("#D6403A",.3),critBorderColor:"#D6403A",...n,...l,pieStrokeColor:PAPER.sheet,pieOuterStrokeColor:PAPER.rule,pieTitleTextColor:PAPER.ink,pieSectionTextColor:PAPER.ink,pieLegendTextColor:PAPER.ink}}}
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- const c=/^[+\-−–]?[$€£¥]?\s?\d[\d,.\s]*\s?(%|×|x|k|K|M|B|bn|pt|pp)?\*?$/u,x=/^([—–-]|n\/a|N\/A|NA)$/u,d=t=>t.map(e=>e.text).join("").trim();export function numberColumns(t){const e=t.head===void 0||t.head==="both",s=t.head==="column"||t.head==="both",r=e?t.rows.slice(1):t.rows,m=Math.max(0,...t.rows.map(o=>o.length)),a=new Set;for(let o=s?1:0;o<m;o++){const u=r.map(n=>d(n[o]??[]));u.some(n=>c.test(n))&&u.every(n=>n===""||c.test(n)||x.test(n))&&a.add(o)}return a}const h={min:6,max:36,room:2};export function columnShares(t){const e=Math.max(0,...t.rows.map(s=>s.length));return Array.from({length:e},(s,r)=>{const m=Math.max(0,...t.rows.map(a=>Array.from(d(a[r]??[])).length));return Math.min(h.max,Math.max(h.min,m+h.room))})}
2
+ const w=/^[+\-−–]?[$€£¥]?\s?\d[\d,.\s]*\s?(%|×|x|k|K|M|B|bn|pt|pp)?\*?$/u,A=/^([—–-]|n\/a|N\/A|NA)$/u,f=t=>t.map(n=>n.text).join("").trim();export function numberColumns(t){const n=t.head===void 0||t.head==="both",r=t.head==="column"||t.head==="both",m=n?t.rows.slice(1):t.rows,d=Math.max(0,...t.rows.map(a=>a.length)),h=new Set;for(let a=r?1:0;a<d;a++){const c=m.map(o=>f(o[a]??[]));c.some(o=>w.test(o))&&c.every(o=>o===""||w.test(o)||A.test(o))&&h.add(a)}return h}export function emptyHead(t){const n=t.head===void 0||t.head==="both",r=t.rows[0];return n&&r!==void 0&&t.rows.length>1&&r.every(m=>f(m)==="")}const u={min:6,max:36,room:2},y=.55;export const charsAcross=(t,n)=>t/(n*96/72)/y;const N=t=>Math.max(0,...t.split(/\s+/u).map(n=>Array.from(n).length));export function columnShares(t,n){const r=Math.max(0,...t.rows.map(s=>s.length)),m=s=>t.rows.map(e=>f(e[s]??[])),d=s=>Math.max(0,...m(s).map(e=>Array.from(e).length)),h=Array.from({length:r},(s,e)=>Math.min(u.max,Math.max(u.min,d(e)+u.room)));if(n===void 0)return h;const a=h.map((s,e)=>Math.max(0,...m(e).map(N))+n.margins),c=h.map((s,e)=>Math.max(a[e]??0,Math.min(u.max,Math.max(u.min,d(e)))+n.margins)),o=s=>!t.widths?.[s],M=s=>s.reduce((e,p,l)=>e+(o(l)?p:0),0),i=M(a),x=M(c);if(x<=n.across||x===i)return c;if(i>=n.across)return a;const g=(n.across-i)/(x-i);return c.map((s,e)=>{const p=a[e]??s;return p+(s-p)*g})}