@opengeni/react 0.46.1 → 0.52.1
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 +158 -14
- package/dist/artifacts-document.d.ts +3 -0
- package/dist/artifacts-document.js +17 -0
- package/dist/artifacts-document.js.map +1 -0
- package/dist/artifacts-presentation.d.ts +3 -0
- package/dist/artifacts-presentation.js +17 -0
- package/dist/artifacts-presentation.js.map +1 -0
- package/dist/artifacts-spreadsheet.d.ts +3 -0
- package/dist/artifacts-spreadsheet.js +17 -0
- package/dist/artifacts-spreadsheet.js.map +1 -0
- package/dist/artifacts.d.ts +2 -0
- package/dist/artifacts.js +170 -0
- package/dist/artifacts.js.map +1 -0
- package/dist/chunk-6BBWWOOU.js +82 -0
- package/dist/chunk-6BBWWOOU.js.map +1 -0
- package/dist/{chunk-HFO4ERGQ.js → chunk-724BW4TW.js} +586 -35
- package/dist/chunk-724BW4TW.js.map +1 -0
- package/dist/chunk-7I2KB3OK.js +3895 -0
- package/dist/chunk-7I2KB3OK.js.map +1 -0
- package/dist/chunk-7WCLAEFV.js +2828 -0
- package/dist/chunk-7WCLAEFV.js.map +1 -0
- package/dist/{chunk-U3CSCMWA.js → chunk-FK6VG4LL.js} +9 -13
- package/dist/chunk-FK6VG4LL.js.map +1 -0
- package/dist/{chunk-SRFUT2ZU.js → chunk-FWS3KC3Z.js} +120 -64
- package/dist/chunk-FWS3KC3Z.js.map +1 -0
- package/dist/{chunk-EKZH6IDG.js → chunk-HDBG7XGO.js} +62 -1
- package/dist/chunk-HDBG7XGO.js.map +1 -0
- package/dist/chunk-HUIKIDM5.js +2148 -0
- package/dist/chunk-HUIKIDM5.js.map +1 -0
- package/dist/{chunk-LGVMUIRV.js → chunk-JAGDUCZQ.js} +1053 -390
- package/dist/chunk-JAGDUCZQ.js.map +1 -0
- package/dist/{chunk-LWR4MXSS.js → chunk-JR3QFY6B.js} +420 -35
- package/dist/chunk-JR3QFY6B.js.map +1 -0
- package/dist/chunk-JVYQRRC4.js +53 -0
- package/dist/chunk-JVYQRRC4.js.map +1 -0
- package/dist/chunk-KCGXPP5V.js +157 -0
- package/dist/chunk-KCGXPP5V.js.map +1 -0
- package/dist/{chunk-EB67J347.js → chunk-KZ73RL76.js} +111 -31
- package/dist/chunk-KZ73RL76.js.map +1 -0
- package/dist/chunk-PEI6RANI.js +3234 -0
- package/dist/chunk-PEI6RANI.js.map +1 -0
- package/dist/{chunk-3PB7MIT6.js → chunk-ROIRTM37.js} +220 -72
- package/dist/chunk-ROIRTM37.js.map +1 -0
- package/dist/chunk-VZTQ73XT.js +86 -0
- package/dist/chunk-VZTQ73XT.js.map +1 -0
- package/dist/{chunk-VCBFUSUZ.js → chunk-WSK7G5LE.js} +72 -4
- package/dist/chunk-WSK7G5LE.js.map +1 -0
- package/dist/{chunk-FGZUCXZF.js → chunk-WYA65Y3F.js} +16 -16
- package/dist/chunk-WYA65Y3F.js.map +1 -0
- package/dist/{chunk-6EDV6YFE.js → chunk-X4S56Y2H.js} +147 -35
- package/dist/chunk-X4S56Y2H.js.map +1 -0
- package/dist/client.d.ts +7 -1
- package/dist/clipboard.d.ts +1 -0
- package/dist/clipboard.js +7 -0
- package/dist/clipboard.js.map +1 -0
- package/dist/commands/index.d.ts +3 -3
- package/dist/commands/registry.d.ts +1 -1
- package/dist/commands/types.d.ts +1 -1
- package/dist/components/approval-surface.d.ts +2 -2
- package/dist/components/artifacts/artifact-surface.d.ts +18 -0
- package/dist/components/artifacts/document-editor.d.ts +172 -0
- package/dist/components/artifacts/editable-artifact-ui.d.ts +13 -0
- package/dist/components/artifacts/editable-artifact-workbench.d.ts +49 -0
- package/dist/components/artifacts/editable-document.d.ts +24 -0
- package/dist/components/artifacts/editable-presentation.d.ts +24 -0
- package/dist/components/artifacts/editable-spreadsheet.d.ts +32 -0
- package/dist/components/artifacts/index.d.ts +8 -0
- package/dist/components/artifacts/presentation-editor.d.ts +297 -0
- package/dist/components/artifacts/spreadsheet-canvas.d.ts +120 -0
- package/dist/components/artifacts/spreadsheet-grid.d.ts +113 -0
- package/dist/components/browser-viewer.d.ts +29 -0
- package/dist/components/chat-composer.d.ts +13 -8
- package/dist/components/code-editor.d.ts +25 -3
- package/dist/components/command-palette.d.ts +2 -2
- package/dist/components/composer-transcription-control.d.ts +4 -2
- package/dist/components/composer.d.ts +29 -15
- package/dist/components/computer-viewer.d.ts +23 -0
- package/dist/components/copy-button.d.ts +2 -2
- package/dist/components/desktop-viewer.d.ts +25 -21
- package/dist/components/diff-view.d.ts +1 -1
- package/dist/components/enrollment-consent.d.ts +1 -1
- package/dist/components/enrollment-device-flow.d.ts +1 -1
- package/dist/components/file-browser.d.ts +2 -2
- package/dist/components/fleet-tile.d.ts +1 -1
- package/dist/components/generated-video-player.d.ts +10 -0
- package/dist/components/human-input-form.d.ts +1 -1
- package/dist/components/human-input-surface.d.ts +2 -2
- package/dist/components/interactive-workbench-viewers.d.ts +2 -0
- package/dist/components/machine-card.d.ts +2 -2
- package/dist/components/machine-dock-bar.d.ts +3 -3
- package/dist/components/machine-health-pill.d.ts +2 -2
- package/dist/components/machine-input-display.d.ts +1 -1
- package/dist/components/machine-metrics.d.ts +2 -2
- package/dist/components/machine-status-pill.d.ts +4 -4
- package/dist/components/machines/health.d.ts +1 -1
- package/dist/components/machines/machine-detail.d.ts +5 -3
- package/dist/components/machines/metric-history-chart.d.ts +1 -1
- package/dist/components/machines/metric-sparkline.d.ts +2 -2
- package/dist/components/machines/series.d.ts +2 -2
- package/dist/components/machines-dashboard.d.ts +5 -5
- package/dist/components/markdown.d.ts +1 -1
- package/dist/components/message-timeline.d.ts +22 -5
- package/dist/components/model-picker.d.ts +2 -2
- package/dist/components/model-policy-picker.d.ts +7 -7
- package/dist/components/pierre-diff.d.ts +1 -1
- package/dist/components/pierre-file.d.ts +1 -1
- package/dist/components/queue-draft-policy.d.ts +1 -1
- package/dist/components/queue-surface-implementation.d.ts +3 -3
- package/dist/components/queue-surface-state.d.ts +4 -4
- package/dist/components/queue-surface.d.ts +5 -5
- package/dist/components/sandbox-files.d.ts +5 -5
- package/dist/components/sandbox-terminal.d.ts +50 -4
- package/dist/components/sandbox-workspace.d.ts +30 -10
- package/dist/components/session-chrome.d.ts +4 -4
- package/dist/components/session-status.d.ts +2 -2
- package/dist/components/timeline-annotation-selection.d.ts +9 -0
- package/dist/components/timeline-annotations-dialog.d.ts +16 -0
- package/dist/components/timeline-annotations.d.ts +13 -0
- package/dist/components/tooltip.d.ts +4 -4
- package/dist/components/user-message-body.d.ts +2 -2
- package/dist/components/workbench-changes.d.ts +2 -2
- package/dist/components/workspace-dock.d.ts +3 -1
- package/dist/composer.d.ts +11 -11
- package/dist/composer.js +7 -7
- package/dist/hooks/internal.d.ts +7 -1
- package/dist/hooks/use-attached-browsers.d.ts +21 -0
- package/dist/hooks/use-available-models.d.ts +2 -2
- package/dist/hooks/use-billing-usage.d.ts +1 -1
- package/dist/hooks/use-browser-frame-stream.d.ts +28 -0
- package/dist/hooks/use-browser-identities.d.ts +26 -0
- package/dist/hooks/use-browser-session.d.ts +28 -0
- package/dist/hooks/use-browser-sessions.d.ts +32 -0
- package/dist/hooks/use-codex-accounts.d.ts +3 -3
- package/dist/hooks/use-composer.d.ts +36 -9
- package/dist/hooks/use-computer-frame-stream.d.ts +24 -0
- package/dist/hooks/use-computer-session.d.ts +28 -0
- package/dist/hooks/use-computer-sessions.d.ts +28 -0
- package/dist/hooks/use-desktop-stream.d.ts +1 -1
- package/dist/hooks/use-environments.d.ts +11 -5
- package/dist/hooks/use-file-attachments.d.ts +1 -1
- package/dist/hooks/use-goal.d.ts +2 -2
- package/dist/hooks/use-human-input.d.ts +2 -2
- package/dist/hooks/use-last-started-turn-policy.d.ts +2 -2
- package/dist/hooks/use-machine-chip.d.ts +2 -2
- package/dist/hooks/use-machines.d.ts +10 -3
- package/dist/hooks/use-packs.d.ts +7 -2
- package/dist/hooks/use-rigs.d.ts +1 -1
- package/dist/hooks/use-sandbox-files.d.ts +25 -4
- package/dist/hooks/use-sandbox-git.d.ts +13 -5
- package/dist/hooks/use-sandbox-terminal.d.ts +1 -1
- package/dist/hooks/use-scheduled-tasks.d.ts +1 -1
- package/dist/hooks/use-session-capabilities.d.ts +5 -4
- package/dist/hooks/use-session-control.d.ts +1 -1
- package/dist/hooks/use-session-events.d.ts +2 -2
- package/dist/hooks/use-session-lineage.d.ts +1 -1
- package/dist/hooks/use-session-mcp-approval-policy.d.ts +2 -2
- package/dist/hooks/use-session.d.ts +2 -2
- package/dist/hooks/use-slash-commands.d.ts +1 -1
- package/dist/hooks/use-terminal-stream.d.ts +8 -2
- package/dist/hooks/use-transcription.d.ts +2 -2
- package/dist/hooks/use-turn-queue.d.ts +2 -2
- package/dist/hooks/use-video-artifact-playback.d.ts +9 -0
- package/dist/hooks/use-voice-input.d.ts +6 -4
- package/dist/hooks/use-workspace-capture.d.ts +1 -1
- package/dist/hooks/use-workspace-edit.d.ts +1 -1
- package/dist/hooks/use-workspace-sessions.d.ts +1 -1
- package/dist/hooks/use-workspaces.d.ts +1 -1
- package/dist/index.d.ts +158 -154
- package/dist/index.js +1718 -908
- package/dist/index.js.map +1 -1
- package/dist/interaction.d.ts +23 -0
- package/dist/interaction.js +36 -0
- package/dist/interaction.js.map +1 -0
- package/dist/interactive-workbench-viewers-KHNOHWQE.js +13 -0
- package/dist/interactive-workbench-viewers-KHNOHWQE.js.map +1 -0
- package/dist/lib/composer-responsive-context.d.ts +9 -0
- package/dist/lib/relay-wire.d.ts +4 -0
- package/dist/lib/sandbox-liveness.d.ts +9 -0
- package/dist/lib/terminal-capability.d.ts +5 -0
- package/dist/lib/use-portal-token-style.d.ts +14 -3
- package/dist/lib/xterm-theme.d.ts +1 -1
- package/dist/machines.d.ts +30 -30
- package/dist/machines.js +3 -3
- package/dist/provider.d.ts +4 -4
- package/dist/{queue-surface-implementation-J4XJFKRW.js → queue-surface-implementation-2KVJTYXH.js} +117 -64
- package/dist/queue-surface-implementation-2KVJTYXH.js.map +1 -0
- package/dist/realtime/dropdown-menu.d.ts +8 -8
- package/dist/realtime/realtime-control.d.ts +15 -6
- package/dist/realtime.d.ts +4 -4
- package/dist/realtime.js +30 -33
- package/dist/realtime.js.map +1 -1
- package/dist/session-context.d.ts +19 -1
- package/dist/session-ui.d.ts +14 -14
- package/dist/session-ui.js +6 -5
- package/dist/session.d.ts +28 -28
- package/dist/session.js +5 -5
- package/dist/timeline/activity-rail.d.ts +6 -3
- package/dist/timeline/disclosure-context.d.ts +1 -1
- package/dist/timeline/fleet-decision-projection.d.ts +1 -1
- package/dist/timeline/fleet-decision-row.d.ts +3 -3
- package/dist/timeline/index.d.ts +19 -19
- package/dist/timeline/parsers.d.ts +6 -3
- package/dist/timeline/projection.d.ts +3 -3
- package/dist/timeline/registry.d.ts +10 -1
- package/dist/timeline/screenshot-lightbox.d.ts +2 -2
- package/dist/timeline/shared.d.ts +21 -10
- package/dist/timeline/tool-diff.d.ts +2 -2
- package/dist/timeline/tool-renderers.d.ts +1 -1
- package/dist/timeline/turn-summary.d.ts +3 -3
- package/dist/timeline/types.d.ts +42 -2
- package/dist/timeline-annotation-selection-3L7LHGG2.js +187 -0
- package/dist/timeline-annotation-selection-3L7LHGG2.js.map +1 -0
- package/dist/timeline-annotations-dialog-U7EVLR75.js +196 -0
- package/dist/timeline-annotations-dialog-U7EVLR75.js.map +1 -0
- package/dist/voice-recording-store.d.ts +8 -2
- package/package.json +52 -7
- package/src/artifacts-document.ts +31 -0
- package/src/artifacts-presentation.ts +36 -0
- package/src/artifacts-spreadsheet.ts +21 -0
- package/src/artifacts.ts +86 -0
- package/src/client.ts +90 -1
- package/src/clipboard.ts +2 -0
- package/src/components/artifacts/artifact-surface.tsx +93 -0
- package/src/components/artifacts/document-editor.tsx +2255 -0
- package/src/components/artifacts/editable-artifact-ui.tsx +89 -0
- package/src/components/artifacts/editable-artifact-workbench.tsx +203 -0
- package/src/components/artifacts/editable-document.tsx +657 -0
- package/src/components/artifacts/editable-presentation.tsx +1020 -0
- package/src/components/artifacts/editable-spreadsheet.tsx +733 -0
- package/src/components/artifacts/index.ts +99 -0
- package/src/components/artifacts/presentation-editor.tsx +3148 -0
- package/src/components/artifacts/spreadsheet-canvas.ts +799 -0
- package/src/components/artifacts/spreadsheet-grid.tsx +2129 -0
- package/src/components/browser-viewer.tsx +1592 -0
- package/src/components/chat-composer.tsx +25 -2
- package/src/components/code-editor.tsx +90 -31
- package/src/components/command-palette.tsx +1 -1
- package/src/components/composer-transcription-control.tsx +51 -22
- package/src/components/composer.tsx +49 -23
- package/src/components/computer-viewer.tsx +1139 -0
- package/src/components/copy-button.tsx +1 -1
- package/src/components/desktop-viewer.tsx +103 -75
- package/src/components/file-browser.tsx +39 -17
- package/src/components/generated-video-player.tsx +89 -0
- package/src/components/human-input-form.tsx +2 -2
- package/src/components/interactive-workbench-viewers.ts +2 -0
- package/src/components/machine-card.tsx +1 -1
- package/src/components/machine-input-display.ts +3 -0
- package/src/components/machines/machine-detail.tsx +39 -15
- package/src/components/machines-dashboard.tsx +7 -6
- package/src/components/message-timeline.tsx +327 -37
- package/src/components/model-picker.tsx +2 -2
- package/src/components/model-policy-picker.tsx +16 -15
- package/src/components/queue-surface-implementation.tsx +135 -75
- package/src/components/queue-surface-state.tsx +2 -2
- package/src/components/sandbox-files.tsx +142 -62
- package/src/components/sandbox-terminal.tsx +119 -35
- package/src/components/sandbox-workspace.tsx +394 -228
- package/src/components/session-chrome.tsx +67 -27
- package/src/components/timeline-annotation-selection.tsx +221 -0
- package/src/components/timeline-annotations-dialog.tsx +213 -0
- package/src/components/timeline-annotations.tsx +84 -0
- package/src/components/tooltip.tsx +13 -16
- package/src/components/user-message-body.tsx +1 -1
- package/src/components/workbench-changes.tsx +192 -35
- package/src/components/workspace-dock.tsx +13 -5
- package/src/composer.ts +3 -0
- package/src/hooks/internal.ts +132 -38
- package/src/hooks/use-attached-browsers.ts +152 -0
- package/src/hooks/use-browser-frame-stream.ts +316 -0
- package/src/hooks/use-browser-identities.ts +225 -0
- package/src/hooks/use-browser-session.ts +476 -0
- package/src/hooks/use-browser-sessions.ts +281 -0
- package/src/hooks/use-codex-accounts.ts +4 -4
- package/src/hooks/use-composer.ts +769 -24
- package/src/hooks/use-computer-frame-stream.ts +311 -0
- package/src/hooks/use-computer-session.ts +442 -0
- package/src/hooks/use-computer-sessions.ts +245 -0
- package/src/hooks/use-environments.ts +24 -5
- package/src/hooks/use-file-attachments.ts +70 -32
- package/src/hooks/use-goal.ts +17 -5
- package/src/hooks/use-machine-chip.ts +5 -3
- package/src/hooks/use-machines.ts +79 -3
- package/src/hooks/use-packs.ts +51 -0
- package/src/hooks/use-sandbox-files.ts +382 -88
- package/src/hooks/use-sandbox-git.ts +208 -46
- package/src/hooks/use-sandbox-terminal.ts +3 -2
- package/src/hooks/use-session-capabilities.ts +94 -70
- package/src/hooks/use-session-events.ts +18 -4
- package/src/hooks/use-terminal-stream.ts +102 -23
- package/src/hooks/use-transcription.ts +4 -14
- package/src/hooks/use-turn-queue.ts +17 -5
- package/src/hooks/use-video-artifact-playback.ts +28 -0
- package/src/hooks/use-voice-input.ts +163 -19
- package/src/hooks/use-windowed-sections.ts +9 -7
- package/src/hooks/use-workspace-edit.ts +2 -1
- package/src/index.ts +21 -6
- package/src/interaction.ts +71 -0
- package/src/lib/composer-responsive-context.ts +15 -0
- package/src/lib/relay-wire.ts +4 -0
- package/src/lib/sandbox-liveness.ts +11 -0
- package/src/lib/terminal-capability.ts +10 -0
- package/src/lib/use-portal-token-style.ts +60 -15
- package/src/provider.tsx +52 -7
- package/src/realtime/dropdown-menu.tsx +15 -19
- package/src/realtime/realtime-control.tsx +16 -5
- package/src/session-context.ts +90 -0
- package/src/timeline/activity-rail.tsx +31 -6
- package/src/timeline/index.ts +4 -1
- package/src/timeline/parsers.ts +46 -20
- package/src/timeline/projection.ts +233 -13
- package/src/timeline/registry.ts +19 -0
- package/src/timeline/screenshot-lightbox.tsx +30 -9
- package/src/timeline/shared.tsx +59 -11
- package/src/timeline/tool-renderers.tsx +421 -24
- package/src/timeline/turn-summary.tsx +2 -2
- package/src/timeline/types.ts +58 -2
- package/src/voice-recording-store.ts +15 -0
- package/styles/compiled.css +5298 -0
- package/styles/compiled.d.ts +2 -0
- package/styles/effective-tokens.css +27 -0
- package/styles/index.css +18 -0
- package/styles/responsive.css +208 -0
- package/styles/responsive.d.ts +2 -0
- package/styles/tokens.css +50 -17
- package/dist/chunk-3PB7MIT6.js.map +0 -1
- package/dist/chunk-6EDV6YFE.js.map +0 -1
- package/dist/chunk-EB67J347.js.map +0 -1
- package/dist/chunk-EKZH6IDG.js.map +0 -1
- package/dist/chunk-FGZUCXZF.js.map +0 -1
- package/dist/chunk-HFO4ERGQ.js.map +0 -1
- package/dist/chunk-JB5725BI.js +0 -48
- package/dist/chunk-JB5725BI.js.map +0 -1
- package/dist/chunk-LGVMUIRV.js.map +0 -1
- package/dist/chunk-LWR4MXSS.js.map +0 -1
- package/dist/chunk-SRFUT2ZU.js.map +0 -1
- package/dist/chunk-U3CSCMWA.js.map +0 -1
- package/dist/chunk-VCBFUSUZ.js.map +0 -1
- package/dist/fleet-decision-projection-SLNZMS42.js +0 -241
- package/dist/fleet-decision-projection-SLNZMS42.js.map +0 -1
- package/dist/queue-surface-implementation-J4XJFKRW.js.map +0 -1
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import type { Document as ReferenceDocument, DocumentTextStyle as ReferenceDocumentTextStyle } from "@opengeni/artifact-tool/reference";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
export type DocumentLayoutMode = "paginated" | "continuous";
|
|
4
|
+
export type DocumentSelection = {
|
|
5
|
+
blockId: string;
|
|
6
|
+
start: number;
|
|
7
|
+
end: number;
|
|
8
|
+
};
|
|
9
|
+
export type DocumentCommit = {
|
|
10
|
+
kind: "text";
|
|
11
|
+
blockId: string;
|
|
12
|
+
text: string;
|
|
13
|
+
revision: string | number;
|
|
14
|
+
} | {
|
|
15
|
+
kind: "format";
|
|
16
|
+
blockId: string;
|
|
17
|
+
range: {
|
|
18
|
+
start: number;
|
|
19
|
+
end: number;
|
|
20
|
+
};
|
|
21
|
+
style: Partial<ReferenceDocumentTextStyle>;
|
|
22
|
+
revision: string | number;
|
|
23
|
+
} | {
|
|
24
|
+
kind: "insert-paragraph";
|
|
25
|
+
blockId: string;
|
|
26
|
+
revision: string | number;
|
|
27
|
+
};
|
|
28
|
+
export type DocumentCommitHandler = ((commit: DocumentCommit) => void) | ((commit: DocumentCommit) => Promise<void>);
|
|
29
|
+
export type DocumentProjectionPageGeometry = Readonly<{
|
|
30
|
+
widthPt: number;
|
|
31
|
+
heightPt: number;
|
|
32
|
+
marginTopPt: number;
|
|
33
|
+
marginRightPt: number;
|
|
34
|
+
marginBottomPt: number;
|
|
35
|
+
marginLeftPt: number;
|
|
36
|
+
headerPt?: number;
|
|
37
|
+
footerPt?: number;
|
|
38
|
+
gutterPt?: number;
|
|
39
|
+
}>;
|
|
40
|
+
export type DocumentProjectionTextStyle = Readonly<{
|
|
41
|
+
fontFamily?: string;
|
|
42
|
+
fontSizePt?: number;
|
|
43
|
+
color?: string;
|
|
44
|
+
bold?: boolean;
|
|
45
|
+
italic?: boolean;
|
|
46
|
+
underline?: boolean;
|
|
47
|
+
strike?: boolean;
|
|
48
|
+
}>;
|
|
49
|
+
export type DocumentProjectionParagraphStyle = Readonly<{
|
|
50
|
+
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
51
|
+
alignment?: "left" | "center" | "right" | "justify";
|
|
52
|
+
spaceBeforePt?: number;
|
|
53
|
+
spaceAfterPt?: number;
|
|
54
|
+
lineHeight?: number;
|
|
55
|
+
keepNext?: boolean;
|
|
56
|
+
pageBreakBefore?: boolean;
|
|
57
|
+
list?: Readonly<{
|
|
58
|
+
kind: "bullet" | "number";
|
|
59
|
+
level?: number;
|
|
60
|
+
instanceId?: string;
|
|
61
|
+
}>;
|
|
62
|
+
}>;
|
|
63
|
+
export type DocumentProjectionTextRun = Readonly<{
|
|
64
|
+
text: string;
|
|
65
|
+
style?: DocumentProjectionTextStyle;
|
|
66
|
+
}>;
|
|
67
|
+
export type DocumentProjectionParagraph = Readonly<{
|
|
68
|
+
kind: "paragraph";
|
|
69
|
+
id: string;
|
|
70
|
+
runs: readonly DocumentProjectionTextRun[];
|
|
71
|
+
style?: DocumentProjectionParagraphStyle;
|
|
72
|
+
}>;
|
|
73
|
+
export type DocumentProjectionTable = Readonly<{
|
|
74
|
+
kind: "table";
|
|
75
|
+
id: string;
|
|
76
|
+
rows: readonly (readonly (readonly DocumentProjectionTextRun[])[])[];
|
|
77
|
+
style?: Readonly<{
|
|
78
|
+
widthPt?: number;
|
|
79
|
+
columnWidthsPt?: readonly number[];
|
|
80
|
+
headerRows?: number;
|
|
81
|
+
cellPaddingPt?: number;
|
|
82
|
+
borderColor?: string;
|
|
83
|
+
headerFill?: string;
|
|
84
|
+
allowRowSplit?: boolean;
|
|
85
|
+
}>;
|
|
86
|
+
}>;
|
|
87
|
+
export type DocumentProjectionPageBreak = Readonly<{
|
|
88
|
+
kind: "pageBreak";
|
|
89
|
+
id: string;
|
|
90
|
+
}>;
|
|
91
|
+
export type DocumentProjectionBlock = DocumentProjectionParagraph | DocumentProjectionTable | DocumentProjectionPageBreak;
|
|
92
|
+
export type DocumentProjectionSection = Readonly<{
|
|
93
|
+
id: string;
|
|
94
|
+
startBlockIndex: number;
|
|
95
|
+
page: DocumentProjectionPageGeometry;
|
|
96
|
+
titlePage?: boolean;
|
|
97
|
+
headerBlockCounts?: readonly [number, number, number];
|
|
98
|
+
footerBlockCounts?: readonly [number, number, number];
|
|
99
|
+
}>;
|
|
100
|
+
export type DocumentProjectionComment = Readonly<{
|
|
101
|
+
id: string;
|
|
102
|
+
blockId: string;
|
|
103
|
+
start: number;
|
|
104
|
+
end: number;
|
|
105
|
+
resolved: boolean;
|
|
106
|
+
replies: readonly Readonly<{
|
|
107
|
+
author: string;
|
|
108
|
+
text: string;
|
|
109
|
+
createdAt: string;
|
|
110
|
+
}>[];
|
|
111
|
+
}>;
|
|
112
|
+
export type DocumentProjectionChange = Readonly<{
|
|
113
|
+
id: string;
|
|
114
|
+
blockId: string;
|
|
115
|
+
kind: "insert" | "delete";
|
|
116
|
+
start: number;
|
|
117
|
+
end: number;
|
|
118
|
+
author: string;
|
|
119
|
+
createdAt: string;
|
|
120
|
+
}>;
|
|
121
|
+
/** Immutable render/edit projection; canonical document state stays with the host. */
|
|
122
|
+
export type DocumentEditorProjection = Readonly<{
|
|
123
|
+
revision: string | number;
|
|
124
|
+
page: DocumentProjectionPageGeometry;
|
|
125
|
+
blocks: readonly DocumentProjectionBlock[];
|
|
126
|
+
sections?: readonly DocumentProjectionSection[];
|
|
127
|
+
comments?: readonly DocumentProjectionComment[];
|
|
128
|
+
changes?: readonly DocumentProjectionChange[];
|
|
129
|
+
}>;
|
|
130
|
+
export type DocumentEditorProps = {
|
|
131
|
+
document: ReferenceDocument;
|
|
132
|
+
/** Controlled projection mode. Omit to let the editor own the toggle. */
|
|
133
|
+
layout?: DocumentLayoutMode | undefined;
|
|
134
|
+
defaultLayout?: DocumentLayoutMode | undefined;
|
|
135
|
+
onLayoutChange?: ((layout: DocumentLayoutMode) => void) | undefined;
|
|
136
|
+
onSelectionChange?: ((selection: DocumentSelection) => void) | undefined;
|
|
137
|
+
onCommit?: DocumentCommitHandler | undefined;
|
|
138
|
+
onCommandError?: ((error: Error) => void) | undefined;
|
|
139
|
+
readOnly?: boolean | undefined;
|
|
140
|
+
ariaLabel?: string | undefined;
|
|
141
|
+
viewportHeight?: number | undefined;
|
|
142
|
+
overscanPages?: number | undefined;
|
|
143
|
+
className?: string | undefined;
|
|
144
|
+
};
|
|
145
|
+
export type DocumentProjectionEditorProps = Omit<DocumentEditorProps, "document" | "onSelectionChange" | "onCommit"> & {
|
|
146
|
+
projection: DocumentEditorProjection;
|
|
147
|
+
commit?: DocumentCommitHandler | undefined;
|
|
148
|
+
onCommandError?: ((error: Error) => void) | undefined;
|
|
149
|
+
onSelectionChange?: ((selection: DocumentSelection) => void) | undefined;
|
|
150
|
+
};
|
|
151
|
+
export type DocumentProjectionArtifactSurfaceProps = Omit<DocumentProjectionEditorProps, "ariaLabel" | "className"> & {
|
|
152
|
+
title: string;
|
|
153
|
+
subtitle?: ReactNode | undefined;
|
|
154
|
+
busy?: boolean | undefined;
|
|
155
|
+
className?: string | undefined;
|
|
156
|
+
editorClassName?: string | undefined;
|
|
157
|
+
};
|
|
158
|
+
export type DocumentArtifactSurfaceProps = Omit<DocumentEditorProps, "ariaLabel" | "className"> & {
|
|
159
|
+
title: string;
|
|
160
|
+
subtitle?: ReactNode | undefined;
|
|
161
|
+
busy?: boolean | undefined;
|
|
162
|
+
className?: string | undefined;
|
|
163
|
+
editorClassName?: string | undefined;
|
|
164
|
+
};
|
|
165
|
+
/** Compatibility adapter for the public authoring model. */
|
|
166
|
+
export declare function DocumentEditor(props: DocumentEditorProps): import("react").JSX.Element;
|
|
167
|
+
/** Projection-first document editor with one async command boundary. */
|
|
168
|
+
export declare function DocumentProjectionEditor({ projection, commit, onCommandError, onSelectionChange, readOnly, ...props }: DocumentProjectionEditorProps): import("react").JSX.Element;
|
|
169
|
+
/** Artifact chrome plus the reusable document editor. */
|
|
170
|
+
export declare function DocumentArtifactSurface({ document, title, subtitle, busy, className, editorClassName, ...editorProps }: DocumentArtifactSurfaceProps): import("react").JSX.Element;
|
|
171
|
+
/** Artifact chrome over the projection-first document editor. */
|
|
172
|
+
export declare function DocumentProjectionArtifactSurface({ projection, title, subtitle, busy, className, editorClassName, ...editorProps }: DocumentProjectionArtifactSurfaceProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { EditableArtifactSession, EditableArtifactSyncView } from "@opengeni/sdk/editable-artifacts";
|
|
2
|
+
export declare function useEditableArtifactView(session: EditableArtifactSession): EditableArtifactSyncView;
|
|
3
|
+
/** Changes whenever the Worker-resident speculative projection may have changed. */
|
|
4
|
+
export declare function editableArtifactProjectionKey(view: EditableArtifactSyncView): string;
|
|
5
|
+
export declare function editableArtifactStatusLabel(view: EditableArtifactSyncView): string;
|
|
6
|
+
/** Revoked read authority must hide any projection retained before invalidation. */
|
|
7
|
+
export declare function editableArtifactAccessRevoked(view: EditableArtifactSyncView): boolean;
|
|
8
|
+
export declare function EditableArtifactMessage({ title, detail, retry, }: {
|
|
9
|
+
title: string;
|
|
10
|
+
detail: string;
|
|
11
|
+
retry?: (() => void) | undefined;
|
|
12
|
+
}): import("react").JSX.Element;
|
|
13
|
+
export declare function asEditableArtifactError(cause: unknown, fallback: string): Error;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type CreateBrowserEditableArtifactSessionOptions, type EditableArtifactBrowserRuntime, type EditableArtifactSession } from "@opengeni/sdk/editable-artifacts";
|
|
2
|
+
import { type EditableDocumentArtifactSurfaceProps } from "./editable-document.js";
|
|
3
|
+
import { type EditablePresentationArtifactSurfaceProps } from "./editable-presentation.js";
|
|
4
|
+
import { type EditableSpreadsheetArtifactSurfaceProps } from "./editable-spreadsheet.js";
|
|
5
|
+
export type EditableArtifactWorkbenchProps = Readonly<{
|
|
6
|
+
session: EditableArtifactSession;
|
|
7
|
+
document?: Omit<EditableDocumentArtifactSurfaceProps, "session">;
|
|
8
|
+
spreadsheet?: Omit<EditableSpreadsheetArtifactSurfaceProps, "session">;
|
|
9
|
+
presentation?: Omit<EditablePresentationArtifactSurfaceProps, "session">;
|
|
10
|
+
}>;
|
|
11
|
+
export type EditableArtifactWorkbenchHostProps = Omit<EditableArtifactWorkbenchProps, "session"> & Readonly<{
|
|
12
|
+
/**
|
|
13
|
+
* Complete identity of the browser session authority. Change this when the
|
|
14
|
+
* artifact, deployment, principal, or authorization epoch changes.
|
|
15
|
+
*/
|
|
16
|
+
sessionKey: string;
|
|
17
|
+
/** Called for the active keyed lifecycle and again only after replacement or retry. */
|
|
18
|
+
createSession: () => EditableArtifactSession;
|
|
19
|
+
}>;
|
|
20
|
+
type DefaultBrowserArtifactTransport = Omit<NonNullable<CreateBrowserEditableArtifactSessionOptions["transport"]>, "apiKey" | "fetch" | "headers" | "webSocketFactory"> & Readonly<{
|
|
21
|
+
/** Static deployment auth headers; rotate authorizationEpoch when they change. */
|
|
22
|
+
headers?: Readonly<Record<string, string>>;
|
|
23
|
+
}>;
|
|
24
|
+
export type BrowserEditableArtifactWorkbenchOptions = Omit<CreateBrowserEditableArtifactSessionOptions, "runtime" | "storage" | "transport"> & Readonly<{
|
|
25
|
+
/** Default module Worker only; custom Worker hosts use EditableArtifactWorkbenchHost. */
|
|
26
|
+
runtime: Omit<EditableArtifactBrowserRuntime, "workerFactory">;
|
|
27
|
+
/** Default fetch/WebSocket only; static deployment auth headers are supported. */
|
|
28
|
+
transport?: DefaultBrowserArtifactTransport;
|
|
29
|
+
}>;
|
|
30
|
+
export type BrowserEditableArtifactWorkbenchProps = Omit<EditableArtifactWorkbenchProps, "session"> & Readonly<{
|
|
31
|
+
options: BrowserEditableArtifactWorkbenchOptions;
|
|
32
|
+
}>;
|
|
33
|
+
/**
|
|
34
|
+
* One modality-neutral SDK workbench. Embedding hosts keep one route/component;
|
|
35
|
+
* each artifact still renders through its complete first-party editor surface.
|
|
36
|
+
*/
|
|
37
|
+
export declare function EditableArtifactWorkbench({ session, document, spreadsheet, presentation, }: EditableArtifactWorkbenchProps): import("react").JSX.Element;
|
|
38
|
+
/**
|
|
39
|
+
* Route/embed composition that owns exactly one SDK session. The host supplies
|
|
40
|
+
* the authenticated SDK factory; React guarantees replacement and teardown.
|
|
41
|
+
*/
|
|
42
|
+
export declare function EditableArtifactWorkbenchHost({ sessionKey, createSession, document, spreadsheet, presentation, }: EditableArtifactWorkbenchHostProps): import("react").JSX.Element;
|
|
43
|
+
/**
|
|
44
|
+
* Complete default-browser composition for embedders: verified WASM Worker,
|
|
45
|
+
* durable IndexedDB state, authenticated live sync, teardown, and the matching
|
|
46
|
+
* first-party editor. Advanced/custom transports compose the lower-level host.
|
|
47
|
+
*/
|
|
48
|
+
export declare function BrowserEditableArtifactWorkbench({ options, document, spreadsheet, presentation, }: BrowserEditableArtifactWorkbenchProps): import("react").JSX.Element;
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type EditableArtifactSession } from "@opengeni/sdk/editable-artifacts";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
import { type DocumentCommitHandler, type DocumentEditorProjection, type DocumentProjectionArtifactSurfaceProps } from "./document-editor.js";
|
|
4
|
+
export type EditableDocumentArtifactSurfaceProps = Omit<DocumentProjectionArtifactSurfaceProps, "projection" | "commit" | "readOnly" | "busy" | "subtitle"> & {
|
|
5
|
+
session: EditableArtifactSession;
|
|
6
|
+
subtitle?: ReactNode | undefined;
|
|
7
|
+
readOnly?: boolean | undefined;
|
|
8
|
+
/** Called only after the durable SDK command has been accepted locally. */
|
|
9
|
+
onCommit?: DocumentCommitHandler | undefined;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Durable document editor over the public SDK session. Canonical state and
|
|
13
|
+
* speculative replay remain Worker-owned; React receives bounded projections.
|
|
14
|
+
*/
|
|
15
|
+
export declare function EditableDocumentArtifactSurface({ session, title, subtitle, readOnly, onCommit, onCommandError, ...surfaceProps }: EditableDocumentArtifactSurfaceProps): import("react").JSX.Element;
|
|
16
|
+
/** Deterministically composes summary/body/sections/review at one Worker revision. */
|
|
17
|
+
export declare function composeDocumentEditorProjection(session: EditableArtifactSession): Promise<DocumentEditorProjection>;
|
|
18
|
+
export declare function minimalUtf16TextEdit(before: string, after: string): {
|
|
19
|
+
range: {
|
|
20
|
+
start: number;
|
|
21
|
+
end: number;
|
|
22
|
+
};
|
|
23
|
+
replacement: string;
|
|
24
|
+
} | null;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type EditableArtifactSession, type PresentationArtifactEditorSceneNode, type PresentationArtifactRichText } from "@opengeni/sdk/editable-artifacts";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
import { type PresentationCommitHandler, type PresentationEditorProjection, type PresentationProjectionArtifactSurfaceProps } from "./presentation-editor.js";
|
|
4
|
+
export type EditablePresentationArtifactSurfaceProps = Omit<PresentationProjectionArtifactSurfaceProps, "projection" | "commit" | "readOnly" | "busy" | "subtitle"> & {
|
|
5
|
+
session: EditableArtifactSession;
|
|
6
|
+
subtitle?: ReactNode | undefined;
|
|
7
|
+
readOnly?: boolean | undefined;
|
|
8
|
+
/** Called only after the durable SDK command has been accepted locally. */
|
|
9
|
+
onCommit?: PresentationCommitHandler | undefined;
|
|
10
|
+
};
|
|
11
|
+
export type ComposedPresentationProjection = Readonly<{
|
|
12
|
+
projection: PresentationEditorProjection;
|
|
13
|
+
sceneNodes: ReadonlyMap<string, PresentationArtifactEditorSceneNode>;
|
|
14
|
+
}>;
|
|
15
|
+
/**
|
|
16
|
+
* Durable presentation editor over the public SDK. The Worker owns canonical
|
|
17
|
+
* state; React only receives bounded catalog and per-slide editor projections.
|
|
18
|
+
*/
|
|
19
|
+
export declare function EditablePresentationArtifactSurface({ session, title, subtitle, readOnly, onCommit, onCommandError, ...surfaceProps }: EditablePresentationArtifactSurfaceProps): import("react").JSX.Element;
|
|
20
|
+
/** Builds a deterministic, bounded catalog + editor-slide projection at one revision. */
|
|
21
|
+
export declare function composePresentationEditorProjection(session: EditableArtifactSession): Promise<ComposedPresentationProjection>;
|
|
22
|
+
export declare function flattenPresentationRichText(text: PresentationArtifactRichText): string;
|
|
23
|
+
/** Preserves unaffected run styles and paragraph alignment across one UTF-16 text edit. */
|
|
24
|
+
export declare function replacePresentationRichText(richText: PresentationArtifactRichText, before: string, after: string): PresentationArtifactRichText;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type EditableArtifactSession, type EditableSpreadsheetSheetMetadata } from "@opengeni/sdk/editable-artifacts";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
import { type SpreadsheetCommit, type SpreadsheetSelection, type SpreadsheetViewport } from "./spreadsheet-grid.js";
|
|
4
|
+
export type EditableSpreadsheetGridProps = {
|
|
5
|
+
session: EditableArtifactSession;
|
|
6
|
+
sheet: EditableSpreadsheetSheetMetadata;
|
|
7
|
+
metadataRevision: bigint;
|
|
8
|
+
readOnly?: boolean | undefined;
|
|
9
|
+
rowCount?: number | undefined;
|
|
10
|
+
columnCount?: number | undefined;
|
|
11
|
+
overscanRows?: number | undefined;
|
|
12
|
+
overscanColumns?: number | undefined;
|
|
13
|
+
onSelectionChange?: ((selection: SpreadsheetSelection) => void) | undefined;
|
|
14
|
+
onCommit?: ((commit: SpreadsheetCommit) => void) | undefined;
|
|
15
|
+
onCommandError?: ((error: Error) => void) | undefined;
|
|
16
|
+
onViewportChange?: ((viewport: SpreadsheetViewport) => void) | undefined;
|
|
17
|
+
className?: string | undefined;
|
|
18
|
+
};
|
|
19
|
+
export type EditableSpreadsheetArtifactSurfaceProps = Omit<EditableSpreadsheetGridProps, "metadataRevision" | "sheet"> & {
|
|
20
|
+
title?: string | undefined;
|
|
21
|
+
subtitle?: ReactNode | undefined;
|
|
22
|
+
actions?: ReactNode | undefined;
|
|
23
|
+
initialSheetId?: string | undefined;
|
|
24
|
+
allowAddSheet?: boolean | undefined;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Durable spreadsheet editor over one SDK session. Canonical state remains in
|
|
28
|
+
* the dedicated Worker; React receives one bounded immutable viewport only.
|
|
29
|
+
*/
|
|
30
|
+
export declare function EditableSpreadsheetGrid({ session, sheet, metadataRevision, readOnly, rowCount: requestedRowCount, columnCount: requestedColumnCount, overscanRows, overscanColumns, onSelectionChange, onCommit, onCommandError, onViewportChange, className, }: EditableSpreadsheetGridProps): import("react").JSX.Element;
|
|
31
|
+
/** Artifact chrome, sheet navigation, and one Worker-backed spreadsheet grid. */
|
|
32
|
+
export declare function EditableSpreadsheetArtifactSurface({ session, title, subtitle, actions, initialSheetId, allowAddSheet, readOnly, ...gridProps }: EditableSpreadsheetArtifactSurfaceProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { ArtifactSurface, type ArtifactModality, type ArtifactSurfaceProps, } from "./artifact-surface.js";
|
|
2
|
+
export { SpreadsheetArtifactSurface, SpreadsheetGrid, SpreadsheetProjectionGrid, type SpreadsheetArtifactSurfaceProps, type SpreadsheetCommit, type SpreadsheetRangeCommit, type SpreadsheetGridProps, type SpreadsheetGridProjection, type SpreadsheetProjectionCell, type SpreadsheetProjectionGridProps, type SpreadsheetSelection, type SpreadsheetViewport, } from "./spreadsheet-grid.js";
|
|
3
|
+
export { EditableSpreadsheetArtifactSurface, EditableSpreadsheetGrid, type EditableSpreadsheetArtifactSurfaceProps, type EditableSpreadsheetGridProps, } from "./editable-spreadsheet.js";
|
|
4
|
+
export { BrowserEditableArtifactWorkbench, EditableArtifactWorkbench, EditableArtifactWorkbenchHost, type BrowserEditableArtifactWorkbenchOptions, type BrowserEditableArtifactWorkbenchProps, type EditableArtifactWorkbenchHostProps, type EditableArtifactWorkbenchProps, } from "./editable-artifact-workbench.js";
|
|
5
|
+
export { EditableDocumentArtifactSurface, type EditableDocumentArtifactSurfaceProps, } from "./editable-document.js";
|
|
6
|
+
export { DocumentArtifactSurface, DocumentEditor, DocumentProjectionArtifactSurface, DocumentProjectionEditor, type DocumentArtifactSurfaceProps, type DocumentCommit, type DocumentCommitHandler, type DocumentEditorProps, type DocumentEditorProjection, type DocumentLayoutMode, type DocumentProjectionArtifactSurfaceProps, type DocumentProjectionBlock, type DocumentProjectionChange, type DocumentProjectionComment, type DocumentProjectionEditorProps, type DocumentProjectionPageBreak, type DocumentProjectionPageGeometry, type DocumentProjectionParagraph, type DocumentProjectionParagraphStyle, type DocumentProjectionSection, type DocumentProjectionTable, type DocumentProjectionTextRun, type DocumentProjectionTextStyle, type DocumentSelection, } from "./document-editor.js";
|
|
7
|
+
export { EditablePresentationArtifactSurface, type EditablePresentationArtifactSurfaceProps, } from "./editable-presentation.js";
|
|
8
|
+
export { PresentationArtifactSurface, PresentationEditor, PresentationProjectionArtifactSurface, PresentationProjectionEditor, type PresentationArtifactSurfaceProps, type PresentationCommit, type PresentationCommitHandler, type PresentationEditorProps, type PresentationEditorProjection, type PresentationProjectionArtifactSurfaceProps, type PresentationProjectionChart, type PresentationProjectionChartSeries, type PresentationProjectionConnector, type PresentationProjectionEditorProps, type PresentationProjectionElementMetadata, type PresentationProjectionElement, type PresentationProjectionFill, type PresentationProjectionGroup, type PresentationProjectionImage, type PresentationProjectionLine, type PresentationProjectionPosition, type PresentationProjectionRichText, type PresentationProjectionShape, type PresentationProjectionTable, type PresentationProjectionTableCell, type PresentationProjectionTextParagraph, type PresentationProjectionTextRun, type PresentationProjectionTextStyle, type PresentationSlideProjection, } from "./presentation-editor.js";
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { Presentation, PresentationElement, PresentationPosition, Slide } from "@opengeni/artifact-tool/reference";
|
|
3
|
+
type PresentationObject = PresentationElement;
|
|
4
|
+
export type PresentationCommit = {
|
|
5
|
+
kind: "slide-insert";
|
|
6
|
+
slideId: string;
|
|
7
|
+
index: number;
|
|
8
|
+
revision?: string | number;
|
|
9
|
+
} | {
|
|
10
|
+
kind: "slide-delete";
|
|
11
|
+
slideId: string;
|
|
12
|
+
index: number;
|
|
13
|
+
revision?: string | number;
|
|
14
|
+
} | {
|
|
15
|
+
kind: "object-insert";
|
|
16
|
+
slideId: string;
|
|
17
|
+
objectId: string;
|
|
18
|
+
index: number;
|
|
19
|
+
position: PresentationPosition;
|
|
20
|
+
revision?: string | number;
|
|
21
|
+
} | {
|
|
22
|
+
kind: "object-delete";
|
|
23
|
+
slideId: string;
|
|
24
|
+
objectId: string;
|
|
25
|
+
revision?: string | number;
|
|
26
|
+
} | {
|
|
27
|
+
kind: "move" | "resize";
|
|
28
|
+
slideId: string;
|
|
29
|
+
objectId: string;
|
|
30
|
+
before: PresentationPosition;
|
|
31
|
+
after: PresentationPosition;
|
|
32
|
+
revision?: string | number;
|
|
33
|
+
} | {
|
|
34
|
+
kind: "text";
|
|
35
|
+
slideId: string;
|
|
36
|
+
objectId: string;
|
|
37
|
+
before: string;
|
|
38
|
+
after: string;
|
|
39
|
+
revision?: string | number;
|
|
40
|
+
};
|
|
41
|
+
export type PresentationCommitHandler = ((commit: PresentationCommit) => void) | ((commit: PresentationCommit) => Promise<void>);
|
|
42
|
+
export type PresentationProjectionPosition = Readonly<{
|
|
43
|
+
left: number;
|
|
44
|
+
top: number;
|
|
45
|
+
width: number;
|
|
46
|
+
height: number;
|
|
47
|
+
}>;
|
|
48
|
+
export type PresentationProjectionFill = string | Readonly<{
|
|
49
|
+
type?: "solid";
|
|
50
|
+
color: string;
|
|
51
|
+
}>;
|
|
52
|
+
export type PresentationProjectionLine = Readonly<{
|
|
53
|
+
style?: "solid" | "dash" | "dot" | "none";
|
|
54
|
+
fill?: PresentationProjectionFill;
|
|
55
|
+
width?: number;
|
|
56
|
+
}>;
|
|
57
|
+
export type PresentationProjectionTextStyle = Readonly<{
|
|
58
|
+
fontFamily?: string;
|
|
59
|
+
fontSize?: number;
|
|
60
|
+
bold?: boolean;
|
|
61
|
+
italic?: boolean;
|
|
62
|
+
underline?: boolean;
|
|
63
|
+
color?: string;
|
|
64
|
+
alignment?: "left" | "center" | "right" | "justify";
|
|
65
|
+
verticalAlignment?: "top" | "middle" | "bottom";
|
|
66
|
+
}>;
|
|
67
|
+
export type PresentationProjectionTextRun = Readonly<{
|
|
68
|
+
text: string;
|
|
69
|
+
style: PresentationProjectionTextStyle;
|
|
70
|
+
language?: string | null;
|
|
71
|
+
}>;
|
|
72
|
+
export type PresentationProjectionTextParagraph = Readonly<{
|
|
73
|
+
runs: readonly PresentationProjectionTextRun[];
|
|
74
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
75
|
+
}>;
|
|
76
|
+
export type PresentationProjectionRichText = Readonly<{
|
|
77
|
+
paragraphs: readonly PresentationProjectionTextParagraph[];
|
|
78
|
+
verticalAlignment: "top" | "middle" | "bottom";
|
|
79
|
+
}>;
|
|
80
|
+
export type PresentationProjectionElementMetadata = Readonly<{
|
|
81
|
+
nodeSource?: Readonly<{
|
|
82
|
+
kind: "master" | "layout" | "slide";
|
|
83
|
+
id: string;
|
|
84
|
+
}>;
|
|
85
|
+
inherited?: boolean;
|
|
86
|
+
parentId?: string | null;
|
|
87
|
+
order?: number;
|
|
88
|
+
/** Inherited master/layout nodes remain visible but cannot be edited in slide mode. */
|
|
89
|
+
readOnly?: boolean;
|
|
90
|
+
}>;
|
|
91
|
+
export type PresentationProjectionShape = Readonly<{
|
|
92
|
+
kind: "shape";
|
|
93
|
+
id: string;
|
|
94
|
+
name: string;
|
|
95
|
+
geometry: "textbox" | "rect" | "roundRect" | "ellipse" | "triangle" | "rightArrow" | "line";
|
|
96
|
+
position: PresentationProjectionPosition;
|
|
97
|
+
fill?: PresentationProjectionFill;
|
|
98
|
+
line?: PresentationProjectionLine;
|
|
99
|
+
rotation?: number;
|
|
100
|
+
borderRadius?: number | string;
|
|
101
|
+
text: string;
|
|
102
|
+
textStyle?: PresentationProjectionTextStyle;
|
|
103
|
+
richText?: PresentationProjectionRichText;
|
|
104
|
+
}> & PresentationProjectionElementMetadata;
|
|
105
|
+
export type PresentationProjectionChartSeries = Readonly<{
|
|
106
|
+
name: string;
|
|
107
|
+
categories?: readonly string[];
|
|
108
|
+
values: readonly number[];
|
|
109
|
+
xValues?: readonly number[];
|
|
110
|
+
bubbleSizes?: readonly number[];
|
|
111
|
+
fill?: PresentationProjectionFill;
|
|
112
|
+
line?: PresentationProjectionLine;
|
|
113
|
+
}>;
|
|
114
|
+
export type PresentationProjectionChart = Readonly<{
|
|
115
|
+
kind: "chart";
|
|
116
|
+
id: string;
|
|
117
|
+
name: string;
|
|
118
|
+
type: "bar" | "line" | "area" | "pie" | "doughnut" | "scatter" | "bubble" | "radar";
|
|
119
|
+
position: PresentationProjectionPosition;
|
|
120
|
+
title?: string;
|
|
121
|
+
titleRichText?: PresentationProjectionRichText;
|
|
122
|
+
hasLegend?: boolean;
|
|
123
|
+
series: readonly PresentationProjectionChartSeries[];
|
|
124
|
+
xAxis?: Readonly<{
|
|
125
|
+
visible?: boolean;
|
|
126
|
+
title?: string;
|
|
127
|
+
min?: number;
|
|
128
|
+
max?: number;
|
|
129
|
+
}>;
|
|
130
|
+
yAxis?: Readonly<{
|
|
131
|
+
visible?: boolean;
|
|
132
|
+
title?: string;
|
|
133
|
+
min?: number;
|
|
134
|
+
max?: number;
|
|
135
|
+
}>;
|
|
136
|
+
dataLabels?: Readonly<{
|
|
137
|
+
showValue?: boolean;
|
|
138
|
+
showSeriesName?: boolean;
|
|
139
|
+
showCategoryName?: boolean;
|
|
140
|
+
showPercent?: boolean;
|
|
141
|
+
position?: "center" | "inEnd" | "outEnd";
|
|
142
|
+
}>;
|
|
143
|
+
}> & PresentationProjectionElementMetadata;
|
|
144
|
+
export type PresentationProjectionImage = Readonly<{
|
|
145
|
+
kind: "image";
|
|
146
|
+
id: string;
|
|
147
|
+
name: string;
|
|
148
|
+
position: PresentationProjectionPosition;
|
|
149
|
+
/** Host-resolved data/blob/same-origin URL. Arbitrary remote URLs are ignored. */
|
|
150
|
+
source?: string;
|
|
151
|
+
alt?: string;
|
|
152
|
+
prompt?: string;
|
|
153
|
+
fit?: "contain" | "cover";
|
|
154
|
+
crop?: Readonly<{
|
|
155
|
+
left: number;
|
|
156
|
+
top: number;
|
|
157
|
+
right: number;
|
|
158
|
+
bottom: number;
|
|
159
|
+
}>;
|
|
160
|
+
geometry?: "rect" | "roundRect" | "ellipse";
|
|
161
|
+
borderRadius?: number | string;
|
|
162
|
+
rotation?: number;
|
|
163
|
+
flipHorizontal?: boolean;
|
|
164
|
+
flipVertical?: boolean;
|
|
165
|
+
digest?: string;
|
|
166
|
+
contentType?: string;
|
|
167
|
+
intrinsicWidth?: number;
|
|
168
|
+
intrinsicHeight?: number;
|
|
169
|
+
}> & PresentationProjectionElementMetadata;
|
|
170
|
+
export type PresentationProjectionTableCell = Readonly<{
|
|
171
|
+
text: string;
|
|
172
|
+
richText?: PresentationProjectionRichText;
|
|
173
|
+
fill?: PresentationProjectionFill;
|
|
174
|
+
textStyle?: PresentationProjectionTextStyle;
|
|
175
|
+
rowSpan?: number;
|
|
176
|
+
colSpan?: number;
|
|
177
|
+
}>;
|
|
178
|
+
export type PresentationProjectionTable = Readonly<{
|
|
179
|
+
kind: "table";
|
|
180
|
+
id: string;
|
|
181
|
+
name: string;
|
|
182
|
+
position: PresentationProjectionPosition;
|
|
183
|
+
rows: readonly (readonly (PresentationProjectionTableCell | null)[])[];
|
|
184
|
+
columnWidths?: readonly number[];
|
|
185
|
+
rowHeights?: readonly number[];
|
|
186
|
+
fill?: PresentationProjectionFill;
|
|
187
|
+
line?: PresentationProjectionLine;
|
|
188
|
+
textStyle?: PresentationProjectionTextStyle;
|
|
189
|
+
}> & PresentationProjectionElementMetadata;
|
|
190
|
+
export type PresentationProjectionGroup = Readonly<{
|
|
191
|
+
kind: "group";
|
|
192
|
+
id: string;
|
|
193
|
+
name: string;
|
|
194
|
+
position: PresentationProjectionPosition;
|
|
195
|
+
childOffset: Readonly<{
|
|
196
|
+
left: number;
|
|
197
|
+
top: number;
|
|
198
|
+
}>;
|
|
199
|
+
childExtent: Readonly<{
|
|
200
|
+
width: number;
|
|
201
|
+
height: number;
|
|
202
|
+
}>;
|
|
203
|
+
rotation?: number;
|
|
204
|
+
flipHorizontal?: boolean;
|
|
205
|
+
flipVertical?: boolean;
|
|
206
|
+
children: readonly PresentationProjectionElement[];
|
|
207
|
+
}> & PresentationProjectionElementMetadata;
|
|
208
|
+
export type PresentationProjectionConnector = Readonly<{
|
|
209
|
+
kind: "connector";
|
|
210
|
+
id: string;
|
|
211
|
+
name: string;
|
|
212
|
+
connectorKind: "straight" | "elbow" | "curved";
|
|
213
|
+
position: PresentationProjectionPosition;
|
|
214
|
+
start: Readonly<{
|
|
215
|
+
nodeId: string | null;
|
|
216
|
+
x: number;
|
|
217
|
+
y: number;
|
|
218
|
+
}>;
|
|
219
|
+
end: Readonly<{
|
|
220
|
+
nodeId: string | null;
|
|
221
|
+
x: number;
|
|
222
|
+
y: number;
|
|
223
|
+
}>;
|
|
224
|
+
line?: PresentationProjectionLine;
|
|
225
|
+
}> & PresentationProjectionElementMetadata;
|
|
226
|
+
export type PresentationProjectionElement = PresentationProjectionShape | PresentationProjectionChart | PresentationProjectionImage | PresentationProjectionTable | PresentationProjectionGroup | PresentationProjectionConnector;
|
|
227
|
+
export type PresentationSlideProjection = Readonly<{
|
|
228
|
+
id: string;
|
|
229
|
+
title?: string;
|
|
230
|
+
background?: PresentationProjectionFill;
|
|
231
|
+
elements: readonly PresentationProjectionElement[];
|
|
232
|
+
layout?: Readonly<{
|
|
233
|
+
id: string;
|
|
234
|
+
name: string;
|
|
235
|
+
masterId: string | null;
|
|
236
|
+
background: PresentationProjectionFill;
|
|
237
|
+
}> | null;
|
|
238
|
+
notes?: PresentationProjectionRichText | null;
|
|
239
|
+
}>;
|
|
240
|
+
/** Immutable render/edit projection; the host keeps the canonical deck off the React thread. */
|
|
241
|
+
export type PresentationEditorProjection = Readonly<{
|
|
242
|
+
revision: string | number;
|
|
243
|
+
slideSize: Readonly<{
|
|
244
|
+
width: number;
|
|
245
|
+
height: number;
|
|
246
|
+
}>;
|
|
247
|
+
slides: readonly PresentationSlideProjection[];
|
|
248
|
+
}>;
|
|
249
|
+
export type PresentationProjectionEditorProps = Omit<PresentationEditorProps, "presentation" | "revision" | "onSlideChange" | "onSelectionChange" | "onCommit"> & {
|
|
250
|
+
projection: PresentationEditorProjection;
|
|
251
|
+
commit?: PresentationCommitHandler | undefined;
|
|
252
|
+
onCommandError?: ((error: Error) => void) | undefined;
|
|
253
|
+
onSlideChange?: ((slide: PresentationSlideProjection, index: number) => void) | undefined;
|
|
254
|
+
onSelectionChange?: ((object: PresentationProjectionElement | null, slide: PresentationSlideProjection) => void) | undefined;
|
|
255
|
+
};
|
|
256
|
+
export type PresentationProjectionArtifactSurfaceProps = PresentationProjectionEditorProps & {
|
|
257
|
+
title?: string | undefined;
|
|
258
|
+
subtitle?: ReactNode | undefined;
|
|
259
|
+
actions?: ReactNode | undefined;
|
|
260
|
+
busy?: boolean | undefined;
|
|
261
|
+
};
|
|
262
|
+
export type PresentationEditorProps = {
|
|
263
|
+
presentation: Presentation;
|
|
264
|
+
/** Increment/change after a host applies an out-of-band model mutation. */
|
|
265
|
+
revision?: string | number | undefined;
|
|
266
|
+
activeSlideId?: string | undefined;
|
|
267
|
+
defaultActiveSlideId?: string | undefined;
|
|
268
|
+
selectedObjectId?: string | null | undefined;
|
|
269
|
+
defaultSelectedObjectId?: string | null | undefined;
|
|
270
|
+
zoom?: number | undefined;
|
|
271
|
+
defaultZoom?: number | undefined;
|
|
272
|
+
readOnly?: boolean | undefined;
|
|
273
|
+
className?: string | undefined;
|
|
274
|
+
onSlideChange?: ((slide: Slide, index: number) => void) | undefined;
|
|
275
|
+
onSelectionChange?: ((object: PresentationObject | null, slide: Slide) => void) | undefined;
|
|
276
|
+
onCommit?: PresentationCommitHandler | undefined;
|
|
277
|
+
onCommandError?: ((error: Error) => void) | undefined;
|
|
278
|
+
onZoomChange?: ((zoom: number) => void) | undefined;
|
|
279
|
+
};
|
|
280
|
+
export type PresentationArtifactSurfaceProps = PresentationEditorProps & {
|
|
281
|
+
title?: string | undefined;
|
|
282
|
+
subtitle?: ReactNode | undefined;
|
|
283
|
+
actions?: ReactNode | undefined;
|
|
284
|
+
busy?: boolean | undefined;
|
|
285
|
+
};
|
|
286
|
+
/** Compatibility adapter for the public authoring model. */
|
|
287
|
+
export declare function PresentationEditor(props: PresentationEditorProps): import("react").JSX.Element;
|
|
288
|
+
/**
|
|
289
|
+
* Projection-first editor. It creates only a disposable render view; all
|
|
290
|
+
* durable mutations leave through the async command port.
|
|
291
|
+
*/
|
|
292
|
+
export declare function PresentationProjectionEditor({ projection, commit, onCommandError, onSlideChange, onSelectionChange, readOnly, ...props }: PresentationProjectionEditorProps): import("react").JSX.Element;
|
|
293
|
+
/** Artifact chrome plus the editor, for drop-in SDK embedding. */
|
|
294
|
+
export declare function PresentationArtifactSurface({ presentation, title, subtitle, actions, busy, className, ...editorProps }: PresentationArtifactSurfaceProps): import("react").JSX.Element;
|
|
295
|
+
/** Artifact chrome over the projection-first editor. */
|
|
296
|
+
export declare function PresentationProjectionArtifactSurface({ projection, title, subtitle, actions, busy, className, ...editorProps }: PresentationProjectionArtifactSurfaceProps): import("react").JSX.Element;
|
|
297
|
+
export {};
|