@superinterface/react 3.9.6 → 3.10.1
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 +326 -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 +314 -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,291 @@ 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(5);
|
|
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] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10796
|
+
t4 = {
|
|
10797
|
+
width: "100%",
|
|
10798
|
+
height: "100%"
|
|
10799
|
+
};
|
|
10800
|
+
$[2] = t4;
|
|
10801
|
+
} else {
|
|
10802
|
+
t4 = $[2];
|
|
10803
|
+
}
|
|
10804
|
+
var t5;
|
|
10805
|
+
if ($[3] !== t3) {
|
|
10806
|
+
t5 = /* @__PURE__ */ _jsx93(Flex35, {
|
|
10807
|
+
direction: "column",
|
|
10808
|
+
flexGrow: "1",
|
|
10809
|
+
gap: "3",
|
|
10810
|
+
children: /* @__PURE__ */ _jsx93(Card5, {
|
|
10811
|
+
style: t1,
|
|
10812
|
+
children: /* @__PURE__ */ _jsx93(Inset3, {
|
|
10813
|
+
clip: "padding-box",
|
|
10814
|
+
style: t2,
|
|
10815
|
+
children: /* @__PURE__ */ _jsx93(Flex35, {
|
|
10816
|
+
flexGrow: "1",
|
|
10817
|
+
children: /* @__PURE__ */ _jsx93("embed", {
|
|
10818
|
+
src: t3,
|
|
10819
|
+
style: t4
|
|
10820
|
+
})
|
|
10821
|
+
})
|
|
10822
|
+
})
|
|
10823
|
+
})
|
|
10824
|
+
});
|
|
10825
|
+
$[3] = t3;
|
|
10826
|
+
$[4] = t5;
|
|
10827
|
+
} else {
|
|
10828
|
+
t5 = $[4];
|
|
10829
|
+
}
|
|
10830
|
+
return t5;
|
|
10831
|
+
};
|
|
10832
|
+
// src/components/annotations/SourceAnnotation/FileCitation/index.tsx
|
|
10833
|
+
import { jsx as _jsx94, jsxs as _jsxs37, Fragment as _Fragment4 } from "react/jsx-runtime";
|
|
10834
|
+
var FileCitation = function(t0) {
|
|
10835
|
+
var $ = _c57(18);
|
|
10836
|
+
var annotation = t0.annotation;
|
|
10837
|
+
var _useState12 = _sliced_to_array(useState12(null), 2), activeFileId = _useState12[0], setActiveFileId = _useState12[1];
|
|
10838
|
+
var t1;
|
|
10839
|
+
if ($[0] !== annotation.file_citation.file_id) {
|
|
10840
|
+
t1 = function() {
|
|
10841
|
+
setActiveFileId(annotation.file_citation.file_id);
|
|
10842
|
+
};
|
|
10843
|
+
$[0] = annotation.file_citation.file_id;
|
|
10844
|
+
$[1] = t1;
|
|
10845
|
+
} else {
|
|
10846
|
+
t1 = $[1];
|
|
10847
|
+
}
|
|
10848
|
+
var t2;
|
|
10849
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10850
|
+
t2 = /* @__PURE__ */ _jsx94(QuoteIcon2, {});
|
|
10851
|
+
$[2] = t2;
|
|
10852
|
+
} else {
|
|
10853
|
+
t2 = $[2];
|
|
10854
|
+
}
|
|
10855
|
+
var t3;
|
|
10856
|
+
if ($[3] !== t1) {
|
|
10857
|
+
t3 = /* @__PURE__ */ _jsx94(IconButton11, {
|
|
10858
|
+
variant: "soft",
|
|
10859
|
+
color: "gray",
|
|
10860
|
+
size: "1",
|
|
10861
|
+
onClick: t1,
|
|
10862
|
+
children: t2
|
|
10863
|
+
});
|
|
10864
|
+
$[3] = t1;
|
|
10865
|
+
$[4] = t3;
|
|
10866
|
+
} else {
|
|
10867
|
+
t3 = $[4];
|
|
10868
|
+
}
|
|
10869
|
+
var t4 = !!activeFileId;
|
|
10870
|
+
var t5;
|
|
10871
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10872
|
+
t5 = function(open) {
|
|
10873
|
+
if (!open) {
|
|
10874
|
+
setActiveFileId(null);
|
|
10875
|
+
}
|
|
10876
|
+
};
|
|
10877
|
+
$[5] = t5;
|
|
10878
|
+
} else {
|
|
10879
|
+
t5 = $[5];
|
|
10880
|
+
}
|
|
10881
|
+
var t6;
|
|
10882
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10883
|
+
t6 = {
|
|
10884
|
+
display: "flex",
|
|
10885
|
+
flexDirection: "column"
|
|
10886
|
+
};
|
|
10887
|
+
$[6] = t6;
|
|
10888
|
+
} else {
|
|
10889
|
+
t6 = $[6];
|
|
10890
|
+
}
|
|
10891
|
+
var t7;
|
|
10892
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10893
|
+
t7 = /* @__PURE__ */ _jsx94(VisuallyHidden, {
|
|
10894
|
+
asChild: true,
|
|
10895
|
+
children: /* @__PURE__ */ _jsx94(Dialog.Title, {
|
|
10896
|
+
children: "Source"
|
|
10897
|
+
})
|
|
10898
|
+
});
|
|
10899
|
+
$[7] = t7;
|
|
10900
|
+
} else {
|
|
10901
|
+
t7 = $[7];
|
|
10902
|
+
}
|
|
10903
|
+
var t8;
|
|
10904
|
+
if ($[8] !== activeFileId) {
|
|
10905
|
+
t8 = activeFileId && /* @__PURE__ */ _jsx94(Content9, {
|
|
10906
|
+
fileId: activeFileId
|
|
10907
|
+
});
|
|
10908
|
+
$[8] = activeFileId;
|
|
10909
|
+
$[9] = t8;
|
|
10910
|
+
} else {
|
|
10911
|
+
t8 = $[9];
|
|
10912
|
+
}
|
|
10913
|
+
var t9;
|
|
10914
|
+
if ($[10] !== t8) {
|
|
10915
|
+
t9 = /* @__PURE__ */ _jsxs37(Dialog.Content, {
|
|
10916
|
+
width: "1000px",
|
|
10917
|
+
height: "90vh",
|
|
10918
|
+
maxWidth: "calc(100vw - 2 * var(--space-4))",
|
|
10919
|
+
"aria-describedby": void 0,
|
|
10920
|
+
style: t6,
|
|
10921
|
+
children: [
|
|
10922
|
+
t7,
|
|
10923
|
+
t8
|
|
10924
|
+
]
|
|
10925
|
+
});
|
|
10926
|
+
$[10] = t8;
|
|
10927
|
+
$[11] = t9;
|
|
10928
|
+
} else {
|
|
10929
|
+
t9 = $[11];
|
|
10930
|
+
}
|
|
10931
|
+
var t10;
|
|
10932
|
+
if ($[12] !== t4 || $[13] !== t9) {
|
|
10933
|
+
t10 = /* @__PURE__ */ _jsx94(Dialog.Root, {
|
|
10934
|
+
open: t4,
|
|
10935
|
+
onOpenChange: t5,
|
|
10936
|
+
children: t9
|
|
10937
|
+
});
|
|
10938
|
+
$[12] = t4;
|
|
10939
|
+
$[13] = t9;
|
|
10940
|
+
$[14] = t10;
|
|
10941
|
+
} else {
|
|
10942
|
+
t10 = $[14];
|
|
10943
|
+
}
|
|
10944
|
+
var t11;
|
|
10945
|
+
if ($[15] !== t10 || $[16] !== t3) {
|
|
10946
|
+
t11 = /* @__PURE__ */ _jsxs37(_Fragment4, {
|
|
10947
|
+
children: [
|
|
10948
|
+
t3,
|
|
10949
|
+
t10
|
|
10950
|
+
]
|
|
10951
|
+
});
|
|
10952
|
+
$[15] = t10;
|
|
10953
|
+
$[16] = t3;
|
|
10954
|
+
$[17] = t11;
|
|
10955
|
+
} else {
|
|
10956
|
+
t11 = $[17];
|
|
10957
|
+
}
|
|
10958
|
+
return t11;
|
|
10959
|
+
};
|
|
10960
|
+
// src/components/annotations/SourceAnnotation/index.tsx
|
|
10961
|
+
import { jsx as _jsx95 } from "react/jsx-runtime";
|
|
10962
|
+
var _excluded7 = [
|
|
10963
|
+
"children"
|
|
10964
|
+
];
|
|
10965
|
+
function _objectWithoutProperties7(e, t) {
|
|
10966
|
+
if (null == e) return {};
|
|
10967
|
+
var o, r, i = _objectWithoutPropertiesLoose7(e, t);
|
|
10968
|
+
if (Object.getOwnPropertySymbols) {
|
|
10969
|
+
var s = Object.getOwnPropertySymbols(e);
|
|
10970
|
+
for(r = 0; r < s.length; r++)o = s[r], t.includes(o) || ({}).propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
10971
|
+
}
|
|
10972
|
+
return i;
|
|
10973
|
+
}
|
|
10974
|
+
function _objectWithoutPropertiesLoose7(r, e) {
|
|
10975
|
+
if (null == r) return {};
|
|
10976
|
+
var t = {};
|
|
10977
|
+
for(var n in r)if (({}).hasOwnProperty.call(r, n)) {
|
|
10978
|
+
if (e.includes(n)) continue;
|
|
10979
|
+
t[n] = r[n];
|
|
10980
|
+
}
|
|
10981
|
+
return t;
|
|
10982
|
+
}
|
|
10983
|
+
var SourceAnnotation = function(t0) {
|
|
10984
|
+
var $ = _c58(10);
|
|
10985
|
+
var children;
|
|
10986
|
+
var rest;
|
|
10987
|
+
if ($[0] !== t0) {
|
|
10988
|
+
var _t = t0;
|
|
10989
|
+
children = _t.children;
|
|
10990
|
+
rest = _objectWithoutProperties7(_t, _excluded7);
|
|
10991
|
+
_t;
|
|
10992
|
+
$[0] = t0;
|
|
10993
|
+
$[1] = children;
|
|
10994
|
+
$[2] = rest;
|
|
10995
|
+
} else {
|
|
10996
|
+
children = $[1];
|
|
10997
|
+
rest = $[2];
|
|
10998
|
+
}
|
|
10999
|
+
var t1;
|
|
11000
|
+
if ($[3] !== rest) {
|
|
11001
|
+
var _rest$dataAnnotation;
|
|
11002
|
+
t1 = JSON.parse((_rest$dataAnnotation = rest["data-annotation"]) !== null && _rest$dataAnnotation !== void 0 ? _rest$dataAnnotation : "{}");
|
|
11003
|
+
$[3] = rest;
|
|
11004
|
+
$[4] = t1;
|
|
11005
|
+
} else {
|
|
11006
|
+
t1 = $[4];
|
|
11007
|
+
}
|
|
11008
|
+
var annotation = t1;
|
|
11009
|
+
if (annotation.type === "file_citation") {
|
|
11010
|
+
var t2;
|
|
11011
|
+
if ($[5] !== annotation) {
|
|
11012
|
+
t2 = /* @__PURE__ */ _jsx95(FileCitation, {
|
|
11013
|
+
annotation: annotation
|
|
11014
|
+
});
|
|
11015
|
+
$[5] = annotation;
|
|
11016
|
+
$[6] = t2;
|
|
11017
|
+
} else {
|
|
11018
|
+
t2 = $[6];
|
|
11019
|
+
}
|
|
11020
|
+
return t2;
|
|
11021
|
+
} else {
|
|
11022
|
+
if (annotation.type === "file_path") {
|
|
11023
|
+
var _t2;
|
|
11024
|
+
if ($[7] !== annotation || $[8] !== children) {
|
|
11025
|
+
_t2 = /* @__PURE__ */ _jsx95(FilePathAnnotation, {
|
|
11026
|
+
annotation: annotation,
|
|
11027
|
+
children: children
|
|
11028
|
+
});
|
|
11029
|
+
$[7] = annotation;
|
|
11030
|
+
$[8] = children;
|
|
11031
|
+
$[9] = _t2;
|
|
11032
|
+
} else {
|
|
11033
|
+
_t2 = $[9];
|
|
11034
|
+
}
|
|
11035
|
+
return _t2;
|
|
11036
|
+
}
|
|
11037
|
+
}
|
|
11038
|
+
return null;
|
|
11039
|
+
};
|
|
11040
|
+
// src/components/avatars/Avatar.tsx
|
|
11041
|
+
import { c as _c61 } from "react-compiler-runtime";
|
|
10759
11042
|
// src/lib/enums/index.ts
|
|
10760
11043
|
var IconAvatarName = /* @__PURE__ */ function(IconAvatarName2) {
|
|
10761
11044
|
IconAvatarName2["BACKPACK"] = "BACKPACK";
|
|
@@ -10780,7 +11063,7 @@ var AvatarType = /* @__PURE__ */ function(AvatarType2) {
|
|
|
10780
11063
|
// src/components/avatars/Avatar.tsx
|
|
10781
11064
|
import { Avatar as RadixAvatar } from "@radix-ui/themes";
|
|
10782
11065
|
// src/components/imageAvatars/ImageAvatar/index.tsx
|
|
10783
|
-
import { c as
|
|
11066
|
+
import { c as _c59 } from "react-compiler-runtime";
|
|
10784
11067
|
import { Avatar as Avatar4 } from "@radix-ui/themes";
|
|
10785
11068
|
// src/components/imageAvatars/ImageAvatar/lib/optimizedSrc/path.ts
|
|
10786
11069
|
var width = function(_ref) {
|
|
@@ -10832,9 +11115,9 @@ var optimizedSrc = function(_ref) {
|
|
|
10832
11115
|
}));
|
|
10833
11116
|
};
|
|
10834
11117
|
// src/components/imageAvatars/ImageAvatar/index.tsx
|
|
10835
|
-
import { jsx as
|
|
11118
|
+
import { jsx as _jsx96 } from "react/jsx-runtime";
|
|
10836
11119
|
var ImageAvatar = function(t0) {
|
|
10837
|
-
var $ =
|
|
11120
|
+
var $ = _c59(9);
|
|
10838
11121
|
var imageAvatar = t0.imageAvatar, size = t0.size, className = t0.className, style = t0.style;
|
|
10839
11122
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
10840
11123
|
var t1;
|
|
@@ -10853,7 +11136,7 @@ var ImageAvatar = function(t0) {
|
|
|
10853
11136
|
}
|
|
10854
11137
|
var t2;
|
|
10855
11138
|
if ($[4] !== className || $[5] !== size || $[6] !== style || $[7] !== t1) {
|
|
10856
|
-
t2 = /* @__PURE__ */
|
|
11139
|
+
t2 = /* @__PURE__ */ _jsx96(Avatar4, {
|
|
10857
11140
|
className: className,
|
|
10858
11141
|
style: style,
|
|
10859
11142
|
fallback: "",
|
|
@@ -10871,7 +11154,7 @@ var ImageAvatar = function(t0) {
|
|
|
10871
11154
|
return t2;
|
|
10872
11155
|
};
|
|
10873
11156
|
// src/components/iconAvatars/IconAvatar.tsx
|
|
10874
|
-
import { c as
|
|
11157
|
+
import { c as _c60 } from "react-compiler-runtime";
|
|
10875
11158
|
import { useMemo as useMemo20 } from "react";
|
|
10876
11159
|
import { Avatar as Avatar5 } from "@radix-ui/themes";
|
|
10877
11160
|
// src/lib/iconAvatars/iconAvatarComponents.ts
|
|
@@ -10879,16 +11162,16 @@ import { BackpackIcon, RocketIcon, MagicWandIcon, CubeIcon, TargetIcon, DiscIcon
|
|
|
10879
11162
|
var _obj;
|
|
10880
11163
|
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
11164
|
// src/components/iconAvatars/IconAvatar.tsx
|
|
10882
|
-
import { jsx as
|
|
11165
|
+
import { jsx as _jsx97 } from "react/jsx-runtime";
|
|
10883
11166
|
var IconAvatar = function(t0) {
|
|
10884
|
-
var $ =
|
|
11167
|
+
var $ = _c60(7);
|
|
10885
11168
|
var iconAvatar = t0.iconAvatar, size = t0.size, className = t0.className, style = t0.style;
|
|
10886
11169
|
var t1;
|
|
10887
11170
|
t1 = iconAvatarComponents[iconAvatar.name];
|
|
10888
11171
|
var Component2 = t1;
|
|
10889
11172
|
var t2;
|
|
10890
11173
|
if ($[0] !== Component2) {
|
|
10891
|
-
t2 = Component2 ? /* @__PURE__ */
|
|
11174
|
+
t2 = Component2 ? /* @__PURE__ */ _jsx97(Component2, {}) : "";
|
|
10892
11175
|
$[0] = Component2;
|
|
10893
11176
|
$[1] = t2;
|
|
10894
11177
|
} else {
|
|
@@ -10896,7 +11179,7 @@ var IconAvatar = function(t0) {
|
|
|
10896
11179
|
}
|
|
10897
11180
|
var t3;
|
|
10898
11181
|
if ($[2] !== className || $[3] !== size || $[4] !== style || $[5] !== t2) {
|
|
10899
|
-
t3 = /* @__PURE__ */
|
|
11182
|
+
t3 = /* @__PURE__ */ _jsx97(Avatar5, {
|
|
10900
11183
|
className: className,
|
|
10901
11184
|
style: style,
|
|
10902
11185
|
size: size,
|
|
@@ -10913,16 +11196,16 @@ var IconAvatar = function(t0) {
|
|
|
10913
11196
|
return t3;
|
|
10914
11197
|
};
|
|
10915
11198
|
// src/components/avatars/Avatar.tsx
|
|
10916
|
-
import { jsx as
|
|
11199
|
+
import { jsx as _jsx98 } from "react/jsx-runtime";
|
|
10917
11200
|
var Avatar6 = function(t0) {
|
|
10918
|
-
var $ =
|
|
11201
|
+
var $ = _c61(14);
|
|
10919
11202
|
var avatar = t0.avatar, t1 = t0.size, className = t0.className, style = t0.style;
|
|
10920
11203
|
var size = t1 === void 0 ? "1" : t1;
|
|
10921
11204
|
if (avatar) {
|
|
10922
11205
|
if (avatar.type === AvatarType.IMAGE && avatar.imageAvatar) {
|
|
10923
11206
|
var _t;
|
|
10924
11207
|
if ($[0] !== avatar.imageAvatar || $[1] !== className || $[2] !== size || $[3] !== style) {
|
|
10925
|
-
_t = /* @__PURE__ */
|
|
11208
|
+
_t = /* @__PURE__ */ _jsx98(ImageAvatar, {
|
|
10926
11209
|
imageAvatar: avatar.imageAvatar,
|
|
10927
11210
|
size: size,
|
|
10928
11211
|
className: className,
|
|
@@ -10941,7 +11224,7 @@ var Avatar6 = function(t0) {
|
|
|
10941
11224
|
if (avatar.type === AvatarType.ICON && avatar.iconAvatar) {
|
|
10942
11225
|
var _t2;
|
|
10943
11226
|
if ($[5] !== avatar.iconAvatar || $[6] !== className || $[7] !== size || $[8] !== style) {
|
|
10944
|
-
_t2 = /* @__PURE__ */
|
|
11227
|
+
_t2 = /* @__PURE__ */ _jsx98(IconAvatar, {
|
|
10945
11228
|
iconAvatar: avatar.iconAvatar,
|
|
10946
11229
|
size: size,
|
|
10947
11230
|
className: className,
|
|
@@ -10960,7 +11243,7 @@ var Avatar6 = function(t0) {
|
|
|
10960
11243
|
}
|
|
10961
11244
|
var t2;
|
|
10962
11245
|
if ($[10] !== className || $[11] !== size || $[12] !== style) {
|
|
10963
|
-
t2 = /* @__PURE__ */
|
|
11246
|
+
t2 = /* @__PURE__ */ _jsx98(RadixAvatar, {
|
|
10964
11247
|
fallback: "",
|
|
10965
11248
|
size: size,
|
|
10966
11249
|
className: className,
|
|
@@ -10976,7 +11259,7 @@ var Avatar6 = function(t0) {
|
|
|
10976
11259
|
return t2;
|
|
10977
11260
|
};
|
|
10978
11261
|
// src/components/components/ComponentsProvider.tsx
|
|
10979
|
-
import { c as
|
|
11262
|
+
import { c as _c62 } from "react-compiler-runtime";
|
|
10980
11263
|
import { useMemo as useMemo21 } from "react";
|
|
10981
11264
|
// src/hooks/components/useComponents.ts
|
|
10982
11265
|
import { useContext as useContext17 } from "react";
|
|
@@ -10984,20 +11267,20 @@ var useComponents = function() {
|
|
|
10984
11267
|
return useContext17(ComponentsContext);
|
|
10985
11268
|
};
|
|
10986
11269
|
// src/components/components/ComponentsProvider.tsx
|
|
10987
|
-
import { jsx as
|
|
10988
|
-
var
|
|
11270
|
+
import { jsx as _jsx99 } from "react/jsx-runtime";
|
|
11271
|
+
var _excluded8 = [
|
|
10989
11272
|
"children"
|
|
10990
11273
|
];
|
|
10991
|
-
function
|
|
11274
|
+
function _objectWithoutProperties8(e, t) {
|
|
10992
11275
|
if (null == e) return {};
|
|
10993
|
-
var o, r, i =
|
|
11276
|
+
var o, r, i = _objectWithoutPropertiesLoose8(e, t);
|
|
10994
11277
|
if (Object.getOwnPropertySymbols) {
|
|
10995
11278
|
var s = Object.getOwnPropertySymbols(e);
|
|
10996
11279
|
for(r = 0; r < s.length; r++)o = s[r], t.includes(o) || ({}).propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
10997
11280
|
}
|
|
10998
11281
|
return i;
|
|
10999
11282
|
}
|
|
11000
|
-
function
|
|
11283
|
+
function _objectWithoutPropertiesLoose8(r, e) {
|
|
11001
11284
|
if (null == r) return {};
|
|
11002
11285
|
var t = {};
|
|
11003
11286
|
for(var n in r)if (({}).hasOwnProperty.call(r, n)) {
|
|
@@ -11007,13 +11290,13 @@ function _objectWithoutPropertiesLoose7(r, e) {
|
|
|
11007
11290
|
return t;
|
|
11008
11291
|
}
|
|
11009
11292
|
var ComponentsProvider = function(t0) {
|
|
11010
|
-
var $ =
|
|
11293
|
+
var $ = _c62(9);
|
|
11011
11294
|
var children;
|
|
11012
11295
|
var rest;
|
|
11013
11296
|
if ($[0] !== t0) {
|
|
11014
11297
|
var _t = t0;
|
|
11015
11298
|
children = _t.children;
|
|
11016
|
-
rest =
|
|
11299
|
+
rest = _objectWithoutProperties8(_t, _excluded8);
|
|
11017
11300
|
_t;
|
|
11018
11301
|
$[0] = t0;
|
|
11019
11302
|
$[1] = children;
|
|
@@ -11037,7 +11320,7 @@ var ComponentsProvider = function(t0) {
|
|
|
11037
11320
|
var value = t1;
|
|
11038
11321
|
var t3;
|
|
11039
11322
|
if ($[6] !== children || $[7] !== value) {
|
|
11040
|
-
t3 = /* @__PURE__ */
|
|
11323
|
+
t3 = /* @__PURE__ */ _jsx99(ComponentsContext.Provider, {
|
|
11041
11324
|
value: value,
|
|
11042
11325
|
children: children
|
|
11043
11326
|
});
|
|
@@ -11050,11 +11333,11 @@ var ComponentsProvider = function(t0) {
|
|
|
11050
11333
|
return t3;
|
|
11051
11334
|
};
|
|
11052
11335
|
// src/components/assistants/AssistantProvider/index.tsx
|
|
11053
|
-
import { c as
|
|
11054
|
-
import { jsx as
|
|
11336
|
+
import { c as _c63 } from "react-compiler-runtime";
|
|
11337
|
+
import { jsx as _jsx100 } from "react/jsx-runtime";
|
|
11055
11338
|
var AssistantProvider = function(t0) {
|
|
11056
11339
|
var _assistant$name;
|
|
11057
|
-
var $ =
|
|
11340
|
+
var $ = _c63(10);
|
|
11058
11341
|
var children = t0.children;
|
|
11059
11342
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
11060
11343
|
var t1;
|
|
@@ -11072,7 +11355,7 @@ var AssistantProvider = function(t0) {
|
|
|
11072
11355
|
var t3 = assistant === null || assistant === void 0 ? void 0 : assistant.avatar;
|
|
11073
11356
|
var t4;
|
|
11074
11357
|
if ($[2] !== t3) {
|
|
11075
|
-
t4 = /* @__PURE__ */
|
|
11358
|
+
t4 = /* @__PURE__ */ _jsx100(Avatar6, {
|
|
11076
11359
|
avatar: t3
|
|
11077
11360
|
});
|
|
11078
11361
|
$[2] = t3;
|
|
@@ -11082,7 +11365,7 @@ var AssistantProvider = function(t0) {
|
|
|
11082
11365
|
}
|
|
11083
11366
|
var t5;
|
|
11084
11367
|
if ($[4] !== children || $[5] !== t4) {
|
|
11085
|
-
t5 = /* @__PURE__ */
|
|
11368
|
+
t5 = /* @__PURE__ */ _jsx100(AssistantAvatarContext.Provider, {
|
|
11086
11369
|
value: t4,
|
|
11087
11370
|
children: children
|
|
11088
11371
|
});
|
|
@@ -11094,7 +11377,7 @@ var AssistantProvider = function(t0) {
|
|
|
11094
11377
|
}
|
|
11095
11378
|
var t6;
|
|
11096
11379
|
if ($[7] !== t2 || $[8] !== t5) {
|
|
11097
|
-
t6 = /* @__PURE__ */
|
|
11380
|
+
t6 = /* @__PURE__ */ _jsx100(AssistantNameContext.Provider, {
|
|
11098
11381
|
value: t2,
|
|
11099
11382
|
children: t5
|
|
11100
11383
|
});
|
|
@@ -11106,5 +11389,5 @@ var AssistantProvider = function(t0) {
|
|
|
11106
11389
|
}
|
|
11107
11390
|
return t6;
|
|
11108
11391
|
};
|
|
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 };
|
|
11392
|
+
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
11393
|
//# sourceMappingURL=index.js.map
|