@opengeni/react 7.1.2-canary.36079201993001 → 7.1.2

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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  BrowserViewer
3
- } from "./chunk-ETA37UZ7.js";
3
+ } from "./chunk-CP6IFD2Z.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-K2H3SLIW.js.map
14
+ //# sourceMappingURL=browser-viewer-TZ6T76E3.js.map
@@ -856,9 +856,9 @@ function useChatComposerController({
856
856
  (event) => {
857
857
  if (!attachments || !dragCarriesFiles(event)) return;
858
858
  event.preventDefault();
859
- if (!disabled) setDragging(true);
859
+ setDragging(true);
860
860
  },
861
- [attachments, disabled]
861
+ [attachments]
862
862
  );
863
863
  const handleDragLeave = useCallback2(
864
864
  (event) => {
@@ -873,14 +873,10 @@ function useChatComposerController({
873
873
  if (!attachments || !dragCarriesFiles(event)) return;
874
874
  event.preventDefault();
875
875
  setDragging(false);
876
- if (!disabled && event.dataTransfer.files.length > 0)
877
- attachments.addFiles(event.dataTransfer.files);
876
+ if (event.dataTransfer.files.length > 0) attachments.addFiles(event.dataTransfer.files);
878
877
  },
879
- [attachments, disabled]
878
+ [attachments]
880
879
  );
881
- useEffect(() => {
882
- if (disabled) setDragging(false);
883
- }, [disabled]);
884
880
  const [notice, setNotice] = useState2(null);
885
881
  const [helpOpen, setHelpOpen] = useState2(false);
886
882
  const [confirmState, setConfirmState] = useState2(null);
@@ -1002,18 +998,17 @@ function useChatComposerController({
1002
998
  );
1003
999
  const handlePaste = useCallback2(
1004
1000
  (event) => {
1005
- if (disabled) return;
1006
1001
  onPaste?.(event);
1007
1002
  attachments?.addFromPaste(event);
1008
1003
  },
1009
- [attachments, disabled, onPaste]
1004
+ [attachments, onPaste]
1010
1005
  );
1011
1006
  const handleFileChange = useCallback2(
1012
1007
  (event) => {
1013
- if (!disabled && event.target.files) attachments?.addFiles(event.target.files);
1008
+ if (event.target.files) attachments?.addFiles(event.target.files);
1014
1009
  event.target.value = "";
1015
1010
  },
1016
- [attachments, disabled]
1011
+ [attachments]
1017
1012
  );
1018
1013
  const helpCommands = useMemo3(
1019
1014
  () => commands.filter((command) => {
@@ -1272,7 +1267,6 @@ function Attachments() {
1272
1267
  {
1273
1268
  attachments: controller.attachments.attachments,
1274
1269
  messages: controller.messages,
1275
- disabled: controller.disabled,
1276
1270
  onRemove: controller.attachments.remove,
1277
1271
  onRetry: controller.attachments.retry,
1278
1272
  onRetainPreview: controller.attachments.retainPreview,
@@ -1796,7 +1790,6 @@ function ConfirmBar({
1796
1790
  function AttachmentChips({
1797
1791
  attachments,
1798
1792
  messages,
1799
- disabled,
1800
1793
  onRemove,
1801
1794
  onRetry,
1802
1795
  onRetainPreview,
@@ -1905,8 +1898,7 @@ function AttachmentChips({
1905
1898
  {
1906
1899
  type: "button",
1907
1900
  onClick: () => onRetry(attachment.id),
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",
1901
+ className: "shrink-0 rounded-og-xs p-1 text-og-fg-muted hover:bg-og-surface-1 hover:text-og-fg pointer-coarse:size-10",
1910
1902
  "aria-label": messages.retryAttachment(attachment.name),
1911
1903
  children: /* @__PURE__ */ jsx3(RotateCwIcon, { className: "size-3.5" })
1912
1904
  }
@@ -1916,8 +1908,7 @@ function AttachmentChips({
1916
1908
  {
1917
1909
  type: "button",
1918
1910
  onClick: () => onRemove(attachment.id),
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",
1911
+ className: "shrink-0 rounded-og-xs p-1 text-og-fg-muted hover:bg-og-surface-1 hover:text-og-fg pointer-coarse:size-10",
1921
1912
  "aria-label": messages.removeAttachment(attachment.name),
1922
1913
  children: /* @__PURE__ */ jsx3(XIcon, { className: "size-3.5" })
1923
1914
  }
@@ -3132,7 +3123,6 @@ function useVoiceInput({
3132
3123
  const automaticRetryAttemptRef = useRef4(0);
3133
3124
  const ownerHeartbeatTimerRef = useRef4(null);
3134
3125
  const controllerRef = useRef4(null);
3135
- const disabledRef = useRef4(disabled);
3136
3126
  const valueRef = useRef4(value);
3137
3127
  const storeRef = useRef4(null);
3138
3128
  const storePromiseRef = useRef4(null);
@@ -3146,7 +3136,6 @@ function useVoiceInput({
3146
3136
  const statusRef = useRef4(status);
3147
3137
  valueRef.current = value;
3148
3138
  statusRef.current = status;
3149
- disabledRef.current = disabled;
3150
3139
  workspaceIdRef.current = workspaceId;
3151
3140
  const ensureOwnerId = useCallback4(async () => {
3152
3141
  if (ownerIdRef.current) return ownerIdRef.current;
@@ -3395,10 +3384,6 @@ function useVoiceInput({
3395
3384
  focusInput();
3396
3385
  return;
3397
3386
  }
3398
- if (disabledRef.current) {
3399
- setStatus("transcript-ready");
3400
- return;
3401
- }
3402
3387
  const next = appendFinalTranscript(valueRef.current, response.text);
3403
3388
  if (next !== valueRef.current) {
3404
3389
  valueRef.current = next;
@@ -3774,14 +3759,14 @@ function useVoiceInput({
3774
3759
  ]);
3775
3760
  const insertSavedTranscript = useCallback4(async () => {
3776
3761
  const manifest = manifestRef.current;
3777
- if (disabledRef.current || !manifest || manifest.workspaceId !== workspaceId || manifest.finalizationState !== "transcript-ready" || manifest.transcriptText === null) {
3762
+ if (!manifest || manifest.workspaceId !== workspaceId || manifest.finalizationState !== "transcript-ready" || manifest.transcriptText === null) {
3778
3763
  return;
3779
3764
  }
3780
3765
  const generation = ++generationRef.current;
3781
3766
  controllerRef.current?.abort();
3782
3767
  controllerRef.current = null;
3783
3768
  const store = await ensureStore();
3784
- if (generation !== generationRef.current || disabledRef.current) return;
3769
+ if (generation !== generationRef.current) return;
3785
3770
  const next = appendFinalTranscript(valueRef.current, manifest.transcriptText);
3786
3771
  if (next !== valueRef.current) {
3787
3772
  valueRef.current = next;
@@ -4375,13 +4360,12 @@ function ComposerTranscriptionControl({
4375
4360
  "button",
4376
4361
  {
4377
4362
  type: "button",
4378
- disabled: composer.disabled && !retrying,
4379
4363
  onClick: () => savedTranscript ? void transcription.insertSavedTranscript() : retrying ? transcription.cancel() : transcription.retry(),
4380
4364
  "aria-label": savedTranscript ? messages.insertRecoveredTranscript : retrying ? messages.pauseRetrying : messages.retry,
4381
4365
  className: cn(
4382
4366
  "inline-flex size-7 shrink-0 items-center justify-center rounded-og-sm",
4383
4367
  "bg-og-fg text-og-bg transition-colors duration-150 motion-reduce:transition-none",
4384
- "hover:bg-og-fg-muted disabled:cursor-not-allowed disabled:opacity-50 pointer-coarse:size-11"
4368
+ "hover:bg-og-fg-muted pointer-coarse:size-11"
4385
4369
  ),
4386
4370
  children: savedTranscript ? /* @__PURE__ */ jsx4(ClipboardPasteIcon, { className: "size-3.5" }) : retrying ? /* @__PURE__ */ jsx4(SquareIcon, { className: "size-3.5" }) : /* @__PURE__ */ jsx4(RefreshCwIcon, { className: "size-3.5" })
4387
4371
  }
@@ -4392,13 +4376,12 @@ function ComposerTranscriptionControl({
4392
4376
  "button",
4393
4377
  {
4394
4378
  type: "button",
4395
- disabled: composer.disabled,
4396
4379
  onClick: () => void transcription.discard(),
4397
4380
  "aria-label": messages.discardRecovered,
4398
4381
  className: cn(
4399
4382
  "inline-flex size-7 shrink-0 items-center justify-center rounded-og-sm",
4400
4383
  "text-og-fg-muted transition-colors duration-150 motion-reduce:transition-none",
4401
- "hover:bg-og-surface-3 hover:text-og-status-failed disabled:cursor-not-allowed disabled:opacity-50 pointer-coarse:size-11"
4384
+ "hover:bg-og-surface-3 hover:text-og-status-failed pointer-coarse:size-11"
4402
4385
  ),
4403
4386
  children: /* @__PURE__ */ jsx4(Trash2Icon, { className: "size-3.5" })
4404
4387
  }
@@ -4683,4 +4666,4 @@ export {
4683
4666
  useVoiceInput,
4684
4667
  ComposerTranscriptionControl
4685
4668
  };
4686
- //# sourceMappingURL=chunk-6N3AZUOV.js.map
4669
+ //# sourceMappingURL=chunk-4ACTWOOW.js.map