@flamingo-stack/openframe-frontend-core 0.0.372 → 0.0.373-snapshot.20260706145330

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.
Files changed (99) hide show
  1. package/dist/{chunk-LPKQBDGY.cjs → chunk-2GRR6GSO.cjs} +26 -26
  2. package/dist/{chunk-LPKQBDGY.cjs.map → chunk-2GRR6GSO.cjs.map} +1 -1
  3. package/dist/{chunk-7A7K44DW.cjs → chunk-4DXWRLC4.cjs} +57 -57
  4. package/dist/{chunk-7A7K44DW.cjs.map → chunk-4DXWRLC4.cjs.map} +1 -1
  5. package/dist/{chunk-KPAB2RXJ.cjs → chunk-5SCIL5IK.cjs} +62 -62
  6. package/dist/{chunk-KPAB2RXJ.cjs.map → chunk-5SCIL5IK.cjs.map} +1 -1
  7. package/dist/{chunk-VVAKKX44.cjs → chunk-64TM6YLI.cjs} +37 -37
  8. package/dist/{chunk-VVAKKX44.cjs.map → chunk-64TM6YLI.cjs.map} +1 -1
  9. package/dist/{chunk-6XKKMJW4.js → chunk-6LKITKDS.js} +4 -4
  10. package/dist/{chunk-SVJ6TF2J.js → chunk-7ZAFRNT4.js} +2 -2
  11. package/dist/{chunk-V3XEWG2E.js → chunk-BCIETCTQ.js} +4 -4
  12. package/dist/{chunk-3MLQQZBN.js → chunk-BJX5HYBU.js} +2 -2
  13. package/dist/{chunk-Y7V5ZQ54.js → chunk-CTHA7BMH.js} +2 -2
  14. package/dist/{chunk-HWROGYII.js → chunk-EPR4XXRC.js} +2 -2
  15. package/dist/{chunk-DHZNTXJU.cjs → chunk-HA3KJN4J.cjs} +7 -7
  16. package/dist/{chunk-DHZNTXJU.cjs.map → chunk-HA3KJN4J.cjs.map} +1 -1
  17. package/dist/{chunk-YCIDCWA6.cjs → chunk-L7VRUDAP.cjs} +5 -5
  18. package/dist/{chunk-YCIDCWA6.cjs.map → chunk-L7VRUDAP.cjs.map} +1 -1
  19. package/dist/{chunk-A2HY3OMV.js → chunk-LDLRTG7B.js} +4 -4
  20. package/dist/{chunk-3QC76VZF.cjs → chunk-NMESBNMS.cjs} +25 -25
  21. package/dist/{chunk-3QC76VZF.cjs.map → chunk-NMESBNMS.cjs.map} +1 -1
  22. package/dist/{chunk-UI3YTBKK.js → chunk-NP3VAQE5.js} +2 -2
  23. package/dist/{chunk-J6JRBFJM.js → chunk-NVFKRKYO.js} +4 -4
  24. package/dist/{chunk-ZIPG4PAD.js → chunk-PUUB3ETT.js} +2 -2
  25. package/dist/{chunk-QN3WIJUN.cjs → chunk-QOPI56UU.cjs} +31 -31
  26. package/dist/{chunk-QN3WIJUN.cjs.map → chunk-QOPI56UU.cjs.map} +1 -1
  27. package/dist/{chunk-NIXFOPPT.js → chunk-UHO2TI5O.js} +207 -157
  28. package/dist/chunk-UHO2TI5O.js.map +1 -0
  29. package/dist/{chunk-O753O7H3.js → chunk-USUHSONY.js} +2 -2
  30. package/dist/{chunk-NRQSIW7I.cjs → chunk-V653GV4M.cjs} +388 -338
  31. package/dist/chunk-V653GV4M.cjs.map +1 -0
  32. package/dist/{chunk-7BO7CGXU.cjs → chunk-VS4RCAXP.cjs} +15 -15
  33. package/dist/{chunk-7BO7CGXU.cjs.map → chunk-VS4RCAXP.cjs.map} +1 -1
  34. package/dist/{chunk-KE4MBHEE.cjs → chunk-YZLZ35DX.cjs} +9 -9
  35. package/dist/{chunk-KE4MBHEE.cjs.map → chunk-YZLZ35DX.cjs.map} +1 -1
  36. package/dist/{chunk-GCXRNCZD.cjs → chunk-ZEYGYL76.cjs} +12 -12
  37. package/dist/{chunk-GCXRNCZD.cjs.map → chunk-ZEYGYL76.cjs.map} +1 -1
  38. package/dist/components/case-studies/index.cjs +8 -8
  39. package/dist/components/case-studies/index.js +2 -2
  40. package/dist/components/chat/index.cjs +2 -2
  41. package/dist/components/chat/index.js +1 -1
  42. package/dist/components/contact/index.cjs +3 -3
  43. package/dist/components/contact/index.js +2 -2
  44. package/dist/components/docs/index.cjs +5 -5
  45. package/dist/components/docs/index.js +4 -4
  46. package/dist/components/embeds/index.cjs +3 -3
  47. package/dist/components/embeds/index.js +2 -2
  48. package/dist/components/faq/index.cjs +3 -3
  49. package/dist/components/faq/index.js +2 -2
  50. package/dist/components/features/index.cjs +2 -2
  51. package/dist/components/features/index.js +1 -1
  52. package/dist/components/features/time-tracker/time-tracker-header-button.d.ts +2 -1
  53. package/dist/components/features/time-tracker/time-tracker-header-button.d.ts.map +1 -1
  54. package/dist/components/help-center-pages/index.cjs +20 -20
  55. package/dist/components/help-center-pages/index.js +11 -11
  56. package/dist/components/index.cjs +122 -120
  57. package/dist/components/index.cjs.map +1 -1
  58. package/dist/components/index.js +11 -9
  59. package/dist/components/index.js.map +1 -1
  60. package/dist/components/navigation/app-layout-drawer.d.ts.map +1 -1
  61. package/dist/components/navigation/app-layout.d.ts +20 -0
  62. package/dist/components/navigation/app-layout.d.ts.map +1 -1
  63. package/dist/components/navigation/index.cjs +2 -2
  64. package/dist/components/navigation/index.js +1 -1
  65. package/dist/components/navigation/mobile-burger-menu.d.ts.map +1 -1
  66. package/dist/components/onboarding-guides/index.cjs +5 -5
  67. package/dist/components/onboarding-guides/index.js +4 -4
  68. package/dist/components/related-content/index.cjs +3 -3
  69. package/dist/components/related-content/index.js +2 -2
  70. package/dist/components/tickets/index.cjs +5 -5
  71. package/dist/components/tickets/index.js +4 -4
  72. package/dist/components/ui/drawer.d.ts +5 -1
  73. package/dist/components/ui/drawer.d.ts.map +1 -1
  74. package/dist/components/ui/index.cjs +4 -2
  75. package/dist/components/ui/index.cjs.map +1 -1
  76. package/dist/components/ui/index.js +3 -1
  77. package/dist/index.cjs +4 -2
  78. package/dist/index.cjs.map +1 -1
  79. package/dist/index.js +3 -1
  80. package/package.json +1 -1
  81. package/src/components/chat/embeddable-chat.tsx +1 -1
  82. package/src/components/features/time-tracker/time-tracker-header-button.tsx +18 -1
  83. package/src/components/navigation/app-layout-drawer.tsx +31 -3
  84. package/src/components/navigation/app-layout.tsx +50 -2
  85. package/src/components/navigation/mobile-burger-menu.tsx +3 -2
  86. package/src/components/ui/drawer.tsx +8 -1
  87. package/dist/chunk-NIXFOPPT.js.map +0 -1
  88. package/dist/chunk-NRQSIW7I.cjs.map +0 -1
  89. /package/dist/{chunk-6XKKMJW4.js.map → chunk-6LKITKDS.js.map} +0 -0
  90. /package/dist/{chunk-SVJ6TF2J.js.map → chunk-7ZAFRNT4.js.map} +0 -0
  91. /package/dist/{chunk-V3XEWG2E.js.map → chunk-BCIETCTQ.js.map} +0 -0
  92. /package/dist/{chunk-3MLQQZBN.js.map → chunk-BJX5HYBU.js.map} +0 -0
  93. /package/dist/{chunk-Y7V5ZQ54.js.map → chunk-CTHA7BMH.js.map} +0 -0
  94. /package/dist/{chunk-HWROGYII.js.map → chunk-EPR4XXRC.js.map} +0 -0
  95. /package/dist/{chunk-A2HY3OMV.js.map → chunk-LDLRTG7B.js.map} +0 -0
  96. /package/dist/{chunk-UI3YTBKK.js.map → chunk-NP3VAQE5.js.map} +0 -0
  97. /package/dist/{chunk-J6JRBFJM.js.map → chunk-NVFKRKYO.js.map} +0 -0
  98. /package/dist/{chunk-ZIPG4PAD.js.map → chunk-PUUB3ETT.js.map} +0 -0
  99. /package/dist/{chunk-O753O7H3.js.map → chunk-USUHSONY.js.map} +0 -0
@@ -15722,6 +15722,7 @@ import * as DialogPrimitive2 from "@radix-ui/react-dialog";
15722
15722
  import { cva as cva7 } from "class-variance-authority";
15723
15723
  import { X as X5 } from "lucide-react";
