allyhub 0.21.0 → 0.22.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 (222) hide show
  1. package/dist/commands/export.js +1 -1
  2. package/dist/commands/index.js +1 -1
  3. package/dist/commands/run.js +2 -0
  4. package/dist/commands.json +1 -1
  5. package/dist/main.js +4 -4
  6. package/dist/node_modules/@allyhub/3d-extension/package.json +1 -1
  7. package/dist/node_modules/@allyhub/audio/package.json +1 -1
  8. package/dist/node_modules/@allyhub/blocks/package.json +1 -1
  9. package/dist/node_modules/@allyhub/browser/package.json +1 -1
  10. package/dist/node_modules/@allyhub/build/dist/migrate.js +1 -1
  11. package/dist/node_modules/@allyhub/build/dist/prepare.js +3 -3
  12. package/dist/node_modules/@allyhub/build/dist/project-root.js +1 -1
  13. package/dist/node_modules/@allyhub/build/dist/work.js +3 -3
  14. package/dist/node_modules/@allyhub/build/package.json +1 -1
  15. package/dist/node_modules/@allyhub/canvas-extension/package.json +1 -1
  16. package/dist/node_modules/@allyhub/canvas-model/package.json +1 -1
  17. package/dist/node_modules/@allyhub/chart/package.json +1 -1
  18. package/dist/node_modules/@allyhub/check/package.json +1 -1
  19. package/dist/node_modules/@allyhub/cloud/dist/client.js +1 -1
  20. package/dist/node_modules/@allyhub/cloud/package.json +1 -1
  21. package/dist/node_modules/@allyhub/components/package.json +1 -1
  22. package/dist/node_modules/@allyhub/dev-server/dist/index.js +1 -1
  23. package/dist/node_modules/@allyhub/dev-server/dist/record.js +2 -1
  24. package/dist/node_modules/@allyhub/dev-server/dist/validate.js +2 -2
  25. package/dist/node_modules/@allyhub/dev-server/package.json +1 -1
  26. package/dist/node_modules/@allyhub/diagnostics/package.json +1 -1
  27. package/dist/node_modules/@allyhub/doc/package.json +1 -1
  28. package/dist/node_modules/@allyhub/doc-extension/package.json +1 -1
  29. package/dist/node_modules/@allyhub/doc-print/package.json +1 -1
  30. package/dist/node_modules/@allyhub/export/package.json +1 -1
  31. package/dist/node_modules/@allyhub/extension-api/package.json +1 -1
  32. package/dist/node_modules/@allyhub/extension-host/package.json +1 -1
  33. package/dist/node_modules/@allyhub/formats/dist/data/deck-code.d.ts +3 -3
  34. package/dist/node_modules/@allyhub/formats/dist/data/sheet.d.ts +151 -151
  35. package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +173 -173
  36. package/dist/node_modules/@allyhub/formats/dist/data/work.d.ts +1 -2
  37. package/dist/node_modules/@allyhub/formats/dist/data/work.js +1 -1
  38. package/dist/node_modules/@allyhub/formats/dist/index.d.ts +1 -1
  39. package/dist/node_modules/@allyhub/formats/dist/index.js +1 -1
  40. package/dist/node_modules/@allyhub/formats/dist/layout.d.ts +2 -0
  41. package/dist/node_modules/@allyhub/formats/dist/layout.js +1 -1
  42. package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +106 -101
  43. package/dist/node_modules/@allyhub/formats/dist/schemas.js +1 -1
  44. package/dist/node_modules/@allyhub/formats/dist/tolerant.d.ts +26 -1
  45. package/dist/node_modules/@allyhub/formats/dist/tolerant.js +1 -1
  46. package/dist/node_modules/@allyhub/formats/package.json +1 -1
  47. package/dist/node_modules/@allyhub/html-extension/package.json +1 -1
  48. package/dist/node_modules/@allyhub/i18n/package.json +1 -1
  49. package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
  50. package/dist/node_modules/@allyhub/image-extension/package.json +1 -1
  51. package/dist/node_modules/@allyhub/image-measure/package.json +1 -1
  52. package/dist/node_modules/@allyhub/image-psd/package.json +1 -1
  53. package/dist/node_modules/@allyhub/image-render/package.json +1 -1
  54. package/dist/node_modules/@allyhub/image-runtime/package.json +1 -1
  55. package/dist/node_modules/@allyhub/image-sdk/package.json +1 -1
  56. package/dist/node_modules/@allyhub/jobs/package.json +1 -1
  57. package/dist/node_modules/@allyhub/linkedin-extension/package.json +1 -1
  58. package/dist/node_modules/@allyhub/linkedin-model/package.json +1 -1
  59. package/dist/node_modules/@allyhub/linkedin-view/package.json +1 -1
  60. package/dist/node_modules/@allyhub/measure/package.json +1 -1
  61. package/dist/node_modules/@allyhub/media/package.json +1 -1
  62. package/dist/node_modules/@allyhub/media-extension/package.json +1 -1
  63. package/dist/node_modules/@allyhub/model/package.json +1 -1
  64. package/dist/node_modules/@allyhub/office-extension/package.json +1 -1
  65. package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
  66. package/dist/node_modules/@allyhub/piece/package.json +1 -1
  67. package/dist/node_modules/@allyhub/project/package.json +1 -1
  68. package/dist/node_modules/@allyhub/protocol/package.json +1 -1
  69. package/dist/node_modules/@allyhub/registry/package.json +1 -1
  70. package/dist/node_modules/@allyhub/render/package.json +1 -1
  71. package/dist/node_modules/@allyhub/report-extension/package.json +1 -1
  72. package/dist/node_modules/@allyhub/runtime/package.json +1 -1
  73. package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
  74. package/dist/node_modules/@allyhub/scaffold/dist/index.js +6 -6
  75. package/dist/node_modules/@allyhub/scaffold/package.json +1 -1
  76. package/dist/node_modules/@allyhub/scenery/package.json +1 -1
  77. package/dist/node_modules/@allyhub/scenery-host/package.json +1 -1
  78. package/dist/node_modules/@allyhub/sheet/dist/file.js +2 -2
  79. package/dist/node_modules/@allyhub/sheet/package.json +1 -1
  80. package/dist/node_modules/@allyhub/sheet-extension/dist/build.js +1 -1
  81. package/dist/node_modules/@allyhub/sheet-extension/package.json +1 -1
  82. package/dist/node_modules/@allyhub/slides-core/dist/file.js +3 -3
  83. package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
  84. package/dist/node_modules/@allyhub/slides-extension/dist/build.js +2 -2
  85. package/dist/node_modules/@allyhub/slides-extension/package.json +1 -1
  86. package/dist/node_modules/@allyhub/slides-pptx/package.json +1 -1
  87. package/dist/node_modules/@allyhub/slides-runtime/package.json +1 -1
  88. package/dist/node_modules/@allyhub/stage/package.json +1 -1
  89. package/dist/node_modules/@allyhub/stage-page/package.json +1 -1
  90. package/dist/node_modules/@allyhub/stage-runtime/package.json +1 -1
  91. package/dist/node_modules/@allyhub/telemetry/package.json +1 -1
  92. package/dist/node_modules/@allyhub/text-extension/package.json +1 -1
  93. package/dist/node_modules/@allyhub/video-core/package.json +1 -1
  94. package/dist/node_modules/@allyhub/video-extension/package.json +1 -1
  95. package/dist/node_modules/@allyhub/video-measure/package.json +1 -1
  96. package/dist/node_modules/@allyhub/video-sdk/package.json +1 -1
  97. package/dist/node_modules/@allyhub/website/package.json +1 -1
  98. package/dist/node_modules/@allyhub/website-extension/package.json +1 -1
  99. package/dist/node_modules/@allyhub/x-extension/package.json +1 -1
  100. package/dist/node_modules/@allyhub/x-model/package.json +1 -1
  101. package/dist/node_modules/@allyhub/x-view/package.json +1 -1
  102. package/dist/package.json +15 -15
  103. package/dist/run-register.js +2 -0
  104. package/dist/works.js +1 -1
  105. package/editor-web/assets/{abnfDiagram-WEYOIA3C-B4tvwU6C.js → abnfDiagram-WEYOIA3C-D6qI3rai.js} +1 -1
  106. package/editor-web/assets/{architecture-WOLXFQ4H-V2fA0vY2.js → architecture-WOLXFQ4H-B3V6ggq8.js} +1 -1
  107. package/editor-web/assets/{architectureDiagram-ZHVYKT53-B6B7XN0M.js → architectureDiagram-ZHVYKT53-IauNyxXn.js} +1 -1
  108. package/editor-web/assets/{article-DW4eD_8K.js → article-BHjKp5We.js} +1 -1
  109. package/editor-web/assets/{article-Dm2dIEwc.js → article-BlNKv1Cn.js} +1 -1
  110. package/editor-web/assets/{blockDiagram-RJAE7QA3-BizcUGOM.js → blockDiagram-RJAE7QA3-yXhlfxbH.js} +1 -1
  111. package/editor-web/assets/{c4Diagram-XDPPPE54-CBHS0dQ0.js → c4Diagram-XDPPPE54-B-anrhvt.js} +1 -1
  112. package/editor-web/assets/{calc-worker-Cr4a0xmt.js → calc-worker-BpAgQE9E.js} +3 -3
  113. package/editor-web/assets/channel-Bhb-_8v6.js +1 -0
  114. package/editor-web/assets/{chip-BdQRH3FL.js → chip-pNQlYa2W.js} +1 -1
  115. package/editor-web/assets/{chunk-2E7WHVMD-CMPBck_Q.js → chunk-2E7WHVMD-QPOni4XB.js} +1 -1
  116. package/editor-web/assets/{chunk-4EMNKR2T-Df22Adpt.js → chunk-4EMNKR2T-DG1FCRRI.js} +1 -1
  117. package/editor-web/assets/{chunk-55XCU76K-CYrZ6_Q7.js → chunk-55XCU76K-mKuMXpnC.js} +1 -1
  118. package/editor-web/assets/{chunk-7S6XSTFO-BfdG9NNW.js → chunk-7S6XSTFO-CgZAazgt.js} +1 -1
  119. package/editor-web/assets/{chunk-AQDTSKZB-BCzZMoTJ.js → chunk-AQDTSKZB-BRU84phF.js} +1 -1
  120. package/editor-web/assets/{chunk-DSNLSHJZ-DT0xT8Wf.js → chunk-DSNLSHJZ-zku9oeG3.js} +1 -1
  121. package/editor-web/assets/{chunk-HAGFOTED-Bg3-EotU.js → chunk-HAGFOTED-CaUkBv_0.js} +1 -1
  122. package/editor-web/assets/{chunk-HNE4Q36P-BrSym24V.js → chunk-HNE4Q36P-BQz4ZCJf.js} +1 -1
  123. package/editor-web/assets/{chunk-NQOKRVIF-CMxgkJWF.js → chunk-NQOKRVIF-CHVBEDkg.js} +1 -1
  124. package/editor-web/assets/{chunk-UHW7PFBP-DWEwoyPy.js → chunk-UHW7PFBP-DrYeJo1e.js} +1 -1
  125. package/editor-web/assets/{chunk-VQ5W62QI-eTFh5_T9.js → chunk-VQ5W62QI-D8ToVCUe.js} +1 -1
  126. package/editor-web/assets/{chunk-WQQL4CDK-4PTupr9T.js → chunk-WQQL4CDK-DZ0tyi9F.js} +1 -1
  127. package/editor-web/assets/{chunk-YZO67HFG-D5XAAFWm.js → chunk-YZO67HFG-BLe7PXER.js} +1 -1
  128. package/editor-web/assets/{chunk-ZAUX2LTX-CPsdaisO.js → chunk-ZAUX2LTX-ByaeSIre.js} +1 -1
  129. package/editor-web/assets/{chunk-ZCHMQSOR-ClnuUyfy.js → chunk-ZCHMQSOR-DdMJr_t5.js} +1 -1
  130. package/editor-web/assets/{classDiagram-v2-4MYWR3UA-CM21waNF.js → classDiagram-v2-4MYWR3UA-DDpq7fFC.js} +1 -1
  131. package/editor-web/assets/{color-picker-BmKFn2ww.js → color-picker-CDeICDN5.js} +1 -1
  132. package/editor-web/assets/{cynefin-EF2NZ3EQ-CJUHTgee.js → cynefin-EF2NZ3EQ-CMivy2fr.js} +1 -1
  133. package/editor-web/assets/{cynefinDiagram-WF24UDRP-C9RIfuIV.js → cynefinDiagram-WF24UDRP-GtxT_9wW.js} +1 -1
  134. package/editor-web/assets/{dagre-NK4GIZVX-g-01KdpO.js → dagre-NK4GIZVX-Bn1O2Hjl.js} +1 -1
  135. package/editor-web/assets/deck-Cohd-G5m.js +1 -0
  136. package/editor-web/assets/{diagram-CBK3MWTC-CbOjWUu-.js → diagram-CBK3MWTC-W715PWZw.js} +1 -1
  137. package/editor-web/assets/{diagram-I5XIIV2D-C6psNS8J.js → diagram-I5XIIV2D-BKObZPn2.js} +1 -1
  138. package/editor-web/assets/{diagram-ODIL2UCW-C9PUE46P.js → diagram-ODIL2UCW-UtQxEPoW.js} +1 -1
  139. package/editor-web/assets/{diagram-PFBEJUXE-vJ_pnB33.js → diagram-PFBEJUXE-CpLGEK-k.js} +1 -1
  140. package/editor-web/assets/{diagram-RJA3I4VV-FwYlEfJ-.js → diagram-RJA3I4VV-DGyMXoHb.js} +1 -1
  141. package/editor-web/assets/{diagram-TYUNFSNR-FKpIxeUc.js → diagram-TYUNFSNR-Dy_Ewr8V.js} +1 -1
  142. package/editor-web/assets/{dist-H0z_DXDz.js → dist-0I0Obj60.js} +14 -14
  143. package/editor-web/assets/{dist-DCI21ljp.js → dist-6ugUm4dS.js} +1 -1
  144. package/editor-web/assets/{dist-D2rGVz9C.js → dist-B0rUvCi2.js} +1 -1
  145. package/editor-web/assets/{dist-D07Kj8GR.js → dist-CKD_paj_.js} +1 -1
  146. package/editor-web/assets/{dist-BgKyM9U6.js → dist-CKUW5NzS.js} +1 -1
  147. package/editor-web/assets/{dist-DJvfQvM7.js → dist-Ca9Gsuu0.js} +1 -1
  148. package/editor-web/assets/{dist-BqijryYd.js → dist-Cc8v9lfc.js} +1 -1
  149. package/editor-web/assets/{dist-BaWFMuvr.js → dist-CynBNzYv.js} +1 -1
  150. package/editor-web/assets/{dist-CB-_0-X4.js → dist-D7M5YTq2.js} +1 -1
  151. package/editor-web/assets/{dist-ByguWp3a.js → dist-D9tsFc2N.js} +1 -1
  152. package/editor-web/assets/{dist-DH8oJJw9.js → dist-DNMKDcLg.js} +3 -3
  153. package/editor-web/assets/{dist-D3DwRF1k.js → dist-Doj7_HUI.js} +17 -17
  154. package/editor-web/assets/{dist-CtYjYJdv.js → dist-DptBQzJR.js} +1 -1
  155. package/editor-web/assets/{dist-BdmMT8fP.js → dist-DzKB210A.js} +1 -1
  156. package/editor-web/assets/{dist-Cg0Z26Kv.js → dist-H9rTuNhb.js} +4 -4
  157. package/editor-web/assets/{dist-DmCDcb2_.js → dist-RyGsFHE0.js} +1 -1
  158. package/editor-web/assets/{dist-BI_BaYhO.js → dist-oeSWr2LE.js} +4 -4
  159. package/editor-web/assets/dist-wD_hHJ8_.js +19 -0
  160. package/editor-web/assets/{docx-draw-Dxb67W2d.js → docx-draw-B5cM77hc.js} +1 -1
  161. package/editor-web/assets/{ebnfDiagram-V4P3TTPT-DBymUM-F.js → ebnfDiagram-V4P3TTPT-GPYcx6dU.js} +1 -1
  162. package/editor-web/assets/{elk-QONTBCTQ-BNYR3OlS.js → elk-QONTBCTQ-Bi0r4UFM.js} +1 -1
  163. package/editor-web/assets/{erDiagram-KYQIGQAA-cTNyOqW6.js → erDiagram-KYQIGQAA-DrOSrnci.js} +1 -1
  164. package/editor-web/assets/esm-jIPnpbBD.js +21 -0
  165. package/editor-web/assets/{eventmodeling-K75KTNOO-C6FUZeXP.js → eventmodeling-K75KTNOO-Dw-MjgUb.js} +1 -1
  166. package/editor-web/assets/flowDiagram-IUGLLWBU-DbZTfPEP.js +1 -0
  167. package/editor-web/assets/{ganttDiagram-R7GPNTJY-LD9mqQ1x.js → ganttDiagram-R7GPNTJY-Bwe8cQqi.js} +1 -1
  168. package/editor-web/assets/{gitGraph-VSP46ZUC-CtCBcQFl.js → gitGraph-VSP46ZUC-DsAcAKP0.js} +1 -1
  169. package/editor-web/assets/{gitGraphDiagram-PDYL7XHY-DYQpOozz.js → gitGraphDiagram-PDYL7XHY-aObRwdru.js} +1 -1
  170. package/editor-web/assets/index-D-MNVykg.js +28 -0
  171. package/editor-web/assets/{info-OHQRW6UA-IXInKPRO.js → info-OHQRW6UA-DBPN8JFr.js} +1 -1
  172. package/editor-web/assets/{infoDiagram-MVDRKAX5-Ds7Cei7T.js → infoDiagram-MVDRKAX5-Bx26Hq7M.js} +1 -1
  173. package/editor-web/assets/{ishikawaDiagram-HPEHV2GE-DWs3qtAX.js → ishikawaDiagram-HPEHV2GE-BJ_MCDwA.js} +1 -1
  174. package/editor-web/assets/{journeyDiagram-BOSHW7O7-BkNKVYBA.js → journeyDiagram-BOSHW7O7-B5g4W2Dx.js} +1 -1
  175. package/editor-web/assets/{kanban-definition-FNSA4HC5-D3dMswnI.js → kanban-definition-FNSA4HC5-U8YNlxN7.js} +1 -1
  176. package/editor-web/assets/layout-CuWN7_3k.js +1 -0
  177. package/editor-web/assets/{mermaid-parser.core-D_W_0X0N.js → mermaid-parser.core-DYLQlYDo.js} +3 -3
  178. package/editor-web/assets/{mermaid.core-Bkirj-s5.js → mermaid.core-qNJmZ0b4.js} +4 -4
  179. package/editor-web/assets/{mindmap-definition-6OY57UG3-CMKkAAvI.js → mindmap-definition-6OY57UG3-CI5aBWbK.js} +1 -1
  180. package/editor-web/assets/{packet-JDAUHWVQ-CzCkgCfg.js → packet-JDAUHWVQ-BBclMGlJ.js} +1 -1
  181. package/editor-web/assets/{panes-BexRuZd2.js → panes-BShVq38A.js} +1 -1
  182. package/editor-web/assets/{pegDiagram-ECIUJNBX-C8qHkx7M.js → pegDiagram-ECIUJNBX-B3pljPTu.js} +1 -1
  183. package/editor-web/assets/{pie-XZMESJXO-BJqgxMrD.js → pie-XZMESJXO-B7WzimHm.js} +1 -1
  184. package/editor-web/assets/{pieDiagram-GNMPY74T-DyNntV5y.js → pieDiagram-GNMPY74T-tM1Da50-.js} +1 -1
  185. package/editor-web/assets/{quadrantDiagram-D57K4MC3-BHa-69ir.js → quadrantDiagram-D57K4MC3-BEq_Shj9.js} +1 -1
  186. package/editor-web/assets/{radar-ABXABTNO-BeRPjBBR.js → radar-ABXABTNO-v2jJSW5T.js} +1 -1
  187. package/editor-web/assets/{railroad-I3PHUGI6-BaRQqRsK.js → railroad-I3PHUGI6-6W3Z4F8Y.js} +1 -1
  188. package/editor-web/assets/{railroad-abnf-LNEFI6M7-BZfwomxZ.js → railroad-abnf-LNEFI6M7-DxIN7Zrt.js} +1 -1
  189. package/editor-web/assets/{railroad-ebnf-DWYD2UWJ-DbgqpEF5.js → railroad-ebnf-DWYD2UWJ-Bb5O7tAx.js} +1 -1
  190. package/editor-web/assets/{railroad-peg-JR7BVNR7-BYOf3PsQ.js → railroad-peg-JR7BVNR7-i2LjEP5t.js} +1 -1
  191. package/editor-web/assets/{railroadDiagram-Y72NRBL7-B5OAzOsD.js → railroadDiagram-Y72NRBL7-DhsyVKbG.js} +1 -1
  192. package/editor-web/assets/{requirementDiagram-EQYSW5RA-wqYNoqO0.js → requirementDiagram-EQYSW5RA-Du2k7i1E.js} +1 -1
  193. package/editor-web/assets/{ribbon-tabs-B3IC9WOt.js → ribbon-tabs-Bxuj_hct.js} +1 -1
  194. package/editor-web/assets/{sankeyDiagram-SY24JHO5-Crf6GRsa.js → sankeyDiagram-SY24JHO5-CDnRMu7J.js} +1 -1
  195. package/editor-web/assets/schemas-CnlOL0u4.js +1 -0
  196. package/editor-web/assets/{sequenceDiagram-BLEHNHQU-DUcHz4_d.js → sequenceDiagram-BLEHNHQU-BUXBhWYW.js} +1 -1
  197. package/editor-web/assets/{stateDiagram-v2-A6IESKWZ-DbeLdnpS.js → stateDiagram-v2-A6IESKWZ-Enb8LZUA.js} +1 -1
  198. package/editor-web/assets/{swimlanes-B3ENRKFQ-BDi6AeJI.js → swimlanes-B3ENRKFQ-pnpjgTrl.js} +1 -1
  199. package/editor-web/assets/swimlanesDiagram-AYQRV4AK-B-B2Eoc8.js +8 -0
  200. package/editor-web/assets/themes-D_ISkWVz.js +1 -0
  201. package/editor-web/assets/{timeline-definition-JXYKGLGB-B0awa2hh.js → timeline-definition-JXYKGLGB-C4pR18kd.js} +1 -1
  202. package/editor-web/assets/{treeView-D4JQ5SDB-C91G0IGm.js → treeView-D4JQ5SDB-kzNGeAv6.js} +1 -1
  203. package/editor-web/assets/{treemap-SAJKECNS-CiOWiwl2.js → treemap-SAJKECNS-Buhb5wzt.js} +1 -1
  204. package/editor-web/assets/{updating-D0GEtwnJ.js → updating-Cbxw83_O.js} +1 -1
  205. package/editor-web/assets/{usecaseDiagram-WPOLBNNX-DMYM1MRe.js → usecaseDiagram-WPOLBNNX-CL-xLQWl.js} +1 -1
  206. package/editor-web/assets/{vennDiagram-Q3Y3IDCW-DQIJ5vvN.js → vennDiagram-Q3Y3IDCW-bwsyCcdK.js} +1 -1
  207. package/editor-web/assets/{video-mMOFXHYK.js → video-8MxWX9f5.js} +1 -1
  208. package/editor-web/assets/{wardley-7MLQ67FV-C3H9HG8r.js → wardley-7MLQ67FV-DXsLgedI.js} +1 -1
  209. package/editor-web/assets/{wardleyDiagram-IVAIDKWA-DgsjqY1Y.js → wardleyDiagram-IVAIDKWA-Cn0ph953.js} +1 -1
  210. package/editor-web/assets/{workbook-NtMEyLgf.js → workbook-BDWkQ149.js} +1 -1
  211. package/editor-web/assets/{xychartDiagram-4URNHDU4-DzsGI527.js → xychartDiagram-4URNHDU4-CfXnqGWZ.js} +1 -1
  212. package/editor-web/index.html +2 -1
  213. package/package.json +2 -2
  214. package/editor-web/assets/channel-dyUtlVPg.js +0 -1
  215. package/editor-web/assets/deck-C0VxrlzX.js +0 -1
  216. package/editor-web/assets/dist-CCP24Lel.js +0 -19
  217. package/editor-web/assets/esm-Cl3GKSDd.js +0 -21
  218. package/editor-web/assets/flowDiagram-IUGLLWBU-ukTovy07.js +0 -1
  219. package/editor-web/assets/index-omhSywJb.js +0 -28
  220. package/editor-web/assets/schemas-C21MyseF.js +0 -1
  221. package/editor-web/assets/swimlanesDiagram-AYQRV4AK-2wwOmxbv.js +0 -8
  222. package/editor-web/assets/tolerant-DM9s0Mt1.js +0 -1
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{z as r}from"zod";import{ConfigSchema as n}from"./data/config.js";import{DeckCodeSchema as m}from"./data/deck-code.js";import{EditsFileSchema as c}from"./data/edits.js";import{ElementsFileSchema as h}from"./data/elements.js";import{GenFileSchema as l}from"./data/gen.js";import{MessagesFileSchema as f}from"./data/messages.js";import{InterpretationSchema as d}from"./data/reference.js";import{ScriptFileSchema as p}from"./data/script.js";import{SheetFileSchema as u}from"./data/sheet.js";import{SlidesFileSchema as b}from"./data/slides.js";import{WebsiteFileSchema as g}from"./data/website.js";import{WORK_FILE as S,WorkFileSchema as w}from"./data/work.js";import{WordsFileSchema as F}from"./data/words.js";import{OPENPYXL_FIELDS as k,PPTX_FIELDS as j,readTolerantly as A}from"./tolerant.js";export const DATA_FILES={work:{schema:w,files:[S],about:"The work a person sees of the project: each piece's kind, file and title, in groups."},words:{schema:F,files:["**/*.words.json"],about:"The words said in an audio or video file, with their times."},edits:{schema:c,files:["**/edits/*.json"],about:"A recording's cut list."},elements:{schema:h,files:["**/*.elements.json"],about:"A page screenshot's named elements, each its box in the picture's pixels."},gen:{schema:l,files:["**/*.provenance"],about:"How a media file was made, and where it came from."},script:{schema:p,files:[],about:"An item's words in one language."},messages:{schema:f,files:["assets/text/*.json"],about:"Words several items share, in one language."},sheet:{schema:u,files:[],about:"A workbook: its sheets, cells, formulas, formats, names, checks and scenarios."},slides:{schema:b,files:[],about:"A deck's pages: their order, layouts, values and what was placed on them."},website:{schema:g,files:[],about:"A website: how it is served while it is made, how it is built, and where the built site is."},interpretation:{schema:d,files:["**/reference/*/interpretation.json"],about:"What the agent concludes of a reference video: its sections, captions, watermarks and labels."},"deck-code":{schema:m,files:[],about:"What a deck's module and its generators made, as data: what its code host sends the editor."},config:{schema:n,files:[],about:"allyhub.config.ts's settings."}};export function jsonSchemaOf(e){const{schema:s,about:t}=DATA_FILES[e];return{$schema:"https://json-schema.org/draft/2020-12/schema",$id:`https://allyhub.com/schemas/${e}.schema.json`,title:e,description:t,...r.toJSONSchema(s,{io:"input",unrepresentable:"any"})}}function o(e){if(e.code!=="invalid_union")return e.message;const s=e.errors.flatMap(t=>t.slice(0,1).map(a=>{const i=a.path.map(String).join(".");return i===""?o(a):`${i}: ${o(a)}`}));return s.length===0?e.message:`Fits none of its forms: ${[...new Set(s)].join("; ")}`}export function readDataFile(e,s){const t=DATA_FILES[e].schema.safeParse(s);return t.success?{ok:!0,value:t.data}:{ok:!1,problems:t.error.issues.map(a=>({path:a.path.map(String).join("."),message:o(a)}))}}export function readDataFileAsWritten(e,s){return A(DATA_FILES[e].schema,s,e==="slides"?j:k)}
2
+ import{z as r}from"zod";import{ConfigSchema as n}from"./data/config.js";import{DeckCodeSchema as m}from"./data/deck-code.js";import{EditsFileSchema as c}from"./data/edits.js";import{ElementsFileSchema as h}from"./data/elements.js";import{GenFileSchema as l}from"./data/gen.js";import{MessagesFileSchema as d}from"./data/messages.js";import{InterpretationSchema as f}from"./data/reference.js";import{ScriptFileSchema as p}from"./data/script.js";import{SheetFileSchema as u}from"./data/sheet.js";import{SlidesFileSchema as g}from"./data/slides.js";import{WebsiteFileSchema as b}from"./data/website.js";import{WORK_FILE as S,WorkFileSchema as w}from"./data/work.js";import{WordsFileSchema as F}from"./data/words.js";import{OPENPYXL_FIELDS as k,PPTX_FIELDS as j,readLeavingOutUnknownFields as v,readTolerantly as A}from"./tolerant.js";export const DATA_FILES={work:{schema:w,files:[S],about:"The work a person sees of the project: each piece's kind, file and title, in groups."},words:{schema:F,files:["**/*.words.json"],about:"The words said in an audio or video file, with their times."},edits:{schema:c,files:["**/edits/*.json"],about:"A recording's cut list."},elements:{schema:h,files:["**/*.elements.json"],about:"A page screenshot's named elements, each its box in the picture's pixels."},gen:{schema:l,files:["**/*.provenance"],about:"How a media file was made, and where it came from."},script:{schema:p,files:[],about:"An item's words in one language."},messages:{schema:d,files:["assets/text/*.json"],about:"Words several items share, in one language."},sheet:{schema:u,files:[],about:"A workbook: its sheets, cells, formulas, formats, names, checks and scenarios."},slides:{schema:g,files:[],about:"A deck's pages: their order, layouts, values and what was placed on them."},website:{schema:b,files:[],about:"A website: how it is served while it is made, how it is built, and where the built site is."},interpretation:{schema:f,files:["**/reference/*/interpretation.json"],about:"What the agent concludes of a reference video: its sections, captions, watermarks and labels."},"deck-code":{schema:m,files:[],about:"What a deck's module and its generators made, as data: what its code host sends the editor."},config:{schema:n,files:[],about:"allyhub.config.ts's settings."}};export function jsonSchemaOf(e){const{schema:t,about:s}=DATA_FILES[e];return{$schema:"https://json-schema.org/draft/2020-12/schema",$id:`https://allyhub.com/schemas/${e}.schema.json`,title:e,description:s,...r.toJSONSchema(t,{io:"input",unrepresentable:"any"})}}function i(e){if(e.code!=="invalid_union")return e.message;const t=e.errors.flatMap(s=>s.slice(0,1).map(a=>{const o=a.path.map(String).join(".");return o===""?i(a):`${o}: ${i(a)}`}));return t.length===0?e.message:`Fits none of its forms: ${[...new Set(t)].join("; ")}`}export function readDataFile(e,t){const s=v(DATA_FILES[e].schema,t),a=s.leftOut.length===0?{}:{leftOut:s.leftOut};return s.success?{ok:!0,value:s.data,...a}:{ok:!1,problems:s.error.issues.map(o=>({path:o.path.map(String).join("."),message:i(o)})),...a}}export function readDataFileAsWritten(e,t){return A(DATA_FILES[e].schema,t,e==="slides"?j:k)}
@@ -27,12 +27,36 @@ export declare function problemsOf(value: unknown, issues: readonly Issue[]): {
27
27
  path: string;
28
28
  message: string;
29
29
  }[];
