allyhub 0.20.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.
- package/dist/commands/cloud-tools.js +5 -5
- package/dist/commands/export.js +1 -1
- package/dist/commands/frames.js +8 -8
- package/dist/commands/index.js +1 -1
- package/dist/commands/run.js +2 -0
- package/dist/commands.json +1 -1
- package/dist/help.js +3 -3
- package/dist/main.js +4 -4
- package/dist/node_modules/@allyhub/3d-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/audio/package.json +1 -1
- package/dist/node_modules/@allyhub/blocks/dist/elements.js +1 -1
- package/dist/node_modules/@allyhub/blocks/dist/layout.js +1 -1
- package/dist/node_modules/@allyhub/blocks/dist/palette.js +1 -1
- package/dist/node_modules/@allyhub/blocks/dist/resolve.js +1 -1
- package/dist/node_modules/@allyhub/blocks/package.json +1 -1
- package/dist/node_modules/@allyhub/browser/package.json +1 -1
- package/dist/node_modules/@allyhub/build/dist/migrate.js +1 -1
- package/dist/node_modules/@allyhub/build/dist/prepare.js +3 -3
- package/dist/node_modules/@allyhub/build/dist/project-root.js +1 -1
- package/dist/node_modules/@allyhub/build/dist/work.js +3 -3
- package/dist/node_modules/@allyhub/build/package.json +1 -1
- package/dist/node_modules/@allyhub/canvas-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/canvas-model/package.json +1 -1
- package/dist/node_modules/@allyhub/chart/package.json +1 -1
- package/dist/node_modules/@allyhub/check/package.json +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/call.js +2 -2
- package/dist/node_modules/@allyhub/cloud/dist/client.js +1 -1
- package/dist/node_modules/@allyhub/cloud/package.json +1 -1
- package/dist/node_modules/@allyhub/components/package.json +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/record.js +2 -1
- package/dist/node_modules/@allyhub/dev-server/dist/validate.js +2 -2
- package/dist/node_modules/@allyhub/dev-server/package.json +1 -1
- package/dist/node_modules/@allyhub/diagnostics/package.json +1 -1
- package/dist/node_modules/@allyhub/doc/dist/block-shapes.js +2 -0
- package/dist/node_modules/@allyhub/doc/dist/blocks.js +1 -1
- package/dist/node_modules/@allyhub/doc/dist/docx.js +5 -5
- package/dist/node_modules/@allyhub/doc/dist/shapes.js +2 -2
- package/dist/node_modules/@allyhub/doc/package.json +1 -1
- package/dist/node_modules/@allyhub/doc-extension/dist/cli/import.js +1 -1
- package/dist/node_modules/@allyhub/doc-extension/dist/export.js +1 -1
- package/dist/node_modules/@allyhub/doc-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/doc-print/package.json +1 -1
- package/dist/node_modules/@allyhub/export/package.json +1 -1
- package/dist/node_modules/@allyhub/extension-api/package.json +1 -1
- package/dist/node_modules/@allyhub/extension-host/package.json +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/deck-code.d.ts +3 -3
- package/dist/node_modules/@allyhub/formats/dist/data/page-data.d.ts +9 -1
- package/dist/node_modules/@allyhub/formats/dist/data/page-data.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/sheet.d.ts +151 -151
- package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +173 -173
- package/dist/node_modules/@allyhub/formats/dist/data/work.d.ts +1 -2
- package/dist/node_modules/@allyhub/formats/dist/data/work.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/index.d.ts +1 -1
- package/dist/node_modules/@allyhub/formats/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/layout.d.ts +2 -0
- package/dist/node_modules/@allyhub/formats/dist/layout.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +106 -101
- package/dist/node_modules/@allyhub/formats/dist/schemas.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/tolerant.d.ts +26 -1
- package/dist/node_modules/@allyhub/formats/dist/tolerant.js +1 -1
- package/dist/node_modules/@allyhub/formats/package.json +1 -1
- package/dist/node_modules/@allyhub/html-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/i18n/package.json +1 -1
- package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
- package/dist/node_modules/@allyhub/image-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/image-extension/skills/allyhub/references/images.md +1 -1
- package/dist/node_modules/@allyhub/image-measure/package.json +1 -1
- package/dist/node_modules/@allyhub/image-psd/package.json +1 -1
- package/dist/node_modules/@allyhub/image-render/package.json +1 -1
- package/dist/node_modules/@allyhub/image-runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/image-sdk/package.json +1 -1
- package/dist/node_modules/@allyhub/jobs/package.json +1 -1
- package/dist/node_modules/@allyhub/linkedin-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/linkedin-model/package.json +1 -1
- package/dist/node_modules/@allyhub/linkedin-view/package.json +1 -1
- package/dist/node_modules/@allyhub/linkedin-view/src/style.css +1 -1
- package/dist/node_modules/@allyhub/measure/package.json +1 -1
- package/dist/node_modules/@allyhub/media/package.json +1 -1
- package/dist/node_modules/@allyhub/media-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/model/package.json +1 -1
- package/dist/node_modules/@allyhub/office-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
- package/dist/node_modules/@allyhub/piece/package.json +1 -1
- package/dist/node_modules/@allyhub/project/package.json +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
- package/dist/node_modules/@allyhub/protocol/package.json +1 -1
- package/dist/node_modules/@allyhub/registry/package.json +1 -1
- package/dist/node_modules/@allyhub/render/package.json +1 -1
- package/dist/node_modules/@allyhub/report-extension/LICENSE +241 -0
- package/dist/node_modules/@allyhub/report-extension/dist/build.js +3 -0
- package/dist/node_modules/@allyhub/report-extension/dist/check.js +37 -0
- package/dist/node_modules/@allyhub/report-extension/dist/cli/index.js +4 -0
- package/dist/node_modules/@allyhub/report-extension/dist/export.js +2 -0
- package/dist/node_modules/@allyhub/report-extension/dist/inline.js +58 -0
- package/dist/node_modules/@allyhub/report-extension/dist/page.js +23 -0
- package/dist/node_modules/@allyhub/report-extension/dist/project-tools.js +33 -0
- package/dist/node_modules/@allyhub/report-extension/dist/styles.js +2 -0
- package/dist/node_modules/@allyhub/report-extension/dist/theme.js +2 -0
- package/dist/node_modules/@allyhub/report-extension/dist/tools.js +2 -0
- package/dist/node_modules/@allyhub/report-extension/dist/workspace.js +2 -0
- package/dist/node_modules/@allyhub/report-extension/package.json +185 -0
- package/dist/node_modules/@allyhub/report-extension/styles/allyhub/STYLE.md +180 -0
- package/dist/node_modules/@allyhub/report-extension/styles/allyhub/style.json +15 -0
- package/dist/node_modules/@allyhub/runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
- package/dist/node_modules/@allyhub/scaffold/dist/index.js +8 -8
- package/dist/node_modules/@allyhub/scaffold/package.json +1 -1
- package/dist/node_modules/@allyhub/scenery/package.json +1 -1
- package/dist/node_modules/@allyhub/scenery-host/package.json +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/file.js +2 -2
- package/dist/node_modules/@allyhub/sheet/dist/html.js +10 -10
- package/dist/node_modules/@allyhub/sheet/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/table-style.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/theme.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/tiles.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/tile-shapes.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/write.js +1 -1
- package/dist/node_modules/@allyhub/sheet/package.json +1 -1
- package/dist/node_modules/@allyhub/sheet-extension/dist/build.js +1 -1
- package/dist/node_modules/@allyhub/sheet-extension/dist/cli/sheet.js +1 -1
- package/dist/node_modules/@allyhub/sheet-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/capabilities.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/file.js +3 -3
- package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-extension/dist/build.js +2 -2
- package/dist/node_modules/@allyhub/slides-extension/dist/cli/slides.js +1 -1
- package/dist/node_modules/@allyhub/slides-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/stage/package.json +1 -1
- package/dist/node_modules/@allyhub/stage-page/package.json +1 -1
- package/dist/node_modules/@allyhub/stage-runtime/dist/runtime.js +2 -2
- package/dist/node_modules/@allyhub/stage-runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/telemetry/package.json +1 -1
- package/dist/node_modules/@allyhub/text-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/video-core/package.json +1 -1
- package/dist/node_modules/@allyhub/video-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/video-measure/package.json +1 -1
- package/dist/node_modules/@allyhub/video-sdk/package.json +1 -1
- package/dist/node_modules/@allyhub/website/package.json +1 -1
- package/dist/node_modules/@allyhub/website-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/x-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/x-model/package.json +1 -1
- package/dist/node_modules/@allyhub/x-view/package.json +1 -1
- package/dist/package.json +15 -14
- package/dist/run-register.js +2 -0
- package/dist/works.js +1 -1
- package/editor-web/assets/{abnfDiagram-WEYOIA3C-BkVJMd53.js → abnfDiagram-WEYOIA3C-D6qI3rai.js} +1 -1
- package/editor-web/assets/{architecture-WOLXFQ4H-C6rnaynZ.js → architecture-WOLXFQ4H-B3V6ggq8.js} +1 -1
- package/editor-web/assets/{architectureDiagram-ZHVYKT53-D3vrh8LK.js → architectureDiagram-ZHVYKT53-IauNyxXn.js} +1 -1
- package/editor-web/assets/article-BHjKp5We.js +3 -0
- package/editor-web/assets/article-BlNKv1Cn.js +7 -0
- package/editor-web/assets/bar-button-CJmpgNg4.js +1 -0
- package/editor-web/assets/{blockDiagram-RJAE7QA3-BKngt8H7.js → blockDiagram-RJAE7QA3-yXhlfxbH.js} +1 -1
- package/editor-web/assets/{c4Diagram-XDPPPE54-j7sUELqF.js → c4Diagram-XDPPPE54-B-anrhvt.js} +1 -1
- package/editor-web/assets/{calc-worker-Cr4a0xmt.js → calc-worker-BpAgQE9E.js} +3 -3
- package/editor-web/assets/channel-Bhb-_8v6.js +1 -0
- package/editor-web/assets/chip-pNQlYa2W.js +1 -0
- package/editor-web/assets/{chunk-2E7WHVMD-BXa-uRSi.js → chunk-2E7WHVMD-QPOni4XB.js} +1 -1
- package/editor-web/assets/{chunk-4EMNKR2T-B3ntcsZN.js → chunk-4EMNKR2T-DG1FCRRI.js} +1 -1
- package/editor-web/assets/{chunk-55XCU76K-AMvnFwUg.js → chunk-55XCU76K-mKuMXpnC.js} +1 -1
- package/editor-web/assets/{chunk-7S6XSTFO-BA6esfFu.js → chunk-7S6XSTFO-CgZAazgt.js} +1 -1
- package/editor-web/assets/{chunk-AQDTSKZB-BT_vANXs.js → chunk-AQDTSKZB-BRU84phF.js} +1 -1
- package/editor-web/assets/{chunk-DSNLSHJZ-DoUgmzGB.js → chunk-DSNLSHJZ-zku9oeG3.js} +1 -1
- package/editor-web/assets/{chunk-HAGFOTED-DtnIrCZb.js → chunk-HAGFOTED-CaUkBv_0.js} +1 -1
- package/editor-web/assets/{chunk-HNE4Q36P-BlPwQx3_.js → chunk-HNE4Q36P-BQz4ZCJf.js} +1 -1
- package/editor-web/assets/{chunk-NQOKRVIF-D2r7jp2r.js → chunk-NQOKRVIF-CHVBEDkg.js} +1 -1
- package/editor-web/assets/{chunk-UHW7PFBP-Cmc0_F5o.js → chunk-UHW7PFBP-DrYeJo1e.js} +1 -1
- package/editor-web/assets/{chunk-VQ5W62QI-nJSMqAr0.js → chunk-VQ5W62QI-D8ToVCUe.js} +1 -1
- package/editor-web/assets/{chunk-WQQL4CDK-Btq2nbF6.js → chunk-WQQL4CDK-DZ0tyi9F.js} +1 -1
- package/editor-web/assets/{chunk-YZO67HFG-DTbcCoGt.js → chunk-YZO67HFG-BLe7PXER.js} +1 -1
- package/editor-web/assets/{chunk-ZAUX2LTX-DVwkg-2N.js → chunk-ZAUX2LTX-ByaeSIre.js} +1 -1
- package/editor-web/assets/{chunk-ZCHMQSOR-BV39jOOE.js → chunk-ZCHMQSOR-DdMJr_t5.js} +1 -1
- package/editor-web/assets/{classDiagram-v2-4MYWR3UA-Cj74-fhM.js → classDiagram-v2-4MYWR3UA-DDpq7fFC.js} +1 -1
- package/editor-web/assets/collaborator-CbTacvkB.js +1 -0
- package/editor-web/assets/color-picker-CDeICDN5.js +1 -0
- package/editor-web/assets/{cynefin-EF2NZ3EQ-C0CkiipV.js → cynefin-EF2NZ3EQ-CMivy2fr.js} +1 -1
- package/editor-web/assets/{cynefinDiagram-WF24UDRP-hdsnJ4cI.js → cynefinDiagram-WF24UDRP-GtxT_9wW.js} +1 -1
- package/editor-web/assets/{dagre-NK4GIZVX-CC7WSgaK.js → dagre-NK4GIZVX-Bn1O2Hjl.js} +1 -1
- package/editor-web/assets/deck-Cohd-G5m.js +1 -0
- package/editor-web/assets/{diagram-CBK3MWTC-DmaVm13J.js → diagram-CBK3MWTC-W715PWZw.js} +1 -1
- package/editor-web/assets/{diagram-I5XIIV2D-De8jqp7b.js → diagram-I5XIIV2D-BKObZPn2.js} +1 -1
- package/editor-web/assets/{diagram-ODIL2UCW-B5pBTulX.js → diagram-ODIL2UCW-UtQxEPoW.js} +1 -1
- package/editor-web/assets/{diagram-PFBEJUXE-BYsXg5_w.js → diagram-PFBEJUXE-CpLGEK-k.js} +1 -1
- package/editor-web/assets/{diagram-RJA3I4VV-DZ8f6bYe.js → diagram-RJA3I4VV-DGyMXoHb.js} +1 -1
- package/editor-web/assets/{diagram-TYUNFSNR-qXHUsauD.js → diagram-TYUNFSNR-Dy_Ewr8V.js} +1 -1
- package/editor-web/assets/dist-0I0Obj60.js +19 -0
- package/editor-web/assets/dist-6ugUm4dS.js +6 -0
- package/editor-web/assets/dist-B0rUvCi2.js +1 -0
- package/editor-web/assets/{dist-DAhe-kFC.js → dist-B8_6sJ_V.js} +1 -1
- package/editor-web/assets/dist-CKD_paj_.js +1 -0
- package/editor-web/assets/dist-CKUW5NzS.js +3 -0
- package/editor-web/assets/dist-Ca9Gsuu0.js +24 -0
- package/editor-web/assets/dist-Cc8v9lfc.js +1 -0
- package/editor-web/assets/dist-CynBNzYv.js +1 -0
- package/editor-web/assets/{dist-9kuRjUTN.js → dist-D7M5YTq2.js} +6 -6
- package/editor-web/assets/dist-D9tsFc2N.js +16 -0
- package/editor-web/assets/dist-DNMKDcLg.js +35 -0
- package/editor-web/assets/dist-Doj7_HUI.js +547 -0
- package/editor-web/assets/dist-DptBQzJR.js +1 -0
- package/editor-web/assets/dist-DzKB210A.js +5 -0
- package/editor-web/assets/{dist-B3rd02Cg.js → dist-H9rTuNhb.js} +6 -6
- package/editor-web/assets/{dist-DA72-4WB.js → dist-QLXI7XGS.js} +1 -1
- package/editor-web/assets/dist-RyGsFHE0.js +4 -0
- package/editor-web/assets/dist-oeSWr2LE.js +19 -0
- package/editor-web/assets/dist-wD_hHJ8_.js +19 -0
- package/editor-web/assets/{docx-draw-L54blreB.js → docx-draw-B5cM77hc.js} +1 -1
- package/editor-web/assets/{ebnfDiagram-V4P3TTPT-B7-IfVI-.js → ebnfDiagram-V4P3TTPT-GPYcx6dU.js} +1 -1
- package/editor-web/assets/{elk-QONTBCTQ-Gj_WaeBn.js → elk-QONTBCTQ-Bi0r4UFM.js} +1 -1
- package/editor-web/assets/{erDiagram-KYQIGQAA-BDF6Qoqx.js → erDiagram-KYQIGQAA-DrOSrnci.js} +1 -1
- package/editor-web/assets/esm-jIPnpbBD.js +21 -0
- package/editor-web/assets/{eventmodeling-K75KTNOO-elxVXXEe.js → eventmodeling-K75KTNOO-Dw-MjgUb.js} +1 -1
- package/editor-web/assets/eye-DwfE1USj.js +1 -0
- package/editor-web/assets/flowDiagram-IUGLLWBU-DbZTfPEP.js +1 -0
- package/editor-web/assets/{ganttDiagram-R7GPNTJY-CEogW3jW.js → ganttDiagram-R7GPNTJY-Bwe8cQqi.js} +1 -1
- package/editor-web/assets/{gitGraph-VSP46ZUC-Bh9cRWFa.js → gitGraph-VSP46ZUC-DsAcAKP0.js} +1 -1
- package/editor-web/assets/{gitGraphDiagram-PDYL7XHY-BQAvdM_V.js → gitGraphDiagram-PDYL7XHY-aObRwdru.js} +1 -1
- package/editor-web/assets/hint-F4fIBnVU.js +1 -0
- package/editor-web/assets/index-Cah2zchD.css +2 -0
- package/editor-web/assets/index-D-MNVykg.js +28 -0
- package/editor-web/assets/{info-OHQRW6UA-CdPrqere.js → info-OHQRW6UA-DBPN8JFr.js} +1 -1
- package/editor-web/assets/{infoDiagram-MVDRKAX5-uwIMeP44.js → infoDiagram-MVDRKAX5-Bx26Hq7M.js} +1 -1
- package/editor-web/assets/{ishikawaDiagram-HPEHV2GE-rtfvqK7E.js → ishikawaDiagram-HPEHV2GE-BJ_MCDwA.js} +1 -1
- package/editor-web/assets/{journeyDiagram-BOSHW7O7-mmhfIyVG.js → journeyDiagram-BOSHW7O7-B5g4W2Dx.js} +1 -1
- package/editor-web/assets/{kanban-definition-FNSA4HC5-Fe7jBsi-.js → kanban-definition-FNSA4HC5-U8YNlxN7.js} +1 -1
- package/editor-web/assets/layout-CuWN7_3k.js +1 -0
- package/editor-web/assets/{mermaid-parser.core-BxOSjBH9.js → mermaid-parser.core-DYLQlYDo.js} +3 -3
- package/editor-web/assets/{mermaid.core-BOln9YdH.js → mermaid.core-qNJmZ0b4.js} +4 -4
- package/editor-web/assets/{mindmap-definition-6OY57UG3-M3Q1LOtO.js → mindmap-definition-6OY57UG3-CI5aBWbK.js} +1 -1
- package/editor-web/assets/{packet-JDAUHWVQ-Dbb0TUG6.js → packet-JDAUHWVQ-BBclMGlJ.js} +1 -1
- package/editor-web/assets/palette-DchDLJj6.js +1 -0
- package/editor-web/assets/panes-BShVq38A.js +3 -0
- package/editor-web/assets/{pegDiagram-ECIUJNBX-BZMRpSFC.js → pegDiagram-ECIUJNBX-B3pljPTu.js} +1 -1
- package/editor-web/assets/{pie-XZMESJXO-Ctm9XdKp.js → pie-XZMESJXO-B7WzimHm.js} +1 -1
- package/editor-web/assets/{pieDiagram-GNMPY74T-cGbs5ZTl.js → pieDiagram-GNMPY74T-tM1Da50-.js} +1 -1
- package/editor-web/assets/progress-D1Uv3d1b.js +6 -0
- package/editor-web/assets/{quadrantDiagram-D57K4MC3-BUe_zsxT.js → quadrantDiagram-D57K4MC3-BEq_Shj9.js} +1 -1
- package/editor-web/assets/{radar-ABXABTNO-CCmKtqLs.js → radar-ABXABTNO-v2jJSW5T.js} +1 -1
- package/editor-web/assets/{railroad-I3PHUGI6-k-yhjhjA.js → railroad-I3PHUGI6-6W3Z4F8Y.js} +1 -1
- package/editor-web/assets/{railroad-abnf-LNEFI6M7-B-PvntB3.js → railroad-abnf-LNEFI6M7-DxIN7Zrt.js} +1 -1
- package/editor-web/assets/{railroad-ebnf-DWYD2UWJ-Ds2rua1h.js → railroad-ebnf-DWYD2UWJ-Bb5O7tAx.js} +1 -1
- package/editor-web/assets/{railroad-peg-JR7BVNR7-jNZ2wEp2.js → railroad-peg-JR7BVNR7-i2LjEP5t.js} +1 -1
- package/editor-web/assets/{railroadDiagram-Y72NRBL7-CTqSQ15w.js → railroadDiagram-Y72NRBL7-DhsyVKbG.js} +1 -1
- package/editor-web/assets/{requirementDiagram-EQYSW5RA-CUblhR5M.js → requirementDiagram-EQYSW5RA-Du2k7i1E.js} +1 -1
- package/editor-web/assets/ribbon-tabs-Bxuj_hct.js +1 -0
- package/editor-web/assets/row-DqS4-5b1.js +1 -0
- package/editor-web/assets/{sankeyDiagram-SY24JHO5-nSz6zDX3.js → sankeyDiagram-SY24JHO5-CDnRMu7J.js} +1 -1
- package/editor-web/assets/schemas-CnlOL0u4.js +1 -0
- package/editor-web/assets/{sequenceDiagram-BLEHNHQU-DxTpOYuo.js → sequenceDiagram-BLEHNHQU-BUXBhWYW.js} +1 -1
- package/editor-web/assets/{session-BhClkDyr.js → session--OJYv_B7.js} +1 -1
- package/editor-web/assets/{snapshots-DwGHDN3t.js → snapshots-DYooVfOx.js} +1 -1
- package/editor-web/assets/{stateDiagram-v2-A6IESKWZ-C3e14iHY.js → stateDiagram-v2-A6IESKWZ-Enb8LZUA.js} +1 -1
- package/editor-web/assets/surface-BUoi7cmR.js +1 -0
- package/editor-web/assets/swatch-DCmD1gZl.js +1 -0
- package/editor-web/assets/{swimlanes-B3ENRKFQ-DPPdzNzu.js → swimlanes-B3ENRKFQ-pnpjgTrl.js} +1 -1
- package/editor-web/assets/swimlanesDiagram-AYQRV4AK-B-B2Eoc8.js +8 -0
- package/editor-web/assets/switch-b6GCy_ix.js +1 -0
- package/editor-web/assets/syntax-Bqyhj0dw.js +1 -0
- package/editor-web/assets/tablet-C6oePHEW.js +1 -0
- package/editor-web/assets/textarea-Bu6uPEqT.js +1 -0
- package/editor-web/assets/themes-D_ISkWVz.js +1 -0
- package/editor-web/assets/{timeline-definition-JXYKGLGB-DRTJ1_Er.js → timeline-definition-JXYKGLGB-C4pR18kd.js} +1 -1
- package/editor-web/assets/trash-2-SFReAxVM.js +1 -0
- package/editor-web/assets/{treeView-D4JQ5SDB-BYJ_m-i5.js → treeView-D4JQ5SDB-kzNGeAv6.js} +1 -1
- package/editor-web/assets/{treemap-SAJKECNS-BcU6I6Rg.js → treemap-SAJKECNS-Buhb5wzt.js} +1 -1
- package/editor-web/assets/updating-Cbxw83_O.js +1 -0
- package/editor-web/assets/{usecaseDiagram-WPOLBNNX-YV92pS4o.js → usecaseDiagram-WPOLBNNX-CL-xLQWl.js} +1 -1
- package/editor-web/assets/{vennDiagram-Q3Y3IDCW-oAvfHZtf.js → vennDiagram-Q3Y3IDCW-bwsyCcdK.js} +1 -1
- package/editor-web/assets/{video-SJvDRCJK.js → video-8MxWX9f5.js} +1 -1
- package/editor-web/assets/{wardley-7MLQ67FV-BLNiqxtt.js → wardley-7MLQ67FV-DXsLgedI.js} +1 -1
- package/editor-web/assets/{wardleyDiagram-IVAIDKWA-SppgC6xW.js → wardleyDiagram-IVAIDKWA-Cn0ph953.js} +1 -1
- package/editor-web/assets/{words-BUlNNuH2.js → words-B2jQwWpp.js} +1 -1
- package/editor-web/assets/{words-zMedmPWc.js → words-DgMuEmDO.js} +1 -1
- package/editor-web/assets/workbook-BDWkQ149.js +41 -0
- package/editor-web/assets/x-BAJilkKD.js +41 -0
- package/editor-web/assets/{xychartDiagram-4URNHDU4-BHMn_jwJ.js → xychartDiagram-4URNHDU4-CfXnqGWZ.js} +1 -1
- package/editor-web/index.html +6 -6
- package/package.json +5 -2
- package/editor-web/assets/article-DHf6mOY_.js +0 -7
- package/editor-web/assets/article-Dns1-Xh-.js +0 -3
- package/editor-web/assets/bar-button-CKPfx2AB.js +0 -1
- package/editor-web/assets/channel-CVWSV3su.js +0 -1
- package/editor-web/assets/chip-Bn_9JRRG.js +0 -1
- package/editor-web/assets/collaborator-XiHOxwGM.js +0 -1
- package/editor-web/assets/deck-DQpNIS2p.js +0 -1
- package/editor-web/assets/dist--z0ZHp4T.js +0 -16
- package/editor-web/assets/dist-B5GOGGEe.js +0 -1
- package/editor-web/assets/dist-Bx6q9kCu.js +0 -1
- package/editor-web/assets/dist-C4hHtrJr.js +0 -1
- package/editor-web/assets/dist-CCXJewsi.js +0 -19
- package/editor-web/assets/dist-CfK2BLl8.js +0 -4
- package/editor-web/assets/dist-Cmux3oJ_.js +0 -1
- package/editor-web/assets/dist-Cspf85KV.js +0 -6
- package/editor-web/assets/dist-DOrGo1GD.js +0 -19
- package/editor-web/assets/dist-DjiCHlSu.js +0 -35
- package/editor-web/assets/dist-Do4a40Wn.js +0 -19
- package/editor-web/assets/dist-FKEWS3Co.js +0 -547
- package/editor-web/assets/dist-QKd2i6kG.js +0 -5
- package/editor-web/assets/dist-SGnOfLhx.js +0 -24
- package/editor-web/assets/dist-VmVB7tl4.js +0 -3
- package/editor-web/assets/esm-PQD5Pn8a.js +0 -21
- package/editor-web/assets/flowDiagram-IUGLLWBU-B-25n8zE.js +0 -1
- package/editor-web/assets/hint-CbwoSBMw.js +0 -1
- package/editor-web/assets/index-CXisi0Cj.css +0 -2
- package/editor-web/assets/index-wMlfx8aT.js +0 -28
- package/editor-web/assets/layout-SWqqA0yV.js +0 -1
- package/editor-web/assets/progress-DZQTiRLv.js +0 -6
- package/editor-web/assets/ribbon-DajdQ_Ya.js +0 -1
- package/editor-web/assets/row-Bei9HNEe.js +0 -1
- package/editor-web/assets/schemas-C21MyseF.js +0 -1
- package/editor-web/assets/split-DBAbwPZ5.js +0 -3
- package/editor-web/assets/surface-CIF0Ae0z.js +0 -1
- package/editor-web/assets/swatch-BUzr_XmH.js +0 -1
- package/editor-web/assets/swimlanesDiagram-AYQRV4AK-B8n3zOw_.js +0 -8
- package/editor-web/assets/switch-DrZxoPQS.js +0 -1
- package/editor-web/assets/syntax-emXV4DnN.js +0 -1
- package/editor-web/assets/tabs-BwU2E7bU.js +0 -1
- package/editor-web/assets/textarea-BX_ax3X8.js +0 -1
- package/editor-web/assets/tolerant-DM9s0Mt1.js +0 -1
- package/editor-web/assets/type-CvZ0HZsV.js +0 -41
- package/editor-web/assets/workbook-BZKYx4WB.js +0 -41
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{readFile as
|
|
3
|
-
`)}}))}const
|
|
2
|
+
import{readFile as I}from"node:fs/promises";import{join as D,resolve as L}from"node:path";import{z as s}from"zod";import{callTool as M,loadCatalog as h,resumeJob as H,uploadFiles as T}from"@allyhub/cloud/tools";import{WORK_DIR as U}from"@allyhub/formats/layout";import{EXIT as m}from"@allyhub/protocol/cli";import{CommandError as g,defineCommand as W}from"../command.js";import{optionName as _}from"../args.js";import{requiredMissing as q,toolInput as B,toolOptions as K,exampleArgs as G,fieldLines as C}from"../tool-options.js";import{cloudOf as f,cloudWork as w,placeFrom as z,plural as $}from"./cloud.js";const j=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),X=8e3,p={input:s.string().optional().describe("The input as JSON, or a file of it: the whole of it, or the fields no option gives; an option given beside it wins"),file:s.string().optional().describe("The path of the file it makes, or for a tool that returns data, of its output as JSON (without an extension it takes the result's, or .json); the same call with the same input then keeps it, calling nothing, and while its call works waits for that call; default a folder under .allyhub/work/"),force:s.boolean().default(!1).describe("With --file: call even when the file was made from this input, and replace a file that has no record"),wait:s.boolean().default(!0).describe("Wait for a long tool (an audit, a video model); --no-wait returns its call at once"),resume:s.string().optional().describe("Wait for a call of this tool this computer made (from --no-wait, or a call that stopped waiting), and download its file")},k=(e,a)=>new g("usage",e,{exit:m.usage,...a===void 0?{}:{hint:a}}),P=e=>{const a=e.reduce((n,o)=>o.map((r,i)=>Math.max(n[i]??0,r.length)),[]);return e.map(n=>` ${n.map((o,r)=>r===n.length-1?o:o.padEnd(a[r]??0)).join(" ")}`.trimEnd())};export const wordOf=e=>e.toLowerCase().replace(/[^\p{L}\p{N}]+/gu,"-").replace(/^-|-$/g,"");function Q(e){return W({name:e.id,summary:`${e.title}: ${e.description} Lists the tools, each a command`,input:s.strictObject({fresh:s.boolean().default(!1).describe("Read the catalog from AllyHub again, not the copy kept an hour")}),output:s.looseObject({work:s.string(),tools:s.array(s.looseObject({name:s.string()}))}),examples:[`allyhub ${e.id}`,`allyhub ${e.id} --json`]},(a,n)=>w(async()=>{const r=(await h(f(n),{refresh:a.fresh})).tools.filter(i=>i.work===e.id).sort((i,t)=>i.name.localeCompare(t.name));return{value:{work:e.id,title:e.title,tools:r.map(i=>({name:i.name,title:i.title,...i.shown?{shown:i.shown.name}:{},description:i.description,long:i.long}))},text:[`${e.title} (${$(r.length,"tool")}):`,...P(r.map(i=>[i.name,i.shown?`${i.title} (${i.shown.name} in AllyHub)`:i.title])),"",`Each costs credits when it worked; a failed call is free. allyhub help ${e.id} <tool> shows a tool's options and how its credits are counted.`].join(`
|
|
3
|
+
`)}}))}const F=(e,a)=>a.length>0?["",`${e}:`,...a]:[],V=100;export function readableJson(e,a=""){const n=o=>o===null||typeof o!="object";if(Array.isArray(e)){if(e.length===0)return"[]";if(e.every(n))return`[${e.map(r=>JSON.stringify(r)).join(", ")}]`;const o=`${a} `;return`[
|
|
4
4
|
${e.map(r=>o+readableJson(r,o)).join(`,
|
|
5
5
|
`)}
|
|
6
6
|
${a}]`}if(j(e)){const o=Object.entries(e).filter(([,t])=>t!==void 0);if(o.length===0)return"{}";const r=`{${o.map(([t,l])=>`${JSON.stringify(t)}: ${JSON.stringify(l)}`).join(", ")}}`;if(o.every(([,t])=>n(t))&&r.length<=V)return r;const i=`${a} `;return`{
|
|
7
7
|
${o.map(([t,l])=>`${i}${JSON.stringify(t)}: ${readableJson(l,i)}`).join(`,
|
|
8
8
|
`)}
|
|
9
|
-
${a}}`}return JSON.stringify(e)}function Y(e,a=5,n=160){const o=i=>{const t=i===void 0?"undefined":JSON.stringify(i);return t.length>n?`${t.slice(0,n-1)}…`:t},r=(i,t)=>[`${i?`${i}: `:""}${$(t.length,"item")}${t.length>a?`, the first ${String(a)}:`:":"}`,...t.slice(0,a).map((l,c)=>` [${String(c)}] ${o(l)}`)];return Array.isArray(e)?r("",e):typeof e!="object"||e===null?[o(e)]:Object.entries(e).flatMap(([i,t])=>Array.isArray(t)?r(i,t):[`${i}: ${o(t)}`])}function
|
|
9
|
+
${a}}`}return JSON.stringify(e)}function Y(e,a=5,n=160){const o=i=>{const t=i===void 0?"undefined":JSON.stringify(i);return t.length>n?`${t.slice(0,n-1)}…`:t},r=(i,t)=>[`${i?`${i}: `:""}${$(t.length,"item")}${t.length>a?`, the first ${String(a)}:`:":"}`,...t.slice(0,a).map((l,c)=>` [${String(c)}] ${o(l)}`)];return Array.isArray(e)?r("",e):typeof e!="object"||e===null?[o(e)]:Object.entries(e).flatMap(([i,t])=>Array.isArray(t)?r(i,t):[`${i}: ${o(t)}`])}function R(e,a){if("jobId"in e)return[`${e.tool} is still working (call ${e.jobId}).`,`Wait for it: allyhub ${a} --resume ${e.jobId}${e.file===void 0?"":" (or the same command again: it waits for this call)"}`].join(`
|
|
10
10
|
`);if(e.kept)return[`Kept ${e.file??""}: ${e.tool} made it from this same input on ${e.kept.at} (${e.gen??""}).`,"Nothing was called or charged. --force makes it again."].join(`
|
|
11
11
|
`);const n=readableJson(e.output),o=n.length<=X;return[o?n:[`Output: ${String(Math.round(Buffer.byteLength(n)/1024))} KB of JSON, in short:`,...Y(e.output)].join(`
|
|
12
|
-
`),...!o&&e.outputFile&&e.outputFile!==e.file?[`Whole output: ${e.outputFile}`]:[],...e.file?[`File: ${e.file}${e.replaced?" (replaced: it was made from another input)":""}`]:[],...e.more?Object.entries(e.more).map(([r,i])=>`Also: ${i} (${r} in the output)`):[],...e.words?[`Words: ${e.words} (when each word is said: a part can say a stretch of the file)`]:[],...e.gen?[`Record: ${e.gen} (move it with the file)`]:[],`Credits used: ${e.credits===void 0?"not reported":String(e.credits)}`].join(`
|
|
13
|
-
`)}const Z=e=>{const a=Math.max(0,Math.round(e));return`${String(Math.floor(a/60))}:${String(a%60).padStart(2,"0")}`};async function ee(e,a){const n=e.trim().startsWith("{"),o=n?e:await L(
|
|
12
|
+
`),...!o&&e.outputFile&&e.outputFile!==e.file?[`Whole output: ${e.outputFile}`]:[],...e.file?[`File: ${e.file}${e.replaced?" (replaced: it was made from another input)":""}`]:[],...e.more?Object.entries(e.more).map(([r,i])=>`Also: ${i} (${r} in the output)`):[],...e.words?[`Words: ${e.words} (when each word is said: a part can say a stretch of the file)`]:[],...e.gen?[`Record: ${e.gen} (move it with the file)`]:[],`Credits used: ${e.credits===void 0?"not reported":String(e.credits)}${e.creditsLeft===void 0?"":` · Credits left: ${String(e.creditsLeft)}`}`].join(`
|
|
13
|
+
`)}const Z=e=>{const a=Math.max(0,Math.round(e));return`${String(Math.floor(a/60))}:${String(a%60).padStart(2,"0")}`};async function ee(e,a){const n=e.trim().startsWith("{"),o=n?e:await I(L(a.cwd,e),"utf8").catch(i=>{throw new g("not-found",`--input: cannot read ${e}: ${i.message}`,{exit:m.notFound,hint:"Give a JSON object, or a file of one."})});let r;try{r=JSON.parse(o)}catch{r=void 0}if(!j(r))throw k(`--input: ${n?"the text":e} is not a JSON object.`,`Give '{"field": …}', or a file of it.`);return r}export function toolCommand(e){const a=`${e.work} ${e.name}`,n=K(e.input,Object.keys(p)),o=s.strictObject({...n.shape,...p,input:p.input.describe(n.inputOnly.length?`${p.input.description??""}. Fields only it gives: ${n.inputOnly.join(", ")}`:p.input.description??"")}),r=new Set(n.fields.values()),i=Object.keys(j(e.input.properties)?e.input.properties:{}).filter(l=>!r.has(l)),t=[...n.fields].filter(([,l])=>n.required.includes(l)).map(([l,c])=>`--${_(l)} <${c}>`);return{spec:{name:a,summary:e.description,input:o,output:s.looseObject({tool:s.string(),output:s.record(s.string(),s.unknown()).optional(),outputFile:s.string().optional(),credits:s.number().optional(),creditsLeft:s.number().optional(),file:s.string().optional(),gen:s.string().optional(),more:s.record(s.string(),s.string()).optional(),words:s.string().optional(),jobId:s.string().optional()}),examples:[`allyhub ${[a,...e.example?G(n,e.example):t].join(" ")}`]},about:{lines:[e.title,...e.shown?[wordOf(e.shown.name)===e.name?`Shown to people in AllyHub as "${e.shown.name}".`:`Shown to people in AllyHub as "${e.shown.name}": allyhub ${e.work} ${wordOf(e.shown.name)} finds it too.`]:[],"","A call is charged once, when it worked, as the description says; a failed call is free.",...e.long?["A long tool: the command waits for it (--no-wait returns its call, --resume waits again)."]:[],...F("In --input",C(e.input,{only:i,required:!0})),...F("Output",C(e.output,{depth:3}))],value:{work:e.work,title:e.title,...e.shown?{shown:e.shown.name}:{},long:e.long,inputSchema:e.input,outputSchema:e.output}},run:(l,c)=>w(async()=>{const u=l,b=l,O=f(c),S=await z(c),y=B(n,b,u.input===void 0?{}:await ee(u.input,c));let A=0;const N={base:S,signal:c.signal,onRunning:d=>{Date.now()-A<3e4||(A=Date.now(),c.progress(`${e.name}: working · ${Z((Date.now()-Date.parse(d.createdAt))/1e3)} (call ${d.id})`))},onRetry:(d,v,E)=>{c.progress(`${e.name}: ${v.message}; reading call ${d} again in ${String(E)} s`)}};if(u.resume!==void 0){if(Object.keys(y).length>0||u.file!==void 0)throw k("--resume waits for a call as it was made: give it no input or --file.");const d=await H(O,u.resume,{...N,tool:e.name});return{value:{...d},text:R(d,a)}}const J=q(n,y);if(J.length>0)throw k(`${e.name} needs ${J.join(", ")}.`,`allyhub help ${a} shows its options.`);const x=await M(O,e.name,y,{...N,outDir:D(S,U,e.work,e.name),...u.file===void 0?{}:{file:L(c.cwd,u.file)},force:u.force,wait:u.wait});return{value:{...x},text:R(x,a)}})}}export const CLOUD_SOURCE={entries:[{name:"<work>",summary:"List a work's cloud tools (AllyHub's catalog), a line each; allyhub help lists the works"},{name:"<work> <tool>",summary:"Run a cloud tool with the account's credits, its input as options (allyhub help <work> <tool>, which says how its credits are counted)"}],async nouns(e){return(await h(f(e))).works.map(n=>({name:n.id,summary:`${n.title}: ${n.description}`}))},resolve:(e,a)=>w(async()=>{const[n,o]=e;if(n===void 0||n.startsWith("-"))return;let r;const i=(u,b)=>(r=u,b);let t=await h(f(a)).catch(i),l=t?.works.find(u=>u.id===n);if(l||(t=await h(f(a),{refresh:!0}).catch(u=>i(u,t)),l=t?.works.find(u=>u.id===n)),!t)throw new g("catalog-unreachable",`"${n}" is none of allyhub's own commands, and its cloud tools could not be read: ${r instanceof Error?r.message:String(r)}.`,{exit:m.failed,hint:"They need the network: run allyhub outside a sandbox that blocks it."});if(!l)return;if(o===void 0||o.startsWith("-"))return{command:Q(l),rest:e.slice(1),list:!0};const c=t.tools.find(u=>u.name===o)??t.tools.find(u=>u.work===l.id&&u.shown!==void 0&&wordOf(u.shown.name)===wordOf(o));if(c?.work!==l.id)throw new g("unknown-tool",c?`${o} is not a ${l.id} tool: it is in allyhub ${c.work}.`:`No ${l.id} tool ${o}.`,{exit:m.notFound,hint:c?`allyhub ${c.work} ${o}`:`allyhub ${l.id} lists its tools.`});return{command:toolCommand(c),rest:e.slice(2),list:!1}})},upload=W({name:"upload",summary:"Upload files from this computer for a cloud tool whose input takes a URL (a presenter photo, speech audio, a reference clip), and print a signed URL for each, which works for 24 hours",input:s.strictObject({files:s.array(s.string()).min(1).describe("The files: images (.jpg, .png, .webp, .gif), sound (.mp3, .wav, .m4a, .aac, .ogg, .flac) or video (.mp4, .mov, .webm), 50 MB at most")}),positional:["files"],output:s.looseObject({files:s.array(s.looseObject({file:s.string(),ok:s.boolean(),url:s.string().optional()}))}),examples:["allyhub upload assets/media/presenter.jpg"]},(e,a)=>w(async()=>{const n=await T(f(a),e.files,{base:a.cwd}),o=n.filter(t=>!t.ok),r=n.map(t=>t.ok?`${t.file}
|
|
14
14
|
${t.url}${t.expiresAt===void 0?"":` (works until ${t.expiresAt})`}`:`${t.file}
|
|
15
15
|
failed: ${t.error.message}${t.error.hint?` ${t.error.hint}`:""}`);n.length>1&&r.push(o.length===0?`${$(n.length,"file")} uploaded.`:`${String(n.length-o.length)} of ${$(n.length,"file")} uploaded; ${String(o.length)} failed.`);const i=o[0];return{value:{files:n.map(t=>t.ok?{...t}:{file:t.file,ok:!1,error:{code:t.error.code,message:t.error.message,...t.error.hint?{hint:t.error.hint}:{}}})},text:r.join(`
|
|
16
16
|
`),...i?{exit:i.error.exit,code:i.error.code}:{}}}));
|
package/dist/commands/export.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{join as y,resolve as w}from"node:path";import{z as e}from"zod";import{formatConsole as v,formatProblem as k}from"../text/index.js";import{exportProject as P}from"@allyhub/export";import{GIF_ENCODE as p,SHARE_ENCODE as n}from"@allyhub/render/encode";import{consoleJson as m}from"@allyhub/project";import{OUT_DIR as A}from"@allyhub/formats";import{EXIT as c}from"@allyhub/protocol";import{madeNotes as j}from"@allyhub/build";import{defineCommand as $}from"../command.js";import{parameters as
|
|
2
|
+
import{join as y,resolve as w}from"node:path";import{z as e}from"zod";import{formatConsole as v,formatProblem as k}from"../text/index.js";import{exportProject as P}from"@allyhub/export";import{GIF_ENCODE as p,SHARE_ENCODE as n}from"@allyhub/render/encode";import{consoleJson as m}from"@allyhub/project";import{OUT_DIR as A}from"@allyhub/formats";import{EXIT as c}from"@allyhub/protocol";import{madeNotes as j}from"@allyhub/build";import{defineCommand as $}from"../command.js";import{parameters as D}from"../parameters.js";import{projectRoot as F}from"../project.js";import{combosOf as O,commandError as S}from"../version.js";import{dir as T,indexing as C}from"../fields.js";import{extensionsAt as h,kindsAt as E}from"./extensions.js";const N={codec:e.enum(["h264","h265"]).default("h264").describe("The mp4's video codec; h265 is smaller"),crf:e.number().int().min(0).max(63).optional().describe(`Constant rate factor, lower keeping more detail in a larger file: default ${String(n.crf)} for an mp4, 30 for a webm`),maxBitrate:e.number().int().min(0).max(5e5).optional().describe(`An mp4's most video bitrate, kbit/s, 0 for none: default ${String(n.maxKbps)} at 1080p ${String(n.fps)} fps, scaled by the frame's pixels and the frames a second (16000 at 1080p 60, 32000 at 4K 30)`),audioBitrate:e.number().int().min(32).max(512).optional().describe("The sound's bitrate, kbit/s: default 192 (AAC in an mp4), 160 (Opus in a webm); a mov keeps PCM"),gifWidth:e.number().int().min(0).max(16384).optional().describe(`A gif's width in pixels, its height in proportion, up to the video's: default ${String(p.width)}; 0 for the video's own`),gifFps:e.number().min(0).max(120).optional().describe(`A gif's frames a second, up to the video's: default ${String(p.fps)}; 0 for the video's own`),steps:e.boolean().default(!1).describe("A deck's pdf, png and pptx: a page, a file or a slide per step of each page (default each page's last step)"),values:e.enum(["data","shown"]).optional().describe("A sheet's csv, json and md: each value as data (a date 2026-01-15, a time 09:30, a duration 36:00, a number to 15 digits; csv's and json's default) or as its format shows it (15 Jan 2026, $1,200.00; md's default)"),bom:e.boolean().default(!0).describe("A sheet's csv starts with a UTF-8 byte-order mark, by which Excel reads its letters right (é, €, 中文); false for a tool that reads plain UTF-8"),quality:e.number().int().min(0).max(100).optional().describe("An image's jpeg and webp, 0–100: default 90 for a jpeg, a webp lossless"),scale:e.number().min(.25).max(4).optional().describe("An image's png, jpeg, webp and zip: each board's picture this many times its size, its layout kept (type and shapes drawn sharp, a picture as many pixels as its file has); default 1"),width:e.number().int().min(1).optional().describe("An image's pictures each this many pixels wide, the height in proportion: a scale for each board"),height:e.number().int().min(1).optional().describe("An image's pictures each this many pixels high, the width in proportion: a scale for each board"),maxKb:e.number().min(1).optional().describe("An image's jpeg and webp: each board's file at most this many KB, at the best quality under it (said); a png is made when it fits under it"),psd:e.enum(["psd","psb"]).default("psd").describe("An image's psd: psd, or psb (Photoshop's large document format); a board is at most 16384 pixels a side, which a psd holds. Each layer a Photoshop layer by its key: a picture a pixel layer, a text layer a type layer Photoshop redraws on opening, a shape a shape layer, a fill a fill layer, an adjustment an adjustment layer, a component a smart object of its pixels, a group a group; Photoshop draws blends, masks, effects and text by its own formulas"),since:e.string().optional().describe("A doc's docx: what changed since this file (another doc's .mdx, or the Word file it came from, from the project's root) written as Word's revisions, Track Changes, as Word's Compare Documents sets them: words put in and taken out, whole blocks put in or taken out"),changes:e.boolean().default(!1).describe("A doc's docx: what changed since the Word file allyhub doc import kept beside it (<name>.original.docx), as --since does; the editor's Download offers it"),author:e.string().optional().describe("Whose revisions --since writes, as Word names them: default AllyHub"),alike:e.number().min(0).max(1).optional().describe("With --since: the share of their words two blocks of a type must share to be compared word by word, 0–1, default 0.4; under it the one is taken out and the other put in"),pptx:e.enum(["native","picture"]).default("native").describe("A deck's pptx: native, PowerPoint's own model, editable there (the deck's masters, layouts, placeholders, shapes, text, pictures, videos and notes, a component as its picture); or picture, each slide a picture of the page")},W=(s,o)=>`${String(s)} ${o}${s===1?"":"s"}`;export const exportFiles=$({name:"export",summary:"The files: a video, its frames, subtitles, cover and mastered mix; a batch's table of ads; a deck's PDF, PPTX and PNGs; a doc's PDF, Word document and PNGs; a report's PDF, picture and one HTML file; a sheet's Excel workbook with live formulas, PDF, PNG, CSV, Markdown and JSON; an image's pictures, PDF and layered PSDs; a 3D model's GLB",input:e.strictObject({items:e.array(e.string()).optional().describe("Only these items: each an id (its file without its extension) or its file, or a folder of items; default every one"),combo:e.array(e.string()).optional().describe("Only the combos matching name=value pairs joined with commas (lang=zh-cn,hook=b), or a combo's id (c03)"),type:e.array(e.string()).optional().describe("File types: mp4, mov, webm, gif, png, srt, vtt (cues cut as the piece's captions layer cuts them, else by default), cover, wav (the mix, mastered as the export masters it: 48 kHz, 16 bits, the film's length); csv for a piece with slots, its table of ads (<piece>.ads.csv: a row per ad with its combo, picks, length, file, name and generated media); a doc's pdf, docx, png; a sheet's xlsx (every sheet, formulas live with their values cached), pdf, png, csv (a file a sheet); an image's png, jpeg, webp (a file a board), pdf, zip and psd (a layered Photoshop file a board: each layer of its kind, its pixels drawn by Chrome); a deck's pdf, png, pptx; a LinkedIn or X post's linkedin-post or x-post (its API request, its media beside), txt (its text as written, its media and their alt text beside), png; an article's linkedin-article or x-article, png; a 3D model's glb. Default mp4 for a video, pdf for a deck and a doc, xlsx for a sheet, png for an image, glb for a model; each item makes the types it has"),out:e.string().optional().describe("The folder the files go in; default .allyhub/out"),name:e.string().optional().describe("Name a video's or deck's files <name>.<ext> in its folder of the output, with what tells its versions apart before the extension when there are several (<name>.zh-cn.mp4, <name>.c03.mp4); default <output>.<combo>.<ext>"),params:D(N),dir:T}),positional:["items"],output:e.looseObject({out:e.string(),files:e.array(e.looseObject({name:e.string(),path:e.string(),type:e.string()})),failed:e.array(e.looseObject({name:e.string(),code:e.string()}))}),examples:["allyhub export","allyhub export launch/film --type mp4,srt","allyhub export launch/film --type wav","allyhub export ads/tidyform --type csv","allyhub export launch/plan --type pdf,docx","allyhub export legal/contract --type docx --param since=legal/contract.original.mdx --param author=Legal","allyhub export finance/budget --type xlsx,pdf","allyhub export finance/budget --type csv --param bom=false","allyhub export launch/deck --type pptx --param pptx=picture","allyhub export launch/poster --type psd","allyhub export launch/poster --type jpeg --param scale=2 --param max-kb=2000","allyhub export --combo lang=zh-cn --param crf=16","allyhub export launch/film --name launch-film --param max-bitrate=0"]},async(s,o)=>{const r=await F(o.cwd,s.dir),f=w(o.cwd,s.out??y(r,A)),u=Object.fromEntries(Object.entries(s.params).filter(([,a])=>a!==void 0));let l=0,t;try{t=await P({root:r,kinds:E(r),out:f,...s.items===void 0?{}:{items:s.items},combos:O(s),...s.type===void 0?{}:{types:s.type},...s.name===void 0?{}:{name:s.name},params:u,index:C(o.env),analyses:h(r).mediaAnalyses(),env:o.env,processors:h(r).exportProcessors(),log:a=>{o.progress(a)},onProgress:a=>{const i=Math.floor(a*10);i<=l||i>=10||(l=i,o.progress(`${String(i*10)}%`))},signal:o.signal})}catch(a){throw S(a)}const b=a=>a?` (${a.integrated.toFixed(1)} LUFS, true peak ${a.truePeak===void 0?"–":a.truePeak.toFixed(1)} dBTP)`:"",g=t.problems.filter(a=>a.level==="error"),d=t.files.flatMap(a=>a.files.length>1?a.files.map(i=>` ${i}`):[` ${a.path}${b(a.loudness)}`]),x=[`${W(d.length,"file")} in ${t.out}:`,...d,...t.failed.length>0?["Not made:",...t.failed.map(a=>` ${a.name}: ${a.message}${a.hint?` ${a.hint}`:""}`)]:[],...t.unindexed.map(a=>`Not indexed, drawn the fallback way: ${a.file} (${a.error})`),...j(t.files),...g.map(k),...v(m(t.console))];return{value:{out:t.out,files:t.files.map(a=>({...a})),failed:t.failed.map(a=>({...a})),problems:t.problems,...t.unindexed.length>0?{unindexed:t.unindexed}:{},...m(t.console)},text:x.join(`
|
|
3
3
|
`),exit:t.failed.length>0?c.failed:c.ok}});
|
package/dist/commands/frames.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{relative as G,sep as N}from"node:path";import{z as t}from"zod";import{formatConsole as R,formatProblem as
|
|
3
|
-
`)}}if(e.grid!==void 0)throw g("bad-option","--grid draws a video file's frame at its own size: give the file.");const d=await S(a,e.dir);if(e.item!==void 0&&await L(d,a,e.item)!==void 0){const{sheetPicture:i}=await import("./frames/sheet.js"),
|
|
4
|
-
`)}}const u=e.item===void 0?void 0:await K(d,a,e.item);if(u!==void 0){Z(e);const{docPicture:i}=await import("./frames/doc.js"),
|
|
5
|
-
`)}}if(e.page!==void 0)throw g("bad-option","--page is a doc's: name the doc.");if(e.range!==void 0)throw g("bad-option","--range is a sheet's: name the sheet.");const c=e.at!==void 0||e.part!==void 0||e.from!==void 0||e.to!==void 0;if(!c&&(e.clip!==void 0||e.beside!==void 0))throw g("bad-option","--clip and --beside draw moments: give --at, --part, or --from and --to.");const{pieceMoments:l,stillsSheet:y}=await import("./frames/piece.js");if(!c&&!e.overlay){const{result:i,...
|
|
6
|
-
`)}}const b=!c&&e.overlay,{result:
|
|
7
|
-
`)}}),framesCuts=v({name:"frames cuts",summary:"A review sheet per cut of a video (a cut take's jumps, part joins, a scenery camera's cuts): frames around it, waveform and level, the words each side, the sound at it",input:t.strictObject({...O,part:t.string().optional().describe("Only this part's cuts and its joins"),out:t.string().optional().describe("The folder the sheets go in; default .allyhub/work/cuts/"),params:z({span:t.number().positive().max(10).default(J.span).describe("Seconds shown on each side of a cut")})}),positional:["item"],output:t.looseObject({out:t.string(),cuts:t.array(t.looseObject({sheet:t.string()}))}),examples:["allyhub frames cuts launch/film","allyhub frames cuts launch/film --part hook"]},async(e,n)=>{const a=n.cwd,d=await S(a,e.dir),{cutSheets:u}=await import("./frames/cuts.js"),{result:c,...l}=await x(e,n,"render",
|
|
8
|
-
`)}});const _=
|
|
9
|
-
`)}}),framesWeb=v({name:"frames web",summary:"A web page's screenshot with its named elements' boxes in the image's pixels, for a screen demo",input:t.strictObject({url:t.string().describe("The page: an address, or an HTML file on this computer"),el:t.array(t.string()).optional().describe("An element to locate, name=selector (CSS, or text=<words>); [data-el] elements are found too"),click:t.array(t.string()).optional().describe("Selectors clicked in order before the shot (close a banner, open a dialog)"),full:t.boolean().default(!1).describe("The whole page, not one viewport"),out:t.string().optional().describe("Where the picture goes (a WebP), its boxes in <out>.elements.json beside it; default under .allyhub/work/pages/"),dir:P,size:t.string().default(`${String(F.width)}x${String(F.height)}`).describe("The viewport, WIDTHxHEIGHT in CSS pixels"),scale:t.number().min(1).max(4).default(F.scale).describe("Image pixels per CSS pixel; 2 draws a high-density screen, sharp when a camera goes in"),wait:t.number().int().min(0).optional().describe("Milliseconds to wait after loading and clicking")}),positional:["url"],output:t.looseObject({out:t.string(),elementsFile:t.string()}),examples:["allyhub frames web https://example.com --el cta=text=Sign\\ up --scale 2 --out assets/media/home","allyhub frames web page.html --click '#accept' --full"]},async(e,n)=>{const a=n.cwd,[d,u]=
|
|
2
|
+
import{relative as G,sep as N}from"node:path";import{z as t}from"zod";import{formatConsole as R,formatProblem as U}from"../text/index.js";import{sizeOf as B}from"@allyhub/build";import{COMPARE_DEFAULTS as H}from"@allyhub/measure";import{CUT_REVIEW_DEFAULTS as J,cutLine as V,dbText as A,silenceText as q}from"@allyhub/video-measure/cut-sheet";import{consoleJson as C}from"@allyhub/project";import{PAGE_CAPTURE_DEFAULTS as F}from"@allyhub/browser";import{itemIdOf as X}from"@allyhub/formats";import{EXIT as D}from"@allyhub/protocol";import{defineCommand as v}from"../command.js";import{dir as P}from"../fields.js";import{parameters as z}from"../parameters.js";import{tellPresence as W}from"../presence.js";import{projectRoot as S}from"../project.js";import{VERSION_FIELDS as O,commandError as M,withVersion as x}from"../version.js";import{isPicture as T,isVideo as I,usage as g}from"./frames/common.js";import{findDoc as K}from"@allyhub/doc-extension/cli";import{findSheet as L}from"@allyhub/sheet-extension/cli";function j(e){return[...e.problems.filter(a=>a.level==="error").map(U),...R(C(e.console))]}const k=e=>({problems:e.problems,...C(e.console)}),E=(e,n)=>S(e,n),Q=t.strictObject({...O,item:t.string().optional().describe("The piece (its id, its file without its extension, or its file; default the project's only one), a sheet, a doc, or a video file: a path ending in .mp4, .mov, .webm, .m4v, .qt, .mkv or .avi is a file"),range:t.string().optional().describe("A sheet's: what to draw, a sheet (Summary), a range (Summary!B3:D9, or B3:D9 on the first sheet), columns (A:C) or rows (1:20); default every sheet, a picture each, from A1"),page:t.string().optional().describe("A doc's: the pages to draw large, counted from 1 (2, 2-4, 1,5); default every page, small, tiled"),at:t.array(t.string()).optional().describe("Moments: seconds (from the start of --part when given) or anchors (@press, @/map a stretch's end, @press+0.2); a video file's are seconds. One is written as the frame itself, several are tiled four to a picture. Without it, --part's still, or every part's still, four to a picture."),part:t.string().optional().describe("A part by its key (a deck's slide, an image's board): the one --at, --from and --to count from; alone, its still at its own size. A cover's key (video({ covers })): the cover"),from:t.number().optional().describe("A stretch of consecutive frames from this second (with --to), instead of --at"),to:t.number().optional().describe("The stretch's last second"),clip:t.string().optional().describe("Write the stretch as a small silent video, .gif, .mp4 or .webm by its extension; with --out, the grid too"),overlay:t.boolean().default(!1).describe("Draw over each tile the face boxes with ids, the person matte's outline, the covered areas and the text boxes (a deck's: each shape's box and name, and the lines nearly in line); places nothing. Alone, over every part's still"),beside:t.string().optional().describe("Another video file (a reference) whose frame at the same time goes on each tile's left"),grid:t.number().int().min(4).optional().describe("A video file at one --at: the frame at its own size with numbered lines every this many pixels"),out:t.string().optional().describe("Where the picture goes, always a WebP whatever the extension; default under .allyhub/work/frames/")});function Y(e){const n=[["--combo",e.combo!==void 0],["--part",e.part!==void 0],["--beside",e.beside!==void 0],["--overlay",e.overlay]].filter(([,a])=>a).map(([a])=>a);if(n.length>0)throw g("bad-option",`${n.join(" and ")} ${n.length===1?"is":"are"} a piece's: a video file has no combos or parts.`)}function Z(e){const n=[["--at",e.at!==void 0],["--part",e.part!==void 0],["--from",e.from!==void 0],["--to",e.to!==void 0],["--clip",e.clip!==void 0],["--overlay",e.overlay],["--beside",e.beside!==void 0],["--range",e.range!==void 0],["--combo",e.combo!==void 0]].filter(([,a])=>a).map(([a])=>a);if(n.length>0)throw g("bad-option",`${n.join(" and ")} ${n.length===1?"is":"are"} not a doc's: a doc has pages (--page), not moments.`)}export const frames=v({name:"frames",summary:"Pictures of a piece over time, drawn as its exported files are: every part's still on a sheet (default), a moment, a stretch tiled or as a clip, overlays; a sheet's cells, or a range of them; a doc's pages as they print, with how many; or any video file's frames. Sheet and doc do not need frames to check. Use it only when the person asks",input:Q,positional:["item"],output:t.looseObject({mode:t.enum(["sheet","frame","grid","clip","cover"])}),examples:["allyhub frames launch/film","allyhub frames launch/film --at 2.5","allyhub frames launch/film --part hook --from 0 --to 1 --clip hook.gif","allyhub frames launch/film --at 1,2,3 --overlay","allyhub frames reference.mp4 --at 0,1,2","allyhub frames reference.mp4 --at 3 --grid 50","allyhub frames finance/budget --range 'Summary!A1:F20'","allyhub frames launch/plan","allyhub frames launch/plan --page 2-3","allyhub frames research/channels/channels"]},async(e,n)=>{const a=n.cwd;if(e.item!==void 0&&I(e.item)){Y(e);const{fileFrames:i}=await import("./frames/file.js"),r=await i({cwd:a,root:await E(a,e.dir),file:e.item,at:e.at,from:e.from,to:e.to,clip:e.clip,out:e.out,grid:e.grid}).catch(h=>{throw M(h)}),s=r.video,f=`${r.file} · ${s.duration.toFixed(2)} s · ${String(s.width)}×${String(s.height)} · ${String(s.fps)} fps`,m="clip"in r&&r.clip?`${r.clip.out} (${r.clip.type}, ${String(r.clip.frames)} frames at ${String(r.clip.fps)} fps, no sound)`:void 0;return{value:r,text:[f,..."out"in r?[`${r.out}${"tiles"in r?` (${String(r.tiles.length)} moments in ${String(r.cols)} columns)`:""}`]:[],...m?[m]:[]].join(`
|
|
3
|
+
`)}}if(e.grid!==void 0)throw g("bad-option","--grid draws a video file's frame at its own size: give the file.");const d=await S(a,e.dir);if(e.item!==void 0&&await L(d,a,e.item)!==void 0){const{sheetPicture:i}=await import("./frames/sheet.js"),r=await i({cwd:a,root:d,item:e.item,range:e.range,out:e.out}),s=await L(d,a,e.item);return s!==void 0&&Object.keys(r.at).length>0&&await W(d,{doing:"looking",item:X(G(d,s).split(N).join("/")),place:r.at}),{value:r,text:[...r.outs,...r.cut].join(`
|
|
4
|
+
`)}}const u=e.item===void 0?void 0:await K(d,a,e.item);if(u!==void 0){Z(e);const{docPicture:i}=await import("./frames/doc.js"),r=await i({cwd:a,root:d,file:u,page:e.page,out:e.out,progress:f=>{n.progress(f)}}),s=r.drawn.length===r.pages?"every page":`page${r.drawn.length===1?"":"s"} ${r.drawn.join(", ")}`;return{value:r,text:[r.out,`${r.doc}: ${String(r.pages)} page${r.pages===1?"":"s"} on ${String(r.paper.width)} × ${String(r.paper.height)} mm paper; ${s} drawn`].join(`
|
|
5
|
+
`)}}if(e.page!==void 0)throw g("bad-option","--page is a doc's: name the doc.");if(e.range!==void 0)throw g("bad-option","--range is a sheet's: name the sheet.");const c=e.at!==void 0||e.part!==void 0||e.from!==void 0||e.to!==void 0;if(!c&&(e.clip!==void 0||e.beside!==void 0))throw g("bad-option","--clip and --beside draw moments: give --at, --part, or --from and --to.");const{pieceMoments:l,stillsSheet:y}=await import("./frames/piece.js");if(!c&&!e.overlay){const{result:i,...r}=await x(e,n,"render",m=>y(m,{cwd:a,root:d,out:e.out})),{unit:s,...f}=i;return{value:{...f,...k(r)},text:[`${i.out} (${i.piece} · ${i.format} · ${String(i.parts.length)} ${i.parts.length===1?s.noun:s.plural}${"scale"in i?` · ${String(i.scale)}×`:""})`,..."outs"in i?i.outs.slice(1):[],...j(r)].join(`
|
|
6
|
+
`)}}const b=!c&&e.overlay,{result:o,...w}=await x(e,n,"render",async i=>{const r=await l(i,{cwd:a,root:d,at:b?i.timeline.parts.map(h=>String(h.still)):e.at,part:e.part,from:e.from,to:e.to,clip:e.clip,out:e.out,overlay:e.overlay,beside:e.beside});if(r.mode==="cover")return r;const s="tiles"in r?r.tiles[0]:void 0,f=r.mode==="frame"?r.t:r.stretch?.from??s?.t,m=r.mode==="frame"?r.part:s?.part;return f!==void 0&&!b&&await W(d,{doing:"looking",item:i.piece.place,place:{t:f,...m===void 0?{}:{part:m}}}),r}),p=[];if(o.mode==="cover"&&p.push(`${o.out} (${o.piece} · ${o.format} · ${o.cover})`),o.mode==="frame"&&p.push(`${o.out} (${o.piece} · ${o.format} · ${o.part}${o.timed?` · ${o.t.toFixed(2)} s`:""})`),o.mode==="grid"){("outs"in o&&Array.isArray(o.outs)?o.outs.filter(s=>typeof s=="string"):[o.out]).forEach((s,f)=>{const m=o.tiles.filter(h=>("picture"in h?h.picture:0)===f);p.push(`${s} (${o.piece} · ${String(m.length)} moments in ${String(Math.min(o.cols,m.length))} columns · ${String(o.scale)}×)`,` ${m.map(h=>`${h.t.toFixed(o.stretch?3:2)} ${h.part}`).join(" · ")}`)});const r=[...new Set(o.tiles.flatMap(s=>s.overlay?.missing??[]))];r.length>0&&p.push(` Not measured: ${r.join(", ")}.`)}const $=o.mode==="cover"?void 0:o.stretch;return $&&p.push(` Stretch ${$.from.toFixed(3)}–${$.to.toFixed(3)} s, one frame in ${String($.every)}: ${String($.frames)} frames.`),"clip"in o&&o.clip&&p.push(`${o.clip.out} (${o.clip.type}, ${String(o.clip.frames)} frames at ${String(o.clip.fps)} fps, no sound)`),{value:{...o,...k(w)},text:[...p,...j(w)].join(`
|
|
7
|
+
`)}}),framesCuts=v({name:"frames cuts",summary:"A review sheet per cut of a video (a cut take's jumps, part joins, a scenery camera's cuts): frames around it, waveform and level, the words each side, the sound at it",input:t.strictObject({...O,part:t.string().optional().describe("Only this part's cuts and its joins"),out:t.string().optional().describe("The folder the sheets go in; default .allyhub/work/cuts/"),params:z({span:t.number().positive().max(10).default(J.span).describe("Seconds shown on each side of a cut")})}),positional:["item"],output:t.looseObject({out:t.string(),cuts:t.array(t.looseObject({sheet:t.string()}))}),examples:["allyhub frames cuts launch/film","allyhub frames cuts launch/film --part hook"]},async(e,n)=>{const a=n.cwd,d=await S(a,e.dir),{cutSheets:u}=await import("./frames/cuts.js"),{result:c,...l}=await x(e,n,"render",o=>u(o,{cwd:a,root:d,part:e.part,out:e.out,review:{span:e.params.span}})),y=c.part===void 0?`${String(c.cuts.length)} cut${c.cuts.length===1?"":"s"}`:`${String(c.cuts.length)} of ${String(c.total)} cuts (part ${c.part} and its joins)`,b=[`${c.piece} · ${c.format} · ${y}; silence is sound under ${String(c.threshold)} dBFS`];for(const o of c.cuts){const w=o.sound?`level ${A(o.sound.levelDb)} / around ${A(o.sound.aroundDb)} dBFS, peak ${A(o.sound.peakDb)}, step ${o.sound.jumpDb<0?"−":"+"}${Math.abs(o.sound.jumpDb).toFixed(1)} dB`:"no sound";b.push(`${String(o.index).padStart(3)} ${o.t.toFixed(3).padStart(7)} s ${o.kind.padEnd(6)} ${V(o)}`,` silence at the cut: ${q(o.silence)} · ${w}`,` “${o.said.before}” | “${o.said.after}”${o.across?` · across the cut: “${o.across}”`:""}`,` ${o.sheet}`)}return{value:{...c,...k(l)},text:[...b,...j(l)].join(`
|
|
8
|
+
`)}});const _=H;export const framesCompare=v({name:"frames compare",summary:"How a candidate picture differs from a reference, as numbers (ΔE, channels, SSIM, levels, grain, edges, regions) with a heatmap and a side-by-side: a piece's moment, a picture file or a video file's frame",input:t.strictObject({reference:t.string().describe("The reference picture (PNG, WebP, JPEG…)"),candidate:t.string().optional().describe("A piece (its id, its file without its extension, or its file; default the project's only one) at --at or --part's still; or a file by its extension: a picture (.png, .jpg, .webp…), or a video file's frame at --at (.mp4, .mov, .webm…)"),combo:O.combo,dir:P,at:t.string().optional().describe("The moment: seconds (from the start of --part when given) or an anchor of the piece; a video file's are seconds (default 0)"),part:t.string().optional().describe("The piece's part --at counts from; alone, its still"),refCrop:t.string().optional().describe("Cut the reference to x,y,width,height, or to an element of the elements.json beside it (frames web writes one)"),crop:t.string().optional().describe("Cut the candidate to x,y,width,height before any resize"),encode:t.string().optional().describe("Draw the candidate through this encode first, as a platform serves it: codec:kbps, h264 or hevc (hevc:618)"),out:t.string().optional().describe("Where its files go, a path without extension; default under .allyhub/work/compare/"),params:z({resize:t.enum(["stretch","width","none"]).default(_.resize).describe("When sizes differ: stretch the candidate to the reference, scale it to its width, or compare the common area"),shift:t.number().int().min(0).max(32).default(_.shift).describe("Search the best offset within this many pixels each way")})}),positional:["reference","candidate"],output:t.looseObject({reference:t.string(),files:t.looseObject({side:t.string(),heatmap:t.string()})}),examples:["allyhub frames compare reference.png launch/film --at 2.5 --encode hevc:618","allyhub frames compare reference.png shot.webp --ref-crop cta","allyhub frames compare reference.png theirs.mp4 --at 3"]},async(e,n)=>{const a=n.cwd,d=e.params;if(!T(e.reference))throw g("bad-reference",`${e.reference} is not a picture: the reference comes first, a picture file (PNG, WebP, JPEG…), then the piece or file to compare with it.`,`For example: allyhub frames compare ${e.candidate!==void 0&&T(e.candidate)?e.candidate:"reference.png"} ${e.reference}`);const u=e.candidate!==void 0&&(T(e.candidate)||I(e.candidate))?e.candidate:void 0,{compareText:c,comparePictures:l}=await import("./frames/compare.js"),y=p=>({cwd:a,root:p,reference:e.reference,file:u,at:e.at===void 0?void 0:[e.at],part:e.part,refCrop:e.refCrop,crop:e.crop,encode:e.encode,out:e.out,options:{shift:d.shift,resize:d.resize}});if(u!==void 0){if(e.combo!==void 0||e.part!==void 0)throw g("bad-option","--combo and --part are a piece's: the candidate is a file.");const p=await l(y(await E(a,e.dir)),void 0).catch($=>{throw M($)});return{value:p,text:c(p)}}const b=await S(a,e.dir),{result:o,...w}=await x({...e,item:e.candidate},n,"render",p=>l(y(b),p));return{value:{...o,...k(w)},text:[c(o),...j(w)].join(`
|
|
9
|
+
`)}}),framesWeb=v({name:"frames web",summary:"A web page's screenshot with its named elements' boxes in the image's pixels, for a screen demo",input:t.strictObject({url:t.string().describe("The page: an address, or an HTML file on this computer"),el:t.array(t.string()).optional().describe("An element to locate, name=selector (CSS, or text=<words>); [data-el] elements are found too"),click:t.array(t.string()).optional().describe("Selectors clicked in order before the shot (close a banner, open a dialog)"),full:t.boolean().default(!1).describe("The whole page, not one viewport"),out:t.string().optional().describe("Where the picture goes (a WebP), its boxes in <out>.elements.json beside it; default under .allyhub/work/pages/"),dir:P,size:t.string().default(`${String(F.width)}x${String(F.height)}`).describe("The viewport, WIDTHxHEIGHT in CSS pixels"),scale:t.number().min(1).max(4).default(F.scale).describe("Image pixels per CSS pixel; 2 draws a high-density screen, sharp when a camera goes in"),wait:t.number().int().min(0).optional().describe("Milliseconds to wait after loading and clicking")}),positional:["url"],output:t.looseObject({out:t.string(),elementsFile:t.string()}),examples:["allyhub frames web https://example.com --el cta=text=Sign\\ up --scale 2 --out assets/media/home","allyhub frames web page.html --click '#accept' --full"]},async(e,n)=>{const a=n.cwd,[d,u]=B(e.size),{pageShot:c}=await import("./frames/page.js"),l=await c({cwd:a,root:await E(a,e.dir),url:e.url,out:e.out,el:e.el,click:e.click,width:d,height:u,scale:e.scale,full:e.full,wait:e.wait});return{value:l,text:[`${l.out}: ${String(l.width)}×${String(l.height)}${l.scale===1?"":` (${String(l.scale)} image pixels per CSS pixel)`}, ${String(Object.keys(l.elements).length)} elements (${Object.keys(l.elements).join(", ")||"none"}) in ${l.elementsFile}`,...l.missing.length>0?[`Not found: ${l.missing.join(", ")} (the selector is wrong, or something must be opened with --click first).`]:[]].join(`
|
|
10
10
|
`),exit:l.missing.length>0?D.failed:D.ok}}),FRAMES_COMMANDS=[frames,framesCuts,framesCompare,framesWeb];
|
package/dist/commands/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{CLOUD_SOURCE as l}from"./cloud-tools.js";import{EXTENSIONS_SOURCE as d,builtInCommands as y}from"./contributed.js";import{inspectListingViews as u}from"./inspect/index.js";import{VIEWS_SOURCE as f,builtInViews as S}from"./inspect/views.js";import{extensions as C}from"./found-extensions.js";const a=t=>async()=>((await C()).builtInExtensions(),t());export const COMMAND_MODULES=[a(async()=>[(await import("./check.js")).check]),a(async()=>[(await import("./migrate.js")).migrate]),a(async()=>[(await import("./inspect/facts.js")).inspect]),a(async()=>[(await import("./inspect/layout.js")).inspectLayout]),a(async()=>[(await import("./inspect/combos.js")).inspectCombos]),a(async()=>[(await import("./inspect/uses.js")).inspectUses]),a(async()=>[(await import("./export.js")).exportFiles]),a(async()=>(await import("./frames.js")).FRAMES_COMMANDS),a(async()=>[(await import("./dev.js")).dev]),a(async()=>{const{add:t,addSearch:i}=await import("./add.js");return[t,i]}),async()=>{const{skills:t,skillsShow:i}=await import("./skills.js");return[t,i]},a(async()=>[(await import("./align.js")).align]),async()=>{const{authLogin:t,authStatus:i}=await import("./auth.js");return[t,i]},async()=>{const{orgsList:t,orgsUse:i}=await import("./orgs.js");return[t,i]},async()=>[(await import("./cloud-tools.js")).upload],async()=>(await import("./mail.js")).MAIL_COMMANDS,a(async()=>[(await import("./doctor.js")).doctor]),a(async()=>[(await import("./extensions.js")).doctorExtensions]),async()=>[(await import("./upgrade.js")).upgrade]],COMMAND_SOURCES=[l,d,f];let m;export function allCommandsFrom(){return m??=(async()=>{const t=(await Promise.all(COMMAND_MODULES.map(async(n,p)=>(await n()).map(w=>({command:w,from:p}))))).flat(),[i,e]=await Promise.all([S(),y()]),r=t.findIndex(n=>n.command.spec.name==="inspect"),o=t[r],s=t.filter(n=>n.command.spec.name.startsWith("inspect "));if(o===void 0||s.length===0)throw new Error("The CLI's own commands have no inspect.");const c=t.indexOf(s[s.length-1]??o)+1;return[...t.slice(0,r),{...o,command:u(o.command,[...s.map(n=>n.command),...i])},...t.slice(r+1,c),...i.map(n=>({command:n,from:"view"})),...t.slice(c),...e.map(n=>({command:n,from:"contributed"}))]})(),m}export async function allCommands(){return(await allCommandsFrom()).map(t=>t.command)}
|
|
2
|
+
import{CLOUD_SOURCE as l}from"./cloud-tools.js";import{EXTENSIONS_SOURCE as d,builtInCommands as y}from"./contributed.js";import{inspectListingViews as u}from"./inspect/index.js";import{VIEWS_SOURCE as f,builtInViews as S}from"./inspect/views.js";import{extensions as C}from"./found-extensions.js";const a=t=>async()=>((await C()).builtInExtensions(),t());export const COMMAND_MODULES=[a(async()=>[(await import("./check.js")).check]),a(async()=>[(await import("./migrate.js")).migrate]),a(async()=>[(await import("./run.js")).run]),a(async()=>[(await import("./inspect/facts.js")).inspect]),a(async()=>[(await import("./inspect/layout.js")).inspectLayout]),a(async()=>[(await import("./inspect/combos.js")).inspectCombos]),a(async()=>[(await import("./inspect/uses.js")).inspectUses]),a(async()=>[(await import("./export.js")).exportFiles]),a(async()=>(await import("./frames.js")).FRAMES_COMMANDS),a(async()=>[(await import("./dev.js")).dev]),a(async()=>{const{add:t,addSearch:i}=await import("./add.js");return[t,i]}),async()=>{const{skills:t,skillsShow:i}=await import("./skills.js");return[t,i]},a(async()=>[(await import("./align.js")).align]),async()=>{const{authLogin:t,authStatus:i}=await import("./auth.js");return[t,i]},async()=>{const{orgsList:t,orgsUse:i}=await import("./orgs.js");return[t,i]},async()=>[(await import("./cloud-tools.js")).upload],async()=>(await import("./mail.js")).MAIL_COMMANDS,a(async()=>[(await import("./doctor.js")).doctor]),a(async()=>[(await import("./extensions.js")).doctorExtensions]),async()=>[(await import("./upgrade.js")).upgrade]],COMMAND_SOURCES=[l,d,f];let m;export function allCommandsFrom(){return m??=(async()=>{const t=(await Promise.all(COMMAND_MODULES.map(async(n,p)=>(await n()).map(w=>({command:w,from:p}))))).flat(),[i,e]=await Promise.all([S(),y()]),r=t.findIndex(n=>n.command.spec.name==="inspect"),o=t[r],s=t.filter(n=>n.command.spec.name.startsWith("inspect "));if(o===void 0||s.length===0)throw new Error("The CLI's own commands have no inspect.");const c=t.indexOf(s[s.length-1]??o)+1;return[...t.slice(0,r),{...o,command:u(o.command,[...s.map(n=>n.command),...i])},...t.slice(r+1,c),...i.map(n=>({command:n,from:"view"})),...t.slice(c),...e.map(n=>({command:n,from:"contributed"}))]})(),m}export async function allCommands(){return(await allCommandsFrom()).map(t=>t.command)}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{spawn as w}from"node:child_process";import{stat as g}from"node:fs/promises";import{resolve as b}from"node:path";import{fileURLToPath as v}from"node:url";import{z as r}from"zod";import{nodeLending as j}from"@allyhub/build";import{CommandError as y,EXIT as e}from"@allyhub/protocol";import{nodeCommand as L}from"@allyhub/runtimes/node";import{defineCommand as N}from"../command.js";import{projectRoot as k}from"../project.js";import{kindsAt as I}from"./extensions.js";export const run=N({name:"run",summary:"Run a script with Node, its imports of @allyhub/sdk and three.js the ones allyhub brings where the project has not installed them",input:r.strictObject({file:r.string().describe("The script: .ts, .mts, .js or .mjs"),args:r.array(r.string()).default([]).describe("What the script is given, after -- where one starts with -")}),positional:["file","args"],output:r.looseObject({exit:r.number()}),examples:["allyhub run scripts/make-budget.ts","allyhub run scripts/import.ts -- --from data/orders.csv"]},async(i,t)=>{const n=b(t.cwd,i.file);if(!(await g(n).catch(()=>{}))?.isFile())throw new y("not-found",`${i.file} is not there.`,{exit:e.notFound});const a=await k(t.cwd),m=await j(I(a),a),l={sdk:m.sdk??{},lent:m.lent??{},cli:import.meta.url},p=v(new URL(import.meta.url.endsWith(".ts")?"../run-register.ts":"../run-register.js",import.meta.url)),o=await new Promise((c,f)=>{const s=w(L(t.env),["--import",p,n,...i.args],{cwd:t.cwd,env:{...t.env,ALLYHUB_RUN_LENDING:JSON.stringify(l)},stdio:"inherit"}),d=()=>s.kill("SIGINT");t.signal.addEventListener("abort",d,{once:!0}),s.on("error",f),s.on("exit",(u,h)=>{t.signal.removeEventListener("abort",d),c(u??(h==="SIGINT"?e.interrupted:e.failed))})});return{value:{exit:o},text:"",...o===0?{}:{exit:o===e.interrupted?e.interrupted:e.failed,code:"script-failed"}}});
|