@opengeni/react 1.0.1 → 1.0.2-canary.37202341988001
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 +660 -21
- package/dist/accounts.d.ts +64 -0
- package/dist/accounts.js +822 -0
- package/dist/accounts.js.map +1 -0
- package/dist/approvals.d.ts +2 -1
- package/dist/artifacts-document.js +3 -2
- package/dist/artifacts-presentation.js +3 -2
- package/dist/artifacts-spreadsheet.js +2 -2
- package/dist/artifacts.d.ts +4 -1
- package/dist/artifacts.js +518 -42
- package/dist/artifacts.js.map +1 -1
- package/dist/browser-viewer-SHYKQRNX.js +16 -0
- package/dist/capability-catalog-row.d.ts +20 -0
- package/dist/capability-logo-fallback.d.ts +3 -0
- package/dist/chat-interactive-block-UGBTNB3L.js +11 -0
- package/dist/chat-interactive-block-UGBTNB3L.js.map +1 -0
- package/dist/chunk-26ZNDDLZ.js +453 -0
- package/dist/chunk-26ZNDDLZ.js.map +1 -0
- package/dist/chunk-3CTRFMAK.js +359 -0
- package/dist/chunk-3CTRFMAK.js.map +1 -0
- package/dist/chunk-447JLCBU.js +209 -0
- package/dist/chunk-447JLCBU.js.map +1 -0
- package/dist/chunk-4RVYOY4O.js +379 -0
- package/dist/chunk-4RVYOY4O.js.map +1 -0
- package/dist/chunk-5CVXZA3Y.js +292 -0
- package/dist/chunk-5CVXZA3Y.js.map +1 -0
- package/dist/chunk-5J4FOW6Q.js +108 -0
- package/dist/chunk-5J4FOW6Q.js.map +1 -0
- package/dist/chunk-742CZ3L3.js +481 -0
- package/dist/chunk-742CZ3L3.js.map +1 -0
- package/dist/chunk-A2PI6UMY.js +41 -0
- package/dist/chunk-A2PI6UMY.js.map +1 -0
- package/dist/{chunk-7WCLAEFV.js → chunk-A4UJB2MM.js} +37 -27
- package/dist/chunk-A4UJB2MM.js.map +1 -0
- package/dist/chunk-B3V6TG77.js +41 -0
- package/dist/chunk-B3V6TG77.js.map +1 -0
- package/dist/chunk-BRM6FVZA.js +302 -0
- package/dist/chunk-BRM6FVZA.js.map +1 -0
- package/dist/chunk-C5X5AJXK.js +182 -0
- package/dist/chunk-C5X5AJXK.js.map +1 -0
- package/dist/{chunk-6KLX2RH5.js → chunk-DO544OSV.js} +1075 -79
- package/dist/chunk-DO544OSV.js.map +1 -0
- package/dist/{chunk-R3AZOAB5.js → chunk-DYWBUX5Q.js} +29 -123
- package/dist/chunk-DYWBUX5Q.js.map +1 -0
- package/dist/{chunk-HA46CYQK.js → chunk-EESD3PY3.js} +792 -537
- package/dist/chunk-EESD3PY3.js.map +1 -0
- package/dist/{chunk-5UQPNLIO.js → chunk-EN3YTHKR.js} +4117 -3896
- package/dist/chunk-EN3YTHKR.js.map +1 -0
- package/dist/chunk-ERGYJIBB.js +21 -0
- package/dist/chunk-ERGYJIBB.js.map +1 -0
- package/dist/chunk-FZCP527Y.js +116 -0
- package/dist/chunk-FZCP527Y.js.map +1 -0
- package/dist/chunk-GIMRELBW.js +14 -0
- package/dist/chunk-GIMRELBW.js.map +1 -0
- package/dist/chunk-GYVRFZDY.js +2733 -0
- package/dist/chunk-GYVRFZDY.js.map +1 -0
- package/dist/{chunk-LLOLUHVG.js → chunk-HDJWDK7W.js} +1358 -2746
- package/dist/chunk-HDJWDK7W.js.map +1 -0
- package/dist/chunk-I7IWRQLN.js +1608 -0
- package/dist/chunk-I7IWRQLN.js.map +1 -0
- package/dist/chunk-IT4BJUGF.js +13055 -0
- package/dist/chunk-IT4BJUGF.js.map +1 -0
- package/dist/chunk-IWIDV7SB.js +1 -0
- package/dist/chunk-IWIDV7SB.js.map +1 -0
- package/dist/chunk-J2QWVSQY.js +312 -0
- package/dist/chunk-J2QWVSQY.js.map +1 -0
- package/dist/chunk-J6DBS4T3.js +371 -0
- package/dist/chunk-J6DBS4T3.js.map +1 -0
- package/dist/{chunk-B6WPZSTT.js → chunk-JIQYUGVL.js} +1331 -1163
- package/dist/chunk-JIQYUGVL.js.map +1 -0
- package/dist/chunk-JT4JW7BC.js +54 -0
- package/dist/chunk-JT4JW7BC.js.map +1 -0
- package/dist/chunk-K3HQAKQX.js +24 -0
- package/dist/chunk-K3HQAKQX.js.map +1 -0
- package/dist/{chunk-PEI6RANI.js → chunk-PNY3JKBJ.js} +309 -74
- package/dist/chunk-PNY3JKBJ.js.map +1 -0
- package/dist/chunk-RHREZ7BO.js +11 -0
- package/dist/chunk-RHREZ7BO.js.map +1 -0
- package/dist/chunk-RLUSC2WA.js +299 -0
- package/dist/chunk-RLUSC2WA.js.map +1 -0
- package/dist/{chunk-IGC6A2ZI.js → chunk-RSI7XYXL.js} +777 -246
- package/dist/chunk-RSI7XYXL.js.map +1 -0
- package/dist/chunk-SCOTPE2I.js +589 -0
- package/dist/chunk-SCOTPE2I.js.map +1 -0
- package/dist/{chunk-C5ZPSSS5.js → chunk-TKOTKRWY.js} +5 -4
- package/dist/{chunk-C5ZPSSS5.js.map → chunk-TKOTKRWY.js.map} +1 -1
- package/dist/chunk-TMYGL6X5.js +742 -0
- package/dist/chunk-TMYGL6X5.js.map +1 -0
- package/dist/chunk-UGLEYEMP.js +33 -0
- package/dist/chunk-UGLEYEMP.js.map +1 -0
- package/dist/chunk-UK4TINKT.js +27 -0
- package/dist/chunk-UK4TINKT.js.map +1 -0
- package/dist/chunk-UTRTG6LH.js +220 -0
- package/dist/chunk-UTRTG6LH.js.map +1 -0
- package/dist/chunk-WEHMPOXK.js +39 -0
- package/dist/chunk-WEHMPOXK.js.map +1 -0
- package/dist/chunk-WGXVEJO5.js +319 -0
- package/dist/chunk-WGXVEJO5.js.map +1 -0
- package/dist/chunk-WRHIZYZF.js +988 -0
- package/dist/chunk-WRHIZYZF.js.map +1 -0
- package/dist/{chunk-HUIKIDM5.js → chunk-WUISZ3WU.js} +223 -115
- package/dist/chunk-WUISZ3WU.js.map +1 -0
- package/dist/chunk-XCHWDJ22.js +107 -0
- package/dist/chunk-XCHWDJ22.js.map +1 -0
- package/dist/{chunk-KCGXPP5V.js → chunk-Y2PRMYLC.js} +11 -6
- package/dist/chunk-Y2PRMYLC.js.map +1 -0
- package/dist/chunk-YBXQDQFX.js +1772 -0
- package/dist/chunk-YBXQDQFX.js.map +1 -0
- package/dist/chunk-YM2DE7BQ.js +3124 -0
- package/dist/chunk-YM2DE7BQ.js.map +1 -0
- package/dist/{chunk-KZ73RL76.js → chunk-YQEAA6LT.js} +7 -3
- package/dist/chunk-YQEAA6LT.js.map +1 -0
- package/dist/chunk-YV4L3ILF.js +9 -0
- package/dist/chunk-YV4L3ILF.js.map +1 -0
- package/dist/chunk-ZYRGEKWS.js +216 -0
- package/dist/chunk-ZYRGEKWS.js.map +1 -0
- package/dist/client.d.ts +7 -4
- package/dist/clipboard.js +1 -0
- package/dist/commands/types.d.ts +2 -0
- package/dist/components/anthropic-mark.d.ts +3 -0
- package/dist/components/approval-surface.d.ts +15 -0
- package/dist/components/artifacts/artifact-chrome.d.ts +120 -0
- package/dist/components/artifacts/artifact-sandbox.d.ts +27 -0
- package/dist/components/artifacts/artifact-surface.d.ts +3 -1
- 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 +2 -1
- package/dist/components/artifacts/editable-artifact-view.d.ts +46 -0
- package/dist/components/artifacts/editable-document.d.ts +1 -1
- package/dist/components/artifacts/editable-presentation.d.ts +2 -2
- package/dist/components/artifacts/editable-spreadsheet.d.ts +2 -1
- 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 +48 -3
- package/dist/components/artifacts/session-artifact-viewer.d.ts +39 -0
- package/dist/components/artifacts/site-view.d.ts +23 -0
- package/dist/components/artifacts/spreadsheet-general-display.d.ts +24 -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 +10 -1
- package/dist/components/chat-composer.d.ts +21 -3
- package/dist/components/child-session-link.d.ts +5 -0
- package/dist/components/claude-mark.d.ts +3 -0
- package/dist/components/code-editor.d.ts +1 -4
- package/dist/components/composer.d.ts +45 -4
- package/dist/components/computer-viewer.d.ts +4 -1
- package/dist/components/copy-button.d.ts +3 -1
- package/dist/components/desktop-viewer.d.ts +1 -1
- package/dist/components/enrollment-consent.d.ts +6 -3
- package/dist/components/file-browser.d.ts +10 -1
- package/dist/components/fleet-tile.d.ts +2 -2
- package/dist/components/grok-mark.d.ts +26 -0
- package/dist/components/human-input-form.d.ts +21 -2
- package/dist/components/human-input-surface.d.ts +6 -3
- package/dist/components/machine-card.d.ts +4 -1
- package/dist/components/machines/machine-detail.d.ts +4 -1
- package/dist/components/machines/machine-operation-policy.d.ts +11 -0
- package/dist/components/machines-dashboard.d.ts +3 -1
- package/dist/components/markdown-table-layout.d.ts +12 -0
- package/dist/components/markdown.d.ts +47 -3
- package/dist/components/message-timeline.d.ts +72 -9
- package/dist/components/model-mark.d.ts +29 -0
- package/dist/components/model-policy-picker-menu.d.ts +9 -0
- package/dist/components/model-policy-picker.d.ts +62 -13
- package/dist/components/open-geni-chat.d.ts +58 -0
- package/dist/components/open-geni-links.d.ts +68 -0
- package/dist/components/openrouter-mark.d.ts +6 -0
- package/dist/components/pierre-file.d.ts +1 -1
- package/dist/components/preview-loading.d.ts +2 -0
- package/dist/components/queue-item-content.d.ts +9 -0
- package/dist/components/sandbox-files.d.ts +13 -2
- package/dist/components/sandbox-workspace.d.ts +43 -3
- package/dist/components/session-capability-frame.d.ts +35 -0
- package/dist/components/session-chrome.d.ts +66 -8
- package/dist/components/session-commands-panel.d.ts +6 -0
- 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 +89 -0
- package/dist/components/session-list.d.ts +36 -0
- package/dist/components/session-mcp-capability-card.d.ts +41 -0
- package/dist/components/session-proxy-scope.d.ts +21 -0
- package/dist/components/timeline-anchor.d.ts +24 -0
- package/dist/components/timeline-annotation-chrome.d.ts +25 -0
- package/dist/components/timeline-annotation-layout.d.ts +42 -0
- package/dist/components/timeline-annotation-markers.d.ts +8 -0
- package/dist/components/timeline-annotation-reveal-context.d.ts +4 -0
- package/dist/components/timeline-annotation-shared.d.ts +31 -0
- package/dist/components/timeline-annotations-dialog.d.ts +3 -2
- package/dist/components/timeline-annotations.d.ts +13 -3
- 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/tip-follow.d.ts +16 -0
- package/dist/components/usage-limit-notice.d.ts +49 -0
- package/dist/components/usage-member-list.d.ts +91 -0
- package/dist/components/usage-meter.d.ts +73 -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/workspace-dock.d.ts +6 -2
- package/dist/composer.d.ts +5 -4
- package/dist/composer.js +15 -9
- package/dist/computer-viewer-6SRGWRUX.js +19 -0
- package/dist/computer-viewer-6SRGWRUX.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 +16 -0
- package/dist/connect.d.ts +21 -0
- package/dist/connect.js +2129 -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 +5 -0
- package/dist/desktop.d.ts +7 -0
- package/dist/desktop.js +26 -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 +14 -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 +21 -0
- package/dist/editor.js.map +1 -0
- package/dist/embedded-session-client.d.ts +23 -0
- package/dist/file-node-visibility.d.ts +15 -0
- package/dist/{fleet-decision-row-GGCAT4E4.js → fleet-decision-row-YZ3ZKWMM.js} +2 -1
- package/dist/fleet-decision-row-YZ3ZKWMM.js.map +1 -0
- package/dist/hooks/channel-cache.d.ts +23 -0
- package/dist/hooks/latest-question.d.ts +25 -0
- package/dist/hooks/shared-machines-list.d.ts +14 -0
- package/dist/hooks/use-attached-browsers.d.ts +2 -1
- 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-channels.d.ts +1 -0
- package/dist/hooks/use-codex-accounts.d.ts +25 -7
- package/dist/hooks/use-composer.d.ts +45 -9
- 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 +2 -0
- package/dist/hooks/use-connect.d.ts +22 -0
- package/dist/hooks/use-desktop-stream.d.ts +1 -1
- package/dist/hooks/use-file-attachments.d.ts +21 -2
- package/dist/hooks/use-machine-chip.d.ts +3 -3
- package/dist/hooks/use-machines.d.ts +19 -1
- package/dist/hooks/use-sandbox-files.d.ts +5 -1
- package/dist/hooks/use-session-background-commands.d.ts +14 -0
- package/dist/hooks/use-session-events.d.ts +30 -8
- package/dist/hooks/use-session-lineage.d.ts +4 -0
- package/dist/hooks/use-session-mcp-approval-policy.d.ts +2 -2
- package/dist/hooks/use-session.d.ts +6 -0
- package/dist/hooks/use-turn-queue.d.ts +12 -0
- package/dist/hooks/use-usage.d.ts +40 -0
- package/dist/hooks/use-workspace-edit.d.ts +4 -0
- package/dist/hooks/use-workspace-sessions.d.ts +27 -5
- package/dist/human-input.d.ts +3 -1
- package/dist/identity-link-accounts.d.ts +11 -0
- package/dist/identity-link-consent.d.ts +18 -0
- package/dist/index.d.ts +60 -17
- package/dist/index.js +2238 -6201
- package/dist/index.js.map +1 -1
- package/dist/interaction.d.ts +1 -1
- package/dist/interaction.js +35 -184
- package/dist/interaction.js.map +1 -1
- package/dist/latest-question-HTRIS4KJ.js +117 -0
- package/dist/latest-question-HTRIS4KJ.js.map +1 -0
- package/dist/lib/error-message.d.ts +7 -0
- package/dist/lib/format.d.ts +36 -2
- package/dist/lib/host-theme.d.ts +70 -0
- package/dist/lib/interaction-errors.d.ts +6 -0
- package/dist/lib/menu-styles.d.ts +22 -0
- package/dist/lib/pierre-diffs-loader.d.ts +20 -0
- package/dist/lib/workbench-peers.d.ts +36 -0
- package/dist/lib/xterm-theme.d.ts +7 -5
- package/dist/machines.d.ts +4 -2
- package/dist/machines.js +14 -4
- package/dist/markdown-table-layout-QXSLK4BY.js +106 -0
- package/dist/markdown-table-layout-QXSLK4BY.js.map +1 -0
- package/dist/mcp-connection-status.d.ts +14 -0
- package/dist/model-policy-picker-menu-M54ISBMN.js +14 -0
- package/dist/model-policy-picker-menu-M54ISBMN.js.map +1 -0
- package/dist/model-policy.d.ts +19 -3
- package/dist/model-policy.js +9 -1
- package/dist/older-history.d.ts +30 -0
- package/dist/platform-activity-row-627BFZ46.js +182 -0
- package/dist/platform-activity-row-627BFZ46.js.map +1 -0
- package/dist/plugin-details.d.ts +14 -0
- package/dist/plugin-discovery.d.ts +25 -0
- package/dist/provider.d.ts +13 -1
- package/dist/{queue-surface-implementation-2KVJTYXH.js → queue-surface-implementation-ZHFI5JBP.js} +131 -44
- package/dist/queue-surface-implementation-ZHFI5JBP.js.map +1 -0
- package/dist/realtime/realtime-control.d.ts +6 -3
- package/dist/realtime.js +133 -74
- package/dist/realtime.js.map +1 -1
- package/dist/sandbox-files-GORZOUUJ.js +20 -0
- package/dist/sandbox-files-GORZOUUJ.js.map +1 -0
- package/dist/session-auth-recommendation.d.ts +5 -0
- package/dist/session-capability-policy.d.ts +12 -0
- package/dist/session-ui.d.ts +30 -2
- package/dist/session-ui.js +85 -7
- package/dist/session-ui.js.map +1 -1
- package/dist/session.d.ts +8 -2
- package/dist/session.js +30 -19
- package/dist/sites-ui.d.ts +34 -0
- package/dist/sites.d.ts +3 -0
- package/dist/sites.js +11 -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 +31 -0
- package/dist/terminal.js.map +1 -0
- package/dist/timeline/activity-rail.d.ts +11 -2
- package/dist/timeline/allowance-exhausted-row.d.ts +24 -0
- package/dist/timeline/compaction-copy.d.ts +10 -0
- package/dist/timeline/entrance.d.ts +13 -1
- package/dist/timeline/genie-loading.d.ts +34 -0
- package/dist/timeline/index.d.ts +6 -2
- package/dist/timeline/knowledge-receipt.d.ts +17 -0
- package/dist/timeline/platform-activity-row.d.ts +14 -0
- package/dist/timeline/presented-image.d.ts +6 -0
- package/dist/timeline/projection.d.ts +31 -2
- package/dist/timeline/registry.d.ts +2 -0
- package/dist/timeline/retained-image.d.ts +18 -0
- package/dist/timeline/rolling-activity.d.ts +11 -0
- package/dist/timeline/screenshot-lightbox.d.ts +16 -1
- package/dist/timeline/shared.d.ts +8 -3
- 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 +2 -1
- package/dist/timeline/turn-summary.d.ts +34 -3
- package/dist/timeline/types.d.ts +147 -7
- package/dist/timeline-annotation-markers-GNDHTGBD.js +165 -0
- package/dist/timeline-annotation-markers-GNDHTGBD.js.map +1 -0
- package/dist/timeline-annotation-selection-DMLMM2TX.js +241 -0
- package/dist/timeline-annotation-selection-DMLMM2TX.js.map +1 -0
- package/dist/timeline-annotations-dialog-ELRDBHTS.js +273 -0
- package/dist/timeline-annotations-dialog-ELRDBHTS.js.map +1 -0
- package/dist/types/machines.d.ts +2 -2
- package/dist/usage/allowance-copy.d.ts +25 -0
- package/dist/usage/summary.d.ts +35 -0
- package/dist/usage.d.ts +13 -0
- package/dist/usage.js +1074 -0
- package/dist/usage.js.map +1 -0
- package/package.json +44 -4
- package/src/accounts.tsx +1072 -0
- package/src/approvals.ts +8 -1
- package/src/artifacts.ts +42 -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 +94 -0
- package/src/capability-logo-fallback.ts +22 -0
- package/src/client.ts +22 -13
- package/src/commands/registry.ts +18 -15
- package/src/commands/types.ts +2 -0
- package/src/components/anthropic-mark.tsx +10 -0
- package/src/components/approval-surface.tsx +171 -37
- package/src/components/artifacts/artifact-chrome.tsx +413 -0
- package/src/components/artifacts/artifact-sandbox.tsx +185 -0
- package/src/components/artifacts/artifact-surface.tsx +39 -19
- package/src/components/artifacts/chat-interactive-block.tsx +260 -0
- package/src/components/artifacts/deferred-chat-media.tsx +67 -0
- package/src/components/artifacts/document-editor.tsx +141 -16
- package/src/components/artifacts/editable-artifact-ui.tsx +4 -2
- package/src/components/artifacts/editable-artifact-view.tsx +187 -0
- package/src/components/artifacts/editable-artifact-workbench.tsx +5 -2
- package/src/components/artifacts/editable-document.tsx +37 -36
- package/src/components/artifacts/editable-presentation.tsx +36 -18
- package/src/components/artifacts/editable-spreadsheet.tsx +5 -2
- package/src/components/artifacts/index.ts +44 -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 +323 -67
- package/src/components/artifacts/published-html-artifact-frame.tsx +338 -5
- package/src/components/artifacts/session-artifact-viewer.tsx +376 -0
- package/src/components/artifacts/site-view.tsx +116 -0
- package/src/components/artifacts/spreadsheet-canvas.ts +5 -10
- package/src/components/artifacts/spreadsheet-general-display.ts +43 -0
- package/src/components/artifacts/spreadsheet-grid.tsx +12 -13
- 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 +312 -0
- package/src/components/browser-viewer.tsx +1054 -314
- package/src/components/chat-composer.tsx +131 -85
- package/src/components/child-session-link.tsx +27 -0
- package/src/components/claude-mark.tsx +10 -0
- package/src/components/code-editor.tsx +13 -16
- package/src/components/composer-transcription-control.tsx +7 -5
- package/src/components/composer.tsx +376 -49
- package/src/components/computer-viewer.tsx +1041 -329
- package/src/components/copy-button.tsx +13 -5
- package/src/components/desktop-viewer.tsx +1 -1
- package/src/components/enrollment-consent.tsx +65 -7
- package/src/components/enrollment-device-flow.tsx +1 -1
- package/src/components/file-browser.tsx +158 -34
- package/src/components/fleet-tile.tsx +8 -16
- package/src/components/generated-video-player.tsx +4 -2
- package/src/components/grok-mark.tsx +33 -0
- package/src/components/human-input-form.tsx +455 -114
- package/src/components/human-input-surface.tsx +18 -7
- package/src/components/interaction-intervention-banner.tsx +2 -2
- package/src/components/machine-card.tsx +119 -4
- package/src/components/machine-dock-bar.tsx +1 -1
- package/src/components/machine-input-display.ts +23 -2
- package/src/components/machines/machine-detail.tsx +52 -2
- package/src/components/machines/machine-operation-policy.tsx +179 -0
- package/src/components/machines-dashboard.tsx +8 -17
- package/src/components/markdown-table-layout.ts +132 -0
- package/src/components/markdown.tsx +473 -44
- package/src/components/message-timeline.tsx +2754 -665
- package/src/components/model-mark.tsx +90 -0
- package/src/components/model-picker.tsx +15 -4
- package/src/components/model-policy-picker-menu.tsx +424 -0
- package/src/components/model-policy-picker.tsx +337 -381
- package/src/components/open-geni-chat.tsx +338 -0
- package/src/components/open-geni-links.tsx +179 -0
- package/src/components/openrouter-mark.tsx +13 -0
- package/src/components/pierre-diff.tsx +41 -16
- package/src/components/pierre-file.tsx +36 -11
- package/src/components/preview-loading.tsx +154 -0
- package/src/components/queue-item-content.ts +14 -0
- package/src/components/queue-surface-implementation.tsx +132 -42
- package/src/components/queue-surface-state.tsx +3 -1
- package/src/components/sandbox-files.tsx +267 -35
- package/src/components/sandbox-terminal.tsx +48 -11
- package/src/components/sandbox-workspace.tsx +337 -135
- package/src/components/session-capability-frame.tsx +192 -0
- package/src/components/session-chrome.tsx +1027 -328
- package/src/components/session-commands-panel.tsx +126 -0
- package/src/components/session-commands.tsx +18 -0
- package/src/components/session-connection-request.tsx +97 -0
- package/src/components/session-conversation.tsx +526 -0
- package/src/components/session-list.tsx +250 -0
- package/src/components/session-mcp-capability-card.tsx +680 -0
- package/src/components/session-proxy-scope.tsx +92 -0
- package/src/components/session-status.tsx +1 -1
- package/src/components/timeline-anchor.tsx +119 -0
- package/src/components/timeline-annotation-chrome.tsx +196 -0
- package/src/components/timeline-annotation-layout.ts +268 -0
- package/src/components/timeline-annotation-markers.tsx +185 -0
- package/src/components/timeline-annotation-reveal-context.ts +9 -0
- package/src/components/timeline-annotation-selection.tsx +106 -54
- package/src/components/timeline-annotation-shared.ts +245 -0
- package/src/components/timeline-annotations-dialog.tsx +185 -128
- package/src/components/timeline-annotations.tsx +189 -45
- 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/tip-follow.ts +70 -7
- package/src/components/tooltip.tsx +38 -5
- package/src/components/usage-limit-notice.tsx +179 -0
- package/src/components/usage-member-list.tsx +792 -0
- package/src/components/usage-meter.tsx +382 -0
- package/src/components/use-viewer-menu-dismiss.ts +33 -0
- package/src/components/user-message-body.tsx +194 -49
- package/src/components/workspace-dock.tsx +141 -175
- package/src/composer.ts +6 -1
- package/src/connect-account-identity.tsx +34 -0
- package/src/connect-accounts.tsx +233 -0
- package/src/connect-chooser.tsx +336 -0
- package/src/connect-panel.tsx +99 -0
- package/src/connect-setup.tsx +307 -0
- package/src/connect.ts +60 -0
- package/src/connection-assets.d.ts +4 -0
- package/src/connection-catalog.tsx +162 -0
- package/src/connection-discovery.tsx +235 -0
- package/src/connection-installed.tsx +51 -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 +36 -0
- package/src/conversation-timeline.ts +92 -0
- package/src/desktop.ts +24 -0
- package/src/device-authorization.tsx +98 -0
- package/src/diffs.ts +16 -0
- package/src/discovery-cache.ts +42 -0
- package/src/editor.ts +13 -0
- package/src/embedded-session-client.ts +104 -0
- package/src/file-node-visibility.ts +66 -0
- package/src/hooks/channel-cache.ts +104 -0
- package/src/hooks/internal.ts +3 -2
- package/src/hooks/latest-question.ts +164 -0
- package/src/hooks/shared-machines-list.ts +239 -0
- package/src/hooks/use-attached-browsers.ts +5 -1
- package/src/hooks/use-available-models.ts +20 -14
- package/src/hooks/use-browser-frame-stream.ts +25 -3
- package/src/hooks/use-browser-session.ts +271 -71
- package/src/hooks/use-browser-sessions.ts +7 -1
- package/src/hooks/use-channels.ts +32 -10
- package/src/hooks/use-codex-accounts.ts +78 -21
- package/src/hooks/use-composer.ts +1034 -320
- package/src/hooks/use-computer-frame-stream.ts +39 -16
- package/src/hooks/use-computer-input-posture.ts +94 -0
- package/src/hooks/use-computer-session.ts +110 -32
- package/src/hooks/use-computer-sessions.ts +8 -1
- package/src/hooks/use-connect.ts +23 -0
- package/src/hooks/use-desktop-stream.ts +19 -28
- package/src/hooks/use-file-attachments.ts +118 -10
- package/src/hooks/use-goal.ts +36 -9
- package/src/hooks/use-human-input.ts +31 -4
- package/src/hooks/use-last-started-turn-policy.ts +15 -13
- package/src/hooks/use-machine-chip.ts +23 -6
- package/src/hooks/use-machines.ts +104 -6
- package/src/hooks/use-sandbox-files.ts +253 -150
- package/src/hooks/use-sandbox-git.ts +58 -29
- package/src/hooks/use-session-background-commands.ts +67 -0
- package/src/hooks/use-session-capabilities.ts +21 -2
- package/src/hooks/use-session-events.ts +759 -433
- package/src/hooks/use-session-lineage.ts +28 -6
- package/src/hooks/use-session-mcp-approval-policy.ts +13 -5
- package/src/hooks/use-session.ts +75 -16
- package/src/hooks/use-slash-commands.ts +6 -11
- package/src/hooks/use-turn-queue.ts +113 -13
- package/src/hooks/use-usage.ts +100 -0
- package/src/hooks/use-video-artifact-playback.ts +1 -1
- package/src/hooks/use-voice-input.ts +12 -1
- package/src/hooks/use-workspace-capture.ts +3 -2
- package/src/hooks/use-workspace-edit.ts +23 -5
- package/src/hooks/use-workspace-sessions.ts +99 -11
- package/src/human-input.ts +12 -1
- package/src/identity-link-accounts.tsx +148 -0
- package/src/identity-link-consent.tsx +192 -0
- package/src/index.ts +157 -12
- package/src/interaction.ts +1 -0
- package/src/lib/error-message.ts +37 -0
- package/src/lib/format.ts +150 -14
- package/src/lib/host-theme.ts +511 -0
- package/src/lib/interaction-errors.ts +33 -0
- package/src/lib/menu-styles.ts +44 -0
- package/src/lib/pierre-diffs-loader.ts +53 -0
- package/src/lib/workbench-peers.ts +62 -0
- package/src/lib/xterm-theme.ts +23 -21
- package/src/machines.ts +9 -1
- package/src/mcp-connection-status.ts +35 -0
- package/src/model-policy.ts +223 -69
- package/src/older-history.ts +87 -0
- package/src/plugin-details.tsx +185 -0
- package/src/plugin-discovery.tsx +196 -0
- package/src/provider.tsx +55 -14
- package/src/realtime/dropdown-menu.tsx +19 -12
- package/src/realtime/realtime-control.tsx +133 -46
- package/src/session-auth-recommendation.ts +48 -0
- package/src/session-capability-policy.ts +83 -0
- package/src/session-context.ts +4 -3
- package/src/session-ui.ts +66 -2
- package/src/session.ts +18 -1
- package/src/sites-ui.tsx +402 -0
- package/src/sites.ts +3 -0
- package/src/skill-discovery.tsx +208 -0
- package/src/terminal.ts +26 -0
- package/src/timeline/activity-rail.tsx +171 -80
- package/src/timeline/allowance-exhausted-row.tsx +86 -0
- package/src/timeline/compaction-copy.ts +42 -0
- package/src/timeline/entrance.tsx +28 -3
- package/src/timeline/fleet-decision-projection.ts +2 -1
- package/src/timeline/fleet-decision-row.tsx +1 -0
- package/src/timeline/genie-loading.tsx +136 -0
- package/src/timeline/index.ts +11 -0
- package/src/timeline/knowledge-receipt.tsx +100 -0
- package/src/timeline/parsers.ts +2 -2
- package/src/timeline/platform-activity-row.tsx +216 -0
- package/src/timeline/presented-image.ts +49 -0
- package/src/timeline/projection.ts +1609 -84
- package/src/timeline/registry.ts +15 -3
- package/src/timeline/retained-image.ts +97 -0
- package/src/timeline/rolling-activity.tsx +92 -0
- package/src/timeline/screenshot-lightbox.tsx +115 -17
- package/src/timeline/shared.tsx +47 -15
- package/src/timeline/startup-preference.ts +33 -0
- package/src/timeline/startup-timings.tsx +145 -0
- package/src/timeline/tool-display-name.ts +8 -6
- package/src/timeline/tool-renderers.tsx +497 -128
- package/src/timeline/turn-summary.tsx +218 -44
- package/src/timeline/types.ts +192 -7
- package/src/types/machines.ts +10 -0
- package/src/usage/allowance-copy.ts +64 -0
- package/src/usage/summary.ts +93 -0
- package/src/usage.ts +50 -0
- package/styles/compiled.css +2098 -757
- package/styles/connect.css +284 -0
- package/styles/connect.d.ts +1 -0
- package/styles/effective-tokens.css +1 -0
- package/styles/index.css +201 -9
- package/styles/responsive.css +27 -1
- package/styles/session-capability.css +44 -0
- package/styles/tokens.css +135 -65
- package/dist/chunk-5UQPNLIO.js.map +0 -1
- package/dist/chunk-6KLX2RH5.js.map +0 -1
- package/dist/chunk-7WCLAEFV.js.map +0 -1
- package/dist/chunk-B6WPZSTT.js.map +0 -1
- package/dist/chunk-FK6VG4LL.js +0 -90
- package/dist/chunk-FK6VG4LL.js.map +0 -1
- package/dist/chunk-HA46CYQK.js.map +0 -1
- package/dist/chunk-HUIKIDM5.js.map +0 -1
- package/dist/chunk-IGC6A2ZI.js.map +0 -1
- package/dist/chunk-KCGXPP5V.js.map +0 -1
- package/dist/chunk-KZ73RL76.js.map +0 -1
- package/dist/chunk-LAKLF4PA.js +0 -141
- package/dist/chunk-LAKLF4PA.js.map +0 -1
- package/dist/chunk-LLOLUHVG.js.map +0 -1
- package/dist/chunk-MKPIAGVL.js +0 -465
- package/dist/chunk-MKPIAGVL.js.map +0 -1
- package/dist/chunk-PEI6RANI.js.map +0 -1
- package/dist/chunk-R3AZOAB5.js.map +0 -1
- package/dist/chunk-WSK7G5LE.js +0 -170
- package/dist/chunk-WSK7G5LE.js.map +0 -1
- package/dist/chunk-XBZWOM2K.js +0 -218
- package/dist/chunk-XBZWOM2K.js.map +0 -1
- package/dist/chunk-Y7OEDUJ5.js +0 -8810
- package/dist/chunk-Y7OEDUJ5.js.map +0 -1
- package/dist/fleet-decision-row-GGCAT4E4.js.map +0 -1
- package/dist/hooks/use-packs.d.ts +0 -32
- package/dist/interactive-workbench-viewers-TOHBXJEE.js +0 -15
- package/dist/queue-surface-implementation-2KVJTYXH.js.map +0 -1
- package/dist/timeline-annotation-selection-3L7LHGG2.js +0 -187
- package/dist/timeline-annotation-selection-3L7LHGG2.js.map +0 -1
- package/dist/timeline-annotations-dialog-U7EVLR75.js +0 -196
- package/dist/timeline-annotations-dialog-U7EVLR75.js.map +0 -1
- package/src/hooks/use-packs.ts +0 -157
- /package/dist/{interactive-workbench-viewers-TOHBXJEE.js.map → browser-viewer-SHYKQRNX.js.map} +0 -0
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useLatestTaskRunner
|
|
3
|
+
} from "./chunk-WEHMPOXK.js";
|
|
1
4
|
import {
|
|
2
5
|
ArtifactSurface,
|
|
3
6
|
EditableArtifactMessage,
|
|
@@ -6,7 +9,7 @@ import {
|
|
|
6
9
|
editableArtifactProjectionKey,
|
|
7
10
|
editableArtifactStatusLabel,
|
|
8
11
|
useEditableArtifactView
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-Y2PRMYLC.js";
|
|
10
13
|
import {
|
|
11
14
|
cn
|
|
12
15
|
} from "./chunk-22KP6LR5.js";
|
|
@@ -37,6 +40,9 @@ var MAX_ZOOM = 4;
|
|
|
37
40
|
var RAIL_ITEM_HEIGHT = 116;
|
|
38
41
|
var RAIL_OVERSCAN = 3;
|
|
39
42
|
var DEFAULT_RAIL_HEIGHT = 640;
|
|
43
|
+
var MOBILE_RAIL_ITEM_HEIGHT = 44;
|
|
44
|
+
var MOBILE_RAIL_OVERSCAN = 3;
|
|
45
|
+
var DEFAULT_MOBILE_LIST_HEIGHT = 264;
|
|
40
46
|
var DEFAULT_VIEWPORT = { width: 960, height: 640 };
|
|
41
47
|
var SPATIAL_TILE = 256;
|
|
42
48
|
var MAX_SPATIAL_BUCKETS_PER_OBJECT = 1024;
|
|
@@ -87,6 +93,14 @@ function PresentationProjectionEditor({
|
|
|
87
93
|
}
|
|
88
94
|
);
|
|
89
95
|
}
|
|
96
|
+
function nextSlideIndexFromKey(key, activeIndex, length) {
|
|
97
|
+
if (length === 0) return null;
|
|
98
|
+
if (key === "ArrowDown") return Math.min(length - 1, activeIndex + 1);
|
|
99
|
+
if (key === "ArrowUp") return Math.max(0, activeIndex - 1);
|
|
100
|
+
if (key === "Home") return 0;
|
|
101
|
+
if (key === "End") return length - 1;
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
90
104
|
function PresentationEditorCore({
|
|
91
105
|
presentation,
|
|
92
106
|
revision,
|
|
@@ -97,6 +111,7 @@ function PresentationEditorCore({
|
|
|
97
111
|
zoom: controlledZoom,
|
|
98
112
|
defaultZoom = 0.75,
|
|
99
113
|
readOnly = false,
|
|
114
|
+
authoringBlockedReason,
|
|
100
115
|
className,
|
|
101
116
|
onSlideChange,
|
|
102
117
|
onSelectionChange,
|
|
@@ -104,6 +119,8 @@ function PresentationEditorCore({
|
|
|
104
119
|
onCommandError,
|
|
105
120
|
onZoomChange
|
|
106
121
|
}) {
|
|
122
|
+
const mutationsBlocked = readOnly || authoringBlockedReason !== void 0;
|
|
123
|
+
const authoringStatus = readOnly ? null : authoringBlockedReason === "pending_conflict" ? "An earlier change needs attention" : authoringBlockedReason === "prior_writer" ? "Saving earlier changes\u2026" : null;
|
|
107
124
|
const slides = presentation.slides.items;
|
|
108
125
|
const firstSlideId = slides[0]?.id ?? null;
|
|
109
126
|
const [localSlideId, setLocalSlideId] = useState(
|
|
@@ -125,6 +142,11 @@ function PresentationEditorCore({
|
|
|
125
142
|
scrollTop: 0,
|
|
126
143
|
height: DEFAULT_RAIL_HEIGHT
|
|
127
144
|
});
|
|
145
|
+
const [mobileSelectorOpen, setMobileSelectorOpen] = useState(false);
|
|
146
|
+
const [mobileRail, setMobileRail] = useState({
|
|
147
|
+
scrollTop: 0,
|
|
148
|
+
height: DEFAULT_MOBILE_LIST_HEIGHT
|
|
149
|
+
});
|
|
128
150
|
const [viewport, setViewport] = useState({
|
|
129
151
|
scrollLeft: 0,
|
|
130
152
|
scrollTop: 0,
|
|
@@ -137,6 +159,9 @@ function PresentationEditorCore({
|
|
|
137
159
|
const [textDraft, setTextDraft] = useState("");
|
|
138
160
|
const [paintEpoch, setPaintEpoch] = useState(0);
|
|
139
161
|
const railRef = useRef(null);
|
|
162
|
+
const mobileSelectorTriggerRef = useRef(null);
|
|
163
|
+
const mobileSelectorPanelRef = useRef(null);
|
|
164
|
+
const mobileRailRef = useRef(null);
|
|
140
165
|
const viewportRef = useRef(null);
|
|
141
166
|
const stageRef = useRef(null);
|
|
142
167
|
const canvasRef = useRef(null);
|
|
@@ -150,6 +175,7 @@ function PresentationEditorCore({
|
|
|
150
175
|
const commandVersionsRef = useRef(/* @__PURE__ */ new Map());
|
|
151
176
|
const pendingSlideIdRef = useRef(null);
|
|
152
177
|
const pendingObjectIdRef = useRef(null);
|
|
178
|
+
const mobileRailScrollOnOpenRef = useRef(0);
|
|
153
179
|
const domId = useId().replaceAll(":", "");
|
|
154
180
|
const selectionProxyId = `${domId}-presentation-selection`;
|
|
155
181
|
const instructionsId = `${domId}-presentation-instructions`;
|
|
@@ -208,6 +234,44 @@ function PresentationEditorCore({
|
|
|
208
234
|
observer.observe(element);
|
|
209
235
|
return () => observer.disconnect();
|
|
210
236
|
}, []);
|
|
237
|
+
useLayoutEffect(() => {
|
|
238
|
+
if (!mobileSelectorOpen) return;
|
|
239
|
+
const element = mobileRailRef.current;
|
|
240
|
+
if (!element) return;
|
|
241
|
+
element.scrollTop = mobileRailScrollOnOpenRef.current;
|
|
242
|
+
element.focus();
|
|
243
|
+
const measure = () => setMobileRail((current) => ({
|
|
244
|
+
scrollTop: element.scrollTop,
|
|
245
|
+
height: element.clientHeight || current.height
|
|
246
|
+
}));
|
|
247
|
+
measure();
|
|
248
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
249
|
+
const observer = new ResizeObserver(measure);
|
|
250
|
+
observer.observe(element);
|
|
251
|
+
return () => observer.disconnect();
|
|
252
|
+
}, [mobileSelectorOpen]);
|
|
253
|
+
useEffect(() => {
|
|
254
|
+
if (!mobileSelectorOpen) return;
|
|
255
|
+
const onPointerDown = (event) => {
|
|
256
|
+
const target = event.target;
|
|
257
|
+
if (!(target instanceof Node)) return;
|
|
258
|
+
if (mobileSelectorTriggerRef.current?.contains(target)) return;
|
|
259
|
+
if (mobileSelectorPanelRef.current?.contains(target)) return;
|
|
260
|
+
setMobileSelectorOpen(false);
|
|
261
|
+
};
|
|
262
|
+
const onKeyDown = (event) => {
|
|
263
|
+
if (event.key !== "Escape") return;
|
|
264
|
+
event.preventDefault();
|
|
265
|
+
setMobileSelectorOpen(false);
|
|
266
|
+
mobileSelectorTriggerRef.current?.focus();
|
|
267
|
+
};
|
|
268
|
+
document.addEventListener("pointerdown", onPointerDown);
|
|
269
|
+
document.addEventListener("keydown", onKeyDown);
|
|
270
|
+
return () => {
|
|
271
|
+
document.removeEventListener("pointerdown", onPointerDown);
|
|
272
|
+
document.removeEventListener("keydown", onKeyDown);
|
|
273
|
+
};
|
|
274
|
+
}, [mobileSelectorOpen]);
|
|
211
275
|
useLayoutEffect(() => {
|
|
212
276
|
const element = viewportRef.current;
|
|
213
277
|
if (!element) return;
|
|
@@ -419,7 +483,7 @@ function PresentationEditorCore({
|
|
|
419
483
|
]);
|
|
420
484
|
const runCommit = useCallback(
|
|
421
485
|
(key, command, rollback, retry) => {
|
|
422
|
-
if (!onCommit) return;
|
|
486
|
+
if (mutationsBlocked || !onCommit) return;
|
|
423
487
|
const version = (commandVersionsRef.current.get(key) ?? 0) + 1;
|
|
424
488
|
commandVersionsRef.current.set(key, version);
|
|
425
489
|
const scope = commandScopeRef.current;
|
|
@@ -455,11 +519,11 @@ function PresentationEditorCore({
|
|
|
455
519
|
}
|
|
456
520
|
);
|
|
457
521
|
},
|
|
458
|
-
[onCommandError, onCommit]
|
|
522
|
+
[mutationsBlocked, onCommandError, onCommit]
|
|
459
523
|
);
|
|
460
524
|
const commitPosition = useCallback(
|
|
461
525
|
(entry, kind, next) => {
|
|
462
|
-
if (!activeSlide ||
|
|
526
|
+
if (!activeSlide || mutationsBlocked || entry.readOnly) return;
|
|
463
527
|
const before = copyPosition(entry.object.position);
|
|
464
528
|
const after = normalizeEditorPosition(next);
|
|
465
529
|
if (samePosition(before, after)) return;
|
|
@@ -487,10 +551,10 @@ function PresentationEditorCore({
|
|
|
487
551
|
);
|
|
488
552
|
submit();
|
|
489
553
|
},
|
|
490
|
-
[activeSlide,
|
|
554
|
+
[activeSlide, mutationsBlocked, runCommit]
|
|
491
555
|
);
|
|
492
556
|
const insertSlide = useCallback(() => {
|
|
493
|
-
if (
|
|
557
|
+
if (mutationsBlocked) return;
|
|
494
558
|
const slideId = randomPresentationId();
|
|
495
559
|
const index = activeIndex < 0 ? slides.length : activeIndex + 1;
|
|
496
560
|
const command = { kind: "slide-insert", slideId, index };
|
|
@@ -506,9 +570,9 @@ function PresentationEditorCore({
|
|
|
506
570
|
);
|
|
507
571
|
};
|
|
508
572
|
submit();
|
|
509
|
-
}, [activeIndex,
|
|
573
|
+
}, [activeIndex, mutationsBlocked, runCommit, slides.length]);
|
|
510
574
|
const deleteSlide = useCallback(() => {
|
|
511
|
-
if (
|
|
575
|
+
if (mutationsBlocked || !activeSlide) return;
|
|
512
576
|
const command = {
|
|
513
577
|
kind: "slide-delete",
|
|
514
578
|
slideId: activeSlide.id,
|
|
@@ -516,9 +580,9 @@ function PresentationEditorCore({
|
|
|
516
580
|
};
|
|
517
581
|
const submit = () => runCommit(`slide-delete:${activeSlide.id}`, command, () => void 0, submit);
|
|
518
582
|
submit();
|
|
519
|
-
}, [activeIndex, activeSlide,
|
|
583
|
+
}, [activeIndex, activeSlide, mutationsBlocked, runCommit]);
|
|
520
584
|
const insertTextBox = useCallback(() => {
|
|
521
|
-
if (
|
|
585
|
+
if (mutationsBlocked || !activeSlide) return;
|
|
522
586
|
const objectId = randomPresentationId();
|
|
523
587
|
const position = nextTextBoxPosition(objects, presentation.slideSize);
|
|
524
588
|
const command = {
|
|
@@ -540,9 +604,9 @@ function PresentationEditorCore({
|
|
|
540
604
|
);
|
|
541
605
|
};
|
|
542
606
|
submit();
|
|
543
|
-
}, [activeSlide, objects, presentation.slideSize,
|
|
607
|
+
}, [activeSlide, objects, presentation.slideSize, mutationsBlocked, runCommit]);
|
|
544
608
|
const deleteObject = useCallback(() => {
|
|
545
|
-
if (
|
|
609
|
+
if (mutationsBlocked || !activeSlide || !selected || selected.readOnly) return;
|
|
546
610
|
const command = {
|
|
547
611
|
kind: "object-delete",
|
|
548
612
|
slideId: activeSlide.id,
|
|
@@ -550,10 +614,10 @@ function PresentationEditorCore({
|
|
|
550
614
|
};
|
|
551
615
|
const submit = () => runCommit(`object-delete:${activeSlide.id}:${selected.id}`, command, () => void 0, submit);
|
|
552
616
|
submit();
|
|
553
|
-
}, [activeSlide,
|
|
617
|
+
}, [activeSlide, mutationsBlocked, runCommit, selected]);
|
|
554
618
|
const startTextEdit = useCallback(
|
|
555
619
|
(entry) => {
|
|
556
|
-
if (
|
|
620
|
+
if (mutationsBlocked || !entry || entry.readOnly || entry.kind !== "shape") return;
|
|
557
621
|
const shape = entry.object;
|
|
558
622
|
if (shape.geometry === "line") return;
|
|
559
623
|
const before = shape.text.toString();
|
|
@@ -563,7 +627,7 @@ function PresentationEditorCore({
|
|
|
563
627
|
setTextEdit(edit);
|
|
564
628
|
setTextDraft(before);
|
|
565
629
|
},
|
|
566
|
-
[activeSlide,
|
|
630
|
+
[activeSlide, mutationsBlocked]
|
|
567
631
|
);
|
|
568
632
|
useEffect(() => {
|
|
569
633
|
if (!textEdit) return;
|
|
@@ -573,12 +637,12 @@ function PresentationEditorCore({
|
|
|
573
637
|
const finishTextEdit = useCallback(
|
|
574
638
|
(cancel = false) => {
|
|
575
639
|
const edit = textEditRef.current;
|
|
576
|
-
if (!edit) return;
|
|
640
|
+
if (!edit || !cancel && authoringBlockedReason !== void 0) return;
|
|
577
641
|
textEditRef.current = null;
|
|
578
642
|
setTextEdit(null);
|
|
579
643
|
const { shape, before, slideId } = edit;
|
|
580
644
|
if (!activeSlide || activeSlide.id !== slideId) return;
|
|
581
|
-
if (cancel ||
|
|
645
|
+
if (cancel || mutationsBlocked || before === textDraft) return;
|
|
582
646
|
shape.text.set(textDraft);
|
|
583
647
|
setModelEpoch((value) => value + 1);
|
|
584
648
|
const command = {
|
|
@@ -603,7 +667,7 @@ function PresentationEditorCore({
|
|
|
603
667
|
);
|
|
604
668
|
submit();
|
|
605
669
|
},
|
|
606
|
-
[activeSlide,
|
|
670
|
+
[activeSlide, authoringBlockedReason, mutationsBlocked, runCommit, textDraft]
|
|
607
671
|
);
|
|
608
672
|
const cycleObject = useCallback(
|
|
609
673
|
(direction) => {
|
|
@@ -623,6 +687,32 @@ function PresentationEditorCore({
|
|
|
623
687
|
},
|
|
624
688
|
[activeIndex, activeSlide, selectSlide, slides]
|
|
625
689
|
);
|
|
690
|
+
const toggleMobileSlideSelector = useCallback(() => {
|
|
691
|
+
setMobileSelectorOpen((open) => {
|
|
692
|
+
if (open) return false;
|
|
693
|
+
const index = Math.max(0, activeIndex);
|
|
694
|
+
const height = DEFAULT_MOBILE_LIST_HEIGHT;
|
|
695
|
+
const maxScroll = Math.max(0, slides.length * MOBILE_RAIL_ITEM_HEIGHT - height);
|
|
696
|
+
const scrollTop = Math.max(
|
|
697
|
+
0,
|
|
698
|
+
Math.min(
|
|
699
|
+
maxScroll,
|
|
700
|
+
index * MOBILE_RAIL_ITEM_HEIGHT - height / 2 + MOBILE_RAIL_ITEM_HEIGHT / 2
|
|
701
|
+
)
|
|
702
|
+
);
|
|
703
|
+
mobileRailScrollOnOpenRef.current = scrollTop;
|
|
704
|
+
setMobileRail({ scrollTop, height });
|
|
705
|
+
return true;
|
|
706
|
+
});
|
|
707
|
+
}, [activeIndex, slides.length]);
|
|
708
|
+
const chooseMobileSlide = useCallback(
|
|
709
|
+
(slide, index) => {
|
|
710
|
+
if (slide !== activeSlide) selectSlide(slide, index);
|
|
711
|
+
setMobileSelectorOpen(false);
|
|
712
|
+
mobileSelectorTriggerRef.current?.focus();
|
|
713
|
+
},
|
|
714
|
+
[activeSlide, selectSlide]
|
|
715
|
+
);
|
|
626
716
|
const handleCanvasKeyDown = useCallback(
|
|
627
717
|
(event) => {
|
|
628
718
|
if (event.metaKey || event.ctrlKey) {
|
|
@@ -672,7 +762,7 @@ function PresentationEditorCore({
|
|
|
672
762
|
}
|
|
673
763
|
if (!selected || !event.key.startsWith("Arrow")) return;
|
|
674
764
|
event.preventDefault();
|
|
675
|
-
if (
|
|
765
|
+
if (mutationsBlocked || selected.readOnly) return;
|
|
676
766
|
const amount = event.shiftKey ? 10 : 1;
|
|
677
767
|
const dx = event.key === "ArrowLeft" ? -amount : event.key === "ArrowRight" ? amount : 0;
|
|
678
768
|
const dy = event.key === "ArrowUp" ? -amount : event.key === "ArrowDown" ? amount : 0;
|
|
@@ -693,7 +783,7 @@ function PresentationEditorCore({
|
|
|
693
783
|
commitPosition,
|
|
694
784
|
cycleObject,
|
|
695
785
|
fitSlide,
|
|
696
|
-
|
|
786
|
+
mutationsBlocked,
|
|
697
787
|
selectObject,
|
|
698
788
|
selected,
|
|
699
789
|
startTextEdit,
|
|
@@ -717,7 +807,7 @@ function PresentationEditorCore({
|
|
|
717
807
|
event.preventDefault();
|
|
718
808
|
event.stopPropagation();
|
|
719
809
|
selectObject(entry);
|
|
720
|
-
if (
|
|
810
|
+
if (mutationsBlocked || entry.readOnly) return;
|
|
721
811
|
const start = pointFromPointer(event);
|
|
722
812
|
const before = copyPosition(entry.object.position);
|
|
723
813
|
dragRef.current = {
|
|
@@ -731,7 +821,7 @@ function PresentationEditorCore({
|
|
|
731
821
|
setDraftPosition({ objectId: entry.id, position: before });
|
|
732
822
|
overlayRef.current?.setPointerCapture?.(event.pointerId);
|
|
733
823
|
},
|
|
734
|
-
[pointFromPointer,
|
|
824
|
+
[pointFromPointer, mutationsBlocked, selectObject]
|
|
735
825
|
);
|
|
736
826
|
const handlePointerDown = useCallback(
|
|
737
827
|
(event) => {
|
|
@@ -749,16 +839,17 @@ function PresentationEditorCore({
|
|
|
749
839
|
const handlePointerMove = useCallback(
|
|
750
840
|
(event) => {
|
|
751
841
|
const drag = dragRef.current;
|
|
752
|
-
if (!drag || drag.pointerId !== event.pointerId) return;
|
|
842
|
+
if (!drag || drag.pointerId !== event.pointerId || mutationsBlocked) return;
|
|
753
843
|
const point = pointFromPointer(event);
|
|
754
844
|
setDraftPosition({ objectId: drag.object.id, position: positionFromDrag(drag, point) });
|
|
755
845
|
},
|
|
756
|
-
[pointFromPointer]
|
|
846
|
+
[mutationsBlocked, pointFromPointer]
|
|
757
847
|
);
|
|
758
848
|
const finishDrag = useCallback(
|
|
759
849
|
(event, cancel = false) => {
|
|
760
850
|
const drag = dragRef.current;
|
|
761
|
-
if (!drag || drag.pointerId !== event.pointerId)
|
|
851
|
+
if (!drag || drag.pointerId !== event.pointerId || !cancel && authoringBlockedReason !== void 0)
|
|
852
|
+
return;
|
|
762
853
|
dragRef.current = null;
|
|
763
854
|
const captureTarget = overlayRef.current;
|
|
764
855
|
if (captureTarget?.hasPointerCapture?.(event.pointerId)) {
|
|
@@ -771,19 +862,32 @@ function PresentationEditorCore({
|
|
|
771
862
|
const point = pointFromPointer(event);
|
|
772
863
|
commitPosition(entry, drag.mode, positionFromDrag(drag, point));
|
|
773
864
|
},
|
|
774
|
-
[commitPosition, objectById, pointFromPointer]
|
|
865
|
+
[authoringBlockedReason, commitPosition, objectById, pointFromPointer]
|
|
866
|
+
);
|
|
867
|
+
const handleLostPointerCapture = useCallback(
|
|
868
|
+
(event) => {
|
|
869
|
+
const drag = dragRef.current;
|
|
870
|
+
if (!drag || drag.pointerId !== event.pointerId || authoringBlockedReason !== void 0)
|
|
871
|
+
return;
|
|
872
|
+
dragRef.current = null;
|
|
873
|
+
setDraftPosition(null);
|
|
874
|
+
},
|
|
875
|
+
[authoringBlockedReason]
|
|
775
876
|
);
|
|
776
|
-
const handleLostPointerCapture = useCallback((event) => {
|
|
777
|
-
const drag = dragRef.current;
|
|
778
|
-
if (!drag || drag.pointerId !== event.pointerId) return;
|
|
779
|
-
dragRef.current = null;
|
|
780
|
-
setDraftPosition(null);
|
|
781
|
-
}, []);
|
|
782
877
|
const railStart = Math.max(0, Math.floor(rail.scrollTop / RAIL_ITEM_HEIGHT) - RAIL_OVERSCAN);
|
|
783
878
|
const railEnd = Math.min(
|
|
784
879
|
slides.length,
|
|
785
880
|
Math.ceil((rail.scrollTop + rail.height) / RAIL_ITEM_HEIGHT) + RAIL_OVERSCAN
|
|
786
881
|
);
|
|
882
|
+
const mobileRailStart = Math.max(
|
|
883
|
+
0,
|
|
884
|
+
Math.floor(mobileRail.scrollTop / MOBILE_RAIL_ITEM_HEIGHT) - MOBILE_RAIL_OVERSCAN
|
|
885
|
+
);
|
|
886
|
+
const mobileRailEnd = Math.min(
|
|
887
|
+
slides.length,
|
|
888
|
+
Math.ceil((mobileRail.scrollTop + mobileRail.height) / MOBILE_RAIL_ITEM_HEIGHT) + MOBILE_RAIL_OVERSCAN
|
|
889
|
+
);
|
|
890
|
+
const slideCountLabel = activeIndex >= 0 ? `${activeIndex + 1} / ${slides.length}` : `0 / ${slides.length}`;
|
|
787
891
|
const stageWidth = presentation.slideSize.width * zoom;
|
|
788
892
|
const stageHeight = presentation.slideSize.height * zoom;
|
|
789
893
|
return /* @__PURE__ */ jsxs(
|
|
@@ -793,8 +897,8 @@ function PresentationEditorCore({
|
|
|
793
897
|
style: { minHeight: "22rem" },
|
|
794
898
|
"data-og-presentation-editor": true,
|
|
795
899
|
"data-og-painted-object-count": visibleObjectIndexes.length,
|
|
796
|
-
"data-og-command-state": commandFailure ? "error" : pendingCommands > 0 ? "pending" : "idle",
|
|
797
|
-
"aria-busy": pendingCommands > 0 ? "true" : void 0,
|
|
900
|
+
"data-og-command-state": commandFailure || authoringBlockedReason === "pending_conflict" ? "error" : pendingCommands > 0 || authoringBlockedReason === "prior_writer" ? "pending" : "idle",
|
|
901
|
+
"aria-busy": pendingCommands > 0 || authoringBlockedReason === "prior_writer" ? "true" : void 0,
|
|
798
902
|
children: [
|
|
799
903
|
/* @__PURE__ */ jsxs(
|
|
800
904
|
"div",
|
|
@@ -815,7 +919,23 @@ function PresentationEditorCore({
|
|
|
815
919
|
children: /* @__PURE__ */ jsx(ChevronLeftIcon, {})
|
|
816
920
|
}
|
|
817
921
|
),
|
|
818
|
-
/* @__PURE__ */ jsx(
|
|
922
|
+
/* @__PURE__ */ jsx(
|
|
923
|
+
"button",
|
|
924
|
+
{
|
|
925
|
+
ref: mobileSelectorTriggerRef,
|
|
926
|
+
type: "button",
|
|
927
|
+
"aria-label": "Choose slide",
|
|
928
|
+
"aria-haspopup": "listbox",
|
|
929
|
+
"aria-expanded": mobileSelectorOpen,
|
|
930
|
+
"aria-controls": mobileSelectorOpen ? `${domId}-mobile-slides` : void 0,
|
|
931
|
+
disabled: slides.length === 0,
|
|
932
|
+
"data-og-mobile-slide-selector": true,
|
|
933
|
+
onClick: toggleMobileSlideSelector,
|
|
934
|
+
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",
|
|
935
|
+
children: /* @__PURE__ */ jsx("span", { children: slideCountLabel })
|
|
936
|
+
}
|
|
937
|
+
),
|
|
938
|
+
/* @__PURE__ */ jsx("span", { className: "hidden min-w-16 shrink-0 text-center text-og-xs tabular-nums text-og-fg-muted sm:inline", children: slideCountLabel }),
|
|
819
939
|
/* @__PURE__ */ jsx(
|
|
820
940
|
"button",
|
|
821
941
|
{
|
|
@@ -832,7 +952,7 @@ function PresentationEditorCore({
|
|
|
832
952
|
{
|
|
833
953
|
type: "button",
|
|
834
954
|
"aria-label": "Add slide",
|
|
835
|
-
disabled:
|
|
955
|
+
disabled: mutationsBlocked,
|
|
836
956
|
onClick: insertSlide,
|
|
837
957
|
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",
|
|
838
958
|
children: /* @__PURE__ */ jsx(FilePlus2Icon, {})
|
|
@@ -843,7 +963,7 @@ function PresentationEditorCore({
|
|
|
843
963
|
{
|
|
844
964
|
type: "button",
|
|
845
965
|
"aria-label": "Delete slide",
|
|
846
|
-
disabled:
|
|
966
|
+
disabled: mutationsBlocked || !activeSlide,
|
|
847
967
|
onClick: deleteSlide,
|
|
848
968
|
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",
|
|
849
969
|
children: /* @__PURE__ */ jsx(Trash2Icon, {})
|
|
@@ -890,7 +1010,7 @@ function PresentationEditorCore({
|
|
|
890
1010
|
{
|
|
891
1011
|
type: "button",
|
|
892
1012
|
"aria-label": "Add text box",
|
|
893
|
-
disabled:
|
|
1013
|
+
disabled: mutationsBlocked || !activeSlide,
|
|
894
1014
|
onClick: insertTextBox,
|
|
895
1015
|
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",
|
|
896
1016
|
children: /* @__PURE__ */ jsx(TypeIcon, {})
|
|
@@ -901,7 +1021,7 @@ function PresentationEditorCore({
|
|
|
901
1021
|
{
|
|
902
1022
|
type: "button",
|
|
903
1023
|
"aria-label": "Delete selected object",
|
|
904
|
-
disabled:
|
|
1024
|
+
disabled: mutationsBlocked || !selected || selected.readOnly,
|
|
905
1025
|
onClick: deleteObject,
|
|
906
1026
|
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",
|
|
907
1027
|
children: /* @__PURE__ */ jsx(Trash2Icon, {})
|
|
@@ -912,15 +1032,15 @@ function PresentationEditorCore({
|
|
|
912
1032
|
"span",
|
|
913
1033
|
{
|
|
914
1034
|
className: "hidden max-w-44 shrink-0 truncate border-l border-og-border px-2 text-og-xs text-og-fg-subtle sm:block",
|
|
915
|
-
title: commandFailure ? "Change not saved" : pendingCommands > 0 ? "Saving\u2026" :
|
|
916
|
-
children: commandFailure ? "Change not saved" : pendingCommands > 0 ? "Saving\u2026" :
|
|
1035
|
+
title: commandFailure ? "Change not saved" : authoringStatus ? authoringStatus : pendingCommands > 0 ? "Saving\u2026" : mutationsBlocked ? "View only" : selected ? `${objectLabel(selected)}${selected.readOnly ? " \xB7 View only" : ""}` : "Select an object to edit",
|
|
1036
|
+
children: commandFailure ? "Change not saved" : authoringStatus ? authoringStatus : pendingCommands > 0 ? "Saving\u2026" : mutationsBlocked ? "View only" : selected ? `${objectLabel(selected)}${selected.readOnly ? " \xB7 View only" : ""}` : "Select an object to edit"
|
|
917
1037
|
}
|
|
918
1038
|
)
|
|
919
1039
|
]
|
|
920
1040
|
}
|
|
921
1041
|
),
|
|
922
|
-
/* @__PURE__ */ jsx("div", { role: "status", "aria-live": "polite", className: "sr-only", children: commandFailure?.message ?? (pendingCommands > 0 ? "Saving presentation changes" : "") }),
|
|
923
|
-
/* @__PURE__ */ jsxs("div", { className: "flex min-h-0 min-w-0 flex-1", children: [
|
|
1042
|
+
/* @__PURE__ */ jsx("div", { role: "status", "aria-live": "polite", className: "sr-only", children: commandFailure?.message ?? authoringStatus ?? (pendingCommands > 0 ? "Saving presentation changes" : "") }),
|
|
1043
|
+
/* @__PURE__ */ jsxs("div", { className: "relative flex min-h-0 min-w-0 flex-1", children: [
|
|
924
1044
|
/* @__PURE__ */ jsx(
|
|
925
1045
|
"div",
|
|
926
1046
|
{
|
|
@@ -943,12 +1063,7 @@ function PresentationEditorCore({
|
|
|
943
1063
|
}));
|
|
944
1064
|
},
|
|
945
1065
|
onKeyDown: (event) => {
|
|
946
|
-
|
|
947
|
-
let nextIndex = null;
|
|
948
|
-
if (event.key === "ArrowDown") nextIndex = Math.min(slides.length - 1, activeIndex + 1);
|
|
949
|
-
else if (event.key === "ArrowUp") nextIndex = Math.max(0, activeIndex - 1);
|
|
950
|
-
else if (event.key === "Home") nextIndex = 0;
|
|
951
|
-
else if (event.key === "End") nextIndex = slides.length - 1;
|
|
1066
|
+
const nextIndex = nextSlideIndexFromKey(event.key, activeIndex, slides.length);
|
|
952
1067
|
if (nextIndex === null) return;
|
|
953
1068
|
event.preventDefault();
|
|
954
1069
|
const next = slides[nextIndex];
|
|
@@ -1001,6 +1116,96 @@ function PresentationEditorCore({
|
|
|
1001
1116
|
}) })
|
|
1002
1117
|
}
|
|
1003
1118
|
),
|
|
1119
|
+
mobileSelectorOpen ? /* @__PURE__ */ jsx(
|
|
1120
|
+
"div",
|
|
1121
|
+
{
|
|
1122
|
+
ref: mobileSelectorPanelRef,
|
|
1123
|
+
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",
|
|
1124
|
+
style: { width: "calc(100% - 1rem)" },
|
|
1125
|
+
children: /* @__PURE__ */ jsx(
|
|
1126
|
+
"div",
|
|
1127
|
+
{
|
|
1128
|
+
ref: mobileRailRef,
|
|
1129
|
+
id: `${domId}-mobile-slides`,
|
|
1130
|
+
role: "listbox",
|
|
1131
|
+
tabIndex: 0,
|
|
1132
|
+
"aria-label": "Slides",
|
|
1133
|
+
"aria-orientation": "vertical",
|
|
1134
|
+
"aria-activedescendant": activeSlide && activeIndex >= mobileRailStart && activeIndex < mobileRailEnd ? `${domId}-mobile-slide-${safeDomId(activeSlide.id)}` : void 0,
|
|
1135
|
+
className: "max-h-72 overflow-y-auto outline-hidden focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-og-accent",
|
|
1136
|
+
"data-og-mobile-slide-list": true,
|
|
1137
|
+
"data-og-window-start": mobileRailStart,
|
|
1138
|
+
"data-og-window-end": mobileRailEnd,
|
|
1139
|
+
onScroll: (event) => {
|
|
1140
|
+
const scrollTop = event.currentTarget.scrollTop;
|
|
1141
|
+
const height = event.currentTarget.clientHeight;
|
|
1142
|
+
setMobileRail((current) => ({
|
|
1143
|
+
scrollTop,
|
|
1144
|
+
height: height || current.height
|
|
1145
|
+
}));
|
|
1146
|
+
},
|
|
1147
|
+
onKeyDown: (event) => {
|
|
1148
|
+
if (event.key === "Escape") {
|
|
1149
|
+
event.preventDefault();
|
|
1150
|
+
setMobileSelectorOpen(false);
|
|
1151
|
+
mobileSelectorTriggerRef.current?.focus();
|
|
1152
|
+
return;
|
|
1153
|
+
}
|
|
1154
|
+
const nextIndex = nextSlideIndexFromKey(event.key, activeIndex, slides.length);
|
|
1155
|
+
if (nextIndex === null) return;
|
|
1156
|
+
event.preventDefault();
|
|
1157
|
+
const next = slides[nextIndex];
|
|
1158
|
+
if (!next) return;
|
|
1159
|
+
if (next !== activeSlide) selectSlide(next, nextIndex);
|
|
1160
|
+
const list = event.currentTarget;
|
|
1161
|
+
const top = nextIndex * MOBILE_RAIL_ITEM_HEIGHT;
|
|
1162
|
+
const bottom = top + MOBILE_RAIL_ITEM_HEIGHT;
|
|
1163
|
+
if (top < list.scrollTop) list.scrollTop = top;
|
|
1164
|
+
else if (bottom > list.scrollTop + list.clientHeight) {
|
|
1165
|
+
list.scrollTop = bottom - list.clientHeight;
|
|
1166
|
+
}
|
|
1167
|
+
},
|
|
1168
|
+
children: /* @__PURE__ */ jsx(
|
|
1169
|
+
"div",
|
|
1170
|
+
{
|
|
1171
|
+
className: "relative w-full",
|
|
1172
|
+
style: { height: slides.length * MOBILE_RAIL_ITEM_HEIGHT },
|
|
1173
|
+
children: slides.slice(mobileRailStart, mobileRailEnd).map((slide, offset) => {
|
|
1174
|
+
const index = mobileRailStart + offset;
|
|
1175
|
+
const active = slide === activeSlide;
|
|
1176
|
+
return /* @__PURE__ */ jsxs(
|
|
1177
|
+
"button",
|
|
1178
|
+
{
|
|
1179
|
+
id: `${domId}-mobile-slide-${safeDomId(slide.id)}`,
|
|
1180
|
+
type: "button",
|
|
1181
|
+
role: "option",
|
|
1182
|
+
tabIndex: -1,
|
|
1183
|
+
"aria-selected": active,
|
|
1184
|
+
"aria-label": `Slide ${index + 1}${slide.title ? `: ${slide.title}` : ""}`,
|
|
1185
|
+
onClick: () => chooseMobileSlide(slide, index),
|
|
1186
|
+
className: cn(
|
|
1187
|
+
"absolute left-0 flex min-h-11 w-full items-center gap-2 px-2 text-left",
|
|
1188
|
+
active ? "bg-og-surface-3 text-og-fg" : "text-og-fg-muted hover:bg-og-surface-3/70"
|
|
1189
|
+
),
|
|
1190
|
+
style: {
|
|
1191
|
+
top: index * MOBILE_RAIL_ITEM_HEIGHT,
|
|
1192
|
+
height: MOBILE_RAIL_ITEM_HEIGHT
|
|
1193
|
+
},
|
|
1194
|
+
"data-og-mobile-slide-index": index,
|
|
1195
|
+
children: [
|
|
1196
|
+
/* @__PURE__ */ jsx("span", { className: "w-7 shrink-0 text-right text-og-xs tabular-nums text-og-fg-subtle", children: index + 1 }),
|
|
1197
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-og-sm", children: slide.title || `Slide ${index + 1}` })
|
|
1198
|
+
]
|
|
1199
|
+
},
|
|
1200
|
+
slide.id
|
|
1201
|
+
);
|
|
1202
|
+
})
|
|
1203
|
+
}
|
|
1204
|
+
)
|
|
1205
|
+
}
|
|
1206
|
+
)
|
|
1207
|
+
}
|
|
1208
|
+
) : null,
|
|
1004
1209
|
/* @__PURE__ */ jsxs(
|
|
1005
1210
|
"div",
|
|
1006
1211
|
{
|
|
@@ -1035,7 +1240,10 @@ function PresentationEditorCore({
|
|
|
1035
1240
|
"button",
|
|
1036
1241
|
{
|
|
1037
1242
|
type: "button",
|
|
1038
|
-
|
|
1243
|
+
disabled: mutationsBlocked,
|
|
1244
|
+
onClick: () => {
|
|
1245
|
+
if (!mutationsBlocked) commandFailure.retry();
|
|
1246
|
+
},
|
|
1039
1247
|
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",
|
|
1040
1248
|
children: "Retry"
|
|
1041
1249
|
}
|
|
@@ -1050,6 +1258,7 @@ function PresentationEditorCore({
|
|
|
1050
1258
|
className: "relative mx-auto shrink-0 overflow-hidden shadow-og-lg",
|
|
1051
1259
|
style: { width: stageWidth, height: stageHeight, backgroundColor: "#fff" },
|
|
1052
1260
|
"data-og-presentation-stage": true,
|
|
1261
|
+
"data-og-theme": "light",
|
|
1053
1262
|
children: [
|
|
1054
1263
|
/* @__PURE__ */ jsx(
|
|
1055
1264
|
"canvas",
|
|
@@ -1068,7 +1277,7 @@ function PresentationEditorCore({
|
|
|
1068
1277
|
tabIndex: 0,
|
|
1069
1278
|
"aria-label": `Slide ${activeIndex + 1} editor`,
|
|
1070
1279
|
"aria-describedby": selected ? `${instructionsId} ${selectionProxyId}` : instructionsId,
|
|
1071
|
-
"aria-readonly":
|
|
1280
|
+
"aria-readonly": mutationsBlocked || selected?.readOnly || void 0,
|
|
1072
1281
|
viewBox: `0 0 ${presentation.slideSize.width} ${presentation.slideSize.height}`,
|
|
1073
1282
|
className: "absolute inset-0 size-full touch-none outline-hidden focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-og-accent",
|
|
1074
1283
|
onKeyDown: handleCanvasKeyDown,
|
|
@@ -1092,19 +1301,19 @@ function PresentationEditorCore({
|
|
|
1092
1301
|
width: effectiveSelectedPosition.width,
|
|
1093
1302
|
height: effectiveSelectedPosition.height,
|
|
1094
1303
|
fill: "transparent",
|
|
1095
|
-
stroke: "var(--og-accent
|
|
1304
|
+
stroke: "var(--og-color-accent-deep)",
|
|
1096
1305
|
strokeWidth: 2,
|
|
1097
1306
|
vectorEffect: "non-scaling-stroke",
|
|
1098
1307
|
pointerEvents: "none"
|
|
1099
1308
|
}
|
|
1100
1309
|
),
|
|
1101
|
-
!
|
|
1310
|
+
!mutationsBlocked && !selected.readOnly ? /* @__PURE__ */ jsx(
|
|
1102
1311
|
"circle",
|
|
1103
1312
|
{
|
|
1104
1313
|
cx: effectiveSelectedPosition.left + effectiveSelectedPosition.width,
|
|
1105
1314
|
cy: effectiveSelectedPosition.top + effectiveSelectedPosition.height,
|
|
1106
1315
|
r: 6 / zoom,
|
|
1107
|
-
fill: "var(--og-accent
|
|
1316
|
+
fill: "var(--og-color-accent-deep)",
|
|
1108
1317
|
stroke: "white",
|
|
1109
1318
|
strokeWidth: 1.5,
|
|
1110
1319
|
vectorEffect: "non-scaling-stroke",
|
|
@@ -1125,9 +1334,14 @@ function PresentationEditorCore({
|
|
|
1125
1334
|
ref: editorRef,
|
|
1126
1335
|
"aria-label": `Edit ${textEdit.shape.name}`,
|
|
1127
1336
|
value: textDraft,
|
|
1337
|
+
readOnly: mutationsBlocked,
|
|
1128
1338
|
maxLength: 1e6,
|
|
1129
|
-
onChange: (event) =>
|
|
1130
|
-
|
|
1339
|
+
onChange: (event) => {
|
|
1340
|
+
if (!mutationsBlocked) setTextDraft(event.currentTarget.value);
|
|
1341
|
+
},
|
|
1342
|
+
onInput: (event) => {
|
|
1343
|
+
if (!mutationsBlocked) setTextDraft(event.currentTarget.value);
|
|
1344
|
+
},
|
|
1131
1345
|
onBlur: () => finishTextEdit(),
|
|
1132
1346
|
onKeyDown: (event) => {
|
|
1133
1347
|
if (event.key === "Escape") {
|
|
@@ -1170,6 +1384,7 @@ function PresentationEditorCore({
|
|
|
1170
1384
|
function PresentationArtifactSurface({
|
|
1171
1385
|
presentation,
|
|
1172
1386
|
title = "Presentation",
|
|
1387
|
+
showHeader,
|
|
1173
1388
|
subtitle,
|
|
1174
1389
|
actions,
|
|
1175
1390
|
busy,
|
|
@@ -1182,6 +1397,7 @@ function PresentationArtifactSurface({
|
|
|
1182
1397
|
{
|
|
1183
1398
|
modality: "presentation",
|
|
1184
1399
|
title,
|
|
1400
|
+
showHeader,
|
|
1185
1401
|
subtitle: subtitle ?? `${count} slide${count === 1 ? "" : "s"}`,
|
|
1186
1402
|
actions,
|
|
1187
1403
|
busy,
|
|
@@ -1193,6 +1409,7 @@ function PresentationArtifactSurface({
|
|
|
1193
1409
|
function PresentationProjectionArtifactSurface({
|
|
1194
1410
|
projection,
|
|
1195
1411
|
title = "Presentation",
|
|
1412
|
+
showHeader,
|
|
1196
1413
|
subtitle,
|
|
1197
1414
|
actions,
|
|
1198
1415
|
busy,
|
|
@@ -1205,6 +1422,7 @@ function PresentationProjectionArtifactSurface({
|
|
|
1205
1422
|
{
|
|
1206
1423
|
modality: "presentation",
|
|
1207
1424
|
title,
|
|
1425
|
+
showHeader,
|
|
1208
1426
|
subtitle: subtitle ?? `${count} slide${count === 1 ? "" : "s"}`,
|
|
1209
1427
|
actions,
|
|
1210
1428
|
busy,
|
|
@@ -2464,6 +2682,7 @@ var DEFAULT_PRESENTATION_TEXT_STYLE = Object.freeze({
|
|
|
2464
2682
|
function EditablePresentationArtifactSurface({
|
|
2465
2683
|
session,
|
|
2466
2684
|
title = "Presentation",
|
|
2685
|
+
showHeader,
|
|
2467
2686
|
subtitle,
|
|
2468
2687
|
readOnly = false,
|
|
2469
2688
|
onCommit,
|
|
@@ -2479,30 +2698,34 @@ function EditablePresentationArtifactSurface({
|
|
|
2479
2698
|
error: null
|
|
2480
2699
|
});
|
|
2481
2700
|
const loadGeneration = useRef2(0);
|
|
2701
|
+
const scheduleLoad = useLatestTaskRunner(session);
|
|
2482
2702
|
const sceneNodes = useRef2(/* @__PURE__ */ new Map());
|
|
2483
2703
|
useEffect2(() => {
|
|
2484
2704
|
const generation = ++loadGeneration.current;
|
|
2485
2705
|
let cancelled = false;
|
|
2486
2706
|
setState((current) => ({ ...current, loading: true, error: null }));
|
|
2487
|
-
|
|
2488
|
-
(
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2707
|
+
scheduleLoad(async () => {
|
|
2708
|
+
if (cancelled || generation !== loadGeneration.current) return;
|
|
2709
|
+
await composePresentationEditorProjection(session).then(
|
|
2710
|
+
(composed) => {
|
|
2711
|
+
if (cancelled || generation !== loadGeneration.current) return;
|
|
2712
|
+
sceneNodes.current = new Map(composed.sceneNodes);
|
|
2713
|
+
setState({ composed, loading: false, error: null });
|
|
2714
|
+
},
|
|
2715
|
+
(cause) => {
|
|
2716
|
+
if (cancelled || generation !== loadGeneration.current) return;
|
|
2717
|
+
setState({
|
|
2718
|
+
composed: null,
|
|
2719
|
+
loading: false,
|
|
2720
|
+
error: asEditableArtifactError(cause, "Could not open this presentation")
|
|
2721
|
+
});
|
|
2722
|
+
}
|
|
2723
|
+
);
|
|
2724
|
+
});
|
|
2502
2725
|
return () => {
|
|
2503
2726
|
cancelled = true;
|
|
2504
2727
|
};
|
|
2505
|
-
}, [invalidator, retryEpoch, session]);
|
|
2728
|
+
}, [invalidator, retryEpoch, scheduleLoad, session]);
|
|
2506
2729
|
const refresh = useCallback2(() => setRetryEpoch((value) => value + 1), []);
|
|
2507
2730
|
const writable = !readOnly && view.writable;
|
|
2508
2731
|
const applyCommit = useCallback2(
|
|
@@ -2510,6 +2733,7 @@ function EditablePresentationArtifactSurface({
|
|
|
2510
2733
|
const composed = state.composed;
|
|
2511
2734
|
if (!composed) throw new Error("Presentation projection is not ready");
|
|
2512
2735
|
if (!writable) throw new Error("This presentation is read only");
|
|
2736
|
+
if (view.authoringBlockedReason) throw new Error("An earlier change must settle first");
|
|
2513
2737
|
if (commit.revision !== void 0 && String(commit.revision) !== String(composed.projection.revision)) {
|
|
2514
2738
|
throw new Error("The presentation changed; retry this edit on the latest version");
|
|
2515
2739
|
}
|
|
@@ -2619,7 +2843,15 @@ function EditablePresentationArtifactSurface({
|
|
|
2619
2843
|
notifyPresentationCommit(onCommit, onCommandError, commit);
|
|
2620
2844
|
refresh();
|
|
2621
2845
|
},
|
|
2622
|
-
[
|
|
2846
|
+
[
|
|
2847
|
+
onCommandError,
|
|
2848
|
+
onCommit,
|
|
2849
|
+
refresh,
|
|
2850
|
+
session,
|
|
2851
|
+
state.composed,
|
|
2852
|
+
view.authoringBlockedReason,
|
|
2853
|
+
writable
|
|
2854
|
+
]
|
|
2623
2855
|
);
|
|
2624
2856
|
const projection = state.composed?.projection ?? null;
|
|
2625
2857
|
const status = editableArtifactStatusLabel(view);
|
|
@@ -2629,10 +2861,12 @@ function EditablePresentationArtifactSurface({
|
|
|
2629
2861
|
{
|
|
2630
2862
|
...surfaceProps,
|
|
2631
2863
|
title,
|
|
2864
|
+
showHeader,
|
|
2632
2865
|
subtitle: subtitle ?? `${projection.slides.length} slide${projection.slides.length === 1 ? "" : "s"}${writable ? "" : " \xB7 Read only"}`,
|
|
2633
2866
|
projection,
|
|
2634
2867
|
commit: writable ? applyCommit : void 0,
|
|
2635
2868
|
readOnly: !writable,
|
|
2869
|
+
authoringBlockedReason: view.authoringBlockedReason,
|
|
2636
2870
|
busy: state.loading,
|
|
2637
2871
|
onCommandError
|
|
2638
2872
|
}
|
|
@@ -2641,6 +2875,7 @@ function EditablePresentationArtifactSurface({
|
|
|
2641
2875
|
{
|
|
2642
2876
|
modality: "presentation",
|
|
2643
2877
|
title,
|
|
2878
|
+
showHeader,
|
|
2644
2879
|
subtitle: subtitle ?? status,
|
|
2645
2880
|
actions: surfaceProps.actions,
|
|
2646
2881
|
busy: !accessRevoked && !state.error,
|
|
@@ -3231,4 +3466,4 @@ export {
|
|
|
3231
3466
|
PresentationProjectionArtifactSurface,
|
|
3232
3467
|
EditablePresentationArtifactSurface
|
|
3233
3468
|
};
|
|
3234
|
-
//# sourceMappingURL=chunk-
|
|
3469
|
+
//# sourceMappingURL=chunk-PNY3JKBJ.js.map
|