@superinterface/react 3.21.1 → 3.22.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 +410 -375
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +352 -317
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -37820,16 +37820,15 @@ import { c as _c47 } from "react-compiler-runtime";
|
|
|
37820
37820
|
import { useMemo as useMemo10 } from "react";
|
|
37821
37821
|
import { Box as Box9 } from "@radix-ui/themes";
|
|
37822
37822
|
// src/components/runSteps/RunSteps/index.tsx
|
|
37823
|
-
import { c as
|
|
37824
|
-
import { Flex as
|
|
37825
|
-
import { useContext as
|
|
37823
|
+
import { c as _c43 } from "react-compiler-runtime";
|
|
37824
|
+
import { Flex as Flex9 } from "@radix-ui/themes";
|
|
37825
|
+
import { useContext as useContext7 } from "react";
|
|
37826
37826
|
// src/contexts/components/ComponentsContext/index.tsx
|
|
37827
|
-
import { createContext as
|
|
37827
|
+
import { createContext as createContext6 } from "react";
|
|
37828
37828
|
// src/components/runSteps/RunStep/index.tsx
|
|
37829
37829
|
import { c as _c11 } from "react-compiler-runtime";
|
|
37830
37830
|
// src/components/runSteps/RunStep/ToolCalls/index.tsx
|
|
37831
37831
|
import { c as _c10 } from "react-compiler-runtime";
|
|
37832
|
-
import { useContext as useContext3 } from "react";
|
|
37833
37832
|
import { Flex as Flex3 } from "@radix-ui/themes";
|
|
37834
37833
|
// src/components/runSteps/RunStep/ToolCalls/ToolCall/index.tsx
|
|
37835
37834
|
import { c as _c9 } from "react-compiler-runtime";
|
|
@@ -38245,6 +38244,11 @@ var ToolCall = function(t0) {
|
|
|
38245
38244
|
}
|
|
38246
38245
|
return t1;
|
|
38247
38246
|
};
|
|
38247
|
+
// src/hooks/components/useComponents.ts
|
|
38248
|
+
import { useContext as useContext3 } from "react";
|
|
38249
|
+
var useComponents = function() {
|
|
38250
|
+
return useContext3(ComponentsContext);
|
|
38251
|
+
};
|
|
38248
38252
|
// src/components/runSteps/RunStep/ToolCalls/index.tsx
|
|
38249
38253
|
import { jsx as _jsx11, jsxs as _jsxs5 } from "react/jsx-runtime";
|
|
38250
38254
|
var Root = function(t0) {
|
|
@@ -38269,17 +38273,17 @@ var Root = function(t0) {
|
|
|
38269
38273
|
};
|
|
38270
38274
|
var StartingToolCalls = function() {
|
|
38271
38275
|
var $ = _c10(2);
|
|
38272
|
-
var
|
|
38273
|
-
var StartingToolCalls3 =
|
|
38274
|
-
var
|
|
38276
|
+
var _useComponents = useComponents(), t0 = _useComponents.components;
|
|
38277
|
+
var StartingToolCalls3 = t0.StartingToolCalls;
|
|
38278
|
+
var t1;
|
|
38275
38279
|
if ($[0] !== StartingToolCalls3) {
|
|
38276
|
-
|
|
38280
|
+
t1 = /* @__PURE__ */ _jsx11(StartingToolCalls3, {});
|
|
38277
38281
|
$[0] = StartingToolCalls3;
|
|
38278
|
-
$[1] =
|
|
38282
|
+
$[1] = t1;
|
|
38279
38283
|
} else {
|
|
38280
|
-
|
|
38284
|
+
t1 = $[1];
|
|
38281
38285
|
}
|
|
38282
|
-
return
|
|
38286
|
+
return t1;
|
|
38283
38287
|
};
|
|
38284
38288
|
var ToolCalls = function(t0) {
|
|
38285
38289
|
var $ = _c10(12);
|
|
@@ -38635,114 +38639,10 @@ var StartingToolCalls2 = function() {
|
|
|
38635
38639
|
}
|
|
38636
38640
|
return t1;
|
|
38637
38641
|
};
|
|
38638
|
-
// src/
|
|
38639
|
-
|
|
38640
|
-
components: {
|
|
38641
|
-
RunStep: RunStep,
|
|
38642
|
-
Function: Function2,
|
|
38643
|
-
StartingToolCalls: StartingToolCalls2
|
|
38644
|
-
}
|
|
38645
|
-
});
|
|
38646
|
-
// src/components/runSteps/RunSteps/index.tsx
|
|
38647
|
-
import { jsx as _jsx17 } from "react/jsx-runtime";
|
|
38648
|
-
var RunSteps = function(t0) {
|
|
38649
|
-
var $ = _c16(7);
|
|
38650
|
-
var runSteps = t0.runSteps;
|
|
38651
|
-
var componentsContext = useContext4(ComponentsContext);
|
|
38652
|
-
var Component2 = componentsContext.components.RunStep;
|
|
38653
|
-
var t1;
|
|
38654
|
-
if ($[0] !== Component2 || $[1] !== runSteps) {
|
|
38655
|
-
var _t;
|
|
38656
|
-
if ($[3] !== Component2) {
|
|
38657
|
-
_t = function(runStep) {
|
|
38658
|
-
return /* @__PURE__ */ _jsx17(Component2, {
|
|
38659
|
-
runStep: runStep
|
|
38660
|
-
}, runStep.id);
|
|
38661
|
-
};
|
|
38662
|
-
$[3] = Component2;
|
|
38663
|
-
$[4] = _t;
|
|
38664
|
-
} else {
|
|
38665
|
-
_t = $[4];
|
|
38666
|
-
}
|
|
38667
|
-
t1 = runSteps.map(_t);
|
|
38668
|
-
$[0] = Component2;
|
|
38669
|
-
$[1] = runSteps;
|
|
38670
|
-
$[2] = t1;
|
|
38671
|
-
} else {
|
|
38672
|
-
t1 = $[2];
|
|
38673
|
-
}
|
|
38674
|
-
var t2;
|
|
38675
|
-
if ($[5] !== t1) {
|
|
38676
|
-
t2 = /* @__PURE__ */ _jsx17(Flex5, {
|
|
38677
|
-
direction: "column-reverse",
|
|
38678
|
-
children: t1
|
|
38679
|
-
});
|
|
38680
|
-
$[5] = t1;
|
|
38681
|
-
$[6] = t2;
|
|
38682
|
-
} else {
|
|
38683
|
-
t2 = $[6];
|
|
38684
|
-
}
|
|
38685
|
-
return t2;
|
|
38686
|
-
};
|
|
38687
|
-
// src/contexts/messages/MessageContext/index.ts
|
|
38688
|
-
import { createContext as createContext4 } from "react";
|
|
38689
|
-
var MessageContext = /* @__PURE__ */ createContext4({
|
|
38690
|
-
message: null
|
|
38691
|
-
});
|
|
38692
|
-
// src/components/threads/Thread/Message/Provider.tsx
|
|
38693
|
-
var Provider = MessageContext.Provider;
|
|
38694
|
-
// src/components/threads/Thread/Message/Attachments/index.tsx
|
|
38695
|
-
import { c as _c17 } from "react-compiler-runtime";
|
|
38696
|
-
import { Flex as Flex6, Badge } from "@radix-ui/themes";
|
|
38697
|
-
import { FileIcon } from "@radix-ui/react-icons";
|
|
38698
|
-
import { jsx as _jsx18, jsxs as _jsxs9 } from "react/jsx-runtime";
|
|
38699
|
-
var Attachments = function(t0) {
|
|
38700
|
-
var _message$attachments;
|
|
38701
|
-
var $ = _c17(4);
|
|
38702
|
-
var message = t0.message;
|
|
38703
|
-
if (!((_message$attachments = message.attachments) !== null && _message$attachments !== void 0 && _message$attachments.length)) {
|
|
38704
|
-
return null;
|
|
38705
|
-
}
|
|
38706
|
-
var t1;
|
|
38707
|
-
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
38708
|
-
t1 = /* @__PURE__ */ _jsx18(FileIcon, {});
|
|
38709
|
-
$[0] = t1;
|
|
38710
|
-
} else {
|
|
38711
|
-
t1 = $[0];
|
|
38712
|
-
}
|
|
38713
|
-
var t2 = message.attachments.length > 1 ? "s" : "";
|
|
38714
|
-
var t3;
|
|
38715
|
-
if ($[1] !== message.attachments.length || $[2] !== t2) {
|
|
38716
|
-
t3 = /* @__PURE__ */ _jsx18(Flex6, {
|
|
38717
|
-
align: "start",
|
|
38718
|
-
pb: "1",
|
|
38719
|
-
children: /* @__PURE__ */ _jsxs9(Badge, {
|
|
38720
|
-
color: "gray",
|
|
38721
|
-
variant: "surface",
|
|
38722
|
-
children: [
|
|
38723
|
-
t1,
|
|
38724
|
-
message.attachments.length,
|
|
38725
|
-
" file",
|
|
38726
|
-
t2
|
|
38727
|
-
]
|
|
38728
|
-
})
|
|
38729
|
-
});
|
|
38730
|
-
$[1] = message.attachments.length;
|
|
38731
|
-
$[2] = t2;
|
|
38732
|
-
$[3] = t3;
|
|
38733
|
-
} else {
|
|
38734
|
-
t3 = $[3];
|
|
38735
|
-
}
|
|
38736
|
-
return t3;
|
|
38737
|
-
};
|
|
38738
|
-
// src/components/messages/MessageContent/index.tsx
|
|
38739
|
-
import { c as _c46 } from "react-compiler-runtime";
|
|
38740
|
-
// src/components/messages/MessageContent/ContentPart/index.tsx
|
|
38741
|
-
import { c as _c45 } from "react-compiler-runtime";
|
|
38742
|
-
// src/components/messages/MessageContent/ContentPart/TextContent.tsx
|
|
38743
|
-
import { c as _c43 } from "react-compiler-runtime";
|
|
38642
|
+
// src/components/contents/TextContent.tsx
|
|
38643
|
+
import { c as _c41 } from "react-compiler-runtime";
|
|
38744
38644
|
import React, { useState as useState3, useEffect as useEffect2, useMemo as useMemo9 } from "react";
|
|
38745
|
-
import { Badge
|
|
38645
|
+
import { Badge } from "@radix-ui/themes";
|
|
38746
38646
|
import { compile } from "@mdx-js/mdx";
|
|
38747
38647
|
import { MDXProvider, useMDXComponents } from "@mdx-js/react";
|
|
38748
38648
|
import * as runtime from "react/jsx-runtime";
|
|
@@ -38888,17 +38788,17 @@ var recmaFallbackComponentPlugin = function() {
|
|
|
38888
38788
|
};
|
|
38889
38789
|
};
|
|
38890
38790
|
// src/hooks/markdown/useMarkdownContext/index.ts
|
|
38891
|
-
import { useContext as
|
|
38791
|
+
import { useContext as useContext5 } from "react";
|
|
38892
38792
|
// src/contexts/markdown/MarkdownContext/index.ts
|
|
38893
|
-
import { createContext as
|
|
38793
|
+
import { createContext as createContext4 } from "react";
|
|
38894
38794
|
// src/contexts/markdown/MarkdownContext/lib/components/index.tsx
|
|
38895
38795
|
import { Heading, Table } from "@radix-ui/themes";
|
|
38896
38796
|
// src/contexts/markdown/MarkdownContext/lib/components/Paragraph.tsx
|
|
38897
|
-
import { c as
|
|
38797
|
+
import { c as _c16 } from "react-compiler-runtime";
|
|
38898
38798
|
import { Box as Box3, Text as Text3 } from "@radix-ui/themes";
|
|
38899
|
-
import { jsx as
|
|
38799
|
+
import { jsx as _jsx17 } from "react/jsx-runtime";
|
|
38900
38800
|
var Paragraph = function(t0) {
|
|
38901
|
-
var $ =
|
|
38801
|
+
var $ = _c16(3);
|
|
38902
38802
|
var children = t0.children;
|
|
38903
38803
|
var t1;
|
|
38904
38804
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
@@ -38912,9 +38812,9 @@ var Paragraph = function(t0) {
|
|
|
38912
38812
|
}
|
|
38913
38813
|
var t2;
|
|
38914
38814
|
if ($[1] !== children) {
|
|
38915
|
-
t2 = /* @__PURE__ */
|
|
38815
|
+
t2 = /* @__PURE__ */ _jsx17(Box3, {
|
|
38916
38816
|
pb: "3",
|
|
38917
|
-
children: /* @__PURE__ */
|
|
38817
|
+
children: /* @__PURE__ */ _jsx17(Text3, {
|
|
38918
38818
|
size: "3",
|
|
38919
38819
|
style: t1,
|
|
38920
38820
|
children: children
|
|
@@ -38928,16 +38828,16 @@ var Paragraph = function(t0) {
|
|
|
38928
38828
|
return t2;
|
|
38929
38829
|
};
|
|
38930
38830
|
// src/contexts/markdown/MarkdownContext/lib/components/Link.tsx
|
|
38931
|
-
import { c as
|
|
38831
|
+
import { c as _c17 } from "react-compiler-runtime";
|
|
38932
38832
|
import { Link as RadixLink } from "@radix-ui/themes";
|
|
38933
|
-
import { jsx as
|
|
38833
|
+
import { jsx as _jsx18 } from "react/jsx-runtime";
|
|
38934
38834
|
var Link = function(t0) {
|
|
38935
|
-
var $ =
|
|
38835
|
+
var $ = _c17(5);
|
|
38936
38836
|
var children = t0.children, href = t0.href, download = t0.download, t1 = t0.target;
|
|
38937
38837
|
var target = t1 === void 0 ? "_blank" : t1;
|
|
38938
38838
|
var t2;
|
|
38939
38839
|
if ($[0] !== children || $[1] !== download || $[2] !== href || $[3] !== target) {
|
|
38940
|
-
t2 = /* @__PURE__ */
|
|
38840
|
+
t2 = /* @__PURE__ */ _jsx18(RadixLink, {
|
|
38941
38841
|
href: href,
|
|
38942
38842
|
target: target,
|
|
38943
38843
|
download: download,
|
|
@@ -38954,11 +38854,11 @@ var Link = function(t0) {
|
|
|
38954
38854
|
return t2;
|
|
38955
38855
|
};
|
|
38956
38856
|
// src/contexts/markdown/MarkdownContext/lib/components/UnorderedList.tsx
|
|
38957
|
-
import { c as
|
|
38857
|
+
import { c as _c18 } from "react-compiler-runtime";
|
|
38958
38858
|
import { Box as Box4 } from "@radix-ui/themes";
|
|
38959
|
-
import { jsx as
|
|
38859
|
+
import { jsx as _jsx19 } from "react/jsx-runtime";
|
|
38960
38860
|
var UnorderedList = function(t0) {
|
|
38961
|
-
var $ =
|
|
38861
|
+
var $ = _c18(3);
|
|
38962
38862
|
var children = t0.children;
|
|
38963
38863
|
var t1;
|
|
38964
38864
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
@@ -38971,10 +38871,10 @@ var UnorderedList = function(t0) {
|
|
|
38971
38871
|
}
|
|
38972
38872
|
var t2;
|
|
38973
38873
|
if ($[1] !== children) {
|
|
38974
|
-
t2 = /* @__PURE__ */
|
|
38874
|
+
t2 = /* @__PURE__ */ _jsx19(Box4, {
|
|
38975
38875
|
pb: "3",
|
|
38976
38876
|
asChild: true,
|
|
38977
|
-
children: /* @__PURE__ */
|
|
38877
|
+
children: /* @__PURE__ */ _jsx19("ul", {
|
|
38978
38878
|
style: t1,
|
|
38979
38879
|
children: children
|
|
38980
38880
|
})
|
|
@@ -38987,11 +38887,11 @@ var UnorderedList = function(t0) {
|
|
|
38987
38887
|
return t2;
|
|
38988
38888
|
};
|
|
38989
38889
|
// src/contexts/markdown/MarkdownContext/lib/components/OrderedList.tsx
|
|
38990
|
-
import { c as
|
|
38890
|
+
import { c as _c19 } from "react-compiler-runtime";
|
|
38991
38891
|
import { Box as Box5 } from "@radix-ui/themes";
|
|
38992
|
-
import { jsx as
|
|
38892
|
+
import { jsx as _jsx20 } from "react/jsx-runtime";
|
|
38993
38893
|
var OrderedList = function(t0) {
|
|
38994
|
-
var $ =
|
|
38894
|
+
var $ = _c19(3);
|
|
38995
38895
|
var children = t0.children;
|
|
38996
38896
|
var t1;
|
|
38997
38897
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
@@ -39004,10 +38904,10 @@ var OrderedList = function(t0) {
|
|
|
39004
38904
|
}
|
|
39005
38905
|
var t2;
|
|
39006
38906
|
if ($[1] !== children) {
|
|
39007
|
-
t2 = /* @__PURE__ */
|
|
38907
|
+
t2 = /* @__PURE__ */ _jsx20(Box5, {
|
|
39008
38908
|
pb: "3",
|
|
39009
38909
|
asChild: true,
|
|
39010
|
-
children: /* @__PURE__ */
|
|
38910
|
+
children: /* @__PURE__ */ _jsx20("ol", {
|
|
39011
38911
|
style: t1,
|
|
39012
38912
|
children: children
|
|
39013
38913
|
})
|
|
@@ -39020,11 +38920,11 @@ var OrderedList = function(t0) {
|
|
|
39020
38920
|
return t2;
|
|
39021
38921
|
};
|
|
39022
38922
|
// src/contexts/markdown/MarkdownContext/lib/components/ListItem.tsx
|
|
39023
|
-
import { c as
|
|
38923
|
+
import { c as _c20 } from "react-compiler-runtime";
|
|
39024
38924
|
import { Box as Box6 } from "@radix-ui/themes";
|
|
39025
|
-
import { jsx as
|
|
38925
|
+
import { jsx as _jsx21 } from "react/jsx-runtime";
|
|
39026
38926
|
var ListItem = function(t0) {
|
|
39027
|
-
var $ =
|
|
38927
|
+
var $ = _c20(3);
|
|
39028
38928
|
var children = t0.children;
|
|
39029
38929
|
var t1;
|
|
39030
38930
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
@@ -39037,9 +38937,9 @@ var ListItem = function(t0) {
|
|
|
39037
38937
|
}
|
|
39038
38938
|
var t2;
|
|
39039
38939
|
if ($[1] !== children) {
|
|
39040
|
-
t2 = /* @__PURE__ */
|
|
38940
|
+
t2 = /* @__PURE__ */ _jsx21(Box6, {
|
|
39041
38941
|
pb: "1",
|
|
39042
|
-
children: /* @__PURE__ */
|
|
38942
|
+
children: /* @__PURE__ */ _jsx21("li", {
|
|
39043
38943
|
style: t1,
|
|
39044
38944
|
children: children
|
|
39045
38945
|
})
|
|
@@ -39052,15 +38952,15 @@ var ListItem = function(t0) {
|
|
|
39052
38952
|
return t2;
|
|
39053
38953
|
};
|
|
39054
38954
|
// src/contexts/markdown/MarkdownContext/lib/components/Strong.tsx
|
|
39055
|
-
import { c as
|
|
38955
|
+
import { c as _c21 } from "react-compiler-runtime";
|
|
39056
38956
|
import { Strong as RadixStrong } from "@radix-ui/themes";
|
|
39057
|
-
import { jsx as
|
|
38957
|
+
import { jsx as _jsx22 } from "react/jsx-runtime";
|
|
39058
38958
|
var Strong = function(t0) {
|
|
39059
|
-
var $ =
|
|
38959
|
+
var $ = _c21(2);
|
|
39060
38960
|
var children = t0.children;
|
|
39061
38961
|
var t1;
|
|
39062
38962
|
if ($[0] !== children) {
|
|
39063
|
-
t1 = /* @__PURE__ */
|
|
38963
|
+
t1 = /* @__PURE__ */ _jsx22(RadixStrong, {
|
|
39064
38964
|
children: children
|
|
39065
38965
|
});
|
|
39066
38966
|
$[0] = children;
|
|
@@ -39071,11 +38971,11 @@ var Strong = function(t0) {
|
|
|
39071
38971
|
return t1;
|
|
39072
38972
|
};
|
|
39073
38973
|
// src/contexts/markdown/MarkdownContext/lib/components/Pre.tsx
|
|
39074
|
-
import { c as
|
|
38974
|
+
import { c as _c22 } from "react-compiler-runtime";
|
|
39075
38975
|
import { Box as Box7 } from "@radix-ui/themes";
|
|
39076
|
-
import { jsx as
|
|
38976
|
+
import { jsx as _jsx23 } from "react/jsx-runtime";
|
|
39077
38977
|
var Pre = function(t0) {
|
|
39078
|
-
var $ =
|
|
38978
|
+
var $ = _c22(3);
|
|
39079
38979
|
var children = t0.children;
|
|
39080
38980
|
var t1;
|
|
39081
38981
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
@@ -39089,7 +38989,7 @@ var Pre = function(t0) {
|
|
|
39089
38989
|
}
|
|
39090
38990
|
var t2;
|
|
39091
38991
|
if ($[1] !== children) {
|
|
39092
|
-
t2 = /* @__PURE__ */
|
|
38992
|
+
t2 = /* @__PURE__ */ _jsx23(Box7, {
|
|
39093
38993
|
style: t1,
|
|
39094
38994
|
children: children
|
|
39095
38995
|
});
|
|
@@ -39101,16 +39001,16 @@ var Pre = function(t0) {
|
|
|
39101
39001
|
return t2;
|
|
39102
39002
|
};
|
|
39103
39003
|
// src/contexts/markdown/MarkdownContext/lib/components/Code.tsx
|
|
39104
|
-
import { c as
|
|
39004
|
+
import { c as _c28 } from "react-compiler-runtime";
|
|
39105
39005
|
import { Code as RadixCode } from "@radix-ui/themes";
|
|
39106
39006
|
// src/components/suggestions/Suggestions/index.tsx
|
|
39107
|
-
import { c as
|
|
39007
|
+
import { c as _c27 } from "react-compiler-runtime";
|
|
39108
39008
|
import { useMemo as useMemo6 } from "react";
|
|
39109
39009
|
// src/hooks/messages/useLatestMessage/index.ts
|
|
39110
|
-
import { c as
|
|
39010
|
+
import { c as _c24 } from "react-compiler-runtime";
|
|
39111
39011
|
import { useMemo as useMemo3 } from "react";
|
|
39112
39012
|
// src/hooks/messages/useMessages/index.tsx
|
|
39113
|
-
import { c as
|
|
39013
|
+
import { c as _c23 } from "react-compiler-runtime";
|
|
39114
39014
|
import { useMemo as useMemo2 } from "react";
|
|
39115
39015
|
import { useInfiniteQuery, useQueryClient } from "@tanstack/react-query";
|
|
39116
39016
|
// src/lib/threads/queryOptions/index.ts
|
|
@@ -39384,7 +39284,7 @@ var messages = function(_ref) {
|
|
|
39384
39284
|
}, []);
|
|
39385
39285
|
};
|
|
39386
39286
|
var useMessages = function() {
|
|
39387
|
-
var $ =
|
|
39287
|
+
var $ = _c23(9);
|
|
39388
39288
|
var queryClient = useQueryClient();
|
|
39389
39289
|
var threadContext = useSuperinterfaceContext();
|
|
39390
39290
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
@@ -39473,7 +39373,7 @@ function _toPrimitive5(t, r) {
|
|
|
39473
39373
|
return ("string" === r ? String : Number)(t);
|
|
39474
39374
|
}
|
|
39475
39375
|
var useLatestMessage = function() {
|
|
39476
|
-
var $ =
|
|
39376
|
+
var $ = _c24(3);
|
|
39477
39377
|
var props = useMessages();
|
|
39478
39378
|
var t0;
|
|
39479
39379
|
var t1 = props.messages[0] || null;
|
|
@@ -39496,11 +39396,11 @@ import { useMemo as useMemo5 } from "react";
|
|
|
39496
39396
|
import { isEmpty } from "radash";
|
|
39497
39397
|
import { onlyText } from "react-children-utilities";
|
|
39498
39398
|
// src/hooks/messages/useIsMutatingMessage/index.ts
|
|
39499
|
-
import { c as
|
|
39399
|
+
import { c as _c25 } from "react-compiler-runtime";
|
|
39500
39400
|
import { useMemo as useMemo4 } from "react";
|
|
39501
39401
|
import { useIsMutating } from "@tanstack/react-query";
|
|
39502
39402
|
var useIsMutatingMessage = function() {
|
|
39503
|
-
var $ =
|
|
39403
|
+
var $ = _c25(2);
|
|
39504
39404
|
var threadContext = useSuperinterfaceContext();
|
|
39505
39405
|
var t0;
|
|
39506
39406
|
if ($[0] !== threadContext.variables) {
|
|
@@ -39522,9 +39422,9 @@ var useIsMutatingMessage = function() {
|
|
|
39522
39422
|
return isMutatingMessage;
|
|
39523
39423
|
};
|
|
39524
39424
|
// src/components/suggestions/Suggestions/Content.tsx
|
|
39525
|
-
import { Flex as
|
|
39425
|
+
import { Flex as Flex5 } from "@radix-ui/themes";
|
|
39526
39426
|
// src/components/suggestions/Suggestions/Item.tsx
|
|
39527
|
-
import { c as
|
|
39427
|
+
import { c as _c26 } from "react-compiler-runtime";
|
|
39528
39428
|
import { ArrowUpIcon } from "@radix-ui/react-icons";
|
|
39529
39429
|
import { Text as Text4, Button as Button2, Spinner } from "@radix-ui/themes";
|
|
39530
39430
|
// src/hooks/messages/useCreateMessage/index.ts
|
|
@@ -40938,16 +40838,16 @@ var useCreateMessage = function useCreateMessage2() {
|
|
|
40938
40838
|
// src/components/suggestions/Suggestions/Item.tsx
|
|
40939
40839
|
import { useQueryClient as useQueryClient3 } from "@tanstack/react-query";
|
|
40940
40840
|
// src/hooks/toasts/useToasts/index.ts
|
|
40941
|
-
import { useContext as
|
|
40841
|
+
import { useContext as useContext4 } from "react";
|
|
40942
40842
|
// src/contexts/toasts/ToastsContext/index.ts
|
|
40943
|
-
import { createContext as
|
|
40944
|
-
var ToastsContext = /* @__PURE__ */
|
|
40843
|
+
import { createContext as createContext3 } from "react";
|
|
40844
|
+
var ToastsContext = /* @__PURE__ */ createContext3({
|
|
40945
40845
|
toasts: [],
|
|
40946
40846
|
addToast: function() {}
|
|
40947
40847
|
});
|
|
40948
40848
|
// src/hooks/toasts/useToasts/index.ts
|
|
40949
40849
|
var useToasts = function() {
|
|
40950
|
-
return
|
|
40850
|
+
return useContext4(ToastsContext);
|
|
40951
40851
|
};
|
|
40952
40852
|
// src/lib/errors/createMessageDefaultOnError.ts
|
|
40953
40853
|
var createMessageDefaultOnError = function(_ref) {
|
|
@@ -40975,7 +40875,7 @@ var createMessageDefaultOnError = function(_ref) {
|
|
|
40975
40875
|
};
|
|
40976
40876
|
};
|
|
40977
40877
|
// src/components/suggestions/Suggestions/Item.tsx
|
|
40978
|
-
import { jsx as
|
|
40878
|
+
import { jsx as _jsx24, jsxs as _jsxs9 } from "react/jsx-runtime";
|
|
40979
40879
|
function ownKeys19(e, r) {
|
|
40980
40880
|
var t = Object.keys(e);
|
|
40981
40881
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -41020,7 +40920,7 @@ function _toPrimitive19(t, r) {
|
|
|
41020
40920
|
return ("string" === r ? String : Number)(t);
|
|
41021
40921
|
}
|
|
41022
40922
|
var Item = function(t0) {
|
|
41023
|
-
var $ =
|
|
40923
|
+
var $ = _c26(16);
|
|
41024
40924
|
var suggestion = t0.suggestion, isDisabled = t0.isDisabled, className = t0.className, style = t0.style;
|
|
41025
40925
|
var addToast = useToasts().addToast;
|
|
41026
40926
|
var queryClient = useQueryClient3();
|
|
@@ -41065,7 +40965,7 @@ var Item = function(t0) {
|
|
|
41065
40965
|
}
|
|
41066
40966
|
var t4;
|
|
41067
40967
|
if ($[9] !== className || $[10] !== isDisabled || $[11] !== isPending || $[12] !== style || $[13] !== suggestion || $[14] !== t3) {
|
|
41068
|
-
t4 = /* @__PURE__ */
|
|
40968
|
+
t4 = /* @__PURE__ */ _jsx24(Content3, {
|
|
41069
40969
|
onClick: t3,
|
|
41070
40970
|
isDisabled: isDisabled,
|
|
41071
40971
|
isPending: isPending,
|
|
@@ -41086,7 +40986,7 @@ var Item = function(t0) {
|
|
|
41086
40986
|
return t4;
|
|
41087
40987
|
};
|
|
41088
40988
|
var Content3 = function(t0) {
|
|
41089
|
-
var $ =
|
|
40989
|
+
var $ = _c26(16);
|
|
41090
40990
|
var onClick = t0.onClick, isDisabled = t0.isDisabled, isPending = t0.isPending, children = t0.children, className = t0.className, style = t0.style;
|
|
41091
40991
|
var t1;
|
|
41092
40992
|
if ($[0] !== style) {
|
|
@@ -41110,7 +41010,7 @@ var Content3 = function(t0) {
|
|
|
41110
41010
|
}
|
|
41111
41011
|
var t3;
|
|
41112
41012
|
if ($[4] !== children) {
|
|
41113
|
-
t3 = /* @__PURE__ */
|
|
41013
|
+
t3 = /* @__PURE__ */ _jsx24(Text4, {
|
|
41114
41014
|
size: "1",
|
|
41115
41015
|
weight: "regular",
|
|
41116
41016
|
children: children
|
|
@@ -41122,7 +41022,7 @@ var Content3 = function(t0) {
|
|
|
41122
41022
|
}
|
|
41123
41023
|
var t4;
|
|
41124
41024
|
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
41125
|
-
t4 = /* @__PURE__ */
|
|
41025
|
+
t4 = /* @__PURE__ */ _jsx24(ArrowUpIcon, {
|
|
41126
41026
|
style: {
|
|
41127
41027
|
flexShrink: 0
|
|
41128
41028
|
}
|
|
@@ -41133,7 +41033,7 @@ var Content3 = function(t0) {
|
|
|
41133
41033
|
}
|
|
41134
41034
|
var t5;
|
|
41135
41035
|
if ($[7] !== isPending) {
|
|
41136
|
-
t5 = /* @__PURE__ */
|
|
41036
|
+
t5 = /* @__PURE__ */ _jsx24(Spinner, {
|
|
41137
41037
|
loading: isPending,
|
|
41138
41038
|
children: t4
|
|
41139
41039
|
});
|
|
@@ -41144,7 +41044,7 @@ var Content3 = function(t0) {
|
|
|
41144
41044
|
}
|
|
41145
41045
|
var t6;
|
|
41146
41046
|
if ($[9] !== className || $[10] !== isDisabled || $[11] !== onClick || $[12] !== t2 || $[13] !== t3 || $[14] !== t5) {
|
|
41147
|
-
t6 = /* @__PURE__ */
|
|
41047
|
+
t6 = /* @__PURE__ */ _jsxs9(Button2, {
|
|
41148
41048
|
className: className,
|
|
41149
41049
|
variant: "soft",
|
|
41150
41050
|
onClick: onClick,
|
|
@@ -41169,7 +41069,7 @@ var Content3 = function(t0) {
|
|
|
41169
41069
|
};
|
|
41170
41070
|
Item.Content = Content3;
|
|
41171
41071
|
// src/components/suggestions/Suggestions/Content.tsx
|
|
41172
|
-
import { jsx as
|
|
41072
|
+
import { jsx as _jsx25 } from "react/jsx-runtime";
|
|
41173
41073
|
var Content4 = function(_ref) {
|
|
41174
41074
|
var children = _ref.children, className = _ref.className, style = _ref.style;
|
|
41175
41075
|
var isMutatingMessage = useIsMutatingMessage();
|
|
@@ -41183,14 +41083,14 @@ var Content4 = function(_ref) {
|
|
|
41183
41083
|
children
|
|
41184
41084
|
]);
|
|
41185
41085
|
if (isEmpty(suggestions)) return null;
|
|
41186
|
-
return /* @__PURE__ */
|
|
41086
|
+
return /* @__PURE__ */ _jsx25(Flex5, {
|
|
41187
41087
|
gap: "2",
|
|
41188
41088
|
py: "2",
|
|
41189
41089
|
wrap: "wrap",
|
|
41190
41090
|
className: className,
|
|
41191
41091
|
style: style,
|
|
41192
41092
|
children: suggestions.map(function(suggestion) {
|
|
41193
|
-
return /* @__PURE__ */
|
|
41093
|
+
return /* @__PURE__ */ _jsx25(Item, {
|
|
41194
41094
|
suggestion: suggestion,
|
|
41195
41095
|
isDisabled: isMutatingMessage
|
|
41196
41096
|
}, suggestion);
|
|
@@ -41198,10 +41098,10 @@ var Content4 = function(_ref) {
|
|
|
41198
41098
|
});
|
|
41199
41099
|
};
|
|
41200
41100
|
// src/components/suggestions/Suggestions/index.tsx
|
|
41201
|
-
import { jsx as
|
|
41101
|
+
import { jsx as _jsx26 } from "react/jsx-runtime";
|
|
41202
41102
|
var Suggestions = function(t0) {
|
|
41203
41103
|
var _latestMessageProps$l;
|
|
41204
|
-
var $ =
|
|
41104
|
+
var $ = _c27(4);
|
|
41205
41105
|
var children = t0.children, className = t0.className, style = t0.style;
|
|
41206
41106
|
var latestMessageProps = useLatestMessage();
|
|
41207
41107
|
var t1;
|
|
@@ -41215,7 +41115,7 @@ var Suggestions = function(t0) {
|
|
|
41215
41115
|
}
|
|
41216
41116
|
var t2;
|
|
41217
41117
|
if ($[0] !== children || $[1] !== className || $[2] !== style) {
|
|
41218
|
-
t2 = /* @__PURE__ */
|
|
41118
|
+
t2 = /* @__PURE__ */ _jsx26(Content4, {
|
|
41219
41119
|
className: className,
|
|
41220
41120
|
style: style,
|
|
41221
41121
|
children: children
|
|
@@ -41231,14 +41131,14 @@ var Suggestions = function(t0) {
|
|
|
41231
41131
|
};
|
|
41232
41132
|
Suggestions.Item = Item;
|
|
41233
41133
|
// src/contexts/markdown/MarkdownContext/lib/components/Code.tsx
|
|
41234
|
-
import { jsx as
|
|
41134
|
+
import { jsx as _jsx27 } from "react/jsx-runtime";
|
|
41235
41135
|
var Code3 = function(t0) {
|
|
41236
|
-
var $ =
|
|
41136
|
+
var $ = _c28(5);
|
|
41237
41137
|
var children = t0.children, className = t0.className;
|
|
41238
41138
|
if (className === "language-suggestions") {
|
|
41239
41139
|
var _t;
|
|
41240
41140
|
if ($[0] !== children) {
|
|
41241
|
-
_t = /* @__PURE__ */
|
|
41141
|
+
_t = /* @__PURE__ */ _jsx27(Suggestions, {
|
|
41242
41142
|
children: children
|
|
41243
41143
|
});
|
|
41244
41144
|
$[0] = children;
|
|
@@ -41259,7 +41159,7 @@ var Code3 = function(t0) {
|
|
|
41259
41159
|
}
|
|
41260
41160
|
var t2;
|
|
41261
41161
|
if ($[3] !== children) {
|
|
41262
|
-
t2 = /* @__PURE__ */
|
|
41162
|
+
t2 = /* @__PURE__ */ _jsx27(RadixCode, {
|
|
41263
41163
|
style: t1,
|
|
41264
41164
|
children: children
|
|
41265
41165
|
});
|
|
@@ -41271,11 +41171,11 @@ var Code3 = function(t0) {
|
|
|
41271
41171
|
return t2;
|
|
41272
41172
|
};
|
|
41273
41173
|
// src/contexts/markdown/MarkdownContext/lib/components/Img/index.tsx
|
|
41274
|
-
import { c as
|
|
41174
|
+
import { c as _c37 } from "react-compiler-runtime";
|
|
41275
41175
|
// src/components/images/Image.tsx
|
|
41276
|
-
import { c as
|
|
41176
|
+
import { c as _c29 } from "react-compiler-runtime";
|
|
41277
41177
|
import { Box as Box8 } from "@radix-ui/themes";
|
|
41278
|
-
import { jsx as
|
|
41178
|
+
import { jsx as _jsx28 } from "react/jsx-runtime";
|
|
41279
41179
|
function ownKeys20(e, r) {
|
|
41280
41180
|
var t = Object.keys(e);
|
|
41281
41181
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -41320,7 +41220,7 @@ function _toPrimitive20(t, r) {
|
|
|
41320
41220
|
return ("string" === r ? String : Number)(t);
|
|
41321
41221
|
}
|
|
41322
41222
|
var Image = function(props) {
|
|
41323
|
-
var $ =
|
|
41223
|
+
var $ = _c29(3);
|
|
41324
41224
|
var t0;
|
|
41325
41225
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
41326
41226
|
t0 = {
|
|
@@ -41333,9 +41233,9 @@ var Image = function(props) {
|
|
|
41333
41233
|
}
|
|
41334
41234
|
var t1;
|
|
41335
41235
|
if ($[1] !== props) {
|
|
41336
|
-
t1 = /* @__PURE__ */
|
|
41236
|
+
t1 = /* @__PURE__ */ _jsx28(Box8, {
|
|
41337
41237
|
pb: "3",
|
|
41338
|
-
children: /* @__PURE__ */
|
|
41238
|
+
children: /* @__PURE__ */ _jsx28("img", _objectSpread20(_objectSpread20({}, props), {}, {
|
|
41339
41239
|
style: t0
|
|
41340
41240
|
}))
|
|
41341
41241
|
});
|
|
@@ -41393,26 +41293,26 @@ var isAudioSrc = function(_ref) {
|
|
|
41393
41293
|
return src.endsWith(".mp3") || src.endsWith(".wav");
|
|
41394
41294
|
};
|
|
41395
41295
|
// src/contexts/markdown/MarkdownContext/lib/components/Img/Video/index.tsx
|
|
41396
|
-
import { c as
|
|
41397
|
-
import { Flex as
|
|
41296
|
+
import { c as _c35 } from "react-compiler-runtime";
|
|
41297
|
+
import { Flex as Flex6 } from "@radix-ui/themes";
|
|
41398
41298
|
import "@vidstack/react/player/styles/base.css";
|
|
41399
41299
|
import { MediaPlayer, MediaProvider, Controls } from "@vidstack/react";
|
|
41400
41300
|
// src/components/media/PlayButton.tsx
|
|
41401
|
-
import { c as
|
|
41301
|
+
import { c as _c30 } from "react-compiler-runtime";
|
|
41402
41302
|
import { PlayButton as VidstackPlayButton, useMediaState } from "@vidstack/react";
|
|
41403
41303
|
import { IconButton } from "@radix-ui/themes";
|
|
41404
41304
|
import { PlayIcon, PauseIcon } from "@radix-ui/react-icons";
|
|
41405
|
-
import { jsx as
|
|
41305
|
+
import { jsx as _jsx29 } from "react/jsx-runtime";
|
|
41406
41306
|
var PlayButton = function() {
|
|
41407
|
-
var $ =
|
|
41307
|
+
var $ = _c30(2);
|
|
41408
41308
|
var isPaused = useMediaState("paused");
|
|
41409
41309
|
var t0;
|
|
41410
41310
|
if ($[0] !== isPaused) {
|
|
41411
|
-
t0 = /* @__PURE__ */
|
|
41311
|
+
t0 = /* @__PURE__ */ _jsx29(IconButton, {
|
|
41412
41312
|
variant: "ghost",
|
|
41413
41313
|
asChild: true,
|
|
41414
|
-
children: /* @__PURE__ */
|
|
41415
|
-
children: isPaused ? /* @__PURE__ */
|
|
41314
|
+
children: /* @__PURE__ */ _jsx29(VidstackPlayButton, {
|
|
41315
|
+
children: isPaused ? /* @__PURE__ */ _jsx29(PlayIcon, {}) : /* @__PURE__ */ _jsx29(PauseIcon, {})
|
|
41416
41316
|
})
|
|
41417
41317
|
});
|
|
41418
41318
|
$[0] = isPaused;
|
|
@@ -41423,24 +41323,24 @@ var PlayButton = function() {
|
|
|
41423
41323
|
return t0;
|
|
41424
41324
|
};
|
|
41425
41325
|
// src/components/media/VolumeButton.tsx
|
|
41426
|
-
import { c as
|
|
41326
|
+
import { c as _c31 } from "react-compiler-runtime";
|
|
41427
41327
|
import { MuteButton, useMediaState as useMediaState2, useMediaRemote } from "@vidstack/react";
|
|
41428
41328
|
import { IconButton as IconButton2, HoverCard, Slider } from "@radix-ui/themes";
|
|
41429
41329
|
import { SpeakerModerateIcon, SpeakerOffIcon } from "@radix-ui/react-icons";
|
|
41430
|
-
import { jsx as
|
|
41330
|
+
import { jsx as _jsx30, jsxs as _jsxs10 } from "react/jsx-runtime";
|
|
41431
41331
|
var VolumeButton = function() {
|
|
41432
|
-
var $ =
|
|
41332
|
+
var $ = _c31(13);
|
|
41433
41333
|
var volume = useMediaState2("volume");
|
|
41434
41334
|
var isMuted = useMediaState2("muted");
|
|
41435
41335
|
var remote = useMediaRemote();
|
|
41436
41336
|
var t0;
|
|
41437
41337
|
if ($[0] !== isMuted || $[1] !== volume) {
|
|
41438
|
-
t0 = /* @__PURE__ */
|
|
41439
|
-
children: /* @__PURE__ */
|
|
41338
|
+
t0 = /* @__PURE__ */ _jsx30(HoverCard.Trigger, {
|
|
41339
|
+
children: /* @__PURE__ */ _jsx30(IconButton2, {
|
|
41440
41340
|
variant: "ghost",
|
|
41441
41341
|
asChild: true,
|
|
41442
|
-
children: /* @__PURE__ */
|
|
41443
|
-
children: isMuted || volume === 0 ? /* @__PURE__ */
|
|
41342
|
+
children: /* @__PURE__ */ _jsx30(MuteButton, {
|
|
41343
|
+
children: isMuted || volume === 0 ? /* @__PURE__ */ _jsx30(SpeakerOffIcon, {}) : /* @__PURE__ */ _jsx30(SpeakerModerateIcon, {})
|
|
41444
41344
|
})
|
|
41445
41345
|
})
|
|
41446
41346
|
});
|
|
@@ -41474,11 +41374,11 @@ var VolumeButton = function() {
|
|
|
41474
41374
|
}
|
|
41475
41375
|
var t4;
|
|
41476
41376
|
if ($[7] !== t2 || $[8] !== t3) {
|
|
41477
|
-
t4 = /* @__PURE__ */
|
|
41377
|
+
t4 = /* @__PURE__ */ _jsx30(HoverCard.Content, {
|
|
41478
41378
|
size: "1",
|
|
41479
41379
|
side: "top",
|
|
41480
41380
|
height: "100px",
|
|
41481
|
-
children: /* @__PURE__ */
|
|
41381
|
+
children: /* @__PURE__ */ _jsx30(Slider, {
|
|
41482
41382
|
size: "1",
|
|
41483
41383
|
variant: "soft",
|
|
41484
41384
|
orientation: "vertical",
|
|
@@ -41494,7 +41394,7 @@ var VolumeButton = function() {
|
|
|
41494
41394
|
}
|
|
41495
41395
|
var t5;
|
|
41496
41396
|
if ($[10] !== t0 || $[11] !== t4) {
|
|
41497
|
-
t5 = /* @__PURE__ */
|
|
41397
|
+
t5 = /* @__PURE__ */ _jsxs10(HoverCard.Root, {
|
|
41498
41398
|
children: [
|
|
41499
41399
|
t0,
|
|
41500
41400
|
t4
|
|
@@ -41509,13 +41409,13 @@ var VolumeButton = function() {
|
|
|
41509
41409
|
return t5;
|
|
41510
41410
|
};
|
|
41511
41411
|
// src/components/media/Time.tsx
|
|
41512
|
-
import { c as
|
|
41412
|
+
import { c as _c32 } from "react-compiler-runtime";
|
|
41513
41413
|
import { useState, useEffect, useMemo as useMemo7 } from "react";
|
|
41514
41414
|
import { useMediaState as useMediaState3, useMediaRemote as useMediaRemote2 } from "@vidstack/react";
|
|
41515
41415
|
import { Slider as Slider2 } from "@radix-ui/themes";
|
|
41516
|
-
import { jsx as
|
|
41416
|
+
import { jsx as _jsx31 } from "react/jsx-runtime";
|
|
41517
41417
|
var Time = function() {
|
|
41518
|
-
var $ =
|
|
41418
|
+
var $ = _c32(17);
|
|
41519
41419
|
var time = useMediaState3("currentTime");
|
|
41520
41420
|
var duration = useMediaState3("duration");
|
|
41521
41421
|
var seeking = useMediaState3("seeking");
|
|
@@ -41583,7 +41483,7 @@ var Time = function() {
|
|
|
41583
41483
|
}
|
|
41584
41484
|
var t8;
|
|
41585
41485
|
if ($[11] !== t3 || $[12] !== t4 || $[13] !== t5 || $[14] !== t6 || $[15] !== t7) {
|
|
41586
|
-
t8 = /* @__PURE__ */
|
|
41486
|
+
t8 = /* @__PURE__ */ _jsx31(Slider2, {
|
|
41587
41487
|
size: "1",
|
|
41588
41488
|
variant: "soft",
|
|
41589
41489
|
value: t3,
|
|
@@ -41604,11 +41504,11 @@ var Time = function() {
|
|
|
41604
41504
|
return t8;
|
|
41605
41505
|
};
|
|
41606
41506
|
// src/components/media/MediaContainer.tsx
|
|
41607
|
-
import { c as
|
|
41507
|
+
import { c as _c33 } from "react-compiler-runtime";
|
|
41608
41508
|
import { Card, Inset } from "@radix-ui/themes";
|
|
41609
|
-
import { jsx as
|
|
41509
|
+
import { jsx as _jsx32 } from "react/jsx-runtime";
|
|
41610
41510
|
var MediaContainer = function(t0) {
|
|
41611
|
-
var $ =
|
|
41511
|
+
var $ = _c33(3);
|
|
41612
41512
|
var children = t0.children;
|
|
41613
41513
|
var t1;
|
|
41614
41514
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
@@ -41622,9 +41522,9 @@ var MediaContainer = function(t0) {
|
|
|
41622
41522
|
}
|
|
41623
41523
|
var t2;
|
|
41624
41524
|
if ($[1] !== children) {
|
|
41625
|
-
t2 = /* @__PURE__ */
|
|
41525
|
+
t2 = /* @__PURE__ */ _jsx32(Card, {
|
|
41626
41526
|
mb: "3",
|
|
41627
|
-
children: /* @__PURE__ */
|
|
41527
|
+
children: /* @__PURE__ */ _jsx32(Inset, {
|
|
41628
41528
|
clip: "padding-box",
|
|
41629
41529
|
style: t1,
|
|
41630
41530
|
children: children
|
|
@@ -41638,21 +41538,21 @@ var MediaContainer = function(t0) {
|
|
|
41638
41538
|
return t2;
|
|
41639
41539
|
};
|
|
41640
41540
|
// src/contexts/markdown/MarkdownContext/lib/components/Img/Video/FullscreenButton.tsx
|
|
41641
|
-
import { c as
|
|
41541
|
+
import { c as _c34 } from "react-compiler-runtime";
|
|
41642
41542
|
import { FullscreenButton as VidstackFullscreenButton, useMediaState as useMediaState4 } from "@vidstack/react";
|
|
41643
41543
|
import { IconButton as IconButton3 } from "@radix-ui/themes";
|
|
41644
41544
|
import { EnterFullScreenIcon, ExitFullScreenIcon } from "@radix-ui/react-icons";
|
|
41645
|
-
import { jsx as
|
|
41545
|
+
import { jsx as _jsx33 } from "react/jsx-runtime";
|
|
41646
41546
|
var FullscreenButton = function() {
|
|
41647
|
-
var $ =
|
|
41547
|
+
var $ = _c34(2);
|
|
41648
41548
|
var isFullscreen = useMediaState4("fullscreen");
|
|
41649
41549
|
var t0;
|
|
41650
41550
|
if ($[0] !== isFullscreen) {
|
|
41651
|
-
t0 = /* @__PURE__ */
|
|
41551
|
+
t0 = /* @__PURE__ */ _jsx33(IconButton3, {
|
|
41652
41552
|
variant: "ghost",
|
|
41653
41553
|
asChild: true,
|
|
41654
|
-
children: /* @__PURE__ */
|
|
41655
|
-
children: isFullscreen ? /* @__PURE__ */
|
|
41554
|
+
children: /* @__PURE__ */ _jsx33(VidstackFullscreenButton, {
|
|
41555
|
+
children: isFullscreen ? /* @__PURE__ */ _jsx33(ExitFullScreenIcon, {}) : /* @__PURE__ */ _jsx33(EnterFullScreenIcon, {})
|
|
41656
41556
|
})
|
|
41657
41557
|
});
|
|
41658
41558
|
$[0] = isFullscreen;
|
|
@@ -41663,9 +41563,9 @@ var FullscreenButton = function() {
|
|
|
41663
41563
|
return t0;
|
|
41664
41564
|
};
|
|
41665
41565
|
// src/contexts/markdown/MarkdownContext/lib/components/Img/Video/index.tsx
|
|
41666
|
-
import { jsx as
|
|
41566
|
+
import { jsx as _jsx34, jsxs as _jsxs11 } from "react/jsx-runtime";
|
|
41667
41567
|
var Video = function(t0) {
|
|
41668
|
-
var $ =
|
|
41568
|
+
var $ = _c35(9);
|
|
41669
41569
|
var src = t0.src;
|
|
41670
41570
|
var t1 = "video/".concat(src.split(".").pop());
|
|
41671
41571
|
var t2;
|
|
@@ -41683,8 +41583,8 @@ var Video = function(t0) {
|
|
|
41683
41583
|
var t3;
|
|
41684
41584
|
var t4;
|
|
41685
41585
|
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
41686
|
-
t3 = /* @__PURE__ */
|
|
41687
|
-
t4 = /* @__PURE__ */
|
|
41586
|
+
t3 = /* @__PURE__ */ _jsx34(MediaProvider, {});
|
|
41587
|
+
t4 = /* @__PURE__ */ _jsx34("style", {
|
|
41688
41588
|
children: "\n .superinterface-video-controls {\n opacity: 0;\n transition: opacity 0.2s ease-out;\n }\n\n .superinterface-video-controls[data-visible] {\n opacity: 1;\n }\n "
|
|
41689
41589
|
});
|
|
41690
41590
|
$[3] = t3;
|
|
@@ -41705,7 +41605,7 @@ var Video = function(t0) {
|
|
|
41705
41605
|
}
|
|
41706
41606
|
var t6;
|
|
41707
41607
|
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
41708
|
-
t6 = /* @__PURE__ */
|
|
41608
|
+
t6 = /* @__PURE__ */ _jsx34(Flex6, {
|
|
41709
41609
|
asChild: true,
|
|
41710
41610
|
position: "absolute",
|
|
41711
41611
|
bottom: "0",
|
|
@@ -41714,18 +41614,18 @@ var Video = function(t0) {
|
|
|
41714
41614
|
className: "superinterface-video-controls",
|
|
41715
41615
|
p: "3",
|
|
41716
41616
|
style: t5,
|
|
41717
|
-
children: /* @__PURE__ */
|
|
41718
|
-
children: /* @__PURE__ */
|
|
41617
|
+
children: /* @__PURE__ */ _jsx34(Controls.Root, {
|
|
41618
|
+
children: /* @__PURE__ */ _jsx34(Flex6, {
|
|
41719
41619
|
asChild: true,
|
|
41720
41620
|
align: "center",
|
|
41721
41621
|
gap: "3",
|
|
41722
41622
|
flexGrow: "1",
|
|
41723
|
-
children: /* @__PURE__ */
|
|
41623
|
+
children: /* @__PURE__ */ _jsxs11(Controls.Group, {
|
|
41724
41624
|
children: [
|
|
41725
|
-
/* @__PURE__ */
|
|
41726
|
-
/* @__PURE__ */
|
|
41727
|
-
/* @__PURE__ */
|
|
41728
|
-
/* @__PURE__ */
|
|
41625
|
+
/* @__PURE__ */ _jsx34(PlayButton, {}),
|
|
41626
|
+
/* @__PURE__ */ _jsx34(Time, {}),
|
|
41627
|
+
/* @__PURE__ */ _jsx34(VolumeButton, {}),
|
|
41628
|
+
/* @__PURE__ */ _jsx34(FullscreenButton, {})
|
|
41729
41629
|
]
|
|
41730
41630
|
})
|
|
41731
41631
|
})
|
|
@@ -41737,8 +41637,8 @@ var Video = function(t0) {
|
|
|
41737
41637
|
}
|
|
41738
41638
|
var t7;
|
|
41739
41639
|
if ($[7] !== t2) {
|
|
41740
|
-
t7 = /* @__PURE__ */
|
|
41741
|
-
children: /* @__PURE__ */
|
|
41640
|
+
t7 = /* @__PURE__ */ _jsx34(MediaContainer, {
|
|
41641
|
+
children: /* @__PURE__ */ _jsxs11(MediaPlayer, {
|
|
41742
41642
|
src: t2,
|
|
41743
41643
|
playsInline: true,
|
|
41744
41644
|
hideControlsOnMouseLeave: true,
|
|
@@ -41758,13 +41658,13 @@ var Video = function(t0) {
|
|
|
41758
41658
|
return t7;
|
|
41759
41659
|
};
|
|
41760
41660
|
// src/contexts/markdown/MarkdownContext/lib/components/Img/Audio/index.tsx
|
|
41761
|
-
import { c as
|
|
41762
|
-
import { Flex as
|
|
41661
|
+
import { c as _c36 } from "react-compiler-runtime";
|
|
41662
|
+
import { Flex as Flex7 } from "@radix-ui/themes";
|
|
41763
41663
|
import "@vidstack/react/player/styles/base.css";
|
|
41764
41664
|
import { MediaPlayer as MediaPlayer2, MediaProvider as MediaProvider2, Controls as Controls2 } from "@vidstack/react";
|
|
41765
|
-
import { jsx as
|
|
41665
|
+
import { jsx as _jsx35, jsxs as _jsxs12 } from "react/jsx-runtime";
|
|
41766
41666
|
var Audio = function(t0) {
|
|
41767
|
-
var $ =
|
|
41667
|
+
var $ = _c36(8);
|
|
41768
41668
|
var src = t0.src;
|
|
41769
41669
|
var t1 = "audio/".concat(src.split(".").pop());
|
|
41770
41670
|
var t2;
|
|
@@ -41781,7 +41681,7 @@ var Audio = function(t0) {
|
|
|
41781
41681
|
}
|
|
41782
41682
|
var t3;
|
|
41783
41683
|
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
41784
|
-
t3 = /* @__PURE__ */
|
|
41684
|
+
t3 = /* @__PURE__ */ _jsx35(MediaProvider2, {});
|
|
41785
41685
|
$[3] = t3;
|
|
41786
41686
|
} else {
|
|
41787
41687
|
t3 = $[3];
|
|
@@ -41798,22 +41698,22 @@ var Audio = function(t0) {
|
|
|
41798
41698
|
}
|
|
41799
41699
|
var t5;
|
|
41800
41700
|
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
41801
|
-
t5 = /* @__PURE__ */
|
|
41701
|
+
t5 = /* @__PURE__ */ _jsx35(Flex7, {
|
|
41802
41702
|
asChild: true,
|
|
41803
41703
|
p: "3",
|
|
41804
41704
|
flexGrow: "1",
|
|
41805
41705
|
style: t4,
|
|
41806
|
-
children: /* @__PURE__ */
|
|
41807
|
-
children: /* @__PURE__ */
|
|
41706
|
+
children: /* @__PURE__ */ _jsx35(Controls2.Root, {
|
|
41707
|
+
children: /* @__PURE__ */ _jsx35(Flex7, {
|
|
41808
41708
|
asChild: true,
|
|
41809
41709
|
align: "center",
|
|
41810
41710
|
gap: "3",
|
|
41811
41711
|
flexGrow: "1",
|
|
41812
|
-
children: /* @__PURE__ */
|
|
41712
|
+
children: /* @__PURE__ */ _jsxs12(Controls2.Group, {
|
|
41813
41713
|
children: [
|
|
41814
|
-
/* @__PURE__ */
|
|
41815
|
-
/* @__PURE__ */
|
|
41816
|
-
/* @__PURE__ */
|
|
41714
|
+
/* @__PURE__ */ _jsx35(PlayButton, {}),
|
|
41715
|
+
/* @__PURE__ */ _jsx35(Time, {}),
|
|
41716
|
+
/* @__PURE__ */ _jsx35(VolumeButton, {})
|
|
41817
41717
|
]
|
|
41818
41718
|
})
|
|
41819
41719
|
})
|
|
@@ -41825,8 +41725,8 @@ var Audio = function(t0) {
|
|
|
41825
41725
|
}
|
|
41826
41726
|
var t6;
|
|
41827
41727
|
if ($[6] !== t2) {
|
|
41828
|
-
t6 = /* @__PURE__ */
|
|
41829
|
-
children: /* @__PURE__ */
|
|
41728
|
+
t6 = /* @__PURE__ */ _jsx35(MediaContainer, {
|
|
41729
|
+
children: /* @__PURE__ */ _jsxs12(MediaPlayer2, {
|
|
41830
41730
|
src: t2,
|
|
41831
41731
|
viewType: "audio",
|
|
41832
41732
|
crossOrigin: true,
|
|
@@ -41845,7 +41745,7 @@ var Audio = function(t0) {
|
|
|
41845
41745
|
return t6;
|
|
41846
41746
|
};
|
|
41847
41747
|
// src/contexts/markdown/MarkdownContext/lib/components/Img/index.tsx
|
|
41848
|
-
import { jsx as
|
|
41748
|
+
import { jsx as _jsx36 } from "react/jsx-runtime";
|
|
41849
41749
|
function ownKeys21(e, r) {
|
|
41850
41750
|
var t = Object.keys(e);
|
|
41851
41751
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -41890,11 +41790,11 @@ function _toPrimitive21(t, r) {
|
|
|
41890
41790
|
return ("string" === r ? String : Number)(t);
|
|
41891
41791
|
}
|
|
41892
41792
|
var Img = function(props) {
|
|
41893
|
-
var $ =
|
|
41793
|
+
var $ = _c37(8);
|
|
41894
41794
|
if (!props.src) {
|
|
41895
41795
|
var t0;
|
|
41896
41796
|
if ($[0] !== props) {
|
|
41897
|
-
t0 = /* @__PURE__ */
|
|
41797
|
+
t0 = /* @__PURE__ */ _jsx36(Image, _objectSpread21({}, props));
|
|
41898
41798
|
$[0] = props;
|
|
41899
41799
|
$[1] = t0;
|
|
41900
41800
|
} else {
|
|
@@ -41907,7 +41807,7 @@ var Img = function(props) {
|
|
|
41907
41807
|
})) {
|
|
41908
41808
|
var _t;
|
|
41909
41809
|
if ($[2] !== props.src) {
|
|
41910
|
-
_t = /* @__PURE__ */
|
|
41810
|
+
_t = /* @__PURE__ */ _jsx36(Video, {
|
|
41911
41811
|
src: props.src
|
|
41912
41812
|
});
|
|
41913
41813
|
$[2] = props.src;
|
|
@@ -41922,7 +41822,7 @@ var Img = function(props) {
|
|
|
41922
41822
|
})) {
|
|
41923
41823
|
var _t2;
|
|
41924
41824
|
if ($[4] !== props.src) {
|
|
41925
|
-
_t2 = /* @__PURE__ */
|
|
41825
|
+
_t2 = /* @__PURE__ */ _jsx36(Audio, {
|
|
41926
41826
|
src: props.src
|
|
41927
41827
|
});
|
|
41928
41828
|
$[4] = props.src;
|
|
@@ -41934,7 +41834,7 @@ var Img = function(props) {
|
|
|
41934
41834
|
} else {
|
|
41935
41835
|
var _t3;
|
|
41936
41836
|
if ($[6] !== props) {
|
|
41937
|
-
_t3 = /* @__PURE__ */
|
|
41837
|
+
_t3 = /* @__PURE__ */ _jsx36(Image, _objectSpread21({}, props));
|
|
41938
41838
|
$[6] = props;
|
|
41939
41839
|
$[7] = _t3;
|
|
41940
41840
|
} else {
|
|
@@ -41946,20 +41846,20 @@ var Img = function(props) {
|
|
|
41946
41846
|
}
|
|
41947
41847
|
};
|
|
41948
41848
|
// src/contexts/markdown/MarkdownContext/lib/components/Annotation/index.tsx
|
|
41949
|
-
import { c as
|
|
41849
|
+
import { c as _c40 } from "react-compiler-runtime";
|
|
41950
41850
|
import { QuoteIcon } from "@radix-ui/react-icons";
|
|
41951
41851
|
// src/components/annotations/FilePathAnnotation.tsx
|
|
41952
|
-
import { c as
|
|
41953
|
-
import { jsx as
|
|
41852
|
+
import { c as _c38 } from "react-compiler-runtime";
|
|
41853
|
+
import { jsx as _jsx37 } from "react/jsx-runtime";
|
|
41954
41854
|
var FilePathAnnotation = function(t0) {
|
|
41955
|
-
var $ =
|
|
41855
|
+
var $ = _c38(3);
|
|
41956
41856
|
var annotation = t0.annotation, children = t0.children;
|
|
41957
41857
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
41958
41858
|
var nextSearchParams = new URLSearchParams(superinterfaceContext.variables);
|
|
41959
41859
|
var t1 = "".concat(superinterfaceContext.baseUrl, "/files/").concat(annotation.file_path.file_id, "/contents?").concat(nextSearchParams);
|
|
41960
41860
|
var t2;
|
|
41961
41861
|
if ($[0] !== children || $[1] !== t1) {
|
|
41962
|
-
t2 = /* @__PURE__ */
|
|
41862
|
+
t2 = /* @__PURE__ */ _jsx37(Link, {
|
|
41963
41863
|
href: t1,
|
|
41964
41864
|
target: "_self",
|
|
41965
41865
|
download: true,
|
|
@@ -41974,16 +41874,16 @@ var FilePathAnnotation = function(t0) {
|
|
|
41974
41874
|
return t2;
|
|
41975
41875
|
};
|
|
41976
41876
|
// src/contexts/markdown/MarkdownContext/lib/components/Annotation/AnnotationBase.tsx
|
|
41977
|
-
import { c as
|
|
41978
|
-
import { IconButton as IconButton4, Popover as Popover4, Flex as
|
|
41979
|
-
import { jsx as
|
|
41877
|
+
import { c as _c39 } from "react-compiler-runtime";
|
|
41878
|
+
import { IconButton as IconButton4, Popover as Popover4, Flex as Flex8, Text as Text5 } from "@radix-ui/themes";
|
|
41879
|
+
import { jsx as _jsx38, jsxs as _jsxs13 } from "react/jsx-runtime";
|
|
41980
41880
|
var AnnotationBase = function(t0) {
|
|
41981
|
-
var $ =
|
|
41881
|
+
var $ = _c39(7);
|
|
41982
41882
|
var icon = t0.icon, content2 = t0.content;
|
|
41983
41883
|
var t1;
|
|
41984
41884
|
if ($[0] !== icon) {
|
|
41985
|
-
t1 = /* @__PURE__ */
|
|
41986
|
-
children: /* @__PURE__ */
|
|
41885
|
+
t1 = /* @__PURE__ */ _jsx38(Popover4.Trigger, {
|
|
41886
|
+
children: /* @__PURE__ */ _jsx38(IconButton4, {
|
|
41987
41887
|
variant: "soft",
|
|
41988
41888
|
color: "gray",
|
|
41989
41889
|
size: "1",
|
|
@@ -41997,11 +41897,11 @@ var AnnotationBase = function(t0) {
|
|
|
41997
41897
|
}
|
|
41998
41898
|
var t2;
|
|
41999
41899
|
if ($[2] !== content2) {
|
|
42000
|
-
t2 = /* @__PURE__ */
|
|
41900
|
+
t2 = /* @__PURE__ */ _jsx38(Popover4.Content, {
|
|
42001
41901
|
size: "1",
|
|
42002
|
-
children: /* @__PURE__ */
|
|
41902
|
+
children: /* @__PURE__ */ _jsx38(Flex8, {
|
|
42003
41903
|
direction: "column",
|
|
42004
|
-
children: /* @__PURE__ */
|
|
41904
|
+
children: /* @__PURE__ */ _jsx38(Text5, {
|
|
42005
41905
|
size: "1",
|
|
42006
41906
|
color: "gray",
|
|
42007
41907
|
children: content2
|
|
@@ -42015,7 +41915,7 @@ var AnnotationBase = function(t0) {
|
|
|
42015
41915
|
}
|
|
42016
41916
|
var t3;
|
|
42017
41917
|
if ($[4] !== t1 || $[5] !== t2) {
|
|
42018
|
-
t3 = /* @__PURE__ */
|
|
41918
|
+
t3 = /* @__PURE__ */ _jsxs13(Popover4.Root, {
|
|
42019
41919
|
children: [
|
|
42020
41920
|
t1,
|
|
42021
41921
|
t2
|
|
@@ -42030,7 +41930,7 @@ var AnnotationBase = function(t0) {
|
|
|
42030
41930
|
return t3;
|
|
42031
41931
|
};
|
|
42032
41932
|
// src/contexts/markdown/MarkdownContext/lib/components/Annotation/index.tsx
|
|
42033
|
-
import { jsx as
|
|
41933
|
+
import { jsx as _jsx39 } from "react/jsx-runtime";
|
|
42034
41934
|
var _excluded = [
|
|
42035
41935
|
"children"
|
|
42036
41936
|
];
|
|
@@ -42053,7 +41953,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
42053
41953
|
return t;
|
|
42054
41954
|
}
|
|
42055
41955
|
var Annotation = function(t0) {
|
|
42056
|
-
var $ =
|
|
41956
|
+
var $ = _c40(9);
|
|
42057
41957
|
var children;
|
|
42058
41958
|
var rest;
|
|
42059
41959
|
if ($[0] !== t0) {
|
|
@@ -42081,8 +41981,8 @@ var Annotation = function(t0) {
|
|
|
42081
41981
|
if (annotation.type === "file_citation") {
|
|
42082
41982
|
var t2;
|
|
42083
41983
|
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
42084
|
-
t2 = /* @__PURE__ */
|
|
42085
|
-
icon: /* @__PURE__ */
|
|
41984
|
+
t2 = /* @__PURE__ */ _jsx39(AnnotationBase, {
|
|
41985
|
+
icon: /* @__PURE__ */ _jsx39(QuoteIcon, {}),
|
|
42086
41986
|
content: "File cited."
|
|
42087
41987
|
});
|
|
42088
41988
|
$[5] = t2;
|
|
@@ -42094,7 +41994,7 @@ var Annotation = function(t0) {
|
|
|
42094
41994
|
if (annotation.type === "file_path") {
|
|
42095
41995
|
var _t2;
|
|
42096
41996
|
if ($[6] !== annotation || $[7] !== children) {
|
|
42097
|
-
_t2 = /* @__PURE__ */
|
|
41997
|
+
_t2 = /* @__PURE__ */ _jsx39(FilePathAnnotation, {
|
|
42098
41998
|
annotation: annotation,
|
|
42099
41999
|
children: children
|
|
42100
42000
|
});
|
|
@@ -42110,7 +42010,7 @@ var Annotation = function(t0) {
|
|
|
42110
42010
|
return null;
|
|
42111
42011
|
};
|
|
42112
42012
|
// src/contexts/markdown/MarkdownContext/lib/components/index.tsx
|
|
42113
|
-
import { jsx as
|
|
42013
|
+
import { jsx as _jsx40, Fragment as _Fragment, jsxs as _jsxs14 } from "react/jsx-runtime";
|
|
42114
42014
|
var _excluded2 = [
|
|
42115
42015
|
"width"
|
|
42116
42016
|
];
|
|
@@ -42187,53 +42087,53 @@ var components = {
|
|
|
42187
42087
|
img: Img,
|
|
42188
42088
|
annotation: Annotation,
|
|
42189
42089
|
h1: function(props) {
|
|
42190
|
-
return /* @__PURE__ */
|
|
42090
|
+
return /* @__PURE__ */ _jsx40(Heading, {
|
|
42191
42091
|
as: "h1",
|
|
42192
42092
|
children: props.children
|
|
42193
42093
|
});
|
|
42194
42094
|
},
|
|
42195
42095
|
h2: function(props) {
|
|
42196
|
-
return /* @__PURE__ */
|
|
42096
|
+
return /* @__PURE__ */ _jsx40(Heading, {
|
|
42197
42097
|
as: "h2",
|
|
42198
42098
|
size: "5",
|
|
42199
42099
|
children: props.children
|
|
42200
42100
|
});
|
|
42201
42101
|
},
|
|
42202
42102
|
h3: function(props) {
|
|
42203
|
-
return /* @__PURE__ */
|
|
42103
|
+
return /* @__PURE__ */ _jsx40(Heading, {
|
|
42204
42104
|
as: "h3",
|
|
42205
42105
|
size: "4",
|
|
42206
42106
|
children: props.children
|
|
42207
42107
|
});
|
|
42208
42108
|
},
|
|
42209
42109
|
h4: function(props) {
|
|
42210
|
-
return /* @__PURE__ */
|
|
42110
|
+
return /* @__PURE__ */ _jsx40(Heading, {
|
|
42211
42111
|
as: "h4",
|
|
42212
42112
|
size: "3",
|
|
42213
42113
|
children: props.children
|
|
42214
42114
|
});
|
|
42215
42115
|
},
|
|
42216
42116
|
h5: function(props) {
|
|
42217
|
-
return /* @__PURE__ */
|
|
42117
|
+
return /* @__PURE__ */ _jsx40(Heading, {
|
|
42218
42118
|
as: "h5",
|
|
42219
42119
|
size: "3",
|
|
42220
42120
|
children: props.children
|
|
42221
42121
|
});
|
|
42222
42122
|
},
|
|
42223
42123
|
h6: function(props) {
|
|
42224
|
-
return /* @__PURE__ */
|
|
42124
|
+
return /* @__PURE__ */ _jsx40(Heading, {
|
|
42225
42125
|
as: "h6",
|
|
42226
42126
|
size: "3",
|
|
42227
42127
|
children: props.children
|
|
42228
42128
|
});
|
|
42229
42129
|
},
|
|
42230
42130
|
table: function(props) {
|
|
42231
|
-
return /* @__PURE__ */
|
|
42131
|
+
return /* @__PURE__ */ _jsxs14(_Fragment, {
|
|
42232
42132
|
children: [
|
|
42233
|
-
/* @__PURE__ */
|
|
42133
|
+
/* @__PURE__ */ _jsx40("style", {
|
|
42234
42134
|
children: ".rt-TableRootTable { overflow: inherit; }"
|
|
42235
42135
|
}),
|
|
42236
|
-
/* @__PURE__ */
|
|
42136
|
+
/* @__PURE__ */ _jsx40(Table.Root, _objectSpread22(_objectSpread22({}, props), {}, {
|
|
42237
42137
|
variant: "surface",
|
|
42238
42138
|
mb: "3"
|
|
42239
42139
|
}))
|
|
@@ -42241,22 +42141,22 @@ var components = {
|
|
|
42241
42141
|
});
|
|
42242
42142
|
},
|
|
42243
42143
|
thead: function(props) {
|
|
42244
|
-
return /* @__PURE__ */
|
|
42144
|
+
return /* @__PURE__ */ _jsx40(Table.Header, _objectSpread22({}, props));
|
|
42245
42145
|
},
|
|
42246
42146
|
tbody: function(props) {
|
|
42247
|
-
return /* @__PURE__ */
|
|
42147
|
+
return /* @__PURE__ */ _jsx40(Table.Body, _objectSpread22({}, props));
|
|
42248
42148
|
},
|
|
42249
42149
|
tr: function(props) {
|
|
42250
|
-
return /* @__PURE__ */
|
|
42150
|
+
return /* @__PURE__ */ _jsx40(Table.Row, _objectSpread22({}, props));
|
|
42251
42151
|
},
|
|
42252
42152
|
td: function(_ref) {
|
|
42253
42153
|
var width2 = _ref.width, rest = _objectWithoutProperties2(_ref, _excluded2);
|
|
42254
|
-
return /* @__PURE__ */
|
|
42154
|
+
return /* @__PURE__ */ _jsx40(Table.Cell, _objectSpread22(_objectSpread22({}, rest), {}, {
|
|
42255
42155
|
width: width2
|
|
42256
42156
|
}));
|
|
42257
42157
|
},
|
|
42258
42158
|
th: function(props) {
|
|
42259
|
-
return /* @__PURE__ */
|
|
42159
|
+
return /* @__PURE__ */ _jsx40(Table.ColumnHeaderCell, _objectSpread22({}, props));
|
|
42260
42160
|
}
|
|
42261
42161
|
};
|
|
42262
42162
|
// src/contexts/markdown/MarkdownContext/lib/getRemarkPlugins.ts
|
|
@@ -42597,13 +42497,13 @@ var getRemarkPlugins = function(_ref) {
|
|
|
42597
42497
|
];
|
|
42598
42498
|
};
|
|
42599
42499
|
// src/contexts/markdown/MarkdownContext/index.ts
|
|
42600
|
-
var MarkdownContext = /* @__PURE__ */
|
|
42500
|
+
var MarkdownContext = /* @__PURE__ */ createContext4({
|
|
42601
42501
|
components: components,
|
|
42602
42502
|
getRemarkPlugins: getRemarkPlugins
|
|
42603
42503
|
});
|
|
42604
42504
|
// src/hooks/markdown/useMarkdownContext/index.ts
|
|
42605
42505
|
var useMarkdownContext = function() {
|
|
42606
|
-
return
|
|
42506
|
+
return useContext5(MarkdownContext);
|
|
42607
42507
|
};
|
|
42608
42508
|
// src/lib/markdown/escapeInvalidTagNames.ts
|
|
42609
42509
|
var isValidTagName = function(tagName) {
|
|
@@ -42615,8 +42515,8 @@ var escapeInvalidTagNames = function(markdown) {
|
|
|
42615
42515
|
});
|
|
42616
42516
|
};
|
|
42617
42517
|
// ../../node_modules/react-error-boundary/dist/react-error-boundary.esm.js
|
|
42618
|
-
import { createContext as
|
|
42619
|
-
var ErrorBoundaryContext = /* @__PURE__ */
|
|
42518
|
+
import { createContext as createContext5, Component, createElement, useContext as useContext6, useState as useState2, useMemo as useMemo8, forwardRef } from "react";
|
|
42519
|
+
var ErrorBoundaryContext = /* @__PURE__ */ createContext5(null);
|
|
42620
42520
|
var initialState = {
|
|
42621
42521
|
didCatch: false,
|
|
42622
42522
|
error: null
|
|
@@ -42725,8 +42625,8 @@ function hasArrayChanged() {
|
|
|
42725
42625
|
return !Object.is(item, b[index]);
|
|
42726
42626
|
});
|
|
42727
42627
|
}
|
|
42728
|
-
// src/components/
|
|
42729
|
-
import { jsx as
|
|
42628
|
+
// src/components/contents/TextContent.tsx
|
|
42629
|
+
import { jsx as _jsx41 } from "react/jsx-runtime";
|
|
42730
42630
|
function ownKeys24(e, r) {
|
|
42731
42631
|
var t = Object.keys(e);
|
|
42732
42632
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -42812,7 +42712,7 @@ var evaluate = /* @__PURE__ */ function() {
|
|
|
42812
42712
|
};
|
|
42813
42713
|
}();
|
|
42814
42714
|
var TextContent = function(t0) {
|
|
42815
|
-
var $ =
|
|
42715
|
+
var $ = _c41(13);
|
|
42816
42716
|
var content2 = t0.content;
|
|
42817
42717
|
var _useMarkdownContext = useMarkdownContext(), getRemarkPlugins2 = _useMarkdownContext.getRemarkPlugins, components2 = _useMarkdownContext.components;
|
|
42818
42718
|
var t1;
|
|
@@ -42914,7 +42814,7 @@ var TextContent = function(t0) {
|
|
|
42914
42814
|
}
|
|
42915
42815
|
var t5;
|
|
42916
42816
|
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
42917
|
-
t5 = /* @__PURE__ */
|
|
42817
|
+
t5 = /* @__PURE__ */ _jsx41(Badge, {
|
|
42918
42818
|
color: "red",
|
|
42919
42819
|
mb: "2",
|
|
42920
42820
|
children: "Could not render message."
|
|
@@ -42925,7 +42825,7 @@ var TextContent = function(t0) {
|
|
|
42925
42825
|
}
|
|
42926
42826
|
var t6;
|
|
42927
42827
|
if ($[8] !== MDXComponent) {
|
|
42928
|
-
t6 = /* @__PURE__ */
|
|
42828
|
+
t6 = /* @__PURE__ */ _jsx41(MDXComponent, {});
|
|
42929
42829
|
$[8] = MDXComponent;
|
|
42930
42830
|
$[9] = t6;
|
|
42931
42831
|
} else {
|
|
@@ -42933,9 +42833,9 @@ var TextContent = function(t0) {
|
|
|
42933
42833
|
}
|
|
42934
42834
|
var t7;
|
|
42935
42835
|
if ($[10] !== components2 || $[11] !== t6) {
|
|
42936
|
-
t7 = /* @__PURE__ */
|
|
42836
|
+
t7 = /* @__PURE__ */ _jsx41(ErrorBoundary, {
|
|
42937
42837
|
fallback: t5,
|
|
42938
|
-
children: /* @__PURE__ */
|
|
42838
|
+
children: /* @__PURE__ */ _jsx41(MDXProvider, {
|
|
42939
42839
|
components: components2,
|
|
42940
42840
|
children: t6
|
|
42941
42841
|
})
|
|
@@ -42948,18 +42848,18 @@ var TextContent = function(t0) {
|
|
|
42948
42848
|
}
|
|
42949
42849
|
return t7;
|
|
42950
42850
|
};
|
|
42951
|
-
// src/components/
|
|
42952
|
-
import { c as
|
|
42953
|
-
import { jsx as
|
|
42851
|
+
// src/components/contents/ImageFileContent.tsx
|
|
42852
|
+
import { c as _c42 } from "react-compiler-runtime";
|
|
42853
|
+
import { jsx as _jsx42 } from "react/jsx-runtime";
|
|
42954
42854
|
var ImageFileContent = function(t0) {
|
|
42955
|
-
var $ =
|
|
42855
|
+
var $ = _c42(2);
|
|
42956
42856
|
var content2 = t0.content;
|
|
42957
42857
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
42958
42858
|
var nextSearchParams = new URLSearchParams(superinterfaceContext.variables);
|
|
42959
42859
|
var t1 = "".concat(superinterfaceContext.baseUrl, "/files/").concat(content2.image_file.file_id, "/contents?").concat(nextSearchParams);
|
|
42960
42860
|
var t2;
|
|
42961
42861
|
if ($[0] !== t1) {
|
|
42962
|
-
t2 = /* @__PURE__ */
|
|
42862
|
+
t2 = /* @__PURE__ */ _jsx42(Image, {
|
|
42963
42863
|
alt: "",
|
|
42964
42864
|
src: t1
|
|
42965
42865
|
});
|
|
@@ -42970,15 +42870,156 @@ var ImageFileContent = function(t0) {
|
|
|
42970
42870
|
}
|
|
42971
42871
|
return t2;
|
|
42972
42872
|
};
|
|
42873
|
+
// src/contexts/components/ComponentsContext/index.tsx
|
|
42874
|
+
var ComponentsContext = /* @__PURE__ */ createContext6({
|
|
42875
|
+
components: {
|
|
42876
|
+
RunStep: RunStep,
|
|
42877
|
+
Function: Function2,
|
|
42878
|
+
StartingToolCalls: StartingToolCalls2,
|
|
42879
|
+
TextContent: TextContent,
|
|
42880
|
+
ImageFileContent: ImageFileContent
|
|
42881
|
+
}
|
|
42882
|
+
});
|
|
42883
|
+
// src/components/runSteps/RunSteps/index.tsx
|
|
42884
|
+
import { jsx as _jsx43 } from "react/jsx-runtime";
|
|
42885
|
+
var RunSteps = function(t0) {
|
|
42886
|
+
var $ = _c43(7);
|
|
42887
|
+
var runSteps = t0.runSteps;
|
|
42888
|
+
var componentsContext = useContext7(ComponentsContext);
|
|
42889
|
+
var Component2 = componentsContext.components.RunStep;
|
|
42890
|
+
var t1;
|
|
42891
|
+
if ($[0] !== Component2 || $[1] !== runSteps) {
|
|
42892
|
+
var _t;
|
|
42893
|
+
if ($[3] !== Component2) {
|
|
42894
|
+
_t = function(runStep) {
|
|
42895
|
+
return /* @__PURE__ */ _jsx43(Component2, {
|
|
42896
|
+
runStep: runStep
|
|
42897
|
+
}, runStep.id);
|
|
42898
|
+
};
|
|
42899
|
+
$[3] = Component2;
|
|
42900
|
+
$[4] = _t;
|
|
42901
|
+
} else {
|
|
42902
|
+
_t = $[4];
|
|
42903
|
+
}
|
|
42904
|
+
t1 = runSteps.map(_t);
|
|
42905
|
+
$[0] = Component2;
|
|
42906
|
+
$[1] = runSteps;
|
|
42907
|
+
$[2] = t1;
|
|
42908
|
+
} else {
|
|
42909
|
+
t1 = $[2];
|
|
42910
|
+
}
|
|
42911
|
+
var t2;
|
|
42912
|
+
if ($[5] !== t1) {
|
|
42913
|
+
t2 = /* @__PURE__ */ _jsx43(Flex9, {
|
|
42914
|
+
direction: "column-reverse",
|
|
42915
|
+
children: t1
|
|
42916
|
+
});
|
|
42917
|
+
$[5] = t1;
|
|
42918
|
+
$[6] = t2;
|
|
42919
|
+
} else {
|
|
42920
|
+
t2 = $[6];
|
|
42921
|
+
}
|
|
42922
|
+
return t2;
|
|
42923
|
+
};
|
|
42924
|
+
// src/contexts/messages/MessageContext/index.ts
|
|
42925
|
+
import { createContext as createContext7 } from "react";
|
|
42926
|
+
var MessageContext = /* @__PURE__ */ createContext7({
|
|
42927
|
+
message: null
|
|
42928
|
+
});
|
|
42929
|
+
// src/components/threads/Thread/Message/Provider.tsx
|
|
42930
|
+
var Provider = MessageContext.Provider;
|
|
42931
|
+
// src/components/threads/Thread/Message/Attachments/index.tsx
|
|
42932
|
+
import { c as _c44 } from "react-compiler-runtime";
|
|
42933
|
+
import { Flex as Flex10, Badge as Badge2 } from "@radix-ui/themes";
|
|
42934
|
+
import { FileIcon } from "@radix-ui/react-icons";
|
|
42935
|
+
import { jsx as _jsx44, jsxs as _jsxs15 } from "react/jsx-runtime";
|
|
42936
|
+
var Attachments = function(t0) {
|
|
42937
|
+
var _message$attachments;
|
|
42938
|
+
var $ = _c44(4);
|
|
42939
|
+
var message = t0.message;
|
|
42940
|
+
if (!((_message$attachments = message.attachments) !== null && _message$attachments !== void 0 && _message$attachments.length)) {
|
|
42941
|
+
return null;
|
|
42942
|
+
}
|
|
42943
|
+
var t1;
|
|
42944
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
42945
|
+
t1 = /* @__PURE__ */ _jsx44(FileIcon, {});
|
|
42946
|
+
$[0] = t1;
|
|
42947
|
+
} else {
|
|
42948
|
+
t1 = $[0];
|
|
42949
|
+
}
|
|
42950
|
+
var t2 = message.attachments.length > 1 ? "s" : "";
|
|
42951
|
+
var t3;
|
|
42952
|
+
if ($[1] !== message.attachments.length || $[2] !== t2) {
|
|
42953
|
+
t3 = /* @__PURE__ */ _jsx44(Flex10, {
|
|
42954
|
+
align: "start",
|
|
42955
|
+
pb: "1",
|
|
42956
|
+
children: /* @__PURE__ */ _jsxs15(Badge2, {
|
|
42957
|
+
color: "gray",
|
|
42958
|
+
variant: "surface",
|
|
42959
|
+
children: [
|
|
42960
|
+
t1,
|
|
42961
|
+
message.attachments.length,
|
|
42962
|
+
" file",
|
|
42963
|
+
t2
|
|
42964
|
+
]
|
|
42965
|
+
})
|
|
42966
|
+
});
|
|
42967
|
+
$[1] = message.attachments.length;
|
|
42968
|
+
$[2] = t2;
|
|
42969
|
+
$[3] = t3;
|
|
42970
|
+
} else {
|
|
42971
|
+
t3 = $[3];
|
|
42972
|
+
}
|
|
42973
|
+
return t3;
|
|
42974
|
+
};
|
|
42975
|
+
// src/components/messages/MessageContent/index.tsx
|
|
42976
|
+
import { c as _c46 } from "react-compiler-runtime";
|
|
42973
42977
|
// src/components/messages/MessageContent/ContentPart/index.tsx
|
|
42978
|
+
import { c as _c45 } from "react-compiler-runtime";
|
|
42974
42979
|
import { jsx as _jsx45 } from "react/jsx-runtime";
|
|
42980
|
+
var TextContent2 = function(t0) {
|
|
42981
|
+
var $ = _c45(3);
|
|
42982
|
+
var content2 = t0.content;
|
|
42983
|
+
var _useComponents = useComponents(), t1 = _useComponents.components;
|
|
42984
|
+
var TextContent3 = t1.TextContent;
|
|
42985
|
+
var t2;
|
|
42986
|
+
if ($[0] !== TextContent3 || $[1] !== content2) {
|
|
42987
|
+
t2 = /* @__PURE__ */ _jsx45(TextContent3, {
|
|
42988
|
+
content: content2
|
|
42989
|
+
});
|
|
42990
|
+
$[0] = TextContent3;
|
|
42991
|
+
$[1] = content2;
|
|
42992
|
+
$[2] = t2;
|
|
42993
|
+
} else {
|
|
42994
|
+
t2 = $[2];
|
|
42995
|
+
}
|
|
42996
|
+
return t2;
|
|
42997
|
+
};
|
|
42998
|
+
var ImageFileContent2 = function(t0) {
|
|
42999
|
+
var $ = _c45(3);
|
|
43000
|
+
var content2 = t0.content;
|
|
43001
|
+
var _useComponents = useComponents(), t1 = _useComponents.components;
|
|
43002
|
+
var ImageFileContent3 = t1.ImageFileContent;
|
|
43003
|
+
var t2;
|
|
43004
|
+
if ($[0] !== ImageFileContent3 || $[1] !== content2) {
|
|
43005
|
+
t2 = /* @__PURE__ */ _jsx45(ImageFileContent3, {
|
|
43006
|
+
content: content2
|
|
43007
|
+
});
|
|
43008
|
+
$[0] = ImageFileContent3;
|
|
43009
|
+
$[1] = content2;
|
|
43010
|
+
$[2] = t2;
|
|
43011
|
+
} else {
|
|
43012
|
+
t2 = $[2];
|
|
43013
|
+
}
|
|
43014
|
+
return t2;
|
|
43015
|
+
};
|
|
42975
43016
|
var ContentPart = function(t0) {
|
|
42976
43017
|
var $ = _c45(4);
|
|
42977
43018
|
var content2 = t0.content;
|
|
42978
43019
|
if (content2.type === "text") {
|
|
42979
43020
|
var t1;
|
|
42980
43021
|
if ($[0] !== content2) {
|
|
42981
|
-
t1 = /* @__PURE__ */ _jsx45(
|
|
43022
|
+
t1 = /* @__PURE__ */ _jsx45(TextContent2, {
|
|
42982
43023
|
content: content2
|
|
42983
43024
|
});
|
|
42984
43025
|
$[0] = content2;
|
|
@@ -42991,7 +43032,7 @@ var ContentPart = function(t0) {
|
|
|
42991
43032
|
if (content2.type === "image_file") {
|
|
42992
43033
|
var _t;
|
|
42993
43034
|
if ($[2] !== content2) {
|
|
42994
|
-
_t = /* @__PURE__ */ _jsx45(
|
|
43035
|
+
_t = /* @__PURE__ */ _jsx45(ImageFileContent2, {
|
|
42995
43036
|
content: content2
|
|
42996
43037
|
});
|
|
42997
43038
|
$[2] = content2;
|
|
@@ -50676,12 +50717,6 @@ var Avatar6 = function(t0) {
|
|
|
50676
50717
|
// src/components/components/ComponentsProvider.tsx
|
|
50677
50718
|
import { c as _c104 } from "react-compiler-runtime";
|
|
50678
50719
|
import { useMemo as useMemo23 } from "react";
|
|
50679
|
-
// src/hooks/components/useComponents.ts
|
|
50680
|
-
import { useContext as useContext18 } from "react";
|
|
50681
|
-
var useComponents = function() {
|
|
50682
|
-
return useContext18(ComponentsContext);
|
|
50683
|
-
};
|
|
50684
|
-
// src/components/components/ComponentsProvider.tsx
|
|
50685
50720
|
import { jsx as _jsx102 } from "react/jsx-runtime";
|
|
50686
50721
|
var _excluded9 = [
|
|
50687
50722
|
"children"
|