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";export const WEBSITE_FILE="website.json",WebsiteFileSchema=t.strictObject({$schema:t.string().optional(),title:t.string().min(1).optional().describe("The website's name where people see it (Studio's list of a project's work); none: its entry file's name."),dev:t.string().min(1).optional().describe("The command that serves the website while it is made, run in its folder by a shell. It listens on $PORT at $HOST, which the host sets (`astro dev --port $PORT --host $HOST --ignore-lock`), and allows the hosts in $ALLYHUB_PREVIEW_HOSTS when its server checks the Host header. None: the output folder is served as it is."),build:t.string().min(1).optional().describe("The command that builds the website into its output folder (`astro build`). None:
|
|
2
|
+
import{z as t}from"zod";export const WEBSITE_FILE="website.json",WebsiteFileSchema=t.strictObject({$schema:t.string().optional(),title:t.string().min(1).optional().describe("The website's name where people see it (Studio's list of a project's work); none: its entry file's name."),dev:t.string().min(1).optional().describe("The command that serves the website while it is made, run in its folder by a shell. It listens on $PORT at $HOST, which the host sets (`astro dev --port $PORT --host $HOST --ignore-lock`), and allows the hosts in $ALLYHUB_PREVIEW_HOSTS when its server checks the Host header. None: the output folder is served as it is."),build:t.string().min(1).optional().describe("The command that builds the website into its output folder (`astro build`). None: the output folder is used as it is."),output:t.string().min(1).describe("The folder that is the built website, from the website's folder (`dist`); `.` for a website of plain files."),site:t.string().min(1).optional().describe("The hosted site this website publishes to, written by `allyhub site deploy` the first time, so the folder publishes to the same site from any computer.")});export function parseWebsite(o){let i;try{i=JSON.parse(o)}catch(e){return{ok:!1,problems:[`is not JSON: ${e instanceof Error?e.message:String(e)}`]}}const s=WebsiteFileSchema.safeParse(i);return s.success?{ok:!0,value:s.data}:{ok:!1,problems:s.error.issues.map(e=>e.path.length===0?e.message:`${e.path.join(".")}: ${e.message}`)}}
|
|
@@ -185,18 +185,42 @@ export declare function listsFile(files: readonly ItemFile[], path: string): boo
|
|
|
185
185
|
export declare const itemFiles: (item: Pick<Item, "entry" | "files">) => ItemFile[];
|
|
186
186
|
/** An item's id: its file without its extension. */
|
|
187
187
|
export declare const itemIdOf: (file: string) => string;
|
|
188
|
-
/**
|
|
188
|
+
/**
|
|
189
|
+
* A file's id where the list names it with no kind: its path, extension
|
|
190
|
+
* and all (`research/insights.csv`), as a file the list does not name is
|
|
191
|
+
* opened by. It never takes an item's id (`research/insights`, of
|
|
192
|
+
* `research/insights.mdx`), nor that of another file of its name
|
|
193
|
+
* (`research/insights.xlsx`). Versions before gave it its path without
|
|
194
|
+
* its extension, as an item's; `listedPieceByIdOrFormerId` still finds it
|
|
195
|
+
* by that.
|
|
196
|
+
*/
|
|
197
|
+
export declare const listedFileIdOf: (file: string) => string;
|
|
198
|
+
/** A piece's name for people: its title as listed, else the one its file says, else its id's last part (a file listed with no kind: its file's name, extension and all). */
|
|
189
199
|
export declare const itemNameOf: (item: {
|
|
190
200
|
id: string;
|
|
191
201
|
title?: string | undefined;
|
|
192
202
|
}, own?: string) => string;
|
|
203
|
+
/**
|
|
204
|
+
* The piece of a list an id names, whichever version of AllyHub gave the
|
|
205
|
+
* id: by its id; else a file listed with no kind (no `kind`) by the id the
|
|
206
|
+
* other version gives it: its path, where the list was made by a version
|
|
207
|
+
* before a file's id kept its extension; its path without its extension
|
|
208
|
+
* (`itemIdOf`), where the id was kept from then (an address, what a window
|
|
209
|
+
* or a machine remembers), the first such file in the list's order. None
|
|
210
|
+
* where nothing has it.
|
|
211
|
+
*/
|
|
212
|
+
export declare function listedPieceByIdOrFormerId<P extends {
|
|
213
|
+
id: string;
|
|
214
|
+
entry: string;
|
|
215
|
+
kind?: string | undefined;
|
|
216
|
+
}>(pieces: readonly P[], id: string): P | undefined;
|
|
193
217
|
/**
|
|
194
218
|
* A piece the list names with no kind: a file an editor opens by its name
|
|
195
219
|
* (a canvas), with the editor whose pattern matches it. It has the names an
|
|
196
220
|
* item has and nothing of a kind (no versions, no Export, no Share).
|
|
197
221
|
*/
|
|
198
222
|
export interface ListedFile {
|
|
199
|
-
/** What names it: its file
|
|
223
|
+
/** What names it: its file, extension and all (`listedFileIdOf`), unique among the items and files of the list. */
|
|
200
224
|
id: string;
|
|
201
225
|
/** The folder its file is in, a project path ("" at the root). */
|
|
202
226
|
dir: string;
|
|
@@ -226,7 +250,7 @@ export type ItemProblem =
|
|
|
226
250
|
code: "missing";
|
|
227
251
|
file: string;
|
|
228
252
|
}
|
|
229
|
-
/** Two listed files of one id (`a.ts
|
|
253
|
+
/** Two listed files of one id (`a.ts` and `a.mdx`, both of a kind), or one file listed twice: the first of them is kept. */
|
|
230
254
|
| {
|
|
231
255
|
code: "same-id";
|
|
232
256
|
id: string;
|
|
@@ -250,7 +274,9 @@ export declare const isListedFile: (piece: Item | ListedFile) => piece is Listed
|
|
|
250
274
|
* file not there, an id twice). A piece listed with no kind is a file an
|
|
251
275
|
* editor opens by its name: with `editors` (the file editors loaded), each
|
|
252
276
|
* is found its editor or is a problem; without them (the build, which
|
|
253
|
-
* reads kinds only), it is left out, unchecked.
|
|
277
|
+
* reads kinds only), it is left out, unchecked. Of the pieces of one id
|
|
278
|
+
* the first is kept, as a tolerant reader keeps what it can read, and the
|
|
279
|
+
* id is the problem.
|
|
254
280
|
*/
|
|
255
281
|
export declare function itemsOf(work: WorkFile, kinds: KindTable, files?: ReadonlySet<string>, editors?: FileEditorTable): ItemScan;
|
|
256
282
|
//# sourceMappingURL=items.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{listedWork as
|
|
2
|
+
import{listedWork as g}from"./data/work.js";import{fileEditorIn as O}from"./files.js";import{baseOf as m,dirOf as k}from"./layout.js";export function pointEntriesIn(e,t,i){return e.find(n=>n.id===t)?.points?.[i]??[]}export const LOCALE_MARK="{locale}";export function listsFile(e,t){return e.some(i=>{const n=i.path.indexOf(LOCALE_MARK);if(n<0)return i.path===t;const r=i.path.slice(0,n),d=i.path.slice(n+LOCALE_MARK.length);return t.length>r.length+d.length&&t.startsWith(r)&&t.endsWith(d)})}export const itemFiles=e=>e.files??[{path:e.entry,role:"entry"}],itemIdOf=e=>{const t=m(e),i=t.lastIndexOf(".");return i<=0?e:e.slice(0,e.length-(t.length-i))},listedFileIdOf=e=>e,itemNameOf=(e,t)=>e.title??t??m(e.id);export function listedPieceByIdOrFormerId(e,t){const i=e.filter(n=>n.kind===void 0);return e.find(n=>n.id===t)??i.find(n=>n.entry===t)??i.find(n=>itemIdOf(n.entry)===t)}export const isListedFile=e=>"editor"in e;export function itemsOf(e,t,i,n){const r=[],d=[],u=new Map;for(const s of g(e)){const o=s.file.replace(/^\.\//u,""),f=s.kind;let l;if(f===void 0){if(n===void 0)continue;const c=O(n,o)?.id;if(c===void 0){r.push({code:"no-editor",file:o});continue}l={editor:c}}else if(t.some(c=>c.id===f))l={kind:f};else{r.push({code:"unknown-kind",kind:f,file:o});continue}if(i!==void 0&&!i.has(o)){r.push({code:"missing",file:o});continue}const h="kind"in l?itemIdOf(o):listedFileIdOf(o);u.set(h,[...u.get(h)??[],o]);const x={id:h,dir:k(o),entry:o,...s.title===void 0?{}:{title:s.title},groups:s.groups};d.push({...x,...l})}for(const[s,o]of u)o.length>1&&r.push({code:"same-id",id:s,files:o});const a=new Set,p=d.filter(s=>a.has(s.id)?!1:(a.add(s.id),!0));return{items:p.filter(s=>!isListedFile(s)),files:p.filter(isListedFile),listed:p,problems:r}}
|
|
@@ -12,7 +12,12 @@ export declare const TEXTURES_DIR = "assets/media/textures";
|
|
|
12
12
|
export declare const COMPONENTS_DIR = "components";
|
|
13
13
|
/** 3D sceneries a registry adds, a folder each (`sceneries/<name>/`), as shadcn puts a type of item in its own folder. */
|
|
14
14
|
export declare const SCENERIES_DIR = "sceneries";
|
|
15
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* AllyHub's own folder in a project, as `.next/` and `.astro/` are: made
|
|
17
|
+
* again, never saved and never in Git (`GITIGNORE`, core/protocol's
|
|
18
|
+
* `SNAPSHOT_SKIPPED`). What each place in a project is: docs/architecture.md,
|
|
19
|
+
* 4.1, "A project's folders".
|
|
20
|
+
*/
|
|
16
21
|
export declare const LOCAL_DIR = ".allyhub";
|
|
17
22
|
/** The agent's working files, free to throw away. */
|
|
18
23
|
export declare const WORK_DIR = ".allyhub/work";
|
|
@@ -32,10 +37,16 @@ export declare const CACHE_DIR = ".allyhub/cache";
|
|
|
32
37
|
export declare function partCacheLimit(): number;
|
|
33
38
|
/** Scenery bakes: a file each, named by its scene's digest and the renderer it was made on. */
|
|
34
39
|
export declare const BAKE_DIR = ".allyhub/cache/bake";
|
|
40
|
+
/**
|
|
41
|
+
* The agents' folder in a project (the Agent Skills standard's: skills in
|
|
42
|
+
* `.agents/skills/`), saved with it. What the agents keep of the project
|
|
43
|
+
* beside its work goes here, never in `.allyhub/`, which is made again.
|
|
44
|
+
*/
|
|
45
|
+
export declare const AGENTS_DIR = ".agents";
|
|
35
46
|
/** What a person deleted, kept until they empty it. */
|
|
36
|
-
export declare const TRASH_DIR = ".
|
|
37
|
-
/** An agent's notes on the project
|
|
38
|
-
export declare const MEMORY_DIR = ".
|
|
47
|
+
export declare const TRASH_DIR = ".agents/trash";
|
|
48
|
+
/** An agent's notes on the project (AllyHub's own agent: docs/skills-schedules-memory.md). */
|
|
49
|
+
export declare const MEMORY_DIR = ".agents/memory";
|
|
39
50
|
export declare const PACKAGE_FILE = "package.json";
|
|
40
51
|
export declare const TSCONFIG_FILE = "tsconfig.json";
|
|
41
52
|
export declare const AGENTS_FILE = "AGENTS.md";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
export const ASSETS_DIR="assets",MEDIA_DIR="assets/media",DATA_DIR="assets/data",TEXT_DIR="assets/text",FONTS_DIR="assets/fonts",MODELS_DIR="assets/media/models",ENVIRONMENTS_DIR="assets/media/environments",TEXTURES_DIR="assets/media/textures",COMPONENTS_DIR="components",SCENERIES_DIR="sceneries",LOCAL_DIR=".allyhub",WORK_DIR=".allyhub/work",REFERENCE_DIR=".allyhub/work/reference",DEV_FILE=".allyhub/dev.json",OUT_DIR=".allyhub/out",CACHE_DIR=".allyhub/cache";export function partCacheLimit(){const t=globalThis.process?.env,e=Number(t?.ALLYHUB_PART_CACHE_MB);return(Number.isFinite(e)&&e>=0?e:4096)*1024*1024}export const BAKE_DIR=".allyhub/cache/bake",TRASH_DIR=".
|
|
2
|
+
export const ASSETS_DIR="assets",MEDIA_DIR="assets/media",DATA_DIR="assets/data",TEXT_DIR="assets/text",FONTS_DIR="assets/fonts",MODELS_DIR="assets/media/models",ENVIRONMENTS_DIR="assets/media/environments",TEXTURES_DIR="assets/media/textures",COMPONENTS_DIR="components",SCENERIES_DIR="sceneries",LOCAL_DIR=".allyhub",WORK_DIR=".allyhub/work",REFERENCE_DIR=".allyhub/work/reference",DEV_FILE=".allyhub/dev.json",OUT_DIR=".allyhub/out",CACHE_DIR=".allyhub/cache";export function partCacheLimit(){const t=globalThis.process?.env,e=Number(t?.ALLYHUB_PART_CACHE_MB);return(Number.isFinite(e)&&e>=0?e:4096)*1024*1024}export const BAKE_DIR=".allyhub/cache/bake",AGENTS_DIR=".agents",TRASH_DIR=".agents/trash",MEMORY_DIR=".agents/memory",PACKAGE_FILE="package.json",TSCONFIG_FILE="tsconfig.json",AGENTS_FILE="AGENTS.md",CLAUDE_FILE="CLAUDE.md",CONFIG_FILES=["allyhub.config.ts","allyhub.config.mts","allyhub.config.js","allyhub.config.mjs"],GITIGNORE=`node_modules/
|
|
3
3
|
${LOCAL_DIR}/
|
|
4
4
|
.playwright-cli/
|
|
5
5
|
`;export function unscanned(t){return t.split("/").some(e=>e.startsWith(".")||e==="node_modules")}export function projectPath(t){return t.replaceAll("\\","/").replace(/^(?:\.\/)+/u,"").replace(/\/+$/u,"").replace(/\/{2,}/gu,"/")}export function dirOf(t){const e=t.lastIndexOf("/");return e<0?"":t.slice(0,e)}export function baseOf(t){return t.slice(t.lastIndexOf("/")+1)}export function within(t,e){return e===""||t===e||t.startsWith(`${e}/`)}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
export const LOCALES=["en","zh-cn","zh-tw","ja","ko","es","pt","de","fr"],BASE_LOCALE="en",LOCALE_NAMES={en:"English","zh-cn":"简体中文","zh-tw":"繁體中文",ja:"日本語",ko:"한국어",es:"Español",fr:"Français",de:"Deutsch",pt:"Português"},ENGLISH_NAMES={en:"English","zh-cn":"Simplified Chinese","zh-tw":"Traditional Chinese",ja:"Japanese",ko:"Korean",es:"Spanish",fr:"French",de:"German",pt:"Portuguese"},INTL_TAGS={en:"en","zh-cn":"zh-CN","zh-tw":"zh-TW",ja:"ja",ko:"ko",es:"es",fr:"fr",de:"de",pt:"pt-BR"};export function isLocale(
|
|
2
|
+
export const LOCALES=["en","zh-cn","zh-tw","ja","ko","es","pt","de","fr"],BASE_LOCALE="en",LOCALE_NAMES={en:"English","zh-cn":"简体中文","zh-tw":"繁體中文",ja:"日本語",ko:"한국어",es:"Español",fr:"Français",de:"Deutsch",pt:"Português"},ENGLISH_NAMES={en:"English","zh-cn":"Simplified Chinese","zh-tw":"Traditional Chinese",ja:"Japanese",ko:"Korean",es:"Spanish",fr:"French",de:"German",pt:"Portuguese"},INTL_TAGS={en:"en","zh-cn":"zh-CN","zh-tw":"zh-TW",ja:"ja",ko:"ko",es:"es",fr:"fr",de:"de",pt:"pt-BR"};export function isLocale(t){return typeof t=="string"&&LOCALES.includes(t)}export function isLanguageChoice(t){return t==="system"||isLocale(t)}const u=new Set(["hant","tw","hk","mo"]);export function matchLocale(t){for(const n of t){const r=n.trim().toLowerCase().replaceAll("_","-").split("-"),e=r[0];if(!(e===void 0||e==="")){if(e==="zh"){const o=r.slice(1);return o.includes("hans")?"zh-cn":o.some(s=>u.has(s))?"zh-tw":"zh-cn"}if(isLocale(e))return e}}}export function resolveLocale(t,n){return t!==void 0&&t!=="system"?t:matchLocale(n)??"en"}export function localeOf(t){return t===void 0?"en":matchLocale([t])??"en"}export function pick(t,n){return t[localeOf(n)]}export function sizeInWords(t,n){const r=["byte","kilobyte","megabyte","gigabyte"];let e=t,o=0;for(;e>=1024&&o<r.length-1;)e/=1024,o+=1;return new Intl.NumberFormat(INTL_TAGS[localeOf(n)],{style:"unit",unit:r[o],unitDisplay:"short",maximumFractionDigits:1}).format(e)}export function unspaced(t){return t==="zh-cn"||t==="zh-tw"||t==="ja"}export function stringPaths(t,n=""){return typeof t=="string"?[n]:typeof t!="object"||t===null?[]:Object.entries(t).flatMap(([r,e])=>stringPaths(e,n?`${n}.${r}`:r))}export function sameAsEnglish(t,n){const r=(e,o)=>o.split(".").reduce((s,i)=>typeof s=="object"&&s!==null?s[i]:void 0,e);return stringPaths(t).filter(e=>r(t,e)===r(n,e))}export function defineWords(t){return{all:t,of:n=>pick(t,n)}}export function untranslated(t,n={}){const r=n.share??.2,e=stringPaths(t.en).length;return LOCALES.filter(o=>o!=="en").flatMap(o=>{const s=sameAsEnglish(t.en,t[o]);return e>0&&s.length>=e*r?[{locale:o,same:s}]:[]})}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{LAYER_KINDS as o}from"@allyhub/piece";import{z as t}from"zod";import{FramedPageSchema as c,ImageSchema as a,PathSchema as r,VersionRef as n,method as e,toolCaller as m}from"@allyhub/protocol";const i=t.tuple([t.number(),t.number(),t.number(),t.number()]),g=t.strictObject({text:t.string(),box:i,size:t.number(),capHeight:t.number().optional(),color:t.string(),font:t.string(),weight:t.string(),lineHeight:t.number(),align:t.string(),letterSpacing:t.number().optional()});export const EditLayerSchema=t.strictObject({key:t.string(),component:t.string(),kind:t.enum(o),parent:t.string().optional(),hidden:t.boolean(),style:t.record(t.string(),t.unknown()),box:i.optional(),words:t.array(t.strictObject({prop:t.string(),key:t.string(),text:t.string()})),texts:t.array(g),picture:t.strictObject({file:t.string(),source:t.tuple([t.number(),t.number()]),whole:i,box:i,fit:t.string(),position:t.tuple([t.number(),t.number()]),crop:i.optional()}).optional()}),EditBoardSchema=t.strictObject({key:t.string(),title:t.string().optional(),width:t.int().positive(),height:t.int().positive(),background:t.string(),picture:a,layers:t.array(EditLayerSchema)});const s=t.strictObject({from:t.int().positive(),to:t.int().positive()});export const LayerSpanSchema=s.extend({key:t.string().min(1)}),BoardSpanSchema=s.extend({key:t.string().min(1),layers:t.array(LayerSpanSchema)}),IMAGE_TOOLS={"image/versions":e(t.strictObject({item:r}),t.strictObject({piece:t.string(),title:t.string().optional(),script:t.string().min(1).optional(),versions:t.array(t.strictObject({key:t.string(),lang:t.string().optional(),variant:t.string().optional(),script:r.optional()}))}),"An image's versions, one per combo, and its script in each version's language."),"image/boards":e(t.strictObject({...n,height:t.int().min(16).max(2048).optional()}),t.strictObject({image:a,width:t.int().positive(),height:t.int().positive(),boards:t.array(t.strictObject({key:t.string(),width:t.int().positive(),height:t.int().positive(),x:t.int().nonnegative()}))}),"An image version's boards drawn side by side, in order, at one height: its card and its preview."),"image/edit":e(t.strictObject({...n,scale:t.number().min(.05).max(2).optional()}),t.strictObject({piece:t.string(),boards:t.array(EditBoardSchema)}),"An image version's boards as its viewer shows them: each drawn, and its named layers with what each draws, the messages it shows and its picture (what Mark up finds under a mark)."),"image/stage":e(t.strictObject({...n,board:t.string().min(1).optional()}),c,"The address of an image version's stage page, for its viewer's sandboxed frame: a board drawn live, as large as the frame holds it, which moves to another board (`seek` by `part`)."),"image/sources":e(t.strictObject({item:r}),t.strictObject({path:r,boards:t.array(BoardSpanSchema)}),"Where each board and its layers are written in the image's module, by line: what a change to those lines changes.")},callImageTool=m(IMAGE_TOOLS);
|
|
2
|
+
import{LAYER_KINDS as o}from"@allyhub/piece";import{z as t}from"zod";import{FramedPageSchema as c,ImageSchema as a,PathSchema as r,VersionRef as n,method as e,toolCaller as m}from"@allyhub/protocol";const i=t.tuple([t.number(),t.number(),t.number(),t.number()]),g=t.strictObject({text:t.string(),box:i,size:t.number(),capHeight:t.number().optional(),color:t.string(),font:t.string(),weight:t.string(),lineHeight:t.number(),align:t.string(),letterSpacing:t.number().optional()});export const EditLayerSchema=t.strictObject({key:t.string(),component:t.string(),kind:t.enum(o),parent:t.string().optional(),hidden:t.boolean(),style:t.record(t.string(),t.unknown()),box:i.optional(),words:t.array(t.strictObject({prop:t.string(),key:t.string(),text:t.string()})),texts:t.array(g),picture:t.strictObject({file:t.string(),source:t.tuple([t.number(),t.number()]),whole:i,box:i,fit:t.string(),position:t.tuple([t.number(),t.number()]),crop:i.optional()}).optional()}),EditBoardSchema=t.strictObject({key:t.string(),title:t.string().optional(),width:t.int().positive(),height:t.int().positive(),background:t.string(),picture:a,layers:t.array(EditLayerSchema)});const s=t.strictObject({from:t.int().positive(),to:t.int().positive()});export const LayerSpanSchema=s.extend({key:t.string().min(1)}),BoardSpanSchema=s.extend({key:t.string().min(1),layers:t.array(LayerSpanSchema)}),IMAGE_TOOLS={"image/versions":e(t.strictObject({item:r}),t.strictObject({piece:t.string(),title:t.string().optional(),script:t.string().min(1).optional(),versions:t.array(t.strictObject({key:t.string(),lang:t.string().optional(),variant:t.string().optional(),script:r.optional()}))}),"An image's versions, one per combo, and its script in each version's language."),"image/boards":e(t.strictObject({...n,height:t.int().min(16).max(2048).optional()}),t.strictObject({image:a,width:t.int().positive(),height:t.int().positive(),boards:t.array(t.strictObject({key:t.string(),width:t.int().positive(),height:t.int().positive(),x:t.int().nonnegative()}))}),"An image version's boards drawn side by side, in order, at one height: its card and its preview."),"image/edit":e(t.strictObject({...n,scale:t.number().min(.05).max(2).optional()}),t.strictObject({piece:t.string(),boards:t.array(EditBoardSchema)}),"An image version's boards as its viewer shows them: each drawn, and its named layers with what each draws, the messages it shows and its picture (what Mark up finds under a mark)."),"image/stage":e(t.strictObject({...n,board:t.string().min(1).optional()}),c,"The address of an image version's stage page, for its viewer's sandboxed frame: a board drawn live, as large as the frame holds it, which moves to another board (`seek` by `part`)."),"image/sources":e(t.strictObject({item:r}),t.strictObject({path:r,boards:t.array(BoardSpanSchema)}),"Where each board and its layers are written in the image's module, by line: what a change to those lines changes.")},callImageTool=m(IMAGE_TOOLS),IMAGE_VIEWER_SCALE=1;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{IMAGE_TOOLS as
|
|
2
|
+
import{IMAGE_TOOLS as t,IMAGE_VIEWER_SCALE as n}from"./tools.js";export function activate(r){r.subscriptions.push(r.allyhub.kinds.registerKindProvider("image",{preview:async(i,{tool:e})=>{const a=t["image/boards"].result.parse(await e("image/boards",{item:i.id}));return{type:"picture",image:a.image,width:a.width,height:a.height}},snapshot:async(i,{tool:e})=>{await e("image/boards",{item:i.id}).catch(()=>{}),await e("image/sources",{item:i.id}).catch(()=>{});const a=await e("image/versions",{item:i.id}).then(s=>t["image/versions"].result.parse(s).versions,()=>[]);for(const s of a)await e("image/edit",{item:i.id,version:s.key,scale:n}).catch(()=>{});return{}}}))}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allyhub/image-extension",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./build": {
|
|
@@ -227,7 +227,7 @@
|
|
|
227
227
|
"cliCommands": [
|
|
228
228
|
{
|
|
229
229
|
"name": "image import",
|
|
230
|
-
"summary": "Makes an image of a Photoshop file: a board an artboard (else its canvas), each layer of its kind (pixels, type, shape, adjustment, fill, group) with its blend, opacity, mask and effects, a picture a pixel layer in media/, the words in the script, the file kept in source/;
|
|
230
|
+
"summary": "Makes an image of a Photoshop file: a board an artboard (else its canvas), each layer of its kind (pixels, type, shape, adjustment, fill, group) with its blend, opacity, mask and effects, a picture a pixel layer in media/, the words in the script, the file kept in source/; lists each difference from the file; writes new files alone (--to names another module)",
|
|
231
231
|
"work": "images",
|
|
232
232
|
"module": "./dist/cli.js"
|
|
233
233
|
}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
An image is any picture, or a set of pictures that ship together: a photo to change, a poster, a share card, a set of product pictures, a carousel. Each picture is a **board** with its own size and Photoshop's layers. Make an image for anything a person looks at as a still; a video for what moves, a deck for pages to flip through.
|
|
4
4
|
|
|
5
5
|
- `allyhub help images` lists the commands in the order the work uses them and prints where the SDK's `image.md` and `pictures.md` are. Read them before writing an image.
|
|
6
|
-
- **A photo
|
|
7
|
-
- **The person asks for changes with Mark up**: their viewer shows the boards and
|
|
8
|
-
- **A Photoshop file** becomes an image with `allyhub image import`, which
|
|
6
|
+
- **A photo stays as it is.** New pixels (made, edited, extended, cut out) come from the cloud's image tools ([ai-media.md](ai-media.md)), each a new file beside the photo that a layer then shows. Words, a logo or a price go in a layer over a picture, where they stay sharp and editable.
|
|
7
|
+
- **The person asks for changes with Mark up**: their viewer shows the boards and their marks; make each change in the image's code, or its script for words.
|
|
8
|
+
- **A Photoshop file** becomes an image with `allyhub image import`, which lists each difference from the file.
|
|
9
9
|
|
|
10
10
|
## See and measure
|
|
11
11
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
-
import{isRule as
|
|
3
|
-
${s.stack??""}`)}const st={top:0,bottom:0,left:0,right:0},fe=(r,a)=>r===a?"square":r>a?"landscape":"portrait";function le(r){return JSON.stringify(r,(a,s)=>{if(typeof s=="function")return`fn:${String(s)}`;if(typeof s=="object"&&s!==null&&"sha256"in s&&"path"in s&&"url"in s){const i={...s};return delete i.url,i}return s})}const $t=40;function ue(r){let a=r[0];for(const s of r)a&&s.size>a.size&&(a=s);if(a)return a.text.length>$t?`${a.text.slice(0,$t)}…`:a.text}function me(r){let a=0;for(const s of r.querySelectorAll(".ak-layer"))a=Math.max(a,s.scrollHeight);return Math.ceil(a)}export async function loadImage(r,a,s){const i=Pt(r,a,void 0,"image"),{ledger:c,log:f,combo:p}=i;let u;try{await ce(r.styles??[]),u=await c.timed("importing the image's module",()=>ht({phase:"module"},()=>import(r.module)))}catch(t){throw it(t,"load_failed")}const h=u.default;if(!Jt(h))throw new K("AK-I005",`The default export of ${r.file} is not an image: an image's module exports image({ changes, script, boards: (ctx) => [ … ] }) from @allyhub/sdk/image.`);const B=zt,w=Ft(i,s),S={width:64,height:64};w.dress({dims:{...S,orient:"square",safe:st},look:B,format:r.format,options:{transparent:h.transparent===!0}});const y=Ht(i);let E;try{E=await ht({phase:"build"},()=>Promise.resolve(h.boards(y)))}catch(t){throw it(t,"load_failed")}if(!Array.isArray(E)||E.length===0)throw new K("AK-I005",`The boards function of ${r.file} returned no boards: it returns board({ key, size, layers }), one a picture, in order.`);const M=[],C=[];for(const[t,e]of E.entries()){if(!Yt(e))throw new K("AK-I005",`Item ${String(t+1)} the boards function of ${r.file} returned is not a board made by board({ key, size, layers }).`);if(C.some(o=>o.key===e.key)){M.push(Tt("AK-I002",`The board key "${e.key}" is used twice. Every board of an image needs its own key: it names the board's file.`,{part:e.key,where:{file:r.file}}));continue}C.push(e)}const J=async(t,e,o)=>{const n={width:e,height:o,orient:fe(e,o),safe:st},l=[],m=(A,x,$)=>{for(const O of A){const L=$||O.visible===!1;l.push({spec:O,hidden:L,...x===void 0?{}:{parent:x}});const v=O.props?.layers;O[Z]==="graphic"&&O.component==="group"&&Array.isArray(v)&&m(v,rt(O),L)}};m(t.layers,void 0,!1);const d=bt({env:i,stage:w,key:t.key,layers:t.layers,frame:n,look:B,transparent:h.transparent===!0,holder:s,...t.background===void 0?{}:{background:t.background}}),k=d.el;try{await d.ready();const A=Ut(t.layers).filter($=>$[Z]==="graphic"&&$.transform!==void 0&&!Array.isArray($.props.box)),x=new Map;if(A.length>0){await d.draw("layout");for(const $ of A){const O=rt($),L=O===void 0?null:k.querySelector(`.ak-layer[${et}="${CSS.escape(O)}"]`),v=L?jt(L):void 0;if(!L||!v||v===L)continue;const W=v.style.transform;v.style.transform="";const P=ot(L,k,e);P&&O!==void 0&&x.set(O,P),v.style.transform=(P&&Gt($.transform,P))??W}}return{el:k,board:d,listed:l,turns:x}}catch(A){throw w.takeOutside(),d.dispose(),it(A,"load_failed")}},At=async t=>{const e=Vt(t);if(typeof e=="string")throw new K("AK-I001",`board ${e}`);let o,n;if(e.height==="auto"){const m=await J(t,e.width,e.minHeight);m.el.style.visibility="",await m.board.draw("layout");const d=me(m.el);w.takeOutside(),m.board.dispose(),w.takeOutside();const k=Math.min(e.maxHeight,Math.max(e.minHeight,d));n=await J(t,e.width,k),o={key:t.key,width:e.width,height:k,from:"auto",auto:{content:d,min:e.minHeight,max:e.maxHeight}}}else n=await J(t,e.width,e.height),o={key:t.key,width:e.width,height:e.height,from:"size"};const l=Y.t;return n.el.style.visibility="",tt(n.el,!1),{...n,info:o,at:l}},g=[];for(const t of C)g.push(await At(t));let R;c.loading=!1;const Et=t=>Math.min(g.length-1,Math.max(0,Math.floor((t+1e-9)/Y.dur))),_=t=>{const e=g[Et(t)];if(!e)throw new Error("The image has no boards.");return e},H=t=>{if(R!==t){for(const e of g)tt(e.el,e===t);s.style.width=`${String(t.info.width)}px`,s.style.height=`${String(t.info.height)}px`,R=t}},X=t=>g.find(e=>e.info.key===t),at=t=>g.indexOf(t)*Y.dur,Ot=g.map((t,e)=>{const o=e*Y.dur,l=C.find(m=>m.key===t.info.key)?.title??ue(t.board.onScreen);return{key:t.info.key,layers:t.board.layers.map(m=>m.spec.component),start:o,end:o+Y.dur,planes:t.board.planes.map(m=>({...m,layers:m.layers.map(d=>({...d,start:d.start+o,end:d.end+o}))})),still:o+t.at,...l===void 0?{}:{title:l},frame:{width:t.info.width,height:t.info.height},board:t.info}}),T=g[0];if(!T)throw new K("AK-I005",`${r.file} has no boards that load.`);const dt={fps:30,width:T.info.width,height:T.info.height,duration:g.length*Y.dur,background:T.board.background,parts:Ot};H(T);const Ct=Rt(r.piece),vt=(t,e)=>({...t,piece:r.piece,output:i.output,combo:p,format:r.format,...e===void 0||t.part!==void 0?{}:{part:e}}),ct=()=>g.map(t=>({key:t.info.key,onScreen:[...new Set(t.board.onScreen.map(e=>e.text))]})),ft=()=>{const t=f.reads(Ct,g.map(n=>n.info.key)),e=[],o=new Set;for(const n of g)for(const l of t.media)n.board.reads.has(`f:${l.path}`)&&(e.push({...l,part:n.info.key}),o.add(l.path));return{...t,media:[...t.media.filter(n=>!o.has(n.path)),...e]}},lt=()=>{const t={},e=Nt(r.dims,p);for(const o of g)t[o.info.key]=JSON.stringify({v:1,piece:r.piece,output:i.output,key:o.info.key,dims:e,size:[o.info.width,o.info.height],background:o.board.background,look:B,layers:o.board.layers.map(n=>[n.spec.component,n.spec.z??"front",n.start,n.end,le(n.props)]),custom:o.board.layers.some(n=>n.spec.component==="custom"),reads:[...o.board.reads.entries()].sort((n,l)=>n[0]<l[0]?-1:n[0]>l[0]?1:0)});return t},ut=()=>{const t=[...c.problems,...M,...f.problems,...c.run,...Xt(w,g.map(o=>o.board)),...f.translationProblems()].map(o=>vt(o)),e=new Set;return t.filter(o=>{const n=`${o.code}|${o.message}|${o.part??""}`;return e.has(n)?!1:(e.add(n),!0)})},mt=()=>c.facts.map(t=>({...t,output:i.output,combo:p,format:r.format})),j=async(t,e)=>{H(t),await t.board.draw(e?.mode)},pt=t=>(C.find(e=>e.key===t.info.key)?.layers??[]).filter(e=>e[Z]==="graphic");let Q;const Bt=async t=>{await j(t);const e=new Map(Mt(t.info.key,t.el,t.info.width).map(n=>[n.layer,n])),o=t.listed.flatMap(({spec:n,hidden:l,parent:m})=>{const d=rt(n);if(d===void 0)return[];const k=n[Z]==="graphic",A=k?n.component:"footage",x=k?n.props:{},$=(I,N)=>{if(typeof N!="string"||N==="")return[];const D=f.spokenOf(N);return D?[{prop:I,key:D.key,text:N}]:[]},O=x.textItem,L=[...Object.entries(x).flatMap(([I,N])=>$(I,N)),...O?$("textItem.contents",O.contents):[]],v=l?void 0:e.get(d),W=l?null:t.el.querySelector(`.ak-layer[${et}="${CSS.escape(d)}"]`),P=W?de(W,t.el,t.info.width):[],q=v?.pictures[0],V=A===kt&&q?{file:q.file,source:q.source,whole:q.whole,box:q.box,fit:typeof x.fit=="string"?x.fit:"cover",position:Array.isArray(x.position)?x.position:[.5,.5],...Array.isArray(x.crop)?{crop:x.crop}:{}}:void 0,b=k?n:{},U=b.kind??(A===kt?"pixel":"smartObject"),z=Object.fromEntries(["blendMode","opacity","fillOpacity","clipping","transform","effects","visible"].filter(I=>b[I]!==void 0).map(I=>[I,b[I]]));return b.mask!==void 0&&(z.mask=typeof b.mask=="string"||"sha256"in b.mask?{src:typeof b.mask=="string"?b.mask:b.mask.path}:{...b.mask,...b.mask.src===void 0?{}:{src:typeof b.mask.src=="string"?b.mask.src:b.mask.src.path}}),[{key:d,component:A,kind:U,...m===void 0?{}:{parent:m},hidden:l,style:z,...v?.box?{box:v.box}:{},words:L,texts:P,...V?{picture:V}:{}}]});return{key:t.info.key,...C.find(n=>n.key===t.info.key)?.title===void 0?{}:{title:C.find(n=>n.key===t.info.key)?.title??""},width:t.info.width,height:t.info.height,background:getComputedStyle(t.el).backgroundColor,layers:o}},Lt=async(t,e)=>{const o=e.post??(()=>{});for(const d of[document.documentElement,document.body])d.style.overflow="hidden";const n=()=>{const d=R;if(!d)return;const k=Math.min(innerWidth/Math.max(1,d.info.width),innerHeight/Math.max(1,d.info.height));Object.assign(t.style,{position:"absolute",left:"0px",top:"0px",transformOrigin:"0 0",transform:`scale(${String(k)})`})},l=async d=>{await j(d),n(),o({type:"ready",board:d.info.key})};addEventListener("resize",n);const m=(e.at?.part===void 0?void 0:X(e.at.part))??(e.at?.t===void 0?void 0:_(e.at.t))??T;return o({type:"loaded",kind:"image",boards:g.map(d=>d.info)}),await l(m),{command(d){if(d.type!=="seek")return;const k=typeof d.part=="string"?X(d.part):typeof d.t=="number"?_(d.t):void 0;k&&l(k)}}};return{kind:"image",timeline:dt,ready:()=>Promise.resolve(),summary:()=>({kind:"image",timeline:dt,problems:ut(),facts:mt(),reads:ft(),text:ct(),signs:lt(),seekLimit:nt}),async seek(t,e){await j(_(t),e)},async measure(t){const e=t===void 0?g:[...new Set(t.map(n=>_(n)))],o=[];for(const n of e){H(n);const l=await n.board.measure(),m=at(n);o.push({...l,moments:l.moments.map(d=>({...d,t:m+d.t,part:n.info.key}))})}return{width:T.info.width,height:T.info.height,safe:st,moments:o.flatMap(n=>n.moments),footage:o.flatMap(n=>n.footage)}},async boardLayouts(){const t=[];for(const e of g){H(e);const o=await e.board.measure(),n=at(e);t.push({key:e.info.key,report:{...o,moments:o.moments.map(l=>({...l,t:n+l.t}))}})}return t},boards:()=>g.map(t=>t.info),async boardLayers(){const t=[];for(const e of g)await j(e),t.push(...Mt(e.info.key,e.el,e.info.width));return t},async boardOverset(){const t=[];for(const e of g)await j(e),t.push(...Qt(e.info.key,e.el,e.info.width));return t},async editLayers(){const t=[];for(const e of g)t.push(await Bt(e));return t},psdBoards(){return g.map(t=>{const e=C.find(o=>o.key===t.info.key);return{key:t.info.key,...e?.title===void 0?{}:{title:e.title},width:t.info.width,height:t.info.height,background:t.board.background,resolution:e?.resolution??wt.resolution,colorProfile:e?.colorProfile??wt.colorProfile,layers:oe(pt(t),{frame:t.board.frame,turnBox:o=>t.turns.get(o),color:o=>w.cssColor(o),measureText:(o,n)=>re(t.el,o,n)})}})},async psdDraw(t,e,o="pixels"){if(Q?.(),Q=void 0,t===null||e===void 0){R=void 0,H(T);return}const n=X(t);if(!n)throw new Error(`The image has no board ${t}.`);const l=te(pt(n),e);if(!l)throw new Error(`Board ${t} has no layer ${e}.`);const m=n.board.frame;for(const A of g)tt(A.el,!1);R=void 0,s.style.width=`${String(m.width)}px`,s.style.height=`${String(m.height)}px`;const d=A=>`${String(Math.round(A*1e4)/1e4)}px`;if(o==="mask"){const A=n.board.layers[0]?.ctx,x=l.layer.mask;if(!A||x===void 0)throw new Error(`Layer ${e} of board ${t} has no mask to draw.`);const $=document.createElement("div");$.dataset.akBoard=`${t}/${e}/mask`,Object.assign($.style,{position:"relative",width:d(m.width),height:d(m.height),overflow:"hidden",background:"black"});const[O,L,v,W,P,q]=ne(l,m,D=>n.turns.get(D)),V=document.createElement("div");Object.assign(V.style,{position:"absolute",inset:"0",transformOrigin:"0 0",transform:`matrix(${[O,L,v,W,P,q].join(", ")})`});const b=ee(l.layer,m),U=document.createElement("div");Object.assign(U.style,{position:"absolute",left:d(b.at[0]),top:d(b.at[1]),width:d(b.at[2]),height:d(b.at[3]),background:"white"}),V.append(U),$.append(V),s.append($);const z=typeof x=="string"||"sha256"in x?{src:x}:x,I=_t(U,{mask:{...z,density:100,feather:0,enabled:!0},box:b.box,frame:b.frame,defs:qt($),ctx:A,base:gt(l.layer)});if(I!==void 0)throw $.remove(),new Error(`Layer ${e}'s mask: ${I}.`);const N=z.src!==void 0&&z.src!=="ellipse"?typeof z.src=="string"&&z.src.includes("(")?void 0:Kt(z.src,gt(l.layer),A):void 0;if(N){const D=new Image;D.src=N.url,await D.decode().catch(()=>{})}await c.settle(nt*1e3),await document.fonts.ready,Q=()=>{$.remove()};return}const k=bt({env:i,stage:w,key:t,layers:[Zt(l.layer,l.groups)],frame:m,look:B,transparent:!0,holder:s,background:"transparent"});await k.ready(),k.el.style.visibility="",tt(k.el,!0),await k.draw(),Q=()=>{k.dispose()}},tracks:()=>Promise.resolve([]),async inks(t){const e=_(t);return H(e),e.board.inks()},stuck:()=>R?.board.stuck(),seekLimit:nt,text:ct,reads:ft,signature:()=>R?.board.signature(),async signatureAt(t){const e=_(t);return await j(e,{mode:"layout"}),e.board.signature()},async partSignature(t){const e=X(t);if(!e)return{unknown:`The image has no board ${t}.`};await j(e,{mode:"layout"});const o=e.board.signature();return o===void 0?{unknown:`board ${t} holds what its DOM does not say`}:{sign:o,owners:[]}},signs:lt,problems:ut,facts:mt,async ask(t,e){const o=[];for(const n of g)H(n),o.push(...await n.board.ask(t,e));return o},sheet:()=>R?.el,answer(t){if(t.type!=="objects")return;const e=Number(t.t),o=_(e);return H(o),o.board.objects(n=>f.keysShowing(n)).then(n=>({type:"objects",t:e,elements:[],...n}))},play:(t,e)=>Lt(t,e),dispose(){for(const t of g)t.board.dispose();w.dispose()}}}
|
|
2
|
+
import{isRule as Rt,problem as Nt}from"@allyhub/diagnostics";import{CLEAN_LOOK as Pt,LAYER_BRAND as X,LAYER_NAME as et,LAYER_STILL as Y,SEEK_LIMIT as nt,dimsCombo as zt,messagePrefix as Ht,showLayer as tt}from"@allyhub/piece";import{consoleAtAsync as yt}from"@allyhub/piece/page";import{buildContext as _t}from"@allyhub/image-draw/context";import{createEnv as Ft}from"@allyhub/image-draw/env";import{LoadFailure as K}from"@allyhub/image-draw/errors";import{textBlocks as gt}from"@allyhub/image-draw/inspect";import{createStage as jt}from"@allyhub/image-draw/stage";import{applyMask as Dt,baseOf as wt,contentEl as qt,defsOf as Kt,LAYER_CONTENT as Gt,mediaOfRef as Wt,transformCss as Ut}from"@allyhub/image-draw/layer-style";import{families as Yt}from"@allyhub/image-draw/fonts";import{BOARD_DEFAULTS as kt,boardSize as Jt,isBoard as Vt,isImage as Xt}from"@allyhub/image-sdk";import{ADJUSTMENT as Qt}from"@allyhub/image-sdk/adjustment";import{FILL as Zt}from"@allyhub/image-sdk/fill";import{GROUP as bt}from"@allyhub/image-sdk/group";import{PICTURE as te}from"@allyhub/image-sdk/picture";import{SHAPE as ee}from"@allyhub/image-sdk/shape";import{TEXT_LAYER as ne}from"@allyhub/image-sdk/text-layer";import{PICTURE_COMPONENT as xt,everyLayer as oe}from"./layers.js";import{boardProblems as re,stillBoard as St}from"./board.js";import{oversetOf as ie}from"./overset.js";import{aloneIn as se,findLayer as ae,maskPlace as de,matrixOf as ce,psdTree as fe}from"./psd.js";const le=new Set([te,ne,ee,Zt,Qt,bt]);let _;function Mt(r){if(_??=document.createElement("canvas").getContext("2d"),!_)return;const a=getComputedStyle(r);_.font=`${a.fontStyle} ${a.fontWeight} ${a.fontSize} ${a.fontFamily}`;const s=_.measureText("H").actualBoundingBoxAscent;return s>0?s:void 0}const G=r=>Math.round(r*10)/10;function ue(r,a,s){const i=r.querySelector(`.ak-layer[${et}="${CSS.escape(a)}"] [data-ak-text]`),c=s.characterStyle??{},f=i?getComputedStyle(i).fontFamily:c.font===void 0?void 0:JSON.stringify(c.font);if(f===void 0)return{};_??=document.createElement("canvas").getContext("2d");const p=Yt(f)[0];if(!_)return p===void 0?{}:{family:p};_.font=`${c.italic===!0?"italic ":""}${String(c.weight??400)} ${String(c.size??48)}px ${f}`;const u=_.measureText("Hg");return{ascent:u.fontBoundingBoxAscent,descent:u.fontBoundingBoxDescent,...p===void 0?{}:{family:p}}}function At(r,a,s=0){const i=r.getBoundingClientRect();if(i.width+2*s<=0||i.height+2*s<=0)return;let c=i.left-s,f=i.top-s,p=i.right+s,u=i.bottom+s;for(let h=r.parentElement;h;h=h.parentElement){if(h===a||getComputedStyle(h).overflow!=="visible"){const w=h.getBoundingClientRect();c=Math.max(c,w.left),f=Math.max(f,w.top),p=Math.min(p,w.right),u=Math.min(u,w.bottom)}if(h===a)break}return p>c&&u>f?{left:c,top:f,right:p,bottom:u}:void 0}const me="defs, clipPath, mask, pattern, linearGradient, radialGradient, filter, symbol";function pe(r){if(!(r instanceof SVGGeometryElement))return 0;const a=getComputedStyle(r);if(a.stroke==="none"||a.stroke==="")return 0;const s=parseFloat(a.strokeWidth),i=r.getScreenCTM(),c=i?Math.hypot(i.a,i.b):1;return Number.isFinite(s)&&s>0?s*c/2:0}const he=`.ak-layer, .${Gt}, .ak-clip`;function ot(r,a,s){const i=a.getBoundingClientRect(),c=i.width>0?s/i.width:1;let f=1/0,p=1/0,u=-1/0,h=-1/0;for(const S of r.querySelectorAll("*")){if(S instanceof SVGSVGElement||S.closest(me)||S.matches(he))continue;const y=At(S,a,pe(S));y&&(f=Math.min(f,y.left),p=Math.min(p,y.top),u=Math.max(u,y.right),h=Math.max(h,y.bottom))}const T=r.parentElement,w=T?.classList.contains("ak-clip")?T.firstElementChild:null;if(w instanceof HTMLElement&&w!==r){const S=ot(w,a,s);if(!S)return;const[y,E,M,C]=S;f=Math.max(f,i.left+y/c),p=Math.max(p,i.top+E/c),u=Math.min(u,i.left+(y+M)/c),h=Math.min(h,i.top+(E+C)/c)}return f<u&&p<h?[Math.round((f-i.left)*c),Math.round((p-i.top)*c),Math.round((u-f)*c),Math.round((h-p)*c)]:void 0}function $t(r,a,s){const i=a.getBoundingClientRect(),c=i.width>0?s/i.width:1,f=u=>[Math.round((u.left-i.left)*c),Math.round((u.top-i.top)*c),Math.round(u.width*c),Math.round(u.height*c)],p=[];for(const u of a.querySelectorAll(".ak-layer[data-ak-layer]")){const h=ot(u,a,s),T=gt(u,a,s).map(S=>{const y=S.runs[0]?.el,E=y?Mt(y):void 0,M=y?parseFloat(getComputedStyle(y).fontSize):0,C=M>0?S.size/M:1;return{text:S.text,box:S.box,size:G(S.size),...E===void 0?{}:{capHeight:G(E*C)},color:y?getComputedStyle(y).color:""}}),w=[];for(const S of u.querySelectorAll("[data-ak-picture]")){const y=S.querySelector("img");if(!y)continue;const E=y.getBoundingClientRect(),M=At(y,a);if(!M)continue;const C=E.width>0?y.naturalWidth/E.width:0,J=E.height>0?y.naturalHeight/E.height:0;w.push({file:S.dataset.akPicture??"",source:[y.naturalWidth,y.naturalHeight],shown:[Math.round((M.right-M.left)*C),Math.round((M.bottom-M.top)*J)],box:f(new DOMRect(M.left,M.top,M.right-M.left,M.bottom-M.top)),whole:f(E)})}p.push({board:r,layer:u.getAttribute("data-ak-layer")??"",component:u.dataset.component??"",...h?{box:h}:{},texts:T,pictures:w})}return p}const rt=r=>r.key;function ye(r,a,s){return gt(r,a,s).map(i=>{const c=i.runs[0]?.el,f=c?getComputedStyle(c):void 0,p=f?parseFloat(f.fontSize):0,u=p>0?i.size/p:1,h=c?Mt(c):void 0,T=f?parseFloat(f.lineHeight):NaN,w=f?parseFloat(f.letterSpacing):NaN;return{text:i.text,box:i.box,size:G(i.size),...h===void 0?{}:{capHeight:G(h*u)},color:f?.color??"",font:f?.fontFamily??"",weight:f?.fontWeight??"",lineHeight:Number.isFinite(T)?G(T*u):G(i.size*1.2),align:f?.textAlign??"left",letterSpacing:Number.isFinite(w)?G(w*u):0}})}function ge(r){return Promise.all(r.map(a=>new Promise(s=>{const i=document.createElement("link");i.rel="stylesheet",i.href=a,i.onload=()=>{s()},i.onerror=()=>{s()},document.head.append(i)})))}function it(r,a){if(r instanceof K)return r;const s=r instanceof Error?r:new Error(String(r)),i=s.code;return new K(typeof i=="string"&&Rt(i)?i:a,`${s.message}
|
|
3
|
+
${s.stack??""}`)}const st={top:0,bottom:0,left:0,right:0},we=(r,a)=>r===a?"square":r>a?"landscape":"portrait";function ke(r){return JSON.stringify(r,(a,s)=>{if(typeof s=="function")return`fn:${String(s)}`;if(typeof s=="object"&&s!==null&&"sha256"in s&&"path"in s&&"url"in s){const i={...s};return delete i.url,i}return s})}const Et=40;function be(r){let a=r[0];for(const s of r)a&&s.size>a.size&&(a=s);if(a)return a.text.length>Et?`${a.text.slice(0,Et)}…`:a.text}function xe(r){let a=0;for(const s of r.querySelectorAll(".ak-layer"))a=Math.max(a,s.scrollHeight);return Math.ceil(a)}export async function loadImage(r,a,s){const i=Ft(r,a,void 0,"image"),{ledger:c,log:f,combo:p}=i;let u;try{await ge(r.styles??[]),u=await c.timed("importing the image's module",()=>yt({phase:"module"},()=>import(r.module)))}catch(t){throw it(t,"load_failed")}const h=u.default;if(!Xt(h))throw new K("AK-I005",`The default export of ${r.file} is not an image: an image's module exports image({ changes, script, boards: (ctx) => [ … ] }) from @allyhub/sdk/image.`);const T=Pt,w=jt(i,s),S={width:64,height:64};w.dress({dims:{...S,orient:"square",safe:st},look:T,format:r.format,options:{transparent:h.transparent===!0}});const y=_t(i);let E;try{E=await yt({phase:"build"},()=>Promise.resolve(h.boards(y)))}catch(t){throw it(t,"load_failed")}if(!Array.isArray(E)||E.length===0)throw new K("AK-I005",`The boards function of ${r.file} returned no boards: it returns board({ key, size, layers }), one a picture, in order.`);const M=[],C=[];for(const[t,e]of E.entries()){if(!Vt(e))throw new K("AK-I005",`Item ${String(t+1)} the boards function of ${r.file} returned is not a board made by board({ key, size, layers }).`);if(C.some(o=>o.key===e.key)){M.push(Nt("AK-I002",`The board key "${e.key}" is used twice. Every board of an image needs its own key: it names the board's file.`,{part:e.key,where:{file:r.file}}));continue}C.push(e)}const J=async(t,e,o)=>{const n={width:e,height:o,orient:we(e,o),safe:st},l=[],m=($,x,A)=>{for(const O of $){const v=A||O.visible===!1;l.push({spec:O,hidden:v,...x===void 0?{}:{parent:x}});const L=O.props?.layers;O[X]==="graphic"&&O.component==="group"&&Array.isArray(L)&&m(L,rt(O),v)}};m(t.layers,void 0,!1);const d=St({env:i,stage:w,key:t.key,layers:t.layers,frame:n,look:T,transparent:h.transparent===!0,holder:s,...t.background===void 0?{}:{background:t.background}}),k=d.el;try{await d.ready();const $=oe(t.layers).filter(A=>A[X]==="graphic"&&A.transform!==void 0&&!Array.isArray(A.props.box)),x=new Map;if($.length>0){await d.draw("layout");for(const A of $){const O=rt(A),v=O===void 0?null:k.querySelector(`.ak-layer[${et}="${CSS.escape(O)}"]`),L=v?qt(v):void 0;if(!v||!L||L===v)continue;const W=L.style.transform;L.style.transform="";const H=ot(v,k,e);H&&O!==void 0&&x.set(O,H),L.style.transform=(H&&Ut(A.transform,H))??W}}return{el:k,board:d,listed:l,turns:x}}catch($){throw w.takeOutside(),d.dispose(),it($,"load_failed")}},Ot=async t=>{const e=Jt(t);if(typeof e=="string")throw new K("AK-I001",`board ${e}`);let o,n;if(e.height==="auto"){const m=await J(t,e.width,e.minHeight);m.el.style.visibility="",await m.board.draw("layout");const d=xe(m.el);w.takeOutside(),m.board.dispose(),w.takeOutside();const k=Math.min(e.maxHeight,Math.max(e.minHeight,d));n=await J(t,e.width,k),o={key:t.key,width:e.width,height:k,from:"auto",auto:{content:d,min:e.minHeight,max:e.maxHeight}}}else n=await J(t,e.width,e.height),o={key:t.key,width:e.width,height:e.height,from:"size"};const l=Y.t;return n.el.style.visibility="",tt(n.el,!1),{...n,info:o,at:l}},g=[];for(const t of C)g.push(await Ot(t));let P;c.loading=!1;const Ct=t=>Math.min(g.length-1,Math.max(0,Math.floor((t+1e-9)/Y.dur))),F=t=>{const e=g[Ct(t)];if(!e)throw new Error("The image has no boards.");return e},z=t=>{if(P!==t){for(const e of g)tt(e.el,e===t);s.style.width=`${String(t.info.width)}px`,s.style.height=`${String(t.info.height)}px`,P=t}},Q=t=>g.find(e=>e.info.key===t),at=t=>g.indexOf(t)*Y.dur,Lt=g.map((t,e)=>{const o=e*Y.dur,l=C.find(m=>m.key===t.info.key)?.title??be(t.board.onScreen);return{key:t.info.key,layers:t.board.layers.map(m=>m.spec.component),start:o,end:o+Y.dur,planes:t.board.planes.map(m=>({...m,layers:m.layers.map(d=>({...d,start:d.start+o,end:d.end+o}))})),still:o+t.at,...l===void 0?{}:{title:l},frame:{width:t.info.width,height:t.info.height},board:t.info}}),I=g[0];if(!I)throw new K("AK-I005",`${r.file} has no boards that load.`);const dt={fps:30,width:I.info.width,height:I.info.height,duration:g.length*Y.dur,background:I.board.background,parts:Lt};z(I);const Tt=Ht(r.piece),vt=(t,e)=>({...t,piece:r.piece,output:i.output,combo:p,format:r.format,...e===void 0||t.part!==void 0?{}:{part:e}}),ct=()=>g.map(t=>({key:t.info.key,onScreen:[...new Set(t.board.onScreen.map(e=>e.text))]})),ft=()=>{const t=f.reads(Tt,g.map(n=>n.info.key)),e=[],o=new Set;for(const n of g)for(const l of t.media)n.board.reads.has(`f:${l.path}`)&&(e.push({...l,part:n.info.key}),o.add(l.path));return{...t,media:[...t.media.filter(n=>!o.has(n.path)),...e]}},lt=t=>t.some(e=>{if(e[X]!=="graphic")return!1;if(!le.has(e.component))return!0;const o=e.props?.layers;return e.component===bt&&Array.isArray(o)&<(o)}),ut=()=>{const t={},e=zt(r.dims,p);for(const o of g)t[o.info.key]=JSON.stringify({v:1,piece:r.piece,output:i.output,key:o.info.key,dims:e,size:[o.info.width,o.info.height],background:o.board.background,look:T,layers:o.board.layers.map(n=>[n.spec.component,n.spec.z??"front",n.start,n.end,ke(n.props)]),code:lt(o.board.layers.map(n=>n.spec)),reads:[...o.board.reads.entries()].sort((n,l)=>n[0]<l[0]?-1:n[0]>l[0]?1:0)});return t},mt=()=>{const t=[...c.problems,...M,...f.problems,...c.run,...re(w,g.map(o=>o.board)),...f.translationProblems()].map(o=>vt(o)),e=new Set;return t.filter(o=>{const n=`${o.code}|${o.message}|${o.part??""}`;return e.has(n)?!1:(e.add(n),!0)})},pt=()=>c.facts.map(t=>({...t,output:i.output,combo:p,format:r.format})),j=async(t,e)=>{z(t),await t.board.draw(e?.mode)},ht=t=>(C.find(e=>e.key===t.info.key)?.layers??[]).filter(e=>e[X]==="graphic");let Z;const Bt=async t=>{await j(t);const e=new Map($t(t.info.key,t.el,t.info.width).map(n=>[n.layer,n])),o=t.listed.flatMap(({spec:n,hidden:l,parent:m})=>{const d=rt(n);if(d===void 0)return[];const k=n[X]==="graphic",$=k?n.component:"footage",x=k?n.props:{},A=(B,N)=>{if(typeof N!="string"||N==="")return[];const q=f.spokenOf(N);return q?[{prop:B,key:q.key,text:N}]:[]},O=x.textItem,v=[...Object.entries(x).flatMap(([B,N])=>A(B,N)),...O?A("textItem.contents",O.contents):[]],L=l?void 0:e.get(d),W=l?null:t.el.querySelector(`.ak-layer[${et}="${CSS.escape(d)}"]`),H=W?ye(W,t.el,t.info.width):[],D=L?.pictures[0],U=$===xt&&D?{file:D.file,source:D.source,whole:D.whole,box:D.box,fit:typeof x.fit=="string"?x.fit:"cover",position:Array.isArray(x.position)?x.position:[.5,.5],...Array.isArray(x.crop)?{crop:x.crop}:{}}:void 0,b=k?n:{},V=b.kind??($===xt?"pixel":"smartObject"),R=Object.fromEntries(["blendMode","opacity","fillOpacity","clipping","transform","effects","visible"].filter(B=>b[B]!==void 0).map(B=>[B,b[B]]));return b.mask!==void 0&&(R.mask=typeof b.mask=="string"||"sha256"in b.mask?{src:typeof b.mask=="string"?b.mask:b.mask.path}:{...b.mask,...b.mask.src===void 0?{}:{src:typeof b.mask.src=="string"?b.mask.src:b.mask.src.path}}),[{key:d,component:$,kind:V,...m===void 0?{}:{parent:m},hidden:l,style:R,...L?.box?{box:L.box}:{},words:v,texts:H,...U?{picture:U}:{}}]});return{key:t.info.key,...C.find(n=>n.key===t.info.key)?.title===void 0?{}:{title:C.find(n=>n.key===t.info.key)?.title??""},width:t.info.width,height:t.info.height,background:getComputedStyle(t.el).backgroundColor,layers:o}},It=async(t,e)=>{const o=e.post??(()=>{});for(const d of[document.documentElement,document.body])d.style.overflow="hidden";const n=()=>{const d=P;if(!d)return;const k=Math.min(innerWidth/Math.max(1,d.info.width),innerHeight/Math.max(1,d.info.height));Object.assign(t.style,{position:"absolute",left:"0px",top:"0px",transformOrigin:"0 0",transform:`scale(${String(k)})`})},l=async d=>{await j(d),n(),o({type:"ready",board:d.info.key})};addEventListener("resize",n);const m=(e.at?.part===void 0?void 0:Q(e.at.part))??(e.at?.t===void 0?void 0:F(e.at.t))??I;return o({type:"loaded",kind:"image",boards:g.map(d=>d.info)}),await l(m),{command(d){if(d.type!=="seek")return;const k=typeof d.part=="string"?Q(d.part):typeof d.t=="number"?F(d.t):void 0;k&&l(k)}}};return{kind:"image",timeline:dt,ready:()=>Promise.resolve(),summary:()=>({kind:"image",timeline:dt,problems:mt(),facts:pt(),reads:ft(),text:ct(),signs:ut(),seekLimit:nt}),async seek(t,e){await j(F(t),e)},async measure(t){const e=t===void 0?g:[...new Set(t.map(n=>F(n)))],o=[];for(const n of e){z(n);const l=await n.board.measure(),m=at(n);o.push({...l,moments:l.moments.map(d=>({...d,t:m+d.t,part:n.info.key}))})}return{width:I.info.width,height:I.info.height,safe:st,moments:o.flatMap(n=>n.moments),footage:o.flatMap(n=>n.footage)}},async boardLayouts(){const t=[];for(const e of g){z(e);const o=await e.board.measure(),n=at(e);t.push({key:e.info.key,report:{...o,moments:o.moments.map(l=>({...l,t:n+l.t}))}})}return t},boards:()=>g.map(t=>t.info),async boardLayers(){const t=[];for(const e of g)await j(e),t.push(...$t(e.info.key,e.el,e.info.width));return t},async boardOverset(){const t=[];for(const e of g)await j(e),t.push(...ie(e.info.key,e.el,e.info.width));return t},async editLayers(){const t=[];for(const e of g)t.push(await Bt(e));return t},psdBoards(){return g.map(t=>{const e=C.find(o=>o.key===t.info.key);return{key:t.info.key,...e?.title===void 0?{}:{title:e.title},width:t.info.width,height:t.info.height,background:t.board.background,resolution:e?.resolution??kt.resolution,colorProfile:e?.colorProfile??kt.colorProfile,layers:fe(ht(t),{frame:t.board.frame,turnBox:o=>t.turns.get(o),color:o=>w.cssColor(o),measureText:(o,n)=>ue(t.el,o,n)})}})},async psdDraw(t,e,o="pixels"){if(Z?.(),Z=void 0,t===null||e===void 0){P=void 0,z(I);return}const n=Q(t);if(!n)throw new Error(`The image has no board ${t}.`);const l=ae(ht(n),e);if(!l)throw new Error(`Board ${t} has no layer ${e}.`);const m=n.board.frame;for(const $ of g)tt($.el,!1);P=void 0,s.style.width=`${String(m.width)}px`,s.style.height=`${String(m.height)}px`;const d=$=>`${String(Math.round($*1e4)/1e4)}px`;if(o==="mask"){const $=n.board.layers[0]?.ctx,x=l.layer.mask;if(!$||x===void 0)throw new Error(`Layer ${e} of board ${t} has no mask to draw.`);const A=document.createElement("div");A.dataset.akBoard=`${t}/${e}/mask`,Object.assign(A.style,{position:"relative",width:d(m.width),height:d(m.height),overflow:"hidden",background:"black"});const[O,v,L,W,H,D]=ce(l,m,q=>n.turns.get(q)),U=document.createElement("div");Object.assign(U.style,{position:"absolute",inset:"0",transformOrigin:"0 0",transform:`matrix(${[O,v,L,W,H,D].join(", ")})`});const b=de(l.layer,m),V=document.createElement("div");Object.assign(V.style,{position:"absolute",left:d(b.at[0]),top:d(b.at[1]),width:d(b.at[2]),height:d(b.at[3]),background:"white"}),U.append(V),A.append(U),s.append(A);const R=typeof x=="string"||"sha256"in x?{src:x}:x,B=Dt(V,{mask:{...R,density:100,feather:0,enabled:!0},box:b.box,frame:b.frame,defs:Kt(A),ctx:$,base:wt(l.layer)});if(B!==void 0)throw A.remove(),new Error(`Layer ${e}'s mask: ${B}.`);const N=R.src!==void 0&&R.src!=="ellipse"?typeof R.src=="string"&&R.src.includes("(")?void 0:Wt(R.src,wt(l.layer),$):void 0;if(N){const q=new Image;q.src=N.url,await q.decode().catch(()=>{})}await c.settle(nt*1e3),await document.fonts.ready,Z=()=>{A.remove()};return}const k=St({env:i,stage:w,key:t,layers:[se(l.layer,l.groups)],frame:m,look:T,transparent:!0,holder:s,background:"transparent"});await k.ready(),k.el.style.visibility="",tt(k.el,!0),await k.draw(),Z=()=>{k.dispose()}},tracks:()=>Promise.resolve([]),async inks(t){const e=F(t);return z(e),e.board.inks()},stuck:()=>P?.board.stuck(),seekLimit:nt,text:ct,reads:ft,signature:()=>P?.board.signature(),async signatureAt(t){const e=F(t);return await j(e,{mode:"layout"}),e.board.signature()},async partSignature(t){const e=Q(t);if(!e)return{unknown:`The image has no board ${t}.`};await j(e,{mode:"layout"});const o=e.board.signature();return o===void 0?{unknown:`board ${t} holds what its DOM does not say`}:{sign:o,owners:[]}},signs:ut,problems:mt,facts:pt,async ask(t,e){const o=[];for(const n of g)z(n),o.push(...await n.board.ask(t,e));return o},sheet:()=>P?.el,answer(t){if(t.type!=="objects")return;const e=Number(t.t),o=F(e);return z(o),o.board.objects(n=>f.keysShowing(n)).then(n=>({type:"objects",t:e,elements:[],...n}))},play:(t,e)=>It(t,e),dispose(){for(const t of g)t.board.dispose();w.dispose()}}}
|
|
@@ -9,4 +9,4 @@ A post's pictures, video and document can be the project's own items: an image's
|
|
|
9
9
|
|
|
10
10
|
- `allyhub help linkedin` lists the commands and prints where the SDK's `linkedin.md` is. Read it before writing a post or an article.
|
|
11
11
|
- `allyhub frames` draws a post as LinkedIn's feed shows it, folded at "… more" and opened, and an article as its page shows it; `allyhub inspect` gives what LinkedIn counts. Look with them before handing it over.
|
|
12
|
-
- **
|
|
12
|
+
- **To publish**, the person downloads a post's text to paste, or copies an article from its editor to paste into LinkedIn's, and posts it. `allyhub render` also writes the request LinkedIn's Posts API takes, and an article as HTML.
|