@flamingo-stack/openframe-frontend-core 0.0.702-snapshot.20261005191338 → 0.0.702
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-NMGX2ZTU.js → chunk-2V4Z44G6.js} +5 -5
- package/dist/{chunk-RLDAYA2A.cjs → chunk-3G76LRGL.cjs} +9 -9
- package/dist/{chunk-GX3OUTFO.cjs → chunk-3WSFIV5G.cjs} +32 -32
- package/dist/{chunk-BOUPNYUV.js → chunk-446KS5BG.js} +2 -2
- package/dist/{chunk-QGTDWFT6.js → chunk-6JPQDYYY.js} +345 -419
- package/dist/{chunk-67CXGPTW.cjs → chunk-AEQANLBW.cjs} +24 -24
- package/dist/{chunk-NYSYSKSH.cjs → chunk-ASN65P3F.cjs} +9 -9
- package/dist/{chunk-S6V7A5FS.cjs → chunk-B3LZJ6J3.cjs} +12 -12
- package/dist/{chunk-SL2FOFT2.js → chunk-BO5ZHDA4.js} +4 -4
- package/dist/{chunk-RTXTGLGB.cjs → chunk-CXDJUKC6.cjs} +2 -2
- package/dist/{chunk-BMJUKS6S.cjs → chunk-CYYTD5ZK.cjs} +20 -20
- package/dist/{chunk-ENGBNKUJ.js → chunk-CZ34HXDW.js} +157 -12
- package/dist/{chunk-KFDP3DUL.cjs → chunk-E3DH543A.cjs} +44 -44
- package/dist/{chunk-7632TNE7.js → chunk-ETFFEA3J.js} +1 -1
- package/dist/{chunk-MXHJROXJ.cjs → chunk-FD4DBTFO.cjs} +475 -330
- package/dist/{chunk-BSEIEWM5.cjs → chunk-FHM7GD5B.cjs} +2 -2
- package/dist/{chunk-NU724ZVN.cjs → chunk-HIXGAY2L.cjs} +70 -70
- package/dist/{chunk-53AC23ZN.js → chunk-HPJ4XS2L.js} +4 -4
- package/dist/{chunk-2NE3DNXY.js → chunk-HYFLTFFB.js} +1 -1
- package/dist/{chunk-NCTYD7HL.js → chunk-IZKOQVXO.js} +2 -2
- package/dist/{chunk-J4K5JOLI.js → chunk-JOY6HVPV.js} +1 -1
- package/dist/{chunk-YBGEPKC2.cjs → chunk-L7KZA7ZD.cjs} +4 -4
- package/dist/{chunk-5VPIC5MD.cjs → chunk-LZNJH23A.cjs} +3 -3
- package/dist/{chunk-UTW4SQDI.js → chunk-MWUBBBWZ.js} +2 -2
- package/dist/{chunk-G55W76S6.js → chunk-PLK6GHN7.js} +1 -1
- package/dist/{chunk-HYLIQMZH.cjs → chunk-QFW3RUZS.cjs} +21 -21
- package/dist/{chunk-GZYLZ4MB.js → chunk-RS7HWAYX.js} +2 -2
- package/dist/{chunk-HY5YL3U5.cjs → chunk-RTGPIHVO.cjs} +173 -247
- package/dist/{chunk-PJP5SMOU.js → chunk-SAA7B3DA.js} +3 -3
- package/dist/{chunk-DAW6TDZB.js → chunk-UJJWTJ6S.js} +4 -4
- package/dist/{chunk-SFGXIFYO.cjs → chunk-YGRHITPY.cjs} +7 -7
- package/dist/{chunk-HHFPQNP3.js → chunk-Z5HDCZAS.js} +1 -1
- package/dist/components/case-studies/index.cjs +14 -14
- package/dist/components/case-studies/index.js +3 -3
- package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +2 -2
- package/dist/components/chat/index.js +1 -1
- package/dist/components/contact/index.cjs +4 -4
- package/dist/components/contact/index.js +3 -3
- package/dist/components/docs/index.cjs +7 -7
- package/dist/components/docs/index.js +6 -6
- package/dist/components/embeds/index.cjs +4 -4
- package/dist/components/embeds/index.js +3 -3
- package/dist/components/faq/index.cjs +4 -4
- package/dist/components/faq/index.js +3 -3
- package/dist/components/features/index.cjs +3 -3
- package/dist/components/features/index.js +2 -2
- package/dist/components/help-center-pages/index.cjs +71 -71
- package/dist/components/help-center-pages/index.js +14 -14
- package/dist/components/index.cjs +41 -41
- package/dist/components/index.js +13 -13
- package/dist/components/meeting-scheduler/index.cjs +25 -25
- package/dist/components/meeting-scheduler/index.js +2 -2
- package/dist/components/navigation/app-layout-drawer.d.ts.map +1 -1
- package/dist/components/navigation/index.cjs +6 -6
- package/dist/components/navigation/index.js +5 -5
- package/dist/components/onboarding-guides/index.cjs +6 -6
- package/dist/components/onboarding-guides/index.js +5 -5
- package/dist/components/tickets/index.cjs +7 -7
- package/dist/components/tickets/index.js +6 -6
- package/dist/components/ui/drawer.d.ts +3 -7
- package/dist/components/ui/drawer.d.ts.map +1 -1
- package/dist/components/ui/index.cjs +3 -3
- package/dist/components/ui/index.js +2 -2
- package/dist/index.cjs +7 -7
- package/dist/index.js +6 -6
- package/package.json +1 -1
- package/src/components/chat/embeddable-chat.tsx +9 -11
- package/src/components/navigation/app-layout-drawer.tsx +237 -14
- package/src/components/ui/drawer.tsx +188 -41
- package/dist/components/ui/panel-resize-handle.d.ts +0 -25
- package/dist/components/ui/panel-resize-handle.d.ts.map +0 -1
- package/dist/hooks/ui/use-resizable-panel-size.d.ts +0 -46
- package/dist/hooks/ui/use-resizable-panel-size.d.ts.map +0 -1
- package/src/components/ui/panel-resize-handle.tsx +0 -184
- package/src/hooks/ui/use-resizable-panel-size.ts +0 -114
|
@@ -24616,7 +24616,7 @@ import { VisuallyHidden } from "@radix-ui/react-visually-hidden";
|
|
|
24616
24616
|
import { usePreventScroll } from "@react-aria/overlays";
|
|
24617
24617
|
import { isIOS } from "@react-aria/utils";
|
|
24618
24618
|
import { MessageSquare as MessageSquare3 } from "lucide-react";
|
|
24619
|
-
import React9, { useCallback as useCallback28, useEffect as
|
|
24619
|
+
import React9, { useCallback as useCallback28, useEffect as useEffect38, useImperativeHandle as useImperativeHandle4, useMemo as useMemo30, useRef as useRef36, useState as useState48 } from "react";
|
|
24620
24620
|
|
|
24621
24621
|
// src/components/ui/drawer.tsx
|
|
24622
24622
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
@@ -24624,191 +24624,18 @@ import { cva } from "class-variance-authority";
|
|
|
24624
24624
|
import { X } from "lucide-react";
|
|
24625
24625
|
import {
|
|
24626
24626
|
forwardRef as forwardRef29,
|
|
24627
|
-
|
|
24628
|
-
|
|
24629
|
-
|
|
24630
|
-
|
|
24627
|
+
useCallback as useCallback25,
|
|
24628
|
+
useEffect as useEffect37,
|
|
24629
|
+
useRef as useRef33,
|
|
24630
|
+
useState as useState45
|
|
24631
24631
|
} from "react";
|
|
24632
|
-
|
|
24633
|
-
// src/hooks/ui/use-resizable-panel-size.ts
|
|
24634
|
-
import { useCallback as useCallback25, useMemo as useMemo29, useState as useState45 } from "react";
|
|
24635
|
-
var CHOSEN_SIZE_KEY_SUFFIX = ":chosen";
|
|
24636
|
-
function isStoredPanelSize(value) {
|
|
24637
|
-
if (typeof value !== "object" || value === null) return false;
|
|
24638
|
-
const { size } = value;
|
|
24639
|
-
return typeof size === "number" && Number.isFinite(size) && size > 0;
|
|
24640
|
-
}
|
|
24641
|
-
function useResizablePanelSize({
|
|
24642
|
-
enabled,
|
|
24643
|
-
minSize,
|
|
24644
|
-
maxSize,
|
|
24645
|
-
defaultSize,
|
|
24646
|
-
available,
|
|
24647
|
-
reserve,
|
|
24648
|
-
storageKey
|
|
24649
|
-
}) {
|
|
24650
|
-
const storage = useMemo29(
|
|
24651
|
-
() => enabled && storageKey ? createLocalStorageAdapter({
|
|
24652
|
-
key: `${storageKey}${CHOSEN_SIZE_KEY_SUFFIX}`,
|
|
24653
|
-
validate: isStoredPanelSize,
|
|
24654
|
-
logTag: `[panel-size:${storageKey}]`
|
|
24655
|
-
}) : null,
|
|
24656
|
-
[enabled, storageKey]
|
|
24657
|
-
);
|
|
24658
|
-
const [held, setChosen] = useState45(() => ({ storage, size: storage?.load()?.size ?? null }));
|
|
24659
|
-
const chosen = held.storage === storage ? held : { storage, size: storage?.load()?.size ?? null };
|
|
24660
|
-
if (chosen !== held) setChosen(chosen);
|
|
24661
|
-
const chosenSize = chosen.size;
|
|
24662
|
-
const clampSize = useCallback25(
|
|
24663
|
-
(value) => {
|
|
24664
|
-
const ceiling = available > 0 ? Math.min(maxSize, available - reserve) : maxSize;
|
|
24665
|
-
return clamp(value, minSize, Math.max(minSize, ceiling));
|
|
24666
|
-
},
|
|
24667
|
-
[available, reserve, minSize, maxSize]
|
|
24668
|
-
);
|
|
24669
|
-
const fallbackSize = typeof defaultSize === "function" ? defaultSize(available) : defaultSize;
|
|
24670
|
-
const size = enabled ? clampSize(chosenSize ?? fallbackSize) : fallbackSize;
|
|
24671
|
-
const setSize = useCallback25(
|
|
24672
|
-
(next) => {
|
|
24673
|
-
const nextSize = Math.round(clampSize(next));
|
|
24674
|
-
setChosen({ storage, size: nextSize });
|
|
24675
|
-
storage?.save({ size: nextSize });
|
|
24676
|
-
},
|
|
24677
|
-
[clampSize, storage]
|
|
24678
|
-
);
|
|
24679
|
-
return { size, setSize, clampSize };
|
|
24680
|
-
}
|
|
24681
|
-
|
|
24682
|
-
// src/components/ui/panel-resize-handle.tsx
|
|
24683
|
-
import { useEffect as useEffect37, useRef as useRef33 } from "react";
|
|
24684
|
-
import { jsx as jsx99 } from "react/jsx-runtime";
|
|
24685
|
-
var HORIZONTAL_SIDES = /* @__PURE__ */ new Set(["left", "right"]);
|
|
24686
|
-
function finishDrag(startRef, dragSizeRef, commit) {
|
|
24687
|
-
if (!startRef.current) return;
|
|
24688
|
-
startRef.current = null;
|
|
24689
|
-
if (dragSizeRef.current !== null) commit(dragSizeRef.current);
|
|
24690
|
-
dragSizeRef.current = null;
|
|
24691
|
-
document.body.style.cursor = "";
|
|
24692
|
-
document.body.style.userSelect = "";
|
|
24693
|
-
}
|
|
24694
|
-
function PanelResizeHandle({
|
|
24695
|
-
side,
|
|
24696
|
-
size,
|
|
24697
|
-
minSize,
|
|
24698
|
-
maxSize,
|
|
24699
|
-
onSize,
|
|
24700
|
-
clampSize,
|
|
24701
|
-
panelRef,
|
|
24702
|
-
variant,
|
|
24703
|
-
ariaLabel
|
|
24704
|
-
}) {
|
|
24705
|
-
const isHorizontal = HORIZONTAL_SIDES.has(side);
|
|
24706
|
-
const startRef = useRef33(null);
|
|
24707
|
-
const dragSizeRef = useRef33(null);
|
|
24708
|
-
const onSizeRef = useRef33(onSize);
|
|
24709
|
-
useEffect37(() => {
|
|
24710
|
-
onSizeRef.current = onSize;
|
|
24711
|
-
}, [onSize]);
|
|
24712
|
-
useEffect37(() => () => finishDrag(startRef, dragSizeRef, onSizeRef.current), []);
|
|
24713
|
-
const direction = side === "right" || side === "bottom" ? -1 : 1;
|
|
24714
|
-
const handlePointerDown = (e) => {
|
|
24715
|
-
if (e.button !== 0 && e.pointerType === "mouse") return;
|
|
24716
|
-
e.preventDefault();
|
|
24717
|
-
startRef.current = { x: e.clientX, y: e.clientY, size };
|
|
24718
|
-
e.currentTarget.setPointerCapture(e.pointerId);
|
|
24719
|
-
document.body.style.cursor = isHorizontal ? "col-resize" : "row-resize";
|
|
24720
|
-
document.body.style.userSelect = "none";
|
|
24721
|
-
};
|
|
24722
|
-
const handlePointerMove = (e) => {
|
|
24723
|
-
const start = startRef.current;
|
|
24724
|
-
const panel = panelRef.current;
|
|
24725
|
-
if (!start || !panel) return;
|
|
24726
|
-
const delta = isHorizontal ? e.clientX - start.x : e.clientY - start.y;
|
|
24727
|
-
const next = clampSize(start.size + delta * direction);
|
|
24728
|
-
dragSizeRef.current = next;
|
|
24729
|
-
panel.style[isHorizontal ? "width" : "height"] = `${next}px`;
|
|
24730
|
-
e.currentTarget.setAttribute("aria-valuenow", String(Math.round(next)));
|
|
24731
|
-
};
|
|
24732
|
-
const endDrag = (e) => {
|
|
24733
|
-
if (!startRef.current) return;
|
|
24734
|
-
finishDrag(startRef, dragSizeRef, onSize);
|
|
24735
|
-
try {
|
|
24736
|
-
e.currentTarget.releasePointerCapture(e.pointerId);
|
|
24737
|
-
} catch {
|
|
24738
|
-
}
|
|
24739
|
-
};
|
|
24740
|
-
const handleKeyDown = (e) => {
|
|
24741
|
-
const step = e.shiftKey ? 40 : 16;
|
|
24742
|
-
if (isHorizontal) {
|
|
24743
|
-
if (e.key === "ArrowLeft") {
|
|
24744
|
-
e.preventDefault();
|
|
24745
|
-
onSize(size + step * (side === "right" ? 1 : -1));
|
|
24746
|
-
} else if (e.key === "ArrowRight") {
|
|
24747
|
-
e.preventDefault();
|
|
24748
|
-
onSize(size + step * (side === "right" ? -1 : 1));
|
|
24749
|
-
}
|
|
24750
|
-
} else {
|
|
24751
|
-
if (e.key === "ArrowUp") {
|
|
24752
|
-
e.preventDefault();
|
|
24753
|
-
onSize(size + step * (side === "bottom" ? 1 : -1));
|
|
24754
|
-
} else if (e.key === "ArrowDown") {
|
|
24755
|
-
e.preventDefault();
|
|
24756
|
-
onSize(size + step * (side === "bottom" ? -1 : 1));
|
|
24757
|
-
}
|
|
24758
|
-
}
|
|
24759
|
-
if (e.key === "Home") {
|
|
24760
|
-
e.preventDefault();
|
|
24761
|
-
onSize(minSize);
|
|
24762
|
-
} else if (e.key === "End") {
|
|
24763
|
-
e.preventDefault();
|
|
24764
|
-
onSize(maxSize);
|
|
24765
|
-
}
|
|
24766
|
-
};
|
|
24767
|
-
const track = variant === "inLayout" ? { w: "w-6", h: "h-6" } : { w: "w-3", h: "h-3" };
|
|
24768
|
-
const trackPosition = side === "right" ? `right-full top-4 bottom-4 ${track.w} items-center justify-end pr-1` : side === "left" ? `left-full top-4 bottom-4 ${track.w} items-center justify-start pl-1` : side === "bottom" ? `bottom-full left-4 right-4 ${track.h} justify-center items-end pb-1` : `top-full left-4 right-4 ${track.h} justify-center items-start pt-1`;
|
|
24769
|
-
const cursorClass = isHorizontal ? "cursor-col-resize" : "cursor-row-resize";
|
|
24770
|
-
const gripClass = isHorizontal ? "h-10 w-1" : "w-10 h-1";
|
|
24771
|
-
return /* @__PURE__ */ jsx99(
|
|
24772
|
-
"div",
|
|
24773
|
-
{
|
|
24774
|
-
role: "separator",
|
|
24775
|
-
tabIndex: 0,
|
|
24776
|
-
"aria-orientation": isHorizontal ? "vertical" : "horizontal",
|
|
24777
|
-
"aria-valuenow": Math.round(size),
|
|
24778
|
-
"aria-valuemin": minSize,
|
|
24779
|
-
"aria-valuemax": maxSize,
|
|
24780
|
-
"aria-label": ariaLabel ?? (isHorizontal ? "Resize panel width" : "Resize panel height"),
|
|
24781
|
-
onPointerDown: handlePointerDown,
|
|
24782
|
-
onPointerMove: handlePointerMove,
|
|
24783
|
-
onPointerUp: endDrag,
|
|
24784
|
-
onPointerCancel: endDrag,
|
|
24785
|
-
onLostPointerCapture: endDrag,
|
|
24786
|
-
onKeyDown: handleKeyDown,
|
|
24787
|
-
className: cn(
|
|
24788
|
-
"group absolute z-20 flex touch-none select-none",
|
|
24789
|
-
"outline-none ring-0 focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0",
|
|
24790
|
-
trackPosition,
|
|
24791
|
-
cursorClass
|
|
24792
|
-
),
|
|
24793
|
-
children: /* @__PURE__ */ jsx99(
|
|
24794
|
-
"div",
|
|
24795
|
-
{
|
|
24796
|
-
"aria-hidden": true,
|
|
24797
|
-
className: cn("rounded-full", variant === "inLayout" ? "bg-ods-border" : "bg-ods-bg-surface", gripClass)
|
|
24798
|
-
}
|
|
24799
|
-
)
|
|
24800
|
-
}
|
|
24801
|
-
);
|
|
24802
|
-
}
|
|
24803
|
-
|
|
24804
|
-
// src/components/ui/drawer.tsx
|
|
24805
|
-
import { jsx as jsx100, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
24632
|
+
import { jsx as jsx99, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
24806
24633
|
var OVERLAY_BACKDROP_CLASS = "bg-ods-overlay";
|
|
24807
24634
|
var Drawer = DialogPrimitive.Root;
|
|
24808
24635
|
var DrawerTrigger = DialogPrimitive.Trigger;
|
|
24809
24636
|
var DrawerClose = DialogPrimitive.Close;
|
|
24810
24637
|
var DrawerPortal = DialogPrimitive.Portal;
|
|
24811
|
-
var DrawerOverlay = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */
|
|
24638
|
+
var DrawerOverlay = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */ jsx99(
|
|
24812
24639
|
DialogPrimitive.Overlay,
|
|
24813
24640
|
{
|
|
24814
24641
|
ref,
|
|
@@ -24900,19 +24727,132 @@ var drawerPanelVariants = cva(
|
|
|
24900
24727
|
}
|
|
24901
24728
|
}
|
|
24902
24729
|
);
|
|
24903
|
-
var
|
|
24904
|
-
|
|
24905
|
-
window
|
|
24906
|
-
return
|
|
24907
|
-
}
|
|
24908
|
-
|
|
24909
|
-
|
|
24910
|
-
|
|
24911
|
-
|
|
24912
|
-
|
|
24913
|
-
|
|
24914
|
-
|
|
24915
|
-
|
|
24730
|
+
var HORIZONTAL_SIDES = /* @__PURE__ */ new Set(["left", "right"]);
|
|
24731
|
+
function viewportSize(isHorizontal) {
|
|
24732
|
+
if (typeof window === "undefined") return 0;
|
|
24733
|
+
return isHorizontal ? window.innerWidth : window.innerHeight;
|
|
24734
|
+
}
|
|
24735
|
+
function useResizableSize({ enabled, isHorizontal, minSize, maxSize, defaultSize, storageKey }) {
|
|
24736
|
+
const clampToViewport = useCallback25(
|
|
24737
|
+
(value) => {
|
|
24738
|
+
const vp = viewportSize(isHorizontal);
|
|
24739
|
+
const effectiveMax = vp > 0 ? Math.min(maxSize, vp - 80) : maxSize;
|
|
24740
|
+
return clamp(value, minSize, Math.max(minSize, effectiveMax));
|
|
24741
|
+
},
|
|
24742
|
+
[isHorizontal, minSize, maxSize]
|
|
24743
|
+
);
|
|
24744
|
+
const readInitial = useCallback25(() => {
|
|
24745
|
+
if (!enabled) return defaultSize;
|
|
24746
|
+
if (typeof window === "undefined") return defaultSize;
|
|
24747
|
+
if (!storageKey) return clampToViewport(defaultSize);
|
|
24748
|
+
try {
|
|
24749
|
+
const raw = window.localStorage.getItem(storageKey);
|
|
24750
|
+
if (!raw) return clampToViewport(defaultSize);
|
|
24751
|
+
const parsed = parseFloat(raw);
|
|
24752
|
+
if (!Number.isFinite(parsed)) return clampToViewport(defaultSize);
|
|
24753
|
+
return clampToViewport(parsed);
|
|
24754
|
+
} catch {
|
|
24755
|
+
return clampToViewport(defaultSize);
|
|
24756
|
+
}
|
|
24757
|
+
}, [enabled, storageKey, defaultSize, clampToViewport]);
|
|
24758
|
+
const [size, setSizeRaw] = useState45(readInitial);
|
|
24759
|
+
const setSize = useCallback25((next) => setSizeRaw(clampToViewport(next)), [clampToViewport]);
|
|
24760
|
+
useEffect37(() => {
|
|
24761
|
+
if (!enabled || !storageKey || typeof window === "undefined") return;
|
|
24762
|
+
try {
|
|
24763
|
+
window.localStorage.setItem(storageKey, String(Math.round(size)));
|
|
24764
|
+
} catch {
|
|
24765
|
+
}
|
|
24766
|
+
}, [enabled, size, storageKey]);
|
|
24767
|
+
useEffect37(() => {
|
|
24768
|
+
if (!enabled || typeof window === "undefined") return void 0;
|
|
24769
|
+
const onResize = () => setSizeRaw((prev) => clampToViewport(prev));
|
|
24770
|
+
window.addEventListener("resize", onResize);
|
|
24771
|
+
return () => window.removeEventListener("resize", onResize);
|
|
24772
|
+
}, [enabled, clampToViewport]);
|
|
24773
|
+
return { size, setSize };
|
|
24774
|
+
}
|
|
24775
|
+
function DrawerResizeHandle({ side, size, minSize, maxSize, onSize, ariaLabel }) {
|
|
24776
|
+
const isHorizontal = HORIZONTAL_SIDES.has(side);
|
|
24777
|
+
const startRef = useRef33(null);
|
|
24778
|
+
const direction = side === "right" || side === "bottom" ? -1 : 1;
|
|
24779
|
+
const handlePointerDown = (e) => {
|
|
24780
|
+
if (e.button !== 0 && e.pointerType === "mouse") return;
|
|
24781
|
+
e.preventDefault();
|
|
24782
|
+
startRef.current = { x: e.clientX, y: e.clientY, size };
|
|
24783
|
+
e.currentTarget.setPointerCapture(e.pointerId);
|
|
24784
|
+
document.body.style.cursor = isHorizontal ? "col-resize" : "row-resize";
|
|
24785
|
+
document.body.style.userSelect = "none";
|
|
24786
|
+
};
|
|
24787
|
+
const handlePointerMove = (e) => {
|
|
24788
|
+
const start = startRef.current;
|
|
24789
|
+
if (!start) return;
|
|
24790
|
+
const delta = isHorizontal ? e.clientX - start.x : e.clientY - start.y;
|
|
24791
|
+
onSize(start.size + delta * direction);
|
|
24792
|
+
};
|
|
24793
|
+
const endDrag = (e) => {
|
|
24794
|
+
if (!startRef.current) return;
|
|
24795
|
+
startRef.current = null;
|
|
24796
|
+
try {
|
|
24797
|
+
e.currentTarget.releasePointerCapture(e.pointerId);
|
|
24798
|
+
} catch {
|
|
24799
|
+
}
|
|
24800
|
+
document.body.style.cursor = "";
|
|
24801
|
+
document.body.style.userSelect = "";
|
|
24802
|
+
};
|
|
24803
|
+
const handleKeyDown = (e) => {
|
|
24804
|
+
const step = e.shiftKey ? 40 : 16;
|
|
24805
|
+
if (isHorizontal) {
|
|
24806
|
+
if (e.key === "ArrowLeft") {
|
|
24807
|
+
e.preventDefault();
|
|
24808
|
+
onSize(size + step * (side === "right" ? 1 : -1));
|
|
24809
|
+
} else if (e.key === "ArrowRight") {
|
|
24810
|
+
e.preventDefault();
|
|
24811
|
+
onSize(size + step * (side === "right" ? -1 : 1));
|
|
24812
|
+
}
|
|
24813
|
+
} else {
|
|
24814
|
+
if (e.key === "ArrowUp") {
|
|
24815
|
+
e.preventDefault();
|
|
24816
|
+
onSize(size + step * (side === "bottom" ? 1 : -1));
|
|
24817
|
+
} else if (e.key === "ArrowDown") {
|
|
24818
|
+
e.preventDefault();
|
|
24819
|
+
onSize(size + step * (side === "bottom" ? -1 : 1));
|
|
24820
|
+
}
|
|
24821
|
+
}
|
|
24822
|
+
if (e.key === "Home") {
|
|
24823
|
+
e.preventDefault();
|
|
24824
|
+
onSize(minSize);
|
|
24825
|
+
} else if (e.key === "End") {
|
|
24826
|
+
e.preventDefault();
|
|
24827
|
+
onSize(maxSize);
|
|
24828
|
+
}
|
|
24829
|
+
};
|
|
24830
|
+
const trackPosition = side === "right" ? "right-full top-4 bottom-4 w-3 items-center justify-end pr-1" : side === "left" ? "left-full top-4 bottom-4 w-3 items-center justify-start pl-1" : side === "bottom" ? "bottom-full left-4 right-4 h-3 justify-center items-end pb-1" : "top-full left-4 right-4 h-3 justify-center items-start pt-1";
|
|
24831
|
+
const cursorClass = isHorizontal ? "cursor-col-resize" : "cursor-row-resize";
|
|
24832
|
+
const gripClass = isHorizontal ? "h-10 w-1" : "w-10 h-1";
|
|
24833
|
+
return /* @__PURE__ */ jsx99(
|
|
24834
|
+
"div",
|
|
24835
|
+
{
|
|
24836
|
+
role: "separator",
|
|
24837
|
+
tabIndex: 0,
|
|
24838
|
+
"aria-orientation": isHorizontal ? "vertical" : "horizontal",
|
|
24839
|
+
"aria-valuenow": Math.round(size),
|
|
24840
|
+
"aria-valuemin": minSize,
|
|
24841
|
+
"aria-valuemax": maxSize,
|
|
24842
|
+
"aria-label": ariaLabel ?? (isHorizontal ? "Resize panel width" : "Resize panel height"),
|
|
24843
|
+
onPointerDown: handlePointerDown,
|
|
24844
|
+
onPointerMove: handlePointerMove,
|
|
24845
|
+
onPointerUp: endDrag,
|
|
24846
|
+
onPointerCancel: endDrag,
|
|
24847
|
+
onKeyDown: handleKeyDown,
|
|
24848
|
+
className: cn(
|
|
24849
|
+
"group absolute z-20 flex touch-none select-none",
|
|
24850
|
+
"outline-none ring-0 focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0",
|
|
24851
|
+
trackPosition,
|
|
24852
|
+
cursorClass
|
|
24853
|
+
),
|
|
24854
|
+
children: /* @__PURE__ */ jsx99("div", { "aria-hidden": true, className: cn("rounded-full bg-ods-bg-surface", gripClass) })
|
|
24855
|
+
}
|
|
24916
24856
|
);
|
|
24917
24857
|
}
|
|
24918
24858
|
var DrawerContent = forwardRef29(
|
|
@@ -24937,10 +24877,11 @@ var DrawerContent = forwardRef29(
|
|
|
24937
24877
|
...props
|
|
24938
24878
|
}, ref) => {
|
|
24939
24879
|
const resolvedSide = side ?? "right";
|
|
24940
|
-
const isHorizontal =
|
|
24880
|
+
const isHorizontal = HORIZONTAL_SIDES.has(resolvedSide);
|
|
24881
|
+
const initialSize = defaultSize ?? (isHorizontal ? 560 : 480);
|
|
24941
24882
|
const headerHeight = useHeaderHeight();
|
|
24942
|
-
const [isMobile, setIsMobile] =
|
|
24943
|
-
|
|
24883
|
+
const [isMobile, setIsMobile] = useState45(false);
|
|
24884
|
+
useEffect37(() => {
|
|
24944
24885
|
if (typeof window === "undefined") return void 0;
|
|
24945
24886
|
const mq = window.matchMedia(`(max-width: ${mobileBreakpoint - 1}px)`);
|
|
24946
24887
|
const update = () => setIsMobile(mq.matches);
|
|
@@ -24948,25 +24889,18 @@ var DrawerContent = forwardRef29(
|
|
|
24948
24889
|
mq.addEventListener("change", update);
|
|
24949
24890
|
return () => mq.removeEventListener("change", update);
|
|
24950
24891
|
}, [mobileBreakpoint]);
|
|
24951
|
-
const
|
|
24952
|
-
const panelRef = useRef34(null);
|
|
24953
|
-
const {
|
|
24954
|
-
size: resizedSize,
|
|
24955
|
-
setSize,
|
|
24956
|
-
clampSize
|
|
24957
|
-
} = useResizablePanelSize({
|
|
24892
|
+
const { size: resizedSize, setSize } = useResizableSize({
|
|
24958
24893
|
enabled: resizable,
|
|
24894
|
+
isHorizontal,
|
|
24959
24895
|
minSize,
|
|
24960
24896
|
maxSize,
|
|
24961
|
-
defaultSize:
|
|
24962
|
-
available,
|
|
24963
|
-
reserve: 80,
|
|
24897
|
+
defaultSize: initialSize,
|
|
24964
24898
|
storageKey
|
|
24965
24899
|
});
|
|
24966
24900
|
const applyInlineSize = resizable && !isMobile;
|
|
24967
24901
|
const sizeStyle = applyInlineSize ? isHorizontal ? { width: resizedSize } : { height: resizedSize } : {};
|
|
24968
24902
|
return /* @__PURE__ */ jsxs75(DrawerPortal, { children: [
|
|
24969
|
-
/* @__PURE__ */
|
|
24903
|
+
/* @__PURE__ */ jsx99(DrawerOverlay, { className: overlayClassName }),
|
|
24970
24904
|
/* @__PURE__ */ jsxs75(
|
|
24971
24905
|
DialogPrimitive.Content,
|
|
24972
24906
|
{
|
|
@@ -24975,24 +24909,20 @@ var DrawerContent = forwardRef29(
|
|
|
24975
24909
|
style: { ...offsetHeader ? { top: headerHeight } : {}, ...style },
|
|
24976
24910
|
...props,
|
|
24977
24911
|
children: [
|
|
24978
|
-
applyInlineSize ? /* @__PURE__ */
|
|
24979
|
-
|
|
24912
|
+
applyInlineSize ? /* @__PURE__ */ jsx99(
|
|
24913
|
+
DrawerResizeHandle,
|
|
24980
24914
|
{
|
|
24981
|
-
variant: "overlay",
|
|
24982
24915
|
side: resolvedSide,
|
|
24983
24916
|
size: resizedSize,
|
|
24984
24917
|
minSize,
|
|
24985
24918
|
maxSize,
|
|
24986
24919
|
onSize: setSize,
|
|
24987
|
-
clampSize,
|
|
24988
|
-
panelRef,
|
|
24989
24920
|
ariaLabel: resizeAriaLabel
|
|
24990
24921
|
}
|
|
24991
24922
|
) : null,
|
|
24992
|
-
/* @__PURE__ */
|
|
24923
|
+
/* @__PURE__ */ jsx99(
|
|
24993
24924
|
"div",
|
|
24994
24925
|
{
|
|
24995
|
-
ref: panelRef,
|
|
24996
24926
|
className: cn(drawerPanelVariants({ side, flush, size }), className, panelClassName),
|
|
24997
24927
|
style: { ...sizeStyle, ...panelStyle },
|
|
24998
24928
|
children
|
|
@@ -25005,11 +24935,11 @@ var DrawerContent = forwardRef29(
|
|
|
25005
24935
|
}
|
|
25006
24936
|
);
|
|
25007
24937
|
DrawerContent.displayName = "DrawerContent";
|
|
25008
|
-
var DrawerHeader = ({ className, children, ...props }) => /* @__PURE__ */
|
|
24938
|
+
var DrawerHeader = ({ className, children, ...props }) => /* @__PURE__ */ jsx99("div", { className: cn("flex flex-col gap-4", className), ...props, children });
|
|
25009
24939
|
DrawerHeader.displayName = "DrawerHeader";
|
|
25010
24940
|
var DrawerTitle = forwardRef29(
|
|
25011
24941
|
({ className, children, actions, hideClose, ...props }, ref) => /* @__PURE__ */ jsxs75("div", { className: "flex items-start gap-4", children: [
|
|
25012
|
-
/* @__PURE__ */
|
|
24942
|
+
/* @__PURE__ */ jsx99(
|
|
25013
24943
|
DialogPrimitive.Title,
|
|
25014
24944
|
{
|
|
25015
24945
|
ref,
|
|
@@ -25020,13 +24950,13 @@ var DrawerTitle = forwardRef29(
|
|
|
25020
24950
|
),
|
|
25021
24951
|
actions,
|
|
25022
24952
|
!hideClose && /* @__PURE__ */ jsxs75(DialogPrimitive.Close, { className: "shrink-0 rounded-sm text-ods-text-secondary outline-none ring-0 transition-colors hover:text-ods-text-primary focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0", children: [
|
|
25023
|
-
/* @__PURE__ */
|
|
25024
|
-
/* @__PURE__ */
|
|
24953
|
+
/* @__PURE__ */ jsx99(X, { className: "size-6" }),
|
|
24954
|
+
/* @__PURE__ */ jsx99("span", { className: "sr-only", children: "Close" })
|
|
25025
24955
|
] })
|
|
25026
24956
|
] })
|
|
25027
24957
|
);
|
|
25028
24958
|
DrawerTitle.displayName = "DrawerTitle";
|
|
25029
|
-
var DrawerDescription = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */
|
|
24959
|
+
var DrawerDescription = forwardRef29(({ className, ...props }, ref) => /* @__PURE__ */ jsx99(
|
|
25030
24960
|
DialogPrimitive.Description,
|
|
25031
24961
|
{
|
|
25032
24962
|
ref,
|
|
@@ -25035,16 +24965,16 @@ var DrawerDescription = forwardRef29(({ className, ...props }, ref) => /* @__PUR
|
|
|
25035
24965
|
}
|
|
25036
24966
|
));
|
|
25037
24967
|
DrawerDescription.displayName = "DrawerDescription";
|
|
25038
|
-
var DrawerBody = ({ className, ...props }) => /* @__PURE__ */
|
|
24968
|
+
var DrawerBody = ({ className, ...props }) => /* @__PURE__ */ jsx99("div", { className: cn("flex flex-1 flex-col gap-4 overflow-y-auto", className), ...props });
|
|
25039
24969
|
DrawerBody.displayName = "DrawerBody";
|
|
25040
|
-
var DrawerFooter = ({ className, ...props }) => /* @__PURE__ */
|
|
24970
|
+
var DrawerFooter = ({ className, ...props }) => /* @__PURE__ */ jsx99("div", { className: cn("mt-auto flex flex-col gap-2", className), ...props });
|
|
25041
24971
|
DrawerFooter.displayName = "DrawerFooter";
|
|
25042
24972
|
|
|
25043
24973
|
// src/components/ui/hover-dropdown.tsx
|
|
25044
|
-
import { useState as
|
|
25045
|
-
import { Fragment as Fragment33, jsx as
|
|
24974
|
+
import { useState as useState46, useRef as useRef34, useCallback as useCallback26 } from "react";
|
|
24975
|
+
import { Fragment as Fragment33, jsx as jsx100, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
25046
24976
|
function DefaultAnchor({ href, className, children }) {
|
|
25047
|
-
return /* @__PURE__ */
|
|
24977
|
+
return /* @__PURE__ */ jsx100("a", { href, className, children });
|
|
25048
24978
|
}
|
|
25049
24979
|
function HoverDropdown({
|
|
25050
24980
|
children,
|
|
@@ -25054,10 +24984,10 @@ function HoverDropdown({
|
|
|
25054
24984
|
className,
|
|
25055
24985
|
renderAnchor
|
|
25056
24986
|
}) {
|
|
25057
|
-
const [open, setOpen] =
|
|
25058
|
-
const timeoutRef =
|
|
25059
|
-
const containerRef =
|
|
25060
|
-
const panelRef =
|
|
24987
|
+
const [open, setOpen] = useState46(false);
|
|
24988
|
+
const timeoutRef = useRef34(void 0);
|
|
24989
|
+
const containerRef = useRef34(null);
|
|
24990
|
+
const panelRef = useRef34(null);
|
|
25061
24991
|
useIsomorphicLayoutEffect(() => {
|
|
25062
24992
|
const el = panelRef.current;
|
|
25063
24993
|
const container = containerRef.current;
|
|
@@ -25097,24 +25027,24 @@ function HoverDropdown({
|
|
|
25097
25027
|
clearTimeout(timeoutRef.current);
|
|
25098
25028
|
setOpen((prev) => !prev);
|
|
25099
25029
|
}, []);
|
|
25100
|
-
if (items.length === 0) return /* @__PURE__ */
|
|
25030
|
+
if (items.length === 0) return /* @__PURE__ */ jsx100(Fragment33, { children });
|
|
25101
25031
|
const renderAnchorFn = renderAnchor ?? DefaultAnchor;
|
|
25102
25032
|
return /* @__PURE__ */ jsxs76("div", { ref: containerRef, className: "relative inline-flex", onMouseEnter: show, onMouseLeave: hide, onClick: toggle, children: [
|
|
25103
25033
|
children,
|
|
25104
|
-
open && /* @__PURE__ */
|
|
25034
|
+
open && /* @__PURE__ */ jsx100(
|
|
25105
25035
|
"div",
|
|
25106
25036
|
{
|
|
25107
25037
|
className: `fixed z-[9999] max-h-[420px] min-w-[220px] max-w-[340px] overflow-y-auto rounded-lg border border-ods-border bg-ods-card p-1 shadow-xl ${className || ""}`,
|
|
25108
25038
|
ref: panelRef,
|
|
25109
25039
|
children: items.map((item, i) => {
|
|
25110
25040
|
const content = /* @__PURE__ */ jsxs76(Fragment33, { children: [
|
|
25111
|
-
item.icon && /* @__PURE__ */
|
|
25112
|
-
/* @__PURE__ */
|
|
25041
|
+
item.icon && /* @__PURE__ */ jsx100("span", { className: "flex-shrink-0 [&_svg]:size-3.5", children: item.icon }),
|
|
25042
|
+
/* @__PURE__ */ jsx100("span", { className: "min-w-0 flex-1 truncate", children: item.label })
|
|
25113
25043
|
] });
|
|
25114
25044
|
const rowClass = "group flex w-full items-center gap-1.5 pl-2 pr-1 py-1.5 rounded text-h6 text-ods-text-secondary hover:bg-ods-accent/10 transition-colors text-left";
|
|
25115
25045
|
const primaryClass = "flex flex-1 items-center gap-1.5 min-w-0 hover:text-ods-accent cursor-pointer no-underline";
|
|
25116
25046
|
const secondaryAction = item.secondaryAction;
|
|
25117
|
-
const secondary = secondaryAction ? /* @__PURE__ */
|
|
25047
|
+
const secondary = secondaryAction ? /* @__PURE__ */ jsx100(
|
|
25118
25048
|
"button",
|
|
25119
25049
|
{
|
|
25120
25050
|
onClick: (e) => {
|
|
@@ -25143,12 +25073,12 @@ function HoverDropdown({
|
|
|
25143
25073
|
}
|
|
25144
25074
|
if (!item.onClick) {
|
|
25145
25075
|
return /* @__PURE__ */ jsxs76("div", { className: rowClass, children: [
|
|
25146
|
-
/* @__PURE__ */
|
|
25076
|
+
/* @__PURE__ */ jsx100("span", { className: `${primaryClass} cursor-default hover:!text-ods-text-secondary`, children: content }),
|
|
25147
25077
|
secondary
|
|
25148
25078
|
] }, i);
|
|
25149
25079
|
}
|
|
25150
25080
|
return /* @__PURE__ */ jsxs76("div", { className: rowClass, children: [
|
|
25151
|
-
/* @__PURE__ */
|
|
25081
|
+
/* @__PURE__ */ jsx100("button", { onClick: item.onClick, className: primaryClass, children: content }),
|
|
25152
25082
|
secondary
|
|
25153
25083
|
] }, i);
|
|
25154
25084
|
})
|
|
@@ -25158,7 +25088,7 @@ function HoverDropdown({
|
|
|
25158
25088
|
}
|
|
25159
25089
|
|
|
25160
25090
|
// src/components/chat/hooks/use-chat-dialog-manager.ts
|
|
25161
|
-
import { useCallback as useCallback27, useMemo as
|
|
25091
|
+
import { useCallback as useCallback27, useMemo as useMemo29, useRef as useRef35, useState as useState47 } from "react";
|
|
25162
25092
|
function useChatDialogManager({
|
|
25163
25093
|
dialogs,
|
|
25164
25094
|
activeDialogId,
|
|
@@ -25169,8 +25099,8 @@ function useChatDialogManager({
|
|
|
25169
25099
|
fetchArchivedDialogs,
|
|
25170
25100
|
unarchiveDialog
|
|
25171
25101
|
}) {
|
|
25172
|
-
const [renameTarget, setRenameTarget] =
|
|
25173
|
-
const [archiveTarget, setArchiveTarget] =
|
|
25102
|
+
const [renameTarget, setRenameTarget] = useState47(null);
|
|
25103
|
+
const [archiveTarget, setArchiveTarget] = useState47(null);
|
|
25174
25104
|
const handleConfirmRename = useCallback27(
|
|
25175
25105
|
(name) => {
|
|
25176
25106
|
if (renameTarget) void renameDialog(renameTarget.id, name);
|
|
@@ -25178,7 +25108,7 @@ function useChatDialogManager({
|
|
|
25178
25108
|
},
|
|
25179
25109
|
[renameTarget, renameDialog]
|
|
25180
25110
|
);
|
|
25181
|
-
const [openingDialogId, setOpeningDialogId] =
|
|
25111
|
+
const [openingDialogId, setOpeningDialogId] = useState47(null);
|
|
25182
25112
|
const handleConfirmArchive = useCallback27(async () => {
|
|
25183
25113
|
if (archiveTarget) {
|
|
25184
25114
|
try {
|
|
@@ -25194,12 +25124,12 @@ function useChatDialogManager({
|
|
|
25194
25124
|
}
|
|
25195
25125
|
setArchiveTarget(null);
|
|
25196
25126
|
}, [archiveTarget, archiveDialog, activeDialogId, clearMessages]);
|
|
25197
|
-
const [archiveOpen, setArchiveOpen] =
|
|
25198
|
-
const [archivedDialogs, setArchivedDialogs] =
|
|
25199
|
-
const [archivedCursor, setArchivedCursor] =
|
|
25200
|
-
const [archivedLoading, setArchivedLoading] =
|
|
25201
|
-
const [archivedPending, setArchivedPending] =
|
|
25202
|
-
const archivedRequestIdRef =
|
|
25127
|
+
const [archiveOpen, setArchiveOpen] = useState47(false);
|
|
25128
|
+
const [archivedDialogs, setArchivedDialogs] = useState47([]);
|
|
25129
|
+
const [archivedCursor, setArchivedCursor] = useState47(null);
|
|
25130
|
+
const [archivedLoading, setArchivedLoading] = useState47(false);
|
|
25131
|
+
const [archivedPending, setArchivedPending] = useState47(false);
|
|
25132
|
+
const archivedRequestIdRef = useRef35(0);
|
|
25203
25133
|
const loadArchivedPage = useCallback27(
|
|
25204
25134
|
async (cursor) => {
|
|
25205
25135
|
if (!fetchArchivedDialogs) return;
|
|
@@ -25238,7 +25168,7 @@ function useChatDialogManager({
|
|
|
25238
25168
|
void loadArchivedPage();
|
|
25239
25169
|
}, [loadArchivedPage]);
|
|
25240
25170
|
const closeArchive = useCallback27(() => setArchiveOpen(false), []);
|
|
25241
|
-
const [viewingArchivedId, setViewingArchivedId] =
|
|
25171
|
+
const [viewingArchivedId, setViewingArchivedId] = useState47(null);
|
|
25242
25172
|
const handleSelectDialog = useCallback27(
|
|
25243
25173
|
(id) => {
|
|
25244
25174
|
setViewingArchivedId(null);
|
|
@@ -25257,7 +25187,7 @@ function useChatDialogManager({
|
|
|
25257
25187
|
},
|
|
25258
25188
|
[selectDialog]
|
|
25259
25189
|
);
|
|
25260
|
-
const [restoreTarget, setRestoreTarget] =
|
|
25190
|
+
const [restoreTarget, setRestoreTarget] = useState47(null);
|
|
25261
25191
|
const handleConfirmRestore = useCallback27(async () => {
|
|
25262
25192
|
if (restoreTarget) {
|
|
25263
25193
|
try {
|
|
@@ -25287,7 +25217,7 @@ function useChatDialogManager({
|
|
|
25287
25217
|
clearMessages();
|
|
25288
25218
|
setArchiveOpen(false);
|
|
25289
25219
|
}, [selectDialog, clearMessages]);
|
|
25290
|
-
const activeDialog =
|
|
25220
|
+
const activeDialog = useMemo29(
|
|
25291
25221
|
() => dialogs.find((d) => d.id === activeDialogId) ?? archivedDialogs.find((d) => d.id === activeDialogId),
|
|
25292
25222
|
[dialogs, archivedDialogs, activeDialogId]
|
|
25293
25223
|
);
|
|
@@ -25391,7 +25321,7 @@ function pruneTimestampCache(timestampCache, liveIds) {
|
|
|
25391
25321
|
}
|
|
25392
25322
|
|
|
25393
25323
|
// src/components/chat/embeddable-chat.tsx
|
|
25394
|
-
import { Fragment as Fragment34, jsx as
|
|
25324
|
+
import { Fragment as Fragment34, jsx as jsx101, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
25395
25325
|
var HISTORY_RAIL_WIDTH = 320;
|
|
25396
25326
|
var CHAT_BLOCK_MIN_WIDTH = 400;
|
|
25397
25327
|
var SPLIT_MIN_WIDTH = HISTORY_RAIL_WIDTH + CHAT_BLOCK_MIN_WIDTH;
|
|
@@ -25399,14 +25329,12 @@ var DRAWER_DEFAULT_WIDTH_RATIO = 0.5;
|
|
|
25399
25329
|
var DRAWER_WIDTH_KEY = "mingo-chat-width-v4";
|
|
25400
25330
|
var DRAWER_DEFAULT_WIDTH_PX = 750;
|
|
25401
25331
|
var SPLIT_DEFAULT_WIDTH_ALLOWANCE = 16;
|
|
25402
|
-
function drawerDefaultWidth(
|
|
25403
|
-
if (
|
|
25404
|
-
const ratioWidth = Math.round(
|
|
25332
|
+
function drawerDefaultWidth(withHistoryRail) {
|
|
25333
|
+
if (typeof window === "undefined") return DRAWER_DEFAULT_WIDTH_PX;
|
|
25334
|
+
const ratioWidth = Math.round(window.innerWidth * DRAWER_DEFAULT_WIDTH_RATIO);
|
|
25405
25335
|
if (!withHistoryRail) return ratioWidth;
|
|
25406
25336
|
return Math.max(ratioWidth, SPLIT_MIN_WIDTH + SPLIT_DEFAULT_WIDTH_ALLOWANCE);
|
|
25407
25337
|
}
|
|
25408
|
-
var drawerDefaultWidthWithRail = (viewportWidth) => drawerDefaultWidth(viewportWidth, true);
|
|
25409
|
-
var drawerDefaultWidthWithoutRail = (viewportWidth) => drawerDefaultWidth(viewportWidth, false);
|
|
25410
25338
|
var formatRelativePath = (p) => p.replace(/^\/+/, "").replace(/\/+$/, "");
|
|
25411
25339
|
var mentionTokenOf = (key, markerByType) => {
|
|
25412
25340
|
const ci = key.indexOf(":");
|
|
@@ -25418,11 +25346,11 @@ var RAIL_COLLAPSED_STORAGE_KEY = "mingo-chat-history-collapsed";
|
|
|
25418
25346
|
var NO_CONTEXT_ITEMS = [];
|
|
25419
25347
|
var RAIL_ANIM_MS = 320;
|
|
25420
25348
|
function useRailPresence(open) {
|
|
25421
|
-
const [mounted, setMounted] =
|
|
25422
|
-
const [active, setActive] =
|
|
25349
|
+
const [mounted, setMounted] = useState48(open);
|
|
25350
|
+
const [active, setActive] = useState48(false);
|
|
25423
25351
|
if (open && !mounted) setMounted(true);
|
|
25424
25352
|
if (!open && active) setActive(false);
|
|
25425
|
-
|
|
25353
|
+
useEffect38(() => {
|
|
25426
25354
|
if (open) {
|
|
25427
25355
|
let raf2 = 0;
|
|
25428
25356
|
const raf1 = requestAnimationFrame(() => {
|
|
@@ -25444,7 +25372,7 @@ function RailSlot({
|
|
|
25444
25372
|
innerClassName,
|
|
25445
25373
|
children
|
|
25446
25374
|
}) {
|
|
25447
|
-
return /* @__PURE__ */
|
|
25375
|
+
return /* @__PURE__ */ jsx101(
|
|
25448
25376
|
"div",
|
|
25449
25377
|
{
|
|
25450
25378
|
className: cn(
|
|
@@ -25453,7 +25381,7 @@ function RailSlot({
|
|
|
25453
25381
|
"shrink-0 overflow-hidden border-r border-ods-border transition-[width,opacity] ease-out",
|
|
25454
25382
|
active ? "duration-[240ms] w-80 opacity-100" : "duration-[300ms] w-0 opacity-0"
|
|
25455
25383
|
),
|
|
25456
|
-
children: /* @__PURE__ */
|
|
25384
|
+
children: /* @__PURE__ */ jsx101("div", { className: cn("h-full w-80", innerClassName), children })
|
|
25457
25385
|
}
|
|
25458
25386
|
);
|
|
25459
25387
|
}
|
|
@@ -25510,7 +25438,7 @@ function SourceChip({
|
|
|
25510
25438
|
sourceRowCtxFromRuntime(runtime, { baseRoute, chipBasePlatform })
|
|
25511
25439
|
);
|
|
25512
25440
|
const Icon = cta.icon;
|
|
25513
|
-
const icon = /* @__PURE__ */
|
|
25441
|
+
const icon = /* @__PURE__ */ jsx101(Icon, { className: "h-3.5 w-3.5" });
|
|
25514
25442
|
const chipClass = chatChipClass({ tone: "secondary" });
|
|
25515
25443
|
const decideTab = (href, targetPlatform) => computeIsNewTab(runtime, href, targetPlatform);
|
|
25516
25444
|
if (src.items && src.items.length > 0) {
|
|
@@ -25533,12 +25461,12 @@ function SourceChip({
|
|
|
25533
25461
|
// A client-built group keeps each row's own citation number, so the
|
|
25534
25462
|
// `[3]` in the answer is findable inside the dropdown.
|
|
25535
25463
|
label: item.index === void 0 ? item.name : `[${item.index}] ${item.name}`,
|
|
25536
|
-
icon: /* @__PURE__ */
|
|
25464
|
+
icon: /* @__PURE__ */ jsx101(ItemIcon, { className: "h-3.5 w-3.5" }),
|
|
25537
25465
|
href: itemCta.href ?? void 0,
|
|
25538
25466
|
targetPlatform: itemCta.targetPlatform,
|
|
25539
25467
|
path: item.path ?? null,
|
|
25540
25468
|
secondaryAction: onDiscuss && itemCta.askable && itemChatRef ? {
|
|
25541
|
-
icon: /* @__PURE__ */
|
|
25469
|
+
icon: /* @__PURE__ */ jsx101(MessageSquare3, {}),
|
|
25542
25470
|
label: `Ask about ${item.name}`,
|
|
25543
25471
|
onClick: () => onDiscuss(itemChatRef)
|
|
25544
25472
|
} : void 0
|
|
@@ -25546,11 +25474,11 @@ function SourceChip({
|
|
|
25546
25474
|
});
|
|
25547
25475
|
const itemIndices = src.items.flatMap((item) => item.index === void 0 ? [] : [item.index]);
|
|
25548
25476
|
const groupIndices = itemIndices.length > 0 ? formatCitationIndices(itemIndices) : `${src.index}`;
|
|
25549
|
-
return /* @__PURE__ */
|
|
25477
|
+
return /* @__PURE__ */ jsx101(
|
|
25550
25478
|
HoverDropdown,
|
|
25551
25479
|
{
|
|
25552
25480
|
items: dropdownItems,
|
|
25553
|
-
renderAnchor: ({ href, targetPlatform, path, className, children }) => /* @__PURE__ */
|
|
25481
|
+
renderAnchor: ({ href, targetPlatform, path, className, children }) => /* @__PURE__ */ jsx101(
|
|
25554
25482
|
NavLinkAnchorViaRuntime,
|
|
25555
25483
|
{
|
|
25556
25484
|
href,
|
|
@@ -25584,7 +25512,7 @@ function SourceChip({
|
|
|
25584
25512
|
] });
|
|
25585
25513
|
const wrapChip = (clickable) => /* @__PURE__ */ jsxs77("span", { className: "inline-flex items-center", children: [
|
|
25586
25514
|
clickable,
|
|
25587
|
-
/* @__PURE__ */
|
|
25515
|
+
/* @__PURE__ */ jsx101(SourceActionButton, { chatRef: cta.chatRef, onDiscuss, density: "inline", className: "-mr-1 ml-1" })
|
|
25588
25516
|
] });
|
|
25589
25517
|
const buildClickHandler = (href, path, targetPlatform, isNewTab) => (e) => {
|
|
25590
25518
|
const handled = executeNavigation({
|
|
@@ -25601,7 +25529,7 @@ function SourceChip({
|
|
|
25601
25529
|
const resolvedHref = resolveHrefForRuntime(cta.href, runtime);
|
|
25602
25530
|
const isNewTab = decideTab(resolvedHref, cta.targetPlatform ?? null);
|
|
25603
25531
|
return wrapChip(
|
|
25604
|
-
/* @__PURE__ */
|
|
25532
|
+
/* @__PURE__ */ jsx101(
|
|
25605
25533
|
"a",
|
|
25606
25534
|
{
|
|
25607
25535
|
href: resolvedHref,
|
|
@@ -25617,7 +25545,7 @@ function SourceChip({
|
|
|
25617
25545
|
const resolvedHref = resolveHrefForRuntime(cta.href, runtime);
|
|
25618
25546
|
const isNewTab = decideTab(resolvedHref, cta.targetPlatform ?? null);
|
|
25619
25547
|
return wrapChip(
|
|
25620
|
-
/* @__PURE__ */
|
|
25548
|
+
/* @__PURE__ */ jsx101(
|
|
25621
25549
|
"a",
|
|
25622
25550
|
{
|
|
25623
25551
|
href: resolvedHref,
|
|
@@ -25631,7 +25559,7 @@ function SourceChip({
|
|
|
25631
25559
|
);
|
|
25632
25560
|
}
|
|
25633
25561
|
return wrapChip(
|
|
25634
|
-
/* @__PURE__ */
|
|
25562
|
+
/* @__PURE__ */ jsx101("span", { className: `${chipClass} cursor-default`, title: displayName, children: chipBody(displayName) })
|
|
25635
25563
|
);
|
|
25636
25564
|
}
|
|
25637
25565
|
function SourceChips({
|
|
@@ -25642,13 +25570,13 @@ function SourceChips({
|
|
|
25642
25570
|
onClose,
|
|
25643
25571
|
onDiscuss
|
|
25644
25572
|
}) {
|
|
25645
|
-
const [expanded, setExpanded] =
|
|
25573
|
+
const [expanded, setExpanded] = useState48(false);
|
|
25646
25574
|
if (cited.length === 0) {
|
|
25647
25575
|
const fallback = uncited.slice(0, FALLBACK_TOP_RETRIEVED);
|
|
25648
25576
|
if (fallback.length === 0) return null;
|
|
25649
25577
|
return /* @__PURE__ */ jsxs77("div", { className: "mt-2 flex flex-col gap-1.5 border-t border-ods-border pt-2", children: [
|
|
25650
|
-
/* @__PURE__ */
|
|
25651
|
-
/* @__PURE__ */
|
|
25578
|
+
/* @__PURE__ */ jsx101("span", { className: "uppercase text-ods-text-muted text-h6", children: "Top retrieved sources" }),
|
|
25579
|
+
/* @__PURE__ */ jsx101("div", { className: "flex flex-wrap gap-1.5", children: fallback.map((src) => /* @__PURE__ */ jsx101(
|
|
25652
25580
|
SourceChip,
|
|
25653
25581
|
{
|
|
25654
25582
|
src,
|
|
@@ -25664,9 +25592,9 @@ function SourceChips({
|
|
|
25664
25592
|
const hiddenCount = uncited.length;
|
|
25665
25593
|
const hasOverflow = hiddenCount > 0;
|
|
25666
25594
|
return /* @__PURE__ */ jsxs77("div", { className: "mt-2 flex flex-col gap-1.5 border-t border-ods-border pt-2", children: [
|
|
25667
|
-
/* @__PURE__ */
|
|
25595
|
+
/* @__PURE__ */ jsx101("span", { className: "uppercase text-ods-text-muted text-h6", children: "Sources" }),
|
|
25668
25596
|
/* @__PURE__ */ jsxs77("div", { className: `flex flex-wrap gap-1.5 ${expanded ? "max-h-[200px] overflow-y-auto overscroll-contain" : ""}`, children: [
|
|
25669
|
-
cited.map((src) => /* @__PURE__ */
|
|
25597
|
+
cited.map((src) => /* @__PURE__ */ jsx101(
|
|
25670
25598
|
SourceChip,
|
|
25671
25599
|
{
|
|
25672
25600
|
src,
|
|
@@ -25677,7 +25605,7 @@ function SourceChips({
|
|
|
25677
25605
|
},
|
|
25678
25606
|
src.index
|
|
25679
25607
|
)),
|
|
25680
|
-
expanded && uncited.map((src) => /* @__PURE__ */
|
|
25608
|
+
expanded && uncited.map((src) => /* @__PURE__ */ jsx101(
|
|
25681
25609
|
SourceChip,
|
|
25682
25610
|
{
|
|
25683
25611
|
src,
|
|
@@ -25688,7 +25616,7 @@ function SourceChips({
|
|
|
25688
25616
|
},
|
|
25689
25617
|
src.index
|
|
25690
25618
|
)),
|
|
25691
|
-
hasOverflow && /* @__PURE__ */
|
|
25619
|
+
hasOverflow && /* @__PURE__ */ jsx101(
|
|
25692
25620
|
"button",
|
|
25693
25621
|
{
|
|
25694
25622
|
onClick: () => setExpanded(!expanded),
|
|
@@ -25703,7 +25631,7 @@ function SourceChips({
|
|
|
25703
25631
|
}
|
|
25704
25632
|
var EmbeddableChat = React9.forwardRef(
|
|
25705
25633
|
function EmbeddableChatImpl(props, ref) {
|
|
25706
|
-
return /* @__PURE__ */
|
|
25634
|
+
return /* @__PURE__ */ jsx101(EmbeddableChatInner, { ...props, handleRef: ref });
|
|
25707
25635
|
}
|
|
25708
25636
|
);
|
|
25709
25637
|
EmbeddableChat.displayName = "EmbeddableChat";
|
|
@@ -25750,7 +25678,7 @@ function EmbeddableChatInner({
|
|
|
25750
25678
|
const commandsUrl = runtime.endpoints.commandsUrl;
|
|
25751
25679
|
const { attachmentsEnabled, user: identityUser } = useChatIdentity();
|
|
25752
25680
|
const viewUrlPrefix = runtime.endpoints.attachmentViewUrlPrefix;
|
|
25753
|
-
|
|
25681
|
+
useEffect38(() => {
|
|
25754
25682
|
if (process.env.NODE_ENV !== "production") {
|
|
25755
25683
|
const hasOpen = open !== void 0;
|
|
25756
25684
|
const hasHandler = onOpenChange !== void 0;
|
|
@@ -25766,13 +25694,13 @@ function EmbeddableChatInner({
|
|
|
25766
25694
|
defaultProp: defaultOpen ?? false,
|
|
25767
25695
|
onChange: onOpenChange
|
|
25768
25696
|
});
|
|
25769
|
-
const [autoFocusInput] =
|
|
25697
|
+
const [autoFocusInput] = useState48(() => {
|
|
25770
25698
|
if (typeof window === "undefined") return false;
|
|
25771
25699
|
return !window.matchMedia("(pointer: coarse)").matches;
|
|
25772
25700
|
});
|
|
25773
25701
|
usePreventScroll({ isDisabled: !isOpen || shellLess });
|
|
25774
|
-
const navigatingAwayRef =
|
|
25775
|
-
|
|
25702
|
+
const navigatingAwayRef = useRef36(false);
|
|
25703
|
+
useEffect38(() => {
|
|
25776
25704
|
if (!isOpen) return void 0;
|
|
25777
25705
|
if (shellLess) return void 0;
|
|
25778
25706
|
if (typeof window === "undefined") return void 0;
|
|
@@ -25798,9 +25726,9 @@ function EmbeddableChatInner({
|
|
|
25798
25726
|
window.scrollTo(0, scrollY);
|
|
25799
25727
|
};
|
|
25800
25728
|
}, [isOpen, shellLess]);
|
|
25801
|
-
const chatInputRef =
|
|
25802
|
-
const [quickActionPreview, setQuickActionPreview] =
|
|
25803
|
-
const slashCommandsProp =
|
|
25729
|
+
const chatInputRef = useRef36(null);
|
|
25730
|
+
const [quickActionPreview, setQuickActionPreview] = useState48(null);
|
|
25731
|
+
const slashCommandsProp = useMemo30(
|
|
25804
25732
|
() => ({
|
|
25805
25733
|
fetchCommands: (prefix, signal) => fetchSlashCommands(prefix, signal, commandsUrl),
|
|
25806
25734
|
resolveSourceIcon: (sourceId) => {
|
|
@@ -25815,14 +25743,14 @@ function EmbeddableChatInner({
|
|
|
25815
25743
|
[commandsUrl]
|
|
25816
25744
|
);
|
|
25817
25745
|
const headerUserName = identityUser?.name?.trim() || [identityUser?.firstName, identityUser?.lastName].filter(Boolean).join(" ").trim() || userDisplayName?.trim() || void 0;
|
|
25818
|
-
const effectiveModes =
|
|
25746
|
+
const effectiveModes = useMemo30(() => {
|
|
25819
25747
|
if (modes) return modes;
|
|
25820
25748
|
const guideOptions = tableIdForDocumentType ? { tableIdForDocumentType } : {};
|
|
25821
25749
|
return { guide: guideOptions };
|
|
25822
25750
|
}, [modes, tableIdForDocumentType]);
|
|
25823
25751
|
const hasMingoMode = !!effectiveModes.mingo || !!mingoState;
|
|
25824
25752
|
const initialActiveMode = controlledActiveMode ?? defaultActiveMode ?? (effectiveModes.guide ? "guide" : "mingo");
|
|
25825
|
-
const [uncontrolledActiveMode, setUncontrolledActiveMode] =
|
|
25753
|
+
const [uncontrolledActiveMode, setUncontrolledActiveMode] = useState48(initialActiveMode);
|
|
25826
25754
|
const activeMode = controlledActiveMode ?? uncontrolledActiveMode;
|
|
25827
25755
|
const handleActiveModeChange = useCallback28(
|
|
25828
25756
|
(next) => {
|
|
@@ -25836,7 +25764,7 @@ function EmbeddableChatInner({
|
|
|
25836
25764
|
const { commands: commandsList, loaded: commandsLoaded } = useSlashCommandRegistry(commandsUrl, {
|
|
25837
25765
|
enabled: activeMode === "guide"
|
|
25838
25766
|
});
|
|
25839
|
-
const commandsById =
|
|
25767
|
+
const commandsById = useMemo30(() => {
|
|
25840
25768
|
const map = /* @__PURE__ */ new Map();
|
|
25841
25769
|
for (const cmd of commandsList) map.set(cmd.id, cmd);
|
|
25842
25770
|
return map;
|
|
@@ -25850,7 +25778,7 @@ function EmbeddableChatInner({
|
|
|
25850
25778
|
const effectiveGreeting = emptyStateConfig.greeting ?? emptyStateGreeting;
|
|
25851
25779
|
const effectiveEnabledRagTableIds = emptyStateUrl ? emptyStateConfig.enabledRagTableIds : enabledRagTableIds;
|
|
25852
25780
|
const effectiveSuggestedQueries = emptyStateUrl ? emptyStateConfig.suggestedQueries : suggestedQueries;
|
|
25853
|
-
const effectiveQuickActions =
|
|
25781
|
+
const effectiveQuickActions = useMemo30(
|
|
25854
25782
|
() => emptyStateUrl ? emptyStateConfig.quickActions : [],
|
|
25855
25783
|
[emptyStateUrl, emptyStateConfig.quickActions]
|
|
25856
25784
|
);
|
|
@@ -25897,7 +25825,7 @@ function EmbeddableChatInner({
|
|
|
25897
25825
|
injectedDialogCapabilities: mingoDialogCapabilities
|
|
25898
25826
|
});
|
|
25899
25827
|
const historyListMode = dialogCapabilities !== void 0;
|
|
25900
|
-
const [namingNewChat, setNamingNewChat] =
|
|
25828
|
+
const [namingNewChat, setNamingNewChat] = useState48(false);
|
|
25901
25829
|
const sendMessage = useCallback28(
|
|
25902
25830
|
async (text2, options) => {
|
|
25903
25831
|
if (activeDialogId == null) setNamingNewChat(true);
|
|
@@ -25909,7 +25837,7 @@ function EmbeddableChatInner({
|
|
|
25909
25837
|
},
|
|
25910
25838
|
[activeDialogId, sendMessageRaw]
|
|
25911
25839
|
);
|
|
25912
|
-
const mingoCaps =
|
|
25840
|
+
const mingoCaps = useMemo30(
|
|
25913
25841
|
() => ({
|
|
25914
25842
|
...dialogCapabilities,
|
|
25915
25843
|
canRename: dialogCapabilities?.canRename ?? false,
|
|
@@ -25917,8 +25845,8 @@ function EmbeddableChatInner({
|
|
|
25917
25845
|
}),
|
|
25918
25846
|
[dialogCapabilities]
|
|
25919
25847
|
);
|
|
25920
|
-
const guidePromptSentRef =
|
|
25921
|
-
|
|
25848
|
+
const guidePromptSentRef = useRef36(false);
|
|
25849
|
+
useEffect38(() => {
|
|
25922
25850
|
if (!guidePendingPrompt) {
|
|
25923
25851
|
guidePromptSentRef.current = false;
|
|
25924
25852
|
return;
|
|
@@ -25941,17 +25869,17 @@ function EmbeddableChatInner({
|
|
|
25941
25869
|
const { panelRef: galleryPanelRef, modal: galleryModal } = useChatAttachmentImageGallery();
|
|
25942
25870
|
const contextMaxItems = contextPicker?.maxItems ?? 10;
|
|
25943
25871
|
const contextPickerForMode = activeMode === "mingo" ? contextPicker : void 0;
|
|
25944
|
-
const [contextItems, setContextItems] =
|
|
25945
|
-
const [contextPickerOpen, setContextPickerOpen] =
|
|
25946
|
-
const [mentionQuery, setMentionQuery] =
|
|
25947
|
-
const mentionActiveRef =
|
|
25948
|
-
|
|
25872
|
+
const [contextItems, setContextItems] = useState48(NO_CONTEXT_ITEMS);
|
|
25873
|
+
const [contextPickerOpen, setContextPickerOpen] = useState48(false);
|
|
25874
|
+
const [mentionQuery, setMentionQuery] = useState48(null);
|
|
25875
|
+
const mentionActiveRef = useRef36(false);
|
|
25876
|
+
useEffect38(() => {
|
|
25949
25877
|
mentionActiveRef.current = mentionQuery !== null;
|
|
25950
25878
|
}, [mentionQuery]);
|
|
25951
|
-
const mentionKeysRef =
|
|
25879
|
+
const mentionKeysRef = useRef36(/* @__PURE__ */ new Set());
|
|
25952
25880
|
const scopeDialogId = activeDialogId ?? null;
|
|
25953
|
-
const [composerScope, setComposerScope] =
|
|
25954
|
-
const [composerKey, setComposerKey] =
|
|
25881
|
+
const [composerScope, setComposerScope] = useState48({ dialogId: scopeDialogId, mode: activeMode });
|
|
25882
|
+
const [composerKey, setComposerKey] = useState48(0);
|
|
25955
25883
|
if (composerScope.dialogId !== scopeDialogId || composerScope.mode !== activeMode) {
|
|
25956
25884
|
const named = namingNewChat && composerScope.dialogId == null && scopeDialogId != null && composerScope.mode === activeMode;
|
|
25957
25885
|
setComposerScope({ dialogId: scopeDialogId, mode: activeMode });
|
|
@@ -25962,17 +25890,17 @@ function EmbeddableChatInner({
|
|
|
25962
25890
|
setMentionQuery(null);
|
|
25963
25891
|
}
|
|
25964
25892
|
}
|
|
25965
|
-
|
|
25893
|
+
useEffect38(() => {
|
|
25966
25894
|
mentionKeysRef.current.clear();
|
|
25967
25895
|
clearAttachments();
|
|
25968
25896
|
}, [composerKey, clearAttachments]);
|
|
25969
|
-
const mentionMarkerByType =
|
|
25897
|
+
const mentionMarkerByType = useMemo30(() => {
|
|
25970
25898
|
const m = /* @__PURE__ */ new Map();
|
|
25971
25899
|
for (const t of contextPicker?.entityTypes ?? []) if (t.marker) m.set(t.type, t.marker);
|
|
25972
25900
|
return m;
|
|
25973
25901
|
}, [contextPicker?.entityTypes]);
|
|
25974
25902
|
const contextEntityTypes = contextPicker?.entityTypes;
|
|
25975
|
-
const resolveContextIcon =
|
|
25903
|
+
const resolveContextIcon = useMemo30(() => {
|
|
25976
25904
|
const byType = /* @__PURE__ */ new Map();
|
|
25977
25905
|
for (const t of contextEntityTypes ?? []) byType.set(t.type, t.icon);
|
|
25978
25906
|
return (item) => byType.get(item.type);
|
|
@@ -26045,7 +25973,7 @@ function EmbeddableChatInner({
|
|
|
26045
25973
|
navigatingAwayRef.current = true;
|
|
26046
25974
|
setIsOpen(false);
|
|
26047
25975
|
}, [setIsOpen]);
|
|
26048
|
-
const chatPanelHandle =
|
|
25976
|
+
const chatPanelHandle = useMemo30(
|
|
26049
25977
|
() => ({ closeChat: handleNavigationClose }),
|
|
26050
25978
|
[handleNavigationClose]
|
|
26051
25979
|
);
|
|
@@ -26059,14 +25987,14 @@ function EmbeddableChatInner({
|
|
|
26059
25987
|
}),
|
|
26060
25988
|
[discussRef, displayRef, resolvedBaseRoute, chipBasePlatform, extras]
|
|
26061
25989
|
);
|
|
26062
|
-
const mingoAssistantIcon =
|
|
26063
|
-
() => effectiveAssistantIcon ? /* @__PURE__ */
|
|
25990
|
+
const mingoAssistantIcon = useMemo30(
|
|
25991
|
+
() => effectiveAssistantIcon ? /* @__PURE__ */ jsx101(EntityIcon, { icon: effectiveAssistantIcon, size: 24 }) : /* @__PURE__ */ jsx101(MingoIcon, { className: "h-6 w-6", cornerColor: "var(--ods-flamingo-cyan-base)" }),
|
|
26064
25992
|
[effectiveAssistantIcon]
|
|
26065
25993
|
);
|
|
26066
|
-
const [timestampCache] =
|
|
25994
|
+
const [timestampCache] = useState48(() => /* @__PURE__ */ new Map());
|
|
26067
25995
|
const guideUserName = activeMode === "guide" ? [identityUser?.firstName, identityUser?.lastName].filter(Boolean).join(" ").trim() || identityUser?.name?.trim() || void 0 : void 0;
|
|
26068
25996
|
const guideUserAvatar = activeMode === "guide" ? identityUser?.avatarUrl?.trim() || void 0 : void 0;
|
|
26069
|
-
const messages =
|
|
25997
|
+
const messages = useMemo30(() => {
|
|
26070
25998
|
const options = { userName: guideUserName, userAvatar: guideUserAvatar, timestampCache };
|
|
26071
25999
|
const mapped = rawMessages.map((m) => mapHostMessage(m, options));
|
|
26072
26000
|
pruneTimestampCache(timestampCache, new Set(rawMessages.map((m) => m.id)));
|
|
@@ -26103,7 +26031,7 @@ function EmbeddableChatInner({
|
|
|
26103
26031
|
},
|
|
26104
26032
|
[sendMessage]
|
|
26105
26033
|
);
|
|
26106
|
-
const guideSuggestedActions =
|
|
26034
|
+
const guideSuggestedActions = useMemo30(() => {
|
|
26107
26035
|
if (effectiveQuickActions.length > 0) {
|
|
26108
26036
|
return effectiveQuickActions.map((qa) => ({
|
|
26109
26037
|
id: qa.id,
|
|
@@ -26164,7 +26092,7 @@ function EmbeddableChatInner({
|
|
|
26164
26092
|
});
|
|
26165
26093
|
const handleOpen = useCallback28(() => setIsOpen(true), [setIsOpen]);
|
|
26166
26094
|
useCloseOnNavigation(handleNavigationClose, null);
|
|
26167
|
-
|
|
26095
|
+
useEffect38(() => {
|
|
26168
26096
|
const handler = (e) => {
|
|
26169
26097
|
const detail = e.detail;
|
|
26170
26098
|
if (!detail || detail.source !== source) return;
|
|
@@ -26174,7 +26102,7 @@ function EmbeddableChatInner({
|
|
|
26174
26102
|
window.addEventListener("ask-ai:open-with-ref", handler);
|
|
26175
26103
|
return () => window.removeEventListener("ask-ai:open-with-ref", handler);
|
|
26176
26104
|
}, [source, discussRef, setIsOpen]);
|
|
26177
|
-
|
|
26105
|
+
useEffect38(() => {
|
|
26178
26106
|
const handler = (e) => {
|
|
26179
26107
|
const detail = e.detail;
|
|
26180
26108
|
if (!detail || detail.source !== source) return;
|
|
@@ -26195,11 +26123,11 @@ function EmbeddableChatInner({
|
|
|
26195
26123
|
if (!isQuickActionEmpty && quickActionPreview !== null) setQuickActionPreview(null);
|
|
26196
26124
|
const guideCanReturnToMingo = isGuideEmpty && hasMingoMode;
|
|
26197
26125
|
const sourceLabel = source === "flamingo" ? "Knowledge Base" : "Data Room";
|
|
26198
|
-
const enabledSet =
|
|
26126
|
+
const enabledSet = useMemo30(
|
|
26199
26127
|
() => effectiveEnabledRagTableIds ? new Set(effectiveEnabledRagTableIds) : null,
|
|
26200
26128
|
[effectiveEnabledRagTableIds]
|
|
26201
26129
|
);
|
|
26202
|
-
const chipCommands =
|
|
26130
|
+
const chipCommands = useMemo30(() => {
|
|
26203
26131
|
const out = [];
|
|
26204
26132
|
for (const cmd of commandsById.values()) {
|
|
26205
26133
|
if (cmd.displayOrder === void 0) continue;
|
|
@@ -26220,7 +26148,7 @@ function EmbeddableChatInner({
|
|
|
26220
26148
|
if (chatLoading && index === messages.length - 1) return null;
|
|
26221
26149
|
const { cited, uncited } = splitCitedSources(message.sources, flattenAssistantContent(message.content));
|
|
26222
26150
|
if (cited.length === 0 && uncited.length === 0) return null;
|
|
26223
|
-
return /* @__PURE__ */
|
|
26151
|
+
return /* @__PURE__ */ jsx101("div", { className: "pb-2", children: /* @__PURE__ */ jsx101(
|
|
26224
26152
|
SourceChips,
|
|
26225
26153
|
{
|
|
26226
26154
|
cited,
|
|
@@ -26234,10 +26162,10 @@ function EmbeddableChatInner({
|
|
|
26234
26162
|
},
|
|
26235
26163
|
[chatLoading, messages.length, resolvedBaseRoute, chipBasePlatform, handleNavigationClose, discussRef]
|
|
26236
26164
|
);
|
|
26237
|
-
const [portalHost, setPortalHost] =
|
|
26238
|
-
const [panelBoundary, setPanelBoundary] =
|
|
26239
|
-
const [canSplit, setCanSplit] =
|
|
26240
|
-
|
|
26165
|
+
const [portalHost, setPortalHost] = useState48(null);
|
|
26166
|
+
const [panelBoundary, setPanelBoundary] = useState48(null);
|
|
26167
|
+
const [canSplit, setCanSplit] = useState48(false);
|
|
26168
|
+
useEffect38(() => {
|
|
26241
26169
|
if (!panelBoundary || typeof ResizeObserver === "undefined") return void 0;
|
|
26242
26170
|
const ro = new ResizeObserver((entries) => {
|
|
26243
26171
|
const w = entries[0]?.contentRect?.width;
|
|
@@ -26250,9 +26178,9 @@ function EmbeddableChatInner({
|
|
|
26250
26178
|
setPanelBoundary(node);
|
|
26251
26179
|
if (node) setCanSplit(node.clientWidth >= SPLIT_MIN_WIDTH);
|
|
26252
26180
|
}, []);
|
|
26253
|
-
const [railCollapsed, setRailCollapsed] =
|
|
26181
|
+
const [railCollapsed, setRailCollapsed] = useState48(false);
|
|
26254
26182
|
const railStorageHydrated = useIsHydrated();
|
|
26255
|
-
const [railStorageRead, setRailStorageRead] =
|
|
26183
|
+
const [railStorageRead, setRailStorageRead] = useState48(false);
|
|
26256
26184
|
if (railStorageHydrated && !railStorageRead) {
|
|
26257
26185
|
setRailStorageRead(true);
|
|
26258
26186
|
try {
|
|
@@ -26270,13 +26198,13 @@ function EmbeddableChatInner({
|
|
|
26270
26198
|
return next;
|
|
26271
26199
|
});
|
|
26272
26200
|
}, []);
|
|
26273
|
-
const [railSearchOpen, setRailSearchOpen] =
|
|
26201
|
+
const [railSearchOpen, setRailSearchOpen] = useState48(false);
|
|
26274
26202
|
const splitEligible = historyListMode;
|
|
26275
26203
|
const wideMingo = splitEligible && canSplit && !previewMode;
|
|
26276
26204
|
const splitActive = wideMingo && !railCollapsed;
|
|
26277
26205
|
const railPresence = useRailPresence(splitActive);
|
|
26278
26206
|
const showWideHeader = wideMingo || railPresence.mounted;
|
|
26279
|
-
const [composeOpen, setComposeOpen] =
|
|
26207
|
+
const [composeOpen, setComposeOpen] = useState48(false);
|
|
26280
26208
|
if (hasConversation && composeOpen) setComposeOpen(false);
|
|
26281
26209
|
const isMingoMode = historyListMode;
|
|
26282
26210
|
const emptyListSkipped = mingoCaps.emptyListSkipsToCompose === true && dialogs.length === 0 && !dialogsInitialLoading && !mingoCaps.searchQuery;
|
|
@@ -26299,14 +26227,14 @@ function EmbeddableChatInner({
|
|
|
26299
26227
|
const handleNewChat = useCallback28(() => {
|
|
26300
26228
|
resetToNewChat();
|
|
26301
26229
|
}, [resetToNewChat]);
|
|
26302
|
-
const [pendingDraft, setPendingDraft] =
|
|
26303
|
-
const [seededDraft, setSeededDraft] =
|
|
26230
|
+
const [pendingDraft, setPendingDraft] = useState48(null);
|
|
26231
|
+
const [seededDraft, setSeededDraft] = useState48(null);
|
|
26304
26232
|
if (pendingDraft && seededDraft !== pendingDraft) {
|
|
26305
26233
|
setSeededDraft(pendingDraft);
|
|
26306
26234
|
setContextItems(pendingDraft.mentions);
|
|
26307
26235
|
}
|
|
26308
|
-
const appliedDraftRef =
|
|
26309
|
-
|
|
26236
|
+
const appliedDraftRef = useRef36(null);
|
|
26237
|
+
useEffect38(() => {
|
|
26310
26238
|
const draft = pendingDraft;
|
|
26311
26239
|
if (!draft || appliedDraftRef.current === draft) return;
|
|
26312
26240
|
const input = chatInputRef.current;
|
|
@@ -26379,13 +26307,13 @@ function EmbeddableChatInner({
|
|
|
26379
26307
|
onCopyLink: headerOnCopyLink,
|
|
26380
26308
|
onOpenArchive: headerOnOpenArchive
|
|
26381
26309
|
};
|
|
26382
|
-
const body = /* @__PURE__ */
|
|
26383
|
-
/* @__PURE__ */
|
|
26310
|
+
const body = /* @__PURE__ */ jsx101(PortalContainerContext.Provider, { value: portalHost, children: /* @__PURE__ */ jsxs77(CollisionBoundaryContext.Provider, { value: panelBoundary, children: [
|
|
26311
|
+
/* @__PURE__ */ jsx101(
|
|
26384
26312
|
"div",
|
|
26385
26313
|
{
|
|
26386
26314
|
ref: setPanelNode,
|
|
26387
26315
|
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" : ""}`,
|
|
26388
|
-
children: archiveOpen && !splitActive ? /* @__PURE__ */
|
|
26316
|
+
children: archiveOpen && !splitActive ? /* @__PURE__ */ jsx101("div", { className: "flex min-h-0 flex-1 flex-col duration-200 animate-in fade-in-0", children: /* @__PURE__ */ jsx101(
|
|
26389
26317
|
ChatArchivePage,
|
|
26390
26318
|
{
|
|
26391
26319
|
dialogs: archivedDialogs,
|
|
@@ -26414,15 +26342,15 @@ function EmbeddableChatInner({
|
|
|
26414
26342
|
// sub-`md` viewport would split the body yet drop to the mobile
|
|
26415
26343
|
// single-bar header (no rail search / collapse controls).
|
|
26416
26344
|
/* @__PURE__ */ jsxs77("div", { className: "flex h-14 w-full flex-shrink-0 overflow-hidden border-b border-ods-border bg-ods-card", children: [
|
|
26417
|
-
railPresence.mounted && /* @__PURE__ */
|
|
26345
|
+
railPresence.mounted && /* @__PURE__ */ jsx101(RailSlot, { active: railPresence.active, innerClassName: "flex overflow-hidden", children: archiveOpen ? (
|
|
26418
26346
|
// Archive open in the wide layout — the rail header
|
|
26419
26347
|
// turns into a "Chat Archive" back bar (the list itself
|
|
26420
26348
|
// renders in the rail below); the chat block is untouched.
|
|
26421
26349
|
// Back is a full-height leading cell, matching the other
|
|
26422
26350
|
// header cells (not a small inline chevron).
|
|
26423
26351
|
/* @__PURE__ */ jsxs77(Fragment34, { children: [
|
|
26424
|
-
/* @__PURE__ */
|
|
26425
|
-
/* @__PURE__ */
|
|
26352
|
+
/* @__PURE__ */ jsx101(ChatHeaderIconButton, { divider: "right", onClick: closeArchive, "aria-label": "Back to chats", children: /* @__PURE__ */ jsx101(Chevron02LeftIcon, { size: 24 }) }),
|
|
26353
|
+
/* @__PURE__ */ jsx101("div", { className: "flex min-w-0 flex-1 items-center px-[var(--spacing-system-mf)]", children: /* @__PURE__ */ jsx101("span", { className: "min-w-0 flex-1 truncate text-ods-text-primary text-h3", children: "Chat Archive" }) })
|
|
26426
26354
|
] })
|
|
26427
26355
|
) : (
|
|
26428
26356
|
// "Current Chats" rail header — title fills, then the
|
|
@@ -26430,7 +26358,7 @@ function EmbeddableChatInner({
|
|
|
26430
26358
|
// inline field takes over the title area in place
|
|
26431
26359
|
// (Figma 116:51217) and the magnifier toggle is hidden.
|
|
26432
26360
|
/* @__PURE__ */ jsxs77(Fragment34, { children: [
|
|
26433
|
-
railSearchOpen && mingoCaps.onSearchChange ? /* @__PURE__ */
|
|
26361
|
+
railSearchOpen && mingoCaps.onSearchChange ? /* @__PURE__ */ jsx101(
|
|
26434
26362
|
ChatHeaderSearchField,
|
|
26435
26363
|
{
|
|
26436
26364
|
initialValue: mingoCaps.searchQuery,
|
|
@@ -26438,22 +26366,22 @@ function EmbeddableChatInner({
|
|
|
26438
26366
|
onCollapse: () => setRailSearchOpen(false)
|
|
26439
26367
|
}
|
|
26440
26368
|
) : /* @__PURE__ */ jsxs77(Fragment34, { children: [
|
|
26441
|
-
/* @__PURE__ */
|
|
26442
|
-
mingoCaps.onSearchChange && /* @__PURE__ */
|
|
26369
|
+
/* @__PURE__ */ jsx101("div", { className: "flex min-w-0 flex-1 items-center px-[var(--spacing-system-mf)]", children: /* @__PURE__ */ jsx101("span", { className: "min-w-0 flex-1 truncate text-ods-text-primary text-h3", children: "Current Chats" }) }),
|
|
26370
|
+
mingoCaps.onSearchChange && /* @__PURE__ */ jsx101(
|
|
26443
26371
|
ChatHeaderIconButton,
|
|
26444
26372
|
{
|
|
26445
26373
|
onClick: () => setRailSearchOpen((o) => !o),
|
|
26446
26374
|
"aria-label": "Search chats",
|
|
26447
26375
|
"aria-pressed": railSearchOpen,
|
|
26448
|
-
children: /* @__PURE__ */
|
|
26376
|
+
children: /* @__PURE__ */ jsx101(SearchIcon, { size: 24 })
|
|
26449
26377
|
}
|
|
26450
26378
|
)
|
|
26451
26379
|
] }),
|
|
26452
|
-
headerOnOpenArchive && /* @__PURE__ */
|
|
26380
|
+
headerOnOpenArchive && /* @__PURE__ */ jsx101(ChatHeaderIconButton, { onClick: headerOnOpenArchive, "aria-label": "Chat archive", children: /* @__PURE__ */ jsx101(ClockHistoryIcon, { size: 24 }) })
|
|
26453
26381
|
] })
|
|
26454
26382
|
) }),
|
|
26455
26383
|
/* @__PURE__ */ jsxs77("div", { className: "flex min-w-0 flex-1", children: [
|
|
26456
|
-
/* @__PURE__ */
|
|
26384
|
+
/* @__PURE__ */ jsx101(
|
|
26457
26385
|
"button",
|
|
26458
26386
|
{
|
|
26459
26387
|
type: "button",
|
|
@@ -26461,17 +26389,17 @@ function EmbeddableChatInner({
|
|
|
26461
26389
|
"aria-label": splitActive ? "Collapse chat list" : "Show chat list",
|
|
26462
26390
|
"aria-pressed": !splitActive,
|
|
26463
26391
|
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",
|
|
26464
|
-
children: splitActive ? /* @__PURE__ */
|
|
26392
|
+
children: splitActive ? /* @__PURE__ */ jsx101(Arrow02RightIcon, { size: 24 }) : /* @__PURE__ */ jsx101(Arrow02LeftIcon, { size: 24 })
|
|
26465
26393
|
}
|
|
26466
26394
|
),
|
|
26467
26395
|
/* @__PURE__ */ jsxs77("div", { className: "flex min-w-0 flex-1 items-center gap-[var(--spacing-system-m)] px-[var(--spacing-system-mf)] py-[var(--spacing-system-sf)]", children: [
|
|
26468
26396
|
/* @__PURE__ */ jsxs77("div", { className: "flex min-w-0 flex-col", children: [
|
|
26469
|
-
/* @__PURE__ */
|
|
26470
|
-
headerPersonName && /* @__PURE__ */
|
|
26397
|
+
/* @__PURE__ */ jsx101("p", { className: "truncate leading-tight text-ods-text-primary text-h3", children: headerShowBack || isGuideEmpty ? headerTitle : freshConversationTitle }),
|
|
26398
|
+
headerPersonName && /* @__PURE__ */ jsx101("p", { className: "truncate leading-tight text-ods-text-secondary text-h6", children: headerPersonName })
|
|
26471
26399
|
] }),
|
|
26472
26400
|
headerAvatar ? (
|
|
26473
26401
|
// Owner avatar at the title cell's right edge (Figma 113:63273).
|
|
26474
|
-
/* @__PURE__ */
|
|
26402
|
+
/* @__PURE__ */ jsx101(
|
|
26475
26403
|
SquareAvatar,
|
|
26476
26404
|
{
|
|
26477
26405
|
variant: "round",
|
|
@@ -26486,17 +26414,17 @@ function EmbeddableChatInner({
|
|
|
26486
26414
|
)
|
|
26487
26415
|
) : null
|
|
26488
26416
|
] }),
|
|
26489
|
-
isViewingArchived && headerOnRestore && /* @__PURE__ */
|
|
26490
|
-
headerShowBack && !isViewingArchived && splitHeaderMenuItems.length > 0 && /* @__PURE__ */
|
|
26417
|
+
isViewingArchived && headerOnRestore && /* @__PURE__ */ jsx101(ChatHeaderIconButton, { onClick: headerOnRestore, "aria-label": "Unarchive chat", children: /* @__PURE__ */ jsx101(Refresh01LeftIcon, { size: 24 }) }),
|
|
26418
|
+
headerShowBack && !isViewingArchived && splitHeaderMenuItems.length > 0 && /* @__PURE__ */ jsx101(
|
|
26491
26419
|
ActionsMenuDropdown,
|
|
26492
26420
|
{
|
|
26493
26421
|
triggerAriaLabel: "Chat actions",
|
|
26494
26422
|
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
26495
26423
|
groups: [{ items: splitHeaderMenuItems }],
|
|
26496
|
-
customTrigger: /* @__PURE__ */
|
|
26424
|
+
customTrigger: /* @__PURE__ */ jsx101(ChatHeaderIconButton, { "aria-label": "Chat actions", children: /* @__PURE__ */ jsx101(Ellipsis01Icon, { size: 24 }) })
|
|
26497
26425
|
}
|
|
26498
26426
|
),
|
|
26499
|
-
/* @__PURE__ */
|
|
26427
|
+
/* @__PURE__ */ jsx101(ChatHeaderIconButton, { onClick: handleClose, "aria-label": "Close", children: /* @__PURE__ */ jsx101(XmarkIcon, { size: 24 }) })
|
|
26500
26428
|
] })
|
|
26501
26429
|
] })
|
|
26502
26430
|
) : (
|
|
@@ -26504,14 +26432,14 @@ function EmbeddableChatInner({
|
|
|
26504
26432
|
// guide, resolved into `narrowHeaderProps` above. (Wide layouts,
|
|
26505
26433
|
// including rail-collapsed, use the wide header above.) Embedded
|
|
26506
26434
|
// previews (hero demo tabs) force the compact bar via `compact`.
|
|
26507
|
-
/* @__PURE__ */
|
|
26435
|
+
/* @__PURE__ */ jsx101(ChatPanelHeader, { ...narrowHeaderProps, compact: previewMode })
|
|
26508
26436
|
),
|
|
26509
|
-
activeMode === "guide" && hasMingoMode && /* @__PURE__ */
|
|
26437
|
+
activeMode === "guide" && hasMingoMode && /* @__PURE__ */ jsx101(GuideModeBanner, { className: "duration-200 animate-in fade-in-0" }),
|
|
26510
26438
|
/* @__PURE__ */ jsxs77("div", { className: "flex min-h-0 flex-1 overflow-hidden", children: [
|
|
26511
|
-
railPresence.mounted && /* @__PURE__ */
|
|
26439
|
+
railPresence.mounted && /* @__PURE__ */ jsx101(RailSlot, { active: railPresence.active, innerClassName: "flex flex-col min-h-0 bg-ods-card", children: archiveOpen ? (
|
|
26512
26440
|
// Archive list inside the rail (header lives in the split
|
|
26513
26441
|
// header's left cell above). Right chat block stays put.
|
|
26514
|
-
/* @__PURE__ */
|
|
26442
|
+
/* @__PURE__ */ jsx101(
|
|
26515
26443
|
ChatArchivePage,
|
|
26516
26444
|
{
|
|
26517
26445
|
embedded: true,
|
|
@@ -26525,7 +26453,7 @@ function EmbeddableChatInner({
|
|
|
26525
26453
|
}
|
|
26526
26454
|
}
|
|
26527
26455
|
)
|
|
26528
|
-
) : /* @__PURE__ */
|
|
26456
|
+
) : /* @__PURE__ */ jsx101(
|
|
26529
26457
|
MingoHistoryRail,
|
|
26530
26458
|
{
|
|
26531
26459
|
dialogs,
|
|
@@ -26549,11 +26477,11 @@ function EmbeddableChatInner({
|
|
|
26549
26477
|
onRetry: reloadDialogs
|
|
26550
26478
|
}
|
|
26551
26479
|
) }),
|
|
26552
|
-
/* @__PURE__ */
|
|
26480
|
+
/* @__PURE__ */ jsx101("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col", children: stackedListView ? (
|
|
26553
26481
|
// Narrow "Current Chats" list (Figma 341:36190) — the default
|
|
26554
26482
|
// single-column view. No composer here; "Start New Chat" opens
|
|
26555
26483
|
// the compose view.
|
|
26556
|
-
/* @__PURE__ */
|
|
26484
|
+
/* @__PURE__ */ jsx101(
|
|
26557
26485
|
MingoHistoryRail,
|
|
26558
26486
|
{
|
|
26559
26487
|
className: "duration-200 animate-in fade-in-0",
|
|
@@ -26579,11 +26507,11 @@ function EmbeddableChatInner({
|
|
|
26579
26507
|
}
|
|
26580
26508
|
)
|
|
26581
26509
|
) : /* @__PURE__ */ jsxs77(Fragment34, { children: [
|
|
26582
|
-
/* @__PURE__ */
|
|
26510
|
+
/* @__PURE__ */ jsx101("div", { ref: galleryPanelRef, className: "flex min-h-0 flex-1 flex-col p-[var(--spacing-system-m)]", children: /* @__PURE__ */ jsx101(
|
|
26583
26511
|
"div",
|
|
26584
26512
|
{
|
|
26585
26513
|
className: "flex min-h-0 flex-1 flex-col duration-200 animate-in fade-in-0",
|
|
26586
|
-
children: hasConversation ? /* @__PURE__ */
|
|
26514
|
+
children: hasConversation ? /* @__PURE__ */ jsx101("div", { className: "flex min-h-0 flex-1 flex-col", children: messagesInitialLoading ? (
|
|
26587
26515
|
// Match the real list's `fullWidth` layout so swapping
|
|
26588
26516
|
// skeleton → bubbles doesn't shift the column. The panel
|
|
26589
26517
|
// wrapper above already pads (`p-[var(--spacing-system-m)]`),
|
|
@@ -26594,8 +26522,8 @@ function EmbeddableChatInner({
|
|
|
26594
26522
|
// skeleton overflows a short panel and grows its OWN
|
|
26595
26523
|
// scrollbar — ugly. `fill` top-anchors + clips overflow so
|
|
26596
26524
|
// it reads as "the whole panel is loading" and never scrolls.
|
|
26597
|
-
/* @__PURE__ */
|
|
26598
|
-
) : /* @__PURE__ */
|
|
26525
|
+
/* @__PURE__ */ jsx101(ChatMessageListSkeleton, { fullWidth: true, fill: previewMode, className: "flex-1" })
|
|
26526
|
+
) : /* @__PURE__ */ jsx101(
|
|
26599
26527
|
ChatMessageList,
|
|
26600
26528
|
{
|
|
26601
26529
|
messages,
|
|
@@ -26626,7 +26554,7 @@ function EmbeddableChatInner({
|
|
|
26626
26554
|
centred greeting + capability grid + Guide-chat promo +
|
|
26627
26555
|
quick-action chips. Guide mode keeps the slash-command
|
|
26628
26556
|
onboarding list below. */
|
|
26629
|
-
/* @__PURE__ */
|
|
26557
|
+
/* @__PURE__ */ jsx101(
|
|
26630
26558
|
MingoWelcome,
|
|
26631
26559
|
{
|
|
26632
26560
|
onStartGuideChat: effectiveModes.guide ? () => handleActiveModeChange("guide") : void 0,
|
|
@@ -26641,7 +26569,7 @@ function EmbeddableChatInner({
|
|
|
26641
26569
|
/* Figma node 7532:328214 — Guide-mode empty state: greeting
|
|
26642
26570
|
+ slash-command onboarding list share one scroll region,
|
|
26643
26571
|
with a pinned quick-action chip row above the composer. */
|
|
26644
|
-
/* @__PURE__ */
|
|
26572
|
+
/* @__PURE__ */ jsx101(
|
|
26645
26573
|
GuideWelcome,
|
|
26646
26574
|
{
|
|
26647
26575
|
subtitle: effectiveGreeting ?? void 0,
|
|
@@ -26658,7 +26586,7 @@ function EmbeddableChatInner({
|
|
|
26658
26586
|
onQuickActionHoverEnd: () => setQuickActionPreview(null),
|
|
26659
26587
|
agentSlug: activeAgentSlug,
|
|
26660
26588
|
children: (chipCommands.length > 0 || !commandsLoaded) && /* @__PURE__ */ jsxs77("div", { className: "shrink-0 overflow-hidden rounded-md border border-ods-border", children: [
|
|
26661
|
-
!commandsLoaded && chipCommands.length === 0 && SKELETON_ROW_VARIANTS.map((variant, i) => /* @__PURE__ */
|
|
26589
|
+
!commandsLoaded && chipCommands.length === 0 && SKELETON_ROW_VARIANTS.map((variant, i) => /* @__PURE__ */ jsx101(
|
|
26662
26590
|
MingoOnboardingCardSkeleton,
|
|
26663
26591
|
{
|
|
26664
26592
|
titleWidth: variant.titleWidth,
|
|
@@ -26676,10 +26604,10 @@ function EmbeddableChatInner({
|
|
|
26676
26604
|
label: action.label,
|
|
26677
26605
|
onClick: () => dispatchSlashCommandAction(action.id, cmdId, chatInputRef)
|
|
26678
26606
|
}));
|
|
26679
|
-
return /* @__PURE__ */
|
|
26607
|
+
return /* @__PURE__ */ jsx101(
|
|
26680
26608
|
MingoOnboardingCard,
|
|
26681
26609
|
{
|
|
26682
|
-
icon: /* @__PURE__ */
|
|
26610
|
+
icon: /* @__PURE__ */ jsx101(Icon, { size: 16 }),
|
|
26683
26611
|
title: label,
|
|
26684
26612
|
slashCommand: `/${cmdId}`,
|
|
26685
26613
|
description: cmd.description,
|
|
@@ -26695,7 +26623,7 @@ function EmbeddableChatInner({
|
|
|
26695
26623
|
},
|
|
26696
26624
|
contentViewKey
|
|
26697
26625
|
) }),
|
|
26698
|
-
/* @__PURE__ */
|
|
26626
|
+
/* @__PURE__ */ jsx101(
|
|
26699
26627
|
ChatAttachmentChipStrip,
|
|
26700
26628
|
{
|
|
26701
26629
|
attachments: stagedAttachments,
|
|
@@ -26703,7 +26631,7 @@ function EmbeddableChatInner({
|
|
|
26703
26631
|
disabled: chatLoading
|
|
26704
26632
|
}
|
|
26705
26633
|
),
|
|
26706
|
-
/* @__PURE__ */
|
|
26634
|
+
/* @__PURE__ */ jsx101(
|
|
26707
26635
|
ChatComposer,
|
|
26708
26636
|
{
|
|
26709
26637
|
archived: isViewingArchived,
|
|
@@ -26751,7 +26679,7 @@ function EmbeddableChatInner({
|
|
|
26751
26679
|
}
|
|
26752
26680
|
),
|
|
26753
26681
|
galleryModal,
|
|
26754
|
-
/* @__PURE__ */
|
|
26682
|
+
/* @__PURE__ */ jsx101(
|
|
26755
26683
|
ChatDialogModals,
|
|
26756
26684
|
{
|
|
26757
26685
|
renameTarget,
|
|
@@ -26765,15 +26693,15 @@ function EmbeddableChatInner({
|
|
|
26765
26693
|
onConfirmRestore: handleConfirmRestore
|
|
26766
26694
|
}
|
|
26767
26695
|
),
|
|
26768
|
-
/* @__PURE__ */
|
|
26696
|
+
/* @__PURE__ */ jsx101("div", { ref: setPortalHost, style: { display: "contents" } })
|
|
26769
26697
|
] }) });
|
|
26770
26698
|
const panel = shellLess ? /* @__PURE__ */ jsxs77(ChatPanelContext.Provider, { value: chatPanelHandle, children: [
|
|
26771
|
-
/* @__PURE__ */
|
|
26699
|
+
/* @__PURE__ */ jsx101(VisuallyHidden, { children: /* @__PURE__ */ jsxs77(DialogPrimitive2.Title, { children: [
|
|
26772
26700
|
sourceLabel,
|
|
26773
26701
|
" AI Assistant"
|
|
26774
26702
|
] }) }),
|
|
26775
26703
|
body
|
|
26776
|
-
] }) : /* @__PURE__ */
|
|
26704
|
+
] }) : /* @__PURE__ */ jsx101(Drawer, { open: isOpen, onOpenChange: (o) => !o && handleClose(), children: /* @__PURE__ */ jsx101(ChatPanelContext.Provider, { value: chatPanelHandle, children: /* @__PURE__ */ jsxs77(
|
|
26777
26705
|
DrawerContent,
|
|
26778
26706
|
{
|
|
26779
26707
|
side: "right",
|
|
@@ -26781,14 +26709,14 @@ function EmbeddableChatInner({
|
|
|
26781
26709
|
resizable: true,
|
|
26782
26710
|
minSize: 480,
|
|
26783
26711
|
maxSize: 1600,
|
|
26784
|
-
defaultSize: historyListMode
|
|
26712
|
+
defaultSize: drawerDefaultWidth(historyListMode),
|
|
26785
26713
|
storageKey: DRAWER_WIDTH_KEY,
|
|
26786
26714
|
resizeAriaLabel: "Resize chat panel",
|
|
26787
26715
|
overlayClassName: "mingo-chat-overlay",
|
|
26788
26716
|
"aria-describedby": void 0,
|
|
26789
26717
|
className: "mingo-chat-content w-screen !bg-ods-bg shadow-2xl focus:outline-none focus-visible:outline-none md:w-auto",
|
|
26790
26718
|
children: [
|
|
26791
|
-
/* @__PURE__ */
|
|
26719
|
+
/* @__PURE__ */ jsx101(VisuallyHidden, { children: /* @__PURE__ */ jsxs77(DialogPrimitive2.Title, { children: [
|
|
26792
26720
|
sourceLabel,
|
|
26793
26721
|
" AI Assistant"
|
|
26794
26722
|
] }) }),
|
|
@@ -26797,16 +26725,16 @@ function EmbeddableChatInner({
|
|
|
26797
26725
|
}
|
|
26798
26726
|
) }) });
|
|
26799
26727
|
return /* @__PURE__ */ jsxs77(Fragment34, { children: [
|
|
26800
|
-
showInternalTrigger && !shellLess && /* @__PURE__ */
|
|
26728
|
+
showInternalTrigger && !shellLess && /* @__PURE__ */ jsx101(
|
|
26801
26729
|
"div",
|
|
26802
26730
|
{
|
|
26803
26731
|
"aria-hidden": isOpen,
|
|
26804
26732
|
className: `pointer-events-none sticky bottom-0 z-[9990] h-0 ${isOpen ? "opacity-0" : "opacity-100"}`,
|
|
26805
|
-
children: /* @__PURE__ */
|
|
26733
|
+
children: /* @__PURE__ */ jsx101("div", { className: "absolute bottom-4 right-4 md:bottom-6 md:right-6", children: /* @__PURE__ */ jsx101(
|
|
26806
26734
|
Button,
|
|
26807
26735
|
{
|
|
26808
26736
|
onClick: handleOpen,
|
|
26809
|
-
leftIcon: /* @__PURE__ */
|
|
26737
|
+
leftIcon: /* @__PURE__ */ jsx101(MingoIcon, { className: "h-5 w-5", color: "currentColor" }),
|
|
26810
26738
|
tabIndex: isOpen ? -1 : 0,
|
|
26811
26739
|
className: `pointer-events-auto !w-auto shadow-lg ${isOpen ? "!pointer-events-none" : ""}`,
|
|
26812
26740
|
children: "Ask AI"
|
|
@@ -26819,7 +26747,7 @@ function EmbeddableChatInner({
|
|
|
26819
26747
|
}
|
|
26820
26748
|
|
|
26821
26749
|
// src/components/chat/proxy-credentials-panel.tsx
|
|
26822
|
-
import { useMemo as
|
|
26750
|
+
import { useMemo as useMemo31, useState as useState49 } from "react";
|
|
26823
26751
|
|
|
26824
26752
|
// src/components/ui/field.tsx
|
|
26825
26753
|
import { useId as useId3 } from "react";
|
|
@@ -26827,11 +26755,11 @@ import { useId as useId3 } from "react";
|
|
|
26827
26755
|
// src/components/ui/info-hint.tsx
|
|
26828
26756
|
import { Info as Info3 } from "lucide-react";
|
|
26829
26757
|
import { useId as useId2 } from "react";
|
|
26830
|
-
import { jsx as
|
|
26758
|
+
import { jsx as jsx102, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
26831
26759
|
function InfoHint({ children, label, side = "top", className }) {
|
|
26832
26760
|
const describedById = useId2();
|
|
26833
26761
|
return /* @__PURE__ */ jsxs78("span", { className: cn("inline-flex shrink-0 items-center", className), children: [
|
|
26834
|
-
/* @__PURE__ */
|
|
26762
|
+
/* @__PURE__ */ jsx102(
|
|
26835
26763
|
FloatingTooltip,
|
|
26836
26764
|
{
|
|
26837
26765
|
content: children,
|
|
@@ -26839,7 +26767,7 @@ function InfoHint({ children, label, side = "top", className }) {
|
|
|
26839
26767
|
as: "span",
|
|
26840
26768
|
triggerClassName: "inline-flex shrink-0 items-center",
|
|
26841
26769
|
className: "text-h6",
|
|
26842
|
-
children: /* @__PURE__ */
|
|
26770
|
+
children: /* @__PURE__ */ jsx102(
|
|
26843
26771
|
Button,
|
|
26844
26772
|
{
|
|
26845
26773
|
type: "button",
|
|
@@ -26849,17 +26777,17 @@ function InfoHint({ children, label, side = "top", className }) {
|
|
|
26849
26777
|
"aria-label": label ? `About ${label}` : "More information",
|
|
26850
26778
|
"aria-describedby": describedById,
|
|
26851
26779
|
className: "text-ods-text-secondary hover:text-ods-text-primary",
|
|
26852
|
-
children: /* @__PURE__ */
|
|
26780
|
+
children: /* @__PURE__ */ jsx102(Info3, { className: "h-3.5 w-3.5 shrink-0" })
|
|
26853
26781
|
}
|
|
26854
26782
|
)
|
|
26855
26783
|
}
|
|
26856
26784
|
),
|
|
26857
|
-
/* @__PURE__ */
|
|
26785
|
+
/* @__PURE__ */ jsx102("span", { id: describedById, className: "sr-only", children })
|
|
26858
26786
|
] });
|
|
26859
26787
|
}
|
|
26860
26788
|
|
|
26861
26789
|
// src/components/ui/field.tsx
|
|
26862
|
-
import { jsx as
|
|
26790
|
+
import { jsx as jsx103, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
26863
26791
|
function Field({ label, hint, required, children, error, labelExtras, labelEnd }) {
|
|
26864
26792
|
const controlId = useId3();
|
|
26865
26793
|
const errorId = `${controlId}-error`;
|
|
@@ -26873,19 +26801,19 @@ function Field({ label, hint, required, children, error, labelExtras, labelEnd }
|
|
|
26873
26801
|
/* @__PURE__ */ jsxs79("div", { className: "flex items-center gap-1.5", children: [
|
|
26874
26802
|
/* @__PURE__ */ jsxs79(Label, { htmlFor: controlId, children: [
|
|
26875
26803
|
label,
|
|
26876
|
-
required && /* @__PURE__ */
|
|
26804
|
+
required && /* @__PURE__ */ jsx103(RequiredMark, {})
|
|
26877
26805
|
] }),
|
|
26878
|
-
hint && /* @__PURE__ */
|
|
26806
|
+
hint && /* @__PURE__ */ jsx103(InfoHint, { label, children: hint }),
|
|
26879
26807
|
labelExtras,
|
|
26880
|
-
labelEnd && /* @__PURE__ */
|
|
26808
|
+
labelEnd && /* @__PURE__ */ jsx103("span", { className: "ml-auto shrink-0", children: labelEnd })
|
|
26881
26809
|
] }),
|
|
26882
|
-
/* @__PURE__ */
|
|
26883
|
-
error && /* @__PURE__ */
|
|
26810
|
+
/* @__PURE__ */ jsx103("div", { className: "pt-[var(--spacing-system-xxs)]", children: children(renderProps) }),
|
|
26811
|
+
error && /* @__PURE__ */ jsx103("p", { id: errorId, role: "alert", className: "text-ods-error text-h6", children: error })
|
|
26884
26812
|
] });
|
|
26885
26813
|
}
|
|
26886
26814
|
|
|
26887
26815
|
// src/components/chat/proxy-credentials-panel.tsx
|
|
26888
|
-
import { jsx as
|
|
26816
|
+
import { jsx as jsx104, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
26889
26817
|
var httpsOnly = (label) => (value) => /^https:\/\//i.test(value) ? null : `${label} must start with https://`;
|
|
26890
26818
|
var OPTIONAL_FIELD_COPY = {
|
|
26891
26819
|
avatarUrl: {
|
|
@@ -26938,20 +26866,20 @@ function maskKey(key) {
|
|
|
26938
26866
|
return key.length - prefix.length <= 8 ? `${prefix}\u2022\u2022\u2022\u2022` : `${prefix}\u2026${key.slice(-4)}`;
|
|
26939
26867
|
}
|
|
26940
26868
|
function HeaderName({ children }) {
|
|
26941
|
-
return /* @__PURE__ */
|
|
26869
|
+
return /* @__PURE__ */ jsx104("code", { className: "font-mono text-ods-text-secondary text-h6", children });
|
|
26942
26870
|
}
|
|
26943
26871
|
function Section({ title, description, children }) {
|
|
26944
26872
|
return /* @__PURE__ */ jsxs80("section", { className: "space-y-[var(--spacing-system-sf)]", children: [
|
|
26945
26873
|
/* @__PURE__ */ jsxs80("div", { children: [
|
|
26946
|
-
/* @__PURE__ */
|
|
26947
|
-
/* @__PURE__ */
|
|
26874
|
+
/* @__PURE__ */ jsx104("h3", { className: "text-ods-text-primary text-h4", children: title }),
|
|
26875
|
+
/* @__PURE__ */ jsx104("p", { className: "text-ods-text-secondary text-h6", children: description })
|
|
26948
26876
|
] }),
|
|
26949
26877
|
children
|
|
26950
26878
|
] });
|
|
26951
26879
|
}
|
|
26952
26880
|
function ProxyCredentialsPanel({ description }) {
|
|
26953
26881
|
const hydrated = useIsHydrated();
|
|
26954
|
-
return /* @__PURE__ */
|
|
26882
|
+
return /* @__PURE__ */ jsx104(
|
|
26955
26883
|
ProxyCredentialsForm,
|
|
26956
26884
|
{
|
|
26957
26885
|
description,
|
|
@@ -26962,13 +26890,13 @@ function ProxyCredentialsPanel({ description }) {
|
|
|
26962
26890
|
}
|
|
26963
26891
|
function ProxyCredentialsForm({ description, saved }) {
|
|
26964
26892
|
const { secret: savedSecret, email: savedEmail, ...savedOptional } = saved ?? { email: "", secret: "" };
|
|
26965
|
-
const [secret, setSecret] =
|
|
26966
|
-
const [email, setEmail] =
|
|
26967
|
-
const [optional, setOptional] =
|
|
26968
|
-
const [savedKeyTail, setSavedKeyTail] =
|
|
26969
|
-
const [activeEmail, setActiveEmail] =
|
|
26970
|
-
const [status, setStatus] =
|
|
26971
|
-
const errors =
|
|
26893
|
+
const [secret, setSecret] = useState49("");
|
|
26894
|
+
const [email, setEmail] = useState49(savedEmail);
|
|
26895
|
+
const [optional, setOptional] = useState49(savedOptional);
|
|
26896
|
+
const [savedKeyTail, setSavedKeyTail] = useState49(savedSecret ? maskKey(savedSecret) : null);
|
|
26897
|
+
const [activeEmail, setActiveEmail] = useState49(savedEmail || null);
|
|
26898
|
+
const [status, setStatus] = useState49("");
|
|
26899
|
+
const errors = useMemo31(() => {
|
|
26972
26900
|
const out = {};
|
|
26973
26901
|
for (const { field } of EMBED_PROXY_OPTIONAL_HEADERS) {
|
|
26974
26902
|
const value = optional[field]?.trim();
|
|
@@ -27011,28 +26939,28 @@ function ProxyCredentialsForm({ description, saved }) {
|
|
|
27011
26939
|
setStatus("Cleared. Requests use the session again.");
|
|
27012
26940
|
};
|
|
27013
26941
|
const setField = (field, value) => setOptional((prev) => ({ ...prev, [field]: value }));
|
|
27014
|
-
return /* @__PURE__ */
|
|
26942
|
+
return /* @__PURE__ */ jsx104(Card, { children: /* @__PURE__ */ jsxs80(CardContent, { className: "space-y-[var(--spacing-system-lf)] p-[var(--spacing-system-mf)]", children: [
|
|
27015
26943
|
/* @__PURE__ */ jsxs80("header", { className: "flex flex-col gap-[var(--spacing-system-sf)] sm:flex-row sm:items-start sm:justify-between", children: [
|
|
27016
26944
|
/* @__PURE__ */ jsxs80("div", { children: [
|
|
27017
|
-
/* @__PURE__ */
|
|
27018
|
-
description && /* @__PURE__ */
|
|
26945
|
+
/* @__PURE__ */ jsx104("h2", { className: "text-ods-text-primary text-h3", children: "Proxy credentials" }),
|
|
26946
|
+
description && /* @__PURE__ */ jsx104("p", { className: "text-ods-text-secondary text-h6", children: description })
|
|
27019
26947
|
] }),
|
|
27020
|
-
activeEmail && /* @__PURE__ */
|
|
26948
|
+
activeEmail && /* @__PURE__ */ jsx104("div", { className: "self-start", children: /* @__PURE__ */ jsx104(StatusBadge, { singleLine: true, colorScheme: "success", text: `Active: ${activeEmail}` }) })
|
|
27021
26949
|
] }),
|
|
27022
|
-
/* @__PURE__ */
|
|
26950
|
+
/* @__PURE__ */ jsx104(
|
|
27023
26951
|
Section,
|
|
27024
26952
|
{
|
|
27025
26953
|
title: "Credentials",
|
|
27026
26954
|
description: "A platform API key minted in /admin/api-keys for this platform, and the user to act as.",
|
|
27027
26955
|
children: /* @__PURE__ */ jsxs80("div", { className: "grid grid-cols-1 gap-[var(--spacing-system-sf)] md:grid-cols-2", children: [
|
|
27028
|
-
/* @__PURE__ */
|
|
26956
|
+
/* @__PURE__ */ jsx104(
|
|
27029
26957
|
Field,
|
|
27030
26958
|
{
|
|
27031
26959
|
label: "Platform API key",
|
|
27032
26960
|
required: true,
|
|
27033
26961
|
hint: "A SERVICE key may act as anyone; a personal key only as its owner.",
|
|
27034
|
-
labelEnd: /* @__PURE__ */
|
|
27035
|
-
children: (props) => /* @__PURE__ */
|
|
26962
|
+
labelEnd: /* @__PURE__ */ jsx104(HeaderName, { children: "Authorization" }),
|
|
26963
|
+
children: (props) => /* @__PURE__ */ jsx104(
|
|
27036
26964
|
Input,
|
|
27037
26965
|
{
|
|
27038
26966
|
...props,
|
|
@@ -27046,14 +26974,14 @@ function ProxyCredentialsForm({ description, saved }) {
|
|
|
27046
26974
|
)
|
|
27047
26975
|
}
|
|
27048
26976
|
),
|
|
27049
|
-
/* @__PURE__ */
|
|
26977
|
+
/* @__PURE__ */ jsx104(
|
|
27050
26978
|
Field,
|
|
27051
26979
|
{
|
|
27052
26980
|
label: "Act as",
|
|
27053
26981
|
required: true,
|
|
27054
26982
|
hint: "The end user the requests run as.",
|
|
27055
|
-
labelEnd: /* @__PURE__ */
|
|
27056
|
-
children: (props) => /* @__PURE__ */
|
|
26983
|
+
labelEnd: /* @__PURE__ */ jsx104(HeaderName, { children: "X-Chat-Act-As" }),
|
|
26984
|
+
children: (props) => /* @__PURE__ */ jsx104(
|
|
27057
26985
|
Input,
|
|
27058
26986
|
{
|
|
27059
26987
|
...props,
|
|
@@ -27070,16 +26998,16 @@ function ProxyCredentialsForm({ description, saved }) {
|
|
|
27070
26998
|
] })
|
|
27071
26999
|
}
|
|
27072
27000
|
),
|
|
27073
|
-
GROUPS.map((group) => /* @__PURE__ */
|
|
27001
|
+
GROUPS.map((group) => /* @__PURE__ */ jsx104(Section, { title: group.title, description: group.description, children: /* @__PURE__ */ jsx104("div", { className: "grid grid-cols-1 gap-[var(--spacing-system-sf)] md:grid-cols-2", children: EMBED_PROXY_OPTIONAL_HEADERS.filter((row) => row.group === group.id).map(({ field, header }) => {
|
|
27074
27002
|
const copy = OPTIONAL_FIELD_COPY[field];
|
|
27075
|
-
return /* @__PURE__ */
|
|
27003
|
+
return /* @__PURE__ */ jsx104(
|
|
27076
27004
|
Field,
|
|
27077
27005
|
{
|
|
27078
27006
|
label: copy.label,
|
|
27079
27007
|
hint: copy.hint,
|
|
27080
27008
|
error: errors[field] ?? null,
|
|
27081
|
-
labelEnd: /* @__PURE__ */
|
|
27082
|
-
children: (props) => /* @__PURE__ */
|
|
27009
|
+
labelEnd: /* @__PURE__ */ jsx104(HeaderName, { children: header }),
|
|
27010
|
+
children: (props) => /* @__PURE__ */ jsx104(
|
|
27083
27011
|
Input,
|
|
27084
27012
|
{
|
|
27085
27013
|
...props,
|
|
@@ -27095,18 +27023,18 @@ function ProxyCredentialsForm({ description, saved }) {
|
|
|
27095
27023
|
field
|
|
27096
27024
|
);
|
|
27097
27025
|
}) }) }, group.id)),
|
|
27098
|
-
/* @__PURE__ */
|
|
27026
|
+
/* @__PURE__ */ jsx104(Section, { title: "Headers sent", description: "What the next chat or MCP request carries, from the form as typed.", children: /* @__PURE__ */ jsx104("div", { className: "rounded-md border border-ods-border bg-ods-bg p-[var(--spacing-system-sf)]", children: preview.length ? /* @__PURE__ */ jsx104("dl", { className: "space-y-[var(--spacing-system-xxs)] font-mono text-h6", children: preview.map(([name, value]) => /* @__PURE__ */ jsxs80("div", { className: "flex flex-wrap gap-x-[var(--spacing-system-xsf)]", children: [
|
|
27099
27027
|
/* @__PURE__ */ jsxs80("dt", { className: "text-ods-text-secondary", children: [
|
|
27100
27028
|
name,
|
|
27101
27029
|
":"
|
|
27102
27030
|
] }),
|
|
27103
|
-
/* @__PURE__ */
|
|
27104
|
-
] }, name)) }) : /* @__PURE__ */
|
|
27031
|
+
/* @__PURE__ */ jsx104("dd", { className: "break-all text-ods-text-primary", children: value })
|
|
27032
|
+
] }, name)) }) : /* @__PURE__ */ jsx104("p", { className: "text-ods-text-secondary text-h6", children: "No proxy headers: requests use the session." }) }) }),
|
|
27105
27033
|
/* @__PURE__ */ jsxs80("div", { className: "flex flex-wrap items-center justify-between gap-[var(--spacing-system-sf)]", children: [
|
|
27106
|
-
/* @__PURE__ */
|
|
27034
|
+
/* @__PURE__ */ jsx104("span", { className: "text-ods-text-secondary text-h6", children: status }),
|
|
27107
27035
|
/* @__PURE__ */ jsxs80("div", { className: "flex gap-[var(--spacing-system-xsf)]", children: [
|
|
27108
|
-
/* @__PURE__ */
|
|
27109
|
-
/* @__PURE__ */
|
|
27036
|
+
/* @__PURE__ */ jsx104(Button, { variant: "outline", onClick: clear, disabled: !activeEmail && !secret && !email, children: "Clear" }),
|
|
27037
|
+
/* @__PURE__ */ jsx104(Button, { onClick: save, disabled: !canSave, children: "Save" })
|
|
27110
27038
|
] })
|
|
27111
27039
|
] })
|
|
27112
27040
|
] }) });
|
|
@@ -27167,8 +27095,6 @@ export {
|
|
|
27167
27095
|
ModalHeader,
|
|
27168
27096
|
ModalTitle,
|
|
27169
27097
|
ModalFooter,
|
|
27170
|
-
useResizablePanelSize,
|
|
27171
|
-
PanelResizeHandle,
|
|
27172
27098
|
OVERLAY_BACKDROP_CLASS,
|
|
27173
27099
|
Drawer,
|
|
27174
27100
|
DrawerTrigger,
|