@flamingo-stack/openframe-frontend-core 0.0.540 → 0.0.541
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/{chunk-AQO2DWL2.js → chunk-2MO4NEIR.js} +2 -2
- package/dist/{chunk-5W4R3BUR.js → chunk-3KEAUJUU.js} +2 -2
- package/dist/{chunk-5ZRO72K4.cjs → chunk-4JL2WTIC.cjs} +9 -9
- package/dist/{chunk-5ZRO72K4.cjs.map → chunk-4JL2WTIC.cjs.map} +1 -1
- package/dist/{chunk-4PZEGH6E.cjs → chunk-52FXIY2M.cjs} +5 -5
- package/dist/{chunk-4PZEGH6E.cjs.map → chunk-52FXIY2M.cjs.map} +1 -1
- package/dist/{chunk-DC23N4XW.cjs → chunk-57K53PKB.cjs} +26 -26
- package/dist/{chunk-DC23N4XW.cjs.map → chunk-57K53PKB.cjs.map} +1 -1
- package/dist/{chunk-PV6L6F3T.cjs → chunk-6B6RCBVM.cjs} +87 -87
- package/dist/{chunk-PV6L6F3T.cjs.map → chunk-6B6RCBVM.cjs.map} +1 -1
- package/dist/{chunk-MKDOZF4C.js → chunk-A5USNYZA.js} +2 -2
- package/dist/{chunk-NQSGY5HW.js → chunk-BYKPDIVC.js} +780 -719
- package/dist/chunk-BYKPDIVC.js.map +1 -0
- package/dist/{chunk-YPTOQDCY.cjs → chunk-COZAC2RY.cjs} +4 -4
- package/dist/{chunk-YPTOQDCY.cjs.map → chunk-COZAC2RY.cjs.map} +1 -1
- package/dist/{chunk-IHGRWAUC.cjs → chunk-EVJ7DVCI.cjs} +61 -61
- package/dist/{chunk-IHGRWAUC.cjs.map → chunk-EVJ7DVCI.cjs.map} +1 -1
- package/dist/{chunk-4RXV54PY.cjs → chunk-FESVTVRZ.cjs} +11 -11
- package/dist/{chunk-4RXV54PY.cjs.map → chunk-FESVTVRZ.cjs.map} +1 -1
- package/dist/{chunk-TBMMC4GS.cjs → chunk-FUF6YX7H.cjs} +7 -7
- package/dist/{chunk-TBMMC4GS.cjs.map → chunk-FUF6YX7H.cjs.map} +1 -1
- package/dist/{chunk-XPGB6J75.js → chunk-HUXNMQD7.js} +6 -6
- package/dist/{chunk-F5R4IMRF.js → chunk-ITUVIG7K.js} +2 -2
- package/dist/{chunk-Y5TDZNWA.js → chunk-J6F4342G.js} +2 -2
- package/dist/{chunk-WA3IEPEY.js → chunk-JOQBVXM3.js} +2 -2
- package/dist/{chunk-6PBD57IZ.cjs → chunk-JWSWACXB.cjs} +14 -14
- package/dist/{chunk-6PBD57IZ.cjs.map → chunk-JWSWACXB.cjs.map} +1 -1
- package/dist/{chunk-IRTAZKWK.cjs → chunk-KJZVKS7X.cjs} +3 -3
- package/dist/{chunk-IRTAZKWK.cjs.map → chunk-KJZVKS7X.cjs.map} +1 -1
- package/dist/{chunk-IP4IZ4PB.js → chunk-KRXQVZRX.js} +5 -5
- package/dist/{chunk-N24ZUZZZ.cjs → chunk-NJ42DNRT.cjs} +31 -31
- package/dist/{chunk-N24ZUZZZ.cjs.map → chunk-NJ42DNRT.cjs.map} +1 -1
- package/dist/{chunk-GRU75FOX.cjs → chunk-NJ7QTEJM.cjs} +26 -26
- package/dist/{chunk-GRU75FOX.cjs.map → chunk-NJ7QTEJM.cjs.map} +1 -1
- package/dist/{chunk-VYQLCGFR.js → chunk-QZEEP2FO.js} +4 -4
- package/dist/{chunk-X5VMEFIA.js → chunk-RNVMGZSM.js} +2 -2
- package/dist/{chunk-2BKR65LQ.js → chunk-RZWZCDBG.js} +2 -2
- package/dist/{chunk-VUVKZBDO.js → chunk-T2NU3GZ7.js} +4 -4
- package/dist/{chunk-75W6ETMW.cjs → chunk-T7ZTT7TO.cjs} +66 -5
- package/dist/chunk-T7ZTT7TO.cjs.map +1 -0
- package/dist/{chunk-MXKY67SV.cjs → chunk-VKBGJGYF.cjs} +37 -37
- package/dist/{chunk-MXKY67SV.cjs.map → chunk-VKBGJGYF.cjs.map} +1 -1
- package/dist/{chunk-6WUUZ43M.js → chunk-XFYSYVXN.js} +2 -2
- package/dist/components/case-studies/index.cjs +8 -8
- package/dist/components/case-studies/index.js +2 -2
- package/dist/components/chat/index.cjs +2 -2
- package/dist/components/chat/index.js +1 -1
- package/dist/components/contact/index.cjs +3 -3
- package/dist/components/contact/index.js +2 -2
- package/dist/components/docs/index.cjs +5 -5
- package/dist/components/docs/index.js +4 -4
- package/dist/components/embeds/index.cjs +3 -3
- package/dist/components/embeds/index.js +2 -2
- package/dist/components/faq/index.cjs +3 -3
- package/dist/components/faq/index.js +2 -2
- package/dist/components/features/index.cjs +2 -2
- package/dist/components/features/index.js +1 -1
- package/dist/components/help-center-pages/index.cjs +22 -22
- package/dist/components/help-center-pages/index.js +13 -13
- package/dist/components/index.cjs +134 -132
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +13 -11
- package/dist/components/index.js.map +1 -1
- package/dist/components/meeting-scheduler/index.cjs +34 -34
- package/dist/components/meeting-scheduler/index.js +3 -3
- package/dist/components/navigation/index.cjs +2 -2
- package/dist/components/navigation/index.js +1 -1
- package/dist/components/onboarding-guides/index.cjs +5 -5
- package/dist/components/onboarding-guides/index.js +4 -4
- package/dist/components/related-content/index.cjs +3 -3
- package/dist/components/related-content/index.js +2 -2
- package/dist/components/tickets/index.cjs +6 -6
- package/dist/components/tickets/index.js +5 -5
- package/dist/components/ui/index.cjs +4 -2
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +3 -1
- package/dist/components/ui/reopen-ticket-request-modal.d.ts +33 -0
- package/dist/components/ui/reopen-ticket-request-modal.d.ts.map +1 -0
- package/dist/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -1
- package/package.json +1 -1
- package/src/components/ui/index.ts +1 -0
- package/src/components/ui/reopen-ticket-request-modal.tsx +112 -0
- package/src/stories/ReopenTicketRequestModal.stories.tsx +90 -0
- package/dist/chunk-75W6ETMW.cjs.map +0 -1
- package/dist/chunk-NQSGY5HW.js.map +0 -1
- /package/dist/{chunk-AQO2DWL2.js.map → chunk-2MO4NEIR.js.map} +0 -0
- /package/dist/{chunk-5W4R3BUR.js.map → chunk-3KEAUJUU.js.map} +0 -0
- /package/dist/{chunk-MKDOZF4C.js.map → chunk-A5USNYZA.js.map} +0 -0
- /package/dist/{chunk-XPGB6J75.js.map → chunk-HUXNMQD7.js.map} +0 -0
- /package/dist/{chunk-F5R4IMRF.js.map → chunk-ITUVIG7K.js.map} +0 -0
- /package/dist/{chunk-Y5TDZNWA.js.map → chunk-J6F4342G.js.map} +0 -0
- /package/dist/{chunk-WA3IEPEY.js.map → chunk-JOQBVXM3.js.map} +0 -0
- /package/dist/{chunk-IP4IZ4PB.js.map → chunk-KRXQVZRX.js.map} +0 -0
- /package/dist/{chunk-VYQLCGFR.js.map → chunk-QZEEP2FO.js.map} +0 -0
- /package/dist/{chunk-X5VMEFIA.js.map → chunk-RNVMGZSM.js.map} +0 -0
- /package/dist/{chunk-2BKR65LQ.js.map → chunk-RZWZCDBG.js.map} +0 -0
- /package/dist/{chunk-VUVKZBDO.js.map → chunk-T2NU3GZ7.js.map} +0 -0
- /package/dist/{chunk-6WUUZ43M.js.map → chunk-XFYSYVXN.js.map} +0 -0
|
@@ -16981,7 +16981,7 @@ function OnboardingGuideCard({
|
|
|
16981
16981
|
}
|
|
16982
16982
|
|
|
16983
16983
|
// src/components/chat/entity-cards/roadmap-card.tsx
|
|
16984
|
-
import { useState as
|
|
16984
|
+
import { useState as useState116 } from "react";
|
|
16985
16985
|
import { ThumbsUp, ThumbsDown } from "lucide-react";
|
|
16986
16986
|
|
|
16987
16987
|
// src/components/chat/entity-cards/roadmap-vote-button.tsx
|
|
@@ -17083,7 +17083,7 @@ function AvatarStack({
|
|
|
17083
17083
|
init_button();
|
|
17084
17084
|
|
|
17085
17085
|
// src/components/ui/image-gallery-modal.tsx
|
|
17086
|
-
import { useState as
|
|
17086
|
+
import { useState as useState115, useEffect as useEffect87 } from "react";
|
|
17087
17087
|
|
|
17088
17088
|
// src/components/ui/allowed-domains-input.tsx
|
|
17089
17089
|
init_cn();
|
|
@@ -48780,10 +48780,70 @@ function ReopenTicketModal({
|
|
|
48780
48780
|
] });
|
|
48781
48781
|
}
|
|
48782
48782
|
|
|
48783
|
+
// src/components/ui/reopen-ticket-request-modal.tsx
|
|
48784
|
+
init_button2();
|
|
48785
|
+
import * as React145 from "react";
|
|
48786
|
+
import { jsx as jsx376, jsxs as jsxs297 } from "react/jsx-runtime";
|
|
48787
|
+
var REASON_MAX_LENGTH2 = 1e3;
|
|
48788
|
+
function ReopenTicketRequestModal({
|
|
48789
|
+
isOpen,
|
|
48790
|
+
onClose,
|
|
48791
|
+
showHandoffOption = false,
|
|
48792
|
+
isPending = false,
|
|
48793
|
+
onConfirm
|
|
48794
|
+
}) {
|
|
48795
|
+
const [reason, setReason] = React145.useState("");
|
|
48796
|
+
const [handoff, setHandoff] = React145.useState(false);
|
|
48797
|
+
React145.useEffect(() => {
|
|
48798
|
+
if (!isOpen) return;
|
|
48799
|
+
setReason("");
|
|
48800
|
+
setHandoff(false);
|
|
48801
|
+
}, [isOpen]);
|
|
48802
|
+
const handleConfirm = () => {
|
|
48803
|
+
if (isPending) return;
|
|
48804
|
+
const trimmedReason = reason.trim();
|
|
48805
|
+
onConfirm({
|
|
48806
|
+
reason: trimmedReason ? trimmedReason.slice(0, REASON_MAX_LENGTH2) : null,
|
|
48807
|
+
...showHandoffOption ? { handoffToTechnician: handoff } : {}
|
|
48808
|
+
});
|
|
48809
|
+
};
|
|
48810
|
+
return /* @__PURE__ */ jsxs297(Modal, { isOpen, onClose: isPending ? () => {
|
|
48811
|
+
} : onClose, className: "text-left md:max-w-[600px]", children: [
|
|
48812
|
+
/* @__PURE__ */ jsx376(ModalHeader, { children: /* @__PURE__ */ jsx376(ModalTitle, { children: "Reopen Ticket" }) }),
|
|
48813
|
+
/* @__PURE__ */ jsx376("p", { className: "text-h4 text-ods-text-primary", children: "This ticket will be reopened and the AI assistant will continue helping you." }),
|
|
48814
|
+
/* @__PURE__ */ jsx376("div", { className: "w-full", children: /* @__PURE__ */ jsx376(
|
|
48815
|
+
Textarea,
|
|
48816
|
+
{
|
|
48817
|
+
label: "Reason",
|
|
48818
|
+
value: reason,
|
|
48819
|
+
onChange: (event) => setReason(event.target.value),
|
|
48820
|
+
placeholder: "Describe what's still not working (optional)",
|
|
48821
|
+
maxLength: REASON_MAX_LENGTH2,
|
|
48822
|
+
disabled: isPending
|
|
48823
|
+
}
|
|
48824
|
+
) }),
|
|
48825
|
+
showHandoffOption && /* @__PURE__ */ jsx376(
|
|
48826
|
+
CheckboxBlock,
|
|
48827
|
+
{
|
|
48828
|
+
id: "reopen-handoff-to-technician",
|
|
48829
|
+
checked: handoff,
|
|
48830
|
+
onCheckedChange: setHandoff,
|
|
48831
|
+
label: "Hand off to a Technician",
|
|
48832
|
+
description: "A technician will review the ticket and reply when available.",
|
|
48833
|
+
disabled: isPending
|
|
48834
|
+
}
|
|
48835
|
+
),
|
|
48836
|
+
/* @__PURE__ */ jsxs297(ModalFooter, { children: [
|
|
48837
|
+
/* @__PURE__ */ jsx376(Button, { type: "button", variant: "outline", onClick: onClose, disabled: isPending, className: "flex-1", children: "Cancel" }),
|
|
48838
|
+
/* @__PURE__ */ jsx376(Button, { type: "button", variant: "accent", onClick: handleConfirm, loading: isPending, className: "flex-1", children: "Reopen Ticket" })
|
|
48839
|
+
] })
|
|
48840
|
+
] });
|
|
48841
|
+
}
|
|
48842
|
+
|
|
48783
48843
|
// src/components/ui/filter-pill-row.tsx
|
|
48784
48844
|
init_button2();
|
|
48785
48845
|
import { Filter as Filter2 } from "lucide-react";
|
|
48786
|
-
import { jsx as
|
|
48846
|
+
import { jsx as jsx377, jsxs as jsxs298 } from "react/jsx-runtime";
|
|
48787
48847
|
function FilterPillRow({
|
|
48788
48848
|
label,
|
|
48789
48849
|
selectedValue,
|
|
@@ -48792,12 +48852,12 @@ function FilterPillRow({
|
|
|
48792
48852
|
countLabel,
|
|
48793
48853
|
children
|
|
48794
48854
|
}) {
|
|
48795
|
-
return /* @__PURE__ */
|
|
48796
|
-
/* @__PURE__ */
|
|
48797
|
-
/* @__PURE__ */
|
|
48798
|
-
/* @__PURE__ */
|
|
48855
|
+
return /* @__PURE__ */ jsxs298("div", { className: "flex flex-wrap items-center gap-3 p-4 bg-ods-card border border-ods-border rounded-lg", children: [
|
|
48856
|
+
/* @__PURE__ */ jsxs298("div", { className: "flex items-center gap-2", children: [
|
|
48857
|
+
/* @__PURE__ */ jsx377(Filter2, { className: "h-4 w-4 text-ods-accent" }),
|
|
48858
|
+
/* @__PURE__ */ jsx377("span", { className: "text-h5 text-ods-text-secondary", children: label })
|
|
48799
48859
|
] }),
|
|
48800
|
-
children || options.map((opt) => /* @__PURE__ */
|
|
48860
|
+
children || options.map((opt) => /* @__PURE__ */ jsx377(
|
|
48801
48861
|
Button,
|
|
48802
48862
|
{
|
|
48803
48863
|
type: "button",
|
|
@@ -48809,21 +48869,21 @@ function FilterPillRow({
|
|
|
48809
48869
|
},
|
|
48810
48870
|
opt.value
|
|
48811
48871
|
)),
|
|
48812
|
-
countLabel && /* @__PURE__ */
|
|
48872
|
+
countLabel && /* @__PURE__ */ jsx377("div", { className: "ml-auto text-h6 text-ods-text-secondary shrink-0", children: countLabel })
|
|
48813
48873
|
] });
|
|
48814
48874
|
}
|
|
48815
48875
|
|
|
48816
48876
|
// src/components/ui/image-gallery-modal.tsx
|
|
48817
48877
|
import { ChevronLeft as ChevronLeft4, ChevronRight as ChevronRight8 } from "lucide-react";
|
|
48818
|
-
import { Fragment as Fragment78, jsx as
|
|
48878
|
+
import { Fragment as Fragment78, jsx as jsx378, jsxs as jsxs299 } from "react/jsx-runtime";
|
|
48819
48879
|
function ImageGalleryModal({
|
|
48820
48880
|
images,
|
|
48821
48881
|
isOpen,
|
|
48822
48882
|
onClose,
|
|
48823
48883
|
initialIndex = 0
|
|
48824
48884
|
}) {
|
|
48825
|
-
const [selectedImageIndex, setSelectedImageIndex] =
|
|
48826
|
-
|
|
48885
|
+
const [selectedImageIndex, setSelectedImageIndex] = useState115(initialIndex);
|
|
48886
|
+
useEffect87(() => {
|
|
48827
48887
|
if (isOpen) {
|
|
48828
48888
|
setSelectedImageIndex(initialIndex);
|
|
48829
48889
|
}
|
|
@@ -48838,7 +48898,7 @@ function ImageGalleryModal({
|
|
|
48838
48898
|
setSelectedImageIndex(selectedImageIndex + 1);
|
|
48839
48899
|
}
|
|
48840
48900
|
};
|
|
48841
|
-
|
|
48901
|
+
useEffect87(() => {
|
|
48842
48902
|
const handleKeyPress = (event) => {
|
|
48843
48903
|
if (!isOpen) return;
|
|
48844
48904
|
switch (event.key) {
|
|
@@ -48864,36 +48924,36 @@ function ImageGalleryModal({
|
|
|
48864
48924
|
}
|
|
48865
48925
|
}, [isOpen, selectedImageIndex, images.length]);
|
|
48866
48926
|
if (!isOpen || images.length === 0) return null;
|
|
48867
|
-
return /* @__PURE__ */
|
|
48927
|
+
return /* @__PURE__ */ jsx378(
|
|
48868
48928
|
Modal2,
|
|
48869
48929
|
{
|
|
48870
48930
|
isOpen,
|
|
48871
48931
|
onClose,
|
|
48872
48932
|
className: "max-w-[95vw]",
|
|
48873
|
-
children: /* @__PURE__ */
|
|
48874
|
-
images.length > 1 && /* @__PURE__ */
|
|
48875
|
-
selectedImageIndex > 0 && /* @__PURE__ */
|
|
48933
|
+
children: /* @__PURE__ */ jsxs299("div", { className: "relative flex items-center justify-center bg-black rounded-lg", children: [
|
|
48934
|
+
images.length > 1 && /* @__PURE__ */ jsxs299(Fragment78, { children: [
|
|
48935
|
+
selectedImageIndex > 0 && /* @__PURE__ */ jsx378("div", { className: "absolute left-4 top-1/2 -translate-y-1/2 z-[10000]", children: /* @__PURE__ */ jsx378(
|
|
48876
48936
|
Button,
|
|
48877
48937
|
{
|
|
48878
48938
|
variant: "transparent",
|
|
48879
48939
|
size: "small-legacy",
|
|
48880
48940
|
onClick: goToPreviousImage,
|
|
48881
48941
|
className: "rounded-full bg-black/50 text-white hover:bg-black/70 p-2",
|
|
48882
|
-
leftIcon: /* @__PURE__ */
|
|
48942
|
+
leftIcon: /* @__PURE__ */ jsx378(ChevronLeft4, { className: "w-6 h-6" })
|
|
48883
48943
|
}
|
|
48884
48944
|
) }),
|
|
48885
|
-
selectedImageIndex < images.length - 1 && /* @__PURE__ */
|
|
48945
|
+
selectedImageIndex < images.length - 1 && /* @__PURE__ */ jsx378("div", { className: "absolute right-4 top-1/2 -translate-y-1/2 z-[10000]", children: /* @__PURE__ */ jsx378(
|
|
48886
48946
|
Button,
|
|
48887
48947
|
{
|
|
48888
48948
|
variant: "transparent",
|
|
48889
48949
|
size: "small-legacy",
|
|
48890
48950
|
onClick: goToNextImage,
|
|
48891
48951
|
className: "rounded-full bg-black/50 text-white hover:bg-black/70 p-2",
|
|
48892
|
-
leftIcon: /* @__PURE__ */
|
|
48952
|
+
leftIcon: /* @__PURE__ */ jsx378(ChevronRight8, { className: "w-6 h-6" })
|
|
48893
48953
|
}
|
|
48894
48954
|
) })
|
|
48895
48955
|
] }),
|
|
48896
|
-
images[selectedImageIndex] && /* @__PURE__ */
|
|
48956
|
+
images[selectedImageIndex] && /* @__PURE__ */ jsx378("div", { className: "relative w-[90vw] h-[90vh] max-w-none flex items-center justify-center", children: /* @__PURE__ */ jsx378(
|
|
48897
48957
|
next_image_default,
|
|
48898
48958
|
{
|
|
48899
48959
|
src: images[selectedImageIndex],
|
|
@@ -48923,7 +48983,7 @@ function ImageGalleryModal({
|
|
|
48923
48983
|
}
|
|
48924
48984
|
}
|
|
48925
48985
|
) }),
|
|
48926
|
-
images.length > 1 && /* @__PURE__ */
|
|
48986
|
+
images.length > 1 && /* @__PURE__ */ jsxs299("div", { className: "absolute bottom-4 left-1/2 -translate-x-1/2 z-[10000] px-4 py-2 rounded-full bg-black/50 text-white text-h6", children: [
|
|
48927
48987
|
selectedImageIndex + 1,
|
|
48928
48988
|
" / ",
|
|
48929
48989
|
images.length
|
|
@@ -48949,7 +49009,7 @@ import {
|
|
|
48949
49009
|
Repeat,
|
|
48950
49010
|
Compass
|
|
48951
49011
|
} from "lucide-react";
|
|
48952
|
-
import { jsx as
|
|
49012
|
+
import { jsx as jsx379 } from "react/jsx-runtime";
|
|
48953
49013
|
function iconFor(customItemId) {
|
|
48954
49014
|
switch (customItemId) {
|
|
48955
49015
|
case CUSTOM_ITEM_ID.BUG:
|
|
@@ -48985,49 +49045,49 @@ function iconFor(customItemId) {
|
|
|
48985
49045
|
}
|
|
48986
49046
|
function TaskTypeIcon({ customItemId, className = "h-5 w-5" }) {
|
|
48987
49047
|
const Icon2 = iconFor(customItemId);
|
|
48988
|
-
return /* @__PURE__ */
|
|
49048
|
+
return /* @__PURE__ */ jsx379(Icon2, { className, "aria-hidden": "true" });
|
|
48989
49049
|
}
|
|
48990
49050
|
|
|
48991
49051
|
// src/components/chat/entity-cards/roadmap-card.tsx
|
|
48992
|
-
import { Fragment as Fragment79, jsx as
|
|
49052
|
+
import { Fragment as Fragment79, jsx as jsx380, jsxs as jsxs300 } from "react/jsx-runtime";
|
|
48993
49053
|
function RoadmapCardSkeleton({ size: size2 = "default" }) {
|
|
48994
49054
|
if (size2 === "sm") {
|
|
48995
|
-
return /* @__PURE__ */
|
|
48996
|
-
/* @__PURE__ */
|
|
48997
|
-
/* @__PURE__ */
|
|
48998
|
-
/* @__PURE__ */
|
|
48999
|
-
/* @__PURE__ */
|
|
49000
|
-
/* @__PURE__ */
|
|
49055
|
+
return /* @__PURE__ */ jsxs300("span", { className: COMPACT_CARD_SKELETON_OUTER, children: [
|
|
49056
|
+
/* @__PURE__ */ jsx380("span", { className: "block h-12 w-12 aspect-square shrink-0 self-start rounded-md bg-ods-bg border border-ods-border p-1.5" }),
|
|
49057
|
+
/* @__PURE__ */ jsxs300("span", { className: COMPACT_CARD_TEXT_COL, children: [
|
|
49058
|
+
/* @__PURE__ */ jsxs300("span", { className: `${COMPACT_CARD_TITLE_ROW} flex-nowrap gap-2`, children: [
|
|
49059
|
+
/* @__PURE__ */ jsx380("span", { className: "h-3.5 w-1/2 rounded bg-ods-bg" }),
|
|
49060
|
+
/* @__PURE__ */ jsx380("span", { className: "h-4 w-12 rounded bg-ods-bg/70 shrink-0" })
|
|
49001
49061
|
] }),
|
|
49002
|
-
/* @__PURE__ */
|
|
49003
|
-
/* @__PURE__ */
|
|
49004
|
-
/* @__PURE__ */
|
|
49005
|
-
/* @__PURE__ */
|
|
49062
|
+
/* @__PURE__ */ jsxs300("span", { className: `${COMPACT_CARD_META_ROW_BOX} flex-nowrap gap-2`, children: [
|
|
49063
|
+
/* @__PURE__ */ jsx380("span", { className: "h-3 w-2/5 rounded bg-ods-bg/60 flex-1" }),
|
|
49064
|
+
/* @__PURE__ */ jsx380("span", { className: "h-3 w-10 rounded bg-ods-bg/40 shrink-0" }),
|
|
49065
|
+
/* @__PURE__ */ jsx380("span", { className: "h-6 w-14 rounded-full bg-ods-bg/40 shrink-0" })
|
|
49006
49066
|
] }),
|
|
49007
|
-
/* @__PURE__ */
|
|
49067
|
+
/* @__PURE__ */ jsx380("span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ jsx380("span", { className: "h-3 w-5/6 rounded bg-ods-bg/40" }) })
|
|
49008
49068
|
] })
|
|
49009
49069
|
] });
|
|
49010
49070
|
}
|
|
49011
|
-
return /* @__PURE__ */
|
|
49012
|
-
/* @__PURE__ */
|
|
49013
|
-
/* @__PURE__ */
|
|
49014
|
-
/* @__PURE__ */
|
|
49015
|
-
/* @__PURE__ */
|
|
49016
|
-
/* @__PURE__ */
|
|
49071
|
+
return /* @__PURE__ */ jsxs300("div", { className: "bg-ods-card border border-ods-border rounded-[6px] p-[24px] flex flex-col gap-4 h-full animate-pulse", children: [
|
|
49072
|
+
/* @__PURE__ */ jsxs300("div", { className: "flex gap-4 items-center", children: [
|
|
49073
|
+
/* @__PURE__ */ jsx380("div", { className: "w-16 h-16 rounded-lg bg-ods-bg flex-shrink-0" }),
|
|
49074
|
+
/* @__PURE__ */ jsxs300("div", { className: "flex-1 space-y-2", children: [
|
|
49075
|
+
/* @__PURE__ */ jsx380("div", { className: "h-5 w-3/4 bg-ods-bg rounded" }),
|
|
49076
|
+
/* @__PURE__ */ jsx380("div", { className: "h-3 w-1/2 bg-ods-bg/60 rounded" })
|
|
49017
49077
|
] }),
|
|
49018
|
-
/* @__PURE__ */
|
|
49078
|
+
/* @__PURE__ */ jsx380("div", { className: "h-6 w-16 bg-ods-bg rounded" })
|
|
49019
49079
|
] }),
|
|
49020
|
-
/* @__PURE__ */
|
|
49021
|
-
/* @__PURE__ */
|
|
49022
|
-
/* @__PURE__ */
|
|
49023
|
-
/* @__PURE__ */
|
|
49080
|
+
/* @__PURE__ */ jsxs300("div", { className: "space-y-2", children: [
|
|
49081
|
+
/* @__PURE__ */ jsx380("div", { className: "h-3 w-full bg-ods-bg/60 rounded" }),
|
|
49082
|
+
/* @__PURE__ */ jsx380("div", { className: "h-3 w-5/6 bg-ods-bg/60 rounded" }),
|
|
49083
|
+
/* @__PURE__ */ jsx380("div", { className: "h-3 w-4/5 bg-ods-bg/60 rounded" })
|
|
49024
49084
|
] }),
|
|
49025
|
-
/* @__PURE__ */
|
|
49026
|
-
/* @__PURE__ */
|
|
49027
|
-
/* @__PURE__ */
|
|
49028
|
-
/* @__PURE__ */
|
|
49029
|
-
/* @__PURE__ */
|
|
49030
|
-
/* @__PURE__ */
|
|
49085
|
+
/* @__PURE__ */ jsx380("div", { className: "flex-1" }),
|
|
49086
|
+
/* @__PURE__ */ jsxs300("div", { className: "flex items-center justify-between", children: [
|
|
49087
|
+
/* @__PURE__ */ jsx380("div", { className: "h-12 w-32 bg-ods-bg rounded" }),
|
|
49088
|
+
/* @__PURE__ */ jsxs300("div", { className: "flex items-center gap-2", children: [
|
|
49089
|
+
/* @__PURE__ */ jsx380("div", { className: "h-6 w-14 rounded-full bg-ods-bg/60" }),
|
|
49090
|
+
/* @__PURE__ */ jsx380("div", { className: "h-8 w-20 bg-ods-bg rounded" })
|
|
49031
49091
|
] })
|
|
49032
49092
|
] })
|
|
49033
49093
|
] });
|
|
@@ -49052,7 +49112,7 @@ function RoadmapCard({
|
|
|
49052
49112
|
onVote,
|
|
49053
49113
|
isVoting = false
|
|
49054
49114
|
}) {
|
|
49055
|
-
const [showScreenshots, setShowScreenshots] =
|
|
49115
|
+
const [showScreenshots, setShowScreenshots] = useState116(false);
|
|
49056
49116
|
const logoUrl = item.icon && item.icon.startsWith("http") ? item.icon : null;
|
|
49057
49117
|
const iconSrc = logoUrl ? getProxiedImageUrl(logoUrl, { directHttps: true }) || logoUrl : null;
|
|
49058
49118
|
if (size2 === "sm") {
|
|
@@ -49062,13 +49122,13 @@ function RoadmapCard({
|
|
|
49062
49122
|
const hasScreenshots = (item.screenshots?.length ?? 0) > 0;
|
|
49063
49123
|
const typeLabel = getTaskTypeLabel(item.customItemId);
|
|
49064
49124
|
const useTypeIcon = cardType === "internal_task" || !iconSrc && item.customItemId != null;
|
|
49065
|
-
const body = /* @__PURE__ */
|
|
49066
|
-
/* @__PURE__ */
|
|
49125
|
+
const body = /* @__PURE__ */ jsxs300(Fragment79, { children: [
|
|
49126
|
+
/* @__PURE__ */ jsx380(
|
|
49067
49127
|
"span",
|
|
49068
49128
|
{
|
|
49069
49129
|
className: "flex h-12 w-12 aspect-square shrink-0 self-start items-center justify-center rounded-md overflow-hidden bg-ods-bg border border-ods-border p-1.5 text-ods-accent",
|
|
49070
49130
|
title: typeLabel ?? void 0,
|
|
49071
|
-
children: useTypeIcon ? /* @__PURE__ */
|
|
49131
|
+
children: useTypeIcon ? /* @__PURE__ */ jsx380(TaskTypeIcon, { customItemId: item.customItemId, className: "h-6 w-6" }) : iconSrc ? /* @__PURE__ */ jsx380(
|
|
49072
49132
|
next_image_default,
|
|
49073
49133
|
{
|
|
49074
49134
|
src: iconSrc,
|
|
@@ -49078,13 +49138,13 @@ function RoadmapCard({
|
|
|
49078
49138
|
unoptimized: true,
|
|
49079
49139
|
className: "h-8 w-8 object-contain"
|
|
49080
49140
|
}
|
|
49081
|
-
) : /* @__PURE__ */
|
|
49141
|
+
) : /* @__PURE__ */ jsx380("span", { className: "text-h6 uppercase text-ods-text-secondary", children: item.title?.substring(0, 2) || "??" })
|
|
49082
49142
|
}
|
|
49083
49143
|
),
|
|
49084
|
-
/* @__PURE__ */
|
|
49085
|
-
/* @__PURE__ */
|
|
49086
|
-
/* @__PURE__ */
|
|
49087
|
-
item.status && item.status.trim().length > 0 ? /* @__PURE__ */
|
|
49144
|
+
/* @__PURE__ */ jsxs300("span", { className: COMPACT_CARD_TEXT_COL, children: [
|
|
49145
|
+
/* @__PURE__ */ jsxs300("span", { className: `${COMPACT_CARD_TITLE_ROW} gap-2`, children: [
|
|
49146
|
+
/* @__PURE__ */ jsx380("span", { className: `${COMPACT_CARD_TITLE} min-w-0`, children: item.title }),
|
|
49147
|
+
item.status && item.status.trim().length > 0 ? /* @__PURE__ */ jsx380(
|
|
49088
49148
|
StatusBadge,
|
|
49089
49149
|
{
|
|
49090
49150
|
text: item.status.toUpperCase(),
|
|
@@ -49095,8 +49155,8 @@ function RoadmapCard({
|
|
|
49095
49155
|
}
|
|
49096
49156
|
) : null
|
|
49097
49157
|
] }),
|
|
49098
|
-
/* @__PURE__ */
|
|
49099
|
-
/* @__PURE__ */
|
|
49158
|
+
/* @__PURE__ */ jsxs300("span", { className: `${COMPACT_CARD_META_ROW_BOX} gap-2 text-ods-text-secondary`, children: [
|
|
49159
|
+
/* @__PURE__ */ jsx380("span", { className: "truncate text-h6 min-w-0 flex-1", children: (() => {
|
|
49100
49160
|
const parts = [
|
|
49101
49161
|
item.quarter,
|
|
49102
49162
|
item.targetVersion ? `${item.targetVersion} version` : null
|
|
@@ -49110,41 +49170,41 @@ function RoadmapCard({
|
|
|
49110
49170
|
}
|
|
49111
49171
|
return "Roadmap item";
|
|
49112
49172
|
})() }),
|
|
49113
|
-
hasVotes ? /* @__PURE__ */
|
|
49114
|
-
/* @__PURE__ */
|
|
49115
|
-
/* @__PURE__ */
|
|
49116
|
-
/* @__PURE__ */
|
|
49173
|
+
hasVotes ? /* @__PURE__ */ jsxs300("span", { className: "hidden sm:flex items-center gap-2 shrink-0 text-h6 text-ods-text-secondary", children: [
|
|
49174
|
+
/* @__PURE__ */ jsxs300("span", { className: "flex items-center gap-0.5", children: [
|
|
49175
|
+
/* @__PURE__ */ jsx380(ThumbsUp, { className: "h-3 w-3" }),
|
|
49176
|
+
/* @__PURE__ */ jsx380("span", { children: item.upvotes ?? 0 })
|
|
49117
49177
|
] }),
|
|
49118
|
-
/* @__PURE__ */
|
|
49119
|
-
/* @__PURE__ */
|
|
49120
|
-
/* @__PURE__ */
|
|
49178
|
+
/* @__PURE__ */ jsxs300("span", { className: "flex items-center gap-0.5", children: [
|
|
49179
|
+
/* @__PURE__ */ jsx380(ThumbsDown, { className: "h-3 w-3" }),
|
|
49180
|
+
/* @__PURE__ */ jsx380("span", { children: item.downvotes ?? 0 })
|
|
49121
49181
|
] })
|
|
49122
49182
|
] }) : null,
|
|
49123
|
-
hasFigma ? /* @__PURE__ */
|
|
49124
|
-
hasScreenshots ? /* @__PURE__ */
|
|
49183
|
+
hasFigma ? /* @__PURE__ */ jsx380("span", { className: "hidden sm:flex shrink-0 items-center", title: "Has Figma prototype", children: /* @__PURE__ */ jsx380(FigmaIcon, { className: "h-3 w-3" }) }) : null,
|
|
49184
|
+
hasScreenshots ? /* @__PURE__ */ jsxs300(
|
|
49125
49185
|
"span",
|
|
49126
49186
|
{
|
|
49127
49187
|
className: "hidden sm:flex shrink-0 items-center gap-0.5 text-h6",
|
|
49128
49188
|
title: `${item.screenshots.length} screenshot${item.screenshots.length === 1 ? "" : "s"}`,
|
|
49129
49189
|
children: [
|
|
49130
|
-
/* @__PURE__ */
|
|
49131
|
-
/* @__PURE__ */
|
|
49190
|
+
/* @__PURE__ */ jsx380(ImageIcon, { className: "h-3 w-3" }),
|
|
49191
|
+
/* @__PURE__ */ jsx380("span", { children: item.screenshots.length })
|
|
49132
49192
|
]
|
|
49133
49193
|
}
|
|
49134
49194
|
) : null,
|
|
49135
|
-
item.assignees && item.assignees.length > 0 ? /* @__PURE__ */
|
|
49195
|
+
item.assignees && item.assignees.length > 0 ? /* @__PURE__ */ jsx380(AvatarStack, { size: "xs", people: assigneePeople(item.assignees), className: "shrink-0" }) : null
|
|
49136
49196
|
] }),
|
|
49137
|
-
/* @__PURE__ */
|
|
49197
|
+
/* @__PURE__ */ jsx380("span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ jsx380("span", { className: COMPACT_CARD_SUMMARY, children: item.description || COMPACT_CARD_ROW_FILLER }) })
|
|
49138
49198
|
] })
|
|
49139
49199
|
] });
|
|
49140
49200
|
if (!compactHref) {
|
|
49141
|
-
return /* @__PURE__ */
|
|
49201
|
+
return /* @__PURE__ */ jsx380("span", { className: `${COMPACT_CARD_OUTER_STATIC} ${className ?? ""}`, "aria-label": "No link available", children: body });
|
|
49142
49202
|
}
|
|
49143
|
-
return /* @__PURE__ */
|
|
49203
|
+
return /* @__PURE__ */ jsx380("a", { href: compactHref, target, rel, className: `${COMPACT_CARD_OUTER} ${className ?? ""}`, children: body });
|
|
49144
49204
|
}
|
|
49145
|
-
return /* @__PURE__ */
|
|
49146
|
-
/* @__PURE__ */
|
|
49147
|
-
/* @__PURE__ */
|
|
49205
|
+
return /* @__PURE__ */ jsxs300("div", { id, className: `bg-ods-card border border-ods-border rounded-[6px] p-[24px] flex flex-col gap-[16px] hover:border-ods-accent transition-all h-full scroll-mt-24 ${className ?? ""}`, children: [
|
|
49206
|
+
/* @__PURE__ */ jsxs300("div", { className: "flex gap-[16px] items-center w-full", children: [
|
|
49207
|
+
/* @__PURE__ */ jsx380("div", { className: "w-16 h-16 rounded-lg flex items-center justify-center flex-shrink-0 bg-ods-bg border border-ods-border", children: iconSrc ? /* @__PURE__ */ jsx380(
|
|
49148
49208
|
next_image_default,
|
|
49149
49209
|
{
|
|
49150
49210
|
src: iconSrc,
|
|
@@ -49154,16 +49214,16 @@ function RoadmapCard({
|
|
|
49154
49214
|
unoptimized: true,
|
|
49155
49215
|
className: "object-contain p-1"
|
|
49156
49216
|
}
|
|
49157
|
-
) : /* @__PURE__ */
|
|
49158
|
-
/* @__PURE__ */
|
|
49159
|
-
/* @__PURE__ */
|
|
49160
|
-
/* @__PURE__ */
|
|
49217
|
+
) : /* @__PURE__ */ jsx380("span", { className: "text-xs font-medium uppercase text-ods-text-secondary", children: item.title?.substring(0, 2) || "??" }) }),
|
|
49218
|
+
/* @__PURE__ */ jsxs300("div", { className: "flex-1 min-w-0 flex flex-col", children: [
|
|
49219
|
+
/* @__PURE__ */ jsx380("div", { className: "min-h-[48px] flex items-center", children: /* @__PURE__ */ jsx380("h3", { className: "text-h3 text-ods-text-primary flex-1 line-clamp-2", children: item.title }) }),
|
|
49220
|
+
/* @__PURE__ */ jsx380("div", { className: "min-h-[20px] flex items-center", children: /* @__PURE__ */ jsxs300("p", { className: "text-h5 text-ods-text-secondary truncate", children: [
|
|
49161
49221
|
item.quarter,
|
|
49162
49222
|
", ",
|
|
49163
49223
|
item.id
|
|
49164
49224
|
] }) })
|
|
49165
49225
|
] }),
|
|
49166
|
-
/* @__PURE__ */
|
|
49226
|
+
/* @__PURE__ */ jsx380("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx380(
|
|
49167
49227
|
StatusBadge,
|
|
49168
49228
|
{
|
|
49169
49229
|
text: item.status.toUpperCase(),
|
|
@@ -49172,7 +49232,7 @@ function RoadmapCard({
|
|
|
49172
49232
|
}
|
|
49173
49233
|
) })
|
|
49174
49234
|
] }),
|
|
49175
|
-
/* @__PURE__ */
|
|
49235
|
+
/* @__PURE__ */ jsx380("div", { className: "md:hidden", children: /* @__PURE__ */ jsx380(
|
|
49176
49236
|
StatusBadge,
|
|
49177
49237
|
{
|
|
49178
49238
|
text: item.status.toUpperCase(),
|
|
@@ -49180,11 +49240,11 @@ function RoadmapCard({
|
|
|
49180
49240
|
className: "border border-ods-border"
|
|
49181
49241
|
}
|
|
49182
49242
|
) }),
|
|
49183
|
-
/* @__PURE__ */
|
|
49184
|
-
/* @__PURE__ */
|
|
49185
|
-
/* @__PURE__ */
|
|
49186
|
-
onVote && /* @__PURE__ */
|
|
49187
|
-
/* @__PURE__ */
|
|
49243
|
+
/* @__PURE__ */ jsx380("div", { className: "min-h-[72px] flex items-center", children: /* @__PURE__ */ jsx380("p", { className: "text-h4 text-ods-text-secondary line-clamp-3", children: item.description || "" }) }),
|
|
49244
|
+
/* @__PURE__ */ jsx380("div", { className: "flex-1" }),
|
|
49245
|
+
/* @__PURE__ */ jsxs300("div", { className: "flex items-center justify-between w-full", children: [
|
|
49246
|
+
onVote && /* @__PURE__ */ jsxs300("div", { className: "bg-ods-card border border-ods-border h-[48px] rounded-[6px] flex overflow-hidden", children: [
|
|
49247
|
+
/* @__PURE__ */ jsx380(
|
|
49188
49248
|
RoadmapVoteButton,
|
|
49189
49249
|
{
|
|
49190
49250
|
voteType: "up",
|
|
@@ -49196,7 +49256,7 @@ function RoadmapCard({
|
|
|
49196
49256
|
disabled: isVoting
|
|
49197
49257
|
}
|
|
49198
49258
|
),
|
|
49199
|
-
/* @__PURE__ */
|
|
49259
|
+
/* @__PURE__ */ jsx380(
|
|
49200
49260
|
RoadmapVoteButton,
|
|
49201
49261
|
{
|
|
49202
49262
|
voteType: "down",
|
|
@@ -49209,31 +49269,31 @@ function RoadmapCard({
|
|
|
49209
49269
|
}
|
|
49210
49270
|
)
|
|
49211
49271
|
] }),
|
|
49212
|
-
/* @__PURE__ */
|
|
49213
|
-
item.assignees && item.assignees.length > 0 ? /* @__PURE__ */
|
|
49214
|
-
item.screenshots && item.screenshots.length > 0 && /* @__PURE__ */
|
|
49272
|
+
/* @__PURE__ */ jsxs300("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
49273
|
+
item.assignees && item.assignees.length > 0 ? /* @__PURE__ */ jsx380(AvatarStack, { size: "xs", people: assigneePeople(item.assignees), className: "shrink-0" }) : null,
|
|
49274
|
+
item.screenshots && item.screenshots.length > 0 && /* @__PURE__ */ jsx380(
|
|
49215
49275
|
Button,
|
|
49216
49276
|
{
|
|
49217
49277
|
variant: "outline",
|
|
49218
49278
|
size: "small-legacy",
|
|
49219
49279
|
onClick: () => setShowScreenshots(true),
|
|
49220
|
-
leftIcon: /* @__PURE__ */
|
|
49280
|
+
leftIcon: /* @__PURE__ */ jsx380(ImageIcon, { className: "w-5 h-5" })
|
|
49221
49281
|
}
|
|
49222
49282
|
),
|
|
49223
49283
|
(() => {
|
|
49224
49284
|
const figmaSafe = safeHref(item.figmaUrl);
|
|
49225
|
-
return figmaSafe ? /* @__PURE__ */
|
|
49285
|
+
return figmaSafe ? /* @__PURE__ */ jsx380(
|
|
49226
49286
|
Button,
|
|
49227
49287
|
{
|
|
49228
49288
|
variant: "outline",
|
|
49229
49289
|
size: "small-legacy",
|
|
49230
49290
|
openInNewTab: true,
|
|
49231
49291
|
href: figmaSafe,
|
|
49232
|
-
leftIcon: /* @__PURE__ */
|
|
49292
|
+
leftIcon: /* @__PURE__ */ jsx380(FigmaIcon, { className: "w-5 h-5" })
|
|
49233
49293
|
}
|
|
49234
49294
|
) : null;
|
|
49235
49295
|
})(),
|
|
49236
|
-
item.targetVersion && /* @__PURE__ */
|
|
49296
|
+
item.targetVersion && /* @__PURE__ */ jsx380(
|
|
49237
49297
|
StatusBadge,
|
|
49238
49298
|
{
|
|
49239
49299
|
gen: generationTierFromLabel(item.targetVersion),
|
|
@@ -49242,7 +49302,7 @@ function RoadmapCard({
|
|
|
49242
49302
|
)
|
|
49243
49303
|
] })
|
|
49244
49304
|
] }),
|
|
49245
|
-
item.screenshots && item.screenshots.length > 0 && /* @__PURE__ */
|
|
49305
|
+
item.screenshots && item.screenshots.length > 0 && /* @__PURE__ */ jsx380(
|
|
49246
49306
|
ImageGalleryModal,
|
|
49247
49307
|
{
|
|
49248
49308
|
images: item.screenshots,
|
|
@@ -49254,9 +49314,9 @@ function RoadmapCard({
|
|
|
49254
49314
|
}
|
|
49255
49315
|
|
|
49256
49316
|
// src/components/chat/entity-cards/github-activity-card.tsx
|
|
49257
|
-
import
|
|
49317
|
+
import React147 from "react";
|
|
49258
49318
|
import { GitPullRequest, Eye as Eye4, ExternalLink as ExternalLink8 } from "lucide-react";
|
|
49259
|
-
import { Fragment as Fragment80, jsx as
|
|
49319
|
+
import { Fragment as Fragment80, jsx as jsx381, jsxs as jsxs301 } from "react/jsx-runtime";
|
|
49260
49320
|
function parseRepoFromUrl(url) {
|
|
49261
49321
|
if (!url) return null;
|
|
49262
49322
|
try {
|
|
@@ -49271,12 +49331,12 @@ function parseRepoFromUrl(url) {
|
|
|
49271
49331
|
function kindIcon(kind, className = "h-4 w-4") {
|
|
49272
49332
|
switch (kind) {
|
|
49273
49333
|
case "pull_request":
|
|
49274
|
-
return /* @__PURE__ */
|
|
49334
|
+
return /* @__PURE__ */ jsx381(GitPullRequest, { className: `${className} shrink-0` });
|
|
49275
49335
|
case "pr_review":
|
|
49276
|
-
return /* @__PURE__ */
|
|
49336
|
+
return /* @__PURE__ */ jsx381(Eye4, { className: `${className} shrink-0` });
|
|
49277
49337
|
case "commit":
|
|
49278
49338
|
default:
|
|
49279
|
-
return /* @__PURE__ */
|
|
49339
|
+
return /* @__PURE__ */ jsx381(GitHubIcon, { className: `${className} shrink-0` });
|
|
49280
49340
|
}
|
|
49281
49341
|
}
|
|
49282
49342
|
function kindLabel(kind) {
|
|
@@ -49351,7 +49411,7 @@ function reviewStateLabel(state) {
|
|
|
49351
49411
|
}
|
|
49352
49412
|
function ReviewStateBadge({ state, className = "" }) {
|
|
49353
49413
|
const { label, className: paint } = REVIEW_STATE_STYLE[state] ?? REVIEW_STATE_STYLE.COMMENTED;
|
|
49354
|
-
return /* @__PURE__ */
|
|
49414
|
+
return /* @__PURE__ */ jsx381(
|
|
49355
49415
|
"span",
|
|
49356
49416
|
{
|
|
49357
49417
|
className: `inline-flex items-center rounded px-1.5 py-0.5 text-h5 shrink-0 ${paint} ${className}`,
|
|
@@ -49367,46 +49427,46 @@ function GitHubActivityCard({ item, variant = "compact", className, anchorProps
|
|
|
49367
49427
|
const { display: title, reviewState } = parseGithubTitle(item.title, kind);
|
|
49368
49428
|
const primaryText = kind === "pr_review" ? title.replace(/^by\s+/i, "").trim() || "Reviewer" : title;
|
|
49369
49429
|
if (variant === "row") {
|
|
49370
|
-
return /* @__PURE__ */
|
|
49371
|
-
/* @__PURE__ */
|
|
49430
|
+
return /* @__PURE__ */ jsxs301("div", { className: `flex items-center gap-3 min-w-0 ${className ?? ""}`, children: [
|
|
49431
|
+
/* @__PURE__ */ jsxs301("span", { className: "flex items-center gap-2 w-28 shrink-0", children: [
|
|
49372
49432
|
kindIcon(kind, "h-3.5 w-3.5"),
|
|
49373
|
-
/* @__PURE__ */
|
|
49433
|
+
/* @__PURE__ */ jsx381("code", { className: "text-ods-text-secondary text-code truncate", children: idLabel })
|
|
49374
49434
|
] }),
|
|
49375
|
-
/* @__PURE__ */
|
|
49376
|
-
reviewState ? /* @__PURE__ */
|
|
49377
|
-
/* @__PURE__ */
|
|
49435
|
+
/* @__PURE__ */ jsxs301("span", { className: "flex items-center gap-2 text-ods-text-primary text-h6 flex-1 min-w-0", children: [
|
|
49436
|
+
reviewState ? /* @__PURE__ */ jsx381(ReviewStateBadge, { state: reviewState }) : null,
|
|
49437
|
+
/* @__PURE__ */ jsx381("span", { className: "truncate", children: primaryText })
|
|
49378
49438
|
] }),
|
|
49379
|
-
repo ? /* @__PURE__ */
|
|
49380
|
-
dateText ? /* @__PURE__ */
|
|
49439
|
+
repo ? /* @__PURE__ */ jsx381("span", { className: "text-code text-ods-text-secondary truncate max-w-[240px] shrink-0", children: repo }) : null,
|
|
49440
|
+
dateText ? /* @__PURE__ */ jsx381("span", { className: "text-ods-text-secondary text-h6 w-24 shrink-0 text-right", children: dateText }) : null
|
|
49381
49441
|
] });
|
|
49382
49442
|
}
|
|
49383
49443
|
const metaParts = [];
|
|
49384
49444
|
metaParts.push(
|
|
49385
|
-
/* @__PURE__ */
|
|
49445
|
+
/* @__PURE__ */ jsx381("span", { className: "text-h6 uppercase", children: kindLabel(kind) }, "kind")
|
|
49386
49446
|
);
|
|
49387
|
-
if (idLabel) metaParts.push(/* @__PURE__ */
|
|
49388
|
-
if (repo) metaParts.push(/* @__PURE__ */
|
|
49389
|
-
if (dateText) metaParts.push(/* @__PURE__ */
|
|
49447
|
+
if (idLabel) metaParts.push(/* @__PURE__ */ jsx381("code", { className: "font-mono", children: idLabel }, "id"));
|
|
49448
|
+
if (repo) metaParts.push(/* @__PURE__ */ jsx381("span", { className: "font-mono truncate", children: repo }, "repo"));
|
|
49449
|
+
if (dateText) metaParts.push(/* @__PURE__ */ jsx381("span", { className: "whitespace-nowrap", children: dateText }, "date"));
|
|
49390
49450
|
const href = safeHref(item.url);
|
|
49391
|
-
const body = /* @__PURE__ */
|
|
49392
|
-
/* @__PURE__ */
|
|
49393
|
-
/* @__PURE__ */
|
|
49394
|
-
/* @__PURE__ */
|
|
49395
|
-
reviewState ? /* @__PURE__ */
|
|
49396
|
-
/* @__PURE__ */
|
|
49451
|
+
const body = /* @__PURE__ */ jsxs301(Fragment80, { children: [
|
|
49452
|
+
/* @__PURE__ */ jsx381("span", { className: COMPACT_CARD_ICON_SLOT, children: kindIcon(kind, "h-5 w-5") }),
|
|
49453
|
+
/* @__PURE__ */ jsxs301("span", { className: COMPACT_CARD_TEXT_COL, children: [
|
|
49454
|
+
/* @__PURE__ */ jsxs301("span", { className: `${COMPACT_CARD_TITLE_ROW} flex-nowrap gap-1.5`, children: [
|
|
49455
|
+
reviewState ? /* @__PURE__ */ jsx381(ReviewStateBadge, { state: reviewState }) : null,
|
|
49456
|
+
/* @__PURE__ */ jsx381("span", { className: COMPACT_CARD_TITLE, children: primaryText })
|
|
49397
49457
|
] }),
|
|
49398
|
-
/* @__PURE__ */
|
|
49399
|
-
i > 0 ? /* @__PURE__ */
|
|
49400
|
-
/* @__PURE__ */
|
|
49458
|
+
/* @__PURE__ */ jsx381("span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ jsx381("span", { className: COMPACT_CARD_META_ROW, children: metaParts.map((part, i) => /* @__PURE__ */ jsxs301(React147.Fragment, { children: [
|
|
49459
|
+
i > 0 ? /* @__PURE__ */ jsx381("span", { className: "text-ods-text-secondary/40 shrink-0", children: "\xB7" }) : null,
|
|
49460
|
+
/* @__PURE__ */ jsx381("span", { className: "min-w-0 truncate", children: part })
|
|
49401
49461
|
] }, i)) }) }),
|
|
49402
|
-
/* @__PURE__ */
|
|
49462
|
+
/* @__PURE__ */ jsx381("span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ jsx381("span", { className: COMPACT_CARD_SUMMARY, children: COMPACT_CARD_ROW_FILLER }) })
|
|
49403
49463
|
] }),
|
|
49404
|
-
href ? /* @__PURE__ */
|
|
49464
|
+
href ? /* @__PURE__ */ jsx381("span", { className: "flex shrink-0 items-center self-start h-5 text-ods-text-secondary", children: /* @__PURE__ */ jsx381(ExternalLink8, { className: "w-3.5 h-3.5" }) }) : null
|
|
49405
49465
|
] });
|
|
49406
49466
|
if (anchorProps) {
|
|
49407
|
-
return /* @__PURE__ */
|
|
49467
|
+
return /* @__PURE__ */ jsx381("a", { ...anchorProps, className: `${COMPACT_CARD_OUTER} ${className ?? ""}`, children: body });
|
|
49408
49468
|
}
|
|
49409
|
-
return href ? /* @__PURE__ */
|
|
49469
|
+
return href ? /* @__PURE__ */ jsx381(
|
|
49410
49470
|
"a",
|
|
49411
49471
|
{
|
|
49412
49472
|
href,
|
|
@@ -49415,35 +49475,35 @@ function GitHubActivityCard({ item, variant = "compact", className, anchorProps
|
|
|
49415
49475
|
className: `${COMPACT_CARD_OUTER} ${className ?? ""}`,
|
|
49416
49476
|
children: body
|
|
49417
49477
|
}
|
|
49418
|
-
) : /* @__PURE__ */
|
|
49478
|
+
) : /* @__PURE__ */ jsx381("span", { className: `${COMPACT_CARD_OUTER_STATIC} ${className ?? ""}`, "aria-label": "No link available", children: body });
|
|
49419
49479
|
}
|
|
49420
49480
|
function GitHubActivityCardSkeleton({ variant = "compact", className }) {
|
|
49421
49481
|
if (variant === "row") {
|
|
49422
|
-
return /* @__PURE__ */
|
|
49423
|
-
/* @__PURE__ */
|
|
49424
|
-
/* @__PURE__ */
|
|
49425
|
-
/* @__PURE__ */
|
|
49482
|
+
return /* @__PURE__ */ jsxs301("div", { className: `flex items-center gap-3 min-w-0 animate-pulse ${className ?? ""}`, children: [
|
|
49483
|
+
/* @__PURE__ */ jsxs301("div", { className: "flex items-center gap-2 w-28 shrink-0", children: [
|
|
49484
|
+
/* @__PURE__ */ jsx381("div", { className: "h-3.5 w-3.5 rounded bg-ods-bg" }),
|
|
49485
|
+
/* @__PURE__ */ jsx381("div", { className: "h-3 w-16 bg-ods-bg rounded" })
|
|
49426
49486
|
] }),
|
|
49427
|
-
/* @__PURE__ */
|
|
49428
|
-
/* @__PURE__ */
|
|
49429
|
-
/* @__PURE__ */
|
|
49487
|
+
/* @__PURE__ */ jsx381("div", { className: "h-3 w-2/3 bg-ods-bg rounded flex-1" }),
|
|
49488
|
+
/* @__PURE__ */ jsx381("div", { className: "h-3 w-40 bg-ods-bg/60 rounded shrink-0" }),
|
|
49489
|
+
/* @__PURE__ */ jsx381("div", { className: "h-3 w-20 bg-ods-bg/60 rounded shrink-0" })
|
|
49430
49490
|
] });
|
|
49431
49491
|
}
|
|
49432
|
-
return /* @__PURE__ */
|
|
49433
|
-
/* @__PURE__ */
|
|
49434
|
-
/* @__PURE__ */
|
|
49435
|
-
/* @__PURE__ */
|
|
49436
|
-
/* @__PURE__ */
|
|
49437
|
-
/* @__PURE__ */
|
|
49492
|
+
return /* @__PURE__ */ jsxs301("span", { className: `${COMPACT_CARD_SKELETON_OUTER} ${className ?? ""}`, children: [
|
|
49493
|
+
/* @__PURE__ */ jsx381("span", { className: COMPACT_CARD_SKELETON_IMAGE_SLOT }),
|
|
49494
|
+
/* @__PURE__ */ jsxs301("span", { className: COMPACT_CARD_TEXT_COL, children: [
|
|
49495
|
+
/* @__PURE__ */ jsx381("span", { className: COMPACT_CARD_TITLE_ROW, children: /* @__PURE__ */ jsx381("span", { className: "h-3.5 w-2/3 rounded bg-ods-bg" }) }),
|
|
49496
|
+
/* @__PURE__ */ jsx381("span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ jsx381("span", { className: "h-3 w-1/2 rounded bg-ods-bg/70" }) }),
|
|
49497
|
+
/* @__PURE__ */ jsx381("span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ jsx381("span", { className: COMPACT_CARD_SUMMARY, children: COMPACT_CARD_ROW_FILLER }) })
|
|
49438
49498
|
] }),
|
|
49439
|
-
/* @__PURE__ */
|
|
49499
|
+
/* @__PURE__ */ jsx381("span", { className: "flex shrink-0 items-center self-start h-5", children: /* @__PURE__ */ jsx381("span", { className: "h-3.5 w-3.5 rounded bg-ods-bg" }) })
|
|
49440
49500
|
] });
|
|
49441
49501
|
}
|
|
49442
49502
|
|
|
49443
49503
|
// src/components/chat/entity-cards/slack-message-card.tsx
|
|
49444
|
-
import
|
|
49504
|
+
import React148 from "react";
|
|
49445
49505
|
import { ExternalLink as ExternalLink9, Hash } from "lucide-react";
|
|
49446
|
-
import { Fragment as Fragment81, jsx as
|
|
49506
|
+
import { Fragment as Fragment81, jsx as jsx382, jsxs as jsxs302 } from "react/jsx-runtime";
|
|
49447
49507
|
function parseChannelFromUrl(url) {
|
|
49448
49508
|
if (!url) return null;
|
|
49449
49509
|
try {
|
|
@@ -49460,44 +49520,44 @@ function SlackMessageCard({ item, variant = "compact", className, anchorProps })
|
|
|
49460
49520
|
const channel = item.channel ?? parseChannelFromUrl(item.url) ?? null;
|
|
49461
49521
|
const dateText = formatDateUTC(item.dateUpdated, { fallback: "", timezone: "local" });
|
|
49462
49522
|
if (variant === "row") {
|
|
49463
|
-
return /* @__PURE__ */
|
|
49464
|
-
/* @__PURE__ */
|
|
49465
|
-
/* @__PURE__ */
|
|
49466
|
-
item.preview ? /* @__PURE__ */
|
|
49467
|
-
channel ? /* @__PURE__ */
|
|
49468
|
-
/* @__PURE__ */
|
|
49523
|
+
return /* @__PURE__ */ jsxs302("div", { className: `flex items-center gap-3 min-w-0 ${className ?? ""}`, children: [
|
|
49524
|
+
/* @__PURE__ */ jsx382(SlackIcon, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
49525
|
+
/* @__PURE__ */ jsx382("span", { className: "text-ods-text-primary text-h6 truncate max-w-[180px] shrink-0", children: item.title }),
|
|
49526
|
+
item.preview ? /* @__PURE__ */ jsx382("span", { className: "text-ods-text-secondary text-h6 flex-1 min-w-0 truncate", children: item.preview }) : null,
|
|
49527
|
+
channel ? /* @__PURE__ */ jsxs302("span", { className: "text-code text-ods-text-secondary truncate max-w-[140px] shrink-0", children: [
|
|
49528
|
+
/* @__PURE__ */ jsx382(Hash, { className: "inline h-3 w-3" }),
|
|
49469
49529
|
channel
|
|
49470
49530
|
] }) : null,
|
|
49471
|
-
dateText ? /* @__PURE__ */
|
|
49531
|
+
dateText ? /* @__PURE__ */ jsx382("span", { className: "text-ods-text-secondary text-h6 w-24 shrink-0 text-right", children: dateText }) : null
|
|
49472
49532
|
] });
|
|
49473
49533
|
}
|
|
49474
49534
|
const metaParts = [];
|
|
49475
49535
|
if (channel) {
|
|
49476
49536
|
metaParts.push(
|
|
49477
|
-
/* @__PURE__ */
|
|
49478
|
-
/* @__PURE__ */
|
|
49479
|
-
/* @__PURE__ */
|
|
49537
|
+
/* @__PURE__ */ jsxs302("span", { className: "flex items-center gap-0.5 min-w-0", children: [
|
|
49538
|
+
/* @__PURE__ */ jsx382(Hash, { className: "h-3 w-3 shrink-0" }),
|
|
49539
|
+
/* @__PURE__ */ jsx382("span", { className: "truncate font-mono", children: channel })
|
|
49480
49540
|
] }, "channel")
|
|
49481
49541
|
);
|
|
49482
49542
|
}
|
|
49483
|
-
if (dateText) metaParts.push(/* @__PURE__ */
|
|
49543
|
+
if (dateText) metaParts.push(/* @__PURE__ */ jsx382("span", { className: "whitespace-nowrap", children: dateText }, "date"));
|
|
49484
49544
|
const href = safeHref(item.url);
|
|
49485
|
-
const body = /* @__PURE__ */
|
|
49486
|
-
/* @__PURE__ */
|
|
49487
|
-
/* @__PURE__ */
|
|
49488
|
-
/* @__PURE__ */
|
|
49489
|
-
/* @__PURE__ */
|
|
49490
|
-
/* @__PURE__ */
|
|
49491
|
-
i > 0 ? /* @__PURE__ */
|
|
49492
|
-
/* @__PURE__ */
|
|
49493
|
-
] }, i)) : /* @__PURE__ */
|
|
49545
|
+
const body = /* @__PURE__ */ jsxs302(Fragment81, { children: [
|
|
49546
|
+
/* @__PURE__ */ jsx382("span", { className: COMPACT_CARD_ICON_SLOT, children: /* @__PURE__ */ jsx382(SlackIcon, { className: "h-5 w-5" }) }),
|
|
49547
|
+
/* @__PURE__ */ jsxs302("span", { className: COMPACT_CARD_TEXT_COL, children: [
|
|
49548
|
+
/* @__PURE__ */ jsx382("span", { className: COMPACT_CARD_TITLE_ROW, children: /* @__PURE__ */ jsx382("span", { className: COMPACT_CARD_TITLE, children: item.title }) }),
|
|
49549
|
+
/* @__PURE__ */ jsx382("span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ jsx382("span", { className: COMPACT_CARD_SUMMARY, children: item.preview || COMPACT_CARD_ROW_FILLER }) }),
|
|
49550
|
+
/* @__PURE__ */ jsx382("span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ jsx382("span", { className: COMPACT_CARD_META_ROW, children: metaParts.length > 0 ? metaParts.map((part, i) => /* @__PURE__ */ jsxs302(React148.Fragment, { children: [
|
|
49551
|
+
i > 0 ? /* @__PURE__ */ jsx382("span", { className: "text-ods-text-secondary/40 shrink-0", children: "\xB7" }) : null,
|
|
49552
|
+
/* @__PURE__ */ jsx382("span", { className: "min-w-0 truncate", children: part })
|
|
49553
|
+
] }, i)) : /* @__PURE__ */ jsx382("span", { className: COMPACT_CARD_SUMMARY, children: COMPACT_CARD_ROW_FILLER }) }) })
|
|
49494
49554
|
] }),
|
|
49495
|
-
href ? /* @__PURE__ */
|
|
49555
|
+
href ? /* @__PURE__ */ jsx382("span", { className: "flex shrink-0 items-center self-start h-5 text-ods-text-secondary", children: /* @__PURE__ */ jsx382(ExternalLink9, { className: "w-3.5 h-3.5" }) }) : null
|
|
49496
49556
|
] });
|
|
49497
49557
|
if (anchorProps) {
|
|
49498
|
-
return /* @__PURE__ */
|
|
49558
|
+
return /* @__PURE__ */ jsx382("a", { ...anchorProps, className: `${COMPACT_CARD_OUTER} ${className ?? ""}`, children: body });
|
|
49499
49559
|
}
|
|
49500
|
-
return href ? /* @__PURE__ */
|
|
49560
|
+
return href ? /* @__PURE__ */ jsx382(
|
|
49501
49561
|
"a",
|
|
49502
49562
|
{
|
|
49503
49563
|
href,
|
|
@@ -49506,33 +49566,33 @@ function SlackMessageCard({ item, variant = "compact", className, anchorProps })
|
|
|
49506
49566
|
className: `${COMPACT_CARD_OUTER} ${className ?? ""}`,
|
|
49507
49567
|
children: body
|
|
49508
49568
|
}
|
|
49509
|
-
) : /* @__PURE__ */
|
|
49569
|
+
) : /* @__PURE__ */ jsx382("span", { className: `${COMPACT_CARD_OUTER_STATIC} ${className ?? ""}`, "aria-label": "No link available", children: body });
|
|
49510
49570
|
}
|
|
49511
49571
|
function SlackMessageCardSkeleton({ variant = "compact", className }) {
|
|
49512
49572
|
if (variant === "row") {
|
|
49513
|
-
return /* @__PURE__ */
|
|
49514
|
-
/* @__PURE__ */
|
|
49515
|
-
/* @__PURE__ */
|
|
49516
|
-
/* @__PURE__ */
|
|
49517
|
-
/* @__PURE__ */
|
|
49518
|
-
/* @__PURE__ */
|
|
49573
|
+
return /* @__PURE__ */ jsxs302("div", { className: `flex items-center gap-3 min-w-0 animate-pulse ${className ?? ""}`, children: [
|
|
49574
|
+
/* @__PURE__ */ jsx382("div", { className: "h-3.5 w-3.5 rounded bg-ods-bg shrink-0" }),
|
|
49575
|
+
/* @__PURE__ */ jsx382("div", { className: "h-3 w-32 bg-ods-bg rounded shrink-0" }),
|
|
49576
|
+
/* @__PURE__ */ jsx382("div", { className: "h-3 w-2/3 bg-ods-bg/60 rounded flex-1" }),
|
|
49577
|
+
/* @__PURE__ */ jsx382("div", { className: "h-3 w-24 bg-ods-bg/60 rounded shrink-0" }),
|
|
49578
|
+
/* @__PURE__ */ jsx382("div", { className: "h-3 w-20 bg-ods-bg/60 rounded shrink-0" })
|
|
49519
49579
|
] });
|
|
49520
49580
|
}
|
|
49521
|
-
return /* @__PURE__ */
|
|
49522
|
-
/* @__PURE__ */
|
|
49523
|
-
/* @__PURE__ */
|
|
49524
|
-
/* @__PURE__ */
|
|
49525
|
-
/* @__PURE__ */
|
|
49526
|
-
/* @__PURE__ */
|
|
49581
|
+
return /* @__PURE__ */ jsxs302("span", { className: `${COMPACT_CARD_SKELETON_OUTER} ${className ?? ""}`, children: [
|
|
49582
|
+
/* @__PURE__ */ jsx382("span", { className: COMPACT_CARD_SKELETON_IMAGE_SLOT }),
|
|
49583
|
+
/* @__PURE__ */ jsxs302("span", { className: COMPACT_CARD_TEXT_COL, children: [
|
|
49584
|
+
/* @__PURE__ */ jsx382("span", { className: COMPACT_CARD_TITLE_ROW, children: /* @__PURE__ */ jsx382("span", { className: "h-3.5 w-2/3 rounded bg-ods-bg" }) }),
|
|
49585
|
+
/* @__PURE__ */ jsx382("span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ jsx382("span", { className: "h-3 w-5/6 rounded bg-ods-bg/60" }) }),
|
|
49586
|
+
/* @__PURE__ */ jsx382("span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ jsx382("span", { className: "h-3 w-1/3 rounded bg-ods-bg/70" }) })
|
|
49527
49587
|
] }),
|
|
49528
|
-
/* @__PURE__ */
|
|
49588
|
+
/* @__PURE__ */ jsx382("span", { className: "flex shrink-0 items-center self-start h-5", children: /* @__PURE__ */ jsx382("span", { className: "h-3.5 w-3.5 rounded bg-ods-bg" }) })
|
|
49529
49589
|
] });
|
|
49530
49590
|
}
|
|
49531
49591
|
|
|
49532
49592
|
// src/components/chat/entity-cards/hubspot-ticket-card.tsx
|
|
49533
|
-
import
|
|
49593
|
+
import React149 from "react";
|
|
49534
49594
|
import { ExternalLink as ExternalLink10 } from "lucide-react";
|
|
49535
|
-
import { Fragment as Fragment82, jsx as
|
|
49595
|
+
import { Fragment as Fragment82, jsx as jsx383, jsxs as jsxs303 } from "react/jsx-runtime";
|
|
49536
49596
|
function formatToken(token) {
|
|
49537
49597
|
if (!token) return null;
|
|
49538
49598
|
const lower = token.toLowerCase().replace(/_/g, " ");
|
|
@@ -49556,26 +49616,26 @@ function HubspotTicketCard({ item, variant = "compact", className, anchorProps }
|
|
|
49556
49616
|
const priorityText = formatToken(item.priority);
|
|
49557
49617
|
const dateText = formatDateUTC(item.dateUpdated, { fallback: "", timezone: "local" });
|
|
49558
49618
|
if (variant === "row") {
|
|
49559
|
-
return /* @__PURE__ */
|
|
49560
|
-
/* @__PURE__ */
|
|
49561
|
-
item.preview ? /* @__PURE__ */
|
|
49562
|
-
statusText ? /* @__PURE__ */
|
|
49563
|
-
dateText ? /* @__PURE__ */
|
|
49619
|
+
return /* @__PURE__ */ jsxs303("div", { className: `flex items-center gap-3 min-w-0 ${className ?? ""}`, children: [
|
|
49620
|
+
/* @__PURE__ */ jsx383("span", { className: "text-ods-text-primary text-h6 truncate max-w-[260px] shrink-0", children: item.title }),
|
|
49621
|
+
item.preview ? /* @__PURE__ */ jsx383("span", { className: "text-ods-text-secondary text-h6 flex-1 min-w-0 truncate", children: item.preview }) : null,
|
|
49622
|
+
statusText ? /* @__PURE__ */ jsx383(StatusBadge, { text: statusText, variant: "button", colorScheme: statusScheme(item.status) }) : null,
|
|
49623
|
+
dateText ? /* @__PURE__ */ jsx383("span", { className: "text-ods-text-secondary text-h6 w-24 shrink-0 text-right", children: dateText }) : null
|
|
49564
49624
|
] });
|
|
49565
49625
|
}
|
|
49566
49626
|
const metaParts = [];
|
|
49567
49627
|
if (item.customerCompany) {
|
|
49568
49628
|
metaParts.push(
|
|
49569
|
-
/* @__PURE__ */
|
|
49629
|
+
/* @__PURE__ */ jsx383("span", { className: "min-w-0 truncate", children: item.customerCompany }, "company")
|
|
49570
49630
|
);
|
|
49571
49631
|
}
|
|
49572
|
-
if (dateText) metaParts.push(/* @__PURE__ */
|
|
49632
|
+
if (dateText) metaParts.push(/* @__PURE__ */ jsx383("span", { className: "whitespace-nowrap", children: dateText }, "date"));
|
|
49573
49633
|
const href = safeHref(item.url);
|
|
49574
|
-
const body = /* @__PURE__ */
|
|
49575
|
-
/* @__PURE__ */
|
|
49576
|
-
/* @__PURE__ */
|
|
49577
|
-
/* @__PURE__ */
|
|
49578
|
-
priorityText ? /* @__PURE__ */
|
|
49634
|
+
const body = /* @__PURE__ */ jsxs303(Fragment82, { children: [
|
|
49635
|
+
/* @__PURE__ */ jsxs303("span", { className: COMPACT_CARD_TEXT_COL, children: [
|
|
49636
|
+
/* @__PURE__ */ jsxs303("span", { className: "flex flex-wrap items-center gap-1.5 min-w-0", children: [
|
|
49637
|
+
/* @__PURE__ */ jsx383("span", { className: `${COMPACT_CARD_TITLE} shrink min-w-0`, children: item.title }),
|
|
49638
|
+
priorityText ? /* @__PURE__ */ jsx383(
|
|
49579
49639
|
StatusBadge,
|
|
49580
49640
|
{
|
|
49581
49641
|
text: priorityText,
|
|
@@ -49584,7 +49644,7 @@ function HubspotTicketCard({ item, variant = "compact", className, anchorProps }
|
|
|
49584
49644
|
className: "shrink-0"
|
|
49585
49645
|
}
|
|
49586
49646
|
) : null,
|
|
49587
|
-
statusText ? /* @__PURE__ */
|
|
49647
|
+
statusText ? /* @__PURE__ */ jsx383(
|
|
49588
49648
|
StatusBadge,
|
|
49589
49649
|
{
|
|
49590
49650
|
text: statusText,
|
|
@@ -49594,22 +49654,22 @@ function HubspotTicketCard({ item, variant = "compact", className, anchorProps }
|
|
|
49594
49654
|
}
|
|
49595
49655
|
) : null
|
|
49596
49656
|
] }),
|
|
49597
|
-
item.customerEmail ? /* @__PURE__ */
|
|
49598
|
-
/* @__PURE__ */
|
|
49599
|
-
/* @__PURE__ */
|
|
49657
|
+
item.customerEmail ? /* @__PURE__ */ jsxs303("span", { className: "flex min-w-0 items-center gap-1 text-h6 text-ods-text-secondary", children: [
|
|
49658
|
+
/* @__PURE__ */ jsx383("span", { className: "shrink-0 text-ods-text-secondary/70", children: "From:" }),
|
|
49659
|
+
/* @__PURE__ */ jsx383("span", { className: "min-w-0 truncate", children: item.customerEmail })
|
|
49600
49660
|
] }) : null,
|
|
49601
|
-
/* @__PURE__ */
|
|
49602
|
-
metaParts.length > 0 ? /* @__PURE__ */
|
|
49603
|
-
i > 0 ? /* @__PURE__ */
|
|
49604
|
-
/* @__PURE__ */
|
|
49661
|
+
/* @__PURE__ */ jsx383("span", { className: "flex min-w-0", children: /* @__PURE__ */ jsx383("span", { className: "line-clamp-4 whitespace-pre-wrap break-words text-h6 text-ods-text-secondary", children: item.preview || /* @__PURE__ */ jsx383("span", { className: "italic text-ods-text-secondary/60", children: "No description provided." }) }) }),
|
|
49662
|
+
metaParts.length > 0 ? /* @__PURE__ */ jsx383("span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ jsx383("span", { className: COMPACT_CARD_META_ROW, children: metaParts.map((part, i) => /* @__PURE__ */ jsxs303(React149.Fragment, { children: [
|
|
49663
|
+
i > 0 ? /* @__PURE__ */ jsx383("span", { className: "text-ods-text-secondary/40 shrink-0", children: "\xB7" }) : null,
|
|
49664
|
+
/* @__PURE__ */ jsx383("span", { className: "min-w-0 truncate", children: part })
|
|
49605
49665
|
] }, i)) }) }) : null
|
|
49606
49666
|
] }),
|
|
49607
|
-
href ? /* @__PURE__ */
|
|
49667
|
+
href ? /* @__PURE__ */ jsx383("span", { className: "flex shrink-0 items-center self-start h-5 text-ods-text-secondary", children: /* @__PURE__ */ jsx383(ExternalLink10, { className: "w-3.5 h-3.5" }) }) : null
|
|
49608
49668
|
] });
|
|
49609
49669
|
if (anchorProps) {
|
|
49610
|
-
return /* @__PURE__ */
|
|
49670
|
+
return /* @__PURE__ */ jsx383("a", { ...anchorProps, className: `${COMPACT_CARD_OUTER} ${className ?? ""}`, children: body });
|
|
49611
49671
|
}
|
|
49612
|
-
return href ? /* @__PURE__ */
|
|
49672
|
+
return href ? /* @__PURE__ */ jsx383(
|
|
49613
49673
|
"a",
|
|
49614
49674
|
{
|
|
49615
49675
|
href,
|
|
@@ -49618,79 +49678,79 @@ function HubspotTicketCard({ item, variant = "compact", className, anchorProps }
|
|
|
49618
49678
|
className: `${COMPACT_CARD_OUTER} ${className ?? ""}`,
|
|
49619
49679
|
children: body
|
|
49620
49680
|
}
|
|
49621
|
-
) : /* @__PURE__ */
|
|
49681
|
+
) : /* @__PURE__ */ jsx383("span", { className: `${COMPACT_CARD_OUTER_STATIC} ${className ?? ""}`, "aria-label": "No link available", children: body });
|
|
49622
49682
|
}
|
|
49623
49683
|
function HubspotTicketCardSkeleton({ variant = "compact", className }) {
|
|
49624
49684
|
if (variant === "row") {
|
|
49625
|
-
return /* @__PURE__ */
|
|
49626
|
-
/* @__PURE__ */
|
|
49627
|
-
/* @__PURE__ */
|
|
49628
|
-
/* @__PURE__ */
|
|
49629
|
-
/* @__PURE__ */
|
|
49685
|
+
return /* @__PURE__ */ jsxs303("div", { className: `flex items-center gap-3 min-w-0 animate-pulse ${className ?? ""}`, children: [
|
|
49686
|
+
/* @__PURE__ */ jsx383("div", { className: "h-3 w-40 bg-ods-bg rounded shrink-0" }),
|
|
49687
|
+
/* @__PURE__ */ jsx383("div", { className: "h-3 w-2/3 bg-ods-bg/60 rounded flex-1" }),
|
|
49688
|
+
/* @__PURE__ */ jsx383("div", { className: "h-3 w-16 bg-ods-bg/60 rounded shrink-0" }),
|
|
49689
|
+
/* @__PURE__ */ jsx383("div", { className: "h-3 w-20 bg-ods-bg/60 rounded shrink-0" })
|
|
49630
49690
|
] });
|
|
49631
49691
|
}
|
|
49632
|
-
return /* @__PURE__ */
|
|
49633
|
-
/* @__PURE__ */
|
|
49634
|
-
/* @__PURE__ */
|
|
49635
|
-
/* @__PURE__ */
|
|
49636
|
-
/* @__PURE__ */
|
|
49637
|
-
/* @__PURE__ */
|
|
49692
|
+
return /* @__PURE__ */ jsxs303("span", { className: `${COMPACT_CARD_SKELETON_OUTER} ${className ?? ""}`, children: [
|
|
49693
|
+
/* @__PURE__ */ jsxs303("span", { className: COMPACT_CARD_TEXT_COL, children: [
|
|
49694
|
+
/* @__PURE__ */ jsxs303("span", { className: "flex flex-wrap items-center gap-1.5 min-w-0", children: [
|
|
49695
|
+
/* @__PURE__ */ jsx383("span", { className: "h-3.5 w-2/3 rounded bg-ods-bg" }),
|
|
49696
|
+
/* @__PURE__ */ jsx383("span", { className: "h-4 w-12 rounded-full bg-ods-bg/60" }),
|
|
49697
|
+
/* @__PURE__ */ jsx383("span", { className: "h-4 w-16 rounded-full bg-ods-bg/60" })
|
|
49638
49698
|
] }),
|
|
49639
|
-
/* @__PURE__ */
|
|
49640
|
-
/* @__PURE__ */
|
|
49641
|
-
/* @__PURE__ */
|
|
49642
|
-
/* @__PURE__ */
|
|
49643
|
-
/* @__PURE__ */
|
|
49644
|
-
/* @__PURE__ */
|
|
49699
|
+
/* @__PURE__ */ jsx383("span", { className: "h-4 w-1/2 rounded bg-ods-bg/60" }),
|
|
49700
|
+
/* @__PURE__ */ jsxs303("span", { className: "flex flex-col gap-0 min-w-0", children: [
|
|
49701
|
+
/* @__PURE__ */ jsx383("span", { className: "h-5 w-5/6 rounded bg-ods-bg/60" }),
|
|
49702
|
+
/* @__PURE__ */ jsx383("span", { className: "h-5 w-4/6 rounded bg-ods-bg/60" }),
|
|
49703
|
+
/* @__PURE__ */ jsx383("span", { className: "h-5 w-3/4 rounded bg-ods-bg/60" }),
|
|
49704
|
+
/* @__PURE__ */ jsx383("span", { className: "h-5 w-2/5 rounded bg-ods-bg/60" })
|
|
49645
49705
|
] }),
|
|
49646
|
-
/* @__PURE__ */
|
|
49706
|
+
/* @__PURE__ */ jsx383("span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ jsx383("span", { className: "h-3 w-1/3 rounded bg-ods-bg/70" }) })
|
|
49647
49707
|
] }),
|
|
49648
|
-
/* @__PURE__ */
|
|
49708
|
+
/* @__PURE__ */ jsx383("span", { className: "flex shrink-0 items-center self-start h-5", children: /* @__PURE__ */ jsx383("span", { className: "h-3.5 w-3.5 rounded bg-ods-bg" }) })
|
|
49649
49709
|
] });
|
|
49650
49710
|
}
|
|
49651
49711
|
|
|
49652
49712
|
// src/components/chat/entity-cards/data-room-doc-card.tsx
|
|
49653
49713
|
import { ExternalLink as ExternalLink11 } from "lucide-react";
|
|
49654
|
-
import { Fragment as Fragment83, jsx as
|
|
49714
|
+
import { Fragment as Fragment83, jsx as jsx384, jsxs as jsxs304 } from "react/jsx-runtime";
|
|
49655
49715
|
function DataRoomDocCard({ item, className, badgeText, anchorProps }) {
|
|
49656
|
-
const body = /* @__PURE__ */
|
|
49657
|
-
/* @__PURE__ */
|
|
49658
|
-
/* @__PURE__ */
|
|
49659
|
-
/* @__PURE__ */
|
|
49660
|
-
/* @__PURE__ */
|
|
49716
|
+
const body = /* @__PURE__ */ jsxs304(Fragment83, { children: [
|
|
49717
|
+
/* @__PURE__ */ jsxs304("span", { className: COMPACT_CARD_TEXT_COL, children: [
|
|
49718
|
+
/* @__PURE__ */ jsxs304("span", { className: "flex flex-wrap items-center gap-1.5 min-w-0", children: [
|
|
49719
|
+
/* @__PURE__ */ jsx384("span", { className: `${COMPACT_CARD_TITLE} shrink min-w-0`, children: item.title }),
|
|
49720
|
+
/* @__PURE__ */ jsx384(StatusBadge, { text: badgeText, variant: "button", colorScheme: "cyan", className: "shrink-0" })
|
|
49661
49721
|
] }),
|
|
49662
|
-
item.path ? /* @__PURE__ */
|
|
49663
|
-
/* @__PURE__ */
|
|
49664
|
-
/* @__PURE__ */
|
|
49722
|
+
item.path ? /* @__PURE__ */ jsxs304("span", { className: "flex min-w-0 items-center gap-1 text-h6 text-ods-text-secondary", children: [
|
|
49723
|
+
/* @__PURE__ */ jsx384("span", { className: "shrink-0 text-ods-text-secondary/70", children: "Path:" }),
|
|
49724
|
+
/* @__PURE__ */ jsx384("span", { className: "min-w-0 truncate font-mono", children: item.path })
|
|
49665
49725
|
] }) : null,
|
|
49666
|
-
item.preview ? /* @__PURE__ */
|
|
49726
|
+
item.preview ? /* @__PURE__ */ jsx384("span", { className: "flex min-w-0", children: /* @__PURE__ */ jsx384("span", { className: "line-clamp-2 whitespace-pre-wrap break-words text-h6 text-ods-text-secondary", children: item.preview }) }) : null
|
|
49667
49727
|
] }),
|
|
49668
|
-
anchorProps?.href ? /* @__PURE__ */
|
|
49728
|
+
anchorProps?.href ? /* @__PURE__ */ jsx384("span", { className: "flex shrink-0 items-center self-start h-5 text-ods-text-secondary", children: /* @__PURE__ */ jsx384(ExternalLink11, { className: "w-3.5 h-3.5" }) }) : null
|
|
49669
49729
|
] });
|
|
49670
49730
|
if (!anchorProps) {
|
|
49671
|
-
return /* @__PURE__ */
|
|
49731
|
+
return /* @__PURE__ */ jsx384("span", { className: `${COMPACT_CARD_OUTER_STATIC} ${className ?? ""}`, "aria-label": "No link available", children: body });
|
|
49672
49732
|
}
|
|
49673
|
-
return /* @__PURE__ */
|
|
49733
|
+
return /* @__PURE__ */ jsx384("a", { ...anchorProps, className: `${COMPACT_CARD_OUTER} ${className ?? ""}`, children: body });
|
|
49674
49734
|
}
|
|
49675
49735
|
function DataRoomDocCardSkeleton({ className }) {
|
|
49676
|
-
return /* @__PURE__ */
|
|
49677
|
-
/* @__PURE__ */
|
|
49678
|
-
/* @__PURE__ */
|
|
49679
|
-
/* @__PURE__ */
|
|
49680
|
-
/* @__PURE__ */
|
|
49736
|
+
return /* @__PURE__ */ jsxs304("span", { className: `${COMPACT_CARD_SKELETON_OUTER} ${className ?? ""}`, children: [
|
|
49737
|
+
/* @__PURE__ */ jsxs304("span", { className: COMPACT_CARD_TEXT_COL, children: [
|
|
49738
|
+
/* @__PURE__ */ jsxs304("span", { className: "flex items-center gap-1.5 min-w-0", children: [
|
|
49739
|
+
/* @__PURE__ */ jsx384("span", { className: "h-3.5 w-2/3 rounded bg-ods-bg" }),
|
|
49740
|
+
/* @__PURE__ */ jsx384("span", { className: "h-4 w-16 rounded-full bg-ods-bg/60" })
|
|
49681
49741
|
] }),
|
|
49682
|
-
/* @__PURE__ */
|
|
49683
|
-
/* @__PURE__ */
|
|
49684
|
-
/* @__PURE__ */
|
|
49685
|
-
/* @__PURE__ */
|
|
49742
|
+
/* @__PURE__ */ jsx384("span", { className: "h-4 w-1/2 rounded bg-ods-bg/60" }),
|
|
49743
|
+
/* @__PURE__ */ jsxs304("span", { className: "flex flex-col gap-0 min-w-0", children: [
|
|
49744
|
+
/* @__PURE__ */ jsx384("span", { className: "h-5 w-5/6 rounded bg-ods-bg/60" }),
|
|
49745
|
+
/* @__PURE__ */ jsx384("span", { className: "h-5 w-3/4 rounded bg-ods-bg/60" })
|
|
49686
49746
|
] })
|
|
49687
49747
|
] }),
|
|
49688
|
-
/* @__PURE__ */
|
|
49748
|
+
/* @__PURE__ */ jsx384("span", { className: "flex shrink-0 items-center self-start h-5", children: /* @__PURE__ */ jsx384("span", { className: "h-3.5 w-3.5 rounded bg-ods-bg" }) })
|
|
49689
49749
|
] });
|
|
49690
49750
|
}
|
|
49691
49751
|
|
|
49692
49752
|
// src/components/chat/entity-cards/program-card.tsx
|
|
49693
|
-
import { useState as
|
|
49753
|
+
import { useState as useState117 } from "react";
|
|
49694
49754
|
|
|
49695
49755
|
// node_modules/date-fns/toDate.mjs
|
|
49696
49756
|
function toDate2(argument) {
|
|
@@ -51263,42 +51323,42 @@ function cleanEscapedString(input) {
|
|
|
51263
51323
|
init_button();
|
|
51264
51324
|
import { ExternalLink as ExternalLink12, Clock as Clock2, Play as Play4, Video as Video5 } from "lucide-react";
|
|
51265
51325
|
init_cn();
|
|
51266
|
-
import { Fragment as Fragment84, jsx as
|
|
51326
|
+
import { Fragment as Fragment84, jsx as jsx385, jsxs as jsxs305 } from "react/jsx-runtime";
|
|
51267
51327
|
function formatUtc(date, fmt) {
|
|
51268
51328
|
return format2(new Date(date.getTime() + date.getTimezoneOffset() * 6e4), fmt);
|
|
51269
51329
|
}
|
|
51270
51330
|
function ProgramCardSkeleton({ size: size2 = "default" }) {
|
|
51271
51331
|
if (size2 === "sm") {
|
|
51272
|
-
return /* @__PURE__ */
|
|
51273
|
-
/* @__PURE__ */
|
|
51274
|
-
/* @__PURE__ */
|
|
51275
|
-
/* @__PURE__ */
|
|
51276
|
-
/* @__PURE__ */
|
|
51277
|
-
/* @__PURE__ */
|
|
51332
|
+
return /* @__PURE__ */ jsxs305("span", { className: COMPACT_CARD_SKELETON_OUTER, children: [
|
|
51333
|
+
/* @__PURE__ */ jsx385("span", { className: COMPACT_CARD_SKELETON_IMAGE_SLOT }),
|
|
51334
|
+
/* @__PURE__ */ jsxs305("span", { className: COMPACT_CARD_TEXT_COL, children: [
|
|
51335
|
+
/* @__PURE__ */ jsx385("span", { className: COMPACT_CARD_TITLE_ROW, children: /* @__PURE__ */ jsx385("span", { className: "h-3.5 w-3/5 rounded bg-ods-bg" }) }),
|
|
51336
|
+
/* @__PURE__ */ jsx385("span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ jsx385("span", { className: "h-3 w-2/5 rounded bg-ods-bg/70" }) }),
|
|
51337
|
+
/* @__PURE__ */ jsx385("span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ jsx385("span", { className: "h-3 w-11/12 rounded bg-ods-bg/40" }) })
|
|
51278
51338
|
] }),
|
|
51279
|
-
/* @__PURE__ */
|
|
51339
|
+
/* @__PURE__ */ jsx385("span", { className: "flex shrink-0 items-center self-start h-5", children: /* @__PURE__ */ jsx385("span", { className: "h-3.5 w-3.5 rounded bg-ods-bg" }) })
|
|
51280
51340
|
] });
|
|
51281
51341
|
}
|
|
51282
|
-
return /* @__PURE__ */
|
|
51342
|
+
return /* @__PURE__ */ jsxs305(
|
|
51283
51343
|
"div",
|
|
51284
51344
|
{
|
|
51285
51345
|
className: "border border-ods-border rounded-lg overflow-hidden flex flex-col animate-pulse",
|
|
51286
51346
|
style: { backgroundColor: "var(--ods-system-greys-black)" },
|
|
51287
51347
|
children: [
|
|
51288
|
-
/* @__PURE__ */
|
|
51289
|
-
/* @__PURE__ */
|
|
51290
|
-
/* @__PURE__ */
|
|
51291
|
-
/* @__PURE__ */
|
|
51292
|
-
/* @__PURE__ */
|
|
51293
|
-
/* @__PURE__ */
|
|
51294
|
-
/* @__PURE__ */
|
|
51295
|
-
/* @__PURE__ */
|
|
51296
|
-
/* @__PURE__ */
|
|
51297
|
-
/* @__PURE__ */
|
|
51348
|
+
/* @__PURE__ */ jsx385("div", { className: "p-6 flex-1", children: /* @__PURE__ */ jsxs305("div", { className: "flex flex-col md:flex-row gap-4 md:gap-6", children: [
|
|
51349
|
+
/* @__PURE__ */ jsx385("div", { className: "w-full md:w-[180px] h-[180px] bg-ods-bg rounded-lg flex-shrink-0" }),
|
|
51350
|
+
/* @__PURE__ */ jsxs305("div", { className: "flex-1 min-w-0 flex flex-col gap-3", children: [
|
|
51351
|
+
/* @__PURE__ */ jsx385("div", { className: "h-7 w-3/4 bg-ods-bg rounded" }),
|
|
51352
|
+
/* @__PURE__ */ jsx385("div", { className: "h-7 w-1/2 bg-ods-bg rounded" }),
|
|
51353
|
+
/* @__PURE__ */ jsx385("div", { className: "h-4 w-1/3 bg-ods-bg/60 rounded" }),
|
|
51354
|
+
/* @__PURE__ */ jsxs305("div", { className: "space-y-2", children: [
|
|
51355
|
+
/* @__PURE__ */ jsx385("div", { className: "h-3 w-full bg-ods-bg/60 rounded" }),
|
|
51356
|
+
/* @__PURE__ */ jsx385("div", { className: "h-3 w-5/6 bg-ods-bg/60 rounded" }),
|
|
51357
|
+
/* @__PURE__ */ jsx385("div", { className: "h-3 w-4/5 bg-ods-bg/60 rounded" })
|
|
51298
51358
|
] })
|
|
51299
51359
|
] })
|
|
51300
51360
|
] }) }),
|
|
51301
|
-
/* @__PURE__ */
|
|
51361
|
+
/* @__PURE__ */ jsx385("div", { className: "p-6 pt-0 mt-auto", children: /* @__PURE__ */ jsx385("div", { className: "pt-4 border-t border-ods-border", children: /* @__PURE__ */ jsx385("div", { className: "h-9 w-40 bg-ods-bg rounded" }) }) })
|
|
51302
51362
|
]
|
|
51303
51363
|
}
|
|
51304
51364
|
);
|
|
@@ -51327,8 +51387,8 @@ function getHosts(hosts) {
|
|
|
51327
51387
|
return [];
|
|
51328
51388
|
}
|
|
51329
51389
|
function MediaGallery({ images, title }) {
|
|
51330
|
-
const [selectedImageIndex, setSelectedImageIndex] =
|
|
51331
|
-
const [isModalOpen, setIsModalOpen] =
|
|
51390
|
+
const [selectedImageIndex, setSelectedImageIndex] = useState117(null);
|
|
51391
|
+
const [isModalOpen, setIsModalOpen] = useState117(false);
|
|
51332
51392
|
const openImageModal = (index, event) => {
|
|
51333
51393
|
if (event) event.stopPropagation();
|
|
51334
51394
|
setSelectedImageIndex(index);
|
|
@@ -51338,14 +51398,14 @@ function MediaGallery({ images, title }) {
|
|
|
51338
51398
|
setIsModalOpen(false);
|
|
51339
51399
|
setSelectedImageIndex(null);
|
|
51340
51400
|
};
|
|
51341
|
-
return /* @__PURE__ */
|
|
51342
|
-
/* @__PURE__ */
|
|
51401
|
+
return /* @__PURE__ */ jsxs305(Fragment84, { children: [
|
|
51402
|
+
/* @__PURE__ */ jsx385("div", { className: "p-6 pt-4", children: /* @__PURE__ */ jsx385("div", { className: "overflow-x-auto mb-4", children: /* @__PURE__ */ jsx385("div", { className: "flex gap-3 pb-2", style: { width: "max-content" }, children: images.map((mediaItem, index) => /* @__PURE__ */ jsxs305(
|
|
51343
51403
|
"div",
|
|
51344
51404
|
{
|
|
51345
51405
|
className: "flex-shrink-0 w-24 h-24 relative rounded-md overflow-hidden cursor-pointer group/thumb",
|
|
51346
51406
|
onClick: (e) => openImageModal(index, e),
|
|
51347
51407
|
children: [
|
|
51348
|
-
/* @__PURE__ */
|
|
51408
|
+
/* @__PURE__ */ jsx385(
|
|
51349
51409
|
next_image_default,
|
|
51350
51410
|
{
|
|
51351
51411
|
src: mediaItem.media_url,
|
|
@@ -51357,12 +51417,12 @@ function MediaGallery({ images, title }) {
|
|
|
51357
51417
|
unoptimized: true
|
|
51358
51418
|
}
|
|
51359
51419
|
),
|
|
51360
|
-
/* @__PURE__ */
|
|
51420
|
+
/* @__PURE__ */ jsx385("div", { className: "absolute inset-0 bg-black/20 opacity-0 group-hover/thumb:opacity-100 transition-opacity duration-200 flex items-center justify-center", children: /* @__PURE__ */ jsx385("div", { className: "w-6 h-6 rounded-full bg-white/90 flex items-center justify-center", children: /* @__PURE__ */ jsx385("span", { className: "text-black text-sm", children: "+" }) }) })
|
|
51361
51421
|
]
|
|
51362
51422
|
},
|
|
51363
51423
|
mediaItem.id
|
|
51364
51424
|
)) }) }) }),
|
|
51365
|
-
/* @__PURE__ */
|
|
51425
|
+
/* @__PURE__ */ jsx385(
|
|
51366
51426
|
ImageGalleryModal,
|
|
51367
51427
|
{
|
|
51368
51428
|
images: images.map((img) => img.media_url),
|
|
@@ -51429,7 +51489,7 @@ function ProgramCard({
|
|
|
51429
51489
|
if (size2 === "portrait") {
|
|
51430
51490
|
const profile = programItemToStripProfile(item);
|
|
51431
51491
|
const dateMeta = [compactDate, compactTypeMeta()].filter(Boolean).join(" \xB7 ");
|
|
51432
|
-
return /* @__PURE__ */
|
|
51492
|
+
return /* @__PURE__ */ jsx385(
|
|
51433
51493
|
EntityPortraitCard,
|
|
51434
51494
|
{
|
|
51435
51495
|
href,
|
|
@@ -51453,9 +51513,9 @@ function ProgramCard({
|
|
|
51453
51513
|
const subtitleParts = [itemDate2, typeMeta, config.labels?.singular].filter(
|
|
51454
51514
|
(s) => typeof s === "string" && s.length > 0
|
|
51455
51515
|
);
|
|
51456
|
-
return /* @__PURE__ */
|
|
51457
|
-
/* @__PURE__ */
|
|
51458
|
-
compactCover ? /* @__PURE__ */
|
|
51516
|
+
return /* @__PURE__ */ jsxs305("a", { href, target, rel, className: cn(COMPACT_CARD_OUTER, className), children: [
|
|
51517
|
+
/* @__PURE__ */ jsxs305("span", { className: COMPACT_CARD_IMAGE_SLOT, children: [
|
|
51518
|
+
compactCover ? /* @__PURE__ */ jsx385(
|
|
51459
51519
|
next_image_default,
|
|
51460
51520
|
{
|
|
51461
51521
|
src: compactCover,
|
|
@@ -51465,39 +51525,39 @@ function ProgramCard({
|
|
|
51465
51525
|
className: "object-contain",
|
|
51466
51526
|
unoptimized: true
|
|
51467
51527
|
}
|
|
51468
|
-
) : /* @__PURE__ */
|
|
51469
|
-
config.type === "podcast" && !isScheduled && compactCover && /* @__PURE__ */
|
|
51528
|
+
) : /* @__PURE__ */ jsx385("span", { className: "flex h-full w-full items-center justify-center text-ods-accent", children: config.type === "podcast" ? /* @__PURE__ */ jsx385(Play4, { className: "w-4 h-4" }) : config.type === "webinar" ? /* @__PURE__ */ jsx385(Video5, { className: "w-4 h-4" }) : /* @__PURE__ */ jsx385(Clock2, { className: "w-4 h-4" }) }),
|
|
51529
|
+
config.type === "podcast" && !isScheduled && compactCover && /* @__PURE__ */ jsx385("span", { className: "absolute inset-0 flex items-center justify-center bg-black/30", children: /* @__PURE__ */ jsx385(Play4, { className: "w-4 h-4 text-ods-text-on-dark", fill: "white" }) })
|
|
51470
51530
|
] }),
|
|
51471
|
-
/* @__PURE__ */
|
|
51472
|
-
/* @__PURE__ */
|
|
51473
|
-
/* @__PURE__ */
|
|
51474
|
-
/* @__PURE__ */
|
|
51531
|
+
/* @__PURE__ */ jsxs305("span", { className: COMPACT_CARD_TEXT_COL, children: [
|
|
51532
|
+
/* @__PURE__ */ jsx385("span", { className: COMPACT_CARD_TITLE_ROW, children: /* @__PURE__ */ jsx385("span", { className: cn(COMPACT_CARD_TITLE, "font-heading"), children: item.title }) }),
|
|
51533
|
+
/* @__PURE__ */ jsx385("span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ jsx385("span", { className: "truncate text-h6 text-ods-accent", children: subtitleParts.join(" \xB7 ") }) }),
|
|
51534
|
+
/* @__PURE__ */ jsx385("span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ jsx385("span", { className: COMPACT_CARD_SUMMARY, children: item.description || COMPACT_CARD_ROW_FILLER }) })
|
|
51475
51535
|
] }),
|
|
51476
|
-
/* @__PURE__ */
|
|
51536
|
+
/* @__PURE__ */ jsx385("span", { className: "flex shrink-0 items-center self-start h-5 text-ods-text-secondary", children: /* @__PURE__ */ jsx385(ExternalLink12, { className: "w-3.5 h-3.5" }) })
|
|
51477
51537
|
] });
|
|
51478
51538
|
}
|
|
51479
51539
|
const itemDate = new Date(item.date);
|
|
51480
51540
|
const dateFormat = formatUtc(itemDate, "EEEE d MMMM");
|
|
51481
51541
|
const defaultRenderMeta = () => {
|
|
51482
51542
|
if (config.type === "podcast" && "duration_seconds" in item && !isScheduled) {
|
|
51483
|
-
return /* @__PURE__ */
|
|
51484
|
-
/* @__PURE__ */
|
|
51485
|
-
/* @__PURE__ */
|
|
51543
|
+
return /* @__PURE__ */ jsxs305(Fragment84, { children: [
|
|
51544
|
+
/* @__PURE__ */ jsx385(Clock2, { className: "w-4 h-4 text-ods-text-secondary" }),
|
|
51545
|
+
/* @__PURE__ */ jsx385("span", { className: "font-body text-ods-text-secondary", children: formatDurationCompact(item.duration_seconds) })
|
|
51486
51546
|
] });
|
|
51487
51547
|
}
|
|
51488
51548
|
if (config.type === "event" && "location_name" in item) {
|
|
51489
|
-
return /* @__PURE__ */
|
|
51549
|
+
return /* @__PURE__ */ jsx385("span", { className: "font-body text-ods-text-secondary", children: item.location_name || "Location TBD" });
|
|
51490
51550
|
}
|
|
51491
51551
|
if (config.type === "webinar" && "start_at" in item) {
|
|
51492
51552
|
const webinarItem = item;
|
|
51493
51553
|
const duration = formatDurationFromRange(webinarItem.start_at, webinarItem.end_at);
|
|
51494
|
-
return /* @__PURE__ */
|
|
51495
|
-
/* @__PURE__ */
|
|
51496
|
-
/* @__PURE__ */
|
|
51554
|
+
return /* @__PURE__ */ jsxs305(Fragment84, { children: [
|
|
51555
|
+
/* @__PURE__ */ jsx385(Video5, { className: "w-4 h-4 text-ods-text-secondary" }),
|
|
51556
|
+
/* @__PURE__ */ jsxs305("span", { className: "font-body text-ods-text-secondary", children: [
|
|
51497
51557
|
formatTimeWithTimezone(webinarItem.start_at, webinarItem.timezone ?? null),
|
|
51498
51558
|
duration && ` \xB7 ${duration}`
|
|
51499
51559
|
] }),
|
|
51500
|
-
webinarItem.timezone && /* @__PURE__ */
|
|
51560
|
+
webinarItem.timezone && /* @__PURE__ */ jsxs305("span", { className: "text-h6 text-ods-text-secondary", children: [
|
|
51501
51561
|
"(",
|
|
51502
51562
|
webinarItem.timezone,
|
|
51503
51563
|
")"
|
|
@@ -51506,9 +51566,9 @@ function ProgramCard({
|
|
|
51506
51566
|
}
|
|
51507
51567
|
return null;
|
|
51508
51568
|
};
|
|
51509
|
-
const cardHeader = /* @__PURE__ */
|
|
51510
|
-
coverImage && /* @__PURE__ */
|
|
51511
|
-
/* @__PURE__ */
|
|
51569
|
+
const cardHeader = /* @__PURE__ */ jsx385("div", { className: "p-6 border-ods-border flex-1", children: /* @__PURE__ */ jsxs305("div", { className: "flex flex-col md:flex-row gap-4 md:gap-6", children: [
|
|
51570
|
+
coverImage && /* @__PURE__ */ jsx385("div", { className: "w-full md:w-[180px] flex-shrink-0 flex items-center", children: /* @__PURE__ */ jsxs305("div", { className: "relative rounded-lg overflow-hidden", children: [
|
|
51571
|
+
/* @__PURE__ */ jsx385(
|
|
51512
51572
|
next_image_default,
|
|
51513
51573
|
{
|
|
51514
51574
|
src: coverImage,
|
|
@@ -51519,23 +51579,23 @@ function ProgramCard({
|
|
|
51519
51579
|
unoptimized: true
|
|
51520
51580
|
}
|
|
51521
51581
|
),
|
|
51522
|
-
config.type === "podcast" && !isScheduled && /* @__PURE__ */
|
|
51582
|
+
config.type === "podcast" && !isScheduled && /* @__PURE__ */ jsx385("div", { className: "absolute inset-0 flex items-center justify-center bg-black/40 opacity-0 group-hover:opacity-100 transition-opacity rounded-lg", children: /* @__PURE__ */ jsx385(Play4, { className: "w-10 h-10 text-ods-text-on-dark", fill: "white" }) })
|
|
51523
51583
|
] }) }),
|
|
51524
|
-
/* @__PURE__ */
|
|
51525
|
-
/* @__PURE__ */
|
|
51526
|
-
/* @__PURE__ */
|
|
51527
|
-
/* @__PURE__ */
|
|
51528
|
-
renderMeta ? /* @__PURE__ */
|
|
51529
|
-
/* @__PURE__ */
|
|
51584
|
+
/* @__PURE__ */ jsxs305("div", { className: "flex-1 min-w-0 flex flex-col", children: [
|
|
51585
|
+
/* @__PURE__ */ jsx385("h3", { className: "text-h2 text-ods-text-primary mb-3 min-h-[3rem] md:min-h-[3.5rem] line-clamp-2 flex items-center", children: item.title }),
|
|
51586
|
+
/* @__PURE__ */ jsxs305("div", { className: "flex flex-col md:flex-row md:items-center gap-2 md:gap-4 mb-4", children: [
|
|
51587
|
+
/* @__PURE__ */ jsx385("span", { className: "text-h6", style: { color: accentColor }, children: dateFormat }),
|
|
51588
|
+
renderMeta ? /* @__PURE__ */ jsxs305(Fragment84, { children: [
|
|
51589
|
+
/* @__PURE__ */ jsx385("span", { className: "hidden md:inline text-ods-text-secondary", children: "\u2022" }),
|
|
51530
51590
|
renderMeta(item)
|
|
51531
|
-
] }) : defaultRenderMeta() && /* @__PURE__ */
|
|
51532
|
-
/* @__PURE__ */
|
|
51533
|
-
/* @__PURE__ */
|
|
51591
|
+
] }) : defaultRenderMeta() && /* @__PURE__ */ jsxs305(Fragment84, { children: [
|
|
51592
|
+
/* @__PURE__ */ jsx385("span", { className: "hidden md:inline text-ods-text-secondary", children: "\u2022" }),
|
|
51593
|
+
/* @__PURE__ */ jsx385("div", { className: "flex items-center gap-2", children: defaultRenderMeta() })
|
|
51534
51594
|
] })
|
|
51535
51595
|
] }),
|
|
51536
|
-
/* @__PURE__ */
|
|
51596
|
+
/* @__PURE__ */ jsx385("div", { className: "flex-1", children: /* @__PURE__ */ jsx385("p", { className: "text-h6 text-ods-text-secondary line-clamp-3 min-h-[4.5rem]", children: item.description }) })
|
|
51537
51597
|
] }),
|
|
51538
|
-
hosts.length > 0 && /* @__PURE__ */
|
|
51598
|
+
hosts.length > 0 && /* @__PURE__ */ jsx385("div", { className: "md:text-right", children: /* @__PURE__ */ jsx385("div", { className: "flex flex-wrap md:justify-end gap-2", children: hosts.map((host, index) => /* @__PURE__ */ jsx385(
|
|
51539
51599
|
SquareAvatar,
|
|
51540
51600
|
{
|
|
51541
51601
|
variant: "round",
|
|
@@ -51553,7 +51613,7 @@ function ProgramCard({
|
|
|
51553
51613
|
);
|
|
51554
51614
|
const cardFrameStyle = { backgroundColor: "var(--ods-system-greys-black)" };
|
|
51555
51615
|
if (wholeCardClickable) {
|
|
51556
|
-
return /* @__PURE__ */
|
|
51616
|
+
return /* @__PURE__ */ jsxs305(
|
|
51557
51617
|
"a",
|
|
51558
51618
|
{
|
|
51559
51619
|
href,
|
|
@@ -51564,8 +51624,8 @@ function ProgramCard({
|
|
|
51564
51624
|
"aria-label": `Open ${item.title}`,
|
|
51565
51625
|
children: [
|
|
51566
51626
|
cardHeader,
|
|
51567
|
-
images.length > 0 && /* @__PURE__ */
|
|
51568
|
-
/* @__PURE__ */
|
|
51627
|
+
images.length > 0 && /* @__PURE__ */ jsx385(MediaGallery, { images, title: item.title }),
|
|
51628
|
+
/* @__PURE__ */ jsx385("div", { className: "p-6 pt-0 mt-auto", children: /* @__PURE__ */ jsx385("div", { className: "pt-4 border-t border-ods-border", children: /* @__PURE__ */ jsxs305(
|
|
51569
51629
|
"span",
|
|
51570
51630
|
{
|
|
51571
51631
|
className: "inline-flex items-center gap-2 px-4 py-2 rounded-md border border-ods-accent text-ods-accent text-h6",
|
|
@@ -51574,7 +51634,7 @@ function ProgramCard({
|
|
|
51574
51634
|
"View ",
|
|
51575
51635
|
config.labels.singular,
|
|
51576
51636
|
" Details",
|
|
51577
|
-
/* @__PURE__ */
|
|
51637
|
+
/* @__PURE__ */ jsx385(ExternalLink12, { className: "w-5 h-5" })
|
|
51578
51638
|
]
|
|
51579
51639
|
}
|
|
51580
51640
|
) }) })
|
|
@@ -51582,17 +51642,17 @@ function ProgramCard({
|
|
|
51582
51642
|
}
|
|
51583
51643
|
);
|
|
51584
51644
|
}
|
|
51585
|
-
return /* @__PURE__ */
|
|
51586
|
-
/* @__PURE__ */
|
|
51587
|
-
images.length > 0 && /* @__PURE__ */
|
|
51588
|
-
/* @__PURE__ */
|
|
51645
|
+
return /* @__PURE__ */ jsxs305("div", { className: cardFrameClass, style: cardFrameStyle, children: [
|
|
51646
|
+
/* @__PURE__ */ jsx385("a", { href, target, rel, className: "block", "aria-label": `Open ${item.title}`, children: cardHeader }),
|
|
51647
|
+
images.length > 0 && /* @__PURE__ */ jsx385(MediaGallery, { images, title: item.title }),
|
|
51648
|
+
/* @__PURE__ */ jsx385("div", { className: "p-6 pt-0 mt-auto", children: /* @__PURE__ */ jsx385("div", { className: "pt-4 border-t border-ods-border", children: /* @__PURE__ */ jsxs305(
|
|
51589
51649
|
Button,
|
|
51590
51650
|
{
|
|
51591
51651
|
variant: "outline",
|
|
51592
51652
|
size: "small-legacy",
|
|
51593
51653
|
href,
|
|
51594
51654
|
openInNewTab: target === "_blank",
|
|
51595
|
-
rightIcon: /* @__PURE__ */
|
|
51655
|
+
rightIcon: /* @__PURE__ */ jsx385(ExternalLink12, { className: "w-5 h-5" }),
|
|
51596
51656
|
children: [
|
|
51597
51657
|
"View ",
|
|
51598
51658
|
config.labels.singular,
|
|
@@ -51605,48 +51665,48 @@ function ProgramCard({
|
|
|
51605
51665
|
|
|
51606
51666
|
// src/components/chat/entity-cards/campaign-card-admin.tsx
|
|
51607
51667
|
import { Megaphone as Megaphone3 } from "lucide-react";
|
|
51608
|
-
import { Fragment as Fragment85, jsx as
|
|
51668
|
+
import { Fragment as Fragment85, jsx as jsx386, jsxs as jsxs306 } from "react/jsx-runtime";
|
|
51609
51669
|
function CampaignCardAdmin({ campaign, className, anchorProps }) {
|
|
51610
51670
|
const goalsCount = campaign.goals?.length || 0;
|
|
51611
|
-
const innerChildren = /* @__PURE__ */
|
|
51612
|
-
/* @__PURE__ */
|
|
51613
|
-
/* @__PURE__ */
|
|
51614
|
-
/* @__PURE__ */
|
|
51615
|
-
/* @__PURE__ */
|
|
51671
|
+
const innerChildren = /* @__PURE__ */ jsxs306(Fragment85, { children: [
|
|
51672
|
+
/* @__PURE__ */ jsx386("span", { className: COMPACT_CARD_ICON_SLOT, children: /* @__PURE__ */ jsx386(Megaphone3, { className: "h-5 w-5" }) }),
|
|
51673
|
+
/* @__PURE__ */ jsxs306("span", { className: COMPACT_CARD_TEXT_COL, children: [
|
|
51674
|
+
/* @__PURE__ */ jsx386("span", { className: COMPACT_CARD_TITLE_ROW, children: /* @__PURE__ */ jsx386("span", { className: COMPACT_CARD_TITLE, children: campaign.name }) }),
|
|
51675
|
+
/* @__PURE__ */ jsx386("span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ jsx386("span", { className: COMPACT_CARD_SUBTITLE, children: [
|
|
51616
51676
|
campaign.start_date ? formatDateShort(campaign.start_date) : null,
|
|
51617
51677
|
goalsCount > 0 ? `${goalsCount} goal${goalsCount !== 1 ? "s" : ""}` : null,
|
|
51618
51678
|
"Marketing campaign"
|
|
51619
51679
|
].filter(Boolean).join(" \xB7 ") }) }),
|
|
51620
|
-
/* @__PURE__ */
|
|
51680
|
+
/* @__PURE__ */ jsx386("span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ jsx386("span", { className: COMPACT_CARD_SUMMARY, children: campaign.description || COMPACT_CARD_ROW_FILLER }) })
|
|
51621
51681
|
] })
|
|
51622
51682
|
] });
|
|
51623
51683
|
if (anchorProps) {
|
|
51624
|
-
return /* @__PURE__ */
|
|
51684
|
+
return /* @__PURE__ */ jsx386("a", { ...anchorProps, className: `${COMPACT_CARD_OUTER} ${className ?? ""}`, children: innerChildren });
|
|
51625
51685
|
}
|
|
51626
|
-
return /* @__PURE__ */
|
|
51686
|
+
return /* @__PURE__ */ jsx386("span", { className: `${COMPACT_CARD_OUTER_STATIC} ${className ?? ""}`, "aria-label": "No link available", children: innerChildren });
|
|
51627
51687
|
}
|
|
51628
51688
|
function CampaignCardAdminSkeleton({ className }) {
|
|
51629
|
-
return /* @__PURE__ */
|
|
51630
|
-
/* @__PURE__ */
|
|
51631
|
-
/* @__PURE__ */
|
|
51632
|
-
/* @__PURE__ */
|
|
51633
|
-
/* @__PURE__ */
|
|
51634
|
-
/* @__PURE__ */
|
|
51689
|
+
return /* @__PURE__ */ jsxs306("span", { className: `${COMPACT_CARD_SKELETON_OUTER} ${className ?? ""}`, children: [
|
|
51690
|
+
/* @__PURE__ */ jsx386("span", { className: COMPACT_CARD_SKELETON_IMAGE_SLOT }),
|
|
51691
|
+
/* @__PURE__ */ jsxs306("span", { className: COMPACT_CARD_TEXT_COL, children: [
|
|
51692
|
+
/* @__PURE__ */ jsx386("span", { className: COMPACT_CARD_TITLE_ROW, children: /* @__PURE__ */ jsx386("span", { className: "h-3.5 w-3/5 rounded bg-ods-bg" }) }),
|
|
51693
|
+
/* @__PURE__ */ jsx386("span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ jsx386("span", { className: "h-3 w-1/2 rounded bg-ods-bg/70" }) }),
|
|
51694
|
+
/* @__PURE__ */ jsx386("span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ jsx386("span", { className: "h-3 w-11/12 rounded bg-ods-bg/40" }) })
|
|
51635
51695
|
] })
|
|
51636
51696
|
] });
|
|
51637
51697
|
}
|
|
51638
51698
|
|
|
51639
51699
|
// src/components/chat/entity-cards/generic-entity-card.tsx
|
|
51640
51700
|
import { ExternalLink as ExternalLink13 } from "lucide-react";
|
|
51641
|
-
import { Fragment as Fragment86, jsx as
|
|
51701
|
+
import { Fragment as Fragment86, jsx as jsx387, jsxs as jsxs307 } from "react/jsx-runtime";
|
|
51642
51702
|
function GenericEntityCard({ item, className, anchorProps }) {
|
|
51643
51703
|
const href = safeHref(item.url);
|
|
51644
51704
|
const dateText = formatDateUTC(item.dateUpdated, { fallback: "", timezone: "local" });
|
|
51645
|
-
const body = /* @__PURE__ */
|
|
51646
|
-
/* @__PURE__ */
|
|
51647
|
-
/* @__PURE__ */
|
|
51648
|
-
/* @__PURE__ */
|
|
51649
|
-
item.badge ? /* @__PURE__ */
|
|
51705
|
+
const body = /* @__PURE__ */ jsxs307(Fragment86, { children: [
|
|
51706
|
+
/* @__PURE__ */ jsxs307("span", { className: COMPACT_CARD_TEXT_COL, children: [
|
|
51707
|
+
/* @__PURE__ */ jsxs307("span", { className: "flex flex-wrap items-center gap-1.5 min-w-0", children: [
|
|
51708
|
+
/* @__PURE__ */ jsx387("span", { className: `${COMPACT_CARD_TITLE} shrink min-w-0`, children: item.title }),
|
|
51709
|
+
item.badge ? /* @__PURE__ */ jsx387(
|
|
51650
51710
|
StatusBadge,
|
|
51651
51711
|
{
|
|
51652
51712
|
text: item.badge.text,
|
|
@@ -51656,44 +51716,44 @@ function GenericEntityCard({ item, className, anchorProps }) {
|
|
|
51656
51716
|
}
|
|
51657
51717
|
) : null
|
|
51658
51718
|
] }),
|
|
51659
|
-
item.subtitle ? /* @__PURE__ */
|
|
51660
|
-
item.preview ? /* @__PURE__ */
|
|
51661
|
-
item.facts && item.facts.length > 0 ? /* @__PURE__ */
|
|
51662
|
-
/* @__PURE__ */
|
|
51719
|
+
item.subtitle ? /* @__PURE__ */ jsx387("span", { className: "flex min-w-0 items-center gap-1 text-h6 text-ods-text-secondary", children: /* @__PURE__ */ jsx387("span", { className: "min-w-0 truncate font-mono", children: item.subtitle }) }) : null,
|
|
51720
|
+
item.preview ? /* @__PURE__ */ jsx387("span", { className: "flex min-w-0", children: /* @__PURE__ */ jsx387("span", { className: "line-clamp-2 whitespace-pre-wrap break-words text-h6 text-ods-text-secondary", children: item.preview }) }) : null,
|
|
51721
|
+
item.facts && item.facts.length > 0 ? /* @__PURE__ */ jsx387("span", { className: "flex flex-wrap items-center gap-x-3 gap-y-0.5 min-w-0 text-h6", children: item.facts.map((f, i) => /* @__PURE__ */ jsxs307("span", { className: "inline-flex items-center gap-1 min-w-0 truncate", children: [
|
|
51722
|
+
/* @__PURE__ */ jsxs307("span", { className: "text-ods-text-secondary/70 shrink-0", children: [
|
|
51663
51723
|
f.label,
|
|
51664
51724
|
":"
|
|
51665
51725
|
] }),
|
|
51666
|
-
/* @__PURE__ */
|
|
51726
|
+
/* @__PURE__ */ jsx387("span", { className: "text-ods-text-primary font-medium truncate", children: f.value })
|
|
51667
51727
|
] }, i)) }) : null,
|
|
51668
|
-
dateText ? /* @__PURE__ */
|
|
51728
|
+
dateText ? /* @__PURE__ */ jsx387("span", { className: COMPACT_CARD_META_ROW_BOX, children: /* @__PURE__ */ jsx387("span", { className: COMPACT_CARD_META_ROW, children: /* @__PURE__ */ jsx387("span", { className: "whitespace-nowrap", children: dateText }) }) }) : null
|
|
51669
51729
|
] }),
|
|
51670
|
-
href ? /* @__PURE__ */
|
|
51730
|
+
href ? /* @__PURE__ */ jsx387("span", { className: "flex shrink-0 items-center self-start h-5 text-ods-text-secondary", children: /* @__PURE__ */ jsx387(ExternalLink13, { className: "w-3.5 h-3.5" }) }) : null
|
|
51671
51731
|
] });
|
|
51672
51732
|
if (anchorProps) {
|
|
51673
|
-
return /* @__PURE__ */
|
|
51733
|
+
return /* @__PURE__ */ jsx387("a", { ...anchorProps, className: `${COMPACT_CARD_OUTER} ${className ?? ""}`, children: body });
|
|
51674
51734
|
}
|
|
51675
|
-
return href ? /* @__PURE__ */
|
|
51735
|
+
return href ? /* @__PURE__ */ jsx387("a", { href, className: `${COMPACT_CARD_OUTER} ${className ?? ""}`, children: body }) : /* @__PURE__ */ jsx387("span", { className: `${COMPACT_CARD_OUTER_STATIC} ${className ?? ""}`, "aria-label": "No link available", children: body });
|
|
51676
51736
|
}
|
|
51677
51737
|
function GenericEntityCardSkeleton({ className }) {
|
|
51678
|
-
return /* @__PURE__ */
|
|
51679
|
-
/* @__PURE__ */
|
|
51680
|
-
/* @__PURE__ */
|
|
51681
|
-
/* @__PURE__ */
|
|
51682
|
-
/* @__PURE__ */
|
|
51738
|
+
return /* @__PURE__ */ jsxs307("span", { className: `${COMPACT_CARD_SKELETON_OUTER} ${className ?? ""}`, children: [
|
|
51739
|
+
/* @__PURE__ */ jsxs307("span", { className: COMPACT_CARD_TEXT_COL, children: [
|
|
51740
|
+
/* @__PURE__ */ jsxs307("span", { className: "flex items-center gap-1.5 min-w-0", children: [
|
|
51741
|
+
/* @__PURE__ */ jsx387("span", { className: "h-3.5 w-2/3 rounded bg-ods-bg" }),
|
|
51742
|
+
/* @__PURE__ */ jsx387("span", { className: "h-4 w-16 rounded-full bg-ods-bg/60" })
|
|
51683
51743
|
] }),
|
|
51684
|
-
/* @__PURE__ */
|
|
51685
|
-
/* @__PURE__ */
|
|
51686
|
-
/* @__PURE__ */
|
|
51687
|
-
/* @__PURE__ */
|
|
51744
|
+
/* @__PURE__ */ jsx387("span", { className: "h-4 w-1/2 rounded bg-ods-bg/60" }),
|
|
51745
|
+
/* @__PURE__ */ jsxs307("span", { className: "flex flex-col gap-0 min-w-0", children: [
|
|
51746
|
+
/* @__PURE__ */ jsx387("span", { className: "h-5 w-5/6 rounded bg-ods-bg/60" }),
|
|
51747
|
+
/* @__PURE__ */ jsx387("span", { className: "h-5 w-3/4 rounded bg-ods-bg/60" })
|
|
51688
51748
|
] }),
|
|
51689
|
-
/* @__PURE__ */
|
|
51749
|
+
/* @__PURE__ */ jsx387("span", { className: "h-3 w-1/4 rounded bg-ods-bg/70" })
|
|
51690
51750
|
] }),
|
|
51691
|
-
/* @__PURE__ */
|
|
51751
|
+
/* @__PURE__ */ jsx387("span", { className: "flex shrink-0 items-center self-start h-5", children: /* @__PURE__ */ jsx387("span", { className: "h-3.5 w-3.5 rounded bg-ods-bg" }) })
|
|
51692
51752
|
] });
|
|
51693
51753
|
}
|
|
51694
51754
|
|
|
51695
51755
|
// src/components/chat/entity-cards/dispatch.tsx
|
|
51696
|
-
import
|
|
51756
|
+
import React151 from "react";
|
|
51697
51757
|
init_next_navigation();
|
|
51698
51758
|
|
|
51699
51759
|
// src/components/chat/hooks/use-chat-card-item.ts
|
|
@@ -51880,14 +51940,14 @@ function resolveFetchedCardHref({
|
|
|
51880
51940
|
|
|
51881
51941
|
// src/components/chat/entity-cards/deleted-data-card.tsx
|
|
51882
51942
|
import { Trash2 as Trash27 } from "lucide-react";
|
|
51883
|
-
import { jsx as
|
|
51943
|
+
import { jsx as jsx388, jsxs as jsxs308 } from "react/jsx-runtime";
|
|
51884
51944
|
function DeletedDataCard({ title, entityLabel, recoveryNote, className }) {
|
|
51885
51945
|
const label = entityLabel || "Item";
|
|
51886
|
-
return /* @__PURE__ */
|
|
51887
|
-
/* @__PURE__ */
|
|
51888
|
-
/* @__PURE__ */
|
|
51889
|
-
/* @__PURE__ */
|
|
51890
|
-
/* @__PURE__ */
|
|
51946
|
+
return /* @__PURE__ */ jsxs308("div", { className: `${COMPACT_CARD_OUTER_STATIC} opacity-70 ${className ?? ""}`, children: [
|
|
51947
|
+
/* @__PURE__ */ jsx388("div", { className: COMPACT_CARD_ICON_SLOT, children: /* @__PURE__ */ jsx388(Trash27, { className: "h-4 w-4 text-ods-text-secondary" }) }),
|
|
51948
|
+
/* @__PURE__ */ jsxs308("div", { className: COMPACT_CARD_TEXT_COL, children: [
|
|
51949
|
+
/* @__PURE__ */ jsx388("div", { className: COMPACT_CARD_TITLE_ROW, children: /* @__PURE__ */ jsx388("span", { className: `${COMPACT_CARD_TITLE} line-through text-ods-text-secondary`, children: title || `Deleted ${label.toLowerCase()}` }) }),
|
|
51950
|
+
/* @__PURE__ */ jsx388("div", { className: COMPACT_CARD_META_ROW, children: /* @__PURE__ */ jsxs308("span", { className: "text-ods-text-secondary", children: [
|
|
51891
51951
|
label,
|
|
51892
51952
|
" deleted",
|
|
51893
51953
|
recoveryNote ? ` \xB7 ${recoveryNote}` : ""
|
|
@@ -51898,16 +51958,16 @@ function DeletedDataCard({ title, entityLabel, recoveryNote, className }) {
|
|
|
51898
51958
|
|
|
51899
51959
|
// src/components/chat/mingo-info-card.tsx
|
|
51900
51960
|
init_cn();
|
|
51901
|
-
import { Fragment as Fragment87, jsx as
|
|
51961
|
+
import { Fragment as Fragment87, jsx as jsx389, jsxs as jsxs309 } from "react/jsx-runtime";
|
|
51902
51962
|
function CardMedia({
|
|
51903
51963
|
imageSrc,
|
|
51904
51964
|
imageAlt,
|
|
51905
51965
|
icon
|
|
51906
51966
|
}) {
|
|
51907
51967
|
if (imageSrc) {
|
|
51908
|
-
return /* @__PURE__ */
|
|
51909
|
-
/* @__PURE__ */
|
|
51910
|
-
/* @__PURE__ */
|
|
51968
|
+
return /* @__PURE__ */ jsxs309("span", { className: "relative block size-10 shrink-0", children: [
|
|
51969
|
+
/* @__PURE__ */ jsx389("span", { className: "absolute inset-0 flex items-center justify-center rounded-sm border border-ods-border bg-ods-bg text-h6 text-ods-text-primary", children: getFirstLastInitials(imageAlt) || "?" }),
|
|
51970
|
+
/* @__PURE__ */ jsx389(
|
|
51911
51971
|
"img",
|
|
51912
51972
|
{
|
|
51913
51973
|
src: imageSrc,
|
|
@@ -51921,12 +51981,12 @@ function CardMedia({
|
|
|
51921
51981
|
] });
|
|
51922
51982
|
}
|
|
51923
51983
|
if (icon) {
|
|
51924
|
-
return /* @__PURE__ */
|
|
51984
|
+
return /* @__PURE__ */ jsx389("span", { className: "flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-md border border-ods-border bg-ods-bg text-ods-text-secondary", children: /* @__PURE__ */ jsx389("span", { className: "flex size-6 items-center justify-center", children: icon }) });
|
|
51925
51985
|
}
|
|
51926
51986
|
return null;
|
|
51927
51987
|
}
|
|
51928
51988
|
function MingoInfoCardSkeleton({ className }) {
|
|
51929
|
-
return /* @__PURE__ */
|
|
51989
|
+
return /* @__PURE__ */ jsxs309(
|
|
51930
51990
|
"span",
|
|
51931
51991
|
{
|
|
51932
51992
|
className: cn(
|
|
@@ -51934,12 +51994,12 @@ function MingoInfoCardSkeleton({ className }) {
|
|
|
51934
51994
|
className
|
|
51935
51995
|
),
|
|
51936
51996
|
children: [
|
|
51937
|
-
/* @__PURE__ */
|
|
51938
|
-
/* @__PURE__ */
|
|
51939
|
-
/* @__PURE__ */
|
|
51940
|
-
/* @__PURE__ */
|
|
51997
|
+
/* @__PURE__ */ jsx389("span", { className: "block size-10 shrink-0 rounded-md border border-ods-border bg-ods-bg" }),
|
|
51998
|
+
/* @__PURE__ */ jsxs309("span", { className: "flex min-w-0 flex-1 flex-col justify-center gap-1.5", children: [
|
|
51999
|
+
/* @__PURE__ */ jsx389("span", { className: "block h-4 w-1/2 rounded bg-ods-bg" }),
|
|
52000
|
+
/* @__PURE__ */ jsx389("span", { className: "block h-3 w-3/4 rounded bg-ods-bg/60" })
|
|
51941
52001
|
] }),
|
|
51942
|
-
/* @__PURE__ */
|
|
52002
|
+
/* @__PURE__ */ jsx389("span", { className: "block h-5 w-16 shrink-0 rounded bg-ods-bg/60" })
|
|
51943
52003
|
]
|
|
51944
52004
|
}
|
|
51945
52005
|
);
|
|
@@ -51961,16 +52021,16 @@ function MingoInfoCard({
|
|
|
51961
52021
|
const hasMenu = !!menuGroups && menuGroups.length > 0;
|
|
51962
52022
|
const isAnchor = !!anchorProps;
|
|
51963
52023
|
const isInteractive = isAnchor || !!onClick;
|
|
51964
|
-
const content = /* @__PURE__ */
|
|
51965
|
-
hasMedia && /* @__PURE__ */
|
|
51966
|
-
/* @__PURE__ */
|
|
51967
|
-
/* @__PURE__ */
|
|
51968
|
-
description ? /* @__PURE__ */
|
|
52024
|
+
const content = /* @__PURE__ */ jsxs309(Fragment87, { children: [
|
|
52025
|
+
hasMedia && /* @__PURE__ */ jsx389(CardMedia, { imageSrc, imageAlt, icon }),
|
|
52026
|
+
/* @__PURE__ */ jsxs309("span", { className: "flex min-w-0 flex-1 flex-col justify-center", children: [
|
|
52027
|
+
/* @__PURE__ */ jsx389("span", { className: "truncate text-h4 text-ods-text-primary", children: title }),
|
|
52028
|
+
description ? /* @__PURE__ */ jsx389("span", { className: "truncate text-h6 text-ods-text-secondary", children: description }) : null
|
|
51969
52029
|
] }),
|
|
51970
52030
|
status ? (
|
|
51971
52031
|
// Reuse the shared Tag palette (single source of truth for colours)
|
|
51972
52032
|
// without rendering Tag's `<div>` — span-only for `<p>` validity.
|
|
51973
|
-
/* @__PURE__ */
|
|
52033
|
+
/* @__PURE__ */ jsx389("span", { className: cn(tagVariants({ variant: status.variant ?? "success" }), "shrink-0"), children: /* @__PURE__ */ jsx389("span", { className: "truncate uppercase tracking-[-0.28px]", children: status.label }) })
|
|
51974
52034
|
) : null
|
|
51975
52035
|
] });
|
|
51976
52036
|
const contentClass = cn(
|
|
@@ -51978,7 +52038,7 @@ function MingoInfoCard({
|
|
|
51978
52038
|
hasMenu && "border-r border-ods-border",
|
|
51979
52039
|
isInteractive && "transition-colors hover:bg-ods-bg-hover active:bg-ods-bg-active focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ods-accent cursor-pointer"
|
|
51980
52040
|
);
|
|
51981
|
-
return /* @__PURE__ */
|
|
52041
|
+
return /* @__PURE__ */ jsxs309(
|
|
51982
52042
|
"span",
|
|
51983
52043
|
{
|
|
51984
52044
|
className: cn(
|
|
@@ -51986,20 +52046,20 @@ function MingoInfoCard({
|
|
|
51986
52046
|
className
|
|
51987
52047
|
),
|
|
51988
52048
|
children: [
|
|
51989
|
-
isAnchor ? /* @__PURE__ */
|
|
51990
|
-
hasMenu && /* @__PURE__ */
|
|
52049
|
+
isAnchor ? /* @__PURE__ */ jsx389("a", { ...anchorProps, className: cn(contentClass, "no-underline"), children: content }) : onClick ? /* @__PURE__ */ jsx389("button", { type: "button", onClick, className: contentClass, children: content }) : /* @__PURE__ */ jsx389("span", { className: contentClass, children: content }),
|
|
52050
|
+
hasMenu && /* @__PURE__ */ jsx389(
|
|
51991
52051
|
ActionsMenuDropdown,
|
|
51992
52052
|
{
|
|
51993
52053
|
groups: menuGroups,
|
|
51994
52054
|
triggerAriaLabel: menuAriaLabel,
|
|
51995
52055
|
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
51996
|
-
customTrigger: /* @__PURE__ */
|
|
52056
|
+
customTrigger: /* @__PURE__ */ jsx389(
|
|
51997
52057
|
"button",
|
|
51998
52058
|
{
|
|
51999
52059
|
type: "button",
|
|
52000
52060
|
"aria-label": menuAriaLabel,
|
|
52001
52061
|
className: "flex w-[56px] md:w-[68px] shrink-0 items-center justify-center self-stretch text-ods-text-secondary transition-colors hover:bg-ods-bg-hover hover:text-ods-text-primary active:bg-ods-bg-active active:text-ods-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ods-accent",
|
|
52002
|
-
children: /* @__PURE__ */
|
|
52062
|
+
children: /* @__PURE__ */ jsx389(Ellipsis01Icon, { size: 24 })
|
|
52003
52063
|
}
|
|
52004
52064
|
)
|
|
52005
52065
|
}
|
|
@@ -52010,16 +52070,16 @@ function MingoInfoCard({
|
|
|
52010
52070
|
}
|
|
52011
52071
|
|
|
52012
52072
|
// src/components/chat/entity-cards/dispatch.tsx
|
|
52013
|
-
import { Fragment as Fragment88, jsx as
|
|
52073
|
+
import { Fragment as Fragment88, jsx as jsx390, jsxs as jsxs310 } from "react/jsx-runtime";
|
|
52014
52074
|
function githubKindIcon(kind) {
|
|
52015
52075
|
switch (kind) {
|
|
52016
52076
|
case "pull_request":
|
|
52017
|
-
return /* @__PURE__ */
|
|
52077
|
+
return /* @__PURE__ */ jsx390(CodingPullRequestIcon, { size: 24 });
|
|
52018
52078
|
case "pr_review":
|
|
52019
|
-
return /* @__PURE__ */
|
|
52079
|
+
return /* @__PURE__ */ jsx390(CodeIcon, { size: 24 });
|
|
52020
52080
|
case "commit":
|
|
52021
52081
|
default:
|
|
52022
|
-
return /* @__PURE__ */
|
|
52082
|
+
return /* @__PURE__ */ jsx390(CodingCommitIcon, { size: 24 });
|
|
52023
52083
|
}
|
|
52024
52084
|
}
|
|
52025
52085
|
function reviewStateToVariant(state) {
|
|
@@ -52048,7 +52108,7 @@ function GitHubChatCard({
|
|
|
52048
52108
|
const idLabel = formatActivityId(chatRef.id, kind);
|
|
52049
52109
|
const dateText = formatDateUTC(chatRef.date ?? null, { fallback: "", timezone: "local" });
|
|
52050
52110
|
const description = [idLabel, dateText].filter(Boolean).join(" \xB7 ") || void 0;
|
|
52051
|
-
return /* @__PURE__ */
|
|
52111
|
+
return /* @__PURE__ */ jsx390(
|
|
52052
52112
|
MingoInfoCard,
|
|
52053
52113
|
{
|
|
52054
52114
|
title,
|
|
@@ -52075,12 +52135,12 @@ function cardMenuGroups(href, discuss, openDetails, externalLink) {
|
|
|
52075
52135
|
items.push({
|
|
52076
52136
|
id: "open-details",
|
|
52077
52137
|
label: openDetails?.label ?? "Open Details",
|
|
52078
|
-
icon: openDetails?.icon ?? /* @__PURE__ */
|
|
52138
|
+
icon: openDetails?.icon ?? /* @__PURE__ */ jsx390(EyeIcon2, { size: 20 }),
|
|
52079
52139
|
// Main row → open the entity (same tab, soft Link nav).
|
|
52080
52140
|
href,
|
|
52081
52141
|
// Trailing 40px ↗ side-button → open in a new tab.
|
|
52082
52142
|
iconAction: {
|
|
52083
|
-
icon: /* @__PURE__ */
|
|
52143
|
+
icon: /* @__PURE__ */ jsx390(ArrowRightUpIcon, { size: 20 }),
|
|
52084
52144
|
"aria-label": "Open in new tab",
|
|
52085
52145
|
href,
|
|
52086
52146
|
openInNewTab: true
|
|
@@ -52157,12 +52217,12 @@ function CardLoadFailure({
|
|
|
52157
52217
|
id,
|
|
52158
52218
|
detail
|
|
52159
52219
|
}) {
|
|
52160
|
-
return /* @__PURE__ */
|
|
52220
|
+
return /* @__PURE__ */ jsx390(
|
|
52161
52221
|
MingoInfoCard,
|
|
52162
52222
|
{
|
|
52163
52223
|
title: label,
|
|
52164
52224
|
description: `${detail} \xB7 id: ${id}`,
|
|
52165
|
-
icon: /* @__PURE__ */
|
|
52225
|
+
icon: /* @__PURE__ */ jsx390(AlertTriangleIcon, { size: 24 }),
|
|
52166
52226
|
status: { label: "FAILED", variant: "error" },
|
|
52167
52227
|
menuAriaLabel: "Card failed to load"
|
|
52168
52228
|
}
|
|
@@ -52197,17 +52257,17 @@ function HubspotTicketChatCard({
|
|
|
52197
52257
|
const status = typeof chatRef.metadata?.status === "string" ? chatRef.metadata.status : void 0;
|
|
52198
52258
|
const statusLabel = typeof chatRef.metadata?.statusLabel === "string" ? chatRef.metadata.statusLabel : void 0;
|
|
52199
52259
|
const statusText = statusLabel ?? formatStatusToken(status);
|
|
52200
|
-
return /* @__PURE__ */
|
|
52260
|
+
return /* @__PURE__ */ jsx390(
|
|
52201
52261
|
MingoInfoCard,
|
|
52202
52262
|
{
|
|
52203
52263
|
title: chatRef.title,
|
|
52204
52264
|
description: chatRef.preview ?? void 0,
|
|
52205
|
-
icon: /* @__PURE__ */
|
|
52265
|
+
icon: /* @__PURE__ */ jsx390(TagIcon, { size: 24 }),
|
|
52206
52266
|
status: statusText ? { label: statusText, variant: hubspotStatusToVariant(status) } : void 0,
|
|
52207
52267
|
anchorProps: buildAnchorProps(chatRef.url, isNewTab),
|
|
52208
52268
|
menuGroups: cardMenuGroups(chatRef.url, discuss, {
|
|
52209
52269
|
label: "Open Ticket Details",
|
|
52210
|
-
icon: /* @__PURE__ */
|
|
52270
|
+
icon: /* @__PURE__ */ jsx390(TagIcon, { size: 20 })
|
|
52211
52271
|
}),
|
|
52212
52272
|
menuAriaLabel: "Ticket actions"
|
|
52213
52273
|
}
|
|
@@ -52220,12 +52280,12 @@ function FaqChatCard({
|
|
|
52220
52280
|
}) {
|
|
52221
52281
|
const section = typeof chatRef.metadata?.section === "string" ? chatRef.metadata.section.trim() : void 0;
|
|
52222
52282
|
const statusLabel = section && section.length > 0 ? section : "FAQ";
|
|
52223
|
-
return /* @__PURE__ */
|
|
52283
|
+
return /* @__PURE__ */ jsx390(
|
|
52224
52284
|
MingoInfoCard,
|
|
52225
52285
|
{
|
|
52226
52286
|
title: chatRef.title,
|
|
52227
52287
|
description: chatRef.preview ?? void 0,
|
|
52228
|
-
icon: /* @__PURE__ */
|
|
52288
|
+
icon: /* @__PURE__ */ jsx390(QuestionCircleIcon, { size: 24 }),
|
|
52229
52289
|
status: { label: statusLabel, variant: "grey" },
|
|
52230
52290
|
anchorProps: buildAnchorProps(chatRef.url, isNewTab),
|
|
52231
52291
|
menuGroups: cardMenuGroups(chatRef.url, discuss),
|
|
@@ -52241,12 +52301,12 @@ function SlackChatCard({
|
|
|
52241
52301
|
const channelName = typeof chatRef.metadata?.channelName === "string" ? chatRef.metadata.channelName.trim() : void 0;
|
|
52242
52302
|
const channelPretty = channelName ? channelName.startsWith("#") ? channelName : `#${channelName}` : void 0;
|
|
52243
52303
|
const title = channelPretty ? `${chatRef.title} \xB7 ${channelPretty}` : chatRef.title;
|
|
52244
|
-
return /* @__PURE__ */
|
|
52304
|
+
return /* @__PURE__ */ jsx390(
|
|
52245
52305
|
MingoInfoCard,
|
|
52246
52306
|
{
|
|
52247
52307
|
title,
|
|
52248
52308
|
description: chatRef.preview ?? void 0,
|
|
52249
|
-
icon: /* @__PURE__ */
|
|
52309
|
+
icon: /* @__PURE__ */ jsx390(SlackLogoGreyIcon, { size: 24 }),
|
|
52250
52310
|
anchorProps: buildAnchorProps(chatRef.url, isNewTab),
|
|
52251
52311
|
menuGroups: cardMenuGroups(chatRef.url, discuss),
|
|
52252
52312
|
menuAriaLabel: "Message actions"
|
|
@@ -52259,12 +52319,12 @@ function DataRoomDocChatCard({
|
|
|
52259
52319
|
discuss
|
|
52260
52320
|
}) {
|
|
52261
52321
|
const badgeText = chatRef.sourceRepo ? getSourceLabel(chatRef.sourceRepo) : "Document";
|
|
52262
|
-
return /* @__PURE__ */
|
|
52322
|
+
return /* @__PURE__ */ jsx390(
|
|
52263
52323
|
MingoInfoCard,
|
|
52264
52324
|
{
|
|
52265
52325
|
title: chatRef.title,
|
|
52266
52326
|
description: chatRef.preview ?? void 0,
|
|
52267
|
-
icon: /* @__PURE__ */
|
|
52327
|
+
icon: /* @__PURE__ */ jsx390(FileContentIcon, { size: 24 }),
|
|
52268
52328
|
status: { label: badgeText, variant: "grey" },
|
|
52269
52329
|
anchorProps: buildAnchorProps(chatRef.url, isNewTab),
|
|
52270
52330
|
menuGroups: cardMenuGroups(chatRef.url, discuss),
|
|
@@ -52279,7 +52339,7 @@ function GenericFinancialChatCard({
|
|
|
52279
52339
|
discuss
|
|
52280
52340
|
}) {
|
|
52281
52341
|
const subtitle = typeof chatRef.metadata?.subtitle === "string" ? chatRef.metadata.subtitle : void 0;
|
|
52282
|
-
return /* @__PURE__ */
|
|
52342
|
+
return /* @__PURE__ */ jsx390(
|
|
52283
52343
|
MingoInfoCard,
|
|
52284
52344
|
{
|
|
52285
52345
|
title: chatRef.title,
|
|
@@ -52293,9 +52353,9 @@ function GenericFinancialChatCard({
|
|
|
52293
52353
|
}
|
|
52294
52354
|
function ChatInlineVideoPill({ chatRef }) {
|
|
52295
52355
|
const title = chatRef.title || "Video";
|
|
52296
|
-
return /* @__PURE__ */
|
|
52297
|
-
/* @__PURE__ */
|
|
52298
|
-
/* @__PURE__ */
|
|
52356
|
+
return /* @__PURE__ */ jsxs310("span", { className: "inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-xs align-middle bg-ods-card border border-ods-border text-ods-text-primary", children: [
|
|
52357
|
+
/* @__PURE__ */ jsx390("span", { "aria-hidden": "true", className: "text-ods-text-secondary", children: "\u25B6" }),
|
|
52358
|
+
/* @__PURE__ */ jsx390("span", { className: "truncate max-w-[220px]", children: title })
|
|
52299
52359
|
] });
|
|
52300
52360
|
}
|
|
52301
52361
|
function ChatCardWithDiscuss({
|
|
@@ -52311,11 +52371,11 @@ function ChatCardWithDiscuss({
|
|
|
52311
52371
|
});
|
|
52312
52372
|
const idDisplay = chatRef.id && (chatRef.id.length > 24 ? `${chatRef.id.slice(0, 24)}\u2026` : chatRef.id);
|
|
52313
52373
|
const useDisplay = displayAction && !!onDisplay;
|
|
52314
|
-
const cardBody = /* @__PURE__ */
|
|
52315
|
-
return /* @__PURE__ */
|
|
52374
|
+
const cardBody = /* @__PURE__ */ jsx390("span", { className: "block [&>*]:!my-0", children });
|
|
52375
|
+
return /* @__PURE__ */ jsxs310("span", { className: "mt-1.5 mb-2 block w-full", children: [
|
|
52316
52376
|
cardBody,
|
|
52317
|
-
/* @__PURE__ */
|
|
52318
|
-
/* @__PURE__ */
|
|
52377
|
+
/* @__PURE__ */ jsxs310("span", { className: "mt-1 flex items-center justify-between gap-2 pl-0.5", children: [
|
|
52378
|
+
/* @__PURE__ */ jsx390(
|
|
52319
52379
|
SourceActionButton,
|
|
52320
52380
|
{
|
|
52321
52381
|
chatRef,
|
|
@@ -52324,15 +52384,15 @@ function ChatCardWithDiscuss({
|
|
|
52324
52384
|
density: "card"
|
|
52325
52385
|
}
|
|
52326
52386
|
),
|
|
52327
|
-
!onDiscuss && !useDisplay ? /* @__PURE__ */
|
|
52328
|
-
idDisplay ? /* @__PURE__ */
|
|
52387
|
+
!onDiscuss && !useDisplay ? /* @__PURE__ */ jsx390("span", {}) : null,
|
|
52388
|
+
idDisplay ? /* @__PURE__ */ jsxs310(
|
|
52329
52389
|
"span",
|
|
52330
52390
|
{
|
|
52331
52391
|
className: "inline-flex items-center gap-1 text-code shrink-0 text-ods-text-secondary opacity-60 hover:opacity-100 hover:text-ods-text-primary transition-opacity",
|
|
52332
52392
|
title: `${sourceLabel} \xB7 ${chatRef.id}`,
|
|
52333
52393
|
children: [
|
|
52334
|
-
/* @__PURE__ */
|
|
52335
|
-
/* @__PURE__ */
|
|
52394
|
+
/* @__PURE__ */ jsx390(SourceIcon, { className: "h-3 w-3 shrink-0" }),
|
|
52395
|
+
/* @__PURE__ */ jsx390("span", { className: "truncate max-w-[180px]", children: idDisplay })
|
|
52336
52396
|
]
|
|
52337
52397
|
}
|
|
52338
52398
|
) : null
|
|
@@ -52348,13 +52408,13 @@ function ProductReleaseChatCard({
|
|
|
52348
52408
|
}) {
|
|
52349
52409
|
const releaseProps = buildProps(item);
|
|
52350
52410
|
const status = item?.version ? { label: String(item.version), variant: "grey" } : { label: "Release", variant: "grey" };
|
|
52351
|
-
return /* @__PURE__ */
|
|
52411
|
+
return /* @__PURE__ */ jsx390(
|
|
52352
52412
|
EntityMingoCard,
|
|
52353
52413
|
{
|
|
52354
52414
|
title: item?.title ?? "",
|
|
52355
52415
|
description: item?.summary || releaseProps.formattedDate || void 0,
|
|
52356
52416
|
cover: releaseProps.coverImage || void 0,
|
|
52357
|
-
fallbackIcon: /* @__PURE__ */
|
|
52417
|
+
fallbackIcon: /* @__PURE__ */ jsx390(Rocket02Icon, { size: 24 }),
|
|
52358
52418
|
status,
|
|
52359
52419
|
chatRef,
|
|
52360
52420
|
isNewTab,
|
|
@@ -52375,12 +52435,12 @@ function CampaignChatCard({
|
|
|
52375
52435
|
goalsCount > 0 ? `${goalsCount} goal${goalsCount !== 1 ? "s" : ""}` : null,
|
|
52376
52436
|
"Marketing campaign"
|
|
52377
52437
|
].filter(Boolean).join(" \xB7 ");
|
|
52378
|
-
return /* @__PURE__ */
|
|
52438
|
+
return /* @__PURE__ */ jsx390(
|
|
52379
52439
|
EntityMingoCard,
|
|
52380
52440
|
{
|
|
52381
52441
|
title: item?.name ?? "",
|
|
52382
52442
|
description: meta || item?.description || void 0,
|
|
52383
|
-
fallbackIcon: /* @__PURE__ */
|
|
52443
|
+
fallbackIcon: /* @__PURE__ */ jsx390(Megaphone01Icon, { size: 24 }),
|
|
52384
52444
|
chatRef,
|
|
52385
52445
|
isNewTab,
|
|
52386
52446
|
discuss,
|
|
@@ -52401,7 +52461,7 @@ function EntityMingoCard({
|
|
|
52401
52461
|
openDetails,
|
|
52402
52462
|
externalLink
|
|
52403
52463
|
}) {
|
|
52404
|
-
return /* @__PURE__ */
|
|
52464
|
+
return /* @__PURE__ */ jsx390(
|
|
52405
52465
|
MingoInfoCard,
|
|
52406
52466
|
{
|
|
52407
52467
|
title,
|
|
@@ -52436,13 +52496,13 @@ function BlogChatCard({
|
|
|
52436
52496
|
}) {
|
|
52437
52497
|
const category = Array.isArray(item?.categories) ? item.categories.find((c) => c && c.name)?.name : void 0;
|
|
52438
52498
|
const status = hasEmbeddedVideo ? { label: "Video", variant: "primary" } : category ? { label: category, variant: "grey" } : void 0;
|
|
52439
|
-
return /* @__PURE__ */
|
|
52499
|
+
return /* @__PURE__ */ jsx390(
|
|
52440
52500
|
EntityMingoCard,
|
|
52441
52501
|
{
|
|
52442
52502
|
title: item?.title ?? "",
|
|
52443
52503
|
description: item?.summary ?? void 0,
|
|
52444
52504
|
cover: entityCover(item?.featured_image, ogPlaceholder),
|
|
52445
|
-
fallbackIcon: /* @__PURE__ */
|
|
52505
|
+
fallbackIcon: /* @__PURE__ */ jsx390(NewspaperIcon, { size: 24 }),
|
|
52446
52506
|
status,
|
|
52447
52507
|
chatRef,
|
|
52448
52508
|
isNewTab,
|
|
@@ -52459,13 +52519,13 @@ function CaseStudyChatCard({
|
|
|
52459
52519
|
discuss
|
|
52460
52520
|
}) {
|
|
52461
52521
|
const meta = [item?.msp?.name, item?.user?.full_name].filter(Boolean).join(" \xB7 ");
|
|
52462
|
-
return /* @__PURE__ */
|
|
52522
|
+
return /* @__PURE__ */ jsx390(
|
|
52463
52523
|
EntityMingoCard,
|
|
52464
52524
|
{
|
|
52465
52525
|
title: item?.title ?? "",
|
|
52466
52526
|
description: item?.summary || meta || void 0,
|
|
52467
52527
|
cover: entityCover(item?.featured_image, ogPlaceholder),
|
|
52468
|
-
fallbackIcon: /* @__PURE__ */
|
|
52528
|
+
fallbackIcon: /* @__PURE__ */ jsx390(TrophyIcon, { size: 24 }),
|
|
52469
52529
|
status: { label: "Case study", variant: "grey" },
|
|
52470
52530
|
chatRef,
|
|
52471
52531
|
isNewTab,
|
|
@@ -52482,13 +52542,13 @@ function CustomerInterviewChatCard({
|
|
|
52482
52542
|
discuss
|
|
52483
52543
|
}) {
|
|
52484
52544
|
const meta = [item?.user?.full_name, item?.msp?.name].filter(Boolean).join(" \xB7 ");
|
|
52485
|
-
return /* @__PURE__ */
|
|
52545
|
+
return /* @__PURE__ */ jsx390(
|
|
52486
52546
|
EntityMingoCard,
|
|
52487
52547
|
{
|
|
52488
52548
|
title: item?.title ?? "",
|
|
52489
52549
|
description: item?.video_summary || meta || void 0,
|
|
52490
52550
|
cover: entityCover(item?.featured_image, ogPlaceholder),
|
|
52491
|
-
fallbackIcon: /* @__PURE__ */
|
|
52551
|
+
fallbackIcon: /* @__PURE__ */ jsx390(MicrophoneIcon, { size: 24 }),
|
|
52492
52552
|
status: { label: "Interview", variant: "grey" },
|
|
52493
52553
|
chatRef,
|
|
52494
52554
|
isNewTab,
|
|
@@ -52505,13 +52565,13 @@ function InvestorUpdateChatCard({
|
|
|
52505
52565
|
discuss
|
|
52506
52566
|
}) {
|
|
52507
52567
|
const title = item?.title || `Update #${item?.update_number ?? "?"}`;
|
|
52508
|
-
return /* @__PURE__ */
|
|
52568
|
+
return /* @__PURE__ */ jsx390(
|
|
52509
52569
|
EntityMingoCard,
|
|
52510
52570
|
{
|
|
52511
52571
|
title,
|
|
52512
52572
|
description: item?.strategic_update || item?.content || formatInvestorUpdatePeriod(item?.period_start, item?.period_end) || void 0,
|
|
52513
52573
|
cover: entityCover(item?.featured_image, ogPlaceholder),
|
|
52514
|
-
fallbackIcon: /* @__PURE__ */
|
|
52574
|
+
fallbackIcon: /* @__PURE__ */ jsx390(PresentationLineIcon, { size: 24 }),
|
|
52515
52575
|
status: { label: "Investor update", variant: "grey" },
|
|
52516
52576
|
chatRef,
|
|
52517
52577
|
isNewTab,
|
|
@@ -52528,13 +52588,13 @@ function OnboardingGuideChatCard({
|
|
|
52528
52588
|
discuss
|
|
52529
52589
|
}) {
|
|
52530
52590
|
const cover = entityCover(item?.featured_image) ?? entityCover(item?.main_video_thumbnail) ?? entityCover(item?.og_image_url, ogPlaceholder);
|
|
52531
|
-
return /* @__PURE__ */
|
|
52591
|
+
return /* @__PURE__ */ jsx390(
|
|
52532
52592
|
EntityMingoCard,
|
|
52533
52593
|
{
|
|
52534
52594
|
title: item?.title ?? "",
|
|
52535
52595
|
description: item?.summary ?? item?.description ?? void 0,
|
|
52536
52596
|
cover,
|
|
52537
|
-
fallbackIcon: /* @__PURE__ */
|
|
52597
|
+
fallbackIcon: /* @__PURE__ */ jsx390(CompassIcon, { size: 24 }),
|
|
52538
52598
|
status: { label: "Guide", variant: "grey" },
|
|
52539
52599
|
chatRef,
|
|
52540
52600
|
isNewTab,
|
|
@@ -52552,7 +52612,7 @@ function ProgramChatCard({
|
|
|
52552
52612
|
ogPlaceholder,
|
|
52553
52613
|
discuss
|
|
52554
52614
|
}) {
|
|
52555
|
-
const icon = configKey === "webinar" ? /* @__PURE__ */
|
|
52615
|
+
const icon = configKey === "webinar" ? /* @__PURE__ */ jsx390(PresentationBarIcon, { size: 24 }) : configKey === "event" ? /* @__PURE__ */ jsx390(CalendarIcon, { size: 24 }) : /* @__PURE__ */ jsx390(MicrophoneIcon, { size: 24 });
|
|
52556
52616
|
const isScheduled = item?.status === "scheduled";
|
|
52557
52617
|
let typeMeta;
|
|
52558
52618
|
if (configKey === "podcast" && typeof item?.duration_seconds === "number" && item.duration_seconds > 0 && !isScheduled) {
|
|
@@ -52566,7 +52626,7 @@ function ProgramChatCard({
|
|
|
52566
52626
|
}
|
|
52567
52627
|
const itemDate = formatDateUTC(item?.date ?? null, { fallback: "", timezone: "local" });
|
|
52568
52628
|
const meta = [itemDate, typeMeta].filter(Boolean).join(" \xB7 ");
|
|
52569
|
-
return /* @__PURE__ */
|
|
52629
|
+
return /* @__PURE__ */ jsx390(
|
|
52570
52630
|
EntityMingoCard,
|
|
52571
52631
|
{
|
|
52572
52632
|
title: item?.title ?? "",
|
|
@@ -52590,16 +52650,16 @@ function RoadmapChatCard({
|
|
|
52590
52650
|
}) {
|
|
52591
52651
|
const logoUrl = typeof item?.icon === "string" && item.icon.startsWith("http") ? item.icon : void 0;
|
|
52592
52652
|
const useTypeIcon = cardType === "internal_task" || !logoUrl && item?.customItemId != null;
|
|
52593
|
-
const defaultIcon = cardType === "delivery_item" ? /* @__PURE__ */
|
|
52594
|
-
const icon = useTypeIcon ? /* @__PURE__ */
|
|
52653
|
+
const defaultIcon = cardType === "delivery_item" ? /* @__PURE__ */ jsx390(TruckFastIcon, { size: 24 }) : cardType === "internal_task" ? /* @__PURE__ */ jsx390(CheckSquareIcon, { size: 24 }) : /* @__PURE__ */ jsx390(MapIcon, { size: 24 });
|
|
52654
|
+
const icon = useTypeIcon ? /* @__PURE__ */ jsx390(TaskTypeIcon, { customItemId: item?.customItemId, className: "size-6" }) : logoUrl ? (
|
|
52595
52655
|
// Contained (not full-bleed) so the integration logo keeps its aspect
|
|
52596
52656
|
// ratio inside the bordered icon box — matches RoadmapCard.
|
|
52597
|
-
/* @__PURE__ */
|
|
52657
|
+
/* @__PURE__ */ jsx390("img", { src: logoUrl, alt: "", className: "size-6 object-contain" })
|
|
52598
52658
|
) : defaultIcon;
|
|
52599
52659
|
const clickupHref = clickupTaskUrl(chatRef.id);
|
|
52600
|
-
const clickupIcon = /* @__PURE__ */
|
|
52660
|
+
const clickupIcon = /* @__PURE__ */ jsx390(ClickupLogoIcon, { size: 20 });
|
|
52601
52661
|
const cardUrlIsClickup = cardType === "internal_task";
|
|
52602
|
-
return /* @__PURE__ */
|
|
52662
|
+
return /* @__PURE__ */ jsx390(
|
|
52603
52663
|
EntityMingoCard,
|
|
52604
52664
|
{
|
|
52605
52665
|
title: item?.title ?? "",
|
|
@@ -52622,16 +52682,16 @@ function refHydratedEntry(docType, label, renderRef) {
|
|
|
52622
52682
|
contentRefType: docType,
|
|
52623
52683
|
noComposedHref: true,
|
|
52624
52684
|
fallbackHref: (item) => item?.url ?? null,
|
|
52625
|
-
skeleton: () => /* @__PURE__ */
|
|
52685
|
+
skeleton: () => /* @__PURE__ */ jsx390(MingoInfoCardSkeleton, {}),
|
|
52626
52686
|
render: (item, chatRef, opts) => renderRef(fetchedItemDisplayRef(item, chatRef), opts)
|
|
52627
52687
|
};
|
|
52628
52688
|
}
|
|
52629
52689
|
var FINANCIAL_CARD_CONFIGS = {
|
|
52630
|
-
financial_kpi: { label: "Financial KPI", icon: () => /* @__PURE__ */
|
|
52631
|
-
cap_table: { label: "Cap table entry", icon: () => /* @__PURE__ */
|
|
52632
|
-
profit_loss: { label: "P&L period", icon: () => /* @__PURE__ */
|
|
52633
|
-
balance_sheet: { label: "Balance sheet", icon: () => /* @__PURE__ */
|
|
52634
|
-
cash_flow: { label: "Cash flow", icon: () => /* @__PURE__ */
|
|
52690
|
+
financial_kpi: { label: "Financial KPI", icon: () => /* @__PURE__ */ jsx390(ChartBar01VerIcon, { size: 24 }) },
|
|
52691
|
+
cap_table: { label: "Cap table entry", icon: () => /* @__PURE__ */ jsx390(ChartPieIcon, { size: 24 }) },
|
|
52692
|
+
profit_loss: { label: "P&L period", icon: () => /* @__PURE__ */ jsx390(MoneyBillDollarIcon, { size: 24 }) },
|
|
52693
|
+
balance_sheet: { label: "Balance sheet", icon: () => /* @__PURE__ */ jsx390(BankIcon, { size: 24 }) },
|
|
52694
|
+
cash_flow: { label: "Cash flow", icon: () => /* @__PURE__ */ jsx390(CoinsExchangeCurrencyIcon, { size: 24 }) }
|
|
52635
52695
|
};
|
|
52636
52696
|
function registryEntries(configs, build) {
|
|
52637
52697
|
const out = {};
|
|
@@ -52641,7 +52701,7 @@ function registryEntries(configs, build) {
|
|
|
52641
52701
|
function financialRegistryEntries() {
|
|
52642
52702
|
return registryEntries(
|
|
52643
52703
|
FINANCIAL_CARD_CONFIGS,
|
|
52644
|
-
(cfg, docType) => refHydratedEntry(docType, cfg.label, (displayRef, opts) => /* @__PURE__ */
|
|
52704
|
+
(cfg, docType) => refHydratedEntry(docType, cfg.label, (displayRef, opts) => /* @__PURE__ */ jsx390(
|
|
52645
52705
|
GenericFinancialChatCard,
|
|
52646
52706
|
{
|
|
52647
52707
|
chatRef: displayRef,
|
|
@@ -52663,7 +52723,7 @@ var GITHUB_CARD_CONFIGS = {
|
|
|
52663
52723
|
function githubRegistryEntries() {
|
|
52664
52724
|
return registryEntries(
|
|
52665
52725
|
GITHUB_CARD_CONFIGS,
|
|
52666
|
-
(cfg, docType) => refHydratedEntry(docType, cfg.label, (displayRef, opts) => /* @__PURE__ */
|
|
52726
|
+
(cfg, docType) => refHydratedEntry(docType, cfg.label, (displayRef, opts) => /* @__PURE__ */ jsx390(
|
|
52667
52727
|
GitHubChatCard,
|
|
52668
52728
|
{
|
|
52669
52729
|
chatRef: displayRef,
|
|
@@ -52684,8 +52744,8 @@ function programRegistryEntries() {
|
|
|
52684
52744
|
label: cfg.label,
|
|
52685
52745
|
contentRefType: cfg.contentRefType,
|
|
52686
52746
|
bareInline: true,
|
|
52687
|
-
skeleton: () => /* @__PURE__ */
|
|
52688
|
-
render: (item, chatRef, opts) => /* @__PURE__ */
|
|
52747
|
+
skeleton: () => /* @__PURE__ */ jsx390(ProgramCardSkeleton, { size: "sm" }),
|
|
52748
|
+
render: (item, chatRef, opts) => /* @__PURE__ */ jsx390(
|
|
52689
52749
|
ProgramChatCard,
|
|
52690
52750
|
{
|
|
52691
52751
|
item,
|
|
@@ -52725,8 +52785,8 @@ function roadmapRegistryEntries() {
|
|
|
52725
52785
|
bareInline: true,
|
|
52726
52786
|
...cfg.noComposedHref ? { noComposedHref: true } : {},
|
|
52727
52787
|
...cfg.fallbackHref ? { fallbackHref: cfg.fallbackHref } : {},
|
|
52728
|
-
skeleton: () => /* @__PURE__ */
|
|
52729
|
-
render: (item, chatRef, opts) => /* @__PURE__ */
|
|
52788
|
+
skeleton: () => /* @__PURE__ */ jsx390(RoadmapCardSkeleton, { size: "sm" }),
|
|
52789
|
+
render: (item, chatRef, opts) => /* @__PURE__ */ jsx390(
|
|
52730
52790
|
RoadmapChatCard,
|
|
52731
52791
|
{
|
|
52732
52792
|
item,
|
|
@@ -52753,7 +52813,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
52753
52813
|
// null and the card renders its generic "Deleted item" tombstone. The
|
|
52754
52814
|
// descriptor's `title` defaults to the raw cardId — suppress it so the
|
|
52755
52815
|
// strikethrough line never shows an opaque id.
|
|
52756
|
-
render: (_item, chatRef) => /* @__PURE__ */
|
|
52816
|
+
render: (_item, chatRef) => /* @__PURE__ */ jsx390(
|
|
52757
52817
|
DeletedDataCard,
|
|
52758
52818
|
{
|
|
52759
52819
|
title: chatRef.title && chatRef.title !== chatRef.id ? chatRef.title : null,
|
|
@@ -52762,7 +52822,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
52762
52822
|
}
|
|
52763
52823
|
)
|
|
52764
52824
|
},
|
|
52765
|
-
slack_message: refHydratedEntry("slack_message", "Slack message", (displayRef, opts) => /* @__PURE__ */
|
|
52825
|
+
slack_message: refHydratedEntry("slack_message", "Slack message", (displayRef, opts) => /* @__PURE__ */ jsx390(SlackChatCard, { chatRef: displayRef, isNewTab: opts.isNewTab, discuss: opts.discuss })),
|
|
52766
52826
|
// FAQ hydrates from its EXISTING public list API (`/api/faqs?ids=` —
|
|
52767
52827
|
// also feeding related-content rails, so its base path must not move).
|
|
52768
52828
|
// Rows are faq-shaped, not ChatRef-shaped, hence the bespoke row→display
|
|
@@ -52773,8 +52833,8 @@ var CHAT_CARD_REGISTRY = {
|
|
|
52773
52833
|
contentRefType: "faq",
|
|
52774
52834
|
noComposedHref: true,
|
|
52775
52835
|
fallbackHref: (item) => item?.id != null ? `/faqs#${faqItemAnchor(item.id)}` : null,
|
|
52776
|
-
skeleton: () => /* @__PURE__ */
|
|
52777
|
-
render: (item, chatRef, opts) => /* @__PURE__ */
|
|
52836
|
+
skeleton: () => /* @__PURE__ */ jsx390(MingoInfoCardSkeleton, {}),
|
|
52837
|
+
render: (item, chatRef, opts) => /* @__PURE__ */ jsx390(
|
|
52778
52838
|
FaqChatCard,
|
|
52779
52839
|
{
|
|
52780
52840
|
chatRef: fetchedFaqDisplayRef(item, chatRef),
|
|
@@ -52783,7 +52843,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
52783
52843
|
}
|
|
52784
52844
|
)
|
|
52785
52845
|
},
|
|
52786
|
-
hubspot_ticket: refHydratedEntry("hubspot_ticket", "HubSpot ticket", (displayRef, opts) => /* @__PURE__ */
|
|
52846
|
+
hubspot_ticket: refHydratedEntry("hubspot_ticket", "HubSpot ticket", (displayRef, opts) => /* @__PURE__ */ jsx390(
|
|
52787
52847
|
HubspotTicketChatCard,
|
|
52788
52848
|
{
|
|
52789
52849
|
chatRef: displayRef,
|
|
@@ -52794,7 +52854,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
52794
52854
|
hubspot_ticket_anon: refHydratedEntry(
|
|
52795
52855
|
"hubspot_ticket_anon",
|
|
52796
52856
|
"HubSpot ticket (anon)",
|
|
52797
|
-
(displayRef, opts) => /* @__PURE__ */
|
|
52857
|
+
(displayRef, opts) => /* @__PURE__ */ jsx390(
|
|
52798
52858
|
HubspotTicketChatCard,
|
|
52799
52859
|
{
|
|
52800
52860
|
chatRef: displayRef,
|
|
@@ -52810,7 +52870,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
52810
52870
|
hubspot_ticket_self: refHydratedEntry(
|
|
52811
52871
|
"hubspot_ticket_self",
|
|
52812
52872
|
"HubSpot ticket (self)",
|
|
52813
|
-
(displayRef, opts) => /* @__PURE__ */
|
|
52873
|
+
(displayRef, opts) => /* @__PURE__ */ jsx390(
|
|
52814
52874
|
HubspotTicketChatCard,
|
|
52815
52875
|
{
|
|
52816
52876
|
chatRef: displayRef,
|
|
@@ -52819,7 +52879,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
52819
52879
|
}
|
|
52820
52880
|
)
|
|
52821
52881
|
),
|
|
52822
|
-
data_room_doc: refHydratedEntry("data_room_doc", "Data-room doc", (displayRef, opts) => /* @__PURE__ */
|
|
52882
|
+
data_room_doc: refHydratedEntry("data_room_doc", "Data-room doc", (displayRef, opts) => /* @__PURE__ */ jsx390(
|
|
52823
52883
|
DataRoomDocChatCard,
|
|
52824
52884
|
{
|
|
52825
52885
|
chatRef: displayRef,
|
|
@@ -52827,7 +52887,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
52827
52887
|
discuss: opts.discuss
|
|
52828
52888
|
}
|
|
52829
52889
|
)),
|
|
52830
|
-
markdown: refHydratedEntry("markdown", "Doc page (markdown)", (displayRef, opts) => /* @__PURE__ */
|
|
52890
|
+
markdown: refHydratedEntry("markdown", "Doc page (markdown)", (displayRef, opts) => /* @__PURE__ */ jsx390(
|
|
52831
52891
|
DataRoomDocChatCard,
|
|
52832
52892
|
{
|
|
52833
52893
|
chatRef: displayRef,
|
|
@@ -52840,7 +52900,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
52840
52900
|
video: {
|
|
52841
52901
|
label: "Video",
|
|
52842
52902
|
bareInline: true,
|
|
52843
|
-
render: (_item, chatRef) => /* @__PURE__ */
|
|
52903
|
+
render: (_item, chatRef) => /* @__PURE__ */ jsx390(ChatInlineVideoPill, { chatRef })
|
|
52844
52904
|
},
|
|
52845
52905
|
...financialRegistryEntries(),
|
|
52846
52906
|
// ───────── content types: full rows from their public list APIs ─────────
|
|
@@ -52848,8 +52908,8 @@ var CHAT_CARD_REGISTRY = {
|
|
|
52848
52908
|
label: "Blog post",
|
|
52849
52909
|
contentRefType: "blog_post_existing",
|
|
52850
52910
|
bareInline: true,
|
|
52851
|
-
skeleton: () => /* @__PURE__ */
|
|
52852
|
-
render: (item, chatRef, opts) => /* @__PURE__ */
|
|
52911
|
+
skeleton: () => /* @__PURE__ */ jsx390(BlogCardSkeleton, { size: "sm" }),
|
|
52912
|
+
render: (item, chatRef, opts) => /* @__PURE__ */ jsx390(
|
|
52853
52913
|
BlogChatCard,
|
|
52854
52914
|
{
|
|
52855
52915
|
item,
|
|
@@ -52865,8 +52925,8 @@ var CHAT_CARD_REGISTRY = {
|
|
|
52865
52925
|
label: "Case study",
|
|
52866
52926
|
contentRefType: "case_study",
|
|
52867
52927
|
bareInline: true,
|
|
52868
|
-
skeleton: () => /* @__PURE__ */
|
|
52869
|
-
render: (item, chatRef, opts) => /* @__PURE__ */
|
|
52928
|
+
skeleton: () => /* @__PURE__ */ jsx390(CaseStudyCardSkeleton, { size: "sm" }),
|
|
52929
|
+
render: (item, chatRef, opts) => /* @__PURE__ */ jsx390(
|
|
52870
52930
|
CaseStudyChatCard,
|
|
52871
52931
|
{
|
|
52872
52932
|
item,
|
|
@@ -52881,8 +52941,8 @@ var CHAT_CARD_REGISTRY = {
|
|
|
52881
52941
|
label: "Customer interview",
|
|
52882
52942
|
contentRefType: "customer_interview",
|
|
52883
52943
|
bareInline: true,
|
|
52884
|
-
skeleton: () => /* @__PURE__ */
|
|
52885
|
-
render: (item, chatRef, opts) => /* @__PURE__ */
|
|
52944
|
+
skeleton: () => /* @__PURE__ */ jsx390(CustomerInterviewCardSkeleton, { size: "sm" }),
|
|
52945
|
+
render: (item, chatRef, opts) => /* @__PURE__ */ jsx390(
|
|
52886
52946
|
CustomerInterviewChatCard,
|
|
52887
52947
|
{
|
|
52888
52948
|
item,
|
|
@@ -52897,10 +52957,10 @@ var CHAT_CARD_REGISTRY = {
|
|
|
52897
52957
|
label: "Product release",
|
|
52898
52958
|
contentRefType: "product_release",
|
|
52899
52959
|
bareInline: true,
|
|
52900
|
-
skeleton: () => /* @__PURE__ */
|
|
52960
|
+
skeleton: () => /* @__PURE__ */ jsx390(ProductReleaseCardSkeleton, { size: "sm" }),
|
|
52901
52961
|
render: (item, chatRef, opts) => {
|
|
52902
52962
|
const builder = opts?.extras?.buildProductReleaseCardProps ?? defaultBuildProductReleaseCardProps;
|
|
52903
|
-
return /* @__PURE__ */
|
|
52963
|
+
return /* @__PURE__ */ jsx390(
|
|
52904
52964
|
ProductReleaseChatCard,
|
|
52905
52965
|
{
|
|
52906
52966
|
item,
|
|
@@ -52917,8 +52977,8 @@ var CHAT_CARD_REGISTRY = {
|
|
|
52917
52977
|
label: "Investor update",
|
|
52918
52978
|
contentRefType: "investor_update",
|
|
52919
52979
|
bareInline: true,
|
|
52920
|
-
skeleton: () => /* @__PURE__ */
|
|
52921
|
-
render: (item, chatRef, opts) => /* @__PURE__ */
|
|
52980
|
+
skeleton: () => /* @__PURE__ */ jsx390(InvestorUpdateCardSkeleton, { size: "sm" }),
|
|
52981
|
+
render: (item, chatRef, opts) => /* @__PURE__ */ jsx390(
|
|
52922
52982
|
InvestorUpdateChatCard,
|
|
52923
52983
|
{
|
|
52924
52984
|
item,
|
|
@@ -52935,8 +52995,8 @@ var CHAT_CARD_REGISTRY = {
|
|
|
52935
52995
|
bareInline: true,
|
|
52936
52996
|
// "Display" affordance (verbatim guide body) instead of "Ask".
|
|
52937
52997
|
displayAction: true,
|
|
52938
|
-
skeleton: () => /* @__PURE__ */
|
|
52939
|
-
render: (item, chatRef, opts) => /* @__PURE__ */
|
|
52998
|
+
skeleton: () => /* @__PURE__ */ jsx390(OnboardingGuideCardSkeleton, { size: "sm" }),
|
|
52999
|
+
render: (item, chatRef, opts) => /* @__PURE__ */ jsx390(
|
|
52940
53000
|
OnboardingGuideChatCard,
|
|
52941
53001
|
{
|
|
52942
53002
|
item,
|
|
@@ -52951,11 +53011,11 @@ var CHAT_CARD_REGISTRY = {
|
|
|
52951
53011
|
label: "Marketing campaign",
|
|
52952
53012
|
contentRefType: "marketing_campaign",
|
|
52953
53013
|
bareInline: true,
|
|
52954
|
-
skeleton: () => /* @__PURE__ */
|
|
53014
|
+
skeleton: () => /* @__PURE__ */ jsx390(CampaignCardAdminSkeleton, {}),
|
|
52955
53015
|
// No public viewer — synthesize the hub-internal admin URL post-fetch
|
|
52956
53016
|
// so the wrapper + isNewTab computation see the actual destination.
|
|
52957
53017
|
fallbackHref: (item) => item?.id ? `/admin/campaigns/${encodeURIComponent(item.id)}` : null,
|
|
52958
|
-
render: (item, chatRef, opts) => /* @__PURE__ */
|
|
53018
|
+
render: (item, chatRef, opts) => /* @__PURE__ */ jsx390(
|
|
52959
53019
|
CampaignChatCard,
|
|
52960
53020
|
{
|
|
52961
53021
|
item,
|
|
@@ -52989,7 +53049,7 @@ function ChatCardNavWrap({
|
|
|
52989
53049
|
e.stopPropagation();
|
|
52990
53050
|
if (!isNewTab && panel?.closeChat) panel.closeChat();
|
|
52991
53051
|
};
|
|
52992
|
-
return /* @__PURE__ */
|
|
53052
|
+
return /* @__PURE__ */ jsx390("span", { className: "contents", onClickCapture, children });
|
|
52993
53053
|
}
|
|
52994
53054
|
function ChatCardLoader({
|
|
52995
53055
|
chatRef,
|
|
@@ -53000,7 +53060,7 @@ function ChatCardLoader({
|
|
|
53000
53060
|
extras
|
|
53001
53061
|
}) {
|
|
53002
53062
|
const runtime = useRequiredChatRuntime();
|
|
53003
|
-
const resolvedChatRef =
|
|
53063
|
+
const resolvedChatRef = React151.useMemo(() => {
|
|
53004
53064
|
const cta = resolveSourceRowCTA(
|
|
53005
53065
|
{
|
|
53006
53066
|
sourceRepo: chatRef.sourceRepo,
|
|
@@ -53048,7 +53108,7 @@ function ChatCardLoader({
|
|
|
53048
53108
|
const discussFn = useDisplay ? onDisplay : onDiscuss;
|
|
53049
53109
|
const discuss = discussFn ? {
|
|
53050
53110
|
label: useDisplay ? "Display" : "Ask Mingo",
|
|
53051
|
-
icon: useDisplay ? /* @__PURE__ */
|
|
53111
|
+
icon: useDisplay ? /* @__PURE__ */ jsx390(FileContentIcon, { size: 20 }) : /* @__PURE__ */ jsx390(
|
|
53052
53112
|
MingoIcon,
|
|
53053
53113
|
{
|
|
53054
53114
|
className: "size-5",
|
|
@@ -53067,7 +53127,7 @@ function ChatCardLoader({
|
|
|
53067
53127
|
discuss
|
|
53068
53128
|
};
|
|
53069
53129
|
const path = typeof finalChatRef.metadata?.path === "string" ? finalChatRef.metadata.path : null;
|
|
53070
|
-
const navWrap = (children) => /* @__PURE__ */
|
|
53130
|
+
const navWrap = (children) => /* @__PURE__ */ jsx390(
|
|
53071
53131
|
ChatCardNavWrap,
|
|
53072
53132
|
{
|
|
53073
53133
|
href: finalChatRef.url ?? null,
|
|
@@ -53077,7 +53137,7 @@ function ChatCardLoader({
|
|
|
53077
53137
|
children
|
|
53078
53138
|
}
|
|
53079
53139
|
);
|
|
53080
|
-
const finish = (node) => entry.bareInline ? /* @__PURE__ */
|
|
53140
|
+
const finish = (node) => entry.bareInline ? /* @__PURE__ */ jsx390(Fragment88, { children: navWrap(node) }) : /* @__PURE__ */ jsx390(
|
|
53081
53141
|
ChatCardWithDiscuss,
|
|
53082
53142
|
{
|
|
53083
53143
|
chatRef: finalChatRef,
|
|
@@ -53090,15 +53150,15 @@ function ChatCardLoader({
|
|
|
53090
53150
|
if (!fetchEntry) {
|
|
53091
53151
|
return finish(entry.render(void 0, finalChatRef, renderOpts));
|
|
53092
53152
|
}
|
|
53093
|
-
if (isLoading) return /* @__PURE__ */
|
|
53153
|
+
if (isLoading) return /* @__PURE__ */ jsx390(Fragment88, { children: fetchEntry.skeleton?.() ?? null });
|
|
53094
53154
|
if (!item) {
|
|
53095
53155
|
if (isError) {
|
|
53096
|
-
return /* @__PURE__ */
|
|
53156
|
+
return /* @__PURE__ */ jsx390(CardLoadFailure, { label: entry.label, id: finalChatRef.id, detail: "Failed to load" });
|
|
53097
53157
|
}
|
|
53098
53158
|
if (!isFetched) {
|
|
53099
|
-
return /* @__PURE__ */
|
|
53159
|
+
return /* @__PURE__ */ jsx390(CardLoadFailure, { label: entry.label, id: finalChatRef.id, detail: "Not loadable" });
|
|
53100
53160
|
}
|
|
53101
|
-
return /* @__PURE__ */
|
|
53161
|
+
return /* @__PURE__ */ jsx390(CardLoadFailure, { label: entry.label, id: finalChatRef.id, detail: "Not found" });
|
|
53102
53162
|
}
|
|
53103
53163
|
const videoMeta = itemVideoMetadata(item);
|
|
53104
53164
|
if (videoMeta) {
|
|
@@ -53110,9 +53170,9 @@ function ChatCardLoader({
|
|
|
53110
53170
|
// Same 12px rhythm as the message renderer's block-sibling wrapper
|
|
53111
53171
|
// (`my-3` in chat-message-enhanced) so card→player spacing matches
|
|
53112
53172
|
// the spacing between any two hoisted blocks.
|
|
53113
|
-
/* @__PURE__ */
|
|
53173
|
+
/* @__PURE__ */ jsxs310("div", { className: "flex min-w-0 flex-col gap-3", children: [
|
|
53114
53174
|
finish(entry.render(item, finalChatRef, renderOpts)),
|
|
53115
|
-
/* @__PURE__ */
|
|
53175
|
+
/* @__PURE__ */ jsx390(ChatVideoEntityCard, { chatRef: videoRef })
|
|
53116
53176
|
] })
|
|
53117
53177
|
);
|
|
53118
53178
|
}
|
|
@@ -53120,7 +53180,7 @@ function ChatCardLoader({
|
|
|
53120
53180
|
}
|
|
53121
53181
|
function renderChatInlineEntityCard(chatRef, options = {}) {
|
|
53122
53182
|
const { onDiscuss, onDisplay, baseRoute, chipBasePlatform, extras } = options;
|
|
53123
|
-
const loader = /* @__PURE__ */
|
|
53183
|
+
const loader = /* @__PURE__ */ jsx390(
|
|
53124
53184
|
ChatCardLoader,
|
|
53125
53185
|
{
|
|
53126
53186
|
chatRef,
|
|
@@ -53140,7 +53200,7 @@ function renderChatInlineEntityCard(chatRef, options = {}) {
|
|
|
53140
53200
|
url: chatRef.url ?? (decoded.videoUrl ?? (decoded.youtubeUrl ? `https://www.youtube.com/watch?v=${decoded.youtubeUrl}` : null)),
|
|
53141
53201
|
metadata: { ...chatRef.metadata ?? {}, ...decoded }
|
|
53142
53202
|
};
|
|
53143
|
-
return /* @__PURE__ */
|
|
53203
|
+
return /* @__PURE__ */ jsx390(BlockCard, { inline: /* @__PURE__ */ jsx390(ChatInlineVideoPill, { chatRef: displayRef }), children: /* @__PURE__ */ jsx390(ChatVideoEntityCard, { chatRef: displayRef }) });
|
|
53144
53204
|
}
|
|
53145
53205
|
return loader;
|
|
53146
53206
|
}
|
|
@@ -53427,20 +53487,20 @@ function useChunkCatchup({
|
|
|
53427
53487
|
}
|
|
53428
53488
|
|
|
53429
53489
|
// src/components/chat/hooks/use-scripted-stream.ts
|
|
53430
|
-
import { useEffect as
|
|
53490
|
+
import { useEffect as useEffect88, useState as useState118 } from "react";
|
|
53431
53491
|
var EMPTY_FRAME = { messages: [], phase: "idle", typing: false, delayMs: 0 };
|
|
53432
53492
|
function prefersReducedMotion() {
|
|
53433
53493
|
return typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === true;
|
|
53434
53494
|
}
|
|
53435
53495
|
function useScriptedStream(frames, resetKey, enabled = true) {
|
|
53436
|
-
const [index, setIndex] =
|
|
53437
|
-
const [reducedMotion, setReducedMotion] =
|
|
53438
|
-
const [prevKey, setPrevKey] =
|
|
53496
|
+
const [index, setIndex] = useState118(0);
|
|
53497
|
+
const [reducedMotion, setReducedMotion] = useState118(false);
|
|
53498
|
+
const [prevKey, setPrevKey] = useState118(resetKey);
|
|
53439
53499
|
if (resetKey !== prevKey) {
|
|
53440
53500
|
setPrevKey(resetKey);
|
|
53441
53501
|
setIndex(0);
|
|
53442
53502
|
}
|
|
53443
|
-
|
|
53503
|
+
useEffect88(() => {
|
|
53444
53504
|
setReducedMotion(prefersReducedMotion());
|
|
53445
53505
|
const mq = window.matchMedia?.("(prefers-reduced-motion: reduce)");
|
|
53446
53506
|
if (!mq) return;
|
|
@@ -53450,7 +53510,7 @@ function useScriptedStream(frames, resetKey, enabled = true) {
|
|
|
53450
53510
|
}, []);
|
|
53451
53511
|
const playing = enabled && !reducedMotion && frames.length > 0;
|
|
53452
53512
|
const lastIndex = Math.max(0, frames.length - 1);
|
|
53453
|
-
|
|
53513
|
+
useEffect88(() => {
|
|
53454
53514
|
if (!playing || index >= lastIndex) return;
|
|
53455
53515
|
const current = frames[Math.min(index, lastIndex)] ?? EMPTY_FRAME;
|
|
53456
53516
|
const t = setTimeout(() => setIndex((i) => Math.min(i + 1, lastIndex)), current.delayMs);
|
|
@@ -53462,7 +53522,7 @@ function useScriptedStream(frames, resetKey, enabled = true) {
|
|
|
53462
53522
|
}
|
|
53463
53523
|
|
|
53464
53524
|
// src/components/chat/hooks/use-jetstream-dialog-subscription.ts
|
|
53465
|
-
import { useCallback as useCallback50, useEffect as
|
|
53525
|
+
import { useCallback as useCallback50, useEffect as useEffect89, useRef as useRef70, useState as useState119 } from "react";
|
|
53466
53526
|
var DEFAULT_STREAM_NAME = "CHAT_CHUNKS";
|
|
53467
53527
|
var RESYNC_AFTER_HIDDEN_MS = 1e4;
|
|
53468
53528
|
var RESYNC_COALESCE_MS = 1e3;
|
|
@@ -53484,11 +53544,11 @@ function useJetStreamDialogSubscription({
|
|
|
53484
53544
|
inactiveThresholdMs,
|
|
53485
53545
|
resyncSignal = 0
|
|
53486
53546
|
}) {
|
|
53487
|
-
const [isConnected, setIsConnected] =
|
|
53488
|
-
const [isSubscribed, setIsSubscribed] =
|
|
53489
|
-
const [reconnectionCount, setReconnectionCount] =
|
|
53490
|
-
const [recoveryCount, setRecoveryCount] =
|
|
53491
|
-
const [currentStreamSeq, setCurrentStreamSeq] =
|
|
53547
|
+
const [isConnected, setIsConnected] = useState119(false);
|
|
53548
|
+
const [isSubscribed, setIsSubscribed] = useState119(false);
|
|
53549
|
+
const [reconnectionCount, setReconnectionCount] = useState119(0);
|
|
53550
|
+
const [recoveryCount, setRecoveryCount] = useState119(0);
|
|
53551
|
+
const [currentStreamSeq, setCurrentStreamSeq] = useState119(null);
|
|
53492
53552
|
const lastRecoveryReportRef = useRef70(0);
|
|
53493
53553
|
const resyncTimerRef = useRef70(null);
|
|
53494
53554
|
const lastResyncSignalRef = useRef70(resyncSignal);
|
|
@@ -53496,49 +53556,49 @@ function useJetStreamDialogSubscription({
|
|
|
53496
53556
|
const subscriptionRef = useRef70(null);
|
|
53497
53557
|
const highestStreamSeqRef = useRef70(null);
|
|
53498
53558
|
const onEventRef = useRef70(onEvent);
|
|
53499
|
-
|
|
53559
|
+
useEffect89(() => {
|
|
53500
53560
|
onEventRef.current = onEvent;
|
|
53501
53561
|
}, [onEvent]);
|
|
53502
53562
|
const onConnectRef = useRef70(onConnect);
|
|
53503
|
-
|
|
53563
|
+
useEffect89(() => {
|
|
53504
53564
|
onConnectRef.current = onConnect;
|
|
53505
53565
|
}, [onConnect]);
|
|
53506
53566
|
const onDisconnectRef = useRef70(onDisconnect);
|
|
53507
|
-
|
|
53567
|
+
useEffect89(() => {
|
|
53508
53568
|
onDisconnectRef.current = onDisconnect;
|
|
53509
53569
|
}, [onDisconnect]);
|
|
53510
53570
|
const onSubscribedRef = useRef70(onSubscribed);
|
|
53511
|
-
|
|
53571
|
+
useEffect89(() => {
|
|
53512
53572
|
onSubscribedRef.current = onSubscribed;
|
|
53513
53573
|
}, [onSubscribed]);
|
|
53514
53574
|
const onBeforeReconnectRef = useRef70(onBeforeReconnect);
|
|
53515
|
-
|
|
53575
|
+
useEffect89(() => {
|
|
53516
53576
|
onBeforeReconnectRef.current = onBeforeReconnect;
|
|
53517
53577
|
}, [onBeforeReconnect]);
|
|
53518
53578
|
const getNatsWsUrlRef = useRef70(getNatsWsUrl);
|
|
53519
|
-
|
|
53579
|
+
useEffect89(() => {
|
|
53520
53580
|
getNatsWsUrlRef.current = getNatsWsUrl;
|
|
53521
53581
|
}, [getNatsWsUrl]);
|
|
53522
53582
|
const reconnectionBackoffRef = useRef70(reconnectionBackoff);
|
|
53523
|
-
|
|
53583
|
+
useEffect89(() => {
|
|
53524
53584
|
reconnectionBackoffRef.current = reconnectionBackoff;
|
|
53525
53585
|
}, [reconnectionBackoff]);
|
|
53526
53586
|
const optStartSeqRef = useRef70(optStartSeq);
|
|
53527
|
-
|
|
53587
|
+
useEffect89(() => {
|
|
53528
53588
|
optStartSeqRef.current = optStartSeq;
|
|
53529
53589
|
}, [optStartSeq]);
|
|
53530
53590
|
const inactiveThresholdRef = useRef70(inactiveThresholdMs);
|
|
53531
|
-
|
|
53591
|
+
useEffect89(() => {
|
|
53532
53592
|
inactiveThresholdRef.current = inactiveThresholdMs;
|
|
53533
53593
|
}, [inactiveThresholdMs]);
|
|
53534
53594
|
const hadConnectionBeforeRef = useRef70(false);
|
|
53535
53595
|
const clientConfigRef = useRef70(clientConfig);
|
|
53536
|
-
|
|
53596
|
+
useEffect89(() => {
|
|
53537
53597
|
clientConfigRef.current = clientConfig;
|
|
53538
53598
|
}, [clientConfig]);
|
|
53539
53599
|
const currentWsUrlRef = useRef70("");
|
|
53540
53600
|
const wsUrl = getNatsWsUrl();
|
|
53541
|
-
|
|
53601
|
+
useEffect89(() => {
|
|
53542
53602
|
if (!enabled || !wsUrl) {
|
|
53543
53603
|
if (currentWsUrlRef.current && clientRef.current) {
|
|
53544
53604
|
releaseClient(currentWsUrlRef.current);
|
|
@@ -53619,7 +53679,7 @@ function useJetStreamDialogSubscription({
|
|
|
53619
53679
|
}
|
|
53620
53680
|
};
|
|
53621
53681
|
}, [enabled, wsUrl]);
|
|
53622
|
-
|
|
53682
|
+
useEffect89(() => {
|
|
53623
53683
|
highestStreamSeqRef.current = null;
|
|
53624
53684
|
lastResyncSignalRef.current = resyncSignal;
|
|
53625
53685
|
setCurrentStreamSeq(null);
|
|
@@ -53637,7 +53697,7 @@ function useJetStreamDialogSubscription({
|
|
|
53637
53697
|
setReconnectionCount((c) => c + 1);
|
|
53638
53698
|
}, RESYNC_COALESCE_MS);
|
|
53639
53699
|
}, []);
|
|
53640
|
-
|
|
53700
|
+
useEffect89(() => {
|
|
53641
53701
|
if (!enabled) return;
|
|
53642
53702
|
let hiddenSince = document.visibilityState === "hidden" ? Date.now() : 0;
|
|
53643
53703
|
const onVisibilityChange = () => {
|
|
@@ -53654,13 +53714,13 @@ function useJetStreamDialogSubscription({
|
|
|
53654
53714
|
document.addEventListener("visibilitychange", onVisibilityChange);
|
|
53655
53715
|
return () => document.removeEventListener("visibilitychange", onVisibilityChange);
|
|
53656
53716
|
}, [enabled, requestResync]);
|
|
53657
|
-
|
|
53717
|
+
useEffect89(() => {
|
|
53658
53718
|
if (!enabled) return;
|
|
53659
53719
|
if (resyncSignal <= lastResyncSignalRef.current) return;
|
|
53660
53720
|
lastResyncSignalRef.current = resyncSignal;
|
|
53661
53721
|
requestResync();
|
|
53662
53722
|
}, [enabled, resyncSignal, requestResync]);
|
|
53663
|
-
|
|
53723
|
+
useEffect89(() => {
|
|
53664
53724
|
if (!enabled || !dialogId || !isConnected) {
|
|
53665
53725
|
if (subscriptionRef.current) {
|
|
53666
53726
|
try {
|
|
@@ -53761,7 +53821,7 @@ function useJetStreamDialogSubscription({
|
|
|
53761
53821
|
}
|
|
53762
53822
|
|
|
53763
53823
|
// src/components/chat/hooks/use-nats-dialog-subscription.ts
|
|
53764
|
-
import { useEffect as
|
|
53824
|
+
import { useEffect as useEffect90, useRef as useRef71, useState as useState120 } from "react";
|
|
53765
53825
|
function useNatsDialogSubscription({
|
|
53766
53826
|
enabled,
|
|
53767
53827
|
dialogId,
|
|
@@ -53775,47 +53835,47 @@ function useNatsDialogSubscription({
|
|
|
53775
53835
|
clientConfig = {},
|
|
53776
53836
|
reconnectionBackoff
|
|
53777
53837
|
}) {
|
|
53778
|
-
const [isConnected, setIsConnected] =
|
|
53779
|
-
const [isSubscribed, setIsSubscribed] =
|
|
53780
|
-
const [reconnectionCount, setReconnectionCount] =
|
|
53838
|
+
const [isConnected, setIsConnected] = useState120(false);
|
|
53839
|
+
const [isSubscribed, setIsSubscribed] = useState120(false);
|
|
53840
|
+
const [reconnectionCount, setReconnectionCount] = useState120(0);
|
|
53781
53841
|
const clientRef = useRef71(null);
|
|
53782
53842
|
const subscriptionRefs = useRef71(/* @__PURE__ */ new Map());
|
|
53783
53843
|
const onEventRef = useRef71(onEvent);
|
|
53784
|
-
|
|
53844
|
+
useEffect90(() => {
|
|
53785
53845
|
onEventRef.current = onEvent;
|
|
53786
53846
|
}, [onEvent]);
|
|
53787
53847
|
const onConnectRef = useRef71(onConnect);
|
|
53788
|
-
|
|
53848
|
+
useEffect90(() => {
|
|
53789
53849
|
onConnectRef.current = onConnect;
|
|
53790
53850
|
}, [onConnect]);
|
|
53791
53851
|
const onDisconnectRef = useRef71(onDisconnect);
|
|
53792
|
-
|
|
53852
|
+
useEffect90(() => {
|
|
53793
53853
|
onDisconnectRef.current = onDisconnect;
|
|
53794
53854
|
}, [onDisconnect]);
|
|
53795
53855
|
const onSubscribedRef = useRef71(onSubscribed);
|
|
53796
|
-
|
|
53856
|
+
useEffect90(() => {
|
|
53797
53857
|
onSubscribedRef.current = onSubscribed;
|
|
53798
53858
|
}, [onSubscribed]);
|
|
53799
53859
|
const onBeforeReconnectRef = useRef71(onBeforeReconnect);
|
|
53800
|
-
|
|
53860
|
+
useEffect90(() => {
|
|
53801
53861
|
onBeforeReconnectRef.current = onBeforeReconnect;
|
|
53802
53862
|
}, [onBeforeReconnect]);
|
|
53803
53863
|
const hadConnectionBeforeRef = useRef71(false);
|
|
53804
53864
|
const getNatsWsUrlRef = useRef71(getNatsWsUrl);
|
|
53805
|
-
|
|
53865
|
+
useEffect90(() => {
|
|
53806
53866
|
getNatsWsUrlRef.current = getNatsWsUrl;
|
|
53807
53867
|
}, [getNatsWsUrl]);
|
|
53808
53868
|
const reconnectionBackoffRef = useRef71(reconnectionBackoff);
|
|
53809
|
-
|
|
53869
|
+
useEffect90(() => {
|
|
53810
53870
|
reconnectionBackoffRef.current = reconnectionBackoff;
|
|
53811
53871
|
}, [reconnectionBackoff]);
|
|
53812
53872
|
const clientConfigRef = useRef71(clientConfig);
|
|
53813
|
-
|
|
53873
|
+
useEffect90(() => {
|
|
53814
53874
|
clientConfigRef.current = clientConfig;
|
|
53815
53875
|
}, [clientConfig]);
|
|
53816
53876
|
const currentWsUrlRef = useRef71("");
|
|
53817
53877
|
const wsUrl = getNatsWsUrl();
|
|
53818
|
-
|
|
53878
|
+
useEffect90(() => {
|
|
53819
53879
|
if (!enabled || !wsUrl) {
|
|
53820
53880
|
if (currentWsUrlRef.current && clientRef.current) {
|
|
53821
53881
|
releaseClient(currentWsUrlRef.current);
|
|
@@ -53901,12 +53961,12 @@ function useNatsDialogSubscription({
|
|
|
53901
53961
|
topicsRef.current = topics;
|
|
53902
53962
|
const lastSubscribedDialogIdRef = useRef71(null);
|
|
53903
53963
|
const isConnectedRef = useRef71(isConnected);
|
|
53904
|
-
|
|
53964
|
+
useEffect90(() => {
|
|
53905
53965
|
isConnectedRef.current = isConnected;
|
|
53906
53966
|
}, [isConnected]);
|
|
53907
53967
|
const currentDialogIdRef = useRef71(null);
|
|
53908
53968
|
const abortControllerRef = useRef71(null);
|
|
53909
|
-
|
|
53969
|
+
useEffect90(() => {
|
|
53910
53970
|
currentDialogIdRef.current = dialogId;
|
|
53911
53971
|
if (!enabled || !dialogId) {
|
|
53912
53972
|
if (subscriptionRefs.current.size > 0) {
|
|
@@ -53987,7 +54047,7 @@ function useNatsDialogSubscription({
|
|
|
53987
54047
|
abortControllerRef.current = null;
|
|
53988
54048
|
};
|
|
53989
54049
|
}, [enabled, dialogId, topicsKey]);
|
|
53990
|
-
|
|
54050
|
+
useEffect90(() => {
|
|
53991
54051
|
if (!enabled || !currentDialogIdRef.current || !isConnected) {
|
|
53992
54052
|
return;
|
|
53993
54053
|
}
|
|
@@ -54037,7 +54097,7 @@ function buildNatsWsUrl(apiBaseUrl, options) {
|
|
|
54037
54097
|
}
|
|
54038
54098
|
|
|
54039
54099
|
// src/components/chat/hooks/use-slash-commands.ts
|
|
54040
|
-
import { useEffect as
|
|
54100
|
+
import { useEffect as useEffect91, useState as useState121 } from "react";
|
|
54041
54101
|
import { useQuery as useQuery3 } from "@tanstack/react-query";
|
|
54042
54102
|
async function fetchSlashCommands(prefix, signal, commandsUrl) {
|
|
54043
54103
|
try {
|
|
@@ -54054,9 +54114,9 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
|
|
|
54054
54114
|
}
|
|
54055
54115
|
}
|
|
54056
54116
|
function useSlashCommands(prefix, commandsUrl) {
|
|
54057
|
-
const [commands, setCommands] =
|
|
54058
|
-
const [loading, setLoading] =
|
|
54059
|
-
|
|
54117
|
+
const [commands, setCommands] = useState121([]);
|
|
54118
|
+
const [loading, setLoading] = useState121(false);
|
|
54119
|
+
useEffect91(() => {
|
|
54060
54120
|
if (prefix == null) {
|
|
54061
54121
|
setCommands([]);
|
|
54062
54122
|
return;
|
|
@@ -54162,7 +54222,7 @@ function useEmptyStateConfig(emptyStateUrl, options) {
|
|
|
54162
54222
|
}
|
|
54163
54223
|
|
|
54164
54224
|
// src/components/chat/hooks/use-chat-attachments.ts
|
|
54165
|
-
import { useCallback as useCallback51, useMemo as useMemo50, useRef as useRef72, useState as
|
|
54225
|
+
import { useCallback as useCallback51, useMemo as useMemo50, useRef as useRef72, useState as useState122 } from "react";
|
|
54166
54226
|
import { fileTypeFromBlob } from "file-type";
|
|
54167
54227
|
var CHAT_ATTACHMENTS_BUCKET = "chat-attachments";
|
|
54168
54228
|
var CHAT_ATTACHMENTS_FOLDER = "chat";
|
|
@@ -54238,7 +54298,7 @@ function uploadWithProgress(url, file, token, onProgress, signal) {
|
|
|
54238
54298
|
function useChatAttachments() {
|
|
54239
54299
|
const runtime = useRequiredChatRuntime();
|
|
54240
54300
|
const uploadUrlEndpoint = runtime.endpoints.attachmentUploadUrl;
|
|
54241
|
-
const [attachments, setAttachments] =
|
|
54301
|
+
const [attachments, setAttachments] = useState122([]);
|
|
54242
54302
|
const controllersRef = useRef72(/* @__PURE__ */ new Map());
|
|
54243
54303
|
const updateOne = useCallback51((id, patch) => {
|
|
54244
54304
|
setAttachments((prev) => prev.map((a) => a.id === id ? { ...a, ...patch } : a));
|
|
@@ -54405,16 +54465,16 @@ function useChatAttachments() {
|
|
|
54405
54465
|
}
|
|
54406
54466
|
|
|
54407
54467
|
// src/components/chat/hooks/use-chat-attachment-image-gallery.tsx
|
|
54408
|
-
import { useCallback as useCallback52, useEffect as
|
|
54409
|
-
import { jsx as
|
|
54468
|
+
import { useCallback as useCallback52, useEffect as useEffect92, useRef as useRef73, useState as useState123 } from "react";
|
|
54469
|
+
import { jsx as jsx391 } from "react/jsx-runtime";
|
|
54410
54470
|
var CLOSED = { isOpen: false, images: [], initialIndex: 0 };
|
|
54411
54471
|
function useChatAttachmentImageGallery() {
|
|
54412
54472
|
const runtime = useRequiredChatRuntime();
|
|
54413
54473
|
const viewUrlPrefix = runtime.endpoints.attachmentViewUrlPrefix;
|
|
54414
54474
|
const panelRef = useRef73(null);
|
|
54415
|
-
const [state, setState] =
|
|
54475
|
+
const [state, setState] = useState123(CLOSED);
|
|
54416
54476
|
const handleClose = useCallback52(() => setState(CLOSED), []);
|
|
54417
|
-
|
|
54477
|
+
useEffect92(() => {
|
|
54418
54478
|
const root = panelRef.current;
|
|
54419
54479
|
if (!root) return;
|
|
54420
54480
|
const onClick = (ev) => {
|
|
@@ -54442,7 +54502,7 @@ function useChatAttachmentImageGallery() {
|
|
|
54442
54502
|
root.addEventListener("click", onClick);
|
|
54443
54503
|
return () => root.removeEventListener("click", onClick);
|
|
54444
54504
|
}, [viewUrlPrefix]);
|
|
54445
|
-
const modal = state.isOpen ? /* @__PURE__ */
|
|
54505
|
+
const modal = state.isOpen ? /* @__PURE__ */ jsx391(
|
|
54446
54506
|
ImageGalleryModal,
|
|
54447
54507
|
{
|
|
54448
54508
|
images: state.images,
|
|
@@ -54460,11 +54520,11 @@ function absolutize(prefix) {
|
|
|
54460
54520
|
}
|
|
54461
54521
|
|
|
54462
54522
|
// src/components/chat/hooks/use-close-on-navigation.ts
|
|
54463
|
-
import { useEffect as
|
|
54523
|
+
import { useEffect as useEffect93, useRef as useRef74 } from "react";
|
|
54464
54524
|
function useCloseOnNavigation(close, pathname) {
|
|
54465
54525
|
const prevPathnameRef = useRef74(null);
|
|
54466
54526
|
const initializedRef = useRef74(false);
|
|
54467
|
-
|
|
54527
|
+
useEffect93(() => {
|
|
54468
54528
|
if (!initializedRef.current) {
|
|
54469
54529
|
initializedRef.current = true;
|
|
54470
54530
|
prevPathnameRef.current = pathname;
|
|
@@ -54478,13 +54538,13 @@ function useCloseOnNavigation(close, pathname) {
|
|
|
54478
54538
|
}
|
|
54479
54539
|
|
|
54480
54540
|
// src/components/chat/hooks/use-chat.ts
|
|
54481
|
-
import { useState as
|
|
54541
|
+
import { useState as useState125, useCallback as useCallback54, useEffect as useEffect94, useRef as useRef76 } from "react";
|
|
54482
54542
|
|
|
54483
54543
|
// src/components/chat/hooks/use-sse.ts
|
|
54484
|
-
import { useState as
|
|
54544
|
+
import { useState as useState124, useCallback as useCallback53, useRef as useRef75 } from "react";
|
|
54485
54545
|
function useSSE({ useMock = true, debugMode = false, streamFn } = {}) {
|
|
54486
|
-
const [isStreaming, setIsStreaming] =
|
|
54487
|
-
const [error, setError] =
|
|
54546
|
+
const [isStreaming, setIsStreaming] = useState124(false);
|
|
54547
|
+
const [error, setError] = useState124(null);
|
|
54488
54548
|
const abortControllerRef = useRef75(null);
|
|
54489
54549
|
const fallbackStream = useCallback53(async function* () {
|
|
54490
54550
|
throw new Error(
|
|
@@ -54551,12 +54611,12 @@ function useChat({
|
|
|
54551
54611
|
initialMessages,
|
|
54552
54612
|
onMessagesChange
|
|
54553
54613
|
} = {}) {
|
|
54554
|
-
const [messages, setMessages] =
|
|
54555
|
-
const [isTyping, setIsTyping] =
|
|
54614
|
+
const [messages, setMessages] = useState125(() => initialMessages ?? []);
|
|
54615
|
+
const [isTyping, setIsTyping] = useState125(false);
|
|
54556
54616
|
const currentAssistantSegmentsRef = useRef76([]);
|
|
54557
54617
|
const onMessagesChangeRef = useRef76(onMessagesChange);
|
|
54558
54618
|
onMessagesChangeRef.current = onMessagesChange;
|
|
54559
|
-
|
|
54619
|
+
useEffect94(() => {
|
|
54560
54620
|
onMessagesChangeRef.current?.(messages);
|
|
54561
54621
|
}, [messages]);
|
|
54562
54622
|
const {
|
|
@@ -55093,7 +55153,7 @@ function pruneStaleChatConversationStorage(source) {
|
|
|
55093
55153
|
}
|
|
55094
55154
|
|
|
55095
55155
|
// src/components/chat/hooks/use-chat-history-hydration.ts
|
|
55096
|
-
import { useEffect as
|
|
55156
|
+
import { useEffect as useEffect95, useRef as useRef77, useState as useState126 } from "react";
|
|
55097
55157
|
function useChatHistoryHydration({
|
|
55098
55158
|
active,
|
|
55099
55159
|
source,
|
|
@@ -55103,9 +55163,9 @@ function useChatHistoryHydration({
|
|
|
55103
55163
|
hydrateMessages,
|
|
55104
55164
|
bumpMetaTick
|
|
55105
55165
|
}) {
|
|
55106
|
-
const [isHydratingHistory, setIsHydratingHistory] =
|
|
55166
|
+
const [isHydratingHistory, setIsHydratingHistory] = useState126(false);
|
|
55107
55167
|
const hydratedKeyRef = useRef77(null);
|
|
55108
|
-
|
|
55168
|
+
useEffect95(() => {
|
|
55109
55169
|
if (!active) return;
|
|
55110
55170
|
const conversationId = conversationIdRef.current;
|
|
55111
55171
|
if (!conversationId) return;
|
|
@@ -57290,7 +57350,7 @@ function createChatDialogStore(options = {}) {
|
|
|
57290
57350
|
}
|
|
57291
57351
|
|
|
57292
57352
|
// src/components/chat/stream/use-chat-stream-reducer.ts
|
|
57293
|
-
import { useCallback as useCallback55, useEffect as
|
|
57353
|
+
import { useCallback as useCallback55, useEffect as useEffect96, useMemo as useMemo51, useRef as useRef78, useSyncExternalStore } from "react";
|
|
57294
57354
|
|
|
57295
57355
|
// src/components/chat/stream/delta-batcher.ts
|
|
57296
57356
|
var DELTA_FLUSH_FALLBACK_MS = 50;
|
|
@@ -57386,7 +57446,7 @@ function useChatStreamReducer({
|
|
|
57386
57446
|
const getServerSnapshot = useCallback55(() => store.getServerSnapshot(), [store]);
|
|
57387
57447
|
const subscribe = useCallback55((listener) => store.subscribe(listener), [store]);
|
|
57388
57448
|
const state = useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
57389
|
-
|
|
57449
|
+
useEffect96(() => store.retain(dialogId, side), [store, dialogId, side]);
|
|
57390
57450
|
const keyRef = useRef78({ dialogId, side });
|
|
57391
57451
|
if (keyRef.current.dialogId !== dialogId || keyRef.current.side !== side) {
|
|
57392
57452
|
keyRef.current = { dialogId, side };
|
|
@@ -57411,7 +57471,7 @@ function useChatStreamReducer({
|
|
|
57411
57471
|
},
|
|
57412
57472
|
[batcher, store, dialogId, side]
|
|
57413
57473
|
);
|
|
57414
|
-
|
|
57474
|
+
useEffect96(() => () => batcher.dispose(), [batcher]);
|
|
57415
57475
|
const mutate = useCallback55(
|
|
57416
57476
|
(fn) => store.mutate(dialogId, side, fn),
|
|
57417
57477
|
[store, dialogId, side]
|
|
@@ -57792,7 +57852,7 @@ var noopBumpMetaTick = () => {
|
|
|
57792
57852
|
};
|
|
57793
57853
|
|
|
57794
57854
|
// src/components/chat/hooks/use-nats-chat-adapter.ts
|
|
57795
|
-
import { useCallback as useCallback57, useEffect as
|
|
57855
|
+
import { useCallback as useCallback57, useEffect as useEffect97, useMemo as useMemo53, useRef as useRef80, useState as useState127 } from "react";
|
|
57796
57856
|
|
|
57797
57857
|
// src/chat-protocol/nats-decoder.ts
|
|
57798
57858
|
function normalizeToolCalls(raw) {
|
|
@@ -58814,7 +58874,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
58814
58874
|
modelLabel = null
|
|
58815
58875
|
} = config;
|
|
58816
58876
|
const isManagedMode = fetchDialogs !== void 0;
|
|
58817
|
-
const [internalDialogId, setInternalDialogId] =
|
|
58877
|
+
const [internalDialogId, setInternalDialogId] = useState127(null);
|
|
58818
58878
|
const dialogId = isManagedMode ? internalDialogId : controlledDialogId !== void 0 ? controlledDialogId : null;
|
|
58819
58879
|
const currentDialogIdRef = useRef80(dialogId);
|
|
58820
58880
|
currentDialogIdRef.current = dialogId;
|
|
@@ -58889,14 +58949,14 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
58889
58949
|
},
|
|
58890
58950
|
[applyEvent]
|
|
58891
58951
|
);
|
|
58892
|
-
const [dialogs, setDialogs] =
|
|
58893
|
-
const [dialogsNextCursor, setDialogsNextCursor] =
|
|
58894
|
-
const [isDialogsLoading, setIsDialogsLoading] =
|
|
58895
|
-
const [dialogsError, setDialogsError] =
|
|
58896
|
-
const [isCreatingDialog, setIsCreatingDialog] =
|
|
58897
|
-
const [messagesNextCursor, setMessagesNextCursor] =
|
|
58898
|
-
const [isMessagesLoading, setIsMessagesLoading] =
|
|
58899
|
-
const [connectionState, setConnectionState] =
|
|
58952
|
+
const [dialogs, setDialogs] = useState127([]);
|
|
58953
|
+
const [dialogsNextCursor, setDialogsNextCursor] = useState127(null);
|
|
58954
|
+
const [isDialogsLoading, setIsDialogsLoading] = useState127(false);
|
|
58955
|
+
const [dialogsError, setDialogsError] = useState127(false);
|
|
58956
|
+
const [isCreatingDialog, setIsCreatingDialog] = useState127(false);
|
|
58957
|
+
const [messagesNextCursor, setMessagesNextCursor] = useState127(null);
|
|
58958
|
+
const [isMessagesLoading, setIsMessagesLoading] = useState127(false);
|
|
58959
|
+
const [connectionState, setConnectionState] = useState127("connecting");
|
|
58900
58960
|
const hasConnectedOnceRef = useRef80(false);
|
|
58901
58961
|
const {
|
|
58902
58962
|
processChunk: catchupProcessChunk,
|
|
@@ -58974,7 +59034,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
58974
59034
|
]
|
|
58975
59035
|
);
|
|
58976
59036
|
const prevDialogIdRef = useRef80(void 0);
|
|
58977
|
-
|
|
59037
|
+
useEffect97(() => {
|
|
58978
59038
|
if (prevDialogIdRef.current === dialogId) return;
|
|
58979
59039
|
prevDialogIdRef.current = dialogId;
|
|
58980
59040
|
historyLoadSeqRef.current += 1;
|
|
@@ -58987,7 +59047,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
58987
59047
|
if (!active || !dialogId) return;
|
|
58988
59048
|
void loadDialogHistory(dialogId);
|
|
58989
59049
|
}, [active, dialogId, dialogKey, loadDialogHistory]);
|
|
58990
|
-
|
|
59050
|
+
useEffect97(() => {
|
|
58991
59051
|
if (!active || !dialogId) return;
|
|
58992
59052
|
const store = storeRef.current;
|
|
58993
59053
|
store.mutate(dialogId, DEFAULT_DIALOG_SIDE, (r) => r.adjustAgentBusySuppression(1));
|
|
@@ -59050,7 +59110,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
59050
59110
|
})();
|
|
59051
59111
|
}
|
|
59052
59112
|
});
|
|
59053
|
-
|
|
59113
|
+
useEffect97(() => {
|
|
59054
59114
|
if (!active || !dialogId) {
|
|
59055
59115
|
setConnectionState("connected");
|
|
59056
59116
|
return;
|
|
@@ -59089,7 +59149,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
59089
59149
|
const reloadDialogs = useCallback57(() => {
|
|
59090
59150
|
void loadDialogsPage();
|
|
59091
59151
|
}, [loadDialogsPage]);
|
|
59092
|
-
|
|
59152
|
+
useEffect97(() => {
|
|
59093
59153
|
if (!fetchDialogs) return;
|
|
59094
59154
|
if (!active) return;
|
|
59095
59155
|
if (initialDialogsLoadedRef.current) return;
|
|
@@ -59753,19 +59813,19 @@ function buildStreamFrames(messages) {
|
|
|
59753
59813
|
|
|
59754
59814
|
// src/components/chat/embeddable-chat.tsx
|
|
59755
59815
|
init_cn();
|
|
59756
|
-
import { useCallback as useCallback60, useEffect as
|
|
59816
|
+
import { useCallback as useCallback60, useEffect as useEffect98, useMemo as useMemo56, useRef as useRef83, useState as useState129 } from "react";
|
|
59757
59817
|
import * as DialogPrimitive5 from "@radix-ui/react-dialog";
|
|
59758
59818
|
import { usePreventScroll as usePreventScroll5 } from "@react-aria/overlays";
|
|
59759
59819
|
import { isIOS } from "@react-aria/utils";
|
|
59760
59820
|
|
|
59761
59821
|
// node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
|
|
59762
|
-
import * as
|
|
59822
|
+
import * as React153 from "react";
|
|
59763
59823
|
|
|
59764
59824
|
// node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
59765
|
-
import * as
|
|
59825
|
+
import * as React152 from "react";
|
|
59766
59826
|
import * as ReactDOM2 from "react-dom";
|
|
59767
59827
|
import { createSlot } from "@radix-ui/react-slot";
|
|
59768
|
-
import { jsx as
|
|
59828
|
+
import { jsx as jsx392 } from "react/jsx-runtime";
|
|
59769
59829
|
var __defProp3 = Object.defineProperty;
|
|
59770
59830
|
var __name3 = (target, value) => __defProp3(target, "name", { value, configurable: true });
|
|
59771
59831
|
var NODES = [
|
|
@@ -59789,13 +59849,13 @@ var NODES = [
|
|
|
59789
59849
|
];
|
|
59790
59850
|
var Primitive = NODES.reduce((primitive, node) => {
|
|
59791
59851
|
const Slot2 = createSlot(`Primitive.${node}`);
|
|
59792
|
-
const Node2 =
|
|
59852
|
+
const Node2 = React152.forwardRef((props, forwardedRef) => {
|
|
59793
59853
|
const { asChild, ...primitiveProps } = props;
|
|
59794
59854
|
const Comp = asChild ? Slot2 : node;
|
|
59795
59855
|
if (typeof window !== "undefined") {
|
|
59796
59856
|
window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
|
|
59797
59857
|
}
|
|
59798
|
-
return /* @__PURE__ */
|
|
59858
|
+
return /* @__PURE__ */ jsx392(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
59799
59859
|
});
|
|
59800
59860
|
Node2.displayName = `Primitive.${node}`;
|
|
59801
59861
|
return { ...primitive, [node]: Node2 };
|
|
@@ -59806,7 +59866,7 @@ function dispatchDiscreteCustomEvent(target, event) {
|
|
|
59806
59866
|
__name3(dispatchDiscreteCustomEvent, "dispatchDiscreteCustomEvent");
|
|
59807
59867
|
|
|
59808
59868
|
// node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
|
|
59809
|
-
import { jsx as
|
|
59869
|
+
import { jsx as jsx393 } from "react/jsx-runtime";
|
|
59810
59870
|
var __defProp4 = Object.defineProperty;
|
|
59811
59871
|
var __name4 = (target, value) => __defProp4(target, "name", { value, configurable: true });
|
|
59812
59872
|
var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
@@ -59822,9 +59882,9 @@ var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
|
59822
59882
|
whiteSpace: "nowrap",
|
|
59823
59883
|
wordWrap: "normal"
|
|
59824
59884
|
});
|
|
59825
|
-
var VisuallyHidden = /* @__PURE__ */
|
|
59885
|
+
var VisuallyHidden = /* @__PURE__ */ React153.forwardRef(
|
|
59826
59886
|
/* @__PURE__ */ __name4(function VisuallyHidden2(props, forwardedRef) {
|
|
59827
|
-
return /* @__PURE__ */
|
|
59887
|
+
return /* @__PURE__ */ jsx393(
|
|
59828
59888
|
Primitive.span,
|
|
59829
59889
|
{
|
|
59830
59890
|
...props,
|
|
@@ -59840,7 +59900,7 @@ init_button2();
|
|
|
59840
59900
|
import { FileText as FileText8, MessageSquare as MessageSquare3 } from "lucide-react";
|
|
59841
59901
|
|
|
59842
59902
|
// src/components/chat/hooks/use-chat-dialog-manager.ts
|
|
59843
|
-
import { useCallback as useCallback59, useMemo as useMemo55, useRef as useRef82, useState as
|
|
59903
|
+
import { useCallback as useCallback59, useMemo as useMemo55, useRef as useRef82, useState as useState128 } from "react";
|
|
59844
59904
|
function useChatDialogManager({
|
|
59845
59905
|
dialogs,
|
|
59846
59906
|
activeDialogId,
|
|
@@ -59851,8 +59911,8 @@ function useChatDialogManager({
|
|
|
59851
59911
|
fetchArchivedDialogs,
|
|
59852
59912
|
unarchiveDialog
|
|
59853
59913
|
}) {
|
|
59854
|
-
const [renameTarget, setRenameTarget] =
|
|
59855
|
-
const [archiveTarget, setArchiveTarget] =
|
|
59914
|
+
const [renameTarget, setRenameTarget] = useState128(null);
|
|
59915
|
+
const [archiveTarget, setArchiveTarget] = useState128(null);
|
|
59856
59916
|
const handleConfirmRename = useCallback59(
|
|
59857
59917
|
(name) => {
|
|
59858
59918
|
if (renameTarget) void renameDialog(renameTarget.id, name);
|
|
@@ -59875,11 +59935,11 @@ function useChatDialogManager({
|
|
|
59875
59935
|
}
|
|
59876
59936
|
setArchiveTarget(null);
|
|
59877
59937
|
}, [archiveTarget, archiveDialog, activeDialogId, clearMessages]);
|
|
59878
|
-
const [archiveOpen, setArchiveOpen] =
|
|
59879
|
-
const [archivedDialogs, setArchivedDialogs] =
|
|
59880
|
-
const [archivedCursor, setArchivedCursor] =
|
|
59881
|
-
const [archivedLoading, setArchivedLoading] =
|
|
59882
|
-
const [archivedPending, setArchivedPending] =
|
|
59938
|
+
const [archiveOpen, setArchiveOpen] = useState128(false);
|
|
59939
|
+
const [archivedDialogs, setArchivedDialogs] = useState128([]);
|
|
59940
|
+
const [archivedCursor, setArchivedCursor] = useState128(null);
|
|
59941
|
+
const [archivedLoading, setArchivedLoading] = useState128(false);
|
|
59942
|
+
const [archivedPending, setArchivedPending] = useState128(false);
|
|
59883
59943
|
const archivedRequestIdRef = useRef82(0);
|
|
59884
59944
|
const loadArchivedPage = useCallback59(
|
|
59885
59945
|
async (cursor) => {
|
|
@@ -59921,10 +59981,10 @@ function useChatDialogManager({
|
|
|
59921
59981
|
void loadArchivedPage();
|
|
59922
59982
|
}, [loadArchivedPage]);
|
|
59923
59983
|
const closeArchive = useCallback59(() => setArchiveOpen(false), []);
|
|
59924
|
-
const [viewingArchivedId, setViewingArchivedId] =
|
|
59984
|
+
const [viewingArchivedId, setViewingArchivedId] = useState128(
|
|
59925
59985
|
null
|
|
59926
59986
|
);
|
|
59927
|
-
const [openingDialogId, setOpeningDialogId] =
|
|
59987
|
+
const [openingDialogId, setOpeningDialogId] = useState128(null);
|
|
59928
59988
|
const handleSelectDialog = useCallback59(
|
|
59929
59989
|
(id) => {
|
|
59930
59990
|
setViewingArchivedId(null);
|
|
@@ -59943,7 +60003,7 @@ function useChatDialogManager({
|
|
|
59943
60003
|
},
|
|
59944
60004
|
[selectDialog]
|
|
59945
60005
|
);
|
|
59946
|
-
const [restoreTarget, setRestoreTarget] =
|
|
60006
|
+
const [restoreTarget, setRestoreTarget] = useState128(null);
|
|
59947
60007
|
const handleConfirmRestore = useCallback59(async () => {
|
|
59948
60008
|
if (restoreTarget) {
|
|
59949
60009
|
try {
|
|
@@ -60014,7 +60074,7 @@ function useChatDialogManager({
|
|
|
60014
60074
|
|
|
60015
60075
|
// src/components/chat/embeddable-chat.tsx
|
|
60016
60076
|
init_next_navigation();
|
|
60017
|
-
import { Fragment as Fragment89, jsx as
|
|
60077
|
+
import { Fragment as Fragment89, jsx as jsx394, jsxs as jsxs311 } from "react/jsx-runtime";
|
|
60018
60078
|
var DRAWER_DEFAULT_WIDTH_RATIO = 0.5;
|
|
60019
60079
|
var DRAWER_WIDTH_KEY = "mingo-chat-width-v3";
|
|
60020
60080
|
var DRAWER_DEFAULT_WIDTH_PX = 750;
|
|
@@ -60036,9 +60096,9 @@ var SPLIT_MIN_WIDTH = HISTORY_RAIL_WIDTH + CHAT_BLOCK_MIN_WIDTH;
|
|
|
60036
60096
|
var RAIL_COLLAPSED_STORAGE_KEY = "mingo-chat-history-collapsed";
|
|
60037
60097
|
var RAIL_ANIM_MS = 320;
|
|
60038
60098
|
function useRailPresence(open) {
|
|
60039
|
-
const [mounted, setMounted] =
|
|
60040
|
-
const [active, setActive] =
|
|
60041
|
-
|
|
60099
|
+
const [mounted, setMounted] = useState129(open);
|
|
60100
|
+
const [active, setActive] = useState129(false);
|
|
60101
|
+
useEffect98(() => {
|
|
60042
60102
|
if (open) {
|
|
60043
60103
|
setMounted(true);
|
|
60044
60104
|
let raf2 = 0;
|
|
@@ -60062,7 +60122,7 @@ function RailSlot({
|
|
|
60062
60122
|
innerClassName,
|
|
60063
60123
|
children
|
|
60064
60124
|
}) {
|
|
60065
|
-
return /* @__PURE__ */
|
|
60125
|
+
return /* @__PURE__ */ jsx394(
|
|
60066
60126
|
"div",
|
|
60067
60127
|
{
|
|
60068
60128
|
className: cn(
|
|
@@ -60071,7 +60131,7 @@ function RailSlot({
|
|
|
60071
60131
|
"shrink-0 overflow-hidden border-r border-ods-border transition-[width,opacity] ease-out",
|
|
60072
60132
|
active ? "w-80 opacity-100 duration-[240ms]" : "w-0 opacity-0 duration-[300ms]"
|
|
60073
60133
|
),
|
|
60074
|
-
children: /* @__PURE__ */
|
|
60134
|
+
children: /* @__PURE__ */ jsx394("div", { className: cn("h-full w-80", innerClassName), children })
|
|
60075
60135
|
}
|
|
60076
60136
|
);
|
|
60077
60137
|
}
|
|
@@ -60128,7 +60188,7 @@ function SourceChip({
|
|
|
60128
60188
|
sourceRowCtxFromRuntime(runtime, { baseRoute, chipBasePlatform })
|
|
60129
60189
|
);
|
|
60130
60190
|
const Icon2 = cta.icon;
|
|
60131
|
-
const icon = /* @__PURE__ */
|
|
60191
|
+
const icon = /* @__PURE__ */ jsx394(Icon2, { className: "h-3.5 w-3.5" });
|
|
60132
60192
|
const chipClass = chatChipClass({ tone: "secondary" });
|
|
60133
60193
|
const decideTab = (href, targetPlatform) => computeIsNewTab(runtime, href, targetPlatform);
|
|
60134
60194
|
if (src.items && src.items.length > 0) {
|
|
@@ -60148,22 +60208,22 @@ function SourceChip({
|
|
|
60148
60208
|
const ItemIcon = itemCta.icon;
|
|
60149
60209
|
return {
|
|
60150
60210
|
label: item.name,
|
|
60151
|
-
icon: /* @__PURE__ */
|
|
60211
|
+
icon: /* @__PURE__ */ jsx394(ItemIcon, { className: "h-3.5 w-3.5" }),
|
|
60152
60212
|
href: itemCta.href ?? void 0,
|
|
60153
60213
|
targetPlatform: itemCta.targetPlatform,
|
|
60154
60214
|
path: item.path ?? null,
|
|
60155
60215
|
secondaryAction: onDiscuss && itemCta.askable && itemCta.chatRef ? {
|
|
60156
|
-
icon: /* @__PURE__ */
|
|
60216
|
+
icon: /* @__PURE__ */ jsx394(MessageSquare3, {}),
|
|
60157
60217
|
label: `Ask about ${item.name}`,
|
|
60158
60218
|
onClick: () => onDiscuss(itemCta.chatRef)
|
|
60159
60219
|
} : void 0
|
|
60160
60220
|
};
|
|
60161
60221
|
});
|
|
60162
|
-
return /* @__PURE__ */
|
|
60222
|
+
return /* @__PURE__ */ jsx394(
|
|
60163
60223
|
HoverDropdown,
|
|
60164
60224
|
{
|
|
60165
60225
|
items: dropdownItems,
|
|
60166
|
-
renderAnchor: ({ href, targetPlatform, path, className, children }) => /* @__PURE__ */
|
|
60226
|
+
renderAnchor: ({ href, targetPlatform, path, className, children }) => /* @__PURE__ */ jsx394(
|
|
60167
60227
|
NavLinkAnchorViaRuntime,
|
|
60168
60228
|
{
|
|
60169
60229
|
href,
|
|
@@ -60173,9 +60233,9 @@ function SourceChip({
|
|
|
60173
60233
|
children
|
|
60174
60234
|
}
|
|
60175
60235
|
),
|
|
60176
|
-
children: /* @__PURE__ */
|
|
60236
|
+
children: /* @__PURE__ */ jsxs311("span", { className: `${chipClass} cursor-pointer`, children: [
|
|
60177
60237
|
icon,
|
|
60178
|
-
/* @__PURE__ */
|
|
60238
|
+
/* @__PURE__ */ jsxs311("span", { className: "truncate max-w-[160px]", children: [
|
|
60179
60239
|
"[",
|
|
60180
60240
|
src.index,
|
|
60181
60241
|
"] ",
|
|
@@ -60186,18 +60246,18 @@ function SourceChip({
|
|
|
60186
60246
|
);
|
|
60187
60247
|
}
|
|
60188
60248
|
const displayName = src.name || formatRelativePath(src.path);
|
|
60189
|
-
const chipBody = (label) => /* @__PURE__ */
|
|
60249
|
+
const chipBody = (label) => /* @__PURE__ */ jsxs311(Fragment89, { children: [
|
|
60190
60250
|
icon,
|
|
60191
|
-
/* @__PURE__ */
|
|
60251
|
+
/* @__PURE__ */ jsxs311("span", { className: "truncate max-w-[160px]", children: [
|
|
60192
60252
|
"[",
|
|
60193
60253
|
src.index,
|
|
60194
60254
|
"] ",
|
|
60195
60255
|
label
|
|
60196
60256
|
] })
|
|
60197
60257
|
] });
|
|
60198
|
-
const wrapChip = (clickable) => /* @__PURE__ */
|
|
60258
|
+
const wrapChip = (clickable) => /* @__PURE__ */ jsxs311("span", { className: "inline-flex items-center", children: [
|
|
60199
60259
|
clickable,
|
|
60200
|
-
/* @__PURE__ */
|
|
60260
|
+
/* @__PURE__ */ jsx394(
|
|
60201
60261
|
SourceActionButton,
|
|
60202
60262
|
{
|
|
60203
60263
|
chatRef: cta.chatRef,
|
|
@@ -60215,7 +60275,7 @@ function SourceChip({
|
|
|
60215
60275
|
const resolvedHref = resolveHrefForRuntime(cta.href, runtime);
|
|
60216
60276
|
const isNewTab = decideTab(resolvedHref, cta.targetPlatform ?? null);
|
|
60217
60277
|
return wrapChip(
|
|
60218
|
-
/* @__PURE__ */
|
|
60278
|
+
/* @__PURE__ */ jsx394(
|
|
60219
60279
|
"a",
|
|
60220
60280
|
{
|
|
60221
60281
|
href: resolvedHref,
|
|
@@ -60231,7 +60291,7 @@ function SourceChip({
|
|
|
60231
60291
|
const resolvedHref = resolveHrefForRuntime(cta.href, runtime);
|
|
60232
60292
|
const isNewTab = decideTab(resolvedHref, cta.targetPlatform ?? null);
|
|
60233
60293
|
return wrapChip(
|
|
60234
|
-
/* @__PURE__ */
|
|
60294
|
+
/* @__PURE__ */ jsx394(
|
|
60235
60295
|
"a",
|
|
60236
60296
|
{
|
|
60237
60297
|
href: resolvedHref,
|
|
@@ -60245,7 +60305,7 @@ function SourceChip({
|
|
|
60245
60305
|
);
|
|
60246
60306
|
}
|
|
60247
60307
|
return wrapChip(
|
|
60248
|
-
/* @__PURE__ */
|
|
60308
|
+
/* @__PURE__ */ jsx394("span", { className: `${chipClass} cursor-default`, title: displayName, children: chipBody(displayName) })
|
|
60249
60309
|
);
|
|
60250
60310
|
}
|
|
60251
60311
|
function SourceChips({
|
|
@@ -60256,13 +60316,13 @@ function SourceChips({
|
|
|
60256
60316
|
onClose,
|
|
60257
60317
|
onDiscuss
|
|
60258
60318
|
}) {
|
|
60259
|
-
const [expanded, setExpanded] =
|
|
60319
|
+
const [expanded, setExpanded] = useState129(false);
|
|
60260
60320
|
if (cited.length === 0) {
|
|
60261
60321
|
const fallback = uncited.slice(0, FALLBACK_TOP_RETRIEVED);
|
|
60262
60322
|
if (fallback.length === 0) return null;
|
|
60263
|
-
return /* @__PURE__ */
|
|
60264
|
-
/* @__PURE__ */
|
|
60265
|
-
/* @__PURE__ */
|
|
60323
|
+
return /* @__PURE__ */ jsxs311("div", { className: "flex flex-col gap-1.5 mt-2 pt-2 border-t border-ods-border", children: [
|
|
60324
|
+
/* @__PURE__ */ jsx394("span", { className: "text-h6 text-ods-text-muted uppercase", children: "Top retrieved sources" }),
|
|
60325
|
+
/* @__PURE__ */ jsx394("div", { className: "flex flex-wrap gap-1.5", children: fallback.map((src) => /* @__PURE__ */ jsx394(
|
|
60266
60326
|
SourceChip,
|
|
60267
60327
|
{
|
|
60268
60328
|
src,
|
|
@@ -60277,14 +60337,14 @@ function SourceChips({
|
|
|
60277
60337
|
}
|
|
60278
60338
|
const hiddenCount = uncited.length;
|
|
60279
60339
|
const hasOverflow = hiddenCount > 0;
|
|
60280
|
-
return /* @__PURE__ */
|
|
60281
|
-
/* @__PURE__ */
|
|
60282
|
-
/* @__PURE__ */
|
|
60340
|
+
return /* @__PURE__ */ jsxs311("div", { className: "flex flex-col gap-1.5 mt-2 pt-2 border-t border-ods-border", children: [
|
|
60341
|
+
/* @__PURE__ */ jsx394("span", { className: "text-h6 text-ods-text-muted uppercase", children: "Sources" }),
|
|
60342
|
+
/* @__PURE__ */ jsxs311(
|
|
60283
60343
|
"div",
|
|
60284
60344
|
{
|
|
60285
60345
|
className: `flex flex-wrap gap-1.5 ${expanded ? "max-h-[200px] overflow-y-auto overscroll-contain" : ""}`,
|
|
60286
60346
|
children: [
|
|
60287
|
-
cited.map((src) => /* @__PURE__ */
|
|
60347
|
+
cited.map((src) => /* @__PURE__ */ jsx394(
|
|
60288
60348
|
SourceChip,
|
|
60289
60349
|
{
|
|
60290
60350
|
src,
|
|
@@ -60295,7 +60355,7 @@ function SourceChips({
|
|
|
60295
60355
|
},
|
|
60296
60356
|
src.index
|
|
60297
60357
|
)),
|
|
60298
|
-
expanded && uncited.map((src) => /* @__PURE__ */
|
|
60358
|
+
expanded && uncited.map((src) => /* @__PURE__ */ jsx394(
|
|
60299
60359
|
SourceChip,
|
|
60300
60360
|
{
|
|
60301
60361
|
src,
|
|
@@ -60306,7 +60366,7 @@ function SourceChips({
|
|
|
60306
60366
|
},
|
|
60307
60367
|
src.index
|
|
60308
60368
|
)),
|
|
60309
|
-
hasOverflow && /* @__PURE__ */
|
|
60369
|
+
hasOverflow && /* @__PURE__ */ jsx394(
|
|
60310
60370
|
"button",
|
|
60311
60371
|
{
|
|
60312
60372
|
onClick: () => setExpanded(!expanded),
|
|
@@ -60322,7 +60382,7 @@ function SourceChips({
|
|
|
60322
60382
|
] });
|
|
60323
60383
|
}
|
|
60324
60384
|
function EmbeddableChat(props) {
|
|
60325
|
-
return /* @__PURE__ */
|
|
60385
|
+
return /* @__PURE__ */ jsx394(EmbeddableChatInner, { ...props });
|
|
60326
60386
|
}
|
|
60327
60387
|
function EmbeddableChatInner({
|
|
60328
60388
|
baseRoute,
|
|
@@ -60365,7 +60425,7 @@ function EmbeddableChatInner({
|
|
|
60365
60425
|
const commandsUrl = runtime.endpoints.commandsUrl;
|
|
60366
60426
|
const { attachmentsEnabled, user: identityUser } = useChatIdentity();
|
|
60367
60427
|
const viewUrlPrefix = runtime.endpoints.attachmentViewUrlPrefix;
|
|
60368
|
-
|
|
60428
|
+
useEffect98(() => {
|
|
60369
60429
|
if (process.env.NODE_ENV !== "production") {
|
|
60370
60430
|
const hasOpen = open !== void 0;
|
|
60371
60431
|
const hasHandler = onOpenChange !== void 0;
|
|
@@ -60381,13 +60441,13 @@ function EmbeddableChatInner({
|
|
|
60381
60441
|
defaultProp: defaultOpen ?? false,
|
|
60382
60442
|
onChange: onOpenChange
|
|
60383
60443
|
});
|
|
60384
|
-
const [autoFocusInput] =
|
|
60444
|
+
const [autoFocusInput] = useState129(() => {
|
|
60385
60445
|
if (typeof window === "undefined") return false;
|
|
60386
60446
|
return !window.matchMedia("(pointer: coarse)").matches;
|
|
60387
60447
|
});
|
|
60388
60448
|
usePreventScroll5({ isDisabled: !isOpen || shellLess });
|
|
60389
60449
|
const navigatingAwayRef = useRef83(false);
|
|
60390
|
-
|
|
60450
|
+
useEffect98(() => {
|
|
60391
60451
|
if (!isOpen) return;
|
|
60392
60452
|
if (shellLess) return;
|
|
60393
60453
|
if (typeof window === "undefined") return;
|
|
@@ -60414,7 +60474,7 @@ function EmbeddableChatInner({
|
|
|
60414
60474
|
};
|
|
60415
60475
|
}, [isOpen, shellLess]);
|
|
60416
60476
|
const chatInputRef = useRef83(null);
|
|
60417
|
-
const [quickActionPreview, setQuickActionPreview] =
|
|
60477
|
+
const [quickActionPreview, setQuickActionPreview] = useState129(null);
|
|
60418
60478
|
const slashCommandsProp = useMemo56(
|
|
60419
60479
|
() => ({
|
|
60420
60480
|
fetchCommands: (prefix, signal) => fetchSlashCommands(prefix, signal, commandsUrl),
|
|
@@ -60457,7 +60517,7 @@ function EmbeddableChatInner({
|
|
|
60457
60517
|
}, [mingoState, mingoDialogCapabilities, effectiveModes]);
|
|
60458
60518
|
const hasMingoMode = !!effectiveModes.mingo || !!mingoState;
|
|
60459
60519
|
const initialActiveMode = controlledActiveMode ?? defaultActiveMode ?? (effectiveModes.guide ? "guide" : "mingo");
|
|
60460
|
-
const [uncontrolledActiveMode, setUncontrolledActiveMode] =
|
|
60520
|
+
const [uncontrolledActiveMode, setUncontrolledActiveMode] = useState129(initialActiveMode);
|
|
60461
60521
|
const activeMode = controlledActiveMode ?? uncontrolledActiveMode;
|
|
60462
60522
|
const handleActiveModeChange = useCallback60(
|
|
60463
60523
|
(next) => {
|
|
@@ -60520,7 +60580,7 @@ function EmbeddableChatInner({
|
|
|
60520
60580
|
loadMoreMessages
|
|
60521
60581
|
} = useUnifiedChat({ modes: effectiveModes, activeMode, mingoStateOverride: mingoState });
|
|
60522
60582
|
const guidePromptSentRef = useRef83(false);
|
|
60523
|
-
|
|
60583
|
+
useEffect98(() => {
|
|
60524
60584
|
if (!guidePendingPrompt) {
|
|
60525
60585
|
guidePromptSentRef.current = false;
|
|
60526
60586
|
return;
|
|
@@ -60541,15 +60601,15 @@ function EmbeddableChatInner({
|
|
|
60541
60601
|
const { panelRef: galleryPanelRef, modal: galleryModal } = useChatAttachmentImageGallery();
|
|
60542
60602
|
const contextMaxItems = contextPicker?.maxItems ?? 10;
|
|
60543
60603
|
const contextPickerForMode = activeMode === "mingo" ? contextPicker : void 0;
|
|
60544
|
-
const [contextItems, setContextItems] =
|
|
60545
|
-
const [contextPickerOpen, setContextPickerOpen] =
|
|
60546
|
-
const [mentionQuery, setMentionQuery] =
|
|
60604
|
+
const [contextItems, setContextItems] = useState129([]);
|
|
60605
|
+
const [contextPickerOpen, setContextPickerOpen] = useState129(false);
|
|
60606
|
+
const [mentionQuery, setMentionQuery] = useState129(null);
|
|
60547
60607
|
const mentionActiveRef = useRef83(false);
|
|
60548
|
-
|
|
60608
|
+
useEffect98(() => {
|
|
60549
60609
|
mentionActiveRef.current = mentionQuery !== null;
|
|
60550
60610
|
}, [mentionQuery]);
|
|
60551
60611
|
const mentionKeysRef = useRef83(/* @__PURE__ */ new Set());
|
|
60552
|
-
|
|
60612
|
+
useEffect98(() => {
|
|
60553
60613
|
setContextItems([]);
|
|
60554
60614
|
setMentionQuery(null);
|
|
60555
60615
|
mentionKeysRef.current.clear();
|
|
@@ -60642,7 +60702,7 @@ function EmbeddableChatInner({
|
|
|
60642
60702
|
[discussRef, displayRef, resolvedBaseRoute, chipBasePlatform, extras]
|
|
60643
60703
|
);
|
|
60644
60704
|
const mingoAssistantIcon = useMemo56(
|
|
60645
|
-
() => effectiveAssistantIcon ? /* @__PURE__ */
|
|
60705
|
+
() => effectiveAssistantIcon ? /* @__PURE__ */ jsx394(EntityIcon, { icon: effectiveAssistantIcon, size: 24 }) : /* @__PURE__ */ jsx394(MingoIcon, { className: "h-6 w-6", cornerColor: "var(--ods-flamingo-cyan-base)" }),
|
|
60646
60706
|
[effectiveAssistantIcon]
|
|
60647
60707
|
);
|
|
60648
60708
|
const timestampCacheRef = useRef83(/* @__PURE__ */ new Map());
|
|
@@ -60783,7 +60843,7 @@ function EmbeddableChatInner({
|
|
|
60783
60843
|
});
|
|
60784
60844
|
const handleOpen = useCallback60(() => setIsOpen(true), [setIsOpen]);
|
|
60785
60845
|
useCloseOnNavigation(handleNavigationClose, null);
|
|
60786
|
-
|
|
60846
|
+
useEffect98(() => {
|
|
60787
60847
|
const handler = (e) => {
|
|
60788
60848
|
const detail = e.detail;
|
|
60789
60849
|
if (!detail || detail.source !== source) return;
|
|
@@ -60793,7 +60853,7 @@ function EmbeddableChatInner({
|
|
|
60793
60853
|
window.addEventListener("ask-ai:open-with-ref", handler);
|
|
60794
60854
|
return () => window.removeEventListener("ask-ai:open-with-ref", handler);
|
|
60795
60855
|
}, [source, discussRef, setIsOpen]);
|
|
60796
|
-
|
|
60856
|
+
useEffect98(() => {
|
|
60797
60857
|
const handler = (e) => {
|
|
60798
60858
|
const detail = e.detail;
|
|
60799
60859
|
if (!detail || detail.source !== source) return;
|
|
@@ -60810,7 +60870,7 @@ function EmbeddableChatInner({
|
|
|
60810
60870
|
const contentViewKey = hasConversation ? "conversation" : activeMode;
|
|
60811
60871
|
const isGuideEmpty = !hasConversation && activeMode === "guide";
|
|
60812
60872
|
const isQuickActionEmpty = !hasConversation && (activeMode === "guide" || activeMode === "mingo");
|
|
60813
|
-
|
|
60873
|
+
useEffect98(() => {
|
|
60814
60874
|
if (!isQuickActionEmpty) setQuickActionPreview(null);
|
|
60815
60875
|
}, [isQuickActionEmpty]);
|
|
60816
60876
|
const guideCanReturnToMingo = isGuideEmpty && hasMingoMode;
|
|
@@ -60852,11 +60912,11 @@ function EmbeddableChatInner({
|
|
|
60852
60912
|
const uncited = sources.filter((s) => !seenOrder.has(s.index));
|
|
60853
60913
|
return { cited, uncited };
|
|
60854
60914
|
}, [lastAssistantMsg, chatLoading]);
|
|
60855
|
-
const [portalHost, setPortalHost] =
|
|
60856
|
-
const [panelBoundary, setPanelBoundary] =
|
|
60857
|
-
const [panelWidth, setPanelWidth] =
|
|
60915
|
+
const [portalHost, setPortalHost] = useState129(null);
|
|
60916
|
+
const [panelBoundary, setPanelBoundary] = useState129(null);
|
|
60917
|
+
const [panelWidth, setPanelWidth] = useState129(0);
|
|
60858
60918
|
const panelMeasureRef = useRef83(null);
|
|
60859
|
-
|
|
60919
|
+
useEffect98(() => {
|
|
60860
60920
|
const el = panelMeasureRef.current;
|
|
60861
60921
|
if (!el || typeof ResizeObserver === "undefined") return;
|
|
60862
60922
|
const ro = new ResizeObserver((entries) => {
|
|
@@ -60871,8 +60931,8 @@ function EmbeddableChatInner({
|
|
|
60871
60931
|
panelMeasureRef.current = node;
|
|
60872
60932
|
setPanelBoundary(node);
|
|
60873
60933
|
}, []);
|
|
60874
|
-
const [railCollapsed, setRailCollapsed] =
|
|
60875
|
-
|
|
60934
|
+
const [railCollapsed, setRailCollapsed] = useState129(false);
|
|
60935
|
+
useEffect98(() => {
|
|
60876
60936
|
try {
|
|
60877
60937
|
if (window.localStorage.getItem(RAIL_COLLAPSED_STORAGE_KEY) === "1")
|
|
60878
60938
|
setRailCollapsed(true);
|
|
@@ -60889,15 +60949,15 @@ function EmbeddableChatInner({
|
|
|
60889
60949
|
return next;
|
|
60890
60950
|
});
|
|
60891
60951
|
}, []);
|
|
60892
|
-
const [railSearchOpen, setRailSearchOpen] =
|
|
60952
|
+
const [railSearchOpen, setRailSearchOpen] = useState129(false);
|
|
60893
60953
|
const splitEligible = activeMode === "mingo";
|
|
60894
60954
|
const canSplit = panelWidth >= SPLIT_MIN_WIDTH;
|
|
60895
60955
|
const wideMingo = splitEligible && canSplit && !previewMode;
|
|
60896
60956
|
const splitActive = wideMingo && !railCollapsed;
|
|
60897
60957
|
const railPresence = useRailPresence(splitActive);
|
|
60898
60958
|
const showWideHeader = wideMingo || railPresence.mounted;
|
|
60899
|
-
const [composeOpen, setComposeOpen] =
|
|
60900
|
-
|
|
60959
|
+
const [composeOpen, setComposeOpen] = useState129(false);
|
|
60960
|
+
useEffect98(() => {
|
|
60901
60961
|
if (hasConversation) setComposeOpen(false);
|
|
60902
60962
|
}, [hasConversation]);
|
|
60903
60963
|
const isMingoMode = activeMode === "mingo";
|
|
@@ -60953,17 +61013,17 @@ function EmbeddableChatInner({
|
|
|
60953
61013
|
onArchive: headerOnArchive,
|
|
60954
61014
|
onOpenArchive: headerOnOpenArchive
|
|
60955
61015
|
};
|
|
60956
|
-
const body = /* @__PURE__ */
|
|
60957
|
-
/* @__PURE__ */
|
|
61016
|
+
const body = /* @__PURE__ */ jsx394(PortalContainerContext.Provider, { value: portalHost, children: /* @__PURE__ */ jsxs311(CollisionBoundaryContext.Provider, { value: panelBoundary, children: [
|
|
61017
|
+
/* @__PURE__ */ jsx394(
|
|
60958
61018
|
"div",
|
|
60959
61019
|
{
|
|
60960
61020
|
ref: setPanelNode,
|
|
60961
61021
|
className: `flex h-full flex-col overflow-hidden transition-colors duration-200 ${archiveOpen && !splitActive || stackedListView ? "bg-ods-card" : "bg-ods-bg"} ${previewMode ? "pointer-events-none select-none" : ""}`,
|
|
60962
|
-
children: archiveOpen && !splitActive ? /* @__PURE__ */
|
|
61022
|
+
children: archiveOpen && !splitActive ? /* @__PURE__ */ jsx394(
|
|
60963
61023
|
"div",
|
|
60964
61024
|
{
|
|
60965
61025
|
className: "flex flex-1 min-h-0 flex-col animate-in fade-in-0 duration-200",
|
|
60966
|
-
children: /* @__PURE__ */
|
|
61026
|
+
children: /* @__PURE__ */ jsx394(
|
|
60967
61027
|
ChatArchivePage,
|
|
60968
61028
|
{
|
|
60969
61029
|
dialogs: archivedDialogs,
|
|
@@ -60980,7 +61040,7 @@ function EmbeddableChatInner({
|
|
|
60980
61040
|
)
|
|
60981
61041
|
},
|
|
60982
61042
|
"archive-view"
|
|
60983
|
-
) : /* @__PURE__ */
|
|
61043
|
+
) : /* @__PURE__ */ jsxs311(
|
|
60984
61044
|
"div",
|
|
60985
61045
|
{
|
|
60986
61046
|
className: "flex flex-1 min-h-0 flex-col animate-in fade-in-0 duration-200",
|
|
@@ -60998,8 +61058,8 @@ function EmbeddableChatInner({
|
|
|
60998
61058
|
// the viewport `md` breakpoint — otherwise a 720–799px panel on a
|
|
60999
61059
|
// sub-`md` viewport would split the body yet drop to the mobile
|
|
61000
61060
|
// single-bar header (no rail search / collapse controls).
|
|
61001
|
-
/* @__PURE__ */
|
|
61002
|
-
railPresence.mounted && /* @__PURE__ */
|
|
61061
|
+
/* @__PURE__ */ jsxs311("div", { className: "flex h-14 w-full flex-shrink-0 overflow-hidden border-b border-ods-border bg-ods-card", children: [
|
|
61062
|
+
railPresence.mounted && /* @__PURE__ */ jsx394(
|
|
61003
61063
|
RailSlot,
|
|
61004
61064
|
{
|
|
61005
61065
|
active: railPresence.active,
|
|
@@ -61010,50 +61070,50 @@ function EmbeddableChatInner({
|
|
|
61010
61070
|
// renders in the rail below); the chat block is untouched.
|
|
61011
61071
|
// Back is a full-height leading cell, matching the other
|
|
61012
61072
|
// header cells (not a small inline chevron).
|
|
61013
|
-
/* @__PURE__ */
|
|
61014
|
-
/* @__PURE__ */
|
|
61073
|
+
/* @__PURE__ */ jsxs311(Fragment89, { children: [
|
|
61074
|
+
/* @__PURE__ */ jsx394(
|
|
61015
61075
|
ChatHeaderIconButton,
|
|
61016
61076
|
{
|
|
61017
61077
|
divider: "right",
|
|
61018
61078
|
onClick: closeArchive,
|
|
61019
61079
|
"aria-label": "Back to chats",
|
|
61020
|
-
children: /* @__PURE__ */
|
|
61080
|
+
children: /* @__PURE__ */ jsx394(Chevron02LeftIcon, { size: 24 })
|
|
61021
61081
|
}
|
|
61022
61082
|
),
|
|
61023
|
-
/* @__PURE__ */
|
|
61083
|
+
/* @__PURE__ */ jsx394("div", { className: "flex min-w-0 flex-1 items-center px-[var(--spacing-system-mf)]", children: /* @__PURE__ */ jsx394("span", { className: "min-w-0 flex-1 truncate text-h3 text-ods-text-primary", children: "Chat Archive" }) })
|
|
61024
61084
|
] })
|
|
61025
61085
|
) : (
|
|
61026
61086
|
// "Current Chats" rail header — title fills, then the
|
|
61027
61087
|
// search + archive controls. When search is open the
|
|
61028
61088
|
// inline field takes over the title area in place
|
|
61029
61089
|
// (Figma 116:51217) and the magnifier toggle is hidden.
|
|
61030
|
-
/* @__PURE__ */
|
|
61031
|
-
railSearchOpen && mingoCaps.onSearchChange ? /* @__PURE__ */
|
|
61090
|
+
/* @__PURE__ */ jsxs311(Fragment89, { children: [
|
|
61091
|
+
railSearchOpen && mingoCaps.onSearchChange ? /* @__PURE__ */ jsx394(
|
|
61032
61092
|
ChatHeaderSearchField,
|
|
61033
61093
|
{
|
|
61034
61094
|
initialValue: mingoCaps.searchQuery,
|
|
61035
61095
|
onSearchChange: mingoCaps.onSearchChange,
|
|
61036
61096
|
onCollapse: () => setRailSearchOpen(false)
|
|
61037
61097
|
}
|
|
61038
|
-
) : /* @__PURE__ */
|
|
61039
|
-
/* @__PURE__ */
|
|
61040
|
-
mingoCaps.onSearchChange && /* @__PURE__ */
|
|
61098
|
+
) : /* @__PURE__ */ jsxs311(Fragment89, { children: [
|
|
61099
|
+
/* @__PURE__ */ jsx394("div", { className: "flex min-w-0 flex-1 items-center px-[var(--spacing-system-mf)]", children: /* @__PURE__ */ jsx394("span", { className: "min-w-0 flex-1 truncate text-h3 text-ods-text-primary", children: "Current Chats" }) }),
|
|
61100
|
+
mingoCaps.onSearchChange && /* @__PURE__ */ jsx394(
|
|
61041
61101
|
ChatHeaderIconButton,
|
|
61042
61102
|
{
|
|
61043
61103
|
onClick: () => setRailSearchOpen((o) => !o),
|
|
61044
61104
|
"aria-label": "Search chats",
|
|
61045
61105
|
"aria-pressed": railSearchOpen,
|
|
61046
|
-
children: /* @__PURE__ */
|
|
61106
|
+
children: /* @__PURE__ */ jsx394(SearchIcon, { size: 24 })
|
|
61047
61107
|
}
|
|
61048
61108
|
)
|
|
61049
61109
|
] }),
|
|
61050
|
-
headerOnOpenArchive && /* @__PURE__ */
|
|
61110
|
+
headerOnOpenArchive && /* @__PURE__ */ jsx394(ChatHeaderIconButton, { onClick: headerOnOpenArchive, "aria-label": "Chat archive", children: /* @__PURE__ */ jsx394(ClockHistoryIcon, { size: 24 }) })
|
|
61051
61111
|
] })
|
|
61052
61112
|
)
|
|
61053
61113
|
}
|
|
61054
61114
|
),
|
|
61055
|
-
/* @__PURE__ */
|
|
61056
|
-
/* @__PURE__ */
|
|
61115
|
+
/* @__PURE__ */ jsxs311("div", { className: "flex flex-1 min-w-0", children: [
|
|
61116
|
+
/* @__PURE__ */ jsx394(
|
|
61057
61117
|
"button",
|
|
61058
61118
|
{
|
|
61059
61119
|
type: "button",
|
|
@@ -61061,17 +61121,17 @@ function EmbeddableChatInner({
|
|
|
61061
61121
|
"aria-label": splitActive ? "Collapse chat list" : "Show chat list",
|
|
61062
61122
|
"aria-pressed": !splitActive,
|
|
61063
61123
|
className: "flex size-14 shrink-0 items-center justify-center border-r border-ods-border text-ods-text-secondary transition-colors hover:bg-ods-bg-hover hover:text-ods-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-ods-accent",
|
|
61064
|
-
children: splitActive ? /* @__PURE__ */
|
|
61124
|
+
children: splitActive ? /* @__PURE__ */ jsx394(Arrow02RightIcon, { size: 24 }) : /* @__PURE__ */ jsx394(Arrow02LeftIcon, { size: 24 })
|
|
61065
61125
|
}
|
|
61066
61126
|
),
|
|
61067
|
-
/* @__PURE__ */
|
|
61068
|
-
/* @__PURE__ */
|
|
61069
|
-
/* @__PURE__ */
|
|
61070
|
-
headerPersonName && /* @__PURE__ */
|
|
61127
|
+
/* @__PURE__ */ jsxs311("div", { className: "flex flex-1 min-w-0 items-center gap-[var(--spacing-system-m)] px-[var(--spacing-system-mf)] py-[var(--spacing-system-sf)]", children: [
|
|
61128
|
+
/* @__PURE__ */ jsxs311("div", { className: "flex min-w-0 flex-col", children: [
|
|
61129
|
+
/* @__PURE__ */ jsx394("p", { className: "truncate text-h3 leading-tight text-ods-text-primary", children: headerShowBack ? headerTitle : "New Chat" }),
|
|
61130
|
+
headerPersonName && /* @__PURE__ */ jsx394("p", { className: "truncate text-h6 leading-tight text-ods-text-secondary", children: headerPersonName })
|
|
61071
61131
|
] }),
|
|
61072
61132
|
headerAvatar ? (
|
|
61073
61133
|
// Owner avatar at the title cell's right edge (Figma 113:63273).
|
|
61074
|
-
/* @__PURE__ */
|
|
61134
|
+
/* @__PURE__ */ jsx394(
|
|
61075
61135
|
SquareAvatar,
|
|
61076
61136
|
{
|
|
61077
61137
|
variant: "round",
|
|
@@ -61086,17 +61146,17 @@ function EmbeddableChatInner({
|
|
|
61086
61146
|
)
|
|
61087
61147
|
) : null
|
|
61088
61148
|
] }),
|
|
61089
|
-
isViewingArchived && headerOnRestore && /* @__PURE__ */
|
|
61090
|
-
headerShowBack && !isViewingArchived && splitHeaderMenuItems.length > 0 && /* @__PURE__ */
|
|
61149
|
+
isViewingArchived && headerOnRestore && /* @__PURE__ */ jsx394(ChatHeaderIconButton, { onClick: headerOnRestore, "aria-label": "Unarchive chat", children: /* @__PURE__ */ jsx394(Refresh01LeftIcon, { size: 24 }) }),
|
|
61150
|
+
headerShowBack && !isViewingArchived && splitHeaderMenuItems.length > 0 && /* @__PURE__ */ jsx394(
|
|
61091
61151
|
ActionsMenuDropdown,
|
|
61092
61152
|
{
|
|
61093
61153
|
triggerAriaLabel: "Chat actions",
|
|
61094
61154
|
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
61095
61155
|
groups: [{ items: splitHeaderMenuItems }],
|
|
61096
|
-
customTrigger: /* @__PURE__ */
|
|
61156
|
+
customTrigger: /* @__PURE__ */ jsx394(ChatHeaderIconButton, { "aria-label": "Chat actions", children: /* @__PURE__ */ jsx394(Ellipsis01Icon, { size: 24 }) })
|
|
61097
61157
|
}
|
|
61098
61158
|
),
|
|
61099
|
-
/* @__PURE__ */
|
|
61159
|
+
/* @__PURE__ */ jsx394(ChatHeaderIconButton, { onClick: handleClose, "aria-label": "Close", children: /* @__PURE__ */ jsx394(XmarkIcon, { size: 24 }) })
|
|
61100
61160
|
] })
|
|
61101
61161
|
] })
|
|
61102
61162
|
) : (
|
|
@@ -61104,11 +61164,11 @@ function EmbeddableChatInner({
|
|
|
61104
61164
|
// guide, resolved into `narrowHeaderProps` above. (Wide layouts,
|
|
61105
61165
|
// including rail-collapsed, use the wide header above.) Embedded
|
|
61106
61166
|
// previews (hero demo tabs) force the compact bar via `compact`.
|
|
61107
|
-
/* @__PURE__ */
|
|
61167
|
+
/* @__PURE__ */ jsx394(ChatPanelHeader, { ...narrowHeaderProps, compact: previewMode })
|
|
61108
61168
|
),
|
|
61109
|
-
activeMode === "guide" && hasMingoMode && /* @__PURE__ */
|
|
61110
|
-
/* @__PURE__ */
|
|
61111
|
-
railPresence.mounted && /* @__PURE__ */
|
|
61169
|
+
activeMode === "guide" && hasMingoMode && /* @__PURE__ */ jsx394(GuideModeBanner, { className: "animate-in fade-in-0 duration-200" }),
|
|
61170
|
+
/* @__PURE__ */ jsxs311("div", { className: "flex flex-1 min-h-0 overflow-hidden", children: [
|
|
61171
|
+
railPresence.mounted && /* @__PURE__ */ jsx394(
|
|
61112
61172
|
RailSlot,
|
|
61113
61173
|
{
|
|
61114
61174
|
active: railPresence.active,
|
|
@@ -61116,7 +61176,7 @@ function EmbeddableChatInner({
|
|
|
61116
61176
|
children: archiveOpen ? (
|
|
61117
61177
|
// Archive list inside the rail (header lives in the split
|
|
61118
61178
|
// header's left cell above). Right chat block stays put.
|
|
61119
|
-
/* @__PURE__ */
|
|
61179
|
+
/* @__PURE__ */ jsx394(
|
|
61120
61180
|
ChatArchivePage,
|
|
61121
61181
|
{
|
|
61122
61182
|
embedded: true,
|
|
@@ -61130,7 +61190,7 @@ function EmbeddableChatInner({
|
|
|
61130
61190
|
}
|
|
61131
61191
|
}
|
|
61132
61192
|
)
|
|
61133
|
-
) : /* @__PURE__ */
|
|
61193
|
+
) : /* @__PURE__ */ jsx394(
|
|
61134
61194
|
MingoHistoryRail,
|
|
61135
61195
|
{
|
|
61136
61196
|
dialogs,
|
|
@@ -61154,11 +61214,11 @@ function EmbeddableChatInner({
|
|
|
61154
61214
|
)
|
|
61155
61215
|
}
|
|
61156
61216
|
),
|
|
61157
|
-
/* @__PURE__ */
|
|
61217
|
+
/* @__PURE__ */ jsx394("div", { className: "flex flex-1 flex-col min-h-0 min-w-0", children: stackedListView ? (
|
|
61158
61218
|
// Narrow "Current Chats" list (Figma 341:36190) — the default
|
|
61159
61219
|
// single-column view. No composer here; "Start New Chat" opens
|
|
61160
61220
|
// the compose view.
|
|
61161
|
-
/* @__PURE__ */
|
|
61221
|
+
/* @__PURE__ */ jsx394(
|
|
61162
61222
|
MingoHistoryRail,
|
|
61163
61223
|
{
|
|
61164
61224
|
className: "animate-in fade-in-0 duration-200",
|
|
@@ -61181,17 +61241,17 @@ function EmbeddableChatInner({
|
|
|
61181
61241
|
onRetry: reloadDialogs
|
|
61182
61242
|
}
|
|
61183
61243
|
)
|
|
61184
|
-
) : /* @__PURE__ */
|
|
61185
|
-
/* @__PURE__ */
|
|
61244
|
+
) : /* @__PURE__ */ jsxs311(Fragment89, { children: [
|
|
61245
|
+
/* @__PURE__ */ jsx394(
|
|
61186
61246
|
"div",
|
|
61187
61247
|
{
|
|
61188
61248
|
ref: galleryPanelRef,
|
|
61189
61249
|
className: "flex-1 flex flex-col min-h-0 p-[var(--spacing-system-m)]",
|
|
61190
|
-
children: /* @__PURE__ */
|
|
61250
|
+
children: /* @__PURE__ */ jsx394(
|
|
61191
61251
|
"div",
|
|
61192
61252
|
{
|
|
61193
61253
|
className: "flex-1 flex flex-col min-h-0 animate-in fade-in-0 duration-200",
|
|
61194
|
-
children: hasConversation ? /* @__PURE__ */
|
|
61254
|
+
children: hasConversation ? /* @__PURE__ */ jsxs311("div", { className: "flex-1 flex flex-col min-h-0", children: [
|
|
61195
61255
|
messagesInitialLoading ? (
|
|
61196
61256
|
// Match the real list's `fullWidth` layout so swapping
|
|
61197
61257
|
// skeleton → bubbles doesn't shift the column. The panel
|
|
@@ -61203,7 +61263,7 @@ function EmbeddableChatInner({
|
|
|
61203
61263
|
// skeleton overflows a short panel and grows its OWN
|
|
61204
61264
|
// scrollbar — ugly. `fill` top-anchors + clips overflow so
|
|
61205
61265
|
// it reads as "the whole panel is loading" and never scrolls.
|
|
61206
|
-
/* @__PURE__ */
|
|
61266
|
+
/* @__PURE__ */ jsx394(
|
|
61207
61267
|
ChatMessageListSkeleton,
|
|
61208
61268
|
{
|
|
61209
61269
|
fullWidth: true,
|
|
@@ -61211,7 +61271,7 @@ function EmbeddableChatInner({
|
|
|
61211
61271
|
className: "flex-1"
|
|
61212
61272
|
}
|
|
61213
61273
|
)
|
|
61214
|
-
) : /* @__PURE__ */
|
|
61274
|
+
) : /* @__PURE__ */ jsx394(
|
|
61215
61275
|
ChatMessageList,
|
|
61216
61276
|
{
|
|
61217
61277
|
messages,
|
|
@@ -61236,7 +61296,7 @@ function EmbeddableChatInner({
|
|
|
61236
61296
|
onLoadMore: loadMoreMessages
|
|
61237
61297
|
}
|
|
61238
61298
|
),
|
|
61239
|
-
lastSources && (lastSources.cited.length > 0 || lastSources.uncited.length > 0) && !chatLoading && /* @__PURE__ */
|
|
61299
|
+
lastSources && (lastSources.cited.length > 0 || lastSources.uncited.length > 0) && !chatLoading && /* @__PURE__ */ jsx394("div", { className: "flex-shrink-0 pb-2", children: /* @__PURE__ */ jsx394(
|
|
61240
61300
|
SourceChips,
|
|
61241
61301
|
{
|
|
61242
61302
|
cited: lastSources.cited,
|
|
@@ -61252,7 +61312,7 @@ function EmbeddableChatInner({
|
|
|
61252
61312
|
centred greeting + capability grid + Guide-chat promo +
|
|
61253
61313
|
quick-action chips. Guide mode keeps the slash-command
|
|
61254
61314
|
onboarding list below. */
|
|
61255
|
-
/* @__PURE__ */
|
|
61315
|
+
/* @__PURE__ */ jsx394(
|
|
61256
61316
|
MingoWelcome,
|
|
61257
61317
|
{
|
|
61258
61318
|
onStartGuideChat: effectiveModes.guide ? () => handleActiveModeChange("guide") : void 0,
|
|
@@ -61267,7 +61327,7 @@ function EmbeddableChatInner({
|
|
|
61267
61327
|
/* Figma node 7532:328214 — Guide-mode empty state: greeting
|
|
61268
61328
|
+ slash-command onboarding list share one scroll region,
|
|
61269
61329
|
with a pinned quick-action chip row above the composer. */
|
|
61270
|
-
/* @__PURE__ */
|
|
61330
|
+
/* @__PURE__ */ jsx394(
|
|
61271
61331
|
GuideWelcome,
|
|
61272
61332
|
{
|
|
61273
61333
|
subtitle: effectiveGreeting ?? void 0,
|
|
@@ -61283,8 +61343,8 @@ function EmbeddableChatInner({
|
|
|
61283
61343
|
onQuickActionHover: (action) => setQuickActionPreview(action.prompt ?? action.label),
|
|
61284
61344
|
onQuickActionHoverEnd: () => setQuickActionPreview(null),
|
|
61285
61345
|
agentSlug: activeAgentSlug,
|
|
61286
|
-
children: (chipCommands.length > 0 || !commandsLoaded) && /* @__PURE__ */
|
|
61287
|
-
!commandsLoaded && chipCommands.length === 0 && SKELETON_ROW_VARIANTS.map((variant, i) => /* @__PURE__ */
|
|
61346
|
+
children: (chipCommands.length > 0 || !commandsLoaded) && /* @__PURE__ */ jsxs311("div", { className: "shrink-0 overflow-hidden rounded-md border border-ods-border", children: [
|
|
61347
|
+
!commandsLoaded && chipCommands.length === 0 && SKELETON_ROW_VARIANTS.map((variant, i) => /* @__PURE__ */ jsx394(
|
|
61288
61348
|
MingoOnboardingCardSkeleton,
|
|
61289
61349
|
{
|
|
61290
61350
|
titleWidth: variant.titleWidth,
|
|
@@ -61306,10 +61366,10 @@ function EmbeddableChatInner({
|
|
|
61306
61366
|
chatInputRef
|
|
61307
61367
|
)
|
|
61308
61368
|
}));
|
|
61309
|
-
return /* @__PURE__ */
|
|
61369
|
+
return /* @__PURE__ */ jsx394(
|
|
61310
61370
|
MingoOnboardingCard,
|
|
61311
61371
|
{
|
|
61312
|
-
icon: /* @__PURE__ */
|
|
61372
|
+
icon: /* @__PURE__ */ jsx394(Icon2, { size: 16 }),
|
|
61313
61373
|
title: label,
|
|
61314
61374
|
slashCommand: `/${cmdId}`,
|
|
61315
61375
|
description: cmd.description,
|
|
@@ -61327,7 +61387,7 @@ function EmbeddableChatInner({
|
|
|
61327
61387
|
)
|
|
61328
61388
|
}
|
|
61329
61389
|
),
|
|
61330
|
-
/* @__PURE__ */
|
|
61390
|
+
/* @__PURE__ */ jsx394(
|
|
61331
61391
|
ChatAttachmentChipStrip,
|
|
61332
61392
|
{
|
|
61333
61393
|
attachments: stagedAttachments,
|
|
@@ -61335,7 +61395,7 @@ function EmbeddableChatInner({
|
|
|
61335
61395
|
disabled: chatLoading
|
|
61336
61396
|
}
|
|
61337
61397
|
),
|
|
61338
|
-
/* @__PURE__ */
|
|
61398
|
+
/* @__PURE__ */ jsx394(
|
|
61339
61399
|
ChatComposer,
|
|
61340
61400
|
{
|
|
61341
61401
|
archived: isViewingArchived,
|
|
@@ -61384,7 +61444,7 @@ function EmbeddableChatInner({
|
|
|
61384
61444
|
}
|
|
61385
61445
|
),
|
|
61386
61446
|
galleryModal,
|
|
61387
|
-
/* @__PURE__ */
|
|
61447
|
+
/* @__PURE__ */ jsx394(
|
|
61388
61448
|
ChatDialogModals,
|
|
61389
61449
|
{
|
|
61390
61450
|
renameTarget,
|
|
@@ -61398,15 +61458,15 @@ function EmbeddableChatInner({
|
|
|
61398
61458
|
onConfirmRestore: handleConfirmRestore
|
|
61399
61459
|
}
|
|
61400
61460
|
),
|
|
61401
|
-
/* @__PURE__ */
|
|
61461
|
+
/* @__PURE__ */ jsx394("div", { ref: setPortalHost, style: { display: "contents" } })
|
|
61402
61462
|
] }) });
|
|
61403
|
-
const panel = shellLess ? /* @__PURE__ */
|
|
61404
|
-
/* @__PURE__ */
|
|
61463
|
+
const panel = shellLess ? /* @__PURE__ */ jsxs311(ChatPanelContext.Provider, { value: chatPanelHandle, children: [
|
|
61464
|
+
/* @__PURE__ */ jsx394(VisuallyHidden, { children: /* @__PURE__ */ jsxs311(DialogPrimitive5.Title, { children: [
|
|
61405
61465
|
sourceLabel,
|
|
61406
61466
|
" AI Assistant"
|
|
61407
61467
|
] }) }),
|
|
61408
61468
|
body
|
|
61409
|
-
] }) : /* @__PURE__ */
|
|
61469
|
+
] }) : /* @__PURE__ */ jsx394(Drawer, { open: isOpen, onOpenChange: (o) => !o && handleClose(), children: /* @__PURE__ */ jsx394(ChatPanelContext.Provider, { value: chatPanelHandle, children: /* @__PURE__ */ jsxs311(
|
|
61410
61470
|
DrawerContent,
|
|
61411
61471
|
{
|
|
61412
61472
|
side: "right",
|
|
@@ -61421,7 +61481,7 @@ function EmbeddableChatInner({
|
|
|
61421
61481
|
"aria-describedby": void 0,
|
|
61422
61482
|
className: "\n mingo-chat-content !bg-ods-bg shadow-2xl\n focus:outline-none focus-visible:outline-none\n w-screen md:w-auto\n ",
|
|
61423
61483
|
children: [
|
|
61424
|
-
/* @__PURE__ */
|
|
61484
|
+
/* @__PURE__ */ jsx394(VisuallyHidden, { children: /* @__PURE__ */ jsxs311(DialogPrimitive5.Title, { children: [
|
|
61425
61485
|
sourceLabel,
|
|
61426
61486
|
" AI Assistant"
|
|
61427
61487
|
] }) }),
|
|
@@ -61429,17 +61489,17 @@ function EmbeddableChatInner({
|
|
|
61429
61489
|
]
|
|
61430
61490
|
}
|
|
61431
61491
|
) }) });
|
|
61432
|
-
return /* @__PURE__ */
|
|
61433
|
-
showInternalTrigger && !shellLess && /* @__PURE__ */
|
|
61492
|
+
return /* @__PURE__ */ jsxs311(Fragment89, { children: [
|
|
61493
|
+
showInternalTrigger && !shellLess && /* @__PURE__ */ jsx394(
|
|
61434
61494
|
"div",
|
|
61435
61495
|
{
|
|
61436
61496
|
"aria-hidden": isOpen,
|
|
61437
61497
|
className: `sticky bottom-0 h-0 z-[9990] pointer-events-none ${isOpen ? "opacity-0" : "opacity-100"}`,
|
|
61438
|
-
children: /* @__PURE__ */
|
|
61498
|
+
children: /* @__PURE__ */ jsx394("div", { className: "absolute bottom-4 md:bottom-6 right-4 md:right-6", children: /* @__PURE__ */ jsx394(
|
|
61439
61499
|
Button,
|
|
61440
61500
|
{
|
|
61441
61501
|
onClick: handleOpen,
|
|
61442
|
-
leftIcon: /* @__PURE__ */
|
|
61502
|
+
leftIcon: /* @__PURE__ */ jsx394(MingoIcon, { className: "h-5 w-5", color: "currentColor" }),
|
|
61443
61503
|
tabIndex: isOpen ? -1 : 0,
|
|
61444
61504
|
className: `shadow-lg !w-auto pointer-events-auto ${isOpen ? "!pointer-events-none" : ""}`,
|
|
61445
61505
|
children: "Ask AI"
|
|
@@ -62508,6 +62568,7 @@ export {
|
|
|
62508
62568
|
renderTicketAssigneeOption,
|
|
62509
62569
|
TakeOverTicketModal,
|
|
62510
62570
|
ReopenTicketModal,
|
|
62571
|
+
ReopenTicketRequestModal,
|
|
62511
62572
|
FilterPillRow,
|
|
62512
62573
|
MingoAiButton,
|
|
62513
62574
|
MOBILE_NAV_PANEL_ID,
|
|
@@ -62552,4 +62613,4 @@ export {
|
|
|
62552
62613
|
LogsList,
|
|
62553
62614
|
assets
|
|
62554
62615
|
};
|
|
62555
|
-
//# sourceMappingURL=chunk-
|
|
62616
|
+
//# sourceMappingURL=chunk-BYKPDIVC.js.map
|