allyhub 0.16.0 → 0.17.1
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/CHANGELOG.md +13 -0
- package/dist/commands/inspect/index.js +1 -1
- package/dist/commands/inspect/uses.js +3 -0
- package/dist/node_modules/@allyhub/3d-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/audio/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/audio/dist/place.js +2 -0
- package/dist/node_modules/@allyhub/audio/package.json +1 -1
- package/dist/node_modules/@allyhub/browser/package.json +1 -1
- package/dist/node_modules/@allyhub/build/dist/content.d.ts +7 -0
- package/dist/node_modules/@allyhub/build/dist/imports.d.ts +17 -0
- package/dist/node_modules/@allyhub/build/dist/imports.js +2 -0
- package/dist/node_modules/@allyhub/build/dist/index.d.ts +2 -1
- package/dist/node_modules/@allyhub/build/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/build/dist/kind-build.d.ts +19 -3
- package/dist/node_modules/@allyhub/build/dist/prepare.js +3 -3
- package/dist/node_modules/@allyhub/build/dist/uses.d.ts +27 -6
- package/dist/node_modules/@allyhub/build/dist/uses.js +1 -1
- 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/package.json +1 -1
- package/dist/node_modules/@allyhub/components/package.json +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/live.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/record.js +1 -1
- 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/docx.js +4 -4
- package/dist/node_modules/@allyhub/doc/dist/html.js +40 -40
- package/dist/node_modules/@allyhub/doc/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/doc/dist/markdown.js +1 -1
- package/dist/node_modules/@allyhub/doc/dist/parse.js +4 -4
- package/dist/node_modules/@allyhub/doc/dist/table.js +1 -1
- package/dist/node_modules/@allyhub/doc/dist/write.js +26 -26
- package/dist/node_modules/@allyhub/doc/package.json +1 -1
- package/dist/node_modules/@allyhub/doc-extension/dist/build.js +2 -2
- 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/dist/export.js +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/dist/points.js +1 -1
- package/dist/node_modules/@allyhub/extension-host/package.json +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +15 -3
- package/dist/node_modules/@allyhub/formats/dist/data/slides.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/items.d.ts +40 -7
- package/dist/node_modules/@allyhub/formats/dist/items.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +4 -0
- package/dist/node_modules/@allyhub/formats/package.json +1 -1
- package/dist/node_modules/@allyhub/i18n/package.json +1 -1
- package/dist/node_modules/@allyhub/image-draw/dist/stage.js +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-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 +3 -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/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/dist/layer.d.ts +15 -0
- package/dist/node_modules/@allyhub/piece/dist/page/index.d.ts +1 -0
- package/dist/node_modules/@allyhub/piece/dist/page/index.js +1 -1
- package/dist/node_modules/@allyhub/piece/dist/page/runtimes.d.ts +9 -0
- package/dist/node_modules/@allyhub/piece/dist/page/runtimes.js +2 -0
- package/dist/node_modules/@allyhub/piece/dist/source.d.ts +51 -10
- package/dist/node_modules/@allyhub/piece/dist/source.js +1 -1
- package/dist/node_modules/@allyhub/piece/package.json +1 -1
- package/dist/node_modules/@allyhub/project/dist/digest.js +1 -1
- package/dist/node_modules/@allyhub/project/dist/part-keys.js +1 -1
- package/dist/node_modules/@allyhub/project/package.json +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +0 -6
- package/dist/node_modules/@allyhub/protocol/dist/account.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/events.d.ts +39 -0
- package/dist/node_modules/@allyhub/protocol/dist/events.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +3 -0
- package/dist/node_modules/@allyhub/protocol/dist/frame.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/kinds.d.ts +30 -0
- package/dist/node_modules/@allyhub/protocol/dist/kinds.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +6 -0
- package/dist/node_modules/@allyhub/protocol/dist/tools.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/runtime/dist/compose.js +1 -1
- package/dist/node_modules/@allyhub/runtime/dist/embed.js +1 -1
- package/dist/node_modules/@allyhub/runtime/dist/film.js +1 -1
- package/dist/node_modules/@allyhub/runtime/dist/piece.js +2 -2
- package/dist/node_modules/@allyhub/runtime/dist/player/player.js +1 -1
- 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/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/calc/coerce.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/engine.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/criteria.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/date.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/dynamic.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/info.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/logical.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/lookup.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/functions/text.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/formula/parse.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.js +2 -2
- 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/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/animation.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/api.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/components.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/resolve.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-extension/dist/build.js +2 -1
- package/dist/node_modules/@allyhub/slides-extension/dist/deck-pptx.js +1 -1
- package/dist/node_modules/@allyhub/slides-extension/dist/evaluate.js +2 -2
- package/dist/node_modules/@allyhub/slides-extension/dist/export.js +1 -1
- package/dist/node_modules/@allyhub/slides-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/write.js +2 -2
- package/dist/node_modules/@allyhub/slides-pptx/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-runtime/dist/component.js +1 -1
- package/dist/node_modules/@allyhub/slides-runtime/dist/draw.js +2 -2
- package/dist/node_modules/@allyhub/slides-runtime/dist/item.js +2 -0
- package/dist/node_modules/@allyhub/slides-runtime/dist/load.js +5 -5
- 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/dist/install.js +1 -1
- package/dist/node_modules/@allyhub/stage-page/package.json +1 -1
- package/dist/node_modules/@allyhub/stage-runtime/dist/runtime.js +19 -19
- 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/dist/build.js +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 +3 -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 +13 -13
- package/dist/works.js +1 -1
- package/editor-web/assets/{abnfDiagram-WEYOIA3C-B1AxOB-Y.js → abnfDiagram-WEYOIA3C-CHNpVSPv.js} +1 -1
- package/editor-web/assets/{architecture-WOLXFQ4H-C-7xKJ2Z.js → architecture-WOLXFQ4H-gPsJqQwV.js} +1 -1
- package/editor-web/assets/{architectureDiagram-ZHVYKT53-CyWb8_iD.js → architectureDiagram-ZHVYKT53-CEIDcC6r.js} +1 -1
- package/editor-web/assets/{article-qt4W_BKH.js → article-BHTjq0_Y.js} +1 -1
- package/editor-web/assets/{article-CTKW7Eo0.js → article-DfELjJ2o.js} +1 -1
- package/editor-web/assets/{blockDiagram-RJAE7QA3-uii4-7Ix.js → blockDiagram-RJAE7QA3-CUzEGVet.js} +1 -1
- package/editor-web/assets/{c4Diagram-XDPPPE54-BtL5Z-wF.js → c4Diagram-XDPPPE54-CB94NR9s.js} +1 -1
- package/editor-web/assets/calc-worker-BdHh5LXM.js +45 -0
- package/editor-web/assets/channel-DCDCx5Es.js +1 -0
- package/editor-web/assets/{chart-file-HE-uXGmJ.js → chart-file-CfbWK9l1.js} +1 -1
- package/editor-web/assets/{chunk-2E7WHVMD-BJjuZYBs.js → chunk-2E7WHVMD-DFYo_Boi.js} +1 -1
- package/editor-web/assets/{chunk-4EMNKR2T-nzPdUHaI.js → chunk-4EMNKR2T-CLLjmweX.js} +1 -1
- package/editor-web/assets/{chunk-55XCU76K-CH52E3Nl.js → chunk-55XCU76K-CkwQ_3m1.js} +1 -1
- package/editor-web/assets/{chunk-7S6XSTFO-Ba4LNKCV.js → chunk-7S6XSTFO-V-AvHpAB.js} +1 -1
- package/editor-web/assets/{chunk-AQDTSKZB-Co9SmoqD.js → chunk-AQDTSKZB-PjHyYpb8.js} +1 -1
- package/editor-web/assets/{chunk-DSNLSHJZ-BHRvxRGi.js → chunk-DSNLSHJZ-QaczBS3J.js} +1 -1
- package/editor-web/assets/{chunk-HAGFOTED-F5Wd8ETY.js → chunk-HAGFOTED-aLaQB5Xu.js} +1 -1
- package/editor-web/assets/{chunk-HNE4Q36P-C_E0__p9.js → chunk-HNE4Q36P-De3ftDQR.js} +1 -1
- package/editor-web/assets/{chunk-NQOKRVIF-BvrtbbWm.js → chunk-NQOKRVIF-CrhVQyvP.js} +1 -1
- package/editor-web/assets/{chunk-UHW7PFBP-D0HTPXRF.js → chunk-UHW7PFBP-BFmZ5ZLn.js} +1 -1
- package/editor-web/assets/{chunk-VQ5W62QI-B9hF2YMk.js → chunk-VQ5W62QI-CzppUHLA.js} +1 -1
- package/editor-web/assets/{chunk-WQQL4CDK-D7N3o-Ub.js → chunk-WQQL4CDK-BrAU7V6v.js} +1 -1
- package/editor-web/assets/{chunk-YZO67HFG-XaLSrI_W.js → chunk-YZO67HFG-BSiF71qj.js} +1 -1
- package/editor-web/assets/{chunk-ZAUX2LTX-sXc6qmw-.js → chunk-ZAUX2LTX-BJc4r5b1.js} +1 -1
- package/editor-web/assets/{chunk-ZCHMQSOR-B0X6sNMX.js → chunk-ZCHMQSOR-CkGTuehB.js} +1 -1
- package/editor-web/assets/{classDiagram-v2-4MYWR3UA-CjXVvOUp.js → classDiagram-v2-4MYWR3UA-Byxc7J88.js} +1 -1
- package/editor-web/assets/{cynefin-EF2NZ3EQ-PQ9VyM9v.js → cynefin-EF2NZ3EQ-BSxkVbdf.js} +1 -1
- package/editor-web/assets/{cynefinDiagram-WF24UDRP-KXuXFAhX.js → cynefinDiagram-WF24UDRP-IkCgARNs.js} +1 -1
- package/editor-web/assets/{dagre-NK4GIZVX-CBTyfYD5.js → dagre-NK4GIZVX-9PgeH6nY.js} +1 -1
- package/editor-web/assets/deck-tTzKONci.js +1 -0
- package/editor-web/assets/{diagram-CBK3MWTC-CsVO64Bf.js → diagram-CBK3MWTC-DRzeg3Ds.js} +1 -1
- package/editor-web/assets/{diagram-I5XIIV2D-fzbUm1St.js → diagram-I5XIIV2D-B_zeKMN6.js} +1 -1
- package/editor-web/assets/{diagram-ODIL2UCW-up6ihgN5.js → diagram-ODIL2UCW-FFm0O8SN.js} +1 -1
- package/editor-web/assets/{diagram-PFBEJUXE-T6hVBoCD.js → diagram-PFBEJUXE-DrtCT8OA.js} +1 -1
- package/editor-web/assets/{diagram-RJA3I4VV-BDntFeuR.js → diagram-RJA3I4VV-DtxJ3V0q.js} +1 -1
- package/editor-web/assets/{diagram-TYUNFSNR-Dv1-mqbf.js → diagram-TYUNFSNR-DmxF_8H_.js} +1 -1
- package/editor-web/assets/dist-BEpzsYn_.js +6 -0
- package/editor-web/assets/dist-BUD4ywMB.js +18 -0
- package/editor-web/assets/{dist-aTV6Rwon.js → dist-C21CkR7Z.js} +132 -131
- package/editor-web/assets/{dist-DhMagA-B.js → dist-C56mWAec.js} +1 -1
- package/editor-web/assets/{dist-B-lYrbqX.js → dist-CAb3W9_P.js} +1 -1
- package/editor-web/assets/{dist-Bfs4cZI_.js → dist-CEknsRDd.js} +1 -1
- package/editor-web/assets/{dist-C66KgS8g.js → dist-CbZAznNW.js} +2 -2
- package/editor-web/assets/{dist-Ba5Kv4A-.js → dist-DDzjbKIg.js} +1 -1
- package/editor-web/assets/{dist-CWXGbcPB.js → dist-DaEbElXI.js} +1 -1
- package/editor-web/assets/{dist-_ooK0TT9.js → dist-Dr3o4vee.js} +1 -1
- package/editor-web/assets/{dist-mrWPE-br.js → dist-JLyDtl9X.js} +1 -1
- package/editor-web/assets/{dist-BW8IR8bR.js → dist-PBbWAsrV.js} +3 -3
- package/editor-web/assets/{dist-CBeeIAlh.js → dist-ZZlQa66J.js} +1 -1
- package/editor-web/assets/{dist-CHKVUdcE.js → dist-bQKpw3Zz.js} +5 -5
- package/editor-web/assets/dist-d4dayaWE.js +17 -0
- package/editor-web/assets/{docx-draw-CeiLkccT.js → docx-draw-9Q_fArBC.js} +1 -1
- package/editor-web/assets/{ebnfDiagram-V4P3TTPT-CZzljBYN.js → ebnfDiagram-V4P3TTPT-DSX1Aoty.js} +1 -1
- package/editor-web/assets/{elk-QONTBCTQ-6vNb82av.js → elk-QONTBCTQ-C7gy9q56.js} +1 -1
- package/editor-web/assets/{erDiagram-KYQIGQAA-B8smxURG.js → erDiagram-KYQIGQAA-CKx_HoY4.js} +1 -1
- package/editor-web/assets/esm-BZb5QMQf.js +21 -0
- package/editor-web/assets/{eventmodeling-K75KTNOO-CngIhoUF.js → eventmodeling-K75KTNOO-DL4HvSrd.js} +1 -1
- package/editor-web/assets/flowDiagram-IUGLLWBU-BUnRtJ8q.js +1 -0
- package/editor-web/assets/{ganttDiagram-R7GPNTJY-BtzqHUiP.js → ganttDiagram-R7GPNTJY-N-AP4slN.js} +1 -1
- package/editor-web/assets/{gitGraph-VSP46ZUC-DOOpoQDh.js → gitGraph-VSP46ZUC-BKRGJKWm.js} +1 -1
- package/editor-web/assets/{gitGraphDiagram-PDYL7XHY-Cu4T8UUo.js → gitGraphDiagram-PDYL7XHY-ClwL7w2_.js} +1 -1
- package/editor-web/assets/index-BedbINE5.css +2 -0
- package/editor-web/assets/index-DG2nHq4D.js +28 -0
- package/editor-web/assets/{info-OHQRW6UA-CiNozx0c.js → info-OHQRW6UA-DpcY8t23.js} +1 -1
- package/editor-web/assets/{infoDiagram-MVDRKAX5-A3mxzTmc.js → infoDiagram-MVDRKAX5-ChtmtWni.js} +1 -1
- package/editor-web/assets/{ishikawaDiagram-HPEHV2GE-CIbVgY0Z.js → ishikawaDiagram-HPEHV2GE-BZNTuG_F.js} +1 -1
- package/editor-web/assets/{journeyDiagram-BOSHW7O7-BwPXFmyS.js → journeyDiagram-BOSHW7O7-C3uVmZbL.js} +1 -1
- package/editor-web/assets/{kanban-definition-FNSA4HC5-biRlEeb1.js → kanban-definition-FNSA4HC5-puEhftGG.js} +1 -1
- package/editor-web/assets/{mermaid-parser.core-ikwPmNne.js → mermaid-parser.core-Bw8re-WE.js} +3 -3
- package/editor-web/assets/{mermaid.core-B4GR7QVa.js → mermaid.core-Cc2GIqBr.js} +4 -4
- package/editor-web/assets/{mindmap-definition-6OY57UG3-BN8aiUmO.js → mindmap-definition-6OY57UG3-C6MUl_S_.js} +1 -1
- package/editor-web/assets/{packet-JDAUHWVQ-DWesZv6p.js → packet-JDAUHWVQ-C75RnvC5.js} +1 -1
- package/editor-web/assets/{pegDiagram-ECIUJNBX-Bh3QEAL_.js → pegDiagram-ECIUJNBX-ChjmsdV4.js} +1 -1
- package/editor-web/assets/{pie-XZMESJXO-DT1ANL51.js → pie-XZMESJXO-BaKxJQpj.js} +1 -1
- package/editor-web/assets/{pieDiagram-GNMPY74T-xXxgiv6O.js → pieDiagram-GNMPY74T-CT2ez8pr.js} +1 -1
- package/editor-web/assets/{props-form-BwZY8ZWd.js → props-form-D5oKHfpk.js} +1 -1
- package/editor-web/assets/{quadrantDiagram-D57K4MC3-BGzRd8iZ.js → quadrantDiagram-D57K4MC3-BJItlTfk.js} +1 -1
- package/editor-web/assets/{radar-ABXABTNO-C-rmMB0D.js → radar-ABXABTNO-DnLzBlTo.js} +1 -1
- package/editor-web/assets/{railroad-I3PHUGI6-CvLOq2i8.js → railroad-I3PHUGI6-D5hj6Yv3.js} +1 -1
- package/editor-web/assets/{railroad-abnf-LNEFI6M7-DMsb025s.js → railroad-abnf-LNEFI6M7-DUZlZoPu.js} +1 -1
- package/editor-web/assets/{railroad-ebnf-DWYD2UWJ-5bvVcIvh.js → railroad-ebnf-DWYD2UWJ-CDyyDC6d.js} +1 -1
- package/editor-web/assets/{railroad-peg-JR7BVNR7-LKZ9-9ja.js → railroad-peg-JR7BVNR7-CC3ImNnT.js} +1 -1
- package/editor-web/assets/{railroadDiagram-Y72NRBL7-DVBhzkmC.js → railroadDiagram-Y72NRBL7-Bjw-8Se5.js} +1 -1
- package/editor-web/assets/{requirementDiagram-EQYSW5RA-B5RyzWna.js → requirementDiagram-EQYSW5RA-CDFnuEIO.js} +1 -1
- package/editor-web/assets/{sankeyDiagram-SY24JHO5-BvOJG-gB.js → sankeyDiagram-SY24JHO5-CQPVLY1w.js} +1 -1
- package/editor-web/assets/{schemas-BmdNnDyt.js → schemas-moE_A7Nj.js} +1 -1
- package/editor-web/assets/{sequenceDiagram-BLEHNHQU-BI7-Daqy.js → sequenceDiagram-BLEHNHQU-BQzuLmBX.js} +1 -1
- package/editor-web/assets/{session-D8E3nUwU.js → session-s1I85rox.js} +1 -1
- package/editor-web/assets/{slides-bj0WJT_G.js → slides-oQ_C0SVJ.js} +1 -1
- package/editor-web/assets/snapshots-BPJKywuN.js +1 -0
- package/editor-web/assets/{split-BrF9ECYb.js → split-7CVjIkSU.js} +1 -1
- package/editor-web/assets/square-arrow-out-up-right-DF5dvsSp.js +1 -0
- package/editor-web/assets/{stateDiagram-v2-A6IESKWZ-C01p8WHX.js → stateDiagram-v2-A6IESKWZ-DOuageUf.js} +1 -1
- package/editor-web/assets/{swimlanes-B3ENRKFQ-B00P2SqG.js → swimlanes-B3ENRKFQ-CXKkok7X.js} +1 -1
- package/editor-web/assets/swimlanesDiagram-AYQRV4AK-C3Car2M0.js +8 -0
- package/editor-web/assets/{tabs-CloHB5Z4.js → tabs-CiF1N-pL.js} +1 -1
- package/editor-web/assets/{timeline-definition-JXYKGLGB-BIBoOYJY.js → timeline-definition-JXYKGLGB-DgAjAeZp.js} +1 -1
- package/editor-web/assets/{treeView-D4JQ5SDB-CL6DL8V0.js → treeView-D4JQ5SDB-C0Xvnhck.js} +1 -1
- package/editor-web/assets/{treemap-SAJKECNS-CPLGr0WY.js → treemap-SAJKECNS-aXfKAeSX.js} +1 -1
- package/editor-web/assets/{usecaseDiagram-WPOLBNNX-L03lK2bO.js → usecaseDiagram-WPOLBNNX-CvUlBa-L.js} +1 -1
- package/editor-web/assets/{vennDiagram-Q3Y3IDCW-B5tKKP_-.js → vennDiagram-Q3Y3IDCW-qMJ1iCxs.js} +1 -1
- package/editor-web/assets/{video-BWUznyLR.js → video-DQrjo1TI.js} +1 -1
- package/editor-web/assets/{wardley-7MLQ67FV-vsBpXT56.js → wardley-7MLQ67FV-DEdnH0by.js} +1 -1
- package/editor-web/assets/{wardleyDiagram-IVAIDKWA-CMCnVUgh.js → wardleyDiagram-IVAIDKWA-Bt-B2hQ5.js} +1 -1
- package/editor-web/assets/workbook-FSSUiIp9.js +45 -0
- package/editor-web/assets/{xychartDiagram-4URNHDU4-C9XkBiEO.js → xychartDiagram-4URNHDU4-DV4bSzTb.js} +1 -1
- package/editor-web/index.html +3 -3
- package/package.json +2 -2
- package/editor-web/assets/calc-worker-jImBXoeb.js +0 -45
- package/editor-web/assets/channel-dEO-yacZ.js +0 -1
- package/editor-web/assets/deck-C-p17098.js +0 -1
- package/editor-web/assets/dist-B94TkgAP.js +0 -18
- package/editor-web/assets/dist-DxcrMrCR.js +0 -6
- package/editor-web/assets/dist-DzjSp2i2.js +0 -17
- package/editor-web/assets/esm-CNi9O1ya.js +0 -21
- package/editor-web/assets/flowDiagram-IUGLLWBU-CL0AVU4Y.js +0 -1
- package/editor-web/assets/index-BCjGdcPh.js +0 -28
- package/editor-web/assets/index-D9ng69En.css +0 -2
- package/editor-web/assets/snapshots-CuflsO8Q.js +0 -1
- package/editor-web/assets/swimlanesDiagram-AYQRV4AK-ChmNuO4G.js +0 -8
- package/editor-web/assets/workbook-C1QR6Cts.js +0 -45
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
Feature highlights from each AllyHub release.
|
|
4
4
|
|
|
5
|
+
## 0.17.1
|
|
6
|
+
|
|
7
|
+
- **Projects made by an older AllyHub open in a newer one** at once, with nothing to download for the version they were made with.
|
|
8
|
+
- **A new account starts in AllyHub in the Cloud**, where the agent welcomes you in your language with examples to start from.
|
|
9
|
+
|
|
10
|
+
## 0.17.0
|
|
11
|
+
|
|
12
|
+
- **Turn into.** Beside Download, make another kind of what is on show, such as a deck into a video, and say how in your own words before you send it.
|
|
13
|
+
- **One piece can use another.** A sheet's table in a deck or a doc, a video on a slide, a deck in a video: change the source and every piece that uses it follows.
|
|
14
|
+
- **Your own Claude Code and Codex, whatever their version.** Studio uses the newest one on your Mac.
|
|
15
|
+
- **Conversation titles are your words**, never what Studio adds for the agent.
|
|
16
|
+
- **Projects are deleted in the sidebar alone.** Cloud storage in Settings shows what takes room and clears what is no longer in use.
|
|
17
|
+
|
|
5
18
|
## 0.16.0
|
|
6
19
|
|
|
7
20
|
- **One Studio on your Mac and in the cloud.** The app opens the same Studio as AllyHub in the cloud, with your projects and conversations as they were.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{inspectCombos as
|
|
2
|
+
import{inspectCombos as a}from"./combos.js";import{inspect as n}from"./facts.js";import{inspectLayout as i}from"./layout.js";import{inspectUses as p}from"./uses.js";import{builtInViews as c}from"./views.js";export const INSPECT_COMMANDS=[n,i,a,p];export async function inspectCommands(){const t=await c(),[,...m]=INSPECT_COMMANDS,s=[...m,...t],o=Math.max(...s.map(e=>e.spec.name.length))-8;return[{...n,about:{lines:["Views, each a measurement now (allyhub help inspect <view> says what one takes):",...s.map(e=>` ${e.spec.name.slice(8).padEnd(o)} ${e.spec.summary}`)],value:{views:s.map(e=>({name:e.spec.name.slice(8),summary:e.spec.summary}))}}},...m,...t]}export{VIEWS_SOURCE}from"./views.js";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{z as f}from"zod";import{prepare as h,usersOf as $}from"@allyhub/build";import{EXIT as d}from"@allyhub/protocol";import{CommandError as w,defineCommand as y}from"../../command.js";import{dir as b}from"../../fields.js";import{itemNamed as g,projectRoot as k}from"../../project.js";import{formatProblem as j}from"../../text/index.js";import{commandError as x}from"../../version.js";import{kindsAt as v}from"../extensions.js";const p=t=>({of:t.of,item:t.item,form:t.type,...t.file===void 0?{}:{file:t.file},at:t.line===void 0?t.from:`${t.from}:${String(t.line)}`}),c=t=>t.file===void 0?t.form:`${t.form} (${t.file} in a file)`;export const inspectUses=y({name:"inspect uses",summary:"Which items use which: each item's uses of another (its data, its drawing live, a made file) and what uses it",input:f.strictObject({item:f.string().optional().describe("The item: its id (its file without its extension) or its file; default every item that uses another or is used"),dir:b}),positional:["item"],output:f.looseObject({}),examples:["allyhub inspect uses","allyhub inspect uses sales/q3"]},async(t,a)=>{try{const o=await k(a.cwd,t.dir),u=await h(o,{kinds:v(o)}),n=u.items;let l=n;if(t.item!==void 0){const e=g(n,o,a.cwd,t.item);if(!e)throw new w("no-item",`No item ${t.item}.`,{exit:d.notFound,hint:`Items: ${n.map(i=>i.id).join(", ")||"none"}.`});l=[e]}const m=l.map(e=>({item:e.id,kind:e.kind,uses:(e.uses??[]).map(p),usedBy:$(n,e.id).map(i=>({...p(i.use),item:i.item}))})).filter(e=>t.item!==void 0||e.uses.length>0||e.usedBy.length>0),r=u.problems.filter(e=>e.code==="AK-M016"),s=[];m.length===0&&s.push("No item uses another.");for(const e of m){s.push(`${e.item} (${e.kind})`),e.uses.length===0&&e.usedBy.length===0&&s.push(" uses nothing, used by nothing");for(const i of e.uses)s.push(` uses ${i.of} → ${i.item} as ${c(i)} ${i.at}`);for(const i of e.usedBy)s.push(` used by ${i.item} as ${c(i)} ${i.at}`)}return{value:{items:m,problems:r},text:[...s,...r.map(j)].join(`
|
|
3
|
+
`),exit:r.some(e=>e.level==="error")?d.failed:d.ok}}catch(o){throw x(o)}});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
export{SAMPLE_RATE}from"./plan.js";export{addEnvelopes,duckEnvelope,equalPower,gainAt,speechEnvelope,speechSpans}from"./envelope.js";export{clipSource,decodeKey,decodings,speechHow}from"./decode.js";export{renderMix,playSfx}from"./render.js";export{playMusic}from"./music.js";export{hashSeed,SFX_HIT,synthSfx}from"./sfx.js";export{addSpeech,playVoice,sumSpeech,voiceGroups}from"./voice.js";export{limitPeaks,masterMix,previewMaster}from"./master.js";export{drySpeech,recordedSpeech}from"./recorded.js";export{db,levelCurve,silenceBands,soundAtCut,waveColumns}from"./at-cut.js";export{MASTER_DEFAULTS,MASTER_MECHANICS,MIX_DEFAULTS,resolveMaster,resolveMix}from"./levels.js";export{BAND_TYPES,bandAt,COMPRESS_DEFAULTS,shapeProblem,shapes,shapeSound,soundFilterProblem,soundLevel}from"./shape.js";export*from"./recording/index.js";export{biquad,biquadGain,BUTTERWORTH_Q,chainGain,fromDb,runBiquads,toDb}from"./recording/filters.js";export{convolve,fft,magnitudes,minimumPhase,nextPow2}from"./recording/fft.js";export{agc,compress,deess,gainComputer}from"./recording/dynamics.js";
|
|
2
|
+
export{SAMPLE_RATE}from"./plan.js";export{mergePlans,placePlan}from"./place.js";export{addEnvelopes,duckEnvelope,equalPower,gainAt,speechEnvelope,speechSpans}from"./envelope.js";export{clipSource,decodeKey,decodings,speechHow}from"./decode.js";export{renderMix,playSfx}from"./render.js";export{playMusic}from"./music.js";export{hashSeed,SFX_HIT,synthSfx}from"./sfx.js";export{addSpeech,playVoice,sumSpeech,voiceGroups}from"./voice.js";export{limitPeaks,masterMix,previewMaster}from"./master.js";export{drySpeech,recordedSpeech}from"./recorded.js";export{db,levelCurve,silenceBands,soundAtCut,waveColumns}from"./at-cut.js";export{MASTER_DEFAULTS,MASTER_MECHANICS,MIX_DEFAULTS,resolveMaster,resolveMix}from"./levels.js";export{BAND_TYPES,bandAt,COMPRESS_DEFAULTS,shapeProblem,shapes,shapeSound,soundFilterProblem,soundLevel}from"./shape.js";export*from"./recording/index.js";export{biquad,biquadGain,BUTTERWORTH_Q,chainGain,fromDb,runBiquads,toDb}from"./recording/filters.js";export{convolve,fft,magnitudes,minimumPhase,nextPow2}from"./recording/fft.js";export{agc,compress,deess,gainComputer}from"./recording/dynamics.js";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
function r(e,c,t,o){const i=Math.max(e.at,c),a=Math.min(e.at+e.dur,t);if(!(a<=i))return{...e,at:i+o,from:e.from+(i-e.at)*(e.speed??1),dur:a-i}}function f(e,c,t,o){const i=e.filter(a=>a.t<=c).at(-1);return[...i?[{t:c+o,db:i.db}]:[],...e.filter(a=>a.t>c&&a.t<t).map(a=>({t:a.t+o,db:a.db}))]}function m(e,c,t,o){const i=e.music&&{...e.music,segments:e.music.segments.flatMap(s=>{const n=r(s,c,t,o);return n?[n]:[]}),duck:f(e.music.duck,c,t,o),until:Math.min(e.music.until??e.duration,t)+o},a=(e.voice?.spans??[]).flatMap(s=>{const n=Math.max(s.start,c),u=Math.min(s.end,t);return u>n?[{...s,start:n+o,end:u+o}]:[]});return{duration:t+o,speech:e.speech.flatMap(s=>{const n=r(s,c,t,o);return n?[n]:[]}),footage:e.footage.flatMap(s=>{const n=r(s,c,t,o);return n?[{...n,...s.envelope?{envelope:f(s.envelope,c,t,o)}:{}}]:[]}),sfx:e.sfx.flatMap(s=>{if(s.at<c||s.at>=t)return[];const n=t-s.at;return[{...s,at:s.at+o,...s.file===void 0?{}:{length:Math.min(s.length??n,n)}}]}),...i&&i.segments.length>0?{music:i}:{},...e.speechGain?{speechGain:f(e.speechGain,c,t,o)}:{},...e.voice?{voice:{...e.voice,spans:a}}:{}}}export function placePlan(e,c){const t=Math.max(0,c.begin??0),o=Math.min(e.duration,c.end??e.duration),i=o-t,a=c.until??1/0,s=[];for(let n=c.at;i>0&&n<a&&(s.length===0||c.loop===!0);n+=i){const u=Math.min(o,t+(a-n));if(s.push(m(e,t,u,n-t)),s.length>=1e3)break}return mergePlans({duration:0,speech:[],footage:[],sfx:[]},s)}export function mergePlans(e,c){let t={...e};for(const o of c){const i=t.music??o.music,a=t.voice?o.voice?.seed===t.voice.seed?{...t.voice,spans:[...t.voice.spans,...o.voice.spans]}:t.voice:o.voice,s=t.speechGain&&o.speechGain?[...t.speechGain,...o.speechGain].sort((n,u)=>n.t-u.t):t.speechGain??o.speechGain;t={duration:Math.max(t.duration,o.duration),speech:[...t.speech,...o.speech],footage:[...t.footage,...o.footage],sfx:[...t.sfx,...o.sfx],...i?{music:i}:{},...s?{speechGain:s}:{},...a?{voice:a}:{}}}return t}
|
|
@@ -31,6 +31,13 @@ export interface DocComponent {
|
|
|
31
31
|
name: string;
|
|
32
32
|
/** Its props' types, when it could be read. */
|
|
33
33
|
props?: Readonly<Record<string, PropType>>;
|
|
34
|
+
/**
|
|
35
|
+
* Another item drawn live in its frame (`<Item>`,
|
|
36
|
+
* docs/design/references.md): `module` is its entry and `name` the part
|
|
37
|
+
* the reference names (empty for none); the stage draws it by its kind,
|
|
38
|
+
* so its stage entry imports nothing of it.
|
|
39
|
+
*/
|
|
40
|
+
item?: true;
|
|
34
41
|
}
|
|
35
42
|
export interface SheetInfo {
|
|
36
43
|
/** The folder its file is in. */
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Item } from "@allyhub/formats";
|
|
2
|
+
import type { KindBuildContext } from "./kind-build.js";
|
|
3
|
+
/** An item a module imports: the item, the file that imports it, the reference as that file would write it, and its line. */
|
|
4
|
+
export interface ImportedItem {
|
|
5
|
+
readonly item: Item;
|
|
6
|
+
readonly from: string;
|
|
7
|
+
readonly of: string;
|
|
8
|
+
readonly line: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The items `item`'s entry imports, directly or through the project's
|
|
12
|
+
* modules it imports (a helper, a component), each once; never through
|
|
13
|
+
* another item's entry. Without the project's items (a context made
|
|
14
|
+
* outside a build), none.
|
|
15
|
+
*/
|
|
16
|
+
export declare function importedItems(item: Item, context: Pick<KindBuildContext, "files" | "parsed" | "items">): ImportedItem[];
|
|
17
|
+
//# sourceMappingURL=imports.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{posix as m}from"node:path";import{repoPath as y}from"@allyhub/piece";import{lineAt as x}from"./scan.js";const v=["",".ts",".tsx",".js",".jsx",".mjs","/index.ts"];function w(r,e,d){const f=[];for(const t of e.program.body){if(!/^(Import|ExportNamed|ExportAll)Declaration$/.test(t.type)||t.importKind==="type"||t.exportKind==="type")continue;const o=t.source?.value;if(typeof o!="string"||!o.startsWith("."))continue;const i=y(r,o);if(i===void 0)continue;const p=v.map(s=>m.normalize(`${i}${s}`)).find(s=>d.has(s));p!==void 0&&f.push({path:p,line:x(e.source,t.start)})}return f}export function importedItems(r,e){const d=e.items??[],f=new Map(d.map(n=>[n.entry,n])),t=new Set(e.files),o=[],i=new Set,p=new Set([r.entry]),s=n=>{const h=e.parsed(n);if(h)for(const{path:c,line:l}of w(n,h,t)){const a=f.get(c);if(a!==void 0){if(a!==r&&!i.has(a.id)){i.add(a.id);const u=m.relative(m.dirname(n),c);o.push({item:a,from:n,of:u.startsWith(".")?u:`./${u}`,line:l})}continue}p.has(c)||(p.add(c),s(c))}};return s(r.entry),o}
|
|
@@ -32,5 +32,6 @@ export { BUILD_FOLDER, inTime, issuesText, itemProblem, loadFailure, prepare, so
|
|
|
32
32
|
export { codeOf, type PieceCode } from "./code.js";
|
|
33
33
|
export { ProjectError, StuckError, type VersionPage } from "./version.js";
|
|
34
34
|
export { generatedFile, generatedPagedFact, mismatchFacts, secondsOf, type ReadVersion, } from "./generated.js";
|
|
35
|
-
export {
|
|
35
|
+
export { importedItems, type ImportedItem } from "./imports.js";
|
|
36
|
+
export { madeType, resolveUses, splitReference, usersOf, usesInOrder, type UseOffers, } from "./uses.js";
|
|
36
37
|
//# sourceMappingURL=index.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
|
-
export{dependenciesOf,listFiles}from"./files.js";export{listWork,projectItems,readWork,unlistedWork}from"./work.js";export{moveEdits,movedPath,referencesOf,referringFiles}from"./move-refs.js";export{bundleForStage,compileErrorOf,createModuleLoader,createStageDevServer,loadUserVite}from"./vite.js";export{nodeStackPlace,placeFinder}from"./places.js";export{mergeScript,pieceLocales,readScripts,readMessages}from"./messages.js";export{MAX_DATA_BYTES,isDataFile,parseCsv,parseData,readData}from"./data.js";export{itemKindBuild,kindBuildOf}from"./kind-build.js";export{madeNotes}from"./made-notes.js";export{FACTS_HEAD,MOMENTS,PROJECT_DIR,STRETCH,VERSION_FIELDS,allFindings,defineView}from"./inspect-view.js";export{fileCheckOf,fileProblems,listedFileProblems}from"./file-check.js";export{FRESH,defineCliCommand,existingFile,fromMedia,media,parameters,progressLines,sizeOf}from"./cli-command.js";export{defineProjectTool}from"./project-tool.js";export{projectAt,projectOfFile,projectRoot}from"./project-root.js";export{buildPluginModules,nodeLending,sdkBindingsOf,sdkEntriesOf,stageAdditions}from"./build-plugins.js";export{deckReferences,referenceModule}from"./references.js";export{messagePrefix,parseComponentRef,readPropsText,resolveDims}from"@allyhub/piece";export{readMedia}from"./media.js";export{modelInfo}from"./model-info.js";export{takeVoice}from"./takes.js";export{resolveMatrix}from"./matrix.js";export{FONTS_MODULE,fontStyles,fontsDigest,fontsModule}from"./fonts.js";export{SDK,checkImports,discover,lineAt,packageName,parse,walk}from"./scan.js";export{allyhubPlugin,boundEntry,mediaHref}from"./plugin.js";export{MetaLoader}from"./meta.js";export{besideModule,fromFolder,plain}from"./evaluate.js";export{MESSAGE_TYPES,messageTypes,writeMessageTypes}from"./types.js";export{BUILD_FOLDER,inTime,issuesText,itemProblem,loadFailure,prepare,sourceOf,stageId,stageItem,stageName}from"./prepare.js";export{codeOf}from"./code.js";export{ProjectError,StuckError}from"./version.js";export{generatedFile,generatedPagedFact,mismatchFacts,secondsOf}from"./generated.js";export{resolveUses,splitReference,usesInOrder}from"./uses.js";
|
|
2
|
+
export{dependenciesOf,listFiles}from"./files.js";export{listWork,projectItems,readWork,unlistedWork}from"./work.js";export{moveEdits,movedPath,referencesOf,referringFiles}from"./move-refs.js";export{bundleForStage,compileErrorOf,createModuleLoader,createStageDevServer,loadUserVite}from"./vite.js";export{nodeStackPlace,placeFinder}from"./places.js";export{mergeScript,pieceLocales,readScripts,readMessages}from"./messages.js";export{MAX_DATA_BYTES,isDataFile,parseCsv,parseData,readData}from"./data.js";export{itemKindBuild,kindBuildOf}from"./kind-build.js";export{madeNotes}from"./made-notes.js";export{FACTS_HEAD,MOMENTS,PROJECT_DIR,STRETCH,VERSION_FIELDS,allFindings,defineView}from"./inspect-view.js";export{fileCheckOf,fileProblems,listedFileProblems}from"./file-check.js";export{FRESH,defineCliCommand,existingFile,fromMedia,media,parameters,progressLines,sizeOf}from"./cli-command.js";export{defineProjectTool}from"./project-tool.js";export{projectAt,projectOfFile,projectRoot}from"./project-root.js";export{buildPluginModules,nodeLending,sdkBindingsOf,sdkEntriesOf,stageAdditions}from"./build-plugins.js";export{deckReferences,referenceModule}from"./references.js";export{messagePrefix,parseComponentRef,readPropsText,resolveDims}from"@allyhub/piece";export{readMedia}from"./media.js";export{modelInfo}from"./model-info.js";export{takeVoice}from"./takes.js";export{resolveMatrix}from"./matrix.js";export{FONTS_MODULE,fontStyles,fontsDigest,fontsModule}from"./fonts.js";export{SDK,checkImports,discover,lineAt,packageName,parse,walk}from"./scan.js";export{allyhubPlugin,boundEntry,mediaHref}from"./plugin.js";export{MetaLoader}from"./meta.js";export{besideModule,fromFolder,plain}from"./evaluate.js";export{MESSAGE_TYPES,messageTypes,writeMessageTypes}from"./types.js";export{BUILD_FOLDER,inTime,issuesText,itemProblem,loadFailure,prepare,sourceOf,stageId,stageItem,stageName}from"./prepare.js";export{codeOf}from"./code.js";export{ProjectError,StuckError}from"./version.js";export{generatedFile,generatedPagedFact,mismatchFacts,secondsOf}from"./generated.js";export{importedItems}from"./imports.js";export{madeType,resolveUses,splitReference,usersOf,usesInOrder}from"./uses.js";
|
|
@@ -40,6 +40,12 @@ export interface KindBuildContext {
|
|
|
40
40
|
* point it does not declare.
|
|
41
41
|
*/
|
|
42
42
|
contributionsTo(point: string): readonly PointEntry[];
|
|
43
|
+
/**
|
|
44
|
+
* The project's items, as its list names them: what a kind's build
|
|
45
|
+
* finds another item by (an import of a deck's module, `importedItems`).
|
|
46
|
+
* Absent where a context is made outside a build.
|
|
47
|
+
*/
|
|
48
|
+
readonly items?: readonly Item[];
|
|
43
49
|
}
|
|
44
50
|
/**
|
|
45
51
|
* What the stage bundles for an item: a module of the project as it is
|
|
@@ -54,9 +60,12 @@ export interface StageEntry {
|
|
|
54
60
|
readonly module?: string;
|
|
55
61
|
/** The file that names its components. */
|
|
56
62
|
readonly of?: string;
|
|
57
|
-
readonly components?: readonly Pick<DocComponent, "of" | "module" | "name">[];
|
|
63
|
+
readonly components?: readonly Pick<DocComponent, "of" | "module" | "name" | "item">[];
|
|
58
64
|
}
|
|
59
|
-
/**
|
|
65
|
+
/**
|
|
66
|
+
* Another item an item asks for, as its kind's build module writes it
|
|
67
|
+
* (docs/design/references.md): taken as its data, live, or as a made file.
|
|
68
|
+
*/
|
|
60
69
|
export interface UseAsk {
|
|
61
70
|
/** The reference: the used item's entry file, relative to `from`, and `#` and a part where its kind has parts. */
|
|
62
71
|
readonly of: string;
|
|
@@ -64,8 +73,15 @@ export interface UseAsk {
|
|
|
64
73
|
readonly from?: string;
|
|
65
74
|
/** Its line in that file, for a problem with it. */
|
|
66
75
|
readonly line?: number;
|
|
67
|
-
/**
|
|
76
|
+
/**
|
|
77
|
+
* The forms the using kind takes, the one it wants most first: `data`,
|
|
78
|
+
* `live` (USE_FORMS) or file types. Given `live` and file types, the
|
|
79
|
+
* first file type the used kind renders is what a file that cannot hold
|
|
80
|
+
* it live is given (`ItemUse.file`).
|
|
81
|
+
*/
|
|
68
82
|
readonly types: readonly string[];
|
|
83
|
+
/** The using item's types that hold the made file of a live use (`pptx`); absent, every type. */
|
|
84
|
+
readonly madeFor?: readonly string[];
|
|
69
85
|
/** What it is to the using item, in its kind's own words. */
|
|
70
86
|
readonly role?: string;
|
|
71
87
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{mkdir as
|
|
3
|
-
`).slice(0,3).join(" ")}`,{}))}}const
|
|
4
|
-
`)),f}async function
|
|
2
|
+
import{mkdir as ie,readFile as oe,readdir as ae,writeFile as ce}from"node:fs/promises";import{join as y}from"node:path";import{BAKE_DIR as q,CACHE_DIR as re,CONFIG_FILES as le,ConfigSchema as T,TEXT_DIR as M,USE_FORMS as fe,itemsOf as de,pointEntriesIn as me,WORK_FILE as w}from"@allyhub/formats";import{problem as g}from"@allyhub/diagnostics";import{looksOf as G,resolveDims as ue}from"@allyhub/piece";import{readData as he}from"./data.js";import{dependenciesOf as ge,listFiles as pe}from"./files.js";import{readWork as we}from"./work.js";import{fontStyles as be}from"./fonts.js";import{kindBuildOf as V}from"./kind-build.js";import{readMedia as ke}from"./media.js";import{readMessages as $e}from"./messages.js";import{MetaLoader as ye}from"./meta.js";import{allyhubPlugin as xe,mediaHref as X}from"./plugin.js";import{buildPluginModules as Se,stageAdditions as Oe}from"./build-plugins.js";import{checkImports as Me,discover as je,parse as Ee}from"./scan.js";import{writeMessageTypes as ve}from"./types.js";import{resolveUses as Ae}from"./uses.js";import{bundleForStage as De,loadUserVite as Fe}from"./vite.js";import{nodeStackPlace as Te}from"./places.js";export const inTime=(e,n)=>n.find(s=>s.id===e.kind)?.pages!==!0;export function itemProblem(e){switch(e.code){case"unknown-kind":return g("AK-M002",`${w} lists ${e.file} as a ${e.kind}, a kind no extension here contributes.`,{where:{file:w}});case"no-editor":return g("AK-M002",`${w} lists ${e.file} with no kind, and no editor here opens a file of its name. Name its kind, or take it out of the list.`,{where:{file:w}});case"missing":return g("AK-M002",`${w} lists ${e.file}, which is not in the project. Write it, or take it out of the list.`,{where:{file:w}});case"same-id":return g("AK-M003",`${w} lists ${e.files.join(" and ")}, one id (${e.id}) for two pieces, so only the first is shown: rename one, or list it once.`,{where:{file:w}})}}export function loadFailure(e,n,s){const o=s?`${n} (at ${s.file}:${String(s.line)}:${String(s.column)})`:n,f=/\b(window|document|navigator|self|HTMLElement|customElements) is not defined/u.test(n);return g("AK-R001",f?`${e} uses something at its top level that only exists in the browser (${o}). The top level of a piece module must load in Node: move it into the output's function, or import it inside a component.`:`Failed to load ${e}: ${o}`,{where:s?{file:s.file,line:s.line}:{file:e}})}export const issuesText=e=>e.issues.map(n=>`${n.path.map(String).join(".")||"(root)"}: ${n.message}`).join("; ");async function Ke(e){return(await ae(y(e,q)).catch(()=>[])).filter(s=>/^[0-9a-f]+\.[\w-]+\.bin$/u.test(s)).map(s=>`${q}/${s}`)}async function Ie(e){const n=[],s=new Set;for(const o of e){const f=await V(o)?.catch(()=>{});!f?.config||s.has(f)||(s.add(f),n.push(f.config))}return n}export async function prepare(e,n){const s=[],o=await pe(e),f=await we(e);for(const m of f.problems)s.push(g("AK-M002",m,{where:{file:w}}));const i=de(f.work,n.kinds,new Set(o));for(const m of i.problems)s.push(itemProblem(m));const r=await ge(e),c=await ke(e,[...o,...await Ke(e)]),l=await Oe(n.kinds,e,(m,p)=>{s.push(g("AK-R001",`The build plugins module ${m} did not load, so the stage's bundles go without it: ${p instanceof Error?p.message:String(p)}`,{}))}),b=new ye({root:e,media:c,dependencies:[...r],user:!0,lent:{...l.lent},sdk:{...l.sdk},bound:{...l.bound},buildPlugins:Se(n.kinds)},n.metaTimeout);try{let m=T.parse({});const p=le.find(t=>o.includes(t));if(p){const t=await b.request({type:"config",file:p});if(s.push(...t.problems),!t.ok)s.push(loadFailure(p,t.error??"",Te(t.stack,e)));else{const a=t.value??{},d=await Ie(n.kinds),u=new Set(d.flatMap(h=>Object.keys(h.shape??{}))),$=T.safeParse(Object.fromEntries(Object.entries(a).filter(([h])=>!u.has(h)||Object.hasOwn(T.shape,h)))),W=d.map(h=>h.safeParse(a)),H=[...$.success?[]:[issuesText($.error)],...W.flatMap(h=>h.success?[]:[issuesText(h.error)])];if($.success&&H.length===0){m=$.data;for(const h of W)h.success&&(m={...m,...h.data})}else s.push(g("AK-M001",`${p} is not valid: ${H.join("; ")}.`,{where:{file:p}}))}}const I=m.defaults?.format,R=typeof I=="string"?I:"16x9",j=be(e,m);for(const t of j.missing)s.push(g("AK-A001",`allyhub.config's fonts name ${t}, which is not in the project or its packages.`,{where:{file:p??"allyhub.config.ts"}}));const x=await $e(e,o,{...m.locales?{locales:m.locales}:{},text:m.text??M});s.push(...x.problems);const Q=o.filter(t=>/\.(ts|tsx|js|jsx|mts|mjs)$/u.test(t)&&!t.endsWith(".d.ts")),E=new Map;for(const t of Q){const a=Ee(t,await oe(y(e,t),"utf8"));E.set(t,a),s.push(...Me(t,a,r,new Set(Object.keys(l.lent)),new Set(Object.keys(l.sdk))))}const _=[];for(const[t,a]of E){if(!je(t,a).components)continue;const d=await b.request({type:"components",file:t});if(s.push(...d.problems),!!d.ok)for(const u of d.value??[])typeof u.name=="string"&&typeof u.export=="string"&&_.push({name:u.name,file:t,export:u.export,...typeof u.label=="string"||typeof u.label=="object"&&u.label!==null?{label:u.label}:{}})}const v=await _e(i.items,n.kinds,s),P=new Map,N=(t,a)=>({root:e,files:o,meta:b,media:c,messages:x,defaultFormat:R,config:m,lent:t,data:a,parsed:d=>E.get(d),items:i.items,claim:(d,u)=>{const $=P.get(d);return $===void 0&&P.set(d,u),$},contributionsTo:()=>[]}),L=(t,a)=>({...t,contributionsTo:d=>me(n.kinds,a.kind,d)}),k=[];let S={};const Y=N({},{}),A=new Map,D=new Map,B=(t,a)=>{A.set(t,[...A.get(t)??[],...a.files??[]]),a.uses&&a.uses.length>0&&D.set(t,[...D.get(t)??[],...a.uses])};for(const t of i.items){const a=await v.get(t)?.lend?.(t,L(Y,t));a&&(k.push(a),B(t,a),S={...S,...a.data})}const C={...await he(e,o.filter(t=>!i.items.some(a=>a.entry===t)),m.text??M),...S},Z=N(S,C);for(const t of i.items){const a=await v.get(t)?.read?.(t,L(Z,t));a&&(k.push(a),B(t,a));const d=new Set([t.entry]);t.files=[{path:t.entry,role:"entry"},...(A.get(t)??[]).filter(u=>!d.has(u.path)&&!!d.add(u.path))]}for(const t of k)s.push(...t.problems??[]);const ee=new Set(i.items.flatMap(t=>v.get(t)?.onStage?[t.kind]:[]));s.push(...Ae(i.items,n.kinds,D,{live:t=>ee.has(t),lent:new Set(Object.keys(S))}));const te=k.flatMap(t=>t.piece?[t.piece]:[]),se=k.flatMap(t=>t.doc?[t.doc]:[]),ne=k.flatMap(t=>t.sheet?[t.sheet]:[]),J=[...k.filter(t=>t.piece),...k.filter(t=>!t.piece)].flatMap(t=>t.stage?[t.stage]:[]),O=x.locales[0];await ve(e,O===void 0?{}:x.messages[O]??{},O===void 0?void 0:x.files[O]);let F;if(n.buildDir&&J.length>0){const t=Object.fromEntries(await Promise.all(J.map(async d=>[d.name,await Re(e,d)]))),a=await Fe(e);try{const d=await De({root:e,entries:t,outDir:n.buildDir,plugins:[xe({root:e,media:c,dependencies:r,fonts:()=>j.styles,stageEntries:new Set(Object.values(t)),lent:l.lent,sdk:l.sdk,bound:l.bound}),...l.plugins],...a?{user:a}:{}}),u=await l.written(n.buildDir);F={dir:n.buildDir,chunks:d,beside:u}}catch(d){s.push(g("AK-R001",`The pieces could not be bundled for the stage: ${d.message.split(`
|
|
3
|
+
`).slice(0,3).join(" ")}`,{}))}}const U=new Set;return{root:e,kinds:n.kinds,files:o,items:i.items,config:m,defaultFormat:R,dependencies:[...r].sort(),messages:x,media:c,data:C,docs:se,sheets:ne,pieces:te,components:_,fonts:j.styles,...F?{bundle:F}:{},problems:s.filter(t=>{const a=`${t.code}|${t.message}|${t.where?.file??""}|${String(t.where?.line??"")}`;return U.has(a)?!1:(U.add(a),!0)})}}finally{await b.close()}}export const BUILD_FOLDER="build/",stageName=e=>e.replaceAll("/","__"),stageId=e=>"components"in e?e.place:e.id;export function stageItem(e,n){return e.pieces.find(s=>s.id===n)??e.docs.find(s=>s.place===n&&s.components.length>0)}async function Re(e,n){const s=(n.components??[]).filter(c=>c.item!==!0);if(s.length===0&&n.module!==void 0)return y(e,n.module);const o=y(e,re,"stage-entries");await ie(o,{recursive:!0});const f=y(o,`${n.name}.ts`),i=[...new Set(s.map(c=>c.module))],r=[`// The components ${n.of??n.module??n.name} shows by their module (generated by the build).`,...n.module===void 0?[]:[`export { default } from ${JSON.stringify(y(e,n.module))};`],...i.map((c,l)=>`import * as m${String(l)} from ${JSON.stringify(y(e,c))};`),"export const components = {",...s.map(c=>` ${JSON.stringify(c.of)}: m${String(i.indexOf(c.module))}[${JSON.stringify(c.name)}],`),"};",""];return await ce(f,r.join(`
|
|
4
|
+
`)),f}async function _e(e,n,s){const o=new Map,f=new Map;for(const i of e){if(!o.has(i.kind)){const c=n.find(l=>l.id===i.kind);o.set(i.kind,await V(c)?.catch(l=>{s.push(g("AK-R001",`The ${c?.extension??i.kind} extension's build module did not load, so its items are not read: ${l instanceof Error?l.message:String(l)}`,{}))}))}const r=o.get(i.kind);r&&f.set(i,r)}return f}function K(e,n){const s=[],o=new Set,f=new Set,i=r=>{if(f.has(r))return;f.add(r);const c=e.bundle?.chunks.chunks[r];if(c){r!==n&&s.push(`${BUILD_FOLDER}${r}`);for(const l of c.css)o.add(`${BUILD_FOLDER}${l}`);for(const l of c.imports)i(l)}};return i(n),{imports:s,styles:[...o]}}export function sourceOf(e,n){if("components"in n)return Ne(e,n);const s=n,o=BUILD_FOLDER,f=stageName(s.id),i=e.bundle?.chunks.entries[f];if(!i)throw new Error(`${s.id} was not bundled for the stage.`);const{imports:r,styles:c}=K(e,i.file);return{piece:s.id,file:s.file,module:`${o}${i.file}`,imports:r,styles:c,dims:s.dims,...s.matrix?{matrix:{space:s.matrix.space,rules:s.matrix.rules}}:{},format:s.format,locales:e.messages.locales,messages:e.messages.messages,anchors:e.messages.anchors,text:e.config.text??M,...s.script===void 0?{}:{script:s.script},media:Object.fromEntries(Object.entries(e.media).map(([l,b])=>[l,{...b,url:X(l)}])),data:e.data,kind:s.kind,...s.loads,...G(e.config),pieces:z(e,s.place)}}function z(e,n){const s=new Map(e.items.map(i=>[i.id,i])),o=new Set,f=i=>{for(const r of s.get(i)?.uses??[])r.type!==fe.live||o.has(r.item)||(o.add(r.item),f(r.item))};return f(n),Object.fromEntries(e.pieces.map(i=>{const r={file:i.file,dims:i.dims,format:i.format,...i.matrix?{matrix:{space:i.matrix.space,rules:i.matrix.rules}}:{}},c=e.bundle?.chunks.entries[stageName(i.id)];if(!o.has(i.place)||i.place===n||!c)return[i.id,r];const{imports:l,styles:b}=K(e,c.file);return[i.id,{...r,kind:i.kind,module:`${BUILD_FOLDER}${c.file}`,imports:l,styles:b,...i.script===void 0?{}:{script:i.script},...i.loads?.kindData===void 0?{}:{kindData:i.loads.kindData}}]}))}const Pe="1920x1080";function Ne(e,n){const s=stageName(n.place),o=e.bundle?.chunks.entries[s];if(!o)throw new Error(`${n.place} shows no component: it has no stage bundle.`);const{imports:f,styles:i}=K(e,o.file);return{kind:"doc",piece:n.place,file:n.file,module:`${BUILD_FOLDER}${o.file}`,imports:f,styles:i,dims:ue(void 0,{locales:e.messages.locales}),format:Pe,locales:e.messages.locales,messages:e.messages.messages,anchors:e.messages.anchors,text:e.config.text??M,media:Object.fromEntries(Object.entries(e.media).map(([r,c])=>[r,{...c,url:X(r)}])),data:e.data,...G(e.config),pieces:z(e,n.place)}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Item, type ItemUse, type KindTable } from "@allyhub/formats";
|
|
2
2
|
import { type Problem } from "@allyhub/diagnostics";
|
|
3
3
|
import type { UseAsk } from "./kind-build.js";
|
|
4
4
|
/** A reference split: the entry's path as written, and the part after `#`. */
|
|
@@ -7,16 +7,37 @@ export declare function splitReference(of: string): {
|
|
|
7
7
|
part?: string;
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
10
|
+
* What the used items give besides their made files, as the build read
|
|
11
|
+
* them (docs/design/references.md §3.2): whether an item of a kind is
|
|
12
|
+
* drawn live by its kind's runtime, and the data the kinds lent, by the
|
|
13
|
+
* paths they lent it at (`sales/sales.yaml#revenue`).
|
|
12
14
|
*/
|
|
13
|
-
export
|
|
15
|
+
export interface UseOffers {
|
|
16
|
+
readonly live?: (kind: string) => boolean;
|
|
17
|
+
readonly lent?: ReadonlySet<string>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Each item's asks resolved onto it (`Item.uses`, and the entries and
|
|
21
|
+
* files of what it uses, through every step, among the item's files as
|
|
22
|
+
* `use`), and the problems of those that could not be.
|
|
23
|
+
*/
|
|
24
|
+
export declare function resolveUses(items: readonly Item[], kinds: KindTable, asks: ReadonlyMap<Item, readonly UseAsk[]>, offers?: UseOffers): Problem[];
|
|
25
|
+
/** What uses an item, directly: each using item's id with its use of it, in the list's order. */
|
|
26
|
+
export declare function usersOf(items: readonly Item[], id: string): {
|
|
27
|
+
item: string;
|
|
28
|
+
use: ItemUse;
|
|
29
|
+
}[];
|
|
30
|
+
/** The file type a use is made as, if any: its form when that is a file type, else a live use's file. */
|
|
31
|
+
export declare function madeType(use: ItemUse): string | undefined;
|
|
14
32
|
/**
|
|
15
33
|
* What making `asked` needs made first, each used item and type once, in
|
|
16
34
|
* an order where what an item uses comes before it; a cycle is cut where
|
|
17
|
-
* it closes (the build said so).
|
|
35
|
+
* it closes (the build said so). Only made files are made: a use of an
|
|
36
|
+
* item's data or of its drawing live needs nothing made, but a live use's
|
|
37
|
+
* file does where the using item is made as a type that holds it
|
|
38
|
+
* (`typesOf`: the types asked of an item; absent, every type).
|
|
18
39
|
*/
|
|
19
|
-
export declare function usesInOrder(items: readonly Item[], asked: readonly Item[]): {
|
|
40
|
+
export declare function usesInOrder(items: readonly Item[], asked: readonly Item[], typesOf?: (item: Item) => readonly string[]): {
|
|
20
41
|
item: Item;
|
|
21
42
|
type: string;
|
|
22
43
|
}[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{posix as
|
|
2
|
+
import{posix as b}from"node:path";import{USE_FORMS as g,isFileForm as j}from"@allyhub/formats";import{problem as v}from"@allyhub/diagnostics";export function splitReference(e){const r=e.indexOf("#");if(r<0)return{path:e};const i=e.slice(r+1);return i===""?{path:e.slice(0,r)}:{path:e.slice(0,r),part:i}}function A(e,r){const i=b.normalize(b.join(b.dirname(e),r));return i===".."||i.startsWith("../")||b.isAbsolute(r)?void 0:i}function I(e,r,i,n){const d=[];return r!==void 0&&n.lent?.has(`${e.entry}#${r}`)===!0&&d.push(g.data),n.live?.(e.kind)===!0&&d.push(g.live),d.push(...i.find(u=>u.id===e.kind)?.renders?.types??[]),d}export function resolveUses(e,r,i,n={}){const d=[],u=new Map(e.map(o=>[o.entry,o])),f=new Map(e.map(o=>[o.id,o]));for(const[o,s]of i){const c=[],l=new Set;for(const t of s){const a=t.from??o.entry,y={file:a,...t.line===void 0?{}:{line:t.line}},{path:S,part:w}=splitReference(t.of),x=A(a,S),h=x===void 0?void 0:u.get(x)??(t.types.length===1&&t.types[0]===g.data?f.get(x):void 0);if(h===void 0){d.push(v("AK-M016",`${t.of} names no item of the work list: a reference is an item's file (a table's, also its sheet's id), from the file that writes it (${a}).`,{where:y}));continue}if(h===o){d.push(v("AK-M016",`${o.entry} cannot use itself.`,{where:y}));continue}const $=I(h,w,r,n),M=t.types.find(m=>$.includes(m));if(M===void 0){const m=t.types.includes(g.data)&&w!==void 0;d.push(v("AK-M016",m&&!$.includes(g.data)?`${t.of}: ${h.entry} lends no ${w}${n.lent?`; it lends ${O(h,n.lent)||"nothing"}`:""}.`:`${t.of} is a ${h.kind}, which gives ${$.join(", ")||"nothing"}; here it is taken as ${t.types.join(", ")}.`,{where:y}));continue}const k=[t.of,a,M,t.role??""].join("\0");if(l.has(k))continue;l.add(k);const F=M===g.live?t.types.find(m=>j(m)&&$.includes(m)):void 0;c.push({of:t.of,from:a,...t.line===void 0?{}:{line:t.line},item:h.id,...w===void 0?{}:{part:w},type:M,...F===void 0?{}:{file:F},...F===void 0||t.madeFor===void 0?{}:{madeFor:[...t.madeFor]},...t.role===void 0?{}:{role:t.role}})}c.length>0&&(o.uses=c)}const p=U(e);return d.push(...p),K(e),d}function O(e,r){const i=`${e.entry}#`;return[...r].filter(n=>n.startsWith(i)).map(n=>n.slice(i.length)).join(", ")}function K(e){const r=new Map(e.map(n=>[n.id,n])),i=new Map(e.map(n=>[n.id,n.files??[{path:n.entry,role:"entry"}]]));for(const n of e){if(!n.uses)continue;const d=[...i.get(n.id)??[]],u=new Set(d.map(o=>o.path)),f=new Set([n.id]),p=o=>{if(f.has(o))return;f.add(o);const s=r.get(o);if(s){for(const c of i.get(o)??[])u.has(c.path)||(u.add(c.path),d.push({path:c.path,role:"use"}));for(const c of s.uses??[])p(c.item)}};for(const o of n.uses)p(o.item);n.files=d}}export function usersOf(e,r){return e.flatMap(i=>(i.uses??[]).filter(n=>n.item===r).map(n=>({item:i.id,use:n})))}function U(e){const r=new Map(e.map(f=>[f.id,f])),i=[],n=new Set,d=[],u=f=>{if(n.has(f.id))return;const p=d.indexOf(f.id);if(p>=0){const o=[...d.slice(p),f.id],s=r.get(d[d.length-1]??"");i.push(v("AK-M016",`${o.join(" uses ")}: an item cannot use itself through another.`,{where:{file:s?.entry??f.entry}}));return}d.push(f.id);for(const o of f.uses??[]){const s=r.get(o.item);s&&u(s)}d.pop(),n.add(f.id)};for(const f of e)u(f);return i}export function madeType(e){return j(e.type)?e.type:e.file}export function usesInOrder(e,r,i){const n=new Map(e.map(s=>[s.id,s])),d=[],u=new Set,f=new Set,p=(s,c)=>{const l=madeType(s);return l===void 0||j(s.type)||s.madeFor===void 0||c===void 0||c.some(t=>s.madeFor?.includes(t))?l:void 0},o=(s,c)=>{if(!f.has(s.id)){f.add(s.id);for(const l of s.uses??[]){const t=n.get(l.item),a=p(l,c);if(!t||a===void 0)continue;o(t,[a]);const y=`${t.id}\0${a}`;u.has(y)||(u.add(y),d.push({item:t,type:a}))}f.delete(s.id)}};for(const s of r)o(s,i?.(s));return d}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{rm as f}from"node:fs/promises";import{join as u}from"node:path";import{startBrowser as m}from"@allyhub/browser";import{kindBuildOf as w,mediaHref as b,nodeLending as v,projectItems as g,sourceOf as k,stageItem as S}from"@allyhub/build";import{CACHE_DIR as y}from"@allyhub/formats";import{CheckSession as D,ProjectError as R,pickTarget as E,parseCombo as O}from"@allyhub/project";import{RPC_ERROR as h,RpcError as c,SNAPSHOT_TREE as l}from"@allyhub/protocol";import{prepareStage as $,viewStage as C}from"@allyhub/stage";import{Routes as P}from"./routes.js";export function rpcErrorOf(o){return o instanceof R?new c(o.kind==="not-found"?h.notFound:h.invalid,o.hint?`${o.message} ${o.hint}`:o.message):o}export class Live{root;buildDir;revision=0;prep;last;lease;old=new Set;browserStarted;gpu;building=Promise.resolve();closed=!1;codes=new Map;kinds;routes;constructor(e,i){this.root=e,this.kinds=i.kinds,this.buildDir=u(e,y,"build",`dev-${String(process.pid)}`),this.gpu=i.gpu,this.routes=new P({root:e,kinds:i.kinds,buildDir:this.buildDir,revision:()=>this.revision,prepared:()=>this.prepared(),latest:()=>this.latest(),view:(t,s)=>C(e,t,s,i.kinds),recordInputs:(t,s,n)=>{i.recordInputs?.(t,s,n)}})}moved(e){this.revision=e,this.lease&&this.lease.revision!==e&&this.retire(this.lease)}prepared(){const e=this.revision;if(this.prep?.revision===e)return this.prep.promise;const i=this.building.then(()=>e===this.revision?this.build():void 0);this.building=i.catch(()=>{});const t=i.then(s=>s??this.prepared());return this.prep={revision:e,promise:t},t.catch(()=>{this.prep?.promise===t&&(this.prep=void 0)}),t}async build(){const e=await $(this.root,this.pieceDir,this.kinds);return this.last=e,e}async itemCode(e){const i=await this.item(e),t=i?await w(this.kinds.find(r=>r.id===i.kind))?.catch(()=>{}):void 0,s=t?.code?.bind(t);if(!i||!s)return{failed:!1};const n=this.codes.get(e),d=n?.revision===this.revision?n.promise:v(this.kinds,this.root).then(r=>s(i,{root:this.root,lend:r})).catch(()=>{});return this.codes.set(e,{revision:this.revision,promise:d}),await d??{failed:!0}}async item(e){const{items:i}=await g(this.root,this.kinds);return i.find(t=>t.id===e)}get pieceDir(){return u(this.buildDir,"stage")}latest(){return this.last}async target(e,i){const t=await this.prepared();try{const{piece:s,target:n}=E(t,e,i===void 0?void 0:[O(i)]);return{prepared:t,piece:s,combo:n.combo}}catch(s){throw rpcErrorOf(s)}}async componentHost(e,i){const t=await this.prepared(),s=t.docs.find(r=>r.place===e||r.file===e);if(s){if(s.components.length===0)throw new c(h.notFound,`${s.place} shows no component.`);const r=t.messages.locales[0];return{prepared:t,host:s,combo:r===void 0?{}:{lang:r}}}const{piece:n,combo:d}=await this.target(e,i);return{prepared:t,host:n,combo:d}}async source(e){const i=await this.prepared(),t=S(i,e);if(!t)throw new c(h.notFound,`No piece ${e}.`);const s=k(i,t),n={...s.media},d=(r,a)=>`${r}${b(a).slice(l.media.length)}`;return await Promise.all(Object.entries(n).map(async([r,a])=>{let p=a;a.kind==="video"&&a.matte===!0&&(p={...p,matteUrl:d(l.matte,r)}),n[r]=await this.routes.mediaOf(r,p)})),{...s,media:n}}browser(){return this.browserStarted??=m(this.gpu===void 0?{}:{gpu:this.gpu}),this.browserStarted}async withSession(e){this.refuseStopped();let i=this.lease;if(i?.revision!==this.revision){i&&this.retire(i);const t=await this.browser();if(this.refuseStopped(),i=this.lease,i?.revision!==this.revision){i&&this.retire(i);const s={revision:this.revision,session:this.prepared().then(n=>D.open({root:this.root,kinds:this.kinds,browser:t,prepared:n})),users:0,retired:!1};i=s,this.lease=s,s.session.catch(()=>{this.lease===s&&(this.lease=void 0)})}}i.users++;try{return await e(await i.session)}finally{i.users--,i.retired&&i.users===0&&this.end(i)}}refuseStopped(){if(this.closed)throw new c(h.unavailable,"allyhub dev is stopping.")}retire(e){e.retired=!0,this.lease===e&&(this.lease=void 0),this.old.add(e),e.users===0&&this.end(e)}end(e){return e.ended??=(async()=>{this.old.delete(e),await e.session.then(i=>i.close()).catch(()=>{})})(),e.ended}async close(){this.closed=!0;const e=[...this.old,...this.lease?[this.lease]:[]];this.lease&&this.retire(this.lease),await Promise.all(e.map(i=>this.end(i))),await this.browserStarted?.then(i=>i.close()).catch(()=>{}),await this.building,await f(this.buildDir,{recursive:!0,force:!0})}}
|
|
2
|
+
import{rm as f}from"node:fs/promises";import{join as u}from"node:path";import{startBrowser as m}from"@allyhub/browser";import{kindBuildOf as w,mediaHref as b,nodeLending as v,projectItems as g,sourceOf as k,stageItem as S}from"@allyhub/build";import{CACHE_DIR as y}from"@allyhub/formats";import{CheckSession as D,ProjectError as R,pickTarget as E,parseCombo as O}from"@allyhub/project";import{RPC_ERROR as h,RpcError as c,SNAPSHOT_TREE as l}from"@allyhub/protocol";import{prepareStage as $,viewStage as C}from"@allyhub/stage";import{Routes as P}from"./routes.js";export function rpcErrorOf(o){return o instanceof R?new c(o.kind==="not-found"?h.notFound:h.invalid,o.hint?`${o.message} ${o.hint}`:o.message):o}export class Live{root;buildDir;revision=0;prep;last;lease;old=new Set;browserStarted;gpu;building=Promise.resolve();closed=!1;codes=new Map;kinds;routes;constructor(e,i){this.root=e,this.kinds=i.kinds,this.buildDir=u(e,y,"build",`dev-${String(process.pid)}`),this.gpu=i.gpu,this.routes=new P({root:e,kinds:i.kinds,buildDir:this.buildDir,revision:()=>this.revision,prepared:()=>this.prepared(),latest:()=>this.latest(),view:(t,s)=>C(e,t,s,i.kinds),recordInputs:(t,s,n)=>{i.recordInputs?.(t,s,n)}})}moved(e){this.revision=e,this.lease&&this.lease.revision!==e&&this.retire(this.lease)}prepared(){const e=this.revision;if(this.prep?.revision===e)return this.prep.promise;const i=this.building.then(()=>e===this.revision?this.build():void 0);this.building=i.catch(()=>{});const t=i.then(s=>s??this.prepared());return this.prep={revision:e,promise:t},t.catch(()=>{this.prep?.promise===t&&(this.prep=void 0)}),t}async build(){const e=await $(this.root,this.pieceDir,this.kinds);return this.last=e,e}async itemCode(e){const i=await this.item(e),t=i?await w(this.kinds.find(r=>r.id===i.kind))?.catch(()=>{}):void 0,s=t?.code?.bind(t);if(!i||!s)return{failed:!1};const n=this.codes.get(e),d=n?.revision===this.revision?n.promise:v(this.kinds,this.root).then(r=>s(i,{root:this.root,lend:r})).catch(()=>{});return this.codes.set(e,{revision:this.revision,promise:d}),await d??{failed:!0}}async item(e){const{items:i}=await g(this.root,this.kinds);return i.find(t=>t.id===e)}get pieceDir(){return u(this.buildDir,"stage")}latest(){return this.last}async target(e,i){const t=await this.prepared();try{const{piece:s,target:n}=E(t,e,i===void 0?void 0:[O(i)]);return{prepared:t,piece:s,combo:n.combo}}catch(s){throw rpcErrorOf(s)}}async componentHost(e,i){const t=await this.prepared(),s=t.docs.find(r=>r.place===e||r.file===e);if(s){if(s.components.length===0)throw new c(h.notFound,`${s.place} shows no component.`);const r=t.messages.locales[0];return{prepared:t,host:s,combo:r===void 0?{}:{lang:r}}}const{piece:n,combo:d}=await this.target(e,i);return{prepared:t,host:n,combo:d}}async source(e){const i=await this.prepared(),t=S(i,e);if(!t)throw new c(h.notFound,`No piece ${e}.`);const s=k(i,t),n={...s.media},d=(r,a)=>`${r}${b(a).slice(l.media.length)}`;return await Promise.all(Object.entries(n).map(async([r,a])=>{let p=a;a.kind==="video"&&a.matte===!0&&(p={...p,matteUrl:d(l.matte,r)}),n[r]=await this.routes.mediaOf(r,p)})),{...s,media:n}}browser(){return this.refuseStopped(),this.browserStarted??=m(this.gpu===void 0?{}:{gpu:this.gpu}),this.browserStarted}async withSession(e){this.refuseStopped();let i=this.lease;if(i?.revision!==this.revision){i&&this.retire(i);const t=await this.browser();if(this.refuseStopped(),i=this.lease,i?.revision!==this.revision){i&&this.retire(i);const s={revision:this.revision,session:this.prepared().then(n=>D.open({root:this.root,kinds:this.kinds,browser:t,prepared:n})),users:0,retired:!1};i=s,this.lease=s,s.session.catch(()=>{this.lease===s&&(this.lease=void 0)})}}i.users++;try{return await e(await i.session)}finally{i.users--,i.retired&&i.users===0&&this.end(i)}}refuseStopped(){if(this.closed)throw new c(h.unavailable,"allyhub dev is stopping.")}retire(e){e.retired=!0,this.lease===e&&(this.lease=void 0),this.old.add(e),e.users===0&&this.end(e)}end(e){return e.ended??=(async()=>{this.old.delete(e),await e.session.then(i=>i.close()).catch(()=>{})})(),e.ended}async close(){this.closed=!0;const e=[...this.old,...this.lease?[this.lease]:[]];this.lease&&this.retire(this.lease),await Promise.all(e.map(i=>this.end(i))),await this.browserStarted?.then(i=>i.close()).catch(()=>{}),await this.building,await f(this.buildDir,{recursive:!0,force:!0})}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{readdir as ee,realpath as te,stat as oe}from"node:fs/promises";import{setTimeout as se}from"node:timers/promises";import{join as
|
|
2
|
+
import{readdir as ee,realpath as te,stat as oe}from"node:fs/promises";import{setTimeout as se}from"node:timers/promises";import{join as S,relative as ie,sep as ne}from"node:path";import{openPage as ae}from"@allyhub/browser";import{KeyedStore as re}from"@allyhub/project";import{NEVER_CANCELLED as ce}from"@allyhub/extension-api";import{COMPONENT_STILLS_MAX as U,KindSnapshotSchema as fe,RpcError as z,SNAPSHOT_TREE as b,pieceSourcePath as de,snapshotAnswerPath as T,snapshotPreviewPath as le,stillPath as H,stillsIndexKey as ue,stillsIndexPath as me}from"@allyhub/protocol";import{runtimeFiles as pe}from"@allyhub/stage-page";import{itemPreview as he}from"./card.js";import{kindContext as we,kindItem as ge}from"./kinds.js";import{USE_FORMS as ye,mediaTypeOf as A}from"@allyhub/formats";import{Reach as be,pieceBundle as $e,pieceNames as Se,reachedCheck as ke,reachedSource as Ee}from"./reach.js";import{matteFile as je}from"./tree.js";const Pe="assets/";export const PAGE_RECORDING={width:1440,height:900,timeout:3e4,settle:1500};const x="https://tree.invalid/";function I(n){return typeof n=="string"?n.startsWith(x)?n.slice(x.length):n:Array.isArray(n)?n.map(I):n!==null&&typeof n=="object"?Object.fromEntries(Object.entries(n).map(([$,r])=>[$,I(r)])):n}const P=n=>new TextEncoder().encode(JSON.stringify(n));async function V(n){return(await ee(n,{recursive:!0,withFileTypes:!0}).catch(()=>[])).filter(r=>r.isFile()).map(r=>ie(n,S(r.parentPath,r.name)).split(ne).join("/"))}const ve=n=>oe(n).then($=>$.isFile(),()=>!1);export async function recordTree(n,$={}){const{project:r}=n,{live:l,root:w}=r;await r.watcher.settled();const g=new Map,m=(e,t,o=A(e))=>{g.set(e,{path:e,type:o,file:t})},N=(e,t)=>{g.set(e,{path:e,type:A(e),file:t,immutable:!0})},k=(e,t,o=A(e))=>{g.set(e,{path:e,type:o,bytes:t})},_=async(e,t)=>{for(const o of await V(t))m(`${e}${o}`,S(t,o))},X=l.revision,c=await l.prepared(),R=new Map;if(n.ui!==void 0)for(const e of await V(n.ui))(e.startsWith(Pe)?N:m)(`${b.editor}${e}`,S(n.ui,e));for(const[e,t]of await pe())m(`${b.runtime}${e}`,t);const O=async(e,t)=>{let o;try{o={result:I(await r.tool(e,t,{tree:x}))}}catch(i){o={error:i instanceof z?{code:i.code,message:i.message}:{code:-32603,message:i instanceof Error?i.message:""}}}const a=T(e,t);k(a,P(o));const f=t.item;return typeof f=="string"&&R.set(f,[...R.get(f)??[],a]),o},q=we(w,e=>r.hasTool(e),async(e,t)=>{const o=await O(e,t);if(o.error)throw new z(o.error.code,o.error.message);return o.result}),Q=async(e,t,o)=>{const a=new Map;for(const s of o)a.set(ue(s),s);if(a.size===0)return;const f=re.of(w,"stills"),i={stills:{}},j=u.of(e),p=[...a];for(let s=0;s<p.length;s+=U){const y=p.slice(s,s+U);(await r.tool("components/stills",{item:e,...t===""?{}:{version:t},components:y.map(([,h])=>h)},{tree:x}).catch(()=>{}))?.stills.forEach((h,Z)=>{const K=y[Z]?.[0];!h||K===void 0||(i.stills[K]=h.key,m(H(h.key),f.path(`${h.key}.webp`),"image/webp"),j?.tree.add(H(h.key)))})}const d=me(e,t);k(d,P(i),"application/json"),j?.tree.add(d)},C=(await O("project/items",{})).result,v=(C?.items??[]).filter(e=>e.kind!==void 0),Y=new Map(c.items.map(e=>[e.id,e.files])),u=new be(v.map(e=>({...e,files:Y.get(e.id)??e.files})),c.files,(c.bundle?.beside??[]).map(e=>`${b.build}${e}`)),E=r.checker?.state,D=E===void 0||E.status==="waiting"||E.status==="running"?{status:"off",revision:l.revision,problems:E?.problems??[],facts:E?.facts??[]}:E;k(T("check/results",{}),P({result:D}));for(const e of u.items){const t=u.of(e),o=new Set(c.pieces.filter(i=>i.place===e).map(i=>i.id)),a=v.find(i=>i.id===e)?.entry,f=i=>i===a||u.itemsOf(i).includes(e);t?.own.push({path:T("project/items",{}),type:"application/json",bytes:P({result:{...C,items:v.filter(i=>i.id===e)}})},{path:T("check/results",{}),type:"application/json",bytes:P({result:ke(D,o,f)})})}for(const e of c.bundle?.chunks.files??[])N(`${b.build}${e}`,S(l.pieceDir,e));for(const e of c.bundle?.beside??[])await _(`${b.build}${e}`,S(l.pieceDir,e));const F=new Set(Object.keys(c.media));for(const e of Object.keys(c.media)){const t=je(w,c.media[e]);t!==void 0&&await ve(t)&&m(`${b.matte}${e}`,t,"video/mp4")}const L=new Map,W=new Map,B=e=>({file:(t,o,a)=>{m(`${e}${t}`,o,a)},folder:(t,o)=>_(`${e}${t}`,o),bytes:(t,o,a)=>{k(`${e}${t}`,o,a)},media:t=>{F.add(t)}});for(const e of v){const t=await r.extensions?.kindProvider(e.kind);if(!t?.snapshot)continue;const o=await Promise.resolve(t.snapshot(ge(e),q,ce)).catch(()=>{}),a=fe.safeParse(o??{});if(!a.success)continue;const{stills:f,shows:i,routes:j,page:p}=a.data;p&&L.set(e.id,{...p.folder===void 0?{}:{folder:p.folder},...p.file===void 0?{}:{file:p.file}}),i&&W.set(e.id,{media:new Set(i.media),data:new Set(i.data)});for(const d of f??[])await O("components/stage",{item:e.id,version:d.version}),d.version===""&&await O("components/stage",{item:e.id}),await Q(e.id,d.version,d.components);for(const[d,s]of Object.entries(j??{})){const y=await l.routes.route(d).catch(()=>{});if(y?.route.recordItem)for(const M of s)await y.route.recordItem(M,B(d),y.context).catch(()=>{})}}for(const e of F)m(`${b.media}${e}`,S(w,e));for(const[e,t]of L){const o=await r.tool("items/page",{item:e,...t}).catch(()=>{});if(!o)continue;const a=new URL(o.url).origin,f=await ae(await l.browser(),{width:PAGE_RECORDING.width,height:PAGE_RECORDING.height,allow:i=>i===a||i.startsWith(`${a}/`)}).catch(()=>{});if(f)try{await f.goto(o.url,{timeoutMs:PAGE_RECORDING.timeout}),await f.evaluate("document.fonts.ready.then(() => true)",{timeoutMs:PAGE_RECORDING.timeout}),await se(PAGE_RECORDING.settle)}catch{}finally{await f.close()}}for(const e of u.items){const t=u.of(e);if(t)for(const o of r.inputs.of(e))if(o===""||o.endsWith("/"))for(const a of c.files)a.startsWith(o)&&t.files.add(a);else c.files.includes(o)&&t.files.add(o)}for(const e of l.routes.specs.keys()){const t=await l.routes.route(e).catch(()=>{});t?.route.record&&await t.route.record(B(e),t.context).catch(()=>{})}const G=[w,await te(w).catch(()=>w)];for(const e of c.pieces){const t=await l.source(e.id).catch(()=>{});if(!t)continue;const o=[e,...c.pieces.filter(s=>Me(c.items,e.place).has(s.place))],a=o.map(s=>({p:s,bundle:$e(c.bundle?.chunks,s.id)})),f={files:new Set(a.flatMap(s=>[...s.bundle.files])),modules:new Set(a.flatMap(s=>[...s.bundle.modules]))},i={media:new Set,data:new Set};for(const{p:s,bundle:y}of a){const M=Se({prepared:c,piece:s,reach:u,modules:y.modules,roots:G,reads:r.checker?.reads.get(s.id),shows:W.get(s.place)});for(const h of M.media)i.media.add(h);for(const h of M.data)i.data.add(h)}const j=c.pieces.filter(s=>!o.includes(s)&&!G.some(y=>f.modules.has(S(y,s.file)))).map(s=>s.id),p=de(e.id);k(p,P(Ee(t,i,j)));const d=u.of(e.place);if(d){d.tree.add(p);for(const s of f.files)d.tree.add(`${b.build}${s}`);for(const s of i.media)d.tree.add(`${b.media}${s}`),d.tree.add(`${b.matte}${s}`),d.files.add(s)}}for(const[e,t]of R)for(const o of t)u.of(e)?.tree.add(o);for(const e of c.docs)for(const t of e.shows)u.of(e.place)?.files.add(t);for(const e of c.sheets)for(const t of e.files)u.of(e.place)?.files.add(t);const J=$.preview===!1?void 0:$.preview??(e=>he(n,e));if(J)for(const e of v){const t=await J(e).catch(()=>{});if(t===void 0)continue;const o=le(e.id);k(o,Buffer.from(JSON.stringify(t)),"application/json"),u.of(e.id)?.tree.add(o)}return{revision:X,files:[...g.values()],reach:u.done(new Set(g.keys())),routes:l.routes.loads()}}function Me(n,$){const r=new Map(n.map(g=>[g.id,g])),l=new Set,w=g=>{for(const m of r.get(g)?.uses??[])m.type===ye.live&&!l.has(m.item)&&(l.add(m.item),w(m.item))};return w($),l}
|