@opengeni/react 7.1.0 → 7.1.2-canary.36079201993001
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/dist/artifacts-document.js +2 -2
- package/dist/artifacts-presentation.js +2 -2
- package/dist/artifacts-spreadsheet.js +2 -2
- package/dist/artifacts.js +4 -4
- package/dist/{browser-viewer-MN7MOYQT.js → browser-viewer-K2H3SLIW.js} +2 -2
- package/dist/{chunk-4ACTWOOW.js → chunk-6N3AZUOV.js} +31 -14
- package/dist/chunk-6N3AZUOV.js.map +1 -0
- package/dist/{chunk-KCGXPP5V.js → chunk-6P7T4RPE.js} +7 -3
- package/dist/chunk-6P7T4RPE.js.map +1 -0
- package/dist/{chunk-SHRCATV6.js → chunk-7J4DUR3E.js} +12 -5
- package/dist/chunk-7J4DUR3E.js.map +1 -0
- package/dist/{chunk-ZC2DK5SC.js → chunk-AWIX4UAC.js} +88 -7
- package/dist/chunk-AWIX4UAC.js.map +1 -0
- package/dist/{chunk-UQS7BGNQ.js → chunk-ETA37UZ7.js} +82 -11
- package/dist/chunk-ETA37UZ7.js.map +1 -0
- package/dist/{chunk-VR4Z73EU.js → chunk-G2SCXNXW.js} +9 -2
- package/dist/chunk-G2SCXNXW.js.map +1 -0
- package/dist/{chunk-5UONOQ3Y.js → chunk-K3MQZO7R.js} +150 -67
- package/dist/chunk-K3MQZO7R.js.map +1 -0
- package/dist/{chunk-OWHPKAOV.js → chunk-L6MYP3QU.js} +4 -2
- package/dist/{chunk-OWHPKAOV.js.map → chunk-L6MYP3QU.js.map} +1 -1
- package/dist/{chunk-VI7HELBI.js → chunk-SJ5HE4ZA.js} +21 -2
- package/dist/chunk-SJ5HE4ZA.js.map +1 -0
- package/dist/{chunk-XMXRI5JK.js → chunk-ZZ4744OZ.js} +128 -71
- package/dist/chunk-ZZ4744OZ.js.map +1 -0
- package/dist/components/artifacts/artifact-surface.d.ts +3 -1
- package/dist/components/artifacts/document-editor.d.ts +4 -2
- package/dist/components/artifacts/editable-document.d.ts +1 -1
- package/dist/components/artifacts/editable-presentation.d.ts +1 -1
- package/dist/components/artifacts/editable-spreadsheet.d.ts +2 -1
- package/dist/components/artifacts/presentation-editor.d.ts +4 -2
- package/dist/components/browser-viewer.d.ts +4 -1
- package/dist/components/markdown.d.ts +2 -0
- package/dist/components/session-capability-frame.d.ts +5 -1
- package/dist/composer.js +1 -1
- package/dist/connect.js +2 -2
- package/dist/hooks/use-browser-session.d.ts +3 -0
- package/dist/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/dist/interaction.js +1 -1
- package/dist/session-ui.js +4 -4
- package/dist/session.js +1 -1
- package/dist/timeline/types.d.ts +2 -0
- package/package.json +3 -3
- package/src/components/artifacts/artifact-surface.tsx +39 -19
- package/src/components/artifacts/document-editor.tsx +77 -9
- package/src/components/artifacts/editable-document.tsx +3 -0
- package/src/components/artifacts/editable-presentation.tsx +3 -0
- package/src/components/artifacts/editable-spreadsheet.tsx +3 -0
- package/src/components/artifacts/presentation-editor.tsx +6 -0
- package/src/components/browser-viewer.tsx +11 -5
- package/src/components/composer-transcription-control.tsx +4 -2
- package/src/components/composer.tsx +20 -9
- package/src/components/markdown.tsx +9 -2
- package/src/components/sandbox-workspace.tsx +1 -0
- package/src/components/session-capability-frame.tsx +11 -3
- package/src/components/session-mcp-capability-card.tsx +174 -70
- package/src/hooks/use-browser-frame-stream.ts +3 -1
- package/src/hooks/use-browser-session.ts +107 -3
- package/src/hooks/use-voice-input.ts +12 -1
- package/src/timeline/compaction-copy.ts +2 -0
- package/src/timeline/parsers.ts +2 -2
- package/src/timeline/projection.ts +31 -5
- package/src/timeline/tool-renderers.tsx +105 -16
- package/src/timeline/turn-summary.tsx +10 -2
- package/src/timeline/types.ts +2 -0
- package/styles/compiled.css +6 -0
- package/styles/session-capability.css +2 -0
- package/dist/chunk-4ACTWOOW.js.map +0 -1
- package/dist/chunk-5UONOQ3Y.js.map +0 -1
- package/dist/chunk-KCGXPP5V.js.map +0 -1
- package/dist/chunk-SHRCATV6.js.map +0 -1
- package/dist/chunk-UQS7BGNQ.js.map +0 -1
- package/dist/chunk-VI7HELBI.js.map +0 -1
- package/dist/chunk-VR4Z73EU.js.map +0 -1
- package/dist/chunk-XMXRI5JK.js.map +0 -1
- package/dist/chunk-ZC2DK5SC.js.map +0 -1
- /package/dist/{browser-viewer-MN7MOYQT.js.map → browser-viewer-K2H3SLIW.js.map} +0 -0
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
DocumentProjectionArtifactSurface,
|
|
5
5
|
DocumentProjectionEditor,
|
|
6
6
|
EditableDocumentArtifactSurface
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-ZZ4744OZ.js";
|
|
8
|
+
import "./chunk-6P7T4RPE.js";
|
|
9
9
|
import "./chunk-22KP6LR5.js";
|
|
10
10
|
export {
|
|
11
11
|
DocumentArtifactSurface,
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
PresentationEditor,
|
|
5
5
|
PresentationProjectionArtifactSurface,
|
|
6
6
|
PresentationProjectionEditor
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-G2SCXNXW.js";
|
|
8
|
+
import "./chunk-6P7T4RPE.js";
|
|
9
9
|
import "./chunk-22KP6LR5.js";
|
|
10
10
|
export {
|
|
11
11
|
EditablePresentationArtifactSurface,
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
SpreadsheetArtifactSurface,
|
|
5
5
|
SpreadsheetGrid,
|
|
6
6
|
SpreadsheetProjectionGrid
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-L6MYP3QU.js";
|
|
8
|
+
import "./chunk-6P7T4RPE.js";
|
|
9
9
|
import "./chunk-22KP6LR5.js";
|
|
10
10
|
export {
|
|
11
11
|
EditableSpreadsheetArtifactSurface,
|
package/dist/artifacts.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
SpreadsheetArtifactSurface,
|
|
5
5
|
SpreadsheetGrid,
|
|
6
6
|
SpreadsheetProjectionGrid
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-L6MYP3QU.js";
|
|
8
8
|
import {
|
|
9
9
|
PUBLISHED_HTML_ARTIFACT_IFRAME_SANDBOX,
|
|
10
10
|
PublishedHtmlArtifactFrame,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
PresentationEditor,
|
|
18
18
|
PresentationProjectionArtifactSurface,
|
|
19
19
|
PresentationProjectionEditor
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-G2SCXNXW.js";
|
|
21
21
|
import {
|
|
22
22
|
isRetainedImageContentType,
|
|
23
23
|
useRetainedImageObjectUrl
|
|
@@ -28,11 +28,11 @@ import {
|
|
|
28
28
|
DocumentProjectionArtifactSurface,
|
|
29
29
|
DocumentProjectionEditor,
|
|
30
30
|
EditableDocumentArtifactSurface
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-ZZ4744OZ.js";
|
|
32
32
|
import {
|
|
33
33
|
ArtifactSurface,
|
|
34
34
|
EditableArtifactMessage
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-6P7T4RPE.js";
|
|
36
36
|
import "./chunk-22KP6LR5.js";
|
|
37
37
|
|
|
38
38
|
// src/components/artifacts/visualization-assets.gen.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BrowserViewer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ETA37UZ7.js";
|
|
4
4
|
import "./chunk-TV5PP2PE.js";
|
|
5
5
|
import "./chunk-5YK2ZDIG.js";
|
|
6
6
|
import "./chunk-KZ73RL76.js";
|
|
@@ -11,4 +11,4 @@ import "./chunk-JVYQRRC4.js";
|
|
|
11
11
|
export {
|
|
12
12
|
BrowserViewer
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=browser-viewer-
|
|
14
|
+
//# sourceMappingURL=browser-viewer-K2H3SLIW.js.map
|
|
@@ -856,9 +856,9 @@ function useChatComposerController({
|
|
|
856
856
|
(event) => {
|
|
857
857
|
if (!attachments || !dragCarriesFiles(event)) return;
|
|
858
858
|
event.preventDefault();
|
|
859
|
-
setDragging(true);
|
|
859
|
+
if (!disabled) setDragging(true);
|
|
860
860
|
},
|
|
861
|
-
[attachments]
|
|
861
|
+
[attachments, disabled]
|
|
862
862
|
);
|
|
863
863
|
const handleDragLeave = useCallback2(
|
|
864
864
|
(event) => {
|
|
@@ -873,10 +873,14 @@ function useChatComposerController({
|
|
|
873
873
|
if (!attachments || !dragCarriesFiles(event)) return;
|
|
874
874
|
event.preventDefault();
|
|
875
875
|
setDragging(false);
|
|
876
|
-
if (event.dataTransfer.files.length > 0)
|
|
876
|
+
if (!disabled && event.dataTransfer.files.length > 0)
|
|
877
|
+
attachments.addFiles(event.dataTransfer.files);
|
|
877
878
|
},
|
|
878
|
-
[attachments]
|
|
879
|
+
[attachments, disabled]
|
|
879
880
|
);
|
|
881
|
+
useEffect(() => {
|
|
882
|
+
if (disabled) setDragging(false);
|
|
883
|
+
}, [disabled]);
|
|
880
884
|
const [notice, setNotice] = useState2(null);
|
|
881
885
|
const [helpOpen, setHelpOpen] = useState2(false);
|
|
882
886
|
const [confirmState, setConfirmState] = useState2(null);
|
|
@@ -998,17 +1002,18 @@ function useChatComposerController({
|
|
|
998
1002
|
);
|
|
999
1003
|
const handlePaste = useCallback2(
|
|
1000
1004
|
(event) => {
|
|
1005
|
+
if (disabled) return;
|
|
1001
1006
|
onPaste?.(event);
|
|
1002
1007
|
attachments?.addFromPaste(event);
|
|
1003
1008
|
},
|
|
1004
|
-
[attachments, onPaste]
|
|
1009
|
+
[attachments, disabled, onPaste]
|
|
1005
1010
|
);
|
|
1006
1011
|
const handleFileChange = useCallback2(
|
|
1007
1012
|
(event) => {
|
|
1008
|
-
if (event.target.files) attachments?.addFiles(event.target.files);
|
|
1013
|
+
if (!disabled && event.target.files) attachments?.addFiles(event.target.files);
|
|
1009
1014
|
event.target.value = "";
|
|
1010
1015
|
},
|
|
1011
|
-
[attachments]
|
|
1016
|
+
[attachments, disabled]
|
|
1012
1017
|
);
|
|
1013
1018
|
const helpCommands = useMemo3(
|
|
1014
1019
|
() => commands.filter((command) => {
|
|
@@ -1267,6 +1272,7 @@ function Attachments() {
|
|
|
1267
1272
|
{
|
|
1268
1273
|
attachments: controller.attachments.attachments,
|
|
1269
1274
|
messages: controller.messages,
|
|
1275
|
+
disabled: controller.disabled,
|
|
1270
1276
|
onRemove: controller.attachments.remove,
|
|
1271
1277
|
onRetry: controller.attachments.retry,
|
|
1272
1278
|
onRetainPreview: controller.attachments.retainPreview,
|
|
@@ -1790,6 +1796,7 @@ function ConfirmBar({
|
|
|
1790
1796
|
function AttachmentChips({
|
|
1791
1797
|
attachments,
|
|
1792
1798
|
messages,
|
|
1799
|
+
disabled,
|
|
1793
1800
|
onRemove,
|
|
1794
1801
|
onRetry,
|
|
1795
1802
|
onRetainPreview,
|
|
@@ -1898,7 +1905,8 @@ function AttachmentChips({
|
|
|
1898
1905
|
{
|
|
1899
1906
|
type: "button",
|
|
1900
1907
|
onClick: () => onRetry(attachment.id),
|
|
1901
|
-
|
|
1908
|
+
disabled,
|
|
1909
|
+
className: "shrink-0 rounded-og-xs p-1 text-og-fg-muted hover:bg-og-surface-1 hover:text-og-fg disabled:cursor-not-allowed disabled:opacity-50 pointer-coarse:size-10",
|
|
1902
1910
|
"aria-label": messages.retryAttachment(attachment.name),
|
|
1903
1911
|
children: /* @__PURE__ */ jsx3(RotateCwIcon, { className: "size-3.5" })
|
|
1904
1912
|
}
|
|
@@ -1908,7 +1916,8 @@ function AttachmentChips({
|
|
|
1908
1916
|
{
|
|
1909
1917
|
type: "button",
|
|
1910
1918
|
onClick: () => onRemove(attachment.id),
|
|
1911
|
-
|
|
1919
|
+
disabled,
|
|
1920
|
+
className: "shrink-0 rounded-og-xs p-1 text-og-fg-muted hover:bg-og-surface-1 hover:text-og-fg disabled:cursor-not-allowed disabled:opacity-50 pointer-coarse:size-10",
|
|
1912
1921
|
"aria-label": messages.removeAttachment(attachment.name),
|
|
1913
1922
|
children: /* @__PURE__ */ jsx3(XIcon, { className: "size-3.5" })
|
|
1914
1923
|
}
|
|
@@ -3123,6 +3132,7 @@ function useVoiceInput({
|
|
|
3123
3132
|
const automaticRetryAttemptRef = useRef4(0);
|
|
3124
3133
|
const ownerHeartbeatTimerRef = useRef4(null);
|
|
3125
3134
|
const controllerRef = useRef4(null);
|
|
3135
|
+
const disabledRef = useRef4(disabled);
|
|
3126
3136
|
const valueRef = useRef4(value);
|
|
3127
3137
|
const storeRef = useRef4(null);
|
|
3128
3138
|
const storePromiseRef = useRef4(null);
|
|
@@ -3136,6 +3146,7 @@ function useVoiceInput({
|
|
|
3136
3146
|
const statusRef = useRef4(status);
|
|
3137
3147
|
valueRef.current = value;
|
|
3138
3148
|
statusRef.current = status;
|
|
3149
|
+
disabledRef.current = disabled;
|
|
3139
3150
|
workspaceIdRef.current = workspaceId;
|
|
3140
3151
|
const ensureOwnerId = useCallback4(async () => {
|
|
3141
3152
|
if (ownerIdRef.current) return ownerIdRef.current;
|
|
@@ -3384,6 +3395,10 @@ function useVoiceInput({
|
|
|
3384
3395
|
focusInput();
|
|
3385
3396
|
return;
|
|
3386
3397
|
}
|
|
3398
|
+
if (disabledRef.current) {
|
|
3399
|
+
setStatus("transcript-ready");
|
|
3400
|
+
return;
|
|
3401
|
+
}
|
|
3387
3402
|
const next = appendFinalTranscript(valueRef.current, response.text);
|
|
3388
3403
|
if (next !== valueRef.current) {
|
|
3389
3404
|
valueRef.current = next;
|
|
@@ -3759,14 +3774,14 @@ function useVoiceInput({
|
|
|
3759
3774
|
]);
|
|
3760
3775
|
const insertSavedTranscript = useCallback4(async () => {
|
|
3761
3776
|
const manifest = manifestRef.current;
|
|
3762
|
-
if (!manifest || manifest.workspaceId !== workspaceId || manifest.finalizationState !== "transcript-ready" || manifest.transcriptText === null) {
|
|
3777
|
+
if (disabledRef.current || !manifest || manifest.workspaceId !== workspaceId || manifest.finalizationState !== "transcript-ready" || manifest.transcriptText === null) {
|
|
3763
3778
|
return;
|
|
3764
3779
|
}
|
|
3765
3780
|
const generation = ++generationRef.current;
|
|
3766
3781
|
controllerRef.current?.abort();
|
|
3767
3782
|
controllerRef.current = null;
|
|
3768
3783
|
const store = await ensureStore();
|
|
3769
|
-
if (generation !== generationRef.current) return;
|
|
3784
|
+
if (generation !== generationRef.current || disabledRef.current) return;
|
|
3770
3785
|
const next = appendFinalTranscript(valueRef.current, manifest.transcriptText);
|
|
3771
3786
|
if (next !== valueRef.current) {
|
|
3772
3787
|
valueRef.current = next;
|
|
@@ -4360,12 +4375,13 @@ function ComposerTranscriptionControl({
|
|
|
4360
4375
|
"button",
|
|
4361
4376
|
{
|
|
4362
4377
|
type: "button",
|
|
4378
|
+
disabled: composer.disabled && !retrying,
|
|
4363
4379
|
onClick: () => savedTranscript ? void transcription.insertSavedTranscript() : retrying ? transcription.cancel() : transcription.retry(),
|
|
4364
4380
|
"aria-label": savedTranscript ? messages.insertRecoveredTranscript : retrying ? messages.pauseRetrying : messages.retry,
|
|
4365
4381
|
className: cn(
|
|
4366
4382
|
"inline-flex size-7 shrink-0 items-center justify-center rounded-og-sm",
|
|
4367
4383
|
"bg-og-fg text-og-bg transition-colors duration-150 motion-reduce:transition-none",
|
|
4368
|
-
"hover:bg-og-fg-muted pointer-coarse:size-11"
|
|
4384
|
+
"hover:bg-og-fg-muted disabled:cursor-not-allowed disabled:opacity-50 pointer-coarse:size-11"
|
|
4369
4385
|
),
|
|
4370
4386
|
children: savedTranscript ? /* @__PURE__ */ jsx4(ClipboardPasteIcon, { className: "size-3.5" }) : retrying ? /* @__PURE__ */ jsx4(SquareIcon, { className: "size-3.5" }) : /* @__PURE__ */ jsx4(RefreshCwIcon, { className: "size-3.5" })
|
|
4371
4387
|
}
|
|
@@ -4376,12 +4392,13 @@ function ComposerTranscriptionControl({
|
|
|
4376
4392
|
"button",
|
|
4377
4393
|
{
|
|
4378
4394
|
type: "button",
|
|
4395
|
+
disabled: composer.disabled,
|
|
4379
4396
|
onClick: () => void transcription.discard(),
|
|
4380
4397
|
"aria-label": messages.discardRecovered,
|
|
4381
4398
|
className: cn(
|
|
4382
4399
|
"inline-flex size-7 shrink-0 items-center justify-center rounded-og-sm",
|
|
4383
4400
|
"text-og-fg-muted transition-colors duration-150 motion-reduce:transition-none",
|
|
4384
|
-
"hover:bg-og-surface-3 hover:text-og-status-failed pointer-coarse:size-11"
|
|
4401
|
+
"hover:bg-og-surface-3 hover:text-og-status-failed disabled:cursor-not-allowed disabled:opacity-50 pointer-coarse:size-11"
|
|
4385
4402
|
),
|
|
4386
4403
|
children: /* @__PURE__ */ jsx4(Trash2Icon, { className: "size-3.5" })
|
|
4387
4404
|
}
|
|
@@ -4666,4 +4683,4 @@ export {
|
|
|
4666
4683
|
useVoiceInput,
|
|
4667
4684
|
ComposerTranscriptionControl
|
|
4668
4685
|
};
|
|
4669
|
-
//# sourceMappingURL=chunk-
|
|
4686
|
+
//# sourceMappingURL=chunk-6N3AZUOV.js.map
|