@opengeni/react 0.48.0 → 0.57.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +138 -2
- 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 +199 -0
- package/dist/artifacts.js.map +1 -0
- package/dist/{chunk-NJ7M2B6Z.js → chunk-5UQPNLIO.js} +16 -8
- package/dist/{chunk-NJ7M2B6Z.js.map → chunk-5UQPNLIO.js.map} +1 -1
- package/dist/{chunk-LHLYWG5R.js → chunk-6KLX2RH5.js} +461 -38
- package/dist/chunk-6KLX2RH5.js.map +1 -0
- package/dist/chunk-7WCLAEFV.js +2828 -0
- package/dist/chunk-7WCLAEFV.js.map +1 -0
- package/dist/{chunk-I4MPFDRP.js → chunk-B6WPZSTT.js} +104 -104
- package/dist/{chunk-I4MPFDRP.js.map → chunk-B6WPZSTT.js.map} +1 -1
- package/dist/{chunk-EKZH6IDG.js → chunk-C5ZPSSS5.js} +111 -1
- package/dist/chunk-C5ZPSSS5.js.map +1 -0
- package/dist/{chunk-OL6QVXGF.js → chunk-HA46CYQK.js} +152 -8
- package/dist/chunk-HA46CYQK.js.map +1 -0
- package/dist/chunk-HUIKIDM5.js +2148 -0
- package/dist/chunk-HUIKIDM5.js.map +1 -0
- package/dist/{chunk-FWXGSNXT.js → chunk-IGC6A2ZI.js} +585 -34
- package/dist/chunk-IGC6A2ZI.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-LLOLUHVG.js +5937 -0
- package/dist/chunk-LLOLUHVG.js.map +1 -0
- package/dist/{chunk-WYA65Y3F.js → chunk-MKPIAGVL.js} +13 -3
- package/dist/chunk-MKPIAGVL.js.map +1 -0
- package/dist/chunk-PEI6RANI.js +3234 -0
- package/dist/chunk-PEI6RANI.js.map +1 -0
- package/dist/chunk-R3AZOAB5.js +933 -0
- package/dist/chunk-R3AZOAB5.js.map +1 -0
- package/dist/{chunk-O4VXOBGF.js → chunk-WSK7G5LE.js} +70 -2
- package/dist/chunk-WSK7G5LE.js.map +1 -0
- package/dist/{chunk-23EJ676W.js → chunk-XBZWOM2K.js} +9 -4
- package/dist/chunk-XBZWOM2K.js.map +1 -0
- package/dist/{chunk-XCNTXWBB.js → chunk-Y7OEDUJ5.js} +856 -338
- package/dist/chunk-Y7OEDUJ5.js.map +1 -0
- package/dist/client.d.ts +10 -2
- 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 +9 -0
- package/dist/components/artifacts/presentation-editor.d.ts +297 -0
- package/dist/components/artifacts/published-html-artifact-frame.d.ts +14 -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-input.d.ts +7 -0
- package/dist/components/browser-viewer.d.ts +30 -0
- package/dist/components/chat-composer.d.ts +8 -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 +2 -2
- package/dist/components/composer.d.ts +17 -17
- package/dist/components/computer-viewer.d.ts +24 -0
- package/dist/components/copy-button.d.ts +2 -2
- package/dist/components/desktop-viewer.d.ts +50 -22
- 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/interaction-intervention-banner.d.ts +11 -0
- 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 +3 -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 +2 -2
- package/dist/components/markdown.d.ts +1 -1
- package/dist/components/message-timeline.d.ts +12 -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 +3 -3
- package/dist/components/sandbox-terminal.d.ts +24 -4
- package/dist/components/sandbox-workspace.d.ts +28 -9
- 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 +1 -1
- package/dist/composer.d.ts +11 -11
- package/dist/composer.js +7 -7
- package/dist/hooks/internal.d.ts +1 -1
- package/dist/hooks/use-attached-browsers.d.ts +21 -0
- package/dist/hooks/use-auth-runs.d.ts +32 -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-downloads.d.ts +25 -0
- package/dist/hooks/use-browser-frame-stream.d.ts +28 -0
- package/dist/hooks/use-browser-identities.d.ts +30 -0
- package/dist/hooks/use-browser-session.d.ts +29 -0
- package/dist/hooks/use-browser-sessions.d.ts +32 -0
- package/dist/hooks/use-channels.d.ts +26 -0
- package/dist/hooks/use-codex-accounts.d.ts +2 -2
- 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 +29 -0
- package/dist/hooks/use-computer-sessions.d.ts +28 -0
- package/dist/hooks/use-desktop-stream.d.ts +5 -1
- package/dist/hooks/use-environments.d.ts +1 -1
- 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-interaction-interventions.d.ts +27 -0
- package/dist/hooks/use-interaction-invalidation.d.ts +19 -0
- 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 +4 -4
- package/dist/hooks/use-network-routes.d.ts +25 -0
- 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 +6 -4
- package/dist/hooks/use-sandbox-git.d.ts +6 -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-site-auth-connections.d.ts +25 -0
- package/dist/hooks/use-slash-commands.d.ts +1 -1
- package/dist/hooks/use-supergrok-accounts.d.ts +26 -0
- package/dist/hooks/use-terminal-stream.d.ts +11 -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 +1 -1
- 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 +162 -155
- package/dist/index.js +1822 -1703
- package/dist/index.js.map +1 -1
- package/dist/interaction.d.ts +33 -0
- package/dist/interaction.js +550 -0
- package/dist/interaction.js.map +1 -0
- package/dist/interactive-workbench-viewers-TOHBXJEE.js +15 -0
- package/dist/interactive-workbench-viewers-TOHBXJEE.js.map +1 -0
- package/dist/lib/host-platform.d.ts +5 -0
- package/dist/lib/relay-wire.d.ts +24 -1
- package/dist/lib/sandbox-liveness.d.ts +9 -0
- package/dist/lib/terminal-capability.d.ts +5 -0
- package/dist/lib/xterm-theme.d.ts +1 -1
- package/dist/machines.d.ts +30 -30
- package/dist/machines.js +2 -2
- package/dist/model-policy.d.ts +1 -1
- package/dist/model-policy.js +1 -1
- package/dist/provider.d.ts +6 -5
- package/dist/{queue-surface-implementation-U5JFG7HT.js → queue-surface-implementation-2KVJTYXH.js} +100 -48
- 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 +8 -8
- package/dist/realtime.d.ts +4 -4
- package/dist/realtime.js +38 -11
- package/dist/realtime.js.map +1 -1
- package/dist/session-context.d.ts +28 -2
- package/dist/session-ui.d.ts +14 -14
- package/dist/session-ui.js +5 -4
- package/dist/session.d.ts +28 -28
- package/dist/session.js +10 -10
- package/dist/timeline/activity-rail.d.ts +5 -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 +4 -1
- package/dist/timeline/projection.d.ts +3 -3
- package/dist/timeline/registry.d.ts +8 -2
- 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 +44 -3
- 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/package.json +36 -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 +89 -0
- package/src/client.ts +157 -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 +104 -0
- package/src/components/artifacts/presentation-editor.tsx +3148 -0
- package/src/components/artifacts/published-html-artifact-frame.tsx +38 -0
- package/src/components/artifacts/spreadsheet-canvas.ts +799 -0
- package/src/components/artifacts/spreadsheet-grid.tsx +2129 -0
- package/src/components/browser-input.ts +65 -0
- package/src/components/browser-viewer.tsx +2702 -0
- package/src/components/chat-composer.tsx +13 -0
- package/src/components/code-editor.tsx +89 -30
- package/src/components/composer-transcription-control.tsx +10 -6
- package/src/components/computer-viewer.tsx +1636 -0
- package/src/components/desktop-viewer.tsx +215 -74
- package/src/components/generated-video-player.tsx +89 -0
- package/src/components/interaction-intervention-banner.tsx +99 -0
- package/src/components/interactive-workbench-viewers.ts +2 -0
- package/src/components/machine-input-display.ts +3 -0
- package/src/components/machines/machine-detail.tsx +1 -1
- package/src/components/message-timeline.tsx +289 -32
- package/src/components/model-policy-picker.tsx +15 -0
- package/src/components/queue-surface-implementation.tsx +116 -60
- package/src/components/sandbox-files.tsx +2 -2
- package/src/components/sandbox-terminal.tsx +128 -46
- package/src/components/sandbox-workspace.tsx +256 -90
- package/src/components/session-chrome.tsx +53 -13
- 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/workbench-changes.tsx +188 -31
- package/src/components/workspace-dock.tsx +59 -5
- package/src/hooks/use-attached-browsers.ts +154 -0
- package/src/hooks/use-auth-runs.ts +278 -0
- package/src/hooks/use-browser-downloads.ts +218 -0
- package/src/hooks/use-browser-frame-stream.ts +425 -0
- package/src/hooks/use-browser-identities.ts +266 -0
- package/src/hooks/use-browser-session.ts +543 -0
- package/src/hooks/use-browser-sessions.ts +286 -0
- package/src/hooks/use-channels.ts +99 -0
- package/src/hooks/use-composer.ts +769 -24
- package/src/hooks/use-computer-frame-stream.ts +434 -0
- package/src/hooks/use-computer-session.ts +462 -0
- package/src/hooks/use-computer-sessions.ts +251 -0
- package/src/hooks/use-desktop-stream.ts +39 -7
- package/src/hooks/use-interaction-interventions.ts +242 -0
- package/src/hooks/use-interaction-invalidation.ts +66 -0
- package/src/hooks/use-machine-chip.ts +15 -3
- package/src/hooks/use-machines.ts +33 -3
- package/src/hooks/use-network-routes.ts +214 -0
- package/src/hooks/use-packs.ts +51 -0
- package/src/hooks/use-sandbox-files.ts +98 -55
- package/src/hooks/use-sandbox-git.ts +93 -38
- package/src/hooks/use-sandbox-terminal.ts +3 -2
- package/src/hooks/use-session-capabilities.ts +59 -46
- package/src/hooks/use-site-auth-connections.ts +226 -0
- package/src/hooks/use-supergrok-accounts.ts +81 -0
- package/src/hooks/use-terminal-stream.ts +359 -47
- package/src/hooks/use-video-artifact-playback.ts +28 -0
- package/src/hooks/use-workspace-edit.ts +2 -1
- package/src/index.ts +18 -0
- package/src/interaction.ts +101 -0
- package/src/lib/host-platform.ts +10 -0
- package/src/lib/relay-wire.ts +47 -4
- package/src/lib/sandbox-liveness.ts +11 -0
- package/src/lib/terminal-capability.ts +10 -0
- package/src/model-policy.ts +19 -4
- package/src/provider.tsx +133 -1
- package/src/realtime/realtime-control.tsx +34 -6
- package/src/session-context.ts +156 -1
- package/src/timeline/activity-rail.tsx +25 -3
- package/src/timeline/index.ts +3 -0
- package/src/timeline/parsers.ts +14 -1
- package/src/timeline/projection.ts +269 -14
- package/src/timeline/registry.ts +13 -1
- package/src/timeline/screenshot-lightbox.tsx +19 -9
- package/src/timeline/shared.tsx +56 -8
- package/src/timeline/tool-renderers.tsx +303 -50
- package/src/timeline/types.ts +57 -3
- package/styles/compiled.css +312 -21
- package/styles/index.css +15 -0
- package/styles/responsive.css +13 -1
- package/dist/chunk-23EJ676W.js.map +0 -1
- package/dist/chunk-EKZH6IDG.js.map +0 -1
- package/dist/chunk-FWXGSNXT.js.map +0 -1
- package/dist/chunk-LHLYWG5R.js.map +0 -1
- package/dist/chunk-O4VXOBGF.js.map +0 -1
- package/dist/chunk-OL6QVXGF.js.map +0 -1
- package/dist/chunk-WYA65Y3F.js.map +0 -1
- package/dist/chunk-XCNTXWBB.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-U5JFG7HT.js.map +0 -1
|
@@ -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 {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { CSSProperties } from "react";
|
|
2
|
+
export declare const PUBLISHED_HTML_ARTIFACT_IFRAME_SANDBOX: string;
|
|
3
|
+
export type PublishedHtmlArtifactFrameProps = {
|
|
4
|
+
html: string;
|
|
5
|
+
title: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: CSSProperties;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Render exact published HTML in an opaque-origin iframe. Artifact scripts,
|
|
11
|
+
* external resources, forms, popups, and downloads work without granting
|
|
12
|
+
* parent-origin authority, shared cookies/storage, or top-level navigation.
|
|
13
|
+
*/
|
|
14
|
+
export declare function PublishedHtmlArtifactFrame(props: PublishedHtmlArtifactFrameProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
export type SpreadsheetCanvasCellFormat = {
|
|
2
|
+
fill?: string | undefined;
|
|
3
|
+
font?: {
|
|
4
|
+
name?: string | undefined;
|
|
5
|
+
size?: number | undefined;
|
|
6
|
+
bold?: boolean | undefined;
|
|
7
|
+
italic?: boolean | undefined;
|
|
8
|
+
underline?: boolean | undefined;
|
|
9
|
+
color?: string | undefined;
|
|
10
|
+
} | undefined;
|
|
11
|
+
horizontalAlignment?: "left" | "center" | "right" | "justify" | undefined;
|
|
12
|
+
verticalAlignment?: "top" | "center" | "bottom" | undefined;
|
|
13
|
+
wrapText?: boolean | undefined;
|
|
14
|
+
};
|
|
15
|
+
/** One sparse, already-authorized cell projected into the renderer. */
|
|
16
|
+
export type SpreadsheetCanvasCell = {
|
|
17
|
+
row: number;
|
|
18
|
+
col: number;
|
|
19
|
+
value: unknown;
|
|
20
|
+
formula?: string | null | undefined;
|
|
21
|
+
format: SpreadsheetCanvasCellFormat;
|
|
22
|
+
};
|
|
23
|
+
export type SpreadsheetCanvasCoverage = {
|
|
24
|
+
rowStart: number;
|
|
25
|
+
rowEnd: number;
|
|
26
|
+
columnStart: number;
|
|
27
|
+
columnEnd: number;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* A bounded value projection. `coverage` is end-exclusive; omitting it means
|
|
31
|
+
* the source can answer for the entire sheet. A session-backed adapter can
|
|
32
|
+
* replace this object as viewport subscriptions advance without making the
|
|
33
|
+
* React layer or renderer own the canonical workbook model.
|
|
34
|
+
*/
|
|
35
|
+
export type SpreadsheetCanvasProjection = {
|
|
36
|
+
sheetId: string;
|
|
37
|
+
generationId: string | null;
|
|
38
|
+
revision: string | number;
|
|
39
|
+
coverage?: SpreadsheetCanvasCoverage | undefined;
|
|
40
|
+
cells: SpreadsheetCanvasCellSource;
|
|
41
|
+
valueAt: (cell: SpreadsheetCanvasCell) => unknown;
|
|
42
|
+
};
|
|
43
|
+
export type SpreadsheetCanvasCellSource = {
|
|
44
|
+
forEachInRange: (rowStart: number, rowEnd: number, columnStart: number, columnEnd: number, visit: (cell: SpreadsheetCanvasCell) => void) => void;
|
|
45
|
+
};
|
|
46
|
+
export type SpreadsheetCanvasAxis = {
|
|
47
|
+
count: number;
|
|
48
|
+
total: number;
|
|
49
|
+
offsetAt: (index: number) => number;
|
|
50
|
+
sizeAt: (index: number) => number;
|
|
51
|
+
indexAtOffset: (offset: number) => number;
|
|
52
|
+
};
|
|
53
|
+
export type SpreadsheetCanvasSelection = {
|
|
54
|
+
top: number;
|
|
55
|
+
bottom: number;
|
|
56
|
+
left: number;
|
|
57
|
+
right: number;
|
|
58
|
+
focusRow: number;
|
|
59
|
+
focusColumn: number;
|
|
60
|
+
};
|
|
61
|
+
export type SpreadsheetCanvasTheme = {
|
|
62
|
+
background: string;
|
|
63
|
+
headerBackground: string;
|
|
64
|
+
border: string;
|
|
65
|
+
foreground: string;
|
|
66
|
+
mutedForeground: string;
|
|
67
|
+
accent: string;
|
|
68
|
+
error: string;
|
|
69
|
+
fontFamily: string;
|
|
70
|
+
fontSize: number;
|
|
71
|
+
headerFontSize: number;
|
|
72
|
+
signature: string;
|
|
73
|
+
};
|
|
74
|
+
export type SpreadsheetCanvasPaint = {
|
|
75
|
+
canvas: HTMLCanvasElement;
|
|
76
|
+
projection: SpreadsheetCanvasProjection;
|
|
77
|
+
rows: SpreadsheetCanvasAxis;
|
|
78
|
+
columns: SpreadsheetCanvasAxis;
|
|
79
|
+
selection: SpreadsheetCanvasSelection;
|
|
80
|
+
logicalScrollLeft: number;
|
|
81
|
+
logicalScrollTop: number;
|
|
82
|
+
viewportWidth: number;
|
|
83
|
+
viewportHeight: number;
|
|
84
|
+
rowHeaderWidth: number;
|
|
85
|
+
columnHeaderHeight: number;
|
|
86
|
+
dimensionRevision: string | number;
|
|
87
|
+
devicePixelRatio: number;
|
|
88
|
+
theme: SpreadsheetCanvasTheme;
|
|
89
|
+
};
|
|
90
|
+
export type SpreadsheetCanvasPaintStats = {
|
|
91
|
+
cacheSize: number;
|
|
92
|
+
paintedTiles: number;
|
|
93
|
+
reusedTiles: number;
|
|
94
|
+
uncachedTiles: number;
|
|
95
|
+
devicePixelRatio: number;
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* A row-major sparse index over stored worksheet cells. Empty cells never enter
|
|
99
|
+
* this structure, so a tile query costs O(log k + v), where v is the number of
|
|
100
|
+
* stored cells intersecting that tile.
|
|
101
|
+
*/
|
|
102
|
+
export declare class SparseSpreadsheetCellIndex {
|
|
103
|
+
readonly size: number;
|
|
104
|
+
private readonly rows;
|
|
105
|
+
constructor(entries: Iterable<SpreadsheetCanvasCell>);
|
|
106
|
+
forEachInRange(rowStart: number, rowEnd: number, columnStart: number, columnEnd: number, visit: (cell: SpreadsheetCanvasCell) => void): void;
|
|
107
|
+
}
|
|
108
|
+
export declare function spreadsheetCanvasDevicePixelRatio(value: number): number;
|
|
109
|
+
/** Caps backing-store allocation while retaining the full CSS viewport. */
|
|
110
|
+
export declare function spreadsheetCanvasBackingScale(width: number, height: number, devicePixelRatio: number): number;
|
|
111
|
+
/** Retained 2D tile renderer. Dynamic selection and headers are painted above cached body tiles. */
|
|
112
|
+
export declare class SpreadsheetCanvasRenderer {
|
|
113
|
+
private readonly tiles;
|
|
114
|
+
private generation;
|
|
115
|
+
private clock;
|
|
116
|
+
dispose(): void;
|
|
117
|
+
paint(input: SpreadsheetCanvasPaint): SpreadsheetCanvasPaintStats | null;
|
|
118
|
+
private paintTile;
|
|
119
|
+
private evictTiles;
|
|
120
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import type { Workbook, Worksheet } from "@opengeni/artifact-tool/reference";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
import { type SpreadsheetCanvasCellFormat, type SpreadsheetCanvasProjection } from "./spreadsheet-canvas.js";
|
|
4
|
+
type CellCoordinate = {
|
|
5
|
+
row: number;
|
|
6
|
+
col: number;
|
|
7
|
+
};
|
|
8
|
+
export type SpreadsheetSelection = {
|
|
9
|
+
sheetId: string;
|
|
10
|
+
anchor: CellCoordinate;
|
|
11
|
+
focus: CellCoordinate;
|
|
12
|
+
};
|
|
13
|
+
export type SpreadsheetCommit = {
|
|
14
|
+
sheetId: string;
|
|
15
|
+
cell: CellCoordinate;
|
|
16
|
+
input: string;
|
|
17
|
+
kind: "formula" | "value";
|
|
18
|
+
};
|
|
19
|
+
/** Row-major rectangular input submitted as one durable spreadsheet command. */
|
|
20
|
+
export type SpreadsheetRangeCommit = {
|
|
21
|
+
sheetId: string;
|
|
22
|
+
anchor: CellCoordinate;
|
|
23
|
+
rows: number;
|
|
24
|
+
columns: number;
|
|
25
|
+
inputs: readonly string[];
|
|
26
|
+
};
|
|
27
|
+
/** End-exclusive logical windows emitted at most once per animation frame. */
|
|
28
|
+
export type SpreadsheetViewport = {
|
|
29
|
+
sheetId: string;
|
|
30
|
+
rowStart: number;
|
|
31
|
+
rowEnd: number;
|
|
32
|
+
columnStart: number;
|
|
33
|
+
columnEnd: number;
|
|
34
|
+
overscanRowStart: number;
|
|
35
|
+
overscanRowEnd: number;
|
|
36
|
+
overscanColumnStart: number;
|
|
37
|
+
overscanColumnEnd: number;
|
|
38
|
+
logicalScrollLeft: number;
|
|
39
|
+
logicalScrollTop: number;
|
|
40
|
+
viewportWidth: number;
|
|
41
|
+
viewportHeight: number;
|
|
42
|
+
};
|
|
43
|
+
export type SpreadsheetGridProps = {
|
|
44
|
+
workbook: Workbook;
|
|
45
|
+
worksheet: Worksheet;
|
|
46
|
+
readOnly?: boolean | undefined;
|
|
47
|
+
/** Addressable rows in the interactive projection. Grows to include used data. */
|
|
48
|
+
rowCount?: number | undefined;
|
|
49
|
+
/** Addressable columns in the interactive projection. Grows to include used data. */
|
|
50
|
+
columnCount?: number | undefined;
|
|
51
|
+
overscanRows?: number | undefined;
|
|
52
|
+
overscanColumns?: number | undefined;
|
|
53
|
+
onSelectionChange?: ((selection: SpreadsheetSelection) => void) | undefined;
|
|
54
|
+
onCommit?: ((commit: SpreadsheetCommit) => void) | undefined;
|
|
55
|
+
onViewportChange?: ((viewport: SpreadsheetViewport) => void) | undefined;
|
|
56
|
+
className?: string | undefined;
|
|
57
|
+
};
|
|
58
|
+
export type SpreadsheetProjectionCell = {
|
|
59
|
+
value: unknown;
|
|
60
|
+
input: string;
|
|
61
|
+
format: SpreadsheetCanvasCellFormat;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Synchronous, bounded view state consumed by the React editor. Durable model
|
|
65
|
+
* ownership stays with the caller (legacy Workbook, SDK Worker, or another
|
|
66
|
+
* projection adapter); edits return through `commit` / `clear` ports.
|
|
67
|
+
*/
|
|
68
|
+
export type SpreadsheetGridProjection = SpreadsheetCanvasProjection & {
|
|
69
|
+
sheetName: string;
|
|
70
|
+
rowCount: number;
|
|
71
|
+
columnCount: number;
|
|
72
|
+
defaultRowHeight?: number | undefined;
|
|
73
|
+
defaultColumnWidth?: number | undefined;
|
|
74
|
+
rowHeights?: readonly (readonly [number, number])[] | undefined;
|
|
75
|
+
columnWidths?: readonly (readonly [number, number])[] | undefined;
|
|
76
|
+
dimensionRevision?: string | number | undefined;
|
|
77
|
+
usedRange?: {
|
|
78
|
+
row: number;
|
|
79
|
+
col: number;
|
|
80
|
+
rowCount: number;
|
|
81
|
+
colCount: number;
|
|
82
|
+
} | null | undefined;
|
|
83
|
+
readCell: (row: number, column: number) => SpreadsheetProjectionCell | null;
|
|
84
|
+
};
|
|
85
|
+
export type SpreadsheetProjectionGridProps = {
|
|
86
|
+
projection: SpreadsheetGridProjection;
|
|
87
|
+
readOnly?: boolean | undefined;
|
|
88
|
+
overscanRows?: number | undefined;
|
|
89
|
+
overscanColumns?: number | undefined;
|
|
90
|
+
onSelectionChange?: ((selection: SpreadsheetSelection) => void) | undefined;
|
|
91
|
+
commit?: ((commit: SpreadsheetCommit) => void | Promise<void>) | undefined;
|
|
92
|
+
commitRange?: ((commit: SpreadsheetRangeCommit) => void | Promise<void>) | undefined;
|
|
93
|
+
clear?: ((selection: SpreadsheetSelection) => void | Promise<void>) | undefined;
|
|
94
|
+
onCommandError?: ((error: Error) => void) | undefined;
|
|
95
|
+
onViewportChange?: ((viewport: SpreadsheetViewport) => void) | undefined;
|
|
96
|
+
className?: string | undefined;
|
|
97
|
+
};
|
|
98
|
+
export type SpreadsheetArtifactSurfaceProps = Omit<SpreadsheetGridProps, "worksheet"> & {
|
|
99
|
+
title?: string | undefined;
|
|
100
|
+
subtitle?: ReactNode | undefined;
|
|
101
|
+
actions?: ReactNode | undefined;
|
|
102
|
+
initialSheetId?: string | undefined;
|
|
103
|
+
allowAddSheet?: boolean | undefined;
|
|
104
|
+
};
|
|
105
|
+
/** A reusable workbook shell with first-class sheet switching. */
|
|
106
|
+
export declare function SpreadsheetArtifactSurface({ workbook, title, subtitle, actions, initialSheetId, allowAddSheet, readOnly, ...gridProps }: SpreadsheetArtifactSurfaceProps): import("react").JSX.Element;
|
|
107
|
+
export declare function SpreadsheetGrid({ workbook, worksheet, readOnly, rowCount: requestedRowCount, columnCount: requestedColumnCount, overscanRows, overscanColumns, onSelectionChange, onCommit, onViewportChange, className, }: SpreadsheetGridProps): import("react").JSX.Element;
|
|
108
|
+
/**
|
|
109
|
+
* Two-axis virtualized, accessible spreadsheet projection. The caller owns
|
|
110
|
+
* durable model state; React owns only viewport, selection, and edit state.
|
|
111
|
+
*/
|
|
112
|
+
export declare function SpreadsheetProjectionGrid({ projection, readOnly, overscanRows, overscanColumns, onSelectionChange, commit, commitRange, clear, onCommandError, onViewportChange, className, }: SpreadsheetProjectionGridProps): import("react").JSX.Element;
|
|
113
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { KeyboardEvent } from "react";
|
|
2
|
+
import { type InteractionHostPlatform } from "../lib/host-platform.js";
|
|
3
|
+
export declare const HUMAN_BROWSER_HOME_URL = "https://www.google.com/";
|
|
4
|
+
/** Apply browser-style omnibox behavior: navigate hosts, search ordinary text. */
|
|
5
|
+
export declare function normalizeBrowserAddress(value: string): string | null;
|
|
6
|
+
/** Translate executable keyboard chords for the BrowserSession action API. */
|
|
7
|
+
export declare function browserKey(event: Pick<KeyboardEvent<HTMLTextAreaElement>, "altKey" | "ctrlKey" | "key" | "metaKey" | "shiftKey">, hostPlatform?: InteractionHostPlatform): string | null;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ComputerSession, InteractionPlacement } from "@opengeni/sdk/interaction";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
import { type BrowserFrameWebSocketFactory } from "../hooks/use-browser-frame-stream.js";
|
|
4
|
+
import type { EmbeddedBrowserInteractionClientOverride } from "../session-context.js";
|
|
5
|
+
export type BrowserViewerNotification = {
|
|
6
|
+
kind: "error" | "info";
|
|
7
|
+
message: string;
|
|
8
|
+
};
|
|
9
|
+
export type BrowserViewerProps = EmbeddedBrowserInteractionClientOverride & {
|
|
10
|
+
/** The selected OpenGeni agent/session. Peer BrowserSessions stay discoverable. */
|
|
11
|
+
sessionId: string;
|
|
12
|
+
enabled?: boolean | undefined;
|
|
13
|
+
className?: string | undefined;
|
|
14
|
+
onNotify?: ((notification: BrowserViewerNotification) => void) | undefined;
|
|
15
|
+
/** Tests/demos only. Production uses the browser's native WebSocket. */
|
|
16
|
+
webSocketFactory?: BrowserFrameWebSocketFactory | undefined;
|
|
17
|
+
renderEmpty?: ((create: () => void, creating: boolean) => ReactNode) | undefined;
|
|
18
|
+
/** Optional host capability for placing a human-created headed browser inside
|
|
19
|
+
* an exact ComputerSession. Browser-only embedders still create a headed
|
|
20
|
+
* browser; they simply omit the linked desktop resource. */
|
|
21
|
+
createLinkedComputer?: ((name: string, placement?: InteractionPlacement) => Promise<Pick<ComputerSession, "id" | "placement">>) | undefined;
|
|
22
|
+
/** Navigate to the exact linked ComputerSession; never a lookalike desktop. */
|
|
23
|
+
onOpenComputer?: ((computerSessionId: string) => void) | undefined;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Complete browser-native session surface: workspace discovery, agent relevance,
|
|
27
|
+
* browser/tab switching, live frames, semantic fallback, direct human input,
|
|
28
|
+
* address navigation, diagnostics, and reconnect. Closing it never closes the browser.
|
|
29
|
+
*/
|
|
30
|
+
export declare function BrowserViewer({ sessionId, enabled, className, onNotify, webSocketFactory, renderEmpty, createLinkedComputer, onOpenComputer, ...override }: BrowserViewerProps): import("react").JSX.Element | null;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { ClientModel, EffectiveSessionControl } from "@opengeni/sdk";
|
|
2
2
|
import type { ClipboardEvent, ReactNode } from "react";
|
|
3
|
-
import type { SlashCommand } from "../commands/types";
|
|
4
|
-
import type { ComposerState } from "../hooks/use-composer";
|
|
5
|
-
import type { UseFileAttachmentsResult } from "../hooks/use-file-attachments";
|
|
6
|
-
import type { SlashCommandContext } from "../hooks/use-slash-commands";
|
|
7
|
-
import { OPEN_WORKSTREAM_CONTROL_EVENT } from "../workstream-control-event";
|
|
8
|
-
import { type ChatComposerMessages, type ComposerControlLinks, type ResponsiveBasis } from "./composer";
|
|
9
|
-
import { type ComposerTranscriptionControlProps } from "./composer-transcription-control";
|
|
3
|
+
import type { SlashCommand } from "../commands/types.js";
|
|
4
|
+
import type { ComposerState } from "../hooks/use-composer.js";
|
|
5
|
+
import type { UseFileAttachmentsResult } from "../hooks/use-file-attachments.js";
|
|
6
|
+
import type { SlashCommandContext } from "../hooks/use-slash-commands.js";
|
|
7
|
+
import { OPEN_WORKSTREAM_CONTROL_EVENT } from "../workstream-control-event.js";
|
|
8
|
+
import { type ChatComposerMessages, type ComposerControlLinks, type ResponsiveBasis } from "./composer.js";
|
|
9
|
+
import { type ComposerTranscriptionControlProps } from "./composer-transcription-control.js";
|
|
10
10
|
export { OPEN_WORKSTREAM_CONTROL_EVENT };
|
|
11
11
|
export type ChatComposerProps = {
|
|
12
12
|
composer: ComposerState;
|
|
@@ -64,4 +64,4 @@ export type ChatComposerProps = {
|
|
|
64
64
|
* the public controller and compound primitives exported by the composer
|
|
65
65
|
* subpath, so custom and default layouts share one behavioral implementation.
|
|
66
66
|
*/
|
|
67
|
-
export declare function ChatComposer({ composer, responsiveBasis, effectiveControl, queuedAheadCount, canControlWorkspace, controlLinks, placeholder, disabled, autoFocus, hint, controlsLeading, controlsStart, actionsStart, attachButtonClassName, transcription, transcriptionClassName, transcriptionSuppressed, header, onPaste, attachments, models, selectedModel, onSelectModel, className, commands, commandContext, onClearView, messages, }: ChatComposerProps): import("react
|
|
67
|
+
export declare function ChatComposer({ composer, responsiveBasis, effectiveControl, queuedAheadCount, canControlWorkspace, controlLinks, placeholder, disabled, autoFocus, hint, controlsLeading, controlsStart, actionsStart, attachButtonClassName, transcription, transcriptionClassName, transcriptionSuppressed, header, onPaste, attachments, models, selectedModel, onSelectModel, className, commands, commandContext, onClearView, messages, }: ChatComposerProps): import("react").JSX.Element;
|
|
@@ -8,8 +8,13 @@ export type CodeEditorProps = {
|
|
|
8
8
|
path: string;
|
|
9
9
|
/** The decoded text contents to seed the editor with. */
|
|
10
10
|
initialContents: string;
|
|
11
|
-
/**
|
|
12
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Persist the current buffer against the exact contents it was edited from.
|
|
13
|
+
* The second argument is the immutable compare-and-swap baseline; hosts must
|
|
14
|
+
* not replace it with a newer remote snapshot or concurrent writes can be
|
|
15
|
+
* silently overwritten.
|
|
16
|
+
*/
|
|
17
|
+
onSave: (contents: string, expectedContents: string) => Promise<unknown>;
|
|
13
18
|
/** Explicitly overwrite after a visible expected-content conflict. */
|
|
14
19
|
onOverwrite?: ((contents: string) => Promise<unknown>) | undefined;
|
|
15
20
|
/** Re-read the selected file after a visible save conflict. */
|
|
@@ -27,6 +32,23 @@ export type CodeEditorProps = {
|
|
|
27
32
|
fallback?: ReactNode | undefined;
|
|
28
33
|
className?: string | undefined;
|
|
29
34
|
};
|
|
35
|
+
export type EditorBufferState = {
|
|
36
|
+
path: string;
|
|
37
|
+
value: string;
|
|
38
|
+
baseline: string;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Reconcile a remote file snapshot without destroying unsaved local work.
|
|
42
|
+
*
|
|
43
|
+
* A different path is a new document and always resets. For the same path, a
|
|
44
|
+
* clean editor follows the remote snapshot while a dirty editor retains both
|
|
45
|
+
* its local value and the original CAS baseline. The eventual save will then
|
|
46
|
+
* either succeed against that baseline or surface a typed conflict.
|
|
47
|
+
*/
|
|
48
|
+
export declare function reconcileEditorBuffer(current: EditorBufferState, incoming: {
|
|
49
|
+
path: string;
|
|
50
|
+
contents: string;
|
|
51
|
+
}): EditorBufferState;
|
|
30
52
|
/**
|
|
31
53
|
* The EDITABLE single-file pane: CodeMirror 6 with a per-language grammar chosen
|
|
32
54
|
* from the filename, og-* themed, with dirty tracking and a save path wired to
|
|
@@ -39,5 +61,5 @@ export type CodeEditorProps = {
|
|
|
39
61
|
* `readOnly` suppresses every mutation path so a truncated/binary file can never
|
|
40
62
|
* be saved back (which would corrupt it by writing the truncated prefix).
|
|
41
63
|
*/
|
|
42
|
-
export declare function CodeEditor({ path, initialContents, onSave, onOverwrite, onReload, onEditIntent, readOnly, themeType, loading, fallback, className, }: CodeEditorProps): import("react
|
|
64
|
+
export declare function CodeEditor({ path, initialContents, onSave, onOverwrite, onReload, onEditIntent, readOnly, themeType, loading, fallback, className, }: CodeEditorProps): import("react").JSX.Element;
|
|
43
65
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SlashCommand } from "../commands/types";
|
|
1
|
+
import type { SlashCommand } from "../commands/types.js";
|
|
2
2
|
export type CommandPaletteProps = {
|
|
3
3
|
open: boolean;
|
|
4
4
|
items: SlashCommand[];
|
|
@@ -22,4 +22,4 @@ export type CommandPaletteProps = {
|
|
|
22
22
|
* the opengeni#46 design tokens. Full keyboard nav lives in useSlashCommands;
|
|
23
23
|
* this component is presentational + aria.
|
|
24
24
|
*/
|
|
25
|
-
export declare function CommandPalette({ open, items, highlight, onHighlight, onRun, argHintText, listboxId, label, dangerLabel, }: CommandPaletteProps): import("react
|
|
25
|
+
export declare function CommandPalette({ open, items, highlight, onHighlight, onRun, argHintText, listboxId, label, dangerLabel, }: CommandPaletteProps): import("react").JSX.Element;
|