allyhub 0.15.2 → 0.16.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/CHANGELOG.md +16 -0
- package/dist/commands/add.js +1 -1
- package/dist/commands/cloud-tools.js +1 -1
- package/dist/commands/dev.js +6 -2
- package/dist/commands/doctor.js +3 -3
- package/dist/commands/frames/doc.js +1 -1
- package/dist/commands/inspect/common.js +3 -3
- package/dist/commands/inspect/facts.js +2 -2
- package/dist/commands/inspect/layout.js +1 -1
- package/dist/commands/mail.js +6 -6
- package/dist/commands/render.js +1 -1
- package/dist/main.js +8 -8
- package/dist/node_modules/@allyhub/3d-extension/dist/cli/scenery-text.js +2 -2
- 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/browser/package.json +1 -1
- package/dist/node_modules/@allyhub/build/dist/file-check.d.ts +2 -2
- package/dist/node_modules/@allyhub/build/dist/index.d.ts +1 -1
- package/dist/node_modules/@allyhub/build/dist/inspect-view.d.ts +1 -1
- package/dist/node_modules/@allyhub/build/dist/inspect-view.js +1 -1
- package/dist/node_modules/@allyhub/build/dist/prepare.js +3 -3
- package/dist/node_modules/@allyhub/build/dist/work.d.ts +9 -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-extension/skills/allyhub/references/canvas.md +2 -2
- 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/blobs.js +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/client.d.ts +12 -3
- package/dist/node_modules/@allyhub/cloud/dist/client.js +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/index.d.ts +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/index.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/deletion.js +2 -0
- package/dist/node_modules/@allyhub/dev-server/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/inputs.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/project.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/record.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/writer.js +3 -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/package.json +1 -1
- package/dist/node_modules/@allyhub/doc-extension/dist/inspect.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/website.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/items.d.ts +30 -4
- package/dist/node_modules/@allyhub/formats/dist/items.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/layout.d.ts +15 -4
- package/dist/node_modules/@allyhub/formats/dist/layout.js +1 -1
- package/dist/node_modules/@allyhub/formats/package.json +1 -1
- package/dist/node_modules/@allyhub/i18n/dist/index.js +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/dist/tools.js +1 -1
- package/dist/node_modules/@allyhub/image-extension/dist/workspace.js +1 -1
- package/dist/node_modules/@allyhub/image-extension/package.json +2 -2
- package/dist/node_modules/@allyhub/image-extension/skills/allyhub/references/images.md +3 -3
- 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/dist/load.js +2 -2
- 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-extension/skills/allyhub/references/linkedin.md +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/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/LICENSE +241 -0
- package/dist/node_modules/@allyhub/office-extension/markup/csv/allyhub.yaml +2 -0
- package/dist/node_modules/@allyhub/office-extension/markup/csv/data/leads.csv +5 -0
- package/dist/node_modules/@allyhub/office-extension/markup/csv/markup.json +19 -0
- package/dist/node_modules/@allyhub/office-extension/markup/document/allyhub.yaml +2 -0
- package/dist/node_modules/@allyhub/office-extension/markup/document/briefs/launch.docx +0 -0
- package/dist/node_modules/@allyhub/office-extension/markup/document/markup.json +11 -0
- package/dist/node_modules/@allyhub/office-extension/markup/presentation/allyhub.yaml +2 -0
- package/dist/node_modules/@allyhub/office-extension/markup/presentation/decks/pitch.pptx +0 -0
- package/dist/node_modules/@allyhub/office-extension/markup/presentation/markup.json +11 -0
- package/dist/node_modules/@allyhub/office-extension/markup/workbook/allyhub.yaml +2 -0
- package/dist/node_modules/@allyhub/office-extension/markup/workbook/data/plans.xlsx +0 -0
- package/dist/node_modules/@allyhub/office-extension/markup/workbook/markup.json +10 -0
- package/dist/node_modules/@allyhub/office-extension/package.json +124 -0
- package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
- package/dist/node_modules/@allyhub/piece/dist/source.d.ts +2 -0
- 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/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 +10 -5
- package/dist/node_modules/@allyhub/protocol/dist/account.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/auth.d.ts +7 -0
- package/dist/node_modules/@allyhub/protocol/dist/auth.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/blobs.d.ts +9 -0
- package/dist/node_modules/@allyhub/protocol/dist/blobs.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/cli.d.ts +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/cli.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/cloud-computer.d.ts +77 -0
- package/dist/node_modules/@allyhub/protocol/dist/cloud-computer.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +39 -9
- package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +15 -15
- package/dist/node_modules/@allyhub/protocol/dist/events.d.ts +441 -5
- package/dist/node_modules/@allyhub/protocol/dist/events.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/files.d.ts +2 -2
- package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/index.d.ts +8 -0
- package/dist/node_modules/@allyhub/protocol/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/jobs.d.ts +5 -5
- package/dist/node_modules/@allyhub/protocol/dist/kinds.d.ts +15 -0
- package/dist/node_modules/@allyhub/protocol/dist/kinds.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/paywall.d.ts +134 -0
- package/dist/node_modules/@allyhub/protocol/dist/paywall.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/place.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/presence.d.ts +3 -3
- package/dist/node_modules/@allyhub/protocol/dist/purposes.d.ts +47 -0
- package/dist/node_modules/@allyhub/protocol/dist/purposes.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/routes.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/shares.d.ts +52 -5
- package/dist/node_modules/@allyhub/protocol/dist/shares.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/sidebar-deletion.d.ts +34 -0
- package/dist/node_modules/@allyhub/protocol/dist/sidebar-deletion.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/sites.d.ts +1 -0
- package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +21 -52
- package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/studio-server.d.ts +264 -0
- package/dist/node_modules/@allyhub/protocol/dist/studio-server.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/studio-tool-calls.d.ts +18 -0
- package/dist/node_modules/@allyhub/protocol/dist/studio-tool-calls.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/studio-window-requests.d.ts +97 -0
- package/dist/node_modules/@allyhub/protocol/dist/studio-window-requests.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/teams.d.ts +3 -2
- package/dist/node_modules/@allyhub/protocol/dist/teams.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +20 -20
- package/dist/node_modules/@allyhub/protocol/dist/turns.d.ts +71 -0
- package/dist/node_modules/@allyhub/protocol/dist/turns.js +2 -0
- 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/package.json +1 -1
- package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
- package/dist/node_modules/@allyhub/scaffold/dist/index.js +4 -4
- 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/package.json +1 -1
- package/dist/node_modules/@allyhub/sheet-extension/dist/cli/sheet.js +1 -1
- package/dist/node_modules/@allyhub/sheet-extension/package.json +3 -3
- package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-extension/dist/cli/slides.js +2 -2
- package/dist/node_modules/@allyhub/slides-extension/package.json +2 -2
- package/dist/node_modules/@allyhub/slides-pptx/dist/audio-icon.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/package.json +5 -1
- package/dist/node_modules/@allyhub/slides-runtime/dist/draw.js +1 -1
- package/dist/node_modules/@allyhub/slides-runtime/dist/slide-css.js +20 -0
- 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/runtime/stage.html +1 -1
- package/dist/node_modules/@allyhub/stage-page/dist/runtime/stage.js +2 -2
- package/dist/node_modules/@allyhub/stage-page/package.json +1 -1
- package/dist/node_modules/@allyhub/stage-runtime/dist/runtime.js +15 -15
- package/dist/node_modules/@allyhub/stage-runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/telemetry/dist/doc.js +17 -2
- package/dist/node_modules/@allyhub/telemetry/dist/level.js +2 -2
- package/dist/node_modules/@allyhub/telemetry/dist/levels.js +2 -0
- package/dist/node_modules/@allyhub/telemetry/dist/scrub.js +1 -1
- package/dist/node_modules/@allyhub/telemetry/package.json +5 -1
- package/dist/node_modules/@allyhub/text-extension/markup/markup.json +1 -1
- package/dist/node_modules/@allyhub/text-extension/markup-file/allyhub.yaml +2 -0
- package/dist/node_modules/@allyhub/text-extension/markup-file/archive/assets.zip +0 -0
- package/dist/node_modules/@allyhub/text-extension/markup-file/markup.json +10 -0
- package/dist/node_modules/@allyhub/text-extension/package.json +35 -1
- package/dist/node_modules/@allyhub/video-core/package.json +1 -1
- package/dist/node_modules/@allyhub/video-extension/dist/cli/reference-text.js +3 -3
- package/dist/node_modules/@allyhub/video-extension/package.json +2 -2
- 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-extension/skills/allyhub/references/x.md +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 +13 -12
- package/dist/project.js +1 -1
- package/dist/telemetry.js +3 -3
- package/dist/text/console-text.js +2 -2
- package/editor-web/assets/{abnfDiagram-WEYOIA3C-9z0ZEYUq.js → abnfDiagram-WEYOIA3C-B1AxOB-Y.js} +1 -1
- package/editor-web/assets/{architecture-WOLXFQ4H-ELMO_PA6.js → architecture-WOLXFQ4H-C-7xKJ2Z.js} +1 -1
- package/editor-web/assets/{architectureDiagram-ZHVYKT53-C0yuCWU3.js → architectureDiagram-ZHVYKT53-CyWb8_iD.js} +1 -1
- package/editor-web/assets/arrow-down-B8VUPCGi.js +1 -0
- package/editor-web/assets/arrow-up-Ds4juY8X.js +1 -0
- package/editor-web/assets/article-CTKW7Eo0.js +7 -0
- package/editor-web/assets/article-qt4W_BKH.js +3 -0
- package/editor-web/assets/{audio-lines-1s1eRs4Q.js → audio-lines-PZj77e7t.js} +1 -1
- package/editor-web/assets/bar-button-J9vbfzTx.js +1 -0
- package/editor-web/assets/{blockDiagram-RJAE7QA3-vi6JOg4o.js → blockDiagram-RJAE7QA3-uii4-7Ix.js} +4 -4
- package/editor-web/assets/browser-C1XuTMlp.js +1 -0
- package/editor-web/assets/{c4Diagram-XDPPPE54-Agf_H8uS.js → c4Diagram-XDPPPE54-BtL5Z-wF.js} +1 -1
- package/editor-web/assets/channel-dEO-yacZ.js +1 -0
- package/editor-web/assets/chart-amT4lgX3.js +2 -0
- package/editor-web/assets/chart-file-HE-uXGmJ.js +1 -0
- package/editor-web/assets/{chart-no-axes-column-CJmeYOSo.js → chart-no-axes-column-Be0lFcGF.js} +1 -1
- package/editor-web/assets/{chunk-2E7WHVMD-XalaZaha.js → chunk-2E7WHVMD-BJjuZYBs.js} +1 -1
- package/editor-web/assets/{chunk-4EMNKR2T-DUlRZkCS.js → chunk-4EMNKR2T-nzPdUHaI.js} +1 -1
- package/editor-web/assets/{chunk-55XCU76K-DTa7whGr.js → chunk-55XCU76K-CH52E3Nl.js} +1 -1
- package/editor-web/assets/{chunk-7S6XSTFO-85zCPzj0.js → chunk-7S6XSTFO-Ba4LNKCV.js} +1 -1
- package/editor-web/assets/{chunk-AQDTSKZB-CWBseIyh.js → chunk-AQDTSKZB-Co9SmoqD.js} +1 -1
- package/editor-web/assets/chunk-DSNLSHJZ-BHRvxRGi.js +127 -0
- package/editor-web/assets/{chunk-HAGFOTED-DFWda2Rk.js → chunk-HAGFOTED-F5Wd8ETY.js} +1 -1
- package/editor-web/assets/{chunk-HNE4Q36P-aXibFitC.js → chunk-HNE4Q36P-C_E0__p9.js} +1 -1
- package/editor-web/assets/{chunk-NQOKRVIF-CtJUuFdN.js → chunk-NQOKRVIF-BvrtbbWm.js} +17 -17
- package/editor-web/assets/{chunk-UHW7PFBP-B6QKSKWE.js → chunk-UHW7PFBP-D0HTPXRF.js} +1 -1
- package/editor-web/assets/{chunk-VQ5W62QI-CF6Al55P.js → chunk-VQ5W62QI-B9hF2YMk.js} +1 -1
- package/editor-web/assets/{chunk-WQQL4CDK-w2TKLkyw.js → chunk-WQQL4CDK-D7N3o-Ub.js} +1 -1
- package/editor-web/assets/{chunk-YZO67HFG-DVGOATM3.js → chunk-YZO67HFG-XaLSrI_W.js} +1 -1
- package/editor-web/assets/{chunk-ZAUX2LTX-Cq7MMjDP.js → chunk-ZAUX2LTX-sXc6qmw-.js} +1 -1
- package/editor-web/assets/{chunk-ZCHMQSOR-GMW_lBh4.js → chunk-ZCHMQSOR-B0X6sNMX.js} +1 -1
- package/editor-web/assets/{classDiagram-v2-4MYWR3UA-C7AK5Bkj.js → classDiagram-v2-4MYWR3UA-CjXVvOUp.js} +7 -7
- package/editor-web/assets/code-CD-CbJG9.js +1 -0
- package/editor-web/assets/collaborator-BU4qU7O3.js +1 -0
- package/editor-web/assets/{copy-DvOiv9Ra.js → copy-CuJSs0nI.js} +1 -1
- package/editor-web/assets/{createLucideIcon-REX213UO.js → createLucideIcon-lm_6n8YT.js} +1 -1
- package/editor-web/assets/csv-Bwre9FdI.js +11 -0
- package/editor-web/assets/{cynefin-EF2NZ3EQ-ZnDieQsN.js → cynefin-EF2NZ3EQ-PQ9VyM9v.js} +1 -1
- package/editor-web/assets/{cynefinDiagram-WF24UDRP-BrukKIBF.js → cynefinDiagram-WF24UDRP-KXuXFAhX.js} +1 -1
- package/editor-web/assets/{dagre-NK4GIZVX-DfO0S2p_.js → dagre-NK4GIZVX-CBTyfYD5.js} +1 -1
- package/editor-web/assets/deck-C-p17098.js +1 -0
- package/editor-web/assets/{diagram-CBK3MWTC-D43RLesi.js → diagram-CBK3MWTC-CsVO64Bf.js} +1 -1
- package/editor-web/assets/{diagram-I5XIIV2D-bA1B1QQG.js → diagram-I5XIIV2D-fzbUm1St.js} +1 -1
- package/editor-web/assets/{diagram-ODIL2UCW-DAdXBD2K.js → diagram-ODIL2UCW-up6ihgN5.js} +1 -1
- package/editor-web/assets/{diagram-PFBEJUXE-C_KyEaws.js → diagram-PFBEJUXE-T6hVBoCD.js} +1 -1
- package/editor-web/assets/{diagram-RJA3I4VV-oXTtENF7.js → diagram-RJA3I4VV-BDntFeuR.js} +1 -1
- package/editor-web/assets/{diagram-TYUNFSNR-Czupe6mO.js → diagram-TYUNFSNR-Dv1-mqbf.js} +16 -16
- package/editor-web/assets/dist-B-lYrbqX.js +43 -0
- package/editor-web/assets/dist-B94TkgAP.js +18 -0
- package/editor-web/assets/dist-BW8IR8bR.js +17 -0
- package/editor-web/assets/dist-Ba5Kv4A-.js +4 -0
- package/editor-web/assets/{dist-BrGYx10E.js → dist-Bd8IxQPP.js} +1 -1
- package/editor-web/assets/dist-Bfs4cZI_.js +24 -0
- package/editor-web/assets/dist-C66KgS8g.js +19 -0
- package/editor-web/assets/dist-CBeeIAlh.js +1 -0
- package/editor-web/assets/dist-CHKVUdcE.js +16 -0
- package/editor-web/assets/dist-CWXGbcPB.js +3 -0
- package/editor-web/assets/{dist-2lNSE-G_.js → dist-D3C6FyrO.js} +1 -1
- package/editor-web/assets/dist-DhMagA-B.js +5 -0
- package/editor-web/assets/{dist-BtRMClDw.js → dist-DruvDNQe.js} +1 -1
- package/editor-web/assets/dist-DxcrMrCR.js +6 -0
- package/editor-web/assets/dist-DzjSp2i2.js +17 -0
- package/editor-web/assets/dist-_ooK0TT9.js +1 -0
- package/editor-web/assets/{dist-BPecIPz6.js → dist-aTV6Rwon.js} +134 -134
- package/editor-web/assets/dist-mrWPE-br.js +1 -0
- package/editor-web/assets/docx-draw-CeiLkccT.js +4 -0
- package/editor-web/assets/docx-preview-pcg9ioe3.js +21 -0
- package/editor-web/assets/{ebnfDiagram-V4P3TTPT-BOhNZmtp.js → ebnfDiagram-V4P3TTPT-CZzljBYN.js} +1 -1
- package/editor-web/assets/{elk-QONTBCTQ-DoZH3OoE.js → elk-QONTBCTQ-6vNb82av.js} +1 -1
- package/editor-web/assets/{erDiagram-KYQIGQAA-Bv0KDJi4.js → erDiagram-KYQIGQAA-B8smxURG.js} +2 -2
- package/editor-web/assets/esm-CNi9O1ya.js +21 -0
- package/editor-web/assets/{eventmodeling-K75KTNOO-C-_xzqfj.js → eventmodeling-K75KTNOO-CngIhoUF.js} +1 -1
- package/editor-web/assets/{file-exclamation-point-C_fX4fpI.js → file-exclamation-point-_L3ElCJ5.js} +1 -1
- package/editor-web/assets/file-question-mark-DlIjUK37.js +1 -0
- package/editor-web/assets/flowDiagram-IUGLLWBU-CL0AVU4Y.js +1 -0
- package/editor-web/assets/{ganttDiagram-R7GPNTJY-CAuJlaZX.js → ganttDiagram-R7GPNTJY-BtzqHUiP.js} +1 -1
- package/editor-web/assets/{gitGraph-VSP46ZUC-Dx2xLi5C.js → gitGraph-VSP46ZUC-DOOpoQDh.js} +1 -1
- package/editor-web/assets/{gitGraphDiagram-PDYL7XHY-DHsk_UOT.js → gitGraphDiagram-PDYL7XHY-Cu4T8UUo.js} +1 -1
- package/editor-web/assets/{group-pebHQTdP.js → group-BdrTp7gi.js} +1 -1
- package/editor-web/assets/hint-rlht0uxG.js +1 -0
- package/editor-web/assets/index-BCjGdcPh.js +28 -0
- package/editor-web/assets/index-D9ng69En.css +2 -0
- package/editor-web/assets/{info-OHQRW6UA-CnKQHx5m.js → info-OHQRW6UA-CiNozx0c.js} +1 -1
- package/editor-web/assets/{infoDiagram-MVDRKAX5-ibAVFw_2.js → infoDiagram-MVDRKAX5-A3mxzTmc.js} +1 -1
- package/editor-web/assets/{ishikawaDiagram-HPEHV2GE-C1OCHt3y.js → ishikawaDiagram-HPEHV2GE-CIbVgY0Z.js} +1 -1
- package/editor-web/assets/iso-ahTwmFwH.js +56 -0
- package/editor-web/assets/{italic-CtlNOXN9.js → italic-zw4_eUNF.js} +1 -1
- package/editor-web/assets/{journeyDiagram-BOSHW7O7-BDdqMOM1.js → journeyDiagram-BOSHW7O7-BwPXFmyS.js} +1 -1
- package/editor-web/assets/{kanban-definition-FNSA4HC5-CSAS_zGn.js → kanban-definition-FNSA4HC5-biRlEeb1.js} +4 -4
- package/editor-web/assets/{link-CW2KxKT_.js → link-DopSU3aa.js} +1 -1
- package/editor-web/assets/{mermaid-parser.core-DTLyYXbn.js → mermaid-parser.core-ikwPmNne.js} +3 -3
- package/editor-web/assets/mermaid.core-B4GR7QVa.js +44 -0
- package/editor-web/assets/{mindmap-definition-6OY57UG3-DSWHcglH.js → mindmap-definition-6OY57UG3-BN8aiUmO.js} +3 -3
- package/editor-web/assets/minus-CbPnUIOy.js +1 -0
- package/editor-web/assets/{packet-JDAUHWVQ-_k1BF29s.js → packet-JDAUHWVQ-DWesZv6p.js} +1 -1
- package/editor-web/assets/{pegDiagram-ECIUJNBX-B22YyWAa.js → pegDiagram-ECIUJNBX-Bh3QEAL_.js} +1 -1
- package/editor-web/assets/{pie-XZMESJXO-CSwV32hj.js → pie-XZMESJXO-DT1ANL51.js} +1 -1
- package/editor-web/assets/{pieDiagram-GNMPY74T-rSFNeWnq.js → pieDiagram-GNMPY74T-xXxgiv6O.js} +1 -1
- package/editor-web/assets/progress-CwKcXARv.js +6 -0
- package/editor-web/assets/props-form-BwZY8ZWd.js +1 -0
- package/editor-web/assets/purify.es-B9ve_eFf.js +3 -0
- package/editor-web/assets/{quadrantDiagram-D57K4MC3-Xrntfg4j.js → quadrantDiagram-D57K4MC3-BGzRd8iZ.js} +1 -1
- package/editor-web/assets/{radar-ABXABTNO-Dwq5qiNw.js → radar-ABXABTNO-C-rmMB0D.js} +1 -1
- package/editor-web/assets/{railroad-I3PHUGI6-sIUGWcZh.js → railroad-I3PHUGI6-CvLOq2i8.js} +1 -1
- package/editor-web/assets/{railroad-abnf-LNEFI6M7-1rWlT9BX.js → railroad-abnf-LNEFI6M7-DMsb025s.js} +1 -1
- package/editor-web/assets/{railroad-ebnf-DWYD2UWJ-DWdkzEHc.js → railroad-ebnf-DWYD2UWJ-5bvVcIvh.js} +1 -1
- package/editor-web/assets/{railroad-peg-JR7BVNR7-CME0JBbV.js → railroad-peg-JR7BVNR7-LKZ9-9ja.js} +1 -1
- package/editor-web/assets/{railroadDiagram-Y72NRBL7-Ch4BpP22.js → railroadDiagram-Y72NRBL7-DVBhzkmC.js} +1 -1
- package/editor-web/assets/{react-Bk7NnOLX.js → react-Edyoga_4.js} +1 -1
- package/editor-web/assets/{requirementDiagram-EQYSW5RA-CgE-x3wN.js → requirementDiagram-EQYSW5RA-B5RyzWna.js} +1 -1
- package/editor-web/assets/row-C_svyL8o.js +1 -0
- package/editor-web/assets/{sankeyDiagram-SY24JHO5-DBf4G6n3.js → sankeyDiagram-SY24JHO5-BvOJG-gB.js} +1 -1
- package/editor-web/assets/schemas-BmdNnDyt.js +1 -0
- package/editor-web/assets/{scissors-BURkYWPv.js → scissors-B_xOiUhd.js} +1 -1
- package/editor-web/assets/{search-jKDvFIEU.js → search-Ba2BbT6T.js} +1 -1
- package/editor-web/assets/{sequenceDiagram-BLEHNHQU-Bz07CoUS.js → sequenceDiagram-BLEHNHQU-BI7-Daqy.js} +1 -1
- package/editor-web/assets/{session-CUCSWPTE.js → session-D8E3nUwU.js} +1 -1
- package/editor-web/assets/{sigma-CY2Chbro.js → sigma-DSUsJhMn.js} +1 -1
- package/editor-web/assets/slides-bj0WJT_G.js +1 -0
- package/editor-web/assets/snapshots-CuflsO8Q.js +1 -0
- package/editor-web/assets/{sound-DUCxe9eC.js → sound-bTlco_K3.js} +1 -1
- package/editor-web/assets/split-BrF9ECYb.js +3 -0
- package/editor-web/assets/{stateDiagram-v2-A6IESKWZ-DuqAmDPP.js → stateDiagram-v2-A6IESKWZ-C01p8WHX.js} +7 -7
- package/editor-web/assets/{sticky-note-C5qUDHhC.js → sticky-note-BdkIu5_D.js} +1 -1
- package/editor-web/assets/{strikethrough-DP-7tMz0.js → strikethrough-BwXWi4zg.js} +1 -1
- package/editor-web/assets/surface-DtCjIlrq.js +1 -0
- package/editor-web/assets/svg-CWIBMIQ9.js +1 -0
- package/editor-web/assets/swatch-DhztHwPU.js +1 -0
- package/editor-web/assets/{swimlanes-B3ENRKFQ-C7sOL6rB.js → swimlanes-B3ENRKFQ-B00P2SqG.js} +1 -1
- package/editor-web/assets/swimlanesDiagram-AYQRV4AK-ChmNuO4G.js +8 -0
- package/editor-web/assets/switch-8MU4Nfxe.js +1 -0
- package/editor-web/assets/{syntax-DSsHrzWF.js → syntax-CU_WPKxt.js} +1 -1
- package/editor-web/assets/{table-CTjNpE4W.js → table-DRbddzx0.js} +1 -1
- package/editor-web/assets/tabs-CloHB5Z4.js +1 -0
- package/editor-web/assets/tag-CIfWT8B_.js +1 -0
- package/editor-web/assets/text-align-start-Cic2-TLh.js +1 -0
- package/editor-web/assets/textarea-D7TnPwv1.js +1 -0
- package/editor-web/assets/{timeline-definition-JXYKGLGB-CaLYz9mc.js → timeline-definition-JXYKGLGB-BIBoOYJY.js} +3 -3
- package/editor-web/assets/{treeView-D4JQ5SDB-D1P1Kyxc.js → treeView-D4JQ5SDB-CL6DL8V0.js} +1 -1
- package/editor-web/assets/{treemap-SAJKECNS-2YaFL53t.js → treemap-SAJKECNS-CPLGr0WY.js} +1 -1
- package/editor-web/assets/{undo-2-DUGGyBdX.js → undo-2-C47jrRp5.js} +1 -1
- package/editor-web/assets/{usecaseDiagram-WPOLBNNX-uYdbUhUS.js → usecaseDiagram-WPOLBNNX-L03lK2bO.js} +1 -1
- package/editor-web/assets/{vennDiagram-Q3Y3IDCW-DHepmX4t.js → vennDiagram-Q3Y3IDCW-B5tKKP_-.js} +3 -3
- package/editor-web/assets/{video-Xl-OaXRc.js → video-BWUznyLR.js} +1 -1
- package/editor-web/assets/{wardley-7MLQ67FV-Dx0MOPV1.js → wardley-7MLQ67FV-vsBpXT56.js} +1 -1
- package/editor-web/assets/{wardleyDiagram-IVAIDKWA-BX8ElwDW.js → wardleyDiagram-IVAIDKWA-CMCnVUgh.js} +1 -1
- package/editor-web/assets/{whole-word-6DliXke2.js → whole-word-D3ZAtnkw.js} +1 -1
- package/editor-web/assets/{words-B2FXYyeZ.js → words-0Ww2RyT4.js} +1 -1
- package/editor-web/assets/{words-DFIhHhHF.js → words-XlXG79Ur.js} +1 -1
- package/editor-web/assets/workbook-C1QR6Cts.js +45 -0
- package/editor-web/assets/x-DlhyIKuu.js +41 -0
- package/editor-web/assets/{xychartDiagram-4URNHDU4-DoWQRJUS.js → xychartDiagram-4URNHDU4-C9XkBiEO.js} +1 -1
- package/editor-web/assets/{zoom-in-C4lxmIDE.js → zoom-in-PgsC94hP.js} +1 -1
- package/editor-web/index.html +8 -6
- package/package.json +2 -2
- package/editor-web/assets/arrow-down-DzZjFrBL.js +0 -1
- package/editor-web/assets/arrow-up-hdmh9LVD.js +0 -1
- package/editor-web/assets/article-DHFgHYjv.js +0 -3
- package/editor-web/assets/article-Dt9id9Y9.js +0 -7
- package/editor-web/assets/button-BVQH7zxz.js +0 -41
- package/editor-web/assets/channel-Dkg198L0.js +0 -1
- package/editor-web/assets/chart-BC3kUUDD.js +0 -2
- package/editor-web/assets/chunk-DSNLSHJZ-BFnyvrWg.js +0 -129
- package/editor-web/assets/code-BID_OoRp.js +0 -1
- package/editor-web/assets/collaborator-2qfw-8OJ.js +0 -1
- package/editor-web/assets/dist-5HNrQ9AU.js +0 -45
- package/editor-web/assets/dist-BXJKASX4.js +0 -24
- package/editor-web/assets/dist-BeDRTqQ8.js +0 -38
- package/editor-web/assets/dist-BlL-4sl3.js +0 -43
- package/editor-web/assets/dist-BuqBg8k8.js +0 -1
- package/editor-web/assets/dist-BwW08gSh.js +0 -1
- package/editor-web/assets/dist-C30Thvb3.js +0 -1
- package/editor-web/assets/dist-Cj5AmpVb.js +0 -5
- package/editor-web/assets/dist-CjjnDOa8.js +0 -3
- package/editor-web/assets/dist-D7ur8721.js +0 -6
- package/editor-web/assets/dist-DOHhp09C.js +0 -4
- package/editor-web/assets/dist-LhFEYZza.js +0 -16
- package/editor-web/assets/flowDiagram-IUGLLWBU-C7ZmHJZW.js +0 -1
- package/editor-web/assets/hint-mQB8slJ2.js +0 -1
- package/editor-web/assets/index-BGAXezRR.js +0 -28
- package/editor-web/assets/index-Br4a-QEv.css +0 -2
- package/editor-web/assets/mermaid.core-B8478wZ1.js +0 -44
- package/editor-web/assets/minus-D1tgAHbU.js +0 -1
- package/editor-web/assets/progress-udl4pNsP.js +0 -6
- package/editor-web/assets/props-form-B6mYjTgZ.js +0 -1
- package/editor-web/assets/row-dgHEAE7h.js +0 -1
- package/editor-web/assets/schemas-B89k2jEC.js +0 -1
- package/editor-web/assets/slides-BdaWgL_N.js +0 -1
- package/editor-web/assets/snapshots-CTS2iez5.js +0 -56
- package/editor-web/assets/split-mDSkdQkd.js +0 -3
- package/editor-web/assets/surface-D9qJjJQL.js +0 -1
- package/editor-web/assets/svg-nJtFNJ-7.js +0 -1
- package/editor-web/assets/swatch-S8YuBYyj.js +0 -1
- package/editor-web/assets/swimlanesDiagram-AYQRV4AK-CQ2aWYP-.js +0 -8
- package/editor-web/assets/switch-D5kPl2jO.js +0 -1
- package/editor-web/assets/tabs-C0AHyuE5.js +0 -1
- package/editor-web/assets/textarea-mzr9Kfuf.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{z as t}from"zod";import{openEnum as e}from"./open.js";export const ORGANIZATIONS_PATH="/api/organizations",OrganizationsSchema=t.object({organizations:t.array(t.object({id:t.string(),name:t.string(),slug:t.string(),role:t.string(),dissolvedAt:t.iso.datetime().nullable()}))}),MEMBERS_PATH="/api/organization/members",MembersSchema=t.object({members:t.array(t.object({userId:t.string(),email:t.string(),name:t.string(),role:t.string(),limit:t.number().nullable(),used:t.number()}))}),MemberLimitSchema=t.strictObject({monthly:t.number().nonnegative().nullable()}),ORGANIZATION_PATH="/api/organization",STUDIO_PATH="/api/studio",STUDIO_STATES=["running","paused"],StudioSchema=t.object({studio:t.object({state:e(STUDIO_STATES),organizationId:t.string()}).nullable(),creditsPerHour:t.number(),idle:t.object({minutes:t.number(),chosen:t.number().nullable(),min:t.number(),max:t.number()}).optional(),update:t.object({since:t.string(),by:t.string()}).optional()}),STUDIO_RESTART_PATH="/api/studio/restart",StudioSettingsSchema=t.strictObject({idleMinutes:t.number().int().nullable()}),STUDIO_POLICY_PATH="/api/organization/studio",StudioPolicySchema=t.strictObject({idleMaxMinutes:t.number().int().nullable()}),STUDIO_OPEN_PATH="/api/studio/open",STUDIO_OPEN_STAGES=["balance","hold","create","resume","health","release","install","start","charge","ticket"],StudioOpenStagesSchema=t.record(t.string(),t.number()),StudioOpenedSchema=t.object({origin:t.url(),ticket:t.string().min(1),stages:StudioOpenStagesSchema.optional()}),NDJSON="application/x-ndjson",STUDIO_OPEN_STEPS=["machine","install","start"],STUDIO_START_ENV="ALLYHUB_STUDIO_START",StudioOpenLineSchema=t.union([t.object({step:t.enum(STUDIO_OPEN_STEPS),first:t.boolean().optional()}),t.object({status:t.number(),error:t.object({code:t.string(),message:t.string(),data:t.record(t.string(),t.unknown()).optional()})}),StudioOpenedSchema]),STUDIO_TICKET_PATH="/api/studio/ticket",StudioTicketSchema=t.object({ticket:t.string().min(1)}),STUDIO_PREPARE_PATH="/api/studio/prepare",StudioPreparedSchema=t.object({prepared:t.boolean()}),STUDIO_PAUSE_PATH="/api/studio/pause",StudioPausedSchema=t.object({paused:t.boolean()}),STUDIO_WAKES_PATH="/api/studio/wakes",STUDIO_WAKE_OUTCOMES=["live","failed"],StudioWakeReportSchema=t.strictObject({outcome:t.enum(STUDIO_WAKE_OUTCOMES),error:t.string().max(500).optional(),server:StudioOpenStagesSchema.optional(),window:t.strictObject({open:t.number().optional(),connect:t.number().optional(),enter:t.number().optional(),total:t.number()}),first:t.boolean().optional()}),STUDIO_WAKE_PATH="/api/studio/wake",StudioWakeSchema=t.strictObject({at:t.iso.datetime().nullable()});
|
|
2
|
+
import{z as t}from"zod";import{openEnum as e}from"./open.js";export const ORGANIZATIONS_PATH="/api/organizations",OrganizationsSchema=t.object({organizations:t.array(t.object({id:t.string(),name:t.string(),slug:t.string(),role:t.string(),dissolvedAt:t.iso.datetime().nullable()}))}),MEMBERS_PATH="/api/organization/members",MembersSchema=t.object({members:t.array(t.object({userId:t.string(),email:t.string(),name:t.string(),role:t.string(),limit:t.number().nullable(),used:t.number(),spent:t.number().optional()}))}),MemberLimitSchema=t.strictObject({monthly:t.number().nonnegative().nullable()}),ORGANIZATION_PATH="/api/organization",STUDIO_PATH="/api/studio",STUDIO_STATES=["running","paused"],StudioSchema=t.object({studio:t.object({state:e(STUDIO_STATES),organizationId:t.string()}).nullable(),creditsPerHour:t.number(),idle:t.object({minutes:t.number(),chosen:t.number().nullable(),min:t.number(),max:t.number()}).optional(),update:t.object({since:t.string(),by:t.string().optional()}).optional()}),STUDIO_RESTART_PATH="/api/studio/restart",StudioSettingsSchema=t.strictObject({idleMinutes:t.number().int().nullable()}),STUDIO_POLICY_PATH="/api/organization/studio",StudioPolicySchema=t.strictObject({idleMaxMinutes:t.number().int().nullable()}),STUDIO_OPEN_PATH="/api/studio/open",STUDIO_OPEN_STAGES=["balance","hold","create","resume","health","release","install","start","charge","ticket"],StudioOpenStagesSchema=t.record(t.string(),t.number()),StudioOpenedSchema=t.object({origin:t.url(),ticket:t.string().min(1),stages:StudioOpenStagesSchema.optional()}),NDJSON="application/x-ndjson",STUDIO_OPEN_STEPS=["machine","install","start"],STUDIO_START_ENV="ALLYHUB_STUDIO_START",StudioOpenLineSchema=t.union([t.object({step:t.enum(STUDIO_OPEN_STEPS),first:t.boolean().optional()}),t.object({status:t.number(),error:t.object({code:t.string(),message:t.string(),data:t.record(t.string(),t.unknown()).optional()})}),StudioOpenedSchema]),STUDIO_TICKET_PATH="/api/studio/ticket",StudioTicketSchema=t.object({ticket:t.string().min(1)}),STUDIO_PREPARE_PATH="/api/studio/prepare",StudioPreparedSchema=t.object({prepared:t.boolean()}),STUDIO_PAUSE_PATH="/api/studio/pause",StudioPausedSchema=t.object({paused:t.boolean()}),STUDIO_WAKES_PATH="/api/studio/wakes",STUDIO_WAKE_OUTCOMES=["live","failed"],StudioWakeReportSchema=t.strictObject({outcome:t.enum(STUDIO_WAKE_OUTCOMES),error:t.string().max(500).optional(),server:StudioOpenStagesSchema.optional(),window:t.strictObject({open:t.number().optional(),connect:t.number().optional(),enter:t.number().optional(),total:t.number()}),first:t.boolean().optional()}),STUDIO_WAKE_PATH="/api/studio/wake",StudioWakeSchema=t.strictObject({at:t.iso.datetime().nullable()});
|
|
@@ -29,10 +29,10 @@ export declare const CHECK_STATES: readonly ["off", "waiting", "running", "done"
|
|
|
29
29
|
/** The check the server runs after edits, as it stands. */
|
|
30
30
|
export declare const CheckStateSchema: z.ZodObject<{
|
|
31
31
|
status: z.ZodEnum<{
|
|
32
|
-
|
|
32
|
+
done: "done";
|
|
33
33
|
failed: "failed";
|
|
34
|
+
off: "off";
|
|
34
35
|
running: "running";
|
|
35
|
-
done: "done";
|
|
36
36
|
waiting: "waiting";
|
|
37
37
|
}>;
|
|
38
38
|
revision: z.ZodInt;
|
|
@@ -71,11 +71,11 @@ export declare const ExportJobSchema: z.ZodObject<{
|
|
|
71
71
|
types: z.ZodArray<z.ZodString>;
|
|
72
72
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
|
|
73
73
|
state: z.ZodEnum<{
|
|
74
|
+
done: "done";
|
|
74
75
|
failed: "failed";
|
|
76
|
+
cancelled: "cancelled";
|
|
75
77
|
queued: "queued";
|
|
76
78
|
running: "running";
|
|
77
|
-
done: "done";
|
|
78
|
-
cancelled: "cancelled";
|
|
79
79
|
}>;
|
|
80
80
|
progress: z.ZodNumber;
|
|
81
81
|
files: z.ZodArray<z.ZodString>;
|
|
@@ -86,9 +86,9 @@ export type ExportJob = z.infer<typeof ExportJobSchema>;
|
|
|
86
86
|
export declare const IndexJobSchema: z.ZodObject<{
|
|
87
87
|
file: z.ZodString;
|
|
88
88
|
status: z.ZodEnum<{
|
|
89
|
+
done: "done";
|
|
89
90
|
failed: "failed";
|
|
90
91
|
running: "running";
|
|
91
|
-
done: "done";
|
|
92
92
|
}>;
|
|
93
93
|
message: z.ZodString;
|
|
94
94
|
share: z.ZodOptional<z.ZodNumber>;
|
|
@@ -274,10 +274,10 @@ export declare const PROJECT_TOOLS: {
|
|
|
274
274
|
}, z.core.$strict>>;
|
|
275
275
|
readonly "check/results": MethodSpec<z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
|
|
276
276
|
status: z.ZodEnum<{
|
|
277
|
-
|
|
277
|
+
done: "done";
|
|
278
278
|
failed: "failed";
|
|
279
|
+
off: "off";
|
|
279
280
|
running: "running";
|
|
280
|
-
done: "done";
|
|
281
281
|
waiting: "waiting";
|
|
282
282
|
}>;
|
|
283
283
|
revision: z.ZodInt;
|
|
@@ -317,11 +317,11 @@ export declare const PROJECT_TOOLS: {
|
|
|
317
317
|
types: z.ZodArray<z.ZodString>;
|
|
318
318
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
|
|
319
319
|
state: z.ZodEnum<{
|
|
320
|
+
done: "done";
|
|
320
321
|
failed: "failed";
|
|
322
|
+
cancelled: "cancelled";
|
|
321
323
|
queued: "queued";
|
|
322
324
|
running: "running";
|
|
323
|
-
done: "done";
|
|
324
|
-
cancelled: "cancelled";
|
|
325
325
|
}>;
|
|
326
326
|
progress: z.ZodNumber;
|
|
327
327
|
files: z.ZodArray<z.ZodString>;
|
|
@@ -339,11 +339,11 @@ export declare const PROJECT_TOOLS: {
|
|
|
339
339
|
types: z.ZodArray<z.ZodString>;
|
|
340
340
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
|
|
341
341
|
state: z.ZodEnum<{
|
|
342
|
+
done: "done";
|
|
342
343
|
failed: "failed";
|
|
344
|
+
cancelled: "cancelled";
|
|
343
345
|
queued: "queued";
|
|
344
346
|
running: "running";
|
|
345
|
-
done: "done";
|
|
346
|
-
cancelled: "cancelled";
|
|
347
347
|
}>;
|
|
348
348
|
progress: z.ZodNumber;
|
|
349
349
|
files: z.ZodArray<z.ZodString>;
|
|
@@ -418,10 +418,10 @@ export declare const TOOL_NOTIFICATIONS: {
|
|
|
418
418
|
}, z.core.$strict>>;
|
|
419
419
|
readonly "check/changed": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{
|
|
420
420
|
status: z.ZodEnum<{
|
|
421
|
-
|
|
421
|
+
done: "done";
|
|
422
422
|
failed: "failed";
|
|
423
|
+
off: "off";
|
|
423
424
|
running: "running";
|
|
424
|
-
done: "done";
|
|
425
425
|
waiting: "waiting";
|
|
426
426
|
}>;
|
|
427
427
|
revision: z.ZodInt;
|
|
@@ -455,11 +455,11 @@ export declare const TOOL_NOTIFICATIONS: {
|
|
|
455
455
|
types: z.ZodArray<z.ZodString>;
|
|
456
456
|
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
|
|
457
457
|
state: z.ZodEnum<{
|
|
458
|
+
done: "done";
|
|
458
459
|
failed: "failed";
|
|
460
|
+
cancelled: "cancelled";
|
|
459
461
|
queued: "queued";
|
|
460
462
|
running: "running";
|
|
461
|
-
done: "done";
|
|
462
|
-
cancelled: "cancelled";
|
|
463
463
|
}>;
|
|
464
464
|
progress: z.ZodNumber;
|
|
465
465
|
files: z.ZodArray<z.ZodString>;
|
|
@@ -470,9 +470,9 @@ export declare const TOOL_NOTIFICATIONS: {
|
|
|
470
470
|
jobs: z.ZodArray<z.ZodObject<{
|
|
471
471
|
file: z.ZodString;
|
|
472
472
|
status: z.ZodEnum<{
|
|
473
|
+
done: "done";
|
|
473
474
|
failed: "failed";
|
|
474
475
|
running: "running";
|
|
475
|
-
done: "done";
|
|
476
476
|
}>;
|
|
477
477
|
message: z.ZodString;
|
|
478
478
|
share: z.ZodOptional<z.ZodNumber>;
|
|
@@ -483,8 +483,8 @@ export declare const TOOL_NOTIFICATIONS: {
|
|
|
483
483
|
id: z.ZodString;
|
|
484
484
|
about: z.ZodObject<{
|
|
485
485
|
kind: z.ZodEnum<{
|
|
486
|
-
studio: "studio";
|
|
487
486
|
agent: "agent";
|
|
487
|
+
studio: "studio";
|
|
488
488
|
project: "project";
|
|
489
489
|
piece: "piece";
|
|
490
490
|
plugin: "plugin";
|
|
@@ -504,12 +504,12 @@ export declare const TOOL_NOTIFICATIONS: {
|
|
|
504
504
|
}>;
|
|
505
505
|
name: z.ZodOptional<z.ZodString>;
|
|
506
506
|
state: z.ZodEnum<{
|
|
507
|
+
done: "done";
|
|
507
508
|
failed: "failed";
|
|
509
|
+
cancelled: "cancelled";
|
|
510
|
+
paused: "paused";
|
|
508
511
|
queued: "queued";
|
|
509
512
|
running: "running";
|
|
510
|
-
paused: "paused";
|
|
511
|
-
done: "done";
|
|
512
|
-
cancelled: "cancelled";
|
|
513
513
|
}>;
|
|
514
514
|
completed: z.ZodNumber;
|
|
515
515
|
total: z.ZodOptional<z.ZodNumber>;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** Where a turn is recorded, by its trace id: `PUT` as it begins, `PATCH` as it ends. */
|
|
3
|
+
export declare const TURN_PATH = "/api/turns/:traceId";
|
|
4
|
+
export declare const turnPath: (traceId: string) => string;
|
|
5
|
+
/** The most characters of a prompt kept; a longer one is cut there. */
|
|
6
|
+
export declare const TURN_QUERY_AT_MOST = 32000;
|
|
7
|
+
/** The most characters of an error kept. */
|
|
8
|
+
export declare const TURN_ERROR_AT_MOST = 2000;
|
|
9
|
+
/** A turn began: the Host's `PUT turnPath(traceId)`. Strict, as everything the services receive. */
|
|
10
|
+
export declare const TurnStartedSchema: z.ZodObject<{
|
|
11
|
+
at: z.ZodISODateTime;
|
|
12
|
+
agent: z.ZodString;
|
|
13
|
+
sessionId: z.ZodString;
|
|
14
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
15
|
+
query: z.ZodString;
|
|
16
|
+
from: z.ZodEnum<{
|
|
17
|
+
person: "person";
|
|
18
|
+
schedule: "schedule";
|
|
19
|
+
hook: "hook";
|
|
20
|
+
}>;
|
|
21
|
+
}, z.core.$strict>;
|
|
22
|
+
export type TurnStarted = z.infer<typeof TurnStartedSchema>;
|
|
23
|
+
/** The most characters of the agent's answer kept; a longer one is cut there. */
|
|
24
|
+
export declare const TURN_ANSWER_AT_MOST = 64000;
|
|
25
|
+
/** The most steps a turn's record keeps; past them, only how many more there were. */
|
|
26
|
+
export declare const TURN_STEPS_AT_MOST = 1000;
|
|
27
|
+
/** The most characters of a step's title kept. */
|
|
28
|
+
export declare const TURN_STEP_TITLE_AT_MOST = 200;
|
|
29
|
+
/**
|
|
30
|
+
* A step the agent took in a turn, as ACP told it (`tool_call`, then its
|
|
31
|
+
* `tool_call_update`s): its kind (`read`, `edit`, `execute`, … or `other`),
|
|
32
|
+
* its title as the agent wrote it, how it ended, when it began and how long
|
|
33
|
+
* it took. Never its input, its output or a file's content.
|
|
34
|
+
*/
|
|
35
|
+
export declare const TurnStepSchema: z.ZodObject<{
|
|
36
|
+
at: z.ZodISODateTime;
|
|
37
|
+
kind: z.ZodString;
|
|
38
|
+
title: z.ZodString;
|
|
39
|
+
status: z.ZodString;
|
|
40
|
+
ms: z.ZodOptional<z.ZodNumber>;
|
|
41
|
+
}, z.core.$strict>;
|
|
42
|
+
export type TurnStep = z.infer<typeof TurnStepSchema>;
|
|
43
|
+
/** A turn ended: the Host's `PATCH turnPath(traceId)`. */
|
|
44
|
+
export declare const TurnEndedSchema: z.ZodObject<{
|
|
45
|
+
at: z.ZodISODateTime;
|
|
46
|
+
durationMs: z.ZodNumber;
|
|
47
|
+
ended: z.ZodString;
|
|
48
|
+
error: z.ZodOptional<z.ZodString>;
|
|
49
|
+
changed: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
50
|
+
pieces: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
51
|
+
answer: z.ZodOptional<z.ZodString>;
|
|
52
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
53
|
+
at: z.ZodISODateTime;
|
|
54
|
+
kind: z.ZodString;
|
|
55
|
+
title: z.ZodString;
|
|
56
|
+
status: z.ZodString;
|
|
57
|
+
ms: z.ZodOptional<z.ZodNumber>;
|
|
58
|
+
}, z.core.$strict>>>;
|
|
59
|
+
moreSteps: z.ZodOptional<z.ZodNumber>;
|
|
60
|
+
}, z.core.$strict>;
|
|
61
|
+
export type TurnEnded = z.infer<typeof TurnEndedSchema>;
|
|
62
|
+
/** What the server answers either: that it kept it. */
|
|
63
|
+
export declare const TurnAnswerSchema: z.ZodObject<{
|
|
64
|
+
ok: z.ZodBoolean;
|
|
65
|
+
}, z.core.$strip>;
|
|
66
|
+
export type TurnAnswer = z.infer<typeof TurnAnswerSchema>;
|
|
67
|
+
/** Cuts a prompt to what is kept. */
|
|
68
|
+
export declare const keptQuery: (text: string) => string;
|
|
69
|
+
/** The trace id a turn's route names. */
|
|
70
|
+
export declare const TurnTraceIdSchema: z.ZodString;
|
|
71
|
+
//# sourceMappingURL=turns.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{z as t}from"zod";import{EventIdSchema as n,EventTraceIdSchema as s,EventWordSchema as o}from"./events.js";export const TURN_PATH="/api/turns/:traceId",turnPath=e=>TURN_PATH.replace(":traceId",e),TURN_QUERY_AT_MOST=32e3,TURN_ERROR_AT_MOST=2e3;const r=t.record(o,t.number().int().min(0).max(1e6)).refine(e=>Object.keys(e).length<=32,"At most 32 words.");export const TurnStartedSchema=t.strictObject({at:t.iso.datetime(),agent:o,sessionId:n,projectId:n.optional(),query:t.string().max(TURN_QUERY_AT_MOST),from:t.enum(["person","schedule","hook"])}),TURN_ANSWER_AT_MOST=64e3,TURN_STEPS_AT_MOST=1e3,TURN_STEP_TITLE_AT_MOST=200,TurnStepSchema=t.strictObject({at:t.iso.datetime(),kind:o,title:t.string().max(TURN_STEP_TITLE_AT_MOST),status:o,ms:t.number().int().min(0).optional()}),TurnEndedSchema=t.strictObject({at:t.iso.datetime(),durationMs:t.number().int().min(0).max(10080*60*1e3),ended:o,error:t.string().max(TURN_ERROR_AT_MOST).optional(),changed:r,pieces:r,answer:t.string().max(TURN_ANSWER_AT_MOST).optional(),steps:t.array(TurnStepSchema).max(TURN_STEPS_AT_MOST).optional(),moreSteps:t.number().int().min(0).optional()}),TurnAnswerSchema=t.object({ok:t.boolean()}),keptQuery=e=>e.length<=TURN_QUERY_AT_MOST?e:e.slice(0,TURN_QUERY_AT_MOST),TurnTraceIdSchema=s;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{mkdir as c,readFile as m,writeFile as d}from"node:fs/promises";import{basename as f,join as
|
|
2
|
+
import{mkdir as c,readFile as m,writeFile as d}from"node:fs/promises";import{basename as f,join as a,resolve as h}from"node:path";export const PROJECT_PACKAGES={cli:"allyhub",sdk:"@allyhub/sdk"},PROJECT_TYPESCRIPT="~5.9.3",PROJECT_GITIGNORE=`node_modules/
|
|
3
3
|
.allyhub/
|
|
4
4
|
.playwright-cli/
|
|
5
|
-
`,REGISTRY="https://allyhub.com/r",MASTER_SKILL="allyhub";export function workSkills(s){return s.filter(e=>e.type==="allyhub:skill"&&e.name!==MASTER_SKILL).map(e=>({name:e.name,description:e.description.replaceAll(/\s+/gu," ").trim()}))}export const AGENT_RULES_BEGIN="<!-- BEGIN:allyhub-agent-rules -->",AGENT_RULES_END="<!-- END:allyhub-agent-rules -->";export function agentRules(){return[AGENT_RULES_BEGIN,"",`Before writing or changing a piece (a video, a deck, an image, a doc, a sheet, a 3D scenery or model), read the files it needs in the SDK's docs, for the version this project builds with: \`node_modules/${PROJECT_PACKAGES.sdk}/docs/\` once the project has installed it, its \`README.md\` saying what each file covers; without it, \`allyhub help\` says where they are (the SDK the CLI lends). The
|
|
5
|
+
`,REGISTRY="https://allyhub.com/r",MASTER_SKILL="allyhub";export function workSkills(s){return s.filter(e=>e.type==="allyhub:skill"&&e.name!==MASTER_SKILL).map(e=>({name:e.name,description:e.description.replaceAll(/\s+/gu," ").trim()}))}export const AGENT_RULES_BEGIN="<!-- BEGIN:allyhub-agent-rules -->",AGENT_RULES_END="<!-- END:allyhub-agent-rules -->";export function agentRules(){return[AGENT_RULES_BEGIN,"",`Before writing or changing a piece (a video, a deck, an image, a doc, a sheet, a 3D scenery or model), read the files it needs in the SDK's docs, for the version this project builds with: \`node_modules/${PROJECT_PACKAGES.sdk}/docs/\` once the project has installed it, its \`README.md\` saying what each file covers; without it, \`allyhub help\` says where they are (the SDK the CLI lends). The docs and the SDK's types describe the API as it is now: follow them over what you remember.`,"","`allyhub help` lists AllyHub's commands (`npx allyhub help` once the project has installed it); `allyhub help <command>` says what one does.","","`allyhub skills` lists AllyHub's work skills, each how to make one kind of work; `allyhub skills show <name>` prints one, `allyhub add skill/<name>` adds it to this project.","",AGENT_RULES_END].join(`
|
|
6
6
|
`)}export function projectAgents(){return`# AllyHub project
|
|
7
7
|
|
|
8
8
|
This folder is an AllyHub project. Videos, decks, images, 3D sceneries and 3D models are TypeScript, docs MDX, sheets YAML and CSV, a canvas JSON Canvas, and a website any web project; their files are yours to name and lay out as suits the project, and a model is made once and put in any scenery that imports it. \`${WORK_FILE}\` lists the work a person sees, in the order they see it: each piece's \`kind\` (\`video\`, \`slides\`, \`image\`, \`doc\`, \`sheet\`, \`scenery\`, \`model\`, \`website\`; none for a \`.canvas\`, which its editor opens by its name), its \`file\` from this folder and, if its file says none, a \`title\`, under \`group\` headings if you like. List a piece when you make it; a file not listed (a scenery a video imports, a helper, a draft) is yours alone.
|
|
@@ -13,5 +13,5 @@ ${agentRules()}
|
|
|
13
13
|
`}export const PROJECT_CLAUDE=`@AGENTS.md
|
|
14
14
|
`,WORK_FILE="allyhub.yaml",PROJECT_WORK=`work: []
|
|
15
15
|
`,PROJECT_TSCONFIG=`${JSON.stringify({compilerOptions:{target:"ES2022",module:"ESNext",moduleResolution:"Bundler",lib:["ES2022","DOM","DOM.Iterable"],types:[`${PROJECT_PACKAGES.sdk}/client`,`${PROJECT_PACKAGES.cli}/client`],strict:!0,noEmit:!0,skipLibCheck:!0,verbatimModuleSyntax:!0,allowImportingTsExtensions:!0},include:["**/*.ts",".allyhub/cache/types"],exclude:["node_modules"]},null,2)}
|
|
16
|
-
`;export function packageName(s){const e=s.toLowerCase().normalize("NFKD").replace(/\p{M}/gu,"").replace(/[^\w.-]+/gu,"-").replace(/^[-._]+|[-._]+$/gu,"").slice(0,214);return e===""?"allyhub-project":e}const r=s=>m(s).then(()=>!0,()=>!1);export async function writeAgentFiles(s){const e=h(s);await c(e,{recursive:!0});const t=[];for(const[
|
|
17
|
-
`],["tsconfig.json",PROJECT_TSCONFIG],[".gitignore",PROJECT_GITIGNORE]];await c(t,{recursive:!0});const l=[];for(const[
|
|
16
|
+
`;export function packageName(s){const e=s.toLowerCase().normalize("NFKD").replace(/\p{M}/gu,"").replace(/[^\w.-]+/gu,"-").replace(/^[-._]+|[-._]+$/gu,"").slice(0,214);return e===""?"allyhub-project":e}const r=s=>m(s).then(()=>!0,()=>!1);export async function writeAgentFiles(s){const e=h(s);await c(e,{recursive:!0});const t=[];for(const[o,i]of[["AGENTS.md",projectAgents()],["CLAUDE.md",PROJECT_CLAUDE],[WORK_FILE,PROJECT_WORK]])await r(a(e,o))||(await d(a(e,o),i,{flag:"wx"}),t.push(o));return t}export async function startProject(s,e){const t=h(s);if(await r(a(t,"package.json")))throw new Error(`${t} already has a package.json: add AllyHub to it with npm install ${PROJECT_PACKAGES.cli} ${PROJECT_PACKAGES.sdk}.`);const o=packageName(f(t)),i=n=>e.packages?.[n]??e.version,p={name:o,version:"0.0.0",private:!0,type:"module",scripts:{dev:"allyhub dev",check:"allyhub check",render:"allyhub render",typecheck:"tsc --noEmit"},dependencies:{[PROJECT_PACKAGES.cli]:i(PROJECT_PACKAGES.cli),[PROJECT_PACKAGES.sdk]:i(PROJECT_PACKAGES.sdk)},devDependencies:{typescript:PROJECT_TYPESCRIPT}},u=[["package.json",`${JSON.stringify(p,null,2)}
|
|
17
|
+
`],["tsconfig.json",PROJECT_TSCONFIG],[".gitignore",PROJECT_GITIGNORE]];await c(t,{recursive:!0});const l=[];for(const[n,y]of u)await r(a(t,n))||(await d(a(t,n),y,{flag:"wx"}),l.push(n));return l.push(...await writeAgentFiles(t)),{folder:t,name:o,files:l}}
|
|
@@ -4,5 +4,5 @@ import{existsSync as ie}from"node:fs";import{mkdir as ce,readFile as V,stat as h
|
|
|
4
4
|
`)}}});function Ie(e,s){return te(e,s.trim()).flatMap(n=>n.rows.flat().map(t=>({...t,address:t.address===""?s.trim():`${n.sheet}!${t.address}`})))}async function Re(e,s,n,t){const o=await j(e,s,n),a=G(o.workbook);if(a.length===0)throw new g("not-found",`${o.file} has no scenarios.`,{exit:y.notFound,hint:`${v(o.file)}'s scenarios: { high: { growth: 0.2 } } names some.`});const r=new Set(a.flatMap(d=>Object.keys(o.workbook.file.scenarios?.[d]??{}).map(p=>p.toLowerCase()))),i=t?.split(",")??[...o.workbook.names.values()].map(d=>d.name).filter(d=>!r.has(d.toLowerCase()));if(i.length===0)throw new g("bad-input","Say what to compare: names, cells or ranges, apart by commas.",{exit:y.usage});const c=["Base case",...a],l=[o,...await Promise.all(a.map(d=>j(e,s,n,d)))],$=i.map(d=>l.map(p=>Ie(p.calc,d))).flatMap(d=>(d[0]??[]).map((p,m)=>({output:p.address,values:Object.fromEntries(c.map((x,b)=>[x,d[b]?.[m]?.value??null])),shown:Object.fromEntries(c.map((x,b)=>[x,d[b]?.[m]?.shown??""]))})));return{value:{file:o.file,scenarios:c,outputs:$},text:[...P([["",...c],...$.map(d=>[d.output,...c.map(p=>d.shown[p]??"")])]),..._(o.problems)].join(`
|
|
5
5
|
`)}}const Le=(e,s)=>`${e.sheet===s?"":`${e.sheet.name}!`}${q({top:e.top,left:e.left,bottom:Math.min(e.bottom,Math.max(e.top,e.sheet.lastRow)),right:e.right})}`;export const sheetTrace=k({input:h.strictObject({sheet:h.string().describe("The sheet, by its file or its id in allyhub.yaml"),cell:h.string().describe("The cell: Summary!B5, or B5 on the first sheet"),all:h.boolean().default(!1).describe(`Every cell that reads it, not the first ${String(TRACE_CELLS)}`),dir:E}),positional:["sheet","cell"],output:h.looseObject({}),examples:["allyhub sheet trace finance/budget 'Summary!B1'"],run:async(e,s)=>{const n=await O(s.cwd,e.dir),{file:t,workbook:o,calc:a}=await j(n,s,e.sheet),{sheet:r,address:i}=ee(o,e.cell),c=Ee(i);if(!c)throw new g("bad-input",`${e.cell} is not a cell.`,{exit:y.usage});const{row:l,col:u}=c,$=a.value(r,l,u),d=r.lookAt(l,u).format,p=r.at(l,u),m=o.sourceOf(r,l,u),x=p instanceof T?a.precedents(p).map(f=>{const le=f.single?S(a.value(f.sheet,f.top,f.left),f.sheet.lookAt(f.top,f.left).format):`${w(f.cols)} × ${w(Math.max(0,Math.min(f.bottom,f.sheet.lastRow)-f.top+1))}`,H=f.single?f.sheet.at(f.top,f.left):void 0,J=H instanceof T?H.text:void 0;return{address:Le(f,r),shown:le,...J===void 0?{}:{formula:J}}}):[],b=a.readers(r,l,u),B=e.all?b:b.slice(0,TRACE_CELLS),U=B.map(f=>({address:`${f.sheet===r?"":`${f.sheet.name}!`}${M(f)}`,shown:S(f.value,f.sheet.lookAt(f.row,f.col).format),formula:f.text})),W=f=>[` ${f.address}`,f.shown,f.formula].filter(Boolean).join(" "),z=m===void 0?void 0:m.file===I||m.file===""?t:F.join(ue(t),m.file),C=m?.line===void 0?z:`${z??""}:${String(m.line)}`;return{value:{file:t,cell:`${r.name}!${M(c)}`,value:D($,d),shown:S($,d),...$ instanceof be?{error:$.code}:{},...p instanceof T?{formula:p.text}:{},...C===void 0?{}:{written:C},reads:x,readBy:U,readers:b.length},text:[`${r.name}!${M(c)} ${S($,d)}`,...p instanceof T?[` ${p.text}`]:[],...C===void 0?[]:[` written in ${C}`],...x.length>0?["reads:",...x.map(W)]:[],...b.length>0?[`read by ${w(b.length)}:`,...U.map(W),...b.length>B.length?[` … ${w(b.length-B.length)} more (--all)`]:[]]:["read by nothing"]].join(`
|
|
6
6
|
`)}}}),sheetCapabilities=k({input:h.strictObject({}),output:h.looseObject({}),examples:["allyhub sheet capabilities"],run:()=>Promise.resolve({value:{...Z},text:JSON.stringify(Z,null,2)})});const se=new Set([".xlsx",".xlsm",".xltx",".xltm"]);export const DIFF_ROWS=50;const ne={value:"Value changed, formula the same",formula:"Formula changed, value the same",both:"Formula and value changed",added:"Added",removed:"Removed"},Be=e=>{const s=(e.now??e.was)?.cell??"",n=e.table===void 0?s:`${e.table}[${e.key??s}]`,t=e.column===void 0?"":` ${e.column}`;return`${e.sheet}!${n}${t}`},Ne=e=>{const s=e.was?.formula??"",n=e.now?.formula??"";return[Be(e),e.was?.shown??"","→",e.now?.shown??"",e.kind==="value"?n:e.kind==="formula"||e.kind==="both"?`${s} → ${n}`:n===""?s:n]};function De(e,s){const n=[];for(const t of e.sheets)n.push(`Sheet ${t.name} ${t.added?"added":"removed"}`);for(const t of e.tables){const o=[t.rowsAdded.length>0?`rows added: ${t.rowsAdded.slice(0,20).join(", ")}`:"",t.rowsRemoved.length>0?`rows removed: ${t.rowsRemoved.slice(0,20).join(", ")}`:"",t.columnsAdded.length>0?`columns added: ${t.columnsAdded.join(", ")}`:"",t.columnsRemoved.length>0?`columns removed: ${t.columnsRemoved.join(", ")}`:""].filter(Boolean);n.push(`Table ${t.name}, rows lined up by ${t.by==="key"?t.key??"its key":"their place"}${o.length>0?`: ${o.join("; ")}`:""}`)}for(const t of e.names)n.push(`Name ${t.name}: ${t.was??"(none)"} → ${t.now??"(none)"}`);for(const t of e.parts)n.push(`${t.sheet??"Workbook"} ${t.part}${t.key===void 0?"":` ${t.key}`}: ${t.was??"(none)"} → ${t.now??"(none)"}`);for(const t of e.charts)n.push(`Charts of ${t} changed`);for(const t of Object.keys(ne)){const o=e.cells.filter(r=>r.kind===t);if(o.length===0)continue;const a=s?o:o.slice(0,DIFF_ROWS);n.push("",`${ne[t]}: ${w(o.length)}`,...P(a.map(Ne)).map(r=>` ${r}`),...o.length>a.length?[` … ${w(o.length-a.length)} more (--all)`]:[])}return n}async function oe(e,s,n){const t=X(s.cwd,n);if(se.has(A(t).toLowerCase())){const r=await V(t).catch(()=>{throw new g("not-found",`There is no file ${t}.`,{exit:y.notFound})}),i=K(new Uint8Array(r),{name:v(t,A(t))}),{calc:c}=ve({text:i.files.get(I)??"",read:l=>i.files.get(l)});if(!c)throw new g("bad-file",`${n} cannot be read.`,{exit:y.usage});return{calc:c,file:n}}const{calc:o,file:a}=await j(e,s,n);return{calc:o,file:a}}export const sheetDiff=k({input:h.strictObject({was:h.string().describe("The version before: a sheet (its file or its id) or an .xlsx"),now:h.string().describe("The version after: a sheet (its file or its id) or an .xlsx"),tolerance:h.number().min(0).default(pe.tolerance).describe("How far apart two numbers may be, as a share of the larger, and be the same"),all:h.boolean().default(!1).describe(`Every cell, not the first ${String(DIFF_ROWS)} of each kind`),dir:E}),positional:["was","now"],output:h.looseObject({}),examples:["allyhub sheet diff finance/budget finance/budget-v2","allyhub sheet diff finance/budget ~/Downloads/budget.xlsx --json"],run:async(e,s)=>{const n=await O(s.cwd,e.dir),t=await oe(n,s,e.was),o=await oe(n,s,e.now),a=ke(t.calc,o.calc,{tolerance:e.tolerance}),{counts:r}=a,i=a.cells.length;return{value:{was:t.file,now:o.file,...a},text:[`${t.file} → ${o.file}: ${w(i)} cell${i===1?"":"s"} differ (${w(r.value)} value, ${w(r.formula)} formula, ${w(r.both)} both, ${w(r.added)} added, ${w(r.removed)} removed); ${w(a.names.length+a.parts.length)} other thing${a.names.length+a.parts.length===1?"":"s"} differ${a.names.length+a.parts.length===1?"s":""}`,...De(a,e.all)].join(`
|
|
7
|
-
`)}}});const _e=h.string().transform(e=>e.replace(/^\/+/gu,"")).refine(e=>e.endsWith(".yaml")&&!e.split("/").some(s=>s===""||s==="."||s===".."),{message:"a .yaml file from the project's root, such as research/leads.yaml"});export const IMPORT_DIFFERENCES=50;const ae=e=>e===null?"empty":typeof e=="string"?JSON.stringify(e):String(e);function Pe(e,s){const{formulas:n,same:t,uncached:o,moving:a,differences:r}=e,i=[`${w(t)} of ${w(n)} formulas compute what the file holds`,...a>0?[`${w(a)} read the clock or a random number, not compared`]:[],...o>0?[`${w(o)} have no value in the file`]:[]],c=s?r:r.slice(0,IMPORT_DIFFERENCES);return[`Computed here against the file: ${i.join("; ")}.`,...r.length>0?[`${w(r.length)} differ${r.length===1?"s":""}:`,...c.map(l=>` ${l.sheet}!${l.cell} ${l.formula} file ${ae(l.file)} here ${ae(l.engine)}`),...r.length>c.length?[` … ${w(r.length-c.length)} more (--all)`]:[]]:[]]}async function re(e,s,n){const t=F.dirname(s),o=[...n].map(([a,r])=>({path:a===I?s:t==="."?a:`${t}/${a}`,content:r}));for(const{path:a}of o)if(await he(N(e,a)).catch(()=>{}))throw new g("place-taken",`${a} is already there.`,{exit:y.conflict,hint:"Name another file with --to."});for(const{path:a,content:r}of o){const i=N(e,a);await ce(de(i),{recursive:!0}),await fe(i,r,{flag:"wx"})}return o.map(a=>a.path)}export const sheetImport=k({input:h.strictObject({file:h.string().describe("The file to make a sheet of: .xlsx, .xlsm, .csv or .tsv"),to:_e.optional().describe("The sheet's file, from the project's root (default <the file's name>.yaml); its tables' CSV files go beside it, under names no file there has"),maxUnzipped:h.number().positive().default(me.bytes/1024/1024).describe("MB the file may unzip to
|
|
7
|
+
`)}}});const _e=h.string().transform(e=>e.replace(/^\/+/gu,"")).refine(e=>e.endsWith(".yaml")&&!e.split("/").some(s=>s===""||s==="."||s===".."),{message:"a .yaml file from the project's root, such as research/leads.yaml"});export const IMPORT_DIFFERENCES=50;const ae=e=>e===null?"empty":typeof e=="string"?JSON.stringify(e):String(e);function Pe(e,s){const{formulas:n,same:t,uncached:o,moving:a,differences:r}=e,i=[`${w(t)} of ${w(n)} formulas compute what the file holds`,...a>0?[`${w(a)} read the clock or a random number, not compared`]:[],...o>0?[`${w(o)} have no value in the file`]:[]],c=s?r:r.slice(0,IMPORT_DIFFERENCES);return[`Computed here against the file: ${i.join("; ")}.`,...r.length>0?[`${w(r.length)} differ${r.length===1?"s":""}:`,...c.map(l=>` ${l.sheet}!${l.cell} ${l.formula} file ${ae(l.file)} here ${ae(l.engine)}`),...r.length>c.length?[` … ${w(r.length-c.length)} more (--all)`]:[]]:[]]}async function re(e,s,n){const t=F.dirname(s),o=[...n].map(([a,r])=>({path:a===I?s:t==="."?a:`${t}/${a}`,content:r}));for(const{path:a}of o)if(await he(N(e,a)).catch(()=>{}))throw new g("place-taken",`${a} is already there.`,{exit:y.conflict,hint:"Name another file with --to."});for(const{path:a,content:r}of o){const i=N(e,a);await ce(de(i),{recursive:!0}),await fe(i,r,{flag:"wx"})}return o.map(a=>a.path)}export const sheetImport=k({input:h.strictObject({file:h.string().describe("The file to make a sheet of: .xlsx, .xlsm, .csv or .tsv"),to:_e.optional().describe("The sheet's file, from the project's root (default <the file's name>.yaml); its tables' CSV files go beside it, under names no file there has"),maxUnzipped:h.number().positive().default(me.bytes/1024/1024).describe("The most MB the file may unzip to"),tolerance:h.number().min(0).default(Te).describe("How far apart a computed number and the file's may be, as a share of the larger, and count as the same; 0 lists every difference"),all:h.boolean().default(!1).describe(`Every difference, not the first ${String(IMPORT_DIFFERENCES)}`),dir:E}),positional:["file"],output:h.looseObject({}),examples:["allyhub sheet import ~/Downloads/forecast.xlsx --to finance/forecast.yaml","allyhub sheet import ~/Downloads/leads.csv --to research/leads.yaml"],run:async(e,s)=>{const n=await O(s.cwd,e.dir),t=X(s.cwd,e.file),o=A(t).toLowerCase(),a=se.has(o);if(o===".xls"||o===".xlsb")throw new g("bad-file",`${v(t)} is Excel's binary format.`,{exit:y.usage,hint:"Save it as .xlsx, then import that."});if(!a&&o!==".csv"&&o!==".tsv")throw new g("bad-file",`${v(t)} is not an .xlsx, .xlsm, .csv or .tsv file.`,{exit:y.usage});const r=await V(t).catch(()=>{throw new g("not-found",`There is no file ${t}.`,{exit:y.notFound})}),i=v(t,A(t)),c=e.to??`${i}.yaml`,l=F.basename(c,".yaml"),u=we(c),$=m=>ie(N(n,F.dirname(c),m));if(a){let m;try{m=K(new Uint8Array(r),{name:l,tolerance:e.tolerance,zip:{bytes:e.maxUnzipped*1024*1024},taken:$})}catch(b){throw new g("bad-file",`${v(t)} cannot be read: ${b.message}`,{exit:y.usage})}const x=await re(n,c,new Map([...m.files,...m.assets]));return await Y(n,{kind:"sheet",file:c}),{value:{id:u,files:x,sheets:m.sheets,tables:m.tables,lost:m.lost,problems:m.problems,compared:m.compared},text:[`Made ${x.join(", ")}; listed in allyhub.yaml as ${u}.`,...m.lost.length>0?["Not carried over:",...m.lost.map(b=>` ${b}`)]:["Nothing was left out."],...Pe(m.compared,e.all),...m.problems.length>0?["Problems:",...m.problems.map(b=>` ${b.file}${b.line===void 0?"":`:${String(b.line)}`}: ${b.message}`)]:[],`allyhub sheet calc ${u}, then allyhub frames ${u}, to see it.`].join(`
|
|
8
8
|
`)}}let d;try{d=Se(l,r.toString("utf8"),o===".tsv"?" ":",",$)}catch(m){throw new g("bad-file",m.message,{exit:y.usage})}const p=await re(n,c,new Map([[I,d.text],[d.path,d.csv]]));return await Y(n,{kind:"sheet",file:c}),{value:{id:u,files:p,rows:d.rows,lost:[]},text:`Made ${p.join(" and ")}, listed in allyhub.yaml as ${u}: ${w(d.rows)} row${d.rows===1?"":"s"}`}}});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allyhub/sheet-extension",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./code": {
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
"inspectViews": [
|
|
161
161
|
{
|
|
162
162
|
"name": "sheet",
|
|
163
|
-
"summary": "A workbook's facts, for you to judge
|
|
163
|
+
"summary": "A workbook's facts, for you to judge: error values by cell, numbers written into formulas, a cell unlike its neighbours, what nothing reads, exceptions in calculated columns, values under a validation that breaks them, the rounds iterative calculation ran",
|
|
164
164
|
"module": "./dist/inspect.js"
|
|
165
165
|
}
|
|
166
166
|
],
|
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
},
|
|
198
198
|
{
|
|
199
199
|
"name": "sheet import",
|
|
200
|
-
"summary": "Makes a sheet of an Excel, CSV or TSV file: its sheets, tables, formulas, names and looks as a sheet file and CSV files, listed in allyhub.yaml,
|
|
200
|
+
"summary": "Makes a sheet of an Excel, CSV or TSV file: its sheets, tables, formulas, names and looks as a sheet file and CSV files, listed in allyhub.yaml, with each difference from the file listed and each formula computed here and compared with the value the file holds; writes new files alone (--to names another place)",
|
|
201
201
|
"work": "sheets",
|
|
202
202
|
"module": "./dist/cli/index.js"
|
|
203
203
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{existsSync as k}from"node:fs";import{mkdir as v,readFile as I,stat as O,writeFile as S}from"node:fs/promises";import{basename as b,dirname as T,join as
|
|
3
|
-
`)}}});const M={unread:"not read",extension:"an extension not read",part:"a part not read","cannot-hold":"cannot hold",approximated:"approximated",missing:"missing"};function U(e){const
|
|
2
|
+
import{existsSync as k}from"node:fs";import{mkdir as v,readFile as I,stat as O,writeFile as S}from"node:fs/promises";import{basename as b,dirname as T,join as c,posix as g,resolve as z}from"node:path";import{z as i}from"zod";import{ZIP_LIMITS as P,itemIdOf as C}from"@allyhub/formats";import{PROJECT_DIR as D,defineCliCommand as y,listWork as E,projectRoot as R}from"@allyhub/build";import{CommandError as p,EXIT as f}from"@allyhub/protocol";import{CAPABILITIES as $}from"@allyhub/slides-core";import{groupReport as F}from"@allyhub/ooxml";import{importDeck as N,nameOf as q,readPptx as A}from"@allyhub/slides-pptx";export const slidesCapabilities=y({input:i.strictObject({}),output:i.looseObject({}),examples:["allyhub slides capabilities"],run:()=>Promise.resolve({value:{...$},text:JSON.stringify($,null,2)})});const L=i.string().transform(e=>e.replace(/^\/+/gu,"")).refine(e=>e.endsWith(".ts")&&!e.split("/").some(o=>o===""||o==="."||o===".."),{message:"a .ts file from the project's root, such as reviews/q3.ts"});export const slidesImport=y({input:i.strictObject({file:i.string().describe("The .pptx to make a deck of"),to:L.optional().describe("The deck's module, from the project's root (default <the file's name>.ts); its slides are <name>.yaml beside it, its script <name>.<lang>.yaml, its pictures and videos beside them under names no file there has"),maxUnzipped:i.number().positive().default(P.bytes/1024/1024).describe("The most MB the file may unzip to"),lang:i.string().regex(/^[a-z]{2,3}(-[a-z0-9]+)*$/u).default("en").describe("The language of its words: its script is <name>.<lang>.yaml"),dir:D}),positional:["file"],output:i.looseObject({}),examples:["allyhub slides import ~/Downloads/q3-review.pptx --to reviews/q3.ts","allyhub slides import 培训.pptx --to training/onboarding.ts --lang zh-cn"],run:async(e,o)=>{const a=await R(o.cwd,e.dir),s=z(o.cwd,e.file),x=await I(s).catch(()=>{throw new p("not-found",`There is no file ${s}.`,{exit:f.notFound})}),n=e.to??`${q(b(s).replace(/\.pptx$/iu,""),new Set,"deck")}.ts`,h=g.dirname(n),l=t=>h==="."?t:`${h}/${t}`;let r;try{r=N(A(new Uint8Array(x),{bytes:e.maxUnzipped*1024*1024}),{lang:e.lang,source:b(s),name:g.basename(n,".ts"),taken:t=>k(c(a,l(t)))})}catch(t){throw new p("bad-file",`${s} is not a PowerPoint file this can read: ${t.message}`,{exit:f.usage})}const m=[...r.files.keys()].map(l);for(const t of m)if(await O(c(a,t)).catch(()=>{}))throw new p("place-taken",`${t} is already there.`,{exit:f.conflict,hint:"Name another module with --to."});for(const[t,j]of r.files){const w=c(a,l(t));await v(T(w),{recursive:!0}),await S(w,j,{flag:"wx"})}await E(a,{kind:"slides",file:n});const d=C(n),u=F(r.report);return{value:{id:d,files:m,report:r.report,skipped:Object.fromEntries(r.reasons)},text:[`Made ${m.join(", ")}; listed in allyhub.yaml as ${d}.`,...u.length>0?[`Not carried over as it is (${String(r.report.length)}, grouped; all with --json):`,...u.map(U)]:[],`allyhub check, then allyhub frames ${d}, to see it.`].join(`
|
|
3
|
+
`)}}});const M={unread:"not read",extension:"an extension not read",part:"a part not read","cannot-hold":"cannot hold",approximated:"approximated",missing:"missing"};function U(e){const o=e.where.length>3?`${e.where.slice(0,3).join("; ")} and ${String(e.where.length-3)} more`:e.where.join("; ");return` ${M[e.kind]}: ${e.what}${e.detail===void 0?"":` (${e.detail})`}${e.count>1?` ×${String(e.count)}`:""} at ${o}`}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allyhub/slides-extension",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./tools": {
|
|
@@ -216,7 +216,7 @@
|
|
|
216
216
|
},
|
|
217
217
|
{
|
|
218
218
|
"name": "slides import",
|
|
219
|
-
"summary": "Makes a deck of a PowerPoint file: its masters and layouts as the deck's module, its slides and its words and notes as the files the module names, its pictures and videos beside them, listed in allyhub.yaml;
|
|
219
|
+
"summary": "Makes a deck of a PowerPoint file: its masters and layouts as the deck's module, its slides and its words and notes as the files the module names, its pictures and videos beside them, listed in allyhub.yaml; lists each difference from the file; writes new files alone (--to names another module)",
|
|
220
220
|
"work": "decks",
|
|
221
221
|
"module": "./dist/cli/index.js"
|
|
222
222
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
export const AUDIO_ICON=Uint8Array.from(
|
|
2
|
+
export const AUDIO_ICON=Uint8Array.from(atob("iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAACXElEQVR42u2dwXGEMAxFtwNK2BIoISXkzIkSKIESKMElUAIlUAIlUAKBGcgkOyTIxqwEvMO/7IExeli2ZUn7yLLsgfSEEQAAAAQAACAAAAABAAAIAABAAAAAAgAAEAC+lY6qRw2z6vk3ALxBn6P6H8Zf1CtDcLMuDaBcMfzwMhO0jL+MwV0RQPLicv6TpvEXVVcCMLmVVmj8wYDxF+VXAPCXv7cAwG2MI2hNOpO/1wSQC8fSnhGAj7+3PAOC1oOz+XvtNUD6oaRnABDi77UBJMIPprUOoIxgeK1taCr8cHKLAPb6ewsAJhWCcXXz+5oBEMPfWwEwqRGMrbQCIJa/twTgKZwF6gDKgwyvDUD6brkWgCP8/REAXGgYYX7Hfs+OSBp/t6xYh6v8wFmQ+gBID/TXlgC4SPcLyZ7T8Z7T3pkBuFixHGGYovMBMFwcgNu7dVzRR6gbuhsAib/u5y2mL4Ru47kFAOSxnJBrxmrjmQ0A5JuMXhJGWDlseo/1jgCksZwi4Lne68BdAUh8dsiOqPE9Fd8ZgOSa8Rl5HSgB8Ft9FiGm7+HaagD4nQmqyOeBBgB+bqiJDKAFgJ/BugN2QgDYYzAAAAAAAAAAizAA2IZyEOMgRiiCYBzBOMLRXMhwIcOVJJfyXMqTlkJiVqzELFITlVMTSc5VTs4lPV05PZ0CDQMFGpQoXaBEiSI9I0V6lKlSqE2hNq0KaNZBsw7a1dCwiYZNtCyjaR9N+2hbSeNWGrfSupjm3TTvpn09f+AAAABgBAAAAAEAAAgAAEAAAAACAAAQAACAAHALfQGGT9bymuye2AAAAABJRU5ErkJggg=="),A=>A.charCodeAt(0));
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allyhub/slides-pptx",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"default": "./dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"./read": {
|
|
11
|
+
"types": "./dist/read/index.d.ts",
|
|
12
|
+
"default": "./dist/read/index.js"
|
|
9
13
|
}
|
|
10
14
|
},
|
|
11
15
|
"sideEffects": false,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{adjustmentDefaults as Q,cellLook as X,chartDrawing as tt,colorRgb as et,CONNECTOR_STYLE as nt,DECK_FONTS as it,EMU_PER_PT as k,Inches as ot,isConnectorGeometry as rt,LINE_DEFAULTS as $,mappedColors as st,Pt as at,bulletLookOver as lt,numberText as dt,runLang as ct,SINGLE_SPACING as E,spaceLength as I,PATTERN_CELL as j,patternPath as ut,tableStyleOf as ft}from"@allyhub/slides-core";import{presetOutline as H}from"@allyhub/ooxml/geometry";export const SHAPE_ATTR="data-ak-shape",LINE_WIDTH=at(.75);export{E as SINGLE_SPACING};export const MIN_FONT_SCALE=.25;export function themeCss(e){const t={};for(const[i,o]of Object.entries(e.colors))t[`--ak-theme-${i}`]=o;return t["--ak-theme-major"]=v(e.fonts.major,O),t["--ak-theme-minor"]=v(e.fonts.minor,O),t["--ak-theme-major-ea"]=v(e.fonts.major_east_asian,M),t["--ak-theme-minor-ea"]=v(e.fonts.minor_east_asian,M),t}const M='"Noto Sans SC", sans-serif',O=`"${it.minor}", ${M}`,v=(e,t)=>e.includes(",")||e.includes('"')?e:`"${e}", ${t}`;export const colorCss=(e,t)=>e==null?"transparent":et(e,t);const R=e=>e===void 0?void 0:e==="+mj-lt"?"var(--ak-theme-major)":e==="+mn-lt"?"var(--ak-theme-minor)":v(e,O),gt={l:"start",ctr:"center",r:"end",just:"justify"},pt={t:"flex-start",ctr:"center",b:"flex-end"},mt=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\u2E80-\u2FDF\u3000-\u303F\uFF00-\uFFEF]/u,bt=/[\u2018\u2019\u201C\u201D\u2026\u2014\u2013\u2025\u00B7]/u;export function eastAsianRuns(e,t){const i=[];for(const o of e){const r=mt.test(o)||t&&bt.test(o),n=i.at(-1);n?.ea===r?n.text+=o:i.push({text:o,ea:r})}return i}const ht=e=>!e.startsWith("#")&&!e.startsWith("ppaction:"),w=e=>`calc(${String(e)}px * var(--ak-fit, 1))`;function B(e,t,i,o){if(!t)return;const r=R(t.name);r&&(e.style.fontFamily=r),t.size!==void 0&&(e.style.fontSize=w(t.size*i)),t.bold!==void 0&&(e.style.fontWeight=t.bold?"700":"400"),t.italic!==void 0&&(e.style.fontStyle=t.italic?"italic":"normal"),(t.underline!==void 0||t.strike!==void 0||t.link)&&Object.assign(e.style,decorationCss(t)),t.caps!==void 0&&Object.assign(e.style,capsCss(t.caps)),t.highlight!==void 0&&(e.style.backgroundColor=t.highlight),t.baseline!==void 0&&t.baseline!==0&&(e.style.fontSize=t.size===void 0?"0.66em":w(t.size*i*.66),e.style.verticalAlign=`${String(t.baseline/.66)}em`),t.spacing!==void 0&&(e.style.letterSpacing=w(t.spacing*i)),t.link!==void 0?e.style.color=colorCss("hlink",o):t.color!==void 0&&(e.style.color=colorCss(t.color,o))}const St={sng:{style:"solid"},dbl:{style:"double"},heavy:{style:"solid",heavy:!0},dotted:{style:"dotted"},dottedHeavy:{style:"dotted",heavy:!0},dash:{style:"dashed"},dashHeavy:{style:"dashed",heavy:!0},dashLong:{style:"dashed"},dashLongHeavy:{style:"dashed",heavy:!0},dotDash:{style:"dashed"},dotDashHeavy:{style:"dashed",heavy:!0},dotDotDash:{style:"dashed"},dotDotDashHeavy:{style:"dashed",heavy:!0},wavy:{style:"wavy"},wavyHeavy:{style:"wavy",heavy:!0},wavyDbl:{style:"wavy"},words:{style:"solid"}};export function decorationCss(e){const t=typeof e.underline=="string"?e.underline:e.underline===!0||e.link!==void 0?"sng":void 0,i=e.strike===!0?"sngStrike":e.strike===!1?void 0:e.strike,o=t?St[t]:{style:i==="dblStrike"?"double":"solid"};return{textDecorationLine:[t?"underline":"",i?"line-through":""].filter(r=>r!=="").join(" ")||"none",textDecorationStyle:o.style,textDecorationThickness:"heavy"in o?"0.1em":"auto"}}export const capsCss=e=>({textTransform:e==="all"?"uppercase":"none",fontVariantCaps:e==="small"?"small-caps":"normal"});function yt(){if(document.getElementById("ak-bullet-style"))return;const e=document.createElement("style");e.id="ak-bullet-style",e.textContent="[data-ak-bullet]::before{content:attr(data-ak-bullet)}",document.head.append(e)}export function paragraphStyle(e,t){const i=t[e.level]??t[0];if(!i)throw new Error("A text style has nine levels.");return lt({...i,...e.alignment===void 0?{}:{alignment:e.alignment},...e.line_spacing===void 0?{}:{line_spacing:e.line_spacing},...e.space_before===void 0?{}:{space_before:e.space_before},...e.space_after===void 0?{}:{space_after:e.space_after},...e.margin_left===void 0?{}:{margin_left:e.margin_left},...e.indent===void 0?{}:{indent:e.indent},...e.numbered===void 0?{}:{numbered:e.numbered},font:{...i.font,...e.font}},e)}export function paragraphLabels(e,t){const i=[];return e.map(o=>{if(!o.runs.some(n=>n.text!==""&&n.text!=="\v"))return;const r=paragraphStyle(o,t);return i.length=o.level+1,r.numbered===void 0?i[o.level]=0:i[o.level]=i[o.level]?(i[o.level]??0)+1:r.start_at??1,r.numbered===void 0?r.bullet?.char:dt(r.numbered,i[o.level]??1)})}export function paragraphElement(e,t,i,o,r,n){const s=paragraphStyle(e,i),l=document.createElement("div");l.dataset.akParagraph=String(t),l.dataset.akLevel=String(e.level);const c=e.runs.map(a=>a.font?.size??s.font.size),u=(c.length>0?Math.max(...c):s.font.size)*r,p="lines"in s.line_spacing?String(s.line_spacing.lines*E):w(s.line_spacing.fixed*r),d=o!==void 0;if(Object.assign(l.style,{position:"relative",textAlign:gt[s.alignment],paddingInlineStart:`${String(s.margin_left*r)}px`,textIndent:d?"0px":`${String(s.indent*r)}px`,marginBlockStart:t===0?"0px":w(I(s.space_before,u/r)*r),marginBlockEnd:w(I(s.space_after,u/r)*r),lineHeight:p,fontSize:w(u),minBlockSize:"lines"in s.line_spacing?w(u*s.line_spacing.lines*E):p}),B(l,s.font,r,n),l.style.fontSize=w(u),o!==void 0){yt();const a=document.createElement("span");Object.assign(a.style,{position:"absolute",insetInlineStart:`${String((s.margin_left+s.indent)*r)}px`,textIndent:"0px"}),a.dataset.akLabel=String((s.margin_left+s.indent)*r),a.dataset.akMargin=String(s.margin_left*r),a.dataset.akTab=String(DEFAULT_TAB_STOP*r);const g=document.createElement("span");g.dataset.akBullet=o;const m=s.numbered===void 0?s.bullet?.font:void 0,S=(e.runs[0]?.font?.size??s.font.size)*r;Object.assign(g.style,{lineHeight:"0",...m===void 0?{}:{fontFamily:R(m)},...s.bullet_size===void 0?{}:{fontSize:w(S*s.bullet_size)},...s.bullet_color===void 0?{}:{color:colorCss(s.bullet_color,n)}}),a.append(g),l.append(a)}return l}export const DEFAULT_TAB_STOP=ot(1);export function hangLabels(e){for(const t of e.querySelectorAll("[data-ak-label]")){const i=t.parentElement,o=t.firstElementChild;if(!i||!(o instanceof HTMLElement))continue;const r=Number(t.dataset.akLabel),n=Number(t.dataset.akMargin),s=Number(t.dataset.akTab),l=getComputedStyle(i).writingMode.startsWith("vertical"),c=r+(l?o.offsetHeight:o.offsetWidth);i.style.textIndent=c<=n+.5||!(s>0)?"0px":`${String((Math.floor(c/s)+1)*s-n)}px`}}export const exactSpacing=(e,t)=>!("lines"in paragraphStyle(e,t).line_spacing);export function runElement(e,t,i,o=!1,r){const n=document.createElement("span");B(n,e.font,t,i);const s=e.text===void 0?r:ct(e.text,r);return s!==void 0&&s!==r&&(n.lang=s),o&&(n.style.lineHeight="0"),e.font?.link!==void 0&&ht(e.font.link)&&(n.dataset.akLink=e.font.link),n}export function eastAsianFace(e,t){return`var(--ak-theme-${(e.font?.name??t)==="+mj-lt"?"major":"minor"}-ea)`}function xt(e,t,i,o,r){const n=isCjk(o);e.replaceChildren();const s=t.paragraphs.length>0?t.paragraphs:[{runs:[],level:0}],l=paragraphLabels(s,t.style.levels);s.forEach((c,u)=>{const p=paragraphElement(c,u,t.style.levels,l[u],i,r),d=paragraphStyle(c,t.style.levels).font.name,a=exactSpacing(c,t.style.levels);for(const g of c.runs){const m=runElement(g,i,r,a,o),S=eastAsianFace(g,d);for(const f of eastAsianRuns(g.text.replaceAll("\v",`
|
|
2
|
+
import{adjustmentDefaults as Q,cellLook as X,chartDrawing as tt,colorRgb as et,CONNECTOR_STYLE as nt,DECK_FONTS as it,EMU_PER_PT as k,Inches as ot,isConnectorGeometry as rt,LINE_DEFAULTS as $,mappedColors as st,Pt as at,bulletLookOver as lt,numberText as dt,runLang as ct,SINGLE_SPACING as E,spaceLength as I,PATTERN_CELL as j,patternPath as ut,tableStyleOf as ft}from"@allyhub/slides-core";import{presetOutline as H}from"@allyhub/ooxml/geometry";export{SLIDE_CSS,slideStyle}from"./slide-css.js";export const SHAPE_ATTR="data-ak-shape",LINE_WIDTH=at(.75);export{E as SINGLE_SPACING};export const MIN_FONT_SCALE=.25;export function themeCss(e){const t={};for(const[i,o]of Object.entries(e.colors))t[`--ak-theme-${i}`]=o;return t["--ak-theme-major"]=v(e.fonts.major,O),t["--ak-theme-minor"]=v(e.fonts.minor,O),t["--ak-theme-major-ea"]=v(e.fonts.major_east_asian,M),t["--ak-theme-minor-ea"]=v(e.fonts.minor_east_asian,M),t}const M='"Noto Sans SC", sans-serif',O=`"${it.minor}", ${M}`,v=(e,t)=>e.includes(",")||e.includes('"')?e:`"${e}", ${t}`;export const colorCss=(e,t)=>e==null?"transparent":et(e,t);const R=e=>e===void 0?void 0:e==="+mj-lt"?"var(--ak-theme-major)":e==="+mn-lt"?"var(--ak-theme-minor)":v(e,O),gt={l:"start",ctr:"center",r:"end",just:"justify"},pt={t:"flex-start",ctr:"center",b:"flex-end"},mt=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\u2E80-\u2FDF\u3000-\u303F\uFF00-\uFFEF]/u,bt=/[\u2018\u2019\u201C\u201D\u2026\u2014\u2013\u2025\u00B7]/u;export function eastAsianRuns(e,t){const i=[];for(const o of e){const r=mt.test(o)||t&&bt.test(o),n=i.at(-1);n?.ea===r?n.text+=o:i.push({text:o,ea:r})}return i}const ht=e=>!e.startsWith("#")&&!e.startsWith("ppaction:"),w=e=>`calc(${String(e)}px * var(--ak-fit, 1))`;function B(e,t,i,o){if(!t)return;const r=R(t.name);r&&(e.style.fontFamily=r),t.size!==void 0&&(e.style.fontSize=w(t.size*i)),t.bold!==void 0&&(e.style.fontWeight=t.bold?"700":"400"),t.italic!==void 0&&(e.style.fontStyle=t.italic?"italic":"normal"),(t.underline!==void 0||t.strike!==void 0||t.link)&&Object.assign(e.style,decorationCss(t)),t.caps!==void 0&&Object.assign(e.style,capsCss(t.caps)),t.highlight!==void 0&&(e.style.backgroundColor=t.highlight),t.baseline!==void 0&&t.baseline!==0&&(e.style.fontSize=t.size===void 0?"0.66em":w(t.size*i*.66),e.style.verticalAlign=`${String(t.baseline/.66)}em`),t.spacing!==void 0&&(e.style.letterSpacing=w(t.spacing*i)),t.link!==void 0?e.style.color=colorCss("hlink",o):t.color!==void 0&&(e.style.color=colorCss(t.color,o))}const St={sng:{style:"solid"},dbl:{style:"double"},heavy:{style:"solid",heavy:!0},dotted:{style:"dotted"},dottedHeavy:{style:"dotted",heavy:!0},dash:{style:"dashed"},dashHeavy:{style:"dashed",heavy:!0},dashLong:{style:"dashed"},dashLongHeavy:{style:"dashed",heavy:!0},dotDash:{style:"dashed"},dotDashHeavy:{style:"dashed",heavy:!0},dotDotDash:{style:"dashed"},dotDotDashHeavy:{style:"dashed",heavy:!0},wavy:{style:"wavy"},wavyHeavy:{style:"wavy",heavy:!0},wavyDbl:{style:"wavy"},words:{style:"solid"}};export function decorationCss(e){const t=typeof e.underline=="string"?e.underline:e.underline===!0||e.link!==void 0?"sng":void 0,i=e.strike===!0?"sngStrike":e.strike===!1?void 0:e.strike,o=t?St[t]:{style:i==="dblStrike"?"double":"solid"};return{textDecorationLine:[t?"underline":"",i?"line-through":""].filter(r=>r!=="").join(" ")||"none",textDecorationStyle:o.style,textDecorationThickness:"heavy"in o?"0.1em":"auto"}}export const capsCss=e=>({textTransform:e==="all"?"uppercase":"none",fontVariantCaps:e==="small"?"small-caps":"normal"});function yt(){if(document.getElementById("ak-bullet-style"))return;const e=document.createElement("style");e.id="ak-bullet-style",e.textContent="[data-ak-bullet]::before{content:attr(data-ak-bullet)}",document.head.append(e)}export function paragraphStyle(e,t){const i=t[e.level]??t[0];if(!i)throw new Error("A text style has nine levels.");return lt({...i,...e.alignment===void 0?{}:{alignment:e.alignment},...e.line_spacing===void 0?{}:{line_spacing:e.line_spacing},...e.space_before===void 0?{}:{space_before:e.space_before},...e.space_after===void 0?{}:{space_after:e.space_after},...e.margin_left===void 0?{}:{margin_left:e.margin_left},...e.indent===void 0?{}:{indent:e.indent},...e.numbered===void 0?{}:{numbered:e.numbered},font:{...i.font,...e.font}},e)}export function paragraphLabels(e,t){const i=[];return e.map(o=>{if(!o.runs.some(n=>n.text!==""&&n.text!=="\v"))return;const r=paragraphStyle(o,t);return i.length=o.level+1,r.numbered===void 0?i[o.level]=0:i[o.level]=i[o.level]?(i[o.level]??0)+1:r.start_at??1,r.numbered===void 0?r.bullet?.char:dt(r.numbered,i[o.level]??1)})}export function paragraphElement(e,t,i,o,r,n){const s=paragraphStyle(e,i),l=document.createElement("div");l.dataset.akParagraph=String(t),l.dataset.akLevel=String(e.level);const c=e.runs.map(a=>a.font?.size??s.font.size),u=(c.length>0?Math.max(...c):s.font.size)*r,p="lines"in s.line_spacing?String(s.line_spacing.lines*E):w(s.line_spacing.fixed*r),d=o!==void 0;if(Object.assign(l.style,{position:"relative",textAlign:gt[s.alignment],paddingInlineStart:`${String(s.margin_left*r)}px`,textIndent:d?"0px":`${String(s.indent*r)}px`,marginBlockStart:t===0?"0px":w(I(s.space_before,u/r)*r),marginBlockEnd:w(I(s.space_after,u/r)*r),lineHeight:p,fontSize:w(u),minBlockSize:"lines"in s.line_spacing?w(u*s.line_spacing.lines*E):p}),B(l,s.font,r,n),l.style.fontSize=w(u),o!==void 0){yt();const a=document.createElement("span");Object.assign(a.style,{position:"absolute",insetInlineStart:`${String((s.margin_left+s.indent)*r)}px`,textIndent:"0px"}),a.dataset.akLabel=String((s.margin_left+s.indent)*r),a.dataset.akMargin=String(s.margin_left*r),a.dataset.akTab=String(DEFAULT_TAB_STOP*r);const g=document.createElement("span");g.dataset.akBullet=o;const m=s.numbered===void 0?s.bullet?.font:void 0,S=(e.runs[0]?.font?.size??s.font.size)*r;Object.assign(g.style,{lineHeight:"0",...m===void 0?{}:{fontFamily:R(m)},...s.bullet_size===void 0?{}:{fontSize:w(S*s.bullet_size)},...s.bullet_color===void 0?{}:{color:colorCss(s.bullet_color,n)}}),a.append(g),l.append(a)}return l}export const DEFAULT_TAB_STOP=ot(1);export function hangLabels(e){for(const t of e.querySelectorAll("[data-ak-label]")){const i=t.parentElement,o=t.firstElementChild;if(!i||!(o instanceof HTMLElement))continue;const r=Number(t.dataset.akLabel),n=Number(t.dataset.akMargin),s=Number(t.dataset.akTab),l=getComputedStyle(i).writingMode.startsWith("vertical"),c=r+(l?o.offsetHeight:o.offsetWidth);i.style.textIndent=c<=n+.5||!(s>0)?"0px":`${String((Math.floor(c/s)+1)*s-n)}px`}}export const exactSpacing=(e,t)=>!("lines"in paragraphStyle(e,t).line_spacing);export function runElement(e,t,i,o=!1,r){const n=document.createElement("span");B(n,e.font,t,i);const s=e.text===void 0?r:ct(e.text,r);return s!==void 0&&s!==r&&(n.lang=s),o&&(n.style.lineHeight="0"),e.font?.link!==void 0&&ht(e.font.link)&&(n.dataset.akLink=e.font.link),n}export function eastAsianFace(e,t){return`var(--ak-theme-${(e.font?.name??t)==="+mj-lt"?"major":"minor"}-ea)`}function xt(e,t,i,o,r){const n=isCjk(o);e.replaceChildren();const s=t.paragraphs.length>0?t.paragraphs:[{runs:[],level:0}],l=paragraphLabels(s,t.style.levels);s.forEach((c,u)=>{const p=paragraphElement(c,u,t.style.levels,l[u],i,r),d=paragraphStyle(c,t.style.levels).font.name,a=exactSpacing(c,t.style.levels);for(const g of c.runs){const m=runElement(g,i,r,a,o),S=eastAsianFace(g,d);for(const f of eastAsianRuns(g.text.replaceAll("\v",`
|
|
3
3
|
`),n)){if(!f.ea){m.append(f.text);continue}const b=document.createElement("span");b.style.fontFamily=S,b.textContent=f.text,m.append(b)}p.append(m)}e.append(p)})}export const isCjk=e=>e!==void 0&&/^(zh|ja|ko)(-|$)/iu.test(e);function A(e,t,i,o,r){const{style:n}=e,s=n.auto_size==="shape"&&n.orientation==="horz",l=document.createElement("div");l.dataset.akText="",l.dataset.akAutofit=n.auto_size,n.orientation!=="horz"&&(l.dataset.akOrientation=n.orientation);const c=s?void 0:r;Object.assign(l.style,{position:s?"relative":"absolute",inset:s?"auto":c?`${String(c.top)}px calc(100% - ${String(c.right)}px) calc(100% - ${String(c.bottom)}px) ${String(c.left)}px`:"0px",minHeight:c?`${String(c.bottom-c.top)}px`:"100%",display:"flex",flexDirection:"column",justifyContent:pt[n.vertical_anchor],padding:`${String(n.margins.top*t)}px ${String(n.margins.right*t)}px ${String(n.margins.bottom*t)}px ${String(n.margins.left*t)}px`,whiteSpace:n.word_wrap?"pre-wrap":"pre",overflowWrap:"break-word",boxSizing:"border-box",...orientationCss(n.orientation)});const u=document.createElement("div");if(u.dataset.akBody="",l.append(u),xt(u,e,t,i,o),!n.word_wrap){Object.assign(u.style,{display:"flex",flexDirection:"column"});for(const p of u.children){if(!(p instanceof HTMLElement))continue;const d=p.style.textAlign;Object.assign(p.style,{inlineSize:"max-content",minInlineSize:"100%",boxSizing:"border-box",alignSelf:d==="center"?"center":d==="end"?"flex-end":"flex-start"})}}return i!==void 0&&(l.lang=i),isCjk(i)&&(l.dataset.akCjk=""),l}export function orientationCss(e){switch(e){case"horz":return{writingMode:"horizontal-tb",textOrientation:"mixed"};case"vert":return{writingMode:"sideways-rl",textOrientation:"mixed"};case"vert270":return{writingMode:"sideways-lr",textOrientation:"mixed"};case"eaVert":return{writingMode:"vertical-rl",textOrientation:"mixed"};case"wordArtVert":return{writingMode:"vertical-lr",textOrientation:"upright"};case"wordArtVertRtl":return{writingMode:"vertical-rl",textOrientation:"upright"};case"mongolianVert":return{writingMode:"vertical-lr",textOrientation:"mixed"}}}export function fitText(e){const t=e.querySelector("[data-ak-body]");if(!t||e.dataset.akAutofit!=="text")return 1;const i=e.dataset.akOrientation!==void 0,o=getComputedStyle(e),r=i?e.clientWidth-parseFloat(o.paddingLeft)-parseFloat(o.paddingRight):e.clientHeight-parseFloat(o.paddingTop)-parseFloat(o.paddingBottom),n=c=>(e.style.setProperty("--ak-fit",String(c)),hangLabels(e),(i?t.scrollWidth:t.scrollHeight)<=r+.5);if(n(1))return delete e.dataset.akFontScale,1;let s=MIN_FONT_SCALE,l=1;if(!n(s))return e.dataset.akFontScale=s.toFixed(2),s;for(;l-s>.01;){const c=(s+l)/2;n(c)?s=c:l=c}return n(s),e.dataset.akFontScale=s.toFixed(2),s}function C(e,t,i,o){const r=e.split(" "),n=[],s=l=>{const c=Number(r[l]),u=Number(r[l+1]);return[o?.h?t-c:c,o?.v?i-u:u]};for(let l=0;l<r.length;){const c=r[l++];c==="M"||c==="L"?(n.push({op:c,at:[s(l)]}),l+=2):c==="C"?(n.push({op:c,at:[s(l),s(l+2),s(l+4)]}),l+=6):c==="Z"&&n.push({op:c})}return n}const N=e=>e.map(t=>t.op==="Z"?"Z":`${t.op}${t.at.map(([i,o])=>`${String(i)} ${String(o)}`).join(" ")}`).join(" ");function wt(e,t){const i=e.flatMap(n=>n.op==="Z"?[]:n.at),o=t?[...i].reverse():i,r=o[0];if(r)for(const n of o.slice(1)){const s=Math.hypot(r[0]-n[0],r[1]-n[1]);if(s>1e-6)return{at:r,out:[(r[0]-n[0])/s,(r[1]-n[1])/s]}}}function vt(e,t,i,o){const r=e.filter(l=>l.op!=="Z"),n=t?r[r.length-1]:r[0];if(!n)return;const s=t?n.at.slice(n.op==="C"?-2:-1):[...n.at,...r[1]?.op==="C"?r[1].at.slice(0,1):[]];for(const l of s)l[0]+=i,l[1]+=o}function $t(e,t,i,o,r){if(t.line===null)return;const n=t.frame.width*i,s=t.frame.height*i,l=(H(t.geometry??"line",n,s,t.adjustments)?.paths??[]).filter(m=>m.stroke).map(m=>C(m.d,n,s,t.flip)),c=l[0],u=l[l.length-1];if(!c||!u)return;const p="http://www.w3.org/2000/svg",d=document.createElementNS(p,"svg");d.setAttribute("width",String(Math.max(n,1))),d.setAttribute("height",String(Math.max(s,1))),Object.assign(d.style,{position:"absolute",left:"0px",top:"0px",overflow:"visible"});const a=colorCss(t.line??nt.line,r),g=U(t,c,u,o,i,a);for(const m of l){const S=document.createElementNS(p,"path");S.setAttribute("d",N(m)),S.setAttribute("fill","none"),D(S,t,a,o),d.append(S),G(d,S,t,o,!1)}d.append(...g),e.append(d)}const At={flat:"butt",rnd:"round",sq:"square"};function D(e,t,i,o){e.setAttribute("stroke",i),e.setAttribute("stroke-width",String(o)),e.setAttribute("stroke-linecap",At[t.line_cap??$.cap]);const r=t.line_join??$.join;e.setAttribute("stroke-linejoin",r),r==="miter"&&e.setAttribute("stroke-miterlimit","8");const n=Et(t.line_dash,o,t.line_cap);n&&e.setAttribute("stroke-dasharray",n)}const P={dbl:[1/3,1/3,1/3],thickThin:[.6,.2,.2],thinThick:[.2,.2,.6],tri:[1/6,1/6,2/6,1/6,1/6]};let _t=0;function G(e,t,i,o,r){const n=i.line_compound;if(n===void 0||n==="sng")return;const s=t.getAttribute("d")??"",l="http://www.w3.org/2000/svg",c=!r&&(n==="thickThin"||n==="thinThick")?P.dbl:P[n],u=`ak-compound-${String(_t++)}`,p=document.createElementNS(l,"defs"),d=document.createElementNS(l,"mask");d.id=u,d.setAttribute("maskUnits","userSpaceOnUse");for(const[f,b]of Object.entries({x:"-100000",y:"-100000",width:"200000",height:"200000"}))d.setAttribute(f,b);const a=(f,b,h)=>{if(f<=0)return;const y=document.createElementNS(l,"path");y.setAttribute("d",s),y.setAttribute("fill","none"),y.setAttribute("stroke",b),y.setAttribute("stroke-width",String(f*2)),y.setAttribute("stroke-linejoin",t.getAttribute("stroke-linejoin")??$.join),y.setAttribute("stroke-linecap",t.getAttribute("stroke-linecap")??"butt"),h.append(y)},g=[.5];for(const f of c)g.push((g[g.length-1]??0)-f);const m=c.flatMap((f,b)=>b%2===1?[[g[b+1]??0,g[b]??0]]:[]);if(a(o/2,"white",d),m.every(([f,b])=>m.some(([h,y])=>Math.abs(h+b)<1e-6&&Math.abs(y+f)<1e-6)))for(const[f,b]of m)b>0&&(a(b*o,"black",d),a(Math.max(0,f)*o,"white",d));else{const f=document.createElementNS(l,"clipPath");f.id=`${u}-in`;const b=document.createElementNS(l,"path");b.setAttribute("d",s),b.setAttribute("clip-rule","evenodd"),f.append(b),p.append(f);for(const[h,y]of m)if(h>=0){a(y*o,"black",d),a(h*o,"white",d);const x=document.createElementNS(l,"g");x.setAttribute("clip-path",`url(#${f.id})`),a(o/2,"white",x),d.append(x)}else{const x=document.createElementNS(l,"g");x.setAttribute("clip-path",`url(#${f.id})`),a(-h*o,"black",x),a(Math.max(0,-y)*o,"white",x),d.append(x)}}p.append(d),e.insertBefore(p,e.firstChild),t.setAttribute("mask",`url(#${u})`)}const kt={sysDash:[3,1],sysDot:[1,1],dash:[4,3],dashDot:[4,3,1,3],lgDash:[8,3],lgDashDot:[8,3,1,3],lgDashDotDot:[8,3,1,3,1,3],dot:[1,3],sysDashDot:[3,1,1,1],sysDashDotDot:[3,1,1,1,1,1]},Et=(e,t,i="flat")=>e&&kt[e]?.map((o,r)=>String((i==="flat"?o:r%2===0?Math.max(.001,o-1):o+1)*t)).join(" "),jt=25200,W={sm:2,med:3,lg:5};function U(e,t,i,o,r,n,s={begin:!0,end:!0}){const l=Math.max(o,jt*r),c=[];for(const[u,p,d,a,g]of[[e.line_begin,e.line_begin_size,t,!1,s.begin],[e.line_end,e.line_end_size,i,!0,s.end]]){if(!g||u===void 0||u==="none")continue;const m=wt(d,a);if(!m)continue;const S=u==="arrow"?.5:0,f=l*(W[p?.len??"med"]+S),b=l*(W[p?.w??"med"]+S);c.push(Mt(u,m.at,m.out,f,b,o,n)),u!=="arrow"&&vt(d,a,-m.out[0]*f/2,-m.out[1]*f/2)}return c}function Mt(e,[t,i],[o,r],n,s,l,c){const u="http://www.w3.org/2000/svg",p=(m,S)=>`${String(t-o*m-r*S)},${String(i-r*m+o*S)}`;if(e==="oval"){const m=document.createElementNS(u,"ellipse");return m.setAttribute("cx",String(t)),m.setAttribute("cy",String(i)),m.setAttribute("rx",String(n/2)),m.setAttribute("ry",String(s/2)),m.setAttribute("transform",`rotate(${String(Math.atan2(r,o)*180/Math.PI)} ${String(t)} ${String(i)})`),m.setAttribute("fill",c),m}const d=e==="arrow",a=document.createElementNS(u,d?"polyline":"polygon"),g={triangle:[p(0,0),p(n,s/2),p(n,-s/2)],stealth:[p(0,0),p(n,s/2),p(n*.7,0),p(n,-s/2)],diamond:[p(-n/2,0),p(0,s/2),p(n/2,0),p(0,-s/2)],arrow:[p(n,s/2),p(0,0),p(n,-s/2)]}[e];return a.setAttribute("points",g.join(" ")),d?(a.setAttribute("fill","none"),a.setAttribute("stroke",c),a.setAttribute("stroke-width",String(l))):a.setAttribute("fill",c),a}function Z(e,t,i,o,r,n){const s=t.frame.width*o,l=t.frame.height*o,c="http://www.w3.org/2000/svg",u=document.createElementNS(c,"svg");u.setAttribute("width",String(Math.max(s,1))),u.setAttribute("height",String(Math.max(l,1))),Object.assign(u.style,{position:"absolute",left:"0px",top:"0px",overflow:"visible"}),z(u,t);let p=colorCss(t.fill,n);if(t.gradient){const f=`ak-gradient-${String(Dt++)}`;u.append(zt(c,f,t.gradient,t.frame,n)),p=`url(#${f})`}const d=i.map(f=>f.d),a=[],g=i.flatMap((f,b)=>f.stroke?[b]:[]),m=g[0],S=g[g.length-1];if(t.line!==void 0&&t.line!==null&&m!==void 0&&S!==void 0&&((t.line_begin??"none")!=="none"||(t.line_end??"none")!=="none")){const f=C(d[m]??"",s,l,void 0),b=m===S?f:C(d[S]??"",s,l,void 0),h=y=>y.at(-1)?.op!=="Z";a.push(...U(t,f,b,r,o,colorCss(t.line,n),{begin:h(f),end:h(b)})),d[m]=N(f),d[S]=N(b)}i.forEach((f,b)=>{const h=document.createElementNS(c,"path");if(h.setAttribute("d",d[b]??f.d),h.setAttribute("fill-rule","evenodd"),h.setAttribute("fill",f.fill==="none"||t.fill===null||t.fill===void 0?f.fill==="none"||!t.gradient?"none":p:f.fill==="norm"?p:Ot[f.fill](colorCss(t.fill,n))),t.fill_transparency!==void 0&&h.setAttribute("fill-opacity",String(1-t.fill_transparency)),f.stroke&&t.line!==void 0&&t.line!==null){const y=d[b]??f.d;if(t.line_compound!==void 0&&t.line_compound!=="sng"){u.append(h);const x=document.createElementNS(c,"path");x.setAttribute("d",y),x.setAttribute("fill","none"),D(x,t,colorCss(t.line,n),r),u.append(x),G(u,x,t,r,/Z\s*$/u.test(y.trim()));return}D(h,t,colorCss(t.line,n),r)}u.append(h)}),u.append(...a),e.append(u)}const Ot={darken:e=>`color-mix(in srgb, ${e} 60%, black)`,darkenLess:e=>`color-mix(in srgb, ${e} 80%, black)`,lighten:e=>`color-mix(in srgb, ${e} 60%, white)`,lightenLess:e=>`color-mix(in srgb, ${e} 80%, white)`};function V(e,t){const i=e.path;if(!i)return[];const o=i.w===0?0:e.frame.width*t/i.w,r=i.h===0?0:e.frame.height*t/i.h;return[{d:i.steps.map(s=>s.op==="close"?"Z":s.op==="move"?`M ${String(s.x*o)} ${String(s.y*r)}`:s.op==="line"?`L ${String(s.x*o)} ${String(s.y*r)}`:`C ${String(s.x1*o)} ${String(s.y1*r)} ${String(s.x2*o)} ${String(s.y2*r)} ${String(s.x*o)} ${String(s.y*r)}`).join(" "),fill:"norm",stroke:!0}]}function z(e,t){!t.flip?.h&&!t.flip?.v||(e.style.transform=`scale(${t.flip.h?"-1":"1"}, ${t.flip.v?"-1":"1"})`)}const Ct={tl:[0,0],t:[50,0],tr:[100,0],l:[0,50],ctr:[50,50],r:[100,50],bl:[0,100],b:[50,100],br:[100,100]},q=e=>e.picture_fill!==void 0||e.pattern!==void 0||e.gradient?.path!==void 0;function K(e,t,i,o,r){const n=document.createElement("div");Object.assign(n.style,{position:"absolute",inset:"0px",overflow:"hidden",pointerEvents:"none"}),r!==void 0&&(n.style.clipPath=`path(evenodd, "${r}")`),z(n,e);const s=e.picture_fill;if(s){const c=JSON.stringify(o(s.path));s.transparency!==void 0&&(n.style.opacity=String(1-s.transparency));const u=s.tile,p=document.createElement("img");if(p.alt="",p.src=o(s.path),Object.assign(p.style,{position:"absolute",inset:"0px",width:"100%",height:"100%",maxWidth:"none",objectFit:"fill",...u?{visibility:"hidden"}:{}}),n.append(p),u){const d=j*t*u.scale_x,a=j*t*u.scale_y,[g,m]=Ct[u.align],S=document.createElement("div");Object.assign(S.style,{position:"absolute",left:"0px",top:"0px",width:`${String(e.frame.width*t/d)}px`,height:`${String(e.frame.height*t/a)}px`,transform:`scale(${String(d)}, ${String(a)})`,transformOrigin:"0 0",background:`url(${c}) calc(${String(g)}% + ${String(u.offset_x*t/d)}px) calc(${String(m)}% + ${String(u.offset_y*t/a)}px) / auto repeat`}),n.append(S)}return n}if(!e.pattern&&e.gradient)return n.style.background=T(e.gradient,i),n;const l=e.pattern;if(l){const c=`<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" shape-rendering="crispEdges"><rect width="8" height="8" fill="${colorCss(l.bg,i)}"/><path d="${ut(l.preset)}" fill="${colorCss(l.fg,i)}"/></svg>`,u=8*j*t;n.style.background=`url("data:image/svg+xml,${encodeURIComponent(c)}") 0 0 / ${String(u)}px ${String(u)}px repeat`,n.style.imageRendering="pixelated"}return n}const Nt=new Set(["rect","roundRect","ellipse"]),L=(e,t,i)=>t===void 0||t===0?colorCss(e,i):`color-mix(in srgb, ${colorCss(e,i)} ${String((1-t)*100)}%, transparent)`,T=(e,t)=>{const i=e.stops.map(l=>`${L(l.color,l.transparency,t)} ${String(l.at*100)}%`).join(", ");if(e.path===void 0)return`linear-gradient(${String(e.angle+90)}deg, ${i})`;const o=e.focus??{left:.5,top:.5,right:.5,bottom:.5},r=(o.left+1-o.right)/2*100,n=(o.top+1-o.bottom)/2*100;return`radial-gradient(${e.path==="circle"?"circle farthest-corner":"farthest-side"} at ${String(r)}% ${String(n)}%, ${i})`},J=(e,t)=>e.gradient?T(e.gradient,t):e.fill===null||e.fill===void 0?"transparent":L(e.fill,e.fill_transparency,t);let Dt=0;function zt(e,t,i,o,r){const n=document.createElementNS(e,"linearGradient");n.id=t;const s=i.angle*Math.PI/180,l=Math.cos(s),c=Math.sin(s),u=(Math.abs(o.width*l)+Math.abs(o.height*c))/Math.max(o.width,o.height,1)/2;n.setAttribute("x1",String(.5-l*u)),n.setAttribute("y1",String(.5-c*u)),n.setAttribute("x2",String(.5+l*u)),n.setAttribute("y2",String(.5+c*u));for(const p of i.stops){const d=document.createElementNS(e,"stop");d.setAttribute("offset",String(p.at)),d.setAttribute("stop-color",colorCss(p.color,r)),p.transparency!==void 0&&d.setAttribute("stop-opacity",String(1-p.transparency)),n.append(d)}return n}let Lt=0;function Tt(e,t,i,o){const r=[],n="http://www.w3.org/2000/svg",s=[],l=t.frame.width*i,c=t.frame.height*i,u=(t.line_width??LINE_WIDTH)*i*5,p=(f,b)=>{const h=document.createElementNS(n,"filter");h.id=`ak-effect-${String(Lt++)}`;const y=b+u;for(const[x,_]of Object.entries({filterUnits:"userSpaceOnUse",x:String(-y),y:String(-y),width:String(l+2*y),height:String(c+2*y),"color-interpolation-filters":"sRGB"}))h.setAttribute(x,_);f(h),s.push(h),r.push(`url(#${h.id})`)},d=(f,b,h)=>{const y=document.createElementNS(n,b);for(const[x,_]of Object.entries(h))y.setAttribute(x,_);return f.append(y),y};if(t.soft_edges!==void 0&&t.soft_edges>0){const f=t.soft_edges*i;p(b=>{d(b,"feMorphology",{in:"SourceAlpha",operator:"erode",radius:String(f/2),result:"in"}),d(b,"feGaussianBlur",{in:"in",stdDeviation:String(f/4),result:"soft"}),d(b,"feComposite",{in:"SourceGraphic",in2:"soft",operator:"in"})},f)}const a=t.inner_shadow;if(a){const f=a.angle*Math.PI/180,b=a.distance*i;p(h=>{const y=d(h,"feComponentTransfer",{in:"SourceAlpha",result:"out"});d(y,"feFuncA",{type:"table",tableValues:"1 0"}),d(h,"feGaussianBlur",{in:"out",stdDeviation:String(a.blur*i/2),result:"blur"}),d(h,"feOffset",{in:"blur",dx:String(b*Math.cos(f)),dy:String(b*Math.sin(f)),result:"moved"}),d(h,"feFlood",{"flood-color":colorCss(a.color,o),"flood-opacity":String(1-a.transparency),result:"ink"}),d(h,"feComposite",{in:"ink",in2:"moved",operator:"in",result:"shadow"}),d(h,"feComposite",{in:"shadow",in2:"SourceAlpha",operator:"in",result:"inside"});const x=d(h,"feMerge",{});d(x,"feMergeNode",{in:"SourceGraphic"}),d(x,"feMergeNode",{in:"inside"})},(a.blur*2+a.distance)*i)}const g=t.shadow,m=t.glow&&t.glow.size>0?t.glow:void 0;if(g&&!m){const f=g.angle*Math.PI/180,b=g.distance*i;r.push(`drop-shadow(${String(b*Math.cos(f))}px ${String(b*Math.sin(f))}px ${String(g.blur*i)}px ${L(g.color,g.transparency,o)})`)}if(m){const f=m.size*i;p(b=>{d(b,"feMorphology",{in:"SourceAlpha",operator:"dilate",radius:String(f/2),result:"wide"}),d(b,"feGaussianBlur",{in:"wide",stdDeviation:String(f/4),result:"halo"}),d(b,"feFlood",{"flood-color":colorCss(m.color,o),"flood-opacity":String(1-m.transparency),result:"ink"}),d(b,"feComposite",{in:"ink",in2:"halo",operator:"in",result:"glow"});const h=d(b,"feMerge",{});if(g){const y=g.angle*Math.PI/180,x=g.distance*i;d(b,"feGaussianBlur",{in:"SourceAlpha",stdDeviation:String(g.blur*i/2),result:"cast"}),d(b,"feOffset",{in:"cast",dx:String(x*Math.cos(y)),dy:String(x*Math.sin(y)),result:"moved"}),d(b,"feFlood",{"flood-color":colorCss(g.color,o),"flood-opacity":String(1-g.transparency),result:"dark"}),d(b,"feComposite",{in:"dark",in2:"moved",operator:"in",result:"shadow"}),b.append(h),d(h,"feMergeNode",{in:"shadow"})}d(h,"feMergeNode",{in:"glow"}),d(h,"feMergeNode",{in:"SourceGraphic"})},Math.max(f*2,g?(g.blur*1.5+g.distance)*i:0))}if(s.length>0){const f=document.createElementNS(n,"svg");f.setAttribute("width","0"),f.setAttribute("height","0"),Object.assign(f.style,{position:"absolute"}),f.setAttribute("aria-hidden","true"),f.append(...s),e.append(f)}r.length>0&&(e.style.filter=r.join(" "));const S=t.reflection;S&&e.style.setProperty("-webkit-box-reflect",`below ${String(S.distance*i)}px linear-gradient(to bottom, transparent ${String((1-S.size)*100)}%, rgba(0, 0, 0, ${String(1-S.transparency)}))`)}function Ft(e,t,i){const o=t.geometry??"rect",r=t.frame.width*i,n=t.frame.height*i;o==="roundRect"?e.style.borderRadius=`${String(Math.min(r,n)*Math.min(.5,Math.max(0,t.adjustments?.[0]??Q("roundRect")[0]??0)))}px`:o==="ellipse"&&(e.style.borderRadius="50%")}const It={left:"borderLeft",right:"borderRight",top:"borderTop",bottom:"borderBottom"},Y="http://www.w3.org/2000/svg";function Ht(e,t,i,o,r){const n=i.width/k,s=i.height/k,l=o*k,c=tt(t,n,s),u=document.createElementNS(Y,"svg");u.setAttribute("viewBox",`0 0 ${String(n)} ${String(s)}`),u.setAttribute("width","100%"),u.setAttribute("height","100%"),Object.assign(u.style,{position:"absolute",inset:"0px",overflow:"visible"});const p=(a,g)=>{const m=document.createElementNS(Y,a);for(const[S,f]of Object.entries(g))m.setAttribute(S,String(f));u.append(m)},d=a=>{p("path",{d:a.d,fill:a.fill===void 0?"none":colorCss(a.fill,r),stroke:a.width>0?colorCss(a.color,r):"none","stroke-width":a.width,"stroke-linejoin":"round"})};for(const a of[...c.grid,...c.shapes])d(a);for(const a of[...c.boxes,...c.keys])p("rect",{x:a.x,y:a.y,width:a.width,height:a.height,fill:colorCss(a.color,r)});for(const a of[...c.axes,...c.lines])d(a);for(const a of c.dots)p("circle",{cx:a.x,cy:a.y,r:a.r,fill:colorCss(a.color,r)});e.append(u);for(const a of c.words){const g=document.createElement("div");g.textContent=a.text,Object.assign(g.style,{position:"absolute",left:`${String(a.x*l)}px`,top:`${String(a.y*l)}px`,transform:`translate(${{start:"0",middle:"-50%",end:"-100%"}[a.anchor]}, -50%)${a.rotate===void 0?"":` rotate(${String(a.rotate)}deg)`}`,transformOrigin:`${{start:"0%",middle:"50%",end:"100%"}[a.anchor]} 50%`,fontSize:`${String(a.size*l)}px`,lineHeight:"1",whiteSpace:"nowrap",color:colorCss(a.color,r),fontFamily:"var(--ak-theme-minor)"}),e.append(g)}}function Rt(e,t,i,o,r){const n=ft(t.style),s=document.createElement("table");n?.background!==void 0&&(s.style.background=colorCss(n.background,r)),Object.assign(s.style,{borderCollapse:"collapse",tableLayout:"fixed",width:`${String(t.columns.reduce((c,u)=>c+u,0)*i)}px`});const l=document.createElement("colgroup");for(const c of t.columns){const u=document.createElement("col");u.style.width=`${String(c*i)}px`,l.append(u)}s.append(l);for(const[c,u]of t.rows.entries()){const p=document.createElement("tr");p.style.height=`${String(u.height*i)}px`;for(const[d,a]of u.cells.entries()){if(a.spanned)continue;const g=document.createElement("td");g.dataset.akCell=`${String(c)},${String(d)}`,a.span_width&&(g.colSpan=a.span_width),a.span_height&&(g.rowSpan=a.span_height),g.style.padding="0px",g.style.verticalAlign={t:"top",ctr:"middle",b:"bottom"}[a.text.style.vertical_anchor];const m=n?X(n,t,c,d,t.rows.length,t.columns.length,c+(a.span_height??1)-1,d+(a.span_width??1)-1):void 0,S=a.fill!==void 0?a.fill:m?.fill;S!==void 0&&(g.style.background=colorCss(S,r));for(const[b,h]of Object.entries(It)){const y=b,x=a.borders?.[y]??m?.borders[y];x&&(g.style[h]=`${String(x.width*i)}px solid ${colorCss(x.color,r)}`)}const f=A(a.text,i,o,r);f.style.minHeight="0px",g.append(f),p.append(g)}s.append(p)}e.style.height="auto",e.append(s)}export function drawShape(e,t,i){const{k:o,colors:r}=i;if(t.kind==="placeholder"&&t.text?.empty===!0&&!i.editing)return;const n=document.createElement("div");n.setAttribute(SHAPE_ATTR,`${e}/${t.name}`);const{left:s,top:l,width:c,height:u}=t.frame;Object.assign(n.style,{position:"absolute",left:`${String(s*o)}px`,top:`${String(l*o)}px`,width:`${String(c*o)}px`,height:`${String(u*o)}px`}),t.rotation!==void 0&&(n.style.transform=`rotate(${String(t.rotation)}deg)`);const p=(t.line_width??LINE_WIDTH)*o;if(t.chart)Ht(n,t.chart,t.frame,o,r);else if(t.table)return Rt(n,t.table,o,i.lang,r),n;Tt(n,t,o,r),t.alt!==void 0&&n.setAttribute("aria-label",t.alt);let d;if(t.kind==="autoshape"){if(!t.path&&rt(t.geometry))return $t(n,t,o,p,r),n;const a=t.path?void 0:H(t.geometry??"rect",t.frame.width*o,t.frame.height*o,t.adjustments),g=t.line!==void 0&&t.line!==null&&(t.line_dash!==void 0&&t.line_dash!=="solid"||t.line_compound!==void 0&&t.line_compound!=="sng"||t.line_join!==void 0&&t.line_join!==$.join);if(q(t)){const S=t.path?V(t,o):a?.paths??[],f=S.filter(h=>h.fill!=="none").map(h=>h.d).join(" ");n.append(K(t,o,r,i.url,f));const b={...t,fill:null};return delete b.gradient,Z(n,b,S,o,p,r),t.text&&n.append(A(t.text,o,i.lang,r,a?.text)),n}const m=t.path?V(t,o):Nt.has(t.geometry??"rect")&&!g?void 0:a?.paths;if(m)return Z(n,t,m,o,p,r),t.text&&n.append(A(t.text,o,i.lang,r,a?.text)),n;n.style.background=J(t,r),Ft(n,t,o),d=a?.text}else q(t)?n.append(K(t,o,r,i.url,void 0)):(t.fill!==void 0||t.gradient)&&(n.style.background=J(t,r));if(t.line!==void 0&&t.line!==null&&(n.style.outline=`${String(p)}px ${t.line_dash===void 0||t.line_dash==="solid"?"solid":"dashed"} ${colorCss(t.line,r)}`,n.style.outlineOffset=`${String(-p/2)}px`),t.text?.style.auto_size==="shape"&&t.text.style.orientation==="horz"&&(n.style.height="auto",n.style.minHeight="0px"),t.kind==="picture"&&t.media){n.style.overflow="hidden";const a=document.createElement("img");a.alt=t.alt??"",a.src=i.url(t.media.path),z(a,t);const g=t.media.crop??{left:0,top:0,right:0,bottom:0},m=1-g.left-g.right,S=1-g.top-g.bottom;Object.assign(a.style,{position:"absolute",width:`${String(100/m)}%`,height:`${String(100/S)}%`,left:`${String(-g.left/m*100)}%`,top:`${String(-g.top/S*100)}%`,maxWidth:"none"}),t.flip&&(a.style.transformOrigin=`${String(50/m-g.left/m*100)}% ${String(50/S-g.top/S*100)}%`),n.append(a)}else if(t.kind==="movie"&&t.media&&!i.playing&&i.poster!==!0)n.dataset.akFilm="";else if(t.kind==="movie"&&t.media){const a=document.createElement("video");a.src=i.url(t.media.path),a.muted=!0,a.playsInline=!0,a.preload="auto",t.media.poster!==void 0&&(a.currentTime=t.media.poster),Object.assign(a.style,{width:"100%",height:"100%",objectFit:"fill",...i.playing?{}:{pointerEvents:"none"}}),n.append(a)}if(t.kind==="audio"&&t.media&&(!i.editing&&t.media.playback?.hide===!0&&(n.style.visibility="hidden"),n.append(Bt()),i.playing)){const a=document.createElement("audio");a.src=i.url(t.media.path),a.preload="auto",n.append(a)}return t.text&&n.append(A(t.text,o,i.lang,r,d)),n}const F="http://www.w3.org/2000/svg";function Bt(){const e=document.createElementNS(F,"svg");e.setAttribute("viewBox","0 0 24 24"),e.setAttribute("fill","none"),e.setAttribute("stroke","#595959"),e.setAttribute("stroke-width","2"),e.setAttribute("stroke-linejoin","round"),Object.assign(e.style,{width:"100%",height:"100%",display:"block"});const t=document.createElementNS(F,"polygon");t.setAttribute("points","11 5 6 9 2 9 2 15 6 15 11 19 11 5"),t.setAttribute("fill","#595959"),e.append(t);for(const i of["M15.54 8.46a5 5 0 0 1 0 7.07","M19.07 4.93a10 10 0 0 1 0 14.14"]){const o=document.createElementNS(F,"path");o.setAttribute("d",i),e.append(o)}return e}export function slideBackgroundCss(e,t,i){return e.background_picture!==void 0?`${colorCss(e.background,t)} url(${JSON.stringify(i(e.background_picture))}) center / 100% 100% no-repeat`:e.background_gradient?T(e.background_gradient,t):colorCss(e.background,t)}export function drawSlide(e,t){const i=document.createElement("div");i.dataset.akSlide=e.id;const o={...t,colors:st(t.colors,e.color_map)};Object.assign(i.style,{position:"absolute",inset:"0px",background:slideBackgroundCss(e,o.colors,t.url),overflow:"hidden"});for(const r of e.shapes){const n=drawShape(e.id,r,o);n&&i.append(n)}return i}
|