@superinterface/react 3.9.5 → 3.10.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/dist/index.cjs +316 -39
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +304 -31
- package/dist/index.js.map +1 -1
- package/dist/utils.d.cts +1 -1
- package/dist/utils.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cloud.cjs +0 -657
- package/dist/cloud.cjs.map +0 -1
- package/dist/cloud.d.cts +0 -8
- package/dist/cloud.d.ts +0 -8
- package/dist/cloud.js +0 -587
- package/dist/cloud.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -655,6 +655,11 @@ declare const MarkdownProvider: ({ children, ...rest }: {
|
|
|
655
655
|
|
|
656
656
|
declare const useMarkdownContext: () => MarkdownContextType;
|
|
657
657
|
|
|
658
|
+
declare const SourceAnnotation: ({ children, ...rest }: {
|
|
659
|
+
children: React.ReactNode;
|
|
660
|
+
["data-annotation"]: string;
|
|
661
|
+
}) => react_jsx_runtime.JSX.Element | null;
|
|
662
|
+
|
|
658
663
|
declare const AssistantAvatarContext: react.Context<react_jsx_runtime.JSX.Element>;
|
|
659
664
|
|
|
660
665
|
declare const AssistantNameContext: react.Context<string>;
|
|
@@ -732,4 +737,4 @@ type Args = {
|
|
|
732
737
|
};
|
|
733
738
|
declare const AssistantProvider: ({ children, }: Args) => react_jsx_runtime.JSX.Element;
|
|
734
739
|
|
|
735
|
-
export { AssistantAvatarContext, AssistantNameContext, AssistantProvider, AudioThread, AudioThreadDialog, Avatar, ComponentsProvider, FunctionBase, FunctionComponentsContext, MarkdownContext, MarkdownProvider, RunStep, Suggestions, SuperinterfaceProvider, Thread, ThreadDialog, ThreadDialogContext, UserAvatarContext, useAssistant, useAudioThreadContext, useComponents, useCreateMessage, useIsMutatingMessage, useLatestMessage, useMarkdownContext, useMessageContext, useMessageFormContext, useMessages, useSuperinterfaceContext, useSuperinterfaceContext as useThreadContext, useThreadDialogContext };
|
|
740
|
+
export { AssistantAvatarContext, AssistantNameContext, AssistantProvider, AudioThread, AudioThreadDialog, Avatar, ComponentsProvider, FunctionBase, FunctionComponentsContext, MarkdownContext, MarkdownProvider, RunStep, SourceAnnotation, Suggestions, SuperinterfaceProvider, Thread, ThreadDialog, ThreadDialogContext, UserAvatarContext, useAssistant, useAudioThreadContext, useComponents, useCreateMessage, useIsMutatingMessage, useLatestMessage, useMarkdownContext, useMessageContext, useMessageFormContext, useMessages, useSuperinterfaceContext, useSuperinterfaceContext as useThreadContext, useThreadDialogContext };
|
package/dist/index.d.ts
CHANGED
|
@@ -655,6 +655,11 @@ declare const MarkdownProvider: ({ children, ...rest }: {
|
|
|
655
655
|
|
|
656
656
|
declare const useMarkdownContext: () => MarkdownContextType;
|
|
657
657
|
|
|
658
|
+
declare const SourceAnnotation: ({ children, ...rest }: {
|
|
659
|
+
children: React.ReactNode;
|
|
660
|
+
["data-annotation"]: string;
|
|
661
|
+
}) => react_jsx_runtime.JSX.Element | null;
|
|
662
|
+
|
|
658
663
|
declare const AssistantAvatarContext: react.Context<react_jsx_runtime.JSX.Element>;
|
|
659
664
|
|
|
660
665
|
declare const AssistantNameContext: react.Context<string>;
|
|
@@ -732,4 +737,4 @@ type Args = {
|
|
|
732
737
|
};
|
|
733
738
|
declare const AssistantProvider: ({ children, }: Args) => react_jsx_runtime.JSX.Element;
|
|
734
739
|
|
|
735
|
-
export { AssistantAvatarContext, AssistantNameContext, AssistantProvider, AudioThread, AudioThreadDialog, Avatar, ComponentsProvider, FunctionBase, FunctionComponentsContext, MarkdownContext, MarkdownProvider, RunStep, Suggestions, SuperinterfaceProvider, Thread, ThreadDialog, ThreadDialogContext, UserAvatarContext, useAssistant, useAudioThreadContext, useComponents, useCreateMessage, useIsMutatingMessage, useLatestMessage, useMarkdownContext, useMessageContext, useMessageFormContext, useMessages, useSuperinterfaceContext, useSuperinterfaceContext as useThreadContext, useThreadDialogContext };
|
|
740
|
+
export { AssistantAvatarContext, AssistantNameContext, AssistantProvider, AudioThread, AudioThreadDialog, Avatar, ComponentsProvider, FunctionBase, FunctionComponentsContext, MarkdownContext, MarkdownProvider, RunStep, SourceAnnotation, Suggestions, SuperinterfaceProvider, Thread, ThreadDialog, ThreadDialogContext, UserAvatarContext, useAssistant, useAudioThreadContext, useComponents, useCreateMessage, useIsMutatingMessage, useLatestMessage, useMarkdownContext, useMessageContext, useMessageFormContext, useMessages, useSuperinterfaceContext, useSuperinterfaceContext as useThreadContext, useThreadDialogContext };
|
package/dist/index.js
CHANGED
|
@@ -10754,8 +10754,281 @@ var MarkdownProvider = function(t0) {
|
|
|
10754
10754
|
}
|
|
10755
10755
|
return t3;
|
|
10756
10756
|
};
|
|
10757
|
-
// src/components/
|
|
10757
|
+
// src/components/annotations/SourceAnnotation/index.tsx
|
|
10758
10758
|
import { c as _c58 } from "react-compiler-runtime";
|
|
10759
|
+
// src/components/annotations/SourceAnnotation/FileCitation/index.tsx
|
|
10760
|
+
import { c as _c57 } from "react-compiler-runtime";
|
|
10761
|
+
import { useState as useState12 } from "react";
|
|
10762
|
+
import { QuoteIcon as QuoteIcon2 } from "@radix-ui/react-icons";
|
|
10763
|
+
import { Dialog, VisuallyHidden, IconButton as IconButton11 } from "@radix-ui/themes";
|
|
10764
|
+
// src/components/annotations/SourceAnnotation/FileCitation/Content.tsx
|
|
10765
|
+
import { c as _c56 } from "react-compiler-runtime";
|
|
10766
|
+
import { Flex as Flex35, Card as Card5, Inset as Inset3 } from "@radix-ui/themes";
|
|
10767
|
+
import { jsx as _jsx93 } from "react/jsx-runtime";
|
|
10768
|
+
var Content9 = function(t0) {
|
|
10769
|
+
var $ = _c56(4);
|
|
10770
|
+
var fileId = t0.fileId;
|
|
10771
|
+
var superinterfaceContext = useSuperinterfaceContext();
|
|
10772
|
+
var nextSearchParams = new URLSearchParams(superinterfaceContext.variables);
|
|
10773
|
+
var t1;
|
|
10774
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10775
|
+
t1 = {
|
|
10776
|
+
display: "flex",
|
|
10777
|
+
flexGrow: "1"
|
|
10778
|
+
};
|
|
10779
|
+
$[0] = t1;
|
|
10780
|
+
} else {
|
|
10781
|
+
t1 = $[0];
|
|
10782
|
+
}
|
|
10783
|
+
var t2;
|
|
10784
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10785
|
+
t2 = {
|
|
10786
|
+
display: "flex",
|
|
10787
|
+
flexGrow: "1"
|
|
10788
|
+
};
|
|
10789
|
+
$[1] = t2;
|
|
10790
|
+
} else {
|
|
10791
|
+
t2 = $[1];
|
|
10792
|
+
}
|
|
10793
|
+
var t3 = "".concat(superinterfaceContext.baseUrl, "/files/").concat(fileId, "/contents?").concat(nextSearchParams);
|
|
10794
|
+
var t4;
|
|
10795
|
+
if ($[2] !== t3) {
|
|
10796
|
+
t4 = /* @__PURE__ */ _jsx93(Flex35, {
|
|
10797
|
+
direction: "column",
|
|
10798
|
+
flexGrow: "1",
|
|
10799
|
+
gap: "3",
|
|
10800
|
+
children: /* @__PURE__ */ _jsx93(Card5, {
|
|
10801
|
+
style: t1,
|
|
10802
|
+
children: /* @__PURE__ */ _jsx93(Inset3, {
|
|
10803
|
+
clip: "padding-box",
|
|
10804
|
+
style: t2,
|
|
10805
|
+
children: /* @__PURE__ */ _jsx93(Flex35, {
|
|
10806
|
+
flexGrow: "1",
|
|
10807
|
+
position: "relative",
|
|
10808
|
+
children: /* @__PURE__ */ _jsx93("embed", {
|
|
10809
|
+
src: t3
|
|
10810
|
+
})
|
|
10811
|
+
})
|
|
10812
|
+
})
|
|
10813
|
+
})
|
|
10814
|
+
});
|
|
10815
|
+
$[2] = t3;
|
|
10816
|
+
$[3] = t4;
|
|
10817
|
+
} else {
|
|
10818
|
+
t4 = $[3];
|
|
10819
|
+
}
|
|
10820
|
+
return t4;
|
|
10821
|
+
};
|
|
10822
|
+
// src/components/annotations/SourceAnnotation/FileCitation/index.tsx
|
|
10823
|
+
import { jsx as _jsx94, jsxs as _jsxs37, Fragment as _Fragment4 } from "react/jsx-runtime";
|
|
10824
|
+
var FileCitation = function(t0) {
|
|
10825
|
+
var $ = _c57(18);
|
|
10826
|
+
var annotation = t0.annotation;
|
|
10827
|
+
var _useState12 = _sliced_to_array(useState12(null), 2), activeFileId = _useState12[0], setActiveFileId = _useState12[1];
|
|
10828
|
+
var t1;
|
|
10829
|
+
if ($[0] !== annotation.file_citation.file_id) {
|
|
10830
|
+
t1 = function() {
|
|
10831
|
+
setActiveFileId(annotation.file_citation.file_id);
|
|
10832
|
+
};
|
|
10833
|
+
$[0] = annotation.file_citation.file_id;
|
|
10834
|
+
$[1] = t1;
|
|
10835
|
+
} else {
|
|
10836
|
+
t1 = $[1];
|
|
10837
|
+
}
|
|
10838
|
+
var t2;
|
|
10839
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10840
|
+
t2 = /* @__PURE__ */ _jsx94(QuoteIcon2, {});
|
|
10841
|
+
$[2] = t2;
|
|
10842
|
+
} else {
|
|
10843
|
+
t2 = $[2];
|
|
10844
|
+
}
|
|
10845
|
+
var t3;
|
|
10846
|
+
if ($[3] !== t1) {
|
|
10847
|
+
t3 = /* @__PURE__ */ _jsx94(IconButton11, {
|
|
10848
|
+
variant: "soft",
|
|
10849
|
+
color: "gray",
|
|
10850
|
+
size: "1",
|
|
10851
|
+
onClick: t1,
|
|
10852
|
+
children: t2
|
|
10853
|
+
});
|
|
10854
|
+
$[3] = t1;
|
|
10855
|
+
$[4] = t3;
|
|
10856
|
+
} else {
|
|
10857
|
+
t3 = $[4];
|
|
10858
|
+
}
|
|
10859
|
+
var t4 = !!activeFileId;
|
|
10860
|
+
var t5;
|
|
10861
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10862
|
+
t5 = function(open) {
|
|
10863
|
+
if (!open) {
|
|
10864
|
+
setActiveFileId(null);
|
|
10865
|
+
}
|
|
10866
|
+
};
|
|
10867
|
+
$[5] = t5;
|
|
10868
|
+
} else {
|
|
10869
|
+
t5 = $[5];
|
|
10870
|
+
}
|
|
10871
|
+
var t6;
|
|
10872
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10873
|
+
t6 = {
|
|
10874
|
+
display: "flex",
|
|
10875
|
+
flexDirection: "column"
|
|
10876
|
+
};
|
|
10877
|
+
$[6] = t6;
|
|
10878
|
+
} else {
|
|
10879
|
+
t6 = $[6];
|
|
10880
|
+
}
|
|
10881
|
+
var t7;
|
|
10882
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10883
|
+
t7 = /* @__PURE__ */ _jsx94(VisuallyHidden, {
|
|
10884
|
+
asChild: true,
|
|
10885
|
+
children: /* @__PURE__ */ _jsx94(Dialog.Title, {
|
|
10886
|
+
children: "Source"
|
|
10887
|
+
})
|
|
10888
|
+
});
|
|
10889
|
+
$[7] = t7;
|
|
10890
|
+
} else {
|
|
10891
|
+
t7 = $[7];
|
|
10892
|
+
}
|
|
10893
|
+
var t8;
|
|
10894
|
+
if ($[8] !== activeFileId) {
|
|
10895
|
+
t8 = activeFileId && /* @__PURE__ */ _jsx94(Content9, {
|
|
10896
|
+
fileId: activeFileId
|
|
10897
|
+
});
|
|
10898
|
+
$[8] = activeFileId;
|
|
10899
|
+
$[9] = t8;
|
|
10900
|
+
} else {
|
|
10901
|
+
t8 = $[9];
|
|
10902
|
+
}
|
|
10903
|
+
var t9;
|
|
10904
|
+
if ($[10] !== t8) {
|
|
10905
|
+
t9 = /* @__PURE__ */ _jsxs37(Dialog.Content, {
|
|
10906
|
+
width: "1000px",
|
|
10907
|
+
height: "90vh",
|
|
10908
|
+
maxWidth: "calc(100vw - 2 * var(--space-4))",
|
|
10909
|
+
"aria-describedby": void 0,
|
|
10910
|
+
style: t6,
|
|
10911
|
+
children: [
|
|
10912
|
+
t7,
|
|
10913
|
+
t8
|
|
10914
|
+
]
|
|
10915
|
+
});
|
|
10916
|
+
$[10] = t8;
|
|
10917
|
+
$[11] = t9;
|
|
10918
|
+
} else {
|
|
10919
|
+
t9 = $[11];
|
|
10920
|
+
}
|
|
10921
|
+
var t10;
|
|
10922
|
+
if ($[12] !== t4 || $[13] !== t9) {
|
|
10923
|
+
t10 = /* @__PURE__ */ _jsx94(Dialog.Root, {
|
|
10924
|
+
open: t4,
|
|
10925
|
+
onOpenChange: t5,
|
|
10926
|
+
children: t9
|
|
10927
|
+
});
|
|
10928
|
+
$[12] = t4;
|
|
10929
|
+
$[13] = t9;
|
|
10930
|
+
$[14] = t10;
|
|
10931
|
+
} else {
|
|
10932
|
+
t10 = $[14];
|
|
10933
|
+
}
|
|
10934
|
+
var t11;
|
|
10935
|
+
if ($[15] !== t10 || $[16] !== t3) {
|
|
10936
|
+
t11 = /* @__PURE__ */ _jsxs37(_Fragment4, {
|
|
10937
|
+
children: [
|
|
10938
|
+
t3,
|
|
10939
|
+
t10
|
|
10940
|
+
]
|
|
10941
|
+
});
|
|
10942
|
+
$[15] = t10;
|
|
10943
|
+
$[16] = t3;
|
|
10944
|
+
$[17] = t11;
|
|
10945
|
+
} else {
|
|
10946
|
+
t11 = $[17];
|
|
10947
|
+
}
|
|
10948
|
+
return t11;
|
|
10949
|
+
};
|
|
10950
|
+
// src/components/annotations/SourceAnnotation/index.tsx
|
|
10951
|
+
import { jsx as _jsx95 } from "react/jsx-runtime";
|
|
10952
|
+
var _excluded7 = [
|
|
10953
|
+
"children"
|
|
10954
|
+
];
|
|
10955
|
+
function _objectWithoutProperties7(e, t) {
|
|
10956
|
+
if (null == e) return {};
|
|
10957
|
+
var o, r, i = _objectWithoutPropertiesLoose7(e, t);
|
|
10958
|
+
if (Object.getOwnPropertySymbols) {
|
|
10959
|
+
var s = Object.getOwnPropertySymbols(e);
|
|
10960
|
+
for(r = 0; r < s.length; r++)o = s[r], t.includes(o) || ({}).propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
10961
|
+
}
|
|
10962
|
+
return i;
|
|
10963
|
+
}
|
|
10964
|
+
function _objectWithoutPropertiesLoose7(r, e) {
|
|
10965
|
+
if (null == r) return {};
|
|
10966
|
+
var t = {};
|
|
10967
|
+
for(var n in r)if (({}).hasOwnProperty.call(r, n)) {
|
|
10968
|
+
if (e.includes(n)) continue;
|
|
10969
|
+
t[n] = r[n];
|
|
10970
|
+
}
|
|
10971
|
+
return t;
|
|
10972
|
+
}
|
|
10973
|
+
var SourceAnnotation = function(t0) {
|
|
10974
|
+
var $ = _c58(10);
|
|
10975
|
+
var children;
|
|
10976
|
+
var rest;
|
|
10977
|
+
if ($[0] !== t0) {
|
|
10978
|
+
var _t = t0;
|
|
10979
|
+
children = _t.children;
|
|
10980
|
+
rest = _objectWithoutProperties7(_t, _excluded7);
|
|
10981
|
+
_t;
|
|
10982
|
+
$[0] = t0;
|
|
10983
|
+
$[1] = children;
|
|
10984
|
+
$[2] = rest;
|
|
10985
|
+
} else {
|
|
10986
|
+
children = $[1];
|
|
10987
|
+
rest = $[2];
|
|
10988
|
+
}
|
|
10989
|
+
var t1;
|
|
10990
|
+
if ($[3] !== rest) {
|
|
10991
|
+
var _rest$dataAnnotation;
|
|
10992
|
+
t1 = JSON.parse((_rest$dataAnnotation = rest["data-annotation"]) !== null && _rest$dataAnnotation !== void 0 ? _rest$dataAnnotation : "{}");
|
|
10993
|
+
$[3] = rest;
|
|
10994
|
+
$[4] = t1;
|
|
10995
|
+
} else {
|
|
10996
|
+
t1 = $[4];
|
|
10997
|
+
}
|
|
10998
|
+
var annotation = t1;
|
|
10999
|
+
if (annotation.type === "file_citation") {
|
|
11000
|
+
var t2;
|
|
11001
|
+
if ($[5] !== annotation) {
|
|
11002
|
+
t2 = /* @__PURE__ */ _jsx95(FileCitation, {
|
|
11003
|
+
annotation: annotation
|
|
11004
|
+
});
|
|
11005
|
+
$[5] = annotation;
|
|
11006
|
+
$[6] = t2;
|
|
11007
|
+
} else {
|
|
11008
|
+
t2 = $[6];
|
|
11009
|
+
}
|
|
11010
|
+
return t2;
|
|
11011
|
+
} else {
|
|
11012
|
+
if (annotation.type === "file_path") {
|
|
11013
|
+
var _t2;
|
|
11014
|
+
if ($[7] !== annotation || $[8] !== children) {
|
|
11015
|
+
_t2 = /* @__PURE__ */ _jsx95(FilePathAnnotation, {
|
|
11016
|
+
annotation: annotation,
|
|
11017
|
+
children: children
|
|
11018
|
+
});
|
|
11019
|
+
$[7] = annotation;
|
|
11020
|
+
$[8] = children;
|
|
11021
|
+
$[9] = _t2;
|
|
11022
|
+
} else {
|
|
11023
|
+
_t2 = $[9];
|
|
11024
|
+
}
|
|
11025
|
+
return _t2;
|
|
11026
|
+
}
|
|
11027
|
+
}
|
|
11028
|
+
return null;
|
|
11029
|
+
};
|
|
11030
|
+
// src/components/avatars/Avatar.tsx
|
|
11031
|
+
import { c as _c61 } from "react-compiler-runtime";
|
|
10759
11032
|
// src/lib/enums/index.ts
|
|
10760
11033
|
var IconAvatarName = /* @__PURE__ */ function(IconAvatarName2) {
|
|
10761
11034
|
IconAvatarName2["BACKPACK"] = "BACKPACK";
|
|
@@ -10780,7 +11053,7 @@ var AvatarType = /* @__PURE__ */ function(AvatarType2) {
|
|
|
10780
11053
|
// src/components/avatars/Avatar.tsx
|
|
10781
11054
|
import { Avatar as RadixAvatar } from "@radix-ui/themes";
|
|
10782
11055
|
// src/components/imageAvatars/ImageAvatar/index.tsx
|
|
10783
|
-
import { c as
|
|
11056
|
+
import { c as _c59 } from "react-compiler-runtime";
|
|
10784
11057
|
import { Avatar as Avatar4 } from "@radix-ui/themes";
|
|
10785
11058
|
// src/components/imageAvatars/ImageAvatar/lib/optimizedSrc/path.ts
|
|
10786
11059
|
var width = function(_ref) {
|
|
@@ -10832,9 +11105,9 @@ var optimizedSrc = function(_ref) {
|
|
|
10832
11105
|
}));
|
|
10833
11106
|
};
|
|
10834
11107
|
// src/components/imageAvatars/ImageAvatar/index.tsx
|
|
10835
|
-
import { jsx as
|
|
11108
|
+
import { jsx as _jsx96 } from "react/jsx-runtime";
|
|
10836
11109
|
var ImageAvatar = function(t0) {
|
|
10837
|
-
var $ =
|
|
11110
|
+
var $ = _c59(9);
|
|
10838
11111
|
var imageAvatar = t0.imageAvatar, size = t0.size, className = t0.className, style = t0.style;
|
|
10839
11112
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
10840
11113
|
var t1;
|
|
@@ -10853,7 +11126,7 @@ var ImageAvatar = function(t0) {
|
|
|
10853
11126
|
}
|
|
10854
11127
|
var t2;
|
|
10855
11128
|
if ($[4] !== className || $[5] !== size || $[6] !== style || $[7] !== t1) {
|
|
10856
|
-
t2 = /* @__PURE__ */
|
|
11129
|
+
t2 = /* @__PURE__ */ _jsx96(Avatar4, {
|
|
10857
11130
|
className: className,
|
|
10858
11131
|
style: style,
|
|
10859
11132
|
fallback: "",
|
|
@@ -10871,7 +11144,7 @@ var ImageAvatar = function(t0) {
|
|
|
10871
11144
|
return t2;
|
|
10872
11145
|
};
|
|
10873
11146
|
// src/components/iconAvatars/IconAvatar.tsx
|
|
10874
|
-
import { c as
|
|
11147
|
+
import { c as _c60 } from "react-compiler-runtime";
|
|
10875
11148
|
import { useMemo as useMemo20 } from "react";
|
|
10876
11149
|
import { Avatar as Avatar5 } from "@radix-ui/themes";
|
|
10877
11150
|
// src/lib/iconAvatars/iconAvatarComponents.ts
|
|
@@ -10879,16 +11152,16 @@ import { BackpackIcon, RocketIcon, MagicWandIcon, CubeIcon, TargetIcon, DiscIcon
|
|
|
10879
11152
|
var _obj;
|
|
10880
11153
|
var iconAvatarComponents = (_obj = {}, _define_property(_obj, IconAvatarName.BACKPACK, BackpackIcon), _define_property(_obj, IconAvatarName.ROCKET, RocketIcon), _define_property(_obj, IconAvatarName.MAGIC_WAND, MagicWandIcon), _define_property(_obj, IconAvatarName.CUBE, CubeIcon), _define_property(_obj, IconAvatarName.TARGET, TargetIcon), _define_property(_obj, IconAvatarName.DISC, DiscIcon), _define_property(_obj, IconAvatarName.GLOBE, GlobeIcon), _define_property(_obj, IconAvatarName.STAR, StarIcon), _define_property(_obj, IconAvatarName.LIGHTNING_BOLT, LightningBoltIcon2), _define_property(_obj, IconAvatarName.FACE, FaceIcon), _define_property(_obj, IconAvatarName.PERSON, PersonIcon2), _define_property(_obj, IconAvatarName.HEART, HeartIcon), _obj);
|
|
10881
11154
|
// src/components/iconAvatars/IconAvatar.tsx
|
|
10882
|
-
import { jsx as
|
|
11155
|
+
import { jsx as _jsx97 } from "react/jsx-runtime";
|
|
10883
11156
|
var IconAvatar = function(t0) {
|
|
10884
|
-
var $ =
|
|
11157
|
+
var $ = _c60(7);
|
|
10885
11158
|
var iconAvatar = t0.iconAvatar, size = t0.size, className = t0.className, style = t0.style;
|
|
10886
11159
|
var t1;
|
|
10887
11160
|
t1 = iconAvatarComponents[iconAvatar.name];
|
|
10888
11161
|
var Component2 = t1;
|
|
10889
11162
|
var t2;
|
|
10890
11163
|
if ($[0] !== Component2) {
|
|
10891
|
-
t2 = Component2 ? /* @__PURE__ */
|
|
11164
|
+
t2 = Component2 ? /* @__PURE__ */ _jsx97(Component2, {}) : "";
|
|
10892
11165
|
$[0] = Component2;
|
|
10893
11166
|
$[1] = t2;
|
|
10894
11167
|
} else {
|
|
@@ -10896,7 +11169,7 @@ var IconAvatar = function(t0) {
|
|
|
10896
11169
|
}
|
|
10897
11170
|
var t3;
|
|
10898
11171
|
if ($[2] !== className || $[3] !== size || $[4] !== style || $[5] !== t2) {
|
|
10899
|
-
t3 = /* @__PURE__ */
|
|
11172
|
+
t3 = /* @__PURE__ */ _jsx97(Avatar5, {
|
|
10900
11173
|
className: className,
|
|
10901
11174
|
style: style,
|
|
10902
11175
|
size: size,
|
|
@@ -10913,16 +11186,16 @@ var IconAvatar = function(t0) {
|
|
|
10913
11186
|
return t3;
|
|
10914
11187
|
};
|
|
10915
11188
|
// src/components/avatars/Avatar.tsx
|
|
10916
|
-
import { jsx as
|
|
11189
|
+
import { jsx as _jsx98 } from "react/jsx-runtime";
|
|
10917
11190
|
var Avatar6 = function(t0) {
|
|
10918
|
-
var $ =
|
|
11191
|
+
var $ = _c61(14);
|
|
10919
11192
|
var avatar = t0.avatar, t1 = t0.size, className = t0.className, style = t0.style;
|
|
10920
11193
|
var size = t1 === void 0 ? "1" : t1;
|
|
10921
11194
|
if (avatar) {
|
|
10922
11195
|
if (avatar.type === AvatarType.IMAGE && avatar.imageAvatar) {
|
|
10923
11196
|
var _t;
|
|
10924
11197
|
if ($[0] !== avatar.imageAvatar || $[1] !== className || $[2] !== size || $[3] !== style) {
|
|
10925
|
-
_t = /* @__PURE__ */
|
|
11198
|
+
_t = /* @__PURE__ */ _jsx98(ImageAvatar, {
|
|
10926
11199
|
imageAvatar: avatar.imageAvatar,
|
|
10927
11200
|
size: size,
|
|
10928
11201
|
className: className,
|
|
@@ -10941,7 +11214,7 @@ var Avatar6 = function(t0) {
|
|
|
10941
11214
|
if (avatar.type === AvatarType.ICON && avatar.iconAvatar) {
|
|
10942
11215
|
var _t2;
|
|
10943
11216
|
if ($[5] !== avatar.iconAvatar || $[6] !== className || $[7] !== size || $[8] !== style) {
|
|
10944
|
-
_t2 = /* @__PURE__ */
|
|
11217
|
+
_t2 = /* @__PURE__ */ _jsx98(IconAvatar, {
|
|
10945
11218
|
iconAvatar: avatar.iconAvatar,
|
|
10946
11219
|
size: size,
|
|
10947
11220
|
className: className,
|
|
@@ -10960,7 +11233,7 @@ var Avatar6 = function(t0) {
|
|
|
10960
11233
|
}
|
|
10961
11234
|
var t2;
|
|
10962
11235
|
if ($[10] !== className || $[11] !== size || $[12] !== style) {
|
|
10963
|
-
t2 = /* @__PURE__ */
|
|
11236
|
+
t2 = /* @__PURE__ */ _jsx98(RadixAvatar, {
|
|
10964
11237
|
fallback: "",
|
|
10965
11238
|
size: size,
|
|
10966
11239
|
className: className,
|
|
@@ -10976,7 +11249,7 @@ var Avatar6 = function(t0) {
|
|
|
10976
11249
|
return t2;
|
|
10977
11250
|
};
|
|
10978
11251
|
// src/components/components/ComponentsProvider.tsx
|
|
10979
|
-
import { c as
|
|
11252
|
+
import { c as _c62 } from "react-compiler-runtime";
|
|
10980
11253
|
import { useMemo as useMemo21 } from "react";
|
|
10981
11254
|
// src/hooks/components/useComponents.ts
|
|
10982
11255
|
import { useContext as useContext17 } from "react";
|
|
@@ -10984,20 +11257,20 @@ var useComponents = function() {
|
|
|
10984
11257
|
return useContext17(ComponentsContext);
|
|
10985
11258
|
};
|
|
10986
11259
|
// src/components/components/ComponentsProvider.tsx
|
|
10987
|
-
import { jsx as
|
|
10988
|
-
var
|
|
11260
|
+
import { jsx as _jsx99 } from "react/jsx-runtime";
|
|
11261
|
+
var _excluded8 = [
|
|
10989
11262
|
"children"
|
|
10990
11263
|
];
|
|
10991
|
-
function
|
|
11264
|
+
function _objectWithoutProperties8(e, t) {
|
|
10992
11265
|
if (null == e) return {};
|
|
10993
|
-
var o, r, i =
|
|
11266
|
+
var o, r, i = _objectWithoutPropertiesLoose8(e, t);
|
|
10994
11267
|
if (Object.getOwnPropertySymbols) {
|
|
10995
11268
|
var s = Object.getOwnPropertySymbols(e);
|
|
10996
11269
|
for(r = 0; r < s.length; r++)o = s[r], t.includes(o) || ({}).propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
10997
11270
|
}
|
|
10998
11271
|
return i;
|
|
10999
11272
|
}
|
|
11000
|
-
function
|
|
11273
|
+
function _objectWithoutPropertiesLoose8(r, e) {
|
|
11001
11274
|
if (null == r) return {};
|
|
11002
11275
|
var t = {};
|
|
11003
11276
|
for(var n in r)if (({}).hasOwnProperty.call(r, n)) {
|
|
@@ -11007,13 +11280,13 @@ function _objectWithoutPropertiesLoose7(r, e) {
|
|
|
11007
11280
|
return t;
|
|
11008
11281
|
}
|
|
11009
11282
|
var ComponentsProvider = function(t0) {
|
|
11010
|
-
var $ =
|
|
11283
|
+
var $ = _c62(9);
|
|
11011
11284
|
var children;
|
|
11012
11285
|
var rest;
|
|
11013
11286
|
if ($[0] !== t0) {
|
|
11014
11287
|
var _t = t0;
|
|
11015
11288
|
children = _t.children;
|
|
11016
|
-
rest =
|
|
11289
|
+
rest = _objectWithoutProperties8(_t, _excluded8);
|
|
11017
11290
|
_t;
|
|
11018
11291
|
$[0] = t0;
|
|
11019
11292
|
$[1] = children;
|
|
@@ -11037,7 +11310,7 @@ var ComponentsProvider = function(t0) {
|
|
|
11037
11310
|
var value = t1;
|
|
11038
11311
|
var t3;
|
|
11039
11312
|
if ($[6] !== children || $[7] !== value) {
|
|
11040
|
-
t3 = /* @__PURE__ */
|
|
11313
|
+
t3 = /* @__PURE__ */ _jsx99(ComponentsContext.Provider, {
|
|
11041
11314
|
value: value,
|
|
11042
11315
|
children: children
|
|
11043
11316
|
});
|
|
@@ -11050,11 +11323,11 @@ var ComponentsProvider = function(t0) {
|
|
|
11050
11323
|
return t3;
|
|
11051
11324
|
};
|
|
11052
11325
|
// src/components/assistants/AssistantProvider/index.tsx
|
|
11053
|
-
import { c as
|
|
11054
|
-
import { jsx as
|
|
11326
|
+
import { c as _c63 } from "react-compiler-runtime";
|
|
11327
|
+
import { jsx as _jsx100 } from "react/jsx-runtime";
|
|
11055
11328
|
var AssistantProvider = function(t0) {
|
|
11056
11329
|
var _assistant$name;
|
|
11057
|
-
var $ =
|
|
11330
|
+
var $ = _c63(10);
|
|
11058
11331
|
var children = t0.children;
|
|
11059
11332
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
11060
11333
|
var t1;
|
|
@@ -11072,7 +11345,7 @@ var AssistantProvider = function(t0) {
|
|
|
11072
11345
|
var t3 = assistant === null || assistant === void 0 ? void 0 : assistant.avatar;
|
|
11073
11346
|
var t4;
|
|
11074
11347
|
if ($[2] !== t3) {
|
|
11075
|
-
t4 = /* @__PURE__ */
|
|
11348
|
+
t4 = /* @__PURE__ */ _jsx100(Avatar6, {
|
|
11076
11349
|
avatar: t3
|
|
11077
11350
|
});
|
|
11078
11351
|
$[2] = t3;
|
|
@@ -11082,7 +11355,7 @@ var AssistantProvider = function(t0) {
|
|
|
11082
11355
|
}
|
|
11083
11356
|
var t5;
|
|
11084
11357
|
if ($[4] !== children || $[5] !== t4) {
|
|
11085
|
-
t5 = /* @__PURE__ */
|
|
11358
|
+
t5 = /* @__PURE__ */ _jsx100(AssistantAvatarContext.Provider, {
|
|
11086
11359
|
value: t4,
|
|
11087
11360
|
children: children
|
|
11088
11361
|
});
|
|
@@ -11094,7 +11367,7 @@ var AssistantProvider = function(t0) {
|
|
|
11094
11367
|
}
|
|
11095
11368
|
var t6;
|
|
11096
11369
|
if ($[7] !== t2 || $[8] !== t5) {
|
|
11097
|
-
t6 = /* @__PURE__ */
|
|
11370
|
+
t6 = /* @__PURE__ */ _jsx100(AssistantNameContext.Provider, {
|
|
11098
11371
|
value: t2,
|
|
11099
11372
|
children: t5
|
|
11100
11373
|
});
|
|
@@ -11106,5 +11379,5 @@ var AssistantProvider = function(t0) {
|
|
|
11106
11379
|
}
|
|
11107
11380
|
return t6;
|
|
11108
11381
|
};
|
|
11109
|
-
export { AssistantAvatarContext, AssistantNameContext, AssistantProvider, AudioThread, AudioThreadDialog, Avatar6 as Avatar, ComponentsProvider, FunctionBase, FunctionComponentsContext, MarkdownContext, MarkdownProvider, RunStep, Suggestions, SuperinterfaceProvider, Thread, ThreadDialog, ThreadDialogContext, UserAvatarContext, useAssistant, useAudioThreadContext, useComponents, useCreateMessage, useIsMutatingMessage, useLatestMessage, useMarkdownContext, useMessageContext, useMessageFormContext, useMessages, useSuperinterfaceContext, useSuperinterfaceContext as useThreadContext, useThreadDialogContext };
|
|
11382
|
+
export { AssistantAvatarContext, AssistantNameContext, AssistantProvider, AudioThread, AudioThreadDialog, Avatar6 as Avatar, ComponentsProvider, FunctionBase, FunctionComponentsContext, MarkdownContext, MarkdownProvider, RunStep, SourceAnnotation, Suggestions, SuperinterfaceProvider, Thread, ThreadDialog, ThreadDialogContext, UserAvatarContext, useAssistant, useAudioThreadContext, useComponents, useCreateMessage, useIsMutatingMessage, useLatestMessage, useMarkdownContext, useMessageContext, useMessageFormContext, useMessages, useSuperinterfaceContext, useSuperinterfaceContext as useThreadContext, useThreadDialogContext };
|
|
11110
11383
|
//# sourceMappingURL=index.js.map
|