@flamingo-stack/openframe-frontend-core 0.0.409 → 0.0.410-snapshot.20260711165901

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 (125) hide show
  1. package/dist/{chunk-STGWQFYT.cjs → chunk-3SNDISEN.cjs} +92 -30
  2. package/dist/chunk-3SNDISEN.cjs.map +1 -0
  3. package/dist/{chunk-RL344I7V.cjs → chunk-3U4IZF7H.cjs} +7 -7
  4. package/dist/{chunk-RL344I7V.cjs.map → chunk-3U4IZF7H.cjs.map} +1 -1
  5. package/dist/{chunk-7Q52HP45.js → chunk-4FNDOTW2.js} +139 -77
  6. package/dist/chunk-4FNDOTW2.js.map +1 -0
  7. package/dist/{chunk-O5W26SCL.js → chunk-6AB36PRE.js} +2 -2
  8. package/dist/{chunk-IK5AR6QG.js → chunk-B2BERJ4M.js} +6 -6
  9. package/dist/{chunk-SOALFYU6.cjs → chunk-BKYV2ALJ.cjs} +582 -591
  10. package/dist/chunk-BKYV2ALJ.cjs.map +1 -0
  11. package/dist/{chunk-KPGKNUJF.cjs → chunk-BRHCGXOH.cjs} +40 -40
  12. package/dist/{chunk-KPGKNUJF.cjs.map → chunk-BRHCGXOH.cjs.map} +1 -1
  13. package/dist/{chunk-NO2KT42M.js → chunk-DGIF3YDV.js} +2 -2
  14. package/dist/{chunk-LQWYXIKB.js → chunk-FXZO4EKN.js} +5 -5
  15. package/dist/{chunk-CUN4CJUN.cjs → chunk-G2G7HLEM.cjs} +3 -3
  16. package/dist/{chunk-CUN4CJUN.cjs.map → chunk-G2G7HLEM.cjs.map} +1 -1
  17. package/dist/{chunk-NEMUCNCG.cjs → chunk-H4ISMWHG.cjs} +73 -73
  18. package/dist/{chunk-NEMUCNCG.cjs.map → chunk-H4ISMWHG.cjs.map} +1 -1
  19. package/dist/{chunk-L6OPVKVR.js → chunk-HXRULNWA.js} +5 -5
  20. package/dist/{chunk-RPGFIUN3.cjs → chunk-MF5CVIAC.cjs} +32 -32
  21. package/dist/{chunk-RPGFIUN3.cjs.map → chunk-MF5CVIAC.cjs.map} +1 -1
  22. package/dist/{chunk-J6M2G6TD.js → chunk-MHNBDSWH.js} +6 -6
  23. package/dist/{chunk-E4J5KKHH.js → chunk-NJSBYUJZ.js} +3 -3
  24. package/dist/{chunk-YRKPMYI3.cjs → chunk-RALT6D4H.cjs} +15 -15
  25. package/dist/{chunk-YRKPMYI3.cjs.map → chunk-RALT6D4H.cjs.map} +1 -1
  26. package/dist/{chunk-ZMFQWMM7.js → chunk-SAJM3PDE.js} +2 -2
  27. package/dist/{chunk-V3EZQWHQ.cjs → chunk-SMLAYAIW.cjs} +5 -5
  28. package/dist/{chunk-V3EZQWHQ.cjs.map → chunk-SMLAYAIW.cjs.map} +1 -1
  29. package/dist/{chunk-5HOII3WB.js → chunk-SOLI7V4I.js} +4 -4
  30. package/dist/{chunk-WGOATV3P.cjs → chunk-SZ27SV6T.cjs} +73 -73
  31. package/dist/{chunk-WGOATV3P.cjs.map → chunk-SZ27SV6T.cjs.map} +1 -1
  32. package/dist/{chunk-ZF5O3KUQ.js → chunk-TYCWPT33.js} +3 -3
  33. package/dist/{chunk-F4KE5AZO.cjs → chunk-VTTPNZX3.cjs} +40 -40
  34. package/dist/{chunk-F4KE5AZO.cjs.map → chunk-VTTPNZX3.cjs.map} +1 -1
  35. package/dist/{chunk-T6ZUBXPA.cjs → chunk-VXM2GCKS.cjs} +12 -12
  36. package/dist/{chunk-T6ZUBXPA.cjs.map → chunk-VXM2GCKS.cjs.map} +1 -1
  37. package/dist/{chunk-KZPVN7AZ.js → chunk-XBC5AES6.js} +2 -2
  38. package/dist/{chunk-KRLBVBYU.cjs → chunk-XVPWVG6N.cjs} +18 -18
  39. package/dist/{chunk-KRLBVBYU.cjs.map → chunk-XVPWVG6N.cjs.map} +1 -1
  40. package/dist/{chunk-IVM47EGI.js → chunk-YVJ2XBFU.js} +389 -398
  41. package/dist/chunk-YVJ2XBFU.js.map +1 -0
  42. package/dist/{chunk-VUW4G6SU.js → chunk-Z4RKJOFH.js} +3 -3
  43. package/dist/{chunk-A3RW7M6B.cjs → chunk-ZZWFS7CD.cjs} +29 -29
  44. package/dist/{chunk-A3RW7M6B.cjs.map → chunk-ZZWFS7CD.cjs.map} +1 -1
  45. package/dist/components/case-studies/index.cjs +9 -9
  46. package/dist/components/case-studies/index.js +3 -3
  47. package/dist/components/chat/index.cjs +3 -3
  48. package/dist/components/chat/index.js +2 -2
  49. package/dist/components/contact/index.cjs +4 -4
  50. package/dist/components/contact/index.js +3 -3
  51. package/dist/components/docs/index.cjs +6 -6
  52. package/dist/components/docs/index.js +5 -5
  53. package/dist/components/embeds/index.cjs +4 -4
  54. package/dist/components/embeds/index.js +3 -3
  55. package/dist/components/faq/index.cjs +5 -5
  56. package/dist/components/faq/index.js +4 -4
  57. package/dist/components/features/index.cjs +3 -3
  58. package/dist/components/features/index.js +2 -2
  59. package/dist/components/help-center-pages/index.cjs +22 -22
  60. package/dist/components/help-center-pages/index.js +13 -13
  61. package/dist/components/index.cjs +137 -135
  62. package/dist/components/index.cjs.map +1 -1
  63. package/dist/components/index.js +14 -12
  64. package/dist/components/index.js.map +1 -1
  65. package/dist/components/navigation/header.d.ts.map +1 -1
  66. package/dist/components/navigation/index.cjs +5 -3
  67. package/dist/components/navigation/index.cjs.map +1 -1
  68. package/dist/components/navigation/index.d.ts +1 -1
  69. package/dist/components/navigation/index.d.ts.map +1 -1
  70. package/dist/components/navigation/index.js +4 -2
  71. package/dist/components/navigation/mobile-burger-menu.d.ts.map +1 -1
  72. package/dist/components/navigation/mobile-nav-panel.d.ts +2 -0
  73. package/dist/components/navigation/mobile-nav-panel.d.ts.map +1 -1
  74. package/dist/components/navigation/sliding-sidebar.d.ts.map +1 -1
  75. package/dist/components/onboarding-guides/index.cjs +7 -7
  76. package/dist/components/onboarding-guides/index.js +6 -6
  77. package/dist/components/related-content/index.cjs +5 -5
  78. package/dist/components/related-content/index.js +4 -4
  79. package/dist/components/tickets/index.cjs +6 -6
  80. package/dist/components/tickets/index.js +5 -5
  81. package/dist/components/ui/index.cjs +3 -3
  82. package/dist/components/ui/index.js +2 -2
  83. package/dist/components/ui/modal-v2.d.ts.map +1 -1
  84. package/dist/components/ui/modal.d.ts.map +1 -1
  85. package/dist/hooks/index.cjs +6 -2
  86. package/dist/hooks/index.cjs.map +1 -1
  87. package/dist/hooks/index.js +5 -1
  88. package/dist/hooks/ui/index.d.ts +2 -0
  89. package/dist/hooks/ui/index.d.ts.map +1 -1
  90. package/dist/hooks/ui/use-focus-trap.d.ts +32 -0
  91. package/dist/hooks/ui/use-focus-trap.d.ts.map +1 -0
  92. package/dist/hooks/ui/use-header-height.d.ts +10 -1
  93. package/dist/hooks/ui/use-header-height.d.ts.map +1 -1
  94. package/dist/index.cjs +9 -3
  95. package/dist/index.cjs.map +1 -1
  96. package/dist/index.js +8 -2
  97. package/package.json +1 -1
  98. package/src/components/announcement-bar.tsx +1 -1
  99. package/src/components/navigation/header.tsx +5 -0
  100. package/src/components/navigation/index.ts +1 -1
  101. package/src/components/navigation/mobile-burger-menu.tsx +16 -29
  102. package/src/components/navigation/mobile-nav-panel.tsx +32 -35
  103. package/src/components/navigation/sliding-sidebar.tsx +29 -9
  104. package/src/components/ui/modal-v2.tsx +7 -6
  105. package/src/components/ui/modal.tsx +7 -9
  106. package/src/hooks/ui/index.ts +6 -0
  107. package/src/hooks/ui/use-focus-trap.ts +110 -0
  108. package/src/hooks/ui/use-header-height.ts +17 -2
  109. package/src/stories/MobileNavPanel.stories.tsx +150 -0
  110. package/dist/chunk-7Q52HP45.js.map +0 -1
  111. package/dist/chunk-IVM47EGI.js.map +0 -1
  112. package/dist/chunk-SOALFYU6.cjs.map +0 -1
  113. package/dist/chunk-STGWQFYT.cjs.map +0 -1
  114. /package/dist/{chunk-O5W26SCL.js.map → chunk-6AB36PRE.js.map} +0 -0
  115. /package/dist/{chunk-IK5AR6QG.js.map → chunk-B2BERJ4M.js.map} +0 -0
  116. /package/dist/{chunk-NO2KT42M.js.map → chunk-DGIF3YDV.js.map} +0 -0
  117. /package/dist/{chunk-LQWYXIKB.js.map → chunk-FXZO4EKN.js.map} +0 -0
  118. /package/dist/{chunk-L6OPVKVR.js.map → chunk-HXRULNWA.js.map} +0 -0
  119. /package/dist/{chunk-J6M2G6TD.js.map → chunk-MHNBDSWH.js.map} +0 -0
  120. /package/dist/{chunk-E4J5KKHH.js.map → chunk-NJSBYUJZ.js.map} +0 -0
  121. /package/dist/{chunk-ZMFQWMM7.js.map → chunk-SAJM3PDE.js.map} +0 -0
  122. /package/dist/{chunk-5HOII3WB.js.map → chunk-SOLI7V4I.js.map} +0 -0
  123. /package/dist/{chunk-ZF5O3KUQ.js.map → chunk-TYCWPT33.js.map} +0 -0
  124. /package/dist/{chunk-KZPVN7AZ.js.map → chunk-XBC5AES6.js.map} +0 -0
  125. /package/dist/{chunk-VUW4G6SU.js.map → chunk-Z4RKJOFH.js.map} +0 -0
@@ -14,6 +14,7 @@ import {
14
14
  useCopyToClipboard,
15
15
  useDebounce,
16
16
  useDeferredError,
17
+ useFocusTrap,
17
18
  useHeaderHeight,
18
19
  useHorizontalScrollbar,
19
20
  useHumanitySignals,
@@ -26,7 +27,7 @@ import {
26
27
  useOgPlaceholderUrl,
27
28
  useOnboardingState,
28
29
  useToast
29
- } from "./chunk-7Q52HP45.js";
30
+ } from "./chunk-4FNDOTW2.js";
30
31
  import {
31
32
  AlertCircleIcon,
32
33
  AnthropicLogoGreyIcon,
@@ -7649,6 +7650,7 @@ import * as React21 from "react";
7649
7650
  // src/components/ui/modal-v2.tsx
7650
7651
  import * as React20 from "react";
7651
7652
  import { useEffect as useEffect10, useState as useState16 } from "react";
7653
+ import { usePreventScroll } from "@react-aria/overlays";
7652
7654
  init_cn();
7653
7655
  import { jsx as jsx46, jsxs as jsxs37 } from "react/jsx-runtime";
7654
7656
  var ANIMATION_DURATION = 200;
@@ -7664,6 +7666,7 @@ var Modal = React20.forwardRef(
7664
7666
  const timeout = setTimeout(() => setIsMounted(false), ANIMATION_DURATION);
7665
7667
  return () => clearTimeout(timeout);
7666
7668
  }, [isOpen]);
