allyhub 0.17.1 → 0.19.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 +17 -0
- package/bin/allyhub.js +10 -0
- package/dist/args.js +1 -1
- package/dist/command.js +1 -1
- package/dist/commands/add.js +1 -1
- package/dist/commands/auth.js +1 -1
- package/dist/commands/cloud-tools.js +1 -1
- package/dist/commands/cloud.js +1 -1
- package/dist/commands/contributed.js +1 -1
- package/dist/commands/found-extensions.js +2 -0
- package/dist/commands/frames/common.js +1 -1
- package/dist/commands/frames/doc.js +1 -1
- package/dist/commands/frames.js +9 -9
- package/dist/commands/index.js +1 -1
- package/dist/commands/inspect/common.js +3 -3
- package/dist/commands/inspect/index.js +1 -1
- package/dist/commands/inspect/layout.js +1 -1
- package/dist/commands/inspect/views.js +1 -1
- package/dist/commands/list.js +2 -0
- package/dist/commands/mail.js +1 -1
- package/dist/commands/render.js +1 -1
- package/dist/commands/run-context.js +2 -0
- package/dist/commands.json +1 -0
- package/dist/fields.js +1 -1
- package/dist/main.js +7 -7
- package/dist/node_modules/@allyhub/3d-extension/dist/build.js +1 -1
- package/dist/node_modules/@allyhub/3d-extension/dist/scenery-build.js +1 -1
- package/dist/node_modules/@allyhub/3d-extension/package.json +3 -2
- 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/build-plugins.js +1 -1
- package/dist/node_modules/@allyhub/build/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/build/dist/meta-worker.js +1 -1
- package/dist/node_modules/@allyhub/build/dist/plugin.js +9 -9
- package/dist/node_modules/@allyhub/build/dist/prepare.js +3 -3
- package/dist/node_modules/@allyhub/build/dist/project-root.js +1 -1
- package/dist/node_modules/@allyhub/build/dist/scan.js +1 -1
- package/dist/node_modules/@allyhub/build/dist/sdk-parts.js +2 -0
- package/dist/node_modules/@allyhub/build/dist/vite.js +2 -2
- package/dist/node_modules/@allyhub/build/package.json +9 -1
- package/dist/node_modules/@allyhub/canvas-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/canvas-model/package.json +1 -1
- package/dist/node_modules/@allyhub/chart/package.json +1 -1
- package/dist/node_modules/@allyhub/check/dist/check.js +2 -2
- 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/call.js +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/catalog.js +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/client.js +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/config.js +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/credentials.js +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/device.js +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/errors.js +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/loopback.js +2 -2
- package/dist/node_modules/@allyhub/cloud/dist/mail.js +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/records.js +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/signin.js +2 -2
- package/dist/node_modules/@allyhub/cloud/dist/sites.js +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/token.js +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/tools.js +2 -0
- package/dist/node_modules/@allyhub/cloud/dist/uploads.js +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/voice.js +1 -1
- package/dist/node_modules/@allyhub/cloud/package.json +5 -1
- package/dist/node_modules/@allyhub/components/package.json +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/offline-page.js +2 -0
- package/dist/node_modules/@allyhub/dev-server/dist/pages.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/tools.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/package.json +1 -1
- package/dist/node_modules/@allyhub/diagnostics/package.json +1 -1
- package/dist/node_modules/@allyhub/doc/package.json +1 -1
- package/dist/node_modules/@allyhub/doc-extension/dist/cli/find.js +1 -1
- package/dist/node_modules/@allyhub/doc-extension/dist/workspace.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/dist/host.js +1 -1
- package/dist/node_modules/@allyhub/extension-host/dist/points.js +1 -1
- package/dist/node_modules/@allyhub/extension-host/package.json +1 -1
- package/dist/node_modules/@allyhub/formats/dist/files.d.ts +4 -0
- package/dist/node_modules/@allyhub/formats/dist/items.d.ts +24 -7
- package/dist/node_modules/@allyhub/formats/dist/items.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/note-shape.d.ts +1 -1
- package/dist/node_modules/@allyhub/formats/package.json +25 -1
- package/dist/node_modules/@allyhub/html-extension/LICENSE +241 -0
- package/dist/node_modules/@allyhub/html-extension/dist/page.js +6 -0
- package/dist/node_modules/@allyhub/html-extension/dist/project-tools.js +21 -0
- package/dist/node_modules/@allyhub/html-extension/dist/tools.js +2 -0
- package/dist/node_modules/@allyhub/html-extension/markup/allyhub.yaml +2 -0
- package/dist/node_modules/@allyhub/html-extension/markup/markup.json +15 -0
- package/dist/node_modules/@allyhub/html-extension/markup/pages/budget.html +36 -0
- package/dist/node_modules/@allyhub/html-extension/package.json +92 -0
- package/dist/node_modules/@allyhub/i18n/package.json +1 -1
- package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
- package/dist/node_modules/@allyhub/image-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/image-measure/package.json +1 -1
- package/dist/node_modules/@allyhub/image-psd/package.json +1 -1
- package/dist/node_modules/@allyhub/image-render/package.json +1 -1
- package/dist/node_modules/@allyhub/image-runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/image-sdk/package.json +1 -1
- package/dist/node_modules/@allyhub/jobs/package.json +1 -1
- package/dist/node_modules/@allyhub/linkedin-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/linkedin-model/package.json +1 -1
- package/dist/node_modules/@allyhub/linkedin-view/package.json +1 -1
- package/dist/node_modules/@allyhub/linkedin-view/src/style.css +1 -600
- package/dist/node_modules/@allyhub/measure/package.json +1 -1
- package/dist/node_modules/@allyhub/media/package.json +5 -1
- package/dist/node_modules/@allyhub/media-extension/dist/asr/hear.js +1 -1
- package/dist/node_modules/@allyhub/media-extension/dist/vision/track.js +1 -1
- package/dist/node_modules/@allyhub/media-extension/package.json +2 -1
- package/dist/node_modules/@allyhub/model/package.json +1 -1
- package/dist/node_modules/@allyhub/office-extension/package.json +4 -1
- package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
- package/dist/node_modules/@allyhub/piece/dist/layer.d.ts +1 -2
- package/dist/node_modules/@allyhub/piece/dist/media.d.ts +1 -1
- package/dist/node_modules/@allyhub/piece/dist/source.d.ts +2 -2
- package/dist/node_modules/@allyhub/piece/dist/stage.d.ts +2 -2
- package/dist/node_modules/@allyhub/piece/package.json +1 -1
- package/dist/node_modules/@allyhub/project/package.json +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/auth.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/blobs.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/cli.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/errors.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/events.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/jsonrpc.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/kinds.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/mail.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/notes.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/paywall.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/purposes.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/registry.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/sites.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/teams.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/tools.js +1 -1
- package/dist/node_modules/@allyhub/protocol/package.json +41 -1
- package/dist/node_modules/@allyhub/registry/package.json +1 -1
- package/dist/node_modules/@allyhub/render/dist/errors.js +1 -1
- package/dist/node_modules/@allyhub/render/dist/post-probe.js +1 -1
- package/dist/node_modules/@allyhub/render/package.json +9 -1
- package/dist/node_modules/@allyhub/runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/runtimes/dist/bundled.js +1 -1
- package/dist/node_modules/@allyhub/runtimes/dist/declared.js +1 -1
- package/dist/node_modules/@allyhub/runtimes/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/runtimes/dist/manifest.js +1 -1
- package/dist/node_modules/@allyhub/runtimes/dist/runtimes.js +1 -1
- package/dist/node_modules/@allyhub/runtimes/manifest.json +1 -1
- package/dist/node_modules/@allyhub/runtimes/package.json +9 -1
- package/dist/node_modules/@allyhub/scaffold/package.json +1 -1
- package/dist/node_modules/@allyhub/scenery/package.json +1 -1
- package/dist/node_modules/@allyhub/scenery-host/dist/bundle.js +3 -3
- package/dist/node_modules/@allyhub/scenery-host/dist/fact.d.ts +1 -1
- package/dist/node_modules/@allyhub/scenery-host/dist/model-stage.js +2 -2
- package/dist/node_modules/@allyhub/scenery-host/package.json +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/annotations.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/api/workbook.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/arrange.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/engine.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/filter.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/generated.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/html.js +6 -6
- package/dist/node_modules/@allyhub/sheet/dist/workbook.js +1 -1
- package/dist/node_modules/@allyhub/sheet/package.json +1 -1
- package/dist/node_modules/@allyhub/sheet-extension/dist/cli/open.js +1 -1
- package/dist/node_modules/@allyhub/sheet-extension/dist/code.js +1 -1
- package/dist/node_modules/@allyhub/sheet-extension/dist/export.js +2 -2
- package/dist/node_modules/@allyhub/sheet-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/stage/package.json +1 -1
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/arimo/400-italic.css +1 -79
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/arimo/400.css +1 -79
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/arimo/700-italic.css +1 -79
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/arimo/700.css +1 -79
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/arimo/arial.css +1 -316
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/400-italic.css +1 -19
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/400.css +1 -19
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/700-italic.css +1 -19
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/700.css +1 -19
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/cambria.css +1 -76
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/carlito/400-italic.css +1 -69
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/carlito/400.css +1 -69
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/carlito/700-italic.css +1 -69
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/carlito/700.css +1 -69
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/carlito/calibri.css +1 -276
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/400-italic.css +1 -79
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/400.css +1 -79
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/700-italic.css +1 -79
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/700.css +1 -79
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/courier-new.css +1 -316
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/noto-color-emoji/emoji.css +1 -8
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/noto-sans-sc/400.css +1 -1009
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/noto-sans-sc/700.css +1 -1009
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/noto-sans-sc/microsoft-yahei.css +1 -2018
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/400-italic.css +1 -79
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/400.css +1 -79
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/700-italic.css +1 -79
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/700.css +1 -79
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/times-new-roman.css +1 -316
- package/dist/node_modules/@allyhub/stage-page/package.json +1 -1
- package/dist/node_modules/@allyhub/stage-runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/telemetry/dist/doc.js +1 -1
- package/dist/node_modules/@allyhub/telemetry/dist/errors.js +1 -1
- package/dist/node_modules/@allyhub/telemetry/dist/telemetry.js +2 -2
- package/dist/node_modules/@allyhub/telemetry/package.json +1 -1
- package/dist/node_modules/@allyhub/text-extension/package.json +2 -1
- package/dist/node_modules/@allyhub/video-core/package.json +1 -1
- package/dist/node_modules/@allyhub/video-extension/dist/build-plugins.js +1 -1
- package/dist/node_modules/@allyhub/video-extension/package.json +6 -2
- package/dist/node_modules/@allyhub/video-measure/dist/plans.js +2 -2
- package/dist/node_modules/@allyhub/video-measure/dist/reference/video.js +1 -1
- package/dist/node_modules/@allyhub/video-measure/package.json +5 -1
- package/dist/node_modules/@allyhub/video-sdk/dist/config.js +2 -0
- package/dist/node_modules/@allyhub/video-sdk/dist/piece.js +1 -1
- package/dist/node_modules/@allyhub/video-sdk/package.json +5 -1
- package/dist/node_modules/@allyhub/website/package.json +1 -1
- package/dist/node_modules/@allyhub/website-extension/dist/build.js +1 -1
- package/dist/node_modules/@allyhub/website-extension/package.json +4 -4
- package/dist/node_modules/@allyhub/x-extension/dist/build.js +1 -1
- package/dist/node_modules/@allyhub/x-extension/package.json +8 -2
- package/dist/node_modules/@allyhub/x-model/package.json +1 -1
- package/dist/node_modules/@allyhub/x-view/package.json +1 -1
- package/dist/node_modules/@allyhub/x-view/src/style.css +1 -709
- package/dist/package.json +14 -13
- package/dist/project.js +1 -1
- package/dist/resources.js +1 -1
- package/dist/sdk-docs.js +1 -1
- package/dist/slot.js +4 -0
- package/dist/telemetry.js +1 -1
- package/dist/version.js +1 -1
- package/editor-web/assets/{abnfDiagram-WEYOIA3C-CHNpVSPv.js → abnfDiagram-WEYOIA3C-DYaMS_BB.js} +1 -1
- package/editor-web/assets/{architecture-WOLXFQ4H-gPsJqQwV.js → architecture-WOLXFQ4H-g_Tjfl_y.js} +1 -1
- package/editor-web/assets/{architectureDiagram-ZHVYKT53-CEIDcC6r.js → architectureDiagram-ZHVYKT53-CqdhofOL.js} +1 -1
- package/editor-web/assets/article-8evPh712.js +3 -0
- package/editor-web/assets/{article-DfELjJ2o.js → article-BhRtWYMd.js} +2 -2
- package/editor-web/assets/{blockDiagram-RJAE7QA3-CUzEGVet.js → blockDiagram-RJAE7QA3-Bc-28Bci.js} +1 -1
- package/editor-web/assets/{c4Diagram-XDPPPE54-CB94NR9s.js → c4Diagram-XDPPPE54-CTGJb8FB.js} +1 -1
- package/editor-web/assets/{calc-worker-BdHh5LXM.js → calc-worker-oEIqrrTM.js} +1 -1
- package/editor-web/assets/channel-wIj_OqDm.js +1 -0
- package/editor-web/assets/{chart-file-CfbWK9l1.js → chart-file-dGiRgFcH.js} +1 -1
- package/editor-web/assets/{chunk-2E7WHVMD-DFYo_Boi.js → chunk-2E7WHVMD-B2MPOVTU.js} +1 -1
- package/editor-web/assets/{chunk-4EMNKR2T-CLLjmweX.js → chunk-4EMNKR2T-BUV1ZHP0.js} +1 -1
- package/editor-web/assets/{chunk-55XCU76K-CkwQ_3m1.js → chunk-55XCU76K-BZlpspL5.js} +1 -1
- package/editor-web/assets/{chunk-7S6XSTFO-V-AvHpAB.js → chunk-7S6XSTFO-CpKeisWE.js} +1 -1
- package/editor-web/assets/{chunk-AQDTSKZB-PjHyYpb8.js → chunk-AQDTSKZB-BJqwAPyo.js} +1 -1
- package/editor-web/assets/{chunk-DSNLSHJZ-QaczBS3J.js → chunk-DSNLSHJZ-D6oPWl_W.js} +1 -1
- package/editor-web/assets/{chunk-HAGFOTED-aLaQB5Xu.js → chunk-HAGFOTED-B5pk4MZF.js} +1 -1
- package/editor-web/assets/{chunk-HNE4Q36P-De3ftDQR.js → chunk-HNE4Q36P-DHbSPvxQ.js} +1 -1
- package/editor-web/assets/{chunk-NQOKRVIF-CrhVQyvP.js → chunk-NQOKRVIF-CcL_GcRA.js} +1 -1
- package/editor-web/assets/{chunk-UHW7PFBP-BFmZ5ZLn.js → chunk-UHW7PFBP-YgiOL6XE.js} +1 -1
- package/editor-web/assets/{chunk-VQ5W62QI-CzppUHLA.js → chunk-VQ5W62QI-p14b4UYc.js} +1 -1
- package/editor-web/assets/{chunk-WQQL4CDK-BrAU7V6v.js → chunk-WQQL4CDK-BWW0x-XH.js} +1 -1
- package/editor-web/assets/{chunk-YZO67HFG-BSiF71qj.js → chunk-YZO67HFG-oG3qd68C.js} +1 -1
- package/editor-web/assets/{chunk-ZAUX2LTX-BJc4r5b1.js → chunk-ZAUX2LTX-CpcheH0u.js} +1 -1
- package/editor-web/assets/{chunk-ZCHMQSOR-CkGTuehB.js → chunk-ZCHMQSOR-cWQvLl1w.js} +1 -1
- package/editor-web/assets/{classDiagram-v2-4MYWR3UA-Byxc7J88.js → classDiagram-v2-4MYWR3UA-7PG7YcdU.js} +1 -1
- package/editor-web/assets/{cynefin-EF2NZ3EQ-BSxkVbdf.js → cynefin-EF2NZ3EQ-CtcknEQ_.js} +1 -1
- package/editor-web/assets/{cynefinDiagram-WF24UDRP-IkCgARNs.js → cynefinDiagram-WF24UDRP-Ca7VIsjN.js} +1 -1
- package/editor-web/assets/{dagre-NK4GIZVX-9PgeH6nY.js → dagre-NK4GIZVX-BzcSLtsr.js} +1 -1
- package/editor-web/assets/deck-C7fN0Qtn.js +1 -0
- package/editor-web/assets/{diagram-CBK3MWTC-DRzeg3Ds.js → diagram-CBK3MWTC-DpRmTGlG.js} +1 -1
- package/editor-web/assets/{diagram-I5XIIV2D-B_zeKMN6.js → diagram-I5XIIV2D-BTrs_AX8.js} +1 -1
- package/editor-web/assets/{diagram-ODIL2UCW-FFm0O8SN.js → diagram-ODIL2UCW-CkIVjPqH.js} +1 -1
- package/editor-web/assets/{diagram-PFBEJUXE-DrtCT8OA.js → diagram-PFBEJUXE-BlFMbAG1.js} +1 -1
- package/editor-web/assets/{diagram-RJA3I4VV-DtxJ3V0q.js → diagram-RJA3I4VV-D3f8VJ-D.js} +1 -1
- package/editor-web/assets/{diagram-TYUNFSNR-DmxF_8H_.js → diagram-TYUNFSNR-Bbpngj6F.js} +1 -1
- package/editor-web/assets/{dist-bQKpw3Zz.js → dist-3iovns9K.js} +3 -3
- package/editor-web/assets/dist-BkHnbOEj.js +4 -0
- package/editor-web/assets/dist-BvOrNcK-.js +19 -0
- package/editor-web/assets/dist-CEIszq39.js +1 -0
- package/editor-web/assets/dist-CU5RbLNH.js +1 -0
- package/editor-web/assets/dist-CWZj8IAm.js +1 -0
- package/editor-web/assets/{dist-PBbWAsrV.js → dist-C_Mtrnif.js} +3 -3
- package/editor-web/assets/{dist-CEknsRDd.js → dist-CdqpwdCV.js} +4 -4
- package/editor-web/assets/{dist-CAb3W9_P.js → dist-CjT76RAw.js} +1 -1
- package/editor-web/assets/dist-CpzEn9T8.js +6 -0
- package/editor-web/assets/dist-CrFYWl5-.js +3 -0
- package/editor-web/assets/{dist-Dr3o4vee.js → dist-D4eBFGVL.js} +1 -1
- package/editor-web/assets/dist-DTcjb3cP.js +18 -0
- package/editor-web/assets/dist-D_WSM29I.js +17 -0
- package/editor-web/assets/{dist-C21CkR7Z.js → dist-Dp_9ISjP.js} +12 -12
- package/editor-web/assets/{dist-C56mWAec.js → dist-J-tPYKGS.js} +4 -4
- package/editor-web/assets/{docx-draw-9Q_fArBC.js → docx-draw-CoK1oqQD.js} +1 -1
- package/editor-web/assets/{ebnfDiagram-V4P3TTPT-DSX1Aoty.js → ebnfDiagram-V4P3TTPT-BaKj-yL6.js} +1 -1
- package/editor-web/assets/{elk-QONTBCTQ-C7gy9q56.js → elk-QONTBCTQ-Cn2qv1_U.js} +1 -1
- package/editor-web/assets/{erDiagram-KYQIGQAA-CKx_HoY4.js → erDiagram-KYQIGQAA-Bd7AEIDo.js} +1 -1
- package/editor-web/assets/{esm-BZb5QMQf.js → esm-Cjv8ogpP.js} +1 -1
- package/editor-web/assets/{eventmodeling-K75KTNOO-DL4HvSrd.js → eventmodeling-K75KTNOO-Sfp7_461.js} +1 -1
- package/editor-web/assets/flowDiagram-IUGLLWBU-BlVUglzw.js +1 -0
- package/editor-web/assets/{ganttDiagram-R7GPNTJY-N-AP4slN.js → ganttDiagram-R7GPNTJY-CBqcGdHI.js} +1 -1
- package/editor-web/assets/{gitGraph-VSP46ZUC-BKRGJKWm.js → gitGraph-VSP46ZUC-WTokXKTW.js} +1 -1
- package/editor-web/assets/{gitGraphDiagram-PDYL7XHY-ClwL7w2_.js → gitGraphDiagram-PDYL7XHY-BIWZHD9q.js} +1 -1
- package/editor-web/assets/index-BQWZnyAQ.js +28 -0
- package/editor-web/assets/index-Dvh1t1om.css +2 -0
- package/editor-web/assets/{info-OHQRW6UA-DpcY8t23.js → info-OHQRW6UA-COC6G-_J.js} +1 -1
- package/editor-web/assets/{infoDiagram-MVDRKAX5-ChtmtWni.js → infoDiagram-MVDRKAX5-DpaqdKBD.js} +1 -1
- package/editor-web/assets/{ishikawaDiagram-HPEHV2GE-BZNTuG_F.js → ishikawaDiagram-HPEHV2GE-Dyn2MAy1.js} +1 -1
- package/editor-web/assets/{iso-ahTwmFwH.js → iso-DoC-ZoBr.js} +1 -1
- package/editor-web/assets/{journeyDiagram-BOSHW7O7-C3uVmZbL.js → journeyDiagram-BOSHW7O7-DeSVfmm7.js} +1 -1
- package/editor-web/assets/{kanban-definition-FNSA4HC5-puEhftGG.js → kanban-definition-FNSA4HC5-Bfg0lj7B.js} +1 -1
- package/editor-web/assets/{mermaid-parser.core-Bw8re-WE.js → mermaid-parser.core-CyhovuYE.js} +3 -3
- package/editor-web/assets/{mermaid.core-Cc2GIqBr.js → mermaid.core-Dx1fBVUG.js} +4 -4
- package/editor-web/assets/{mindmap-definition-6OY57UG3-C6MUl_S_.js → mindmap-definition-6OY57UG3-QEU2HF_m.js} +1 -1
- package/editor-web/assets/{packet-JDAUHWVQ-C75RnvC5.js → packet-JDAUHWVQ-ReJTa_hw.js} +1 -1
- package/editor-web/assets/{pegDiagram-ECIUJNBX-ChjmsdV4.js → pegDiagram-ECIUJNBX-Bo1jFrvb.js} +1 -1
- package/editor-web/assets/{pie-XZMESJXO-BaKxJQpj.js → pie-XZMESJXO-BrtYafNA.js} +1 -1
- package/editor-web/assets/{pieDiagram-GNMPY74T-CT2ez8pr.js → pieDiagram-GNMPY74T-Cj0zQqs_.js} +1 -1
- package/editor-web/assets/{props-form-D5oKHfpk.js → props-form-BpSXbrSF.js} +1 -1
- package/editor-web/assets/{quadrantDiagram-D57K4MC3-BJItlTfk.js → quadrantDiagram-D57K4MC3-D5npDAVn.js} +1 -1
- package/editor-web/assets/{radar-ABXABTNO-DnLzBlTo.js → radar-ABXABTNO-C8RDrRqi.js} +1 -1
- package/editor-web/assets/{railroad-I3PHUGI6-D5hj6Yv3.js → railroad-I3PHUGI6-ebDrmYTK.js} +1 -1
- package/editor-web/assets/{railroad-abnf-LNEFI6M7-DUZlZoPu.js → railroad-abnf-LNEFI6M7-BxKuqg6V.js} +1 -1
- package/editor-web/assets/{railroad-ebnf-DWYD2UWJ-CDyyDC6d.js → railroad-ebnf-DWYD2UWJ-DOclnfpr.js} +1 -1
- package/editor-web/assets/{railroad-peg-JR7BVNR7-CC3ImNnT.js → railroad-peg-JR7BVNR7-DN0A1fpq.js} +1 -1
- package/editor-web/assets/{railroadDiagram-Y72NRBL7-Bjw-8Se5.js → railroadDiagram-Y72NRBL7-B3PjoVWw.js} +1 -1
- package/editor-web/assets/{requirementDiagram-EQYSW5RA-CDFnuEIO.js → requirementDiagram-EQYSW5RA-DLdzkQk5.js} +1 -1
- package/editor-web/assets/{sankeyDiagram-SY24JHO5-CQPVLY1w.js → sankeyDiagram-SY24JHO5-Dip4Piv_.js} +1 -1
- package/editor-web/assets/schemas-CQ_UU8-Z.js +1 -0
- package/editor-web/assets/{sequenceDiagram-BLEHNHQU-BQzuLmBX.js → sequenceDiagram-BLEHNHQU-QnPcoybL.js} +1 -1
- package/editor-web/assets/{session-s1I85rox.js → session-DMlLCFWg.js} +1 -1
- package/editor-web/assets/slides-7xWhREpt.js +1 -0
- package/editor-web/assets/snapshots-BLX4NTQC.js +1 -0
- package/editor-web/assets/{split-7CVjIkSU.js → split-tFGKk-x8.js} +1 -1
- package/editor-web/assets/{stateDiagram-v2-A6IESKWZ-DOuageUf.js → stateDiagram-v2-A6IESKWZ-D103CiMX.js} +1 -1
- package/editor-web/assets/{swimlanes-B3ENRKFQ-CXKkok7X.js → swimlanes-B3ENRKFQ-y4gCqEoa.js} +1 -1
- package/editor-web/assets/swimlanesDiagram-AYQRV4AK-DKzB_wSf.js +8 -0
- package/editor-web/assets/tabs-CuEawka3.js +1 -0
- package/editor-web/assets/{timeline-definition-JXYKGLGB-DgAjAeZp.js → timeline-definition-JXYKGLGB-BMp76v4V.js} +1 -1
- package/editor-web/assets/{treeView-D4JQ5SDB-C0Xvnhck.js → treeView-D4JQ5SDB-Q_GYyk0b.js} +1 -1
- package/editor-web/assets/{treemap-SAJKECNS-aXfKAeSX.js → treemap-SAJKECNS-B5lRWdQB.js} +1 -1
- package/editor-web/assets/{usecaseDiagram-WPOLBNNX-CvUlBa-L.js → usecaseDiagram-WPOLBNNX--QRllA-U.js} +1 -1
- package/editor-web/assets/{vennDiagram-Q3Y3IDCW-qMJ1iCxs.js → vennDiagram-Q3Y3IDCW-CzkATPA3.js} +1 -1
- package/editor-web/assets/{video-DQrjo1TI.js → video-D0uTbHWx.js} +1 -1
- package/editor-web/assets/{wardley-7MLQ67FV-DEdnH0by.js → wardley-7MLQ67FV-BXzwcdJa.js} +1 -1
- package/editor-web/assets/{wardleyDiagram-IVAIDKWA-Bt-B2hQ5.js → wardleyDiagram-IVAIDKWA-BQvC8Agx.js} +1 -1
- package/editor-web/assets/{words-0Ww2RyT4.js → words-CaUHhQHf.js} +1 -1
- package/editor-web/assets/workbook-CiCXkjmN.js +45 -0
- package/editor-web/assets/{xychartDiagram-4URNHDU4-DV4bSzTb.js → xychartDiagram-4URNHDU4-aY-lsD5o.js} +1 -1
- package/editor-web/index.html +4 -4
- package/package.json +2 -2
- package/dist/node_modules/@allyhub/browser/dist/browser.d.ts +0 -24
- package/dist/node_modules/@allyhub/browser/dist/capture.d.ts +0 -61
- package/dist/node_modules/@allyhub/browser/dist/cdp.d.ts +0 -51
- package/dist/node_modules/@allyhub/browser/dist/emoji.d.ts +0 -29
- package/dist/node_modules/@allyhub/browser/dist/flags.d.ts +0 -13
- package/dist/node_modules/@allyhub/browser/dist/frames.d.ts +0 -35
- package/dist/node_modules/@allyhub/browser/dist/html.d.ts +0 -19
- package/dist/node_modules/@allyhub/browser/dist/index.d.ts +0 -10
- package/dist/node_modules/@allyhub/browser/dist/launch.d.ts +0 -35
- package/dist/node_modules/@allyhub/browser/dist/page.d.ts +0 -74
- package/dist/node_modules/@allyhub/browser/dist/picture.d.ts +0 -18
- package/dist/node_modules/@allyhub/browser/dist/server.d.ts +0 -26
- package/dist/node_modules/@allyhub/build/dist/build-plugins.d.ts +0 -91
- package/dist/node_modules/@allyhub/build/dist/cli-command.d.ts +0 -84
- package/dist/node_modules/@allyhub/build/dist/code.d.ts +0 -26
- package/dist/node_modules/@allyhub/build/dist/content.d.ts +0 -64
- package/dist/node_modules/@allyhub/build/dist/data.d.ts +0 -11
- package/dist/node_modules/@allyhub/build/dist/evaluate.d.ts +0 -44
- package/dist/node_modules/@allyhub/build/dist/file-check.d.ts +0 -35
- package/dist/node_modules/@allyhub/build/dist/files.d.ts +0 -4
- package/dist/node_modules/@allyhub/build/dist/fonts.d.ts +0 -26
- package/dist/node_modules/@allyhub/build/dist/generated.d.ts +0 -29
- package/dist/node_modules/@allyhub/build/dist/imports.d.ts +0 -17
- package/dist/node_modules/@allyhub/build/dist/index.d.ts +0 -37
- package/dist/node_modules/@allyhub/build/dist/inspect-view.d.ts +0 -119
- package/dist/node_modules/@allyhub/build/dist/kind-build.d.ts +0 -530
- package/dist/node_modules/@allyhub/build/dist/made-notes.d.ts +0 -9
- package/dist/node_modules/@allyhub/build/dist/matrix.d.ts +0 -19
- package/dist/node_modules/@allyhub/build/dist/media.d.ts +0 -10
- package/dist/node_modules/@allyhub/build/dist/messages.d.ts +0 -60
- package/dist/node_modules/@allyhub/build/dist/meta-worker.d.ts +0 -59
- package/dist/node_modules/@allyhub/build/dist/meta.d.ts +0 -24
- package/dist/node_modules/@allyhub/build/dist/model-info.d.ts +0 -6
- package/dist/node_modules/@allyhub/build/dist/move-refs.d.ts +0 -16
- package/dist/node_modules/@allyhub/build/dist/places.d.ts +0 -23
- package/dist/node_modules/@allyhub/build/dist/plugin.d.ts +0 -50
- package/dist/node_modules/@allyhub/build/dist/prepare.d.ts +0 -138
- package/dist/node_modules/@allyhub/build/dist/project-root.d.ts +0 -19
- package/dist/node_modules/@allyhub/build/dist/project-tool.d.ts +0 -133
- package/dist/node_modules/@allyhub/build/dist/references.d.ts +0 -6
- package/dist/node_modules/@allyhub/build/dist/scan.d.ts +0 -45
- package/dist/node_modules/@allyhub/build/dist/stage-route.d.ts +0 -80
- package/dist/node_modules/@allyhub/build/dist/takes.d.ts +0 -9
- package/dist/node_modules/@allyhub/build/dist/types.d.ts +0 -11
- package/dist/node_modules/@allyhub/build/dist/uses.d.ts +0 -44
- package/dist/node_modules/@allyhub/build/dist/version.d.ts +0 -56
- package/dist/node_modules/@allyhub/build/dist/vite.d.ts +0 -115
- package/dist/node_modules/@allyhub/build/dist/work.d.ts +0 -38
- package/dist/node_modules/@allyhub/cloud/dist/blobs.d.ts +0 -29
- package/dist/node_modules/@allyhub/cloud/dist/call.d.ts +0 -91
- package/dist/node_modules/@allyhub/cloud/dist/catalog.d.ts +0 -12
- package/dist/node_modules/@allyhub/cloud/dist/client.d.ts +0 -64
- package/dist/node_modules/@allyhub/cloud/dist/config.d.ts +0 -40
- package/dist/node_modules/@allyhub/cloud/dist/credentials.d.ts +0 -76
- package/dist/node_modules/@allyhub/cloud/dist/device.d.ts +0 -14
- package/dist/node_modules/@allyhub/cloud/dist/errors.d.ts +0 -24
- package/dist/node_modules/@allyhub/cloud/dist/hashes.d.ts +0 -43
- package/dist/node_modules/@allyhub/cloud/dist/index.d.ts +0 -19
- package/dist/node_modules/@allyhub/cloud/dist/keychain.d.ts +0 -18
- package/dist/node_modules/@allyhub/cloud/dist/loopback.d.ts +0 -22
- package/dist/node_modules/@allyhub/cloud/dist/mail.d.ts +0 -16
- package/dist/node_modules/@allyhub/cloud/dist/pkce.d.ts +0 -11
- package/dist/node_modules/@allyhub/cloud/dist/records.d.ts +0 -42
- package/dist/node_modules/@allyhub/cloud/dist/signin-worker.d.ts +0 -2
- package/dist/node_modules/@allyhub/cloud/dist/signin.d.ts +0 -48
- package/dist/node_modules/@allyhub/cloud/dist/sites.d.ts +0 -20
- package/dist/node_modules/@allyhub/cloud/dist/token.d.ts +0 -20
- package/dist/node_modules/@allyhub/cloud/dist/uploads.d.ts +0 -58
- package/dist/node_modules/@allyhub/cloud/dist/voice.d.ts +0 -22
- package/dist/node_modules/@allyhub/jobs/dist/index.d.ts +0 -3
- package/dist/node_modules/@allyhub/jobs/dist/jobs.d.ts +0 -139
- package/dist/node_modules/@allyhub/jobs/dist/show.d.ts +0 -41
- package/dist/node_modules/@allyhub/measure/dist/compare.d.ts +0 -195
- package/dist/node_modules/@allyhub/measure/dist/grain.d.ts +0 -8
- package/dist/node_modules/@allyhub/measure/dist/image.d.ts +0 -16
- package/dist/node_modules/@allyhub/measure/dist/index.d.ts +0 -4
- package/dist/node_modules/@allyhub/media/dist/analysis.d.ts +0 -25
- package/dist/node_modules/@allyhub/media/dist/audio.d.ts +0 -16
- package/dist/node_modules/@allyhub/media/dist/beats.d.ts +0 -100
- package/dist/node_modules/@allyhub/media/dist/cache.d.ts +0 -26
- package/dist/node_modules/@allyhub/media/dist/errors.d.ts +0 -34
- package/dist/node_modules/@allyhub/media/dist/fetch.d.ts +0 -11
- package/dist/node_modules/@allyhub/media/dist/grid.d.ts +0 -101
- package/dist/node_modules/@allyhub/media/dist/index.d.ts +0 -21
- package/dist/node_modules/@allyhub/media/dist/picture.d.ts +0 -130
- package/dist/node_modules/@allyhub/media/dist/probe.d.ts +0 -52
- package/dist/node_modules/@allyhub/media/dist/progress.d.ts +0 -16
- package/dist/node_modules/@allyhub/media/dist/run.d.ts +0 -25
- package/dist/node_modules/@allyhub/media/dist/sheet.d.ts +0 -67
- package/dist/node_modules/@allyhub/media/dist/shots.d.ts +0 -110
- package/dist/node_modules/@allyhub/media/dist/sync.d.ts +0 -156
- package/dist/node_modules/@allyhub/media/dist/tools.d.ts +0 -25
- package/dist/node_modules/@allyhub/media/dist/video.d.ts +0 -35
- package/dist/node_modules/@allyhub/media/dist/vision/cache.d.ts +0 -42
- package/dist/node_modules/@allyhub/media/dist/vision/probe.d.ts +0 -39
- package/dist/node_modules/@allyhub/media/dist/vision/types.d.ts +0 -2
- package/dist/node_modules/@allyhub/media/dist/voice-shape.d.ts +0 -51
- package/dist/node_modules/@allyhub/model/dist/authoring.d.ts +0 -48
- package/dist/node_modules/@allyhub/model/dist/bevel-attributes.d.ts +0 -19
- package/dist/node_modules/@allyhub/model/dist/bevel-collapse.d.ts +0 -12
- package/dist/node_modules/@allyhub/model/dist/bevel-corner-plan.d.ts +0 -24
- package/dist/node_modules/@allyhub/model/dist/bevel-deform.d.ts +0 -5
- package/dist/node_modules/@allyhub/model/dist/bevel-fans.d.ts +0 -12
- package/dist/node_modules/@allyhub/model/dist/bevel-junction.d.ts +0 -16
- package/dist/node_modules/@allyhub/model/dist/bevel-marks.d.ts +0 -14
- package/dist/node_modules/@allyhub/model/dist/bevel-metric.d.ts +0 -4
- package/dist/node_modules/@allyhub/model/dist/bevel-mixed.d.ts +0 -12
- package/dist/node_modules/@allyhub/model/dist/bevel-offsets.d.ts +0 -22
- package/dist/node_modules/@allyhub/model/dist/bevel-patch.d.ts +0 -45
- package/dist/node_modules/@allyhub/model/dist/bevel-profile.d.ts +0 -13
- package/dist/node_modules/@allyhub/model/dist/bevel-projection.d.ts +0 -10
- package/dist/node_modules/@allyhub/model/dist/bevel-reflex.d.ts +0 -10
- package/dist/node_modules/@allyhub/model/dist/bevel-square-out.d.ts +0 -18
- package/dist/node_modules/@allyhub/model/dist/bevel-strips.d.ts +0 -8
- package/dist/node_modules/@allyhub/model/dist/bmesh-cycles.d.ts +0 -52
- package/dist/node_modules/@allyhub/model/dist/build-cache.d.ts +0 -42
- package/dist/node_modules/@allyhub/model/dist/build-job.d.ts +0 -34
- package/dist/node_modules/@allyhub/model/dist/build-worker.d.ts +0 -2
- package/dist/node_modules/@allyhub/model/dist/build.d.ts +0 -67
- package/dist/node_modules/@allyhub/model/dist/cancel.d.ts +0 -8
- package/dist/node_modules/@allyhub/model/dist/curve-math.d.ts +0 -21
- package/dist/node_modules/@allyhub/model/dist/curve-mesh.d.ts +0 -30
- package/dist/node_modules/@allyhub/model/dist/evaluation-guard.d.ts +0 -11
- package/dist/node_modules/@allyhub/model/dist/export.d.ts +0 -12
- package/dist/node_modules/@allyhub/model/dist/mesh-queries.d.ts +0 -34
- package/dist/node_modules/@allyhub/model/dist/names.d.ts +0 -9
- package/dist/node_modules/@allyhub/model/dist/png.d.ts +0 -12
- package/dist/node_modules/@allyhub/model/dist/polygon-triangulation.d.ts +0 -4
- package/dist/node_modules/@allyhub/model/dist/program-location.d.ts +0 -7
- package/dist/node_modules/@allyhub/model/dist/report.d.ts +0 -70
- package/dist/node_modules/@allyhub/piece/dist/page/console.d.ts +0 -21
- package/dist/node_modules/@allyhub/piece/dist/page/index.d.ts +0 -4
- package/dist/node_modules/@allyhub/piece/dist/page/locate.d.ts +0 -17
- package/dist/node_modules/@allyhub/piece/dist/page/runtimes.d.ts +0 -9
- package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +0 -661
- package/dist/node_modules/@allyhub/protocol/dist/account.js +0 -2
- package/dist/node_modules/@allyhub/protocol/dist/app.d.ts +0 -30
- package/dist/node_modules/@allyhub/protocol/dist/auth.d.ts +0 -200
- package/dist/node_modules/@allyhub/protocol/dist/blobs.d.ts +0 -44
- package/dist/node_modules/@allyhub/protocol/dist/cli.d.ts +0 -68
- package/dist/node_modules/@allyhub/protocol/dist/cloud-computer.d.ts +0 -77
- package/dist/node_modules/@allyhub/protocol/dist/cloud-computer.js +0 -2
- package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +0 -577
- package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +0 -674
- package/dist/node_modules/@allyhub/protocol/dist/errors.d.ts +0 -7
- package/dist/node_modules/@allyhub/protocol/dist/events.d.ts +0 -803
- package/dist/node_modules/@allyhub/protocol/dist/files.d.ts +0 -103
- package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +0 -247
- package/dist/node_modules/@allyhub/protocol/dist/image.d.ts +0 -8
- package/dist/node_modules/@allyhub/protocol/dist/index.d.ts +0 -38
- package/dist/node_modules/@allyhub/protocol/dist/jobs.d.ts +0 -91
- package/dist/node_modules/@allyhub/protocol/dist/jsonrpc.d.ts +0 -83
- package/dist/node_modules/@allyhub/protocol/dist/kinds.d.ts +0 -143
- package/dist/node_modules/@allyhub/protocol/dist/mail.d.ts +0 -274
- package/dist/node_modules/@allyhub/protocol/dist/notes.d.ts +0 -211
- package/dist/node_modules/@allyhub/protocol/dist/open.d.ts +0 -13
- package/dist/node_modules/@allyhub/protocol/dist/paywall.d.ts +0 -134
- package/dist/node_modules/@allyhub/protocol/dist/peer.d.ts +0 -59
- package/dist/node_modules/@allyhub/protocol/dist/peer.js +0 -2
- package/dist/node_modules/@allyhub/protocol/dist/place.d.ts +0 -21
- package/dist/node_modules/@allyhub/protocol/dist/presence.d.ts +0 -125
- package/dist/node_modules/@allyhub/protocol/dist/purposes.d.ts +0 -47
- package/dist/node_modules/@allyhub/protocol/dist/registry.d.ts +0 -191
- package/dist/node_modules/@allyhub/protocol/dist/routes.d.ts +0 -14
- package/dist/node_modules/@allyhub/protocol/dist/routes.js +0 -2
- package/dist/node_modules/@allyhub/protocol/dist/runtimes.d.ts +0 -96
- package/dist/node_modules/@allyhub/protocol/dist/shape.d.ts +0 -35
- package/dist/node_modules/@allyhub/protocol/dist/shape.js +0 -2
- package/dist/node_modules/@allyhub/protocol/dist/shares.d.ts +0 -156
- package/dist/node_modules/@allyhub/protocol/dist/shares.js +0 -2
- package/dist/node_modules/@allyhub/protocol/dist/sidebar-deletion.d.ts +0 -34
- package/dist/node_modules/@allyhub/protocol/dist/sidebar-deletion.js +0 -2
- package/dist/node_modules/@allyhub/protocol/dist/sites.d.ts +0 -298
- package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +0 -496
- package/dist/node_modules/@allyhub/protocol/dist/sources.d.ts +0 -14
- package/dist/node_modules/@allyhub/protocol/dist/studio-server.d.ts +0 -264
- package/dist/node_modules/@allyhub/protocol/dist/studio-server.js +0 -2
- package/dist/node_modules/@allyhub/protocol/dist/studio-tool-calls.d.ts +0 -18
- package/dist/node_modules/@allyhub/protocol/dist/studio-tool-calls.js +0 -2
- package/dist/node_modules/@allyhub/protocol/dist/studio-window-requests.d.ts +0 -97
- package/dist/node_modules/@allyhub/protocol/dist/studio-window-requests.js +0 -2
- package/dist/node_modules/@allyhub/protocol/dist/teams.d.ts +0 -203
- package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +0 -578
- package/dist/node_modules/@allyhub/protocol/dist/turns.d.ts +0 -71
- package/dist/node_modules/@allyhub/protocol/dist/turns.js +0 -2
- package/dist/node_modules/@allyhub/runtimes/dist/bundled.d.ts +0 -10
- package/dist/node_modules/@allyhub/runtimes/dist/declared.d.ts +0 -14
- package/dist/node_modules/@allyhub/runtimes/dist/download.d.ts +0 -38
- package/dist/node_modules/@allyhub/runtimes/dist/errors.d.ts +0 -20
- package/dist/node_modules/@allyhub/runtimes/dist/ffmpeg.d.ts +0 -15
- package/dist/node_modules/@allyhub/runtimes/dist/home.d.ts +0 -2
- package/dist/node_modules/@allyhub/runtimes/dist/index.d.ts +0 -12
- package/dist/node_modules/@allyhub/runtimes/dist/lock.d.ts +0 -14
- package/dist/node_modules/@allyhub/runtimes/dist/manifest.d.ts +0 -3
- package/dist/node_modules/@allyhub/runtimes/dist/node-program.d.ts +0 -12
- package/dist/node_modules/@allyhub/runtimes/dist/packages.d.ts +0 -101
- package/dist/node_modules/@allyhub/runtimes/dist/runtimes.d.ts +0 -73
- package/dist/node_modules/@allyhub/runtimes/dist/unpack.d.ts +0 -14
- package/dist/node_modules/@allyhub/scenery-host/dist/allyhub.d.ts +0 -20
- package/dist/node_modules/@allyhub/scenery-host/dist/bake/digest.d.ts +0 -14
- package/dist/node_modules/@allyhub/scenery-host/dist/bake/envmap.d.ts +0 -21
- package/dist/node_modules/@allyhub/scenery-host/dist/bake/run.d.ts +0 -63
- package/dist/node_modules/@allyhub/scenery-host/dist/budget.d.ts +0 -40
- package/dist/node_modules/@allyhub/scenery-host/dist/bundle.d.ts +0 -92
- package/dist/node_modules/@allyhub/scenery-host/dist/commands.d.ts +0 -54
- package/dist/node_modules/@allyhub/scenery-host/dist/draw2d.d.ts +0 -47
- package/dist/node_modules/@allyhub/scenery-host/dist/glass.d.ts +0 -39
- package/dist/node_modules/@allyhub/scenery-host/dist/index.d.ts +0 -25
- package/dist/node_modules/@allyhub/scenery-host/dist/inventory.d.ts +0 -18
- package/dist/node_modules/@allyhub/scenery-host/dist/layer/fidelity.d.ts +0 -70
- package/dist/node_modules/@allyhub/scenery-host/dist/layer/grade.d.ts +0 -7
- package/dist/node_modules/@allyhub/scenery-host/dist/layer/moire.d.ts +0 -6
- package/dist/node_modules/@allyhub/scenery-host/dist/measure/contacts.d.ts +0 -45
- package/dist/node_modules/@allyhub/scenery-host/dist/measure/health.d.ts +0 -10
- package/dist/node_modules/@allyhub/scenery-host/dist/measure/index.d.ts +0 -110
- package/dist/node_modules/@allyhub/scenery-host/dist/measure/relations.d.ts +0 -17
- package/dist/node_modules/@allyhub/scenery-host/dist/measure/solid.d.ts +0 -32
- package/dist/node_modules/@allyhub/scenery-host/dist/measure/support.d.ts +0 -11
- package/dist/node_modules/@allyhub/scenery-host/dist/model-stage.d.ts +0 -32
- package/dist/node_modules/@allyhub/scenery-host/dist/queries/inventory.d.ts +0 -5
- package/dist/node_modules/@allyhub/scenery-host/dist/queries/map.d.ts +0 -5
- package/dist/node_modules/@allyhub/scenery-host/dist/queries/view.d.ts +0 -10
- package/dist/node_modules/@allyhub/scenery-host/dist/scene.d.ts +0 -35
- package/dist/node_modules/@allyhub/scenery-host/dist/screen-dom.d.ts +0 -24
- package/dist/node_modules/@allyhub/scenery-host/dist/stage/bakes.d.ts +0 -42
- package/dist/node_modules/@allyhub/scenery-host/dist/stage/index.d.ts +0 -6
- package/dist/node_modules/@allyhub/scenery-host/dist/stage/page.d.ts +0 -70
- package/dist/node_modules/@allyhub/scenery-host/dist/stage/solve.d.ts +0 -49
- package/dist/node_modules/@allyhub/scenery-host/dist/stage/version.d.ts +0 -73
- package/dist/node_modules/@allyhub/scenery-host/dist/stage/view.d.ts +0 -18
- package/dist/node_modules/@allyhub/scenery-host/dist/steady.d.ts +0 -4
- package/dist/node_modules/@allyhub/scenery-host/dist/viewer.d.ts +0 -134
- package/editor-web/assets/article-BHTjq0_Y.js +0 -3
- package/editor-web/assets/channel-DCDCx5Es.js +0 -1
- package/editor-web/assets/deck-tTzKONci.js +0 -1
- package/editor-web/assets/dist-BEpzsYn_.js +0 -6
- package/editor-web/assets/dist-BUD4ywMB.js +0 -18
- package/editor-web/assets/dist-CbZAznNW.js +0 -19
- package/editor-web/assets/dist-DDzjbKIg.js +0 -4
- package/editor-web/assets/dist-DaEbElXI.js +0 -3
- package/editor-web/assets/dist-JLyDtl9X.js +0 -1
- package/editor-web/assets/dist-ZZlQa66J.js +0 -1
- package/editor-web/assets/dist-d4dayaWE.js +0 -17
- package/editor-web/assets/flowDiagram-IUGLLWBU-BUnRtJ8q.js +0 -1
- package/editor-web/assets/index-BedbINE5.css +0 -2
- package/editor-web/assets/index-DG2nHq4D.js +0 -28
- package/editor-web/assets/schemas-moE_A7Nj.js +0 -1
- package/editor-web/assets/slides-oQ_C0SVJ.js +0 -1
- package/editor-web/assets/snapshots-BPJKywuN.js +0 -1
- package/editor-web/assets/swimlanesDiagram-AYQRV4AK-C3Car2M0.js +0 -8
- package/editor-web/assets/tabs-CiF1N-pL.js +0 -1
- package/editor-web/assets/workbook-FSSUiIp9.js +0 -45
- /package/dist/node_modules/@allyhub/{protocol/dist/runtimes.js → runtimes/dist/schema.js} +0 -0
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { type Browser, type Page } from "@allyhub/browser";
|
|
2
|
-
import type { BakeReport } from "@allyhub/scenery";
|
|
3
|
-
import type { MediaInfo } from "@allyhub/piece";
|
|
4
|
-
import type { Answer, SceneryCommands } from "../commands.js";
|
|
5
|
-
import type { SceneryFailure } from "../errors.js";
|
|
6
|
-
/** How long a bake may take: as long as its samples, bounces and density ask, up to half a day. */
|
|
7
|
-
export declare const BAKE_TIMEOUT_MS: number;
|
|
8
|
-
/** Methods of a scenery's commands a host calls by name. */
|
|
9
|
-
type Command = Exclude<keyof SceneryCommands, "page">;
|
|
10
|
-
export interface SceneryStageOptions {
|
|
11
|
-
browser: Browser;
|
|
12
|
-
root: string;
|
|
13
|
-
/** The scenery module, a project path (room/scenery.ts). */
|
|
14
|
-
file: string;
|
|
15
|
-
/** The build folder this bundle goes into. */
|
|
16
|
-
buildDir: string;
|
|
17
|
-
/** The project's media the scenery may load, by path. */
|
|
18
|
-
media: Readonly<Record<string, MediaInfo>>;
|
|
19
|
-
/** The project's declared packages. */
|
|
20
|
-
dependencies: ReadonlySet<string>;
|
|
21
|
-
/** The page's size, which commands that draw take theirs from. */
|
|
22
|
-
width?: number;
|
|
23
|
-
height?: number;
|
|
24
|
-
/** Leave the scenery unbaked even when there is a bake for it (to bake it). */
|
|
25
|
-
unbaked?: boolean;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* What a scenery's page failed at: its kind, the rule it is said under,
|
|
29
|
-
* and, when a move or the scenery's update asked the time of a reference
|
|
30
|
-
* that has none, that reference (give it a time).
|
|
31
|
-
*/
|
|
32
|
-
export declare class SceneryCallError extends Error {
|
|
33
|
-
readonly kind: SceneryFailure;
|
|
34
|
-
readonly rule: string;
|
|
35
|
-
readonly needsTime: string | undefined;
|
|
36
|
-
constructor(kind: SceneryFailure, message: string, needsTime?: string);
|
|
37
|
-
}
|
|
38
|
-
export declare class SceneryStage {
|
|
39
|
-
readonly page: Page;
|
|
40
|
-
private readonly server;
|
|
41
|
-
private constructor();
|
|
42
|
-
static open(options: SceneryStageOptions): Promise<SceneryStage>;
|
|
43
|
-
/** Calls one of the scenery's commands, with JSON arguments. */
|
|
44
|
-
call<M extends Command>(method: M, ...args: Parameters<SceneryCommands[M]>): Promise<Awaited<ReturnType<SceneryCommands[M]>>>;
|
|
45
|
-
private callWithin;
|
|
46
|
-
/** A command's value, or a SceneryCallError with what failed. */
|
|
47
|
-
value<T>(answer: Answer<T> | Promise<Answer<T>>): Promise<T>;
|
|
48
|
-
/**
|
|
49
|
-
* Bakes the scenery's light on this page's renderer: the report and the
|
|
50
|
-
* bake file's bytes (keepBake writes them). The stage must be opened
|
|
51
|
-
* unbaked.
|
|
52
|
-
*/
|
|
53
|
-
bake(): Promise<{
|
|
54
|
-
report: BakeReport;
|
|
55
|
-
bytes: Uint8Array;
|
|
56
|
-
}>;
|
|
57
|
-
/**
|
|
58
|
-
* A project's scenery item on a page of its own: its files' media and
|
|
59
|
-
* its declared packages read from the project, its bundle in the
|
|
60
|
-
* project's build folder.
|
|
61
|
-
*/
|
|
62
|
-
static ofProject(options: Omit<SceneryStageOptions, "buildDir" | "media" | "dependencies"> & {
|
|
63
|
-
buildDir?: string;
|
|
64
|
-
}): Promise<SceneryStage>;
|
|
65
|
-
close(): Promise<void>;
|
|
66
|
-
}
|
|
67
|
-
/** Where a scenery's bundle goes in a project's build folder. */
|
|
68
|
-
export declare const sceneryBuildDir: (root: string) => string;
|
|
69
|
-
export {};
|
|
70
|
-
//# sourceMappingURL=page.d.ts.map
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { type Browser } from "@allyhub/browser";
|
|
2
|
-
import { type CameraState, type LensFrame, type SolveParam, type SolveResult } from "@allyhub/scenery";
|
|
3
|
-
import type { SceneryStage } from "./page.js";
|
|
4
|
-
/** A point of the scenery as a correspondence names it: metres, an object's box centre, or a place on a screen's face (shares of its content from its top left). */
|
|
5
|
-
export type SolveRef = readonly [number, number, number] | {
|
|
6
|
-
object: string;
|
|
7
|
-
} | {
|
|
8
|
-
screen: string;
|
|
9
|
-
uv: readonly [number, number];
|
|
10
|
-
};
|
|
11
|
-
export interface Correspondences {
|
|
12
|
-
points?: readonly {
|
|
13
|
-
name?: string | undefined;
|
|
14
|
-
where: SolveRef;
|
|
15
|
-
px: readonly [number, number];
|
|
16
|
-
weight?: number | undefined;
|
|
17
|
-
}[];
|
|
18
|
-
lines?: readonly {
|
|
19
|
-
name?: string | undefined;
|
|
20
|
-
from: SolveRef;
|
|
21
|
-
to: SolveRef;
|
|
22
|
-
px: readonly [number, number];
|
|
23
|
-
weight?: number | undefined;
|
|
24
|
-
}[];
|
|
25
|
-
}
|
|
26
|
-
export interface SceneryCameraSolve {
|
|
27
|
-
/** The picture's size, px: the frame the pixels were measured on. */
|
|
28
|
-
frame: readonly [number, number];
|
|
29
|
-
/** Scenery time the scenery is posed at for named points, s. */
|
|
30
|
-
t: number;
|
|
31
|
-
times?: Readonly<Record<string, number>>;
|
|
32
|
-
lens?: number;
|
|
33
|
-
lensFrame?: LensFrame;
|
|
34
|
-
free?: readonly SolveParam[];
|
|
35
|
-
/** A camera to start from (one of the scenery's, as its info gives it). */
|
|
36
|
-
from?: CameraState;
|
|
37
|
-
}
|
|
38
|
-
/** Solves the camera of a picture from correspondences with a scenery on its page. */
|
|
39
|
-
export declare function solveSceneryCamera(stage: SceneryStage, c: Correspondences, o: SceneryCameraSolve): Promise<SolveResult>;
|
|
40
|
-
/**
|
|
41
|
-
* The scenery drawn from a solved camera, the measured pixels as yellow
|
|
42
|
-
* rings and where the camera puts them as red dots joined to them: a WebP.
|
|
43
|
-
*/
|
|
44
|
-
export declare function solvedPicture(stage: SceneryStage, browser: Browser, camera: CameraState, r: SolveResult, o: {
|
|
45
|
-
frame: readonly [number, number];
|
|
46
|
-
t: number;
|
|
47
|
-
times?: Readonly<Record<string, number>>;
|
|
48
|
-
}): Promise<Buffer>;
|
|
49
|
-
//# sourceMappingURL=solve.d.ts.map
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import type { Fact } from "@allyhub/diagnostics";
|
|
2
|
-
import { type Img } from "@allyhub/measure";
|
|
3
|
-
import type { VersionPage } from "@allyhub/build";
|
|
4
|
-
import { type SceneryFact, type SceneryFactData } from "../fact.js";
|
|
5
|
-
import { type FidelityOptions } from "../fidelity.js";
|
|
6
|
-
import { type BakeIndex } from "./bakes.js";
|
|
7
|
-
/** A version page on a clock of parts, each with its still (a video's). */
|
|
8
|
-
export type FilmClockPage = VersionPage & {
|
|
9
|
-
readonly timeline: {
|
|
10
|
-
readonly fps: number;
|
|
11
|
-
readonly parts: readonly {
|
|
12
|
-
readonly still: number;
|
|
13
|
-
}[];
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
type Data = SceneryFactData["scenery-screen-fidelity"];
|
|
17
|
-
/**
|
|
18
|
-
* Compares the flat capture with the texture's level: the numbers of the
|
|
19
|
-
* fact, regions in content px with the listed elements that meet them, and
|
|
20
|
-
* the two side by side with where they differ (the element drawn flat,
|
|
21
|
-
* the texture, the difference over the element).
|
|
22
|
-
*/
|
|
23
|
-
export declare function fidelityOf(flat: Img, level: Img, size: readonly [number, number], elements: NonNullable<Data["elements"]>, o: FidelityOptions): {
|
|
24
|
-
data: Pick<Data, "deltaE" | "channels" | "share" | "regions">;
|
|
25
|
-
side: Img;
|
|
26
|
-
};
|
|
27
|
-
/** Where a comparison is made and what else it gives. */
|
|
28
|
-
export interface FidelityRun {
|
|
29
|
-
/**
|
|
30
|
-
* Film seconds to compare at: every one inside a scenery layer's window.
|
|
31
|
-
* Default: each layer once, at its part's still, else its middle.
|
|
32
|
-
*/
|
|
33
|
-
at?: readonly number[];
|
|
34
|
-
/**
|
|
35
|
-
* Gets each comparison's picture (the element flat, the texture, where
|
|
36
|
-
* they differ) with its fact; says where it put it.
|
|
37
|
-
*/
|
|
38
|
-
sheet?: (picture: Img, f: SceneryFact) => Promise<string>;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Each screen drawn in the scenery of the page's scenery layers, compared
|
|
42
|
-
* with its own element at one moment of its layer, as facts. A screen that
|
|
43
|
-
* cannot be compared (a browser without HTML-in-Canvas draws it over the
|
|
44
|
-
* scenery; its picture never copied) has its fact with why.
|
|
45
|
-
*/
|
|
46
|
-
export declare function screenFidelity(page: FilmClockPage, options?: Partial<FidelityOptions>, run?: FidelityRun): Promise<{
|
|
47
|
-
facts: SceneryFact[];
|
|
48
|
-
sheets: string[];
|
|
49
|
-
}>;
|
|
50
|
-
type BakeData = SceneryFactData["scenery-bake"];
|
|
51
|
-
/**
|
|
52
|
-
* A scenery layer's bake as the page found it, with what the project's bake
|
|
53
|
-
* index says: baked before for another scene (out of date) or never, and the
|
|
54
|
-
* command that makes it. Undefined for a scenery that neither says how to
|
|
55
|
-
* bake it, nor has a bake laid, nor was ever baked: nothing to say.
|
|
56
|
-
*/
|
|
57
|
-
export declare function bakeFact(data: BakeData, index: BakeIndex): BakeData | undefined;
|
|
58
|
-
/**
|
|
59
|
-
* The facts with each scenery-bake fact as the project's bake index says it
|
|
60
|
-
* now: what the page measured is kept with the check's results, and the
|
|
61
|
-
* index changes without the version changing (a bake of another scene).
|
|
62
|
-
*/
|
|
63
|
-
export declare function withBakes(facts: readonly Fact[], root: string): Promise<Fact[]>;
|
|
64
|
-
/** What the page's scenery layers measure: their facts, with this version's place. */
|
|
65
|
-
export declare function sceneryLayerFacts(page: Pick<VersionPage, "ask" | "target">): Promise<Fact[]>;
|
|
66
|
-
/** The page's scenery layers' camera cuts, on the film's clock. */
|
|
67
|
-
export declare function sceneryCuts(page: Pick<FilmClockPage, "ask" | "timeline">): Promise<{
|
|
68
|
-
layer: string;
|
|
69
|
-
part?: string;
|
|
70
|
-
t: number;
|
|
71
|
-
}[]>;
|
|
72
|
-
export {};
|
|
73
|
-
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { type SceneryBundle } from "../bundle.js";
|
|
2
|
-
/** A scenery bundled for its viewer, with the media its bundle may load. */
|
|
3
|
-
export interface SceneryBuilt {
|
|
4
|
-
bundle: SceneryBundle;
|
|
5
|
-
/** The project's media files, by project path. */
|
|
6
|
-
media: string[];
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* The scenery module `file` (a project path) bundled for its viewer into
|
|
10
|
-
* `outDir`; or, given `entry`, the module it writes for the file (a 3D
|
|
11
|
-
* model shown alone, in a scenery written for it).
|
|
12
|
-
*/
|
|
13
|
-
export declare function viewerBundle(o: {
|
|
14
|
-
root: string;
|
|
15
|
-
file: string;
|
|
16
|
-
outDir: string;
|
|
17
|
-
}, entry?: () => Promise<string>): Promise<SceneryBuilt>;
|
|
18
|
-
//# sourceMappingURL=view.d.ts.map
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { type CameraState, type Scenery } from "@allyhub/scenery";
|
|
2
|
-
import type { SceneryAdapter } from "./adapter.js";
|
|
3
|
-
import type { Vec3 } from "./vec.js";
|
|
4
|
-
/** How the viewer's camera answers the hand; every value can change. */
|
|
5
|
-
export declare const VIEWER_DEFAULTS: {
|
|
6
|
-
/** Degrees turned for each pixel dragged. */
|
|
7
|
-
orbitSpeed: number;
|
|
8
|
-
/** The camera's height above the horizon, degrees, at most. */
|
|
9
|
-
maxElevation: number;
|
|
10
|
-
/** How far one wheel notch (100 px of delta) moves in or out, a share of the distance. */
|
|
11
|
-
dollyPerNotch: number;
|
|
12
|
-
/** The nearest and farthest the camera comes to its point, m. */
|
|
13
|
-
minDistance: number;
|
|
14
|
-
maxDistance: number;
|
|
15
|
-
/** The lens, 35 mm-equivalent mm. */
|
|
16
|
-
lens: number;
|
|
17
|
-
/** How long a move to a framing takes, ms. */
|
|
18
|
-
flyMs: number;
|
|
19
|
-
/** How long the wheel rests before the camera it moved is told, ms. */
|
|
20
|
-
wheelRestMs: number;
|
|
21
|
-
/** How far toward the frame's edges a framed object reaches, 0–1 (fitCamera's fill). */
|
|
22
|
-
fill: number;
|
|
23
|
-
/** A press that moves less than this, px, is a click. */
|
|
24
|
-
clickSlop: number;
|
|
25
|
-
/** Draw the hover and selection outlines itself (a page that embeds it may draw its own from "place"). */
|
|
26
|
-
marks: boolean;
|
|
27
|
-
/** The outlines' colour. */
|
|
28
|
-
markColor: string;
|
|
29
|
-
};
|
|
30
|
-
export type ViewerOptions = typeof VIEWER_DEFAULTS;
|
|
31
|
-
/** An object as the person points at it: its path of names from the scene down. */
|
|
32
|
-
export interface PickedObject {
|
|
33
|
-
/** The named objects from the outermost down to the one picked. */
|
|
34
|
-
path: string[];
|
|
35
|
-
/** The one picked: the last of path. */
|
|
36
|
-
name: string;
|
|
37
|
-
/** Its box's size along the world axes, m. */
|
|
38
|
-
size: [number, number, number];
|
|
39
|
-
/** Where the pointer met it, world space, m. */
|
|
40
|
-
point: [number, number, number];
|
|
41
|
-
/**
|
|
42
|
-
* Its box as the camera sees it: the outline round its eight corners, in
|
|
43
|
-
* px of the viewer (its edge for a person who picks it; its silhouette is
|
|
44
|
-
* later). None where a corner is behind the camera.
|
|
45
|
-
*/
|
|
46
|
-
screen?: [number, number][];
|
|
47
|
-
}
|
|
48
|
-
/** What the viewer tells the page that embeds it. */
|
|
49
|
-
export type ViewerEvent = {
|
|
50
|
-
type: "ready";
|
|
51
|
-
cameras: string[];
|
|
52
|
-
ms: number;
|
|
53
|
-
} | {
|
|
54
|
-
type: "hover";
|
|
55
|
-
object: PickedObject | null;
|
|
56
|
-
} | {
|
|
57
|
-
type: "select";
|
|
58
|
-
object: PickedObject | null;
|
|
59
|
-
}
|
|
60
|
-
/** The camera after the hand moved it; `framed`: Back has somewhere to go. */
|
|
61
|
-
| {
|
|
62
|
-
type: "camera";
|
|
63
|
-
camera: CameraState;
|
|
64
|
-
framed: boolean;
|
|
65
|
-
}
|
|
66
|
-
/** Where the selection is on the picture after a draw, px from its top left (null: not on it). */
|
|
67
|
-
| {
|
|
68
|
-
type: "place";
|
|
69
|
-
hover: Box2D | null;
|
|
70
|
-
select: Box2D | null;
|
|
71
|
-
}
|
|
72
|
-
/** The picture as drawn now, a WebP data URL to look at (asked with "shot"). */
|
|
73
|
-
| {
|
|
74
|
-
type: "shot";
|
|
75
|
-
picture: string;
|
|
76
|
-
}
|
|
77
|
-
/** What is at a place of the picture (asked with "pick"). */
|
|
78
|
-
| {
|
|
79
|
-
type: "picked";
|
|
80
|
-
id: string;
|
|
81
|
-
object: PickedObject | null;
|
|
82
|
-
} | {
|
|
83
|
-
type: "drawn";
|
|
84
|
-
ms: number;
|
|
85
|
-
};
|
|
86
|
-
/** A box on the picture, CSS px from its top left. */
|
|
87
|
-
export interface Box2D {
|
|
88
|
-
x: number;
|
|
89
|
-
y: number;
|
|
90
|
-
width: number;
|
|
91
|
-
height: number;
|
|
92
|
-
}
|
|
93
|
-
/** What the embedding page can ask of it. */
|
|
94
|
-
export type ViewerCommand = {
|
|
95
|
-
type: "camera";
|
|
96
|
-
name: string;
|
|
97
|
-
}
|
|
98
|
-
/** Flies to a view the viewer told before (a note's), Back to where it was. */
|
|
99
|
-
| {
|
|
100
|
-
type: "view";
|
|
101
|
-
position: readonly [number, number, number];
|
|
102
|
-
target: readonly [number, number, number];
|
|
103
|
-
}
|
|
104
|
-
/** A wheel the page had where the viewer did not (a page's note mode takes the pointer from its frames). */
|
|
105
|
-
| {
|
|
106
|
-
type: "wheel";
|
|
107
|
-
deltaY: number;
|
|
108
|
-
ctrlKey: boolean;
|
|
109
|
-
} | {
|
|
110
|
-
type: "frame";
|
|
111
|
-
path: string[];
|
|
112
|
-
} | {
|
|
113
|
-
type: "shot";
|
|
114
|
-
} | {
|
|
115
|
-
type: "pick";
|
|
116
|
-
id: string;
|
|
117
|
-
x: number;
|
|
118
|
-
y: number;
|
|
119
|
-
} | {
|
|
120
|
-
type: "back";
|
|
121
|
-
} | {
|
|
122
|
-
type: "select";
|
|
123
|
-
path: string[] | null;
|
|
124
|
-
};
|
|
125
|
-
/** Starts a viewer of a scenery in an element: the scenery built, then drawn. */
|
|
126
|
-
export declare function startViewer(scenery: Scenery, adapter: SceneryAdapter, el: HTMLElement, given?: Partial<ViewerOptions>, tell?: (e: ViewerEvent) => void,
|
|
127
|
-
/** Where the camera starts: the person's last view, kept across a reload. */
|
|
128
|
-
start?: {
|
|
129
|
-
position: Vec3;
|
|
130
|
-
target: Vec3;
|
|
131
|
-
}): Promise<{
|
|
132
|
-
command(c: ViewerCommand): void;
|
|
133
|
-
}>;
|
|
134
|
-
//# sourceMappingURL=viewer.d.ts.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-COiEfhsA.js";import{a as t,d as n,o as r,p as i,s as a,y as o}from"./react-Edyoga_4.js";import{Et as s,ht as c,kt as l,n as u,t as d}from"./x-DlhyIKuu.js";import{t as f}from"./session-s1I85rox.js";import{t as p}from"./jsx-runtime-DePvh3-m.js";import{A as m,C as h,f as g,m as _,u as v}from"./bar-button-J9vbfzTx.js";import{S as y,T as ee,i as te,x as b,y as x}from"./dist-BEpzsYn_.js";import{n as S,t as ne}from"./italic-zw4_eUNF.js";import{t as C}from"./code-CD-CbJG9.js";import{a as re,c as w,i as ie,l as T,n as ae,o as E,s as oe,t as se}from"./split-7CVjIkSU.js";import{t as D}from"./link-DopSU3aa.js";import{D as ce,O}from"./dist-Bd8IxQPP.js";import{t as k}from"./minus-CbPnUIOy.js";import{O as A,T as j,n as M,nt as N,o as P,s as le,t as ue,ut as F}from"./dist-D3C6FyrO.js";import{n as de,t as I}from"./undo-2-C47jrRp5.js";import{t as fe}from"./sigma-DSUsJhMn.js";import{t as L}from"./strikethrough-BwXWi4zg.js";import{t as pe}from"./table-DRbddzx0.js";import{_ as me,o as R}from"./index-DG2nHq4D.js";import{t as he}from"./collaborator-BU4qU7O3.js";import{t as ge}from"./row-C_svyL8o.js";import{c as _e,n as ve,s as ye,t as be}from"./dist-YW8hS4IM.js";import{i as xe,n as Se,r as Ce,t as we}from"./dist-DruvDNQe.js";import{S as Te,_ as Ee,a as De,c as Oe,g as z,h as ke,i as Ae,m as je,o as Me,r as Ne,s as Pe,t as B,u as V,v as Fe,x as Ie}from"./words-0Ww2RyT4.js";var H=e(o(),1),U=p(),Le=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function Re(e,t){if(e.title!==t.title||!Le(e.cover,t.cover))return{head:!0};for(let n=0;n<t.blocks.length;n++)if(!Le(e.blocks[n],t.blocks[n]))return{block:n};if(e.blocks.length>t.blocks.length&&t.blocks.length>0)return{block:t.blocks.length-1}}function ze(e,t){let n=z(e),r=e=>e.from<=t.to&&t.from<=e.to;if(n.head&&r(n.head))return{head:!0};let i=n.lines.findIndex(r);return i<0?void 0:{block:i}}function Be(e,t){if(e.from!==void 0&&e.path===t.path)return ze(t.text,{from:e.from,to:e.to??e.from})}var W=new _e(`xArticleAgent`),Ve=j.create({name:`xArticleAgent`,addProseMirrorPlugins(){return[new ye({key:W,state:{init:()=>null,apply:(e,t)=>{let n=e.getMeta(W);return n===void 0?t:n}},props:{decorations(e){let t=W.getState(e);if(!t)return null;let n;return e.doc.forEach((e,r,i)=>{i===t.block&&(n=be.node(r,r+e.nodeSize,{class:`ak-x-agent`,"data-agent":t.label,"data-testid":`x-agent-block`}))}),n?ve.create(e.doc,[n]):null}}})]}});function He(e,t){e.isDestroyed||e.view.dispatch(e.state.tr.setMeta(W,t))}var G={image:`xImage`,post:`xPost`,link:`xLink`,latex:`xLatex`,markdown:`xMarkdown`};function Ue(e){let t=[];return e.bold===!0&&t.push({type:`bold`}),e.italic===!0&&t.push({type:`italic`}),e.strike===!0&&t.push({type:`strike`}),e.link!==void 0&&t.push({type:`link`,attrs:{href:e.link}}),{type:`text`,text:e.text,...t.length>0?{marks:t}:{}}}var K=e=>({type:`paragraph`,...e.length>0?{content:e.filter(e=>e.text!==``).map(Ue)}:{}});function q(e){let t=e.map(e=>{switch(e.type){case`paragraph`:return K(e.runs);case`h1`:case`h2`:return{type:`heading`,attrs:{level:e.type===`h1`?1:2},...e.runs.length>0?{content:e.runs.map(Ue)}:{}};case`quote`:return{type:`blockquote`,content:[K(e.runs)]};case`ul`:case`ol`:return{type:e.type===`ul`?`bulletList`:`orderedList`,content:e.items.map(e=>({type:`listItem`,content:[K(e)]}))};case`image`:return{type:G.image,attrs:{file:e.file,alt:e.alt??``,caption:e.caption??``}};case`post`:return{type:G.post,attrs:{url:e.url,id:e.id}};case`link`:return{type:G.link,attrs:{url:e.url}};case`divider`:return{type:`horizontalRule`};case`latex`:return{type:G.latex,attrs:{tex:e.tex}};case`markdown`:return{type:G.markdown,attrs:{markdown:e.markdown}}}});return{type:`doc`,content:t.length>0?t:[{type:`paragraph`}]}}function We(e){let t=e.marks??[],n=e=>t.some(t=>t.type===e),r=t.find(e=>e.type===`link`)?.attrs?.href;return{text:e.text??``,...n(`bold`)?{bold:!0}:{},...n(`italic`)?{italic:!0}:{},...n(`strike`)?{strike:!0}:{},...r===void 0?{}:{link:r}}}var J=e=>(e?.content??[]).map(e=>e.type===`hardBreak`?{text:` `}:We(e)),Y=(e,t)=>{let n=e.attrs?.[t];return typeof n==`string`?n:``};function X(e){let t=[];for(let n of e.content??[])switch(n.type){case`paragraph`:t.push({type:`paragraph`,runs:J(n)});break;case`heading`:{let e=Number(n.attrs?.level??1);t.push({type:e<=1?`h1`:`h2`,runs:J(n)});break}case`blockquote`:for(let e of n.content??[])t.push({type:`quote`,runs:J(e)});break;case`bulletList`:case`orderedList`:t.push({type:n.type===`bulletList`?`ul`:`ol`,items:(n.content??[]).map(e=>(e.content??[]).flatMap(e=>J(e)))});break;case`horizontalRule`:t.push({type:`divider`});break;case G.image:{let e=Y(n,`alt`),r=Y(n,`caption`);t.push({type:`image`,file:Y(n,`file`),...e===``?{}:{alt:e},...r===``?{}:{caption:r}});break}case G.post:t.push({type:`post`,url:Y(n,`url`),id:Y(n,`id`)});break;case G.link:t.push({type:`link`,url:Y(n,`url`)});break;case G.latex:t.push({type:`latex`,tex:Y(n,`tex`)});break;case G.markdown:t.push({type:`markdown`,markdown:Y(n,`markdown`)})}let n=t[0];return t.length===1&&n?.type===`paragraph`&&n.runs.every(e=>e.text===``)?[]:t}var Ge=new _e(`x-found`);function Ke(e){let t=[];return e.descendants((e,n)=>{if(!e.isTextblock)return!0;let r=e.textContent;for(let e of Ie(r))t.push(be.inline(n+1+e.start,n+1+e.end,{class:`ak-x-link`}));return!1}),ve.create(e,t)}var qe=j.create({name:`xFound`,addProseMirrorPlugins(){return[new ye({key:Ge,state:{init:(e,t)=>Ke(t.doc),apply:(e,t)=>e.docChanged?Ke(e.doc):t},props:{decorations:e=>Ge.getState(e)}})]}}),Je=(0,H.createContext)(()=>void 0),Z=e=>typeof e==`string`?e:``;function Ye({node:e,updateAttributes:t}){let n=B(),r=(0,H.useContext)(Je),i=Z(e.attrs.file),a=r(i),o=Fe(i.split(`#`)[0]?.split(`.`).pop()??``);return(0,U.jsxs)(M,{as:`figure`,"data-x":`image`,className:`relative`,children:[(0,U.jsxs)(`div`,{className:`ak-x-a-picture`,children:[a===void 0?(0,U.jsx)(`div`,{className:`ak-x-made`,children:i}):o===`video`?(0,U.jsx)(E,{src:a,file:i,controls:!0,muted:!0,playsInline:!0,className:`w-full`}):(0,U.jsx)(`img`,{src:a,alt:Z(e.attrs.alt)}),(0,U.jsxs)(`div`,{className:`ak-x-labels`,contentEditable:!1,children:[o===`gif`?(0,U.jsx)(`span`,{className:`ak-x-label`,children:n.gif}):null,(0,U.jsx)(w,{most:Te.alt,alt:Z(e.attrs.alt),onAlt:e=>{t({alt:e})},trigger:(0,U.jsx)(u,{variant:`secondary`,size:`xs`,className:`bg-media/75 text-on-media font-bold`,"aria-label":n.altText,children:n.alt})})]})]}),(0,U.jsx)(`input`,{className:`mt-2 w-full bg-transparent text-left text-[13px] leading-4 text-[var(--ak-x-caption)] outline-none`,value:Z(e.attrs.caption),placeholder:n.caption,"aria-label":n.caption,dir:`auto`,onChange:e=>{t({caption:e.target.value})}})]})}function Xe({node:e}){return(0,U.jsx)(M,{"data-x":`link`,children:(0,U.jsx)(Pe,{url:Z(e.attrs.url)})})}function Ze({node:e}){return(0,U.jsx)(M,{className:`ak-x-a-post`,"data-x":`post`,children:ke(Z(e.attrs.url))})}function Qe(e){return function({node:t,updateAttributes:n,selected:r}){let i=B(),a=e===`tex`?i.article.equation:i.article.code,o=Z(t.attrs[e]);return!r&&o.trim()!==``?(0,U.jsx)(M,{"data-x":e,children:e===`tex`?(0,U.jsx)(Me,{tex:o}):(0,U.jsx)(Oe,{markdown:o})}):(0,U.jsx)(M,{as:`pre`,"data-latex":e===`tex`?``:void 0,children:(0,U.jsx)(`textarea`,{className:`block w-full resize-none bg-transparent font-[inherit] outline-none [field-sizing:content]`,value:o,"aria-label":a,placeholder:a,spellCheck:!1,onChange:t=>{n({[e]:t.target.value})}})})}}function Q(e,t,n){return A.create({name:e,group:`block`,atom:!0,selectable:!0,draggable:!0,addAttributes(){return Object.fromEntries(t.map(e=>[e,{default:``}]))},parseHTML(){return[{tag:`div[data-node="${e}"]`}]},renderHTML({HTMLAttributes:t}){return[`div`,N(t,{"data-node":e})]},addNodeView(){return P(n)}})}var $e=[Q(G.image,[`file`,`alt`,`caption`],Ye),Q(G.post,[`url`,`id`],Ze),Q(G.link,[`url`],Xe),Q(G.latex,[`tex`],Qe(`tex`)),Q(G.markdown,[`markdown`],Qe(`markdown`))],et=/^https?:\/\/(?:www\.)?(?:x|twitter)\.com\/[A-Za-z0-9_]+\/status\/([0-9]{1,19})/u,tt=3e4;function nt(e){let t=z(e).issues.find(e=>e.rule===`article-markup`||e.rule===`format`);if(t!==void 0)return t.line===void 0?t.message:`${String(t.line)}: ${t.message}`}var rt=class{head;listeners=new Set;body;show;session;constructor(e){this.session=e;let{article:t}=z(e.text);this.head={title:t.title,cover:t.cover,state:e.state,held:nt(e.text)},e.attach({save:e=>{let t=this.article();if(t===void 0||nt(e)!==void 0)return;let n=Ee(t);return n===Ee(z(e).article)?void 0:n},take:(e,t,n)=>{let{article:r}=z(e),i=n?.kind===`agent`?Re(z(t).article,r):void 0;this.set({title:r.title,cover:r.cover,held:nt(e),...i===void 0?{}:{landed:{spot:i,at:Date.now()}}}),this.show?.(r)}}),e.onState(e=>{this.set({state:e})})}get read(){return z(this.session.text).article}bind(e,t){this.body=e,this.show=t}article(){if(this.body!==void 0)return{title:this.head.title,...this.head.cover?{cover:this.head.cover}:{},blocks:this.body()}}get(){return this.head}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}set(e){this.head={...this.head,...e};for(let e of this.listeners)e()}edited(e={}){Object.keys(e).length>0&&this.set(e),this.session.edited()}};function $(e){return(0,U.jsx)(u,{variant:`ghost`,size:`icon-sm`,"aria-label":e.label,title:e.label,"aria-pressed":e.on,disabled:e.disabled,className:c(e.on===!0&&`bg-here`),onMouseDown:e=>{e.preventDefault()},onClick:e.onClick,children:e.children})}function it(e){let t=B(),[n,r]=(0,H.useState)(!1),[i,a]=(0,H.useState)(``),o=i.trim()===``?void 0:e.check?.(i.trim());return(0,U.jsxs)(x,{open:n,onOpenChange:e=>{r(e),e&&a(``)},children:[(0,U.jsx)(y,{asChild:!0,children:(0,U.jsx)(u,{variant:`ghost`,size:`icon-sm`,"aria-label":e.label,title:e.label,disabled:e.disabled,children:e.icon})}),(0,U.jsx)(b,{className:`w-80`,align:`start`,children:(0,U.jsxs)(`form`,{className:`flex flex-col gap-2`,onSubmit:t=>{t.preventDefault(),i.trim()!==``&&o===void 0&&(e.onAnswer(i.trim()),r(!1))},children:[(0,U.jsx)(R,{autoFocus:!0,value:i,placeholder:e.hint,"aria-label":e.hint,onChange:e=>{a(e.target.value)}}),o===void 0?null:(0,U.jsx)(`p`,{className:`text-destructive text-xs`,children:o}),(0,U.jsx)(u,{type:`submit`,size:`sm`,className:`self-end`,disabled:i.trim()===``||o!==void 0,children:t.article.add})]})})]})}function at({dir:e,entry:t,insert:n,divider:r}){let i=B().article,[a,o]=(0,H.useState)(!1),[s,l]=(0,H.useState)(`menu`),[d,f]=(0,H.useState)(``),p=()=>{o(!1)},h=(e,t,n)=>(0,U.jsx)(ge,{size:`dense`,icon:t,onClick:n,children:e}),g=(e,t,n)=>{let r=d.trim()===``?void 0:t(d.trim());return(0,U.jsxs)(`form`,{className:`flex w-80 flex-col gap-2`,onSubmit:e=>{e.preventDefault(),d.trim()!==``&&r===void 0&&(n(d.trim()),p())},children:[(0,U.jsx)(R,{autoFocus:!0,value:d,placeholder:e,"aria-label":e,onChange:e=>{f(e.target.value)}}),r===void 0?null:(0,U.jsx)(`p`,{className:`text-destructive text-xs`,children:r}),(0,U.jsx)(u,{type:`submit`,size:`sm`,className:`self-end`,disabled:d.trim()===``||r!==void 0,children:i.add})]})};return(0,U.jsxs)(x,{open:a,onOpenChange:e=>{o(e),e&&(l(`menu`),f(``))},children:[(0,U.jsx)(y,{asChild:!0,children:(0,U.jsxs)(u,{variant:`ghost`,size:`sm`,className:`gap-1 px-2`,children:[i.insert,(0,U.jsx)(m,{})]})}),(0,U.jsx)(b,{className:c(s===`menu`?`w-48 p-1`:`w-auto`),align:`start`,children:s===`menu`?(0,U.jsxs)(`div`,{role:`menu`,children:[h(i.media,(0,U.jsx)(T,{}),()=>{l(`media`)}),h(i.post,(0,U.jsx)(me,{}),()=>{l(`post`)}),h(i.linkCard,(0,U.jsx)(D,{}),()=>{l(`link`)}),h(i.divider,(0,U.jsx)(k,{}),()=>{r(),p()}),h(i.code,(0,U.jsx)(C,{}),()=>{n(G.markdown,{markdown:"```\n\n```"}),p()}),h(i.equation,(0,U.jsx)(fe,{}),()=>{n(G.latex,{tex:``}),p()}),h(i.table,(0,U.jsx)(pe,{}),()=>{n(G.markdown,{markdown:`| A | B |
|
|
2
|
-
| - | - |
|
|
3
|
-
| | |`}),p()})]}):s===`media`?(0,U.jsx)(ae,{self:t,types:Ae,testId:`x-picker`,onPick:t=>{n(G.image,{file:re(e,t),alt:``,caption:``}),p()}}):s===`post`?g(i.postHint,e=>et.test(e)?void 0:i.notPost,e=>{n(G.post,{url:e,id:et.exec(e)?.[1]??``})}):g(i.linkHint,e=>/^https?:\/\/\S+$/u.test(e)?void 0:i.notLink,e=>{n(G.link,{url:e})})})]})}function ot({editor:e}){let t=B().article,n=()=>e.chain().focus(),r=e.isActive(`heading`,{level:1})?t.heading:e.isActive(`heading`,{level:2})?t.subheading:t.paragraph;return(0,U.jsxs)(v,{children:[(0,U.jsx)(h,{asChild:!0,children:(0,U.jsxs)(u,{variant:`ghost`,size:`sm`,className:`w-32 justify-between gap-1 px-2`,onMouseDown:e=>{e.preventDefault()},children:[r,(0,U.jsx)(m,{})]})}),(0,U.jsxs)(g,{align:`start`,className:`ak-x w-48`,children:[(0,U.jsx)(_,{className:`text-[31px] leading-10 font-extrabold`,onSelect:()=>n().setHeading({level:1}).run(),children:t.heading}),(0,U.jsx)(_,{className:`text-[26px] leading-9 font-extrabold`,onSelect:()=>n().setHeading({level:2}).run(),children:t.subheading}),(0,U.jsx)(_,{className:`text-[15px] font-bold`,onSelect:()=>n().setParagraph().run(),children:t.paragraph})]})]})}function st({editor:e,dir:t,entry:n}){let r=B(),i=r.article,[,a]=(0,H.useState)(0);(0,H.useEffect)(()=>{let t=()=>{a(e=>e+1)};return e.on(`transaction`,t),()=>{e.off(`transaction`,t)}},[e]);let o=()=>e.chain().focus(),s=(t,n)=>{let{$from:r}=e.state.selection;r.depth>1?o().insertContentAt(r.after(1),{type:t,attrs:n}).run():o().insertContent({type:t,attrs:n}).run()},c=e.getText().split(/\s+/u).filter(e=>e!==``).length;return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)($,{label:r.undo,disabled:!e.can().undo(),onClick:()=>o().undo().run(),children:(0,U.jsx)(I,{})}),(0,U.jsx)($,{label:r.redo,disabled:!e.can().redo(),onClick:()=>o().redo().run(),children:(0,U.jsx)(de,{})}),(0,U.jsx)(`span`,{className:`bg-rule mx-1 h-5 w-px`,"aria-hidden":`true`}),(0,U.jsx)($,{label:i.bold,on:e.isActive(`bold`),onClick:()=>o().toggleBold().run(),children:(0,U.jsx)(S,{})}),(0,U.jsx)($,{label:i.italic,on:e.isActive(`italic`),onClick:()=>o().toggleItalic().run(),children:(0,U.jsx)(ne,{})}),(0,U.jsx)($,{label:i.strike,on:e.isActive(`strike`),onClick:()=>o().toggleStrike().run(),children:(0,U.jsx)(L,{})}),(0,U.jsx)(ot,{editor:e}),(0,U.jsx)(`span`,{className:`bg-rule mx-1 h-5 w-px`,"aria-hidden":`true`}),(0,U.jsx)($,{label:i.quote,on:e.isActive(`blockquote`),onClick:()=>o().toggleBlockquote().run(),children:(0,U.jsx)(F,{})}),(0,U.jsx)($,{label:i.bullets,on:e.isActive(`bulletList`),onClick:()=>o().toggleBulletList().run(),children:(0,U.jsx)(ce,{})}),(0,U.jsx)($,{label:i.numbers,on:e.isActive(`orderedList`),onClick:()=>o().toggleOrderedList().run(),children:(0,U.jsx)(O,{})}),(0,U.jsx)(`span`,{className:`bg-rule mx-1 h-5 w-px`,"aria-hidden":`true`}),e.isActive(`link`)?(0,U.jsx)($,{label:i.removeLink,on:!0,onClick:()=>o().extendMarkRange(`link`).unsetLink().run(),children:(0,U.jsx)(d,{})}):(0,U.jsx)(it,{label:i.link,hint:i.linkHint,icon:(0,U.jsx)(D,{}),disabled:e.state.selection.empty,onAnswer:e=>{o().extendMarkRange(`link`).setLink({href:e}).run()}}),(0,U.jsx)(at,{dir:t,entry:n,insert:s,divider:()=>o().setHorizontalRule().run()}),(0,U.jsx)(`span`,{className:`text-muted-foreground ml-2 text-xs tabular-nums`,children:i.words(c)})]})}function ct({doc:e,dir:r,entry:o}){let c=B(),f=a(),p=i(),m=(0,H.useSyncExternalStore)(t=>e.subscribe(t),()=>e.get()),h=p||m.held!==void 0,g=(0,H.useMemo)(()=>e.read,[e]),[_,v]=(0,H.useState)(()=>g.blocks.flatMap(e=>e.type===`image`?[e.file]:[])),S=le({textDirection:`auto`,editable:!h,immediatelyRender:!0,extensions:[we.configure({heading:{levels:[1,2]},listItem:!1,blockquote:!1,code:!1,codeBlock:!1,underline:!1,hardBreak:!1,link:{openOnClick:!1,autolink:!0}}),Se.extend({content:`paragraph`}),Ce.extend({content:`paragraph`}),xe.configure({placeholder:c.article.body}),qe,Ve,...$e],content:q(g.blocks),onUpdate:({editor:t,transaction:n})=>{n.docChanged&&(v(X(t.getJSON()).flatMap(e=>e.type===`image`?[e.file]:[])),e.edited())}}),[ne,C]=(0,H.useState)(()=>g.blocks);(0,H.useEffect)(()=>{e.bind(()=>X(S.getJSON()),e=>{S.commands.setContent(q(e.blocks),{emitUpdate:!1}),v(e.blocks.flatMap(e=>e.type===`image`?[e.file]:[])),C(e.blocks)})},[e,S]),(0,H.useEffect)(()=>{S.setEditable(!h)},[S,h]),(0,H.useEffect)(()=>{let e=()=>{C(X(S.getJSON()))};return S.on(`update`,e),()=>{S.off(`update`,e)}},[S]);let w=(0,H.useDeferredValue)(ne),{agent:E,following:D}=t(),ce=ee(),O=(()=>{if(E?.doing===void 0)return;let t=m.landed,n=t!==void 0&&t.at>=E.at-tt;return n&&E.source?.path===o?t.spot:(E.source?Be(E.source,{path:o,text:e.session.text}):void 0)??(n?t.spot:void 0)})(),k=O&&`block`in O?O.block:void 0,A=O!==void 0&&`head`in O,j=E?ce(E):``,M=(0,H.useRef)(null),N=(0,H.useRef)(null);(0,H.useEffect)(()=>{He(S,k===void 0?null:{block:k,label:j})},[S,k,j]),(0,H.useEffect)(()=>{let e=N.current;if(e){for(let t of e.querySelectorAll(`[data-agent]`))t.removeAttribute(`data-agent`);(A?e.querySelector(`.ak-x-a-title`):k===void 0?null:e.querySelector(`.ak-x-a-body`)?.children[k])?.setAttribute(`data-agent`,``)}},[k,A,w,m.title]),(0,H.useEffect)(()=>{D&&O!==void 0&&((A?M.current?.querySelector(`.ak-x-a-title`):M.current?.querySelector(`[data-testid="x-agent-block"]`))?.scrollIntoView({block:`nearest`}),N.current?.querySelector(`[data-agent]`)?.scrollIntoView({block:`nearest`}))},[D,O,A,m.landed]),n({hold:()=>Promise.resolve({key:`${o}@${String(e.session.text.length)}`,what:`The X article ${o}`,source:{path:o}}),locate:t=>{let n=z(e.session.text),r=e=>{let t=e?.getBoundingClientRect();return t&&t.width>0&&t.height>0?{x:t.x,y:t.y,width:t.width,height:t.height}:void 0},i=s(t)[0],a=e=>e!==void 0&&i!==void 0&&i.x>=e.x&&i.x<=e.x+e.width&&i.y>=e.y&&i.y<=e.y+e.height,c=[{as:`where it is written`,head:[`.ak-x-a-cover`,`.ak-x-a-title`].map(e=>M.current?.querySelector(e)),blocks:[...M.current?.querySelector(`.ak-x-a-body .ProseMirror`)?.children??[]]},{as:`as X will show it`,head:[`.ak-x-a-cover`,`.ak-x-a-title`].map(e=>N.current?.querySelector(e)),blocks:[...N.current?.querySelector(`.ak-x-a-body`)?.children??[]]}],u=e=>e===void 0?{}:{line:e.from,...e.to>e.from?{endLine:e.to}:{}},d=c.some(e=>e.head.some(e=>{let n=r(e);return n!==void 0&&l(t,n)})),f=new Set;for(let e of c)e.blocks.forEach((e,n)=>{let i=r(e);i&&l(t,i)&&f.add(n)});let p=[...d?[{name:`the article's head: its cover and title`,source:{path:o,...u(n.head)},...m.title===``?{}:{text:m.title}}]:[],...[...f].sort((e,t)=>e-t).map(e=>{let t=c.map(t=>t.blocks[e]?.textContent.trim()??``).find(e=>e!==``)??``;return{name:`block ${String(e+1)} of the article`,source:{path:o,...u(n.lines[e])},...t===``?{}:{text:t}}})],h=c.flatMap(e=>{if(e.head.some(e=>a(r(e))))return[`in the article's head, ${e.as}`];let t=e.blocks.findIndex(e=>a(r(e)));return t<0?[]:[`in block ${String(t+1)}, ${e.as}`]}).at(0);return Promise.resolve({elements:p,...h===void 0?{}:{where:h}})}});let P=ie(r,[...m.cover?[m.cover.file]:[],..._]),F=(0,H.useMemo)(()=>e=>P.get(e),[P]),[de,I]=(0,H.useState)(!1),fe=m.cover===void 0?void 0:P.get(m.cover.file),L=f?.theme===`dark`,pe=(0,U.jsxs)(x,{open:de,onOpenChange:I,children:[(0,U.jsx)(`div`,{className:`group/cover ak-x-a-cover relative`,children:m.cover===void 0?h?null:(0,U.jsx)(y,{asChild:!0,children:(0,U.jsxs)(u,{variant:`ghost`,className:`size-full flex-col gap-2 rounded-none text-[13px] font-normal text-[var(--ak-x-muted)]`,"aria-label":c.article.addCover,children:[(0,U.jsx)(`span`,{className:`grid size-10 place-items-center rounded-full bg-[var(--ak-x-muted)] text-[var(--ak-x-bg)]`,children:(0,U.jsx)(T,{className:`size-5`})}),c.article.coverHint]})}):(0,U.jsxs)(U.Fragment,{children:[fe===void 0?(0,U.jsx)(`div`,{className:`ak-x-made`,children:m.cover.file}):(0,U.jsx)(`img`,{src:fe,alt:m.cover.alt??``}),h?null:(0,U.jsxs)(`div`,{className:`absolute top-2 right-2 flex gap-1`,children:[(0,U.jsx)(y,{asChild:!0,children:(0,U.jsxs)(u,{variant:`secondary`,size:`sm`,className:`bg-media/75 text-on-media`,children:[(0,U.jsx)(T,{}),c.article.changeCover]})}),(0,U.jsx)(u,{variant:`secondary`,size:`icon-sm`,className:`bg-media/75 text-on-media`,"aria-label":c.article.removeCover,title:c.article.removeCover,onClick:()=>{e.edited({cover:void 0})},children:(0,U.jsx)(d,{})})]})]})}),(0,U.jsx)(b,{className:`w-auto`,align:`center`,children:(0,U.jsx)(ae,{self:o,types:Ne,testId:`x-picker`,onPick:t=>{I(!1),e.edited({cover:{file:re(r,t)}})}})})]}),me=(0,U.jsxs)(`div`,{ref:M,className:`ak-x ak-x-editing min-h-full`,"data-theme":L?`dark`:`light`,children:[pe,(0,U.jsxs)(`div`,{className:`ak-x-e-page`,children:[(0,U.jsxs)(`div`,{className:`relative`,children:[(0,U.jsx)(`textarea`,{className:`ak-x-a-title block w-full resize-none border-0 bg-transparent p-0 outline-none [field-sizing:content] placeholder:text-[var(--ak-x-muted)]`,value:m.title,placeholder:c.article.title,"aria-label":c.article.title,readOnly:h,dir:`auto`,"data-testid":`x-article-title`,onChange:t=>{h||e.edited({title:t.target.value.replace(/\n/gu,` `)})}}),E&&A?(0,U.jsx)(he,{"data-testid":`x-agent-head`,label:j,className:`-inset-1`}):null]}),(0,U.jsxs)(`div`,{className:`ak-x-e-by`,children:[(0,U.jsx)(`div`,{className:`ak-x-avatar`,"aria-hidden":`true`,children:V.name.slice(0,1)}),(0,U.jsx)(`span`,{className:`ak-x-name`,children:V.name}),(0,U.jsxs)(`span`,{className:`ak-x-handle`,children:[`@`,V.handle]})]}),(0,U.jsx)(Je.Provider,{value:F,children:(0,U.jsx)(`div`,{className:`ak-x-a-body`,"data-testid":`x-article-body`,children:(0,U.jsx)(ue,{editor:S,className:`[&_.ProseMirror]:outline-none`})})})]})]}),R=(0,U.jsx)(`div`,{ref:N,className:`ak-x ak-x-column`,"data-theme":L?`dark`:`light`,children:(0,U.jsx)(De,{article:{title:m.title,...m.cover?{cover:m.cover}:{},blocks:w},source:F})});return(0,U.jsxs)(`div`,{className:`bg-background flex size-full flex-col`,"data-testid":`x-article-editor`,children:[(0,U.jsx)(te,{start:h?void 0:(0,U.jsx)(st,{editor:S,dir:r,entry:o}),saved:{state:m.state},exports:{}}),m.held===void 0?null:(0,U.jsx)(`p`,{className:`text-lead border-b px-4 py-2 text-sm`,role:`status`,"data-testid":`x-article-held`,children:c.article.held(m.held)}),(0,U.jsx)(je.Provider,{value:oe,children:(0,U.jsx)(se,{edit:me,preview:R,width:600,background:L?`#000000`:`#ffffff`,testId:`x-preview`})})]})}function lt(){let e=B(),t=r(),n=a(),i=n?.item.entry,o=n?.item.dir??``,[s,c]=(0,H.useState)(),[l,u]=(0,H.useState)();return(0,H.useEffect)(()=>{if(i===void 0)return;let e,n=!0;return f.open(t,i).then(t=>{n?(e=t,c(new rt(t))):t.close()},e=>{n&&u(e instanceof Error?e.message:String(e))}),()=>{n=!1,e?.close()}},[t,i]),!s||i===void 0?(0,U.jsx)(`div`,{className:`text-muted-foreground flex size-full items-center justify-center text-sm`,"data-testid":`x-article-editor`,"data-state":l===void 0?`loading`:`error`,children:l===void 0?e.article.loading:e.couldNotOpen(l)}):(0,U.jsx)(ct,{doc:s,dir:o,entry:i})}export{lt as XArticleEditor,lt as default,X as fromDoc,q as toDoc};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{at as e,ot as t}from"./chunk-DSNLSHJZ-QaczBS3J.js";var n=(n,r)=>t.lang.round(e.parse(n)[r]);export{n as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{a as deckOfPresentation}from"./dist-PBbWAsrV.js";
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-COiEfhsA.js";import{a as t,c as n,i as r,o as i,s as a,t as o,y as s}from"./react-Edyoga_4.js";import{$ as c,B as l,G as u,H as d,J as f,K as p,Q as m,U as h,V as g,W as _,X as v,Y as y,Z as b,a as x,et as S,ft as C,gt as w,ht as T,i as ee,it as E,jt as D,mt as O,n as te,nt as k,o as A,ot as j,q as ne,r as re,rt as M,s as ie,st as ae,t as oe,ut as N,yt as se,z as ce}from"./x-DlhyIKuu.js";import{o as le,w as ue}from"./snapshots-BPJKywuN.js";import{t as de}from"./jsx-runtime-DePvh3-m.js";import{B as fe,C as pe,D as me,E as he,F as ge,G as _e,H as ve,I as ye,L as be,M as xe,N as Se,P as Ce,R as we,T as P,U as Te,V as Ee,W as De,a as Oe,c as ke,f as Ae,i as je,j as Me,k as Ne,l as Pe,m as Fe,o as Ie,s as Le,t as F,u as Re,v as ze,z as Be}from"./bar-button-J9vbfzTx.js";import{n as Ve,t as He}from"./progress-CwKcXARv.js";import{t as I}from"./createLucideIcon-lm_6n8YT.js";import{A as L}from"./index-DG2nHq4D.js";var R=e(s(),1),z=de(),Ue=Object.defineProperty,B=(e,t)=>Ue(e,`name`,{value:t,configurable:!0}),We=`Checkbox`,[Ge,Ke]=ae(We),[qe,Je]=Ge(We);function Ye(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=E({prop:n,defaultProp:i??!1,onChange:c,caller:We}),[m,h]=R.useState(null),[g,_]=R.useState(null),v=R.useRef(!1),[y,b]=R.useReducer(e=>e+1,0),x=!m||!!o||!!m.closest(`form`),S={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:v,userInteractionCount:y,onUserInteraction:b,required:l,defaultChecked:!V(i)&&i,isFormControl:x,bubbleInput:g,setBubbleInput:_};return(0,z.jsx)(qe,{scope:t,...S,children:rt(d)?d(S):r})}B(Ye,`CheckboxProvider`);var Xe=`CheckboxTrigger`,Ze=R.forwardRef(B(function({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i){let{control:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,onUserInteraction:p,isFormControl:m,bubbleInput:h}=Je(Xe,e),g=O(i,u),_=R.useRef(c);return R.useEffect(()=>{let e=a?.form;if(e){let t=B(()=>d(_.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,d]),(0,z.jsx)(N.button,{type:`button`,role:`checkbox`,"aria-checked":V(c)?`mixed`:c,"aria-required":l,"data-state":it(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:g,onKeyDown:j(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:j(n,e=>{p(),d(e=>V(e)?!0:!e),h&&m&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})},`CheckboxTrigger`)),Qe=R.forwardRef(B(function(e,t){let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,z.jsx)(Ye,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Ze,{...d,ref:t,__scopeCheckbox:n}),e&&(0,z.jsx)(nt,{__scopeCheckbox:n})]})})},`Checkbox`)),$e=`CheckboxIndicator`,et=R.forwardRef(B(function(e,t){let{__scopeCheckbox:n,forceMount:r,...i}=e,a=Je($e,n);return(0,z.jsx)(M,{present:r||V(a.checked)||a.checked===!0,children:(0,z.jsx)(N.span,{"data-state":it(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})},`CheckboxIndicator`)),tt=`CheckboxBubbleInput`,nt=R.forwardRef(B(function({__scopeCheckbox:e,onClick:t,...n},r){let{control:i,hasConsumerStoppedPropagationRef:a,userInteractionCount:o,checked:s,defaultChecked:c,required:l,disabled:u,name:d,value:f,form:p,bubbleInput:m,setBubbleInput:h}=Je(tt,e),g=O(r,h),_=ce(i),v=R.useRef(!1),y=R.useRef(s),b=R.useRef(o);R.useEffect(()=>{let e=m;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=o!==b.current;b.current=o;let i=y.current!==s;y.current=s;let c=!(r&&a.current);if(i&&n){v.current=!r;let t=new Event(`click`,{bubbles:c});e.indeterminate=V(s),n.call(e,!V(s)&&s),e.dispatchEvent(t),v.current=!1}},[m,s,a,o]);let x=R.useRef(!V(s)&&s);return(0,z.jsx)(N.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:c??x.current,required:l,disabled:u,name:d,value:f,form:p,...n,tabIndex:-1,ref:g,onClick:j(t,e=>{v.current&&e.stopPropagation()}),style:{...n.style,..._,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`CheckboxBubbleInput`));function rt(e){return typeof e==`function`}B(rt,`isFunction`);function V(e){return e===`indeterminate`}B(V,`isIndeterminate`);function it(e){return V(e)?`indeterminate`:e?`checked`:`unchecked`}B(it,`getState`);var at=Object.defineProperty,H=(e,t)=>at(e,`name`,{value:t,configurable:!0}),ot=`ContextMenu`,[st,ct]=ae(ot,[Ee]),U=Ee(),[lt,ut]=st(ot),dt=H(e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,dir:a,modal:o=!0}=e,s=R.useRef(!1),[c,l]=E({prop:i,defaultProp:!1,onChange:r,caller:ot}),u=U(t);return(0,z.jsx)(lt,{scope:t,open:c,onOpenChange:l,modal:o,hasInteractedRef:s,children:(0,z.jsx)(xe,{...u,dir:a,open:c,onOpenChange:l,modal:o,children:n})})},`ContextMenu`),ft=`ContextMenuTrigger`,pt=R.forwardRef(H(function(e,t){let{__scopeContextMenu:n,disabled:r=!1,...i}=e,a=ut(ft,n),o=U(n),[s,c]=R.useState({x:0,y:0}),l=R.useMemo(()=>({current:{getBoundingClientRect:H(()=>DOMRect.fromRect({width:0,height:0,...s}),`getBoundingClientRect`)}}),[s]),u=R.useRef(0),d=R.useCallback(()=>window.clearTimeout(u.current),[]),f=H(e=>{a.hasInteractedRef.current=!0,c({x:e.clientX,y:e.clientY}),a.onOpenChange(!0)},`handleOpen`);return R.useEffect(()=>d,[d]),R.useEffect(()=>void(r&&d()),[r,d]),(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Se,{...o,virtualRef:l}),(0,z.jsx)(N.span,{"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,...i,ref:t,style:{WebkitTouchCallout:`none`,...e.style},onContextMenu:r?e.onContextMenu:j(e.onContextMenu,e=>{d(),f(e),e.preventDefault()}),onPointerDown:r?e.onPointerDown:j(e.onPointerDown,Ct(e=>{d(),a.open&&a.onOpenChange(!1),u.current=window.setTimeout(()=>f(e),700)})),onPointerMove:r?e.onPointerMove:j(e.onPointerMove,Ct(d)),onPointerCancel:r?e.onPointerCancel:j(e.onPointerCancel,Ct(d)),onPointerUp:r?e.onPointerUp:j(e.onPointerUp,Ct(d))})]})},`ContextMenuTrigger`)),mt=H(e=>{let{__scopeContextMenu:t,...n}=e,r=U(t);return(0,z.jsx)(ye,{...r,...n})},`ContextMenuPortal`),ht=`ContextMenuContent`,gt=R.forwardRef(H(function(e,t){let{__scopeContextMenu:n,...r}=e,i=ut(ht,n),a=U(n),o=R.useRef(!1);return(0,z.jsx)(Ce,{...a,...r,ref:t,side:`right`,sideOffset:2,align:`start`,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),!t.defaultPrevented&&o.current&&t.preventDefault(),o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),!t.defaultPrevented&&!i.modal&&(o.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`ContextMenuContent`)),_t=R.forwardRef(H(function(e,t){let{__scopeContextMenu:n,...r}=e,i=U(n);return(0,z.jsx)(ge,{...i,...r,ref:t})},`ContextMenuItem`)),vt=R.forwardRef(H(function(e,t){let{__scopeContextMenu:n,...r}=e,i=U(n);return(0,z.jsx)(be,{...i,...r,ref:t})},`ContextMenuSeparator`)),yt=`ContextMenuSub`,bt=H(e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,defaultOpen:a}=e,o=U(t),[s,c]=E({prop:i,defaultProp:a??!1,onChange:r,caller:yt});return(0,z.jsx)(we,{...o,open:s,onOpenChange:c,children:n})},`ContextMenuSub`),xt=R.forwardRef(H(function(e,t){let{__scopeContextMenu:n,...r}=e,i=U(n);return(0,z.jsx)(fe,{...i,...r,ref:t})},`ContextMenuSubTrigger`)),St=R.forwardRef(H(function(e,t){let{__scopeContextMenu:n,...r}=e,i=U(n);return(0,z.jsx)(Be,{...i,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`ContextMenuSubContent`));function Ct(e){return t=>t.pointerType===`mouse`?void 0:e(t)}H(Ct,`whenTouchOrPen`);var wt=Object.defineProperty,W=(e,t)=>wt(e,`name`,{value:t,configurable:!0}),Tt=`Popover`,[Et,Dt]=ae(Tt,[ie]),Ot=ie(),[kt,G]=Et(Tt),At=W(e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=Ot(t),c=R.useRef(null),[l,u]=R.useState(!1),[d,f]=R.useState(0),[p,m]=R.useState(0),[h,g]=E({prop:r,defaultProp:i??!1,onChange:a,caller:Tt});return(0,z.jsx)(re,{...s,children:(0,z.jsx)(kt,{scope:t,contentId:k(),titleId:k(),descriptionId:k(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,triggerRef:c,open:h,onOpenChange:g,onOpenToggle:R.useCallback(()=>g(e=>!e),[g]),hasCustomAnchor:l,onCustomAnchorAdd:R.useCallback(()=>u(!0),[]),onCustomAnchorRemove:R.useCallback(()=>u(!1),[]),modal:o,children:n})})},`Popover`),jt=`PopoverAnchor`,Mt=R.forwardRef(W(function(e,t){let{__scopePopover:n,...r}=e,i=G(jt,n),a=Ot(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return R.useEffect(()=>(o(),()=>s()),[o,s]),(0,z.jsx)(ee,{...a,...r,ref:t})},`PopoverAnchor`)),Nt=`PopoverTrigger`,Pt=R.forwardRef(W(function(e,t){let{__scopePopover:n,...r}=e,i=G(Nt,n),a=Ot(n),o=O(t,i.triggerRef),s=(0,z.jsx)(N.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Gt(i.open),...r,ref:o,onClick:j(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,z.jsx)(ee,{asChild:!0,...a,children:s})},`PopoverTrigger`)),Ft=`PopoverPortal`,[It,Lt]=Et(Ft,{forceMount:void 0}),Rt=W(e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=G(Ft,t);return(0,z.jsx)(It,{scope:t,forceMount:n,children:(0,z.jsx)(M,{present:n||a.open,children:(0,z.jsx)(y,{asChild:!0,container:i,children:r})})})},`PopoverPortal`),K=`PopoverContent`,zt=R.forwardRef(W(function(e,t){let n=Lt(K,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=G(K,e.__scopePopover);return(0,z.jsx)(M,{present:r||a.open,children:a.modal?(0,z.jsx)(Vt,{...i,ref:t}):(0,z.jsx)(Ht,{...i,ref:t})})},`PopoverContent`)),Bt=C(`PopoverContent.RemoveScroll`),Vt=R.forwardRef(W(function(e,t){let n=G(K,e.__scopePopover),r=R.useRef(null),i=O(t,r),a=R.useRef(!1),{nodes:o,registry:s}=c();return R.useEffect(()=>{let e=r.current;if(e)return p(e)},[]),(0,z.jsx)(ne,{as:Bt,allowPinchZoom:!0,shards:R.useMemo(()=>[r,...o.map(e=>({current:e}))],[r,o]),children:(0,z.jsx)(Ut,{...e,ref:i,branchNodes:o,branchRegistry:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:j(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:j(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:j(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},`PopoverContentModal`)),Ht=R.forwardRef(W(function(e,t){let n=G(K,e.__scopePopover),r=R.useRef(!1),i=R.useRef(!1);return(0,z.jsx)(Ut,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`PopoverContentNonModal`)),Ut=R.forwardRef(W(function(e,t){let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,"aria-describedby":d,branchNodes:p,branchRegistry:h,...g}=e,_=G(K,n),y=Ot(n),[x,C]=R.useState(null),w=O(t,C);return m(x),f(),(0,z.jsx)(b,{registry:h,children:(0,z.jsx)(v,{asChild:!0,loop:!0,trapped:r,branches:p,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,z.jsx)(S,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>_.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,z.jsx)(A,{"data-state":Gt(_.open),role:`dialog`,id:_.contentId,"aria-labelledby":_.titlePresent?_.titleId:void 0,"aria-describedby":_.descriptionPresent?Kt(d,_.descriptionId):d,...y,...g,ref:w,style:{...g.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})})},`PopoverContentImpl`)),Wt=R.forwardRef(W(function(e,t){let{__scopePopover:n,...r}=e,i=Ot(n);return(0,z.jsx)(x,{...i,...r,ref:t})},`PopoverArrow`));function Gt(e){return e?`open`:`closed`}W(Gt,`getState`);function Kt(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}W(Kt,`concatAriaDescribedby`);var qt=Object.defineProperty,Jt=(e,t)=>qt(e,`name`,{value:t,configurable:!0}),Yt=`Toggle`,Xt=R.forwardRef(Jt(function(e,t){let{pressed:n,defaultPressed:r,onPressedChange:i,...a}=e,[o,s]=E({prop:n,onChange:i,defaultProp:r??!1,caller:Yt});return(0,z.jsx)(N.button,{type:`button`,"aria-pressed":o,"data-state":o?`on`:`off`,"data-disabled":e.disabled?``:void 0,...a,ref:t,onClick:j(e.onClick,()=>{e.disabled||s(!o)})})},`Toggle`)),Zt=Object.defineProperty,q=(e,t)=>Zt(e,`name`,{value:t,configurable:!0}),J=`ToggleGroup`,Y={Single:`single`,Multiple:`multiple`},[Qt,$t]=ae(J,[De]),en=De(),tn=R.forwardRef(q(function(e,t){let{type:n,...r}=e;if(n===Y.Single)return(0,z.jsx)(an,{role:`radiogroup`,...r,ref:t});if(n===Y.Multiple)return(0,z.jsx)(on,{role:`toolbar`,...r,ref:t});throw Error(`Missing prop \`type\` expected on \`${J}\``)},`ToggleGroup`)),[nn,rn]=Qt(J),an=R.forwardRef(q(function(e,t){let{value:n,defaultValue:r,onValueChange:i=q(()=>{},`onValueChange`),...a}=e,[o,s]=E({prop:n,defaultProp:r??``,onChange:i,caller:J});return(0,z.jsx)(nn,{scope:e.__scopeToggleGroup,type:Y.Single,value:R.useMemo(()=>o?[o]:[],[o]),onItemActivate:s,onItemDeactivate:R.useCallback(()=>s(``),[s]),children:(0,z.jsx)(ln,{...a,ref:t})})},`ToggleGroupImplSingle`)),on=R.forwardRef(q(function(e,t){let{value:n,defaultValue:r,onValueChange:i=q(()=>{},`onValueChange`),...a}=e,[o,s]=E({prop:n,defaultProp:r??[],onChange:i,caller:J}),c=R.useCallback(e=>s((t=[])=>[...t,e]),[s]),l=R.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return(0,z.jsx)(nn,{scope:e.__scopeToggleGroup,type:Y.Multiple,value:o,onItemActivate:c,onItemDeactivate:l,children:(0,z.jsx)(ln,{...a,ref:t})})},`ToggleGroupImplMultiple`)),[sn,cn]=Qt(J),ln=R.forwardRef(q(function(e,t){let{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:a,dir:o,loop:s=!0,...c}=e,l=en(n),u=_e(o),d={dir:u,...c};return(0,z.jsx)(sn,{scope:n,rovingFocus:i,disabled:r,children:i?(0,z.jsx)(ve,{asChild:!0,...l,orientation:a,dir:u,loop:s,children:(0,z.jsx)(N.div,{...d,ref:t})}):(0,z.jsx)(N.div,{...d,ref:t})})},`ToggleGroupImpl`)),un=`ToggleGroupItem`,dn=R.forwardRef(q(function(e,t){let n=rn(un,e.__scopeToggleGroup),r=cn(un,e.__scopeToggleGroup),i=en(e.__scopeToggleGroup),a=n.value.includes(e.value),o=r.disabled||e.disabled,s={...e,pressed:a,disabled:o},c=R.useRef(null);return r.rovingFocus?(0,z.jsx)(Te,{asChild:!0,...i,focusable:!o,active:a,ref:c,children:(0,z.jsx)(fn,{...s,ref:t})}):(0,z.jsx)(fn,{...s,ref:t})},`ToggleGroupItem`)),fn=R.forwardRef(q(function(e,t){let{__scopeToggleGroup:n,value:r,...i}=e,a=rn(un,n),o={role:`radio`,"aria-checked":e.pressed,"aria-pressed":void 0},s=a.type===Y.Single?o:void 0;return(0,z.jsx)(Xt,{...s,...i,ref:t,onPressedChange:e=>{e?a.onItemActivate(r):a.onItemDeactivate(r)}})},`ToggleGroupItemImpl`)),pn=I(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),mn=I(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),hn=I(`ellipsis-vertical`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`5`,r:`1`,key:`gxeob9`}],[`circle`,{cx:`12`,cy:`19`,r:`1`,key:`lyex9k`}]]),gn=I(`file-archive`,[[`path`,{d:`M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5`,key:`4pqfef`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 12v-1`,key:`1ej8lb`}],[`path`,{d:`M8 18v-2`,key:`qcmpov`}],[`path`,{d:`M8 7V6`,key:`1nbb54`}],[`circle`,{cx:`8`,cy:`20`,r:`2`,key:`ckkr5m`}]]),_n=I(`file-box`,[[`path`,{d:`M14.5 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v3.8`,key:`1kchwa`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M11.7 14.2 7 17l-4.7-2.8`,key:`1yk8tc`}],[`path`,{d:`M3 13.1a2 2 0 0 0-.999 1.76v3.24a2 2 0 0 0 .969 1.78L6 21.7a2 2 0 0 0 2.03.01L11 19.9a2 2 0 0 0 1-1.76V14.9a2 2 0 0 0-.97-1.78L8 11.3a2 2 0 0 0-2.03-.01z`,key:`19flxy`}],[`path`,{d:`M7 17v5`,key:`1yj1jh`}]]),vn=I(`file-braces`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1`,key:`1oajmo`}],[`path`,{d:`M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1`,key:`mpwhp6`}]]),yn=I(`file-chart-column`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 18v-1`,key:`zg0ygc`}],[`path`,{d:`M12 18v-6`,key:`17g6i2`}],[`path`,{d:`M16 18v-3`,key:`j5jt4h`}]]),bn=I(`file-code`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}]]),xn=I(`file-image`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`circle`,{cx:`10`,cy:`12`,r:`2`,key:`737tya`}],[`path`,{d:`m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22`,key:`wt3hpn`}]]),Sn=I(`file-pen-line`,[[`path`,{d:`M14.364 13.634a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506l4.013-4.009a1 1 0 0 0-3.004-3.004z`,key:`ukzhwg`}],[`path`,{d:`M14.487 7.858A1 1 0 0 1 14 7V2`,key:`1klhew`}],[`path`,{d:`M20 19.645V20a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l2.516 2.516`,key:`rxaxab`}],[`path`,{d:`M8 18h1`,key:`13wk12`}]]),Cn=I(`file-output`,[[`path`,{d:`M4.226 20.925A2 2 0 0 0 6 22h12a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v3.127`,key:`wfxp4w`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m5 11-3 3`,key:`1dgrs4`}],[`path`,{d:`m5 17-3-3h10`,key:`1mvvaf`}]]),wn=I(`file-play`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M15.033 13.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56v-4.704a.645.645 0 0 1 .967-.56z`,key:`1tzo1f`}]]),Tn=I(`file-spreadsheet`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 13h2`,key:`yr2amv`}],[`path`,{d:`M14 13h2`,key:`un5t4a`}],[`path`,{d:`M8 17h2`,key:`2yhykz`}],[`path`,{d:`M14 17h2`,key:`10kma7`}]]),En=I(`file-stack`,[[`path`,{d:`M11 21a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1`,key:`likhh7`}],[`path`,{d:`M16 16a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1`,key:`17ky3x`}],[`path`,{d:`M21 6a2 2 0 0 0-.586-1.414l-2-2A2 2 0 0 0 17 2h-3a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1z`,key:`1hyeo0`}]]),Dn=I(`file-type`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M11 18h2`,key:`12mj7e`}],[`path`,{d:`M12 12v6`,key:`3ahymv`}],[`path`,{d:`M9 13v-.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v.5`,key:`qbrxap`}]]),On=I(`file-video-camera`,[[`path`,{d:`M4 12V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2`,key:`jrl274`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m10 17.843 3.033-1.755a.64.64 0 0 1 .967.56v4.704a.65.65 0 0 1-.967.56L10 20.157`,key:`17aeo9`}],[`rect`,{width:`7`,height:`6`,x:`3`,y:`16`,rx:`1`,key:`s27ndx`}]]),kn=I(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),X=I(`pen-line`,[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),An=I(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),jn=I(`share`,[[`path`,{d:`M12 2v13`,key:`1km8f5`}],[`path`,{d:`m16 6-4-4-4 4`,key:`13yo43`}],[`path`,{d:`M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8`,key:`1b2hhj`}]]),Z=se({en:{saved:{saved:`Saved`,saving:`Saving…`,unsaved:`Not saved yet`,error:`Not saved`},agentDoing:{editing:e=>`${e} is editing`,looking:e=>`${e} is looking`},follow:e=>`Follow ${e}`,unfollow:e=>`Stop following ${e}`,markUp:`Mark up`,markUpHint:`Mark up what is on show, and AI makes the changes`,moreTools:`More`,download:`Download`,share:`Share`,ready:`Ready`,failed:`Download failed`,format:`Format`,versions:`Languages`,include:`Include`,onShow:`On show`,all:e=>`All ${String(e)} languages`,choose:`Choose…`,chosen:e=>`${String(e)} chosen`,back:`Back`,checking:`Checking…`,blocked:e=>e===1?`1 must-fix problem stops the download`:`${String(e)} must-fix problems stop the download`,queued:`Waiting`,queuedAhead:e=>`Waiting, ${String(e)} ahead`,preparing:e=>`Preparing ${String(e)}%`,cancel:`Cancel`,retry:`Try again`,failedHelp:e=>`Try again, or ask ${e} what went wrong.`,partial:`Some files could not be made.`,nVersions:e=>`${String(e)} versions`,show:`Show in folder`,notStarted:`The download did not start`,option:{pptx:{label:`Slides`,values:{native:`Editable`,picture:`Pictures`}},steps:{label:`Each animation step`},scale:{label:`Size`}},type:{mov:`MOV (ProRes)`,srt:`Captions`,cover:`Cover image`,pptx:`PowerPoint`,zip:`ZIP (each board as a PNG)`}},"zh-cn":{saved:{saved:`已保存`,saving:`正在保存…`,unsaved:`尚未保存`,error:`没能保存`},agentDoing:{editing:e=>`${e} 正在编辑`,looking:e=>`${e} 正在查看`},follow:e=>`跟随 ${e}`,unfollow:e=>`停止跟随 ${e}`,markUp:`批改`,markUpHint:`在画面上批改,AI 照着改`,moreTools:`更多`,download:`下载`,share:`分享`,ready:`已就绪`,failed:`下载失败`,format:`格式`,versions:`语言`,include:`附带`,onShow:`当前`,all:e=>`全部 ${String(e)} 种语言`,choose:`选择…`,chosen:e=>`已选 ${String(e)} 个`,back:`返回`,checking:`检查中…`,blocked:e=>`有 ${String(e)} 个必修问题,暂时不能下载`,queued:`排队中`,queuedAhead:e=>`排队中,前面还有 ${String(e)} 个`,preparing:e=>`正在准备 ${String(e)}%`,cancel:`取消`,retry:`重试`,failedHelp:e=>`请重试,或让 ${e} 看看哪里出了问题。`,partial:`部分文件没能生成。`,nVersions:e=>`${String(e)} 个版本`,show:`在文件夹中显示`,notStarted:`无法开始下载`,option:{pptx:{label:`幻灯片`,values:{native:`可编辑`,picture:`图片`}},steps:{label:`每个动画步骤`},scale:{label:`尺寸`}},type:{mov:`MOV(ProRes)`,srt:`字幕`,cover:`封面图`,pptx:`PowerPoint`,zip:`ZIP(每个画板一张 PNG)`}},"zh-tw":{saved:{saved:`已儲存`,saving:`正在儲存…`,unsaved:`尚未儲存`,error:`沒能儲存`},agentDoing:{editing:e=>`${e} 正在編輯`,looking:e=>`${e} 正在查看`},follow:e=>`跟隨 ${e}`,unfollow:e=>`停止跟隨 ${e}`,markUp:`批改`,markUpHint:`在畫面上批改,AI 照著改`,moreTools:`更多`,download:`下載`,share:`分享`,ready:`已就緒`,failed:`下載失敗`,format:`格式`,versions:`語言`,include:`附帶`,onShow:`目前`,all:e=>`全部 ${String(e)} 種語言`,choose:`選擇…`,chosen:e=>`已選 ${String(e)} 個`,back:`返回`,checking:`檢查中…`,blocked:e=>`有 ${String(e)} 個必須修正的問題,暫時無法下載`,queued:`排隊中`,queuedAhead:e=>`排隊中,前面還有 ${String(e)} 個`,preparing:e=>`正在準備 ${String(e)}%`,cancel:`取消`,retry:`重試`,failedHelp:e=>`請重試,或讓 ${e} 看看哪裡出了問題。`,partial:`部分檔案沒能產生。`,nVersions:e=>`${String(e)} 個版本`,show:`在資料夾中顯示`,notStarted:`無法開始下載`,option:{pptx:{label:`投影片`,values:{native:`可編輯`,picture:`圖片`}},steps:{label:`每個動畫步驟`},scale:{label:`尺寸`}},type:{mov:`MOV(ProRes)`,srt:`字幕`,cover:`封面圖`,pptx:`PowerPoint`,zip:`ZIP(每個畫板一張 PNG)`}},ja:{saved:{saved:`保存済み`,saving:`保存中…`,unsaved:`未保存`,error:`保存できませんでした`},agentDoing:{editing:e=>`${e}が編集中`,looking:e=>`${e}が表示中`},follow:e=>`${e}をフォロー`,unfollow:e=>`${e}のフォローをやめる`,markUp:`赤入れ`,markUpHint:`画面に赤を入れると、AI が直します`,moreTools:`その他`,download:`ダウンロード`,share:`共有`,ready:`準備完了`,failed:`ダウンロードに失敗`,format:`形式`,versions:`言語`,include:`追加`,onShow:`表示中`,all:e=>`全 ${String(e)} 言語`,choose:`選択…`,chosen:e=>`${String(e)} 件選択`,back:`戻る`,checking:`チェック中…`,blocked:e=>`要修正の問題が ${String(e)} 件あるためダウンロードできません`,queued:`待機中`,queuedAhead:e=>`待機中、前に ${String(e)} 件`,preparing:e=>`準備中 ${String(e)}%`,cancel:`キャンセル`,retry:`再試行`,failedHelp:e=>`もう一度試すか、${e} に原因を確認してください。`,partial:`一部のファイルを作成できませんでした。`,nVersions:e=>`${String(e)} 個のバージョン`,show:`フォルダに表示`,notStarted:`ダウンロードを開始できませんでした`,option:{pptx:{label:`スライド`,values:{native:`編集可能`,picture:`画像`}},steps:{label:`アニメーションの各ステップ`},scale:{label:`サイズ`}},type:{mov:`MOV(ProRes)`,srt:`字幕`,cover:`カバー画像`,pptx:`PowerPoint`,zip:`ZIP(各ボードを PNG で)`}},ko:{saved:{saved:`저장됨`,saving:`저장 중…`,unsaved:`아직 저장되지 않음`,error:`저장되지 않음`},agentDoing:{editing:e=>`${e} 편집 중`,looking:e=>`${e} 보는 중`},follow:e=>`${e} 따라가기`,unfollow:e=>`${e} 따라가기 중지`,markUp:`첨삭`,markUpHint:`화면에 첨삭하면 AI가 고쳐 줍니다`,moreTools:`더보기`,download:`다운로드`,share:`공유`,ready:`준비됨`,failed:`다운로드 실패`,format:`형식`,versions:`언어`,include:`포함`,onShow:`현재`,all:e=>`${String(e)}개 언어 모두`,choose:`선택…`,chosen:e=>`${String(e)}개 선택`,back:`뒤로`,checking:`확인 중…`,blocked:e=>`수정이 필요한 문제 ${String(e)}개 때문에 다운로드할 수 없습니다`,queued:`대기 중`,queuedAhead:e=>`대기 중, 앞에 ${String(e)}개`,preparing:e=>`준비 중 ${String(e)}%`,cancel:`취소`,retry:`다시 시도`,failedHelp:e=>`다시 시도하거나 ${e}에게 원인을 물어보세요.`,partial:`일부 파일을 만들지 못했습니다.`,nVersions:e=>`버전 ${String(e)}개`,show:`폴더에서 보기`,notStarted:`다운로드를 시작하지 못했습니다`,option:{pptx:{label:`슬라이드`,values:{native:`편집 가능`,picture:`이미지`}},steps:{label:`애니메이션 단계별로`},scale:{label:`크기`}},type:{mov:`MOV (ProRes)`,srt:`자막`,cover:`표지 이미지`,pptx:`PowerPoint`,zip:`ZIP (보드마다 PNG)`}},es:{saved:{saved:`Guardado`,saving:`Guardando…`,unsaved:`Aún sin guardar`,error:`No guardado`},agentDoing:{editing:e=>`${e} está editando`,looking:e=>`${e} está mirando`},follow:e=>`Seguir a ${e}`,unfollow:e=>`Dejar de seguir a ${e}`,markUp:`Corregir`,markUpHint:`Corrige lo que ves y la IA hace los cambios`,moreTools:`Más`,download:`Descargar`,share:`Compartir`,ready:`Listo`,failed:`Error al descargar`,format:`Formato`,versions:`Idiomas`,include:`Incluir`,onShow:`Actual`,all:e=>`Los ${String(e)} idiomas`,choose:`Elegir…`,chosen:e=>`${String(e)} elegidos`,back:`Atrás`,checking:`Comprobando…`,blocked:e=>`${String(e)} problemas obligatorios impiden la descarga`,queued:`En espera`,queuedAhead:e=>`En espera, ${String(e)} delante`,preparing:e=>`Preparando ${String(e)} %`,cancel:`Cancelar`,retry:`Reintentar`,failedHelp:e=>`Reinténtalo o pregunta a ${e} qué ha fallado.`,partial:`No se pudieron crear algunos archivos.`,nVersions:e=>`${String(e)} versiones`,show:`Mostrar en la carpeta`,notStarted:`La descarga no se inició`,option:{pptx:{label:`Diapositivas`,values:{native:`Editables`,picture:`Imágenes`}},steps:{label:`Cada paso de animación`},scale:{label:`Tamaño`}},type:{mov:`MOV (ProRes)`,srt:`Subtítulos`,cover:`Imagen de portada`,pptx:`PowerPoint`,zip:`ZIP (cada mesa de trabajo en PNG)`}},fr:{saved:{saved:`Enregistré`,saving:`Enregistrement…`,unsaved:`Pas encore enregistré`,error:`Non enregistré`},agentDoing:{editing:e=>`${e} modifie`,looking:e=>`${e} regarde`},follow:e=>`Suivre ${e}`,unfollow:e=>`Ne plus suivre ${e}`,markUp:`Annoter`,markUpHint:`Annotez ce qui est affiché, et l'IA fait les changements`,moreTools:`Plus`,download:`Télécharger`,share:`Partager`,ready:`Prêt`,failed:`Échec du téléchargement`,format:`Format`,versions:`Langues`,include:`Inclure`,onShow:`Affichée`,all:e=>`Les ${String(e)} langues`,choose:`Choisir…`,chosen:e=>`${String(e)} choisies`,back:`Retour`,checking:`Vérification…`,blocked:e=>`${String(e)} problèmes à corriger bloquent le téléchargement`,queued:`En attente`,queuedAhead:e=>`En attente, ${String(e)} avant celui-ci`,preparing:e=>`Préparation ${String(e)}\u00a0%`,cancel:`Annuler`,retry:`Réessayer`,failedHelp:e=>`Réessayez ou demandez à ${e} ce qui n’a pas marché.`,partial:`Certains fichiers n’ont pas pu être créés.`,nVersions:e=>`${String(e)} versions`,show:`Afficher dans le dossier`,notStarted:`Le téléchargement n’a pas démarré`,option:{pptx:{label:`Diapositives`,values:{native:`Modifiables`,picture:`Images`}},steps:{label:`Chaque étape d'animation`},scale:{label:`Taille`}},type:{mov:`MOV (ProRes)`,srt:`Sous-titres`,cover:`Image de couverture`,pptx:`PowerPoint`,zip:`ZIP (chaque plan de travail en PNG)`}},de:{saved:{saved:`Gespeichert`,saving:`Wird gespeichert…`,unsaved:`Noch nicht gespeichert`,error:`Nicht gespeichert`},agentDoing:{editing:e=>`${e} bearbeitet`,looking:e=>`${e} schaut sich um`},follow:e=>`${e} folgen`,unfollow:e=>`${e} nicht mehr folgen`,markUp:`Korrigieren`,markUpHint:`Korrigieren Sie, was zu sehen ist, und die KI setzt es um`,moreTools:`Mehr`,download:`Herunterladen`,share:`Teilen`,ready:`Bereit`,failed:`Download fehlgeschlagen`,format:`Format`,versions:`Sprachen`,include:`Dazu`,onShow:`Aktuell`,all:e=>`Alle ${String(e)} Sprachen`,choose:`Auswählen…`,chosen:e=>`${String(e)} ausgewählt`,back:`Zurück`,checking:`Wird geprüft…`,blocked:e=>`${String(e)} Probleme verhindern den Download`,queued:`Wartet`,queuedAhead:e=>`Wartet, ${String(e)} davor`,preparing:e=>`Wird vorbereitet: ${String(e)} %`,cancel:`Abbrechen`,retry:`Erneut versuchen`,failedHelp:e=>`Versuche es erneut oder frage ${e}, was schiefgelaufen ist.`,partial:`Einige Dateien konnten nicht erstellt werden.`,nVersions:e=>`${String(e)} Versionen`,show:`Im Ordner zeigen`,notStarted:`Der Download wurde nicht gestartet`,option:{pptx:{label:`Folien`,values:{native:`Bearbeitbar`,picture:`Bilder`}},steps:{label:`Jeden Animationsschritt`},scale:{label:`Größe`}},type:{mov:`MOV (ProRes)`,srt:`Untertitel`,cover:`Titelbild`,pptx:`PowerPoint`,zip:`ZIP (jede Zeichenfläche als PNG)`}},pt:{saved:{saved:`Salvo`,saving:`Salvando…`,unsaved:`Ainda não salvo`,error:`Não salvo`},agentDoing:{editing:e=>`${e} está editando`,looking:e=>`${e} está olhando`},follow:e=>`Seguir ${e}`,unfollow:e=>`Parar de seguir ${e}`,markUp:`Corrigir`,markUpHint:`Corrija o que vê e a IA faz as alterações`,moreTools:`Mais`,download:`Baixar`,share:`Compartilhar`,ready:`Pronto`,failed:`Falha ao baixar`,format:`Formato`,versions:`Idiomas`,include:`Incluir`,onShow:`Atual`,all:e=>`Todos os ${String(e)} idiomas`,choose:`Escolher…`,chosen:e=>`${String(e)} escolhidos`,back:`Voltar`,checking:`Verificando…`,blocked:e=>`${String(e)} problemas obrigatórios impedem o download`,queued:`Aguardando`,queuedAhead:e=>`Aguardando, ${String(e)} na frente`,preparing:e=>`Preparando ${String(e)}%`,cancel:`Cancelar`,retry:`Tentar novamente`,failedHelp:e=>`Tente novamente ou pergunte a ${e} o que deu errado.`,partial:`Não foi possível criar alguns arquivos.`,nVersions:e=>`${String(e)} versões`,show:`Mostrar na pasta`,notStarted:`O download não começou`,option:{pptx:{label:`Slides`,values:{native:`Editáveis`,picture:`Imagens`}},steps:{label:`Cada etapa da animação`},scale:{label:`Tamanho`}},type:{mov:`MOV (ProRes)`,srt:`Legendas`,cover:`Imagem de capa`,pptx:`PowerPoint`,zip:`ZIP (cada prancheta em PNG)`}}});function Mn(){let e=a(),t=Z.of(e?.locale);return e=>e.doing===void 0?e.name:t.agentDoing[e.doing](e.name)}function Nn(){let e=a(),n=Mn(),{agent:r,following:i,follow:s,unfollow:c}=t();if(r?.doing===void 0)return null;let l=Z.of(e?.locale);return(0,z.jsxs)(F,{[o]:``,"data-testid":`agent-here`,"data-doing":r.doing,"aria-pressed":i,title:i?l.unfollow(r.name):l.follow(r.name),className:`text-agent-text hover:text-agent-text aria-pressed:text-agent-text`,onClick:()=>{i?c():s()},children:[(0,z.jsx)(`span`,{"aria-hidden":!0,className:T(`size-2 flex-none rounded-full`,i?`bg-agent motion-safe:animate-pulse`:`border-agent border`)}),n(r)]})}function Pn(){let e=i(),{agent:r,following:a,follow:o,unfollow:s}=t(),c=r?.doing,l=r?.name;return(0,R.useEffect)(()=>{e[`agent/here`]({...c===void 0||l===void 0?{}:{agent:{name:l,doing:c}},following:a}).catch(()=>void 0)},[e,c,l,a]),n(`editor/command`,({command:e})=>{e===`follow`?o():e===`unfollow`&&s()}),null}function Fn({checked:e,multiple:t=!1,variant:n=`row`,className:r,children:i,...a}){return(0,z.jsxs)(`button`,{type:`button`,role:t?`checkbox`:`radio`,"aria-checked":e,"data-slot":`choice`,...a,className:T(`text-sm text-ink transition-colors focus-visible:outline focus-visible:-outline-offset-1 focus-visible:outline-pencil disabled:cursor-default disabled:opacity-50`,n===`row`?`flex min-h-8 items-center gap-2.5 rounded-md px-2 py-1 text-left`:`flex flex-col items-center rounded-md border px-2 py-2.5`,e?T(`bg-pencil-wash`,n===`box`&&`border-pencil`):T(`hover:bg-hover active:bg-press`,n===`box`&&`border-rule hover:border-rule-strong`),r),children:[n===`row`&&(0,z.jsx)(`span`,{"aria-hidden":!0,className:T(`flex size-4 flex-none items-center justify-center border text-on-pencil`,t?`rounded-sm`:`rounded-full`,e?t?`border-pencil bg-pencil`:`border-4 border-pencil`:`border-rule-strong`),children:t&&e&&(0,z.jsx)(Me,{className:`size-3`})}),i]})}var Q=16,In=8;function Ln(){return(0,z.jsx)(Wt,{asChild:!0,width:Q,height:In,children:(0,z.jsxs)(`svg`,{viewBox:`0 0 ${String(Q)} ${String(In)}`,"aria-hidden":!0,className:`-mt-px block overflow-visible`,children:[(0,z.jsx)(`path`,{d:`M0 -1 L${String(Q/2)} 7 L${String(Q)} -1 Z`,className:`fill-popover`}),(0,z.jsx)(`path`,{d:`M0 0 L${String(Q/2)} 7 L${String(Q)} 0`,className:`fill-none stroke-border`})]})})}function Rn({className:e,...t}){return(0,z.jsx)(Qe,{"data-slot":`checkbox`,className:T(`peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary`,e),...t,children:(0,z.jsx)(et,{"data-slot":`checkbox-indicator`,className:`grid place-content-center text-current transition-none`,children:(0,z.jsx)(Me,{className:`size-3.5`})})})}function zn({...e}){return(0,z.jsx)(At,{"data-slot":`popover`,...e})}function Bn({...e}){return(0,z.jsx)(Pt,{"data-slot":`popover-trigger`,...e})}function Vn({className:e,align:t=`center`,sideOffset:n=4,...r}){return(0,z.jsx)(Rt,{children:(0,z.jsx)(zt,{"data-slot":`popover-content`,align:t,sideOffset:n,className:T(`z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),...r})})}function Hn({...e}){return(0,z.jsx)(Mt,{"data-slot":`popover-anchor`,...e})}function Un({...e}){return(0,z.jsx)(l,{"data-slot":`sheet`,...e})}function Wn({...e}){return(0,z.jsx)(_,{"data-slot":`sheet-portal`,...e})}function Gn({className:e,...t}){return(0,z.jsx)(h,{"data-slot":`sheet-overlay`,className:T(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function Kn({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,z.jsxs)(Wn,{children:[(0,z.jsx)(Gn,{}),(0,z.jsxs)(d,{"data-slot":`sheet-content`,className:T(`fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500`,n===`right`&&`inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm`,n===`left`&&`inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm`,n===`top`&&`inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top`,n===`bottom`&&`inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom`,e),...i,children:[t,r&&(0,z.jsxs)(g,{className:`absolute top-2.5 right-2.5 grid size-7 place-items-center rounded-md text-lead ring-offset-background hover:bg-hover hover:text-ink focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus:outline-hidden active:bg-press disabled:pointer-events-none motion-safe:transition-colors [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,children:[(0,z.jsx)(oe,{className:`size-4`}),(0,z.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function qn({className:e,...t}){return(0,z.jsx)(u,{"data-slot":`sheet-title`,className:T(`font-semibold text-foreground`,e),...t})}var Jn=w(`inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-transparent`,outline:`border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground`},size:{default:`h-9 min-w-9 px-2`,sm:`h-8 min-w-8 px-1.5`,lg:`h-10 min-w-10 px-2.5`}},defaultVariants:{variant:`default`,size:`default`}}),Yn=R.createContext({size:`default`,variant:`default`,spacing:0});function Xn({className:e,variant:t,size:n,spacing:r=0,children:i,...a}){return(0,z.jsx)(tn,{"data-slot":`toggle-group`,"data-variant":t,"data-size":n,"data-spacing":r,style:{"--gap":r},className:T(`group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=default]:data-[variant=outline]:shadow-xs`,e),...a,children:(0,z.jsx)(Yn.Provider,{value:{variant:t,size:n,spacing:r},children:i})})}function Zn({className:e,children:t,variant:n,size:r,...i}){let a=R.useContext(Yn);return(0,z.jsx)(dn,{"data-slot":`toggle-group-item`,"data-variant":a.variant||n,"data-size":a.size||r,"data-spacing":a.spacing,className:T(Jn({variant:a.variant||n,size:a.size||r}),`w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10`,`data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l`,e),...i,children:t})}function Qn(e){if(e?.mode!==`edit`)return{gives:`nothing`};let t=e.commands!==!0,n=ue(e.item);return n===`formats`?{gives:`formats`,button:t}:n===`file as it is`?{gives:`file as it is`,path:e.item.entry,button:t}:{gives:`nothing`}}function $n(e,t,n){if(!n&&e.state===`done`&&t.has(e.id))return e.files.length===1?e.files[0]:void 0}var er=5;function tr(e,t){let n=new Set;return e.filter(e=>e.item===t&&e.state!==`cancelled`).reverse().filter(e=>{if(e.state!==`done`||e.files.length===0)return!0;let t=[...e.files].sort().join(`
|
|
2
|
-
`);return!n.has(t)&&(n.add(t),!0)}).slice(0,er)}var nr=e=>e.state===`queued`||e.state===`running`;function rr(e,t,n,r={}){let i=(e,t)=>e.length===t.length&&e.every(e=>t.includes(e));return nr(e)&&i(e.versions,t)&&i(e.types,n)&&ir(e.options??{},r)}var ir=(e,t)=>Object.keys({...e,...t}).every(n=>e[n]===t[n]);function ar(e,t,n){return Object.fromEntries(e.flatMap(e=>{let r=n[e.name];return!e.only.includes(t)||r===void 0?[]:e.values?e.values.includes(String(r))?[[e.name,r]]:[]:r===!0?[[e.name,!0]]:[]}))}function or(e,t){return Math.max(0,e.filter(nr).map(e=>e.id).indexOf(t))}function sr(e,t,n,r){if(n.length!==0)return e===`all`?[...n]:e===`some`?n.filter(e=>r.includes(e)):t===void 0?[...n]:[t]}function cr(e,t){let n=e.findLast(nr);if(n)return n.state===`running`?{at:`running`,percent:Math.round(n.progress*100)}:{at:`queued`};let r=e[0];return r===void 0||!t.has(r.id)?{at:`idle`}:r.state===`failed`?{at:`failed`}:{at:`done`}}var lr=e=>e.slice(e.lastIndexOf(`/`)+1);async function ur(e,t){let{url:n}=await e[`files/url`]({path:t}),r=document.createElement(`a`);r.href=n,r.download=lr(t),r.click()}function dr({path:e,className:t}){let n=i(),r=Z.of(a()?.locale);return(0,z.jsxs)(te,{variant:`outline`,size:`sm`,...t===void 0?{}:{className:t},"data-testid":`download-file`,onClick:()=>{ur(n,e).catch(e=>{P.error(r.notStarted,{description:e instanceof Error?e.message:String(e)})})},children:[(0,z.jsx)(mn,{"aria-hidden":!0}),r.download]})}var fr={mp4:`MP4`,gif:`GIF`,png:`PNG`,jpeg:`JPEG`,webp:`WebP`,avif:`AVIF`,pdf:`PDF`,html:`HTML`,zip:`ZIP`,psd:`PSD`,docx:`Word`,md:`Markdown`,xlsx:`Excel`,csv:`CSV`,json:`JSON`,glb:`GLB`},pr=(e,t)=>fr[t]??(t in e.type?e.type[t]:t);function mr(){let e=a(),t=Z.of(e?.locale),n=e?.item.kindInfo.exports?.names,r=e?.locale??`en`;return e=>{let i=n?.[e];return i?.[r]??i?.en??pr(t,e)}}function hr(){let[e,t]=(0,R.useState)(()=>window.matchMedia(`(max-width: 479px)`).matches);return(0,R.useEffect)(()=>{let e=window.matchMedia(`(max-width: 479px)`),n=()=>{t(e.matches)};return e.addEventListener(`change`,n),()=>{e.removeEventListener(`change`,n)}},[]),e}function gr(e,t){let r=i(),[a,o]=(0,R.useState)([]),[s,c]=(0,R.useState)(new Set),[l,u]=(0,R.useState)(!1),d=(0,R.useRef)(new Set),f=(0,R.useRef)(new Map),p=e=>{let n=$n(e,d.current,l);n!==void 0&&(d.current.delete(e.id),ur(r,n).catch(e=>{P.error(t.notStarted,{description:e instanceof Error?e.message:String(e)})}))},m=e=>{d.current.add(e.id),p(f.current.get(e.id)??e)};(0,R.useEffect)(()=>{let e=!0;return L(r,`export/list`,{}).then(t=>{e&&(o(t.jobs),u(t.reveal))},()=>void 0),()=>{e=!1}},[r]),n(`export/changed`,({job:t})=>{o(e=>{let n=e.findIndex(e=>e.id===t.id);return n<0?[...e,t]:e.map((e,r)=>r===n?t:e)}),!nr(t)&&!e&&c(e=>new Set(e).add(t.id)),f.current.set(t.id,t),p(t)});let[h,g]=(0,R.useState)(e);return h!==e&&(g(e),e&&c(new Set)),{all:a,fresh:s,reveals:l,asked:m}}function _r(e,t){let n=i(),r=`item-bar.export.${e}`,[a,o]=(0,R.useState)({type:t.types[0]??``,extras:[],options:{}});return(0,R.useEffect)(()=>{let e=!0;return n[`storage/get`]({key:r}).then(({value:n})=>{let r=n;if(!e||!r)return;let i=t.types.find(e=>e===r.type);i!==void 0&&o({type:i,extras:t.extras.filter(e=>r.extras?.includes(e)),options:r.options??{}})},()=>void 0),()=>{e=!1}},[n,r,t]),[a,e=>{o(e),n[`storage/set`]({key:r,value:e}).catch(()=>void 0)}]}async function vr(e,t,n){n&&await L(e,`export/reveal`,{path:t}).then(()=>!0,()=>!1)||await ur(e,t)}function yr({job:e,versions:t,ahead:n,words:r,reveals:o,onAsked:s}){let c=mr(),l=i(),u=a()?.agent?.name??`AllyHub`,d=Math.round(e.progress*100),f=o?kn:mn,p=o?r.show:r.download,m=e.versions.length===0?void 0:e.versions.length>2?r.nVersions(e.versions.length):e.versions.map(e=>t.find(t=>t.key===e)?.label??e).join(`, `),h=[e.types.map(e=>c(e)).join(`, `),...t.length>1&&m!==void 0?[m]:[]].join(` · `);return(0,z.jsxs)(`div`,{className:`border-t py-2 pr-2 pl-4`,"data-testid":`export-job`,"data-state":e.state,children:[nr(e)&&(0,z.jsxs)(`div`,{className:`pr-2`,children:[(0,z.jsxs)(`div`,{className:`flex h-7 items-center gap-2`,children:[(0,z.jsx)(`span`,{className:`text-dense min-w-0 flex-1 truncate`,children:h}),(0,z.jsx)(`span`,{className:`text-lead text-xs tabular-nums`,children:e.state===`running`?`${String(d)}%`:n>0?r.queuedAhead(n):r.queued}),(0,z.jsx)(F,{icon:!0,"aria-label":r.cancel,title:r.cancel,"data-testid":`export-cancel`,onClick:()=>{L(l,`export/cancel`,{job:e.id}).catch(()=>void 0)},children:(0,z.jsx)(oe,{"aria-hidden":!0})})]}),(0,z.jsx)(He,{value:d,className:`mt-1 h-1`})]}),e.state===`failed`&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`flex h-7 items-center gap-2`,children:[(0,z.jsx)(he,{className:`text-destructive size-3.5 flex-none`,"aria-hidden":!0}),(0,z.jsxs)(`span`,{className:`text-dense text-destructive min-w-0 flex-1 truncate`,children:[r.failed,` · `,h]}),(0,z.jsx)(F,{icon:!0,"aria-label":r.retry,title:r.retry,"data-testid":`export-retry`,onClick:()=>{L(l,`export/start`,{item:e.item,versions:e.versions,types:e.types,...e.options?{options:e.options}:{}}).then(e=>{s(e.job)},e=>{P.error(r.notStarted,{description:e instanceof Error?e.message:String(e)})})},children:(0,z.jsx)(An,{"aria-hidden":!0})})]}),(0,z.jsx)(`p`,{className:`text-lead pr-2 pl-5.5 text-xs`,title:e.error,children:r.failedHelp(u)})]}),e.files.map(e=>(0,z.jsxs)(`div`,{className:`flex h-7 items-center gap-2`,"data-testid":`export-file`,children:[(0,z.jsx)(Me,{className:`text-success size-3.5 flex-none`,"aria-hidden":!0}),(0,z.jsx)(`span`,{className:`text-dense min-w-0 flex-1 truncate`,title:e,children:lr(e)}),(0,z.jsx)(F,{icon:!0,"aria-label":p,title:p,"data-testid":`export-give`,onClick:()=>{vr(l,e,o)},children:(0,z.jsx)(f,{"aria-hidden":!0})})]},e)),e.state===`done`&&e.error!==void 0&&(0,z.jsx)(`p`,{className:`text-lead pr-2 pl-5.5 text-xs`,title:e.error,children:r.partial})]})}function br({versions:e,shown:t,picked:n,onPick:r,onBack:i,words:a}){return(0,z.jsxs)(`div`,{"data-testid":`export-choose`,children:[(0,z.jsxs)(`div`,{className:`flex h-11 items-center gap-1 border-b pr-4 pl-2`,children:[(0,z.jsx)(F,{icon:!0,"aria-label":a.back,title:a.back,onClick:i,children:(0,z.jsx)(pn,{"aria-hidden":!0})}),(0,z.jsx)(`span`,{className:`text-sm font-medium`,children:a.versions}),(0,z.jsxs)(`span`,{className:`text-lead ml-auto text-xs tabular-nums`,children:[n.length,`/`,e.length]})]}),(0,z.jsx)(`ul`,{className:`max-h-64 overflow-y-auto p-2`,children:e.map(e=>(0,z.jsx)(`li`,{children:(0,z.jsxs)(`label`,{className:`pressable flex h-8 items-center gap-2 rounded-md px-2 text-sm`,children:[(0,z.jsx)(Rn,{checked:n.includes(e.key),"data-version":e.key,onCheckedChange:t=>{r(t===!0?[...n,e.key]:n.filter(t=>t!==e.key))}}),(0,z.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.label}),e.key===t&&(0,z.jsx)(`span`,{className:`text-lead text-xs`,children:a.onShow})]})},e.key))})]})}function xr({kind:e,offer:t,item:n,props:r,jobs:a,all:o,words:s,reveals:c,onAsked:l,startRef:u}){let d=mr(),f=i(),p=r.versions??[],m=p.map(e=>e.key),h=p.find(e=>e.key===r.shown)?.label,g=r.unavailable??{},[_,v]=_r(e,t),[y,b]=(0,R.useState)(`shown`),[x,S]=(0,R.useState)(r.shown===void 0?[]:[r.shown]),[C,w]=(0,R.useState)(!1),[ee,E]=(0,R.useState)(!1),D=sr(y,r.shown,m,x),O=D?.length??1,k=[_.type,..._.extras.filter(e=>g[e]===void 0)],A=t.options.filter(e=>e.only.includes(_.type)),j=ar(A,_.type,_.options),ne=A.filter(e=>e.values===void 0),re=(e,t)=>{v({..._,options:{..._.options,[e]:t}})},M=r.check?.waiting===!0,ie=M?0:r.check?.problems(D)??0,ae=a.some(e=>rr(e,D??[],k,j)),oe=async()=>{E(!0);try{l((await L(f,`export/start`,{item:n,...D?{versions:D}:{},types:k,...Object.keys(j).length>0?{options:j}:{}})).job)}catch(e){if(le(e))return;P.error(s.notStarted,{description:e instanceof Error?e.message:String(e)})}finally{E(!1)}},N=(0,z.jsx)(Cr,{label:s.format,types:t.types,chosen:_.type,name:d,onChoose:e=>{v({..._,type:e})}}),se=(0,z.jsx)(te,{ref:u,size:`sm`,disabled:M||ie>0||ee||O===0||ae,"data-testid":`export-start`,onClick:()=>{oe()},children:M?s.checking:s.download});return(0,z.jsxs)(`div`,{className:`overflow-hidden rounded-lg text-sm`,"data-testid":`export-panel`,children:[C?(0,z.jsx)(br,{versions:p,shown:r.shown,picked:x,onPick:S,onBack:()=>{w(!1)},words:s}):(0,z.jsxs)(z.Fragment,{children:[t.types.length>1&&(0,z.jsx)(`div`,{className:`px-4 pt-4`,children:N}),(m.length>1||t.extras.length+A.length>0)&&(0,z.jsxs)(`div`,{className:`grid grid-cols-[max-content_minmax(0,1fr)] items-center gap-x-4 gap-y-3 px-4 pt-4`,children:[A.map(e=>e.values?(0,z.jsxs)(R.Fragment,{children:[(0,z.jsx)(`span`,{className:`text-lead`,children:s.option[e.name]?.label}),(0,z.jsx)(Xn,{type:`single`,variant:`outline`,size:`sm`,className:`w-full`,"aria-label":s.option[e.name]?.label,"data-testid":`export-option-${e.name}`,value:String(_.options[e.name]??e.values[0]),onValueChange:t=>{t!==``&&re(e.name,t)},children:e.values.map(t=>(0,z.jsx)(Zn,{value:t,"data-value":t,className:`flex-1`,children:s.option[e.name]?.values?.[t]??t},t))})]},e.name):null),m.length>1&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{className:`text-lead`,children:s.versions}),(0,z.jsxs)(je,{value:y,onValueChange:e=>{b(e),e===`some`&&w(!0)},children:[(0,z.jsx)(ke,{size:`sm`,"aria-label":s.versions,className:`w-full min-w-0`,"data-testid":`export-scope`,children:(0,z.jsx)(Pe,{})}),(0,z.jsxs)(Oe,{position:`popper`,align:`start`,children:[(0,z.jsx)(Ie,{value:`shown`,children:h??s.onShow}),(0,z.jsx)(Ie,{value:`all`,children:s.all(m.length)}),(0,z.jsx)(Le,{}),(0,z.jsx)(Ie,{value:`some`,onPointerUp:()=>{w(!0)},children:y===`some`?s.chosen(x.length):s.choose})]})]})]}),t.extras.length+ne.length>0&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{className:`text-lead self-start`,children:s.include}),(0,z.jsxs)(`div`,{className:`grid gap-1.5`,"data-testid":`export-include`,children:[ne.map(e=>(0,z.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(Rn,{checked:_.options[e.name]===!0,"data-option":e.name,onCheckedChange:t=>{re(e.name,t===!0)}}),(0,z.jsx)(`span`,{className:`truncate`,children:s.option[e.name]?.label})]},e.name)),t.extras.map(e=>{let t=g[e];return(0,z.jsxs)(`label`,{title:t,className:T(`flex items-center gap-2`,t!==void 0&&`text-lead-soft`),children:[(0,z.jsx)(Rn,{checked:t===void 0&&_.extras.includes(e),disabled:t!==void 0,"data-type":e,onCheckedChange:t=>{v({..._,extras:t===!0?[..._.extras,e]:_.extras.filter(t=>t!==e)})}}),(0,z.jsx)(`span`,{className:`truncate`,children:d(e)})]},e)})]})]})]}),ie>0&&(0,z.jsxs)(`p`,{className:`text-dense text-destructive flex items-start gap-1.5 px-4 pt-3`,"data-testid":`export-blocked`,children:[(0,z.jsx)(he,{className:`mt-0.5 size-3.5 flex-none`,"aria-hidden":!0}),s.blocked(ie)]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-3 p-4`,children:[(0,z.jsx)(`span`,{className:`text-lead min-w-0 flex-1 truncate text-xs`,children:r.facts??(t.types.length===1?d(_.type):void 0)}),se]})]}),a.length>0&&(0,z.jsx)(`div`,{className:`max-h-56 overflow-y-auto`,children:a.map(e=>(0,z.jsx)(yr,{job:e,versions:p,ahead:or(o,e.id),words:s,reveals:c,onAsked:l},e.id))})]})}var Sr={png:xn,jpeg:xn,webp:xn,avif:xn,gif:wn,mp4:On,mov:On,pdf:me,docx:Sn,md:Dn,txt:Dn,html:bn,xlsx:Tn,csv:Tn,json:vn,pptx:yn,zip:gn,psd:En,glb:_n};function Cr(e){let t=(0,R.useRef)(null),n=e.types.length,r=n<=4?n:Math.min(4,Math.ceil(n/2));return(0,z.jsx)(`div`,{ref:t,role:`radiogroup`,"aria-label":e.label,"data-testid":`export-format`,className:`grid gap-2`,style:{gridTemplateColumns:`repeat(${String(r)}, minmax(0, 1fr))`},onKeyDown:r=>{let i=r.key===`ArrowRight`||r.key===`ArrowDown`?1:r.key===`ArrowLeft`||r.key===`ArrowUp`?-1:0;if(i===0)return;r.preventDefault();let a=e.types[(e.types.indexOf(e.chosen)+i+n)%n];a!==void 0&&(e.onChoose(a),t.current?.querySelector(`[data-type="${a}"]`)?.focus())},children:e.types.map(t=>{let n=Sr[t]??Cn,r=e.chosen===t;return(0,z.jsxs)(Fn,{variant:`box`,checked:r,tabIndex:r?0:-1,"data-type":t,title:e.name(t),className:`min-h-16 min-w-0 justify-center gap-1.5 rounded-lg px-1.5 py-2.5`,onClick:()=>{e.onChoose(t)},children:[(0,z.jsx)(n,{"aria-hidden":!0,strokeWidth:1.5,className:T(`size-5`,r?`text-pencil`:`text-lead`)}),(0,z.jsx)(`span`,{className:`line-clamp-2 w-full text-center text-xs leading-tight text-balance break-words`,children:e.name(t)})]},t)})})}function wr(e){let t=/Mac|iPhone|iPad/u.test(navigator.userAgent),n=e.target;return e.code===`KeyE`&&(t?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey)&&!e.shiftKey&&!e.altKey&&!(n instanceof HTMLElement&&(n.isContentEditable||n.tagName===`INPUT`||n.tagName===`TEXTAREA`))}function Tr(e){let t=Qn(a());return t.gives===`nothing`?null:t.gives===`file as it is`?(0,z.jsx)(Er,{path:t.path,hosted:!t.button}):(0,z.jsx)(Dr,{...e})}function Er({path:e,hosted:t}){let r=i(),o=Z.of(a()?.locale),s=()=>{ur(r,e).catch(e=>{P.error(o.notStarted,{description:e instanceof Error?e.message:String(e)})})};n(`editor/command`,({command:e,open:t})=>{e===`export`&&t!==!1&&s()});let c=(0,R.useEffectEvent)(e=>{wr(e)&&(e.preventDefault(),s())});return(0,R.useEffect)(()=>(window.addEventListener(`keydown`,c),()=>{window.removeEventListener(`keydown`,c)}),[]),(0,R.useEffect)(()=>{t&&r[`export/state`]({at:`idle`,open:!1}).catch(()=>void 0)},[r,t]),t?null:(0,z.jsxs)(F,{"data-testid":`export`,"data-state":`idle`,"aria-label":o.download,title:o.download,onClick:s,children:[(0,z.jsx)(mn,{"aria-hidden":!0}),(0,z.jsx)(`span`,{className:`@max-lg/item:hidden`,children:o.download})]})}function Dr(e){let t=i(),r=a(),o=r?.commands===!0,s=r?.item.kind,c=r?.item.kindInfo.exports,l=r?.item.id,u=Z.of(r?.locale),d=hr(),f=(0,R.useRef)(null),[p,m]=(0,R.useState)(!1),{all:h,fresh:g,reveals:_,asked:v}=gr(p,u);n(`editor/command`,({command:e,open:t})=>{e===`export`&&m(e=>t??!e)}),(0,R.useEffect)(()=>{let e=e=>{wr(e)&&(e.preventDefault(),m(e=>!e))};return window.addEventListener(`keydown`,e),()=>{window.removeEventListener(`keydown`,e)}},[]),(0,R.useEffect)(()=>{if(!p||d)return;let e=()=>{m(!1)};return window.addEventListener(`blur`,e),()=>{window.removeEventListener(`blur`,e)}},[p,d]);let y=c!==void 0,b=l===void 0?[]:tr(h,l),x=cr(b,g),S=x.at===`running`?x.percent:void 0;if((0,R.useEffect)(()=>{o&&y&&t[`export/state`]({at:x.at,...S===void 0?{}:{percent:S},open:p}).catch(()=>void 0)},[t,o,y,x.at,S,p]),s===void 0||l===void 0||c===void 0)return null;let C=x.at===`running`?`${String(x.percent)}%`:x.at===`queued`?u.queued:x.at===`done`?u.ready:x.at===`failed`?u.failed:u.download,w=(0,z.jsxs)(F,{"data-testid":`export`,"data-state":x.at,"aria-pressed":p,"aria-label":x.at===`running`?u.preparing(x.percent):C,title:C,onClick:()=>{d&&m(!0)},children:[x.at===`running`&&(0,z.jsx)(Ve,{value:x.percent/100}),x.at===`queued`&&(0,z.jsx)(Ve,{value:0}),x.at===`done`&&(0,z.jsx)(Me,{className:`text-success`,"aria-hidden":!0}),x.at===`failed`&&(0,z.jsx)(he,{className:`text-destructive`,"aria-hidden":!0}),x.at===`idle`&&(0,z.jsx)(mn,{"aria-hidden":!0}),(0,z.jsx)(`span`,{className:`@max-lg/item:hidden`,children:C})]}),T=(0,z.jsx)(xr,{kind:s,offer:c,item:l,props:e,jobs:b,all:h,words:u,reveals:_,onAsked:v,startRef:f});return d?(0,z.jsxs)(z.Fragment,{children:[!o&&w,(0,z.jsx)(Un,{open:p,onOpenChange:m,children:(0,z.jsxs)(Kn,{side:`bottom`,showCloseButton:!1,className:`gap-0 rounded-t-lg`,children:[(0,z.jsx)(qn,{className:`sr-only`,children:u.download}),T]})})]}):(0,z.jsxs)(zn,{open:p,onOpenChange:m,children:[o?(0,z.jsx)(Hn,{className:`pointer-events-none fixed top-0 right-2 size-0`}):(0,z.jsx)(Bn,{asChild:!0,children:w}),(0,z.jsxs)(Vn,{align:`end`,sideOffset:o?4:8,className:`w-88 p-0`,onOpenAutoFocus:e=>{f.current&&!f.current.disabled&&(e.preventDefault(),f.current.focus())},children:[!o&&(0,z.jsx)(Ln,{}),T]})]})}function Or({...e}){return(0,z.jsx)(dt,{"data-slot":`context-menu`,...e})}function kr({...e}){return(0,z.jsx)(pt,{"data-slot":`context-menu-trigger`,...e})}function Ar({...e}){return(0,z.jsx)(bt,{"data-slot":`context-menu-sub`,...e})}function jr({className:e,inset:t,children:n,...r}){return(0,z.jsxs)(xt,{"data-slot":`context-menu-sub-trigger`,"data-inset":t,className:T(`flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground`,e),...r,children:[n,(0,z.jsx)(Ne,{className:`ml-auto`})]})}function Mr({className:e,...t}){return(0,z.jsx)(St,{"data-slot":`context-menu-sub-content`,className:T(`z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),...t})}var Nr=R.createContext(null),Pr=4;function Fr(e){let t=R.useRef(!1);return R.useEffect(()=>{let n=e?.ownerDocument??document,r=0,i=e=>{r+=Math.abs(e.movementX)+Math.abs(e.movementY),r>=Pr&&(t.current=!0,n.removeEventListener(`pointermove`,i,!0))};return n.addEventListener(`pointermove`,i,!0),()=>{n.removeEventListener(`pointermove`,i,!0)}},[e]),t}function Ir(e){let t=Fr(e.container);return(0,z.jsx)(Nr,{value:t,children:e.children})}function Lr(e){let t=R.useContext(Nr);return n=>{e?.(n),t&&!t.current&&n.preventDefault()}}function Rr({className:e,container:t,children:n,...r}){return(0,z.jsx)(mt,{container:t,children:(0,z.jsx)(gt,{"data-slot":`context-menu-content`,className:T(`z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),...r,children:(0,z.jsx)(Ir,{container:t,children:n})})})}function zr({className:e,inset:t,variant:n=`default`,onPointerUp:r,...i}){let a=Lr(r);return(0,z.jsx)(_t,{onPointerUp:a,"data-slot":`context-menu-item`,"data-inset":t,"data-variant":n,className:T(`relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!`,e),...i})}function Br({className:e,...t}){return(0,z.jsx)(vt,{"data-slot":`context-menu-separator`,className:T(`-mx-1 my-1 h-px bg-border`,e),...t})}function Vr({className:e,...t}){return(0,z.jsx)(`span`,{"data-slot":`context-menu-shortcut`,className:T(`ml-auto text-xs tracking-widest text-muted-foreground`,e),...t})}var Hr=150,Ur=e=>{if(!(e.currentTarget instanceof Element))return;let t=e.currentTarget.getBoundingClientRect();return{x:t.x,y:t.y,width:t.width,height:t.height}},Wr=(e,t,n=!0)=>{let r=Ur(t);setTimeout(()=>{e.begin(r,n)},Hr)};function $(){let e=i(),t=a();if(t?.notes!==!0)return;let n=Z.of(t.locale);return{label:n.markUp,hint:n.markUpHint,begin:(t,n)=>{e[`note/begin`]({...t?{from:t}:{},...n===!0?{selection:n}:{}}).catch(()=>void 0)}}}function Gr(){let e=$();return e?(0,z.jsxs)(F,{title:e.hint,"data-testid":`mark-up`,className:`text-ink`,onClick:t=>{e.begin(Ur(t))},children:[(0,z.jsx)(X,{"aria-hidden":!0}),e.label]}):null}function Kr(e){let t=$();return t?(0,z.jsx)(`div`,{role:`toolbar`,"aria-label":t.label,"data-note-chrome":``,"data-testid":`mark-up-bar`,className:`border-rule bg-sheet shadow-overlay flex items-center rounded-lg border p-0.5 ${e.className??``}`,style:e.style,onPointerDown:e=>{e.stopPropagation()},children:(0,z.jsxs)(F,{title:t.hint,"data-testid":`mark-up-selected`,className:`text-ink`,onClick:e=>{t.begin(Ur(e),!0)},children:[(0,z.jsx)(X,{"aria-hidden":!0}),t.label]})}):null}function qr({selection:e=!0}={}){let t=$();return t?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(ze,{}),(0,z.jsxs)(Fe,{title:t.hint,"data-testid":`mark-up-item`,onSelect:n=>{Wr(t,n,e)},children:[(0,z.jsx)(X,{className:`size-3.5`,"aria-hidden":!0}),t.label]})]}):null}function Jr(){let e=$();return e?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Br,{}),(0,z.jsxs)(zr,{title:e.hint,"data-testid":`mark-up-item`,onSelect:t=>{Wr(e,t)},children:[(0,z.jsx)(X,{className:`size-3.5`,"aria-hidden":!0}),e.label]})]}):null}var Yr=e=>e instanceof Element&&e.closest(`input, textarea`)!==null;function Xr(){let e=$(),t=e!==void 0,[n,r]=(0,R.useState)();return(0,R.useEffect)(()=>{if(!t)return;let e=e=>{e.defaultPrevented||Yr(e.target)||(e.preventDefault(),r({x:e.clientX,y:e.clientY}))};return document.addEventListener(`contextmenu`,e),()=>{document.removeEventListener(`contextmenu`,e)}},[t]),!e||!n?null:(0,z.jsxs)(Re,{open:!0,onOpenChange:e=>{e||r(void 0)},children:[(0,z.jsx)(pe,{asChild:!0,children:(0,z.jsx)(`span`,{style:{position:`fixed`,left:n.x,top:n.y,width:0,height:0}})}),(0,z.jsx)(Ae,{align:`start`,className:`text-xs`,children:(0,z.jsxs)(Fe,{title:e.hint,"data-testid":`mark-up-item`,onSelect:t=>{Wr(e,t)},children:[(0,z.jsx)(X,{className:`size-3.5`,"aria-hidden":!0}),e.label]})})]})}function Zr(){let e=a();return e?.share===!0&&e.mode===`edit`&&e.item.kindInfo.share===!0}function Qr(){let e=i(),t=a();if(!Zr())return null;let n=Z.of(t?.locale);return(0,z.jsxs)(F,{"data-testid":`share`,"aria-label":n.share,title:n.share,onClick:()=>{e[`share/begin`]({}).catch(()=>void 0)},children:[(0,z.jsx)(jn,{"aria-hidden":!0}),(0,z.jsx)(`span`,{className:`@max-lg/item:hidden`,children:n.share})]})}var $r=800;function ei(e){let t=e?.state===`saving`||e?.state===`unsaved`,[n,r]=(0,R.useState)(!1);return(0,R.useEffect)(()=>{if(!t)return;let e=setTimeout(()=>{r(!0)},$r);return()=>{clearTimeout(e),r(!1)}},[t]),e!==void 0&&e.state!==`saved`&&(!t||n)}function ti({saved:e,words:t}){return(0,z.jsx)(`span`,{"data-testid":`save-state`,"data-state":e.state,title:e.message,className:T(`px-1 text-xs`,e.state===`error`?`text-destructive`:`text-lead`),children:t.saved[e.state]})}function ni({start:e,saved:t,exports:n}){let i=a(),o=Zr(),s=Z.of(i?.locale),c=ei(t),l=r()?.doing!==void 0;if(i?.mode!==`edit`)return e?(0,z.jsx)(`div`,{className:`bg-background flex min-h-9 flex-none items-center gap-1 border-b px-1 font-sans text-sm`,"data-testid":`item-bar`,children:e}):null;if(i.commands===!0)return(0,z.jsxs)(z.Fragment,{children:[e?(0,z.jsx)(`div`,{className:`bg-background @container/item flex min-h-9 flex-none items-center gap-1 border-b px-1 font-sans text-sm`,"data-testid":`item-bar`,children:e}):null,(0,z.jsx)(Pn,{}),(0,z.jsx)(Tr,{...n}),(0,z.jsx)(Xr,{})]});let u=Qn(i).gives!==`nothing`;return!e&&!c&&!u&&!o&&!l?(0,z.jsx)(Xr,{}):(0,z.jsxs)(`div`,{className:`bg-background @container/item flex min-h-9 flex-none items-center gap-1 border-b px-1 font-sans text-sm`,"data-testid":`item-bar`,children:[e,(0,z.jsxs)(`div`,{className:`ml-auto flex flex-none items-center gap-1`,children:[(0,z.jsx)(Nn,{}),t&&c&&(0,z.jsx)(ti,{saved:t,words:s}),(0,z.jsx)(Gr,{}),(0,z.jsx)(Tr,{...n}),(0,z.jsx)(Qr,{})]}),(0,z.jsx)(Xr,{})]})}var ri=e(D(),1),ii=`group-data-[compact]/bar:hidden`,ai=32,oi={compact:!1,out:[],firsts:[],order:{}},si=(0,R.createContext)(null),ci=(e,t)=>e.compact===t.compact&&e.out.join(`
|
|
3
|
-
`)===t.out.join(`
|
|
4
|
-
`)&&e.firsts.join(`
|
|
5
|
-
`)===t.firsts.join(`
|
|
6
|
-
`)&&JSON.stringify(e.order)===JSON.stringify(t.order);function li({children:e,id:t,priority:n=0,keep:r=!1,ruled:i=!0}){let a=(0,R.useContext)(si),o=(0,R.useId)(),s=t??o,c=a?.fit.firsts.includes(s)??!1,l=a?.touch;(0,R.useLayoutEffect)(()=>(l?.(),l),[l]);let u=(0,z.jsx)(`span`,{className:T(`relative flex h-8 flex-none items-center gap-0.5`,!c&&`pl-2`,!c&&i&&`before:bg-rule before:absolute before:top-2 before:bottom-2 before:left-0.75 before:w-px`),children:e});if(!a)return u;let d=a.fit.out.includes(s);return(0,z.jsx)(`span`,{"data-group":s,"data-priority":n,"data-keep":r?``:void 0,className:d?`hidden`:`flex flex-none`,children:d?a.panel?(0,ri.createPortal)((0,z.jsx)(`span`,{"data-group":s,"data-away":``,className:`flex flex-none`,style:{order:a.fit.order[s]??0},children:u}),a.panel):null:u})}function ui({testid:e,className:t,children:n,...r}){let i=a(),o=Z.of(i?.locale),s=(0,R.useRef)(null),[c,l]=(0,R.useState)(null),u=(0,R.useRef)(new Map),[d,f]=(0,R.useState)(oi),[p,m]=(0,R.useState)(!1),[h,g]=(0,R.useState)(0),_=(0,R.useCallback)(()=>{g(e=>e+1)},[]),v=(0,R.useRef)(null);return(0,R.useLayoutEffect)(()=>{let e=new ResizeObserver(()=>{g(e=>e+1)});return v.current=e,s.current&&e.observe(s.current),()=>{e.disconnect(),v.current=null}},[]),(0,R.useLayoutEffect)(()=>{let e=s.current;if(!e)return;let t=[],n=new Set,r=!0;for(let i of e.querySelectorAll(`[data-group]:not([data-away]), [data-spacer]`)){if(i.dataset.spacer!==void 0){r=!0;continue}let e=i.dataset.group??``;if(t.push({key:e,priority:Number(i.dataset.priority??0),keep:i.dataset.keep!==void 0,at:t.length}),d.out.includes(e))continue;r&&n.add(e),r=!1,v.current?.observe(i);let a=i.getBoundingClientRect().width;a>0&&u.current.set(`${String(d.compact)}:${e}`,a)}for(let e of c?.querySelectorAll(`[data-away]`)??[]){let t=e.getBoundingClientRect().width;t>0&&u.current.set(`${String(d.compact)}:${e.dataset.group??``}`,t)}let i=e.clientWidth,a=(e,t)=>u.current.get(`${String(e)}:${t.key}`),o=e=>t.every(t=>a(e,t)!==void 0),l=e=>t.reduce((t,n)=>t+(a(e,n)??0),0),h=!1,g=[];if(!o(!1)||l(!1)<=i)h=!1;else if(!o(!0)||l(!0)<=i)h=!0;else{h=!0;let e=t.filter(e=>!e.keep).sort((e,t)=>e.priority-t.priority||t.at-e.at),n=new Set,r=l(!0)+ai;for(let t of e){if(r<=i)break;n.add(t.key),r-=a(!0,t)??0}g=t.filter(e=>n.has(e.key)).map(e=>e.key)}let _={compact:h,out:g,firsts:[...n],order:Object.fromEntries(t.map(e=>[e.key,e.at]))};ci(_,d)||f(_),g.length===0&&p&&m(!1)},[d,p,h,c,n]),(0,z.jsx)(si.Provider,{value:{fit:d,panel:p?c:null,touch:_},children:(0,z.jsxs)(`div`,{...r,ref:s,role:r.role??`toolbar`,"data-testid":e,"data-compact":d.compact?``:void 0,className:T(`group/bar relative flex h-8 min-w-0 flex-1 items-center overflow-hidden`,t),children:[n,d.out.length>0?(0,z.jsxs)(zn,{open:p,onOpenChange:m,children:[(0,z.jsx)(Bn,{asChild:!0,children:(0,z.jsx)(F,{icon:!0,className:`ml-auto flex-none`,"aria-label":o.moreTools,title:o.moreTools,"data-testid":`${e}-more`,onMouseDown:e=>{e.preventDefault()},children:(0,z.jsx)(hn,{})})}),(0,z.jsx)(Vn,{align:`end`,collisionPadding:8,role:`toolbar`,"aria-label":o.moreTools,"data-testid":`${e}-panel`,"data-compact":d.compact?``:void 0,onOpenAutoFocus:e=>{e.preventDefault()},onCloseAutoFocus:e=>{e.preventDefault()},onInteractOutside:e=>{let t=e.target;t instanceof Element&&t.closest(`[data-radix-popper-content-wrapper]`)&&e.preventDefault()},className:`group/bar w-auto max-w-[calc(100vw-1rem)] overflow-hidden p-1`,children:(0,z.jsx)(`div`,{ref:l,className:`-ml-2 flex flex-wrap items-center`})})]}):null]})})}export{Rn as C,X as D,An as E,Bn as S,Mn as T,kr as _,Kr as a,Hn as b,$ as c,zr as d,Br as f,jr as g,Mr as h,ni as i,Or as l,Ar as m,li as n,Jr as o,Vr as p,ui as r,qr as s,ii as t,Rr as u,dr as v,Fn as w,Vn as x,zn as y};
|