15724
15724
  import { jsx as jsx117, jsxs as jsxs92 } from "react/jsx-runtime";
15725
+ var OVERLAY_BACKDROP_CLASS = "bg-black/50";
15725
15726
  var Drawer = DialogPrimitive2.Root;
15726
15727
  var DrawerTrigger = DialogPrimitive2.Trigger;
15727
15728
  var DrawerClose = DialogPrimitive2.Close;
@@ -15731,7 +15732,8 @@ var DrawerOverlay = React60.forwardRef(({ className, ...props }, ref) => /* @__P
15731
15732
  {
15732
15733
  ref,
15733
15734
  className: cn(
15734
- "fixed inset-0 z-[9997] bg-black/50 outline-none focus:outline-none focus-visible:outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
15735
+ "fixed inset-0 z-[9997] outline-none focus:outline-none focus-visible:outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
15736
+ OVERLAY_BACKDROP_CLASS,
15735
15737
  className
15736
15738
  ),
15737
15739
  ...props
@@ -24087,7 +24089,7 @@ function OrganizationCard({
24087
24089
 
24088
24090
  // src/components/ui/service-card.tsx
24089
24091
  init_cn();
24090
- import { useMemo as useMemo34, useState as useState85 } from "react";
24092
+ import { useMemo as useMemo35, useState as useState85 } from "react";
24091
24093
  import { ExternalLink as ExternalLink7 } from "lucide-react";
24092
24094
 
24093
24095
  // src/components/providers/dynamic-theme-provider.tsx
@@ -31270,6 +31272,19 @@ function TimeTrackerHeaderButton({ className, disabled }) {
31270
31272
  ] })
31271
31273
  }
31272
31274
  ) }),
31275
+ /* @__PURE__ */ jsx239(PopoverPrimitive5.Portal, { children: /* @__PURE__ */ jsx239(
31276
+ "div",
31277
+ {
31278
+ "aria-hidden": "true",
31279
+ "data-state": isOpen ? "open" : "closed",
31280
+ className: cn(
31281
+ "fixed inset-0 z-[1299]",
31282
+ OVERLAY_BACKDROP_CLASS,
31283
+ "data-[state=open]:animate-in data-[state=open]:fade-in-0",
31284
+ "data-[state=closed]:animate-out data-[state=closed]:fade-out-0"
31285
+ )
31286
+ }
31287
+ ) }),
31273
31288
  /* @__PURE__ */ jsx239(PopoverPrimitive5.Portal, { children: /* @__PURE__ */ jsx239(
31274
31289
  PopoverPrimitive5.Content,
31275
31290
  {
@@ -33608,7 +33623,7 @@ function NotificationsHeaderButton({
33608
33623
  }
33609
33624
 
33610
33625
  // src/components/navigation/app-layout.tsx
33611
- import { createContext as createContext9, Suspense as Suspense2, useCallback as useCallback35, useContext as useContext9, useState as useState83 } from "react";
33626
+ import { createContext as createContext9, Suspense as Suspense2, useCallback as useCallback35, useContext as useContext9, useMemo as useMemo34, useRef as useRef45, useState as useState83 } from "react";
33612
33627
 
33613
33628
  // src/components/navigation/mobile-burger-menu.tsx
33614
33629
  import React109, { useCallback as useCallback34, useEffect as useEffect64 } from "react";
@@ -33704,7 +33719,7 @@ var MobileBurgerMenu = React109.memo(function MobileBurgerMenu2({
33704
33719
  {
33705
33720
  className: cn(
33706
33721
  "fixed inset-0 z-[100] md:hidden",
33707
- "backdrop-blur-sm bg-ods-bg-overlay",
33722
+ OVERLAY_BACKDROP_CLASS,
33708
33723
  "transition-all duration-300",
33709
33724
  isOpen ? "opacity-100" : "opacity-0 pointer-events-none"
33710
33725
  ),
@@ -33814,6 +33829,10 @@ var AppLayoutDrawerContainerContext = createContext9(null);
33814
33829
  function useAppLayoutDrawerContainer() {
33815
33830
  return useContext9(AppLayoutDrawerContainerContext);
33816
33831
  }
33832
+ var AppLayoutDrawerCoordinationContext = createContext9(null);
33833
+ function useAppLayoutDrawerCoordination() {
33834
+ return useContext9(AppLayoutDrawerCoordinationContext);
33835
+ }
33817
33836
  function AppLayout({
33818
33837
  children,
33819
33838
  sidebarConfig,
@@ -33827,13 +33846,27 @@ function AppLayout({
33827
33846
  }) {
33828
33847
  const [mobileMenuOpen, setMobileMenuOpen] = useState83(false);
33829
33848
  const [drawerContainer, setDrawerContainer] = useState83(null);
33849
+ const mobileMenuOpenRef = useRef45(mobileMenuOpen);
33850
+ mobileMenuOpenRef.current = mobileMenuOpen;
33851
+ const drawerHandlesRef = useRef45(/* @__PURE__ */ new Set());
33830
33852
  const handleToggleMobileMenu = useCallback35(() => {
33831
- setMobileMenuOpen((prev) => !prev);
33853
+ const opening = !mobileMenuOpenRef.current;
33854
+ if (opening) {
33855
+ for (const handle of drawerHandlesRef.current) handle.close();
33856
+ }
33857
+ setMobileMenuOpen(opening);
33832
33858
  }, []);
33833
33859
  const handleCloseMobileMenu = useCallback35(() => {
33834
33860
  setMobileMenuOpen(false);
33835
33861
  }, []);
33836
- return /* @__PURE__ */ jsx262(AppLayoutDrawerContainerContext.Provider, { value: drawerContainer, children: /* @__PURE__ */ jsxs207("div", { className: cn("flex h-screen bg-ods-bg", className), children: [
33862
+ const drawerCoordination = useMemo34(() => ({
33863
+ notifyDrawerDidOpen: () => setMobileMenuOpen(false),
33864
+ registerDrawer: (handle) => {
33865
+ drawerHandlesRef.current.add(handle);
33866
+ return () => drawerHandlesRef.current.delete(handle);
33867
+ }
33868
+ }), []);
33869
+ return /* @__PURE__ */ jsx262(AppLayoutDrawerContainerContext.Provider, { value: drawerContainer, children: /* @__PURE__ */ jsx262(AppLayoutDrawerCoordinationContext.Provider, { value: drawerCoordination, children: /* @__PURE__ */ jsxs207("div", { className: cn("flex h-screen bg-ods-bg", className), children: [
33837
33870
  /* @__PURE__ */ jsx262(NavigationSidebar, { config: sidebarConfig, disabled }),
33838
33871
  /* @__PURE__ */ jsx262(
33839
33872
  MobileBurgerMenu,
@@ -33868,7 +33901,7 @@ function AppLayout({
33868
33901
  }
33869
33902
  )
33870
33903
  ] })
33871
- ] }) });
33904
+ ] }) }) });
33872
33905
  }
33873
33906
 
33874
33907
  // src/components/navigation/app-layout-drawer.tsx
@@ -33896,6 +33929,21 @@ var AppLayoutDrawerRoot = ({
33896
33929
  },
33897
33930
  [isControlled, onOpenChange]
33898
33931
  );
33932
+ const coordination = useAppLayoutDrawerCoordination();
33933
+ const openRef = React110.useRef(open);
33934
+ openRef.current = open;
33935
+ const handleOpenChangeRef = React110.useRef(handleOpenChange);
33936
+ handleOpenChangeRef.current = handleOpenChange;
33937
+ React110.useEffect(() => {
33938
+ if (open) coordination?.notifyDrawerDidOpen();
33939
+ }, [open, coordination]);
33940
+ React110.useEffect(() => {
33941
+ return coordination?.registerDrawer({
33942
+ close: () => {
33943
+ if (openRef.current) handleOpenChangeRef.current(false);
33944
+ }
33945
+ });
33946
+ }, [coordination]);
33899
33947
  return /* @__PURE__ */ jsx263(DrawerOpenContext.Provider, { value: open, children: /* @__PURE__ */ jsx263(
33900
33948
  DialogPrimitive3.Root,
33901
33949
  {
@@ -33911,7 +33959,7 @@ AppLayoutDrawerRoot.displayName = "AppLayoutDrawer";
33911
33959
  var AppLayoutDrawerTrigger = DialogPrimitive3.Trigger;
33912
33960
  var AppLayoutDrawerClose = DialogPrimitive3.Close;
33913
33961
  var appLayoutDrawerVariants = cva11(
33914
- "absolute z-[45] flex outline-none focus:outline-none focus-visible:outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-300",
33962
+ "absolute z-[103] flex outline-none focus:outline-none focus-visible:outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-300",
33915
33963
  {
33916
33964
  variants: {
33917
33965
  side: {
@@ -34245,7 +34293,8 @@ var AppLayoutDrawerContent = React110.forwardRef(
34245
34293
  "aria-hidden": true,
34246
34294
  "data-state": open ? "open" : "closed",
34247
34295
  className: cn(
34248
- "absolute inset-0 z-[40] bg-[color-mix(in_srgb,var(--ods-system-greys-background)_50%,transparent)] outline-none data-[state=open]:pointer-events-auto data-[state=closed]:pointer-events-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
34296
+ "absolute inset-0 z-[102] outline-none data-[state=open]:pointer-events-auto data-[state=closed]:pointer-events-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
34297
+ OVERLAY_BACKDROP_CLASS,
34249
34298
  // Persist mode only: hold the fade-out's final (transparent) frame
34250
34299
  // so the backdrop doesn't snap back to opacity 1 and dim the whole
34251
34300
  // content area while the drawer is "closed" (see PERSIST_CLOSED_HOLD).
@@ -34890,7 +34939,7 @@ ScriptArguments.displayName = "ScriptArguments";
34890
34939
 
34891
34940
  // src/components/shared/onboarding/onboarding-walkthrough.tsx
34892
34941
  init_button2();
34893
- import React112, { useRef as useRef46, useCallback as useCallback37 } from "react";
34942
+ import React112, { useRef as useRef47, useCallback as useCallback37 } from "react";
34894
34943
 
34895
34944
  // src/components/shared/onboarding/onboarding-step-card.tsx
34896
34945
  import React111 from "react";
@@ -35014,10 +35063,10 @@ function OnboardingWalkthrough({
35014
35063
  allStepsComplete,
35015
35064
  markMultipleComplete
35016
35065
  } = useOnboardingState(storageKey);
35017
- const hasAutoMarkedRef = useRef46(false);
35018
- const autoMarkingInProgressRef = useRef46(false);
35019
- const lastCompletionStatusRef = useRef46(null);
35020
- const actionInProgressRef = useRef46(/* @__PURE__ */ new Set());
35066
+ const hasAutoMarkedRef = useRef47(false);
35067
+ const autoMarkingInProgressRef = useRef47(false);
35068
+ const lastCompletionStatusRef = useRef47(null);
35069
+ const actionInProgressRef = useRef47(/* @__PURE__ */ new Set());
35021
35070
  React112.useEffect(() => {
35022
35071
  if (isLoadingCompletion) {
35023
35072
  hasAutoMarkedRef.current = false;
@@ -35358,7 +35407,7 @@ function ServiceCard({ title, subtitle, icon, tag, rows, className }) {
35358
35407
  function ServiceCardRowItem({ row }) {
35359
35408
  const [revealed, setRevealed] = useState85(false);
35360
35409
  const { copy, copied } = useCopyToClipboard();
35361
- const actions = useMemo34(() => ({ copy: true, open: !!row.href, reveal: !!row.isSecret, ...row.actions }), [row]);
35410
+ const actions = useMemo35(() => ({ copy: true, open: !!row.href, reveal: !!row.isSecret, ...row.actions }), [row]);
35362
35411
  const displayValue = row.isSecret ? /* @__PURE__ */ jsx276(MaskedValue, { value: row.value, isRevealed: revealed }) : /* @__PURE__ */ jsx276("span", { children: row.value });
35363
35412
  const handleCopy = () => copy(row.copyValue ?? row.value);
35364
35413
  const openInNewTab = () => {
@@ -35702,7 +35751,7 @@ var ListLoader = (props) => /* @__PURE__ */ jsx281(ContentLoader, { ...props, va
35702
35751
 
35703
35752
  // src/components/ui/table/table.tsx
35704
35753
  init_cn();
35705
- import { useEffect as useEffect67, useRef as useRef48 } from "react";
35754
+ import { useEffect as useEffect67, useRef as useRef49 } from "react";
35706
35755
  init_pagination();
35707
35756
  init_button2();
35708
35757
 
@@ -36462,8 +36511,8 @@ function Table({
36462
36511
  };
36463
36512
  const allSelected = selectedRows.length > 0 && selectedRows.length === data.length;
36464
36513
  const someSelected = selectedRows.length > 0 && selectedRows.length < data.length;
36465
- const sentinelRef = useRef48(null);
36466
- const onLoadMoreRef = useRef48(infiniteScroll?.onLoadMore);
36514
+ const sentinelRef = useRef49(null);
36515
+ const onLoadMoreRef = useRef49(infiniteScroll?.onLoadMore);
36467
36516
  onLoadMoreRef.current = infiniteScroll?.onLoadMore;
36468
36517
  useEffect67(() => {
36469
36518
  if (!infiniteScroll?.hasNextPage || infiniteScroll.isFetchingNextPage) return;
@@ -36679,11 +36728,11 @@ function TableTimestampCell({
36679
36728
  // src/components/ui/query-report-table/query-report-table.tsx
36680
36729
  init_cn();
36681
36730
  init_button2();
36682
- import { useMemo as useMemo35 } from "react";
36731
+ import { useMemo as useMemo36 } from "react";
36683
36732
 
36684
36733
  // src/components/ui/query-report-table/query-report-table-header.tsx
36685
36734
  init_cn();
36686
- import { useRef as useRef49, useState as useState87, useCallback as useCallback38 } from "react";
36735
+ import { useRef as useRef50, useState as useState87, useCallback as useCallback38 } from "react";
36687
36736
  import { jsx as jsx293, jsxs as jsxs233 } from "react/jsx-runtime";
36688
36737
  function QueryReportTableHeader({
36689
36738
  columns,
@@ -36712,7 +36761,7 @@ function QueryReportTableHeader({
36712
36761
  );
36713
36762
  }
36714
36763
  function TruncatedHeaderCell({ value, width }) {
36715
- const textRef = useRef49(null);
36764
+ const textRef = useRef50(null);
36716
36765
  const [isTruncated, setIsTruncated] = useState87(false);
36717
36766
  const checkTruncation = useCallback38(() => {
36718
36767
  const el = textRef.current;
@@ -36742,7 +36791,7 @@ function TruncatedHeaderCell({ value, width }) {
36742
36791
 
36743
36792
  // src/components/ui/query-report-table/query-report-table-row.tsx
36744
36793
  init_cn();
36745
- import { useRef as useRef50, useState as useState88, useCallback as useCallback39 } from "react";
36794
+ import { useRef as useRef51, useState as useState88, useCallback as useCallback39 } from "react";
36746
36795
  import { jsx as jsx294, jsxs as jsxs234 } from "react/jsx-runtime";
36747
36796
  function QueryReportTableRow({
36748
36797
  row,
@@ -36788,7 +36837,7 @@ function QueryReportTableRow({
36788
36837
  );
36789
36838
  }
36790
36839
  function TruncatedCell({ value, className }) {
36791
- const textRef = useRef50(null);
36840
+ const textRef = useRef51(null);
36792
36841
  const [isTruncated, setIsTruncated] = useState88(false);
36793
36842
  const checkTruncation = useCallback39(() => {
36794
36843
  const el = textRef.current;
@@ -36917,7 +36966,7 @@ function QueryReportTable({
36917
36966
  tableClassName
36918
36967
  }) {
36919
36968
  const isCompact = variant === "compact";
36920
- const columns = useMemo35(
36969
+ const columns = useMemo36(
36921
36970
  () => deriveColumns(data, columnOrder),
36922
36971
  [data, columnOrder]
36923
36972
  );
@@ -37053,7 +37102,7 @@ init_cn();
37053
37102
 
37054
37103
  // src/components/ui/data-table/data-table-column-filter.tsx
37055
37104
  init_cn();
37056
- import { useCallback as useCallback40, useMemo as useMemo36 } from "react";
37105
+ import { useCallback as useCallback40, useMemo as useMemo37 } from "react";
37057
37106
 
37058
37107
  // src/components/ui/data-table/utils.ts
37059
37108
  function getHideClasses2(hideAt) {
@@ -37097,7 +37146,7 @@ function DataTableColumnFilter({
37097
37146
  }) {
37098
37147
  const currentValue = column.getFilterValue();
37099
37148
  const activeCount = currentValue?.length ?? 0;
37100
- const sections = useMemo36(
37149
+ const sections = useMemo37(
37101
37150
  () => [
37102
37151
  {
37103
37152
  id: column.id,
@@ -37109,7 +37158,7 @@ function DataTableColumnFilter({
37109
37158
  ],
37110
37159
  [column.id, label, options]
37111
37160
  );
37112
- const currentFilters = useMemo36(
37161
+ const currentFilters = useMemo37(
37113
37162
  () => ({ [column.id]: currentValue ?? EMPTY_ARRAY }),
37114
37163
  [column.id, currentValue]
37115
37164
  );
@@ -37288,7 +37337,7 @@ function DataTableEmpty({ className, ...props }) {
37288
37337
  // src/components/ui/data-table/data-table-row.tsx
37289
37338
  init_next_link();
37290
37339
  init_cn();
37291
- import { memo as memo5, useCallback as useCallback41, useRef as useRef51 } from "react";
37340
+ import { memo as memo5, useCallback as useCallback41, useRef as useRef52 } from "react";
37292
37341
  import { flexRender as flexRender2 } from "@tanstack/react-table";
37293
37342
 
37294
37343
  // src/components/ui/data-table/data-table-skeleton.tsx
@@ -37372,7 +37421,7 @@ function DataTableRowImpl({
37372
37421
  const hasSubRow = subRow != null && subRow !== false;
37373
37422
  const isLinkMode = Boolean(href) && !onClick;
37374
37423
  const isWholeCardLink = isLinkMode && !hasSubRow;
37375
- const containerRef = useRef51(null);
37424
+ const containerRef = useRef52(null);
37376
37425
  const handleClick = useCallback41(
37377
37426
  (e) => {
37378
37427
  const target = e.target;
@@ -37538,7 +37587,7 @@ function DataTableBody({
37538
37587
  }
37539
37588
 
37540
37589
  // src/components/ui/data-table/data-table-infinite-footer.tsx
37541
- import { useEffect as useEffect68, useRef as useRef52 } from "react";
37590
+ import { useEffect as useEffect68, useRef as useRef53 } from "react";
37542
37591
  import { Fragment as Fragment57, jsx as jsx304, jsxs as jsxs242 } from "react/jsx-runtime";
37543
37592
  function DataTableInfiniteFooter({
37544
37593
  hasNextPage,
@@ -37547,8 +37596,8 @@ function DataTableInfiniteFooter({
37547
37596
  skeletonRows = 3,
37548
37597
  rootMargin = "200px"
37549
37598
  }) {
37550
- const sentinelRef = useRef52(null);
37551
- const onLoadMoreRef = useRef52(onLoadMore);
37599
+ const sentinelRef = useRef53(null);
37600
+ const onLoadMoreRef = useRef53(onLoadMore);
37552
37601
  onLoadMoreRef.current = onLoadMore;
37553
37602
  useEffect68(() => {
37554
37603
  if (!hasNextPage || isFetchingNextPage) return;
@@ -38185,7 +38234,7 @@ function FilterList({
38185
38234
  // src/components/ui/tag-search-input.tsx
38186
38235
  import {
38187
38236
  useEffect as useEffect70,
38188
- useRef as useRef54,
38237
+ useRef as useRef55,
38189
38238
  useState as useState90
38190
38239
  } from "react";
38191
38240
  init_cn();
@@ -38220,9 +38269,9 @@ function TagSearchInput({
38220
38269
  limitTags,
38221
38270
  placeholder: currentPlaceholder
38222
38271
  });
38223
- const wrapperRef = useRef54(null);
38224
- const hiddenTagsRef = useRef54(null);
38225
- const hiddenTagsPopupRef = useRef54(null);
38272
+ const wrapperRef = useRef55(null);
38273
+ const hiddenTagsRef = useRef55(null);
38274
+ const hiddenTagsPopupRef = useRef55(null);
38226
38275
  const [showHiddenTags, setShowHiddenTags] = useState90(false);
38227
38276
  useEffect70(() => {
38228
38277
  if (!showHiddenTags) return;
@@ -38379,7 +38428,7 @@ function TagSearchInput({
38379
38428
  }
38380
38429
 
38381
38430
  // src/components/ui/markdown-editor.tsx
38382
- import { useRef as useRef55, useCallback as useCallback42, useState as useState91, useEffect as useEffect71 } from "react";
38431
+ import { useRef as useRef56, useCallback as useCallback42, useState as useState91, useEffect as useEffect71 } from "react";
38383
38432
  init_cn();
38384
38433
  import { Loader2 as Loader29, Upload as Upload8 } from "lucide-react";
38385
38434
  import { jsx as jsx309, jsxs as jsxs247 } from "react/jsx-runtime";
@@ -38434,7 +38483,7 @@ function MarkdownEditor({
38434
38483
  onFileUploaded,
38435
38484
  renderPreview
38436
38485
  }) {
38437
- const fileInputRef = useRef55(null);
38486
+ const fileInputRef = useRef56(null);
38438
38487
  const [isUploading, setIsUploading] = useState91(false);
38439
38488
  const [uploadProgress, setUploadProgress] = useState91("");
38440
38489
  const [defaultExtraCommands, setDefaultExtraCommands] = useState91([]);
@@ -38527,11 +38576,11 @@ function MarkdownEditor({
38527
38576
  }
38528
38577
  } : null;
38529
38578
  const extraCommands = uploadCommand ? [...defaultExtraCommands, uploadCommand] : defaultExtraCommands;
38530
- const wrapperRef = useRef55(null);
38531
- const isDraggingRef = useRef55(false);
38532
- const mouseYRef = useRef55(0);
38533
- const rafRef = useRef55(0);
38534
- const scrollParentRef = useRef55(window);
38579
+ const wrapperRef = useRef56(null);
38580
+ const isDraggingRef = useRef56(false);
38581
+ const mouseYRef = useRef56(0);
38582
+ const rafRef = useRef56(0);
38583
+ const scrollParentRef = useRef56(window);
38535
38584
  const EDGE_ZONE = 60;
38536
38585
  const MAX_SCROLL_SPEED = 15;
38537
38586
  const findScrollParent = useCallback42((el) => {
@@ -44109,7 +44158,7 @@ function renderChatInlineEntityCard(chatRef, options = {}) {
44109
44158
  }
44110
44159
 
44111
44160
  // src/components/chat/hooks/use-chunk-catchup.ts
44112
- import { useCallback as useCallback44, useRef as useRef59 } from "react";
44161
+ import { useCallback as useCallback44, useRef as useRef60 } from "react";
44113
44162
  function makeSeqKey(messageType, chunkType, sequenceId) {
44114
44163
  return `${messageType}:${chunkType}:${sequenceId}`;
44115
44164
  }
@@ -44131,20 +44180,20 @@ function useChunkCatchup({
44131
44180
  chatTypes = [CHAT_TYPE.CLIENT],
44132
44181
  fetchChunks
44133
44182
  }) {
44134
- const processedSequenceKeys = useRef59(/* @__PURE__ */ new Set());
44135
- const lastSequenceId = useRef59(null);
44136
- const fetchingInProgress = useRef59(false);
44137
- const lastFetchParams = useRef59(null);
44138
- const chunkBuffer = useRef59([]);
44139
- const bufferUntilInitialCatchupComplete = useRef59(false);
44140
- const hasCompletedInitialCatchup = useRef59(false);
44141
- const dialogIdRef = useRef59(dialogId);
44183
+ const processedSequenceKeys = useRef60(/* @__PURE__ */ new Set());
44184
+ const lastSequenceId = useRef60(null);
44185
+ const fetchingInProgress = useRef60(false);
44186
+ const lastFetchParams = useRef60(null);
44187
+ const chunkBuffer = useRef60([]);
44188
+ const bufferUntilInitialCatchupComplete = useRef60(false);
44189
+ const hasCompletedInitialCatchup = useRef60(false);
44190
+ const dialogIdRef = useRef60(dialogId);
44142
44191
  dialogIdRef.current = dialogId;
44143
- const chatTypesRef = useRef59(chatTypes);
44192
+ const chatTypesRef = useRef60(chatTypes);
44144
44193
  chatTypesRef.current = chatTypes;
44145
- const fetchChunksRef = useRef59(fetchChunks);
44194
+ const fetchChunksRef = useRef60(fetchChunks);
44146
44195
  fetchChunksRef.current = fetchChunks;
44147
- const onChunkReceivedRef = useRef59(onChunkReceived);
44196
+ const onChunkReceivedRef = useRef60(onChunkReceived);
44148
44197
  onChunkReceivedRef.current = onChunkReceived;
44149
44198
  const processChunk = useCallback44((chunk, messageType, forceProcess = false) => {
44150
44199
  if (bufferUntilInitialCatchupComplete.current && !forceProcess) {
@@ -44321,7 +44370,7 @@ function useChunkCatchup({
44321
44370
  }
44322
44371
 
44323
44372
  // src/components/chat/hooks/use-jetstream-dialog-subscription.ts
44324
- import { useEffect as useEffect75, useRef as useRef60, useState as useState101 } from "react";
44373
+ import { useEffect as useEffect75, useRef as useRef61, useState as useState101 } from "react";
44325
44374
  var DEFAULT_INACTIVE_THRESHOLD_MS = 5 * 6e4;
44326
44375
  var DEFAULT_STREAM_NAME = "CHAT_CHUNKS";
44327
44376
  function useJetStreamDialogSubscription({
@@ -44344,51 +44393,51 @@ function useJetStreamDialogSubscription({
44344
44393
  const [isSubscribed, setIsSubscribed] = useState101(false);
44345
44394
  const [reconnectionCount, setReconnectionCount] = useState101(0);
44346
44395
  const [currentStreamSeq, setCurrentStreamSeq] = useState101(null);
44347
- const clientRef = useRef60(null);
44348
- const subscriptionRef = useRef60(null);
44349
- const highestStreamSeqRef = useRef60(null);
44350
- const onEventRef = useRef60(onEvent);
44396
+ const clientRef = useRef61(null);
44397
+ const subscriptionRef = useRef61(null);
44398
+ const highestStreamSeqRef = useRef61(null);
44399
+ const onEventRef = useRef61(onEvent);
44351
44400
  useEffect75(() => {
44352
44401
  onEventRef.current = onEvent;
44353
44402
  }, [onEvent]);
44354
- const onConnectRef = useRef60(onConnect);
44403
+ const onConnectRef = useRef61(onConnect);
44355
44404
  useEffect75(() => {
44356
44405
  onConnectRef.current = onConnect;
44357
44406
  }, [onConnect]);
44358
- const onDisconnectRef = useRef60(onDisconnect);
44407
+ const onDisconnectRef = useRef61(onDisconnect);
44359
44408
  useEffect75(() => {
44360
44409
  onDisconnectRef.current = onDisconnect;
44361
44410
  }, [onDisconnect]);
44362
- const onSubscribedRef = useRef60(onSubscribed);
44411
+ const onSubscribedRef = useRef61(onSubscribed);
44363
44412
  useEffect75(() => {
44364
44413
  onSubscribedRef.current = onSubscribed;
44365
44414
  }, [onSubscribed]);
44366
- const onBeforeReconnectRef = useRef60(onBeforeReconnect);
44415
+ const onBeforeReconnectRef = useRef61(onBeforeReconnect);
44367
44416
  useEffect75(() => {
44368
44417
  onBeforeReconnectRef.current = onBeforeReconnect;
44369
44418
  }, [onBeforeReconnect]);
44370
- const getNatsWsUrlRef = useRef60(getNatsWsUrl);
44419
+ const getNatsWsUrlRef = useRef61(getNatsWsUrl);
44371
44420
  useEffect75(() => {
44372
44421
  getNatsWsUrlRef.current = getNatsWsUrl;
44373
44422
  }, [getNatsWsUrl]);
44374
- const reconnectionBackoffRef = useRef60(reconnectionBackoff);
44423
+ const reconnectionBackoffRef = useRef61(reconnectionBackoff);
44375
44424
  useEffect75(() => {
44376
44425
  reconnectionBackoffRef.current = reconnectionBackoff;
44377
44426
  }, [reconnectionBackoff]);
44378
- const optStartSeqRef = useRef60(optStartSeq);
44427
+ const optStartSeqRef = useRef61(optStartSeq);
44379
44428
  useEffect75(() => {
44380
44429
  optStartSeqRef.current = optStartSeq;
44381
44430
  }, [optStartSeq]);
44382
- const inactiveThresholdRef = useRef60(inactiveThresholdMs);
44431
+ const inactiveThresholdRef = useRef61(inactiveThresholdMs);
44383
44432
  useEffect75(() => {
44384
44433
  inactiveThresholdRef.current = inactiveThresholdMs;
44385
44434
  }, [inactiveThresholdMs]);
44386
- const hadConnectionBeforeRef = useRef60(false);
44387
- const clientConfigRef = useRef60(clientConfig);
44435
+ const hadConnectionBeforeRef = useRef61(false);
44436
+ const clientConfigRef = useRef61(clientConfig);
44388
44437
  useEffect75(() => {
44389
44438
  clientConfigRef.current = clientConfig;
44390
44439
  }, [clientConfig]);
44391
- const currentWsUrlRef = useRef60("");
44440
+ const currentWsUrlRef = useRef61("");
44392
44441
  const wsUrl = getNatsWsUrl();
44393
44442
  useEffect75(() => {
44394
44443
  if (!enabled || !wsUrl) {
@@ -44562,7 +44611,7 @@ function useJetStreamDialogSubscription({
44562
44611
  }
44563
44612
 
44564
44613
  // src/components/chat/hooks/use-nats-dialog-subscription.ts
44565
- import { useEffect as useEffect76, useRef as useRef61, useState as useState102 } from "react";
44614
+ import { useEffect as useEffect76, useRef as useRef62, useState as useState102 } from "react";
44566
44615
  function useNatsDialogSubscription({
44567
44616
  enabled,
44568
44617
  dialogId,
@@ -44579,42 +44628,42 @@ function useNatsDialogSubscription({
44579
44628
  const [isConnected, setIsConnected] = useState102(false);
44580
44629
  const [isSubscribed, setIsSubscribed] = useState102(false);
44581
44630
  const [reconnectionCount, setReconnectionCount] = useState102(0);
44582
- const clientRef = useRef61(null);
44583
- const subscriptionRefs = useRef61(/* @__PURE__ */ new Map());
44584
- const onEventRef = useRef61(onEvent);
44631
+ const clientRef = useRef62(null);
44632
+ const subscriptionRefs = useRef62(/* @__PURE__ */ new Map());
44633
+ const onEventRef = useRef62(onEvent);
44585
44634
  useEffect76(() => {
44586
44635
  onEventRef.current = onEvent;
44587
44636
  }, [onEvent]);
44588
- const onConnectRef = useRef61(onConnect);
44637
+ const onConnectRef = useRef62(onConnect);
44589
44638
  useEffect76(() => {
44590
44639
  onConnectRef.current = onConnect;
44591
44640
  }, [onConnect]);
44592
- const onDisconnectRef = useRef61(onDisconnect);
44641
+ const onDisconnectRef = useRef62(onDisconnect);
44593
44642
  useEffect76(() => {
44594
44643
  onDisconnectRef.current = onDisconnect;
44595
44644
  }, [onDisconnect]);
44596
- const onSubscribedRef = useRef61(onSubscribed);
44645
+ const onSubscribedRef = useRef62(onSubscribed);
44597
44646
  useEffect76(() => {
44598
44647
  onSubscribedRef.current = onSubscribed;
44599
44648
  }, [onSubscribed]);
44600
- const onBeforeReconnectRef = useRef61(onBeforeReconnect);
44649
+ const onBeforeReconnectRef = useRef62(onBeforeReconnect);
44601
44650
  useEffect76(() => {
44602
44651
  onBeforeReconnectRef.current = onBeforeReconnect;
44603
44652
  }, [onBeforeReconnect]);
44604
- const hadConnectionBeforeRef = useRef61(false);
44605
- const getNatsWsUrlRef = useRef61(getNatsWsUrl);
44653
+ const hadConnectionBeforeRef = useRef62(false);
44654
+ const getNatsWsUrlRef = useRef62(getNatsWsUrl);
44606
44655
  useEffect76(() => {
44607
44656
  getNatsWsUrlRef.current = getNatsWsUrl;
44608
44657
  }, [getNatsWsUrl]);
44609
- const reconnectionBackoffRef = useRef61(reconnectionBackoff);
44658
+ const reconnectionBackoffRef = useRef62(reconnectionBackoff);
44610
44659
  useEffect76(() => {
44611
44660
  reconnectionBackoffRef.current = reconnectionBackoff;
44612
44661
  }, [reconnectionBackoff]);
44613
- const clientConfigRef = useRef61(clientConfig);
44662
+ const clientConfigRef = useRef62(clientConfig);
44614
44663
  useEffect76(() => {
44615
44664
  clientConfigRef.current = clientConfig;
44616
44665
  }, [clientConfig]);
44617
- const currentWsUrlRef = useRef61("");
44666
+ const currentWsUrlRef = useRef62("");
44618
44667
  const wsUrl = getNatsWsUrl();
44619
44668
  useEffect76(() => {
44620
44669
  if (!enabled || !wsUrl) {
@@ -44698,13 +44747,13 @@ function useNatsDialogSubscription({
44698
44747
  };
44699
44748
  }, [enabled, wsUrl]);
44700
44749
  const topicsKey = topics.join(",");
44701
- const lastSubscribedDialogIdRef = useRef61(null);
44702
- const isConnectedRef = useRef61(isConnected);
44750
+ const lastSubscribedDialogIdRef = useRef62(null);
44751
+ const isConnectedRef = useRef62(isConnected);
44703
44752
  useEffect76(() => {
44704
44753
  isConnectedRef.current = isConnected;
44705
44754
  }, [isConnected]);
44706
- const currentDialogIdRef = useRef61(null);
44707
- const abortControllerRef = useRef61(null);
44755
+ const currentDialogIdRef = useRef62(null);
44756
+ const abortControllerRef = useRef62(null);
44708
44757
  useEffect76(() => {
44709
44758
  currentDialogIdRef.current = dialogId;
44710
44759
  if (!enabled || !dialogId) {
@@ -44836,7 +44885,7 @@ function buildNatsWsUrl(apiBaseUrl, options) {
44836
44885
  }
44837
44886
 
44838
44887
  // src/components/chat/hooks/use-realtime-chunk-processor.ts
44839
- import { useCallback as useCallback45, useRef as useRef62, useEffect as useEffect77 } from "react";
44888
+ import { useCallback as useCallback45, useRef as useRef63, useEffect as useEffect77 } from "react";
44840
44889
 
44841
44890
  // src/components/chat/utils/chunk-parser.ts
44842
44891
  function normalizeToolCalls(raw) {
@@ -45487,13 +45536,13 @@ function useRealtimeChunkProcessor(options) {
45487
45536
  batchApprovalsEnabled = true,
45488
45537
  isDirectMode = false
45489
45538
  } = options;
45490
- const accumulatorRef = useRef62(
45539
+ const accumulatorRef = useRef63(
45491
45540
  createMessageSegmentAccumulator({
45492
45541
  onApprove: callbacks.onApprove,
45493
45542
  onReject: callbacks.onReject
45494
45543
  })
45495
45544
  );
45496
- const hasInitializedWithData = useRef62(false);
45545
+ const hasInitializedWithData = useRef63(false);
45497
45546
  useEffect77(() => {
45498
45547
  if (initialState && !hasInitializedWithData.current) {
45499
45548
  accumulatorRef.current.initializeWithState(initialState);
@@ -45507,14 +45556,14 @@ function useRealtimeChunkProcessor(options) {
45507
45556
  hasInitializedWithData.current = true;
45508
45557
  }
45509
45558
  }, [initialState, callbacks]);
45510
- const isInStreamRef = useRef62(false);
45511
- const hasEverStreamedRef = useRef62(false);
45512
- const directModeFlagRef = useRef62(isDirectMode);
45513
- const sawDirectMessageRef = useRef62(false);
45559
+ const isInStreamRef = useRef63(false);
45560
+ const hasEverStreamedRef = useRef63(false);
45561
+ const directModeFlagRef = useRef63(isDirectMode);
45562
+ const sawDirectMessageRef = useRef63(false);
45514
45563
  useEffect77(() => {
45515
45564
  directModeFlagRef.current = isDirectMode;
45516
45565
  }, [isDirectMode]);
45517
- const pendingEscalatedRef = useRef62(/* @__PURE__ */ new Map());
45566
+ const pendingEscalatedRef = useRef63(/* @__PURE__ */ new Map());
45518
45567
  const processChunk = useCallback45(
45519
45568
  (chunk) => {
45520
45569
  const action = parseChunkToAction(chunk);
@@ -45897,7 +45946,7 @@ function useEmptyStateConfig(emptyStateUrl, options) {
45897
45946
  }
45898
45947
 
45899
45948
  // src/components/chat/hooks/use-chat-attachments.ts
45900
- import { useCallback as useCallback46, useMemo as useMemo39, useRef as useRef63, useState as useState104 } from "react";
45949
+ import { useCallback as useCallback46, useMemo as useMemo40, useRef as useRef64, useState as useState104 } from "react";
45901
45950
  import { fileTypeFromBlob } from "file-type";
45902
45951
  var CHAT_ATTACHMENTS_BUCKET = "chat-attachments";
45903
45952
  var CHAT_ATTACHMENTS_FOLDER = "chat";
@@ -45974,7 +46023,7 @@ function useChatAttachments() {
45974
46023
  const runtime = useRequiredChatRuntime();
45975
46024
  const uploadUrlEndpoint = runtime.endpoints.attachmentUploadUrl;
45976
46025
  const [attachments, setAttachments] = useState104([]);
45977
- const controllersRef = useRef63(/* @__PURE__ */ new Map());
46026
+ const controllersRef = useRef64(/* @__PURE__ */ new Map());
45978
46027
  const updateOne = useCallback46((id, patch) => {
45979
46028
  setAttachments((prev) => prev.map((a) => a.id === id ? { ...a, ...patch } : a));
45980
46029
  }, []);
@@ -46063,7 +46112,7 @@ function useChatAttachments() {
46063
46112
  },
46064
46113
  [uploadUrlEndpoint, updateOne]
46065
46114
  );
46066
- const attachmentsRef = useRef63([]);
46115
+ const attachmentsRef = useRef64([]);
46067
46116
  attachmentsRef.current = attachments;
46068
46117
  const addFiles = useCallback46(
46069
46118
  (files) => {
@@ -46114,7 +46163,7 @@ function useChatAttachments() {
46114
46163
  },
46115
46164
  [uploadOne]
46116
46165
  );
46117
- const readyAttachments = useMemo39(
46166
+ const readyAttachments = useMemo40(
46118
46167
  () => attachments.filter(
46119
46168
  (a) => a.status === "ready" && !!a.storagePath && !!a.viewToken
46120
46169
  ).map((a) => ({
@@ -46140,13 +46189,13 @@ function useChatAttachments() {
46140
46189
  }
46141
46190
 
46142
46191
  // src/components/chat/hooks/use-chat-attachment-image-gallery.tsx
46143
- import { useCallback as useCallback47, useEffect as useEffect79, useRef as useRef64, useState as useState105 } from "react";
46192
+ import { useCallback as useCallback47, useEffect as useEffect79, useRef as useRef65, useState as useState105 } from "react";
46144
46193
  import { jsx as jsx333 } from "react/jsx-runtime";
46145
46194
  var CLOSED = { isOpen: false, images: [], initialIndex: 0 };
46146
46195
  function useChatAttachmentImageGallery() {
46147
46196
  const runtime = useRequiredChatRuntime();
46148
46197
  const viewUrlPrefix = runtime.endpoints.attachmentViewUrlPrefix;
46149
- const panelRef = useRef64(null);
46198
+ const panelRef = useRef65(null);
46150
46199
  const [state, setState] = useState105(CLOSED);
46151
46200
  const handleClose = useCallback47(() => setState(CLOSED), []);
46152
46201
  useEffect79(() => {
@@ -46250,10 +46299,10 @@ function useChatIdentity() {
46250
46299
  }
46251
46300
 
46252
46301
  // src/components/chat/hooks/use-close-on-navigation.ts
46253
- import { useEffect as useEffect81, useRef as useRef65 } from "react";
46302
+ import { useEffect as useEffect81, useRef as useRef66 } from "react";
46254
46303
  function useCloseOnNavigation(close, pathname) {
46255
- const prevPathnameRef = useRef65(null);
46256
- const initializedRef = useRef65(false);
46304
+ const prevPathnameRef = useRef66(null);
46305
+ const initializedRef = useRef66(false);
46257
46306
  useEffect81(() => {
46258
46307
  if (!initializedRef.current) {
46259
46308
  initializedRef.current = true;
@@ -46268,14 +46317,14 @@ function useCloseOnNavigation(close, pathname) {
46268
46317
  }
46269
46318
 
46270
46319
  // src/components/chat/hooks/use-chat.ts
46271
- import { useState as useState108, useCallback as useCallback49, useEffect as useEffect82, useRef as useRef67 } from "react";
46320
+ import { useState as useState108, useCallback as useCallback49, useEffect as useEffect82, useRef as useRef68 } from "react";
46272
46321
 
46273
46322
  // src/components/chat/hooks/use-sse.ts
46274
- import { useState as useState107, useCallback as useCallback48, useRef as useRef66 } from "react";
46323
+ import { useState as useState107, useCallback as useCallback48, useRef as useRef67 } from "react";
46275
46324
  function useSSE({ useMock = true, debugMode = false, streamFn } = {}) {
46276
46325
  const [isStreaming, setIsStreaming] = useState107(false);
46277
46326
  const [error, setError] = useState107(null);
46278
- const abortControllerRef = useRef66(null);
46327
+ const abortControllerRef = useRef67(null);
46279
46328
  const fallbackStream = useCallback48(async function* () {
46280
46329
  throw new Error(
46281
46330
  "[useSSE] No streamFn provided and `useMock: true` is no longer wired into the lib. Supply a `streamFn` (see `createDocStreamFn` in use-embedded-chat) or migrate the mock to your host code."
@@ -46343,8 +46392,8 @@ function useChat({
46343
46392
  } = {}) {
46344
46393
  const [messages, setMessages] = useState108(() => initialMessages ?? []);
46345
46394
  const [isTyping, setIsTyping] = useState108(false);
46346
- const currentAssistantSegmentsRef = useRef67([]);
46347
- const onMessagesChangeRef = useRef67(onMessagesChange);
46395
+ const currentAssistantSegmentsRef = useRef68([]);
46396
+ const onMessagesChangeRef = useRef68(onMessagesChange);
46348
46397
  onMessagesChangeRef.current = onMessagesChange;
46349
46398
  useEffect82(() => {
46350
46399
  onMessagesChangeRef.current?.(messages);
@@ -46635,7 +46684,7 @@ function useChat({
46635
46684
  }
46636
46685
 
46637
46686
  // src/components/chat/hooks/use-sse-chat-adapter.ts
46638
- import { useState as useState109, useEffect as useEffect83, useCallback as useCallback50, useMemo as useMemo40, useRef as useRef68 } from "react";
46687
+ import { useState as useState109, useEffect as useEffect83, useCallback as useCallback50, useMemo as useMemo41, useRef as useRef69 } from "react";
46639
46688
  function createEmptyTurnMeta() {
46640
46689
  return {
46641
46690
  provider: null,
@@ -46956,24 +47005,24 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
46956
47005
  const runtime = useRequiredChatRuntime();
46957
47006
  const source = runtime.source || DEFAULT_CHAT_SOURCE;
46958
47007
  const tableIdForDocumentType = options?.tableIdForDocumentType ?? defaultTableIdForDocumentType;
46959
- const persistedRef = useRef68(null);
47008
+ const persistedRef = useRef69(null);
46960
47009
  if (persistedRef.current === null) {
46961
47010
  pruneStaleChatStorage(source);
46962
47011
  persistedRef.current = loadPersistedChat(source) || { messages: [], sources: [], sendCount: 0 };
46963
47012
  }
46964
- const sourcesMapRef = useRef68(
47013
+ const sourcesMapRef = useRef69(
46965
47014
  new Map(persistedRef.current.sources)
46966
47015
  );
46967
- const refsMapRef = useRef68(
47016
+ const refsMapRef = useRef69(
46968
47017
  new Map(persistedRef.current.refs ?? [])
46969
47018
  );
46970
- const metaMapRef = useRef68(/* @__PURE__ */ new Map());
46971
- const messagesRef = useRef68(persistedRef.current.messages);
46972
- const sendCountRef = useRef68(persistedRef.current.sendCount);
47019
+ const metaMapRef = useRef69(/* @__PURE__ */ new Map());
47020
+ const messagesRef = useRef69(persistedRef.current.messages);
47021
+ const sendCountRef = useRef69(persistedRef.current.sendCount);
46973
47022
  const [streamingPhase, setStreamingPhase] = useState109("idle");
46974
47023
  const [metaTick, setMetaTick] = useState109(0);
46975
47024
  const bumpMetaTick = useCallback50(() => setMetaTick((t) => t + 1), []);
46976
- const streamFn = useMemo40(
47025
+ const streamFn = useMemo41(
46977
47026
  () => createDocStreamFn(
46978
47027
  source,
46979
47028
  {
@@ -46999,7 +47048,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
46999
47048
  const { commands: slashCommands } = useSlashCommandRegistry(commandsUrl, {
47000
47049
  enabled: active
47001
47050
  });
47002
- const cmdIdByTableId = useMemo40(() => {
47051
+ const cmdIdByTableId = useMemo41(() => {
47003
47052
  const buckets = /* @__PURE__ */ new Map();
47004
47053
  for (const cmd of slashCommands) {
47005
47054
  if (!cmd.primarySourceId) continue;
@@ -47164,7 +47213,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
47164
47213
  setStreamingPhase("idle");
47165
47214
  }
47166
47215
  }, [isTyping, isStreaming, streamingPhase]);
47167
- const latestMeta = useMemo40(
47216
+ const latestMeta = useMemo41(
47168
47217
  () => metaMapRef.current.get(sendCountRef.current - 1) ?? metaMapRef.current.get(sendCountRef.current - 2) ?? null,
47169
47218
  [metaTick, streamingPhase]
47170
47219
  );
@@ -47242,8 +47291,8 @@ var noopRejectRequest = async (_id, _reason) => {
47242
47291
  import {
47243
47292
  useCallback as useCallback51,
47244
47293
  useEffect as useEffect84,
47245
- useMemo as useMemo41,
47246
- useRef as useRef69,
47294
+ useMemo as useMemo42,
47295
+ useRef as useRef70,
47247
47296
  useState as useState110
47248
47297
  } from "react";
47249
47298
 
@@ -47785,9 +47834,9 @@ function useNatsChatAdapter(config, options = {}) {
47785
47834
  },
47786
47835
  [rejectRequestCallback]
47787
47836
  );
47788
- const handleApproveRef = useRef69(handleApprove);
47837
+ const handleApproveRef = useRef70(handleApprove);
47789
47838
  handleApproveRef.current = handleApprove;
47790
- const handleRejectRef = useRef69(handleReject);
47839
+ const handleRejectRef = useRef70(handleReject);
47791
47840
  handleRejectRef.current = handleReject;
47792
47841
  const accumApprove = useCallback51((requestId) => {
47793
47842
  if (!requestId) return;
@@ -47797,7 +47846,7 @@ function useNatsChatAdapter(config, options = {}) {
47797
47846
  if (!requestId) return;
47798
47847
  return handleRejectRef.current(requestId);
47799
47848
  }, []);
47800
- const callbacksRef = useRef69({
47849
+ const callbacksRef = useRef70({
47801
47850
  onSegmentsUpdate: (segments) => {
47802
47851
  setMessages((prev) => updateTrailingAssistant(prev, segments));
47803
47852
  },
@@ -47835,7 +47884,7 @@ function useNatsChatAdapter(config, options = {}) {
47835
47884
  onChunkReceived: (chunk) => processChunk(chunk),
47836
47885
  fetchChunks
47837
47886
  });
47838
- const historyLoadSeqRef = useRef69(0);
47887
+ const historyLoadSeqRef = useRef70(0);
47839
47888
  const loadDialogHistory = useCallback51(
47840
47889
  async (id, cursor) => {
47841
47890
  if (!fetchDialogMessages) return;
@@ -47890,7 +47939,7 @@ function useNatsChatAdapter(config, options = {}) {
47890
47939
  accumReject
47891
47940
  ]
47892
47941
  );
47893
- const prevDialogIdRef = useRef69(void 0);
47942
+ const prevDialogIdRef = useRef70(void 0);
47894
47943
  useEffect84(() => {
47895
47944
  if (prevDialogIdRef.current === dialogId) return;
47896
47945
  prevDialogIdRef.current = dialogId;
@@ -47934,7 +47983,7 @@ function useNatsChatAdapter(config, options = {}) {
47934
47983
  }
47935
47984
  setConnectionState("connecting");
47936
47985
  }, [active, dialogId]);
47937
- const initialDialogsLoadedRef = useRef69(false);
47986
+ const initialDialogsLoadedRef = useRef70(false);
47938
47987
  const loadDialogsPage = useCallback51(
47939
47988
  async (cursor) => {
47940
47989
  if (!fetchDialogs) return;
@@ -48124,7 +48173,7 @@ function useNatsChatAdapter(config, options = {}) {
48124
48173
  const isLoading = streamingPhase !== "idle";
48125
48174
  const hasMoreDialogs = dialogsNextCursor != null;
48126
48175
  const hasMoreMessages = messagesNextCursor != null;
48127
- return useMemo41(
48176
+ return useMemo42(
48128
48177
  () => ({
48129
48178
  messages,
48130
48179
  isLoading,
@@ -48207,7 +48256,7 @@ function useNatsChatAdapter(config, options = {}) {
48207
48256
  }
48208
48257
 
48209
48258
  // src/components/chat/hooks/use-unified-chat.ts
48210
- import { useCallback as useCallback52, useMemo as useMemo42, useRef as useRef70 } from "react";
48259
+ import { useCallback as useCallback52, useMemo as useMemo43, useRef as useRef71 } from "react";
48211
48260
  var EMPTY_SSE_OPTIONS = {};
48212
48261
  function createDisabledNatsConfig() {
48213
48262
  return {
@@ -48222,7 +48271,7 @@ function createDisabledNatsConfig() {
48222
48271
  }
48223
48272
  function useUnifiedChat(options) {
48224
48273
  const { modes, activeMode, mingoStateOverride } = options;
48225
- const disabledNatsRef = useRef70(null);
48274
+ const disabledNatsRef = useRef71(null);
48226
48275
  if (disabledNatsRef.current === null) {
48227
48276
  disabledNatsRef.current = createDisabledNatsConfig();
48228
48277
  }
@@ -48236,7 +48285,7 @@ function useUnifiedChat(options) {
48236
48285
  { active: natsActive }
48237
48286
  );
48238
48287
  const activeState = activeMode === "guide" ? sseState : mingoStateOverride ?? natsState;
48239
- const activeStateRef = useRef70(activeState);
48288
+ const activeStateRef = useRef71(activeState);
48240
48289
  activeStateRef.current = activeState;
48241
48290
  const stopMessage = useCallback52(() => activeStateRef.current.stopMessage(), []);
48242
48291
  const clearMessages = useCallback52(
@@ -48295,7 +48344,7 @@ function useUnifiedChat(options) {
48295
48344
  (requestId, reason) => activeStateRef.current.rejectRequest(requestId, reason),
48296
48345
  []
48297
48346
  );
48298
- return useMemo42(
48347
+ return useMemo43(
48299
48348
  () => ({
48300
48349
  messages: activeState.messages,
48301
48350
  isLoading: activeState.isLoading,
@@ -48546,7 +48595,7 @@ function chatChipClass({ tone, density = "chip", extra }) {
48546
48595
  }
48547
48596
 
48548
48597
  // src/components/chat/embeddable-chat.tsx
48549
- import { useCallback as useCallback54, useEffect as useEffect85, useMemo as useMemo44, useRef as useRef71, useState as useState112 } from "react";
48598
+ import { useCallback as useCallback54, useEffect as useEffect85, useMemo as useMemo45, useRef as useRef72, useState as useState112 } from "react";
48550
48599
  import * as DialogPrimitive4 from "@radix-ui/react-dialog";
48551
48600
  import { usePreventScroll } from "@react-aria/overlays";
48552
48601
  import { isIOS } from "@react-aria/utils";
@@ -48627,7 +48676,7 @@ init_button2();
48627
48676
  import { FileText as FileText8, MessageSquare as MessageSquare3 } from "lucide-react";
48628
48677
 
48629
48678
  // src/components/chat/hooks/use-chat-dialog-manager.ts
48630
- import { useCallback as useCallback53, useMemo as useMemo43, useState as useState111 } from "react";
48679
+ import { useCallback as useCallback53, useMemo as useMemo44, useState as useState111 } from "react";
48631
48680
  function useChatDialogManager({
48632
48681
  dialogs,
48633
48682
  activeDialogId,
@@ -48736,7 +48785,7 @@ function useChatDialogManager({
48736
48785
  clearMessages();
48737
48786
  if (wasArchived) setArchiveOpen(true);
48738
48787
  }, [isViewingArchived, selectDialog, clearMessages]);
48739
- const activeDialog = useMemo43(
48788
+ const activeDialog = useMemo44(
48740
48789
  () => dialogs.find((d) => d.id === activeDialogId) ?? archivedDialogs.find((d) => d.id === activeDialogId),
48741
48790
  [dialogs, archivedDialogs, activeDialogId]
48742
48791
  );
@@ -49091,7 +49140,7 @@ function EmbeddableChatInner({
49091
49140
  return !window.matchMedia("(pointer: coarse)").matches;
49092
49141
  });
49093
49142
  usePreventScroll({ isDisabled: !isOpen || shellLess });
49094
- const navigatingAwayRef = useRef71(false);
49143
+ const navigatingAwayRef = useRef72(false);
49095
49144
  useEffect85(() => {
49096
49145
  if (!isOpen) return;
49097
49146
  if (shellLess) return;
@@ -49118,9 +49167,9 @@ function EmbeddableChatInner({
49118
49167
  window.scrollTo(0, scrollY);
49119
49168
  };
49120
49169
  }, [isOpen, shellLess]);
49121
- const chatInputRef = useRef71(null);
49170
+ const chatInputRef = useRef72(null);
49122
49171
  const [quickActionPreview, setQuickActionPreview] = useState112(null);
49123
- const slashCommandsProp = useMemo44(
49172
+ const slashCommandsProp = useMemo45(
49124
49173
  () => ({
49125
49174
  fetchCommands: (prefix, signal) => fetchSlashCommands(prefix, signal, commandsUrl),
49126
49175
  resolveSourceIcon: (sourceId) => {
@@ -49135,12 +49184,12 @@ function EmbeddableChatInner({
49135
49184
  [commandsUrl]
49136
49185
  );
49137
49186
  const userName = identityUser?.firstName?.trim() || identityUser?.name?.split(" ")[0]?.trim() || void 0;
49138
- const effectiveModes = useMemo44(() => {
49187
+ const effectiveModes = useMemo45(() => {
49139
49188
  if (modes) return modes;
49140
49189
  const guideOptions = tableIdForDocumentType ? { tableIdForDocumentType } : {};
49141
49190
  return { guide: guideOptions };
49142
49191
  }, [modes, tableIdForDocumentType]);
49143
- const mingoCaps = useMemo44(() => {
49192
+ const mingoCaps = useMemo45(() => {
49144
49193
  if (mingoState) {
49145
49194
  return {
49146
49195
  canRename: mingoDialogCapabilities?.canRename ?? false,
@@ -49174,7 +49223,7 @@ function EmbeddableChatInner({
49174
49223
  [controlledActiveMode, onActiveModeChange]
49175
49224
  );
49176
49225
  const { commands: commandsList, loaded: commandsLoaded } = useSlashCommandRegistry(commandsUrl, { enabled: activeMode === "guide" });
49177
- const commandsById = useMemo44(() => {
49226
+ const commandsById = useMemo45(() => {
49178
49227
  const map = /* @__PURE__ */ new Map();
49179
49228
  for (const cmd of commandsList) map.set(cmd.id, cmd);
49180
49229
  return map;
@@ -49222,7 +49271,7 @@ function EmbeddableChatInner({
49222
49271
  hasMoreMessages,
49223
49272
  loadMoreMessages
49224
49273
  } = useUnifiedChat({ modes: effectiveModes, activeMode, mingoStateOverride: mingoState });
49225
- const guidePromptSentRef = useRef71(false);
49274
+ const guidePromptSentRef = useRef72(false);
49226
49275
  useEffect85(() => {
49227
49276
  if (!guidePendingPrompt) {
49228
49277
  guidePromptSentRef.current = false;
@@ -49247,23 +49296,23 @@ function EmbeddableChatInner({
49247
49296
  const [contextItems, setContextItems] = useState112([]);
49248
49297
  const [contextPickerOpen, setContextPickerOpen] = useState112(false);
49249
49298
  const [mentionQuery, setMentionQuery] = useState112(null);
49250
- const mentionActiveRef = useRef71(false);
49299
+ const mentionActiveRef = useRef72(false);
49251
49300
  useEffect85(() => {
49252
49301
  mentionActiveRef.current = mentionQuery !== null;
49253
49302
  }, [mentionQuery]);
49254
- const mentionKeysRef = useRef71(/* @__PURE__ */ new Set());
49303
+ const mentionKeysRef = useRef72(/* @__PURE__ */ new Set());
49255
49304
  useEffect85(() => {
49256
49305
  setContextItems([]);
49257
49306
  setMentionQuery(null);
49258
49307
  mentionKeysRef.current.clear();
49259
49308
  }, [activeDialogId, activeMode]);
49260
- const mentionMarkerByType = useMemo44(() => {
49309
+ const mentionMarkerByType = useMemo45(() => {
49261
49310
  const m = /* @__PURE__ */ new Map();
49262
49311
  for (const t of contextPicker?.entityTypes ?? []) if (t.marker) m.set(t.type, t.marker);
49263
49312
  return m;
49264
49313
  }, [contextPicker?.entityTypes]);
49265
49314
  const contextEntityTypes = contextPicker?.entityTypes;
49266
- const resolveContextIcon = useMemo44(() => {
49315
+ const resolveContextIcon = useMemo45(() => {
49267
49316
  const byType = /* @__PURE__ */ new Map();
49268
49317
  for (const t of contextEntityTypes ?? []) byType.set(t.type, t.icon);
49269
49318
  return (item) => byType.get(item.type);
@@ -49330,7 +49379,7 @@ function EmbeddableChatInner({
49330
49379
  navigatingAwayRef.current = true;
49331
49380
  setIsOpen(false);
49332
49381
  }, [setIsOpen]);
49333
- const chatPanelHandle = useMemo44(
49382
+ const chatPanelHandle = useMemo45(
49334
49383
  () => ({ closeChat: handleNavigationClose }),
49335
49384
  [handleNavigationClose]
49336
49385
  );
@@ -49344,14 +49393,14 @@ function EmbeddableChatInner({
49344
49393
  }),
49345
49394
  [discussRef, displayRef, resolvedBaseRoute, chipBasePlatform, extras]
49346
49395
  );
49347
- const mingoAssistantIcon = useMemo44(
49396
+ const mingoAssistantIcon = useMemo45(
49348
49397
  () => /* @__PURE__ */ jsx336(MingoIcon, { className: "h-6 w-6", cornerColor: "var(--ods-flamingo-cyan-base)" }),
49349
49398
  []
49350
49399
  );
49351
- const timestampCacheRef = useRef71(/* @__PURE__ */ new Map());
49400
+ const timestampCacheRef = useRef72(/* @__PURE__ */ new Map());
49352
49401
  const guideUserName = activeMode === "guide" ? [identityUser?.firstName, identityUser?.lastName].filter(Boolean).join(" ").trim() || identityUser?.name?.trim() || void 0 : void 0;
49353
49402
  const guideUserAvatar = activeMode === "guide" ? identityUser?.avatarUrl?.trim() || void 0 : void 0;
49354
- const messages = useMemo44(() => {
49403
+ const messages = useMemo45(() => {
49355
49404
  const cache = timestampCacheRef.current;
49356
49405
  const seenIds = /* @__PURE__ */ new Set();
49357
49406
  const mapped = rawMessages.map((m) => {
@@ -49411,7 +49460,7 @@ function EmbeddableChatInner({
49411
49460
  },
49412
49461
  [sendMessage, readyAttachments, viewUrlPrefix, clearAttachments, contextItems]
49413
49462
  );
49414
- const guideSuggestedActions = useMemo44(
49463
+ const guideSuggestedActions = useMemo45(
49415
49464
  () => {
49416
49465
  if (effectiveQuickActions.length > 0) {
49417
49466
  return effectiveQuickActions.map((qa) => ({
@@ -49496,11 +49545,11 @@ function EmbeddableChatInner({
49496
49545
  }, [isQuickActionEmpty]);
49497
49546
  const guideCanReturnToMingo = isGuideEmpty && hasMingoMode;
49498
49547
  const sourceLabel = source === "flamingo" ? "Knowledge Base" : "Data Room";
49499
- const enabledSet = useMemo44(
49548
+ const enabledSet = useMemo45(
49500
49549
  () => effectiveEnabledRagTableIds ? new Set(effectiveEnabledRagTableIds) : null,
49501
49550
  [effectiveEnabledRagTableIds]
49502
49551
  );
49503
- const chipCommands = useMemo44(() => {
49552
+ const chipCommands = useMemo45(() => {
49504
49553
  const out = [];
49505
49554
  for (const cmd of commandsById.values()) {
49506
49555
  if (cmd.displayOrder === void 0) continue;
@@ -49517,7 +49566,7 @@ function EmbeddableChatInner({
49517
49566
  return out;
49518
49567
  }, [commandsById, enabledSet]);
49519
49568
  const lastAssistantMsg = [...rawMessages].reverse().find((m) => m.role === "assistant");
49520
- const lastSources = useMemo44(() => {
49569
+ const lastSources = useMemo45(() => {
49521
49570
  if (chatLoading) return void 0;
49522
49571
  const sources = lastAssistantMsg?.sources;
49523
49572
  if (!sources || sources.length === 0) return void 0;
@@ -49829,7 +49878,7 @@ function EmbeddableChatInner({
49829
49878
  defaultSize: 750,
49830
49879
  storageKey: "mingo-chat-width",
49831
49880
  resizeAriaLabel: "Resize chat panel",
49832
- overlayClassName: "mingo-chat-overlay md:bg-black/20",
49881
+ overlayClassName: "mingo-chat-overlay",
49833
49882
  "aria-describedby": void 0,
49834
49883
  className: "\n mingo-chat-content !bg-ods-bg shadow-2xl\n focus:outline-none focus-visible:outline-none\n w-screen md:w-auto\n ",
49835
49884
  children: [
@@ -50015,6 +50064,7 @@ export {
50015
50064
  SheetFooter,
50016
50065
  SheetTitle,
50017
50066
  SheetDescription,
50067
+ OVERLAY_BACKDROP_CLASS,
50018
50068
  Drawer,
50019
50069
  DrawerTrigger,
50020
50070
  DrawerClose,
@@ -50783,4 +50833,4 @@ export {
50783
50833
  LogsList,
50784
50834
  assets
50785
50835
  };
50786
- //# sourceMappingURL=chunk-NIXFOPPT.js.map
50836
+ //# sourceMappingURL=chunk-UHO2TI5O.js.map