@flytedan/flytebot-design-system 0.49.0 → 0.49.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -112,6 +112,7 @@ __export(index_exports, {
112
112
  JobTray: () => JobTray,
113
113
  Json: () => Json,
114
114
  KeyHint: () => KeyHint,
115
+ LAYER_STEP: () => LAYER_STEP,
115
116
  LoadingRegion: () => LoadingRegion,
116
117
  Markdown: () => Markdown,
117
118
  MarkdownEditor: () => MarkdownEditor,
@@ -126,6 +127,7 @@ __export(index_exports, {
126
127
  ModeSwitch: () => ModeSwitch,
127
128
  ModelControls: () => ModelControls,
128
129
  NumberInput: () => NumberInput,
130
+ OVERLAY_CEILING: () => OVERLAY_CEILING,
129
131
  POPOVER_BODY_MIN: () => POPOVER_BODY_MIN,
130
132
  PacketCard: () => PacketCard,
131
133
  Pagination: () => Pagination,
@@ -138,6 +140,7 @@ __export(index_exports, {
138
140
  ProgressBar: () => ProgressBar,
139
141
  QueryKit: () => QueryKit,
140
142
  QuotaRow: () => QuotaRow,
143
+ ROOT_STEP: () => ROOT_STEP,
141
144
  Radio: () => Radio,
142
145
  RangeSlider: () => RangeSlider,
143
146
  RelativeTime: () => RelativeTime,
@@ -182,6 +185,7 @@ __export(index_exports, {
182
185
  VIRTUAL_LIST_BUFFER_ROWS: () => VIRTUAL_LIST_BUFFER_ROWS,
183
186
  VIRTUAL_LIST_ROW_GAP: () => VIRTUAL_LIST_ROW_GAP,
184
187
  VirtualList: () => VirtualList,
188
+ __resetLayerStackForTests: () => __resetLayerStackForTests,
185
189
  acceptMatches: () => acceptMatches,
186
190
  anyOfFilter: () => anyOfFilter,
187
191
  applyPrefs: () => applyPrefs,
@@ -231,6 +235,7 @@ __export(index_exports, {
231
235
  useChatEngine: () => useChatEngine,
232
236
  useDocumentTitle: () => useDocumentTitle,
233
237
  useFeatureStatus: () => useFeatureStatus,
238
+ useLayerZIndex: () => useLayerZIndex,
234
239
  usePopoverPosition: () => usePopoverPosition,
235
240
  useResponsiveRail: () => useResponsiveRail,
236
241
  useRuntimeMode: () => useRuntimeMode,
@@ -447,6 +452,8 @@ function open(layer) {
447
452
  layer.order = ++lastOrder;
448
453
  lastClosed = null;
449
454
  if (layer.options.trap && !contains(scopeOf(layer), document.activeElement)) focusInto(layer);
455
+ zIndexVersion++;
456
+ notifyZIndexListeners();
450
457
  }
451
458
  function close(layer) {
452
459
  openLayers.delete(layer);
@@ -457,7 +464,53 @@ function close(layer) {
457
464
  document.removeEventListener("keydown", onKeydown);
458
465
  pendingEscape = null;
459
466
  }
467
+ zIndexVersion++;
468
+ notifyZIndexListeners();
460
469
  }
470
+ var LAYER_STEP = 10;
471
+ var ROOT_STEP = 100;
472
+ var OVERLAY_CEILING = 1e4;
473
+ var zIndexListeners = /* @__PURE__ */ new Set();
474
+ var notifyZIndexListeners = () => {
475
+ zIndexListeners.forEach((listener) => listener());
476
+ };
477
+ var subscribeZIndex = (listener) => {
478
+ zIndexListeners.add(listener);
479
+ return () => {
480
+ zIndexListeners.delete(listener);
481
+ };
482
+ };
483
+ var zIndexVersion = 0;
484
+ var getZIndexVersion = () => zIndexVersion;
485
+ function openSiblingsOf(layer) {
486
+ const siblings = [];
487
+ for (const l of openLayers) if (l.parent === layer.parent) siblings.push(l);
488
+ return siblings.sort((a, b) => a.order - b.order);
489
+ }
490
+ function computeZIndex(layer) {
491
+ const path = [];
492
+ for (let l = layer; l; l = l.parent) path.push(l);
493
+ path.reverse();
494
+ let z = 0;
495
+ for (const l of path) {
496
+ const siblings = openSiblingsOf(l);
497
+ const index = Math.max(0, siblings.indexOf(l));
498
+ z = l.parent === null ? (index + 1) * ROOT_STEP : z + LAYER_STEP + index;
499
+ }
500
+ return z;
501
+ }
502
+ function useLayerZIndex(layer) {
503
+ React2.useSyncExternalStore(subscribeZIndex, getZIndexVersion, getZIndexVersion);
504
+ const l = layer;
505
+ return l.order > 0 ? computeZIndex(l) : 0;
506
+ }
507
+ var __resetLayerStackForTests = () => {
508
+ openLayers.clear();
509
+ lastOrder = 0;
510
+ pendingEscape = null;
511
+ lastClosed = null;
512
+ notifyZIndexListeners();
513
+ };
461
514
  function returnFocus(layer) {
462
515
  if (layer.options.returnFocus === false) return;
463
516
  const current2 = document.activeElement;
@@ -614,50 +667,6 @@ var portal = (node) => {
614
667
  if (typeof document !== "undefined") return (0, import_react_dom.createPortal)(node, document.body);
615
668
  return node;
616
669
  };
617
- var ROOT_LAYER = 0;
618
- var LAYER_STEP = 10;
619
- var ROOT_STEP = 100;
620
- var OVERLAY_CEILING = 1e4;
621
- var LayerContext2 = React3.createContext(ROOT_LAYER);
622
- var openRootIds = [];
623
- var rootListeners = /* @__PURE__ */ new Set();
624
- var notifyRootListeners = () => {
625
- rootListeners.forEach((listener) => listener());
626
- };
627
- var subscribeRootOverlays = (listener) => {
628
- rootListeners.add(listener);
629
- return () => {
630
- rootListeners.delete(listener);
631
- };
632
- };
633
- var getRootOverlaysSnapshot = () => openRootIds;
634
- var registerRootOverlay = (id) => {
635
- if (openRootIds.includes(id)) return;
636
- openRootIds = [...openRootIds, id];
637
- notifyRootListeners();
638
- };
639
- var unregisterRootOverlay = (id) => {
640
- if (!openRootIds.includes(id)) return;
641
- openRootIds = openRootIds.filter((existing) => existing !== id);
642
- notifyRootListeners();
643
- };
644
- var useLayer = () => React3.useContext(LayerContext2);
645
- var useOverlayLayer = (isOpen) => {
646
- const parent = useLayer();
647
- const isRoot = parent === ROOT_LAYER;
648
- const id = React3.useId();
649
- const openIds = React3.useSyncExternalStore(subscribeRootOverlays, getRootOverlaysSnapshot, getRootOverlaysSnapshot);
650
- React3.useLayoutEffect(() => {
651
- if (!isRoot || !isOpen) return;
652
- registerRootOverlay(id);
653
- return () => unregisterRootOverlay(id);
654
- }, [isRoot, isOpen, id]);
655
- if (!isRoot) return parent + LAYER_STEP;
656
- if (!isOpen) return ROOT_LAYER;
657
- const index = openIds.indexOf(id);
658
- return index === -1 ? ROOT_LAYER : (index + 1) * ROOT_STEP;
659
- };
660
- var LayerProvider = ({ zIndex, children }) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(LayerContext2.Provider, { value: zIndex, children });
661
670
  function Popover({
662
671
  open: open2,
663
672
  anchorRef,
@@ -693,8 +702,8 @@ function Popover({
693
702
  onDetach: onClose,
694
703
  layerRef: ref
695
704
  });
696
- const zIndex = useOverlayLayer(!!open2);
697
705
  const layer = useStackedLayer({ active: !!open2, containerRef: ref, onEscape: closeOnEscape ? onClose : void 0, returnFocus: returnFocus2 });
706
+ const zIndex = useLayerZIndex(layer);
698
707
  React3.useEffect(() => {
699
708
  if (!open2) return;
700
709
  const away = (e) => {
@@ -710,7 +719,7 @@ function Popover({
710
719
  }, [open2, closeOnOutside, onClose, anchorRef, triggerRef, layer]);
711
720
  if (!open2 || !pos) return null;
712
721
  return portal(
713
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(LayerProvider, { zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(StackedLayerProvider, { layer, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
722
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(StackedLayerProvider, { layer, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
714
723
  "div",
715
724
  {
716
725
  ref,
@@ -753,7 +762,7 @@ function Popover({
753
762
  footer != null ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "fd-pop-footer", children: footer }) : null
754
763
  ]
755
764
  }
756
- ) }) })
765
+ ) })
757
766
  );
758
767
  }
759
768
  var isItem = (it) => !!it && it.kind !== "separator" && it.kind !== "section" && it.kind !== "custom" && !it.disabled;
@@ -1005,6 +1014,7 @@ var import_jsx_runtime6 = require("react/jsx-runtime");
1005
1014
  function AnchoredPopover({ rect, width = 620, onClose, children }) {
1006
1015
  const ref = React4.useRef(null);
1007
1016
  const layer = useStackedLayer({ active: !!rect, containerRef: ref, onEscape: onClose });
1017
+ const zIndex = useLayerZIndex(layer);
1008
1018
  const w = Math.min(width, window.innerWidth - 32);
1009
1019
  const [h, setH] = React4.useState(0);
1010
1020
  React4.useLayoutEffect(() => {
@@ -1046,7 +1056,7 @@ function AnchoredPopover({ rect, width = 620, onClose, children }) {
1046
1056
  left,
1047
1057
  top,
1048
1058
  width: w,
1049
- zIndex: 150,
1059
+ zIndex,
1050
1060
  maxHeight: `calc(100vh - ${PAD * 2}px)`,
1051
1061
  overflowY: "auto",
1052
1062
  background: "var(--surface)",
@@ -1169,7 +1179,6 @@ var React6 = __toESM(require("react"), 1);
1169
1179
  var import_react_dom3 = require("react-dom");
1170
1180
  var import_jsx_runtime9 = require("react/jsx-runtime");
1171
1181
  function Drawer({ open: open2 = true, title, onClose, footer, children, className = "", ...rest }) {
1172
- const zIndex = useOverlayLayer(open2);
1173
1182
  const asideRef = React6.useRef(null);
1174
1183
  const [closing, setClosing] = React6.useState(false);
1175
1184
  const close2 = React6.useCallback(() => {
@@ -1178,9 +1187,10 @@ function Drawer({ open: open2 = true, title, onClose, footer, children, classNam
1178
1187
  setTimeout(onClose, 210);
1179
1188
  }, [onClose]);
1180
1189
  const layer = useStackedLayer({ active: !!open2, containerRef: asideRef, trap: true, onEscape: onClose ? close2 : void 0 });
1190
+ const zIndex = useLayerZIndex(layer);
1181
1191
  if (!open2) return null;
1182
1192
  return (0, import_react_dom3.createPortal)(
1183
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(LayerProvider, { zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(StackedLayerProvider, { layer, children: [
1193
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(StackedLayerProvider, { layer, children: [
1184
1194
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "fd-scrim" + (closing ? " is-closing" : ""), style: { display: "block", zIndex: zIndex - LAYER_STEP }, onClick: close2 }),
1185
1195
  /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("aside", { ref: asideRef, className: ["fd-drawer", closing ? "is-closing" : "", className].filter(Boolean).join(" "), role: "dialog", "aria-modal": "true", ...rest, style: { zIndex }, children: [
1186
1196
  /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "fd-card-head", style: { flex: "none" }, children: [
@@ -1190,7 +1200,7 @@ function Drawer({ open: open2 = true, title, onClose, footer, children, classNam
1190
1200
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { style: { flex: "1 1 auto", minHeight: 0, overflow: "auto", padding: 20 }, children }),
1191
1201
  footer ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "fd-card-foot", style: { flex: "none" }, children: typeof footer === "function" ? footer(close2) : footer }) : null
1192
1202
  ] })
1193
- ] }) }),
1203
+ ] }),
1194
1204
  document.body
1195
1205
  );
1196
1206
  }
@@ -1202,16 +1212,16 @@ var import_jsx_runtime10 = require("react/jsx-runtime");
1202
1212
  function Modal({ open: open2 = true, title, description, onClose, footer, wide = false, children, className = "", ...rest }) {
1203
1213
  const [closing, setClosing] = React7.useState(false);
1204
1214
  const boxRef = React7.useRef(null);
1205
- const zIndex = useOverlayLayer(!!open2);
1206
1215
  const close2 = React7.useCallback(() => {
1207
1216
  if (!onClose) return;
1208
1217
  setClosing(true);
1209
1218
  setTimeout(onClose, 190);
1210
1219
  }, [onClose]);
1211
1220
  const layer = useStackedLayer({ active: !!open2, containerRef: boxRef, trap: true, onEscape: onClose ? close2 : void 0 });
1221
+ const zIndex = useLayerZIndex(layer);
1212
1222
  if (!open2) return null;
1213
1223
  return (0, import_react_dom4.createPortal)(
1214
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(LayerProvider, { zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(StackedLayerProvider, { layer, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1224
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(StackedLayerProvider, { layer, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1215
1225
  "div",
1216
1226
  {
1217
1227
  className: "fd-scrim" + (closing ? " is-closing" : ""),
@@ -1242,7 +1252,7 @@ function Modal({ open: open2 = true, title, description, onClose, footer, wide =
1242
1252
  }
1243
1253
  )
1244
1254
  }
1245
- ) }) }),
1255
+ ) }),
1246
1256
  document.body
1247
1257
  );
1248
1258
  }
@@ -2019,7 +2029,7 @@ function Tag({ children, icon, selected = false, tone = "neutral", onRemove, onC
2019
2029
  ...rest,
2020
2030
  children: [
2021
2031
  icon ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("i", { className: "ph ph-" + icon, "aria-hidden": "true" }) : null,
2022
- children,
2032
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "fd-tag-label", children }),
2023
2033
  onRemove ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2024
2034
  "span",
2025
2035
  {
@@ -2105,8 +2115,8 @@ function Tooltip({ label, placement = "top", children, className = "" }) {
2105
2115
  layerRef: bubbleRef,
2106
2116
  onDetach: hide
2107
2117
  });
2108
- const zIndex = useOverlayLayer(open2);
2109
- useStackedLayer({ active: open2, containerRef: bubbleRef, onEscape: hide, returnFocus: false });
2118
+ const layer = useStackedLayer({ active: open2, containerRef: bubbleRef, onEscape: hide, returnFocus: false });
2119
+ const zIndex = useLayerZIndex(layer);
2110
2120
  React14.useEffect(() => {
2111
2121
  if (!open2) return;
2112
2122
  const away = (e) => {
@@ -2801,7 +2811,7 @@ function BarList({
2801
2811
  const isEmpty = state === "ready" && ordered.every((r) => !(Number(r.value) > 0));
2802
2812
  const effectiveState = isEmpty ? "empty" : state;
2803
2813
  const maxValue = ordered.reduce((m, r) => Math.max(m, Number(r.value) || 0), 0) || 1;
2804
- const effectiveTotal = total != null ? total : ordered.reduce((n, r) => n + (Number(r.value) || 0), 0);
2814
+ const effectiveTotal = total != null ? total : rows.reduce((n, r) => n + (Number(r.value) || 0), 0);
2805
2815
  return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: ["fd-barlist", className].filter(Boolean).join(" "), children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
2806
2816
  LoadingRegion,
2807
2817
  {
@@ -4554,11 +4564,11 @@ function FilterBar({ fields = [], filters, onFilterChange, onFilterRemove, align
4554
4564
  };
4555
4565
  const chipText = field.label + (set ? ": " + chipLabel(field, value) : "");
4556
4566
  if (field.type === "text") {
4557
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Tag, { selected: true, onClick: toggleOrClose, onRemove: remove, children: chipText }, field.key);
4567
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Tag, { selected: true, onClick: toggleOrClose, onRemove: remove, title: chipText, children: chipText }, field.key);
4558
4568
  }
4559
4569
  if (field.type === "select") {
4560
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { children: [
4561
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { ref: chipRef, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Tag, { selected: true, onClick: toggleOrClose, onRemove: remove, children: chipText }) }),
4570
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { className: "fd-filterbar-chip", children: [
4571
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { ref: chipRef, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Tag, { selected: true, onClick: toggleOrClose, onRemove: remove, title: chipText, children: chipText }) }),
4562
4572
  editing ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4563
4573
  Popover,
4564
4574
  {
@@ -4592,8 +4602,8 @@ function FilterBar({ fields = [], filters, onFilterChange, onFilterRemove, align
4592
4602
  ] }, field.key);
4593
4603
  }
4594
4604
  if (field.type === "multiSelect") {
4595
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { children: [
4596
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { ref: chipRef, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Tag, { selected: true, onClick: toggleOrClose, onRemove: remove, children: chipText }) }),
4605
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { className: "fd-filterbar-chip", children: [
4606
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { ref: chipRef, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Tag, { selected: true, onClick: toggleOrClose, onRemove: remove, title: chipText, children: chipText }) }),
4597
4607
  editing ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4598
4608
  MultiSelectPanel,
4599
4609
  {
@@ -4607,8 +4617,8 @@ function FilterBar({ fields = [], filters, onFilterChange, onFilterRemove, align
4607
4617
  ] }, field.key);
4608
4618
  }
4609
4619
  if (field.type === "range") {
4610
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { children: [
4611
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { ref: chipRef, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Tag, { selected: true, onClick: toggleOrClose, onRemove: remove, children: chipText }) }),
4620
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { className: "fd-filterbar-chip", children: [
4621
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { ref: chipRef, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Tag, { selected: true, onClick: toggleOrClose, onRemove: remove, title: chipText, children: chipText }) }),
4612
4622
  editing ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4613
4623
  RangePanel,
4614
4624
  {
@@ -4622,8 +4632,8 @@ function FilterBar({ fields = [], filters, onFilterChange, onFilterRemove, align
4622
4632
  ] }, field.key);
4623
4633
  }
4624
4634
  if (field.type === "date") {
4625
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { children: [
4626
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { ref: chipRef, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Tag, { selected: true, onClick: toggleOrClose, onRemove: remove, children: chipText }) }),
4635
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { className: "fd-filterbar-chip", children: [
4636
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { ref: chipRef, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Tag, { selected: true, onClick: toggleOrClose, onRemove: remove, title: chipText, children: chipText }) }),
4627
4637
  editing ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4628
4638
  DatePanel,
4629
4639
  {
@@ -5429,9 +5439,9 @@ var React31 = __toESM(require("react"), 1);
5429
5439
  var import_jsx_runtime55 = require("react/jsx-runtime");
5430
5440
  function useInlinePanel() {
5431
5441
  const [open2, setOpen] = React31.useState(false);
5432
- const zIndex = useOverlayLayer(open2);
5433
5442
  const ref = React31.useRef(null);
5434
5443
  const layer = useStackedLayer({ active: open2, containerRef: ref, onEscape: () => setOpen(false) });
5444
+ const zIndex = useLayerZIndex(layer);
5435
5445
  React31.useEffect(() => {
5436
5446
  if (!open2) return;
5437
5447
  const away = (e) => {
@@ -5443,7 +5453,7 @@ function useInlinePanel() {
5443
5453
  return { open: open2, setOpen, ref, zIndex, layer };
5444
5454
  }
5445
5455
  function InlinePanelLayers({ panel, children }) {
5446
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(LayerProvider, { zIndex: panel.zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(StackedLayerProvider, { layer: panel.layer, children }) });
5456
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(StackedLayerProvider, { layer: panel.layer, children });
5447
5457
  }
5448
5458
 
5449
5459
  // src/components/data/SortMenu.tsx
@@ -10973,7 +10983,9 @@ function ComingSoon({
10973
10983
  function InlineSoon({ label, detail, backend, eta, effort, onRoadmap, allowed, onBypass, blur, tip, className, rest, children }) {
10974
10984
  const [open2, setOpen] = React55.useState(false);
10975
10985
  const [anchor, pos] = useHoverCard(open2);
10976
- const zIndex = useOverlayLayer(open2);
10986
+ const hoverCardRef = React55.useRef(null);
10987
+ const hoverLayer = useStackedLayer({ active: open2, containerRef: hoverCardRef, returnFocus: false });
10988
+ const zIndex = useLayerZIndex(hoverLayer);
10977
10989
  const close2 = React55.useRef(null);
10978
10990
  const show = () => {
10979
10991
  if (close2.current) {
@@ -11020,9 +11032,10 @@ function InlineSoon({ label, detail, backend, eta, effort, onRoadmap, allowed, o
11020
11032
  }
11021
11033
  ),
11022
11034
  open2 && pos ? (0, import_react_dom6.createPortal)(
11023
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(LayerProvider, { zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
11035
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
11024
11036
  "div",
11025
11037
  {
11038
+ ref: hoverCardRef,
11026
11039
  className: "fd-soon-note fd-soon-hovercard",
11027
11040
  role: "tooltip",
11028
11041
  style: { position: "fixed", left: pos.left, top: pos.top, bottom: pos.bottom, width: pos.width, zIndex },
@@ -11042,7 +11055,7 @@ function InlineSoon({ label, detail, backend, eta, effort, onRoadmap, allowed, o
11042
11055
  }
11043
11056
  )
11044
11057
  }
11045
- ) }),
11058
+ ),
11046
11059
  document.body
11047
11060
  ) : null
11048
11061
  ]
@@ -14597,6 +14610,7 @@ function useDocumentTitle(routeTitle, appName) {
14597
14610
  JobTray,
14598
14611
  Json,
14599
14612
  KeyHint,
14613
+ LAYER_STEP,
14600
14614
  LoadingRegion,
14601
14615
  Markdown,
14602
14616
  MarkdownEditor,
@@ -14611,6 +14625,7 @@ function useDocumentTitle(routeTitle, appName) {
14611
14625
  ModeSwitch,
14612
14626
  ModelControls,
14613
14627
  NumberInput,
14628
+ OVERLAY_CEILING,
14614
14629
  POPOVER_BODY_MIN,
14615
14630
  PacketCard,
14616
14631
  Pagination,
@@ -14623,6 +14638,7 @@ function useDocumentTitle(routeTitle, appName) {
14623
14638
  ProgressBar,
14624
14639
  QueryKit,
14625
14640
  QuotaRow,
14641
+ ROOT_STEP,
14626
14642
  Radio,
14627
14643
  RangeSlider,
14628
14644
  RelativeTime,
@@ -14667,6 +14683,7 @@ function useDocumentTitle(routeTitle, appName) {
14667
14683
  VIRTUAL_LIST_BUFFER_ROWS,
14668
14684
  VIRTUAL_LIST_ROW_GAP,
14669
14685
  VirtualList,
14686
+ __resetLayerStackForTests,
14670
14687
  acceptMatches,
14671
14688
  anyOfFilter,
14672
14689
  applyPrefs,
@@ -14716,6 +14733,7 @@ function useDocumentTitle(routeTitle, appName) {
14716
14733
  useChatEngine,
14717
14734
  useDocumentTitle,
14718
14735
  useFeatureStatus,
14736
+ useLayerZIndex,
14719
14737
  usePopoverPosition,
14720
14738
  useResponsiveRail,
14721
14739
  useRuntimeMode,