30
- /** A value read by its schema as a model writes it: taken, or what is wrong with it all at once and what the rest reads as. */
30
+ /** A field a value's schema does not know, left out of what it reads as: where it was, and what it was. */
31
+ export interface FieldLeftOut {
32
+ path: string;
33
+ message: string;
34
+ }
35
+ /**
36
+ * A value read by its schema, the fields it does not know left out (a
37
+ * newer AllyHub's, or a misspelling) and said: what it reads as, or the
38
+ * issues left once they are out.
39
+ */
40
+ export declare function readLeavingOutUnknownFields<S extends z.ZodType>(schema: S, given: unknown): {
41
+ success: true;
42
+ data: z.output<S>;
43
+ leftOut: FieldLeftOut[];
44
+ } | {
45
+ success: false;
46
+ error: z.ZodError;
47
+ leftOut: FieldLeftOut[];
48
+ };
49
+ /**
50
+ * A value read by its schema as a model writes it: taken, or what is wrong
51
+ * with it all at once and what the rest reads as; the fields it does not
52
+ * know left out of either and said (`leftOut`), never a problem.
53
+ */
31
54
  export declare function readTolerantly<S extends z.ZodType>(schema: S, given: unknown,
32
55
  /** Fields by other names, and the name each is here. */
33
56
  fields?: Readonly<Record<string, string>>): {
34
57
  ok: true;
35
58
  value: z.output<S>;
59
+ leftOut?: FieldLeftOut[];
36
60
  } | {
37
61
  ok: false;
38
62
  problems: {
@@ -40,6 +64,7 @@ fields?: Readonly<Record<string, string>>): {
40
64
  message: string;
41
65
  }[];
42
66
  partial?: z.output<S>;
67
+ leftOut?: FieldLeftOut[];
43
68
  };
