@octaviaflow/core 3.0.18-beta.45 → 3.0.18-beta.46

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
@@ -11873,12 +11873,70 @@ function ChevronRightSmall() {
11873
11873
  import { CalendarIcon, ChevronDownIcon as ChevronDownIcon5 } from "@octaviaflow/icons";
11874
11874
  import {
11875
11875
  forwardRef as forwardRef36,
11876
- useEffect as useEffect17,
11876
+ useEffect as useEffect18,
11877
11877
  useId as useId21,
11878
11878
  useImperativeHandle as useImperativeHandle7,
11879
11879
  useRef as useRef21,
11880
+ useState as useState22
11881
+ } from "react";
11882
+ import { createPortal as createPortal9 } from "react-dom";
11883
+
11884
+ // src/utils/useAnchoredPopover.ts
11885
+ import {
11886
+ useCallback as useCallback19,
11887
+ useEffect as useEffect17,
11880
11888
  useState as useState21
11881
11889
  } from "react";
11890
+ function useAnchoredPopover(anchorRef, open, options = {}) {
11891
+ const { gap = 4, margin = 8, preferredMinHeight = 200 } = options;
11892
+ const [pos, setPos] = useState21({
11893
+ top: -9999,
11894
+ left: -9999,
11895
+ width: 0,
11896
+ maxHeight: 320,
11897
+ direction: "down"
11898
+ });
11899
+ const update = useCallback19(() => {
11900
+ const el = anchorRef.current;
11901
+ if (!el) return;
11902
+ const rect = el.getBoundingClientRect();
11903
+ const viewportH = window.innerHeight;
11904
+ const spaceBelow = viewportH - rect.bottom - gap - margin;
11905
+ const spaceAbove = rect.top - gap - margin;
11906
+ const openUp = spaceBelow < preferredMinHeight && spaceAbove > spaceBelow;
11907
+ setPos({
11908
+ ...openUp ? { bottom: viewportH - rect.top + gap } : { top: rect.bottom + gap },
11909
+ left: rect.left,
11910
+ width: rect.width,
11911
+ maxHeight: Math.max(120, openUp ? spaceAbove : spaceBelow),
11912
+ direction: openUp ? "up" : "down"
11913
+ });
11914
+ }, [anchorRef, gap, margin, preferredMinHeight]);
11915
+ useEffect17(() => {
11916
+ if (!open) return;
11917
+ update();
11918
+ window.addEventListener("scroll", update, true);
11919
+ window.addEventListener("resize", update);
11920
+ return () => {
11921
+ window.removeEventListener("scroll", update, true);
11922
+ window.removeEventListener("resize", update);
11923
+ };
11924
+ }, [open, update]);
11925
+ return pos;
11926
+ }
11927
+ function anchoredPopoverStyle(pos, extra) {
11928
+ return {
11929
+ position: "fixed",
11930
+ ...pos.top !== void 0 ? { top: pos.top } : {},
11931
+ ...pos.bottom !== void 0 ? { bottom: pos.bottom } : {},
11932
+ left: pos.left,
11933
+ minWidth: pos.width,
11934
+ maxHeight: pos.maxHeight,
11935
+ ...extra
11936
+ };
11937
+ }
11938
+
11939
+ // src/components/DatePicker/DatePicker.tsx
11882
11940
  import { jsx as jsx39, jsxs as jsxs38 } from "react/jsx-runtime";
11883
11941
  var defaultFormat2 = (d) => d.toLocaleDateString(void 0, { month: "short", day: "numeric", year: "numeric" });
11884
11942
  function toIsoDate(d) {
@@ -11911,22 +11969,36 @@ var DatePicker = forwardRef36(
11911
11969
  className,
11912
11970
  ...rest
11913
11971
  }, forwardedRef) {
11914
- const [open, setOpen] = useState21(false);
11972
+ const [open, setOpen] = useState22(false);
11915
11973
  const wrapRef = useRef21(null);
11916
11974
  const triggerRef = useRef21(null);
11975
+ const popoverRef = useRef21(null);
11976
+ const popoverPos = useAnchoredPopover(triggerRef, open);
11917
11977
  useImperativeHandle7(forwardedRef, () => triggerRef.current);
11918
11978
  const reactId = useId21();
11919
11979
  const baseId = id ?? `ods-dp-${reactId}`;
11920
11980
  const helperId = error || helperText ? `${baseId}-helper` : void 0;
11921
11981
  const ariaLabelForDialog = popoverAriaLabel ?? (typeof label === "string" ? `${label} calendar` : "Date picker");
11922
- useEffect17(() => {
11982
+ useEffect18(() => {
11923
11983
  if (!open) return;
11924
11984
  const onDoc = (e) => {
11925
- if (!wrapRef.current?.contains(e.target)) setOpen(false);
11985
+ const target = e.target;
11986
+ if (!wrapRef.current?.contains(target) && !popoverRef.current?.contains(target))
11987
+ setOpen(false);
11988
+ };
11989
+ const onKey = (e) => {
11990
+ if (closeOnEsc && e.key === "Escape") {
11991
+ setOpen(false);
11992
+ triggerRef.current?.focus();
11993
+ }
11926
11994
  };
11927
11995
  document.addEventListener("mousedown", onDoc);
11928
- return () => document.removeEventListener("mousedown", onDoc);
11929
- }, [open]);
11996
+ document.addEventListener("keydown", onKey);
11997
+ return () => {
11998
+ document.removeEventListener("mousedown", onDoc);
11999
+ document.removeEventListener("keydown", onKey);
12000
+ };
12001
+ }, [open, closeOnEsc]);
11930
12002
  const handleKeyDown = (e) => {
11931
12003
  if (closeOnEsc && e.key === "Escape" && open) {
11932
12004
  e.stopPropagation();
@@ -11992,30 +12064,35 @@ var DatePicker = forwardRef36(
11992
12064
  required
11993
12065
  }
11994
12066
  ),
11995
- open && /* @__PURE__ */ jsx39(
11996
- "div",
11997
- {
11998
- className: "ods-datepicker__popover",
11999
- role: "dialog",
12000
- "aria-modal": "false",
12001
- "aria-label": ariaLabelForDialog,
12002
- children: /* @__PURE__ */ jsx39(
12003
- Calendar,
12004
- {
12005
- mode: "single",
12006
- value,
12007
- onChange: (d) => {
12008
- onChange?.(d);
12009
- setOpen(false);
12010
- triggerRef.current?.focus();
12011
- },
12012
- minDate,
12013
- maxDate,
12014
- locale,
12015
- autoFocus: true
12016
- }
12017
- )
12018
- }
12067
+ open && typeof document !== "undefined" && createPortal9(
12068
+ /* @__PURE__ */ jsx39(
12069
+ "div",
12070
+ {
12071
+ ref: popoverRef,
12072
+ className: "ods-datepicker__popover",
12073
+ role: "dialog",
12074
+ "aria-modal": "false",
12075
+ "aria-label": ariaLabelForDialog,
12076
+ style: anchoredPopoverStyle(popoverPos),
12077
+ children: /* @__PURE__ */ jsx39(
12078
+ Calendar,
12079
+ {
12080
+ mode: "single",
12081
+ value,
12082
+ onChange: (d) => {
12083
+ onChange?.(d);
12084
+ setOpen(false);
12085
+ triggerRef.current?.focus();
12086
+ },
12087
+ minDate,
12088
+ maxDate,
12089
+ locale,
12090
+ autoFocus: true
12091
+ }
12092
+ )
12093
+ }
12094
+ ),
12095
+ document.body
12019
12096
  ),
12020
12097
  (error || helperText) && /* @__PURE__ */ jsx39(
12021
12098
  "div",
@@ -12376,9 +12453,9 @@ Drawer.displayName = "Drawer";
12376
12453
 
12377
12454
  // src/components/DropdownMenu/DropdownMenu.tsx
12378
12455
  import { AnimatePresence as AnimatePresence13, motion as motion19 } from "framer-motion";
12379
- import { useEffect as useEffect18, useMemo as useMemo14, useRef as useRef22 } from "react";
12456
+ import { useEffect as useEffect19, useMemo as useMemo14, useRef as useRef22 } from "react";
12380
12457
  import { useButton as useButton4, useMenu, useMenuItem, useMenuTrigger } from "react-aria";
12381
- import { createPortal as createPortal9 } from "react-dom";
12458
+ import { createPortal as createPortal10 } from "react-dom";
12382
12459
  import { Fragment as Fragment22, jsx as jsx44, jsxs as jsxs43 } from "react/jsx-runtime";
12383
12460
  function MenuItemComponent({ item, state, onAction }) {
12384
12461
  const ref = useRef22(null);
@@ -12414,7 +12491,7 @@ function MenuPopup({
12414
12491
  ariaNameProps
12415
12492
  }) {
12416
12493
  const menuRef = useRef22(null);
12417
- useEffect18(() => {
12494
+ useEffect19(() => {
12418
12495
  if (!state.isOpen || !closeOnOutsideClick) return;
12419
12496
  const handler = (e) => {
12420
12497
  const target = e.target;
@@ -12428,7 +12505,7 @@ function MenuPopup({
12428
12505
  document.addEventListener("mousedown", handler, true);
12429
12506
  return () => document.removeEventListener("mousedown", handler, true);
12430
12507
  }, [state.isOpen, closeOnOutsideClick]);
12431
- useEffect18(() => {
12508
+ useEffect19(() => {
12432
12509
  if (!state.isOpen || !closeOnEscape) return;
12433
12510
  const handler = (e) => {
12434
12511
  if (e.key === "Escape") {
@@ -12542,7 +12619,7 @@ function MenuPopup({
12542
12619
  }
12543
12620
  ) });
12544
12621
  if (typeof document !== "undefined") {
12545
- return createPortal9(portalContent, document.body);
12622
+ return createPortal10(portalContent, document.body);
12546
12623
  }
12547
12624
  return null;
12548
12625
  }
@@ -12639,7 +12716,7 @@ EmptyState.displayName = "EmptyState";
12639
12716
 
12640
12717
  // src/components/ExecutionConsole/ExecutionConsole.tsx
12641
12718
  import { motion as motion20 } from "framer-motion";
12642
- import { useEffect as useEffect19, useMemo as useMemo15, useRef as useRef23, useState as useState22 } from "react";
12719
+ import { useEffect as useEffect20, useMemo as useMemo15, useRef as useRef23, useState as useState23 } from "react";
12643
12720
  import { Fragment as Fragment23, jsx as jsx46, jsxs as jsxs45 } from "react/jsx-runtime";
12644
12721
  var iconProps = {
12645
12722
  xmlns: "http://www.w3.org/2000/svg",
@@ -12712,12 +12789,12 @@ function ExecutionConsole({
12712
12789
  const logEndRef = useRef23(null);
12713
12790
  const logsRef = useRef23(null);
12714
12791
  const lastScrollTopRef = useRef23(0);
12715
- const [query, setQuery] = useState22("");
12716
- const [activeLevels, setActiveLevels] = useState22(() => new Set(ALL_LEVELS));
12717
- const [activeNode, setActiveNode] = useState22("all");
12718
- const [autoScroll, setAutoScroll] = useState22(running);
12719
- const [expandedLines, setExpandedLines] = useState22(/* @__PURE__ */ new Set());
12720
- const [exportMenuOpen, setExportMenuOpen] = useState22(false);
12792
+ const [query, setQuery] = useState23("");
12793
+ const [activeLevels, setActiveLevels] = useState23(() => new Set(ALL_LEVELS));
12794
+ const [activeNode, setActiveNode] = useState23("all");
12795
+ const [autoScroll, setAutoScroll] = useState23(running);
12796
+ const [expandedLines, setExpandedLines] = useState23(/* @__PURE__ */ new Set());
12797
+ const [exportMenuOpen, setExportMenuOpen] = useState23(false);
12721
12798
  const nodeOptions = useMemo15(() => {
12722
12799
  const seen = /* @__PURE__ */ new Map();
12723
12800
  for (const log of logs) {
@@ -12740,13 +12817,13 @@ function ExecutionConsole({
12740
12817
  });
12741
12818
  }, [logs, query, activeLevels, activeNode]);
12742
12819
  const prevRunningRef = useRef23(running);
12743
- useEffect19(() => {
12820
+ useEffect20(() => {
12744
12821
  if (prevRunningRef.current !== running) {
12745
12822
  setAutoScroll(running);
12746
12823
  prevRunningRef.current = running;
12747
12824
  }
12748
12825
  }, [running]);
12749
- useEffect19(() => {
12826
+ useEffect20(() => {
12750
12827
  if (!open || !autoScroll) return;
12751
12828
  const el = logEndRef.current;
12752
12829
  if (el && typeof el.scrollIntoView === "function") {
@@ -13226,12 +13303,12 @@ import {
13226
13303
  } from "@octaviaflow/icons";
13227
13304
  import {
13228
13305
  forwardRef as forwardRef43,
13229
- useCallback as useCallback19,
13230
- useEffect as useEffect20,
13306
+ useCallback as useCallback20,
13307
+ useEffect as useEffect21,
13231
13308
  useId as useId24,
13232
13309
  useImperativeHandle as useImperativeHandle8,
13233
13310
  useRef as useRef24,
13234
- useState as useState23
13311
+ useState as useState24
13235
13312
  } from "react";
13236
13313
 
13237
13314
  // src/utils/sanitizeUrl.ts
@@ -13359,10 +13436,10 @@ var FileDropzone = forwardRef43(
13359
13436
  const dropzoneRef = useRef24(null);
13360
13437
  useImperativeHandle8(forwardedRef, () => dropzoneRef.current);
13361
13438
  const inputId = useId24();
13362
- const [isOver, setOver] = useState23(false);
13363
- const [error, setError] = useState23(null);
13364
- const [autoPreviews, setAutoPreviews] = useState23({});
13365
- const validate = useCallback19(
13439
+ const [isOver, setOver] = useState24(false);
13440
+ const [error, setError] = useState24(null);
13441
+ const [autoPreviews, setAutoPreviews] = useState24({});
13442
+ const validate = useCallback20(
13366
13443
  (list) => {
13367
13444
  if (maxFiles && list.length > maxFiles) {
13368
13445
  return { ok: [], error: `Too many files \u2014 max ${maxFiles}` };
@@ -13391,7 +13468,7 @@ var FileDropzone = forwardRef43(
13391
13468
  },
13392
13469
  [accept, maxFiles, maxSize]
13393
13470
  );
13394
- const handleFiles = useCallback19(
13471
+ const handleFiles = useCallback20(
13395
13472
  (incoming) => {
13396
13473
  if (disabled) return;
13397
13474
  const { ok, error: error2 } = validate(incoming);
@@ -13400,7 +13477,7 @@ var FileDropzone = forwardRef43(
13400
13477
  },
13401
13478
  [disabled, onFiles, validate]
13402
13479
  );
13403
- useEffect20(() => {
13480
+ useEffect21(() => {
13404
13481
  if (!files) return;
13405
13482
  const next = {};
13406
13483
  const created = [];
@@ -13417,7 +13494,7 @@ var FileDropzone = forwardRef43(
13417
13494
  for (const u of created) URL.revokeObjectURL(u);
13418
13495
  };
13419
13496
  }, [files]);
13420
- useEffect20(() => {
13497
+ useEffect21(() => {
13421
13498
  if (!pasteEnabled || disabled) return;
13422
13499
  const onPaste = (e) => {
13423
13500
  const active = document.activeElement;
@@ -13675,10 +13752,10 @@ FileDropzone.displayName = "FileDropzone";
13675
13752
 
13676
13753
  // src/components/FlowCanvas/FlowCanvas.tsx
13677
13754
  import { AnimatePresence as AnimatePresence14 } from "framer-motion";
13678
- import { useCallback as useCallback21, useRef as useRef26 } from "react";
13755
+ import { useCallback as useCallback22, useRef as useRef26 } from "react";
13679
13756
 
13680
13757
  // src/components/FlowEdge/FlowEdge.tsx
13681
- import { useId as useId25, useState as useState24 } from "react";
13758
+ import { useId as useId25, useState as useState25 } from "react";
13682
13759
  import { jsx as jsx49, jsxs as jsxs48 } from "react/jsx-runtime";
13683
13760
  var DEFAULT_NODE_WIDTH = 368;
13684
13761
  var DEFAULT_NODE_HEIGHT = 96;
@@ -13722,7 +13799,7 @@ function FlowEdge({
13722
13799
  }) {
13723
13800
  const uid = useId25();
13724
13801
  const markerId = `ods-flow-edge-arrow-${uid.replace(/:/g, "")}`;
13725
- const [hovered, setHovered] = useState24(false);
13802
+ const [hovered, setHovered] = useState25(false);
13726
13803
  const sourceNode = nodes.find((n) => n.id === edge.source);
13727
13804
  const targetNode = nodes.find((n) => n.id === edge.target);
13728
13805
  if (!sourceNode || !targetNode) return null;
@@ -13862,10 +13939,10 @@ function FlowEdge({
13862
13939
  import { motion as motion21 } from "framer-motion";
13863
13940
  import {
13864
13941
  forwardRef as forwardRef44,
13865
- useCallback as useCallback20,
13866
- useEffect as useEffect21,
13942
+ useCallback as useCallback21,
13943
+ useEffect as useEffect22,
13867
13944
  useRef as useRef25,
13868
- useState as useState25
13945
+ useState as useState26
13869
13946
  } from "react";
13870
13947
  import { jsx as jsx50, jsxs as jsxs49 } from "react/jsx-runtime";
13871
13948
  var DRAG_THRESHOLD_PX = 5;
@@ -13926,11 +14003,11 @@ var FlowNode = forwardRef44(function FlowNode2({
13926
14003
  className,
13927
14004
  style
13928
14005
  }, ref) {
13929
- const [isDragging, setIsDragging] = useState25(false);
13930
- const [wasDragged, setWasDragged] = useState25(false);
14006
+ const [isDragging, setIsDragging] = useState26(false);
14007
+ const [wasDragged, setWasDragged] = useState26(false);
13931
14008
  const dragStartRef = useRef25(null);
13932
14009
  const zoom = viewport?.zoom ?? 1;
13933
- const handleClick = useCallback20(
14010
+ const handleClick = useCallback21(
13934
14011
  (e) => {
13935
14012
  e.stopPropagation();
13936
14013
  if (wasDragged) {
@@ -13941,7 +14018,7 @@ var FlowNode = forwardRef44(function FlowNode2({
13941
14018
  },
13942
14019
  [node.id, onSelect, wasDragged]
13943
14020
  );
13944
- const handleDelete = useCallback20(
14021
+ const handleDelete = useCallback21(
13945
14022
  (e) => {
13946
14023
  e.stopPropagation();
13947
14024
  if (isLockMode) return;
@@ -13949,7 +14026,7 @@ var FlowNode = forwardRef44(function FlowNode2({
13949
14026
  },
13950
14027
  [node.id, onDelete, isLockMode]
13951
14028
  );
13952
- const handleMouseDown = useCallback20(
14029
+ const handleMouseDown = useCallback21(
13953
14030
  (e) => {
13954
14031
  if (isLockMode) return;
13955
14032
  const target = e.target;
@@ -13962,7 +14039,7 @@ var FlowNode = forwardRef44(function FlowNode2({
13962
14039
  },
13963
14040
  [isLockMode]
13964
14041
  );
13965
- const handleTouchStart = useCallback20(
14042
+ const handleTouchStart = useCallback21(
13966
14043
  (e) => {
13967
14044
  if (isLockMode) return;
13968
14045
  if (e.touches.length !== 1) return;
@@ -13979,7 +14056,7 @@ var FlowNode = forwardRef44(function FlowNode2({
13979
14056
  },
13980
14057
  [isLockMode]
13981
14058
  );
13982
- useEffect21(() => {
14059
+ useEffect22(() => {
13983
14060
  if (!isDragging) return;
13984
14061
  const applyDelta = (clientX, clientY) => {
13985
14062
  const start = dragStartRef.current;
@@ -14024,7 +14101,7 @@ var FlowNode = forwardRef44(function FlowNode2({
14024
14101
  document.removeEventListener("touchcancel", onTouchEnd);
14025
14102
  };
14026
14103
  }, [isDragging, zoom, node.id, node.position.x, node.position.y, onPositionChange]);
14027
- const handlePortMouseDown = useCallback20(
14104
+ const handlePortMouseDown = useCallback21(
14028
14105
  (e, portId, portType) => {
14029
14106
  e.stopPropagation();
14030
14107
  if (isLockMode) return;
@@ -14034,7 +14111,7 @@ var FlowNode = forwardRef44(function FlowNode2({
14034
14111
  },
14035
14112
  [connectingFrom, isLockMode, node.id, onStartConnecting]
14036
14113
  );
14037
- const handlePortMouseUp = useCallback20(
14114
+ const handlePortMouseUp = useCallback21(
14038
14115
  (e, portId, portType) => {
14039
14116
  e.stopPropagation();
14040
14117
  if (isLockMode) return;
@@ -14043,7 +14120,7 @@ var FlowNode = forwardRef44(function FlowNode2({
14043
14120
  },
14044
14121
  [connectingFrom, isLockMode, node.id, onEndConnecting]
14045
14122
  );
14046
- const isPortEdgeSelected = useCallback20(
14123
+ const isPortEdgeSelected = useCallback21(
14047
14124
  (portId, portType) => edges.some(
14048
14125
  (edge) => edge.selected && (portType === "input" ? edge.target === node.id && edge.targetPort === portId : edge.source === node.id && edge.sourcePort === portId)
14049
14126
  ),
@@ -14278,7 +14355,7 @@ function FlowCanvas2({
14278
14355
  }) {
14279
14356
  const canvasRef = useRef26(null);
14280
14357
  const isEmpty = nodes.length === 0 && edges.length === 0;
14281
- const handleCanvasClick = useCallback21(
14358
+ const handleCanvasClick = useCallback22(
14282
14359
  (e) => {
14283
14360
  const target = e.target;
14284
14361
  if (target === canvasRef.current) {
@@ -14370,12 +14447,12 @@ function FlowCanvas2({
14370
14447
 
14371
14448
  // src/components/FlowMinimap/FlowMinimap.tsx
14372
14449
  import {
14373
- useCallback as useCallback22,
14450
+ useCallback as useCallback23,
14374
14451
  useContext,
14375
- useEffect as useEffect22,
14452
+ useEffect as useEffect23,
14376
14453
  useMemo as useMemo16,
14377
14454
  useRef as useRef27,
14378
- useState as useState26,
14455
+ useState as useState27,
14379
14456
  useSyncExternalStore
14380
14457
  } from "react";
14381
14458
  import { jsx as jsx52, jsxs as jsxs51 } from "react/jsx-runtime";
@@ -14408,8 +14485,8 @@ function FlowMinimap(props) {
14408
14485
  [store]
14409
14486
  );
14410
14487
  const liveSnapshot = useSyncExternalStore(sub, snap, snap);
14411
- const [registryVersion, setRegistryVersion] = useState26(0);
14412
- useEffect22(() => {
14488
+ const [registryVersion, setRegistryVersion] = useState27(0);
14489
+ useEffect23(() => {
14413
14490
  if (!handleRegistry) return;
14414
14491
  return handleRegistry.subscribe(() => setRegistryVersion((v) => v + 1));
14415
14492
  }, [handleRegistry]);
@@ -14463,8 +14540,8 @@ function FlowMinimap(props) {
14463
14540
  });
14464
14541
  }, [edgesProp, liveSnapshot, handleRegistry, registryVersion]);
14465
14542
  const minimapRef = useRef27(null);
14466
- const [canvasSize, setCanvasSize] = useState26(null);
14467
- useEffect22(() => {
14543
+ const [canvasSize, setCanvasSize] = useState27(null);
14544
+ useEffect23(() => {
14468
14545
  if (!liveSnapshot) return;
14469
14546
  const el = minimapRef.current?.closest(".ods-flow-canvas-v2");
14470
14547
  if (!el) return;
@@ -14518,7 +14595,7 @@ function FlowMinimap(props) {
14518
14595
  h: maxY - minY + bounds_padding * 2
14519
14596
  };
14520
14597
  }, [totalWidthProp, totalHeightProp, contentBounds, bounds_padding]);
14521
- const clampWorldTopLeft = useCallback22(
14598
+ const clampWorldTopLeft = useCallback23(
14522
14599
  (worldX, worldY, vw, vh) => {
14523
14600
  if (!contentBounds) return { x: worldX, y: worldY };
14524
14601
  const minTLX = viewBox.x;
@@ -14531,7 +14608,7 @@ function FlowMinimap(props) {
14531
14608
  },
14532
14609
  [contentBounds, viewBox.x, viewBox.y, viewBox.w, viewBox.h]
14533
14610
  );
14534
- const reportViewportChange = useCallback22(
14611
+ const reportViewportChange = useCallback23(
14535
14612
  (worldX, worldY) => {
14536
14613
  if (effectiveViewportRect) {
14537
14614
  const clamped = clampWorldTopLeft(
@@ -14567,7 +14644,7 @@ function FlowMinimap(props) {
14567
14644
  [onViewportChange, viewportProp?.zoom, instance, liveSnapshot, effectiveViewportRect, clampWorldTopLeft]
14568
14645
  );
14569
14646
  const svgRef = useRef27(null);
14570
- const pointToWorld = useCallback22(
14647
+ const pointToWorld = useCallback23(
14571
14648
  (clientX, clientY) => {
14572
14649
  const svg = svgRef.current;
14573
14650
  if (!svg) return null;
@@ -14593,8 +14670,8 @@ function FlowMinimap(props) {
14593
14670
  startClientY: 0
14594
14671
  });
14595
14672
  const suppressNextClickRef = useRef27(false);
14596
- const [isDragging, setIsDragging] = useState26(false);
14597
- const onViewportPointerDown = useCallback22(
14673
+ const [isDragging, setIsDragging] = useState27(false);
14674
+ const onViewportPointerDown = useCallback23(
14598
14675
  (e) => {
14599
14676
  if (!effectiveViewportRect) return;
14600
14677
  e.stopPropagation();
@@ -14616,7 +14693,7 @@ function FlowMinimap(props) {
14616
14693
  },
14617
14694
  [effectiveViewportRect, pointToWorld]
14618
14695
  );
14619
- const onSvgPointerMove = useCallback22(
14696
+ const onSvgPointerMove = useCallback23(
14620
14697
  (e) => {
14621
14698
  const d = dragRef.current;
14622
14699
  if (!d.dragging || d.pointerId !== e.pointerId) return;
@@ -14632,7 +14709,7 @@ function FlowMinimap(props) {
14632
14709
  },
14633
14710
  [pointToWorld, reportViewportChange]
14634
14711
  );
14635
- const onSvgPointerUp = useCallback22((e) => {
14712
+ const onSvgPointerUp = useCallback23((e) => {
14636
14713
  const d = dragRef.current;
14637
14714
  if (d.dragging && d.pointerId === e.pointerId) {
14638
14715
  d.dragging = false;
@@ -14641,7 +14718,7 @@ function FlowMinimap(props) {
14641
14718
  e.currentTarget.releasePointerCapture?.(e.pointerId);
14642
14719
  }
14643
14720
  }, []);
14644
- const handleSvgClick = useCallback22(
14721
+ const handleSvgClick = useCallback23(
14645
14722
  (e) => {
14646
14723
  if (suppressNextClickRef.current) {
14647
14724
  suppressNextClickRef.current = false;
@@ -14659,7 +14736,7 @@ function FlowMinimap(props) {
14659
14736
  },
14660
14737
  [pointToWorld, effectiveViewportRect, reportViewportChange]
14661
14738
  );
14662
- const handleWheel = useCallback22(
14739
+ const handleWheel = useCallback23(
14663
14740
  (e) => {
14664
14741
  if (!zoomOnScroll) return;
14665
14742
  if (!instance || !liveSnapshot) return;
@@ -14685,7 +14762,7 @@ function FlowMinimap(props) {
14685
14762
  },
14686
14763
  [zoomOnScroll, instance, liveSnapshot, canvasSize, pointToWorld, clampWorldTopLeft]
14687
14764
  );
14688
- useEffect22(
14765
+ useEffect23(
14689
14766
  () => () => {
14690
14767
  dragRef.current.dragging = false;
14691
14768
  },
@@ -14785,7 +14862,7 @@ import {
14785
14862
  ZoomInIcon,
14786
14863
  ZoomOutIcon
14787
14864
  } from "@octaviaflow/icons";
14788
- import { useEffect as useEffect23, useRef as useRef28, useState as useState27 } from "react";
14865
+ import { useEffect as useEffect24, useRef as useRef28, useState as useState28 } from "react";
14789
14866
 
14790
14867
  // src/components/Spinner/Spinner.tsx
14791
14868
  import {
@@ -14939,10 +15016,10 @@ function FlowToolbarSave({
14939
15016
  showLabel = false,
14940
15017
  className
14941
15018
  }) {
14942
- const [inferred, setInferred] = useState27("idle");
15019
+ const [inferred, setInferred] = useState28("idle");
14943
15020
  const prevSavedAt = useRef28(lastSavedAt);
14944
15021
  const prevLoading = useRef28(loading);
14945
- useEffect23(() => {
15022
+ useEffect24(() => {
14946
15023
  if (state !== void 0) return;
14947
15024
  if (error) {
14948
15025
  setInferred("error");
@@ -15581,10 +15658,10 @@ var Grid2 = Object.assign(GridBase, { Item: GridItem });
15581
15658
  import { AnimatePresence as AnimatePresence15, motion as motion23 } from "framer-motion";
15582
15659
  import {
15583
15660
  forwardRef as forwardRef48,
15584
- useCallback as useCallback23,
15661
+ useCallback as useCallback24,
15585
15662
  useId as useId27,
15586
15663
  useMemo as useMemo18,
15587
- useState as useState28
15664
+ useState as useState29
15588
15665
  } from "react";
15589
15666
  import { jsx as jsx58, jsxs as jsxs55 } from "react/jsx-runtime";
15590
15667
  var DEFAULT_SCALE2 = [
@@ -15657,15 +15734,15 @@ var Heatmap = forwardRef48(
15657
15734
  () => domainMax ?? (data.length ? Math.max(...data.map((d) => d.value)) : 1),
15658
15735
  [domainMax, data]
15659
15736
  );
15660
- const [hovered, setHovered] = useState28(null);
15661
- const fire = useCallback23(
15737
+ const [hovered, setHovered] = useState29(null);
15738
+ const fire = useCallback24(
15662
15739
  (cell) => {
15663
15740
  setHovered(cell);
15664
15741
  onCellHover?.(cell);
15665
15742
  },
15666
15743
  [onCellHover]
15667
15744
  );
15668
- const handleKey = useCallback23(
15745
+ const handleKey = useCallback24(
15669
15746
  (e, cell) => {
15670
15747
  if (!onCellClick) return;
15671
15748
  if (e.key === "Enter" || e.key === " ") {
@@ -15838,8 +15915,8 @@ var Heatmap = forwardRef48(
15838
15915
  Heatmap.displayName = "Heatmap";
15839
15916
 
15840
15917
  // src/components/HoverCard/HoverCard.tsx
15841
- import { useCallback as useCallback24, useEffect as useEffect24, useLayoutEffect as useLayoutEffect6, useRef as useRef29, useState as useState29 } from "react";
15842
- import { createPortal as createPortal10 } from "react-dom";
15918
+ import { useCallback as useCallback25, useEffect as useEffect25, useLayoutEffect as useLayoutEffect6, useRef as useRef29, useState as useState30 } from "react";
15919
+ import { createPortal as createPortal11 } from "react-dom";
15843
15920
  import { Fragment as Fragment25, jsx as jsx59, jsxs as jsxs56 } from "react/jsx-runtime";
15844
15921
  function computePosition3(rect, panelRect, placement, offset) {
15845
15922
  const cx = rect.left + rect.width / 2;
@@ -15864,12 +15941,12 @@ function HoverCard({
15864
15941
  children,
15865
15942
  className
15866
15943
  }) {
15867
- const [open, setOpen] = useState29(false);
15944
+ const [open, setOpen] = useState30(false);
15868
15945
  const triggerRef = useRef29(null);
15869
15946
  const panelRef = useRef29(null);
15870
15947
  const openTimer = useRef29(null);
15871
15948
  const closeTimer = useRef29(null);
15872
- const [coords, setCoords] = useState29(null);
15949
+ const [coords, setCoords] = useState30(null);
15873
15950
  const clearTimers = () => {
15874
15951
  if (openTimer.current) {
15875
15952
  clearTimeout(openTimer.current);
@@ -15880,7 +15957,7 @@ function HoverCard({
15880
15957
  closeTimer.current = null;
15881
15958
  }
15882
15959
  };
15883
- useEffect24(() => () => clearTimers(), []);
15960
+ useEffect25(() => () => clearTimers(), []);
15884
15961
  const show = () => {
15885
15962
  clearTimers();
15886
15963
  openTimer.current = setTimeout(() => setOpen(true), openDelay);
@@ -15889,7 +15966,7 @@ function HoverCard({
15889
15966
  clearTimers();
15890
15967
  closeTimer.current = setTimeout(() => setOpen(false), closeDelay);
15891
15968
  };
15892
- const reposition = useCallback24(() => {
15969
+ const reposition = useCallback25(() => {
15893
15970
  if (!triggerRef.current || !panelRef.current) return;
15894
15971
  const trigRect = triggerRef.current.getBoundingClientRect();
15895
15972
  const panelRect = panelRef.current.getBoundingClientRect();
@@ -15901,7 +15978,7 @@ function HoverCard({
15901
15978
  const id = requestAnimationFrame(reposition);
15902
15979
  return () => cancelAnimationFrame(id);
15903
15980
  }, [open, reposition]);
15904
- useEffect24(() => {
15981
+ useEffect25(() => {
15905
15982
  if (!open) return;
15906
15983
  const h = () => reposition();
15907
15984
  window.addEventListener("scroll", h, true);
@@ -15923,7 +16000,7 @@ function HoverCard({
15923
16000
  children
15924
16001
  }
15925
16002
  );
15926
- const portal = typeof document !== "undefined" && open ? createPortal10(
16003
+ const portal = typeof document !== "undefined" && open ? createPortal11(
15927
16004
  /* @__PURE__ */ jsx59(
15928
16005
  "div",
15929
16006
  {
@@ -16413,9 +16490,9 @@ IntegrationCard.displayName = "IntegrationCard";
16413
16490
  import { CheckmarkIcon as CheckmarkIcon8, ChevronRightIcon as ChevronRightIcon3, CopyIcon as CopyIcon4 } from "@octaviaflow/icons";
16414
16491
  import {
16415
16492
  forwardRef as forwardRef52,
16416
- useEffect as useEffect25,
16493
+ useEffect as useEffect26,
16417
16494
  useMemo as useMemo19,
16418
- useState as useState30
16495
+ useState as useState31
16419
16496
  } from "react";
16420
16497
  import { Fragment as Fragment28, jsx as jsx63, jsxs as jsxs60 } from "react/jsx-runtime";
16421
16498
  var JsonViewer = forwardRef52(
@@ -16466,7 +16543,7 @@ function JsonNode({
16466
16543
  truncateAt,
16467
16544
  isLast = true
16468
16545
  }) {
16469
- const [open, setOpen] = useState30(depth < defaultExpandDepth);
16546
+ const [open, setOpen] = useState31(depth < defaultExpandDepth);
16470
16547
  const isObject = value !== null && typeof value === "object" && !Array.isArray(value);
16471
16548
  const isArray = Array.isArray(value);
16472
16549
  const isContainer = isObject || isArray;
@@ -16557,7 +16634,7 @@ function Leaf({
16557
16634
  truncateAt,
16558
16635
  copyable
16559
16636
  }) {
16560
- const [copied, setCopied] = useState30(false);
16637
+ const [copied, setCopied] = useState31(false);
16561
16638
  let display;
16562
16639
  let variant;
16563
16640
  if (value === null) {
@@ -16643,8 +16720,8 @@ function JsonEditBody({ data, onChange, onValidate }) {
16643
16720
  return "{}";
16644
16721
  }
16645
16722
  }, []);
16646
- const [text, setText] = useState30(initial);
16647
- const [parseError, setParseError] = useState30(null);
16723
+ const [text, setText] = useState31(initial);
16724
+ const [parseError, setParseError] = useState31(null);
16648
16725
  const validate = (next) => {
16649
16726
  try {
16650
16727
  JSON.parse(next);
@@ -16661,7 +16738,7 @@ function JsonEditBody({ data, onChange, onValidate }) {
16661
16738
  onChange?.(next);
16662
16739
  validate(next);
16663
16740
  };
16664
- useEffect25(() => {
16741
+ useEffect26(() => {
16665
16742
  validate(initial);
16666
16743
  }, []);
16667
16744
  return /* @__PURE__ */ jsxs60("div", { className: "ods-json-viewer__edit", children: [
@@ -16893,12 +16970,12 @@ KbdGroup.displayName = "KbdGroup";
16893
16970
  import { AnimatePresence as AnimatePresence16, motion as motion24 } from "framer-motion";
16894
16971
  import {
16895
16972
  forwardRef as forwardRef55,
16896
- useCallback as useCallback25,
16897
- useEffect as useEffect26,
16973
+ useCallback as useCallback26,
16974
+ useEffect as useEffect27,
16898
16975
  useId as useId32,
16899
16976
  useMemo as useMemo20,
16900
16977
  useRef as useRef31,
16901
- useState as useState31
16978
+ useState as useState32
16902
16979
  } from "react";
16903
16980
  import { jsx as jsx66, jsxs as jsxs63 } from "react/jsx-runtime";
16904
16981
  var defaultFormat5 = (n) => {
@@ -16976,7 +17053,7 @@ var LineChart = forwardRef55(
16976
17053
  }
16977
17054
  ];
16978
17055
  }, [series, data, stroke, fill]);
16979
- const [zoom, setZoom] = useState31(
17056
+ const [zoom, setZoom] = useState32(
16980
17057
  null
16981
17058
  );
16982
17059
  const totalX = allLines[0]?.data.length ?? 0;
@@ -17017,11 +17094,11 @@ var LineChart = forwardRef55(
17017
17094
  () => buildTicks2(lo, hi, Math.max(2, yTicks)),
17018
17095
  [lo, hi, yTicks]
17019
17096
  );
17020
- const [hoveredIdx, setHoveredIdx] = useState31(null);
17021
- const [pointerPct, setPointerPct] = useState31(null);
17097
+ const [hoveredIdx, setHoveredIdx] = useState32(null);
17098
+ const [pointerPct, setPointerPct] = useState32(null);
17022
17099
  const plotRef = useRef31(null);
17023
- const [brush, setBrush] = useState31(null);
17024
- const indexFromPct = useCallback25(
17100
+ const [brush, setBrush] = useState32(null);
17101
+ const indexFromPct = useCallback26(
17025
17102
  (pct) => {
17026
17103
  if (xCount === 0) return 0;
17027
17104
  return Math.max(
@@ -17031,7 +17108,7 @@ var LineChart = forwardRef55(
17031
17108
  },
17032
17109
  [xCount]
17033
17110
  );
17034
- const handlePlotMove = useCallback25(
17111
+ const handlePlotMove = useCallback26(
17035
17112
  (e) => {
17036
17113
  if (xCount === 0) return;
17037
17114
  const rect = plotRef.current?.getBoundingClientRect();
@@ -17060,12 +17137,12 @@ var LineChart = forwardRef55(
17060
17137
  visibleRange.start
17061
17138
  ]
17062
17139
  );
17063
- const handlePlotLeave = useCallback25(() => {
17140
+ const handlePlotLeave = useCallback26(() => {
17064
17141
  setHoveredIdx(null);
17065
17142
  setPointerPct(null);
17066
17143
  onPointHover?.(null, null, null);
17067
17144
  }, [onPointHover]);
17068
- const handlePlotDown = useCallback25(
17145
+ const handlePlotDown = useCallback26(
17069
17146
  (e) => {
17070
17147
  if (!zoomable) return;
17071
17148
  const rect = plotRef.current?.getBoundingClientRect();
@@ -17078,7 +17155,7 @@ var LineChart = forwardRef55(
17078
17155
  },
17079
17156
  [zoomable]
17080
17157
  );
17081
- useEffect26(() => {
17158
+ useEffect27(() => {
17082
17159
  if (!brush) return;
17083
17160
  const onUp = () => {
17084
17161
  const a = Math.min(brush.startPct, brush.currentPct);
@@ -17099,12 +17176,12 @@ var LineChart = forwardRef55(
17099
17176
  window.addEventListener("mouseup", onUp);
17100
17177
  return () => window.removeEventListener("mouseup", onUp);
17101
17178
  }, [brush, indexFromPct, visibleRange.start, onZoomChange]);
17102
- const handleDoubleClick = useCallback25(() => {
17179
+ const handleDoubleClick = useCallback26(() => {
17103
17180
  if (!zoomable || !zoom) return;
17104
17181
  setZoom(null);
17105
17182
  onZoomChange?.(null);
17106
17183
  }, [zoomable, zoom, onZoomChange]);
17107
- const handlePlotClick = useCallback25(() => {
17184
+ const handlePlotClick = useCallback26(() => {
17108
17185
  if (hoveredIdx === null || !onPointClick) return;
17109
17186
  const s = lines[0];
17110
17187
  const p = s?.data[hoveredIdx];
@@ -17124,11 +17201,11 @@ var LineChart = forwardRef55(
17124
17201
  const showX = showAxis === "x" || showAxis === "both";
17125
17202
  const isMulti = (series?.length ?? 0) > 0;
17126
17203
  const tooltipPoint = hoveredIdx !== null ? lines[0]?.data[hoveredIdx] : void 0;
17127
- const dataXPct = useCallback25(
17204
+ const dataXPct = useCallback26(
17128
17205
  (i) => (PAD + i * stepX) / W * 100,
17129
17206
  [stepX]
17130
17207
  );
17131
- const dataYPct = useCallback25(
17208
+ const dataYPct = useCallback26(
17132
17209
  (v) => (PAD + (1 - (v - lo) / (hi - lo)) * (H - PAD * 2)) / H * 100,
17133
17210
  [lo, hi]
17134
17211
  );
@@ -17520,9 +17597,9 @@ import {
17520
17597
  // src/components/CountUp/CountUp.tsx
17521
17598
  import {
17522
17599
  forwardRef as forwardRef57,
17523
- useEffect as useEffect27,
17600
+ useEffect as useEffect28,
17524
17601
  useRef as useRef32,
17525
- useState as useState32
17602
+ useState as useState33
17526
17603
  } from "react";
17527
17604
  import { jsxs as jsxs65 } from "react/jsx-runtime";
17528
17605
  var easeLinear = (t) => t;
@@ -17545,9 +17622,9 @@ var CountUp = forwardRef57(
17545
17622
  className,
17546
17623
  ...rest
17547
17624
  }, ref) {
17548
- const [n, setN] = useState32(disableAnimation ? value : from);
17625
+ const [n, setN] = useState33(disableAnimation ? value : from);
17549
17626
  const lastRendered = useRef32(disableAnimation ? value : from);
17550
- useEffect27(() => {
17627
+ useEffect28(() => {
17551
17628
  const reduced = typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
17552
17629
  if (disableAnimation || reduced) {
17553
17630
  setN(value);
@@ -18153,15 +18230,15 @@ MetricCard.displayName = "MetricCard";
18153
18230
  import { AnimatePresence as AnimatePresence17, motion as motion26 } from "framer-motion";
18154
18231
  import {
18155
18232
  forwardRef as forwardRef60,
18156
- useCallback as useCallback26,
18157
- useEffect as useEffect28,
18233
+ useCallback as useCallback27,
18234
+ useEffect as useEffect29,
18158
18235
  useId as useId35,
18159
18236
  useLayoutEffect as useLayoutEffect7,
18160
18237
  useMemo as useMemo22,
18161
18238
  useRef as useRef33,
18162
- useState as useState33
18239
+ useState as useState34
18163
18240
  } from "react";
18164
- import { createPortal as createPortal11 } from "react-dom";
18241
+ import { createPortal as createPortal12 } from "react-dom";
18165
18242
  import {
18166
18243
  ChevronDownIcon as ChevronDownIcon6,
18167
18244
  CloseIcon as CloseIcon11,
@@ -18205,14 +18282,14 @@ var MultiSelect = forwardRef60(
18205
18282
  }, ref) {
18206
18283
  const reactId = useId35();
18207
18284
  const baseId = providedId ?? `ods-multiselect-${reactId}`;
18208
- const [internalValue, setInternalValue] = useState33(
18285
+ const [internalValue, setInternalValue] = useState34(
18209
18286
  defaultValue ?? []
18210
18287
  );
18211
18288
  const selectedValues = controlledValue ?? internalValue;
18212
- const [open, setOpen] = useState33(false);
18213
- const [query, setQuery] = useState33("");
18214
- const [activeIdx, setActiveIdx] = useState33(0);
18215
- const [dropdownPos, setDropdownPos] = useState33({
18289
+ const [open, setOpen] = useState34(false);
18290
+ const [query, setQuery] = useState34("");
18291
+ const [activeIdx, setActiveIdx] = useState34(0);
18292
+ const [dropdownPos, setDropdownPos] = useState34({
18216
18293
  top: 0,
18217
18294
  left: 0,
18218
18295
  width: 0
@@ -18222,7 +18299,7 @@ var MultiSelect = forwardRef60(
18222
18299
  const searchRef = useRef33(null);
18223
18300
  const dropdownRef = useRef33(null);
18224
18301
  const chipRefs = useRef33([]);
18225
- const commit = useCallback26(
18302
+ const commit = useCallback27(
18226
18303
  (next) => {
18227
18304
  if (controlledValue === void 0) setInternalValue(next);
18228
18305
  onChange?.(next);
@@ -18244,7 +18321,7 @@ var MultiSelect = forwardRef60(
18244
18321
  const showSearch = searchable ?? options.length > 6;
18245
18322
  const getLabel = (v) => options.find((o) => o.value === v)?.label ?? v;
18246
18323
  const getIcon = (v) => options.find((o) => o.value === v)?.icon;
18247
- const updatePosition = useCallback26(() => {
18324
+ const updatePosition = useCallback27(() => {
18248
18325
  if (!wrapRef.current) return;
18249
18326
  const rect = wrapRef.current.getBoundingClientRect();
18250
18327
  setDropdownPos({
@@ -18253,7 +18330,7 @@ var MultiSelect = forwardRef60(
18253
18330
  width: rect.width
18254
18331
  });
18255
18332
  }, []);
18256
- useEffect28(() => {
18333
+ useEffect29(() => {
18257
18334
  if (!open) return;
18258
18335
  updatePosition();
18259
18336
  window.addEventListener("scroll", updatePosition, true);
@@ -18263,7 +18340,7 @@ var MultiSelect = forwardRef60(
18263
18340
  window.removeEventListener("resize", updatePosition);
18264
18341
  };
18265
18342
  }, [open, updatePosition]);
18266
- useEffect28(() => {
18343
+ useEffect29(() => {
18267
18344
  if (!open) return;
18268
18345
  const onDoc = (e) => {
18269
18346
  const t = e.target;
@@ -18275,14 +18352,14 @@ var MultiSelect = forwardRef60(
18275
18352
  document.addEventListener("mousedown", onDoc);
18276
18353
  return () => document.removeEventListener("mousedown", onDoc);
18277
18354
  }, [open]);
18278
- useEffect28(() => {
18355
+ useEffect29(() => {
18279
18356
  if (open && showSearch) {
18280
18357
  requestAnimationFrame(() => searchRef.current?.focus());
18281
18358
  }
18282
18359
  }, [open, showSearch]);
18283
- useEffect28(() => setActiveIdx(0), [query, open]);
18284
- const [fitCount, setFitCount] = useState33(selectedValues.length);
18285
- const [tick, setTick] = useState33(0);
18360
+ useEffect29(() => setActiveIdx(0), [query, open]);
18361
+ const [fitCount, setFitCount] = useState34(selectedValues.length);
18362
+ const [tick, setTick] = useState34(0);
18286
18363
  useLayoutEffect7(() => {
18287
18364
  if (maxVisibleTags !== void 0) {
18288
18365
  setFitCount(Math.min(selectedValues.length, maxVisibleTags));
@@ -18310,7 +18387,7 @@ var MultiSelect = forwardRef60(
18310
18387
  count = Math.max(1, count - 1);
18311
18388
  setFitCount(count);
18312
18389
  }, [tick, selectedValues, maxVisibleTags]);
18313
- useEffect28(() => {
18390
+ useEffect29(() => {
18314
18391
  if (typeof ResizeObserver === "undefined") return;
18315
18392
  const row = tagsRowRef.current;
18316
18393
  if (!row) return;
@@ -18318,7 +18395,7 @@ var MultiSelect = forwardRef60(
18318
18395
  ro.observe(row);
18319
18396
  return () => ro.disconnect();
18320
18397
  }, []);
18321
- const addValue = useCallback26(
18398
+ const addValue = useCallback27(
18322
18399
  (val) => {
18323
18400
  if (maxTags && selectedValues.length >= maxTags) return;
18324
18401
  commit([...selectedValues, val]);
@@ -18328,13 +18405,13 @@ var MultiSelect = forwardRef60(
18328
18405
  },
18329
18406
  [selectedValues, maxTags, commit]
18330
18407
  );
18331
- const removeValue = useCallback26(
18408
+ const removeValue = useCallback27(
18332
18409
  (val) => {
18333
18410
  commit(selectedValues.filter((v) => v !== val));
18334
18411
  },
18335
18412
  [selectedValues, commit]
18336
18413
  );
18337
- const toggleValue = useCallback26(
18414
+ const toggleValue = useCallback27(
18338
18415
  (val) => {
18339
18416
  if (selectedSet.has(val)) {
18340
18417
  removeValue(val);
@@ -18344,11 +18421,11 @@ var MultiSelect = forwardRef60(
18344
18421
  },
18345
18422
  [selectedSet, addValue, removeValue]
18346
18423
  );
18347
- const clearAll = useCallback26(() => {
18424
+ const clearAll = useCallback27(() => {
18348
18425
  commit([]);
18349
18426
  setQuery("");
18350
18427
  }, [commit]);
18351
- const handleSearchKey = useCallback26(
18428
+ const handleSearchKey = useCallback27(
18352
18429
  (e) => {
18353
18430
  if (e.key === "Escape") {
18354
18431
  setOpen(false);
@@ -18533,7 +18610,7 @@ var MultiSelect = forwardRef60(
18533
18610
  ]
18534
18611
  }
18535
18612
  ),
18536
- typeof document !== "undefined" && createPortal11(
18613
+ typeof document !== "undefined" && createPortal12(
18537
18614
  /* @__PURE__ */ jsx70(AnimatePresence17, { children: open && /* @__PURE__ */ jsxs68(
18538
18615
  motion26.div,
18539
18616
  {
@@ -18713,7 +18790,7 @@ MultiSelect.displayName = "MultiSelect";
18713
18790
  // src/components/NumberInput/NumberInput.tsx
18714
18791
  import {
18715
18792
  forwardRef as forwardRef61,
18716
- useCallback as useCallback27,
18793
+ useCallback as useCallback28,
18717
18794
  useId as useId36
18718
18795
  } from "react";
18719
18796
  import { AddIcon as AddIcon2, SubtractIcon as SubtractIcon2 } from "@octaviaflow/icons";
@@ -18735,16 +18812,19 @@ var NumberInput = forwardRef61(
18735
18812
  id: providedId,
18736
18813
  className,
18737
18814
  wrapperClassName,
18815
+ hideControls = false,
18816
+ align,
18738
18817
  "aria-label": ariaLabel,
18739
18818
  "aria-labelledby": ariaLabelledBy,
18740
18819
  "aria-describedby": consumerDescribedBy,
18741
18820
  ...rest
18742
18821
  }, ref) {
18822
+ const resolvedAlign = align ?? (hideControls ? "left" : "center");
18743
18823
  const reactId = useId36();
18744
18824
  const inputId = providedId ?? `ods-num-${reactId}`;
18745
18825
  const labelId = label ? `${inputId}-label` : void 0;
18746
18826
  const hintId = error || helperText ? `${inputId}-hint` : void 0;
18747
- const clamp = useCallback27(
18827
+ const clamp = useCallback28(
18748
18828
  (v) => {
18749
18829
  if (typeof min === "number") v = Math.max(min, v);
18750
18830
  if (typeof max === "number") v = Math.min(max, v);
@@ -18769,6 +18849,8 @@ var NumberInput = forwardRef61(
18769
18849
  `ods-num--${size}`,
18770
18850
  disabled && "ods-num--disabled",
18771
18851
  error && "ods-num--error",
18852
+ hideControls && "ods-num--no-controls",
18853
+ resolvedAlign === "left" && "ods-num--align-left",
18772
18854
  wrapperClassName
18773
18855
  ),
18774
18856
  children: [
@@ -18782,7 +18864,7 @@ var NumberInput = forwardRef61(
18782
18864
  }
18783
18865
  ),
18784
18866
  /* @__PURE__ */ jsxs69("div", { className: "ods-num__field", children: [
18785
- /* @__PURE__ */ jsx71(
18867
+ !hideControls && /* @__PURE__ */ jsx71(
18786
18868
  "button",
18787
18869
  {
18788
18870
  type: "button",
@@ -18816,7 +18898,7 @@ var NumberInput = forwardRef61(
18816
18898
  }
18817
18899
  ),
18818
18900
  suffix && /* @__PURE__ */ jsx71("span", { className: "ods-num__suffix", "aria-hidden": "true", children: suffix }),
18819
- /* @__PURE__ */ jsx71(
18901
+ !hideControls && /* @__PURE__ */ jsx71(
18820
18902
  "button",
18821
18903
  {
18822
18904
  type: "button",
@@ -18848,7 +18930,7 @@ NumberInput.displayName = "NumberInput";
18848
18930
  // src/components/OTPInput/OTPInput.tsx
18849
18931
  import {
18850
18932
  forwardRef as forwardRef62,
18851
- useCallback as useCallback28,
18933
+ useCallback as useCallback29,
18852
18934
  useId as useId37,
18853
18935
  useImperativeHandle as useImperativeHandle10,
18854
18936
  useRef as useRef34
@@ -18895,7 +18977,7 @@ var OTPInput = forwardRef62(
18895
18977
  }),
18896
18978
  [value, length, onChange]
18897
18979
  );
18898
- const setCharAt = useCallback28(
18980
+ const setCharAt = useCallback29(
18899
18981
  (idx, ch) => {
18900
18982
  const cleaned = ch.replace(pattern, "").slice(0, 1);
18901
18983
  const chars = value.split("");
@@ -19036,10 +19118,10 @@ import {
19036
19118
  } from "@octaviaflow/icons";
19037
19119
  import {
19038
19120
  forwardRef as forwardRef63,
19039
- useCallback as useCallback29,
19121
+ useCallback as useCallback30,
19040
19122
  useId as useId38,
19041
19123
  useMemo as useMemo23,
19042
- useState as useState34
19124
+ useState as useState35
19043
19125
  } from "react";
19044
19126
  import { jsx as jsx74, jsxs as jsxs72 } from "react/jsx-runtime";
19045
19127
  function buildPageRange(totalPages, current, siblingCount, boundaryCount) {
@@ -19115,7 +19197,7 @@ var Pagination = forwardRef63(
19115
19197
  1,
19116
19198
  Math.ceil(Math.max(0, totalItems) / Math.max(1, pageSize))
19117
19199
  );
19118
- const [internalPage, setInternalPage] = useState34(
19200
+ const [internalPage, setInternalPage] = useState35(
19119
19201
  Math.min(Math.max(1, defaultPage), totalPages)
19120
19202
  );
19121
19203
  const isControlled = controlledPage !== void 0;
@@ -19123,7 +19205,7 @@ var Pagination = forwardRef63(
19123
19205
  totalPages,
19124
19206
  Math.max(1, isControlled ? controlledPage : internalPage)
19125
19207
  );
19126
- const goTo = useCallback29(
19208
+ const goTo = useCallback30(
19127
19209
  (next) => {
19128
19210
  const clamped = Math.min(totalPages, Math.max(1, next));
19129
19211
  if (clamped === currentPage) return;
@@ -19139,7 +19221,7 @@ var Pagination = forwardRef63(
19139
19221
  const from = totalItems === 0 ? 0 : (currentPage - 1) * pageSize + 1;
19140
19222
  const to = Math.min(totalItems, currentPage * pageSize);
19141
19223
  const totalContent = formatTotal ? formatTotal({ from, to, total: totalItems }) : `Showing ${from.toLocaleString()}\u2013${to.toLocaleString()} of ${totalItems.toLocaleString()}`;
19142
- const [jumpValue, setJumpValue] = useState34("");
19224
+ const [jumpValue, setJumpValue] = useState35("");
19143
19225
  const commitJump = (raw) => {
19144
19226
  const parsed = Number.parseInt(raw, 10);
19145
19227
  if (Number.isFinite(parsed)) goTo(parsed);
@@ -19323,7 +19405,7 @@ Pagination.displayName = "Pagination";
19323
19405
  import {
19324
19406
  forwardRef as forwardRef64,
19325
19407
  useId as useId39,
19326
- useState as useState35
19408
+ useState as useState36
19327
19409
  } from "react";
19328
19410
  import { CheckmarkIcon as CheckmarkIcon9, ViewIcon, ViewOffIcon } from "@octaviaflow/icons";
19329
19411
 
@@ -19400,7 +19482,7 @@ var PasswordInput = forwardRef64(
19400
19482
  const inputId = providedId ?? `ods-pwd-${reactId}`;
19401
19483
  const labelId = label ? `${inputId}-label` : void 0;
19402
19484
  const hintId = error || helperText ? `${inputId}-hint` : void 0;
19403
- const [shown, setShown] = useState35(false);
19485
+ const [shown, setShown] = useState36(false);
19404
19486
  const handle = (e) => onChange?.(e.target.value);
19405
19487
  const derived = usePasswordStrength(value, strengthRules ?? []);
19406
19488
  const ruleDriven = (strengthRules?.length ?? 0) > 0;
@@ -19542,11 +19624,11 @@ PasswordInput.displayName = "PasswordInput";
19542
19624
  // src/components/PhoneInput/PhoneInput.tsx
19543
19625
  import {
19544
19626
  forwardRef as forwardRef65,
19545
- useCallback as useCallback30,
19546
- useEffect as useEffect29,
19627
+ useCallback as useCallback31,
19628
+ useEffect as useEffect30,
19547
19629
  useId as useId40,
19548
19630
  useRef as useRef35,
19549
- useState as useState36
19631
+ useState as useState37
19550
19632
  } from "react";
19551
19633
  import { ChevronDownIcon as ChevronDownIcon7, SearchIcon as SearchIcon9 } from "@octaviaflow/icons";
19552
19634
  import { jsx as jsx76, jsxs as jsxs74 } from "react/jsx-runtime";
@@ -19590,9 +19672,9 @@ var PhoneInput = forwardRef65(
19590
19672
  const hintId = error || helperText ? `${baseId}-hint` : void 0;
19591
19673
  const listboxId = `${baseId}-listbox`;
19592
19674
  const countryBtnId = `${baseId}-country`;
19593
- const [open, setOpen] = useState36(false);
19594
- const [activeIdx, setActiveIdx] = useState36(0);
19595
- const [query, setQuery] = useState36("");
19675
+ const [open, setOpen] = useState37(false);
19676
+ const [activeIdx, setActiveIdx] = useState37(0);
19677
+ const [query, setQuery] = useState37("");
19596
19678
  const fieldRef = useRef35(null);
19597
19679
  const menuRef = useRef35(null);
19598
19680
  const listRef = useRef35(null);
@@ -19606,7 +19688,7 @@ var PhoneInput = forwardRef65(
19606
19688
  (c) => c.name.toLowerCase().includes(q2) || c.dialCode.includes(q2) || c.code.toLowerCase().includes(q2)
19607
19689
  );
19608
19690
  })();
19609
- useEffect29(() => {
19691
+ useEffect30(() => {
19610
19692
  if (!open) return;
19611
19693
  const onDocMouseDown = (e) => {
19612
19694
  const t = e.target;
@@ -19624,7 +19706,7 @@ var PhoneInput = forwardRef65(
19624
19706
  document.removeEventListener("keydown", onDocKey);
19625
19707
  };
19626
19708
  }, [open]);
19627
- useEffect29(() => {
19709
+ useEffect30(() => {
19628
19710
  if (!open) {
19629
19711
  setQuery("");
19630
19712
  return;
@@ -19632,10 +19714,10 @@ var PhoneInput = forwardRef65(
19632
19714
  const idx = countries.findIndex((c) => c.code === country.code);
19633
19715
  setActiveIdx(idx === -1 ? 0 : idx);
19634
19716
  }, [open, countries, country.code]);
19635
- useEffect29(() => {
19717
+ useEffect30(() => {
19636
19718
  setActiveIdx(0);
19637
19719
  }, [query]);
19638
- const handleTriggerKey = useCallback30(
19720
+ const handleTriggerKey = useCallback31(
19639
19721
  (e) => {
19640
19722
  if (disabled) return;
19641
19723
  if (e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") {
@@ -19645,7 +19727,7 @@ var PhoneInput = forwardRef65(
19645
19727
  },
19646
19728
  [disabled]
19647
19729
  );
19648
- const handleNavKey = useCallback30(
19730
+ const handleNavKey = useCallback31(
19649
19731
  (e) => {
19650
19732
  if (e.key === "ArrowDown") {
19651
19733
  e.preventDefault();
@@ -19672,7 +19754,7 @@ var PhoneInput = forwardRef65(
19672
19754
  },
19673
19755
  [filteredCountries, activeIdx, onCountryChange]
19674
19756
  );
19675
- useEffect29(() => {
19757
+ useEffect30(() => {
19676
19758
  if (!open) return;
19677
19759
  if (showSearch) searchRef.current?.focus();
19678
19760
  else listRef.current?.focus();
@@ -20536,8 +20618,8 @@ var PipelineCard = forwardRef66(
20536
20618
  PipelineCard.displayName = "PipelineCard";
20537
20619
 
20538
20620
  // src/components/Popover/Popover.tsx
20539
- import { useCallback as useCallback31, useEffect as useEffect30, useLayoutEffect as useLayoutEffect8, useRef as useRef36, useState as useState37 } from "react";
20540
- import { createPortal as createPortal12 } from "react-dom";
20621
+ import { useCallback as useCallback32, useEffect as useEffect31, useLayoutEffect as useLayoutEffect8, useRef as useRef36, useState as useState38 } from "react";
20622
+ import { createPortal as createPortal13 } from "react-dom";
20541
20623
  import { Fragment as Fragment34, jsx as jsx78, jsxs as jsxs76 } from "react/jsx-runtime";
20542
20624
  function computePosition4(rect, popRect, placement, offset) {
20543
20625
  const cx = rect.left + rect.width / 2;
@@ -20568,9 +20650,9 @@ function Popover({
20568
20650
  children,
20569
20651
  className
20570
20652
  }) {
20571
- const [openState, setOpenState] = useState37(defaultOpen);
20653
+ const [openState, setOpenState] = useState38(defaultOpen);
20572
20654
  const open = openProp ?? openState;
20573
- const setOpen = useCallback31(
20655
+ const setOpen = useCallback32(
20574
20656
  (v) => {
20575
20657
  if (openProp === void 0) setOpenState(v);
20576
20658
  onOpenChange?.(v);
@@ -20579,8 +20661,8 @@ function Popover({
20579
20661
  );
20580
20662
  const triggerRef = useRef36(null);
20581
20663
  const popRef = useRef36(null);
20582
- const [coords, setCoords] = useState37(null);
20583
- const reposition = useCallback31(() => {
20664
+ const [coords, setCoords] = useState38(null);
20665
+ const reposition = useCallback32(() => {
20584
20666
  if (!triggerRef.current || !popRef.current) return;
20585
20667
  const trigRect = triggerRef.current.getBoundingClientRect();
20586
20668
  const popRect = popRef.current.getBoundingClientRect();
@@ -20592,7 +20674,7 @@ function Popover({
20592
20674
  const id = requestAnimationFrame(reposition);
20593
20675
  return () => cancelAnimationFrame(id);
20594
20676
  }, [open, reposition, content]);
20595
- useEffect30(() => {
20677
+ useEffect31(() => {
20596
20678
  if (!open) return;
20597
20679
  const onScroll = () => reposition();
20598
20680
  window.addEventListener("scroll", onScroll, true);
@@ -20602,7 +20684,7 @@ function Popover({
20602
20684
  window.removeEventListener("resize", onScroll);
20603
20685
  };
20604
20686
  }, [open, reposition]);
20605
- useEffect30(() => {
20687
+ useEffect31(() => {
20606
20688
  if (!open || !closeOnClickOutside) return;
20607
20689
  const onDoc = (e) => {
20608
20690
  const t = e.target;
@@ -20613,7 +20695,7 @@ function Popover({
20613
20695
  document.addEventListener("mousedown", onDoc);
20614
20696
  return () => document.removeEventListener("mousedown", onDoc);
20615
20697
  }, [open, closeOnClickOutside, setOpen]);
20616
- useEffect30(() => {
20698
+ useEffect31(() => {
20617
20699
  if (!open || !closeOnEsc) return;
20618
20700
  const onKey = (e) => {
20619
20701
  if (e.key === "Escape") setOpen(false);
@@ -20634,7 +20716,7 @@ function Popover({
20634
20716
  children
20635
20717
  }
20636
20718
  );
20637
- const portal = typeof document !== "undefined" && open ? createPortal12(
20719
+ const portal = typeof document !== "undefined" && open ? createPortal13(
20638
20720
  /* @__PURE__ */ jsxs76(
20639
20721
  "div",
20640
20722
  {
@@ -21099,12 +21181,12 @@ ProgressRing.displayName = "ProgressRing";
21099
21181
  // src/components/PromptInput/PromptInput.tsx
21100
21182
  import {
21101
21183
  forwardRef as forwardRef71,
21102
- useCallback as useCallback32,
21103
- useEffect as useEffect31,
21184
+ useCallback as useCallback33,
21185
+ useEffect as useEffect32,
21104
21186
  useId as useId45,
21105
21187
  useImperativeHandle as useImperativeHandle11,
21106
21188
  useRef as useRef37,
21107
- useState as useState38
21189
+ useState as useState39
21108
21190
  } from "react";
21109
21191
  import {
21110
21192
  AttachmentIcon,
@@ -21156,14 +21238,14 @@ var PromptInput = forwardRef71(
21156
21238
  const suggestionsId = `${baseId}-suggestions`;
21157
21239
  const counterId = `${baseId}-counter`;
21158
21240
  const taRef = useRef37(null);
21159
- const [internal, setInternal] = useState38(defaultValue);
21241
+ const [internal, setInternal] = useState39(defaultValue);
21160
21242
  const v = value ?? internal;
21161
21243
  const isControlled = value !== void 0;
21162
- const [suggestionsOpen, setSuggestionsOpen] = useState38(false);
21163
- const [suggestionIndex, setSuggestionIndex] = useState38(0);
21164
- const [isDragOver, setIsDragOver] = useState38(false);
21165
- const [historyIdx, setHistoryIdx] = useState38(null);
21166
- const setValue = useCallback32(
21244
+ const [suggestionsOpen, setSuggestionsOpen] = useState39(false);
21245
+ const [suggestionIndex, setSuggestionIndex] = useState39(0);
21246
+ const [isDragOver, setIsDragOver] = useState39(false);
21247
+ const [historyIdx, setHistoryIdx] = useState39(null);
21248
+ const setValue = useCallback33(
21167
21249
  (next) => {
21168
21250
  if (!isControlled) setInternal(next);
21169
21251
  onChange?.(next);
@@ -21204,7 +21286,7 @@ var PromptInput = forwardRef71(
21204
21286
  // biome-ignore lint/correctness/useExhaustiveDependencies: handleSubmit closes over up-to-date locals each render.
21205
21287
  [v, setValue]
21206
21288
  );
21207
- useEffect31(() => {
21289
+ useEffect32(() => {
21208
21290
  const el = taRef.current;
21209
21291
  if (!el) return;
21210
21292
  const computed = window.getComputedStyle(el);
@@ -21961,7 +22043,7 @@ RangeSlider.displayName = "RangeSlider";
21961
22043
  // src/components/Rating/Rating.tsx
21962
22044
  import {
21963
22045
  forwardRef as forwardRef76,
21964
- useState as useState39
22046
+ useState as useState40
21965
22047
  } from "react";
21966
22048
  import {
21967
22049
  FavoriteFilledIcon,
@@ -21988,7 +22070,7 @@ var Rating = forwardRef76(function Rating2({
21988
22070
  "aria-label": ariaLabel,
21989
22071
  ...rest
21990
22072
  }, ref) {
21991
- const [hover, setHover] = useState39(null);
22073
+ const [hover, setHover] = useState40(null);
21992
22074
  const display = hover ?? value;
21993
22075
  const interactive = !readOnly && !disabled;
21994
22076
  const Empty = icon === "heart" ? FavoriteIcon : StarIcon2;
@@ -22216,11 +22298,11 @@ function BinaryButton({
22216
22298
  // src/components/Resizable/Resizable.tsx
22217
22299
  import {
22218
22300
  forwardRef as forwardRef78,
22219
- useCallback as useCallback33,
22220
- useEffect as useEffect32,
22301
+ useCallback as useCallback34,
22302
+ useEffect as useEffect33,
22221
22303
  useLayoutEffect as useLayoutEffect9,
22222
22304
  useRef as useRef40,
22223
- useState as useState40
22305
+ useState as useState41
22224
22306
  } from "react";
22225
22307
  import { jsx as jsx90, jsxs as jsxs88 } from "react/jsx-runtime";
22226
22308
  function setDragOverlay(direction) {
@@ -22254,9 +22336,9 @@ var Resizable = forwardRef78(
22254
22336
  }, ref) {
22255
22337
  const wrapRef = useRef40(null);
22256
22338
  const draggingRef = useRef40(false);
22257
- const [isDragging, setIsDragging] = useState40(false);
22258
- const [split, setSplit] = useState40(0);
22259
- const [total, setTotal] = useState40(0);
22339
+ const [isDragging, setIsDragging] = useState41(false);
22340
+ const [split, setSplit] = useState41(0);
22341
+ const [total, setTotal] = useState41(0);
22260
22342
  const setRef = (node) => {
22261
22343
  wrapRef.current = node;
22262
22344
  if (typeof ref === "function") ref(node);
@@ -22286,7 +22368,7 @@ var Resizable = forwardRef78(
22286
22368
  }
22287
22369
  setSplit(defaultSplit >= 1 ? defaultSplit : t * defaultSplit);
22288
22370
  }, []);
22289
- useEffect32(() => {
22371
+ useEffect33(() => {
22290
22372
  const el = wrapRef.current;
22291
22373
  if (!el || typeof ResizeObserver === "undefined") return;
22292
22374
  const ro = new ResizeObserver(() => {
@@ -22300,7 +22382,7 @@ var Resizable = forwardRef78(
22300
22382
  ro.observe(el);
22301
22383
  return () => ro.disconnect();
22302
22384
  }, [direction, minSecond]);
22303
- const persist = useCallback33(
22385
+ const persist = useCallback34(
22304
22386
  (next) => {
22305
22387
  onSplitChange?.(next);
22306
22388
  if (storageKey && typeof window !== "undefined" && total > 0) {
@@ -22319,7 +22401,7 @@ var Resizable = forwardRef78(
22319
22401
  setIsDragging(true);
22320
22402
  setDragOverlay(direction);
22321
22403
  };
22322
- useEffect32(() => {
22404
+ useEffect33(() => {
22323
22405
  const onMove = (e) => {
22324
22406
  if (!draggingRef.current) return;
22325
22407
  const el = wrapRef.current;
@@ -22448,10 +22530,10 @@ var ResizablePanel = forwardRef78(
22448
22530
  ...rest
22449
22531
  }, ref) {
22450
22532
  const isVertical = side === "bottom";
22451
- const [internal, setInternal] = useState40(sizeProp ?? defaultSize);
22533
+ const [internal, setInternal] = useState41(sizeProp ?? defaultSize);
22452
22534
  const size = sizeProp ?? internal;
22453
22535
  const draggingRef = useRef40(false);
22454
- const [isDragging, setIsDragging] = useState40(false);
22536
+ const [isDragging, setIsDragging] = useState41(false);
22455
22537
  const startRef = useRef40({ at: 0, size });
22456
22538
  const onPointerDown = (e) => {
22457
22539
  e.preventDefault();
@@ -22464,7 +22546,7 @@ var ResizablePanel = forwardRef78(
22464
22546
  };
22465
22547
  setDragOverlay(isVertical ? "vertical" : "horizontal");
22466
22548
  };
22467
- useEffect32(() => {
22549
+ useEffect33(() => {
22468
22550
  const onMove = (e) => {
22469
22551
  if (!draggingRef.current) return;
22470
22552
  const delta = (isVertical ? e.clientY : e.clientX) - startRef.current.at;
@@ -22636,8 +22718,8 @@ function SettingsRow({
22636
22718
 
22637
22719
  // src/components/Sheet/Sheet.tsx
22638
22720
  import { AnimatePresence as AnimatePresence18, motion as motion28 } from "framer-motion";
22639
- import { useEffect as useEffect33 } from "react";
22640
- import { createPortal as createPortal13 } from "react-dom";
22721
+ import { useEffect as useEffect34 } from "react";
22722
+ import { createPortal as createPortal14 } from "react-dom";
22641
22723
  import { Fragment as Fragment37, jsx as jsx94, jsxs as jsxs91 } from "react/jsx-runtime";
22642
22724
  var slideVariants = {
22643
22725
  top: { initial: { y: "-100%" }, animate: { y: 0 }, exit: { y: "-100%" } },
@@ -22671,7 +22753,7 @@ function Sheet({
22671
22753
  dragHandle = true,
22672
22754
  className
22673
22755
  }) {
22674
- useEffect33(() => {
22756
+ useEffect34(() => {
22675
22757
  if (!open || !closeOnEsc) return;
22676
22758
  const onKey = (e) => {
22677
22759
  if (e.key === "Escape") onClose();
@@ -22720,7 +22802,7 @@ function Sheet({
22720
22802
  )
22721
22803
  ] }) });
22722
22804
  if (typeof document === "undefined") return null;
22723
- return createPortal13(content, document.body);
22805
+ return createPortal14(content, document.body);
22724
22806
  }
22725
22807
 
22726
22808
  // src/components/Show/Show.tsx
@@ -22740,7 +22822,7 @@ function Show({ above, below, children, ...rest }) {
22740
22822
  Show.displayName = "Show";
22741
22823
 
22742
22824
  // src/components/Sidebar/Sidebar.tsx
22743
- import { useCallback as useCallback34, useEffect as useEffect34, useRef as useRef41, useState as useState41 } from "react";
22825
+ import { useCallback as useCallback35, useEffect as useEffect35, useRef as useRef41, useState as useState42 } from "react";
22744
22826
  import { Fragment as Fragment38, jsx as jsx96, jsxs as jsxs92 } from "react/jsx-runtime";
22745
22827
  function Sidebar({
22746
22828
  variant = "expanded",
@@ -22760,8 +22842,8 @@ function Sidebar({
22760
22842
  className
22761
22843
  }) {
22762
22844
  const allSections = sections ?? (items ? [{ items }] : []);
22763
- const [internalPinned, setInternalPinned] = useState41(defaultPinned);
22764
- useEffect34(() => {
22845
+ const [internalPinned, setInternalPinned] = useState42(defaultPinned);
22846
+ useEffect35(() => {
22765
22847
  if (pinnedProp !== void 0) return;
22766
22848
  try {
22767
22849
  const stored = window.localStorage.getItem(pinStorageKey);
@@ -22772,7 +22854,7 @@ function Sidebar({
22772
22854
  }
22773
22855
  }, []);
22774
22856
  const pinned = pinnedProp ?? internalPinned;
22775
- const setPinned = useCallback34(
22857
+ const setPinned = useCallback35(
22776
22858
  (p) => {
22777
22859
  if (pinnedProp === void 0) setInternalPinned(p);
22778
22860
  try {
@@ -22783,7 +22865,7 @@ function Sidebar({
22783
22865
  },
22784
22866
  [pinnedProp, pinStorageKey, onPinnedChange]
22785
22867
  );
22786
- const [hoverOpen, setHoverOpen] = useState41(false);
22868
+ const [hoverOpen, setHoverOpen] = useState42(false);
22787
22869
  const openTimer = useRef41(null);
22788
22870
  const closeTimer = useRef41(null);
22789
22871
  const clearTimers = () => {
@@ -22796,7 +22878,7 @@ function Sidebar({
22796
22878
  closeTimer.current = null;
22797
22879
  }
22798
22880
  };
22799
- useEffect34(() => () => clearTimers(), []);
22881
+ useEffect35(() => () => clearTimers(), []);
22800
22882
  const handleEnter = () => {
22801
22883
  clearTimers();
22802
22884
  openTimer.current = setTimeout(() => setHoverOpen(true), hoverOpenDelay);
@@ -22808,7 +22890,7 @@ function Sidebar({
22808
22890
  const autoMode = variant === "auto";
22809
22891
  const showAsRail = autoMode ? !pinned : variant === "rail";
22810
22892
  const overlayOpen = autoMode && !pinned && hoverOpen;
22811
- useEffect34(() => {
22893
+ useEffect35(() => {
22812
22894
  if (!overlayOpen) return;
22813
22895
  const handler = (e) => {
22814
22896
  if (e.key === "Escape") {
@@ -22942,7 +23024,7 @@ function RailItem({
22942
23024
  tooltipDelay,
22943
23025
  suppressTooltip
22944
23026
  }) {
22945
- const [open, setOpen] = useState41(false);
23027
+ const [open, setOpen] = useState42(false);
22946
23028
  const timerRef = useRef41(null);
22947
23029
  const hasChildren = !!(item.children && item.children.length > 0);
22948
23030
  const clear = () => {
@@ -22951,7 +23033,7 @@ function RailItem({
22951
23033
  timerRef.current = null;
22952
23034
  }
22953
23035
  };
22954
- useEffect34(() => () => clear(), []);
23036
+ useEffect35(() => () => clear(), []);
22955
23037
  const show = () => {
22956
23038
  if (suppressTooltip) return;
22957
23039
  clear();
@@ -23095,7 +23177,7 @@ function SidebarToggleIcon({ collapsed }) {
23095
23177
  }
23096
23178
  function ExpandedItem({ item, level }) {
23097
23179
  const hasChildren = !!(item.children && item.children.length > 0);
23098
- const [open, setOpen] = useState41(
23180
+ const [open, setOpen] = useState42(
23099
23181
  item.defaultExpanded ?? (hasChildren && hasActiveDescendant(item))
23100
23182
  );
23101
23183
  if (hasChildren) {
@@ -23355,7 +23437,7 @@ SkeletonGroup.displayName = "SkeletonGroup";
23355
23437
  import { AnimatePresence as AnimatePresence19, motion as motion29 } from "framer-motion";
23356
23438
  import { useRef as useRef42 } from "react";
23357
23439
  import { FocusScope as FocusScope2, OverlayProvider as OverlayProvider2, useDialog as useDialog2, useModal as useModal2, useOverlay as useOverlay2 } from "react-aria";
23358
- import { createPortal as createPortal14 } from "react-dom";
23440
+ import { createPortal as createPortal15 } from "react-dom";
23359
23441
  import { Fragment as Fragment39, jsx as jsx98, jsxs as jsxs93 } from "react/jsx-runtime";
23360
23442
  var slideVariants2 = {
23361
23443
  left: {
@@ -23447,7 +23529,7 @@ function SlideoutContent({
23447
23529
  }
23448
23530
  function SlideoutPanel(props) {
23449
23531
  if (typeof document === "undefined") return null;
23450
- return createPortal14(
23532
+ return createPortal15(
23451
23533
  /* @__PURE__ */ jsx98(OverlayProvider2, { children: /* @__PURE__ */ jsx98(SlideoutContent, { ...props }) }),
23452
23534
  document.body
23453
23535
  );
@@ -23700,10 +23782,10 @@ SocialButton.displayName = "SocialButton";
23700
23782
  // src/components/Sortable/Sortable.tsx
23701
23783
  import {
23702
23784
  forwardRef as forwardRef84,
23703
- useCallback as useCallback35,
23704
- useEffect as useEffect35,
23785
+ useCallback as useCallback36,
23786
+ useEffect as useEffect36,
23705
23787
  useRef as useRef43,
23706
- useState as useState42
23788
+ useState as useState43
23707
23789
  } from "react";
23708
23790
  import { DraggableIcon } from "@octaviaflow/icons";
23709
23791
  import { jsx as jsx101, jsxs as jsxs96 } from "react/jsx-runtime";
@@ -23723,11 +23805,11 @@ function Sortable({
23723
23805
  const itemRefs = useRef43(/* @__PURE__ */ new Map());
23724
23806
  const originalOrderRef = useRef43(null);
23725
23807
  const scrollTimerRef = useRef43(null);
23726
- const [draggingId, setDraggingId] = useState42(null);
23727
- const [dropPos, setDropPos] = useState42(null);
23728
- const [kbActiveId, setKbActiveId] = useState42(null);
23808
+ const [draggingId, setDraggingId] = useState43(null);
23809
+ const [dropPos, setDropPos] = useState43(null);
23810
+ const [kbActiveId, setKbActiveId] = useState43(null);
23729
23811
  const isVertical = direction === "vertical";
23730
- const onDragStart = useCallback35(
23812
+ const onDragStart = useCallback36(
23731
23813
  (id) => (e) => {
23732
23814
  if (disabled) return;
23733
23815
  e.dataTransfer.effectAllowed = "move";
@@ -23738,7 +23820,7 @@ function Sortable({
23738
23820
  },
23739
23821
  [disabled, items]
23740
23822
  );
23741
- const cancelDrag = useCallback35(() => {
23823
+ const cancelDrag = useCallback36(() => {
23742
23824
  setDraggingId(null);
23743
23825
  setDropPos(null);
23744
23826
  originalOrderRef.current = null;
@@ -23747,7 +23829,7 @@ function Sortable({
23747
23829
  scrollTimerRef.current = null;
23748
23830
  }
23749
23831
  }, []);
23750
- const onDragEnd = useCallback35(() => {
23832
+ const onDragEnd = useCallback36(() => {
23751
23833
  cancelDrag();
23752
23834
  }, [cancelDrag]);
23753
23835
  const onItemDragOver = (id) => (e) => {
@@ -23772,7 +23854,7 @@ function Sortable({
23772
23854
  if (sourceId === target.id) return;
23773
23855
  commitMove(sourceId, target.id, target.edge);
23774
23856
  };
23775
- const commitMove = useCallback35(
23857
+ const commitMove = useCallback36(
23776
23858
  (sourceId, targetId, edge) => {
23777
23859
  const from = items.findIndex((i) => i.id === sourceId);
23778
23860
  let to = items.findIndex((i) => i.id === targetId);
@@ -23786,7 +23868,7 @@ function Sortable({
23786
23868
  },
23787
23869
  [items, onChange]
23788
23870
  );
23789
- useEffect35(() => {
23871
+ useEffect36(() => {
23790
23872
  if (!autoScroll || !draggingId) return;
23791
23873
  const container = containerRef.current;
23792
23874
  if (!container) return;
@@ -23836,7 +23918,7 @@ function Sortable({
23836
23918
  }
23837
23919
  };
23838
23920
  }, [autoScroll, autoScrollEdge, draggingId, isVertical]);
23839
- useEffect35(() => {
23921
+ useEffect36(() => {
23840
23922
  if (!draggingId) return;
23841
23923
  const onKey = (e) => {
23842
23924
  if (e.key === "Escape") cancelDrag();
@@ -24080,13 +24162,13 @@ VStack.displayName = "VStack";
24080
24162
  import { AnimatePresence as AnimatePresence20, motion as motion30, useReducedMotion as useReducedMotion13 } from "framer-motion";
24081
24163
  import {
24082
24164
  forwardRef as forwardRef86,
24083
- useCallback as useCallback36,
24084
- useEffect as useEffect36,
24165
+ useCallback as useCallback37,
24166
+ useEffect as useEffect37,
24085
24167
  useLayoutEffect as useLayoutEffect10,
24086
24168
  useMemo as useMemo25,
24087
- useState as useState43
24169
+ useState as useState44
24088
24170
  } from "react";
24089
- import { createPortal as createPortal15 } from "react-dom";
24171
+ import { createPortal as createPortal16 } from "react-dom";
24090
24172
  import { jsx as jsx103, jsxs as jsxs97 } from "react/jsx-runtime";
24091
24173
  var Spotlight = forwardRef86(
24092
24174
  function Spotlight2({
@@ -24105,8 +24187,8 @@ var Spotlight = forwardRef86(
24105
24187
  ...rest
24106
24188
  }, ref) {
24107
24189
  const reducedMotion = useReducedMotion13();
24108
- const [rect, setRect] = useState43(null);
24109
- const [viewport, setViewport] = useState43(() => ({
24190
+ const [rect, setRect] = useState44(null);
24191
+ const [viewport, setViewport] = useState44(() => ({
24110
24192
  width: typeof window !== "undefined" ? window.innerWidth : 0,
24111
24193
  height: typeof window !== "undefined" ? window.innerHeight : 0
24112
24194
  }));
@@ -24114,7 +24196,7 @@ var Spotlight = forwardRef86(
24114
24196
  () => `ods-spotlight-${Math.random().toString(36).slice(2, 9)}`,
24115
24197
  []
24116
24198
  );
24117
- const measure = useCallback36(() => {
24199
+ const measure = useCallback37(() => {
24118
24200
  if (!open) return;
24119
24201
  const el = target.current;
24120
24202
  if (!el) return;
@@ -24127,7 +24209,7 @@ var Spotlight = forwardRef86(
24127
24209
  useLayoutEffect10(() => {
24128
24210
  measure();
24129
24211
  }, [measure]);
24130
- useEffect36(() => {
24212
+ useEffect37(() => {
24131
24213
  if (!open) return;
24132
24214
  const handler = () => measure();
24133
24215
  window.addEventListener("resize", handler);
@@ -24137,7 +24219,7 @@ var Spotlight = forwardRef86(
24137
24219
  window.removeEventListener("scroll", handler, true);
24138
24220
  };
24139
24221
  }, [open, measure]);
24140
- useEffect36(() => {
24222
+ useEffect37(() => {
24141
24223
  if (!open || !onDismiss) return;
24142
24224
  const onKey = (e) => {
24143
24225
  if (e.key === "Escape") onDismiss();
@@ -24153,7 +24235,7 @@ var Spotlight = forwardRef86(
24153
24235
  width: rect.width + padding * 2,
24154
24236
  height: rect.height + padding * 2
24155
24237
  } : null;
24156
- return createPortal15(
24238
+ return createPortal16(
24157
24239
  /* @__PURE__ */ jsx103(AnimatePresence20, { children: open && /* @__PURE__ */ jsxs97(
24158
24240
  motion30.div,
24159
24241
  {
@@ -24285,10 +24367,10 @@ Stat.displayName = "Stat";
24285
24367
  import { motion as motion31 } from "framer-motion";
24286
24368
  import {
24287
24369
  forwardRef as forwardRef88,
24288
- useCallback as useCallback37,
24370
+ useCallback as useCallback38,
24289
24371
  useId as useId49,
24290
24372
  useMemo as useMemo26,
24291
- useState as useState44
24373
+ useState as useState45
24292
24374
  } from "react";
24293
24375
  import { jsx as jsx105, jsxs as jsxs99 } from "react/jsx-runtime";
24294
24376
  var STATUS_COLORS = {
@@ -24329,8 +24411,8 @@ var StatusTiles = forwardRef88(
24329
24411
  () => max < data.length ? data.slice(data.length - max) : data,
24330
24412
  [data, max]
24331
24413
  );
24332
- const [hoveredIdx, setHoveredIdx] = useState44(null);
24333
- const fire = useCallback37(
24414
+ const [hoveredIdx, setHoveredIdx] = useState45(null);
24415
+ const fire = useCallback38(
24334
24416
  (idx) => {
24335
24417
  setHoveredIdx(idx);
24336
24418
  if (idx === null) {
@@ -24342,7 +24424,7 @@ var StatusTiles = forwardRef88(
24342
24424
  },
24343
24425
  [onTileHover, visible]
24344
24426
  );
24345
- const handleKey = useCallback37(
24427
+ const handleKey = useCallback38(
24346
24428
  (e, idx) => {
24347
24429
  if (!onTileClick) return;
24348
24430
  if (e.key === "Enter" || e.key === " ") {
@@ -24605,10 +24687,10 @@ Stepper.displayName = "Stepper";
24605
24687
  import { motion as motion32 } from "framer-motion";
24606
24688
  import {
24607
24689
  forwardRef as forwardRef90,
24608
- useCallback as useCallback38,
24690
+ useCallback as useCallback39,
24609
24691
  useId as useId51,
24610
24692
  useMemo as useMemo27,
24611
- useState as useState45
24693
+ useState as useState46
24612
24694
  } from "react";
24613
24695
  import { jsx as jsx107, jsxs as jsxs101 } from "react/jsx-runtime";
24614
24696
  var defaultFormat7 = (n) => {
@@ -24803,23 +24885,23 @@ var Sankey = forwardRef90(function Sankey2({
24803
24885
  }
24804
24886
  return out;
24805
24887
  }, [links, layoutNodes, nodeWidth, scale]);
24806
- const [hoveredNode, setHoveredNode] = useState45(null);
24807
- const [hoveredLink, setHoveredLink] = useState45(null);
24808
- const fireNode = useCallback38(
24888
+ const [hoveredNode, setHoveredNode] = useState46(null);
24889
+ const [hoveredLink, setHoveredLink] = useState46(null);
24890
+ const fireNode = useCallback39(
24809
24891
  (n) => {
24810
24892
  setHoveredNode(n);
24811
24893
  onNodeHover?.(n);
24812
24894
  },
24813
24895
  [onNodeHover]
24814
24896
  );
24815
- const fireLink = useCallback38(
24897
+ const fireLink = useCallback39(
24816
24898
  (l) => {
24817
24899
  setHoveredLink(l);
24818
24900
  onLinkHover?.(l);
24819
24901
  },
24820
24902
  [onLinkHover]
24821
24903
  );
24822
- const handleNodeKey = useCallback38(
24904
+ const handleNodeKey = useCallback39(
24823
24905
  (e, n) => {
24824
24906
  if (!onNodeClick) return;
24825
24907
  if (e.key === "Enter" || e.key === " ") {
@@ -25057,8 +25139,8 @@ Switch.displayName = "Switch";
25057
25139
  // src/components/Table/Table.tsx
25058
25140
  import {
25059
25141
  forwardRef as forwardRef92,
25060
- useCallback as useCallback39,
25061
- useState as useState46
25142
+ useCallback as useCallback40,
25143
+ useState as useState47
25062
25144
  } from "react";
25063
25145
  import {
25064
25146
  CaretDownIcon as CaretDownIcon2,
@@ -25084,7 +25166,7 @@ function TableInner({
25084
25166
  "aria-label": ariaLabel = "Data table",
25085
25167
  ...rest
25086
25168
  }, ref) {
25087
- const handleSort = useCallback39(
25169
+ const handleSort = useCallback40(
25088
25170
  (key) => {
25089
25171
  if (!onSort) return;
25090
25172
  const col = columns.find((c) => c.key === key);
@@ -25094,7 +25176,7 @@ function TableInner({
25094
25176
  },
25095
25177
  [columns, onSort, sortKey, sortDirection]
25096
25178
  );
25097
- const handleSelectAll = useCallback39(() => {
25179
+ const handleSelectAll = useCallback40(() => {
25098
25180
  if (!onSelectionChange) return;
25099
25181
  const allSelected = selectedRows?.size === data.length;
25100
25182
  if (allSelected) {
@@ -25103,7 +25185,7 @@ function TableInner({
25103
25185
  onSelectionChange(new Set(data.map((_, i) => i)));
25104
25186
  }
25105
25187
  }, [data, onSelectionChange, selectedRows]);
25106
- const handleSelectRow = useCallback39(
25188
+ const handleSelectRow = useCallback40(
25107
25189
  (index) => {
25108
25190
  if (!onSelectionChange || !selectedRows) return;
25109
25191
  const next = new Set(selectedRows);
@@ -25199,7 +25281,7 @@ function TableRow({
25199
25281
  totalCols
25200
25282
  }) {
25201
25283
  const isSelected = selectedRows?.has(rowIndex) ?? false;
25202
- const [expanded, setExpanded] = useState46(false);
25284
+ const [expanded, setExpanded] = useState47(false);
25203
25285
  return /* @__PURE__ */ jsxs103(Fragment41, { children: [
25204
25286
  /* @__PURE__ */ jsxs103(
25205
25287
  "tr",
@@ -25237,7 +25319,7 @@ function TableRow({
25237
25319
 
25238
25320
  // src/components/Tabs/Tabs.tsx
25239
25321
  import { motion as motion33 } from "framer-motion";
25240
- import { useCallback as useCallback40, useEffect as useEffect37, useId as useId52, useMemo as useMemo28, useRef as useRef45, useState as useState47 } from "react";
25322
+ import { useCallback as useCallback41, useEffect as useEffect38, useId as useId52, useMemo as useMemo28, useRef as useRef45, useState as useState48 } from "react";
25241
25323
  import { useTab, useTabList, useTabPanel } from "react-aria";
25242
25324
  import { jsx as jsx110, jsxs as jsxs104 } from "react/jsx-runtime";
25243
25325
  function TabButton({
@@ -25291,7 +25373,7 @@ function Tabs({
25291
25373
  }) {
25292
25374
  const reactId = useId52();
25293
25375
  const indicatorLayoutId = `ods-tabs-indicator-${reactId}`;
25294
- const [internalValue, setInternalValue] = useState47(defaultValue || items[0]?.value);
25376
+ const [internalValue, setInternalValue] = useState48(defaultValue || items[0]?.value);
25295
25377
  const selectedKey = value ?? internalValue;
25296
25378
  const handleSelectionChange = (key) => {
25297
25379
  const keyStr = String(key);
@@ -25318,9 +25400,9 @@ function Tabs({
25318
25400
  const ref = useRef45(null);
25319
25401
  const { tabListProps } = useTabList({ ...stateProps, orientation }, state, ref);
25320
25402
  const scrollContainerRef = useRef45(null);
25321
- const [canScrollLeft, setCanScrollLeft] = useState47(false);
25322
- const [canScrollRight, setCanScrollRight] = useState47(false);
25323
- const measureOverflow = useCallback40(() => {
25403
+ const [canScrollLeft, setCanScrollLeft] = useState48(false);
25404
+ const [canScrollRight, setCanScrollRight] = useState48(false);
25405
+ const measureOverflow = useCallback41(() => {
25324
25406
  const el = scrollContainerRef.current;
25325
25407
  if (!el || orientation !== "horizontal") {
25326
25408
  setCanScrollLeft(false);
@@ -25331,7 +25413,7 @@ function Tabs({
25331
25413
  setCanScrollLeft(el.scrollLeft > SCROLL_EDGE_EPSILON);
25332
25414
  setCanScrollRight(el.scrollLeft < max - SCROLL_EDGE_EPSILON);
25333
25415
  }, [orientation]);
25334
- useEffect37(() => {
25416
+ useEffect38(() => {
25335
25417
  measureOverflow();
25336
25418
  const el = scrollContainerRef.current;
25337
25419
  if (!el || typeof ResizeObserver === "undefined") return;
@@ -25414,7 +25496,7 @@ function ChevronSvg({ dir }) {
25414
25496
  import {
25415
25497
  forwardRef as forwardRef93,
25416
25498
  useId as useId53,
25417
- useState as useState48
25499
+ useState as useState49
25418
25500
  } from "react";
25419
25501
  import { CloseIcon as CloseIcon14 } from "@octaviaflow/icons";
25420
25502
  import { jsx as jsx111, jsxs as jsxs105 } from "react/jsx-runtime";
@@ -25439,7 +25521,7 @@ var TagsInput = forwardRef93(
25439
25521
  "aria-describedby": consumerDescribedBy,
25440
25522
  ...rest
25441
25523
  }, ref) {
25442
- const [draft, setDraft] = useState48("");
25524
+ const [draft, setDraft] = useState49("");
25443
25525
  const reactId = useId53();
25444
25526
  const inputId = providedId ?? `ods-tags-${reactId}`;
25445
25527
  const labelId = label ? `${inputId}-label` : void 0;
@@ -25887,22 +25969,22 @@ TestimonialCard.displayName = "TestimonialCard";
25887
25969
  // src/components/Textarea/Textarea.tsx
25888
25970
  import {
25889
25971
  forwardRef as forwardRef96,
25890
- useEffect as useEffect40,
25972
+ useEffect as useEffect41,
25891
25973
  useId as useId56,
25892
25974
  useRef as useRef48,
25893
- useState as useState51
25975
+ useState as useState52
25894
25976
  } from "react";
25895
25977
  import { useTextField } from "react-aria";
25896
- import { createPortal as createPortal16 } from "react-dom";
25978
+ import { createPortal as createPortal17 } from "react-dom";
25897
25979
  import { CopyIcon as CopyIcon5, CutIcon } from "@octaviaflow/icons";
25898
25980
 
25899
25981
  // src/hooks/useTextareaCommands.ts
25900
25982
  import {
25901
- useCallback as useCallback41,
25902
- useEffect as useEffect38,
25983
+ useCallback as useCallback42,
25984
+ useEffect as useEffect39,
25903
25985
  useMemo as useMemo29,
25904
25986
  useRef as useRef46,
25905
- useState as useState49
25987
+ useState as useState50
25906
25988
  } from "react";
25907
25989
  function findOpenTrigger(value, caret, trigger) {
25908
25990
  let i = caret - 1;
@@ -25981,11 +26063,11 @@ function useTextareaCommands({
25981
26063
  openOnEmptyTrigger = true,
25982
26064
  maxItems = 8
25983
26065
  }) {
25984
- const [isOpen, setIsOpen] = useState49(false);
25985
- const [query, setQuery] = useState49("");
25986
- const [activeIndex, setActiveIndex] = useState49(0);
25987
- const [triggerIndex, setTriggerIndex] = useState49(null);
25988
- const [caretRect, setCaretRect] = useState49(null);
26066
+ const [isOpen, setIsOpen] = useState50(false);
26067
+ const [query, setQuery] = useState50("");
26068
+ const [activeIndex, setActiveIndex] = useState50(0);
26069
+ const [triggerIndex, setTriggerIndex] = useState50(null);
26070
+ const [caretRect, setCaretRect] = useState50(null);
25989
26071
  const dismissedAtRef = useRef46(
25990
26072
  null
25991
26073
  );
@@ -26002,7 +26084,7 @@ function useTextareaCommands({
26002
26084
  return hay.includes(q2);
26003
26085
  }).slice(0, maxItems);
26004
26086
  }, [commands, query, maxItems]);
26005
- useEffect38(() => {
26087
+ useEffect39(() => {
26006
26088
  const ta = textareaRef.current;
26007
26089
  if (!ta) return;
26008
26090
  const caret = ta.selectionStart ?? 0;
@@ -26025,7 +26107,7 @@ function useTextareaCommands({
26025
26107
  setCaretRect(getCaretRect(ta, caret));
26026
26108
  }
26027
26109
  }, [value, trigger, openOnEmptyTrigger, isOpen, textareaRef]);
26028
- const commit = useCallback41(
26110
+ const commit = useCallback42(
26029
26111
  (cmd) => {
26030
26112
  const ta = textareaRef.current;
26031
26113
  if (!ta || triggerIndex == null) return;
@@ -26049,7 +26131,7 @@ function useTextareaCommands({
26049
26131
  },
26050
26132
  [textareaRef, triggerIndex, query, value, onChange]
26051
26133
  );
26052
- const dismiss = useCallback41(() => {
26134
+ const dismiss = useCallback42(() => {
26053
26135
  const ta = textareaRef.current;
26054
26136
  dismissedAtRef.current = {
26055
26137
  value,
@@ -26058,7 +26140,7 @@ function useTextareaCommands({
26058
26140
  setIsOpen(false);
26059
26141
  setTriggerIndex(null);
26060
26142
  }, [textareaRef, value]);
26061
- const onKeyDown = useCallback41(
26143
+ const onKeyDown = useCallback42(
26062
26144
  (e) => {
26063
26145
  if (!isOpen) return false;
26064
26146
  if (e.key === "ArrowDown") {
@@ -26101,7 +26183,7 @@ function useTextareaCommands({
26101
26183
  }
26102
26184
 
26103
26185
  // src/hooks/useTextareaSelection.ts
26104
- import { useCallback as useCallback42, useEffect as useEffect39, useState as useState50 } from "react";
26186
+ import { useCallback as useCallback43, useEffect as useEffect40, useState as useState51 } from "react";
26105
26187
  function getSelectionRect(textarea, start, end) {
26106
26188
  if (typeof document === "undefined") return null;
26107
26189
  if (start === end) return null;
@@ -26163,10 +26245,10 @@ function useTextareaSelection({
26163
26245
  value,
26164
26246
  onChange
26165
26247
  }) {
26166
- const [start, setStart] = useState50(0);
26167
- const [end, setEnd] = useState50(0);
26168
- const [rect, setRect] = useState50(null);
26169
- useEffect39(() => {
26248
+ const [start, setStart] = useState51(0);
26249
+ const [end, setEnd] = useState51(0);
26250
+ const [rect, setRect] = useState51(null);
26251
+ useEffect40(() => {
26170
26252
  if (typeof document === "undefined") return;
26171
26253
  const handler = () => {
26172
26254
  const ta = textareaRef.current;
@@ -26187,7 +26269,7 @@ function useTextareaSelection({
26187
26269
  }, [textareaRef]);
26188
26270
  const active = start !== end;
26189
26271
  const text = active ? value.slice(start, end) : "";
26190
- const writeToClipboard = useCallback42(
26272
+ const writeToClipboard = useCallback43(
26191
26273
  async (str) => {
26192
26274
  try {
26193
26275
  if (typeof navigator !== "undefined" && navigator.clipboard?.writeText) {
@@ -26212,11 +26294,11 @@ function useTextareaSelection({
26212
26294
  },
26213
26295
  []
26214
26296
  );
26215
- const copy = useCallback42(async () => {
26297
+ const copy = useCallback43(async () => {
26216
26298
  if (!active) return false;
26217
26299
  return writeToClipboard(text);
26218
26300
  }, [active, text, writeToClipboard]);
26219
- const replace = useCallback42(
26301
+ const replace = useCallback43(
26220
26302
  (str) => {
26221
26303
  const ta = textareaRef.current;
26222
26304
  if (!ta) return;
@@ -26230,13 +26312,13 @@ function useTextareaSelection({
26230
26312
  },
26231
26313
  [textareaRef, value, start, end, onChange]
26232
26314
  );
26233
- const cut = useCallback42(async () => {
26315
+ const cut = useCallback43(async () => {
26234
26316
  if (!active) return false;
26235
26317
  const ok = await writeToClipboard(text);
26236
26318
  if (ok) replace("");
26237
26319
  return ok;
26238
26320
  }, [active, text, writeToClipboard, replace]);
26239
- const wrap = useCallback42(
26321
+ const wrap = useCallback43(
26240
26322
  (open, close) => {
26241
26323
  const ta = textareaRef.current;
26242
26324
  if (!ta) return;
@@ -26282,7 +26364,7 @@ import {
26282
26364
  TextStrikethroughIcon,
26283
26365
  UndoIcon as UndoIcon2
26284
26366
  } from "@octaviaflow/icons";
26285
- import { useCallback as useCallback43, useMemo as useMemo30, useRef as useRef47 } from "react";
26367
+ import { useCallback as useCallback44, useMemo as useMemo30, useRef as useRef47 } from "react";
26286
26368
  import { jsx as jsx114 } from "react/jsx-runtime";
26287
26369
  function useTextareaTools({
26288
26370
  textareaRef,
@@ -26394,7 +26476,7 @@ function useTextareaTools({
26394
26476
  () => tools.filter((t) => t.isVisible ? t.isVisible(helpers) : true),
26395
26477
  [tools, helpers]
26396
26478
  );
26397
- const runTool = useCallback43(
26479
+ const runTool = useCallback44(
26398
26480
  async (id) => {
26399
26481
  const tool = tools.find((t) => t.id === id);
26400
26482
  if (!tool || tool.kind === "divider") return;
@@ -26542,7 +26624,7 @@ var Textarea = forwardRef96(
26542
26624
  const reactId = useId56();
26543
26625
  const baseId = providedId ?? `ods-textarea-${reactId}`;
26544
26626
  const hintId = error && errorMessage || helperText ? `${baseId}-hint` : void 0;
26545
- const [charCount, setCharCount] = useState51(
26627
+ const [charCount, setCharCount] = useState52(
26546
26628
  () => String(value ?? defaultValue ?? "").length
26547
26629
  );
26548
26630
  const ariaNameProps = resolveAccessibleName({
@@ -26572,10 +26654,10 @@ var Textarea = forwardRef96(
26572
26654
  setCharCount(e.target.value.length);
26573
26655
  onChange?.(e);
26574
26656
  };
26575
- const [liveValue, setLiveValue] = useState51(
26657
+ const [liveValue, setLiveValue] = useState52(
26576
26658
  String(value ?? defaultValue ?? "")
26577
26659
  );
26578
- useEffect40(() => {
26660
+ useEffect41(() => {
26579
26661
  if (value != null) setLiveValue(String(value));
26580
26662
  }, [value]);
26581
26663
  const handleChangeWithMirror = (e) => {
@@ -26618,7 +26700,7 @@ var Textarea = forwardRef96(
26618
26700
  }
26619
26701
  props.onKeyDown?.(e);
26620
26702
  };
26621
- useEffect40(() => {
26703
+ useEffect41(() => {
26622
26704
  if (!autoResize) return;
26623
26705
  const el = innerRef.current;
26624
26706
  if (!el) return;
@@ -26703,7 +26785,7 @@ var Textarea = forwardRef96(
26703
26785
  "aria-activedescendant": cmdEnabled && cmdPalette.isOpen && cmdPalette.items[cmdPalette.activeIndex] ? `${baseId}-cmd-${cmdPalette.items[cmdPalette.activeIndex].id}` : void 0
26704
26786
  }
26705
26787
  ),
26706
- cmdEnabled && cmdPalette.isOpen && cmdPalette.items.length > 0 && typeof document !== "undefined" && createPortal16(
26788
+ cmdEnabled && cmdPalette.isOpen && cmdPalette.items.length > 0 && typeof document !== "undefined" && createPortal17(
26707
26789
  /* @__PURE__ */ jsx115(
26708
26790
  "ul",
26709
26791
  {
@@ -26746,7 +26828,7 @@ var Textarea = forwardRef96(
26746
26828
  ),
26747
26829
  document.body
26748
26830
  ),
26749
- selectionToolbar && sel.active && sel.rect && typeof document !== "undefined" && createPortal16(
26831
+ selectionToolbar && sel.active && sel.rect && typeof document !== "undefined" && createPortal17(
26750
26832
  /* @__PURE__ */ jsxs108(
26751
26833
  "div",
26752
26834
  {
@@ -26959,12 +27041,13 @@ Timeline.displayName = "Timeline";
26959
27041
  import {
26960
27042
  forwardRef as forwardRef98,
26961
27043
  Fragment as Fragment43,
26962
- useCallback as useCallback44,
26963
- useEffect as useEffect41,
27044
+ useCallback as useCallback45,
27045
+ useEffect as useEffect42,
26964
27046
  useId as useId57,
26965
27047
  useRef as useRef49,
26966
- useState as useState52
27048
+ useState as useState53
26967
27049
  } from "react";
27050
+ import { createPortal as createPortal18 } from "react-dom";
26968
27051
  import {
26969
27052
  CaretDownIcon as CaretDownIcon3,
26970
27053
  CaretUpIcon as CaretUpIcon3,
@@ -27009,14 +27092,14 @@ var TimePicker = forwardRef98(
27009
27092
  const labelId = label ? `${baseId}-label` : void 0;
27010
27093
  const hintId = error || helperText ? `${baseId}-hint` : void 0;
27011
27094
  const describedBy = [consumerDescribedBy, hintId].filter(Boolean).join(" ") || void 0;
27012
- const [open, setOpen] = useState52(false);
27013
- const [activeSeg, setActiveSeg] = useState52(null);
27095
+ const [open, setOpen] = useState53(false);
27096
+ const [activeSeg, setActiveSeg] = useState53(null);
27014
27097
  const COMMIT_TIMEOUT_MS = 1500;
27015
- const [draft, setDraft] = useState52(
27098
+ const [draft, setDraft] = useState53(
27016
27099
  null
27017
27100
  );
27018
27101
  const draftRef = useRef49(null);
27019
- const setDraftBoth = useCallback44(
27102
+ const setDraftBoth = useCallback45(
27020
27103
  (next) => {
27021
27104
  draftRef.current = next;
27022
27105
  setDraft(next);
@@ -27033,11 +27116,14 @@ var TimePicker = forwardRef98(
27033
27116
  else if (forwardedRef)
27034
27117
  forwardedRef.current = node;
27035
27118
  };
27119
+ const triggerRef = useRef49(null);
27120
+ const popoverRef = useRef49(null);
27121
+ const popoverPos = useAnchoredPopover(triggerRef, open);
27036
27122
  const hoursRef = useRef49(null);
27037
27123
  const minutesRef = useRef49(null);
27038
27124
  const secondsRef = useRef49(null);
27039
27125
  const refOf = (s) => s === "hours" ? hoursRef : s === "minutes" ? minutesRef : secondsRef;
27040
- const commit = useCallback44(
27126
+ const commit = useCallback45(
27041
27127
  (seg, n) => {
27042
27128
  const base = valueRef.current;
27043
27129
  const next = { ...base, [seg]: clampSeg(seg, n, use24h) };
@@ -27069,13 +27155,13 @@ var TimePicker = forwardRef98(
27069
27155
  valueRef.current = next;
27070
27156
  onChange?.(next);
27071
27157
  };
27072
- const clearCommitTimer = useCallback44(() => {
27158
+ const clearCommitTimer = useCallback45(() => {
27073
27159
  if (commitTimerRef.current != null) {
27074
27160
  clearTimeout(commitTimerRef.current);
27075
27161
  commitTimerRef.current = null;
27076
27162
  }
27077
27163
  }, []);
27078
- const commitDraft = useCallback44(
27164
+ const commitDraft = useCallback45(
27079
27165
  (seg, digits) => {
27080
27166
  clearCommitTimer();
27081
27167
  const n = parseInt(digits || "0", 10);
@@ -27087,11 +27173,11 @@ var TimePicker = forwardRef98(
27087
27173
  },
27088
27174
  [clearCommitTimer, commit, use24h, setDraftBoth]
27089
27175
  );
27090
- const flushDraft = useCallback44(() => {
27176
+ const flushDraft = useCallback45(() => {
27091
27177
  const d = draftRef.current;
27092
27178
  if (d) commitDraft(d.seg, d.digits);
27093
27179
  }, [commitDraft]);
27094
- const focusSegment = useCallback44(
27180
+ const focusSegment = useCallback45(
27095
27181
  (seg) => {
27096
27182
  const d = draftRef.current;
27097
27183
  if (d && d.seg !== seg) commitDraft(d.seg, d.digits);
@@ -27100,17 +27186,18 @@ var TimePicker = forwardRef98(
27100
27186
  },
27101
27187
  [commitDraft]
27102
27188
  );
27103
- useEffect41(() => {
27189
+ useEffect42(() => {
27104
27190
  if (!open) {
27105
27191
  clearCommitTimer();
27106
27192
  setDraftBoth(null);
27107
27193
  }
27108
27194
  return clearCommitTimer;
27109
27195
  }, [open, clearCommitTimer, setDraftBoth]);
27110
- useEffect41(() => {
27196
+ useEffect42(() => {
27111
27197
  if (!open) return;
27112
27198
  const onDoc = (e) => {
27113
- if (!wrapRef.current?.contains(e.target)) {
27199
+ const target = e.target;
27200
+ if (!wrapRef.current?.contains(target) && !popoverRef.current?.contains(target)) {
27114
27201
  flushDraft();
27115
27202
  setOpen(false);
27116
27203
  setActiveSeg(null);
@@ -27233,6 +27320,7 @@ var TimePicker = forwardRef98(
27233
27320
  "button",
27234
27321
  {
27235
27322
  type: "button",
27323
+ ref: triggerRef,
27236
27324
  id: baseId,
27237
27325
  className: "ods-timepicker__trigger",
27238
27326
  onClick: () => !disabled && setOpen((o) => !o),
@@ -27260,81 +27348,86 @@ var TimePicker = forwardRef98(
27260
27348
  ]
27261
27349
  }
27262
27350
  ),
27263
- open && /* @__PURE__ */ jsxs110(
27264
- "div",
27265
- {
27266
- className: "ods-timepicker__popover",
27267
- role: "dialog",
27268
- "aria-label": "Select time",
27269
- children: [
27270
- /* @__PURE__ */ jsxs110("div", { className: "ods-timepicker__head", children: [
27271
- /* @__PURE__ */ jsxs110("div", { className: "ods-timepicker__display", children: [
27272
- segButton("hours", value.hours),
27273
- /* @__PURE__ */ jsx117("span", { className: "ods-timepicker__display-sep", children: ":" }),
27274
- segButton("minutes", value.minutes),
27275
- showSeconds && /* @__PURE__ */ jsxs110(Fragment44, { children: [
27351
+ open && typeof document !== "undefined" && createPortal18(
27352
+ /* @__PURE__ */ jsxs110(
27353
+ "div",
27354
+ {
27355
+ ref: popoverRef,
27356
+ className: "ods-timepicker__popover",
27357
+ role: "dialog",
27358
+ "aria-label": "Select time",
27359
+ style: anchoredPopoverStyle(popoverPos),
27360
+ children: [
27361
+ /* @__PURE__ */ jsxs110("div", { className: "ods-timepicker__head", children: [
27362
+ /* @__PURE__ */ jsxs110("div", { className: "ods-timepicker__display", children: [
27363
+ segButton("hours", value.hours),
27276
27364
  /* @__PURE__ */ jsx117("span", { className: "ods-timepicker__display-sep", children: ":" }),
27277
- segButton("seconds", value.seconds ?? 0)
27365
+ segButton("minutes", value.minutes),
27366
+ showSeconds && /* @__PURE__ */ jsxs110(Fragment44, { children: [
27367
+ /* @__PURE__ */ jsx117("span", { className: "ods-timepicker__display-sep", children: ":" }),
27368
+ segButton("seconds", value.seconds ?? 0)
27369
+ ] })
27370
+ ] }),
27371
+ !use24h && /* @__PURE__ */ jsxs110("div", { className: "ods-timepicker__period", children: [
27372
+ /* @__PURE__ */ jsx117(
27373
+ "button",
27374
+ {
27375
+ type: "button",
27376
+ className: cn(
27377
+ "ods-timepicker__period-btn",
27378
+ value.period === "AM" && "ods-timepicker__period-btn--active"
27379
+ ),
27380
+ onClick: () => setPeriod("AM"),
27381
+ children: "AM"
27382
+ }
27383
+ ),
27384
+ /* @__PURE__ */ jsx117(
27385
+ "button",
27386
+ {
27387
+ type: "button",
27388
+ className: cn(
27389
+ "ods-timepicker__period-btn",
27390
+ value.period === "PM" && "ods-timepicker__period-btn--active"
27391
+ ),
27392
+ onClick: () => setPeriod("PM"),
27393
+ children: "PM"
27394
+ }
27395
+ )
27278
27396
  ] })
27279
27397
  ] }),
27280
- !use24h && /* @__PURE__ */ jsxs110("div", { className: "ods-timepicker__period", children: [
27281
- /* @__PURE__ */ jsx117(
27282
- "button",
27283
- {
27284
- type: "button",
27285
- className: cn(
27286
- "ods-timepicker__period-btn",
27287
- value.period === "AM" && "ods-timepicker__period-btn--active"
27288
- ),
27289
- onClick: () => setPeriod("AM"),
27290
- children: "AM"
27291
- }
27292
- ),
27293
- /* @__PURE__ */ jsx117(
27294
- "button",
27295
- {
27296
- type: "button",
27297
- className: cn(
27298
- "ods-timepicker__period-btn",
27299
- value.period === "PM" && "ods-timepicker__period-btn--active"
27300
- ),
27301
- onClick: () => setPeriod("PM"),
27302
- children: "PM"
27303
- }
27304
- )
27305
- ] })
27306
- ] }),
27307
- /* @__PURE__ */ jsx117("div", { className: "ods-timepicker__body", children: segOrder().map((seg, i, arr) => /* @__PURE__ */ jsxs110(Fragment43, { children: [
27308
- /* @__PURE__ */ jsxs110("div", { className: "ods-timepicker__col", children: [
27309
- /* @__PURE__ */ jsx117("span", { className: "ods-timepicker__col-lbl", children: seg === "hours" ? "HOUR" : seg === "minutes" ? "MIN" : "SEC" }),
27310
- /* @__PURE__ */ jsx117(
27311
- "button",
27312
- {
27313
- type: "button",
27314
- className: "ods-timepicker__step",
27315
- onClick: () => stepBy(seg, 1),
27316
- "aria-label": `${seg} up`,
27317
- children: /* @__PURE__ */ jsx117(CaretUpIcon3, { size: "xs" })
27318
- }
27319
- ),
27320
- /* @__PURE__ */ jsx117("span", { className: "ods-timepicker__col-val", children: pad(
27321
- seg === "hours" ? value.hours : seg === "minutes" ? value.minutes : value.seconds ?? 0
27322
- ) }),
27323
- /* @__PURE__ */ jsx117(
27324
- "button",
27325
- {
27326
- type: "button",
27327
- className: "ods-timepicker__step",
27328
- onClick: () => stepBy(seg, -1),
27329
- "aria-label": `${seg} down`,
27330
- children: /* @__PURE__ */ jsx117(CaretDownIcon3, { size: "xs" })
27331
- }
27332
- )
27333
- ] }),
27334
- i < arr.length - 1 && /* @__PURE__ */ jsx117("span", { className: "ods-timepicker__sep", children: ":" })
27335
- ] }, seg)) })
27336
- ]
27337
- }
27398
+ /* @__PURE__ */ jsx117("div", { className: "ods-timepicker__body", children: segOrder().map((seg, i, arr) => /* @__PURE__ */ jsxs110(Fragment43, { children: [
27399
+ /* @__PURE__ */ jsxs110("div", { className: "ods-timepicker__col", children: [
27400
+ /* @__PURE__ */ jsx117("span", { className: "ods-timepicker__col-lbl", children: seg === "hours" ? "HOUR" : seg === "minutes" ? "MIN" : "SEC" }),
27401
+ /* @__PURE__ */ jsx117(
27402
+ "button",
27403
+ {
27404
+ type: "button",
27405
+ className: "ods-timepicker__step",
27406
+ onClick: () => stepBy(seg, 1),
27407
+ "aria-label": `${seg} up`,
27408
+ children: /* @__PURE__ */ jsx117(CaretUpIcon3, { size: "xs" })
27409
+ }
27410
+ ),
27411
+ /* @__PURE__ */ jsx117("span", { className: "ods-timepicker__col-val", children: pad(
27412
+ seg === "hours" ? value.hours : seg === "minutes" ? value.minutes : value.seconds ?? 0
27413
+ ) }),
27414
+ /* @__PURE__ */ jsx117(
27415
+ "button",
27416
+ {
27417
+ type: "button",
27418
+ className: "ods-timepicker__step",
27419
+ onClick: () => stepBy(seg, -1),
27420
+ "aria-label": `${seg} down`,
27421
+ children: /* @__PURE__ */ jsx117(CaretDownIcon3, { size: "xs" })
27422
+ }
27423
+ )
27424
+ ] }),
27425
+ i < arr.length - 1 && /* @__PURE__ */ jsx117("span", { className: "ods-timepicker__sep", children: ":" })
27426
+ ] }, seg)) })
27427
+ ]
27428
+ }
27429
+ ),
27430
+ document.body
27338
27431
  ),
27339
27432
  error ? /* @__PURE__ */ jsx117(
27340
27433
  "div",
@@ -27355,12 +27448,12 @@ TimePicker.displayName = "TimePicker";
27355
27448
  // src/components/TimezonePicker/TimezonePicker.tsx
27356
27449
  import {
27357
27450
  forwardRef as forwardRef99,
27358
- useCallback as useCallback45,
27359
- useEffect as useEffect42,
27451
+ useCallback as useCallback46,
27452
+ useEffect as useEffect43,
27360
27453
  useId as useId58,
27361
27454
  useMemo as useMemo31,
27362
27455
  useRef as useRef50,
27363
- useState as useState53
27456
+ useState as useState54
27364
27457
  } from "react";
27365
27458
  import {
27366
27459
  CheckmarkIcon as CheckmarkIcon12,
@@ -27407,9 +27500,9 @@ var TimezonePicker = forwardRef99(
27407
27500
  const listboxId = `${baseId}-listbox`;
27408
27501
  const hintId = error || helperText ? `${baseId}-hint` : void 0;
27409
27502
  const describedBy = [consumerDescribedBy, hintId].filter(Boolean).join(" ") || void 0;
27410
- const [open, setOpen] = useState53(false);
27411
- const [query, setQuery] = useState53("");
27412
- const [activeIndex, setActiveIndex] = useState53(0);
27503
+ const [open, setOpen] = useState54(false);
27504
+ const [query, setQuery] = useState54("");
27505
+ const [activeIndex, setActiveIndex] = useState54(0);
27413
27506
  const wrapRef = useRef50(null);
27414
27507
  const triggerRef = useRef50(null);
27415
27508
  const inputRef = useRef50(null);
@@ -27431,16 +27524,16 @@ var TimezonePicker = forwardRef99(
27431
27524
  (o) => o.iana.toLowerCase().includes(q2) || o.label.toLowerCase().includes(q2) || o.offset.toLowerCase().includes(q2) || o.region?.toLowerCase().includes(q2)
27432
27525
  );
27433
27526
  }, [options, query]);
27434
- useEffect42(() => {
27527
+ useEffect43(() => {
27435
27528
  if (activeIndex >= filtered.length) setActiveIndex(0);
27436
27529
  }, [filtered.length, activeIndex]);
27437
- useEffect42(() => {
27530
+ useEffect43(() => {
27438
27531
  if (!open) return;
27439
27532
  const idx = filtered.findIndex((o) => o.iana === value);
27440
27533
  setActiveIndex(idx >= 0 ? idx : 0);
27441
27534
  inputRef.current?.focus();
27442
27535
  }, [open]);
27443
- useEffect42(() => {
27536
+ useEffect43(() => {
27444
27537
  if (!open) return;
27445
27538
  const onDoc = (e) => {
27446
27539
  if (!wrapRef.current?.contains(e.target)) {
@@ -27451,7 +27544,7 @@ var TimezonePicker = forwardRef99(
27451
27544
  document.addEventListener("mousedown", onDoc);
27452
27545
  return () => document.removeEventListener("mousedown", onDoc);
27453
27546
  }, [open]);
27454
- useEffect42(() => {
27547
+ useEffect43(() => {
27455
27548
  if (!open) return;
27456
27549
  const list = listRef.current;
27457
27550
  if (!list) return;
@@ -27460,7 +27553,7 @@ var TimezonePicker = forwardRef99(
27460
27553
  );
27461
27554
  active?.scrollIntoView?.({ block: "nearest" });
27462
27555
  }, [activeIndex, open]);
27463
- const select = useCallback45(
27556
+ const select = useCallback46(
27464
27557
  (iana) => {
27465
27558
  onChange?.(iana);
27466
27559
  setOpen(false);
@@ -27469,7 +27562,7 @@ var TimezonePicker = forwardRef99(
27469
27562
  },
27470
27563
  [onChange]
27471
27564
  );
27472
- const handlePopoverKey = useCallback45(
27565
+ const handlePopoverKey = useCallback46(
27473
27566
  (e) => {
27474
27567
  if (e.key === "ArrowDown") {
27475
27568
  e.preventDefault();
@@ -27665,13 +27758,13 @@ TimezonePicker.displayName = "TimezonePicker";
27665
27758
  import { AnimatePresence as AnimatePresence22, motion as motion35 } from "framer-motion";
27666
27759
  import {
27667
27760
  createContext as createContext2,
27668
- useCallback as useCallback46,
27761
+ useCallback as useCallback47,
27669
27762
  useContext as useContext3,
27670
27763
  useMemo as useMemo32,
27671
27764
  useRef as useRef51,
27672
- useState as useState54
27765
+ useState as useState55
27673
27766
  } from "react";
27674
- import { createPortal as createPortal17 } from "react-dom";
27767
+ import { createPortal as createPortal19 } from "react-dom";
27675
27768
  import { Fragment as Fragment46, jsx as jsx119, jsxs as jsxs112 } from "react/jsx-runtime";
27676
27769
  var defaultIcons = {
27677
27770
  success: /* @__PURE__ */ jsxs112("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
@@ -27818,8 +27911,8 @@ function ToastBody({ item, onDismiss }) {
27818
27911
  ] });
27819
27912
  }
27820
27913
  function PositionStack({ items, position, onDismiss, maxStack }) {
27821
- const [hovered, setHovered] = useState54(false);
27822
- const [pinned, setPinned] = useState54(false);
27914
+ const [hovered, setHovered] = useState55(false);
27915
+ const [pinned, setPinned] = useState55(false);
27823
27916
  const expanded = hovered || pinned;
27824
27917
  const ordered = useMemo32(() => [...items].reverse(), [items]);
27825
27918
  const isBottom = position.startsWith("bottom");
@@ -27919,10 +28012,10 @@ function ToastProvider({
27919
28012
  defaultPosition = "bottom-right",
27920
28013
  maxStack = 3
27921
28014
  }) {
27922
- const [toasts, setToasts] = useState54([]);
28015
+ const [toasts, setToasts] = useState55([]);
27923
28016
  const timers = useRef51(/* @__PURE__ */ new Map());
27924
28017
  const idCounter2 = useRef51(0);
27925
- const dismiss = useCallback46((id) => {
28018
+ const dismiss = useCallback47((id) => {
27926
28019
  setToasts((prev) => prev.filter((t) => t.id !== id));
27927
28020
  const timer = timers.current.get(id);
27928
28021
  if (timer) {
@@ -27930,7 +28023,7 @@ function ToastProvider({
27930
28023
  timers.current.delete(id);
27931
28024
  }
27932
28025
  }, []);
27933
- const dismissAll = useCallback46((position) => {
28026
+ const dismissAll = useCallback47((position) => {
27934
28027
  setToasts((prev) => {
27935
28028
  const remaining = position ? prev.filter((t) => t.position !== position) : [];
27936
28029
  for (const t of prev) {
@@ -27945,7 +28038,7 @@ function ToastProvider({
27945
28038
  return remaining;
27946
28039
  });
27947
28040
  }, []);
27948
- const toast = useCallback46(
28041
+ const toast = useCallback47(
27949
28042
  (options) => {
27950
28043
  const id = `toast-${++idCounter2.current}`;
27951
28044
  const item = {
@@ -28001,7 +28094,7 @@ function ToastProvider({
28001
28094
  }) });
28002
28095
  return /* @__PURE__ */ jsxs112(ToastContext.Provider, { value: ctx, children: [
28003
28096
  children,
28004
- typeof document !== "undefined" && createPortal17(containers, document.body)
28097
+ typeof document !== "undefined" && createPortal19(containers, document.body)
28005
28098
  ] });
28006
28099
  }
28007
28100
  function useToast() {
@@ -28020,7 +28113,7 @@ function useToast() {
28020
28113
 
28021
28114
  // src/components/Toggle/Toggle.tsx
28022
28115
  import {
28023
- useCallback as useCallback47,
28116
+ useCallback as useCallback48,
28024
28117
  useId as useId59,
28025
28118
  useRef as useRef52
28026
28119
  } from "react";
@@ -28051,7 +28144,7 @@ function Toggle({
28051
28144
  const groupLabelledBy = ariaLabelledBy ?? labelId;
28052
28145
  const groupAriaLabel = !groupLabelledBy ? ariaLabel ?? "Toggle group" : void 0;
28053
28146
  const buttonRefs = useRef52([]);
28054
- const findNextEnabled = useCallback47(
28147
+ const findNextEnabled = useCallback48(
28055
28148
  (from, dir) => {
28056
28149
  if (options.length === 0) return -1;
28057
28150
  let i = from;
@@ -28064,11 +28157,11 @@ function Toggle({
28064
28157
  },
28065
28158
  [options, disabled]
28066
28159
  );
28067
- const focusIndex = useCallback47((i) => {
28160
+ const focusIndex = useCallback48((i) => {
28068
28161
  if (i < 0) return;
28069
28162
  buttonRefs.current[i]?.focus();
28070
28163
  }, []);
28071
- const handleKey = useCallback47(
28164
+ const handleKey = useCallback48(
28072
28165
  (e, idx) => {
28073
28166
  if (e.key === "ArrowRight" || e.key === "ArrowDown") {
28074
28167
  e.preventDefault();
@@ -28436,9 +28529,9 @@ function TopBar({
28436
28529
  import { AnimatePresence as AnimatePresence23, motion as motion36 } from "framer-motion";
28437
28530
  import {
28438
28531
  forwardRef as forwardRef101,
28439
- useCallback as useCallback48,
28532
+ useCallback as useCallback49,
28440
28533
  useId as useId61,
28441
- useState as useState55
28534
+ useState as useState56
28442
28535
  } from "react";
28443
28536
  import {
28444
28537
  BuildToolIcon,
@@ -28484,11 +28577,11 @@ var TraceStep = forwardRef101(
28484
28577
  const baseId = providedId ?? `ods-trace-step-${reactId}`;
28485
28578
  const headId = `${baseId}-head`;
28486
28579
  const contentId = `${baseId}-content`;
28487
- const [uncontrolledOpen, setUncontrolledOpen] = useState55(defaultOpen);
28580
+ const [uncontrolledOpen, setUncontrolledOpen] = useState56(defaultOpen);
28488
28581
  const isControlled = controlledOpen !== void 0;
28489
28582
  const open = isControlled ? controlledOpen : uncontrolledOpen;
28490
28583
  const canExpand = !!children;
28491
- const toggle = useCallback48(() => {
28584
+ const toggle = useCallback49(() => {
28492
28585
  if (!canExpand) return;
28493
28586
  const next = !open;
28494
28587
  if (!isControlled) setUncontrolledOpen(next);
@@ -28630,11 +28723,11 @@ import { ChevronRightIcon as ChevronRightIcon5 } from "@octaviaflow/icons";
28630
28723
  import { motion as motion37, useReducedMotion as useReducedMotion14 } from "framer-motion";
28631
28724
  import {
28632
28725
  forwardRef as forwardRef102,
28633
- useCallback as useCallback49,
28634
- useEffect as useEffect43,
28726
+ useCallback as useCallback50,
28727
+ useEffect as useEffect44,
28635
28728
  useId as useId62,
28636
28729
  useMemo as useMemo33,
28637
- useState as useState56
28730
+ useState as useState57
28638
28731
  } from "react";
28639
28732
  import { jsx as jsx125, jsxs as jsxs118 } from "react/jsx-runtime";
28640
28733
  function buildVisibleList(nodes, expanded, out = [], level = 0, parentId = null) {
@@ -28666,17 +28759,17 @@ var TreeView = forwardRef102(
28666
28759
  const reactId = useId62();
28667
28760
  const baseId = providedId ?? `ods-tree-${reactId}`;
28668
28761
  const reducedMotion = useReducedMotion14();
28669
- const [internalSelected, setInternalSelected] = useState56(defaultSelectedId);
28762
+ const [internalSelected, setInternalSelected] = useState57(defaultSelectedId);
28670
28763
  const isSelectedControlled = controlledSelected !== void 0;
28671
28764
  const selectedId = isSelectedControlled ? controlledSelected : internalSelected;
28672
- const [internalExpanded, setInternalExpanded] = useState56(
28765
+ const [internalExpanded, setInternalExpanded] = useState57(
28673
28766
  () => new Set(defaultExpandedIds ?? [])
28674
28767
  );
28675
28768
  const isExpandedControlled = controlledExpanded !== void 0;
28676
28769
  const expandedSet = isExpandedControlled ? controlledExpanded : internalExpanded;
28677
- const [loaded, setLoaded] = useState56({});
28678
- const [loading, setLoading] = useState56(/* @__PURE__ */ new Set());
28679
- const resolveChildren = useCallback49(
28770
+ const [loaded, setLoaded] = useState57({});
28771
+ const [loading, setLoading] = useState57(/* @__PURE__ */ new Set());
28772
+ const resolveChildren = useCallback50(
28680
28773
  (node) => node.children ?? loaded[node.id],
28681
28774
  [loaded]
28682
28775
  );
@@ -28692,14 +28785,14 @@ var TreeView = forwardRef102(
28692
28785
  () => buildVisibleList(resolvedNodes, expandedSet),
28693
28786
  [resolvedNodes, expandedSet]
28694
28787
  );
28695
- const setExpanded = useCallback49(
28788
+ const setExpanded = useCallback50(
28696
28789
  (next) => {
28697
28790
  if (!isExpandedControlled) setInternalExpanded(new Set(next));
28698
28791
  onExpandedChange?.(new Set(next));
28699
28792
  },
28700
28793
  [isExpandedControlled, onExpandedChange]
28701
28794
  );
28702
- const toggleExpand = useCallback49(
28795
+ const toggleExpand = useCallback50(
28703
28796
  async (node) => {
28704
28797
  const next = new Set(expandedSet);
28705
28798
  const isOpen = next.has(node.id);
@@ -28728,7 +28821,7 @@ var TreeView = forwardRef102(
28728
28821
  },
28729
28822
  [expandedSet, setExpanded, onLoadChildren, loaded, loading]
28730
28823
  );
28731
- const handleSelect = useCallback49(
28824
+ const handleSelect = useCallback50(
28732
28825
  (node) => {
28733
28826
  if (node.disabled || disabled) return;
28734
28827
  if (!isSelectedControlled) setInternalSelected(node.id);
@@ -28903,7 +28996,7 @@ var TreeView = forwardRef102(
28903
28996
  );
28904
28997
  };
28905
28998
  const visibleIdxCursor = { value: 0 };
28906
- useEffect43(() => {
28999
+ useEffect44(() => {
28907
29000
  }, [tabStopId]);
28908
29001
  return /* @__PURE__ */ jsx125(
28909
29002
  "ul",
@@ -29053,10 +29146,10 @@ var UserCard = forwardRef103(
29053
29146
  UserCard.displayName = "UserCard";
29054
29147
 
29055
29148
  // src/components/WorkflowEditor/WorkflowEditor.tsx
29056
- import { useCallback as useCallback51, useMemo as useMemo35, useState as useState57 } from "react";
29149
+ import { useCallback as useCallback52, useMemo as useMemo35, useState as useState58 } from "react";
29057
29150
 
29058
29151
  // src/hooks/useWorkflow.ts
29059
- import { useCallback as useCallback50, useMemo as useMemo34, useReducer } from "react";
29152
+ import { useCallback as useCallback51, useMemo as useMemo34, useReducer } from "react";
29060
29153
 
29061
29154
  // src/workflow/types.ts
29062
29155
  var types_exports = {};
@@ -29570,11 +29663,11 @@ function useWorkflow(options = {}) {
29570
29663
  []
29571
29664
  );
29572
29665
  const [workflow, dispatch] = useReducer(reducer, initial);
29573
- const addNode = useCallback50(
29666
+ const addNode = useCallback51(
29574
29667
  (node) => dispatch({ type: "ADD_NODE", payload: node }),
29575
29668
  []
29576
29669
  );
29577
- const createNode = useCallback50(
29670
+ const createNode = useCallback51(
29578
29671
  (partial) => {
29579
29672
  const id = partial.id ?? genId("node");
29580
29673
  const ports = partial.ports ?? {
@@ -29623,27 +29716,27 @@ function useWorkflow(options = {}) {
29623
29716
  },
29624
29717
  []
29625
29718
  );
29626
- const updateNode = useCallback50(
29719
+ const updateNode = useCallback51(
29627
29720
  (id, updates) => dispatch({ type: "UPDATE_NODE", payload: { id, updates } }),
29628
29721
  []
29629
29722
  );
29630
- const deleteNode = useCallback50(
29723
+ const deleteNode = useCallback51(
29631
29724
  (id) => dispatch({ type: "DELETE_NODE", payload: id }),
29632
29725
  []
29633
29726
  );
29634
- const deleteNodes = useCallback50(
29727
+ const deleteNodes = useCallback51(
29635
29728
  (ids) => dispatch({ type: "DELETE_NODES", payload: ids }),
29636
29729
  []
29637
29730
  );
29638
- const replaceNodes = useCallback50(
29731
+ const replaceNodes = useCallback51(
29639
29732
  (nodes) => dispatch({ type: "REPLACE_NODES", payload: nodes }),
29640
29733
  []
29641
29734
  );
29642
- const addEdge = useCallback50(
29735
+ const addEdge = useCallback51(
29643
29736
  (edge) => dispatch({ type: "ADD_EDGE", payload: edge }),
29644
29737
  []
29645
29738
  );
29646
- const createEdge = useCallback50(
29739
+ const createEdge = useCallback51(
29647
29740
  (source, sourcePort, target, targetPort) => {
29648
29741
  const edge = {
29649
29742
  id: genId("edge"),
@@ -29661,20 +29754,20 @@ function useWorkflow(options = {}) {
29661
29754
  },
29662
29755
  []
29663
29756
  );
29664
- const deleteEdge = useCallback50(
29757
+ const deleteEdge = useCallback51(
29665
29758
  (id) => dispatch({ type: "DELETE_EDGE", payload: id }),
29666
29759
  []
29667
29760
  );
29668
- const replaceEdges = useCallback50(
29761
+ const replaceEdges = useCallback51(
29669
29762
  (edges) => dispatch({ type: "REPLACE_EDGES", payload: edges }),
29670
29763
  []
29671
29764
  );
29672
- const startConnecting = useCallback50(
29765
+ const startConnecting = useCallback51(
29673
29766
  (nodeId, portId, portType) => dispatch({ type: "START_CONNECTING", payload: { nodeId, portId, portType } }),
29674
29767
  []
29675
29768
  );
29676
- const endConnecting = useCallback50(() => dispatch({ type: "END_CONNECTING" }), []);
29677
- const selectNode = useCallback50(
29769
+ const endConnecting = useCallback51(() => dispatch({ type: "END_CONNECTING" }), []);
29770
+ const selectNode = useCallback51(
29678
29771
  (id, multi = false) => {
29679
29772
  if (multi) {
29680
29773
  const current = workflow.canvas.selectedNodes;
@@ -29686,36 +29779,36 @@ function useWorkflow(options = {}) {
29686
29779
  },
29687
29780
  [workflow.canvas.selectedNodes]
29688
29781
  );
29689
- const selectNodes = useCallback50(
29782
+ const selectNodes = useCallback51(
29690
29783
  (ids) => dispatch({ type: "SELECT_NODES", payload: ids }),
29691
29784
  []
29692
29785
  );
29693
- const selectEdge = useCallback50(
29786
+ const selectEdge = useCallback51(
29694
29787
  (id) => dispatch({ type: "SELECT_EDGE", payload: id }),
29695
29788
  []
29696
29789
  );
29697
- const deselectAll = useCallback50(() => dispatch({ type: "DESELECT_ALL" }), []);
29698
- const zoomIn = useCallback50(() => {
29790
+ const deselectAll = useCallback51(() => dispatch({ type: "DESELECT_ALL" }), []);
29791
+ const zoomIn = useCallback51(() => {
29699
29792
  const z = Math.min(workflow.canvas.viewport.zoom * 1.2, 2);
29700
29793
  dispatch({ type: "UPDATE_VIEWPORT", payload: { zoom: z } });
29701
29794
  }, [workflow.canvas.viewport.zoom]);
29702
- const zoomOut = useCallback50(() => {
29795
+ const zoomOut = useCallback51(() => {
29703
29796
  const z = Math.max(workflow.canvas.viewport.zoom / 1.2, 0.25);
29704
29797
  dispatch({ type: "UPDATE_VIEWPORT", payload: { zoom: z } });
29705
29798
  }, [workflow.canvas.viewport.zoom]);
29706
- const resetViewport = useCallback50(
29799
+ const resetViewport = useCallback51(
29707
29800
  () => dispatch({ type: "UPDATE_VIEWPORT", payload: { x: 0, y: 0, zoom: 1 } }),
29708
29801
  []
29709
29802
  );
29710
- const setViewport = useCallback50(
29803
+ const setViewport = useCallback51(
29711
29804
  (viewport) => dispatch({ type: "UPDATE_VIEWPORT", payload: viewport }),
29712
29805
  []
29713
29806
  );
29714
- const undo = useCallback50(() => dispatch({ type: "UNDO" }), []);
29715
- const redo = useCallback50(() => dispatch({ type: "REDO" }), []);
29807
+ const undo = useCallback51(() => dispatch({ type: "UNDO" }), []);
29808
+ const redo = useCallback51(() => dispatch({ type: "REDO" }), []);
29716
29809
  const canUndo = workflow.canvas.history.past.length > 0;
29717
29810
  const canRedo = workflow.canvas.history.future.length > 0;
29718
- const validate = useCallback50(() => workflow.validation, [workflow.validation]);
29811
+ const validate = useCallback51(() => workflow.validation, [workflow.validation]);
29719
29812
  return {
29720
29813
  workflow,
29721
29814
  dispatch,
@@ -29821,35 +29914,35 @@ function WorkflowEditor({
29821
29914
  }) {
29822
29915
  const wf = useWorkflow(options);
29823
29916
  const { workflow, dispatch, canUndo, canRedo, undo, redo } = wf;
29824
- const [uncontrolledLock, setUncontrolledLock] = useState57(false);
29825
- const [uncontrolledDrawer, setUncontrolledDrawer] = useState57(!!drawer);
29826
- const [uncontrolledHistory, setUncontrolledHistory] = useState57(false);
29827
- const [uncontrolledDebug, setUncontrolledDebug] = useState57(false);
29917
+ const [uncontrolledLock, setUncontrolledLock] = useState58(false);
29918
+ const [uncontrolledDrawer, setUncontrolledDrawer] = useState58(!!drawer);
29919
+ const [uncontrolledHistory, setUncontrolledHistory] = useState58(false);
29920
+ const [uncontrolledDebug, setUncontrolledDebug] = useState58(false);
29828
29921
  const isLockMode = controlledLockMode ?? uncontrolledLock;
29829
29922
  const isDrawerOpen = controlledDrawerOpen ?? uncontrolledDrawer;
29830
29923
  const isHistoryOpen = controlledHistoryOpen ?? uncontrolledHistory;
29831
29924
  const isDebugOpen = controlledDebugOpen ?? uncontrolledDebug;
29832
- const toggleLock = useCallback51(() => {
29925
+ const toggleLock = useCallback52(() => {
29833
29926
  const next = !isLockMode;
29834
29927
  if (controlledLockMode === void 0) setUncontrolledLock(next);
29835
29928
  onToggleLockMode?.(next);
29836
29929
  }, [isLockMode, controlledLockMode, onToggleLockMode]);
29837
- const toggleDrawer = useCallback51(() => {
29930
+ const toggleDrawer = useCallback52(() => {
29838
29931
  const next = !isDrawerOpen;
29839
29932
  if (controlledDrawerOpen === void 0) setUncontrolledDrawer(next);
29840
29933
  onToggleDrawer?.(next);
29841
29934
  }, [isDrawerOpen, controlledDrawerOpen, onToggleDrawer]);
29842
- const toggleHistory = useCallback51(() => {
29935
+ const toggleHistory = useCallback52(() => {
29843
29936
  const next = !isHistoryOpen;
29844
29937
  if (controlledHistoryOpen === void 0) setUncontrolledHistory(next);
29845
29938
  onToggleHistory?.(next);
29846
29939
  }, [isHistoryOpen, controlledHistoryOpen, onToggleHistory]);
29847
- const toggleDebug = useCallback51(() => {
29940
+ const toggleDebug = useCallback52(() => {
29848
29941
  const next = !isDebugOpen;
29849
29942
  if (controlledDebugOpen === void 0) setUncontrolledDebug(next);
29850
29943
  onToggleDebug?.(next);
29851
29944
  }, [isDebugOpen, controlledDebugOpen, onToggleDebug]);
29852
- const handleReset = useCallback51(() => {
29945
+ const handleReset = useCallback52(() => {
29853
29946
  if (onReset) onReset();
29854
29947
  else dispatch({ type: "RESET" });
29855
29948
  }, [onReset, dispatch]);
@@ -29858,7 +29951,7 @@ function WorkflowEditor({
29858
29951
  [workflow.canvas.nodes]
29859
29952
  );
29860
29953
  const nextEdges = useMemo35(() => workflow.canvas.edges.map(toNextEdge), [workflow.canvas.edges]);
29861
- const onNodesChange = useCallback51(
29954
+ const onNodesChange = useCallback52(
29862
29955
  (changes) => {
29863
29956
  const reduced = applyNodeChanges(
29864
29957
  nextNodes,
@@ -29899,7 +29992,7 @@ function WorkflowEditor({
29899
29992
  },
29900
29993
  [nextNodes, workflow.canvas.nodes, wf, onNodeSelect]
29901
29994
  );
29902
- const onEdgesChange = useCallback51(
29995
+ const onEdgesChange = useCallback52(
29903
29996
  (changes) => {
29904
29997
  const reduced = applyEdgeChanges(nextEdges, changes);
29905
29998
  const byId = new Map(reduced.map((e) => [e.id, e]));
@@ -29909,18 +30002,18 @@ function WorkflowEditor({
29909
30002
  },
29910
30003
  [nextEdges, workflow.canvas.edges, wf]
29911
30004
  );
29912
- const onConnect = useCallback51(
30005
+ const onConnect = useCallback52(
29913
30006
  (c) => {
29914
30007
  wf.createEdge(c.source, c.sourceHandle ?? "default", c.target, c.targetHandle ?? "default");
29915
30008
  },
29916
30009
  [wf]
29917
30010
  );
29918
- const [canvasSize, setCanvasSize] = useState57({ w: 0, h: 0 });
29919
- const handleCanvasRef = useCallback51((node) => {
30011
+ const [canvasSize, setCanvasSize] = useState58({ w: 0, h: 0 });
30012
+ const handleCanvasRef = useCallback52((node) => {
29920
30013
  if (!node) return;
29921
30014
  setCanvasSize({ w: node.clientWidth, h: node.clientHeight });
29922
30015
  }, []);
29923
- const fitToView = useCallback51(() => {
30016
+ const fitToView = useCallback52(() => {
29924
30017
  const nodes = workflow.canvas.nodes;
29925
30018
  if (nodes.length === 0) return;
29926
30019
  let minX = Infinity;
@@ -30163,7 +30256,7 @@ import {
30163
30256
  } from "@octaviaflow/icons";
30164
30257
 
30165
30258
  // src/hooks/useRelativeTime.ts
30166
- import { useEffect as useEffect44, useState as useState58 } from "react";
30259
+ import { useEffect as useEffect45, useState as useState59 } from "react";
30167
30260
  function toMs(t) {
30168
30261
  if (t == null) return null;
30169
30262
  return typeof t === "number" ? t : t.getTime();
@@ -30182,8 +30275,8 @@ function formatRelativeTime(when, now2 = Date.now()) {
30182
30275
  }
30183
30276
  function useRelativeTime(date, options = {}) {
30184
30277
  const { intervalMs = 3e4 } = options;
30185
- const [now2, setNow] = useState58(() => Date.now());
30186
- useEffect44(() => {
30278
+ const [now2, setNow] = useState59(() => Date.now());
30279
+ useEffect45(() => {
30187
30280
  if (typeof window === "undefined") return;
30188
30281
  const id = window.setInterval(() => setNow(Date.now()), intervalMs);
30189
30282
  return () => window.clearInterval(id);
@@ -30192,7 +30285,7 @@ function useRelativeTime(date, options = {}) {
30192
30285
  }
30193
30286
 
30194
30287
  // src/hooks/useWorkflowRuntime.ts
30195
- import { useEffect as useEffect45, useState as useState59 } from "react";
30288
+ import { useEffect as useEffect46, useState as useState60 } from "react";
30196
30289
  function toMs2(t) {
30197
30290
  if (t == null) return null;
30198
30291
  return typeof t === "number" ? t : t.getTime();
@@ -30206,8 +30299,8 @@ function formatWorkflowRuntime(ms) {
30206
30299
  return h > 0 ? `${h}:${pad2(m)}:${pad2(sec)}` : `${pad2(m)}:${pad2(sec)}`;
30207
30300
  }
30208
30301
  function useWorkflowRuntime(startedAt, active) {
30209
- const [, force] = useState59(0);
30210
- useEffect45(() => {
30302
+ const [, force] = useState60(0);
30303
+ useEffect46(() => {
30211
30304
  if (!active || startedAt == null) return;
30212
30305
  if (typeof window === "undefined") return;
30213
30306
  const id = window.setInterval(() => force((n) => n + 1), 1e3);
@@ -30576,11 +30669,11 @@ import {
30576
30669
  import { XMLValidator } from "fast-xml-parser";
30577
30670
  import {
30578
30671
  forwardRef as forwardRef104,
30579
- useCallback as useCallback52,
30580
- useEffect as useEffect46,
30672
+ useCallback as useCallback53,
30673
+ useEffect as useEffect47,
30581
30674
  useId as useId64,
30582
30675
  useMemo as useMemo36,
30583
- useState as useState60
30676
+ useState as useState61
30584
30677
  } from "react";
30585
30678
  import { Fragment as Fragment50, jsx as jsx130, jsxs as jsxs123 } from "react/jsx-runtime";
30586
30679
  function parseXml(src) {
@@ -30711,8 +30804,8 @@ var XmlViewer = forwardRef104(
30711
30804
  );
30712
30805
  XmlViewer.displayName = "XmlViewer";
30713
30806
  function XmlEditBody({ text: initial, onChange, onValidate }) {
30714
- const [text, setText] = useState60(initial);
30715
- const [parseError, setParseError] = useState60(null);
30807
+ const [text, setText] = useState61(initial);
30808
+ const [parseError, setParseError] = useState61(null);
30716
30809
  const validate = (next) => {
30717
30810
  const result = XMLValidator.validate(next);
30718
30811
  if (result === true) {
@@ -30734,7 +30827,7 @@ function XmlEditBody({ text: initial, onChange, onValidate }) {
30734
30827
  onChange?.(next);
30735
30828
  validate(next);
30736
30829
  };
30737
- useEffect46(() => {
30830
+ useEffect47(() => {
30738
30831
  validate(initial);
30739
30832
  }, []);
30740
30833
  return /* @__PURE__ */ jsxs123("div", { className: "ods-xml-viewer__edit", children: [
@@ -30775,10 +30868,10 @@ function XmlNodeRow({
30775
30868
  truncateAt,
30776
30869
  copyable
30777
30870
  }) {
30778
- const [open, setOpen] = useState60(depth < defaultExpandDepth);
30779
- const [copied, setCopied] = useState60(false);
30871
+ const [open, setOpen] = useState61(depth < defaultExpandDepth);
30872
+ const [copied, setCopied] = useState61(false);
30780
30873
  const pad2 = depth * 14;
30781
- const onCopy = useCallback52(
30874
+ const onCopy = useCallback53(
30782
30875
  (e) => {
30783
30876
  e.stopPropagation();
30784
30877
  const text = serializeNode(node);
@@ -30962,11 +31055,11 @@ import {
30962
31055
  } from "@octaviaflow/icons";
30963
31056
  import {
30964
31057
  forwardRef as forwardRef105,
30965
- useCallback as useCallback53,
30966
- useEffect as useEffect47,
31058
+ useCallback as useCallback54,
31059
+ useEffect as useEffect48,
30967
31060
  useId as useId65,
30968
31061
  useMemo as useMemo37,
30969
- useState as useState61
31062
+ useState as useState62
30970
31063
  } from "react";
30971
31064
  import YAML from "yaml";
30972
31065
  import { Fragment as Fragment51, jsx as jsx131, jsxs as jsxs124 } from "react/jsx-runtime";
@@ -31123,14 +31216,14 @@ var YamlViewer = forwardRef105(
31123
31216
  }
31124
31217
  }, [data]);
31125
31218
  const tokens = useMemo37(() => tokenizeYaml(text), [text]);
31126
- const [collapsed, setCollapsed] = useState61(() => {
31219
+ const [collapsed, setCollapsed] = useState62(() => {
31127
31220
  const s = /* @__PURE__ */ new Set();
31128
31221
  tokens.forEach((t) => {
31129
31222
  if (t.hasChildren && t.depth >= defaultExpandDepth) s.add(t.index);
31130
31223
  });
31131
31224
  return s;
31132
31225
  });
31133
- const toggle = useCallback53((idx) => {
31226
+ const toggle = useCallback54((idx) => {
31134
31227
  setCollapsed((prev) => {
31135
31228
  const next = new Set(prev);
31136
31229
  if (next.has(idx)) next.delete(idx);
@@ -31153,8 +31246,8 @@ var YamlViewer = forwardRef105(
31153
31246
  }
31154
31247
  return hide;
31155
31248
  }, [tokens, collapsed]);
31156
- const [copied, setCopied] = useState61(false);
31157
- const onCopy = useCallback53(() => {
31249
+ const [copied, setCopied] = useState62(false);
31250
+ const onCopy = useCallback54(() => {
31158
31251
  if (!navigator?.clipboard?.writeText) return;
31159
31252
  navigator.clipboard.writeText(text).then(
31160
31253
  () => {
@@ -31320,8 +31413,8 @@ function extractYamlErrorPosition(err, text) {
31320
31413
  return { line: 1, col: 1, message };
31321
31414
  }
31322
31415
  function YamlEditBody({ text: initial, onChange, onValidate }) {
31323
- const [text, setText] = useState61(initial);
31324
- const [parseError, setParseError] = useState61(null);
31416
+ const [text, setText] = useState62(initial);
31417
+ const [parseError, setParseError] = useState62(null);
31325
31418
  const validate = (next) => {
31326
31419
  try {
31327
31420
  YAML.parse(next);
@@ -31338,7 +31431,7 @@ function YamlEditBody({ text: initial, onChange, onValidate }) {
31338
31431
  onChange?.(next);
31339
31432
  validate(next);
31340
31433
  };
31341
- useEffect47(() => {
31434
+ useEffect48(() => {
31342
31435
  validate(initial);
31343
31436
  }, []);
31344
31437
  return /* @__PURE__ */ jsxs124("div", { className: "ods-yaml-viewer__edit", children: [
@@ -31373,29 +31466,29 @@ function YamlEditBody({ text: initial, onChange, onValidate }) {
31373
31466
  }
31374
31467
 
31375
31468
  // src/hooks/useBanner.ts
31376
- import { useCallback as useCallback54, useEffect as useEffect48, useRef as useRef53, useState as useState62 } from "react";
31469
+ import { useCallback as useCallback55, useEffect as useEffect49, useRef as useRef53, useState as useState63 } from "react";
31377
31470
  function useBanner(options = {}) {
31378
31471
  const { defaultOpen = false, autoDismissAfter, onDismiss } = options;
31379
- const [open, setOpen] = useState62(defaultOpen);
31472
+ const [open, setOpen] = useState63(defaultOpen);
31380
31473
  const timerRef = useRef53(null);
31381
31474
  const onDismissRef = useRef53(onDismiss);
31382
- useEffect48(() => {
31475
+ useEffect49(() => {
31383
31476
  onDismissRef.current = onDismiss;
31384
31477
  }, [onDismiss]);
31385
- const clearTimer = useCallback54(() => {
31478
+ const clearTimer = useCallback55(() => {
31386
31479
  if (timerRef.current !== null) {
31387
31480
  clearTimeout(timerRef.current);
31388
31481
  timerRef.current = null;
31389
31482
  }
31390
31483
  }, []);
31391
- const hide = useCallback54(() => {
31484
+ const hide = useCallback55(() => {
31392
31485
  clearTimer();
31393
31486
  setOpen((wasOpen) => {
31394
31487
  if (wasOpen) onDismissRef.current?.();
31395
31488
  return false;
31396
31489
  });
31397
31490
  }, [clearTimer]);
31398
- const show = useCallback54(() => {
31491
+ const show = useCallback55(() => {
31399
31492
  clearTimer();
31400
31493
  setOpen(true);
31401
31494
  if (typeof autoDismissAfter === "number" && Number.isFinite(autoDismissAfter) && autoDismissAfter > 0) {
@@ -31406,11 +31499,11 @@ function useBanner(options = {}) {
31406
31499
  }, autoDismissAfter);
31407
31500
  }
31408
31501
  }, [autoDismissAfter, clearTimer]);
31409
- const toggle = useCallback54(() => {
31502
+ const toggle = useCallback55(() => {
31410
31503
  if (open) hide();
31411
31504
  else show();
31412
31505
  }, [open, show, hide]);
31413
- useEffect48(() => () => clearTimer(), [clearTimer]);
31506
+ useEffect49(() => () => clearTimer(), [clearTimer]);
31414
31507
  return {
31415
31508
  open,
31416
31509
  show,
@@ -31421,7 +31514,7 @@ function useBanner(options = {}) {
31421
31514
  }
31422
31515
 
31423
31516
  // src/hooks/useCallout.ts
31424
- import { useCallback as useCallback55, useEffect as useEffect49, useState as useState63 } from "react";
31517
+ import { useCallback as useCallback56, useEffect as useEffect50, useState as useState64 } from "react";
31425
31518
  var STORAGE_PREFIX = "ods:callout:dismissed:";
31426
31519
  function readPersisted(key) {
31427
31520
  if (!key || typeof window === "undefined") return false;
@@ -31444,13 +31537,13 @@ function writePersisted(key, value) {
31444
31537
  }
31445
31538
  function useCallout(options = {}) {
31446
31539
  const { defaultOpen = true, persistKey, onDismiss } = options;
31447
- const [open, setOpen] = useState63(defaultOpen);
31448
- useEffect49(() => {
31540
+ const [open, setOpen] = useState64(defaultOpen);
31541
+ useEffect50(() => {
31449
31542
  if (persistKey && readPersisted(persistKey)) {
31450
31543
  setOpen(false);
31451
31544
  }
31452
31545
  }, []);
31453
- const dismiss = useCallback55(() => {
31546
+ const dismiss = useCallback56(() => {
31454
31547
  setOpen((wasOpen) => {
31455
31548
  if (wasOpen) {
31456
31549
  writePersisted(persistKey, true);
@@ -31459,10 +31552,10 @@ function useCallout(options = {}) {
31459
31552
  return false;
31460
31553
  });
31461
31554
  }, [persistKey, onDismiss]);
31462
- const show = useCallback55(() => {
31555
+ const show = useCallback56(() => {
31463
31556
  setOpen(true);
31464
31557
  }, []);
31465
- const toggle = useCallback55(() => {
31558
+ const toggle = useCallback56(() => {
31466
31559
  setOpen((prev) => {
31467
31560
  const next = !prev;
31468
31561
  if (!next) {
@@ -31472,7 +31565,7 @@ function useCallout(options = {}) {
31472
31565
  return next;
31473
31566
  });
31474
31567
  }, [persistKey, onDismiss]);
31475
- const reset = useCallback55(() => {
31568
+ const reset = useCallback56(() => {
31476
31569
  writePersisted(persistKey, false);
31477
31570
  setOpen(true);
31478
31571
  }, [persistKey]);
@@ -31545,7 +31638,7 @@ function breakpointMinWidth(name) {
31545
31638
  }
31546
31639
 
31547
31640
  // src/hooks/useRating.ts
31548
- import { useCallback as useCallback56, useState as useState64 } from "react";
31641
+ import { useCallback as useCallback57, useState as useState65 } from "react";
31549
31642
  function useRating({
31550
31643
  value: controlled,
31551
31644
  defaultValue = 0,
@@ -31553,14 +31646,14 @@ function useRating({
31553
31646
  step = 1,
31554
31647
  onChange
31555
31648
  } = {}) {
31556
- const [internal, setInternal] = useState64(defaultValue);
31649
+ const [internal, setInternal] = useState65(defaultValue);
31557
31650
  const value = controlled ?? internal;
31558
31651
  const isControlled = controlled !== void 0;
31559
- const clamp = useCallback56(
31652
+ const clamp = useCallback57(
31560
31653
  (v) => Math.max(0, Math.min(max, v)),
31561
31654
  [max]
31562
31655
  );
31563
- const set = useCallback56(
31656
+ const set = useCallback57(
31564
31657
  (next) => {
31565
31658
  const clamped = clamp(next);
31566
31659
  if (!isControlled) setInternal(clamped);
@@ -31582,10 +31675,10 @@ function useBinaryRating({
31582
31675
  defaultValue = null,
31583
31676
  onChange
31584
31677
  } = {}) {
31585
- const [internal, setInternal] = useState64(defaultValue);
31678
+ const [internal, setInternal] = useState65(defaultValue);
31586
31679
  const value = controlled ?? internal;
31587
31680
  const isControlled = controlled !== void 0;
31588
- const set = useCallback56(
31681
+ const set = useCallback57(
31589
31682
  (next) => {
31590
31683
  if (!isControlled) setInternal(next);
31591
31684
  onChange?.(next);
@@ -31604,30 +31697,30 @@ function useBinaryRating({
31604
31697
  }
31605
31698
 
31606
31699
  // src/hooks/useTimeline.ts
31607
- import { useCallback as useCallback57, useState as useState65 } from "react";
31700
+ import { useCallback as useCallback58, useState as useState66 } from "react";
31608
31701
  function useTimeline({
31609
31702
  items: controlled,
31610
31703
  defaultItems = [],
31611
31704
  onChange
31612
31705
  } = {}) {
31613
- const [internal, setInternal] = useState65(defaultItems);
31706
+ const [internal, setInternal] = useState66(defaultItems);
31614
31707
  const items = controlled ?? internal;
31615
31708
  const isControlled = controlled !== void 0;
31616
- const commit = useCallback57(
31709
+ const commit = useCallback58(
31617
31710
  (next) => {
31618
31711
  if (!isControlled) setInternal(next);
31619
31712
  onChange?.(next);
31620
31713
  },
31621
31714
  [isControlled, onChange]
31622
31715
  );
31623
- const add = useCallback57(
31716
+ const add = useCallback58(
31624
31717
  (item) => {
31625
31718
  if (items.some((i) => i.id === item.id)) return;
31626
31719
  commit([...items, item]);
31627
31720
  },
31628
31721
  [items, commit]
31629
31722
  );
31630
- const insert = useCallback57(
31723
+ const insert = useCallback58(
31631
31724
  (index, item) => {
31632
31725
  if (items.some((i) => i.id === item.id)) return;
31633
31726
  const at = Math.max(0, Math.min(items.length, index));
@@ -31637,7 +31730,7 @@ function useTimeline({
31637
31730
  },
31638
31731
  [items, commit]
31639
31732
  );
31640
- const remove = useCallback57(
31733
+ const remove = useCallback58(
31641
31734
  (id) => {
31642
31735
  const next = items.filter((i) => i.id !== id);
31643
31736
  if (next.length === items.length) return;
@@ -31645,7 +31738,7 @@ function useTimeline({
31645
31738
  },
31646
31739
  [items, commit]
31647
31740
  );
31648
- const update = useCallback57(
31741
+ const update = useCallback58(
31649
31742
  (id, patch) => {
31650
31743
  let changed = false;
31651
31744
  const next = items.map((i) => {
@@ -31670,7 +31763,7 @@ function useTimeline({
31670
31763
  }
31671
31764
 
31672
31765
  // src/hooks/useTraceTimeline.ts
31673
- import { useCallback as useCallback58, useRef as useRef54, useState as useState66 } from "react";
31766
+ import { useCallback as useCallback59, useRef as useRef54, useState as useState67 } from "react";
31674
31767
  var GLOBAL_SEQ = 0;
31675
31768
  var generateId = () => `ods-trace-${Date.now().toString(36)}-${(GLOBAL_SEQ++).toString(36)}`;
31676
31769
  function useTraceTimeline({
@@ -31678,12 +31771,12 @@ function useTraceTimeline({
31678
31771
  defaultSteps = [],
31679
31772
  onChange
31680
31773
  } = {}) {
31681
- const [internal, setInternal] = useState66(defaultSteps);
31774
+ const [internal, setInternal] = useState67(defaultSteps);
31682
31775
  const steps = controlled ?? internal;
31683
31776
  const isControlled = controlled !== void 0;
31684
31777
  const stepsRef = useRef54(steps);
31685
31778
  stepsRef.current = steps;
31686
- const commit = useCallback58(
31779
+ const commit = useCallback59(
31687
31780
  (next) => {
31688
31781
  stepsRef.current = next;
31689
31782
  if (!isControlled) setInternal(next);
@@ -31691,7 +31784,7 @@ function useTraceTimeline({
31691
31784
  },
31692
31785
  [isControlled, onChange]
31693
31786
  );
31694
- const start = useCallback58(
31787
+ const start = useCallback59(
31695
31788
  (input) => {
31696
31789
  const id = input.id ?? generateId();
31697
31790
  const record = {
@@ -31711,7 +31804,7 @@ function useTraceTimeline({
31711
31804
  },
31712
31805
  [commit]
31713
31806
  );
31714
- const update = useCallback58(
31807
+ const update = useCallback59(
31715
31808
  (id, patch) => {
31716
31809
  let changed = false;
31717
31810
  const next = stepsRef.current.map((s) => {
@@ -31723,19 +31816,19 @@ function useTraceTimeline({
31723
31816
  },
31724
31817
  [commit]
31725
31818
  );
31726
- const complete = useCallback58(
31819
+ const complete = useCallback59(
31727
31820
  (id, patch = {}) => {
31728
31821
  update(id, { ...patch, status: "success" });
31729
31822
  },
31730
31823
  [update]
31731
31824
  );
31732
- const fail = useCallback58(
31825
+ const fail = useCallback59(
31733
31826
  (id, patch = {}) => {
31734
31827
  update(id, { ...patch, status: "failed" });
31735
31828
  },
31736
31829
  [update]
31737
31830
  );
31738
- const remove = useCallback58(
31831
+ const remove = useCallback59(
31739
31832
  (id) => {
31740
31833
  const next = stepsRef.current.filter((s) => s.id !== id);
31741
31834
  if (next.length === stepsRef.current.length) return;
@@ -31761,13 +31854,13 @@ function useTraceTimeline({
31761
31854
 
31762
31855
  // src/provider/OdsProvider.tsx
31763
31856
  import { generateCssVars, resolveConfig } from "@octaviaflow/config";
31764
- import { createContext as createContext3, useContext as useContext4, useEffect as useEffect50, useMemo as useMemo38 } from "react";
31857
+ import { createContext as createContext3, useContext as useContext4, useEffect as useEffect51, useMemo as useMemo38 } from "react";
31765
31858
  import { OverlayProvider as OverlayProvider3 } from "react-aria";
31766
31859
  import { jsx as jsx132 } from "react/jsx-runtime";
31767
31860
  var OdsContext = createContext3(null);
31768
31861
  function OdsProvider({ config: userConfig, children }) {
31769
31862
  const resolved = useMemo38(() => resolveConfig(userConfig), [userConfig]);
31770
- useEffect50(() => {
31863
+ useEffect51(() => {
31771
31864
  const cssVarsBlock = generateCssVars(resolved);
31772
31865
  const match = cssVarsBlock.match(/:root\s*\{([\s\S]*)\}/);
31773
31866
  if (match) {
@@ -32263,6 +32356,7 @@ export {
32263
32356
  WorkflowHeaderExpanded,
32264
32357
  XmlViewer,
32265
32358
  YamlViewer,
32359
+ anchoredPopoverStyle,
32266
32360
  applyHorizontalLayout,
32267
32361
  applyLayout,
32268
32362
  applyVerticalLayout,
@@ -32287,6 +32381,7 @@ export {
32287
32381
  sanitizeHref,
32288
32382
  sanitizeImageUrl,
32289
32383
  textareaTools,
32384
+ useAnchoredPopover,
32290
32385
  useBanner,
32291
32386
  useBinaryRating,
32292
32387
  useBreakpoint,