7669
+ usePreventScroll({ isDisabled: !isOpen });
7667
7670
  useEffect10(() => {
7668
7671
  const handleKeyDown = (event) => {
7669
7672
  if (event.key === "Escape") {
@@ -7671,12 +7674,8 @@ var Modal = React20.forwardRef(
7671
7674
  }
7672
7675
  };
7673
7676
  if (isOpen) {
7674
- document.body.style.overflow = "hidden";
7675
7677
  document.addEventListener("keydown", handleKeyDown);
7676
- return () => {
7677
- document.body.style.overflow = "unset";
7678
- document.removeEventListener("keydown", handleKeyDown);
7679
- };
7678
+ return () => document.removeEventListener("keydown", handleKeyDown);
7680
7679
  }
7681
7680
  }, [isOpen, onClose]);
7682
7681
  if (!isMounted) return null;
@@ -13059,7 +13058,7 @@ function RoadmapVoteButton({
13059
13058
  init_button();
13060
13059
 
13061
13060
  // src/components/ui/image-gallery-modal.tsx
13062
- import { useState as useState102, useEffect as useEffect78 } from "react";
13061
+ import { useState as useState102, useEffect as useEffect76 } from "react";
13063
13062
 
13064
13063
  // src/components/ui/allowed-domains-input.tsx
13065
13064
  init_cn();
@@ -17047,9 +17046,11 @@ DialogDescription.displayName = DialogPrimitive.Description.displayName;
17047
17046
  init_cn();
17048
17047
  import * as React60 from "react";
17049
17048
  import { useEffect as useEffect28 } from "react";
17049
+ import { usePreventScroll as usePreventScroll2 } from "@react-aria/overlays";
17050
17050
  import { jsx as jsx120, jsxs as jsxs93 } from "react/jsx-runtime";
17051
17051
  var Modal2 = React60.forwardRef(
17052
17052
  ({ isOpen, onClose, children, className }, ref) => {
17053
+ usePreventScroll2({ isDisabled: !isOpen });
17053
17054
  useEffect28(() => {
17054
17055
  const handleKeyDown = (event) => {
17055
17056
  if (event.key === "Escape") {
@@ -17057,12 +17058,8 @@ var Modal2 = React60.forwardRef(
17057
17058
  }
17058
17059
  };
17059
17060
  if (isOpen) {
17060
- document.body.style.overflow = "hidden";
17061
17061
  document.addEventListener("keydown", handleKeyDown);
17062
- return () => {
17063
- document.body.style.overflow = "unset";
17064
- document.removeEventListener("keydown", handleKeyDown);
17065
- };
17062
+ return () => document.removeEventListener("keydown", handleKeyDown);
17066
17063
  }
17067
17064
  }, [isOpen, onClose]);
17068
17065
  if (!isOpen) return null;
@@ -35208,15 +35205,134 @@ function SortableRow({
35208
35205
 
35209
35206
  // src/components/navigation/header.tsx
35210
35207
  init_next_link();
35211
- import React108, { useEffect as useEffect63, useRef as useRef44, useState as useState83 } from "react";
35208
+ import React109, { useEffect as useEffect63, useRef as useRef45, useState as useState83 } from "react";
35212
35209
  init_button2();
35210
+
35211
+ // src/components/navigation/mobile-nav-panel.tsx
35212
+ import { useRef as useRef44 } from "react";
35213
+ import { usePreventScroll as usePreventScroll3 } from "@react-aria/overlays";
35214
+ init_button2();
35215
+ import { X as X10 } from "lucide-react";
35213
35216
  import { Fragment as Fragment50, jsx as jsx271, jsxs as jsxs209 } from "react/jsx-runtime";
35217
+ var MOBILE_NAV_PANEL_ID = "mobile-nav-panel";
35218
+ function MobileNavPanel({ isOpen, config }) {
35219
+ const panelRef = useRef44(null);
35220
+ usePreventScroll3({ isDisabled: !isOpen });
35221
+ useFocusTrap(panelRef, isOpen, { onEscape: config.onClose });
35222
+ const headerHeight = useHeaderHeight(64, { enabled: isOpen });
35223
+ if (!isOpen) return null;
35224
+ const renderNavigationItem = (item) => {
35225
+ if (item.element) {
35226
+ return /* @__PURE__ */ jsx271("div", { children: item.element }, item.id);
35227
+ }
35228
+ const handleClick = () => {
35229
+ if (item.onClick) {
35230
+ item.onClick();
35231
+ }
35232
+ config.onClose?.();
35233
+ };
35234
+ if (item.href) {
35235
+ return /* @__PURE__ */ jsx271(
35236
+ Button,
35237
+ {
35238
+ variant: "outline",
35239
+ size: "small-legacy",
35240
+ href: item.href,
35241
+ onClick: handleClick,
35242
+ leftIcon: item.icon,
35243
+ rightIcon: item.badge,
35244
+ className: cn(
35245
+ "justify-start h-12 px-4 bg-transparent border-none text-ods-text-primary hover:bg-ods-bg-hover gap-3 rounded-md transition-colors",
35246
+ item.isActive ? "bg-ods-bg-hover" : ""
35247
+ ),
35248
+ children: item.label
35249
+ },
35250
+ item.id
35251
+ );
35252
+ }
35253
+ return /* @__PURE__ */ jsxs209(
35254
+ Button,
35255
+ {
35256
+ variant: "outline",
35257
+ size: "small-legacy",
35258
+ onClick: handleClick,
35259
+ leftIcon: item.icon,
35260
+ className: cn(
35261
+ "justify-start h-12 px-4 bg-transparent border-none text-ods-text-primary hover:bg-ods-bg-hover gap-3 rounded-md transition-colors",
35262
+ item.isActive ? "bg-ods-bg-hover" : ""
35263
+ ),
35264
+ children: [
35265
+ /* @__PURE__ */ jsx271("span", { className: "flex-1 text-left", children: item.label }),
35266
+ item.badge !== void 0 && /* @__PURE__ */ jsx271("span", { className: "ml-auto", children: item.badge })
35267
+ ]
35268
+ },
35269
+ item.id
35270
+ );
35271
+ };
35272
+ return /* @__PURE__ */ jsxs209(Fragment50, { children: [
35273
+ /* @__PURE__ */ jsx271(
35274
+ "div",
35275
+ {
35276
+ className: cn("fixed inset-0 z-[9998]", OVERLAY_BACKDROP_CLASS),
35277
+ onClick: config.onClose
35278
+ }
35279
+ ),
35280
+ /* @__PURE__ */ jsxs209(
35281
+ "div",
35282
+ {
35283
+ ref: panelRef,
35284
+ id: MOBILE_NAV_PANEL_ID,
35285
+ role: "dialog",
35286
+ "aria-modal": "true",
35287
+ "aria-label": "Navigation menu",
35288
+ tabIndex: -1,
35289
+ style: { "--mobile-nav-top": `${headerHeight + 16}px` },
35290
+ className: cn(
35291
+ "fixed z-[9999] rounded-lg shadow-xl",
35292
+ config.className ? "" : "bg-ods-card border border-ods-border",
35293
+ // Responsive positioning and sizing
35294
+ "right-2 left-2 md:left-auto",
35295
+ "md:right-6 md:w-[400px] md:max-w-[calc(100vw-3rem)]",
35296
+ // Small-viewport (svh) sizing anchored below the measured header —
35297
+ // 100vh overflowed under mobile browser chrome, leaving the bottom
35298
+ // entries and footer unreachable while the body was scroll-locked.
35299
+ "top-[var(--mobile-nav-top)]",
35300
+ "max-h-[calc(100svh-var(--mobile-nav-top)-50px)] md:max-h-[calc(100svh-var(--mobile-nav-top)-8px)]",
35301
+ "flex flex-col",
35302
+ config.className || ""
35303
+ ),
35304
+ onClick: (e) => e.stopPropagation(),
35305
+ children: [
35306
+ /* @__PURE__ */ jsx271("div", { className: "flex justify-end p-2 border-b border-ods-border flex-shrink-0", children: /* @__PURE__ */ jsx271(
35307
+ Button,
35308
+ {
35309
+ "aria-label": "Close menu",
35310
+ size: "icon",
35311
+ variant: "transparent",
35312
+ leftIcon: /* @__PURE__ */ jsx271(X10, { className: "w-4 h-4 text-ods-text-primary" }),
35313
+ onClick: config.onClose,
35314
+ className: "hover:bg-ods-bg-hover"
35315
+ }
35316
+ ) }),
35317
+ /* @__PURE__ */ jsx271("div", { className: "flex-1 overflow-y-auto overflow-x-hidden overscroll-contain px-2 py-2", children: /* @__PURE__ */ jsx271("div", { className: "flex flex-col space-y-1", children: config.sections.map((section, index) => /* @__PURE__ */ jsxs209("div", { children: [
35318
+ section.title && /* @__PURE__ */ jsx271("div", { className: "px-4 pt-2 pb-1 text-xs font-semibold text-ods-text-secondary uppercase tracking-wide", children: section.title }),
35319
+ /* @__PURE__ */ jsx271("div", { className: "flex flex-col gap-1", children: section.items.map(renderNavigationItem) })
35320
+ ] }, index)) }) }),
35321
+ config.footer && /* @__PURE__ */ jsx271("div", { className: "border-t border-ods-border p-4 pb-[max(1rem,env(safe-area-inset-bottom))] flex-shrink-0", children: config.footer })
35322
+ ]
35323
+ }
35324
+ )
35325
+ ] });
35326
+ }
35327
+
35328
+ // src/components/navigation/header.tsx
35329
+ import { Fragment as Fragment51, jsx as jsx272, jsxs as jsxs210 } from "react/jsx-runtime";
35214
35330
  function Header2({ config, platform }) {
35215
35331
  const [show, setShow] = useState83(true);
35216
35332
  const [lastScrollY, setLastScrollY] = useState83(0);
35217
35333
  const [openDropdowns, setOpenDropdowns] = useState83({});
35218
- const dropdownRefs = useRef44({});
35219
- const triggerRefs = useRef44({});
35334
+ const dropdownRefs = useRef45({});
35335
+ const triggerRefs = useRef45({});
35220
35336
  useEffect63(() => {
35221
35337
  const handleClickOutside = (event) => {
35222
35338
  const target = event.target;
@@ -35278,12 +35394,12 @@ function Header2({ config, platform }) {
35278
35394
  }, [config.autoHide]);
35279
35395
  const renderNavigationItem = (item) => {
35280
35396
  if (item.element) {
35281
- return /* @__PURE__ */ jsx271(React108.Fragment, { children: item.element }, item.id);
35397
+ return /* @__PURE__ */ jsx272(React109.Fragment, { children: item.element }, item.id);
35282
35398
  }
35283
35399
  if (item.children && item.children.length > 0) {
35284
35400
  const isOpen = openDropdowns[item.id] || false;
35285
- return /* @__PURE__ */ jsxs209("div", { className: "relative", children: [
35286
- /* @__PURE__ */ jsx271(
35401
+ return /* @__PURE__ */ jsxs210("div", { className: "relative", children: [
35402
+ /* @__PURE__ */ jsx272(
35287
35403
  Button,
35288
35404
  {
35289
35405
  ref: (el) => {
@@ -35310,7 +35426,7 @@ function Header2({ config, platform }) {
35310
35426
  children: item.label
35311
35427
  }
35312
35428
  ),
35313
- /* @__PURE__ */ jsxs209(
35429
+ /* @__PURE__ */ jsxs210(
35314
35430
  "div",
35315
35431
  {
35316
35432
  ref: (el) => {
@@ -35327,7 +35443,7 @@ function Header2({ config, platform }) {
35327
35443
  item.dropdownClassName || ""
35328
35444
  ),
35329
35445
  children: [
35330
- /* @__PURE__ */ jsx271("div", { className: "p-2", children: item.children.map((child, index) => /* @__PURE__ */ jsx271(
35446
+ /* @__PURE__ */ jsx272("div", { className: "p-2", children: item.children.map((child, index) => /* @__PURE__ */ jsx272(
35331
35447
  Button,
35332
35448
  {
35333
35449
  variant: "transparent",
@@ -35355,9 +35471,9 @@ function Header2({ config, platform }) {
35355
35471
  },
35356
35472
  child.id
35357
35473
  )) }),
35358
- item.dropdownContent && /* @__PURE__ */ jsxs209(Fragment50, { children: [
35359
- item.showDropdownDivider !== false && /* @__PURE__ */ jsx271("div", { className: "h-px my-2 mx-2 bg-ods-border" }),
35360
- /* @__PURE__ */ jsx271("div", { className: "px-2 pb-2", children: item.dropdownContent })
35474
+ item.dropdownContent && /* @__PURE__ */ jsxs210(Fragment51, { children: [
35475
+ item.showDropdownDivider !== false && /* @__PURE__ */ jsx272("div", { className: "h-px my-2 mx-2 bg-ods-border" }),
35476
+ /* @__PURE__ */ jsx272("div", { className: "px-2 pb-2", children: item.dropdownContent })
35361
35477
  ] })
35362
35478
  ]
35363
35479
  }
@@ -35365,7 +35481,7 @@ function Header2({ config, platform }) {
35365
35481
  ] }, item.id);
35366
35482
  }
35367
35483
  if (item.href || item.onClick) {
35368
- return /* @__PURE__ */ jsx271(
35484
+ return /* @__PURE__ */ jsx272(
35369
35485
  Button,
35370
35486
  {
35371
35487
  variant: "transparent",
@@ -35390,7 +35506,7 @@ function Header2({ config, platform }) {
35390
35506
  item.id
35391
35507
  );
35392
35508
  }
35393
- return /* @__PURE__ */ jsx271(
35509
+ return /* @__PURE__ */ jsx272(
35394
35510
  Button,
35395
35511
  {
35396
35512
  variant: "transparent",
@@ -35413,7 +35529,7 @@ function Header2({ config, platform }) {
35413
35529
  item.id
35414
35530
  );
35415
35531
  };
35416
- return /* @__PURE__ */ jsx271(
35532
+ return /* @__PURE__ */ jsx272(
35417
35533
  "div",
35418
35534
  {
35419
35535
  className: cn(
@@ -35422,7 +35538,7 @@ function Header2({ config, platform }) {
35422
35538
  style: {
35423
35539
  transform: !show ? "translateY(-100%)" : "translateY(0)"
35424
35540
  },
35425
- children: /* @__PURE__ */ jsxs209(
35541
+ children: /* @__PURE__ */ jsxs210(
35426
35542
  "header",
35427
35543
  {
35428
35544
  className: cn(
@@ -35435,11 +35551,11 @@ function Header2({ config, platform }) {
35435
35551
  ),
35436
35552
  style: config.style,
35437
35553
  children: [
35438
- /* @__PURE__ */ jsxs209("div", { className: "flex items-center justify-start flex-shrink-0", children: [
35439
- config.actions?.left && /* @__PURE__ */ jsx271("div", { className: "flex items-center", children: config.actions.left }),
35440
- /* @__PURE__ */ jsx271(next_link_default, { href: config.logo.href, className: "transition-opacity duration-200 hover:opacity-80", children: config.logo.element })
35554
+ /* @__PURE__ */ jsxs210("div", { className: "flex items-center justify-start flex-shrink-0", children: [
35555
+ config.actions?.left && /* @__PURE__ */ jsx272("div", { className: "flex items-center", children: config.actions.left }),
35556
+ /* @__PURE__ */ jsx272(next_link_default, { href: config.logo.href, className: "transition-opacity duration-200 hover:opacity-80", children: config.logo.element })
35441
35557
  ] }),
35442
- config.navigation && config.navigation.items.length > 0 && /* @__PURE__ */ jsx271(
35558
+ config.navigation && config.navigation.items.length > 0 && /* @__PURE__ */ jsx272(
35443
35559
  "nav",
35444
35560
  {
35445
35561
  className: cn(
@@ -35452,9 +35568,9 @@ function Header2({ config, platform }) {
35452
35568
  children: config.navigation.items.map(renderNavigationItem)
35453
35569
  }
35454
35570
  ),
35455
- /* @__PURE__ */ jsxs209("div", { className: "flex items-center justify-end gap-4 flex-shrink-0", children: [
35456
- config.actions?.right && /* @__PURE__ */ jsx271("div", { className: "hidden md:flex items-center gap-4", children: config.actions.right }),
35457
- config.mobile && config.mobile.enabled && /* @__PURE__ */ jsx271(
35571
+ /* @__PURE__ */ jsxs210("div", { className: "flex items-center justify-end gap-4 flex-shrink-0", children: [
35572
+ config.actions?.right && /* @__PURE__ */ jsx272("div", { className: "hidden md:flex items-center gap-4", children: config.actions.right }),
35573
+ config.mobile && config.mobile.enabled && /* @__PURE__ */ jsx272(
35458
35574
  Button,
35459
35575
  {
35460
35576
  variant: "transparent",
@@ -35464,7 +35580,9 @@ function Header2({ config, platform }) {
35464
35580
  config.mobile?.onToggle?.();
35465
35581
  },
35466
35582
  "aria-label": config.mobile?.isOpen ? "Close menu" : "Open menu",
35467
- leftIcon: config.mobile?.menuIcon || /* @__PURE__ */ jsx271(Menu01Icon, {})
35583
+ "aria-expanded": config.mobile?.isOpen ?? false,
35584
+ "aria-controls": config.mobile?.isOpen ? MOBILE_NAV_PANEL_ID : void 0,
35585
+ leftIcon: config.mobile?.menuIcon || /* @__PURE__ */ jsx272(Menu01Icon, {})
35468
35586
  }
35469
35587
  )
35470
35588
  ] })
@@ -35479,13 +35597,13 @@ function Header2({ config, platform }) {
35479
35597
  import { useState as useState84, useEffect as useEffect64 } from "react";
35480
35598
 
35481
35599
  // src/components/navigation/header-skeleton.tsx
35482
- import { jsx as jsx272, jsxs as jsxs210 } from "react/jsx-runtime";
35600
+ import { jsx as jsx273, jsxs as jsxs211 } from "react/jsx-runtime";
35483
35601
  function HeaderSkeleton({ config }) {
35484
35602
  const showNavigation = config?.navigation && config.navigation.items.length > 0;
35485
35603
  const showActions = config?.actions?.right && config.actions.right.length > 0;
35486
35604
  const showMobileMenu = config?.mobile?.enabled;
35487
35605
  const isAdminHeader = config?.className?.includes("admin");
35488
- return /* @__PURE__ */ jsx272("div", { className: "sticky top-0 z-40 w-full", children: /* @__PURE__ */ jsxs210(
35606
+ return /* @__PURE__ */ jsx273("div", { className: "sticky top-0 z-40 w-full", children: /* @__PURE__ */ jsxs211(
35489
35607
  "header",
35490
35608
  {
35491
35609
  className: cn(
@@ -35496,25 +35614,25 @@ function HeaderSkeleton({ config }) {
35496
35614
  config?.className
35497
35615
  ),
35498
35616
  children: [
35499
- /* @__PURE__ */ jsxs210("div", { className: "flex items-center justify-start flex-shrink-0", children: [
35500
- isAdminHeader && config?.actions?.left && /* @__PURE__ */ jsx272("div", { className: "mr-4", children: /* @__PURE__ */ jsx272("div", { className: "h-10 w-10 bg-ods-border rounded animate-pulse" }) }),
35501
- /* @__PURE__ */ jsxs210("div", { className: "flex items-center gap-2", children: [
35502
- /* @__PURE__ */ jsx272("div", { className: "h-8 w-8 bg-ods-border rounded animate-pulse" }),
35503
- /* @__PURE__ */ jsx272("div", { className: "h-6 w-24 bg-ods-border rounded animate-pulse" })
35617
+ /* @__PURE__ */ jsxs211("div", { className: "flex items-center justify-start flex-shrink-0", children: [
35618
+ isAdminHeader && config?.actions?.left && /* @__PURE__ */ jsx273("div", { className: "mr-4", children: /* @__PURE__ */ jsx273("div", { className: "h-10 w-10 bg-ods-border rounded animate-pulse" }) }),
35619
+ /* @__PURE__ */ jsxs211("div", { className: "flex items-center gap-2", children: [
35620
+ /* @__PURE__ */ jsx273("div", { className: "h-8 w-8 bg-ods-border rounded animate-pulse" }),
35621
+ /* @__PURE__ */ jsx273("div", { className: "h-6 w-24 bg-ods-border rounded animate-pulse" })
35504
35622
  ] })
35505
35623
  ] }),
35506
- showNavigation && /* @__PURE__ */ jsxs210("nav", { className: cn(
35624
+ showNavigation && /* @__PURE__ */ jsxs211("nav", { className: cn(
35507
35625
  "hidden md:flex items-center gap-2",
35508
35626
  config?.navigation?.position === "center" && "absolute left-1/2 transform -translate-x-1/2",
35509
35627
  config?.navigation?.position === "right" && "ml-auto mr-4"
35510
35628
  ), children: [
35511
- /* @__PURE__ */ jsx272("div", { className: "h-10 w-20 bg-ods-border rounded animate-pulse" }),
35512
- /* @__PURE__ */ jsx272("div", { className: "h-10 w-28 bg-ods-border rounded animate-pulse" }),
35513
- /* @__PURE__ */ jsx272("div", { className: "h-10 w-24 bg-ods-border rounded animate-pulse" })
35629
+ /* @__PURE__ */ jsx273("div", { className: "h-10 w-20 bg-ods-border rounded animate-pulse" }),
35630
+ /* @__PURE__ */ jsx273("div", { className: "h-10 w-28 bg-ods-border rounded animate-pulse" }),
35631
+ /* @__PURE__ */ jsx273("div", { className: "h-10 w-24 bg-ods-border rounded animate-pulse" })
35514
35632
  ] }),
35515
- /* @__PURE__ */ jsxs210("div", { className: "flex items-center justify-end gap-4 flex-shrink-0", children: [
35516
- showActions && /* @__PURE__ */ jsx272("div", { className: "hidden md:flex items-center gap-4", children: /* @__PURE__ */ jsx272("div", { className: "h-10 w-24 bg-ods-border rounded animate-pulse" }) }),
35517
- showMobileMenu && /* @__PURE__ */ jsx272("div", { className: "md:hidden h-10 w-10 bg-ods-border rounded animate-pulse" })
35633
+ /* @__PURE__ */ jsxs211("div", { className: "flex items-center justify-end gap-4 flex-shrink-0", children: [
35634
+ showActions && /* @__PURE__ */ jsx273("div", { className: "hidden md:flex items-center gap-4", children: /* @__PURE__ */ jsx273("div", { className: "h-10 w-24 bg-ods-border rounded animate-pulse" }) }),
35635
+ showMobileMenu && /* @__PURE__ */ jsx273("div", { className: "md:hidden h-10 w-10 bg-ods-border rounded animate-pulse" })
35518
35636
  ] })
35519
35637
  ]
35520
35638
  }
@@ -35522,152 +35640,33 @@ function HeaderSkeleton({ config }) {
35522
35640
  }
35523
35641
 
35524
35642
  // src/components/navigation/client-only-header.tsx
35525
- import { jsx as jsx273 } from "react/jsx-runtime";
35643
+ import { jsx as jsx274 } from "react/jsx-runtime";
35526
35644
  function ClientOnlyHeader({ config, skeleton }) {
35527
35645
  const [isClient, setIsClient] = useState84(false);
35528
35646
  useEffect64(() => {
35529
35647
  setIsClient(true);
35530
35648
  }, []);
35531
35649
  if (!isClient) {
35532
- return skeleton || /* @__PURE__ */ jsx273(HeaderSkeleton, { config });
35650
+ return skeleton || /* @__PURE__ */ jsx274(HeaderSkeleton, { config });
35533
35651
  }
35534
- return /* @__PURE__ */ jsx273(Header2, { config });
35535
- }
35536
-
35537
- // src/components/navigation/mobile-nav-panel.tsx
35538
- import { useEffect as useEffect65, useRef as useRef45 } from "react";
35539
- init_button2();
35540
- import { X as X10 } from "lucide-react";
35541
- import { Fragment as Fragment51, jsx as jsx274, jsxs as jsxs211 } from "react/jsx-runtime";
35542
- function MobileNavPanel({ isOpen, config }) {
35543
- const panelRef = useRef45(null);
35544
- useEffect65(() => {
35545
- if (isOpen) {
35546
- document.body.style.overflow = "hidden";
35547
- } else {
35548
- document.body.style.overflow = "unset";
35549
- }
35550
- return () => {
35551
- document.body.style.overflow = "unset";
35552
- };
35553
- }, [isOpen]);
35554
- useEffect65(() => {
35555
- const handleKeyDown = (e) => {
35556
- if (e.key === "Escape" && isOpen) {
35557
- config.onClose?.();
35558
- }
35559
- };
35560
- if (isOpen) {
35561
- document.addEventListener("keydown", handleKeyDown);
35562
- return () => document.removeEventListener("keydown", handleKeyDown);
35563
- }
35564
- }, [isOpen, config]);
35565
- if (!isOpen) return null;
35566
- const renderNavigationItem = (item) => {
35567
- if (item.element) {
35568
- return /* @__PURE__ */ jsx274("div", { children: item.element }, item.id);
35569
- }
35570
- const handleClick = () => {
35571
- if (item.onClick) {
35572
- item.onClick();
35573
- }
35574
- config.onClose?.();
35575
- };
35576
- if (item.href) {
35577
- return /* @__PURE__ */ jsx274(
35578
- Button,
35579
- {
35580
- variant: "outline",
35581
- size: "small-legacy",
35582
- href: item.href,
35583
- onClick: handleClick,
35584
- leftIcon: item.icon,
35585
- rightIcon: item.badge,
35586
- className: cn(
35587
- "justify-start h-12 px-4 bg-transparent border-none text-ods-text-primary hover:bg-ods-bg-hover gap-3 rounded-md transition-colors",
35588
- item.isActive ? "bg-ods-bg-hover" : ""
35589
- ),
35590
- children: item.label
35591
- },
35592
- item.id
35593
- );
35594
- }
35595
- return /* @__PURE__ */ jsxs211(
35596
- Button,
35597
- {
35598
- variant: "outline",
35599
- size: "small-legacy",
35600
- onClick: handleClick,
35601
- leftIcon: item.icon,
35602
- className: cn(
35603
- "justify-start h-12 px-4 bg-transparent border-none text-ods-text-primary hover:bg-ods-bg-hover gap-3 rounded-md transition-colors",
35604
- item.isActive ? "bg-ods-bg-hover" : ""
35605
- ),
35606
- children: [
35607
- /* @__PURE__ */ jsx274("span", { className: "flex-1 text-left", children: item.label }),
35608
- item.badge !== void 0 && /* @__PURE__ */ jsx274("span", { className: "ml-auto", children: item.badge })
35609
- ]
35610
- },
35611
- item.id
35612
- );
35613
- };
35614
- return /* @__PURE__ */ jsxs211(Fragment51, { children: [
35615
- /* @__PURE__ */ jsx274(
35616
- "div",
35617
- {
35618
- className: "fixed inset-0 z-[9998] bg-black/50",
35619
- onClick: config.onClose
35620
- }
35621
- ),
35622
- /* @__PURE__ */ jsxs211(
35623
- "div",
35624
- {
35625
- ref: panelRef,
35626
- className: cn(
35627
- "fixed z-[9999] rounded-lg shadow-xl",
35628
- config.className ? "" : "bg-ods-card border border-ods-border",
35629
- // Responsive positioning and sizing - matching original working version
35630
- "right-2 left-2 md:left-auto",
35631
- "md:right-6 md:w-[400px] md:max-w-[calc(100vw-3rem)]",
35632
- // Height constraints with proper mobile spacing - increased top position
35633
- "top-20 max-h-[calc(100vh-130px)] md:max-h-[calc(100vh-88px)]",
35634
- "flex flex-col",
35635
- config.className || ""
35636
- ),
35637
- onClick: (e) => e.stopPropagation(),
35638
- children: [
35639
- /* @__PURE__ */ jsx274("div", { className: "flex justify-end p-2 border-b border-ods-border flex-shrink-0", children: /* @__PURE__ */ jsx274(
35640
- Button,
35641
- {
35642
- "aria-label": "Close menu",
35643
- size: "icon",
35644
- variant: "transparent",
35645
- leftIcon: /* @__PURE__ */ jsx274(X10, { className: "w-4 h-4 text-ods-text-primary" }),
35646
- onClick: config.onClose,
35647
- className: "hover:bg-ods-bg-hover"
35648
- }
35649
- ) }),
35650
- /* @__PURE__ */ jsx274("div", { className: "flex-1 overflow-y-auto overflow-x-hidden px-2 py-2", children: /* @__PURE__ */ jsx274("div", { className: "flex flex-col space-y-1", children: config.sections.map((section, index) => /* @__PURE__ */ jsxs211("div", { children: [
35651
- section.title && /* @__PURE__ */ jsx274("div", { className: "px-4 pt-2 pb-1 text-xs font-semibold text-ods-text-secondary uppercase tracking-wide", children: section.title }),
35652
- /* @__PURE__ */ jsx274("div", { className: "flex flex-col gap-1", children: section.items.map(renderNavigationItem) })
35653
- ] }, index)) }) }),
35654
- config.footer && /* @__PURE__ */ jsx274("div", { className: "border-t border-ods-border p-4 flex-shrink-0", children: config.footer })
35655
- ]
35656
- }
35657
- )
35658
- ] });
35652
+ return /* @__PURE__ */ jsx274(Header2, { config });
35659
35653
  }
35660
35654
 
35661
35655
  // src/components/navigation/sliding-sidebar.tsx
35662
- import { useState as useState85, useEffect as useEffect66 } from "react";
35663
- import { motion as motion2, AnimatePresence } from "framer-motion";
35656
+ import { useState as useState85, useEffect as useEffect65, useRef as useRef46 } from "react";
35657
+ import { motion as motion2, AnimatePresence, useReducedMotion } from "framer-motion";
35658
+ import { usePreventScroll as usePreventScroll4 } from "@react-aria/overlays";
35664
35659
  init_button2();
35665
35660
  import { Fragment as Fragment52, jsx as jsx275, jsxs as jsxs212 } from "react/jsx-runtime";
35666
35661
  function SlidingSidebar({ config }) {
35667
35662
  const [expandedItems, setExpandedItems] = useState85(/* @__PURE__ */ new Set());
35668
35663
  const [mounted, setMounted] = useState85(false);
35669
35664
  const headerHeight = useHeaderHeight();
35670
- useEffect66(() => {
35665
+ const asideRef = useRef46(null);
35666
+ const prefersReducedMotion = useReducedMotion();
35667
+ usePreventScroll4({ isDisabled: !config.isOpen });
35668
+ useFocusTrap(asideRef, config.isOpen, { onEscape: config.onClose, contain: false });
35669
+ useEffect65(() => {
35671
35670
  setMounted(true);
35672
35671
  }, []);
35673
35672
  const toggleExpanded = (itemId) => {
@@ -35795,18 +35794,19 @@ function SlidingSidebar({ config }) {
35795
35794
  duration: 0.3,
35796
35795
  ease: [0.4, 0, 0.2, 1]
35797
35796
  },
35798
- className: "fixed inset-0 bg-black/50 z-[45]",
35797
+ className: cn("fixed inset-0 z-[45]", OVERLAY_BACKDROP_CLASS),
35799
35798
  onClick: () => config.onClose()
35800
35799
  }
35801
35800
  ) }),
35802
35801
  /* @__PURE__ */ jsxs212(
35803
35802
  motion2.aside,
35804
35803
  {
35804
+ ref: asideRef,
35805
35805
  initial: false,
35806
35806
  animate: {
35807
35807
  x: config.isOpen ? 0 : config.position === "right" ? "100%" : "-100%"
35808
35808
  },
35809
- transition: {
35809
+ transition: prefersReducedMotion ? { duration: 0 } : {
35810
35810
  type: "spring",
35811
35811
  damping: 25,
35812
35812
  stiffness: 300,
@@ -35814,6 +35814,10 @@ function SlidingSidebar({ config }) {
35814
35814
  restDelta: 0.01,
35815
35815
  velocity: config.isOpen ? 5 : -5
35816
35816
  },
35817
+ tabIndex: -1,
35818
+ inert: !config.isOpen || void 0,
35819
+ role: config.isOpen ? "dialog" : void 0,
35820
+ "aria-label": config.isOpen ? "Navigation sidebar" : void 0,
35817
35821
  className: cn(
35818
35822
  "fixed top-0 bottom-0 z-[46] w-72 bg-ods-card border-ods-border flex flex-col shadow-xl",
35819
35823
  config.position === "right" ? "right-0 border-l" : "left-0 border-r",
@@ -35821,8 +35825,8 @@ function SlidingSidebar({ config }) {
35821
35825
  ),
35822
35826
  children: [
35823
35827
  /* @__PURE__ */ jsx275("div", { className: "flex-shrink-0", style: { height: `${headerHeight}px` } }),
35824
- /* @__PURE__ */ jsx275("nav", { className: "flex-1 p-4 space-y-2 overflow-y-auto", children: config.items.map((item) => renderMenuItem(item)) }),
35825
- config.footer && /* @__PURE__ */ jsx275("div", { className: "p-4 border-t border-ods-border", children: config.footer })
35828
+ /* @__PURE__ */ jsx275("nav", { className: "flex-1 p-4 space-y-2 overflow-y-auto overscroll-contain", children: config.items.map((item) => renderMenuItem(item)) }),
35829
+ config.footer && /* @__PURE__ */ jsx275("div", { className: "p-4 pb-[max(1rem,env(safe-area-inset-bottom))] border-t border-ods-border", children: config.footer })
35826
35830
  ]
35827
35831
  }
35828
35832
  )
@@ -35830,7 +35834,7 @@ function SlidingSidebar({ config }) {
35830
35834
  }
35831
35835
 
35832
35836
  // src/components/navigation/sticky-section-nav.tsx
35833
- import { useEffect as useEffect67, useState as useState86, useCallback as useCallback34, useRef as useRef46 } from "react";
35837
+ import { useEffect as useEffect66, useState as useState86, useCallback as useCallback34, useRef as useRef47 } from "react";
35834
35838
  import { jsx as jsx276, jsxs as jsxs213 } from "react/jsx-runtime";
35835
35839
  function StickySectionNav({
35836
35840
  sections,
@@ -35892,7 +35896,7 @@ function StickySectionNav({
35892
35896
  }
35893
35897
  function useSectionNavigation(sections, options) {
35894
35898
  const [activeSection, setActiveSection] = useState86(sections[0]?.id || "");
35895
- const isScrollingFromClick = useRef46(false);
35899
+ const isScrollingFromClick = useRef47(false);
35896
35900
  const { offset: offset2 = 100 } = options || {};
35897
35901
  const handleSectionClick = useCallback34((sectionId) => {
35898
35902
  const targetElement = document.getElementById(sectionId);
@@ -35904,14 +35908,14 @@ function useSectionNavigation(sections, options) {
35904
35908
  isScrollingFromClick.current = false;
35905
35909
  }, 500);
35906
35910
  }, [offset2]);
35907
- useEffect67(() => {
35911
+ useEffect66(() => {
35908
35912
  sections.forEach((section) => {
35909
35913
  if (section.ref.current && !section.ref.current.id) {
35910
35914
  section.ref.current.id = section.id;
35911
35915
  }
35912
35916
  });
35913
35917
  }, [sections]);
35914
- useEffect67(() => {
35918
+ useEffect66(() => {
35915
35919
  const handleScroll = () => {
35916
35920
  if (isScrollingFromClick.current) return;
35917
35921
  const scrollPosition = window.scrollY + offset2 + 50;
@@ -35944,7 +35948,7 @@ function useSectionNavigation(sections, options) {
35944
35948
  }
35945
35949
 
35946
35950
  // src/components/navigation/navigation-sidebar.tsx
35947
- import { useCallback as useCallback35, useEffect as useEffect68, useLayoutEffect as useLayoutEffect6, useMemo as useMemo34, useState as useState87 } from "react";
35951
+ import { useCallback as useCallback35, useEffect as useEffect67, useLayoutEffect as useLayoutEffect6, useMemo as useMemo34, useState as useState87 } from "react";
35948
35952
 
35949
35953
  // src/components/navigation/navigation-sidebar-header.tsx
35950
35954
  import { jsx as jsx277, jsxs as jsxs214 } from "react/jsx-runtime";
@@ -36093,7 +36097,7 @@ function NavigationSidebar({ config, disabled = false }) {
36093
36097
  config.minimized ?? false
36094
36098
  );
36095
36099
  const [tabletMinimized, setTabletMinimized] = useState87(true);
36096
- useEffect68(() => {
36100
+ useEffect67(() => {
36097
36101
  if (isTablet) setTabletMinimized(true);
36098
36102
  }, [isTablet]);
36099
36103
  const minimized = isTablet ? tabletMinimized : desktopMinimized;
@@ -36111,7 +36115,7 @@ function NavigationSidebar({ config, disabled = false }) {
36111
36115
  const closeOverlay = useCallback35(() => {
36112
36116
  setTabletMinimized(true);
36113
36117
  }, []);
36114
- useEffect68(() => {
36118
+ useEffect67(() => {
36115
36119
  if (!isOverlayOpen) return;
36116
36120
  const handleKeyDown = (e) => {
36117
36121
  if (e.key === "Escape") closeOverlay();
@@ -36592,10 +36596,11 @@ function NotificationsHeaderButton({
36592
36596
  }
36593
36597
 
36594
36598
  // src/components/navigation/app-layout.tsx
36595
- import { Suspense as Suspense2, useCallback as useCallback37, useMemo as useMemo35, useRef as useRef47, useState as useState88 } from "react";
36599
+ import { Suspense as Suspense2, useCallback as useCallback37, useMemo as useMemo35, useRef as useRef49, useState as useState88 } from "react";
36596
36600
 
36597
36601
  // src/components/navigation/mobile-burger-menu.tsx
36598
- import React114, { useCallback as useCallback36, useEffect as useEffect69 } from "react";
36602
+ import React114, { useCallback as useCallback36, useRef as useRef48 } from "react";
36603
+ import { usePreventScroll as usePreventScroll5 } from "@react-aria/overlays";
36599
36604
  import { Fragment as Fragment54, jsx as jsx285, jsxs as jsxs222 } from "react/jsx-runtime";
36600
36605
  var HEADER_HEIGHT = 48;
36601
36606
  var MobileBurgerMenu = React114.memo(function MobileBurgerMenu2({
@@ -36608,27 +36613,9 @@ var MobileBurgerMenu = React114.memo(function MobileBurgerMenu2({
36608
36613
  onLogout,
36609
36614
  disabled = false
36610
36615
  }) {
36611
- useEffect69(() => {
36612
- if (isOpen) {
36613
- document.body.style.overflow = "hidden";
36614
- } else {
36615
- document.body.style.overflow = "unset";
36616
- }
36617
- return () => {
36618
- document.body.style.overflow = "unset";
36619
- };
36620
- }, [isOpen]);
36621
- useEffect69(() => {
36622
- const handleKeyDown = (e) => {
36623
- if (e.key === "Escape" && isOpen) {
36624
- onClose();
36625
- }
36626
- };
36627
- if (isOpen) {
36628
- document.addEventListener("keydown", handleKeyDown);
36629
- return () => document.removeEventListener("keydown", handleKeyDown);
36630
- }
36631
- }, [isOpen, onClose]);
36616
+ const panelRef = useRef48(null);
36617
+ usePreventScroll5({ isDisabled: !isOpen });
36618
+ useFocusTrap(panelRef, isOpen, { onEscape: onClose });
36632
36619
  const handleItemClick = useCallback36((item) => {
36633
36620
  if (item.onClick) {
36634
36621
  item.onClick();
@@ -36689,7 +36676,7 @@ var MobileBurgerMenu = React114.memo(function MobileBurgerMenu2({
36689
36676
  className: cn(
36690
36677
  "absolute inset-0 z-[100] md:hidden",
36691
36678
  OVERLAY_BACKDROP_CLASS,
36692
- "transition-all duration-300",
36679
+ "transition-all duration-300 motion-reduce:transition-none",
36693
36680
  isOpen ? "opacity-100" : "opacity-0 pointer-events-none"
36694
36681
  ),
36695
36682
  style: { top: HEADER_HEIGHT },
@@ -36700,11 +36687,12 @@ var MobileBurgerMenu = React114.memo(function MobileBurgerMenu2({
36700
36687
  /* @__PURE__ */ jsx285(
36701
36688
  "div",
36702
36689
  {
36690
+ ref: panelRef,
36703
36691
  className: cn(
36704
36692
  "absolute left-0 right-0 z-[101] md:hidden",
36705
36693
  "flex flex-col",
36706
36694
  "bg-ods-bg border-b border-ods-border",
36707
- "transition-all duration-300 ease-out",
36695
+ "transition-all duration-300 ease-out motion-reduce:transition-none",
36708
36696
  "overflow-hidden",
36709
36697
  isOpen ? "opacity-100 translate-y-0" : "opacity-0 -translate-y-4 pointer-events-none"
36710
36698
  ),
@@ -36715,7 +36703,9 @@ var MobileBurgerMenu = React114.memo(function MobileBurgerMenu2({
36715
36703
  role: "dialog",
36716
36704
  "aria-modal": "true",
36717
36705
  "aria-label": "Mobile navigation menu",
36718
- children: /* @__PURE__ */ jsxs222("div", { className: "flex-1 overflow-y-auto overflow-x-hidden p-4 flex flex-col gap-4", children: [
36706
+ tabIndex: -1,
36707
+ inert: !isOpen || void 0,
36708
+ children: /* @__PURE__ */ jsxs222("div", { className: "flex-1 overflow-y-auto overflow-x-hidden overscroll-contain p-4 flex flex-col gap-4", children: [
36719
36709
  user && /* @__PURE__ */ jsxs222(
36720
36710
  "div",
36721
36711
  {
@@ -36808,9 +36798,9 @@ function AppLayout({
36808
36798
  }) {
36809
36799
  const [mobileMenuOpen, setMobileMenuOpen] = useState88(false);
36810
36800
  const [drawerContainer, setDrawerContainer] = useState88(null);
36811
- const mobileMenuOpenRef = useRef47(mobileMenuOpen);
36801
+ const mobileMenuOpenRef = useRef49(mobileMenuOpen);
36812
36802
  mobileMenuOpenRef.current = mobileMenuOpen;
36813
- const drawerHandlesRef = useRef47(/* @__PURE__ */ new Set());
36803
+ const drawerHandlesRef = useRef49(/* @__PURE__ */ new Set());
36814
36804
  const handleToggleMobileMenu = useCallback37(() => {
36815
36805
  const opening = !mobileMenuOpenRef.current;
36816
36806
  if (opening) {
@@ -37437,7 +37427,7 @@ ScriptArguments.displayName = "ScriptArguments";
37437
37427
 
37438
37428
  // src/components/shared/onboarding/onboarding-walkthrough.tsx
37439
37429
  init_button2();
37440
- import React116, { useRef as useRef48, useCallback as useCallback38 } from "react";
37430
+ import React116, { useRef as useRef50, useCallback as useCallback38 } from "react";
37441
37431
 
37442
37432
  // src/components/shared/onboarding/onboarding-step-card.tsx
37443
37433
  import React115 from "react";
@@ -37561,10 +37551,10 @@ function OnboardingWalkthrough({
37561
37551
  allStepsComplete,
37562
37552
  markMultipleComplete
37563
37553
  } = useOnboardingState(storageKey);
37564
- const hasAutoMarkedRef = useRef48(false);
37565
- const autoMarkingInProgressRef = useRef48(false);
37566
- const lastCompletionStatusRef = useRef48(null);
37567
- const actionInProgressRef = useRef48(/* @__PURE__ */ new Set());
37554
+ const hasAutoMarkedRef = useRef50(false);
37555
+ const autoMarkingInProgressRef = useRef50(false);
37556
+ const lastCompletionStatusRef = useRef50(null);
37557
+ const actionInProgressRef = useRef50(/* @__PURE__ */ new Set());
37568
37558
  React116.useEffect(() => {
37569
37559
  if (isLoadingCompletion) {
37570
37560
  hasAutoMarkedRef.current = false;
@@ -38252,7 +38242,7 @@ var ListLoader = (props) => /* @__PURE__ */ jsx304(ContentLoader, { ...props, va
38252
38242
 
38253
38243
  // src/components/ui/table/table.tsx
38254
38244
  init_cn();
38255
- import { useEffect as useEffect71, useRef as useRef50 } from "react";
38245
+ import { useEffect as useEffect69, useRef as useRef52 } from "react";
38256
38246
  init_pagination();
38257
38247
  init_button2();
38258
38248
 
@@ -38863,10 +38853,10 @@ function TableRow({
38863
38853
  }
38864
38854
 
38865
38855
  // src/components/ui/table/use-table-motion.ts
38866
- import { useEffect as useEffect70, useState as useState90 } from "react";
38856
+ import { useEffect as useEffect68, useState as useState90 } from "react";
38867
38857
  function useTableMotion(enabled) {
38868
38858
  const [runtime, setRuntime] = useState90(null);
38869
- useEffect70(() => {
38859
+ useEffect68(() => {
38870
38860
  if (!enabled || runtime) return;
38871
38861
  let active = true;
38872
38862
  import("framer-motion").then((m) => {
@@ -39012,10 +39002,10 @@ function Table({
39012
39002
  };
39013
39003
  const allSelected = selectedRows.length > 0 && selectedRows.length === data.length;
39014
39004
  const someSelected = selectedRows.length > 0 && selectedRows.length < data.length;
39015
- const sentinelRef = useRef50(null);
39016
- const onLoadMoreRef = useRef50(infiniteScroll?.onLoadMore);
39005
+ const sentinelRef = useRef52(null);
39006
+ const onLoadMoreRef = useRef52(infiniteScroll?.onLoadMore);
39017
39007
  onLoadMoreRef.current = infiniteScroll?.onLoadMore;
39018
- useEffect71(() => {
39008
+ useEffect69(() => {
39019
39009
  if (!infiniteScroll?.hasNextPage || infiniteScroll.isFetchingNextPage) return;
39020
39010
  const sentinel = sentinelRef.current;
39021
39011
  if (!sentinel) return;
@@ -39233,7 +39223,7 @@ import { useMemo as useMemo37 } from "react";
39233
39223
 
39234
39224
  // src/components/ui/query-report-table/query-report-table-header.tsx
39235
39225
  init_cn();
39236
- import { useRef as useRef51, useState as useState91, useCallback as useCallback39 } from "react";
39226
+ import { useRef as useRef53, useState as useState91, useCallback as useCallback39 } from "react";
39237
39227
  import { jsx as jsx316, jsxs as jsxs248 } from "react/jsx-runtime";
39238
39228
  function QueryReportTableHeader({
39239
39229
  columns,
@@ -39262,7 +39252,7 @@ function QueryReportTableHeader({
39262
39252
  );
39263
39253
  }
39264
39254
  function TruncatedHeaderCell({ value, width }) {
39265
- const textRef = useRef51(null);
39255
+ const textRef = useRef53(null);
39266
39256
  const [isTruncated, setIsTruncated] = useState91(false);
39267
39257
  const checkTruncation = useCallback39(() => {
39268
39258
  const el = textRef.current;
@@ -39292,7 +39282,7 @@ function TruncatedHeaderCell({ value, width }) {
39292
39282
 
39293
39283
  // src/components/ui/query-report-table/query-report-table-row.tsx
39294
39284
  init_cn();
39295
- import { useRef as useRef52, useState as useState92, useCallback as useCallback40 } from "react";
39285
+ import { useRef as useRef54, useState as useState92, useCallback as useCallback40 } from "react";
39296
39286
  import { jsx as jsx317, jsxs as jsxs249 } from "react/jsx-runtime";
39297
39287
  function QueryReportTableRow({
39298
39288
  row,
@@ -39338,7 +39328,7 @@ function QueryReportTableRow({
39338
39328
  );
39339
39329
  }
39340
39330
  function TruncatedCell({ value, className }) {
39341
- const textRef = useRef52(null);
39331
+ const textRef = useRef54(null);
39342
39332
  const [isTruncated, setIsTruncated] = useState92(false);
39343
39333
  const checkTruncation = useCallback40(() => {
39344
39334
  const el = textRef.current;
@@ -39840,7 +39830,7 @@ function DataTableEmpty({ className, ...props }) {
39840
39830
  // src/components/ui/data-table/data-table-row.tsx
39841
39831
  init_next_link();
39842
39832
  init_cn();
39843
- import { memo as memo5, useCallback as useCallback42, useRef as useRef53 } from "react";
39833
+ import { memo as memo5, useCallback as useCallback42, useRef as useRef55 } from "react";
39844
39834
  import { flexRender as flexRender2 } from "@tanstack/react-table";
39845
39835
 
39846
39836
  // src/components/ui/data-table/data-table-skeleton.tsx
@@ -39925,7 +39915,7 @@ function DataTableRowImpl({
39925
39915
  const hasSubRow = subRow != null && subRow !== false;
39926
39916
  const isLinkMode = Boolean(href) && !onClick;
39927
39917
  const isWholeCardLink = isLinkMode && !hasSubRow;
39928
- const containerRef = useRef53(null);
39918
+ const containerRef = useRef55(null);
39929
39919
  const handleClick = useCallback42(
39930
39920
  (e) => {
39931
39921
  const target = e.target;
@@ -40093,7 +40083,7 @@ function DataTableBody({
40093
40083
  }
40094
40084
 
40095
40085
  // src/components/ui/data-table/data-table-infinite-footer.tsx
40096
- import { useEffect as useEffect72, useRef as useRef54 } from "react";
40086
+ import { useEffect as useEffect70, useRef as useRef56 } from "react";
40097
40087
  import { Fragment as Fragment62, jsx as jsx327, jsxs as jsxs257 } from "react/jsx-runtime";
40098
40088
  function DataTableInfiniteFooter({
40099
40089
  hasNextPage,
@@ -40102,10 +40092,10 @@ function DataTableInfiniteFooter({
40102
40092
  skeletonRows = 3,
40103
40093
  rootMargin = "200px"
40104
40094
  }) {
40105
- const sentinelRef = useRef54(null);
40106
- const onLoadMoreRef = useRef54(onLoadMore);
40095
+ const sentinelRef = useRef56(null);
40096
+ const onLoadMoreRef = useRef56(onLoadMore);
40107
40097
  onLoadMoreRef.current = onLoadMore;
40108
- useEffect72(() => {
40098
+ useEffect70(() => {
40109
40099
  if (!hasNextPage || isFetchingNextPage) return;
40110
40100
  const sentinel = sentinelRef.current;
40111
40101
  if (!sentinel) return;
@@ -40739,8 +40729,8 @@ function FilterList({
40739
40729
 
40740
40730
  // src/components/ui/tag-search-input.tsx
40741
40731
  import {
40742
- useEffect as useEffect74,
40743
- useRef as useRef56,
40732
+ useEffect as useEffect72,
40733
+ useRef as useRef58,
40744
40734
  useState as useState94
40745
40735
  } from "react";
40746
40736
  init_cn();
@@ -40775,11 +40765,11 @@ function TagSearchInput({
40775
40765
  limitTags,
40776
40766
  placeholder: currentPlaceholder
40777
40767
  });
40778
- const wrapperRef = useRef56(null);
40779
- const hiddenTagsRef = useRef56(null);
40780
- const hiddenTagsPopupRef = useRef56(null);
40768
+ const wrapperRef = useRef58(null);
40769
+ const hiddenTagsRef = useRef58(null);
40770
+ const hiddenTagsPopupRef = useRef58(null);
40781
40771
  const [showHiddenTags, setShowHiddenTags] = useState94(false);
40782
- useEffect74(() => {
40772
+ useEffect72(() => {
40783
40773
  if (!showHiddenTags) return;
40784
40774
  const handleClick = (e) => {
40785
40775
  const target = e.target;
@@ -40934,7 +40924,7 @@ function TagSearchInput({
40934
40924
  }
40935
40925
 
40936
40926
  // src/components/ui/markdown-editor.tsx
40937
- import { useRef as useRef57, useCallback as useCallback43, useState as useState95, useEffect as useEffect75 } from "react";
40927
+ import { useRef as useRef59, useCallback as useCallback43, useState as useState95, useEffect as useEffect73 } from "react";
40938
40928
  init_cn();
40939
40929
  import { Loader2 as Loader29, Upload as Upload8 } from "lucide-react";
40940
40930
  import { jsx as jsx332, jsxs as jsxs262 } from "react/jsx-runtime";
@@ -40965,7 +40955,7 @@ body .w-md-editor .w-md-editor-bar::after { content: '' !important; display: blo
40965
40955
  body .w-md-editor .w-md-editor-bar:hover::after { border-color: var(--color-text-secondary) !important; }
40966
40956
  `;
40967
40957
  function MarkdownEditorStyles() {
40968
- useEffect75(() => {
40958
+ useEffect73(() => {
40969
40959
  if (document.getElementById(MARKDOWN_EDITOR_STYLE_ID)) return;
40970
40960
  const style = document.createElement("style");
40971
40961
  style.id = MARKDOWN_EDITOR_STYLE_ID;
@@ -40989,11 +40979,11 @@ function MarkdownEditor({
40989
40979
  onFileUploaded,
40990
40980
  renderPreview
40991
40981
  }) {
40992
- const fileInputRef = useRef57(null);
40982
+ const fileInputRef = useRef59(null);
40993
40983
  const [isUploading, setIsUploading] = useState95(false);
40994
40984
  const [uploadProgress, setUploadProgress] = useState95("");
40995
40985
  const [defaultExtraCommands, setDefaultExtraCommands] = useState95([]);
40996
- useEffect75(() => {
40986
+ useEffect73(() => {
40997
40987
  import("@uiw/react-md-editor").then((mod) => {
40998
40988
  if (mod.commands?.getExtraCommands) {
40999
40989
  setDefaultExtraCommands(mod.commands.getExtraCommands());
@@ -41082,11 +41072,11 @@ function MarkdownEditor({
41082
41072
  }
41083
41073
  } : null;
41084
41074
  const extraCommands = uploadCommand ? [...defaultExtraCommands, uploadCommand] : defaultExtraCommands;
41085
- const wrapperRef = useRef57(null);
41086
- const isDraggingRef = useRef57(false);
41087
- const mouseYRef = useRef57(0);
41088
- const rafRef = useRef57(0);
41089
- const scrollParentRef = useRef57(window);
41075
+ const wrapperRef = useRef59(null);
41076
+ const isDraggingRef = useRef59(false);
41077
+ const mouseYRef = useRef59(0);
41078
+ const rafRef = useRef59(0);
41079
+ const scrollParentRef = useRef59(window);
41090
41080
  const EDGE_ZONE = 60;
41091
41081
  const MAX_SCROLL_SPEED = 15;
41092
41082
  const findScrollParent = useCallback43((el) => {
@@ -41116,7 +41106,7 @@ function MarkdownEditor({
41116
41106
  }
41117
41107
  rafRef.current = requestAnimationFrame(scrollLoop);
41118
41108
  }, []);
41119
- useEffect75(() => {
41109
+ useEffect73(() => {
41120
41110
  const wrapper = wrapperRef.current;
41121
41111
  if (!wrapper) return;
41122
41112
  const onMouseMove = (e) => {
@@ -42599,7 +42589,7 @@ function ImageGalleryModal({
42599
42589
  initialIndex = 0
42600
42590
  }) {
42601
42591
  const [selectedImageIndex, setSelectedImageIndex] = useState102(initialIndex);
42602
- useEffect78(() => {
42592
+ useEffect76(() => {
42603
42593
  if (isOpen) {
42604
42594
  setSelectedImageIndex(initialIndex);
42605
42595
  }
@@ -42614,7 +42604,7 @@ function ImageGalleryModal({
42614
42604
  setSelectedImageIndex(selectedImageIndex + 1);
42615
42605
  }
42616
42606
  };
42617
- useEffect78(() => {
42607
+ useEffect76(() => {
42618
42608
  const handleKeyPress = (event) => {
42619
42609
  if (!isOpen) return;
42620
42610
  switch (event.key) {
@@ -46689,7 +46679,7 @@ function renderChatInlineEntityCard(chatRef, options = {}) {
46689
46679
  }
46690
46680
 
46691
46681
  // src/components/chat/hooks/use-chunk-catchup.ts
46692
- import { useCallback as useCallback45, useRef as useRef61 } from "react";
46682
+ import { useCallback as useCallback45, useRef as useRef63 } from "react";
46693
46683
  function makeSeqKey(messageType, chunkType, sequenceId) {
46694
46684
  return `${messageType}:${chunkType}:${sequenceId}`;
46695
46685
  }
@@ -46711,20 +46701,20 @@ function useChunkCatchup({
46711
46701
  chatTypes = [CHAT_TYPE.CLIENT],
46712
46702
  fetchChunks
46713
46703
  }) {
46714
- const processedSequenceKeys = useRef61(/* @__PURE__ */ new Set());
46715
- const lastSequenceId = useRef61(null);
46716
- const fetchingInProgress = useRef61(false);
46717
- const lastFetchParams = useRef61(null);
46718
- const chunkBuffer = useRef61([]);
46719
- const bufferUntilInitialCatchupComplete = useRef61(false);
46720
- const hasCompletedInitialCatchup = useRef61(false);
46721
- const dialogIdRef = useRef61(dialogId);
46704
+ const processedSequenceKeys = useRef63(/* @__PURE__ */ new Set());
46705
+ const lastSequenceId = useRef63(null);
46706
+ const fetchingInProgress = useRef63(false);
46707
+ const lastFetchParams = useRef63(null);
46708
+ const chunkBuffer = useRef63([]);
46709
+ const bufferUntilInitialCatchupComplete = useRef63(false);
46710
+ const hasCompletedInitialCatchup = useRef63(false);
46711
+ const dialogIdRef = useRef63(dialogId);
46722
46712
  dialogIdRef.current = dialogId;
46723
- const chatTypesRef = useRef61(chatTypes);
46713
+ const chatTypesRef = useRef63(chatTypes);
46724
46714
  chatTypesRef.current = chatTypes;
46725
- const fetchChunksRef = useRef61(fetchChunks);
46715
+ const fetchChunksRef = useRef63(fetchChunks);
46726
46716
  fetchChunksRef.current = fetchChunks;
46727
- const onChunkReceivedRef = useRef61(onChunkReceived);
46717
+ const onChunkReceivedRef = useRef63(onChunkReceived);
46728
46718
  onChunkReceivedRef.current = onChunkReceived;
46729
46719
  const processChunk = useCallback45((chunk, messageType, forceProcess = false) => {
46730
46720
  if (bufferUntilInitialCatchupComplete.current && !forceProcess) {
@@ -46901,7 +46891,7 @@ function useChunkCatchup({
46901
46891
  }
46902
46892
 
46903
46893
  // src/components/chat/hooks/use-jetstream-dialog-subscription.ts
46904
- import { useEffect as useEffect79, useRef as useRef62, useState as useState105 } from "react";
46894
+ import { useEffect as useEffect77, useRef as useRef64, useState as useState105 } from "react";
46905
46895
  var DEFAULT_INACTIVE_THRESHOLD_MS = 5 * 6e4;
46906
46896
  var DEFAULT_STREAM_NAME = "CHAT_CHUNKS";
46907
46897
  function useJetStreamDialogSubscription({
@@ -46924,53 +46914,53 @@ function useJetStreamDialogSubscription({
46924
46914
  const [isSubscribed, setIsSubscribed] = useState105(false);
46925
46915
  const [reconnectionCount, setReconnectionCount] = useState105(0);
46926
46916
  const [currentStreamSeq, setCurrentStreamSeq] = useState105(null);
46927
- const clientRef = useRef62(null);
46928
- const subscriptionRef = useRef62(null);
46929
- const highestStreamSeqRef = useRef62(null);
46930
- const onEventRef = useRef62(onEvent);
46931
- useEffect79(() => {
46917
+ const clientRef = useRef64(null);
46918
+ const subscriptionRef = useRef64(null);
46919
+ const highestStreamSeqRef = useRef64(null);
46920
+ const onEventRef = useRef64(onEvent);
46921
+ useEffect77(() => {
46932
46922
  onEventRef.current = onEvent;
46933
46923
  }, [onEvent]);
46934
- const onConnectRef = useRef62(onConnect);
46935
- useEffect79(() => {
46924
+ const onConnectRef = useRef64(onConnect);
46925
+ useEffect77(() => {
46936
46926
  onConnectRef.current = onConnect;
46937
46927
  }, [onConnect]);
46938
- const onDisconnectRef = useRef62(onDisconnect);
46939
- useEffect79(() => {
46928
+ const onDisconnectRef = useRef64(onDisconnect);
46929
+ useEffect77(() => {
46940
46930
  onDisconnectRef.current = onDisconnect;
46941
46931
  }, [onDisconnect]);
46942
- const onSubscribedRef = useRef62(onSubscribed);
46943
- useEffect79(() => {
46932
+ const onSubscribedRef = useRef64(onSubscribed);
46933
+ useEffect77(() => {
46944
46934
  onSubscribedRef.current = onSubscribed;
46945
46935
  }, [onSubscribed]);
46946
- const onBeforeReconnectRef = useRef62(onBeforeReconnect);
46947
- useEffect79(() => {
46936
+ const onBeforeReconnectRef = useRef64(onBeforeReconnect);
46937
+ useEffect77(() => {
46948
46938
  onBeforeReconnectRef.current = onBeforeReconnect;
46949
46939
  }, [onBeforeReconnect]);
46950
- const getNatsWsUrlRef = useRef62(getNatsWsUrl);
46951
- useEffect79(() => {
46940
+ const getNatsWsUrlRef = useRef64(getNatsWsUrl);
46941
+ useEffect77(() => {
46952
46942
  getNatsWsUrlRef.current = getNatsWsUrl;
46953
46943
  }, [getNatsWsUrl]);
46954
- const reconnectionBackoffRef = useRef62(reconnectionBackoff);
46955
- useEffect79(() => {
46944
+ const reconnectionBackoffRef = useRef64(reconnectionBackoff);
46945
+ useEffect77(() => {
46956
46946
  reconnectionBackoffRef.current = reconnectionBackoff;
46957
46947
  }, [reconnectionBackoff]);
46958
- const optStartSeqRef = useRef62(optStartSeq);
46959
- useEffect79(() => {
46948
+ const optStartSeqRef = useRef64(optStartSeq);
46949
+ useEffect77(() => {
46960
46950
  optStartSeqRef.current = optStartSeq;
46961
46951
  }, [optStartSeq]);
46962
- const inactiveThresholdRef = useRef62(inactiveThresholdMs);
46963
- useEffect79(() => {
46952
+ const inactiveThresholdRef = useRef64(inactiveThresholdMs);
46953
+ useEffect77(() => {
46964
46954
  inactiveThresholdRef.current = inactiveThresholdMs;
46965
46955
  }, [inactiveThresholdMs]);
46966
- const hadConnectionBeforeRef = useRef62(false);
46967
- const clientConfigRef = useRef62(clientConfig);
46968
- useEffect79(() => {
46956
+ const hadConnectionBeforeRef = useRef64(false);
46957
+ const clientConfigRef = useRef64(clientConfig);
46958
+ useEffect77(() => {
46969
46959
  clientConfigRef.current = clientConfig;
46970
46960
  }, [clientConfig]);
46971
- const currentWsUrlRef = useRef62("");
46961
+ const currentWsUrlRef = useRef64("");
46972
46962
  const wsUrl = getNatsWsUrl();
46973
- useEffect79(() => {
46963
+ useEffect77(() => {
46974
46964
  if (!enabled || !wsUrl) {
46975
46965
  if (currentWsUrlRef.current && clientRef.current) {
46976
46966
  releaseClient(currentWsUrlRef.current);
@@ -47051,7 +47041,7 @@ function useJetStreamDialogSubscription({
47051
47041
  }
47052
47042
  };
47053
47043
  }, [enabled, wsUrl]);
47054
- useEffect79(() => {
47044
+ useEffect77(() => {
47055
47045
  if (!enabled || !dialogId || !isConnected) {
47056
47046
  if (subscriptionRef.current) {
47057
47047
  try {
@@ -47134,7 +47124,7 @@ function useJetStreamDialogSubscription({
47134
47124
  setIsSubscribed(false);
47135
47125
  };
47136
47126
  }, [enabled, dialogId, isConnected, streamName, topic, reconnectionCount]);
47137
- useEffect79(() => {
47127
+ useEffect77(() => {
47138
47128
  highestStreamSeqRef.current = null;
47139
47129
  setCurrentStreamSeq(null);
47140
47130
  }, [dialogId]);
@@ -47142,7 +47132,7 @@ function useJetStreamDialogSubscription({
47142
47132
  }
47143
47133
 
47144
47134
  // src/components/chat/hooks/use-nats-dialog-subscription.ts
47145
- import { useEffect as useEffect80, useRef as useRef63, useState as useState106 } from "react";
47135
+ import { useEffect as useEffect78, useRef as useRef65, useState as useState106 } from "react";
47146
47136
  function useNatsDialogSubscription({
47147
47137
  enabled,
47148
47138
  dialogId,
@@ -47159,44 +47149,44 @@ function useNatsDialogSubscription({
47159
47149
  const [isConnected, setIsConnected] = useState106(false);
47160
47150
  const [isSubscribed, setIsSubscribed] = useState106(false);
47161
47151
  const [reconnectionCount, setReconnectionCount] = useState106(0);
47162
- const clientRef = useRef63(null);
47163
- const subscriptionRefs = useRef63(/* @__PURE__ */ new Map());
47164
- const onEventRef = useRef63(onEvent);
47165
- useEffect80(() => {
47152
+ const clientRef = useRef65(null);
47153
+ const subscriptionRefs = useRef65(/* @__PURE__ */ new Map());
47154
+ const onEventRef = useRef65(onEvent);
47155
+ useEffect78(() => {
47166
47156
  onEventRef.current = onEvent;
47167
47157
  }, [onEvent]);
47168
- const onConnectRef = useRef63(onConnect);
47169
- useEffect80(() => {
47158
+ const onConnectRef = useRef65(onConnect);
47159
+ useEffect78(() => {
47170
47160
  onConnectRef.current = onConnect;
47171
47161
  }, [onConnect]);
47172
- const onDisconnectRef = useRef63(onDisconnect);
47173
- useEffect80(() => {
47162
+ const onDisconnectRef = useRef65(onDisconnect);
47163
+ useEffect78(() => {
47174
47164
  onDisconnectRef.current = onDisconnect;
47175
47165
  }, [onDisconnect]);
47176
- const onSubscribedRef = useRef63(onSubscribed);
47177
- useEffect80(() => {
47166
+ const onSubscribedRef = useRef65(onSubscribed);
47167
+ useEffect78(() => {
47178
47168
  onSubscribedRef.current = onSubscribed;
47179
47169
  }, [onSubscribed]);
47180
- const onBeforeReconnectRef = useRef63(onBeforeReconnect);
47181
- useEffect80(() => {
47170
+ const onBeforeReconnectRef = useRef65(onBeforeReconnect);
47171
+ useEffect78(() => {
47182
47172
  onBeforeReconnectRef.current = onBeforeReconnect;
47183
47173
  }, [onBeforeReconnect]);
47184
- const hadConnectionBeforeRef = useRef63(false);
47185
- const getNatsWsUrlRef = useRef63(getNatsWsUrl);
47186
- useEffect80(() => {
47174
+ const hadConnectionBeforeRef = useRef65(false);
47175
+ const getNatsWsUrlRef = useRef65(getNatsWsUrl);
47176
+ useEffect78(() => {
47187
47177
  getNatsWsUrlRef.current = getNatsWsUrl;
47188
47178
  }, [getNatsWsUrl]);
47189
- const reconnectionBackoffRef = useRef63(reconnectionBackoff);
47190
- useEffect80(() => {
47179
+ const reconnectionBackoffRef = useRef65(reconnectionBackoff);
47180
+ useEffect78(() => {
47191
47181
  reconnectionBackoffRef.current = reconnectionBackoff;
47192
47182
  }, [reconnectionBackoff]);
47193
- const clientConfigRef = useRef63(clientConfig);
47194
- useEffect80(() => {
47183
+ const clientConfigRef = useRef65(clientConfig);
47184
+ useEffect78(() => {
47195
47185
  clientConfigRef.current = clientConfig;
47196
47186
  }, [clientConfig]);
47197
- const currentWsUrlRef = useRef63("");
47187
+ const currentWsUrlRef = useRef65("");
47198
47188
  const wsUrl = getNatsWsUrl();
47199
- useEffect80(() => {
47189
+ useEffect78(() => {
47200
47190
  if (!enabled || !wsUrl) {
47201
47191
  if (currentWsUrlRef.current && clientRef.current) {
47202
47192
  releaseClient(currentWsUrlRef.current);
@@ -47278,14 +47268,14 @@ function useNatsDialogSubscription({
47278
47268
  };
47279
47269
  }, [enabled, wsUrl]);
47280
47270
  const topicsKey = topics.join(",");
47281
- const lastSubscribedDialogIdRef = useRef63(null);
47282
- const isConnectedRef = useRef63(isConnected);
47283
- useEffect80(() => {
47271
+ const lastSubscribedDialogIdRef = useRef65(null);
47272
+ const isConnectedRef = useRef65(isConnected);
47273
+ useEffect78(() => {
47284
47274
  isConnectedRef.current = isConnected;
47285
47275
  }, [isConnected]);
47286
- const currentDialogIdRef = useRef63(null);
47287
- const abortControllerRef = useRef63(null);
47288
- useEffect80(() => {
47276
+ const currentDialogIdRef = useRef65(null);
47277
+ const abortControllerRef = useRef65(null);
47278
+ useEffect78(() => {
47289
47279
  currentDialogIdRef.current = dialogId;
47290
47280
  if (!enabled || !dialogId) {
47291
47281
  if (subscriptionRefs.current.size > 0) {
@@ -47366,7 +47356,7 @@ function useNatsDialogSubscription({
47366
47356
  abortControllerRef.current = null;
47367
47357
  };
47368
47358
  }, [enabled, dialogId, topicsKey, topics]);
47369
- useEffect80(() => {
47359
+ useEffect78(() => {
47370
47360
  if (!enabled || !currentDialogIdRef.current || !isConnected) {
47371
47361
  return;
47372
47362
  }
@@ -47416,7 +47406,7 @@ function buildNatsWsUrl(apiBaseUrl, options) {
47416
47406
  }
47417
47407
 
47418
47408
  // src/components/chat/hooks/use-realtime-chunk-processor.ts
47419
- import { useCallback as useCallback46, useRef as useRef64, useEffect as useEffect81 } from "react";
47409
+ import { useCallback as useCallback46, useRef as useRef66, useEffect as useEffect79 } from "react";
47420
47410
 
47421
47411
  // src/components/chat/utils/chunk-parser.ts
47422
47412
  function normalizeToolCalls(raw) {
@@ -48067,14 +48057,14 @@ function useRealtimeChunkProcessor(options) {
48067
48057
  batchApprovalsEnabled = true,
48068
48058
  isDirectMode = false
48069
48059
  } = options;
48070
- const accumulatorRef = useRef64(
48060
+ const accumulatorRef = useRef66(
48071
48061
  createMessageSegmentAccumulator({
48072
48062
  onApprove: callbacks.onApprove,
48073
48063
  onReject: callbacks.onReject
48074
48064
  })
48075
48065
  );
48076
- const hasInitializedWithData = useRef64(false);
48077
- useEffect81(() => {
48066
+ const hasInitializedWithData = useRef66(false);
48067
+ useEffect79(() => {
48078
48068
  if (initialState && !hasInitializedWithData.current) {
48079
48069
  accumulatorRef.current.initializeWithState(initialState);
48080
48070
  if (initialState.escalatedApprovals) {
@@ -48087,14 +48077,14 @@ function useRealtimeChunkProcessor(options) {
48087
48077
  hasInitializedWithData.current = true;
48088
48078
  }
48089
48079
  }, [initialState, callbacks]);
48090
- const isInStreamRef = useRef64(false);
48091
- const hasEverStreamedRef = useRef64(false);
48092
- const directModeFlagRef = useRef64(isDirectMode);
48093
- const sawDirectMessageRef = useRef64(false);
48094
- useEffect81(() => {
48080
+ const isInStreamRef = useRef66(false);
48081
+ const hasEverStreamedRef = useRef66(false);
48082
+ const directModeFlagRef = useRef66(isDirectMode);
48083
+ const sawDirectMessageRef = useRef66(false);
48084
+ useEffect79(() => {
48095
48085
  directModeFlagRef.current = isDirectMode;
48096
48086
  }, [isDirectMode]);
48097
- const pendingEscalatedRef = useRef64(/* @__PURE__ */ new Map());
48087
+ const pendingEscalatedRef = useRef66(/* @__PURE__ */ new Map());
48098
48088
  const processChunk = useCallback46(
48099
48089
  (chunk) => {
48100
48090
  const action = parseChunkToAction(chunk);
@@ -48352,7 +48342,7 @@ function useRealtimeChunkProcessor(options) {
48352
48342
  }
48353
48343
 
48354
48344
  // src/components/chat/hooks/use-slash-commands.ts
48355
- import { useEffect as useEffect82, useState as useState107 } from "react";
48345
+ import { useEffect as useEffect80, useState as useState107 } from "react";
48356
48346
  import { useQuery as useQuery2 } from "@tanstack/react-query";
48357
48347
  async function fetchSlashCommands(prefix, signal, commandsUrl) {
48358
48348
  try {
@@ -48371,7 +48361,7 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
48371
48361
  function useSlashCommands(prefix, commandsUrl) {
48372
48362
  const [commands, setCommands] = useState107([]);
48373
48363
  const [loading, setLoading] = useState107(false);
48374
- useEffect82(() => {
48364
+ useEffect80(() => {
48375
48365
  if (prefix == null) {
48376
48366
  setCommands([]);
48377
48367
  return;
@@ -48477,7 +48467,7 @@ function useEmptyStateConfig(emptyStateUrl, options) {
48477
48467
  }
48478
48468
 
48479
48469
  // src/components/chat/hooks/use-chat-attachments.ts
48480
- import { useCallback as useCallback47, useMemo as useMemo41, useRef as useRef65, useState as useState108 } from "react";
48470
+ import { useCallback as useCallback47, useMemo as useMemo41, useRef as useRef67, useState as useState108 } from "react";
48481
48471
  import { fileTypeFromBlob } from "file-type";
48482
48472
  var CHAT_ATTACHMENTS_BUCKET = "chat-attachments";
48483
48473
  var CHAT_ATTACHMENTS_FOLDER = "chat";
@@ -48554,7 +48544,7 @@ function useChatAttachments() {
48554
48544
  const runtime = useRequiredChatRuntime();
48555
48545
  const uploadUrlEndpoint = runtime.endpoints.attachmentUploadUrl;
48556
48546
  const [attachments, setAttachments] = useState108([]);
48557
- const controllersRef = useRef65(/* @__PURE__ */ new Map());
48547
+ const controllersRef = useRef67(/* @__PURE__ */ new Map());
48558
48548
  const updateOne = useCallback47((id, patch) => {
48559
48549
  setAttachments((prev) => prev.map((a) => a.id === id ? { ...a, ...patch } : a));
48560
48550
  }, []);
@@ -48643,7 +48633,7 @@ function useChatAttachments() {
48643
48633
  },
48644
48634
  [uploadUrlEndpoint, updateOne]
48645
48635
  );
48646
- const attachmentsRef = useRef65([]);
48636
+ const attachmentsRef = useRef67([]);
48647
48637
  attachmentsRef.current = attachments;
48648
48638
  const addFiles = useCallback47(
48649
48639
  (files) => {
@@ -48720,16 +48710,16 @@ function useChatAttachments() {
48720
48710
  }
48721
48711
 
48722
48712
  // src/components/chat/hooks/use-chat-attachment-image-gallery.tsx
48723
- import { useCallback as useCallback48, useEffect as useEffect83, useRef as useRef66, useState as useState109 } from "react";
48713
+ import { useCallback as useCallback48, useEffect as useEffect81, useRef as useRef68, useState as useState109 } from "react";
48724
48714
  import { jsx as jsx356 } from "react/jsx-runtime";
48725
48715
  var CLOSED = { isOpen: false, images: [], initialIndex: 0 };
48726
48716
  function useChatAttachmentImageGallery() {
48727
48717
  const runtime = useRequiredChatRuntime();
48728
48718
  const viewUrlPrefix = runtime.endpoints.attachmentViewUrlPrefix;
48729
- const panelRef = useRef66(null);
48719
+ const panelRef = useRef68(null);
48730
48720
  const [state, setState] = useState109(CLOSED);
48731
48721
  const handleClose = useCallback48(() => setState(CLOSED), []);
48732
- useEffect83(() => {
48722
+ useEffect81(() => {
48733
48723
  const root = panelRef.current;
48734
48724
  if (!root) return;
48735
48725
  const onClick = (ev) => {
@@ -48775,7 +48765,7 @@ function absolutize(prefix) {
48775
48765
  }
48776
48766
 
48777
48767
  // src/components/chat/hooks/use-chat-identity.ts
48778
- import { createContext as createContext12, createElement as createElement2, useContext as useContext12, useEffect as useEffect84, useState as useState110 } from "react";
48768
+ import { createContext as createContext12, createElement as createElement2, useContext as useContext12, useEffect as useEffect82, useState as useState110 } from "react";
48779
48769
  var ANON_DEFAULTS = {
48780
48770
  authTier: "anon",
48781
48771
  source: null,
@@ -48788,7 +48778,7 @@ function useResolveChatIdentity(enabled) {
48788
48778
  const proxyEmail = getEmbedProxyAuth()?.email ?? null;
48789
48779
  const [data, setData] = useState110(ANON_DEFAULTS);
48790
48780
  const [isLoading, setIsLoading] = useState110(enabled);
48791
- useEffect84(() => {
48781
+ useEffect82(() => {
48792
48782
  if (!enabled) return;
48793
48783
  let cancelled = false;
48794
48784
  const ctrl = new AbortController();
@@ -48830,11 +48820,11 @@ function useChatIdentity() {
48830
48820
  }
48831
48821
 
48832
48822
  // src/components/chat/hooks/use-close-on-navigation.ts
48833
- import { useEffect as useEffect85, useRef as useRef67 } from "react";
48823
+ import { useEffect as useEffect83, useRef as useRef69 } from "react";
48834
48824
  function useCloseOnNavigation(close, pathname) {
48835
- const prevPathnameRef = useRef67(null);
48836
- const initializedRef = useRef67(false);
48837
- useEffect85(() => {
48825
+ const prevPathnameRef = useRef69(null);
48826
+ const initializedRef = useRef69(false);
48827
+ useEffect83(() => {
48838
48828
  if (!initializedRef.current) {
48839
48829
  initializedRef.current = true;
48840
48830
  prevPathnameRef.current = pathname;
@@ -48848,14 +48838,14 @@ function useCloseOnNavigation(close, pathname) {
48848
48838
  }
48849
48839
 
48850
48840
  // src/components/chat/hooks/use-chat.ts
48851
- import { useState as useState112, useCallback as useCallback50, useEffect as useEffect86, useRef as useRef69 } from "react";
48841
+ import { useState as useState112, useCallback as useCallback50, useEffect as useEffect84, useRef as useRef71 } from "react";
48852
48842
 
48853
48843
  // src/components/chat/hooks/use-sse.ts
48854
- import { useState as useState111, useCallback as useCallback49, useRef as useRef68 } from "react";
48844
+ import { useState as useState111, useCallback as useCallback49, useRef as useRef70 } from "react";
48855
48845
  function useSSE({ useMock = true, debugMode = false, streamFn } = {}) {
48856
48846
  const [isStreaming, setIsStreaming] = useState111(false);
48857
48847
  const [error, setError] = useState111(null);
48858
- const abortControllerRef = useRef68(null);
48848
+ const abortControllerRef = useRef70(null);
48859
48849
  const fallbackStream = useCallback49(async function* () {
48860
48850
  throw new Error(
48861
48851
  "[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."
@@ -48923,10 +48913,10 @@ function useChat({
48923
48913
  } = {}) {
48924
48914
  const [messages, setMessages] = useState112(() => initialMessages ?? []);
48925
48915
  const [isTyping, setIsTyping] = useState112(false);
48926
- const currentAssistantSegmentsRef = useRef69([]);
48927
- const onMessagesChangeRef = useRef69(onMessagesChange);
48916
+ const currentAssistantSegmentsRef = useRef71([]);
48917
+ const onMessagesChangeRef = useRef71(onMessagesChange);
48928
48918
  onMessagesChangeRef.current = onMessagesChange;
48929
- useEffect86(() => {
48919
+ useEffect84(() => {
48930
48920
  onMessagesChangeRef.current?.(messages);
48931
48921
  }, [messages]);
48932
48922
  const {
@@ -49215,7 +49205,7 @@ function useChat({
49215
49205
  }
49216
49206
 
49217
49207
  // src/components/chat/hooks/use-sse-chat-adapter.ts
49218
- import { useState as useState113, useEffect as useEffect87, useCallback as useCallback51, useMemo as useMemo42, useRef as useRef70 } from "react";
49208
+ import { useState as useState113, useEffect as useEffect85, useCallback as useCallback51, useMemo as useMemo42, useRef as useRef72 } from "react";
49219
49209
  function createEmptyTurnMeta() {
49220
49210
  return {
49221
49211
  provider: null,
@@ -49536,20 +49526,20 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
49536
49526
  const runtime = useRequiredChatRuntime();
49537
49527
  const source = runtime.source || DEFAULT_CHAT_SOURCE;
49538
49528
  const tableIdForDocumentType = options?.tableIdForDocumentType ?? defaultTableIdForDocumentType;
49539
- const persistedRef = useRef70(null);
49529
+ const persistedRef = useRef72(null);
49540
49530
  if (persistedRef.current === null) {
49541
49531
  pruneStaleChatStorage(source);
49542
49532
  persistedRef.current = loadPersistedChat(source) || { messages: [], sources: [], sendCount: 0 };
49543
49533
  }
49544
- const sourcesMapRef = useRef70(
49534
+ const sourcesMapRef = useRef72(
49545
49535
  new Map(persistedRef.current.sources)
49546
49536
  );
49547
- const refsMapRef = useRef70(
49537
+ const refsMapRef = useRef72(
49548
49538
  new Map(persistedRef.current.refs ?? [])
49549
49539
  );
49550
- const metaMapRef = useRef70(/* @__PURE__ */ new Map());
49551
- const messagesRef = useRef70(persistedRef.current.messages);
49552
- const sendCountRef = useRef70(persistedRef.current.sendCount);
49540
+ const metaMapRef = useRef72(/* @__PURE__ */ new Map());
49541
+ const messagesRef = useRef72(persistedRef.current.messages);
49542
+ const sendCountRef = useRef72(persistedRef.current.sendCount);
49553
49543
  const [streamingPhase, setStreamingPhase] = useState113("idle");
49554
49544
  const [metaTick, setMetaTick] = useState113(0);
49555
49545
  const bumpMetaTick = useCallback51(() => setMetaTick((t) => t + 1), []);
@@ -49739,7 +49729,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
49739
49729
  }
49740
49730
  }
49741
49731
  }, [chatClearMessages, source, bumpMetaTick]);
49742
- useEffect87(() => {
49732
+ useEffect85(() => {
49743
49733
  if (!isTyping && !isStreaming && streamingPhase !== "idle") {
49744
49734
  setStreamingPhase("idle");
49745
49735
  }
@@ -49821,9 +49811,9 @@ var noopRejectRequest = async (_id, _reason) => {
49821
49811
  // src/components/chat/hooks/use-nats-chat-adapter.ts
49822
49812
  import {
49823
49813
  useCallback as useCallback52,
49824
- useEffect as useEffect88,
49814
+ useEffect as useEffect86,
49825
49815
  useMemo as useMemo43,
49826
- useRef as useRef71,
49816
+ useRef as useRef73,
49827
49817
  useState as useState114
49828
49818
  } from "react";
49829
49819
 
@@ -50365,9 +50355,9 @@ function useNatsChatAdapter(config, options = {}) {
50365
50355
  },
50366
50356
  [rejectRequestCallback]
50367
50357
  );
50368
- const handleApproveRef = useRef71(handleApprove);
50358
+ const handleApproveRef = useRef73(handleApprove);
50369
50359
  handleApproveRef.current = handleApprove;
50370
- const handleRejectRef = useRef71(handleReject);
50360
+ const handleRejectRef = useRef73(handleReject);
50371
50361
  handleRejectRef.current = handleReject;
50372
50362
  const accumApprove = useCallback52((requestId) => {
50373
50363
  if (!requestId) return;
@@ -50377,7 +50367,7 @@ function useNatsChatAdapter(config, options = {}) {
50377
50367
  if (!requestId) return;
50378
50368
  return handleRejectRef.current(requestId);
50379
50369
  }, []);
50380
- const callbacksRef = useRef71({
50370
+ const callbacksRef = useRef73({
50381
50371
  onSegmentsUpdate: (segments) => {
50382
50372
  setMessages((prev) => updateTrailingAssistant(prev, segments));
50383
50373
  },
@@ -50415,7 +50405,7 @@ function useNatsChatAdapter(config, options = {}) {
50415
50405
  onChunkReceived: (chunk) => processChunk(chunk),
50416
50406
  fetchChunks
50417
50407
  });
50418
- const historyLoadSeqRef = useRef71(0);
50408
+ const historyLoadSeqRef = useRef73(0);
50419
50409
  const loadDialogHistory = useCallback52(
50420
50410
  async (id, cursor) => {
50421
50411
  if (!fetchDialogMessages) return;
@@ -50470,8 +50460,8 @@ function useNatsChatAdapter(config, options = {}) {
50470
50460
  accumReject
50471
50461
  ]
50472
50462
  );
50473
- const prevDialogIdRef = useRef71(void 0);
50474
- useEffect88(() => {
50463
+ const prevDialogIdRef = useRef73(void 0);
50464
+ useEffect86(() => {
50475
50465
  if (prevDialogIdRef.current === dialogId) return;
50476
50466
  prevDialogIdRef.current = dialogId;
50477
50467
  historyLoadSeqRef.current += 1;
@@ -50485,7 +50475,7 @@ function useNatsChatAdapter(config, options = {}) {
50485
50475
  if (!active || !dialogId) return;
50486
50476
  void loadDialogHistory(dialogId);
50487
50477
  }, [active, dialogId, loadDialogHistory, resetAccumulator]);
50488
- useEffect88(() => {
50478
+ useEffect86(() => {
50489
50479
  if (!active || !dialogId) return;
50490
50480
  resetChunkTracking();
50491
50481
  startInitialBuffering();
@@ -50507,14 +50497,14 @@ function useNatsChatAdapter(config, options = {}) {
50507
50497
  setConnectionState("connected");
50508
50498
  }
50509
50499
  });
50510
- useEffect88(() => {
50500
+ useEffect86(() => {
50511
50501
  if (!active || !dialogId) {
50512
50502
  setConnectionState("connected");
50513
50503
  return;
50514
50504
  }
50515
50505
  setConnectionState("connecting");
50516
50506
  }, [active, dialogId]);
50517
- const initialDialogsLoadedRef = useRef71(false);
50507
+ const initialDialogsLoadedRef = useRef73(false);
50518
50508
  const loadDialogsPage = useCallback52(
50519
50509
  async (cursor) => {
50520
50510
  if (!fetchDialogs) return;
@@ -50546,7 +50536,7 @@ function useNatsChatAdapter(config, options = {}) {
50546
50536
  const reloadDialogs = useCallback52(() => {
50547
50537
  void loadDialogsPage();
50548
50538
  }, [loadDialogsPage]);
50549
- useEffect88(() => {
50539
+ useEffect86(() => {
50550
50540
  if (!fetchDialogs) return;
50551
50541
  if (!active) return;
50552
50542
  if (initialDialogsLoadedRef.current) return;
@@ -50787,7 +50777,7 @@ function useNatsChatAdapter(config, options = {}) {
50787
50777
  }
50788
50778
 
50789
50779
  // src/components/chat/hooks/use-unified-chat.ts
50790
- import { useCallback as useCallback53, useMemo as useMemo44, useRef as useRef72 } from "react";
50780
+ import { useCallback as useCallback53, useMemo as useMemo44, useRef as useRef74 } from "react";
50791
50781
  var EMPTY_SSE_OPTIONS = {};
50792
50782
  function createDisabledNatsConfig() {
50793
50783
  return {
@@ -50802,7 +50792,7 @@ function createDisabledNatsConfig() {
50802
50792
  }
50803
50793
  function useUnifiedChat(options) {
50804
50794
  const { modes, activeMode, mingoStateOverride } = options;
50805
- const disabledNatsRef = useRef72(null);
50795
+ const disabledNatsRef = useRef74(null);
50806
50796
  if (disabledNatsRef.current === null) {
50807
50797
  disabledNatsRef.current = createDisabledNatsConfig();
50808
50798
  }
@@ -50816,7 +50806,7 @@ function useUnifiedChat(options) {
50816
50806
  { active: natsActive }
50817
50807
  );
50818
50808
  const activeState = activeMode === "guide" ? sseState : mingoStateOverride ?? natsState;
50819
- const activeStateRef = useRef72(activeState);
50809
+ const activeStateRef = useRef74(activeState);
50820
50810
  activeStateRef.current = activeState;
50821
50811
  const stopMessage = useCallback53(() => activeStateRef.current.stopMessage(), []);
50822
50812
  const clearMessages = useCallback53(
@@ -51126,9 +51116,9 @@ function chatChipClass({ tone, density = "chip", extra }) {
51126
51116
  }
51127
51117
 
51128
51118
  // src/components/chat/embeddable-chat.tsx
51129
- import { useCallback as useCallback55, useEffect as useEffect89, useMemo as useMemo46, useRef as useRef73, useState as useState116 } from "react";
51119
+ import { useCallback as useCallback55, useEffect as useEffect87, useMemo as useMemo46, useRef as useRef75, useState as useState116 } from "react";
51130
51120
  import * as DialogPrimitive4 from "@radix-ui/react-dialog";
51131
- import { usePreventScroll } from "@react-aria/overlays";
51121
+ import { usePreventScroll as usePreventScroll6 } from "@react-aria/overlays";
51132
51122
  import { isIOS } from "@react-aria/utils";
51133
51123
 
51134
51124
  // node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
@@ -51650,7 +51640,7 @@ function EmbeddableChatInner({
51650
51640
  const commandsUrl = runtime.endpoints.commandsUrl;
51651
51641
  const { attachmentsEnabled, user: identityUser } = useChatIdentity();
51652
51642
  const viewUrlPrefix = runtime.endpoints.attachmentViewUrlPrefix;
51653
- useEffect89(() => {
51643
+ useEffect87(() => {
51654
51644
  if (process.env.NODE_ENV !== "production") {
51655
51645
  const hasOpen = open !== void 0;
51656
51646
  const hasHandler = onOpenChange !== void 0;
@@ -51670,9 +51660,9 @@ function EmbeddableChatInner({
51670
51660
  if (typeof window === "undefined") return false;
51671
51661
  return !window.matchMedia("(pointer: coarse)").matches;
51672
51662
  });
51673
- usePreventScroll({ isDisabled: !isOpen || shellLess });
51674
- const navigatingAwayRef = useRef73(false);
51675
- useEffect89(() => {
51663
+ usePreventScroll6({ isDisabled: !isOpen || shellLess });
51664
+ const navigatingAwayRef = useRef75(false);
51665
+ useEffect87(() => {
51676
51666
  if (!isOpen) return;
51677
51667
  if (shellLess) return;
51678
51668
  if (typeof window === "undefined") return;
@@ -51698,7 +51688,7 @@ function EmbeddableChatInner({
51698
51688
  window.scrollTo(0, scrollY);
51699
51689
  };
51700
51690
  }, [isOpen, shellLess]);
51701
- const chatInputRef = useRef73(null);
51691
+ const chatInputRef = useRef75(null);
51702
51692
  const [quickActionPreview, setQuickActionPreview] = useState116(null);
51703
51693
  const slashCommandsProp = useMemo46(
51704
51694
  () => ({
@@ -51802,8 +51792,8 @@ function EmbeddableChatInner({
51802
51792
  hasMoreMessages,
51803
51793
  loadMoreMessages
51804
51794
  } = useUnifiedChat({ modes: effectiveModes, activeMode, mingoStateOverride: mingoState });
51805
- const guidePromptSentRef = useRef73(false);
51806
- useEffect89(() => {
51795
+ const guidePromptSentRef = useRef75(false);
51796
+ useEffect87(() => {
51807
51797
  if (!guidePendingPrompt) {
51808
51798
  guidePromptSentRef.current = false;
51809
51799
  return;
@@ -51827,12 +51817,12 @@ function EmbeddableChatInner({
51827
51817
  const [contextItems, setContextItems] = useState116([]);
51828
51818
  const [contextPickerOpen, setContextPickerOpen] = useState116(false);
51829
51819
  const [mentionQuery, setMentionQuery] = useState116(null);
51830
- const mentionActiveRef = useRef73(false);
51831
- useEffect89(() => {
51820
+ const mentionActiveRef = useRef75(false);
51821
+ useEffect87(() => {
51832
51822
  mentionActiveRef.current = mentionQuery !== null;
51833
51823
  }, [mentionQuery]);
51834
- const mentionKeysRef = useRef73(/* @__PURE__ */ new Set());
51835
- useEffect89(() => {
51824
+ const mentionKeysRef = useRef75(/* @__PURE__ */ new Set());
51825
+ useEffect87(() => {
51836
51826
  setContextItems([]);
51837
51827
  setMentionQuery(null);
51838
51828
  mentionKeysRef.current.clear();
@@ -51928,7 +51918,7 @@ function EmbeddableChatInner({
51928
51918
  () => /* @__PURE__ */ jsx359(MingoIcon, { className: "h-6 w-6", cornerColor: "var(--ods-flamingo-cyan-base)" }),
51929
51919
  []
51930
51920
  );
51931
- const timestampCacheRef = useRef73(/* @__PURE__ */ new Map());
51921
+ const timestampCacheRef = useRef75(/* @__PURE__ */ new Map());
51932
51922
  const guideUserName = activeMode === "guide" ? [identityUser?.firstName, identityUser?.lastName].filter(Boolean).join(" ").trim() || identityUser?.name?.trim() || void 0 : void 0;
51933
51923
  const guideUserAvatar = activeMode === "guide" ? identityUser?.avatarUrl?.trim() || void 0 : void 0;
51934
51924
  const messages = useMemo46(() => {
@@ -52053,7 +52043,7 @@ function EmbeddableChatInner({
52053
52043
  });
52054
52044
  const handleOpen = useCallback55(() => setIsOpen(true), [setIsOpen]);
52055
52045
  useCloseOnNavigation(handleNavigationClose, null);
52056
- useEffect89(() => {
52046
+ useEffect87(() => {
52057
52047
  const handler = (e) => {
52058
52048
  const detail = e.detail;
52059
52049
  if (!detail || detail.source !== source) return;
@@ -52071,7 +52061,7 @@ function EmbeddableChatInner({
52071
52061
  const contentViewKey = hasConversation ? "conversation" : activeMode;
52072
52062
  const isGuideEmpty = !hasConversation && activeMode === "guide";
52073
52063
  const isQuickActionEmpty = !hasConversation && (activeMode === "guide" || activeMode === "mingo");
52074
- useEffect89(() => {
52064
+ useEffect87(() => {
52075
52065
  if (!isQuickActionEmpty) setQuickActionPreview(null);
52076
52066
  }, [isQuickActionEmpty]);
52077
52067
  const guideCanReturnToMingo = isGuideEmpty && hasMingoMode;
@@ -53378,10 +53368,11 @@ export {
53378
53368
  TicketNotesSection,
53379
53369
  TicketInfoSection,
53380
53370
  FilterPillRow,
53371
+ MOBILE_NAV_PANEL_ID,
53372
+ MobileNavPanel,
53381
53373
  Header2 as Header,
53382
53374
  HeaderSkeleton,
53383
53375
  ClientOnlyHeader,
53384
- MobileNavPanel,
53385
53376
  SlidingSidebar,
53386
53377
  StickySectionNav,
53387
53378
  useSectionNavigation,
@@ -53409,4 +53400,4 @@ export {
53409
53400
  LogsList,
53410
53401
  assets
53411
53402
  };
53412
- //# sourceMappingURL=chunk-IVM47EGI.js.map
53403
+ //# sourceMappingURL=chunk-YVJ2XBFU.js.map