@superinterface/react 3.9.2 → 3.9.3
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/index.cjs +93 -195
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +93 -195
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6322,11 +6322,9 @@ var Root4 = function(_ref) {
|
|
|
6322
6322
|
});
|
|
6323
6323
|
};
|
|
6324
6324
|
// src/components/threads/Thread/MessageForm/Field/index.tsx
|
|
6325
|
-
import { c as _c42 } from "react-compiler-runtime";
|
|
6326
6325
|
import { useFormContext as useFormContext2 } from "react-hook-form";
|
|
6327
6326
|
import { Container as RadixContainer, Flex as Flex23 } from "@radix-ui/themes";
|
|
6328
6327
|
// src/components/threads/Thread/MessageForm/Field/Control.tsx
|
|
6329
|
-
import { c as _c39 } from "react-compiler-runtime";
|
|
6330
6328
|
import { Flex as Flex20 } from "@radix-ui/themes";
|
|
6331
6329
|
import { useFormContext } from "react-hook-form";
|
|
6332
6330
|
// src/hooks/misc/usePrevious.ts
|
|
@@ -6544,110 +6542,48 @@ var Root5 = function(_ref) {
|
|
|
6544
6542
|
});
|
|
6545
6543
|
};
|
|
6546
6544
|
var Input = function(props) {
|
|
6545
|
+
"use no memo";
|
|
6547
6546
|
var _props$placeholder;
|
|
6548
|
-
var $ = _c39(20);
|
|
6549
6547
|
var assistantNameContext = useContext12(AssistantNameContext);
|
|
6550
6548
|
var register = useFormContext().register;
|
|
6551
6549
|
var _useMessageFormContext = useMessageFormContext(), isDisabled = _useMessageFormContext.isDisabled, isLoading = _useMessageFormContext.isLoading;
|
|
6552
|
-
var
|
|
6553
|
-
|
|
6554
|
-
|
|
6550
|
+
var isSubmitDisabled = useMemo14(function() {
|
|
6551
|
+
return isDisabled || isLoading;
|
|
6552
|
+
}, [
|
|
6553
|
+
isDisabled,
|
|
6554
|
+
isLoading
|
|
6555
|
+
]);
|
|
6555
6556
|
var isDisabledPrevious = usePrevious(isDisabled);
|
|
6556
6557
|
var textareaRef = useRef5(null);
|
|
6557
|
-
var
|
|
6558
|
-
|
|
6559
|
-
|
|
6560
|
-
|
|
6561
|
-
|
|
6562
|
-
|
|
6563
|
-
|
|
6564
|
-
|
|
6565
|
-
|
|
6566
|
-
|
|
6567
|
-
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
|
|
6571
|
-
|
|
6572
|
-
|
|
6573
|
-
return;
|
|
6574
|
-
}
|
|
6575
|
-
if (!textareaRef.current) {
|
|
6576
|
-
return;
|
|
6577
|
-
}
|
|
6578
|
-
textareaRef.current.focus();
|
|
6579
|
-
};
|
|
6580
|
-
$[2] = isDisabled;
|
|
6581
|
-
$[3] = isDisabledPrevious;
|
|
6582
|
-
$[4] = t2;
|
|
6583
|
-
} else {
|
|
6584
|
-
t2 = $[4];
|
|
6585
|
-
}
|
|
6586
|
-
var t3;
|
|
6587
|
-
if ($[5] !== isDisabled || $[6] !== isDisabledPrevious || $[7] !== textareaProps) {
|
|
6588
|
-
t3 = [
|
|
6589
|
-
isDisabled,
|
|
6590
|
-
isDisabledPrevious,
|
|
6591
|
-
textareaProps
|
|
6592
|
-
];
|
|
6593
|
-
$[5] = isDisabled;
|
|
6594
|
-
$[6] = isDisabledPrevious;
|
|
6595
|
-
$[7] = textareaProps;
|
|
6596
|
-
$[8] = t3;
|
|
6597
|
-
} else {
|
|
6598
|
-
t3 = $[8];
|
|
6599
|
-
}
|
|
6600
|
-
useEffect6(t2, t3);
|
|
6601
|
-
var t4 = (_props$placeholder = props.placeholder) !== null && _props$placeholder !== void 0 ? _props$placeholder : "Message ".concat(assistantNameContext, "...");
|
|
6602
|
-
var t5;
|
|
6603
|
-
if ($[9] !== isSubmitDisabled) {
|
|
6604
|
-
t5 = function(e) {
|
|
6558
|
+
var textareaProps = register("content");
|
|
6559
|
+
useEffect6(function() {
|
|
6560
|
+
if (isDisabled) return;
|
|
6561
|
+
if (!isDisabledPrevious) return;
|
|
6562
|
+
if (!textareaRef.current) return;
|
|
6563
|
+
textareaRef.current.focus();
|
|
6564
|
+
}, [
|
|
6565
|
+
isDisabled,
|
|
6566
|
+
isDisabledPrevious,
|
|
6567
|
+
textareaProps
|
|
6568
|
+
]);
|
|
6569
|
+
return /* @__PURE__ */ _jsx66(TextareaBase, _objectSpread30(_objectSpread30(_objectSpread30({
|
|
6570
|
+
minRows: 1,
|
|
6571
|
+
placeholder: (_props$placeholder = props.placeholder) !== null && _props$placeholder !== void 0 ? _props$placeholder : "Message ".concat(assistantNameContext, "..."),
|
|
6572
|
+
disabled: isDisabled,
|
|
6573
|
+
onKeyDown: function(e) {
|
|
6605
6574
|
if (e.key === "Enter" && !e.shiftKey) {
|
|
6606
6575
|
var _e$currentTarget$form;
|
|
6607
6576
|
e.preventDefault();
|
|
6608
|
-
if (isSubmitDisabled)
|
|
6609
|
-
return;
|
|
6610
|
-
}
|
|
6577
|
+
if (isSubmitDisabled) return;
|
|
6611
6578
|
(_e$currentTarget$form = e.currentTarget.form) === null || _e$currentTarget$form === void 0 || _e$currentTarget$form.requestSubmit();
|
|
6612
6579
|
}
|
|
6613
|
-
}
|
|
6614
|
-
|
|
6615
|
-
|
|
6616
|
-
} else {
|
|
6617
|
-
t5 = $[10];
|
|
6618
|
-
}
|
|
6619
|
-
var t6;
|
|
6620
|
-
if ($[11] !== textareaProps) {
|
|
6621
|
-
t6 = function(e_0) {
|
|
6580
|
+
}
|
|
6581
|
+
}, textareaProps), props), {}, {
|
|
6582
|
+
ref: function(e_0) {
|
|
6622
6583
|
textareaProps.ref(e_0);
|
|
6623
6584
|
textareaRef.current = e_0;
|
|
6624
|
-
}
|
|
6625
|
-
|
|
6626
|
-
$[12] = t6;
|
|
6627
|
-
} else {
|
|
6628
|
-
t6 = $[12];
|
|
6629
|
-
}
|
|
6630
|
-
var t7;
|
|
6631
|
-
if ($[13] !== isDisabled || $[14] !== props || $[15] !== t4 || $[16] !== t5 || $[17] !== t6 || $[18] !== textareaProps) {
|
|
6632
|
-
t7 = /* @__PURE__ */ _jsx66(TextareaBase, _objectSpread30(_objectSpread30(_objectSpread30({
|
|
6633
|
-
minRows: 1,
|
|
6634
|
-
placeholder: t4,
|
|
6635
|
-
disabled: isDisabled,
|
|
6636
|
-
onKeyDown: t5
|
|
6637
|
-
}, textareaProps), props), {}, {
|
|
6638
|
-
ref: t6
|
|
6639
|
-
}));
|
|
6640
|
-
$[13] = isDisabled;
|
|
6641
|
-
$[14] = props;
|
|
6642
|
-
$[15] = t4;
|
|
6643
|
-
$[16] = t5;
|
|
6644
|
-
$[17] = t6;
|
|
6645
|
-
$[18] = textareaProps;
|
|
6646
|
-
$[19] = t7;
|
|
6647
|
-
} else {
|
|
6648
|
-
t7 = $[19];
|
|
6649
|
-
}
|
|
6650
|
-
return t7;
|
|
6585
|
+
}
|
|
6586
|
+
}));
|
|
6651
6587
|
};
|
|
6652
6588
|
var Control = function(props) {
|
|
6653
6589
|
return /* @__PURE__ */ _jsx66(Root5, _objectSpread30(_objectSpread30({}, props), {}, {
|
|
@@ -6657,7 +6593,7 @@ var Control = function(props) {
|
|
|
6657
6593
|
Control.Root = Root5;
|
|
6658
6594
|
Control.Input = Input;
|
|
6659
6595
|
// src/components/threads/Thread/MessageForm/Field/Files/Preview.tsx
|
|
6660
|
-
import { c as
|
|
6596
|
+
import { c as _c39 } from "react-compiler-runtime";
|
|
6661
6597
|
import { Flex as Flex21, Card as Card2, Spinner as Spinner2, Text as Text7, IconButton as IconButton6 } from "@radix-ui/themes";
|
|
6662
6598
|
import { FileIcon as FileIcon2, Cross2Icon } from "@radix-ui/react-icons";
|
|
6663
6599
|
import { jsx as _jsx67, jsxs as _jsxs23 } from "react/jsx-runtime";
|
|
@@ -6705,7 +6641,7 @@ function _toPrimitive31(t, r) {
|
|
|
6705
6641
|
return ("string" === r ? String : Number)(t);
|
|
6706
6642
|
}
|
|
6707
6643
|
var Preview = function(props) {
|
|
6708
|
-
var $ =
|
|
6644
|
+
var $ = _c39(8);
|
|
6709
6645
|
var _useMessageFormContext = useMessageFormContext(), files = _useMessageFormContext.files, setFiles = _useMessageFormContext.setFiles;
|
|
6710
6646
|
if (!files.length) {
|
|
6711
6647
|
return null;
|
|
@@ -6803,7 +6739,7 @@ import dayjs2 from "dayjs";
|
|
|
6803
6739
|
import { FilePlusIcon } from "@radix-ui/react-icons";
|
|
6804
6740
|
import { IconButton as IconButton7, Flex as Flex22 } from "@radix-ui/themes";
|
|
6805
6741
|
// src/hooks/files/useCreateFile/index.ts
|
|
6806
|
-
import { c as
|
|
6742
|
+
import { c as _c40 } from "react-compiler-runtime";
|
|
6807
6743
|
import { useMutation as useMutation2, useQueryClient as useQueryClient5 } from "@tanstack/react-query";
|
|
6808
6744
|
// src/hooks/files/useCreateFile/lib/mutationOptions/mutationFn/body/formData.ts
|
|
6809
6745
|
var formData = function(variables) {
|
|
@@ -7039,7 +6975,7 @@ function _toPrimitive34(t, r) {
|
|
|
7039
6975
|
return ("string" === r ? String : Number)(t);
|
|
7040
6976
|
}
|
|
7041
6977
|
var useCreateFile = function(t0) {
|
|
7042
|
-
var $ =
|
|
6978
|
+
var $ = _c40(15);
|
|
7043
6979
|
var t1;
|
|
7044
6980
|
if ($[0] !== t0) {
|
|
7045
6981
|
t1 = t0 === void 0 ? {
|
|
@@ -7481,76 +7417,38 @@ function _toPrimitive36(t, r) {
|
|
|
7481
7417
|
}
|
|
7482
7418
|
return ("string" === r ? String : Number)(t);
|
|
7483
7419
|
}
|
|
7484
|
-
var Root6 = function(
|
|
7485
|
-
|
|
7486
|
-
var children =
|
|
7487
|
-
var _useFormContext2 = useFormContext2(),
|
|
7488
|
-
|
|
7489
|
-
|
|
7490
|
-
|
|
7491
|
-
|
|
7492
|
-
|
|
7493
|
-
|
|
7494
|
-
} : {};
|
|
7495
|
-
$[0] = errors.content;
|
|
7496
|
-
$[1] = t3;
|
|
7497
|
-
} else {
|
|
7498
|
-
t3 = $[1];
|
|
7499
|
-
}
|
|
7500
|
-
var t4;
|
|
7501
|
-
if ($[2] !== t2 || $[3] !== t3) {
|
|
7502
|
-
t4 = _objectSpread36({
|
|
7503
|
-
borderRadius: "var(--radius-2)",
|
|
7504
|
-
borderWidth: "1px",
|
|
7505
|
-
borderStyle: "solid",
|
|
7506
|
-
borderColor: t2
|
|
7507
|
-
}, t3);
|
|
7508
|
-
$[2] = t2;
|
|
7509
|
-
$[3] = t3;
|
|
7510
|
-
$[4] = t4;
|
|
7511
|
-
} else {
|
|
7512
|
-
t4 = $[4];
|
|
7513
|
-
}
|
|
7514
|
-
var t5;
|
|
7515
|
-
if ($[5] !== children || $[6] !== t4) {
|
|
7516
|
-
t5 = /* @__PURE__ */ _jsx69(Flex23, {
|
|
7420
|
+
var Root6 = function(_ref) {
|
|
7421
|
+
"use no memo";
|
|
7422
|
+
var children = _ref.children, className = _ref.className, style = _ref.style;
|
|
7423
|
+
var _useFormContext2 = useFormContext2(), errors = _useFormContext2.formState.errors;
|
|
7424
|
+
return /* @__PURE__ */ _jsx69(RadixContainer, {
|
|
7425
|
+
size: "2",
|
|
7426
|
+
flexGrow: "0",
|
|
7427
|
+
className: className,
|
|
7428
|
+
style: style,
|
|
7429
|
+
children: /* @__PURE__ */ _jsx69(Flex23, {
|
|
7517
7430
|
direction: "column",
|
|
7518
7431
|
flexShrink: "0",
|
|
7519
7432
|
children: /* @__PURE__ */ _jsx69(Flex23, {
|
|
7520
7433
|
direction: "column",
|
|
7521
7434
|
flexShrink: "0",
|
|
7522
7435
|
children: /* @__PURE__ */ _jsx69(Flex23, {
|
|
7523
|
-
style:
|
|
7436
|
+
style: _objectSpread36({
|
|
7437
|
+
borderRadius: "var(--radius-2)",
|
|
7438
|
+
borderWidth: "1px",
|
|
7439
|
+
borderStyle: "solid",
|
|
7440
|
+
borderColor: errors.content ? "var(--red-9)" : "var(--gray-5)"
|
|
7441
|
+
}, errors.content ? {
|
|
7442
|
+
backgroundColor: "var(--red-2)"
|
|
7443
|
+
} : {}),
|
|
7524
7444
|
p: "2",
|
|
7525
7445
|
pl: "3",
|
|
7526
7446
|
wrap: "wrap",
|
|
7527
7447
|
children: children
|
|
7528
7448
|
})
|
|
7529
7449
|
})
|
|
7530
|
-
})
|
|
7531
|
-
|
|
7532
|
-
$[6] = t4;
|
|
7533
|
-
$[7] = t5;
|
|
7534
|
-
} else {
|
|
7535
|
-
t5 = $[7];
|
|
7536
|
-
}
|
|
7537
|
-
var t6;
|
|
7538
|
-
if ($[8] !== className || $[9] !== style || $[10] !== t5) {
|
|
7539
|
-
t6 = /* @__PURE__ */ _jsx69(RadixContainer, {
|
|
7540
|
-
size: "2",
|
|
7541
|
-
flexGrow: "0",
|
|
7542
|
-
className: className,
|
|
7543
|
-
style: style,
|
|
7544
|
-
children: t5
|
|
7545
|
-
});
|
|
7546
|
-
$[8] = className;
|
|
7547
|
-
$[9] = style;
|
|
7548
|
-
$[10] = t5;
|
|
7549
|
-
$[11] = t6;
|
|
7550
|
-
} else {
|
|
7551
|
-
t6 = $[11];
|
|
7552
|
-
}
|
|
7553
|
-
return t6;
|
|
7450
|
+
})
|
|
7451
|
+
});
|
|
7554
7452
|
};
|
|
7555
7453
|
var Field = {
|
|
7556
7454
|
Root: Root6,
|
|
@@ -7620,7 +7518,7 @@ import { Flex as Flex25 } from "@radix-ui/themes";
|
|
|
7620
7518
|
// src/components/threads/Thread/Provider/index.tsx
|
|
7621
7519
|
var Provider2 = SuperinterfaceProvider;
|
|
7622
7520
|
// src/components/toasts/ToastsProvider/index.tsx
|
|
7623
|
-
import { c as
|
|
7521
|
+
import { c as _c41 } from "react-compiler-runtime";
|
|
7624
7522
|
import { useState as useState5, useCallback as useCallback4 } from "react";
|
|
7625
7523
|
import * as Toast2 from "@radix-ui/react-toast";
|
|
7626
7524
|
// src/components/toasts/ToastsProvider/CustomToast.tsx
|
|
@@ -7659,7 +7557,7 @@ var CustomToast = function(_ref) {
|
|
|
7659
7557
|
// src/components/toasts/ToastsProvider/index.tsx
|
|
7660
7558
|
import { jsx as _jsx72, jsxs as _jsxs27 } from "react/jsx-runtime";
|
|
7661
7559
|
var ToastsProvider = function(t0) {
|
|
7662
|
-
var $ =
|
|
7560
|
+
var $ = _c41(15);
|
|
7663
7561
|
var children = t0.children, t1 = t0.bottom;
|
|
7664
7562
|
var bottom = t1 === void 0 ? 0 : t1;
|
|
7665
7563
|
var t2;
|
|
@@ -7907,7 +7805,7 @@ var useMessageContext = function() {
|
|
|
7907
7805
|
return useContext13(MessageContext);
|
|
7908
7806
|
};
|
|
7909
7807
|
// src/hooks/assistants/useAssistant/index.ts
|
|
7910
|
-
import { c as
|
|
7808
|
+
import { c as _c42 } from "react-compiler-runtime";
|
|
7911
7809
|
import { useMemo as useMemo15 } from "react";
|
|
7912
7810
|
import { useQuery } from "@tanstack/react-query";
|
|
7913
7811
|
// src/hooks/assistants/useAssistant/lib/queryOptions/index.ts
|
|
@@ -8057,7 +7955,7 @@ function _toPrimitive40(t, r) {
|
|
|
8057
7955
|
return ("string" === r ? String : Number)(t);
|
|
8058
7956
|
}
|
|
8059
7957
|
var useAssistant = function(t0) {
|
|
8060
|
-
var $ =
|
|
7958
|
+
var $ = _c42(6);
|
|
8061
7959
|
var assistantId = t0.assistantId;
|
|
8062
7960
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
8063
7961
|
var t1;
|
|
@@ -8090,7 +7988,7 @@ var useAssistant = function(t0) {
|
|
|
8090
7988
|
return t2;
|
|
8091
7989
|
};
|
|
8092
7990
|
// src/components/threads/ThreadDialog/Provider/index.tsx
|
|
8093
|
-
import { c as
|
|
7991
|
+
import { c as _c43 } from "react-compiler-runtime";
|
|
8094
7992
|
import { useState as useState6 } from "react";
|
|
8095
7993
|
// src/contexts/threads/ThreadDialogContext/index.ts
|
|
8096
7994
|
import { createContext as createContext12 } from "react";
|
|
@@ -8106,7 +8004,7 @@ var useThreadDialogContext = function() {
|
|
|
8106
8004
|
// src/components/threads/ThreadDialog/Provider/index.tsx
|
|
8107
8005
|
import { jsx as _jsx75 } from "react/jsx-runtime";
|
|
8108
8006
|
var Provider4 = function(t0) {
|
|
8109
|
-
var $ =
|
|
8007
|
+
var $ = _c43(5);
|
|
8110
8008
|
var children = t0.children;
|
|
8111
8009
|
var threadDialogContext = useThreadDialogContext();
|
|
8112
8010
|
var _useState6 = _sliced_to_array(useState6(threadDialogContext.isOpen), 2), isOpen = _useState6[0], setIsOpen = _useState6[1];
|
|
@@ -8144,7 +8042,7 @@ var Root9 = function(_ref) {
|
|
|
8144
8042
|
});
|
|
8145
8043
|
};
|
|
8146
8044
|
// src/components/threads/ThreadDialog/Trigger/index.tsx
|
|
8147
|
-
import { c as
|
|
8045
|
+
import { c as _c44 } from "react-compiler-runtime";
|
|
8148
8046
|
import { Flex as Flex26 } from "@radix-ui/themes";
|
|
8149
8047
|
// src/components/threads/ThreadDialog/Trigger/Button.tsx
|
|
8150
8048
|
import { IconButton as IconButton8 } from "@radix-ui/themes";
|
|
@@ -8247,7 +8145,7 @@ function _toPrimitive42(t, r) {
|
|
|
8247
8145
|
return ("string" === r ? String : Number)(t);
|
|
8248
8146
|
}
|
|
8249
8147
|
var Root10 = function(t0) {
|
|
8250
|
-
var $ =
|
|
8148
|
+
var $ = _c44(14);
|
|
8251
8149
|
var children = t0.children, style = t0.style, className = t0.className;
|
|
8252
8150
|
var _useThreadDialogContext = useThreadDialogContext(), setIsOpen = _useThreadDialogContext.setIsOpen, isOpen = _useThreadDialogContext.isOpen;
|
|
8253
8151
|
var t1 = isOpen ? "none" : "flex";
|
|
@@ -8328,15 +8226,15 @@ function _temp8(prev) {
|
|
|
8328
8226
|
return !prev;
|
|
8329
8227
|
}
|
|
8330
8228
|
// src/components/threads/ThreadDialog/Content/index.tsx
|
|
8331
|
-
import { c as
|
|
8229
|
+
import { c as _c46 } from "react-compiler-runtime";
|
|
8332
8230
|
import { Card as Card4, Inset as Inset2, Flex as Flex28 } from "@radix-ui/themes";
|
|
8333
8231
|
// src/components/threads/ThreadDialog/Close/index.tsx
|
|
8334
|
-
import { c as
|
|
8232
|
+
import { c as _c45 } from "react-compiler-runtime";
|
|
8335
8233
|
import { Cross1Icon } from "@radix-ui/react-icons";
|
|
8336
8234
|
import { IconButton as IconButton9, Flex as Flex27 } from "@radix-ui/themes";
|
|
8337
8235
|
import { jsx as _jsx79 } from "react/jsx-runtime";
|
|
8338
8236
|
var Close = function() {
|
|
8339
|
-
var $ =
|
|
8237
|
+
var $ = _c45(9);
|
|
8340
8238
|
var _useThreadDialogContext = useThreadDialogContext(), setIsOpen = _useThreadDialogContext.setIsOpen, isOpen = _useThreadDialogContext.isOpen;
|
|
8341
8239
|
var t0 = isOpen ? "flex" : "none";
|
|
8342
8240
|
var t1;
|
|
@@ -8452,7 +8350,7 @@ function _toPrimitive43(t, r) {
|
|
|
8452
8350
|
return ("string" === r ? String : Number)(t);
|
|
8453
8351
|
}
|
|
8454
8352
|
var Root11 = function(t0) {
|
|
8455
|
-
var $ =
|
|
8353
|
+
var $ = _c46(19);
|
|
8456
8354
|
var children = t0.children, className = t0.className, style = t0.style;
|
|
8457
8355
|
var isOpen = useThreadDialogContext().isOpen;
|
|
8458
8356
|
if (!isOpen) {
|
|
@@ -8651,7 +8549,7 @@ ThreadDialog.Root = Root9;
|
|
|
8651
8549
|
ThreadDialog.Trigger = Trigger;
|
|
8652
8550
|
ThreadDialog.Content = Content7;
|
|
8653
8551
|
// src/components/threads/AudioThread/Root/index.tsx
|
|
8654
|
-
import { c as
|
|
8552
|
+
import { c as _c51 } from "react-compiler-runtime";
|
|
8655
8553
|
import { Flex as Flex29 } from "@radix-ui/themes";
|
|
8656
8554
|
// src/contexts/threads/AudioThreadContext/index.ts
|
|
8657
8555
|
import { createContext as createContext13 } from "react";
|
|
@@ -8771,7 +8669,7 @@ var AudioThreadContext = /* @__PURE__ */ createContext13({
|
|
|
8771
8669
|
}
|
|
8772
8670
|
});
|
|
8773
8671
|
// src/hooks/misc/usePermission/index.ts
|
|
8774
|
-
import { c as
|
|
8672
|
+
import { c as _c47 } from "react-compiler-runtime";
|
|
8775
8673
|
import { useEffect as useEffect7, useState as useState7 } from "react";
|
|
8776
8674
|
// src/hooks/misc/usePermission/util.ts
|
|
8777
8675
|
var noop = function() {};
|
|
@@ -8795,7 +8693,7 @@ function off(obj) {
|
|
|
8795
8693
|
}
|
|
8796
8694
|
// src/hooks/misc/usePermission/index.ts
|
|
8797
8695
|
var usePermission = function(permissionDesc) {
|
|
8798
|
-
var $ =
|
|
8696
|
+
var $ = _c47(3);
|
|
8799
8697
|
var _useState7 = _sliced_to_array(useState7(""), 2), state = _useState7[0], setState = _useState7[1];
|
|
8800
8698
|
var t0;
|
|
8801
8699
|
var t1;
|
|
@@ -8849,10 +8747,10 @@ var blobToData = function(blob) {
|
|
|
8849
8747
|
});
|
|
8850
8748
|
};
|
|
8851
8749
|
// src/hooks/audioThreads/useStatus/index.ts
|
|
8852
|
-
import { c as
|
|
8750
|
+
import { c as _c48 } from "react-compiler-runtime";
|
|
8853
8751
|
import { useMemo as useMemo16 } from "react";
|
|
8854
8752
|
var useStatus = function(t0) {
|
|
8855
|
-
var $ =
|
|
8753
|
+
var $ = _c48(2);
|
|
8856
8754
|
var messageAudioProps = t0.messageAudioProps, recorderProps = t0.recorderProps, createMessageProps = t0.createMessageProps;
|
|
8857
8755
|
var latestMessageProps = useLatestMessage();
|
|
8858
8756
|
var t1;
|
|
@@ -8911,10 +8809,10 @@ import { useAudioCapture } from "use-audio-capture";
|
|
|
8911
8809
|
import { useMemo as useMemo17, useRef as useRef7, useState as useState8, useCallback as useCallback5, useEffect as useEffect9 } from "react";
|
|
8912
8810
|
import { useAudioPlayer } from "react-use-audio-player";
|
|
8913
8811
|
// src/hooks/misc/useInterval.ts
|
|
8914
|
-
import { c as
|
|
8812
|
+
import { c as _c49 } from "react-compiler-runtime";
|
|
8915
8813
|
import { useEffect as useEffect8, useRef as useRef6 } from "react";
|
|
8916
8814
|
var useInterval = function(callback, delay) {
|
|
8917
|
-
var $ =
|
|
8815
|
+
var $ = _c49(5);
|
|
8918
8816
|
var savedCallback = useRef6(_temp10);
|
|
8919
8817
|
var t0;
|
|
8920
8818
|
if ($[0] !== callback) {
|
|
@@ -9167,7 +9065,7 @@ var useRecorder = function(_ref) {
|
|
|
9167
9065
|
});
|
|
9168
9066
|
};
|
|
9169
9067
|
// src/hooks/audioThreads/useMessageAudio/index.ts
|
|
9170
|
-
import { c as
|
|
9068
|
+
import { c as _c50 } from "react-compiler-runtime";
|
|
9171
9069
|
import { useMemo as useMemo18, useRef as useRef8, useState as useState9, useEffect as useEffect10, useCallback as useCallback6 } from "react";
|
|
9172
9070
|
import nlp from "compromise";
|
|
9173
9071
|
import { Howler } from "howler";
|
|
@@ -9249,7 +9147,7 @@ var getMessageSentences = function(_ref) {
|
|
|
9249
9147
|
});
|
|
9250
9148
|
};
|
|
9251
9149
|
var useMessageAudio = function(t0) {
|
|
9252
|
-
var $ =
|
|
9150
|
+
var $ = _c50(50);
|
|
9253
9151
|
var _onEnd = t0.onEnd, passedPlay = t0.play;
|
|
9254
9152
|
var _useState9 = _sliced_to_array(useState9(false), 2), isAudioPlayed = _useState9[0], setIsAudioPlayed = _useState9[1];
|
|
9255
9153
|
var t1;
|
|
@@ -9684,7 +9582,7 @@ function _asyncToGenerator12(n) {
|
|
|
9684
9582
|
};
|
|
9685
9583
|
}
|
|
9686
9584
|
var Content8 = function(t0) {
|
|
9687
|
-
var $ =
|
|
9585
|
+
var $ = _c51(24);
|
|
9688
9586
|
var children = t0.children, className = t0.className, style = t0.style, play = t0.play;
|
|
9689
9587
|
var addToast = useToasts().addToast;
|
|
9690
9588
|
var queryClient = useQueryClient6();
|
|
@@ -10044,7 +9942,7 @@ var Visualization = function(props) {
|
|
|
10044
9942
|
}));
|
|
10045
9943
|
};
|
|
10046
9944
|
// src/components/threads/AudioThread/Status/index.tsx
|
|
10047
|
-
import { c as
|
|
9945
|
+
import { c as _c52 } from "react-compiler-runtime";
|
|
10048
9946
|
// src/components/threads/AudioThread/Status/StatusMessages.tsx
|
|
10049
9947
|
import { Flex as Flex32, Text as Text9 } from "@radix-ui/themes";
|
|
10050
9948
|
import { jsx as _jsx85, jsxs as _jsxs32 } from "react/jsx-runtime";
|
|
@@ -10124,7 +10022,7 @@ function _toPrimitive48(t, r) {
|
|
|
10124
10022
|
return ("string" === r ? String : Number)(t);
|
|
10125
10023
|
}
|
|
10126
10024
|
var Status = function(props) {
|
|
10127
|
-
var $ =
|
|
10025
|
+
var $ = _c52(12);
|
|
10128
10026
|
var audioThreadContext = useAudioThreadContext();
|
|
10129
10027
|
if (audioThreadContext.status === "recording") {
|
|
10130
10028
|
var _t;
|
|
@@ -10221,7 +10119,7 @@ var Status = function(props) {
|
|
|
10221
10119
|
return t1;
|
|
10222
10120
|
};
|
|
10223
10121
|
// src/components/threads/AudioThread/Form/index.tsx
|
|
10224
|
-
import { c as
|
|
10122
|
+
import { c as _c54 } from "react-compiler-runtime";
|
|
10225
10123
|
import { Flex as Flex34 } from "@radix-ui/themes";
|
|
10226
10124
|
// src/components/threads/AudioThread/Form/MicIcon.tsx
|
|
10227
10125
|
import { jsx as _jsx87 } from "react/jsx-runtime";
|
|
@@ -10285,12 +10183,12 @@ var MicIcon = function(props) {
|
|
|
10285
10183
|
}));
|
|
10286
10184
|
};
|
|
10287
10185
|
// src/components/threads/AudioThread/Form/ActionButton/index.tsx
|
|
10288
|
-
import { c as
|
|
10186
|
+
import { c as _c53 } from "react-compiler-runtime";
|
|
10289
10187
|
import { Flex as Flex33, IconButton as IconButton10 } from "@radix-ui/themes";
|
|
10290
10188
|
import { StopIcon as StopIcon2, PauseIcon as PauseIcon2, ArrowUpIcon as ArrowUpIcon3, ResumeIcon } from "@radix-ui/react-icons";
|
|
10291
10189
|
import { jsx as _jsx88, jsxs as _jsxs33 } from "react/jsx-runtime";
|
|
10292
10190
|
var ActionButton = function() {
|
|
10293
|
-
var $ =
|
|
10191
|
+
var $ = _c53(27);
|
|
10294
10192
|
var audioThreadContext = useAudioThreadContext();
|
|
10295
10193
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
10296
10194
|
if (audioThreadContext.status === "recording") {
|
|
@@ -10527,7 +10425,7 @@ function _toPrimitive50(t, r) {
|
|
|
10527
10425
|
return ("string" === r ? String : Number)(t);
|
|
10528
10426
|
}
|
|
10529
10427
|
var Form = function(props) {
|
|
10530
|
-
var $ =
|
|
10428
|
+
var $ = _c54(17);
|
|
10531
10429
|
var audioThreadContext = useAudioThreadContext();
|
|
10532
10430
|
var t0 = audioThreadContext.status === "recording" ? "var(--accent-11)" : "var(--gray-11)";
|
|
10533
10431
|
var t1;
|
|
@@ -10747,7 +10645,7 @@ AudioThreadDialog.Root = Root9;
|
|
|
10747
10645
|
AudioThreadDialog.Trigger = Trigger;
|
|
10748
10646
|
AudioThreadDialog.Content = Content7;
|
|
10749
10647
|
// src/components/markdown/MarkdownProvider/index.tsx
|
|
10750
|
-
import { c as
|
|
10648
|
+
import { c as _c55 } from "react-compiler-runtime";
|
|
10751
10649
|
import { useMemo as useMemo19 } from "react";
|
|
10752
10650
|
import { jsx as _jsx92 } from "react/jsx-runtime";
|
|
10753
10651
|
var _excluded5 = [
|
|
@@ -10772,7 +10670,7 @@ function _objectWithoutPropertiesLoose5(r, e) {
|
|
|
10772
10670
|
return t;
|
|
10773
10671
|
}
|
|
10774
10672
|
var MarkdownProvider = function(t0) {
|
|
10775
|
-
var $ =
|
|
10673
|
+
var $ = _c55(9);
|
|
10776
10674
|
var children;
|
|
10777
10675
|
var rest;
|
|
10778
10676
|
if ($[0] !== t0) {
|
|
@@ -10815,7 +10713,7 @@ var MarkdownProvider = function(t0) {
|
|
|
10815
10713
|
return t3;
|
|
10816
10714
|
};
|
|
10817
10715
|
// src/components/avatars/Avatar.tsx
|
|
10818
|
-
import { c as
|
|
10716
|
+
import { c as _c58 } from "react-compiler-runtime";
|
|
10819
10717
|
// src/lib/enums/index.ts
|
|
10820
10718
|
var IconAvatarName = /* @__PURE__ */ function(IconAvatarName2) {
|
|
10821
10719
|
IconAvatarName2["BACKPACK"] = "BACKPACK";
|
|
@@ -10840,7 +10738,7 @@ var AvatarType = /* @__PURE__ */ function(AvatarType2) {
|
|
|
10840
10738
|
// src/components/avatars/Avatar.tsx
|
|
10841
10739
|
import { Avatar as RadixAvatar } from "@radix-ui/themes";
|
|
10842
10740
|
// src/components/imageAvatars/ImageAvatar/index.tsx
|
|
10843
|
-
import { c as
|
|
10741
|
+
import { c as _c56 } from "react-compiler-runtime";
|
|
10844
10742
|
import { Avatar as Avatar4 } from "@radix-ui/themes";
|
|
10845
10743
|
// src/components/imageAvatars/ImageAvatar/lib/optimizedSrc/path.ts
|
|
10846
10744
|
var width = function(_ref) {
|
|
@@ -10894,7 +10792,7 @@ var optimizedSrc = function(_ref) {
|
|
|
10894
10792
|
// src/components/imageAvatars/ImageAvatar/index.tsx
|
|
10895
10793
|
import { jsx as _jsx93 } from "react/jsx-runtime";
|
|
10896
10794
|
var ImageAvatar = function(t0) {
|
|
10897
|
-
var $ =
|
|
10795
|
+
var $ = _c56(9);
|
|
10898
10796
|
var imageAvatar = t0.imageAvatar, size = t0.size, className = t0.className, style = t0.style;
|
|
10899
10797
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
10900
10798
|
var t1;
|
|
@@ -10931,7 +10829,7 @@ var ImageAvatar = function(t0) {
|
|
|
10931
10829
|
return t2;
|
|
10932
10830
|
};
|
|
10933
10831
|
// src/components/iconAvatars/IconAvatar.tsx
|
|
10934
|
-
import { c as
|
|
10832
|
+
import { c as _c57 } from "react-compiler-runtime";
|
|
10935
10833
|
import { useMemo as useMemo20 } from "react";
|
|
10936
10834
|
import { Avatar as Avatar5 } from "@radix-ui/themes";
|
|
10937
10835
|
// src/lib/iconAvatars/iconAvatarComponents.ts
|
|
@@ -10941,7 +10839,7 @@ var iconAvatarComponents = (_obj = {}, _define_property(_obj, IconAvatarName.BAC
|
|
|
10941
10839
|
// src/components/iconAvatars/IconAvatar.tsx
|
|
10942
10840
|
import { jsx as _jsx94 } from "react/jsx-runtime";
|
|
10943
10841
|
var IconAvatar = function(t0) {
|
|
10944
|
-
var $ =
|
|
10842
|
+
var $ = _c57(7);
|
|
10945
10843
|
var iconAvatar = t0.iconAvatar, size = t0.size, className = t0.className, style = t0.style;
|
|
10946
10844
|
var t1;
|
|
10947
10845
|
t1 = iconAvatarComponents[iconAvatar.name];
|
|
@@ -10975,7 +10873,7 @@ var IconAvatar = function(t0) {
|
|
|
10975
10873
|
// src/components/avatars/Avatar.tsx
|
|
10976
10874
|
import { jsx as _jsx95 } from "react/jsx-runtime";
|
|
10977
10875
|
var Avatar6 = function(t0) {
|
|
10978
|
-
var $ =
|
|
10876
|
+
var $ = _c58(14);
|
|
10979
10877
|
var avatar = t0.avatar, t1 = t0.size, className = t0.className, style = t0.style;
|
|
10980
10878
|
var size = t1 === void 0 ? "1" : t1;
|
|
10981
10879
|
if (avatar) {
|
|
@@ -11036,7 +10934,7 @@ var Avatar6 = function(t0) {
|
|
|
11036
10934
|
return t2;
|
|
11037
10935
|
};
|
|
11038
10936
|
// src/components/components/ComponentsProvider.tsx
|
|
11039
|
-
import { c as
|
|
10937
|
+
import { c as _c59 } from "react-compiler-runtime";
|
|
11040
10938
|
import { useMemo as useMemo21 } from "react";
|
|
11041
10939
|
// src/hooks/components/useComponents.ts
|
|
11042
10940
|
import { useContext as useContext17 } from "react";
|
|
@@ -11067,7 +10965,7 @@ function _objectWithoutPropertiesLoose6(r, e) {
|
|
|
11067
10965
|
return t;
|
|
11068
10966
|
}
|
|
11069
10967
|
var ComponentsProvider = function(t0) {
|
|
11070
|
-
var $ =
|
|
10968
|
+
var $ = _c59(9);
|
|
11071
10969
|
var children;
|
|
11072
10970
|
var rest;
|
|
11073
10971
|
if ($[0] !== t0) {
|
|
@@ -11110,11 +11008,11 @@ var ComponentsProvider = function(t0) {
|
|
|
11110
11008
|
return t3;
|
|
11111
11009
|
};
|
|
11112
11010
|
// src/components/assistants/AssistantProvider/index.tsx
|
|
11113
|
-
import { c as
|
|
11011
|
+
import { c as _c60 } from "react-compiler-runtime";
|
|
11114
11012
|
import { jsx as _jsx97 } from "react/jsx-runtime";
|
|
11115
11013
|
var AssistantProvider = function(t0) {
|
|
11116
11014
|
var _assistant$name;
|
|
11117
|
-
var $ =
|
|
11015
|
+
var $ = _c60(10);
|
|
11118
11016
|
var children = t0.children;
|
|
11119
11017
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
11120
11018
|
var t1;
|