@octaviaflow/core 3.0.10 → 3.0.12

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.js CHANGED
@@ -195,7 +195,7 @@ function AgentCard({
195
195
  }
196
196
 
197
197
  // src/components/AuthCard/AuthCard.tsx
198
- import { useState } from "react";
198
+ import { useId, useRef as useRef2, useState } from "react";
199
199
  import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
200
200
  function AuthCard({
201
201
  logo,
@@ -245,24 +245,61 @@ function AuthTabs({ tabs, defaultTab, value, onChange, className }) {
245
245
  onChange?.(id);
246
246
  };
247
247
  const activeTab = tabs.find((t) => t.id === active) ?? tabs[0];
248
+ const scopeId = useId();
249
+ const tabRefs = useRef2({});
250
+ const handleKeyDown = (e) => {
251
+ const ids = tabs.map((t) => t.id);
252
+ const currentIdx = ids.indexOf(active);
253
+ if (currentIdx === -1) return;
254
+ let nextIdx = null;
255
+ if (e.key === "ArrowRight") nextIdx = (currentIdx + 1) % ids.length;
256
+ else if (e.key === "ArrowLeft") nextIdx = (currentIdx - 1 + ids.length) % ids.length;
257
+ else if (e.key === "Home") nextIdx = 0;
258
+ else if (e.key === "End") nextIdx = ids.length - 1;
259
+ if (nextIdx === null) return;
260
+ e.preventDefault();
261
+ const nextId = ids[nextIdx];
262
+ select(nextId);
263
+ tabRefs.current[nextId]?.focus();
264
+ };
248
265
  return /* @__PURE__ */ jsxs3("div", { className: cn("ods-auth-tabs", className), children: [
249
- /* @__PURE__ */ jsx3("div", { className: "ods-auth-tabs__list", role: "tablist", children: tabs.map((t) => /* @__PURE__ */ jsxs3(
250
- "button",
266
+ /* @__PURE__ */ jsx3("div", { className: "ods-auth-tabs__list", role: "tablist", children: tabs.map((t) => {
267
+ const isActive2 = t.id === active;
268
+ return /* @__PURE__ */ jsxs3(
269
+ "button",
270
+ {
271
+ ref: (el) => {
272
+ tabRefs.current[t.id] = el;
273
+ },
274
+ type: "button",
275
+ role: "tab",
276
+ id: `${scopeId}-tab-${t.id}`,
277
+ "aria-selected": isActive2,
278
+ "aria-controls": `${scopeId}-panel-${t.id}`,
279
+ tabIndex: isActive2 ? 0 : -1,
280
+ className: cn("ods-auth-tabs__tab", isActive2 && "ods-auth-tabs__tab--active"),
281
+ onClick: () => select(t.id),
282
+ onKeyDown: handleKeyDown,
283
+ children: [
284
+ t.icon && /* @__PURE__ */ jsx3("span", { className: "ods-auth-tabs__icon", children: t.icon }),
285
+ /* @__PURE__ */ jsx3("span", { className: "ods-auth-tabs__label", children: t.label }),
286
+ t.description && /* @__PURE__ */ jsx3("span", { className: "ods-auth-tabs__desc", children: t.description })
287
+ ]
288
+ },
289
+ t.id
290
+ );
291
+ }) }),
292
+ activeTab && /* @__PURE__ */ jsx3(
293
+ "div",
251
294
  {
252
- type: "button",
253
- role: "tab",
254
- "aria-selected": t.id === active,
255
- className: cn("ods-auth-tabs__tab", t.id === active && "ods-auth-tabs__tab--active"),
256
- onClick: () => select(t.id),
257
- children: [
258
- t.icon && /* @__PURE__ */ jsx3("span", { className: "ods-auth-tabs__icon", children: t.icon }),
259
- /* @__PURE__ */ jsx3("span", { className: "ods-auth-tabs__label", children: t.label }),
260
- t.description && /* @__PURE__ */ jsx3("span", { className: "ods-auth-tabs__desc", children: t.description })
261
- ]
262
- },
263
- t.id
264
- )) }),
265
- activeTab && /* @__PURE__ */ jsx3("div", { className: "ods-auth-tabs__panel", children: activeTab.content })
295
+ role: "tabpanel",
296
+ id: `${scopeId}-panel-${activeTab.id}`,
297
+ "aria-labelledby": `${scopeId}-tab-${activeTab.id}`,
298
+ tabIndex: 0,
299
+ className: "ods-auth-tabs__panel",
300
+ children: activeTab.content
301
+ }
302
+ )
266
303
  ] });
267
304
  }
268
305
  function AuthBadge({ tone = "neutral", children, className }) {
@@ -546,11 +583,11 @@ function BlogCard({
546
583
  }
547
584
 
548
585
  // src/components/Breadcrumb/Breadcrumb.tsx
549
- import { useRef as useRef2 } from "react";
586
+ import { useRef as useRef3 } from "react";
550
587
  import { useBreadcrumbItem, useBreadcrumbs } from "react-aria";
551
588
  import { Fragment, jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
552
589
  function BreadcrumbItem({ item, isCurrent }) {
553
- const ref = useRef2(null);
590
+ const ref = useRef3(null);
554
591
  const { itemProps } = useBreadcrumbItem(
555
592
  { children: item.label, isCurrent, elementType: item.href ? "a" : "span" },
556
593
  ref
@@ -605,7 +642,7 @@ function Breadcrumb({
605
642
 
606
643
  // src/components/Button/Button.tsx
607
644
  import { motion as motion2 } from "framer-motion";
608
- import { useRef as useRef3 } from "react";
645
+ import { useRef as useRef4 } from "react";
609
646
  import { useButton } from "react-aria";
610
647
 
611
648
  // src/utils/a11y.ts
@@ -649,7 +686,7 @@ function Button({
649
686
  style,
650
687
  ...props
651
688
  }) {
652
- const ref = useRef3(null);
689
+ const ref = useRef4(null);
653
690
  const isDisabled = disabled || loading;
654
691
  const hasAction = Boolean(props.onClick) || type === "submit" || type === "reset" || Boolean(props.href);
655
692
  const resolvedCursor = cursor ?? (disabled ? "not-allowed" : loading ? "progress" : hasAction ? "pointer" : "default");
@@ -962,7 +999,7 @@ function ChatBubble({
962
999
  }
963
1000
 
964
1001
  // src/components/Checkbox/Checkbox.tsx
965
- import { useRef as useRef4 } from "react";
1002
+ import { useRef as useRef5 } from "react";
966
1003
  import { useCheckbox } from "react-aria";
967
1004
 
968
1005
  // ../../node_modules/react-stately/dist/private/utils/useControlledState.mjs
@@ -2492,7 +2529,7 @@ function Checkbox({
2492
2529
  className,
2493
2530
  ...props
2494
2531
  }) {
2495
- const ref = useRef4(null);
2532
+ const ref = useRef5(null);
2496
2533
  const state = $fd3c5e01e837dc20$export$8042c6c013fd5226({
2497
2534
  isSelected: checked,
2498
2535
  defaultSelected: defaultChecked,
@@ -2711,7 +2748,7 @@ function ChoiceCard({
2711
2748
  }
2712
2749
 
2713
2750
  // src/components/CodeEditor/CodeEditor.tsx
2714
- import { useEffect, useMemo as useMemo3, useRef as useRef5, useState as useState3 } from "react";
2751
+ import { useEffect, useMemo as useMemo3, useRef as useRef6, useState as useState3 } from "react";
2715
2752
  import { Fragment as Fragment2, jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
2716
2753
  var COMMENT_PREFIX = {
2717
2754
  sql: "-- ",
@@ -2763,8 +2800,8 @@ function CodeEditor({
2763
2800
  showCounter = true,
2764
2801
  searchable = true
2765
2802
  }) {
2766
- const taRef = useRef5(null);
2767
- const gutterRef = useRef5(null);
2803
+ const taRef = useRef6(null);
2804
+ const gutterRef = useRef6(null);
2768
2805
  const [activeLine, setActiveLine] = useState3(1);
2769
2806
  const [copied, setCopied] = useState3(false);
2770
2807
  const [internalWrap, setInternalWrap] = useState3(wordWrapProp ?? false);
@@ -2774,7 +2811,7 @@ function CodeEditor({
2774
2811
  const [findOpen, setFindOpen] = useState3(false);
2775
2812
  const [findQuery, setFindQuery] = useState3("");
2776
2813
  const [findIndex, setFindIndex] = useState3(0);
2777
- const findInputRef = useRef5(null);
2814
+ const findInputRef = useRef6(null);
2778
2815
  const lines = value.split("\n");
2779
2816
  const lineCount = lines.length;
2780
2817
  const matches = useMemo3(() => {
@@ -3370,9 +3407,9 @@ function ColorPicker({
3370
3407
  import {
3371
3408
  useCallback,
3372
3409
  useEffect as useEffect2,
3373
- useId,
3410
+ useId as useId2,
3374
3411
  useMemo as useMemo4,
3375
- useRef as useRef6,
3412
+ useRef as useRef7,
3376
3413
  useState as useState5
3377
3414
  } from "react";
3378
3415
  import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
@@ -3388,10 +3425,10 @@ function OptionDropdown({
3388
3425
  const [open, setOpen] = useState5(false);
3389
3426
  const [query, setQuery] = useState5("");
3390
3427
  const [activeIdx, setActiveIdx] = useState5(0);
3391
- const triggerRef = useRef6(null);
3392
- const panelRef = useRef6(null);
3393
- const inputRef = useRef6(null);
3394
- const listboxId = useId();
3428
+ const triggerRef = useRef7(null);
3429
+ const panelRef = useRef7(null);
3430
+ const inputRef = useRef7(null);
3431
+ const listboxId = useId2();
3395
3432
  const showSearch = searchable === true || searchable === "auto" && options.length > 8;
3396
3433
  const selected = options.find((o) => o.value === value);
3397
3434
  const filtered = useMemo4(() => {
@@ -3696,7 +3733,7 @@ function ConditionBuilder({
3696
3733
 
3697
3734
  // src/components/ConfigPanel/ConfigPanel.tsx
3698
3735
  import { AnimatePresence as AnimatePresence2, motion as motion4 } from "framer-motion";
3699
- import { useRef as useRef7 } from "react";
3736
+ import { useRef as useRef8 } from "react";
3700
3737
  import { useButton as useButton2 } from "react-aria";
3701
3738
  import { jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
3702
3739
  function ConfigPanel({
@@ -3709,9 +3746,9 @@ function ConfigPanel({
3709
3746
  onCancel,
3710
3747
  className
3711
3748
  }) {
3712
- const closeRef = useRef7(null);
3713
- const saveRef = useRef7(null);
3714
- const cancelRef = useRef7(null);
3749
+ const closeRef = useRef8(null);
3750
+ const saveRef = useRef8(null);
3751
+ const cancelRef = useRef8(null);
3715
3752
  const { buttonProps: closeProps } = useButton2(
3716
3753
  { onPress: onClose, "aria-label": "Close panel" },
3717
3754
  closeRef
@@ -3786,7 +3823,7 @@ import {
3786
3823
  useCallback as useCallback2,
3787
3824
  useEffect as useEffect3,
3788
3825
  useMemo as useMemo5,
3789
- useRef as useRef8,
3826
+ useRef as useRef9,
3790
3827
  useState as useState6
3791
3828
  } from "react";
3792
3829
  import { Fragment as Fragment3, jsx as jsx22, jsxs as jsxs21 } from "react/jsx-runtime";
@@ -4139,8 +4176,8 @@ function DataMapper({
4139
4176
  const [display, setDisplay] = useState6(defaultDisplay);
4140
4177
  const [sidebarOpen, setSidebarOpen] = useState6(defaultSidebarOpen);
4141
4178
  const [sidebarTab, setSidebarTab] = useState6("schema");
4142
- const editorRef = useRef8(null);
4143
- const rootRef = useRef8(null);
4179
+ const editorRef = useRef9(null);
4180
+ const rootRef = useRef9(null);
4144
4181
  useEffect3(() => {
4145
4182
  if (!selectedTarget) return;
4146
4183
  const handler = (e) => {
@@ -4864,8 +4901,8 @@ function ExpressionEditor({
4864
4901
  readDragSnippet,
4865
4902
  editorRef
4866
4903
  }) {
4867
- const lastEmittedRef = useRef8(value);
4868
- const isMountedRef = useRef8(false);
4904
+ const lastEmittedRef = useRef9(value);
4905
+ const isMountedRef = useRef9(false);
4869
4906
  useEffect3(() => {
4870
4907
  const el = editorRef.current;
4871
4908
  if (!el || isMountedRef.current) return;
@@ -5108,7 +5145,7 @@ import {
5108
5145
  useCallback as useCallback3,
5109
5146
  useEffect as useEffect4,
5110
5147
  useMemo as useMemo6,
5111
- useRef as useRef9,
5148
+ useRef as useRef10,
5112
5149
  useState as useState7
5113
5150
  } from "react";
5114
5151
  import { Fragment as Fragment4, jsx as jsx23, jsxs as jsxs22 } from "react/jsx-runtime";
@@ -5760,7 +5797,7 @@ function Row({
5760
5797
  clickable
5761
5798
  }) {
5762
5799
  const [menuOpen, setMenuOpen] = useState7(false);
5763
- const menuRef = useRef9(null);
5800
+ const menuRef = useRef10(null);
5764
5801
  useEffect4(() => {
5765
5802
  if (!menuOpen) return;
5766
5803
  const close = (e) => {
@@ -5899,7 +5936,7 @@ function ChevronRightSmall() {
5899
5936
  }
5900
5937
 
5901
5938
  // src/components/DatePicker/DatePicker.tsx
5902
- import { useEffect as useEffect5, useRef as useRef10, useState as useState8 } from "react";
5939
+ import { useEffect as useEffect5, useRef as useRef11, useState as useState8 } from "react";
5903
5940
  import { jsx as jsx24, jsxs as jsxs23 } from "react/jsx-runtime";
5904
5941
  var defaultFormat = (d) => d.toLocaleDateString(void 0, { month: "short", day: "numeric", year: "numeric" });
5905
5942
  function DatePicker({
@@ -5917,7 +5954,7 @@ function DatePicker({
5917
5954
  className
5918
5955
  }) {
5919
5956
  const [open, setOpen] = useState8(false);
5920
- const wrapRef = useRef10(null);
5957
+ const wrapRef = useRef11(null);
5921
5958
  useEffect5(() => {
5922
5959
  if (!open) return;
5923
5960
  const onDoc = (e) => {
@@ -6059,7 +6096,7 @@ function DescriptionList({
6059
6096
 
6060
6097
  // src/components/Dialog/Dialog.tsx
6061
6098
  import { AnimatePresence as AnimatePresence3, motion as motion5 } from "framer-motion";
6062
- import { useRef as useRef11 } from "react";
6099
+ import { useRef as useRef12 } from "react";
6063
6100
  import { FocusScope, OverlayProvider, useDialog, useModal, useOverlay } from "react-aria";
6064
6101
  import { createPortal } from "react-dom";
6065
6102
 
@@ -6113,8 +6150,8 @@ function DialogContent({
6113
6150
  footer,
6114
6151
  className
6115
6152
  }) {
6116
- const overlayRef = useRef11(null);
6117
- const dialogRef = useRef11(null);
6153
+ const overlayRef = useRef12(null);
6154
+ const dialogRef = useRef12(null);
6118
6155
  const { overlayProps, underlayProps } = useOverlay(
6119
6156
  {
6120
6157
  isOpen: open,
@@ -6306,12 +6343,12 @@ function Drawer({
6306
6343
 
6307
6344
  // src/components/DropdownMenu/DropdownMenu.tsx
6308
6345
  import { AnimatePresence as AnimatePresence4, motion as motion6 } from "framer-motion";
6309
- import { useRef as useRef12 } from "react";
6346
+ import { useEffect as useEffect6, useRef as useRef13 } from "react";
6310
6347
  import { useButton as useButton3, useMenu, useMenuItem, useMenuTrigger } from "react-aria";
6311
6348
  import { createPortal as createPortal2 } from "react-dom";
6312
6349
  import { Fragment as Fragment6, jsx as jsx29, jsxs as jsxs28 } from "react/jsx-runtime";
6313
6350
  function MenuItemComponent({ item, state, onAction }) {
6314
- const ref = useRef12(null);
6351
+ const ref = useRef13(null);
6315
6352
  const { menuItemProps } = useMenuItem({ key: item.key, onAction }, state, ref);
6316
6353
  const menuItem = item.value;
6317
6354
  const isDisabled = state.disabledKeys.has(item.key);
@@ -6337,9 +6374,37 @@ function MenuPopup({
6337
6374
  menuItems,
6338
6375
  triggerRef,
6339
6376
  align,
6340
- className
6377
+ className,
6378
+ closeOnOutsideClick,
6379
+ closeOnEscape
6341
6380
  }) {
6342
- const menuRef = useRef12(null);
6381
+ const menuRef = useRef13(null);
6382
+ useEffect6(() => {
6383
+ if (!state.isOpen || !closeOnOutsideClick) return;
6384
+ const handler = (e) => {
6385
+ const target = e.target;
6386
+ if (!target) return;
6387
+ const insideMenu = menuRef.current?.contains(target);
6388
+ const insideTrigger = triggerRef.current?.contains(target);
6389
+ if (!insideMenu && !insideTrigger) {
6390
+ state.close();
6391
+ }
6392
+ };
6393
+ document.addEventListener("mousedown", handler, true);
6394
+ return () => document.removeEventListener("mousedown", handler, true);
6395
+ }, [state.isOpen, closeOnOutsideClick]);
6396
+ useEffect6(() => {
6397
+ if (!state.isOpen || !closeOnEscape) return;
6398
+ const handler = (e) => {
6399
+ if (e.key === "Escape") {
6400
+ e.stopPropagation();
6401
+ state.close();
6402
+ triggerRef.current?.focus();
6403
+ }
6404
+ };
6405
+ document.addEventListener("keydown", handler);
6406
+ return () => document.removeEventListener("keydown", handler);
6407
+ }, [state.isOpen, closeOnEscape]);
6343
6408
  const nonSepItems = menuItems.filter((i) => !i.separator);
6344
6409
  const children = nonSepItems.map((item, idx) => /* @__PURE__ */ jsx29($05678f3aee5e7d1a$export$6d08773d2e66f8f2, { textValue: item.label, children: item.label }, idx));
6345
6410
  const treeState = $6b915bde6cd300dd$export$728d6ba534403756({
@@ -6419,10 +6484,12 @@ function DropdownMenu({
6419
6484
  align = "start",
6420
6485
  className,
6421
6486
  triggerClassName,
6487
+ closeOnOutsideClick = true,
6488
+ closeOnEscape = true,
6422
6489
  "aria-label": ariaLabel,
6423
6490
  "aria-labelledby": ariaLabelledby
6424
6491
  }) {
6425
- const triggerRef = useRef12(null);
6492
+ const triggerRef = useRef13(null);
6426
6493
  const state = $e3403870bfb691da$export$79fefeb1c2091ac3({});
6427
6494
  const { menuTriggerProps } = useMenuTrigger({}, state, triggerRef);
6428
6495
  const ariaNameProps = resolveAccessibleName({
@@ -6453,7 +6520,9 @@ function DropdownMenu({
6453
6520
  menuItems: items,
6454
6521
  triggerRef,
6455
6522
  align,
6456
- className
6523
+ className,
6524
+ closeOnOutsideClick,
6525
+ closeOnEscape
6457
6526
  }
6458
6527
  )
6459
6528
  ] });
@@ -6472,7 +6541,7 @@ function EmptyState({ icon, title, description, action, className }) {
6472
6541
 
6473
6542
  // src/components/ExecutionConsole/ExecutionConsole.tsx
6474
6543
  import { motion as motion7 } from "framer-motion";
6475
- import { useEffect as useEffect6, useRef as useRef13 } from "react";
6544
+ import { useEffect as useEffect7, useRef as useRef14 } from "react";
6476
6545
  import { Fragment as Fragment7, jsx as jsx31, jsxs as jsxs30 } from "react/jsx-runtime";
6477
6546
  var iconProps = {
6478
6547
  xmlns: "http://www.w3.org/2000/svg",
@@ -6508,7 +6577,7 @@ function ExecutionConsole({
6508
6577
  toolbar,
6509
6578
  className
6510
6579
  }) {
6511
- const logEndRef = useRef13(null);
6580
+ const logEndRef = useRef14(null);
6512
6581
  const handleCopy = () => {
6513
6582
  if (onCopy) {
6514
6583
  onCopy();
@@ -6519,7 +6588,7 @@ function ExecutionConsole({
6519
6588
  void navigator.clipboard.writeText(text);
6520
6589
  }
6521
6590
  };
6522
- useEffect6(() => {
6591
+ useEffect7(() => {
6523
6592
  if (open && logEndRef.current) {
6524
6593
  logEndRef.current.scrollIntoView?.({ behavior: "smooth" });
6525
6594
  }
@@ -6685,9 +6754,9 @@ function FeatureCard({
6685
6754
  // src/components/FileDropzone/FileDropzone.tsx
6686
6755
  import {
6687
6756
  useCallback as useCallback4,
6688
- useEffect as useEffect7,
6689
- useId as useId2,
6690
- useRef as useRef14,
6757
+ useEffect as useEffect8,
6758
+ useId as useId3,
6759
+ useRef as useRef15,
6691
6760
  useState as useState9
6692
6761
  } from "react";
6693
6762
 
@@ -6827,9 +6896,9 @@ function FileDropzone({
6827
6896
  compact = false,
6828
6897
  className
6829
6898
  }) {
6830
- const inputRef = useRef14(null);
6831
- const dropzoneRef = useRef14(null);
6832
- const inputId = useId2();
6899
+ const inputRef = useRef15(null);
6900
+ const dropzoneRef = useRef15(null);
6901
+ const inputId = useId3();
6833
6902
  const [isOver, setOver] = useState9(false);
6834
6903
  const [error, setError] = useState9(null);
6835
6904
  const [autoPreviews, setAutoPreviews] = useState9({});
@@ -6871,7 +6940,7 @@ function FileDropzone({
6871
6940
  },
6872
6941
  [disabled, onFiles, validate]
6873
6942
  );
6874
- useEffect7(() => {
6943
+ useEffect8(() => {
6875
6944
  if (!files) return;
6876
6945
  const next = {};
6877
6946
  const created = [];
@@ -6888,7 +6957,7 @@ function FileDropzone({
6888
6957
  created.forEach((u) => URL.revokeObjectURL(u));
6889
6958
  };
6890
6959
  }, [files]);
6891
- useEffect7(() => {
6960
+ useEffect8(() => {
6892
6961
  if (!pasteEnabled || disabled) return;
6893
6962
  const onPaste = (e) => {
6894
6963
  const active = document.activeElement;
@@ -7129,7 +7198,7 @@ function FileDropzone({
7129
7198
 
7130
7199
  // src/components/FlowCanvas/FlowCanvas.tsx
7131
7200
  import { AnimatePresence as AnimatePresence5 } from "framer-motion";
7132
- import { useCallback as useCallback6, useRef as useRef16 } from "react";
7201
+ import { useCallback as useCallback6, useRef as useRef17 } from "react";
7133
7202
 
7134
7203
  // src/components/FlowEdge/FlowEdge.tsx
7135
7204
  import { jsx as jsx34, jsxs as jsxs33 } from "react/jsx-runtime";
@@ -7173,8 +7242,8 @@ import { motion as motion8 } from "framer-motion";
7173
7242
  import {
7174
7243
  forwardRef,
7175
7244
  useCallback as useCallback5,
7176
- useEffect as useEffect8,
7177
- useRef as useRef15,
7245
+ useEffect as useEffect9,
7246
+ useRef as useRef16,
7178
7247
  useState as useState10
7179
7248
  } from "react";
7180
7249
  import { jsx as jsx35, jsxs as jsxs34 } from "react/jsx-runtime";
@@ -7238,7 +7307,7 @@ var FlowNode = forwardRef(function FlowNode2({
7238
7307
  }, ref) {
7239
7308
  const [isDragging, setIsDragging] = useState10(false);
7240
7309
  const [wasDragged, setWasDragged] = useState10(false);
7241
- const dragStartRef = useRef15(null);
7310
+ const dragStartRef = useRef16(null);
7242
7311
  const zoom = viewport?.zoom ?? 1;
7243
7312
  const handleClick = useCallback5(
7244
7313
  (e) => {
@@ -7289,7 +7358,7 @@ var FlowNode = forwardRef(function FlowNode2({
7289
7358
  },
7290
7359
  [isLockMode]
7291
7360
  );
7292
- useEffect8(() => {
7361
+ useEffect9(() => {
7293
7362
  if (!isDragging) return;
7294
7363
  const applyDelta = (clientX, clientY) => {
7295
7364
  const start = dragStartRef.current;
@@ -7586,7 +7655,7 @@ function FlowCanvas({
7586
7655
  className,
7587
7656
  ...props
7588
7657
  }) {
7589
- const canvasRef = useRef16(null);
7658
+ const canvasRef = useRef17(null);
7590
7659
  const isEmpty = nodes.length === 0 && edges.length === 0;
7591
7660
  const handleCanvasClick = useCallback6(
7592
7661
  (e) => {
@@ -8030,7 +8099,7 @@ function FormSection({
8030
8099
  }
8031
8100
 
8032
8101
  // src/components/HoverCard/HoverCard.tsx
8033
- import { useCallback as useCallback8, useEffect as useEffect9, useLayoutEffect, useRef as useRef17, useState as useState11 } from "react";
8102
+ import { useCallback as useCallback8, useEffect as useEffect10, useLayoutEffect, useRef as useRef18, useState as useState11 } from "react";
8034
8103
  import { createPortal as createPortal3 } from "react-dom";
8035
8104
  import { Fragment as Fragment10, jsx as jsx40, jsxs as jsxs39 } from "react/jsx-runtime";
8036
8105
  function computePosition(rect, panelRect, placement, offset) {
@@ -8057,10 +8126,10 @@ function HoverCard({
8057
8126
  className
8058
8127
  }) {
8059
8128
  const [open, setOpen] = useState11(false);
8060
- const triggerRef = useRef17(null);
8061
- const panelRef = useRef17(null);
8062
- const openTimer = useRef17(null);
8063
- const closeTimer = useRef17(null);
8129
+ const triggerRef = useRef18(null);
8130
+ const panelRef = useRef18(null);
8131
+ const openTimer = useRef18(null);
8132
+ const closeTimer = useRef18(null);
8064
8133
  const [coords, setCoords] = useState11(null);
8065
8134
  const clearTimers = () => {
8066
8135
  if (openTimer.current) {
@@ -8072,7 +8141,7 @@ function HoverCard({
8072
8141
  closeTimer.current = null;
8073
8142
  }
8074
8143
  };
8075
- useEffect9(() => () => clearTimers(), []);
8144
+ useEffect10(() => () => clearTimers(), []);
8076
8145
  const show = () => {
8077
8146
  clearTimers();
8078
8147
  openTimer.current = setTimeout(() => setOpen(true), openDelay);
@@ -8093,7 +8162,7 @@ function HoverCard({
8093
8162
  const id = requestAnimationFrame(reposition);
8094
8163
  return () => cancelAnimationFrame(id);
8095
8164
  }, [open, reposition]);
8096
- useEffect9(() => {
8165
+ useEffect10(() => {
8097
8166
  if (!open) return;
8098
8167
  const h = () => reposition();
8099
8168
  window.addEventListener("scroll", h, true);
@@ -8182,9 +8251,9 @@ function IconCard({
8182
8251
  // src/components/Input/Input.tsx
8183
8252
  import {
8184
8253
  forwardRef as forwardRef2,
8185
- useId as useId3,
8254
+ useId as useId4,
8186
8255
  useImperativeHandle,
8187
- useRef as useRef18
8256
+ useRef as useRef19
8188
8257
  } from "react";
8189
8258
  import { jsx as jsx42, jsxs as jsxs41 } from "react/jsx-runtime";
8190
8259
  var CLEAR_GLYPH = /* @__PURE__ */ jsx42("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx42("path", { d: "m3 3 6 6M9 3l-6 6", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round" }) });
@@ -8209,9 +8278,9 @@ var Input = forwardRef2(
8209
8278
  onChange,
8210
8279
  ...props
8211
8280
  }, forwardedRef) => {
8212
- const innerRef = useRef18(null);
8281
+ const innerRef = useRef19(null);
8213
8282
  useImperativeHandle(forwardedRef, () => innerRef.current);
8214
- const reactId = useId3();
8283
+ const reactId = useId4();
8215
8284
  const inputId = id ?? `${reactId}-input`;
8216
8285
  const errorId = `${reactId}-err`;
8217
8286
  const helperId = `${reactId}-help`;
@@ -8704,10 +8773,10 @@ function LinkButton({
8704
8773
  import { AnimatePresence as AnimatePresence6, motion as motion9 } from "framer-motion";
8705
8774
  import {
8706
8775
  useCallback as useCallback9,
8707
- useEffect as useEffect10,
8776
+ useEffect as useEffect11,
8708
8777
  useLayoutEffect as useLayoutEffect2,
8709
8778
  useMemo as useMemo9,
8710
- useRef as useRef19,
8779
+ useRef as useRef20,
8711
8780
  useState as useState13
8712
8781
  } from "react";
8713
8782
  import { createPortal as createPortal4 } from "react-dom";
@@ -8737,11 +8806,11 @@ function MultiSelect({
8737
8806
  const [query, setQuery] = useState13("");
8738
8807
  const [activeIdx, setActiveIdx] = useState13(0);
8739
8808
  const [dropdownPos, setDropdownPos] = useState13({ top: 0, left: 0, width: 0 });
8740
- const wrapRef = useRef19(null);
8741
- const tagsRowRef = useRef19(null);
8742
- const searchRef = useRef19(null);
8743
- const dropdownRef = useRef19(null);
8744
- const chipRefs = useRef19([]);
8809
+ const wrapRef = useRef20(null);
8810
+ const tagsRowRef = useRef20(null);
8811
+ const searchRef = useRef20(null);
8812
+ const dropdownRef = useRef20(null);
8813
+ const chipRefs = useRef20([]);
8745
8814
  const commit = useCallback9(
8746
8815
  (next) => {
8747
8816
  if (controlledValue === void 0) setInternalValue(next);
@@ -8766,7 +8835,7 @@ function MultiSelect({
8766
8835
  const rect = wrapRef.current.getBoundingClientRect();
8767
8836
  setDropdownPos({ top: rect.bottom + 4, left: rect.left, width: rect.width });
8768
8837
  }, []);
8769
- useEffect10(() => {
8838
+ useEffect11(() => {
8770
8839
  if (!open) return;
8771
8840
  updatePosition();
8772
8841
  window.addEventListener("scroll", updatePosition, true);
@@ -8776,7 +8845,7 @@ function MultiSelect({
8776
8845
  window.removeEventListener("resize", updatePosition);
8777
8846
  };
8778
8847
  }, [open, updatePosition]);
8779
- useEffect10(() => {
8848
+ useEffect11(() => {
8780
8849
  if (!open) return;
8781
8850
  const onDoc = (e) => {
8782
8851
  const t = e.target;
@@ -8788,12 +8857,12 @@ function MultiSelect({
8788
8857
  document.addEventListener("mousedown", onDoc);
8789
8858
  return () => document.removeEventListener("mousedown", onDoc);
8790
8859
  }, [open]);
8791
- useEffect10(() => {
8860
+ useEffect11(() => {
8792
8861
  if (open && showSearch) {
8793
8862
  requestAnimationFrame(() => searchRef.current?.focus());
8794
8863
  }
8795
8864
  }, [open, showSearch]);
8796
- useEffect10(() => setActiveIdx(0), [query, open]);
8865
+ useEffect11(() => setActiveIdx(0), [query, open]);
8797
8866
  const [fitCount, setFitCount] = useState13(selectedValues.length);
8798
8867
  const [tick, setTick] = useState13(0);
8799
8868
  useLayoutEffect2(() => {
@@ -8822,7 +8891,7 @@ function MultiSelect({
8822
8891
  if (count < selectedValues.length && count > 0) count = Math.max(1, count - 1);
8823
8892
  setFitCount(count);
8824
8893
  }, [tick, selectedValues, maxVisibleTags]);
8825
- useEffect10(() => {
8894
+ useEffect11(() => {
8826
8895
  if (typeof ResizeObserver === "undefined") return;
8827
8896
  const row = tagsRowRef.current;
8828
8897
  if (!row) return;
@@ -9174,7 +9243,7 @@ function NumberInput({
9174
9243
  // src/components/OTPInput/OTPInput.tsx
9175
9244
  import {
9176
9245
  useCallback as useCallback11,
9177
- useRef as useRef20
9246
+ useRef as useRef21
9178
9247
  } from "react";
9179
9248
  import { jsx as jsx50, jsxs as jsxs49 } from "react/jsx-runtime";
9180
9249
  function OTPInput({
@@ -9190,7 +9259,7 @@ function OTPInput({
9190
9259
  autoFocus = false,
9191
9260
  className
9192
9261
  }) {
9193
- const refs = useRef20([]);
9262
+ const refs = useRef21([]);
9194
9263
  const pattern = type === "numeric" ? /[^0-9]/g : /[^a-zA-Z0-9]/g;
9195
9264
  const setCharAt = useCallback11(
9196
9265
  (idx, ch) => {
@@ -9505,7 +9574,7 @@ function PhoneInput({
9505
9574
  }
9506
9575
 
9507
9576
  // src/components/Popover/Popover.tsx
9508
- import { useCallback as useCallback12, useEffect as useEffect11, useLayoutEffect as useLayoutEffect3, useRef as useRef21, useState as useState16 } from "react";
9577
+ import { useCallback as useCallback12, useEffect as useEffect12, useLayoutEffect as useLayoutEffect3, useRef as useRef22, useState as useState16 } from "react";
9509
9578
  import { createPortal as createPortal5 } from "react-dom";
9510
9579
  import { Fragment as Fragment12, jsx as jsx54, jsxs as jsxs53 } from "react/jsx-runtime";
9511
9580
  function computePosition2(rect, popRect, placement, offset) {
@@ -9545,8 +9614,8 @@ function Popover({
9545
9614
  },
9546
9615
  [openProp, onOpenChange]
9547
9616
  );
9548
- const triggerRef = useRef21(null);
9549
- const popRef = useRef21(null);
9617
+ const triggerRef = useRef22(null);
9618
+ const popRef = useRef22(null);
9550
9619
  const [coords, setCoords] = useState16(null);
9551
9620
  const reposition = useCallback12(() => {
9552
9621
  if (!triggerRef.current || !popRef.current) return;
@@ -9560,7 +9629,7 @@ function Popover({
9560
9629
  const id = requestAnimationFrame(reposition);
9561
9630
  return () => cancelAnimationFrame(id);
9562
9631
  }, [open, reposition, content]);
9563
- useEffect11(() => {
9632
+ useEffect12(() => {
9564
9633
  if (!open) return;
9565
9634
  const onScroll = () => reposition();
9566
9635
  window.addEventListener("scroll", onScroll, true);
@@ -9570,7 +9639,7 @@ function Popover({
9570
9639
  window.removeEventListener("resize", onScroll);
9571
9640
  };
9572
9641
  }, [open, reposition]);
9573
- useEffect11(() => {
9642
+ useEffect12(() => {
9574
9643
  if (!open || !closeOnClickOutside) return;
9575
9644
  const onDoc = (e) => {
9576
9645
  const t = e.target;
@@ -9581,7 +9650,7 @@ function Popover({
9581
9650
  document.addEventListener("mousedown", onDoc);
9582
9651
  return () => document.removeEventListener("mousedown", onDoc);
9583
9652
  }, [open, closeOnClickOutside, setOpen]);
9584
- useEffect11(() => {
9653
+ useEffect12(() => {
9585
9654
  if (!open || !closeOnEsc) return;
9586
9655
  const onKey = (e) => {
9587
9656
  if (e.key === "Escape") setOpen(false);
@@ -9782,8 +9851,8 @@ function ProgressRing({
9782
9851
  // src/components/PromptInput/PromptInput.tsx
9783
9852
  import {
9784
9853
  useCallback as useCallback13,
9785
- useEffect as useEffect12,
9786
- useRef as useRef22,
9854
+ useEffect as useEffect13,
9855
+ useRef as useRef23,
9787
9856
  useState as useState17
9788
9857
  } from "react";
9789
9858
  import { jsx as jsx58, jsxs as jsxs57 } from "react/jsx-runtime";
@@ -9836,7 +9905,7 @@ function PromptInput({
9836
9905
  className,
9837
9906
  ariaLabel = "Prompt"
9838
9907
  }) {
9839
- const taRef = useRef22(null);
9908
+ const taRef = useRef23(null);
9840
9909
  const [internal, setInternal] = useState17(defaultValue);
9841
9910
  const v = value ?? internal;
9842
9911
  const isControlled = value !== void 0;
@@ -9851,7 +9920,7 @@ function PromptInput({
9851
9920
  },
9852
9921
  [isControlled, onChange]
9853
9922
  );
9854
- useEffect12(() => {
9923
+ useEffect13(() => {
9855
9924
  const el = taRef.current;
9856
9925
  if (!el) return;
9857
9926
  const computed = window.getComputedStyle(el);
@@ -10178,11 +10247,11 @@ function Quote({
10178
10247
  }
10179
10248
 
10180
10249
  // src/components/Radio/Radio.tsx
10181
- import { useRef as useRef24 } from "react";
10250
+ import { useRef as useRef25 } from "react";
10182
10251
  import { useRadio } from "react-aria";
10183
10252
 
10184
10253
  // src/components/Radio/RadioGroup.tsx
10185
- import { createContext, useContext, useRef as useRef23 } from "react";
10254
+ import { createContext, useContext, useRef as useRef24 } from "react";
10186
10255
  import { useRadioGroup } from "react-aria";
10187
10256
  import { jsx as jsx60, jsxs as jsxs59 } from "react/jsx-runtime";
10188
10257
  var RadioGroupContext = createContext(null);
@@ -10223,7 +10292,7 @@ function RadioGroup({
10223
10292
  "aria-describedby": ariaDescribedBy
10224
10293
  };
10225
10294
  const state = $384704861d32dbed$export$bca9d026f8e704eb(ariaProps);
10226
- const ref = useRef23(null);
10295
+ const ref = useRef24(null);
10227
10296
  const { radioGroupProps, labelProps } = useRadioGroup(ariaProps, state);
10228
10297
  return /* @__PURE__ */ jsxs59(
10229
10298
  "div",
@@ -10255,7 +10324,7 @@ function Radio({
10255
10324
  ...props
10256
10325
  }) {
10257
10326
  const state = useRadioGroupContext();
10258
- const ref = useRef24(null);
10327
+ const ref = useRef25(null);
10259
10328
  const ariaNameProps = resolveAccessibleName({
10260
10329
  label,
10261
10330
  ariaLabel: props["aria-label"],
@@ -10514,8 +10583,8 @@ function Rating({
10514
10583
  // src/components/Resizable/Resizable.tsx
10515
10584
  import {
10516
10585
  useCallback as useCallback14,
10517
- useEffect as useEffect13,
10518
- useRef as useRef25,
10586
+ useEffect as useEffect14,
10587
+ useRef as useRef26,
10519
10588
  useState as useState19
10520
10589
  } from "react";
10521
10590
  import { jsx as jsx64, jsxs as jsxs63 } from "react/jsx-runtime";
@@ -10532,7 +10601,7 @@ function Resizable({
10532
10601
  className,
10533
10602
  ariaLabel = "Resize panels"
10534
10603
  }) {
10535
- const wrapRef = useRef25(null);
10604
+ const wrapRef = useRef26(null);
10536
10605
  const [internalSplit, setInternalSplit] = useState19(() => {
10537
10606
  if (typeof window === "undefined" || !storageKey) return null;
10538
10607
  const stored = window.localStorage.getItem(storageKey);
@@ -10542,7 +10611,7 @@ function Resizable({
10542
10611
  }
10543
10612
  return null;
10544
10613
  });
10545
- const draggingRef = useRef25(false);
10614
+ const draggingRef = useRef26(false);
10546
10615
  const [isDragging, setDragging] = useState19(false);
10547
10616
  const computeFromDefault = useCallback14(() => {
10548
10617
  const el = wrapRef.current;
@@ -10555,7 +10624,7 @@ function Resizable({
10555
10624
  if (internalSplit != null) return internalSplit;
10556
10625
  return defaultSplit > 0 && defaultSplit < 1 ? 0 : defaultSplit;
10557
10626
  });
10558
- useEffect13(() => {
10627
+ useEffect14(() => {
10559
10628
  if (splitProp != null) {
10560
10629
  setSplit(splitProp);
10561
10630
  return;
@@ -10588,7 +10657,7 @@ function Resizable({
10588
10657
  draggingRef.current = true;
10589
10658
  setDragging(true);
10590
10659
  };
10591
- useEffect13(() => {
10660
+ useEffect14(() => {
10592
10661
  const onMove = (e) => {
10593
10662
  if (!draggingRef.current) return;
10594
10663
  const el = wrapRef.current;
@@ -10686,16 +10755,16 @@ function ResizablePanel({
10686
10755
  }) {
10687
10756
  const [internal, setInternal] = useState19(sizeProp ?? defaultSize);
10688
10757
  const size = sizeProp ?? internal;
10689
- const draggingRef = useRef25(false);
10758
+ const draggingRef = useRef26(false);
10690
10759
  const [isDragging, setDragging] = useState19(false);
10691
- const startRef = useRef25({ x: 0, size });
10760
+ const startRef = useRef26({ x: 0, size });
10692
10761
  const onMouseDown = (e) => {
10693
10762
  e.preventDefault();
10694
10763
  draggingRef.current = true;
10695
10764
  setDragging(true);
10696
10765
  startRef.current = { x: e.clientX, size };
10697
10766
  };
10698
- useEffect13(() => {
10767
+ useEffect14(() => {
10699
10768
  const onMove = (e) => {
10700
10769
  if (!draggingRef.current) return;
10701
10770
  const dx = e.clientX - startRef.current.x;
@@ -10758,18 +10827,18 @@ function Ribbon({
10758
10827
 
10759
10828
  // src/components/Select/Select.tsx
10760
10829
  import { AnimatePresence as AnimatePresence7, motion as motion10 } from "framer-motion";
10761
- import { useCallback as useCallback15, useEffect as useEffect14, useMemo as useMemo10, useRef as useRef26, useState as useState20 } from "react";
10830
+ import { useCallback as useCallback15, useEffect as useEffect15, useMemo as useMemo10, useRef as useRef27, useState as useState20 } from "react";
10762
10831
  import { HiddenSelect, useButton as useButton4, useListBox, useOption, useSelect } from "react-aria";
10763
10832
  import { createPortal as createPortal6 } from "react-dom";
10764
10833
  import { Fragment as Fragment13, jsx as jsx66, jsxs as jsxs65 } from "react/jsx-runtime";
10765
10834
  function ListBox(props) {
10766
- const ref = useRef26(null);
10835
+ const ref = useRef27(null);
10767
10836
  const { listBoxRef = ref, state } = props;
10768
10837
  const { listBoxProps } = useListBox(props, state, listBoxRef);
10769
10838
  return /* @__PURE__ */ jsx66("ul", { ...listBoxProps, ref: listBoxRef, className: "ods-select__options", children: [...state.collection].map((item) => /* @__PURE__ */ jsx66(Option, { item, state }, item.key)) });
10770
10839
  }
10771
10840
  function Option({ item, state }) {
10772
- const ref = useRef26(null);
10841
+ const ref = useRef27(null);
10773
10842
  const { optionProps, isSelected, isFocused, isDisabled } = useOption(
10774
10843
  { key: item.key },
10775
10844
  state,
@@ -10853,9 +10922,9 @@ function Select({
10853
10922
  "aria-labelledby": ariaLabelledBy,
10854
10923
  "aria-describedby": ariaDescribedBy
10855
10924
  }) {
10856
- const triggerRef = useRef26(null);
10857
- const listBoxRef = useRef26(null);
10858
- const searchRef = useRef26(null);
10925
+ const triggerRef = useRef27(null);
10926
+ const listBoxRef = useRef27(null);
10927
+ const searchRef = useRef27(null);
10859
10928
  const [searchQuery, setSearchQuery] = useState20("");
10860
10929
  const [dropdownPos, setDropdownPos] = useState20({ top: 0, left: 0, width: 0 });
10861
10930
  const filteredOptions = useMemo10(() => {
@@ -10914,7 +10983,7 @@ function Select({
10914
10983
  width: rect.width
10915
10984
  });
10916
10985
  }, []);
10917
- useEffect14(() => {
10986
+ useEffect15(() => {
10918
10987
  if (state.isOpen) {
10919
10988
  updatePosition();
10920
10989
  window.addEventListener("scroll", updatePosition, true);
@@ -10925,7 +10994,7 @@ function Select({
10925
10994
  };
10926
10995
  }
10927
10996
  }, [state.isOpen, updatePosition]);
10928
- useEffect14(() => {
10997
+ useEffect15(() => {
10929
10998
  if (state.isOpen && searchable && searchRef.current) {
10930
10999
  requestAnimationFrame(() => searchRef.current?.focus());
10931
11000
  }
@@ -11039,7 +11108,7 @@ function SettingsRow({
11039
11108
 
11040
11109
  // src/components/Sheet/Sheet.tsx
11041
11110
  import { AnimatePresence as AnimatePresence8, motion as motion11 } from "framer-motion";
11042
- import { useEffect as useEffect15 } from "react";
11111
+ import { useEffect as useEffect16 } from "react";
11043
11112
  import { createPortal as createPortal7 } from "react-dom";
11044
11113
  import { Fragment as Fragment14, jsx as jsx68, jsxs as jsxs67 } from "react/jsx-runtime";
11045
11114
  var slideVariants = {
@@ -11074,7 +11143,7 @@ function Sheet({
11074
11143
  dragHandle = true,
11075
11144
  className
11076
11145
  }) {
11077
- useEffect15(() => {
11146
+ useEffect16(() => {
11078
11147
  if (!open || !closeOnEsc) return;
11079
11148
  const onKey = (e) => {
11080
11149
  if (e.key === "Escape") onClose();
@@ -11126,7 +11195,7 @@ function Sheet({
11126
11195
  }
11127
11196
 
11128
11197
  // src/components/Sidebar/Sidebar.tsx
11129
- import { useCallback as useCallback16, useEffect as useEffect16, useRef as useRef27, useState as useState21 } from "react";
11198
+ import { useCallback as useCallback16, useEffect as useEffect17, useRef as useRef28, useState as useState21 } from "react";
11130
11199
  import { Fragment as Fragment15, jsx as jsx69, jsxs as jsxs68 } from "react/jsx-runtime";
11131
11200
  function Sidebar({
11132
11201
  variant = "expanded",
@@ -11149,7 +11218,7 @@ function Sidebar({
11149
11218
  }) {
11150
11219
  const allSections = sections ?? (items ? [{ items }] : []);
11151
11220
  const [internalPinned, setInternalPinned] = useState21(defaultPinned);
11152
- useEffect16(() => {
11221
+ useEffect17(() => {
11153
11222
  if (pinnedProp !== void 0) return;
11154
11223
  try {
11155
11224
  const stored = window.localStorage.getItem(pinStorageKey);
@@ -11172,8 +11241,8 @@ function Sidebar({
11172
11241
  [pinnedProp, pinStorageKey, onPinnedChange]
11173
11242
  );
11174
11243
  const [hoverOpen, setHoverOpen] = useState21(false);
11175
- const openTimer = useRef27(null);
11176
- const closeTimer = useRef27(null);
11244
+ const openTimer = useRef28(null);
11245
+ const closeTimer = useRef28(null);
11177
11246
  const clearTimers = () => {
11178
11247
  if (openTimer.current) {
11179
11248
  clearTimeout(openTimer.current);
@@ -11184,7 +11253,7 @@ function Sidebar({
11184
11253
  closeTimer.current = null;
11185
11254
  }
11186
11255
  };
11187
- useEffect16(() => () => clearTimers(), []);
11256
+ useEffect17(() => () => clearTimers(), []);
11188
11257
  const handleEnter = () => {
11189
11258
  clearTimers();
11190
11259
  openTimer.current = setTimeout(() => setHoverOpen(true), hoverOpenDelay);
@@ -11196,7 +11265,7 @@ function Sidebar({
11196
11265
  const autoMode = variant === "auto";
11197
11266
  const showAsRail = autoMode ? !pinned : variant === "rail";
11198
11267
  const overlayOpen = autoMode && !pinned && hoverOpen;
11199
- useEffect16(() => {
11268
+ useEffect17(() => {
11200
11269
  if (!overlayOpen) return;
11201
11270
  const handler = (e) => {
11202
11271
  if (e.key === "Escape") {
@@ -11346,23 +11415,24 @@ function RailItem({
11346
11415
  tooltipDelay,
11347
11416
  suppressTooltip
11348
11417
  }) {
11349
- const [tipOpen, setTipOpen] = useState21(false);
11350
- const timerRef = useRef27(null);
11418
+ const [open, setOpen] = useState21(false);
11419
+ const timerRef = useRef28(null);
11420
+ const hasChildren = !!(item.children && item.children.length > 0);
11351
11421
  const clear = () => {
11352
11422
  if (timerRef.current) {
11353
11423
  clearTimeout(timerRef.current);
11354
11424
  timerRef.current = null;
11355
11425
  }
11356
11426
  };
11357
- useEffect16(() => () => clear(), []);
11427
+ useEffect17(() => () => clear(), []);
11358
11428
  const show = () => {
11359
11429
  if (suppressTooltip) return;
11360
11430
  clear();
11361
- timerRef.current = setTimeout(() => setTipOpen(true), tooltipDelay);
11431
+ timerRef.current = setTimeout(() => setOpen(true), tooltipDelay);
11362
11432
  };
11363
11433
  const hide = () => {
11364
11434
  clear();
11365
- setTipOpen(false);
11435
+ setOpen(false);
11366
11436
  };
11367
11437
  const Comp = item.href ? "a" : "button";
11368
11438
  const labelText = typeof item.label === "string" ? item.label : void 0;
@@ -11381,13 +11451,20 @@ function RailItem({
11381
11451
  type: item.href ? void 0 : "button",
11382
11452
  href: item.href,
11383
11453
  onClick: item.onClick,
11384
- className: cn("ods-sidebar__rail-item", item.active && "ods-sidebar__rail-item--active"),
11454
+ className: cn(
11455
+ "ods-sidebar__rail-item",
11456
+ hasChildren && "ods-sidebar__rail-item--parent",
11457
+ item.active && "ods-sidebar__rail-item--active"
11458
+ ),
11385
11459
  "aria-current": item.active ? "page" : void 0,
11386
11460
  "aria-label": labelText,
11461
+ "aria-haspopup": hasChildren ? "menu" : void 0,
11462
+ "aria-expanded": hasChildren ? open : void 0,
11387
11463
  children: /* @__PURE__ */ jsx69("span", { className: "ods-sidebar__rail-icon", children: item.icon })
11388
11464
  }
11389
11465
  ),
11390
- tipOpen && labelText && /* @__PURE__ */ jsxs68("div", { className: "ods-sidebar__rail-tooltip", role: "tooltip", children: [
11466
+ open && labelText && hasChildren && /* @__PURE__ */ jsx69(RailFlyout, { title: labelText, items: item.children ?? [] }),
11467
+ open && labelText && !hasChildren && /* @__PURE__ */ jsxs68("div", { className: "ods-sidebar__rail-tooltip", role: "tooltip", children: [
11391
11468
  /* @__PURE__ */ jsx69("span", { className: "ods-sidebar__rail-tooltip-label", children: labelText }),
11392
11469
  item.shortcut && /* @__PURE__ */ jsx69("kbd", { className: "ods-sidebar__rail-kbd", children: item.shortcut })
11393
11470
  ] })
@@ -11395,6 +11472,34 @@ function RailItem({
11395
11472
  }
11396
11473
  );
11397
11474
  }
11475
+ function RailFlyout({ title, items }) {
11476
+ return /* @__PURE__ */ jsxs68("div", { className: "ods-sidebar__rail-flyout", role: "menu", children: [
11477
+ /* @__PURE__ */ jsx69("div", { className: "ods-sidebar__rail-flyout-header", children: /* @__PURE__ */ jsx69("span", { className: "ods-sidebar__rail-flyout-title", children: title }) }),
11478
+ /* @__PURE__ */ jsx69("ul", { className: "ods-sidebar__rail-flyout-list", children: items.map((child) => {
11479
+ const ChildComp = child.href ? "a" : "button";
11480
+ return /* @__PURE__ */ jsx69("li", { children: /* @__PURE__ */ jsxs68(
11481
+ ChildComp,
11482
+ {
11483
+ type: child.href ? void 0 : "button",
11484
+ href: child.href,
11485
+ onClick: child.onClick,
11486
+ role: "menuitem",
11487
+ className: cn(
11488
+ "ods-sidebar__rail-flyout-item",
11489
+ child.active && "ods-sidebar__rail-flyout-item--active"
11490
+ ),
11491
+ "aria-current": child.active ? "page" : void 0,
11492
+ children: [
11493
+ /* @__PURE__ */ jsx69("span", { className: "ods-sidebar__rail-flyout-icon", children: child.icon }),
11494
+ /* @__PURE__ */ jsx69("span", { className: "ods-sidebar__rail-flyout-label", children: child.label }),
11495
+ child.tag && /* @__PURE__ */ jsx69("span", { className: "ods-sidebar__rail-flyout-tag", children: child.tag }),
11496
+ child.badge && /* @__PURE__ */ jsx69("span", { className: "ods-sidebar__rail-flyout-badge", children: child.badge })
11497
+ ]
11498
+ }
11499
+ ) }, child.id);
11500
+ }) })
11501
+ ] });
11502
+ }
11398
11503
  function ExpandedLayout({
11399
11504
  logo,
11400
11505
  brand,
@@ -11619,7 +11724,7 @@ function Skeleton({ variant = "text", width, height, lines = 1, className }) {
11619
11724
 
11620
11725
  // src/components/SlideoutPanel/SlideoutPanel.tsx
11621
11726
  import { AnimatePresence as AnimatePresence9, motion as motion12 } from "framer-motion";
11622
- import { useRef as useRef28 } from "react";
11727
+ import { useRef as useRef29 } from "react";
11623
11728
  import { FocusScope as FocusScope2, OverlayProvider as OverlayProvider2, useDialog as useDialog2, useModal as useModal2, useOverlay as useOverlay2 } from "react-aria";
11624
11729
  import { createPortal as createPortal8 } from "react-dom";
11625
11730
  import { Fragment as Fragment16, jsx as jsx71, jsxs as jsxs69 } from "react/jsx-runtime";
@@ -11645,8 +11750,8 @@ function SlideoutContent({
11645
11750
  footer,
11646
11751
  className
11647
11752
  }) {
11648
- const overlayRef = useRef28(null);
11649
- const panelRef = useRef28(null);
11753
+ const overlayRef = useRef29(null);
11754
+ const panelRef = useRef29(null);
11650
11755
  const { overlayProps } = useOverlay2(
11651
11756
  {
11652
11757
  isOpen: open,
@@ -11876,8 +11981,8 @@ function SocialButton({
11876
11981
  // src/components/Sortable/Sortable.tsx
11877
11982
  import {
11878
11983
  useCallback as useCallback17,
11879
- useEffect as useEffect17,
11880
- useRef as useRef29,
11984
+ useEffect as useEffect18,
11985
+ useRef as useRef30,
11881
11986
  useState as useState22
11882
11987
  } from "react";
11883
11988
  import { jsx as jsx74, jsxs as jsxs72 } from "react/jsx-runtime";
@@ -11892,10 +11997,10 @@ function Sortable({
11892
11997
  autoScrollEdge = 48,
11893
11998
  className
11894
11999
  }) {
11895
- const containerRef = useRef29(null);
11896
- const itemRefs = useRef29(/* @__PURE__ */ new Map());
11897
- const originalOrderRef = useRef29(null);
11898
- const scrollTimerRef = useRef29(null);
12000
+ const containerRef = useRef30(null);
12001
+ const itemRefs = useRef30(/* @__PURE__ */ new Map());
12002
+ const originalOrderRef = useRef30(null);
12003
+ const scrollTimerRef = useRef30(null);
11899
12004
  const [draggingId, setDraggingId] = useState22(null);
11900
12005
  const [dropPos, setDropPos] = useState22(null);
11901
12006
  const [kbActiveId, setKbActiveId] = useState22(null);
@@ -11959,7 +12064,7 @@ function Sortable({
11959
12064
  },
11960
12065
  [items, onChange]
11961
12066
  );
11962
- useEffect17(() => {
12067
+ useEffect18(() => {
11963
12068
  if (!autoScroll || !draggingId) return;
11964
12069
  const container = containerRef.current;
11965
12070
  if (!container) return;
@@ -12009,7 +12114,7 @@ function Sortable({
12009
12114
  }
12010
12115
  };
12011
12116
  }, [autoScroll, autoScrollEdge, draggingId, isVertical]);
12012
- useEffect17(() => {
12117
+ useEffect18(() => {
12013
12118
  if (!draggingId) return;
12014
12119
  const onKey = (e) => {
12015
12120
  if (e.key === "Escape") cancelDrag();
@@ -12288,7 +12393,7 @@ function Stat({
12288
12393
  }
12289
12394
 
12290
12395
  // src/components/Switch/Switch.tsx
12291
- import { useRef as useRef30 } from "react";
12396
+ import { useRef as useRef31 } from "react";
12292
12397
  import { useSwitch } from "react-aria";
12293
12398
  import { jsx as jsx78, jsxs as jsxs75 } from "react/jsx-runtime";
12294
12399
  function Switch({
@@ -12301,7 +12406,7 @@ function Switch({
12301
12406
  className,
12302
12407
  ...props
12303
12408
  }) {
12304
- const ref = useRef30(null);
12409
+ const ref = useRef31(null);
12305
12410
  const state = $fd3c5e01e837dc20$export$8042c6c013fd5226({
12306
12411
  isSelected: checked,
12307
12412
  defaultSelected: defaultChecked,
@@ -12519,11 +12624,11 @@ function TableRow({
12519
12624
 
12520
12625
  // src/components/Tabs/Tabs.tsx
12521
12626
  import { motion as motion13 } from "framer-motion";
12522
- import { useMemo as useMemo11, useRef as useRef31, useState as useState24 } from "react";
12627
+ import { useMemo as useMemo11, useRef as useRef32, useState as useState24 } from "react";
12523
12628
  import { useTab, useTabList, useTabPanel } from "react-aria";
12524
12629
  import { jsx as jsx80, jsxs as jsxs77 } from "react/jsx-runtime";
12525
12630
  function TabButton({ item, state }) {
12526
- const ref = useRef31(null);
12631
+ const ref = useRef32(null);
12527
12632
  const { tabProps } = useTab({ key: item.key }, state, ref);
12528
12633
  const isSelected = state.selectedKey === item.key;
12529
12634
  const isDisabled = state.disabledKeys.has(item.key);
@@ -12553,7 +12658,7 @@ function TabButton({ item, state }) {
12553
12658
  );
12554
12659
  }
12555
12660
  function TabPanelContent({ state, panelContent, ...props }) {
12556
- const ref = useRef31(null);
12661
+ const ref = useRef32(null);
12557
12662
  const { tabPanelProps } = useTabPanel(props, state, ref);
12558
12663
  return /* @__PURE__ */ jsx80("div", { ...tabPanelProps, ref, className: "ods-tabs__panel", children: panelContent });
12559
12664
  }
@@ -12589,7 +12694,7 @@ function Tabs({
12589
12694
  disabledKeys: items.filter((i) => i.disabled).map((i) => i.value)
12590
12695
  };
12591
12696
  const state = $caeb030f09a278a1$export$4ba071daf4e486(stateProps);
12592
- const ref = useRef31(null);
12697
+ const ref = useRef32(null);
12593
12698
  const { tabListProps } = useTabList({ ...stateProps, orientation }, state, ref);
12594
12699
  const currentPanelContent = panelContentMap.get(String(selectedKey));
12595
12700
  return /* @__PURE__ */ jsxs77("div", { className: cn("ods-tabs", `ods-tabs--${orientation}`, className), children: [
@@ -12743,7 +12848,7 @@ function TestimonialCard({
12743
12848
  }
12744
12849
 
12745
12850
  // src/components/Textarea/Textarea.tsx
12746
- import { useId as useId4, useRef as useRef32, useState as useState26 } from "react";
12851
+ import { useId as useId5, useRef as useRef33, useState as useState26 } from "react";
12747
12852
  import { useTextField as useTextField2 } from "react-aria";
12748
12853
  import { jsx as jsx83, jsxs as jsxs80 } from "react/jsx-runtime";
12749
12854
  function Textarea({
@@ -12761,8 +12866,8 @@ function Textarea({
12761
12866
  onChange,
12762
12867
  ...props
12763
12868
  }) {
12764
- const ref = useRef32(null);
12765
- const errorId = useId4();
12869
+ const ref = useRef33(null);
12870
+ const errorId = useId5();
12766
12871
  const [charCount, setCharCount] = useState26(() => String(value ?? defaultValue ?? "").length);
12767
12872
  const ariaNameProps = resolveAccessibleName({
12768
12873
  label,
@@ -12862,8 +12967,8 @@ function Timeline({ items, size = "md", className }) {
12862
12967
  import {
12863
12968
  Fragment as Fragment18,
12864
12969
  useCallback as useCallback19,
12865
- useEffect as useEffect18,
12866
- useRef as useRef33,
12970
+ useEffect as useEffect19,
12971
+ useRef as useRef34,
12867
12972
  useState as useState27
12868
12973
  } from "react";
12869
12974
  import { Fragment as Fragment19, jsx as jsx85, jsxs as jsxs82 } from "react/jsx-runtime";
@@ -12895,13 +13000,13 @@ function TimePicker({
12895
13000
  }) {
12896
13001
  const [open, setOpen] = useState27(false);
12897
13002
  const [activeSeg, setActiveSeg] = useState27(null);
12898
- const draftRef = useRef33("");
12899
- const wrapRef = useRef33(null);
12900
- const hoursRef = useRef33(null);
12901
- const minutesRef = useRef33(null);
12902
- const secondsRef = useRef33(null);
13003
+ const draftRef = useRef34("");
13004
+ const wrapRef = useRef34(null);
13005
+ const hoursRef = useRef34(null);
13006
+ const minutesRef = useRef34(null);
13007
+ const secondsRef = useRef34(null);
12903
13008
  const refOf = (s) => s === "hours" ? hoursRef : s === "minutes" ? minutesRef : secondsRef;
12904
- useEffect18(() => {
13009
+ useEffect19(() => {
12905
13010
  if (!open) return;
12906
13011
  const onDoc = (e) => {
12907
13012
  if (!wrapRef.current?.contains(e.target)) {
@@ -13162,7 +13267,7 @@ function TimePicker({
13162
13267
  }
13163
13268
 
13164
13269
  // src/components/TimezonePicker/TimezonePicker.tsx
13165
- import { useEffect as useEffect19, useMemo as useMemo12, useRef as useRef34, useState as useState28 } from "react";
13270
+ import { useEffect as useEffect20, useMemo as useMemo12, useRef as useRef35, useState as useState28 } from "react";
13166
13271
  import { Fragment as Fragment20, jsx as jsx86, jsxs as jsxs83 } from "react/jsx-runtime";
13167
13272
  var DEFAULT_TZS = [
13168
13273
  { iana: "America/Los_Angeles", label: "Pacific Time", offset: "UTC\u22128" },
@@ -13192,8 +13297,8 @@ function TimezonePicker({
13192
13297
  }) {
13193
13298
  const [open, setOpen] = useState28(false);
13194
13299
  const [query, setQuery] = useState28("");
13195
- const wrapRef = useRef34(null);
13196
- const inputRef = useRef34(null);
13300
+ const wrapRef = useRef35(null);
13301
+ const inputRef = useRef35(null);
13197
13302
  const selected = options.find((o) => o.iana === value);
13198
13303
  const filtered = useMemo12(() => {
13199
13304
  if (!query.trim()) return options;
@@ -13202,7 +13307,7 @@ function TimezonePicker({
13202
13307
  (o) => o.iana.toLowerCase().includes(q) || o.label.toLowerCase().includes(q) || o.offset.toLowerCase().includes(q) || o.region?.toLowerCase().includes(q)
13203
13308
  );
13204
13309
  }, [options, query]);
13205
- useEffect19(() => {
13310
+ useEffect20(() => {
13206
13311
  if (!open) return;
13207
13312
  const onDoc = (e) => {
13208
13313
  if (!wrapRef.current?.contains(e.target)) {
@@ -13213,7 +13318,7 @@ function TimezonePicker({
13213
13318
  document.addEventListener("mousedown", onDoc);
13214
13319
  return () => document.removeEventListener("mousedown", onDoc);
13215
13320
  }, [open]);
13216
- useEffect19(() => {
13321
+ useEffect20(() => {
13217
13322
  if (open) requestAnimationFrame(() => inputRef.current?.focus());
13218
13323
  }, [open]);
13219
13324
  const select = (iana) => {
@@ -13371,7 +13476,7 @@ import {
13371
13476
  useCallback as useCallback20,
13372
13477
  useContext as useContext2,
13373
13478
  useMemo as useMemo13,
13374
- useRef as useRef35,
13479
+ useRef as useRef36,
13375
13480
  useState as useState29
13376
13481
  } from "react";
13377
13482
  import { createPortal as createPortal9 } from "react-dom";
@@ -13565,8 +13670,8 @@ function ToastProvider({
13565
13670
  maxStack = 3
13566
13671
  }) {
13567
13672
  const [toasts, setToasts] = useState29([]);
13568
- const timers = useRef35(/* @__PURE__ */ new Map());
13569
- const idCounter2 = useRef35(0);
13673
+ const timers = useRef36(/* @__PURE__ */ new Map());
13674
+ const idCounter2 = useRef36(0);
13570
13675
  const dismiss = useCallback20((id) => {
13571
13676
  setToasts((prev) => prev.filter((t) => t.id !== id));
13572
13677
  const timer = timers.current.get(id);
@@ -13834,9 +13939,9 @@ import { AnimatePresence as AnimatePresence11, motion as motion15 } from "framer
13834
13939
  import {
13835
13940
  cloneElement,
13836
13941
  useCallback as useCallback21,
13837
- useEffect as useEffect20,
13942
+ useEffect as useEffect21,
13838
13943
  useLayoutEffect as useLayoutEffect4,
13839
- useRef as useRef36,
13944
+ useRef as useRef37,
13840
13945
  useState as useState30
13841
13946
  } from "react";
13842
13947
  import { useTooltip, useTooltipTrigger } from "react-aria";
@@ -13871,7 +13976,7 @@ function TooltipContent({
13871
13976
  offset
13872
13977
  }) {
13873
13978
  const { tooltipProps } = useTooltip({ isOpen: state.isOpen }, state);
13874
- const tipRef = useRef36(null);
13979
+ const tipRef = useRef37(null);
13875
13980
  const [coords, setCoords] = useState30(null);
13876
13981
  const reposition = useCallback21(() => {
13877
13982
  if (!triggerRef.current || !tipRef.current) return;
@@ -13885,7 +13990,7 @@ function TooltipContent({
13885
13990
  const id = requestAnimationFrame(reposition);
13886
13991
  return () => cancelAnimationFrame(id);
13887
13992
  }, [state.isOpen, reposition]);
13888
- useEffect20(() => {
13993
+ useEffect21(() => {
13889
13994
  if (!state.isOpen) return;
13890
13995
  const handler = () => reposition();
13891
13996
  window.addEventListener("scroll", handler, true);
@@ -13941,7 +14046,7 @@ function Tooltip({
13941
14046
  children,
13942
14047
  className
13943
14048
  }) {
13944
- const triggerRef = useRef36(null);
14049
+ const triggerRef = useRef37(null);
13945
14050
  const state = $3834487504f4fc00$export$4d40659c25ecb50b({ delay });
13946
14051
  const { triggerProps } = useTooltipTrigger({ delay }, state, triggerRef);
13947
14052
  return /* @__PURE__ */ jsxs88(Fragment22, { children: [
@@ -15665,13 +15770,13 @@ function YamlViewer({
15665
15770
 
15666
15771
  // src/provider/OdsProvider.tsx
15667
15772
  import { generateCssVars, resolveConfig } from "@octaviaflow/config";
15668
- import { createContext as createContext3, useContext as useContext3, useEffect as useEffect21, useMemo as useMemo18 } from "react";
15773
+ import { createContext as createContext3, useContext as useContext3, useEffect as useEffect22, useMemo as useMemo18 } from "react";
15669
15774
  import { OverlayProvider as OverlayProvider3 } from "react-aria";
15670
15775
  import { jsx as jsx98 } from "react/jsx-runtime";
15671
15776
  var OdsContext = createContext3(null);
15672
15777
  function OdsProvider({ config: userConfig, children }) {
15673
15778
  const resolved = useMemo18(() => resolveConfig(userConfig), [userConfig]);
15674
- useEffect21(() => {
15779
+ useEffect22(() => {
15675
15780
  const cssVarsBlock = generateCssVars(resolved);
15676
15781
  const match = cssVarsBlock.match(/:root\s*\{([\s\S]*)\}/);
15677
15782
  if (match) {