44
69
  export {};
45
70
  //# sourceMappingURL=tolerant.d.ts.map
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- const M=[["ctr","center","centre","middle","mid","centered","centred"],["t","top"],["b","bottom"],["l","left"],["r","right"],["just","justify","justified"],["out","outside","outer"],["in","inside","inner"]],$=new Map(M.flatMap(e=>e.map(o=>[o,e[0]])));function m(e){return e.replace(/([a-z0-9])([A-Z])/gu,"$1 $2").toLowerCase().split(/[\s_\-.]+/u).filter(o=>o!=="").map(o=>$.get(o)??o).join("")}export function spelledAs(e,o){for(const i of[m(e),m(`${e} clustered`)]){const r=o.filter(t=>typeof t=="string"&&m(t)===i);if(r.length===1)return r[0]}}export function valueOf(e,o){const i=v[m(e)];return spelledAs(e,o)??(i!==void 0&&o.includes(i)?i:void 0)}function y(e,o){const i=Array.from({length:e.length+1},(t,n)=>Array.from({length:o.length+1},(s,a)=>n===0?a:a===0?n:0)),r=(t,n)=>i[t]?.[n]??0;for(let t=1;t<=e.length;t++)for(let n=1;n<=o.length;n++){const s=e[t-1]===o[n-1]?0:1;let a=Math.min(r(t-1,n)+1,r(t,n-1)+1,r(t-1,n-1)+s);t>1&&n>1&&e[t-1]===o[n-2]&&e[t-2]===o[n-1]&&(a=Math.min(a,r(t-2,n-2)+1));const l=i[t];l&&(l[n]=a)}return r(e.length,o.length)}export function nearest(e,o){const i=e.toLowerCase();let r;for(const t of o){if(typeof t!="string")continue;const n=Math.min(y(i,t.toLowerCase()),y(m(e),m(t)));(r===void 0||n<r.d)&&(r={value:t,d:n})}return r&&r.d<=Math.max(1,Math.floor(i.length/3))?r.value:void 0}function x(e){return e.every(o=>o.path.length===0&&(o.code==="invalid_type"||o.code==="invalid_union"&&o.errors.every(x)))}function b(e,o=[]){const i=[...o,...e.path];if(e.code!=="invalid_union")return[{issue:e,at:i}];const r=e.errors.filter(s=>!x(s)),t=r.length>0?r:e.errors,n=Math.min(...t.map(s=>s.length));return t.filter(s=>s.length===n).flatMap(s=>s.flatMap(a=>b(a,i)))}const P=e=>e===null||e===!1||e==="none";function h(e,o){if(o.length===0)return;let i=e;for(const t of o.slice(0,-1)){if(i===null||typeof i!="object")return;i=i[t]}const r=o[o.length-1];if(!(i===null||typeof i!="object"||r===void 0))return{parent:i,key:r}}export const OPENPYXL_FIELDS={horizontal:"align",vertical:"valign",wrap_text:"wrap",wrapText:"wrap",shrink_to_fit:"shrink",shrinkToFit:"shrink",text_rotation:"rotation",textRotation:"rotation",number_format:"format",numFmt:"format",strikethrough:"strike",fill_type:"pattern",patternType:"pattern",fgColor:"color",start_color:"color",bgColor:"background",end_color:"background",freeze_panes:"freeze",merged_cells:"merges",tabColor:"tab",tab_color:"tab",showGridLines:"gridlines",show_gridlines:"gridlines",allow_blank:"blank",allowBlank:"blank"},PPTX_FIELDS={word_wrap:"wrap",wrap_text:"wrap",auto_size:"autofit",autosize:"autofit",auto_fit:"autofit",inset:"margin",insets:"margin",margins:"margin",padding:"margin",lIns:"margin_left",tIns:"margin_top",rIns:"margin_right",bIns:"margin_bottom",numCol:"columns",num_columns:"columns",column_count:"columns",spcCol:"column_spacing",column_gap:"column_spacing",marL:"margin_left",first_line_indent:"indent",alignment:"align",horizontal:"align",lnSpc:"line_spacing",spcBef:"space_before",spcAft:"space_after",exactly:"points",fixed:"points",vertical_anchor:"anchor",font_size:"size",font_name:"font",tick_label_position:"labels",major_tick_mark:"tick_marks",minor_tick_mark:"minor_tick_marks",log:"log_base",logBase:"log_base",display_units:"units",minor_unit:"minor",has_minor_gridlines:"minor_gridlines",tick_label_skip:"label_every",tickLblSkip:"label_every",subtotals:"totals",set_as_total:"totals",show_connector_lines:"connector_lines",connectors:"connector_lines",quartile_method:"quartiles",quartile_calculation:"quartiles",show_mean_markers:"mean_markers",show_mean_line:"mean_line",show_outlier_points:"outliers",show_outliers:"outliers",show_inner_points:"inner_points",show_nonoutliers:"inner_points",parent_label_layout:"parent_labels",hi_low_lines:"high_low_lines",hilo_lines:"high_low_lines",bubble_sizes:"sizes",bins:"bin_count",number_of_bins:"bin_count",bin_size:"bin_width",overflow_bin:"overflow",underflow_bin:"underflow",kpi:"stat",metric:"stat",kpis:"stats",metrics:"stats",scorecard:"stats",badge:"tag",pill:"tag",chip:"tag",alert:"callout",admonition:"callout",gauge:"progress",progress_bar:"progress",milestones:"timeline",process:"steps",stepper:"steps",avatar:"person",team:"people",alluvial:"sankey",roadmap:"gantt",gantt_chart:"gantt",timeline_gantt:"gantt",align:"text.align",bold:"text.bold",italic:"text.italic",size:"text.size",font:"text.font",anchor:"text.anchor",valign:"text.anchor",margin:"text.margin",autofit:"text.autofit",wrap:"text.wrap"};const O=["text","frame","textbox","geometry","fill","height","width","row"],v={shapetofittext:"grow",resizeshapetofittext:"grow",spautofit:"grow",resize:"grow",texttofitshape:"shrink",shrinktextonoverflow:"shrink",normautofit:"shrink",fit:"shrink",noautofit:"none",donotautofit:"none",bridge:"waterfall",bridgechart:"waterfall",box:"box-whisker",boxplot:"box-whisker",boxandwhisker:"box-whisker",boxandwhiskers:"box-whisker",boxwhiskers:"box-whisker",whisker:"box-whisker",spider:"radar",spiderweb:"radar",web:"radar",candlestick:"stock-ohlc",ohlc:"stock-ohlc",hlc:"stock-hlc",highlow:"stock-hlc",stock:"stock-hlc",range:"dumbbell",rangeplot:"dumbbell",arrow:"dumbbell",barbell:"dumbbell",slopegraph:"slope",bulletgraph:"bullet",tree:"treemap",rings:"sunburst",radialtreemap:"sunburst",conversionfunnel:"funnel",hist:"histogram",distribution:"histogram",paretochart:"pareto",inc:"inclusive",exc:"exclusive"},j=/^#?(?:[0-9a-fA-F]{2})?([0-9a-fA-F]{6})$/u;function L(e,o,i){let r=!1;for(const{issue:t,at:n}of o.flatMap(s=>b(s))){if(t.code==="unrecognized_keys"){const f=h(e,[...n,""]);if(!f||Array.isArray(f.parent))continue;const u=f.parent;for(const p of t.keys){const c=i[p];if(c===void 0)continue;const[g,_]=c.split(".");if(_!==void 0&&g!==void 0){if(!O.some(S=>S in u))continue;const k=u[g]??{};if(typeof k!="object"||Array.isArray(k))continue;const w=k;if(_ in w)continue;w[_]=u[p],u[g]=w}else{if(c in u)continue;u[c]=u[p]}Reflect.deleteProperty(u,p),r=!0}continue}if(t.code==="invalid_format"&&t.format==="regex"){const f=h(e,n);if(!f)continue;const u=f.parent[f.key],p=typeof u=="string"?j.exec(u):null;p?.[1]!==void 0&&String(t.pattern).includes("#")&&(f.parent[f.key]=`#${p[1].toUpperCase()}`,r=!0);continue}if(t.code!=="invalid_value")continue;const s=h(e,n);if(!s)continue;const{parent:a,key:l}=s,d=a[l];if(typeof d=="string"){const f=v[m(d)],u=spelledAs(d,t.values)??(f!==void 0&&t.values.includes(f)?f:void 0);if(u!==void 0){a[l]=u,r=!0;continue}}P(d)&&!Array.isArray(a)&&(Reflect.deleteProperty(a,l),r=!0)}return r}function C(e,o,i){if(e.code==="invalid_value"){const r=h(o,i),t=r&&r.parent[r.key],n=typeof t=="string"?nearest(t,e.values):void 0,s=e.values.length>12?e.values.slice(0,10):e.values,a=`${s.map(l=>JSON.stringify(l)).join(", ")}${s.length<e.values.length?", …":""}`;return`${n===void 0?"":`did you mean "${n}"? `}one of ${a}`}return e.message}function E(e,o,i){if(e.code!=="invalid_value")return;const r=h(o,i),t=r&&r.parent[r.key];return typeof t=="string"?nearest(t,e.values):void 0}export function problemsOf(e,o){const i=new Set,r=[];for(const t of o){const n=b(t),s=new Map;for(const a of n){const l=a.at.map(String).join(".");s.set(l,[...s.get(l)??[],a])}for(const[a,l]of s){const d=l.filter(c=>c.issue.code==="invalid_value"),f=l.filter(c=>c.issue.code!=="invalid_value"),p=t.code==="invalid_union"&&d.length>0&&new Set(f.map(c=>c.issue.message)).size===1?(()=>{const c=d[0],g=c?E(c.issue,e,c.at):void 0,_=f[0]?.issue.message??"";return[`${g===void 0?"":`did you mean "${g}"? `}${_}`]})():l.map(c=>C(c.issue,e,c.at));for(const c of p){const g=c.replace(/\.+$/u,""),_=`${a}\0${g}`;i.has(_)||(i.add(_),r.push({path:a,message:g}))}}}return r}function T(e,o){const i=new Map;let r=!1;for(const{at:t}of o.flatMap(n=>b(n))){const n=h(e,t);if(n){if(Array.isArray(n.parent)){const s=i.get(n.parent)??new Set;s.add(Number(n.key)),i.set(n.parent,s)}else if(n.key in n.parent)Reflect.deleteProperty(n.parent,n.key);else continue;r=!0}}for(const[t,n]of i)for(const s of[...n].sort((a,l)=>l-a))t.splice(s,1);return r}const z=12,A=e=>e===void 0?void 0:JSON.parse(JSON.stringify(e));export function readTolerantly(e,o,i=OPENPYXL_FIELDS){const r=e.safeParse(o);if(r.success)return{ok:!0,value:r.data};const t=A(o);let n=e.safeParse(t);for(let d=0;d<z&&!n.success&&L(t,n.error.issues,i);d++)n=e.safeParse(t);if(n.success)return{ok:!0,value:n.data};const s=problemsOf(t,n.error.issues),a=A(t);let l=e.safeParse(a);for(let d=0;d<z&&!l.success&&T(a,l.error.issues);d++)l=e.safeParse(a);return l.success?{ok:!1,problems:s,partial:l.data}:{ok:!1,problems:s}}
2
+ const P=[["ctr","center","centre","middle","mid","centered","centred"],["t","top"],["b","bottom"],["l","left"],["r","right"],["just","justify","justified"],["out","outside","outer"],["in","inside","inner"]],$=new Map(P.flatMap(e=>e.map(o=>[o,e[0]])));function h(e){return e.replace(/([a-z0-9])([A-Z])/gu,"$1 $2").toLowerCase().split(/[\s_\-.]+/u).filter(o=>o!=="").map(o=>$.get(o)??o).join("")}export function spelledAs(e,o){for(const s of[h(e),h(`${e} clustered`)]){const r=o.filter(t=>typeof t=="string"&&h(t)===s);if(r.length===1)return r[0]}}export function valueOf(e,o){const s=z[h(e)];return spelledAs(e,o)??(s!==void 0&&o.includes(s)?s:void 0)}function v(e,o){const s=Array.from({length:e.length+1},(t,n)=>Array.from({length:o.length+1},(i,a)=>n===0?a:a===0?n:0)),r=(t,n)=>s[t]?.[n]??0;for(let t=1;t<=e.length;t++)for(let n=1;n<=o.length;n++){const i=e[t-1]===o[n-1]?0:1;let a=Math.min(r(t-1,n)+1,r(t,n-1)+1,r(t-1,n-1)+i);t>1&&n>1&&e[t-1]===o[n-2]&&e[t-2]===o[n-1]&&(a=Math.min(a,r(t-2,n-2)+1));const u=s[t];u&&(u[n]=a)}return r(e.length,o.length)}export function nearest(e,o){const s=e.toLowerCase();let r;for(const t of o){if(typeof t!="string")continue;const n=Math.min(v(s,t.toLowerCase()),v(h(e),h(t)));(r===void 0||n<r.d)&&(r={value:t,d:n})}return r&&r.d<=Math.max(1,Math.floor(s.length/3))?r.value:void 0}function A(e){return e.every(o=>o.path.length===0&&(o.code==="invalid_type"||o.code==="invalid_union"&&o.errors.every(A)))}function b(e,o=[]){const s=[...o,...e.path];if(e.code!=="invalid_union")return[{issue:e,at:s}];const r=e.errors.filter(i=>!A(i)),t=r.length>0?r:e.errors,n=Math.min(...t.map(i=>i.length));return t.filter(i=>i.length===n).flatMap(i=>i.flatMap(a=>b(a,s)))}const j=e=>e===null||e===!1||e==="none";function m(e,o){if(o.length===0)return;let s=e;for(const t of o.slice(0,-1)){if(s===null||typeof s!="object")return;s=s[t]}const r=o[o.length-1];if(!(s===null||typeof s!="object"||r===void 0))return{parent:s,key:r}}export const OPENPYXL_FIELDS={horizontal:"align",vertical:"valign",wrap_text:"wrap",wrapText:"wrap",shrink_to_fit:"shrink",shrinkToFit:"shrink",text_rotation:"rotation",textRotation:"rotation",number_format:"format",numFmt:"format",strikethrough:"strike",fill_type:"pattern",patternType:"pattern",fgColor:"color",start_color:"color",bgColor:"background",end_color:"background",freeze_panes:"freeze",merged_cells:"merges",tabColor:"tab",tab_color:"tab",showGridLines:"gridlines",show_gridlines:"gridlines",allow_blank:"blank",allowBlank:"blank"},PPTX_FIELDS={word_wrap:"wrap",wrap_text:"wrap",auto_size:"autofit",autosize:"autofit",auto_fit:"autofit",inset:"margin",insets:"margin",margins:"margin",padding:"margin",lIns:"margin_left",tIns:"margin_top",rIns:"margin_right",bIns:"margin_bottom",numCol:"columns",num_columns:"columns",column_count:"columns",spcCol:"column_spacing",column_gap:"column_spacing",marL:"margin_left",first_line_indent:"indent",alignment:"align",horizontal:"align",lnSpc:"line_spacing",spcBef:"space_before",spcAft:"space_after",exactly:"points",fixed:"points",vertical_anchor:"anchor",font_size:"size",font_name:"font",tick_label_position:"labels",major_tick_mark:"tick_marks",minor_tick_mark:"minor_tick_marks",log:"log_base",logBase:"log_base",display_units:"units",minor_unit:"minor",has_minor_gridlines:"minor_gridlines",tick_label_skip:"label_every",tickLblSkip:"label_every",subtotals:"totals",set_as_total:"totals",show_connector_lines:"connector_lines",connectors:"connector_lines",quartile_method:"quartiles",quartile_calculation:"quartiles",show_mean_markers:"mean_markers",show_mean_line:"mean_line",show_outlier_points:"outliers",show_outliers:"outliers",show_inner_points:"inner_points",show_nonoutliers:"inner_points",parent_label_layout:"parent_labels",hi_low_lines:"high_low_lines",hilo_lines:"high_low_lines",bubble_sizes:"sizes",bins:"bin_count",number_of_bins:"bin_count",bin_size:"bin_width",overflow_bin:"overflow",underflow_bin:"underflow",kpi:"stat",metric:"stat",kpis:"stats",metrics:"stats",scorecard:"stats",badge:"tag",pill:"tag",chip:"tag",alert:"callout",admonition:"callout",gauge:"progress",progress_bar:"progress",milestones:"timeline",process:"steps",stepper:"steps",avatar:"person",team:"people",alluvial:"sankey",roadmap:"gantt",gantt_chart:"gantt",timeline_gantt:"gantt",align:"text.align",bold:"text.bold",italic:"text.italic",size:"text.size",font:"text.font",anchor:"text.anchor",valign:"text.anchor",margin:"text.margin",autofit:"text.autofit",wrap:"text.wrap"};const L=["text","frame","textbox","geometry","fill","height","width","row"],z={shapetofittext:"grow",resizeshapetofittext:"grow",spautofit:"grow",resize:"grow",texttofitshape:"shrink",shrinktextonoverflow:"shrink",normautofit:"shrink",fit:"shrink",noautofit:"none",donotautofit:"none",bridge:"waterfall",bridgechart:"waterfall",box:"box-whisker",boxplot:"box-whisker",boxandwhisker:"box-whisker",boxandwhiskers:"box-whisker",boxwhiskers:"box-whisker",whisker:"box-whisker",spider:"radar",spiderweb:"radar",web:"radar",candlestick:"stock-ohlc",ohlc:"stock-ohlc",hlc:"stock-hlc",highlow:"stock-hlc",stock:"stock-hlc",range:"dumbbell",rangeplot:"dumbbell",arrow:"dumbbell",barbell:"dumbbell",slopegraph:"slope",bulletgraph:"bullet",tree:"treemap",rings:"sunburst",radialtreemap:"sunburst",conversionfunnel:"funnel",hist:"histogram",distribution:"histogram",paretochart:"pareto",inc:"inclusive",exc:"exclusive"},C=/^#?(?:[0-9a-fA-F]{2})?([0-9a-fA-F]{6})$/u;function F(e,o,s){let r=!1;for(const{issue:t,at:n}of o.flatMap(i=>b(i))){if(t.code==="unrecognized_keys"){const c=m(e,[...n,""]);if(!c||Array.isArray(c.parent))continue;const l=c.parent;for(const d of t.keys){const f=s[d];if(f===void 0)continue;const[g,_]=f.split(".");if(_!==void 0&&g!==void 0){if(!L.some(M=>M in l))continue;const w=l[g]??{};if(typeof w!="object"||Array.isArray(w))continue;const y=w;if(_ in y)continue;y[_]=l[d],l[g]=y}else{if(f in l)continue;l[f]=l[d]}Reflect.deleteProperty(l,d),r=!0}continue}if(t.code==="invalid_format"&&t.format==="regex"){const c=m(e,n);if(!c)continue;const l=c.parent[c.key],d=typeof l=="string"?C.exec(l):null;d?.[1]!==void 0&&String(t.pattern).includes("#")&&(c.parent[c.key]=`#${d[1].toUpperCase()}`,r=!0);continue}if(t.code!=="invalid_value")continue;const i=m(e,n);if(!i)continue;const{parent:a,key:u}=i,p=a[u];if(typeof p=="string"){const c=z[h(p)],l=spelledAs(p,t.values)??(c!==void 0&&t.values.includes(c)?c:void 0);if(l!==void 0){a[u]=l,r=!0;continue}}j(p)&&!Array.isArray(a)&&(Reflect.deleteProperty(a,u),r=!0)}return r}function E(e,o,s){if(e.code==="invalid_value"){const r=m(o,s),t=r&&r.parent[r.key],n=typeof t=="string"?nearest(t,e.values):void 0,i=e.values.length>12?e.values.slice(0,10):e.values,a=`${i.map(u=>JSON.stringify(u)).join(", ")}${i.length<e.values.length?", …":""}`;return`${n===void 0?"":`did you mean "${n}"? `}one of ${a}`}return e.message}function R(e,o,s){if(e.code!=="invalid_value")return;const r=m(o,s),t=r&&r.parent[r.key];return typeof t=="string"?nearest(t,e.values):void 0}export function problemsOf(e,o){const s=new Set,r=[];for(const t of o){const n=b(t),i=new Map;for(const a of n){const u=a.at.map(String).join(".");i.set(u,[...i.get(u)??[],a])}for(const[a,u]of i){const p=u.filter(f=>f.issue.code==="invalid_value"),c=u.filter(f=>f.issue.code!=="invalid_value"),d=t.code==="invalid_union"&&p.length>0&&new Set(c.map(f=>f.issue.message)).size===1?(()=>{const f=p[0],g=f?R(f.issue,e,f.at):void 0,_=c[0]?.issue.message??"";return[`${g===void 0?"":`did you mean "${g}"? `}${_}`]})():u.map(f=>E(f.issue,e,f.at));for(const f of d){const g=f.replace(/\.+$/u,""),_=`${a}\0${g}`;s.has(_)||(s.add(_),r.push({path:a,message:g}))}}}return r}function T(e,o){const s=new Map;let r=!1;for(const{at:t}of o.flatMap(n=>b(n))){const n=m(e,t);if(n){if(Array.isArray(n.parent)){const i=s.get(n.parent)??new Set;i.add(Number(n.key)),s.set(n.parent,i)}else if(n.key in n.parent)Reflect.deleteProperty(n.parent,n.key);else continue;r=!0}}for(const[t,n]of s)for(const i of[...n].sort((a,u)=>u-a))t.splice(i,1);return r}const k=12,x=e=>e===void 0?void 0:JSON.parse(JSON.stringify(e));function O(e){return e.flatMap(o=>b(o)).flatMap(({issue:o,at:s})=>o.code==="unrecognized_keys"?o.keys.map(r=>({at:s,key:r})):[])}function S(e,o){const s=[];for(const{at:r,key:t}of O(o)){const n=m(e,[...r,""]);if(!n||Array.isArray(n.parent))continue;const i=n.parent;if(!(t in i))continue;Reflect.deleteProperty(i,t);const a=[...r,t].map(String).join(".");s.push({path:a,message:`"${t}" is not a field this AllyHub reads: left out`})}return s}export function readLeavingOutUnknownFields(e,o){const s=e.safeParse(o);if(s.success)return{success:!0,data:s.data,leftOut:[]};if(O(s.error.issues).length===0)return{success:!1,error:s.error,leftOut:[]};const r=x(o),t=[];let n=s;for(let i=0;i<k&&!n.success;i++){const a=S(r,n.error.issues);if(a.length===0)break;t.push(...a),n=e.safeParse(r)}return n.success?{success:!0,data:n.data,leftOut:t}:{success:!1,error:n.error,leftOut:t}}export function readTolerantly(e,o,s=OPENPYXL_FIELDS){const r=e.safeParse(o);if(r.success)return{ok:!0,value:r.data};const t=x(o);let n=e.safeParse(t);for(let l=0;l<k&&!n.success&&F(t,n.error.issues,s);l++)n=e.safeParse(t);const i=[];for(let l=0;l<k&&!n.success;l++){const d=S(t,n.error.issues);if(d.length===0)break;i.push(...d),n=e.safeParse(t)}const a=i.length===0?{}:{leftOut:i};if(n.success)return{ok:!0,value:n.data,...a};const u=problemsOf(t,n.error.issues),p=x(t);let c=e.safeParse(p);for(let l=0;l<k&&!c.success&&T(p,c.error.issues);l++)c=e.safeParse(p);return c.success?{ok:!1,problems:u,partial:c.data,...a}:{ok:!1,problems:u,...a}}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/formats",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/html-extension",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./tools": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/i18n",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/image-draw",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./*": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/image-extension",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./build": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/image-measure",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./*": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/image-psd",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/image-render",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./*": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/image-runtime",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/image-sdk",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/jobs",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/linkedin-extension",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./package.json": "./package.json",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/linkedin-model",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/linkedin-view",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/measure",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/media",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/media-extension",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/model",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/office-extension",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./package.json": "./package.json"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/ooxml",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/piece",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/project",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/protocol",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/registry",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/render",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/report-extension",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./theme": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/runtime",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/runtimes",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,13 +1,13 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{mkdir as p,readFile as m,writeFile as d}from"node:fs/promises";import{basename as f,join as a,resolve as u}from"node:path";export const PROJECT_PACKAGES={cli:"allyhub",sdk:"@allyhub/sdk"},PROJECT_TYPESCRIPT="~5.9.3",PROJECT_GITIGNORE=`node_modules/
2
+ import{mkdir as p,readFile as y,writeFile as d}from"node:fs/promises";import{basename as f,join as r,resolve as u}from"node:path";export const PROJECT_PACKAGES={cli:"allyhub",sdk:"@allyhub/sdk"},PROJECT_TYPESCRIPT="~5.9.3",PROJECT_GITIGNORE=`node_modules/
3
3
  .allyhub/
4
4
  .playwright-cli/
5
- `,REGISTRY="https://allyhub.com/r",MASTER_SKILL="allyhub";export function workSkills(n){return n.filter(e=>e.type==="allyhub:skill"&&e.name!==MASTER_SKILL).map(e=>({name:e.name,description:e.description.replaceAll(/\s+/gu," ").trim()}))}export const AGENT_RULES_BEGIN="<!-- BEGIN:allyhub-agent-rules -->",AGENT_RULES_END="<!-- END:allyhub-agent-rules -->";export function agentRules(){return[AGENT_RULES_BEGIN,"",`The SDK's docs for the version this project builds with are in \`node_modules/${PROJECT_PACKAGES.sdk}/docs/\` once the project has installed it, its \`README.md\` saying what each file covers; without it, \`allyhub help\` says where they are (the SDK the CLI lends). They and the SDK's types describe the API as it is now.`,"","`allyhub help` lists AllyHub's commands (`npx allyhub help` once the project has installed it); `allyhub help <command>` says what one does.","",AGENT_RULES_END].join(`
5
+ `,REGISTRY="https://allyhub.com/r",MASTER_SKILL="allyhub";export function workSkills(n){return n.filter(e=>e.type==="allyhub:skill"&&e.name!==MASTER_SKILL).map(e=>({name:e.name,description:e.description.replaceAll(/\s+/gu," ").trim()}))}export const AGENT_RULES_BEGIN="<!-- BEGIN:allyhub-agent-rules -->",AGENT_RULES_END="<!-- END:allyhub-agent-rules -->";export function agentRules(){return[AGENT_RULES_BEGIN,"","`allyhub help` lists AllyHub's commands and says where the docs of the SDK this project builds with are, their `README.md` saying what each file covers; `allyhub help <command>` says what one does. The docs and the SDK's types describe the API as it is now.","",AGENT_RULES_END].join(`
6
6
  `)}export function projectAgents(){return`# AllyHub project
7
7
 
8
- This folder is an AllyHub project. Videos, decks, images, 3D sceneries and 3D models are TypeScript, docs MDX, sheets YAML and CSV, a canvas JSON Canvas, and a website any web project; their files are named and laid out freely, and a model is made once and put in any scenery that imports it. \`${WORK_FILE}\` lists the work a person sees, in the order they see it: each piece's \`kind\` (\`video\`, \`slides\`, \`image\`, \`doc\`, \`sheet\`, \`scenery\`, \`model\`, \`website\`; none for a \`.canvas\`, which its editor opens by its name), its \`file\` from this folder and, if its file says none, a \`title\`, optionally under \`group\` headings. A file not listed (a scenery a video imports, a helper, a draft) is not shown to the person.
8
+ This folder is an AllyHub project. Videos, decks, images, 3D sceneries and 3D models are TypeScript, docs MDX, sheets YAML and CSV, reports HTML, a canvas JSON Canvas, and a website any web project; their files are named and laid out freely, and a model is made once and put in any scenery that imports it. \`${WORK_FILE}\` lists the work a person sees, in the order they see it: each piece's \`kind\` (\`video\`, \`slides\`, \`image\`, \`doc\`, \`sheet\`, \`report\`, \`scenery\`, \`model\`, \`website\`; none for a \`.canvas\`, which its editor opens by its name), its \`file\` from this folder and, if its file says none, a \`title\`, optionally under \`group\` headings. A file not listed (a scenery a video imports, a helper, a draft) is not shown to the person.
9
9
 
10
- - A video or a scenery is code, which needs a package.json: \`npm create allyhub@latest .\` makes one, and \`npm install\` installs it.
10
+ - Code imports \`${PROJECT_PACKAGES.sdk}\` and three.js with nothing installed: \`allyhub\` brings them where the project has not installed them. A package of another that code imports is installed with \`npm install <package>\`.
11
11
 
12
12
  ${agentRules()}
13
13
  `}export const PROJECT_CLAUDE=`@AGENTS.md
@@ -17,5 +17,5 @@ versions: {}
17
17
  versions:
18
18
  ${e.map(([t,s])=>` ${/^[a-z][\w-]*$/u.test(t)?t:JSON.stringify(t)}: ${String(s)}
19
19
  `).join("")}`}export const PROJECT_TSCONFIG=`${JSON.stringify({compilerOptions:{target:"ES2022",module:"ESNext",moduleResolution:"Bundler",lib:["ES2022","DOM","DOM.Iterable"],types:[`${PROJECT_PACKAGES.sdk}/client`,`${PROJECT_PACKAGES.cli}/client`],strict:!0,noEmit:!0,skipLibCheck:!0,verbatimModuleSyntax:!0,allowImportingTsExtensions:!0},include:["**/*.ts",".allyhub/cache/types"],exclude:["node_modules"]},null,2)}
20
- `;export function packageName(n){const e=n.toLowerCase().normalize("NFKD").replace(/\p{M}/gu,"").replace(/[^\w.-]+/gu,"-").replace(/^[-._]+|[-._]+$/gu,"").slice(0,214);return e===""?"allyhub-project":e}const c=n=>m(n).then(()=>!0,()=>!1);export async function writeAgentFiles(n,e){const t=u(n);await p(t,{recursive:!0});const s=[];for(const[o,r]of[["AGENTS.md",projectAgents()],["CLAUDE.md",PROJECT_CLAUDE],[WORK_FILE,projectWork(e)]])await c(a(t,o))||(await d(a(t,o),r,{flag:"wx"}),s.push(o));return s}export async function startProject(n,e){const t=u(n);if(await c(a(t,"package.json")))throw new Error(`${t} already has a package.json: add AllyHub to it with npm install ${PROJECT_PACKAGES.cli} ${PROJECT_PACKAGES.sdk}.`);const s=packageName(f(t)),o=i=>e.packages?.[i]??e.version,r={name:s,version:"0.0.0",private:!0,type:"module",scripts:{dev:"allyhub dev",check:"allyhub check",export:"allyhub export",typecheck:"tsc --noEmit"},dependencies:{[PROJECT_PACKAGES.cli]:o(PROJECT_PACKAGES.cli),[PROJECT_PACKAGES.sdk]:o(PROJECT_PACKAGES.sdk)},devDependencies:{typescript:PROJECT_TYPESCRIPT}},h=[["package.json",`${JSON.stringify(r,null,2)}
21
- `],["tsconfig.json",PROJECT_TSCONFIG],[".gitignore",PROJECT_GITIGNORE]];await p(t,{recursive:!0});const l=[];for(const[i,y]of h)await c(a(t,i))||(await d(a(t,i),y,{flag:"wx"}),l.push(i));return l.push(...await writeAgentFiles(t,e.formats)),{folder:t,name:s,files:l}}
20
+ `;export function packageName(n){const e=n.toLowerCase().normalize("NFKD").replace(/\p{M}/gu,"").replace(/[^\w.-]+/gu,"-").replace(/^[-._]+|[-._]+$/gu,"").slice(0,214);return e===""?"allyhub-project":e}const c=n=>y(n).then(()=>!0,()=>!1);export async function writeAgentFiles(n,e){const t=u(n);await p(t,{recursive:!0});const s=[];for(const[o,a]of[["AGENTS.md",projectAgents()],["CLAUDE.md",PROJECT_CLAUDE],[WORK_FILE,projectWork(e)],[".gitignore",PROJECT_GITIGNORE]])await c(r(t,o))||(await d(r(t,o),a,{flag:"wx"}),s.push(o));return s}export async function startProject(n,e){const t=u(n);if(await c(r(t,"package.json")))throw new Error(`${t} already has a package.json: add AllyHub to it with npm install ${PROJECT_PACKAGES.cli} ${PROJECT_PACKAGES.sdk}.`);const s=packageName(f(t)),o=i=>e.packages?.[i]??e.version,a={name:s,version:"0.0.0",private:!0,type:"module",scripts:{dev:"allyhub dev",check:"allyhub check",export:"allyhub export",typecheck:"tsc --noEmit"},dependencies:{[PROJECT_PACKAGES.cli]:o(PROJECT_PACKAGES.cli),[PROJECT_PACKAGES.sdk]:o(PROJECT_PACKAGES.sdk)},devDependencies:{typescript:PROJECT_TYPESCRIPT}},h=[["package.json",`${JSON.stringify(a,null,2)}
21
+ `],["tsconfig.json",PROJECT_TSCONFIG],[".gitignore",PROJECT_GITIGNORE]];await p(t,{recursive:!0});const l=[];for(const[i,m]of h)await c(r(t,i))||(await d(r(t,i),m,{flag:"wx"}),l.push(i));return l.push(...await writeAgentFiles(t,e.formats)),{folder:t,name:s,files:l}}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/scaffold",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/scenery",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/scenery-host",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,3 +1,3 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{readDataFileAsWritten as g}from"@allyhub/formats";import{CORE_SCHEMA as y,load as S}from"js-yaml";import{inPixels as c}from"./units.js";import{LineCounter as f,isMap as k,isScalar as d,parseDocument as p,visit as $}from"yaml";export const ENTRY="sheet.yaml",CODE="sheet.ts";const b={clustered:"clustered",standard:"clustered",stacked:"stacked",percentStacked:"stacked-100"},M={col:"column",column:"column",bar:"bar",area:"area",line:"line"};function m(n){const s=n.sheets;if(!Array.isArray(s))return n;for(const r of s)if(Array.isArray(r.charts))for(const e of r.charts){const t=typeof e.type=="string"?M[e.type]:void 0,o=e.grouping;if(t===void 0||typeof o!="string")continue;const i=b[o];i!==void 0&&(e.type=t==="line"||t==="area"?i==="clustered"?t:`${t}-${i}`:`${t}-${i}`,Reflect.deleteProperty(e,"grouping"))}return n}export const codeOf=n=>readSheetFile(n).file?.code;export function placesOf(n,s){const r=e=>{const t=e===""?[]:e.split("/");for(const o of s.split("/"))if(!(o===""||o==="."))if(o===".."){if(t.length===0)return;t.pop()}else t.push(o);return t.join("/")};return[...new Set([r(n),r("")])].filter(e=>e!==void 0&&e!=="")}export function dataFilesOf(n){const s=readSheetFile(n),r=s.file??s.partial;return[...new Set(r?.sheets.flatMap(e=>[...(e.tables??[]).map(t=>t.rows),...(e.blocks??[]).map(t=>t.rows)])??[])]}function O(n){const s=[];return $(n,{Map(r,e){if(!k(e))return;const t=new Set;for(const o of e.items){const i=d(o.key)?String(o.key.value):void 0;if(i!==void 0)if(t.has(i)){const l=d(o.key)?o.key.range?.[0]??0:0;s.push({at:l,key:i})}else t.add(i)}}}),s}export const SHEET_FILE_MOST=20*1e3*1e3,sizeSaid=n=>`${String(Math.round(n/1e5)/10)} MB`;function a(n,s){let r=s;return e=>{if(r===void 0){const i=new f;r={doc:p(n,{lineCounter:i,uniqueKeys:!1}),counter:i}}const{doc:t,counter:o}=r;for(let i=e.length;i>=0;i--){const u=t.getIn(e.slice(0,i),!0)?.range?.[0];if(u!==void 0)return o.linePos(u).line}}}function A(n){try{return{value:S(n,{schema:y})}}catch{return}}export function readSheetFile(n){if(n.length>SHEET_FILE_MOST)return{problems:[{file:ENTRY,line:1,message:`this file is ${sizeSaid(n.length)}; a sheet's file over ${sizeSaid(SHEET_FILE_MOST)} is not read`}],lineOf:()=>{}};const s=A(n);if(s)return h(m(s.value??{}),a(n));const r=new f,e=p(n,{lineCounter:r,uniqueKeys:!1}),t=O(e);return e.errors.length>0||t.length>0?{problems:[...e.errors.map(o=>({file:ENTRY,line:r.linePos(o.pos[0]).line,message:`not YAML: ${o.message.split(`
3
- `)[0]??""}`})),...t.map(o=>({file:ENTRY,line:r.linePos(o.at).line,message:`not YAML: Map keys must be unique (${o.key})`}))],lineOf:a(n,{doc:e,counter:r})}:h(m(e.toJS()??{}),a(n,{doc:e,counter:r}))}function h(n,s){const r=g("sheet",n);return r.ok?{file:c(r.value),problems:[],lineOf:s}:{...r.partial?{partial:c(r.partial)}:{},problems:r.problems.map(e=>{const t=s(e.path===""?[]:e.path.split(".").map(o=>/^\d+$/u.test(o)?Number(o):o));return{file:ENTRY,...t===void 0?{}:{line:t},message:`${e.path===""?"":`${e.path}: `}${e.message}`}}),lineOf:s}}
2
+ import{readDataFileAsWritten as g}from"@allyhub/formats";import{CORE_SCHEMA as y,load as S}from"js-yaml";import{inPixels as c}from"./units.js";import{LineCounter as f,isMap as k,isScalar as d,parseDocument as p,visit as $}from"yaml";export const ENTRY="sheet.yaml",CODE="sheet.ts";const b={clustered:"clustered",standard:"clustered",stacked:"stacked",percentStacked:"stacked-100"},O={col:"column",column:"column",bar:"bar",area:"area",line:"line"};function m(t){const s=t.sheets;if(!Array.isArray(s))return t;for(const o of s)if(Array.isArray(o.charts))for(const e of o.charts){const r=typeof e.type=="string"?O[e.type]:void 0,n=e.grouping;if(r===void 0||typeof n!="string")continue;const i=b[n];i!==void 0&&(e.type=r==="line"||r==="area"?i==="clustered"?r:`${r}-${i}`:`${r}-${i}`,Reflect.deleteProperty(e,"grouping"))}return t}export const codeOf=t=>readSheetFile(t).file?.code;export function placesOf(t,s){const o=e=>{const r=e===""?[]:e.split("/");for(const n of s.split("/"))if(!(n===""||n==="."))if(n===".."){if(r.length===0)return;r.pop()}else r.push(n);return r.join("/")};return[...new Set([o(t),o("")])].filter(e=>e!==void 0&&e!=="")}export function dataFilesOf(t){const s=readSheetFile(t),o=s.file??s.partial;return[...new Set(o?.sheets.flatMap(e=>[...(e.tables??[]).map(r=>r.rows),...(e.blocks??[]).map(r=>r.rows)])??[])]}function M(t){const s=[];return $(t,{Map(o,e){if(!k(e))return;const r=new Set;for(const n of e.items){const i=d(n.key)?String(n.key.value):void 0;if(i!==void 0)if(r.has(i)){const a=d(n.key)?n.key.range?.[0]??0:0;s.push({at:a,key:i})}else r.add(i)}}}),s}export const SHEET_FILE_MOST=20*1e3*1e3,sizeSaid=t=>`${String(Math.round(t/1e5)/10)} MB`;function l(t,s){let o=s;return e=>{if(o===void 0){const i=new f;o={doc:p(t,{lineCounter:i,uniqueKeys:!1}),counter:i}}const{doc:r,counter:n}=o;for(let i=e.length;i>=0;i--){const u=r.getIn(e.slice(0,i),!0)?.range?.[0];if(u!==void 0)return n.linePos(u).line}}}function w(t){try{return{value:S(t,{schema:y})}}catch{return}}export function readSheetFile(t){if(t.length>SHEET_FILE_MOST)return{problems:[{file:ENTRY,line:1,message:`this file is ${sizeSaid(t.length)}; a sheet's file over ${sizeSaid(SHEET_FILE_MOST)} is not read`}],lineOf:()=>{}};const s=w(t);if(s)return h(m(s.value??{}),l(t));const o=new f,e=p(t,{lineCounter:o,uniqueKeys:!1}),r=M(e);return e.errors.length>0||r.length>0?{problems:[...e.errors.map(n=>({file:ENTRY,line:o.linePos(n.pos[0]).line,message:`not YAML: ${n.message.split(`
3
+ `)[0]??""}`})),...r.map(n=>({file:ENTRY,line:o.linePos(n.at).line,message:`not YAML: Map keys must be unique (${n.key})`}))],lineOf:l(t,{doc:e,counter:o})}:h(m(e.toJS()??{}),l(t,{doc:e,counter:o}))}function h(t,s){const o=g("sheet",t),e=n=>{const i=s(n.path===""?[]:n.path.split(".").map(a=>/^\d+$/u.test(a)?Number(a):a));return{file:ENTRY,...i===void 0?{}:{line:i},message:`${n.path===""?"":`${n.path}: `}${n.message}`}},r=(o.leftOut??[]).map(n=>({...e(n),level:"warn"}));return o.ok?{file:c(o.value),problems:r,lineOf:s}:{...o.partial?{partial:c(o.partial)}:{},problems:[...o.problems.map(e),...r],lineOf:s}}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/sheet",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{createHash as b}from"node:crypto";import{readFile as F}from"node:fs/promises";import{join as N,posix as S}from"node:path";import{problem as J}from"@allyhub/diagnostics";import{sdkEntriesOf as j}from"@allyhub/build";import{cellName as k,chartFormula as C,checkWorkbook as E,readCells as A,readSheetFile as D,seededRandom as L,SharedFormula as M,tableRows as $,textOf as O,CellError as R}from"@allyhub/sheet";import W from"./build-plugins.js";import{readSheetSource as x,sheetCodeOf as H,sheetFilePath as K,workbookFiles as P}from"./code.js";export const LEND={sdk:j(W)};function T(o,t,l,i,h){const n={};for(const e of l.tables){const a=$(i,e),d=$(i,e,{values:"shown"}),c=b("sha256").update(h).update(JSON.stringify(a)).update(JSON.stringify(d)).digest("hex");n[`${o}#${e.name}`]={sha256:c,value:a,shown:d},n[`${t}#${e.name}`]={sha256:c,value:a,shown:d}}const m=(e,a,d)=>{const c=b("sha256").update(h).update(e).update(JSON.stringify(a)).update(JSON.stringify(d)).digest("hex");n[`${o}#${e}`]={sha256:c,value:a,shown:d},n[`${t}#${e}`]={sha256:c,value:a,shown:d}};for(const e of l.names.values()){if(e.hidden===!0||e.sheet!==void 0)continue;const a=new M(C(e.name),0,0,e.source),d=l.sheets[0];if(!a.node||!d)continue;const c=A(i,d,a),g=c.map(r=>v(r.value)),u=c.map(O);c.length===1?m(e.name,g[0],u[0]):c.length>1&&m(e.name,g,u)}for(const e of l.sheets){const a=e.used;if(!a)continue;const d=l.tables.filter(r=>r.sheet===e).map(r=>r.area),c=(r,f)=>d.some(p=>r>=p.top&&r<=p.bottom&&f>=p.left&&f<=p.right),g={},u={};for(let r=a.top;r<=a.bottom;r++)for(let f=a.left;f<=a.right;f++){if(c(r,f))continue;const p=i.value(e,r,f);if(p===null)continue;const s=k({row:r,col:f});g[s]=v(p),u[s]=O({value:p,sheet:e,row:r,col:f})}Object.keys(g).length>0&&m(`${e.name}!`,g,u)}return n}const v=o=>o instanceof R?o.code:o;async function w(o,t,l){const i=[],h=t.entry,n=await x(o,h,l?{meta:l}:{lend:LEND}).catch(()=>{});if(!n)return{};i.push(...n.problems);const{csv:m,generated:e}=n,a=b("sha256").update(n.text);for(const s of m.values())a.update(s);e&&a.update(JSON.stringify(e));const d=a.digest("hex"),c=E(P(o,n),{random:L(d)}),g=K(n);for(const s of c.problems){const y=g(s.file);i.push(J("AK-M009",`${y}${s.line===void 0?"":`:${String(s.line)}`}: ${s.message}.`,{where:{file:y,...s.line===void 0?{}:{line:s.line}}}))}const{workbook:u,calc:r}=c,f=u?.title?.trim();return{sheet:{dir:t.dir,place:t.id,file:h,...f?{title:f}:{},sheets:u?.sheets.map(s=>s.name)??[],tables:u?.tables.map(s=>({name:s.name,rows:s.rows}))??[],files:[h,...[...m.keys()].map(s=>n.at.get(s)??S.join(t.dir,s)),...n.code===void 0?[]:[n.code]],...e?{generated:e}:{},...n.failed?{codeFailed:!0}:{}},problems:i,files:[...[...m.keys()].map(s=>({path:n.at.get(s)??S.join(t.dir,s),role:"table"})),...n.code===void 0?[]:[{path:n.code,role:"code"}]],...u&&r?{data:T(t.id,h,u,r,d)}:{}}}export async function readSheets(o,t,l){const i=[],h=[];let n={};for(const m of t){const e=await w(o,m,l);e.sheet&&i.push(e.sheet),h.push(...e.problems??[]),n={...n,...e.data}}return{sheets:i,problems:h,data:n}}const V={lend:(o,t)=>w(t.root,o,t.meta),code:async(o,t)=>{const l=await F(N(t.root,o.entry),"utf8").catch(()=>"");if(H(o.entry,l)===void 0)return{failed:!1};const i=await x(t.root,o.entry,{lend:t.lend}).catch(()=>{});return{failed:i?.failed??!0,...i?.generated?{value:i.generated}:{}}},unreadable:o=>D(o).problems.filter(t=>t.message.startsWith("not YAML")).map(t=>t.message),render:async(o,t)=>(await import("./export.js")).renderSheet(o,t)};export default V;
2
+ import{createHash as b}from"node:crypto";import{readFile as F}from"node:fs/promises";import{join as N,posix as S}from"node:path";import{problem as J}from"@allyhub/diagnostics";import{sdkEntriesOf as j}from"@allyhub/build";import{cellName as k,chartFormula as C,checkWorkbook as E,readCells as A,readSheetFile as D,seededRandom as L,SharedFormula as M,tableRows as $,textOf as v,CellError as R}from"@allyhub/sheet";import W from"./build-plugins.js";import{readSheetSource as O,sheetCodeOf as H,sheetFilePath as K,workbookFiles as P}from"./code.js";export const LEND={sdk:j(W)};function T(o,t,c,i,h){const s={};for(const e of c.tables){const a=$(i,e),l=$(i,e,{values:"shown"}),d=b("sha256").update(h).update(JSON.stringify(a)).update(JSON.stringify(l)).digest("hex");s[`${o}#${e.name}`]={sha256:d,value:a,shown:l},s[`${t}#${e.name}`]={sha256:d,value:a,shown:l}}const m=(e,a,l)=>{const d=b("sha256").update(h).update(e).update(JSON.stringify(a)).update(JSON.stringify(l)).digest("hex");s[`${o}#${e}`]={sha256:d,value:a,shown:l},s[`${t}#${e}`]={sha256:d,value:a,shown:l}};for(const e of c.names.values()){if(e.hidden===!0||e.sheet!==void 0)continue;const a=new M(C(e.name),0,0,e.source),l=c.sheets[0];if(!a.node||!l)continue;const d=A(i,l,a),g=d.map(r=>x(r.value)),u=d.map(v);d.length===1?m(e.name,g[0],u[0]):d.length>1&&m(e.name,g,u)}for(const e of c.sheets){const a=e.used;if(!a)continue;const l=c.tables.filter(r=>r.sheet===e).map(r=>r.area),d=(r,f)=>l.some(p=>r>=p.top&&r<=p.bottom&&f>=p.left&&f<=p.right),g={},u={};for(let r=a.top;r<=a.bottom;r++)for(let f=a.left;f<=a.right;f++){if(d(r,f))continue;const p=i.value(e,r,f);if(p===null)continue;const n=k({row:r,col:f});g[n]=x(p),u[n]=v({value:p,sheet:e,row:r,col:f})}Object.keys(g).length>0&&m(`${e.name}!`,g,u)}return s}const x=o=>o instanceof R?o.code:o;async function w(o,t,c){const i=[],h=t.entry,s=await O(o,h,c?{meta:c}:{lend:LEND}).catch(()=>{});if(!s)return{};i.push(...s.problems);const{csv:m,generated:e}=s,a=b("sha256").update(s.text);for(const n of m.values())a.update(n);e&&a.update(JSON.stringify(e));const l=a.digest("hex"),d=E(P(o,s),{random:L(l)}),g=K(s);for(const n of d.problems){const y=g(n.file);i.push(J("AK-M009",`${y}${n.line===void 0?"":`:${String(n.line)}`}: ${n.message}.`,{where:{file:y,...n.line===void 0?{}:{line:n.line}},...n.level===void 0?{}:{level:n.level}}))}const{workbook:u,calc:r}=d,f=u?.title?.trim();return{sheet:{dir:t.dir,place:t.id,file:h,...f?{title:f}:{},sheets:u?.sheets.map(n=>n.name)??[],tables:u?.tables.map(n=>({name:n.name,rows:n.rows}))??[],files:[h,...[...m.keys()].map(n=>s.at.get(n)??S.join(t.dir,n)),...s.code===void 0?[]:[s.code]],...e?{generated:e}:{},...s.failed?{codeFailed:!0}:{}},problems:i,files:[...[...m.keys()].map(n=>({path:s.at.get(n)??S.join(t.dir,n),role:"table"})),...s.code===void 0?[]:[{path:s.code,role:"code"}]],...u&&r?{data:T(t.id,h,u,r,l)}:{}}}export async function readSheets(o,t,c){const i=[],h=[];let s={};for(const m of t){const e=await w(o,m,c);e.sheet&&i.push(e.sheet),h.push(...e.problems??[]),s={...s,...e.data}}return{sheets:i,problems:h,data:s}}const V={lend:(o,t)=>w(t.root,o,t.meta),code:async(o,t)=>{const c=await F(N(t.root,o.entry),"utf8").catch(()=>"");if(H(o.entry,c)===void 0)return{failed:!1};const i=await O(t.root,o.entry,{lend:t.lend}).catch(()=>{});return{failed:i?.failed??!0,...i?.generated?{value:i.generated}:{}}},unreadable:o=>D(o).problems.filter(t=>t.message.startsWith("not YAML")).map(t=>t.message),render:async(o,t)=>(await import("./export.js")).renderSheet(o,t)};export default V;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/sheet-extension",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./code": {
@@ -1,4 +1,4 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{readDataFileAsWritten as A}from"@allyhub/formats";import{isCollection as $,isMap as b,isSeq as j,LineCounter as M,parseDocument as x}from"yaml";import{commonPairs as P,sameValue as O}from"./values.js";export function readSlidesFile(t){const e=new M,s=x(t,{lineCounter:e}),o=c=>{const g=c===""?[]:c.split(".");for(let p=g.length;p>=0;p--){const S=s.getIn(g.slice(0,p).map(y=>/^\d+$/u.test(y)?Number(y):y),!0)?.range?.[0];if(S!==void 0)return e.linePos(S).line}};if(s.errors.length>0)return{problems:s.errors.map(c=>({path:"",line:e.linePos(c.pos[0]).line,message:`not YAML: ${c.message.split(`
3
- `)[0]??""}`})),lineOf:o};const l=s.toJS()??{},r=A("slides",l);if(r.ok)return{file:r.value,readable:{file:r.value,lineOf:o},problems:[],lineOf:o};const n=[],h=(c,g)=>{const p=o(c);n.push({path:c,...p===void 0?{}:{line:p},message:g})},a=(c,g)=>{h(c,w(g,T(l,c)))},i=typeof l=="object"&&l!==null&&"slides"in l?l.slides:void 0,d=Array.isArray(i)?i:[],u=A("slides",{...l,...Array.isArray(i)?{slides:[]}:{}});if(!u.ok)for(const c of u.problems)a(c.path,c.message);const f=[],k=[],m=new Set;return d.forEach((c,g)=>{const p=A("slides",{slides:[c]});if(!p.ok)for(const y of p.problems)a(y.path.replace(/^slides\.0(?=\.|$)/u,`slides.${String(g)}`),y.message);const v=typeof c=="object"&&c!==null&&"id"in c?c.id:void 0;if(typeof v=="string"){if(m.has(v)){h(`slides.${String(g)}.id`,`Two slides are "${v}".`);return}m.add(v)}const[S]=p.ok?p.value.slides:[];S&&(f.push(S),k.push(g))}),{readable:{file:{slides:f},lineOf:c=>o(c.replace(/^slides\.(\d+)/u,(g,p)=>`slides.${String(k[Number(p)]??p)}`))},problems:n,lineOf:o}}function T(t,e){let s=t;for(const o of e===""?[]:e.split(".")){if(typeof s!="object"||s===null)return;s=s[o]}return s}const w=(t,e)=>typeof e=="string"||typeof e=="number"||typeof e=="boolean"?`${t.replace(/\.$/u,"")} (it is ${JSON.stringify(e)}).`:t,E=`slides: []
4
- `;function C(t){let e=t.get("slides",!0);if(j(e)||(b(t.contents)?t.set("slides",t.createNode([])):t.contents=t.createNode({slides:[]}),e=t.get("slides",!0)),!j(e))throw new Error("The slides file has no slides list.");return e}const N=(t,e)=>t.findIndex(s=>b(s)&&s.get("id")===e),_=["frame","text","fill","line","z","crop","connect"];export function editSlidesFile(t,e){const s=x(t===void 0||t.trim()===""?E:t);if(s.errors.length>0)throw new Error("The slides file is not YAML: it is mended by hand first.");return editSlidesDocument(s,e)?s.toString():t??E}export function editSlidesDocument(t,e){const s=C(t),o=a=>{if(a===null)return 0;const i=a===void 0?-1:N(s.items,a);return i<0?s.items.length:i+1};if(e.op==="add")return N(s.items,e.slide.id)>=0||(s.items.splice(o(e.after),0,t.createNode(e.slide)),s.flow===!0&&(s.flow=!1)),!0;const l=N(s.items,e.slide),r=s.items[l];if(l<0||!b(r))return!1;const n=a=>{let i=r.get("shapes",!0);return!b(i)&&a&&(r.set("shapes",t.createNode({})),i=r.get("shapes",!0)),b(i)?i:void 0},h=a=>{const i=n(!1);if(i){for(const d of a){const u=i.get(d,!0);b(u)&&u.items.length===0&&i.delete(d)}i.items.length===0&&r.delete("shapes")}};switch(e.op){case"move":{if(e.after===e.slide)break;s.items.splice(l,1),s.items.splice(o(e.after),0,r);break}case"duplicate":{const a=r.clone();a.set("id",e.id),a.delete("section"),s.items.splice(l+1,0,a);break}case"remove":s.items.splice(l,1);break;case"layout":r.set("layout",e.layout);break;case"hidden":e.hidden===!1||Array.isArray(e.hidden)&&e.hidden.length===0?r.delete("hidden"):r.set("hidden",t.createNode(e.hidden));break;case"shape":{const a=n(!0);if(!a)break;let i=a.get(e.shape,!0);if(b(i)||(a.set(e.shape,t.createNode({})),i=a.get(e.shape,!0)),!b(i))break;for(const[d,u]of Object.entries(e.set)){const f=d.split(".");if(u===void 0){i.deleteIn(f);const k=f.length>1?i.getIn(f.slice(0,-1),!0):void 0;b(k)&&k.items.length===0&&i.deleteIn(f.slice(0,-1))}else{const k=i.getIn(f,!0),m=t.createNode(u);$(k)&&$(m)&&k.flow===!0&&(m.flow=!0),i.setIn(f,m)}}h([e.shape]);break}case"unplace":{n(!1)?.delete(e.shape),h([]);break}case"show":{if(!e.shown){n(!1)?.delete(e.shape),h([]);break}const a=n(!0);a&&!a.has(e.shape)&&a.set(e.shape,t.createNode({}));break}case"background":e.background===void 0?r.delete("background"):r.set("background",t.createNode(e.background));break;case"animations":e.animations.length===0?r.delete("animations"):r.set("animations",t.createNode(e.animations));break;case"transition":e.transition===void 0?r.delete("transition"):r.set("transition",t.createNode(e.transition));break;case"advance":e.after===void 0?r.delete("advance_after"):r.set("advance_after",e.after);break;case"section":e.section===void 0?r.delete("section"):r.set("section",e.section);break;case"reset":{const a=n(!1);if(!a)break;const i=[];for(const d of a.items){const u=String(b(d.key)?"":d.key.value??d.key);if(e.shape!==void 0&&u!==e.shape)continue;const f=d.value;if(!(!b(f)||["textbox","picture","movie","audio","geometry","component"].some(m=>f.has(m))||!_.some(m=>f.has(m)))){for(const m of _)f.delete(m);i.push(u)}}h(i);break}}return!0}export function freeName(t,e){const s=new Set(t),o=e.replace(/[^A-Za-z0-9_-]+/gu,"-").replace(/^-+|-+$/gu,"")||"slide";if(!s.has(o))return o;for(let l=2;;l++){const r=`${o}-${String(l)}`;if(!s.has(r))return r}}const D=new Set(["text","props","crop"]);function I(t){const e=new Map;for(const[s,o]of Object.entries(t??{}))if(D.has(s)&&typeof o=="object"&&o!==null&&!Array.isArray(o))for(const[l,r]of Object.entries(o))e.set(`${s}.${l}`,r);else e.set(s,o);return e}const F=(t,e)=>new Set(P(t,e).map(([s])=>t[s]??""));function L(t,e){const s=[],o=e.id;e.layout!==void 0&&e.layout!==t.layout&&s.push({op:"layout",slide:o,layout:e.layout}),O(t.hidden,e.hidden)||s.push({op:"hidden",slide:o,hidden:e.hidden??!1}),O(t.animations??[],e.animations??[])||s.push({op:"animations",slide:o,animations:e.animations??[]}),O(t.transition,e.transition)||s.push({op:"transition",slide:o,...e.transition?{transition:e.transition}:{}}),t.advance_after!==e.advance_after&&s.push({op:"advance",slide:o,...e.advance_after===void 0?{}:{after:e.advance_after}}),t.section!==e.section&&s.push({op:"section",slide:o,...e.section===void 0?{}:{section:e.section}}),O(t.background,e.background)||s.push({op:"background",slide:o,...e.background?{background:e.background}:{}});const l=t.shapes??{},r=e.shapes??{};for(const n of Object.keys(l))n in r||s.push({op:"unplace",slide:o,shape:n});for(const[n,h]of Object.entries(r)){const a=I(l[n]),i=I(h),d={};for(const f of new Set([...a.keys(),...i.keys()]))O(a.get(f),i.get(f))||(d[f]=i.get(f));Object.keys(d).length>0&&s.push({op:"shape",slide:o,shape:n,set:d});const u=l[n];Object.keys(h).length===0&&(u===void 0||Object.keys(u).length>0)&&s.push({op:"show",slide:o,shape:n,shown:!0})}return s}export function slidesEdits(t,e){const s=[],o=new Map(t.slides.map(n=>[n.id,n])),l=new Set(e.slides.map(n=>n.id));for(const n of t.slides)l.has(n.id)||s.push({op:"remove",slide:n.id});const r=F(t.slides.map(n=>n.id).filter(n=>l.has(n)),e.slides.map(n=>n.id).filter(n=>o.has(n)));return e.slides.forEach((n,h)=>{const a=h===0?null:e.slides[h-1]?.id??null,i=o.get(n.id);if(!i||i.generate!==n.generate){i&&s.push({op:"remove",slide:n.id}),s.push({op:"add",slide:n,after:a});return}r.has(n.id)||s.push({op:"move",slide:n.id,after:a}),s.push(...L(i,n))}),s}
2
+ import{readDataFileAsWritten as N}from"@allyhub/formats";import{isCollection as x,isMap as b,isSeq as E,LineCounter as P,parseDocument as _}from"yaml";import{commonPairs as T,sameValue as S}from"./values.js";export function readSlidesFile(t){const e=new P,s=_(t,{lineCounter:e}),i=c=>{const m=c===""?[]:c.split(".");for(let u=m.length;u>=0;u--){const k=s.getIn(m.slice(0,u).map(O=>/^\d+$/u.test(O)?Number(O):O),!0)?.range?.[0];if(k!==void 0)return e.linePos(k).line}};if(s.errors.length>0)return{problems:s.errors.map(c=>({path:"",line:e.linePos(c.pos[0]).line,message:`not YAML: ${c.message.split(`
3
+ `)[0]??""}`})),lineOf:i};const l=s.toJS()??{},r=N("slides",l),n=(c,m=u=>u)=>(c.leftOut??[]).map(u=>{const v=m(u.path),k=i(v);return{path:v,...k===void 0?{}:{line:k},message:u.message,level:"warn"}});if(r.ok)return{file:r.value,readable:{file:r.value,lineOf:i},problems:n(r),lineOf:i};const p=[],a=(c,m)=>{const u=i(c);p.push({path:c,...u===void 0?{}:{line:u},message:m})},o=(c,m)=>{a(c,D(m,C(l,c)))},d=typeof l=="object"&&l!==null&&"slides"in l?l.slides:void 0,h=Array.isArray(d)?d:[],f=N("slides",{...l,...Array.isArray(d)?{slides:[]}:{}});if(!f.ok)for(const c of f.problems)o(c.path,c.message);p.push(...n(f));const y=[],g=[],j=new Set;return h.forEach((c,m)=>{const u=N("slides",{slides:[c]}),v=A=>A.replace(/^slides\.0(?=\.|$)/u,`slides.${String(m)}`);if(!u.ok)for(const A of u.problems)o(v(A.path),A.message);p.push(...n(u,v));const k=typeof c=="object"&&c!==null&&"id"in c?c.id:void 0;if(typeof k=="string"){if(j.has(k)){a(`slides.${String(m)}.id`,`Two slides are "${k}".`);return}j.add(k)}const[O]=u.ok?u.value.slides:[];O&&(y.push(O),g.push(m))}),{readable:{file:{slides:y},lineOf:c=>i(c.replace(/^slides\.(\d+)/u,(m,u)=>`slides.${String(g[Number(u)]??u)}`))},problems:p,lineOf:i}}function C(t,e){let s=t;for(const i of e===""?[]:e.split(".")){if(typeof s!="object"||s===null)return;s=s[i]}return s}const D=(t,e)=>typeof e=="string"||typeof e=="number"||typeof e=="boolean"?`${t.replace(/\.$/u,"")} (it is ${JSON.stringify(e)}).`:t,I=`slides: []
4
+ `;function F(t){let e=t.get("slides",!0);if(E(e)||(b(t.contents)?t.set("slides",t.createNode([])):t.contents=t.createNode({slides:[]}),e=t.get("slides",!0)),!E(e))throw new Error("The slides file has no slides list.");return e}const $=(t,e)=>t.findIndex(s=>b(s)&&s.get("id")===e),M=["frame","text","fill","line","z","crop","connect"];export function editSlidesFile(t,e){const s=_(t===void 0||t.trim()===""?I:t);if(s.errors.length>0)throw new Error("The slides file is not YAML: it is mended by hand first.");return editSlidesDocument(s,e)?s.toString():t??I}export function editSlidesDocument(t,e){const s=F(t),i=a=>{if(a===null)return 0;const o=a===void 0?-1:$(s.items,a);return o<0?s.items.length:o+1};if(e.op==="add")return $(s.items,e.slide.id)>=0||(s.items.splice(i(e.after),0,t.createNode(e.slide)),s.flow===!0&&(s.flow=!1)),!0;const l=$(s.items,e.slide),r=s.items[l];if(l<0||!b(r))return!1;const n=a=>{let o=r.get("shapes",!0);return!b(o)&&a&&(r.set("shapes",t.createNode({})),o=r.get("shapes",!0)),b(o)?o:void 0},p=a=>{const o=n(!1);if(o){for(const d of a){const h=o.get(d,!0);b(h)&&h.items.length===0&&o.delete(d)}o.items.length===0&&r.delete("shapes")}};switch(e.op){case"move":{if(e.after===e.slide)break;s.items.splice(l,1),s.items.splice(i(e.after),0,r);break}case"duplicate":{const a=r.clone();a.set("id",e.id),a.delete("section"),s.items.splice(l+1,0,a);break}case"remove":s.items.splice(l,1);break;case"layout":r.set("layout",e.layout);break;case"hidden":e.hidden===!1||Array.isArray(e.hidden)&&e.hidden.length===0?r.delete("hidden"):r.set("hidden",t.createNode(e.hidden));break;case"shape":{const a=n(!0);if(!a)break;let o=a.get(e.shape,!0);if(b(o)||(a.set(e.shape,t.createNode({})),o=a.get(e.shape,!0)),!b(o))break;for(const[d,h]of Object.entries(e.set)){const f=d.split(".");if(h===void 0){o.deleteIn(f);const y=f.length>1?o.getIn(f.slice(0,-1),!0):void 0;b(y)&&y.items.length===0&&o.deleteIn(f.slice(0,-1))}else{const y=o.getIn(f,!0),g=t.createNode(h);x(y)&&x(g)&&y.flow===!0&&(g.flow=!0),o.setIn(f,g)}}p([e.shape]);break}case"unplace":{n(!1)?.delete(e.shape),p([]);break}case"show":{if(!e.shown){n(!1)?.delete(e.shape),p([]);break}const a=n(!0);a&&!a.has(e.shape)&&a.set(e.shape,t.createNode({}));break}case"background":e.background===void 0?r.delete("background"):r.set("background",t.createNode(e.background));break;case"animations":e.animations.length===0?r.delete("animations"):r.set("animations",t.createNode(e.animations));break;case"transition":e.transition===void 0?r.delete("transition"):r.set("transition",t.createNode(e.transition));break;case"advance":e.after===void 0?r.delete("advance_after"):r.set("advance_after",e.after);break;case"section":e.section===void 0?r.delete("section"):r.set("section",e.section);break;case"reset":{const a=n(!1);if(!a)break;const o=[];for(const d of a.items){const h=String(b(d.key)?"":d.key.value??d.key);if(e.shape!==void 0&&h!==e.shape)continue;const f=d.value;if(!(!b(f)||["textbox","picture","movie","audio","geometry","component"].some(g=>f.has(g))||!M.some(g=>f.has(g)))){for(const g of M)f.delete(g);o.push(h)}}p(o);break}}return!0}export function freeName(t,e){const s=new Set(t),i=e.replace(/[^A-Za-z0-9_-]+/gu,"-").replace(/^-+|-+$/gu,"")||"slide";if(!s.has(i))return i;for(let l=2;;l++){const r=`${i}-${String(l)}`;if(!s.has(r))return r}}const L=new Set(["text","props","crop"]);function w(t){const e=new Map;for(const[s,i]of Object.entries(t??{}))if(L.has(s)&&typeof i=="object"&&i!==null&&!Array.isArray(i))for(const[l,r]of Object.entries(i))e.set(`${s}.${l}`,r);else e.set(s,i);return e}const Y=(t,e)=>new Set(T(t,e).map(([s])=>t[s]??""));function z(t,e){const s=[],i=e.id;e.layout!==void 0&&e.layout!==t.layout&&s.push({op:"layout",slide:i,layout:e.layout}),S(t.hidden,e.hidden)||s.push({op:"hidden",slide:i,hidden:e.hidden??!1}),S(t.animations??[],e.animations??[])||s.push({op:"animations",slide:i,animations:e.animations??[]}),S(t.transition,e.transition)||s.push({op:"transition",slide:i,...e.transition?{transition:e.transition}:{}}),t.advance_after!==e.advance_after&&s.push({op:"advance",slide:i,...e.advance_after===void 0?{}:{after:e.advance_after}}),t.section!==e.section&&s.push({op:"section",slide:i,...e.section===void 0?{}:{section:e.section}}),S(t.background,e.background)||s.push({op:"background",slide:i,...e.background?{background:e.background}:{}});const l=t.shapes??{},r=e.shapes??{};for(const n of Object.keys(l))n in r||s.push({op:"unplace",slide:i,shape:n});for(const[n,p]of Object.entries(r)){const a=w(l[n]),o=w(p),d={};for(const f of new Set([...a.keys(),...o.keys()]))S(a.get(f),o.get(f))||(d[f]=o.get(f));Object.keys(d).length>0&&s.push({op:"shape",slide:i,shape:n,set:d});const h=l[n];Object.keys(p).length===0&&(h===void 0||Object.keys(h).length>0)&&s.push({op:"show",slide:i,shape:n,shown:!0})}return s}export function slidesEdits(t,e){const s=[],i=new Map(t.slides.map(n=>[n.id,n])),l=new Set(e.slides.map(n=>n.id));for(const n of t.slides)l.has(n.id)||s.push({op:"remove",slide:n.id});const r=Y(t.slides.map(n=>n.id).filter(n=>l.has(n)),e.slides.map(n=>n.id).filter(n=>i.has(n)));return e.slides.forEach((n,p)=>{const a=p===0?null:e.slides[p-1]?.id??null,o=i.get(n.id);if(!o||o.generate!==n.generate){o&&s.push({op:"remove",slide:n.id}),s.push({op:"add",slide:n,after:a});return}r.has(n.id)||s.push({op:"move",slide:n.id,after:a}),s.push(...z(o,n))}),s}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/slides-core",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {