@opengeni/react 4.0.2 → 4.0.5-canary.39120434730001
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/README.md +787 -26
- package/dist/accounts.js +2 -0
- package/dist/accounts.js.map +1 -1
- package/dist/approvals.d.ts +2 -1
- package/dist/artifacts-document.js +6 -3
- package/dist/artifacts-presentation.js +6 -3
- package/dist/artifacts-spreadsheet.d.ts +1 -1
- package/dist/artifacts-spreadsheet.js +6 -3
- package/dist/artifacts.d.ts +5 -1
- package/dist/artifacts.js +542 -278
- package/dist/artifacts.js.map +1 -1
- package/dist/browser-viewer-GEHX3KYE.js +20 -0
- package/dist/capability-catalog-row.d.ts +20 -0
- package/dist/capability-logo-fallback.d.ts +3 -0
- package/dist/chat-interactive-block-5V3BGLXT.js +15 -0
- package/dist/chunk-2DDJ6YH6.js +41 -0
- package/dist/chunk-2DDJ6YH6.js.map +1 -0
- package/dist/chunk-2EGXXUG4.js +1161 -0
- package/dist/chunk-2EGXXUG4.js.map +1 -0
- package/dist/chunk-2XKRY4GF.js +302 -0
- package/dist/chunk-2XKRY4GF.js.map +1 -0
- package/dist/chunk-2ZUUIMBY.js +343 -0
- package/dist/chunk-2ZUUIMBY.js.map +1 -0
- package/dist/chunk-4F4FGCH2.js +34 -0
- package/dist/chunk-4F4FGCH2.js.map +1 -0
- package/dist/{chunk-Z7WBDB4E.js → chunk-4M2MJLY3.js} +848 -867
- package/dist/chunk-4M2MJLY3.js.map +1 -0
- package/dist/chunk-4U7SHFQ2.js +193 -0
- package/dist/chunk-4U7SHFQ2.js.map +1 -0
- package/dist/chunk-5I4VRWBB.js +56 -0
- package/dist/chunk-5I4VRWBB.js.map +1 -0
- package/dist/{chunk-24M4YBCL.js → chunk-62XZ3IX3.js} +1751 -845
- package/dist/chunk-62XZ3IX3.js.map +1 -0
- package/dist/chunk-77THWHSU.js +308 -0
- package/dist/chunk-77THWHSU.js.map +1 -0
- package/dist/chunk-7CZLTFXF.js +466 -0
- package/dist/chunk-7CZLTFXF.js.map +1 -0
- package/dist/chunk-7N5AD2TC.js +327 -0
- package/dist/chunk-7N5AD2TC.js.map +1 -0
- package/dist/chunk-7SZ7MMCY.js +325 -0
- package/dist/chunk-7SZ7MMCY.js.map +1 -0
- package/dist/chunk-7TG6KTR2.js +3153 -0
- package/dist/chunk-7TG6KTR2.js.map +1 -0
- package/dist/chunk-AIX25FIQ.js +409 -0
- package/dist/chunk-AIX25FIQ.js.map +1 -0
- package/dist/chunk-AT2HD6RQ.js +1936 -0
- package/dist/chunk-AT2HD6RQ.js.map +1 -0
- package/dist/chunk-B27E3V37.js +29 -0
- package/dist/chunk-B27E3V37.js.map +1 -0
- package/dist/{chunk-5M6VTFJ5.js → chunk-B4EDAXMC.js} +37 -13
- package/dist/chunk-B4EDAXMC.js.map +1 -0
- package/dist/chunk-BOG2FED3.js +35 -0
- package/dist/chunk-BOG2FED3.js.map +1 -0
- package/dist/chunk-BQYQU5QW.js +109 -0
- package/dist/chunk-BQYQU5QW.js.map +1 -0
- package/dist/{chunk-PAJU5KKL.js → chunk-BRIOXCLH.js} +68 -25
- package/dist/chunk-BRIOXCLH.js.map +1 -0
- package/dist/chunk-CM7LVUKC.js +35 -0
- package/dist/chunk-CM7LVUKC.js.map +1 -0
- package/dist/{chunk-KCGXPP5V.js → chunk-CXIGFHVL.js} +35 -23
- package/dist/chunk-CXIGFHVL.js.map +1 -0
- package/dist/chunk-DHXKEJBH.js +71 -0
- package/dist/chunk-DHXKEJBH.js.map +1 -0
- package/dist/{chunk-NOSYBS2D.js → chunk-DN3TKURW.js} +12 -9
- package/dist/chunk-DN3TKURW.js.map +1 -0
- package/dist/chunk-DNJ23AWQ.js +35 -0
- package/dist/chunk-DNJ23AWQ.js.map +1 -0
- package/dist/chunk-ESAMXNBZ.js +3237 -0
- package/dist/chunk-ESAMXNBZ.js.map +1 -0
- package/dist/{chunk-4MDLEHXL.js → chunk-EWATYP5L.js} +64 -44
- package/dist/chunk-EWATYP5L.js.map +1 -0
- package/dist/{chunk-YBM6CQRU.js → chunk-FQ5CXNUG.js} +65 -42
- package/dist/chunk-FQ5CXNUG.js.map +1 -0
- package/dist/chunk-FVROZ7HR.js +14396 -0
- package/dist/chunk-FVROZ7HR.js.map +1 -0
- package/dist/chunk-HEVQKE27.js +150 -0
- package/dist/chunk-HEVQKE27.js.map +1 -0
- package/dist/chunk-HZ47S3DP.js +1086 -0
- package/dist/chunk-HZ47S3DP.js.map +1 -0
- package/dist/chunk-I5BJ7ENY.js +174 -0
- package/dist/chunk-I5BJ7ENY.js.map +1 -0
- package/dist/chunk-IGFZFLI2.js +1390 -0
- package/dist/chunk-IGFZFLI2.js.map +1 -0
- package/dist/chunk-IGVL3ELX.js +46 -0
- package/dist/chunk-IGVL3ELX.js.map +1 -0
- package/dist/chunk-IOD24LGR.js +384 -0
- package/dist/chunk-IOD24LGR.js.map +1 -0
- package/dist/chunk-IOYHDEP3.js +38 -0
- package/dist/chunk-IOYHDEP3.js.map +1 -0
- package/dist/chunk-IQL77TMM.js +803 -0
- package/dist/chunk-IQL77TMM.js.map +1 -0
- package/dist/chunk-IZV5FTJC.js +55 -0
- package/dist/chunk-IZV5FTJC.js.map +1 -0
- package/dist/{chunk-H5YGYNXS.js → chunk-JAYYFOOB.js} +75 -28
- package/dist/chunk-JAYYFOOB.js.map +1 -0
- package/dist/chunk-KN2MYSCC.js +409 -0
- package/dist/chunk-KN2MYSCC.js.map +1 -0
- package/dist/{chunk-PEI6RANI.js → chunk-KYVJMTXL.js} +434 -145
- package/dist/chunk-KYVJMTXL.js.map +1 -0
- package/dist/{chunk-ZYRGEKWS.js → chunk-LJUMYUBO.js} +3 -1
- package/dist/{chunk-ZYRGEKWS.js.map → chunk-LJUMYUBO.js.map} +1 -1
- package/dist/{chunk-ICA6R6TW.js → chunk-LNUD3JNI.js} +1532 -395
- package/dist/chunk-LNUD3JNI.js.map +1 -0
- package/dist/chunk-M357MHH3.js +2 -0
- package/dist/{chunk-BV5A4OTE.js → chunk-MEL6PH2I.js} +1218 -537
- package/dist/chunk-MEL6PH2I.js.map +1 -0
- package/dist/chunk-MF6WS2XF.js +386 -0
- package/dist/chunk-MF6WS2XF.js.map +1 -0
- package/dist/chunk-MK2TQO4Y.js +24 -0
- package/dist/chunk-MK2TQO4Y.js.map +1 -0
- package/dist/chunk-N7S72EXK.js +25 -0
- package/dist/chunk-N7S72EXK.js.map +1 -0
- package/dist/{chunk-KZ73RL76.js → chunk-NAWXARTY.js} +58 -9
- package/dist/chunk-NAWXARTY.js.map +1 -0
- package/dist/chunk-NX4ADH73.js +14 -0
- package/dist/chunk-NX4ADH73.js.map +1 -0
- package/dist/chunk-OYQQJL3J.js +16 -0
- package/dist/chunk-OYQQJL3J.js.map +1 -0
- package/dist/chunk-P4MKPCTC.js +51 -0
- package/dist/chunk-P4MKPCTC.js.map +1 -0
- package/dist/{chunk-JVYQRRC4.js → chunk-PEHTX3V7.js} +21 -1
- package/dist/chunk-PEHTX3V7.js.map +1 -0
- package/dist/chunk-PMV53IMM.js +26 -0
- package/dist/chunk-PMV53IMM.js.map +1 -0
- package/dist/{chunk-HUIKIDM5.js → chunk-QOEWDOFW.js} +295 -156
- package/dist/chunk-QOEWDOFW.js.map +1 -0
- package/dist/chunk-QV3DJVRZ.js +11 -0
- package/dist/chunk-QV3DJVRZ.js.map +1 -0
- package/dist/{chunk-HUMIRRYI.js → chunk-QYUYVSNG.js} +1103 -1699
- package/dist/chunk-QYUYVSNG.js.map +1 -0
- package/dist/{chunk-6J56T3MG.js → chunk-RRAQ5FV5.js} +186 -60
- package/dist/chunk-RRAQ5FV5.js.map +1 -0
- package/dist/{chunk-5YK2ZDIG.js → chunk-TNEZNMSN.js} +4 -10
- package/dist/chunk-TNEZNMSN.js.map +1 -0
- package/dist/{chunk-22KP6LR5.js → chunk-TXS65BB2.js} +3 -1
- package/dist/{chunk-22KP6LR5.js.map → chunk-TXS65BB2.js.map} +1 -1
- package/dist/chunk-UIWIOB4U.js +2215 -0
- package/dist/chunk-UIWIOB4U.js.map +1 -0
- package/dist/chunk-UNJPZGNK.js +63 -0
- package/dist/chunk-UNJPZGNK.js.map +1 -0
- package/dist/chunk-V7UGCQHQ.js +86 -0
- package/dist/chunk-V7UGCQHQ.js.map +1 -0
- package/dist/chunk-VU4QUISJ.js +3405 -0
- package/dist/chunk-VU4QUISJ.js.map +1 -0
- package/dist/chunk-WEY5J52U.js +467 -0
- package/dist/chunk-WEY5J52U.js.map +1 -0
- package/dist/chunk-WH2CBESG.js +409 -0
- package/dist/chunk-WH2CBESG.js.map +1 -0
- package/dist/{chunk-VZTQ73XT.js → chunk-XEA5BCMA.js} +3 -1
- package/dist/{chunk-VZTQ73XT.js.map → chunk-XEA5BCMA.js.map} +1 -1
- package/dist/{chunk-NLTS7JHI.js → chunk-XEIHS3RN.js} +834 -403
- package/dist/chunk-XEIHS3RN.js.map +1 -0
- package/dist/chunk-YNXZRE3F.js +408 -0
- package/dist/chunk-YNXZRE3F.js.map +1 -0
- package/dist/chunk-YSRBFJMQ.js +43 -0
- package/dist/chunk-YSRBFJMQ.js.map +1 -0
- package/dist/{chunk-NEXLLTP4.js → chunk-ZGFU4LVW.js} +6 -5
- package/dist/chunk-ZGFU4LVW.js.map +1 -0
- package/dist/chunk-ZO35BAMO.js +172 -0
- package/dist/chunk-ZO35BAMO.js.map +1 -0
- package/dist/chunk-ZUWF4NF7.js +13 -0
- package/dist/chunk-ZUWF4NF7.js.map +1 -0
- package/dist/client.d.ts +15 -6
- package/dist/clipboard.js +3 -1
- package/dist/commands/registry.d.ts +2 -1
- package/dist/commands/types.d.ts +2 -0
- package/dist/components/anthropic-mark.d.ts +3 -0
- package/dist/components/approval-surface.d.ts +21 -7
- package/dist/components/artifacts/artifact-chrome.d.ts +121 -0
- package/dist/components/artifacts/artifact-sandbox.d.ts +30 -0
- package/dist/components/artifacts/artifact-surface.d.ts +4 -2
- package/dist/components/artifacts/chat-interactive-block.d.ts +29 -0
- package/dist/components/artifacts/deferred-chat-media.d.ts +15 -0
- package/dist/components/artifacts/document-editor.d.ts +4 -2
- package/dist/components/artifacts/editable-artifact-ui.d.ts +4 -2
- package/dist/components/artifacts/editable-artifact-view.d.ts +48 -0
- package/dist/components/artifacts/editable-document.d.ts +3 -2
- package/dist/components/artifacts/editable-presentation.d.ts +4 -3
- package/dist/components/artifacts/editable-spreadsheet.d.ts +8 -3
- package/dist/components/artifacts/index.d.ts +8 -1
- package/dist/components/artifacts/inline-html-document.d.ts +2 -0
- package/dist/components/artifacts/latest-task-runner.d.ts +15 -0
- package/dist/components/artifacts/presentation-editor.d.ts +6 -2
- package/dist/components/artifacts/published-html-artifact-frame.d.ts +17 -40
- package/dist/components/artifacts/session-artifact-viewer.d.ts +39 -0
- package/dist/components/artifacts/site-view.d.ts +26 -0
- package/dist/components/artifacts/spreadsheet-command-queue.d.ts +20 -0
- package/dist/components/artifacts/spreadsheet-download.d.ts +7 -0
- package/dist/components/artifacts/spreadsheet-general-display.d.ts +24 -0
- package/dist/components/artifacts/spreadsheet-grid.d.ts +11 -4
- package/dist/components/artifacts/spreadsheet-resize.d.ts +50 -0
- package/dist/components/artifacts/spreadsheet-submissions.d.ts +9 -0
- package/dist/components/artifacts/visualization-assets.gen.d.ts +2 -0
- package/dist/components/browser-select-control.d.ts +16 -0
- package/dist/components/browser-viewer.d.ts +11 -2
- package/dist/components/chat-composer.d.ts +21 -3
- package/dist/components/child-session-link.d.ts +5 -1
- package/dist/components/claude-mark.d.ts +3 -0
- package/dist/components/code-editor.d.ts +1 -4
- package/dist/components/command-palette.d.ts +1 -1
- package/dist/components/composer-transcription-control.d.ts +7 -0
- package/dist/components/composer.d.ts +30 -67
- package/dist/components/computer-viewer.d.ts +1 -1
- package/dist/components/copy-button.d.ts +3 -1
- package/dist/components/desktop-viewer.d.ts +1 -1
- package/dist/components/generated-video-player.d.ts +1 -1
- package/dist/components/grok-mark.d.ts +26 -0
- package/dist/components/human-input-form.d.ts +26 -32
- package/dist/components/human-input-surface.d.ts +5 -1
- package/dist/components/linkified-text.d.ts +18 -0
- package/dist/components/machine-input-display.d.ts +25 -3
- package/dist/components/machine-status-pill.d.ts +3 -2
- package/dist/components/machines/agent-status-icon.d.ts +6 -0
- package/dist/components/machines/health.d.ts +2 -1
- package/dist/components/machines/machine-detail.d.ts +7 -1
- package/dist/components/machines/machine-status.d.ts +49 -0
- package/dist/components/machines/metric-history-chart.d.ts +1 -1
- package/dist/components/machines/series.d.ts +3 -2
- package/dist/components/markdown-table-layout.d.ts +11 -2
- package/dist/components/markdown.d.ts +37 -4
- package/dist/components/message-timeline.d.ts +79 -7
- package/dist/components/model-mark.d.ts +29 -0
- package/dist/components/model-picker.d.ts +1 -1
- package/dist/components/model-policy-picker.d.ts +31 -22
- package/dist/components/new-conversation.d.ts +32 -0
- package/dist/components/open-geni-chat.d.ts +73 -0
- package/dist/components/open-geni-links.d.ts +69 -0
- package/dist/components/openrouter-mark.d.ts +6 -0
- package/dist/components/opper-mark.d.ts +7 -0
- package/dist/components/preview-loading.d.ts +2 -0
- package/dist/components/provider-recovery-notice.d.ts +17 -0
- package/dist/components/queue-item-content.d.ts +10 -0
- package/dist/components/rehype-secret-refs.d.ts +23 -0
- package/dist/components/remark-soft-line-breaks.d.ts +38 -0
- package/dist/components/sandbox-workspace.d.ts +18 -0
- package/dist/components/secret-question-field.d.ts +31 -0
- package/dist/components/secret-ref-chip.d.ts +35 -0
- package/dist/components/session-capability-frame.d.ts +37 -0
- package/dist/components/session-chrome.d.ts +20 -7
- package/dist/components/session-commands.d.ts +6 -0
- package/dist/components/session-connection-request.d.ts +8 -0
- package/dist/components/session-conversation.d.ts +147 -6
- package/dist/components/session-list.d.ts +39 -0
- package/dist/components/session-mcp-capability-card.d.ts +41 -0
- package/dist/components/session-proxy-scope.d.ts +35 -0
- package/dist/components/session-status.d.ts +6 -2
- package/dist/components/session-usage-limit-notice.d.ts +39 -0
- package/dist/components/this-computer/illustrations.d.ts +38 -0
- package/dist/components/this-computer/labels.d.ts +111 -0
- package/dist/components/this-computer/this-computer-card.d.ts +40 -0
- package/dist/components/this-computer/this-computer-setup.d.ts +35 -0
- package/dist/components/this-computer/this-computer-status.d.ts +42 -0
- package/dist/components/this-computer/use-this-computer.d.ts +29 -0
- package/dist/components/timeline-anchor.d.ts +3 -0
- package/dist/components/timeline-annotation-shared.d.ts +3 -2
- package/dist/components/timeline-annotations-dialog.d.ts +2 -1
- package/dist/components/timeline-annotations.d.ts +5 -1
- package/dist/components/timeline-reading-progress.d.ts +11 -0
- package/dist/components/timeline-search.d.ts +34 -0
- package/dist/components/timeline-settlement.d.ts +16 -0
- package/dist/components/tool-action-review.d.ts +48 -0
- package/dist/components/tool-review-history.d.ts +25 -0
- package/dist/components/usage-limit-notice.d.ts +50 -0
- package/dist/components/usage-member-list.d.ts +92 -0
- package/dist/components/usage-meter.d.ts +74 -0
- package/dist/components/use-viewer-menu-dismiss.d.ts +2 -0
- package/dist/components/user-message-body.d.ts +10 -1
- package/dist/components/workbench-changes.d.ts +2 -1
- package/dist/composer-messages.d.ts +75 -0
- package/dist/composer-messages.js +9 -0
- package/dist/composer-messages.js.map +1 -0
- package/dist/composer-voice-events.d.ts +8 -0
- package/dist/composer.d.ts +3 -3
- package/dist/composer.js +25 -12
- package/dist/computer-viewer-VOIOZGVZ.js +21 -0
- package/dist/computer-viewer-VOIOZGVZ.js.map +1 -0
- package/dist/connect-account-identity.d.ts +8 -0
- package/dist/connect-accounts.d.ts +15 -0
- package/dist/connect-chooser.d.ts +18 -0
- package/dist/connect-panel.d.ts +18 -0
- package/dist/connect-setup.d.ts +18 -0
- package/dist/connect.d.ts +21 -0
- package/dist/connect.js +2216 -0
- package/dist/connect.js.map +1 -0
- package/dist/connection-catalog.d.ts +38 -0
- package/dist/connection-discovery.d.ts +12 -0
- package/dist/connection-installed.d.ts +17 -0
- package/dist/connection-logo.d.ts +9 -0
- package/dist/connection-service-logo.d.ts +8 -0
- package/dist/connection-service-presentation.d.ts +13 -0
- package/dist/connection-skeleton.d.ts +5 -0
- package/dist/connection-type-picker.d.ts +6 -0
- package/dist/conversation-timeline.d.ts +1 -1
- package/dist/desktop.d.ts +7 -0
- package/dist/desktop.js +28 -0
- package/dist/desktop.js.map +1 -0
- package/dist/device-authorization.d.ts +23 -0
- package/dist/diffs.d.ts +8 -0
- package/dist/diffs.js +15 -0
- package/dist/diffs.js.map +1 -0
- package/dist/discovery-cache.d.ts +5 -0
- package/dist/editor.d.ts +7 -0
- package/dist/editor.js +23 -0
- package/dist/editor.js.map +1 -0
- package/dist/embedded-new-voice-KPLC5UJZ.js +19 -0
- package/dist/embedded-new-voice-KPLC5UJZ.js.map +1 -0
- package/dist/embedded-voice-V2RFSLIU.js +19 -0
- package/dist/embedded-voice-V2RFSLIU.js.map +1 -0
- package/dist/fleet-decision-row-FE73NSQ6.js +361 -0
- package/dist/fleet-decision-row-FE73NSQ6.js.map +1 -0
- package/dist/hooks/internal.d.ts +27 -2
- package/dist/hooks/latest-question.d.ts +26 -0
- package/dist/hooks/session-view-cache.d.ts +38 -0
- package/dist/hooks/shared-machines-list.d.ts +4 -0
- package/dist/hooks/shared-query.d.ts +123 -0
- package/dist/hooks/use-attached-browsers.d.ts +1 -1
- package/dist/hooks/use-auth-runs.d.ts +1 -4
- package/dist/hooks/use-available-models.d.ts +8 -3
- package/dist/hooks/use-browser-frame-stream.d.ts +1 -1
- package/dist/hooks/use-browser-session.d.ts +12 -1
- package/dist/hooks/use-client-config-flags.d.ts +49 -0
- package/dist/hooks/use-codex-accounts.d.ts +48 -9
- package/dist/hooks/use-composer.d.ts +24 -3
- package/dist/hooks/use-computer-frame-stream.d.ts +1 -1
- package/dist/hooks/use-computer-input-posture.d.ts +13 -0
- package/dist/hooks/use-computer-session.d.ts +5 -0
- package/dist/hooks/use-connect.d.ts +23 -0
- package/dist/hooks/use-desktop-stream.d.ts +1 -1
- package/dist/hooks/use-file-attachments.d.ts +4 -0
- package/dist/hooks/use-goal.d.ts +2 -1
- package/dist/hooks/use-last-started-turn-policy.d.ts +5 -1
- package/dist/hooks/use-machine-chip.d.ts +3 -2
- package/dist/hooks/use-new-conversation.d.ts +56 -0
- package/dist/hooks/use-new-session-draft.d.ts +74 -0
- package/dist/hooks/use-realtime-voice-models.d.ts +7 -0
- package/dist/hooks/use-sandbox-files.d.ts +3 -2
- package/dist/hooks/use-session-conversation.d.ts +49 -0
- package/dist/hooks/use-session-events.d.ts +21 -2
- package/dist/hooks/use-session-mcp-approval-policy.d.ts +2 -2
- package/dist/hooks/use-session-model-account.d.ts +48 -0
- package/dist/hooks/use-supergrok-accounts.d.ts +7 -1
- package/dist/hooks/use-terminal-stream.d.ts +11 -5
- package/dist/hooks/use-transcription.d.ts +2 -1
- package/dist/hooks/use-usage.d.ts +40 -0
- package/dist/hooks/use-vaults.d.ts +53 -0
- package/dist/hooks/use-voice-input.d.ts +8 -1
- package/dist/hooks/use-workspace-sessions.d.ts +24 -5
- package/dist/human-input-model.d.ts +123 -0
- package/dist/identity-link-accounts.d.ts +11 -0
- package/dist/identity-link-consent.d.ts +18 -0
- package/dist/index.d.ts +83 -18
- package/dist/index.js +2317 -6453
- package/dist/index.js.map +1 -1
- package/dist/interaction.d.ts +1 -1
- package/dist/interaction.js +20 -29
- package/dist/interaction.js.map +1 -1
- package/dist/latest-question-SXBXROBT.js +118 -0
- package/dist/latest-question-SXBXROBT.js.map +1 -0
- package/dist/lib/client-config-read.d.ts +31 -0
- package/dist/lib/clipboard.d.ts +7 -0
- package/dist/lib/error-message.d.ts +7 -0
- package/dist/lib/format.d.ts +59 -9
- package/dist/lib/host-theme.d.ts +77 -0
- package/dist/lib/interaction-errors.d.ts +3 -0
- package/dist/lib/menu-styles.d.ts +22 -0
- package/dist/lib/notify-observer.d.ts +2 -0
- package/dist/lib/pierre-diffs-loader.d.ts +20 -0
- package/dist/lib/provider-recovery.d.ts +56 -0
- package/dist/lib/scrollbars.d.ts +11 -0
- package/dist/lib/terminal-input-readiness.d.ts +11 -0
- package/dist/lib/transient-retry.d.ts +26 -0
- package/dist/lib/workbench-peers.d.ts +36 -0
- package/dist/lib/xterm-theme.d.ts +7 -5
- package/dist/machines.js +12 -6
- package/dist/{markdown-table-layout-3Z3AWBY7.js → markdown-table-layout-3PV2UAAH.js} +51 -9
- package/dist/markdown-table-layout-3PV2UAAH.js.map +1 -0
- package/dist/mcp-connection-status.d.ts +15 -0
- package/dist/messages/en.d.ts +3328 -0
- package/dist/messages/runtime.d.ts +69 -0
- package/dist/messages.d.ts +3 -0
- package/dist/messages.js +16 -0
- package/dist/messages.js.map +1 -0
- package/dist/model-mark-paths.d.ts +34 -0
- package/dist/model-mark-paths.js +16 -0
- package/dist/model-mark-paths.js.map +1 -0
- package/dist/model-picker-model.d.ts +112 -0
- package/dist/model-picker-model.js +25 -0
- package/dist/model-picker-model.js.map +1 -0
- package/dist/model-policy-picker-menu-NWIETWSR.js +18 -0
- package/dist/model-policy-picker-menu-NWIETWSR.js.map +1 -0
- package/dist/model-policy.d.ts +35 -10
- package/dist/model-policy.js +12 -1
- package/dist/native-previews.d.ts +29 -0
- package/dist/native-previews.js +82 -0
- package/dist/native-previews.js.map +1 -0
- package/dist/new-session-draft.d.ts +7 -0
- package/dist/new-session-draft.js +639 -0
- package/dist/new-session-draft.js.map +1 -0
- package/dist/notification-text.d.ts +27 -0
- package/dist/{noto-sans-arabic-loader-IA2T4X2A.js → noto-sans-arabic-loader-XSH2KYWJ.js} +3 -1
- package/dist/{noto-sans-arabic-loader-IA2T4X2A.js.map → noto-sans-arabic-loader-XSH2KYWJ.js.map} +1 -1
- package/dist/{noto-sans-jp-loader.generated-HFGLYBR3.js → noto-sans-jp-loader.generated-MR5L6V7K.js} +3 -1
- package/dist/{noto-sans-jp-loader.generated-HFGLYBR3.js.map → noto-sans-jp-loader.generated-MR5L6V7K.js.map} +1 -1
- package/dist/organization-model.d.ts +33 -0
- package/dist/organization-model.js +65 -0
- package/dist/organization-model.js.map +1 -0
- package/dist/platform-activity-row-VSQ2FZ5T.js +119 -0
- package/dist/platform-activity-row-VSQ2FZ5T.js.map +1 -0
- package/dist/plugin-details.d.ts +14 -0
- package/dist/plugin-discovery.d.ts +25 -0
- package/dist/preview-loading-paint.d.ts +20 -0
- package/dist/provider.d.ts +37 -2
- package/dist/queue-presentation-model.d.ts +73 -0
- package/dist/queue-presentation-model.js +38 -0
- package/dist/queue-presentation-model.js.map +1 -0
- package/dist/{queue-surface-implementation-LK3S4BIW.js → queue-surface-implementation-MEKXXWGR.js} +189 -343
- package/dist/queue-surface-implementation-MEKXXWGR.js.map +1 -0
- package/dist/realtime/embedded-new-voice.d.ts +1 -0
- package/dist/realtime/embedded-voice.d.ts +1 -0
- package/dist/realtime/realtime-control.d.ts +4 -65
- package/dist/realtime/session-realtime.d.ts +79 -0
- package/dist/realtime.js +26 -1333
- package/dist/realtime.js.map +1 -1
- package/dist/sandbox-files-5NRC2QUT.js +24 -0
- package/dist/sandbox-files-5NRC2QUT.js.map +1 -0
- package/dist/sandbox-label-model.d.ts +31 -0
- package/dist/sandbox-label-model.js +20 -0
- package/dist/sandbox-label-model.js.map +1 -0
- package/dist/scrollbars.d.ts +1 -0
- package/dist/scrollbars.js +10 -0
- package/dist/scrollbars.js.map +1 -0
- package/dist/secret-reference-label.d.ts +15 -0
- package/dist/secrets-ui.d.ts +57 -0
- package/dist/session-agents-model.d.ts +11 -0
- package/dist/session-agents-model.js +25 -0
- package/dist/session-agents-model.js.map +1 -0
- package/dist/session-attention-model.d.ts +8 -0
- package/dist/session-attention-model.js +47 -0
- package/dist/session-attention-model.js.map +1 -0
- package/dist/session-auth-recommendation.d.ts +6 -0
- package/dist/session-capability-policy.d.ts +32 -0
- package/dist/session-context.d.ts +9 -1
- package/dist/session-feedback-model.d.ts +21 -0
- package/dist/session-feedback-model.js +56 -0
- package/dist/session-feedback-model.js.map +1 -0
- package/dist/session-list-model.d.ts +139 -0
- package/dist/session-list-model.js +274 -0
- package/dist/session-list-model.js.map +1 -0
- package/dist/session-realtime-OZCE6IKP.js +22 -0
- package/dist/session-realtime-OZCE6IKP.js.map +1 -0
- package/dist/session-realtime.d.ts +7 -0
- package/dist/session-realtime.js +20 -0
- package/dist/session-realtime.js.map +1 -0
- package/dist/session-status-model.d.ts +37 -0
- package/dist/session-ui.d.ts +40 -3
- package/dist/session-ui.js +127 -21
- package/dist/session-ui.js.map +1 -1
- package/dist/session.d.ts +10 -2
- package/dist/session.js +44 -20
- package/dist/site-snapshot.d.ts +14 -0
- package/dist/sites-ui.d.ts +24 -0
- package/dist/sites.d.ts +3 -0
- package/dist/sites.js +15 -0
- package/dist/sites.js.map +1 -0
- package/dist/skill-discovery.d.ts +47 -0
- package/dist/terminal.d.ts +8 -0
- package/dist/terminal.js +33 -0
- package/dist/terminal.js.map +1 -0
- package/dist/testing/session-scenarios.d.ts +10 -0
- package/dist/testing/session-scenarios.js +367 -0
- package/dist/testing/session-scenarios.js.map +1 -0
- package/dist/this-computer.d.ts +8 -0
- package/dist/this-computer.js +1042 -0
- package/dist/this-computer.js.map +1 -0
- package/dist/timeline/activity-rail.d.ts +12 -2
- package/dist/timeline/agent-identity.d.ts +30 -0
- package/dist/timeline/agent-row.d.ts +31 -0
- package/dist/timeline/allowance-exhausted-row.d.ts +24 -0
- package/dist/timeline/compaction-copy.d.ts +47 -0
- package/dist/timeline/focus-sequence.d.ts +9 -0
- package/dist/timeline/genie-copy.d.ts +4 -0
- package/dist/timeline/genie-loading.d.ts +48 -0
- package/dist/timeline/index.d.ts +12 -5
- package/dist/timeline/invoked-tool.d.ts +6 -0
- package/dist/timeline/knowledge-receipt.d.ts +17 -0
- package/dist/timeline/learning-refusal-copy.d.ts +23 -0
- package/dist/timeline/learning-refusal-row.d.ts +19 -0
- package/dist/timeline/message-sender.d.ts +19 -0
- package/dist/timeline/notice-presentation.d.ts +14 -0
- package/dist/timeline/parsers.d.ts +11 -0
- package/dist/timeline/patch-apply-command.d.ts +19 -0
- package/dist/timeline/platform-activity-presentation.d.ts +26 -0
- package/dist/timeline/platform-activity-row.d.ts +1 -2
- package/dist/timeline/presented-image.d.ts +11 -0
- package/dist/timeline/projection.d.ts +32 -2
- package/dist/timeline/provider-logo.d.ts +15 -0
- package/dist/timeline/question-nav-model.d.ts +23 -0
- package/dist/timeline/registry.d.ts +10 -1
- package/dist/timeline/retained-image.d.ts +18 -0
- package/dist/timeline/retained-loaders.d.ts +27 -0
- package/dist/timeline/rolling-activity.d.ts +11 -0
- package/dist/timeline/screenshot-lightbox.d.ts +23 -1
- package/dist/timeline/session-usage-limit-row.d.ts +11 -0
- package/dist/timeline/shared.d.ts +8 -3
- package/dist/timeline/startup-dispatch-details.d.ts +5 -0
- package/dist/timeline/startup-preference.d.ts +3 -0
- package/dist/timeline/startup-timings.d.ts +4 -0
- package/dist/timeline/tool-display-name.d.ts +6 -2
- package/dist/timeline/tool-presentation.d.ts +185 -0
- package/dist/timeline/turn-summary-model.d.ts +102 -0
- package/dist/timeline/turn-summary.d.ts +20 -54
- package/dist/timeline/types.d.ts +184 -7
- package/dist/timeline/work-presentation.d.ts +61 -0
- package/dist/{timeline-annotation-markers-DRSTLEM6.js → timeline-annotation-markers-HYLRTT6S.js} +11 -6
- package/dist/timeline-annotation-markers-HYLRTT6S.js.map +1 -0
- package/dist/{timeline-annotation-selection-IHLUGVND.js → timeline-annotation-selection-LBKW5GHA.js} +15 -5
- package/dist/timeline-annotation-selection-LBKW5GHA.js.map +1 -0
- package/dist/{timeline-annotations-dialog-6Q53N5FG.js → timeline-annotations-dialog-JKVINC42.js} +34 -19
- package/dist/timeline-annotations-dialog-JKVINC42.js.map +1 -0
- package/dist/timeline-model.d.ts +29 -0
- package/dist/timeline-model.js +254 -0
- package/dist/timeline-model.js.map +1 -0
- package/dist/usage/allowance-copy.d.ts +26 -0
- package/dist/usage/session-usage-limit.d.ts +89 -0
- package/dist/usage/summary.d.ts +35 -0
- package/dist/usage.d.ts +17 -0
- package/dist/usage.js +1201 -0
- package/dist/usage.js.map +1 -0
- package/dist/voice-recording-owner.d.ts +7 -0
- package/package.json +119 -7
- package/src/approvals.ts +8 -1
- package/src/artifacts-spreadsheet.ts +1 -0
- package/src/artifacts.ts +41 -0
- package/src/assets/README.md +8 -0
- package/src/assets/gmail.ico +0 -0
- package/src/assets/outlook.ico +0 -0
- package/src/capability-catalog-row.tsx +96 -0
- package/src/capability-logo-fallback.ts +22 -0
- package/src/client.ts +18 -30
- package/src/commands/registry.ts +46 -36
- package/src/commands/types.ts +2 -0
- package/src/components/anthropic-mark.tsx +10 -0
- package/src/components/approval-surface.tsx +407 -142
- package/src/components/artifacts/artifact-chrome.tsx +425 -0
- package/src/components/artifacts/artifact-sandbox.tsx +193 -0
- package/src/components/artifacts/artifact-surface.tsx +48 -26
- package/src/components/artifacts/chat-interactive-block.tsx +260 -0
- package/src/components/artifacts/deferred-chat-media.tsx +72 -0
- package/src/components/artifacts/document-editor.tsx +193 -45
- package/src/components/artifacts/editable-artifact-ui.tsx +23 -11
- package/src/components/artifacts/editable-artifact-view.tsx +199 -0
- package/src/components/artifacts/editable-artifact-workbench.tsx +8 -3
- package/src/components/artifacts/editable-document.tsx +76 -54
- package/src/components/artifacts/editable-presentation.tsx +86 -40
- package/src/components/artifacts/editable-spreadsheet.tsx +581 -121
- package/src/components/artifacts/index.ts +42 -0
- package/src/components/artifacts/inline-html-document.ts +24 -0
- package/src/components/artifacts/latest-task-runner.ts +49 -0
- package/src/components/artifacts/presentation-editor.tsx +422 -122
- package/src/components/artifacts/published-html-artifact-frame.tsx +79 -265
- package/src/components/artifacts/session-artifact-viewer.tsx +381 -0
- package/src/components/artifacts/site-view.tsx +129 -0
- package/src/components/artifacts/spreadsheet-canvas.ts +5 -10
- package/src/components/artifacts/spreadsheet-command-queue.ts +190 -0
- package/src/components/artifacts/spreadsheet-download.tsx +117 -0
- package/src/components/artifacts/spreadsheet-general-display.ts +43 -0
- package/src/components/artifacts/spreadsheet-grid.tsx +390 -172
- package/src/components/artifacts/spreadsheet-resize.tsx +432 -0
- package/src/components/artifacts/spreadsheet-submissions.tsx +46 -0
- package/src/components/artifacts/visualization-assets/base.css +1015 -0
- package/src/components/artifacts/visualization-assets/helpers.html +349 -0
- package/src/components/artifacts/visualization-assets.gen.ts +3 -0
- package/src/components/browser-select-control.tsx +320 -0
- package/src/components/browser-viewer.tsx +1102 -505
- package/src/components/chat-composer.tsx +42 -3
- package/src/components/child-session-link.tsx +16 -5
- package/src/components/claude-mark.tsx +11 -0
- package/src/components/code-editor.tsx +38 -27
- package/src/components/command-palette.tsx +4 -1
- package/src/components/composer-transcription-control.tsx +151 -50
- package/src/components/composer.tsx +281 -176
- package/src/components/computer-viewer.tsx +1013 -341
- package/src/components/copy-button.tsx +17 -7
- package/src/components/desktop-viewer.tsx +42 -33
- package/src/components/diff-view.tsx +3 -1
- package/src/components/enrollment-consent.tsx +39 -34
- package/src/components/enrollment-device-flow.tsx +31 -19
- package/src/components/file-browser.tsx +47 -35
- package/src/components/fleet-tile.tsx +8 -4
- package/src/components/generated-video-player.tsx +10 -5
- package/src/components/grok-mark.tsx +34 -0
- package/src/components/human-input-form.tsx +438 -251
- package/src/components/human-input-surface.tsx +8 -0
- package/src/components/interaction-intervention-banner.tsx +15 -13
- package/src/components/linkified-text.tsx +79 -0
- package/src/components/machine-card.tsx +56 -89
- package/src/components/machine-dock-bar.tsx +10 -4
- package/src/components/machine-health-pill.tsx +4 -2
- package/src/components/machine-input-display.ts +309 -34
- package/src/components/machine-metrics.tsx +10 -7
- package/src/components/machine-status-pill.tsx +23 -15
- package/src/components/machines/agent-status-icon.tsx +31 -0
- package/src/components/machines/health.ts +53 -10
- package/src/components/machines/machine-detail.tsx +230 -42
- package/src/components/machines/machine-operation-policy.tsx +36 -29
- package/src/components/machines/machine-status.ts +264 -0
- package/src/components/machines/metric-history-chart.tsx +8 -2
- package/src/components/machines/series.ts +12 -11
- package/src/components/machines-dashboard.tsx +16 -9
- package/src/components/markdown-table-layout.ts +67 -9
- package/src/components/markdown.tsx +470 -133
- package/src/components/message-timeline.tsx +2290 -752
- package/src/components/model-mark.tsx +102 -0
- package/src/components/model-picker.tsx +27 -9
- package/src/components/model-policy-picker-menu.tsx +204 -100
- package/src/components/model-policy-picker.tsx +215 -152
- package/src/components/new-conversation.tsx +223 -0
- package/src/components/open-geni-chat.tsx +311 -0
- package/src/components/open-geni-links.tsx +183 -0
- package/src/components/openrouter-mark.tsx +13 -0
- package/src/components/opper-mark.tsx +18 -0
- package/src/components/pierre-diff.tsx +47 -19
- package/src/components/pierre-file.tsx +38 -11
- package/src/components/preview-loading.tsx +111 -0
- package/src/components/provider-recovery-notice.tsx +51 -0
- package/src/components/queue-item-content.ts +16 -0
- package/src/components/queue-surface-implementation.tsx +185 -420
- package/src/components/queue-surface-state.tsx +13 -8
- package/src/components/queue-surface.tsx +3 -1
- package/src/components/rehype-secret-refs.ts +98 -0
- package/src/components/remark-soft-line-breaks.ts +166 -0
- package/src/components/sandbox-files.tsx +75 -44
- package/src/components/sandbox-terminal.tsx +103 -22
- package/src/components/sandbox-workspace.tsx +168 -78
- package/src/components/secret-question-field.tsx +326 -0
- package/src/components/secret-ref-chip.tsx +187 -0
- package/src/components/session-capability-frame.tsx +203 -0
- package/src/components/session-chrome.tsx +559 -328
- package/src/components/session-commands-panel.tsx +34 -17
- package/src/components/session-commands.tsx +18 -0
- package/src/components/session-connection-request.tsx +99 -0
- package/src/components/session-conversation.tsx +853 -118
- package/src/components/session-list.tsx +259 -0
- package/src/components/session-mcp-capability-card.tsx +681 -0
- package/src/components/session-proxy-scope.tsx +160 -0
- package/src/components/session-status.tsx +35 -21
- package/src/components/session-usage-limit-notice.tsx +176 -0
- package/src/components/this-computer/illustrations.tsx +164 -0
- package/src/components/this-computer/labels.ts +234 -0
- package/src/components/this-computer/this-computer-card.tsx +203 -0
- package/src/components/this-computer/this-computer-setup.tsx +433 -0
- package/src/components/this-computer/this-computer-status.tsx +329 -0
- package/src/components/this-computer/use-this-computer.ts +183 -0
- package/src/components/timeline-anchor.tsx +43 -15
- package/src/components/timeline-annotation-chrome.tsx +33 -9
- package/src/components/timeline-annotation-markers.tsx +4 -2
- package/src/components/timeline-annotation-selection.tsx +11 -2
- package/src/components/timeline-annotation-shared.ts +9 -8
- package/src/components/timeline-annotations-dialog.tsx +30 -9
- package/src/components/timeline-annotations.tsx +24 -7
- package/src/components/timeline-reading-progress.ts +80 -0
- package/src/components/timeline-search.tsx +168 -0
- package/src/components/timeline-settlement.ts +60 -0
- package/src/components/tool-action-review.tsx +670 -0
- package/src/components/tool-review-history.tsx +88 -0
- package/src/components/usage-limit-notice.tsx +183 -0
- package/src/components/usage-member-list.tsx +797 -0
- package/src/components/usage-meter.tsx +386 -0
- package/src/components/use-viewer-menu-dismiss.ts +33 -0
- package/src/components/user-message-body.tsx +33 -2
- package/src/components/workbench-changes.tsx +28 -16
- package/src/components/workspace-dock.tsx +45 -13
- package/src/composer-messages.ts +153 -0
- package/src/composer-voice-events.ts +12 -0
- package/src/composer.ts +4 -0
- package/src/connect-account-identity.tsx +38 -0
- package/src/connect-accounts.tsx +233 -0
- package/src/connect-chooser.tsx +339 -0
- package/src/connect-panel.tsx +104 -0
- package/src/connect-setup.tsx +354 -0
- package/src/connect.ts +60 -0
- package/src/connection-assets.d.ts +4 -0
- package/src/connection-catalog.tsx +175 -0
- package/src/connection-discovery.tsx +251 -0
- package/src/connection-installed.tsx +56 -0
- package/src/connection-logo.tsx +37 -0
- package/src/connection-service-logo.tsx +55 -0
- package/src/connection-service-presentation.ts +46 -0
- package/src/connection-skeleton.tsx +16 -0
- package/src/connection-type-picker.tsx +38 -0
- package/src/conversation-timeline.ts +11 -2
- package/src/desktop.ts +24 -0
- package/src/device-authorization.tsx +111 -0
- package/src/diffs.ts +16 -0
- package/src/discovery-cache.ts +42 -0
- package/src/editor.ts +13 -0
- package/src/hooks/internal.ts +93 -10
- package/src/hooks/latest-question.ts +168 -0
- package/src/hooks/session-view-cache.ts +167 -0
- package/src/hooks/shared-machines-list.ts +34 -1
- package/src/hooks/shared-query.ts +744 -0
- package/src/hooks/use-attached-browsers.ts +1 -1
- package/src/hooks/use-auth-runs.ts +0 -27
- package/src/hooks/use-available-models.ts +20 -10
- package/src/hooks/use-browser-frame-stream.ts +23 -4
- package/src/hooks/use-browser-session.ts +684 -206
- package/src/hooks/use-browser-sessions.ts +32 -1
- package/src/hooks/use-client-config-flags.ts +102 -0
- package/src/hooks/use-codex-accounts.ts +216 -43
- package/src/hooks/use-composer.ts +240 -59
- package/src/hooks/use-computer-frame-stream.ts +29 -9
- package/src/hooks/use-computer-input-posture.ts +96 -0
- package/src/hooks/use-computer-session.ts +419 -100
- package/src/hooks/use-connect.ts +23 -0
- package/src/hooks/use-desktop-stream.ts +19 -28
- package/src/hooks/use-file-attachments.ts +19 -3
- package/src/hooks/use-goal.ts +172 -21
- package/src/hooks/use-human-input.ts +16 -2
- package/src/hooks/use-last-started-turn-policy.ts +37 -11
- package/src/hooks/use-machine-chip.ts +13 -8
- package/src/hooks/use-machines.ts +24 -10
- package/src/hooks/use-new-conversation.ts +377 -0
- package/src/hooks/use-new-session-draft.ts +813 -0
- package/src/hooks/use-realtime-voice-models.ts +46 -0
- package/src/hooks/use-sandbox-files.ts +22 -16
- package/src/hooks/use-session-background-commands.ts +2 -2
- package/src/hooks/use-session-capabilities.ts +3 -2
- package/src/hooks/use-session-conversation.ts +150 -0
- package/src/hooks/use-session-events.ts +403 -64
- package/src/hooks/use-session-lineage.ts +47 -9
- package/src/hooks/use-session-mcp-approval-policy.ts +13 -5
- package/src/hooks/use-session-model-account.ts +174 -0
- package/src/hooks/use-session.ts +19 -3
- package/src/hooks/use-slash-commands.ts +6 -11
- package/src/hooks/use-supergrok-accounts.ts +22 -8
- package/src/hooks/use-terminal-stream.ts +153 -27
- package/src/hooks/use-transcription.ts +45 -19
- package/src/hooks/use-turn-queue.ts +25 -5
- package/src/hooks/use-usage.ts +100 -0
- package/src/hooks/use-vaults.ts +153 -0
- package/src/hooks/use-video-artifact-playback.ts +1 -1
- package/src/hooks/use-voice-input.ts +127 -19
- package/src/hooks/use-workspace-capture.ts +3 -2
- package/src/hooks/use-workspace-sessions.ts +74 -7
- package/src/human-input-model.ts +374 -0
- package/src/identity-link-accounts.tsx +149 -0
- package/src/identity-link-consent.tsx +193 -0
- package/src/index.ts +282 -16
- package/src/interaction.ts +1 -0
- package/src/lib/client-config-read.ts +76 -0
- package/src/lib/clipboard.ts +29 -0
- package/src/lib/error-message.ts +37 -0
- package/src/lib/format.ts +231 -36
- package/src/lib/host-theme.ts +529 -0
- package/src/lib/interaction-errors.ts +15 -0
- package/src/lib/menu-styles.ts +44 -0
- package/src/lib/notify-observer.ts +15 -0
- package/src/lib/pierre-diffs-loader.ts +53 -0
- package/src/lib/provider-recovery.ts +255 -0
- package/src/lib/scrollbars.ts +30 -0
- package/src/lib/terminal-input-readiness.ts +51 -0
- package/src/lib/transient-retry.ts +101 -0
- package/src/lib/workbench-peers.ts +62 -0
- package/src/lib/xterm-theme.ts +23 -21
- package/src/mcp-connection-status.ts +39 -0
- package/src/messages/en.ts +3810 -0
- package/src/messages/runtime.tsx +175 -0
- package/src/messages.ts +19 -0
- package/src/model-mark-paths.ts +53 -0
- package/src/model-picker-model.ts +343 -0
- package/src/model-policy.ts +301 -79
- package/src/native-previews.ts +104 -0
- package/src/new-session-draft.ts +22 -0
- package/src/notification-text.ts +81 -0
- package/src/organization-model.ts +123 -0
- package/src/plugin-details.tsx +192 -0
- package/src/plugin-discovery.tsx +209 -0
- package/src/preview-loading-paint.ts +68 -0
- package/src/provider.tsx +105 -21
- package/src/queue-presentation-model.ts +475 -0
- package/src/realtime/dropdown-menu.tsx +19 -12
- package/src/realtime/embedded-new-voice.tsx +1 -0
- package/src/realtime/embedded-voice.tsx +3 -0
- package/src/realtime/realtime-control.tsx +240 -609
- package/src/realtime/session-realtime.ts +582 -0
- package/src/sandbox-label-model.ts +56 -0
- package/src/scrollbars.ts +3 -0
- package/src/secret-reference-label.ts +47 -0
- package/src/secrets-ui.tsx +59 -0
- package/src/session-agents-model.ts +40 -0
- package/src/session-attention-model.ts +62 -0
- package/src/session-auth-recommendation.ts +50 -0
- package/src/session-capability-policy.ts +200 -0
- package/src/session-context.ts +13 -5
- package/src/session-feedback-model.ts +101 -0
- package/src/session-list-model.ts +437 -0
- package/src/session-realtime.ts +18 -0
- package/src/session-status-model.ts +99 -0
- package/src/session-ui.ts +102 -3
- package/src/session.ts +19 -1
- package/src/site-snapshot.ts +74 -0
- package/src/sites-ui.tsx +350 -0
- package/src/sites.ts +3 -0
- package/src/skill-discovery.tsx +221 -0
- package/src/terminal.ts +26 -0
- package/src/testing/session-scenarios.ts +404 -0
- package/src/this-computer.ts +62 -0
- package/src/timeline/activity-rail.tsx +289 -119
- package/src/timeline/agent-identity.tsx +84 -0
- package/src/timeline/agent-row.tsx +235 -0
- package/src/timeline/allowance-exhausted-row.tsx +90 -0
- package/src/timeline/compaction-copy.ts +125 -0
- package/src/timeline/fleet-decision-row.tsx +120 -101
- package/src/timeline/focus-sequence.ts +44 -0
- package/src/timeline/genie-copy.ts +22 -0
- package/src/timeline/genie-loading.tsx +158 -0
- package/src/timeline/index.ts +37 -2
- package/src/timeline/invoked-tool.ts +15 -0
- package/src/timeline/knowledge-receipt.tsx +104 -0
- package/src/timeline/learning-refusal-copy.ts +67 -0
- package/src/timeline/learning-refusal-row.tsx +70 -0
- package/src/timeline/message-sender.tsx +71 -0
- package/src/timeline/notice-presentation.ts +67 -0
- package/src/timeline/parsers.ts +42 -2
- package/src/timeline/patch-apply-command.tsx +139 -0
- package/src/timeline/platform-activity-presentation.ts +219 -0
- package/src/timeline/platform-activity-row.tsx +34 -98
- package/src/timeline/presented-image.ts +63 -0
- package/src/timeline/projection.ts +1556 -71
- package/src/timeline/provider-logo.tsx +53 -0
- package/src/timeline/question-nav-model.ts +28 -0
- package/src/timeline/registry.ts +11 -1
- package/src/timeline/retained-image.ts +102 -0
- package/src/timeline/retained-loaders.ts +91 -0
- package/src/timeline/rolling-activity.tsx +84 -0
- package/src/timeline/screenshot-lightbox.tsx +250 -10
- package/src/timeline/session-usage-limit-row.tsx +44 -0
- package/src/timeline/shared.tsx +76 -29
- package/src/timeline/startup-dispatch-details.tsx +43 -0
- package/src/timeline/startup-preference.ts +33 -0
- package/src/timeline/startup-timings.tsx +164 -0
- package/src/timeline/tool-diff.tsx +3 -1
- package/src/timeline/tool-display-name.ts +38 -6
- package/src/timeline/tool-presentation.ts +1552 -0
- package/src/timeline/tool-renderers.tsx +1019 -1265
- package/src/timeline/turn-summary-model.ts +363 -0
- package/src/timeline/turn-summary.tsx +288 -367
- package/src/timeline/types.ts +191 -7
- package/src/timeline/work-presentation.ts +196 -0
- package/src/timeline-model.ts +143 -0
- package/src/usage/allowance-copy.ts +70 -0
- package/src/usage/session-usage-limit.ts +270 -0
- package/src/usage/summary.ts +93 -0
- package/src/usage.ts +70 -0
- package/src/voice-recording-owner.ts +22 -0
- package/styles/compiled.css +2010 -651
- package/styles/connect.css +290 -0
- package/styles/connect.d.ts +1 -0
- package/styles/effective-tokens.css +1 -0
- package/styles/index.css +286 -9
- package/styles/responsive.css +98 -6
- package/styles/session-capability.css +44 -0
- package/styles/this-computer.css +1042 -0
- package/styles/this-computer.d.ts +1 -0
- package/styles/tokens.css +132 -64
- package/dist/browser-viewer-NTD6UIPR.js +0 -14
- package/dist/chunk-24M4YBCL.js.map +0 -1
- package/dist/chunk-4MDLEHXL.js.map +0 -1
- package/dist/chunk-5M6VTFJ5.js.map +0 -1
- package/dist/chunk-5PQJOCX5.js +0 -902
- package/dist/chunk-5PQJOCX5.js.map +0 -1
- package/dist/chunk-5YK2ZDIG.js.map +0 -1
- package/dist/chunk-6J56T3MG.js.map +0 -1
- package/dist/chunk-BV5A4OTE.js.map +0 -1
- package/dist/chunk-CQG7YUJB.js +0 -10883
- package/dist/chunk-CQG7YUJB.js.map +0 -1
- package/dist/chunk-H5YGYNXS.js.map +0 -1
- package/dist/chunk-HUIKIDM5.js.map +0 -1
- package/dist/chunk-HUMIRRYI.js.map +0 -1
- package/dist/chunk-ICA6R6TW.js.map +0 -1
- package/dist/chunk-JVYQRRC4.js.map +0 -1
- package/dist/chunk-KCGXPP5V.js.map +0 -1
- package/dist/chunk-KZ73RL76.js.map +0 -1
- package/dist/chunk-NEXLLTP4.js.map +0 -1
- package/dist/chunk-NLTS7JHI.js.map +0 -1
- package/dist/chunk-NOSYBS2D.js.map +0 -1
- package/dist/chunk-PAJU5KKL.js.map +0 -1
- package/dist/chunk-PEI6RANI.js.map +0 -1
- package/dist/chunk-PLYRL5ER.js +0 -164
- package/dist/chunk-PLYRL5ER.js.map +0 -1
- package/dist/chunk-R4KRSFGA.js +0 -290
- package/dist/chunk-R4KRSFGA.js.map +0 -1
- package/dist/chunk-UMECRJRV.js +0 -223
- package/dist/chunk-UMECRJRV.js.map +0 -1
- package/dist/chunk-VRBL3F5E.js +0 -241
- package/dist/chunk-VRBL3F5E.js.map +0 -1
- package/dist/chunk-YBM6CQRU.js.map +0 -1
- package/dist/chunk-Z7WBDB4E.js.map +0 -1
- package/dist/computer-viewer-7TEZC6Y2.js +0 -16
- package/dist/fleet-decision-row-YZ3ZKWMM.js +0 -352
- package/dist/fleet-decision-row-YZ3ZKWMM.js.map +0 -1
- package/dist/hooks/use-environments.d.ts +0 -41
- package/dist/hooks/use-packs.d.ts +0 -32
- package/dist/markdown-table-layout-3Z3AWBY7.js.map +0 -1
- package/dist/model-policy-picker-menu-3R336DP2.js +0 -13
- package/dist/platform-activity-row-27LKAWZD.js +0 -169
- package/dist/platform-activity-row-27LKAWZD.js.map +0 -1
- package/dist/queue-surface-implementation-LK3S4BIW.js.map +0 -1
- package/dist/timeline-annotation-markers-DRSTLEM6.js.map +0 -1
- package/dist/timeline-annotation-selection-IHLUGVND.js.map +0 -1
- package/dist/timeline-annotations-dialog-6Q53N5FG.js.map +0 -1
- package/src/hooks/use-environments.ts +0 -182
- package/src/hooks/use-packs.ts +0 -157
- /package/dist/{browser-viewer-NTD6UIPR.js.map → browser-viewer-GEHX3KYE.js.map} +0 -0
- /package/dist/{computer-viewer-7TEZC6Y2.js.map → chat-interactive-block-5V3BGLXT.js.map} +0 -0
- /package/dist/{model-policy-picker-menu-3R336DP2.js.map → chunk-M357MHH3.js.map} +0 -0
|
@@ -38,12 +38,16 @@ import type {
|
|
|
38
38
|
|
|
39
39
|
import { cn } from "../../lib/cn";
|
|
40
40
|
import { ArtifactSurface } from "./artifact-surface";
|
|
41
|
+
import { useOpenGeniText, type OpenGeniText } from "../../messages/runtime";
|
|
41
42
|
|
|
42
43
|
const MIN_ZOOM = 0.2;
|
|
43
44
|
const MAX_ZOOM = 4;
|
|
44
45
|
const RAIL_ITEM_HEIGHT = 116;
|
|
45
46
|
const RAIL_OVERSCAN = 3;
|
|
46
47
|
const DEFAULT_RAIL_HEIGHT = 640;
|
|
48
|
+
const MOBILE_RAIL_ITEM_HEIGHT = 44;
|
|
49
|
+
const MOBILE_RAIL_OVERSCAN = 3;
|
|
50
|
+
const DEFAULT_MOBILE_LIST_HEIGHT = 264;
|
|
47
51
|
const DEFAULT_VIEWPORT = { width: 960, height: 640 };
|
|
48
52
|
const SPATIAL_TILE = 256;
|
|
49
53
|
const MAX_SPATIAL_BUCKETS_PER_OBJECT = 1_024;
|
|
@@ -331,6 +335,7 @@ export type PresentationProjectionEditorProps = Omit<
|
|
|
331
335
|
|
|
332
336
|
export type PresentationProjectionArtifactSurfaceProps = PresentationProjectionEditorProps & {
|
|
333
337
|
title?: string | undefined;
|
|
338
|
+
showHeader?: boolean | undefined;
|
|
334
339
|
subtitle?: ReactNode | undefined;
|
|
335
340
|
actions?: ReactNode | undefined;
|
|
336
341
|
busy?: boolean | undefined;
|
|
@@ -347,6 +352,8 @@ export type PresentationEditorProps = {
|
|
|
347
352
|
zoom?: number | undefined;
|
|
348
353
|
defaultZoom?: number | undefined;
|
|
349
354
|
readOnly?: boolean | undefined;
|
|
355
|
+
/** Temporarily fence commands while keeping the current editor draft. */
|
|
356
|
+
authoringBlockedReason?: "pending_conflict" | "prior_writer" | undefined;
|
|
350
357
|
className?: string | undefined;
|
|
351
358
|
onSlideChange?: ((slide: Slide, index: number) => void) | undefined;
|
|
352
359
|
onSelectionChange?: ((object: PresentationObject | null, slide: Slide) => void) | undefined;
|
|
@@ -357,6 +364,7 @@ export type PresentationEditorProps = {
|
|
|
357
364
|
|
|
358
365
|
export type PresentationArtifactSurfaceProps = PresentationEditorProps & {
|
|
359
366
|
title?: string | undefined;
|
|
367
|
+
showHeader?: boolean | undefined;
|
|
360
368
|
subtitle?: ReactNode | undefined;
|
|
361
369
|
actions?: ReactNode | undefined;
|
|
362
370
|
busy?: boolean | undefined;
|
|
@@ -450,6 +458,15 @@ export function PresentationProjectionEditor({
|
|
|
450
458
|
);
|
|
451
459
|
}
|
|
452
460
|
|
|
461
|
+
function nextSlideIndexFromKey(key: string, activeIndex: number, length: number): number | null {
|
|
462
|
+
if (length === 0) return null;
|
|
463
|
+
if (key === "ArrowDown") return Math.min(length - 1, activeIndex + 1);
|
|
464
|
+
if (key === "ArrowUp") return Math.max(0, activeIndex - 1);
|
|
465
|
+
if (key === "Home") return 0;
|
|
466
|
+
if (key === "End") return length - 1;
|
|
467
|
+
return null;
|
|
468
|
+
}
|
|
469
|
+
|
|
453
470
|
function PresentationEditorCore({
|
|
454
471
|
presentation,
|
|
455
472
|
revision,
|
|
@@ -460,6 +477,7 @@ function PresentationEditorCore({
|
|
|
460
477
|
zoom: controlledZoom,
|
|
461
478
|
defaultZoom = 0.75,
|
|
462
479
|
readOnly = false,
|
|
480
|
+
authoringBlockedReason,
|
|
463
481
|
className,
|
|
464
482
|
onSlideChange,
|
|
465
483
|
onSelectionChange,
|
|
@@ -467,6 +485,15 @@ function PresentationEditorCore({
|
|
|
467
485
|
onCommandError,
|
|
468
486
|
onZoomChange,
|
|
469
487
|
}: PresentationEditorProps) {
|
|
488
|
+
const t = useOpenGeniText();
|
|
489
|
+
const mutationsBlocked = readOnly || authoringBlockedReason !== undefined;
|
|
490
|
+
const authoringStatus = readOnly
|
|
491
|
+
? null
|
|
492
|
+
: authoringBlockedReason === "pending_conflict"
|
|
493
|
+
? t("artifacts.presentationEditor.anEarlierChangeNeedsAttention")
|
|
494
|
+
: authoringBlockedReason === "prior_writer"
|
|
495
|
+
? t("artifacts.presentationEditor.savingEarlierChanges")
|
|
496
|
+
: null;
|
|
470
497
|
const slides = presentation.slides.items;
|
|
471
498
|
const firstSlideId = slides[0]?.id ?? null;
|
|
472
499
|
const [localSlideId, setLocalSlideId] = useState(
|
|
@@ -492,6 +519,11 @@ function PresentationEditorCore({
|
|
|
492
519
|
scrollTop: 0,
|
|
493
520
|
height: DEFAULT_RAIL_HEIGHT,
|
|
494
521
|
});
|
|
522
|
+
const [mobileSelectorOpen, setMobileSelectorOpen] = useState(false);
|
|
523
|
+
const [mobileRail, setMobileRail] = useState({
|
|
524
|
+
scrollTop: 0,
|
|
525
|
+
height: DEFAULT_MOBILE_LIST_HEIGHT,
|
|
526
|
+
});
|
|
495
527
|
const [viewport, setViewport] = useState<ViewportMetrics>({
|
|
496
528
|
scrollLeft: 0,
|
|
497
529
|
scrollTop: 0,
|
|
@@ -504,6 +536,9 @@ function PresentationEditorCore({
|
|
|
504
536
|
const [textDraft, setTextDraft] = useState("");
|
|
505
537
|
const [paintEpoch, setPaintEpoch] = useState(0);
|
|
506
538
|
const railRef = useRef<HTMLDivElement>(null);
|
|
539
|
+
const mobileSelectorTriggerRef = useRef<HTMLButtonElement>(null);
|
|
540
|
+
const mobileSelectorPanelRef = useRef<HTMLDivElement>(null);
|
|
541
|
+
const mobileRailRef = useRef<HTMLDivElement>(null);
|
|
507
542
|
const viewportRef = useRef<HTMLDivElement>(null);
|
|
508
543
|
const stageRef = useRef<HTMLDivElement>(null);
|
|
509
544
|
const canvasRef = useRef<HTMLCanvasElement>(null);
|
|
@@ -517,6 +552,7 @@ function PresentationEditorCore({
|
|
|
517
552
|
const commandVersionsRef = useRef(new Map<string, number>());
|
|
518
553
|
const pendingSlideIdRef = useRef<string | null>(null);
|
|
519
554
|
const pendingObjectIdRef = useRef<string | null>(null);
|
|
555
|
+
const mobileRailScrollOnOpenRef = useRef(0);
|
|
520
556
|
const domId = useId().replaceAll(":", "");
|
|
521
557
|
const selectionProxyId = `${domId}-presentation-selection`;
|
|
522
558
|
const instructionsId = `${domId}-presentation-instructions`;
|
|
@@ -596,6 +632,47 @@ function PresentationEditorCore({
|
|
|
596
632
|
return () => observer.disconnect();
|
|
597
633
|
}, []);
|
|
598
634
|
|
|
635
|
+
useLayoutEffect(() => {
|
|
636
|
+
if (!mobileSelectorOpen) return;
|
|
637
|
+
const element = mobileRailRef.current;
|
|
638
|
+
if (!element) return;
|
|
639
|
+
element.scrollTop = mobileRailScrollOnOpenRef.current;
|
|
640
|
+
element.focus();
|
|
641
|
+
const measure = () =>
|
|
642
|
+
setMobileRail((current) => ({
|
|
643
|
+
scrollTop: element.scrollTop,
|
|
644
|
+
height: element.clientHeight || current.height,
|
|
645
|
+
}));
|
|
646
|
+
measure();
|
|
647
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
648
|
+
const observer = new ResizeObserver(measure);
|
|
649
|
+
observer.observe(element);
|
|
650
|
+
return () => observer.disconnect();
|
|
651
|
+
}, [mobileSelectorOpen]);
|
|
652
|
+
|
|
653
|
+
useEffect(() => {
|
|
654
|
+
if (!mobileSelectorOpen) return;
|
|
655
|
+
const onPointerDown = (event: PointerEvent) => {
|
|
656
|
+
const target = event.target;
|
|
657
|
+
if (!(target instanceof Node)) return;
|
|
658
|
+
if (mobileSelectorTriggerRef.current?.contains(target)) return;
|
|
659
|
+
if (mobileSelectorPanelRef.current?.contains(target)) return;
|
|
660
|
+
setMobileSelectorOpen(false);
|
|
661
|
+
};
|
|
662
|
+
const onKeyDown = (event: KeyboardEvent) => {
|
|
663
|
+
if (event.key !== "Escape") return;
|
|
664
|
+
event.preventDefault();
|
|
665
|
+
setMobileSelectorOpen(false);
|
|
666
|
+
mobileSelectorTriggerRef.current?.focus();
|
|
667
|
+
};
|
|
668
|
+
document.addEventListener("pointerdown", onPointerDown);
|
|
669
|
+
document.addEventListener("keydown", onKeyDown);
|
|
670
|
+
return () => {
|
|
671
|
+
document.removeEventListener("pointerdown", onPointerDown);
|
|
672
|
+
document.removeEventListener("keydown", onKeyDown);
|
|
673
|
+
};
|
|
674
|
+
}, [mobileSelectorOpen]);
|
|
675
|
+
|
|
599
676
|
useLayoutEffect(() => {
|
|
600
677
|
const element = viewportRef.current;
|
|
601
678
|
if (!element) return;
|
|
@@ -751,7 +828,7 @@ function PresentationEditorCore({
|
|
|
751
828
|
useLayoutEffect(() => {
|
|
752
829
|
const canvas = canvasRef.current;
|
|
753
830
|
if (!canvas || !activeSlide) return;
|
|
754
|
-
paintSlideCanvas({
|
|
831
|
+
paintSlideCanvas(t, {
|
|
755
832
|
canvas,
|
|
756
833
|
slide: activeSlide,
|
|
757
834
|
slideSize: presentation.slideSize,
|
|
@@ -772,6 +849,7 @@ function PresentationEditorCore({
|
|
|
772
849
|
visibleObjectIndexes,
|
|
773
850
|
visibleSlideRegion,
|
|
774
851
|
zoom,
|
|
852
|
+
t,
|
|
775
853
|
]);
|
|
776
854
|
|
|
777
855
|
const selectObject = useCallback(
|
|
@@ -835,7 +913,7 @@ function PresentationEditorCore({
|
|
|
835
913
|
|
|
836
914
|
const runCommit = useCallback(
|
|
837
915
|
(key: string, command: PresentationCommit, rollback: () => void, retry: () => void) => {
|
|
838
|
-
if (!onCommit) return;
|
|
916
|
+
if (mutationsBlocked || !onCommit) return;
|
|
839
917
|
const version = (commandVersionsRef.current.get(key) ?? 0) + 1;
|
|
840
918
|
commandVersionsRef.current.set(key, version);
|
|
841
919
|
const scope = commandScopeRef.current;
|
|
@@ -875,12 +953,12 @@ function PresentationEditorCore({
|
|
|
875
953
|
},
|
|
876
954
|
);
|
|
877
955
|
},
|
|
878
|
-
[onCommandError, onCommit],
|
|
956
|
+
[mutationsBlocked, onCommandError, onCommit],
|
|
879
957
|
);
|
|
880
958
|
|
|
881
959
|
const commitPosition = useCallback(
|
|
882
960
|
(entry: DisplayObject, kind: "move" | "resize", next: PresentationPosition) => {
|
|
883
|
-
if (!activeSlide ||
|
|
961
|
+
if (!activeSlide || mutationsBlocked || entry.readOnly) return;
|
|
884
962
|
const before = copyPosition(entry.object.position);
|
|
885
963
|
const after = normalizeEditorPosition(next);
|
|
886
964
|
if (samePosition(before, after)) return;
|
|
@@ -909,11 +987,11 @@ function PresentationEditorCore({
|
|
|
909
987
|
);
|
|
910
988
|
submit();
|
|
911
989
|
},
|
|
912
|
-
[activeSlide,
|
|
990
|
+
[activeSlide, mutationsBlocked, runCommit],
|
|
913
991
|
);
|
|
914
992
|
|
|
915
993
|
const insertSlide = useCallback(() => {
|
|
916
|
-
if (
|
|
994
|
+
if (mutationsBlocked) return;
|
|
917
995
|
const slideId = randomPresentationId();
|
|
918
996
|
const index = activeIndex < 0 ? slides.length : activeIndex + 1;
|
|
919
997
|
const command: PresentationCommit = { kind: "slide-insert", slideId, index };
|
|
@@ -929,10 +1007,10 @@ function PresentationEditorCore({
|
|
|
929
1007
|
);
|
|
930
1008
|
};
|
|
931
1009
|
submit();
|
|
932
|
-
}, [activeIndex,
|
|
1010
|
+
}, [activeIndex, mutationsBlocked, runCommit, slides.length]);
|
|
933
1011
|
|
|
934
1012
|
const deleteSlide = useCallback(() => {
|
|
935
|
-
if (
|
|
1013
|
+
if (mutationsBlocked || !activeSlide) return;
|
|
936
1014
|
const command: PresentationCommit = {
|
|
937
1015
|
kind: "slide-delete",
|
|
938
1016
|
slideId: activeSlide.id,
|
|
@@ -941,10 +1019,10 @@ function PresentationEditorCore({
|
|
|
941
1019
|
const submit = () =>
|
|
942
1020
|
runCommit(`slide-delete:${activeSlide.id}`, command, () => undefined, submit);
|
|
943
1021
|
submit();
|
|
944
|
-
}, [activeIndex, activeSlide,
|
|
1022
|
+
}, [activeIndex, activeSlide, mutationsBlocked, runCommit]);
|
|
945
1023
|
|
|
946
1024
|
const insertTextBox = useCallback(() => {
|
|
947
|
-
if (
|
|
1025
|
+
if (mutationsBlocked || !activeSlide) return;
|
|
948
1026
|
const objectId = randomPresentationId();
|
|
949
1027
|
const position = nextTextBoxPosition(objects, presentation.slideSize);
|
|
950
1028
|
const command: PresentationCommit = {
|
|
@@ -966,10 +1044,10 @@ function PresentationEditorCore({
|
|
|
966
1044
|
);
|
|
967
1045
|
};
|
|
968
1046
|
submit();
|
|
969
|
-
}, [activeSlide, objects, presentation.slideSize,
|
|
1047
|
+
}, [activeSlide, objects, presentation.slideSize, mutationsBlocked, runCommit]);
|
|
970
1048
|
|
|
971
1049
|
const deleteObject = useCallback(() => {
|
|
972
|
-
if (
|
|
1050
|
+
if (mutationsBlocked || !activeSlide || !selected || selected.readOnly) return;
|
|
973
1051
|
const command: PresentationCommit = {
|
|
974
1052
|
kind: "object-delete",
|
|
975
1053
|
slideId: activeSlide.id,
|
|
@@ -978,11 +1056,11 @@ function PresentationEditorCore({
|
|
|
978
1056
|
const submit = () =>
|
|
979
1057
|
runCommit(`object-delete:${activeSlide.id}:${selected.id}`, command, () => undefined, submit);
|
|
980
1058
|
submit();
|
|
981
|
-
}, [activeSlide,
|
|
1059
|
+
}, [activeSlide, mutationsBlocked, runCommit, selected]);
|
|
982
1060
|
|
|
983
1061
|
const startTextEdit = useCallback(
|
|
984
1062
|
(entry: DisplayObject | null) => {
|
|
985
|
-
if (
|
|
1063
|
+
if (mutationsBlocked || !entry || entry.readOnly || entry.kind !== "shape") return;
|
|
986
1064
|
const shape = entry.object as PresentationShape;
|
|
987
1065
|
if (shape.geometry === "line") return;
|
|
988
1066
|
const before = shape.text.toString();
|
|
@@ -992,7 +1070,7 @@ function PresentationEditorCore({
|
|
|
992
1070
|
setTextEdit(edit);
|
|
993
1071
|
setTextDraft(before);
|
|
994
1072
|
},
|
|
995
|
-
[activeSlide,
|
|
1073
|
+
[activeSlide, mutationsBlocked],
|
|
996
1074
|
);
|
|
997
1075
|
|
|
998
1076
|
useEffect(() => {
|
|
@@ -1004,12 +1082,12 @@ function PresentationEditorCore({
|
|
|
1004
1082
|
const finishTextEdit = useCallback(
|
|
1005
1083
|
(cancel = false) => {
|
|
1006
1084
|
const edit = textEditRef.current;
|
|
1007
|
-
if (!edit) return;
|
|
1085
|
+
if (!edit || (!cancel && authoringBlockedReason !== undefined)) return;
|
|
1008
1086
|
textEditRef.current = null;
|
|
1009
1087
|
setTextEdit(null);
|
|
1010
1088
|
const { shape, before, slideId } = edit;
|
|
1011
1089
|
if (!activeSlide || activeSlide.id !== slideId) return;
|
|
1012
|
-
if (cancel ||
|
|
1090
|
+
if (cancel || mutationsBlocked || before === textDraft) return;
|
|
1013
1091
|
shape.text.set(textDraft);
|
|
1014
1092
|
setModelEpoch((value) => value + 1);
|
|
1015
1093
|
const command: PresentationCommit = {
|
|
@@ -1035,7 +1113,7 @@ function PresentationEditorCore({
|
|
|
1035
1113
|
);
|
|
1036
1114
|
submit();
|
|
1037
1115
|
},
|
|
1038
|
-
[activeSlide,
|
|
1116
|
+
[activeSlide, authoringBlockedReason, mutationsBlocked, runCommit, textDraft],
|
|
1039
1117
|
);
|
|
1040
1118
|
|
|
1041
1119
|
const cycleObject = useCallback(
|
|
@@ -1058,6 +1136,34 @@ function PresentationEditorCore({
|
|
|
1058
1136
|
[activeIndex, activeSlide, selectSlide, slides],
|
|
1059
1137
|
);
|
|
1060
1138
|
|
|
1139
|
+
const toggleMobileSlideSelector = useCallback(() => {
|
|
1140
|
+
setMobileSelectorOpen((open) => {
|
|
1141
|
+
if (open) return false;
|
|
1142
|
+
const index = Math.max(0, activeIndex);
|
|
1143
|
+
const height = DEFAULT_MOBILE_LIST_HEIGHT;
|
|
1144
|
+
const maxScroll = Math.max(0, slides.length * MOBILE_RAIL_ITEM_HEIGHT - height);
|
|
1145
|
+
const scrollTop = Math.max(
|
|
1146
|
+
0,
|
|
1147
|
+
Math.min(
|
|
1148
|
+
maxScroll,
|
|
1149
|
+
index * MOBILE_RAIL_ITEM_HEIGHT - height / 2 + MOBILE_RAIL_ITEM_HEIGHT / 2,
|
|
1150
|
+
),
|
|
1151
|
+
);
|
|
1152
|
+
mobileRailScrollOnOpenRef.current = scrollTop;
|
|
1153
|
+
setMobileRail({ scrollTop, height });
|
|
1154
|
+
return true;
|
|
1155
|
+
});
|
|
1156
|
+
}, [activeIndex, slides.length]);
|
|
1157
|
+
|
|
1158
|
+
const chooseMobileSlide = useCallback(
|
|
1159
|
+
(slide: Slide, index: number) => {
|
|
1160
|
+
if (slide !== activeSlide) selectSlide(slide, index);
|
|
1161
|
+
setMobileSelectorOpen(false);
|
|
1162
|
+
mobileSelectorTriggerRef.current?.focus();
|
|
1163
|
+
},
|
|
1164
|
+
[activeSlide, selectSlide],
|
|
1165
|
+
);
|
|
1166
|
+
|
|
1061
1167
|
const handleCanvasKeyDown = useCallback(
|
|
1062
1168
|
(event: ReactKeyboardEvent<SVGSVGElement>) => {
|
|
1063
1169
|
if (event.metaKey || event.ctrlKey) {
|
|
@@ -1107,7 +1213,7 @@ function PresentationEditorCore({
|
|
|
1107
1213
|
}
|
|
1108
1214
|
if (!selected || !event.key.startsWith("Arrow")) return;
|
|
1109
1215
|
event.preventDefault();
|
|
1110
|
-
if (
|
|
1216
|
+
if (mutationsBlocked || selected.readOnly) return;
|
|
1111
1217
|
const amount = event.shiftKey ? 10 : 1;
|
|
1112
1218
|
const dx = event.key === "ArrowLeft" ? -amount : event.key === "ArrowRight" ? amount : 0;
|
|
1113
1219
|
const dy = event.key === "ArrowUp" ? -amount : event.key === "ArrowDown" ? amount : 0;
|
|
@@ -1130,7 +1236,7 @@ function PresentationEditorCore({
|
|
|
1130
1236
|
commitPosition,
|
|
1131
1237
|
cycleObject,
|
|
1132
1238
|
fitSlide,
|
|
1133
|
-
|
|
1239
|
+
mutationsBlocked,
|
|
1134
1240
|
selectObject,
|
|
1135
1241
|
selected,
|
|
1136
1242
|
startTextEdit,
|
|
@@ -1157,7 +1263,7 @@ function PresentationEditorCore({
|
|
|
1157
1263
|
event.preventDefault();
|
|
1158
1264
|
event.stopPropagation();
|
|
1159
1265
|
selectObject(entry);
|
|
1160
|
-
if (
|
|
1266
|
+
if (mutationsBlocked || entry.readOnly) return;
|
|
1161
1267
|
const start = pointFromPointer(event);
|
|
1162
1268
|
const before = copyPosition(entry.object.position);
|
|
1163
1269
|
dragRef.current = {
|
|
@@ -1171,7 +1277,7 @@ function PresentationEditorCore({
|
|
|
1171
1277
|
setDraftPosition({ objectId: entry.id, position: before });
|
|
1172
1278
|
overlayRef.current?.setPointerCapture?.(event.pointerId);
|
|
1173
1279
|
},
|
|
1174
|
-
[pointFromPointer,
|
|
1280
|
+
[pointFromPointer, mutationsBlocked, selectObject],
|
|
1175
1281
|
);
|
|
1176
1282
|
|
|
1177
1283
|
const handlePointerDown = useCallback(
|
|
@@ -1191,17 +1297,22 @@ function PresentationEditorCore({
|
|
|
1191
1297
|
const handlePointerMove = useCallback(
|
|
1192
1298
|
(event: ReactPointerEvent<SVGSVGElement>) => {
|
|
1193
1299
|
const drag = dragRef.current;
|
|
1194
|
-
if (!drag || drag.pointerId !== event.pointerId) return;
|
|
1300
|
+
if (!drag || drag.pointerId !== event.pointerId || mutationsBlocked) return;
|
|
1195
1301
|
const point = pointFromPointer(event);
|
|
1196
1302
|
setDraftPosition({ objectId: drag.object.id, position: positionFromDrag(drag, point) });
|
|
1197
1303
|
},
|
|
1198
|
-
[pointFromPointer],
|
|
1304
|
+
[mutationsBlocked, pointFromPointer],
|
|
1199
1305
|
);
|
|
1200
1306
|
|
|
1201
1307
|
const finishDrag = useCallback(
|
|
1202
1308
|
(event: ReactPointerEvent<SVGSVGElement>, cancel = false) => {
|
|
1203
1309
|
const drag = dragRef.current;
|
|
1204
|
-
if (
|
|
1310
|
+
if (
|
|
1311
|
+
!drag ||
|
|
1312
|
+
drag.pointerId !== event.pointerId ||
|
|
1313
|
+
(!cancel && authoringBlockedReason !== undefined)
|
|
1314
|
+
)
|
|
1315
|
+
return;
|
|
1205
1316
|
dragRef.current = null;
|
|
1206
1317
|
const captureTarget = overlayRef.current;
|
|
1207
1318
|
if (captureTarget?.hasPointerCapture?.(event.pointerId)) {
|
|
@@ -1214,21 +1325,36 @@ function PresentationEditorCore({
|
|
|
1214
1325
|
const point = pointFromPointer(event);
|
|
1215
1326
|
commitPosition(entry, drag.mode, positionFromDrag(drag, point));
|
|
1216
1327
|
},
|
|
1217
|
-
[commitPosition, objectById, pointFromPointer],
|
|
1328
|
+
[authoringBlockedReason, commitPosition, objectById, pointFromPointer],
|
|
1218
1329
|
);
|
|
1219
1330
|
|
|
1220
|
-
const handleLostPointerCapture = useCallback(
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1331
|
+
const handleLostPointerCapture = useCallback(
|
|
1332
|
+
(event: ReactPointerEvent<SVGSVGElement>) => {
|
|
1333
|
+
const drag = dragRef.current;
|
|
1334
|
+
if (!drag || drag.pointerId !== event.pointerId || authoringBlockedReason !== undefined)
|
|
1335
|
+
return;
|
|
1336
|
+
dragRef.current = null;
|
|
1337
|
+
setDraftPosition(null);
|
|
1338
|
+
},
|
|
1339
|
+
[authoringBlockedReason],
|
|
1340
|
+
);
|
|
1226
1341
|
|
|
1227
1342
|
const railStart = Math.max(0, Math.floor(rail.scrollTop / RAIL_ITEM_HEIGHT) - RAIL_OVERSCAN);
|
|
1228
1343
|
const railEnd = Math.min(
|
|
1229
1344
|
slides.length,
|
|
1230
1345
|
Math.ceil((rail.scrollTop + rail.height) / RAIL_ITEM_HEIGHT) + RAIL_OVERSCAN,
|
|
1231
1346
|
);
|
|
1347
|
+
const mobileRailStart = Math.max(
|
|
1348
|
+
0,
|
|
1349
|
+
Math.floor(mobileRail.scrollTop / MOBILE_RAIL_ITEM_HEIGHT) - MOBILE_RAIL_OVERSCAN,
|
|
1350
|
+
);
|
|
1351
|
+
const mobileRailEnd = Math.min(
|
|
1352
|
+
slides.length,
|
|
1353
|
+
Math.ceil((mobileRail.scrollTop + mobileRail.height) / MOBILE_RAIL_ITEM_HEIGHT) +
|
|
1354
|
+
MOBILE_RAIL_OVERSCAN,
|
|
1355
|
+
);
|
|
1356
|
+
const slideCountLabel =
|
|
1357
|
+
activeIndex >= 0 ? `${activeIndex + 1} / ${slides.length}` : `0 / ${slides.length}`;
|
|
1232
1358
|
const stageWidth = presentation.slideSize.width * zoom;
|
|
1233
1359
|
const stageHeight = presentation.slideSize.height * zoom;
|
|
1234
1360
|
|
|
@@ -1238,30 +1364,52 @@ function PresentationEditorCore({
|
|
|
1238
1364
|
style={{ minHeight: "22rem" }}
|
|
1239
1365
|
data-og-presentation-editor
|
|
1240
1366
|
data-og-painted-object-count={visibleObjectIndexes.length}
|
|
1241
|
-
data-og-command-state={
|
|
1242
|
-
|
|
1367
|
+
data-og-command-state={
|
|
1368
|
+
commandFailure || authoringBlockedReason === "pending_conflict"
|
|
1369
|
+
? "error"
|
|
1370
|
+
: pendingCommands > 0 || authoringBlockedReason === "prior_writer"
|
|
1371
|
+
? "pending"
|
|
1372
|
+
: "idle"
|
|
1373
|
+
}
|
|
1374
|
+
aria-busy={
|
|
1375
|
+
pendingCommands > 0 || authoringBlockedReason === "prior_writer" ? "true" : undefined
|
|
1376
|
+
}
|
|
1243
1377
|
>
|
|
1244
1378
|
<div
|
|
1245
1379
|
role="toolbar"
|
|
1246
|
-
aria-label="
|
|
1380
|
+
aria-label={t("artifacts.presentationEditor.presentationControls")}
|
|
1247
1381
|
className="flex h-10 shrink-0 items-center border-b border-og-border bg-og-surface-2"
|
|
1248
1382
|
>
|
|
1249
1383
|
<div className="flex min-w-0 flex-1 items-center gap-1 overflow-x-auto px-2 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden">
|
|
1250
1384
|
<button
|
|
1251
1385
|
type="button"
|
|
1252
|
-
aria-label="
|
|
1386
|
+
aria-label={t("artifacts.presentationEditor.previousSlide")}
|
|
1253
1387
|
disabled={activeIndex <= 0}
|
|
1254
1388
|
onClick={() => changeSlideBy(-1)}
|
|
1255
1389
|
className="grid size-7 shrink-0 place-items-center rounded-og-sm text-og-fg-muted hover:bg-og-surface-3 hover:text-og-fg disabled:opacity-35 [&>svg]:size-3.5"
|
|
1256
1390
|
>
|
|
1257
1391
|
<ChevronLeftIcon />
|
|
1258
1392
|
</button>
|
|
1259
|
-
<
|
|
1260
|
-
{
|
|
1393
|
+
<button
|
|
1394
|
+
ref={mobileSelectorTriggerRef}
|
|
1395
|
+
type="button"
|
|
1396
|
+
aria-label={t("artifacts.presentationEditor.chooseSlide")}
|
|
1397
|
+
aria-haspopup="listbox"
|
|
1398
|
+
aria-expanded={mobileSelectorOpen}
|
|
1399
|
+
aria-controls={mobileSelectorOpen ? `${domId}-mobile-slides` : undefined}
|
|
1400
|
+
disabled={slides.length === 0}
|
|
1401
|
+
data-og-mobile-slide-selector
|
|
1402
|
+
onClick={toggleMobileSlideSelector}
|
|
1403
|
+
className="inline-flex min-h-11 min-w-16 shrink-0 items-center justify-center rounded-og-sm px-2 text-og-xs tabular-nums text-og-fg-muted hover:bg-og-surface-3 hover:text-og-fg disabled:opacity-35 sm:hidden"
|
|
1404
|
+
>
|
|
1405
|
+
<span>{slideCountLabel}</span>
|
|
1406
|
+
</button>
|
|
1407
|
+
<span className="hidden min-w-16 shrink-0 text-center text-og-xs tabular-nums text-og-fg-muted sm:inline">
|
|
1408
|
+
{slideCountLabel}
|
|
1261
1409
|
</span>
|
|
1262
1410
|
<button
|
|
1263
1411
|
type="button"
|
|
1264
|
-
aria-label="
|
|
1412
|
+
aria-label={t("artifacts.presentationEditor.nextSlide")}
|
|
1265
1413
|
disabled={activeIndex < 0 || activeIndex >= slides.length - 1}
|
|
1266
1414
|
onClick={() => changeSlideBy(1)}
|
|
1267
1415
|
className="grid size-7 shrink-0 place-items-center rounded-og-sm text-og-fg-muted hover:bg-og-surface-3 hover:text-og-fg disabled:opacity-35 [&>svg]:size-3.5"
|
|
@@ -1270,8 +1418,8 @@ function PresentationEditorCore({
|
|
|
1270
1418
|
</button>
|
|
1271
1419
|
<button
|
|
1272
1420
|
type="button"
|
|
1273
|
-
aria-label="
|
|
1274
|
-
disabled={
|
|
1421
|
+
aria-label={t("artifacts.presentationEditor.addSlide")}
|
|
1422
|
+
disabled={mutationsBlocked}
|
|
1275
1423
|
onClick={insertSlide}
|
|
1276
1424
|
className="ml-0.5 grid size-7 shrink-0 place-items-center rounded-og-sm text-og-fg-muted hover:bg-og-surface-3 hover:text-og-fg disabled:opacity-35 [&>svg]:size-3.5"
|
|
1277
1425
|
>
|
|
@@ -1279,8 +1427,8 @@ function PresentationEditorCore({
|
|
|
1279
1427
|
</button>
|
|
1280
1428
|
<button
|
|
1281
1429
|
type="button"
|
|
1282
|
-
aria-label="
|
|
1283
|
-
disabled={
|
|
1430
|
+
aria-label={t("artifacts.presentationEditor.deleteSlide")}
|
|
1431
|
+
disabled={mutationsBlocked || !activeSlide}
|
|
1284
1432
|
onClick={deleteSlide}
|
|
1285
1433
|
className="grid size-7 shrink-0 place-items-center rounded-og-sm text-og-fg-muted hover:bg-og-surface-3 hover:text-og-status-failed disabled:opacity-35 [&>svg]:size-3.5"
|
|
1286
1434
|
>
|
|
@@ -1289,7 +1437,7 @@ function PresentationEditorCore({
|
|
|
1289
1437
|
<span className="mx-1 h-4 w-px shrink-0 bg-og-border" />
|
|
1290
1438
|
<button
|
|
1291
1439
|
type="button"
|
|
1292
|
-
aria-label="
|
|
1440
|
+
aria-label={t("artifacts.presentationEditor.zoomOut")}
|
|
1293
1441
|
onClick={() => changeZoom(zoom / 1.15)}
|
|
1294
1442
|
className="grid size-7 shrink-0 place-items-center rounded-og-sm text-og-fg-muted hover:bg-og-surface-3 hover:text-og-fg [&>svg]:size-3.5"
|
|
1295
1443
|
>
|
|
@@ -1300,7 +1448,7 @@ function PresentationEditorCore({
|
|
|
1300
1448
|
</span>
|
|
1301
1449
|
<button
|
|
1302
1450
|
type="button"
|
|
1303
|
-
aria-label="
|
|
1451
|
+
aria-label={t("artifacts.presentationEditor.zoomIn")}
|
|
1304
1452
|
onClick={() => changeZoom(zoom * 1.15)}
|
|
1305
1453
|
className="grid size-7 shrink-0 place-items-center rounded-og-sm text-og-fg-muted hover:bg-og-surface-3 hover:text-og-fg [&>svg]:size-3.5"
|
|
1306
1454
|
>
|
|
@@ -1308,7 +1456,7 @@ function PresentationEditorCore({
|
|
|
1308
1456
|
</button>
|
|
1309
1457
|
<button
|
|
1310
1458
|
type="button"
|
|
1311
|
-
aria-label="
|
|
1459
|
+
aria-label={t("artifacts.presentationEditor.fitSlide")}
|
|
1312
1460
|
onClick={fitSlide}
|
|
1313
1461
|
className="ml-0.5 grid size-7 shrink-0 place-items-center rounded-og-sm text-og-fg-muted hover:bg-og-surface-3 hover:text-og-fg [&>svg]:size-3.5"
|
|
1314
1462
|
>
|
|
@@ -1317,8 +1465,8 @@ function PresentationEditorCore({
|
|
|
1317
1465
|
<span className="mx-1 h-4 w-px shrink-0 bg-og-border" />
|
|
1318
1466
|
<button
|
|
1319
1467
|
type="button"
|
|
1320
|
-
aria-label="
|
|
1321
|
-
disabled={
|
|
1468
|
+
aria-label={t("artifacts.presentationEditor.addTextBox")}
|
|
1469
|
+
disabled={mutationsBlocked || !activeSlide}
|
|
1322
1470
|
onClick={insertTextBox}
|
|
1323
1471
|
className="grid size-7 shrink-0 place-items-center rounded-og-sm text-og-fg-muted hover:bg-og-surface-3 hover:text-og-fg disabled:opacity-35 [&>svg]:size-3.5"
|
|
1324
1472
|
>
|
|
@@ -1326,8 +1474,8 @@ function PresentationEditorCore({
|
|
|
1326
1474
|
</button>
|
|
1327
1475
|
<button
|
|
1328
1476
|
type="button"
|
|
1329
|
-
aria-label="
|
|
1330
|
-
disabled={
|
|
1477
|
+
aria-label={t("artifacts.presentationEditor.deleteSelectedObject")}
|
|
1478
|
+
disabled={mutationsBlocked || !selected || selected.readOnly}
|
|
1331
1479
|
onClick={deleteObject}
|
|
1332
1480
|
className="grid size-7 shrink-0 place-items-center rounded-og-sm text-og-fg-muted hover:bg-og-surface-3 hover:text-og-status-failed disabled:opacity-35 [&>svg]:size-3.5"
|
|
1333
1481
|
>
|
|
@@ -1338,38 +1486,44 @@ function PresentationEditorCore({
|
|
|
1338
1486
|
className="hidden max-w-44 shrink-0 truncate border-l border-og-border px-2 text-og-xs text-og-fg-subtle sm:block"
|
|
1339
1487
|
title={
|
|
1340
1488
|
commandFailure
|
|
1341
|
-
? "
|
|
1342
|
-
:
|
|
1343
|
-
?
|
|
1344
|
-
:
|
|
1345
|
-
? "
|
|
1346
|
-
:
|
|
1347
|
-
?
|
|
1348
|
-
:
|
|
1489
|
+
? t("artifacts.presentationEditor.changeNotSaved")
|
|
1490
|
+
: authoringStatus
|
|
1491
|
+
? authoringStatus
|
|
1492
|
+
: pendingCommands > 0
|
|
1493
|
+
? t("artifacts.presentationEditor.saving")
|
|
1494
|
+
: mutationsBlocked
|
|
1495
|
+
? t("artifacts.presentationEditor.viewOnly")
|
|
1496
|
+
: selected
|
|
1497
|
+
? `${objectLabel(t, selected)}${selected.readOnly ? " · View only" : ""}`
|
|
1498
|
+
: t("artifacts.presentationEditor.selectAnObjectToEdit")
|
|
1349
1499
|
}
|
|
1350
1500
|
>
|
|
1351
1501
|
{commandFailure
|
|
1352
|
-
? "
|
|
1353
|
-
:
|
|
1354
|
-
?
|
|
1355
|
-
:
|
|
1356
|
-
? "
|
|
1357
|
-
:
|
|
1358
|
-
?
|
|
1359
|
-
:
|
|
1502
|
+
? t("artifacts.presentationEditor.changeNotSaved")
|
|
1503
|
+
: authoringStatus
|
|
1504
|
+
? authoringStatus
|
|
1505
|
+
: pendingCommands > 0
|
|
1506
|
+
? t("artifacts.presentationEditor.saving")
|
|
1507
|
+
: mutationsBlocked
|
|
1508
|
+
? t("artifacts.presentationEditor.viewOnly")
|
|
1509
|
+
: selected
|
|
1510
|
+
? `${objectLabel(t, selected)}${selected.readOnly ? " · View only" : ""}`
|
|
1511
|
+
: t("artifacts.presentationEditor.selectAnObjectToEdit")}
|
|
1360
1512
|
</span>
|
|
1361
1513
|
</div>
|
|
1362
1514
|
|
|
1363
1515
|
<div role="status" aria-live="polite" className="sr-only">
|
|
1364
|
-
{commandFailure?.message ??
|
|
1516
|
+
{commandFailure?.message ??
|
|
1517
|
+
authoringStatus ??
|
|
1518
|
+
(pendingCommands > 0 ? t("artifacts.presentationEditor.savingPresentationChanges") : "")}
|
|
1365
1519
|
</div>
|
|
1366
1520
|
|
|
1367
|
-
<div className="flex min-h-0 min-w-0 flex-1">
|
|
1521
|
+
<div className="relative flex min-h-0 min-w-0 flex-1">
|
|
1368
1522
|
<div
|
|
1369
1523
|
ref={railRef}
|
|
1370
1524
|
role="listbox"
|
|
1371
1525
|
tabIndex={0}
|
|
1372
|
-
aria-label="
|
|
1526
|
+
aria-label={t("artifacts.presentationEditor.slides")}
|
|
1373
1527
|
aria-orientation="vertical"
|
|
1374
1528
|
aria-activedescendant={
|
|
1375
1529
|
activeSlide && activeIndex >= railStart && activeIndex < railEnd
|
|
@@ -1389,12 +1543,7 @@ function PresentationEditorCore({
|
|
|
1389
1543
|
}));
|
|
1390
1544
|
}}
|
|
1391
1545
|
onKeyDown={(event) => {
|
|
1392
|
-
|
|
1393
|
-
let nextIndex: number | null = null;
|
|
1394
|
-
if (event.key === "ArrowDown") nextIndex = Math.min(slides.length - 1, activeIndex + 1);
|
|
1395
|
-
else if (event.key === "ArrowUp") nextIndex = Math.max(0, activeIndex - 1);
|
|
1396
|
-
else if (event.key === "Home") nextIndex = 0;
|
|
1397
|
-
else if (event.key === "End") nextIndex = slides.length - 1;
|
|
1546
|
+
const nextIndex = nextSlideIndexFromKey(event.key, activeIndex, slides.length);
|
|
1398
1547
|
if (nextIndex === null) return;
|
|
1399
1548
|
event.preventDefault();
|
|
1400
1549
|
const next = slides[nextIndex];
|
|
@@ -1413,7 +1562,10 @@ function PresentationEditorCore({
|
|
|
1413
1562
|
role="option"
|
|
1414
1563
|
tabIndex={-1}
|
|
1415
1564
|
aria-selected={active}
|
|
1416
|
-
aria-label={
|
|
1565
|
+
aria-label={t("artifacts.presentationEditor.slideIndexValue", {
|
|
1566
|
+
index: index + 1,
|
|
1567
|
+
value: slide.title ? `: ${slide.title}` : "",
|
|
1568
|
+
})}
|
|
1417
1569
|
onClick={() => selectSlide(slide, index)}
|
|
1418
1570
|
className={cn(
|
|
1419
1571
|
"absolute left-0 flex w-full items-start gap-2 px-2 py-2 text-left transition-colors",
|
|
@@ -1447,6 +1599,105 @@ function PresentationEditorCore({
|
|
|
1447
1599
|
</div>
|
|
1448
1600
|
</div>
|
|
1449
1601
|
|
|
1602
|
+
{mobileSelectorOpen ? (
|
|
1603
|
+
<div
|
|
1604
|
+
ref={mobileSelectorPanelRef}
|
|
1605
|
+
className="absolute left-2 top-2 z-40 max-w-56 overflow-hidden rounded-og-md border border-og-border bg-og-surface-1 shadow-og-md sm:hidden"
|
|
1606
|
+
style={{ width: "calc(100% - 1rem)" }}
|
|
1607
|
+
>
|
|
1608
|
+
<div
|
|
1609
|
+
ref={mobileRailRef}
|
|
1610
|
+
id={`${domId}-mobile-slides`}
|
|
1611
|
+
role="listbox"
|
|
1612
|
+
tabIndex={0}
|
|
1613
|
+
aria-label={t("artifacts.presentationEditor.slides")}
|
|
1614
|
+
aria-orientation="vertical"
|
|
1615
|
+
aria-activedescendant={
|
|
1616
|
+
activeSlide && activeIndex >= mobileRailStart && activeIndex < mobileRailEnd
|
|
1617
|
+
? `${domId}-mobile-slide-${safeDomId(activeSlide.id)}`
|
|
1618
|
+
: undefined
|
|
1619
|
+
}
|
|
1620
|
+
className="max-h-72 overflow-y-auto outline-hidden focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-og-accent"
|
|
1621
|
+
data-og-mobile-slide-list
|
|
1622
|
+
data-og-window-start={mobileRailStart}
|
|
1623
|
+
data-og-window-end={mobileRailEnd}
|
|
1624
|
+
onScroll={(event) => {
|
|
1625
|
+
const scrollTop = event.currentTarget.scrollTop;
|
|
1626
|
+
const height = event.currentTarget.clientHeight;
|
|
1627
|
+
setMobileRail((current) => ({
|
|
1628
|
+
scrollTop,
|
|
1629
|
+
height: height || current.height,
|
|
1630
|
+
}));
|
|
1631
|
+
}}
|
|
1632
|
+
onKeyDown={(event) => {
|
|
1633
|
+
if (event.key === "Escape") {
|
|
1634
|
+
event.preventDefault();
|
|
1635
|
+
setMobileSelectorOpen(false);
|
|
1636
|
+
mobileSelectorTriggerRef.current?.focus();
|
|
1637
|
+
return;
|
|
1638
|
+
}
|
|
1639
|
+
const nextIndex = nextSlideIndexFromKey(event.key, activeIndex, slides.length);
|
|
1640
|
+
if (nextIndex === null) return;
|
|
1641
|
+
event.preventDefault();
|
|
1642
|
+
const next = slides[nextIndex];
|
|
1643
|
+
if (!next) return;
|
|
1644
|
+
if (next !== activeSlide) selectSlide(next, nextIndex);
|
|
1645
|
+
const list = event.currentTarget;
|
|
1646
|
+
const top = nextIndex * MOBILE_RAIL_ITEM_HEIGHT;
|
|
1647
|
+
const bottom = top + MOBILE_RAIL_ITEM_HEIGHT;
|
|
1648
|
+
if (top < list.scrollTop) list.scrollTop = top;
|
|
1649
|
+
else if (bottom > list.scrollTop + list.clientHeight) {
|
|
1650
|
+
list.scrollTop = bottom - list.clientHeight;
|
|
1651
|
+
}
|
|
1652
|
+
}}
|
|
1653
|
+
>
|
|
1654
|
+
<div
|
|
1655
|
+
className="relative w-full"
|
|
1656
|
+
style={{ height: slides.length * MOBILE_RAIL_ITEM_HEIGHT }}
|
|
1657
|
+
>
|
|
1658
|
+
{slides.slice(mobileRailStart, mobileRailEnd).map((slide, offset) => {
|
|
1659
|
+
const index = mobileRailStart + offset;
|
|
1660
|
+
const active = slide === activeSlide;
|
|
1661
|
+
return (
|
|
1662
|
+
<button
|
|
1663
|
+
key={slide.id}
|
|
1664
|
+
id={`${domId}-mobile-slide-${safeDomId(slide.id)}`}
|
|
1665
|
+
type="button"
|
|
1666
|
+
role="option"
|
|
1667
|
+
tabIndex={-1}
|
|
1668
|
+
aria-selected={active}
|
|
1669
|
+
aria-label={t("artifacts.presentationEditor.slideIndexValue", {
|
|
1670
|
+
index: index + 1,
|
|
1671
|
+
value: slide.title ? `: ${slide.title}` : "",
|
|
1672
|
+
})}
|
|
1673
|
+
onClick={() => chooseMobileSlide(slide, index)}
|
|
1674
|
+
className={cn(
|
|
1675
|
+
"absolute left-0 flex min-h-11 w-full items-center gap-2 px-2 text-left",
|
|
1676
|
+
active
|
|
1677
|
+
? "bg-og-surface-3 text-og-fg"
|
|
1678
|
+
: "text-og-fg-muted hover:bg-og-surface-3/70",
|
|
1679
|
+
)}
|
|
1680
|
+
style={{
|
|
1681
|
+
top: index * MOBILE_RAIL_ITEM_HEIGHT,
|
|
1682
|
+
height: MOBILE_RAIL_ITEM_HEIGHT,
|
|
1683
|
+
}}
|
|
1684
|
+
data-og-mobile-slide-index={index}
|
|
1685
|
+
>
|
|
1686
|
+
<span className="w-7 shrink-0 text-right text-og-xs tabular-nums text-og-fg-subtle">
|
|
1687
|
+
{index + 1}
|
|
1688
|
+
</span>
|
|
1689
|
+
<span className="min-w-0 flex-1 truncate text-og-sm">
|
|
1690
|
+
{slide.title ||
|
|
1691
|
+
t("artifacts.presentationEditor.slideIndex", { index: index + 1 })}
|
|
1692
|
+
</span>
|
|
1693
|
+
</button>
|
|
1694
|
+
);
|
|
1695
|
+
})}
|
|
1696
|
+
</div>
|
|
1697
|
+
</div>
|
|
1698
|
+
</div>
|
|
1699
|
+
) : null}
|
|
1700
|
+
|
|
1450
1701
|
<div
|
|
1451
1702
|
ref={viewportRef}
|
|
1452
1703
|
className="relative min-h-0 min-w-0 flex-1 overflow-auto bg-og-surface-3/60 p-6"
|
|
@@ -1476,10 +1727,13 @@ function PresentationEditorCore({
|
|
|
1476
1727
|
<span className="truncate">{commandFailure.message}</span>
|
|
1477
1728
|
<button
|
|
1478
1729
|
type="button"
|
|
1479
|
-
|
|
1730
|
+
disabled={mutationsBlocked}
|
|
1731
|
+
onClick={() => {
|
|
1732
|
+
if (!mutationsBlocked) commandFailure.retry();
|
|
1733
|
+
}}
|
|
1480
1734
|
className="shrink-0 rounded-og-xs px-1.5 py-0.5 font-medium outline-hidden hover:bg-og-surface-3 focus-visible:ring-2 focus-visible:ring-og-accent"
|
|
1481
1735
|
>
|
|
1482
|
-
|
|
1736
|
+
{t("artifacts.presentationEditor.retry")}
|
|
1483
1737
|
</button>
|
|
1484
1738
|
</div>
|
|
1485
1739
|
) : null}
|
|
@@ -1489,6 +1743,9 @@ function PresentationEditorCore({
|
|
|
1489
1743
|
className="relative mx-auto shrink-0 overflow-hidden shadow-og-lg"
|
|
1490
1744
|
style={{ width: stageWidth, height: stageHeight, backgroundColor: "#fff" }}
|
|
1491
1745
|
data-og-presentation-stage
|
|
1746
|
+
// The slide is white paper in both app themes, so its selection
|
|
1747
|
+
// chrome uses the light palette to stay visible on it.
|
|
1748
|
+
data-og-theme="light"
|
|
1492
1749
|
>
|
|
1493
1750
|
<canvas
|
|
1494
1751
|
ref={canvasRef}
|
|
@@ -1500,11 +1757,13 @@ function PresentationEditorCore({
|
|
|
1500
1757
|
ref={overlayRef}
|
|
1501
1758
|
role="application"
|
|
1502
1759
|
tabIndex={0}
|
|
1503
|
-
aria-label={
|
|
1760
|
+
aria-label={t("artifacts.presentationEditor.slideActiveindexEditor", {
|
|
1761
|
+
activeIndex: activeIndex + 1,
|
|
1762
|
+
})}
|
|
1504
1763
|
aria-describedby={
|
|
1505
1764
|
selected ? `${instructionsId} ${selectionProxyId}` : instructionsId
|
|
1506
1765
|
}
|
|
1507
|
-
aria-readonly={
|
|
1766
|
+
aria-readonly={mutationsBlocked || selected?.readOnly || undefined}
|
|
1508
1767
|
viewBox={`0 0 ${presentation.slideSize.width} ${presentation.slideSize.height}`}
|
|
1509
1768
|
className="absolute inset-0 size-full touch-none outline-hidden focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-og-accent"
|
|
1510
1769
|
onKeyDown={handleCanvasKeyDown}
|
|
@@ -1526,17 +1785,17 @@ function PresentationEditorCore({
|
|
|
1526
1785
|
width={effectiveSelectedPosition.width}
|
|
1527
1786
|
height={effectiveSelectedPosition.height}
|
|
1528
1787
|
fill="transparent"
|
|
1529
|
-
stroke="var(--og-accent
|
|
1788
|
+
stroke="var(--og-color-accent-deep)"
|
|
1530
1789
|
strokeWidth={2}
|
|
1531
1790
|
vectorEffect="non-scaling-stroke"
|
|
1532
1791
|
pointerEvents="none"
|
|
1533
1792
|
/>
|
|
1534
|
-
{!
|
|
1793
|
+
{!mutationsBlocked && !selected.readOnly ? (
|
|
1535
1794
|
<circle
|
|
1536
1795
|
cx={effectiveSelectedPosition.left + effectiveSelectedPosition.width}
|
|
1537
1796
|
cy={effectiveSelectedPosition.top + effectiveSelectedPosition.height}
|
|
1538
1797
|
r={6 / zoom}
|
|
1539
|
-
fill="var(--og-accent
|
|
1798
|
+
fill="var(--og-color-accent-deep)"
|
|
1540
1799
|
stroke="white"
|
|
1541
1800
|
strokeWidth={1.5}
|
|
1542
1801
|
vectorEffect="non-scaling-stroke"
|
|
@@ -1550,23 +1809,29 @@ function PresentationEditorCore({
|
|
|
1550
1809
|
|
|
1551
1810
|
{selected ? (
|
|
1552
1811
|
<span id={selectionProxyId} role="status" aria-live="polite" className="sr-only">
|
|
1553
|
-
{accessibleObjectLabel(selected)}
|
|
1812
|
+
{accessibleObjectLabel(t, selected)}
|
|
1554
1813
|
</span>
|
|
1555
1814
|
) : null}
|
|
1556
1815
|
|
|
1557
1816
|
<span id={instructionsId} className="sr-only">
|
|
1558
|
-
|
|
1559
|
-
to edit text, and Page Up or Page Down to change slides.
|
|
1817
|
+
{t("artifacts.presentationEditor.useBracketKeysToSelect")}
|
|
1560
1818
|
</span>
|
|
1561
1819
|
|
|
1562
1820
|
{textEdit && selected?.id === textEdit.shape.id && effectiveSelectedPosition ? (
|
|
1563
1821
|
<textarea
|
|
1564
1822
|
ref={editorRef}
|
|
1565
|
-
aria-label={
|
|
1823
|
+
aria-label={t("artifacts.presentationEditor.editName", {
|
|
1824
|
+
name: textEdit.shape.name,
|
|
1825
|
+
})}
|
|
1566
1826
|
value={textDraft}
|
|
1827
|
+
readOnly={mutationsBlocked}
|
|
1567
1828
|
maxLength={1_000_000}
|
|
1568
|
-
onChange={(event) =>
|
|
1569
|
-
|
|
1829
|
+
onChange={(event) => {
|
|
1830
|
+
if (!mutationsBlocked) setTextDraft(event.currentTarget.value);
|
|
1831
|
+
}}
|
|
1832
|
+
onInput={(event) => {
|
|
1833
|
+
if (!mutationsBlocked) setTextDraft(event.currentTarget.value);
|
|
1834
|
+
}}
|
|
1570
1835
|
onBlur={() => finishTextEdit()}
|
|
1571
1836
|
onKeyDown={(event) => {
|
|
1572
1837
|
if (event.key === "Escape") {
|
|
@@ -1601,7 +1866,7 @@ function PresentationEditorCore({
|
|
|
1601
1866
|
</div>
|
|
1602
1867
|
) : (
|
|
1603
1868
|
<div className="grid size-full min-h-72 place-items-center text-og-sm text-og-fg-muted">
|
|
1604
|
-
|
|
1869
|
+
{t("artifacts.presentationEditor.thisPresentationHasNoSlides")}
|
|
1605
1870
|
</div>
|
|
1606
1871
|
)}
|
|
1607
1872
|
</div>
|
|
@@ -1613,19 +1878,24 @@ function PresentationEditorCore({
|
|
|
1613
1878
|
/** Artifact chrome plus the editor, for drop-in SDK embedding. */
|
|
1614
1879
|
export function PresentationArtifactSurface({
|
|
1615
1880
|
presentation,
|
|
1616
|
-
title
|
|
1881
|
+
title: titleProp,
|
|
1882
|
+
showHeader,
|
|
1617
1883
|
subtitle,
|
|
1618
1884
|
actions,
|
|
1619
1885
|
busy,
|
|
1620
1886
|
className,
|
|
1621
1887
|
...editorProps
|
|
1622
1888
|
}: PresentationArtifactSurfaceProps) {
|
|
1889
|
+
const t = useOpenGeniText();
|
|
1890
|
+
const title =
|
|
1891
|
+
titleProp === undefined ? t("artifacts.presentationEditor.presentation") : titleProp;
|
|
1623
1892
|
const count = presentation.slides.items.length;
|
|
1624
1893
|
return (
|
|
1625
1894
|
<ArtifactSurface
|
|
1626
1895
|
modality="presentation"
|
|
1627
1896
|
title={title}
|
|
1628
|
-
|
|
1897
|
+
showHeader={showHeader}
|
|
1898
|
+
subtitle={subtitle ?? t("counts.slides", { count })}
|
|
1629
1899
|
actions={actions}
|
|
1630
1900
|
busy={busy}
|
|
1631
1901
|
className={className}
|
|
@@ -1638,19 +1908,24 @@ export function PresentationArtifactSurface({
|
|
|
1638
1908
|
/** Artifact chrome over the projection-first editor. */
|
|
1639
1909
|
export function PresentationProjectionArtifactSurface({
|
|
1640
1910
|
projection,
|
|
1641
|
-
title
|
|
1911
|
+
title: titleProp,
|
|
1912
|
+
showHeader,
|
|
1642
1913
|
subtitle,
|
|
1643
1914
|
actions,
|
|
1644
1915
|
busy,
|
|
1645
1916
|
className,
|
|
1646
1917
|
...editorProps
|
|
1647
1918
|
}: PresentationProjectionArtifactSurfaceProps) {
|
|
1919
|
+
const t = useOpenGeniText();
|
|
1920
|
+
const title =
|
|
1921
|
+
titleProp === undefined ? t("artifacts.presentationEditor.presentation") : titleProp;
|
|
1648
1922
|
const count = projection.slides.length;
|
|
1649
1923
|
return (
|
|
1650
1924
|
<ArtifactSurface
|
|
1651
1925
|
modality="presentation"
|
|
1652
1926
|
title={title}
|
|
1653
|
-
|
|
1927
|
+
showHeader={showHeader}
|
|
1928
|
+
subtitle={subtitle ?? t("counts.slides", { count })}
|
|
1654
1929
|
actions={actions}
|
|
1655
1930
|
busy={busy}
|
|
1656
1931
|
className={className}
|
|
@@ -1671,6 +1946,7 @@ function SlideThumbnail({
|
|
|
1671
1946
|
height: number;
|
|
1672
1947
|
paintRevision: string;
|
|
1673
1948
|
}) {
|
|
1949
|
+
const t = useOpenGeniText();
|
|
1674
1950
|
const canvasRef = useRef<HTMLCanvasElement>(null);
|
|
1675
1951
|
const imageCacheRef = useRef(new Map<string, CanvasImageEntry>());
|
|
1676
1952
|
const [paintEpoch, setPaintEpoch] = useState(0);
|
|
@@ -1693,6 +1969,7 @@ function SlideThumbnail({
|
|
|
1693
1969
|
const usedImageSources = new Set<string>();
|
|
1694
1970
|
for (const entry of objects) {
|
|
1695
1971
|
drawObject(
|
|
1972
|
+
t,
|
|
1696
1973
|
context,
|
|
1697
1974
|
entry,
|
|
1698
1975
|
entry.object.position,
|
|
@@ -1704,7 +1981,7 @@ function SlideThumbnail({
|
|
|
1704
1981
|
);
|
|
1705
1982
|
}
|
|
1706
1983
|
disposeUnusedCanvasImages(imageCacheRef.current, usedImageSources);
|
|
1707
|
-
}, [height, paintEpoch, paintRevision, slide, width]);
|
|
1984
|
+
}, [height, paintEpoch, paintRevision, slide, width, t]);
|
|
1708
1985
|
return <canvas ref={canvasRef} aria-hidden className="block size-full" />;
|
|
1709
1986
|
}
|
|
1710
1987
|
|
|
@@ -2021,18 +2298,21 @@ function querySpatialIndex(index: SpatialIndex, viewport: PresentationPosition):
|
|
|
2021
2298
|
.sort((a, b) => a - b);
|
|
2022
2299
|
}
|
|
2023
2300
|
|
|
2024
|
-
function paintSlideCanvas(
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2301
|
+
function paintSlideCanvas(
|
|
2302
|
+
t: OpenGeniText,
|
|
2303
|
+
options: {
|
|
2304
|
+
canvas: HTMLCanvasElement;
|
|
2305
|
+
slide: Slide;
|
|
2306
|
+
slideSize: { width: number; height: number };
|
|
2307
|
+
zoom: number;
|
|
2308
|
+
objects: DisplayObject[];
|
|
2309
|
+
objectIndexes: number[];
|
|
2310
|
+
renderRegion: PresentationPosition;
|
|
2311
|
+
draftPosition: DraftPosition | null;
|
|
2312
|
+
imageCache: Map<string, CanvasImageEntry>;
|
|
2313
|
+
requestRepaint: () => void;
|
|
2314
|
+
},
|
|
2315
|
+
): void {
|
|
2036
2316
|
const { canvas, slide, slideSize, zoom } = options;
|
|
2037
2317
|
const context = canvas.getContext("2d");
|
|
2038
2318
|
if (!context) return;
|
|
@@ -2065,6 +2345,7 @@ function paintSlideCanvas(options: {
|
|
|
2065
2345
|
? options.draftPosition.position
|
|
2066
2346
|
: entry.object.position;
|
|
2067
2347
|
drawObject(
|
|
2348
|
+
t,
|
|
2068
2349
|
context,
|
|
2069
2350
|
entry,
|
|
2070
2351
|
position,
|
|
@@ -2079,6 +2360,7 @@ function paintSlideCanvas(options: {
|
|
|
2079
2360
|
}
|
|
2080
2361
|
|
|
2081
2362
|
function drawObject(
|
|
2363
|
+
t: OpenGeniText,
|
|
2082
2364
|
context: CanvasRenderingContext2D,
|
|
2083
2365
|
entry: DisplayObject,
|
|
2084
2366
|
position: PresentationPosition,
|
|
@@ -2090,13 +2372,14 @@ function drawObject(
|
|
|
2090
2372
|
): void {
|
|
2091
2373
|
switch (entry.kind) {
|
|
2092
2374
|
case "shape":
|
|
2093
|
-
drawShape(context, entry.object as PresentationShape, position);
|
|
2375
|
+
drawShape(t, context, entry.object as PresentationShape, position);
|
|
2094
2376
|
return;
|
|
2095
2377
|
case "chart":
|
|
2096
|
-
drawChart(context, entry.object as PresentationChart, position);
|
|
2378
|
+
drawChart(t, context, entry.object as PresentationChart, position);
|
|
2097
2379
|
return;
|
|
2098
2380
|
case "image": {
|
|
2099
2381
|
const source = drawImage(
|
|
2382
|
+
t,
|
|
2100
2383
|
context,
|
|
2101
2384
|
entry.object as PresentationImage,
|
|
2102
2385
|
position,
|
|
@@ -2107,10 +2390,11 @@ function drawObject(
|
|
|
2107
2390
|
return;
|
|
2108
2391
|
}
|
|
2109
2392
|
case "table":
|
|
2110
|
-
drawTable(context, entry.object as PresentationTable, position, renderRegion, pixelScale);
|
|
2393
|
+
drawTable(t, context, entry.object as PresentationTable, position, renderRegion, pixelScale);
|
|
2111
2394
|
return;
|
|
2112
2395
|
case "group":
|
|
2113
2396
|
drawGroup(
|
|
2397
|
+
t,
|
|
2114
2398
|
context,
|
|
2115
2399
|
entry.object as PresentationGroup,
|
|
2116
2400
|
position,
|
|
@@ -2124,6 +2408,7 @@ function drawObject(
|
|
|
2124
2408
|
}
|
|
2125
2409
|
|
|
2126
2410
|
function drawTable(
|
|
2411
|
+
t: OpenGeniText,
|
|
2127
2412
|
context: CanvasRenderingContext2D,
|
|
2128
2413
|
table: PresentationTable,
|
|
2129
2414
|
position: PresentationPosition,
|
|
@@ -2170,7 +2455,7 @@ function drawTable(
|
|
|
2170
2455
|
context.rect(left, top, width, height);
|
|
2171
2456
|
applyFillAndLine(context, cell.fill, table.line, false);
|
|
2172
2457
|
if (width * pixelScale >= 8 && height * pixelScale >= 8) {
|
|
2173
|
-
drawText(context, cell.text.toString(), cell.text.style, {
|
|
2458
|
+
drawText(t, context, cell.text.toString(), cell.text.style, {
|
|
2174
2459
|
left: left + 4,
|
|
2175
2460
|
top: top + 2,
|
|
2176
2461
|
width: Math.max(1, width - 8),
|
|
@@ -2248,6 +2533,7 @@ function cumulativeOffsets(tracks: readonly number[], start: number): number[] {
|
|
|
2248
2533
|
}
|
|
2249
2534
|
|
|
2250
2535
|
function drawGroup(
|
|
2536
|
+
t: OpenGeniText,
|
|
2251
2537
|
context: CanvasRenderingContext2D,
|
|
2252
2538
|
group: PresentationGroup,
|
|
2253
2539
|
position: PresentationPosition,
|
|
@@ -2275,6 +2561,7 @@ function drawGroup(
|
|
|
2275
2561
|
const entry = displayObjectFromElement(child);
|
|
2276
2562
|
if (!intersects(objectBounds(entry), childRenderRegion)) continue;
|
|
2277
2563
|
drawObject(
|
|
2564
|
+
t,
|
|
2278
2565
|
context,
|
|
2279
2566
|
entry,
|
|
2280
2567
|
child.position,
|
|
@@ -2329,6 +2616,7 @@ function inverseGroupRegion(
|
|
|
2329
2616
|
}
|
|
2330
2617
|
|
|
2331
2618
|
function drawShape(
|
|
2619
|
+
t: OpenGeniText,
|
|
2332
2620
|
context: CanvasRenderingContext2D,
|
|
2333
2621
|
shape: PresentationShape,
|
|
2334
2622
|
position: PresentationPosition,
|
|
@@ -2381,7 +2669,7 @@ function drawShape(
|
|
|
2381
2669
|
applyFillAndLine(context, shape.fill, shape.line, shape.geometry === "line");
|
|
2382
2670
|
const text = shape.text.toString();
|
|
2383
2671
|
if (text)
|
|
2384
|
-
drawText(context, text, shape.text.style, {
|
|
2672
|
+
drawText(t, context, text, shape.text.style, {
|
|
2385
2673
|
left: x,
|
|
2386
2674
|
top: y,
|
|
2387
2675
|
width: position.width,
|
|
@@ -2391,6 +2679,7 @@ function drawShape(
|
|
|
2391
2679
|
}
|
|
2392
2680
|
|
|
2393
2681
|
function drawChart(
|
|
2682
|
+
t: OpenGeniText,
|
|
2394
2683
|
context: CanvasRenderingContext2D,
|
|
2395
2684
|
chart: PresentationChart,
|
|
2396
2685
|
position: PresentationPosition,
|
|
@@ -2403,6 +2692,7 @@ function drawChart(
|
|
|
2403
2692
|
context.strokeRect(position.left, position.top, position.width, position.height);
|
|
2404
2693
|
if (chart.title) {
|
|
2405
2694
|
drawText(
|
|
2695
|
+
t,
|
|
2406
2696
|
context,
|
|
2407
2697
|
chart.title,
|
|
2408
2698
|
{ fontSize: 18, bold: true, alignment: "center" },
|
|
@@ -2532,6 +2822,7 @@ function drawChart(
|
|
|
2532
2822
|
context.fillRect(left, Math.min(baseline, valueY), Math.max(1, barWidth), height);
|
|
2533
2823
|
if (chart.dataLabels?.showValue) {
|
|
2534
2824
|
drawText(
|
|
2825
|
+
t,
|
|
2535
2826
|
context,
|
|
2536
2827
|
String(value),
|
|
2537
2828
|
{ fontSize: 11, alignment: "center" },
|
|
@@ -2628,6 +2919,7 @@ function drawRadarChart(
|
|
|
2628
2919
|
}
|
|
2629
2920
|
|
|
2630
2921
|
function drawImage(
|
|
2922
|
+
t: OpenGeniText,
|
|
2631
2923
|
context: CanvasRenderingContext2D,
|
|
2632
2924
|
image: PresentationImage,
|
|
2633
2925
|
position: PresentationPosition,
|
|
@@ -2672,8 +2964,9 @@ function drawImage(
|
|
|
2672
2964
|
context.stroke();
|
|
2673
2965
|
context.setLineDash([]);
|
|
2674
2966
|
drawText(
|
|
2967
|
+
t,
|
|
2675
2968
|
context,
|
|
2676
|
-
image.alt || image.prompt || "
|
|
2969
|
+
image.alt || image.prompt || t("artifacts.presentationEditor.image"),
|
|
2677
2970
|
{ fontSize: 14, color: "slate-600" },
|
|
2678
2971
|
{
|
|
2679
2972
|
left: position.left + 12,
|
|
@@ -2784,6 +3077,7 @@ function disposeCanvasImageEntry(entry: CanvasImageEntry): void {
|
|
|
2784
3077
|
}
|
|
2785
3078
|
|
|
2786
3079
|
function drawText(
|
|
3080
|
+
t: OpenGeniText,
|
|
2787
3081
|
context: CanvasRenderingContext2D,
|
|
2788
3082
|
text: string,
|
|
2789
3083
|
style: PresentationTextStyle,
|
|
@@ -2792,7 +3086,7 @@ function drawText(
|
|
|
2792
3086
|
const fontSize = style.fontSize ?? 18;
|
|
2793
3087
|
const fontStyle = style.italic ? "italic " : "";
|
|
2794
3088
|
const fontWeight = style.bold ? "700 " : "400 ";
|
|
2795
|
-
context.font = `${fontStyle}${fontWeight}${fontSize}px ${style.fontFamily ?? "
|
|
3089
|
+
context.font = `${fontStyle}${fontWeight}${fontSize}px ${style.fontFamily ?? t("artifacts.presentationEditor.arialSansSerif")}`;
|
|
2796
3090
|
context.fillStyle = resolveColor(style.color ?? "slate-950");
|
|
2797
3091
|
context.textAlign =
|
|
2798
3092
|
style.alignment === "center" ? "center" : style.alignment === "right" ? "right" : "left";
|
|
@@ -2946,21 +3240,27 @@ function objectRotation(entry: DisplayObject): number {
|
|
|
2946
3240
|
return 0;
|
|
2947
3241
|
}
|
|
2948
3242
|
|
|
2949
|
-
function objectLabel(entry: DisplayObject): string {
|
|
3243
|
+
function objectLabel(t: OpenGeniText, entry: DisplayObject): string {
|
|
2950
3244
|
const object = entry.object;
|
|
2951
3245
|
if (entry.kind === "shape") {
|
|
2952
3246
|
const shape = object as PresentationShape;
|
|
2953
|
-
return shape.text.toString().trim() || shape.name || "
|
|
3247
|
+
return shape.text.toString().trim() || shape.name || t("artifacts.presentationEditor.shape");
|
|
2954
3248
|
}
|
|
2955
|
-
if (entry.kind === "chart")
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
3249
|
+
if (entry.kind === "chart")
|
|
3250
|
+
return (
|
|
3251
|
+
(object as PresentationChart).title || object.name || t("artifacts.presentationEditor.chart")
|
|
3252
|
+
);
|
|
3253
|
+
if (entry.kind === "image")
|
|
3254
|
+
return (
|
|
3255
|
+
(object as PresentationImage).alt || object.name || t("artifacts.presentationEditor.image")
|
|
3256
|
+
);
|
|
3257
|
+
if (entry.kind === "table") return object.name || t("artifacts.presentationEditor.table");
|
|
3258
|
+
return object.name || t("artifacts.presentationEditor.group");
|
|
2959
3259
|
}
|
|
2960
3260
|
|
|
2961
|
-
function accessibleObjectLabel(entry: DisplayObject): string {
|
|
3261
|
+
function accessibleObjectLabel(t: OpenGeniText, entry: DisplayObject): string {
|
|
2962
3262
|
const position = entry.object.position;
|
|
2963
|
-
return `${objectLabel(entry)}. Position ${Math.round(position.left)}, ${Math.round(position.top)}. Size ${Math.round(position.width)} by ${Math.round(position.height)}.`;
|
|
3263
|
+
return `${objectLabel(t, entry)}. Position ${Math.round(position.left)}, ${Math.round(position.top)}. Size ${Math.round(position.width)} by ${Math.round(position.height)}.`;
|
|
2964
3264
|
}
|
|
2965
3265
|
|
|
2966
3266
|
function nextTextBoxPosition(
|