@octaviaflow/core 3.0.18-beta.31 → 3.0.18-beta.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -5024,6 +5024,20 @@ var Select = (0, import_react33.forwardRef)(function Select2({
5024
5024
  };
5025
5025
  }, [state.isOpen, state.close, closeOnOutsideClick]);
5026
5026
  const selectedOption = options.find((o) => o.value === String(state.selectedKey ?? ""));
5027
+ const wasOpenBeforePressRef = (0, import_react33.useRef)(false);
5028
+ const handleTriggerPointerDown = (e) => {
5029
+ wasOpenBeforePressRef.current = state.isOpen;
5030
+ const baseHandler = buttonProps.onPointerDown;
5031
+ baseHandler?.(e);
5032
+ };
5033
+ const handleTriggerClick = (e) => {
5034
+ const baseHandler = buttonProps.onClick;
5035
+ baseHandler?.(e);
5036
+ if (wasOpenBeforePressRef.current && state.isOpen) {
5037
+ state.close();
5038
+ }
5039
+ wasOpenBeforePressRef.current = false;
5040
+ };
5027
5041
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
5028
5042
  "div",
5029
5043
  {
@@ -5041,6 +5055,8 @@ var Select = (0, import_react33.forwardRef)(function Select2({
5041
5055
  "button",
5042
5056
  {
5043
5057
  ...buttonProps,
5058
+ onPointerDown: handleTriggerPointerDown,
5059
+ onClick: handleTriggerClick,
5044
5060
  ref: setTriggerRef,
5045
5061
  id: baseId,
5046
5062
  form,
@@ -14434,13 +14450,57 @@ function FlowCanvas({
14434
14450
  }
14435
14451
 
14436
14452
  // src/components/FlowMinimap/FlowMinimap.tsx
14437
- var import_react71 = require("react");
14453
+ var import_react72 = require("react");
14438
14454
 
14439
- // src/workflow/hooks/useFlow.ts
14455
+ // src/workflow/components/Handle/handleRegistry.ts
14440
14456
  var import_react69 = require("react");
14441
- var FlowInstanceContext = (0, import_react69.createContext)(null);
14457
+ var HandleRegistryContext = (0, import_react69.createContext)(null);
14458
+ function useHandleRegistry() {
14459
+ const r = (0, import_react69.useContext)(HandleRegistryContext);
14460
+ if (!r) {
14461
+ throw new Error("[@octaviaflow/core/workflow] Handle must be used inside <FlowCanvas>.");
14462
+ }
14463
+ return r;
14464
+ }
14465
+ function createHandleRegistry() {
14466
+ const map = /* @__PURE__ */ new Map();
14467
+ const key = (n, t, h) => `${n}::${t}::${h}`;
14468
+ const listeners = /* @__PURE__ */ new Set();
14469
+ const notify = () => {
14470
+ for (const l of listeners) l();
14471
+ };
14472
+ return {
14473
+ register(d) {
14474
+ map.set(key(d.nodeId, d.type, d.handleId), d);
14475
+ notify();
14476
+ return () => {
14477
+ const k = key(d.nodeId, d.type, d.handleId);
14478
+ if (map.get(k) === d) {
14479
+ map.delete(k);
14480
+ notify();
14481
+ }
14482
+ };
14483
+ },
14484
+ resolve(nodeId, type, handleId) {
14485
+ return map.get(key(nodeId, type, handleId));
14486
+ },
14487
+ all() {
14488
+ return Array.from(map.values());
14489
+ },
14490
+ subscribe(listener) {
14491
+ listeners.add(listener);
14492
+ return () => {
14493
+ listeners.delete(listener);
14494
+ };
14495
+ }
14496
+ };
14497
+ }
14498
+
14499
+ // src/workflow/hooks/useFlow.ts
14500
+ var import_react70 = require("react");
14501
+ var FlowInstanceContext = (0, import_react70.createContext)(null);
14442
14502
  function useFlow() {
14443
- const instance = (0, import_react69.useContext)(FlowInstanceContext);
14503
+ const instance = (0, import_react70.useContext)(FlowInstanceContext);
14444
14504
  if (!instance) {
14445
14505
  throw new Error("[@octaviaflow/core/workflow] useFlow() must be called inside <FlowCanvas>.");
14446
14506
  }
@@ -14448,10 +14508,10 @@ function useFlow() {
14448
14508
  }
14449
14509
 
14450
14510
  // src/workflow/store/context.ts
14451
- var import_react70 = require("react");
14452
- var FlowStoreContext = (0, import_react70.createContext)(null);
14511
+ var import_react71 = require("react");
14512
+ var FlowStoreContext = (0, import_react71.createContext)(null);
14453
14513
  function useFlowStore() {
14454
- const store = (0, import_react70.useContext)(FlowStoreContext);
14514
+ const store = (0, import_react71.useContext)(FlowStoreContext);
14455
14515
  if (!store) {
14456
14516
  throw new Error(
14457
14517
  "[@octaviaflow/core/workflow] useFlowStore must be called inside a <FlowCanvas>."
@@ -14460,12 +14520,56 @@ function useFlowStore() {
14460
14520
  return store;
14461
14521
  }
14462
14522
 
14523
+ // src/workflow/utils/geometry.ts
14524
+ var DEFAULT_NODE_WIDTH2 = 368;
14525
+ var DEFAULT_NODE_HEIGHT2 = 96;
14526
+ var COLLAPSED_GROUP_HEIGHT = 36;
14527
+ var COLLAPSED_FOREACH_HEIGHT = 40;
14528
+ function effectiveHeight(node) {
14529
+ const data = node.data;
14530
+ if (data?.collapsed) {
14531
+ if (node.type === "group") return COLLAPSED_GROUP_HEIGHT;
14532
+ if (node.type === "forEach") return COLLAPSED_FOREACH_HEIGHT;
14533
+ }
14534
+ return node.height ?? DEFAULT_NODE_HEIGHT2;
14535
+ }
14536
+ function handleCentre(node, side, index, total) {
14537
+ const w = node.width ?? DEFAULT_NODE_WIDTH2;
14538
+ const h = effectiveHeight(node);
14539
+ const x0 = node.position.x;
14540
+ const y0 = node.position.y;
14541
+ const denom = total + 1;
14542
+ const ratio = (index + 1) / denom;
14543
+ switch (side) {
14544
+ case "top":
14545
+ return { x: x0 + w * ratio, y: y0 };
14546
+ case "bottom":
14547
+ return { x: x0 + w * ratio, y: y0 + h };
14548
+ case "left":
14549
+ return { x: x0, y: y0 + h * ratio };
14550
+ case "right":
14551
+ return { x: x0 + w, y: y0 + h * ratio };
14552
+ }
14553
+ }
14554
+ function screenToFlow(p, vp) {
14555
+ return {
14556
+ x: (p.x - vp.x) / vp.zoom,
14557
+ y: (p.y - vp.y) / vp.zoom
14558
+ };
14559
+ }
14560
+ function flowToScreen(p, vp) {
14561
+ return {
14562
+ x: p.x * vp.zoom + vp.x,
14563
+ y: p.y * vp.zoom + vp.y
14564
+ };
14565
+ }
14566
+
14463
14567
  // src/components/FlowMinimap/FlowMinimap.tsx
14464
14568
  var import_jsx_runtime52 = require("react/jsx-runtime");
14465
14569
  var MINIMAP_WIDTH = 140;
14466
14570
  var MINIMAP_HEIGHT = 100;
14467
- var DEFAULT_NODE_WIDTH2 = 240;
14468
- var DEFAULT_NODE_HEIGHT2 = 96;
14571
+ var DEFAULT_NODE_WIDTH3 = 240;
14572
+ var DEFAULT_NODE_HEIGHT3 = 96;
14469
14573
  var DRAG_THRESHOLD_PX2 = 3;
14470
14574
  var NO_STORE_SUBSCRIBE = (_cb) => () => {
14471
14575
  };
@@ -14483,43 +14587,71 @@ function FlowMinimap(props) {
14483
14587
  bounds_padding = 80,
14484
14588
  className
14485
14589
  } = props;
14486
- const store = (0, import_react71.useContext)(FlowStoreContext);
14487
- const instance = (0, import_react71.useContext)(FlowInstanceContext);
14488
- const { sub, snap } = (0, import_react71.useMemo)(
14590
+ const store = (0, import_react72.useContext)(FlowStoreContext);
14591
+ const instance = (0, import_react72.useContext)(FlowInstanceContext);
14592
+ const handleRegistry = (0, import_react72.useContext)(HandleRegistryContext);
14593
+ const { sub, snap } = (0, import_react72.useMemo)(
14489
14594
  () => store ? { sub: store.subscribe, snap: () => store.getSnapshot() } : { sub: NO_STORE_SUBSCRIBE, snap: NO_STORE_SNAPSHOT },
14490
14595
  [store]
14491
14596
  );
14492
- const liveSnapshot = (0, import_react71.useSyncExternalStore)(sub, snap, snap);
14493
- const resolvedNodes = (0, import_react71.useMemo)(() => {
14597
+ const liveSnapshot = (0, import_react72.useSyncExternalStore)(sub, snap, snap);
14598
+ const [registryVersion, setRegistryVersion] = (0, import_react72.useState)(0);
14599
+ (0, import_react72.useEffect)(() => {
14600
+ if (!handleRegistry) return;
14601
+ return handleRegistry.subscribe(() => setRegistryVersion((v) => v + 1));
14602
+ }, [handleRegistry]);
14603
+ const resolvedNodes = (0, import_react72.useMemo)(() => {
14494
14604
  if (nodesProp) return nodesProp;
14495
14605
  if (!liveSnapshot) return [];
14496
14606
  return liveSnapshot.nodes.filter((n) => !n.hidden).map((n) => ({
14497
14607
  id: n.id,
14498
14608
  x: n.position.x,
14499
14609
  y: n.position.y,
14500
- width: n.width ?? DEFAULT_NODE_WIDTH2,
14501
- height: n.height ?? DEFAULT_NODE_HEIGHT2
14610
+ width: n.width ?? DEFAULT_NODE_WIDTH3,
14611
+ height: n.height ?? DEFAULT_NODE_HEIGHT3
14502
14612
  }));
14503
14613
  }, [nodesProp, liveSnapshot]);
14504
- const resolvedEdges = (0, import_react71.useMemo)(() => {
14614
+ const resolvedEdges = (0, import_react72.useMemo)(() => {
14505
14615
  if (edgesProp) return edgesProp;
14506
14616
  if (!liveSnapshot) return [];
14507
- const nodeIndex = new Map(resolvedNodes.map((n) => [n.id, n]));
14617
+ const nodeIndex = new Map(
14618
+ liveSnapshot.nodes.filter((n) => !n.hidden).map((n) => [n.id, n])
14619
+ );
14620
+ const centreOf = (n) => {
14621
+ const w = n.width ?? DEFAULT_NODE_WIDTH3;
14622
+ const h = n.height ?? DEFAULT_NODE_HEIGHT3;
14623
+ return { x: n.position.x + w / 2, y: n.position.y + h / 2 };
14624
+ };
14508
14625
  return liveSnapshot.edges.flatMap((e) => {
14626
+ if (e.hidden) return [];
14509
14627
  const s = nodeIndex.get(e.source);
14510
14628
  const t = nodeIndex.get(e.target);
14511
14629
  if (!s || !t) return [];
14512
- return [
14513
- {
14514
- from: { x: s.x + s.width / 2, y: s.y + s.height / 2 },
14515
- to: { x: t.x + t.width / 2, y: t.y + t.height / 2 }
14516
- }
14517
- ];
14630
+ const srcDesc = handleRegistry?.resolve(
14631
+ s.id,
14632
+ "source",
14633
+ e.sourceHandle ?? "default"
14634
+ );
14635
+ const tgtDesc = handleRegistry?.resolve(
14636
+ t.id,
14637
+ "target",
14638
+ e.targetHandle ?? "default"
14639
+ );
14640
+ const from = srcDesc ? handleCentre(s, srcDesc.side, srcDesc.index, srcDesc.total) : (
14641
+ // Fallback: source defaults to bottom centre (matches the
14642
+ // canvas's source default before any Handle registers).
14643
+ s.sourcePosition ? handleCentre(s, s.sourcePosition, 0, 1) : centreOf(s)
14644
+ );
14645
+ const to = tgtDesc ? handleCentre(t, tgtDesc.side, tgtDesc.index, tgtDesc.total) : (
14646
+ // Fallback: target defaults to top centre.
14647
+ t.targetPosition ? handleCentre(t, t.targetPosition, 0, 1) : centreOf(t)
14648
+ );
14649
+ return [{ from, to }];
14518
14650
  });
14519
- }, [edgesProp, liveSnapshot, resolvedNodes]);
14520
- const minimapRef = (0, import_react71.useRef)(null);
14521
- const [canvasSize, setCanvasSize] = (0, import_react71.useState)(null);
14522
- (0, import_react71.useEffect)(() => {
14651
+ }, [edgesProp, liveSnapshot, handleRegistry, registryVersion]);
14652
+ const minimapRef = (0, import_react72.useRef)(null);
14653
+ const [canvasSize, setCanvasSize] = (0, import_react72.useState)(null);
14654
+ (0, import_react72.useEffect)(() => {
14523
14655
  if (!liveSnapshot) return;
14524
14656
  const el = minimapRef.current?.closest(".ods-flow-canvas-v2");
14525
14657
  if (!el) return;
@@ -14532,7 +14664,7 @@ function FlowMinimap(props) {
14532
14664
  ro.observe(el);
14533
14665
  return () => ro.disconnect();
14534
14666
  }, [liveSnapshot !== null]);
14535
- const effectiveViewportRect = (0, import_react71.useMemo)(() => {
14667
+ const effectiveViewportRect = (0, import_react72.useMemo)(() => {
14536
14668
  if (viewportRectProp) return viewportRectProp;
14537
14669
  if (!liveSnapshot || !canvasSize) return null;
14538
14670
  const vp = liveSnapshot.viewport;
@@ -14544,7 +14676,7 @@ function FlowMinimap(props) {
14544
14676
  height: canvasSize.height / z
14545
14677
  };
14546
14678
  }, [viewportRectProp, liveSnapshot, canvasSize]);
14547
- const contentBounds = (0, import_react71.useMemo)(() => {
14679
+ const contentBounds = (0, import_react72.useMemo)(() => {
14548
14680
  if (resolvedNodes.length === 0) return null;
14549
14681
  let minX = Number.POSITIVE_INFINITY;
14550
14682
  let minY = Number.POSITIVE_INFINITY;
@@ -14558,7 +14690,7 @@ function FlowMinimap(props) {
14558
14690
  }
14559
14691
  return { minX, minY, maxX, maxY };
14560
14692
  }, [resolvedNodes]);
14561
- const viewBox = (0, import_react71.useMemo)(() => {
14693
+ const viewBox = (0, import_react72.useMemo)(() => {
14562
14694
  if (totalWidthProp !== void 0 && totalHeightProp !== void 0) {
14563
14695
  return { x: 0, y: 0, w: totalWidthProp, h: totalHeightProp };
14564
14696
  }
@@ -14573,7 +14705,7 @@ function FlowMinimap(props) {
14573
14705
  h: maxY - minY + bounds_padding * 2
14574
14706
  };
14575
14707
  }, [totalWidthProp, totalHeightProp, contentBounds, bounds_padding]);
14576
- const clampWorldTopLeft = (0, import_react71.useCallback)(
14708
+ const clampWorldTopLeft = (0, import_react72.useCallback)(
14577
14709
  (worldX, worldY, vw, vh) => {
14578
14710
  if (!contentBounds) return { x: worldX, y: worldY };
14579
14711
  const minTLX = viewBox.x;
@@ -14586,7 +14718,7 @@ function FlowMinimap(props) {
14586
14718
  },
14587
14719
  [contentBounds, viewBox.x, viewBox.y, viewBox.w, viewBox.h]
14588
14720
  );
14589
- const reportViewportChange = (0, import_react71.useCallback)(
14721
+ const reportViewportChange = (0, import_react72.useCallback)(
14590
14722
  (worldX, worldY) => {
14591
14723
  if (effectiveViewportRect) {
14592
14724
  const clamped = clampWorldTopLeft(
@@ -14621,8 +14753,8 @@ function FlowMinimap(props) {
14621
14753
  },
14622
14754
  [onViewportChange, viewportProp?.zoom, instance, liveSnapshot, effectiveViewportRect, clampWorldTopLeft]
14623
14755
  );
14624
- const svgRef = (0, import_react71.useRef)(null);
14625
- const pointToWorld = (0, import_react71.useCallback)(
14756
+ const svgRef = (0, import_react72.useRef)(null);
14757
+ const pointToWorld = (0, import_react72.useCallback)(
14626
14758
  (clientX, clientY) => {
14627
14759
  const svg = svgRef.current;
14628
14760
  if (!svg) return null;
@@ -14637,7 +14769,7 @@ function FlowMinimap(props) {
14637
14769
  },
14638
14770
  [viewBox.x, viewBox.y, viewBox.w, viewBox.h]
14639
14771
  );
14640
- const dragRef = (0, import_react71.useRef)({
14772
+ const dragRef = (0, import_react72.useRef)({
14641
14773
  dragging: false,
14642
14774
  pointerId: -1,
14643
14775
  startWorldX: 0,
@@ -14647,9 +14779,9 @@ function FlowMinimap(props) {
14647
14779
  startClientX: 0,
14648
14780
  startClientY: 0
14649
14781
  });
14650
- const suppressNextClickRef = (0, import_react71.useRef)(false);
14651
- const [isDragging, setIsDragging] = (0, import_react71.useState)(false);
14652
- const onViewportPointerDown = (0, import_react71.useCallback)(
14782
+ const suppressNextClickRef = (0, import_react72.useRef)(false);
14783
+ const [isDragging, setIsDragging] = (0, import_react72.useState)(false);
14784
+ const onViewportPointerDown = (0, import_react72.useCallback)(
14653
14785
  (e) => {
14654
14786
  if (!effectiveViewportRect) return;
14655
14787
  e.stopPropagation();
@@ -14671,7 +14803,7 @@ function FlowMinimap(props) {
14671
14803
  },
14672
14804
  [effectiveViewportRect, pointToWorld]
14673
14805
  );
14674
- const onSvgPointerMove = (0, import_react71.useCallback)(
14806
+ const onSvgPointerMove = (0, import_react72.useCallback)(
14675
14807
  (e) => {
14676
14808
  const d = dragRef.current;
14677
14809
  if (!d.dragging || d.pointerId !== e.pointerId) return;
@@ -14687,7 +14819,7 @@ function FlowMinimap(props) {
14687
14819
  },
14688
14820
  [pointToWorld, reportViewportChange]
14689
14821
  );
14690
- const onSvgPointerUp = (0, import_react71.useCallback)((e) => {
14822
+ const onSvgPointerUp = (0, import_react72.useCallback)((e) => {
14691
14823
  const d = dragRef.current;
14692
14824
  if (d.dragging && d.pointerId === e.pointerId) {
14693
14825
  d.dragging = false;
@@ -14696,7 +14828,7 @@ function FlowMinimap(props) {
14696
14828
  e.currentTarget.releasePointerCapture?.(e.pointerId);
14697
14829
  }
14698
14830
  }, []);
14699
- const handleSvgClick = (0, import_react71.useCallback)(
14831
+ const handleSvgClick = (0, import_react72.useCallback)(
14700
14832
  (e) => {
14701
14833
  if (suppressNextClickRef.current) {
14702
14834
  suppressNextClickRef.current = false;
@@ -14714,7 +14846,7 @@ function FlowMinimap(props) {
14714
14846
  },
14715
14847
  [pointToWorld, effectiveViewportRect, reportViewportChange]
14716
14848
  );
14717
- const handleWheel = (0, import_react71.useCallback)(
14849
+ const handleWheel = (0, import_react72.useCallback)(
14718
14850
  (e) => {
14719
14851
  if (!zoomOnScroll) return;
14720
14852
  if (!instance || !liveSnapshot) return;
@@ -14740,7 +14872,7 @@ function FlowMinimap(props) {
14740
14872
  },
14741
14873
  [zoomOnScroll, instance, liveSnapshot, canvasSize, pointToWorld, clampWorldTopLeft]
14742
14874
  );
14743
- (0, import_react71.useEffect)(
14875
+ (0, import_react72.useEffect)(
14744
14876
  () => () => {
14745
14877
  dragRef.current.dragging = false;
14746
14878
  },
@@ -14818,14 +14950,14 @@ function FlowMinimap(props) {
14818
14950
 
14819
14951
  // src/components/FlowToolbar/FlowToolbar.tsx
14820
14952
  var import_icons19 = require("@octaviaflow/icons");
14821
- var import_react74 = require("react");
14953
+ var import_react75 = require("react");
14822
14954
 
14823
14955
  // src/workflow/store/selectors.ts
14824
- var import_react72 = require("react");
14956
+ var import_react73 = require("react");
14825
14957
  function useFlowSelector(selector, isEqual = Object.is) {
14826
14958
  void isEqual;
14827
14959
  const store = useFlowStore();
14828
- return (0, import_react72.useSyncExternalStore)(
14960
+ return (0, import_react73.useSyncExternalStore)(
14829
14961
  store.subscribe,
14830
14962
  () => selector(store.getSnapshot()),
14831
14963
  () => selector(store.getSnapshot())
@@ -14838,8 +14970,8 @@ var VIEWPORT_OR_NULL_NO_STORE_SUBSCRIBE = (_cb) => () => {
14838
14970
  };
14839
14971
  var VIEWPORT_OR_NULL_NO_STORE_SNAPSHOT = () => null;
14840
14972
  function useViewportOrNull() {
14841
- const store = (0, import_react72.useContext)(FlowStoreContext);
14842
- const { sub, snap } = (0, import_react72.useMemo)(
14973
+ const store = (0, import_react73.useContext)(FlowStoreContext);
14974
+ const { sub, snap } = (0, import_react73.useMemo)(
14843
14975
  () => store ? {
14844
14976
  sub: store.subscribe,
14845
14977
  snap: () => store.getSnapshot().viewport
@@ -14849,11 +14981,11 @@ function useViewportOrNull() {
14849
14981
  },
14850
14982
  [store]
14851
14983
  );
14852
- return (0, import_react72.useSyncExternalStore)(sub, snap, snap);
14984
+ return (0, import_react73.useSyncExternalStore)(sub, snap, snap);
14853
14985
  }
14854
14986
 
14855
14987
  // src/components/Spinner/Spinner.tsx
14856
- var import_react73 = require("react");
14988
+ var import_react74 = require("react");
14857
14989
  var import_jsx_runtime53 = require("react/jsx-runtime");
14858
14990
  var SIZE_PX = {
14859
14991
  sm: 16,
@@ -14861,7 +14993,7 @@ var SIZE_PX = {
14861
14993
  lg: 32,
14862
14994
  xl: 48
14863
14995
  };
14864
- var Spinner = (0, import_react73.forwardRef)(function Spinner2({
14996
+ var Spinner = (0, import_react74.forwardRef)(function Spinner2({
14865
14997
  size = "md",
14866
14998
  tone = "accent",
14867
14999
  label = "Loading",
@@ -15003,10 +15135,10 @@ function FlowToolbarSave({
15003
15135
  showLabel = false,
15004
15136
  className
15005
15137
  }) {
15006
- const [inferred, setInferred] = (0, import_react74.useState)("idle");
15007
- const prevSavedAt = (0, import_react74.useRef)(lastSavedAt);
15008
- const prevLoading = (0, import_react74.useRef)(loading);
15009
- (0, import_react74.useEffect)(() => {
15138
+ const [inferred, setInferred] = (0, import_react75.useState)("idle");
15139
+ const prevSavedAt = (0, import_react75.useRef)(lastSavedAt);
15140
+ const prevLoading = (0, import_react75.useRef)(loading);
15141
+ (0, import_react75.useEffect)(() => {
15010
15142
  if (state !== void 0) return;
15011
15143
  if (error) {
15012
15144
  setInferred("error");
@@ -15260,7 +15392,7 @@ function FormSection({
15260
15392
 
15261
15393
  // src/components/Gauge/Gauge.tsx
15262
15394
  var import_framer_motion23 = require("framer-motion");
15263
- var import_react75 = require("react");
15395
+ var import_react76 = require("react");
15264
15396
  var import_jsx_runtime56 = require("react/jsx-runtime");
15265
15397
  var defaultFormat3 = (n) => {
15266
15398
  if (Math.abs(n) >= 1e6) return `${(n / 1e6).toFixed(1)}M`;
@@ -15274,7 +15406,7 @@ function resolveBandColor(v, bands, fallback) {
15274
15406
  }
15275
15407
  return bands[bands.length - 1].color;
15276
15408
  }
15277
- var Gauge = (0, import_react75.forwardRef)(function Gauge2({
15409
+ var Gauge = (0, import_react76.forwardRef)(function Gauge2({
15278
15410
  value,
15279
15411
  min = 0,
15280
15412
  max = 100,
@@ -15294,11 +15426,11 @@ var Gauge = (0, import_react75.forwardRef)(function Gauge2({
15294
15426
  "aria-label": ariaLabel,
15295
15427
  ...rest
15296
15428
  }, ref) {
15297
- const reactId = (0, import_react75.useId)();
15429
+ const reactId = (0, import_react76.useId)();
15298
15430
  const clamped = Math.max(min, Math.min(max, value));
15299
15431
  const pct = (clamped - min) / Math.max(1e-6, max - min);
15300
15432
  const fillColor = resolveBandColor(clamped, bands, color);
15301
- const resolvedAriaLabel = (0, import_react75.useMemo)(() => {
15433
+ const resolvedAriaLabel = (0, import_react76.useMemo)(() => {
15302
15434
  if (ariaLabel) return ariaLabel;
15303
15435
  const t = typeof title === "string" ? title : "Gauge";
15304
15436
  return `${t} \u2014 ${formatValue(clamped)} of ${formatValue(max)}`;
@@ -15556,7 +15688,7 @@ function LinearVariant({
15556
15688
  }
15557
15689
 
15558
15690
  // src/components/Grid/Grid.tsx
15559
- var import_react76 = require("react");
15691
+ var import_react77 = require("react");
15560
15692
  var import_jsx_runtime57 = require("react/jsx-runtime");
15561
15693
  function resolveGap(gap) {
15562
15694
  if (gap === void 0) return void 0;
@@ -15578,7 +15710,7 @@ var ALIGN_MAP = {
15578
15710
  end: "end",
15579
15711
  stretch: "stretch"
15580
15712
  };
15581
- var GridBase = (0, import_react76.forwardRef)(function Grid({
15713
+ var GridBase = (0, import_react77.forwardRef)(function Grid({
15582
15714
  columns = 12,
15583
15715
  minColumnWidth = "240px",
15584
15716
  gap = 4,
@@ -15613,7 +15745,7 @@ var GridBase = (0, import_react76.forwardRef)(function Grid({
15613
15745
  );
15614
15746
  });
15615
15747
  GridBase.displayName = "Grid";
15616
- var GridItem = (0, import_react76.forwardRef)(
15748
+ var GridItem = (0, import_react77.forwardRef)(
15617
15749
  function GridItem2({ colSpan, rowSpan, colStart, rowStart, as, className, style, children, ...rest }, ref) {
15618
15750
  const Component = as ?? "div";
15619
15751
  return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
@@ -15639,7 +15771,7 @@ var Grid2 = Object.assign(GridBase, { Item: GridItem });
15639
15771
 
15640
15772
  // src/components/Heatmap/Heatmap.tsx
15641
15773
  var import_framer_motion24 = require("framer-motion");
15642
- var import_react77 = require("react");
15774
+ var import_react78 = require("react");
15643
15775
  var import_jsx_runtime58 = require("react/jsx-runtime");
15644
15776
  var DEFAULT_SCALE2 = [
15645
15777
  "var(--ods-accent-soft)",
@@ -15663,7 +15795,7 @@ function bucketColor2(value, lo, hi, scale) {
15663
15795
  const i = bucketIndex(value, lo, hi, scale.length);
15664
15796
  return i < 0 ? "transparent" : scale[i];
15665
15797
  }
15666
- var Heatmap = (0, import_react77.forwardRef)(
15798
+ var Heatmap = (0, import_react78.forwardRef)(
15667
15799
  function Heatmap2({
15668
15800
  data,
15669
15801
  xLabels,
@@ -15689,37 +15821,37 @@ var Heatmap = (0, import_react77.forwardRef)(
15689
15821
  onCellClick,
15690
15822
  ...rest
15691
15823
  }, ref) {
15692
- const reactId = (0, import_react77.useId)();
15693
- const xs = (0, import_react77.useMemo)(() => {
15824
+ const reactId = (0, import_react78.useId)();
15825
+ const xs = (0, import_react78.useMemo)(() => {
15694
15826
  if (xLabels) return xLabels;
15695
15827
  return Array.from(new Set(data.map((d) => d.x)));
15696
15828
  }, [xLabels, data]);
15697
- const ys = (0, import_react77.useMemo)(() => {
15829
+ const ys = (0, import_react78.useMemo)(() => {
15698
15830
  if (yLabels) return yLabels;
15699
15831
  return Array.from(new Set(data.map((d) => d.y)));
15700
15832
  }, [yLabels, data]);
15701
- const cellMap = (0, import_react77.useMemo)(() => {
15833
+ const cellMap = (0, import_react78.useMemo)(() => {
15702
15834
  const m = /* @__PURE__ */ new Map();
15703
15835
  for (const c of data) m.set(`${c.x}|${c.y}`, c);
15704
15836
  return m;
15705
15837
  }, [data]);
15706
- const vMin = (0, import_react77.useMemo)(
15838
+ const vMin = (0, import_react78.useMemo)(
15707
15839
  () => domainMin ?? (data.length ? Math.min(...data.map((d) => d.value)) : 0),
15708
15840
  [domainMin, data]
15709
15841
  );
15710
- const vMax = (0, import_react77.useMemo)(
15842
+ const vMax = (0, import_react78.useMemo)(
15711
15843
  () => domainMax ?? (data.length ? Math.max(...data.map((d) => d.value)) : 1),
15712
15844
  [domainMax, data]
15713
15845
  );
15714
- const [hovered, setHovered] = (0, import_react77.useState)(null);
15715
- const fire = (0, import_react77.useCallback)(
15846
+ const [hovered, setHovered] = (0, import_react78.useState)(null);
15847
+ const fire = (0, import_react78.useCallback)(
15716
15848
  (cell) => {
15717
15849
  setHovered(cell);
15718
15850
  onCellHover?.(cell);
15719
15851
  },
15720
15852
  [onCellHover]
15721
15853
  );
15722
- const handleKey = (0, import_react77.useCallback)(
15854
+ const handleKey = (0, import_react78.useCallback)(
15723
15855
  (e, cell) => {
15724
15856
  if (!onCellClick) return;
15725
15857
  if (e.key === "Enter" || e.key === " ") {
@@ -15729,7 +15861,7 @@ var Heatmap = (0, import_react77.forwardRef)(
15729
15861
  },
15730
15862
  [onCellClick]
15731
15863
  );
15732
- const resolvedAriaLabel = (0, import_react77.useMemo)(() => {
15864
+ const resolvedAriaLabel = (0, import_react78.useMemo)(() => {
15733
15865
  if (ariaLabel) return ariaLabel;
15734
15866
  const t = typeof title === "string" ? title : "Heatmap";
15735
15867
  return `${t} \u2014 ${xs.length}\xD7${ys.length} grid, ${data.length} cells, range ${formatValue(vMin)} to ${formatValue(vMax)}`;
@@ -15892,7 +16024,7 @@ var Heatmap = (0, import_react77.forwardRef)(
15892
16024
  Heatmap.displayName = "Heatmap";
15893
16025
 
15894
16026
  // src/components/HoverCard/HoverCard.tsx
15895
- var import_react78 = require("react");
16027
+ var import_react79 = require("react");
15896
16028
  var import_react_dom9 = require("react-dom");
15897
16029
  var import_jsx_runtime59 = require("react/jsx-runtime");
15898
16030
  function computePosition3(rect, panelRect, placement, offset) {
@@ -15918,12 +16050,12 @@ function HoverCard({
15918
16050
  children,
15919
16051
  className
15920
16052
  }) {
15921
- const [open, setOpen] = (0, import_react78.useState)(false);
15922
- const triggerRef = (0, import_react78.useRef)(null);
15923
- const panelRef = (0, import_react78.useRef)(null);
15924
- const openTimer = (0, import_react78.useRef)(null);
15925
- const closeTimer = (0, import_react78.useRef)(null);
15926
- const [coords, setCoords] = (0, import_react78.useState)(null);
16053
+ const [open, setOpen] = (0, import_react79.useState)(false);
16054
+ const triggerRef = (0, import_react79.useRef)(null);
16055
+ const panelRef = (0, import_react79.useRef)(null);
16056
+ const openTimer = (0, import_react79.useRef)(null);
16057
+ const closeTimer = (0, import_react79.useRef)(null);
16058
+ const [coords, setCoords] = (0, import_react79.useState)(null);
15927
16059
  const clearTimers = () => {
15928
16060
  if (openTimer.current) {
15929
16061
  clearTimeout(openTimer.current);
@@ -15934,7 +16066,7 @@ function HoverCard({
15934
16066
  closeTimer.current = null;
15935
16067
  }
15936
16068
  };
15937
- (0, import_react78.useEffect)(() => () => clearTimers(), []);
16069
+ (0, import_react79.useEffect)(() => () => clearTimers(), []);
15938
16070
  const show = () => {
15939
16071
  clearTimers();
15940
16072
  openTimer.current = setTimeout(() => setOpen(true), openDelay);
@@ -15943,19 +16075,19 @@ function HoverCard({
15943
16075
  clearTimers();
15944
16076
  closeTimer.current = setTimeout(() => setOpen(false), closeDelay);
15945
16077
  };
15946
- const reposition = (0, import_react78.useCallback)(() => {
16078
+ const reposition = (0, import_react79.useCallback)(() => {
15947
16079
  if (!triggerRef.current || !panelRef.current) return;
15948
16080
  const trigRect = triggerRef.current.getBoundingClientRect();
15949
16081
  const panelRect = panelRef.current.getBoundingClientRect();
15950
16082
  setCoords(computePosition3(trigRect, panelRect, placement, offset));
15951
16083
  }, [placement, offset]);
15952
- (0, import_react78.useLayoutEffect)(() => {
16084
+ (0, import_react79.useLayoutEffect)(() => {
15953
16085
  if (!open) return;
15954
16086
  reposition();
15955
16087
  const id = requestAnimationFrame(reposition);
15956
16088
  return () => cancelAnimationFrame(id);
15957
16089
  }, [open, reposition]);
15958
- (0, import_react78.useEffect)(() => {
16090
+ (0, import_react79.useEffect)(() => {
15959
16091
  if (!open) return;
15960
16092
  const h = () => reposition();
15961
16093
  window.addEventListener("scroll", h, true);
@@ -16006,9 +16138,9 @@ function HoverCard({
16006
16138
  }
16007
16139
 
16008
16140
  // src/components/IconCard/IconCard.tsx
16009
- var import_react79 = require("react");
16141
+ var import_react80 = require("react");
16010
16142
  var import_jsx_runtime60 = require("react/jsx-runtime");
16011
- var IconCard = (0, import_react79.forwardRef)(
16143
+ var IconCard = (0, import_react80.forwardRef)(
16012
16144
  function IconCard2({
16013
16145
  variant = "default",
16014
16146
  size = "md",
@@ -16026,7 +16158,7 @@ var IconCard = (0, import_react79.forwardRef)(
16026
16158
  className,
16027
16159
  ...rest
16028
16160
  }, ref) {
16029
- const reactId = (0, import_react79.useId)();
16161
+ const reactId = (0, import_react80.useId)();
16030
16162
  const baseId = providedId ?? `ods-icon-card-${reactId}`;
16031
16163
  const titleId = `${baseId}-title`;
16032
16164
  const descId = description ? `${baseId}-desc` : void 0;
@@ -16109,10 +16241,10 @@ IconCard.displayName = "IconCard";
16109
16241
 
16110
16242
  // src/components/Input/Input.tsx
16111
16243
  var import_icons20 = require("@octaviaflow/icons");
16112
- var import_react80 = require("react");
16244
+ var import_react81 = require("react");
16113
16245
  var import_jsx_runtime61 = require("react/jsx-runtime");
16114
16246
  var CLEAR_GLYPH = /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_icons20.CloseIcon, { width: 12, height: 12, "aria-hidden": "true" });
16115
- var Input = (0, import_react80.forwardRef)(
16247
+ var Input = (0, import_react81.forwardRef)(
16116
16248
  ({
16117
16249
  type = "text",
16118
16250
  size = "md",
@@ -16135,9 +16267,9 @@ var Input = (0, import_react80.forwardRef)(
16135
16267
  onKeyDown,
16136
16268
  ...props
16137
16269
  }, forwardedRef) => {
16138
- const innerRef = (0, import_react80.useRef)(null);
16139
- (0, import_react80.useImperativeHandle)(forwardedRef, () => innerRef.current);
16140
- const reactId = (0, import_react80.useId)();
16270
+ const innerRef = (0, import_react81.useRef)(null);
16271
+ (0, import_react81.useImperativeHandle)(forwardedRef, () => innerRef.current);
16272
+ const reactId = (0, import_react81.useId)();
16141
16273
  const inputId = id ?? `${reactId}-input`;
16142
16274
  const errorId = `${reactId}-err`;
16143
16275
  const helperId = `${reactId}-help`;
@@ -16238,7 +16370,7 @@ var Input = (0, import_react80.forwardRef)(
16238
16370
  Input.displayName = "Input";
16239
16371
 
16240
16372
  // src/components/IntegrationCard/IntegrationCard.tsx
16241
- var import_react81 = require("react");
16373
+ var import_react82 = require("react");
16242
16374
  var import_jsx_runtime62 = require("react/jsx-runtime");
16243
16375
  var CATEGORY_LABEL = {
16244
16376
  communication: "Communication",
@@ -16258,7 +16390,7 @@ var STATUS_LABEL4 = {
16258
16390
  "coming-soon": "Coming soon",
16259
16391
  deprecated: "Deprecated"
16260
16392
  };
16261
- var IntegrationCard = (0, import_react81.forwardRef)(function IntegrationCard2({
16393
+ var IntegrationCard = (0, import_react82.forwardRef)(function IntegrationCard2({
16262
16394
  name,
16263
16395
  nameAs = "h3",
16264
16396
  logo,
@@ -16282,7 +16414,7 @@ var IntegrationCard = (0, import_react81.forwardRef)(function IntegrationCard2({
16282
16414
  className,
16283
16415
  ...rest
16284
16416
  }, ref) {
16285
- const reactId = (0, import_react81.useId)();
16417
+ const reactId = (0, import_react82.useId)();
16286
16418
  const baseId = providedId ?? `ods-integration-card-${reactId}`;
16287
16419
  const nameId = `${baseId}-name`;
16288
16420
  const descId = description ? `${baseId}-desc` : void 0;
@@ -16454,9 +16586,9 @@ IntegrationCard.displayName = "IntegrationCard";
16454
16586
 
16455
16587
  // src/components/JsonViewer/JsonViewer.tsx
16456
16588
  var import_icons21 = require("@octaviaflow/icons");
16457
- var import_react82 = require("react");
16589
+ var import_react83 = require("react");
16458
16590
  var import_jsx_runtime63 = require("react/jsx-runtime");
16459
- var JsonViewer = (0, import_react82.forwardRef)(
16591
+ var JsonViewer = (0, import_react83.forwardRef)(
16460
16592
  function JsonViewer2({
16461
16593
  data,
16462
16594
  mode = "view",
@@ -16504,11 +16636,11 @@ function JsonNode({
16504
16636
  truncateAt,
16505
16637
  isLast = true
16506
16638
  }) {
16507
- const [open, setOpen] = (0, import_react82.useState)(depth < defaultExpandDepth);
16639
+ const [open, setOpen] = (0, import_react83.useState)(depth < defaultExpandDepth);
16508
16640
  const isObject = value !== null && typeof value === "object" && !Array.isArray(value);
16509
16641
  const isArray = Array.isArray(value);
16510
16642
  const isContainer = isObject || isArray;
16511
- const renderKey = (0, import_react82.useMemo)(() => {
16643
+ const renderKey = (0, import_react83.useMemo)(() => {
16512
16644
  if (name === void 0) return null;
16513
16645
  if (typeof name === "number") {
16514
16646
  return showIndexes ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "ods-json-viewer__key ods-json-viewer__key--index", children: name }) : null;
@@ -16595,7 +16727,7 @@ function Leaf({
16595
16727
  truncateAt,
16596
16728
  copyable
16597
16729
  }) {
16598
- const [copied, setCopied] = (0, import_react82.useState)(false);
16730
+ const [copied, setCopied] = (0, import_react83.useState)(false);
16599
16731
  let display;
16600
16732
  let variant;
16601
16733
  if (value === null) {
@@ -16674,15 +16806,15 @@ function extractJsonErrorPosition(err, text) {
16674
16806
  return { line: 1, col: 1, message };
16675
16807
  }
16676
16808
  function JsonEditBody({ data, onChange, onValidate }) {
16677
- const initial = (0, import_react82.useMemo)(() => {
16809
+ const initial = (0, import_react83.useMemo)(() => {
16678
16810
  try {
16679
16811
  return JSON.stringify(data, null, 2);
16680
16812
  } catch {
16681
16813
  return "{}";
16682
16814
  }
16683
16815
  }, []);
16684
- const [text, setText] = (0, import_react82.useState)(initial);
16685
- const [parseError, setParseError] = (0, import_react82.useState)(null);
16816
+ const [text, setText] = (0, import_react83.useState)(initial);
16817
+ const [parseError, setParseError] = (0, import_react83.useState)(null);
16686
16818
  const validate = (next) => {
16687
16819
  try {
16688
16820
  JSON.parse(next);
@@ -16699,7 +16831,7 @@ function JsonEditBody({ data, onChange, onValidate }) {
16699
16831
  onChange?.(next);
16700
16832
  validate(next);
16701
16833
  };
16702
- (0, import_react82.useEffect)(() => {
16834
+ (0, import_react83.useEffect)(() => {
16703
16835
  validate(initial);
16704
16836
  }, []);
16705
16837
  return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "ods-json-viewer__edit", children: [
@@ -16736,12 +16868,12 @@ function JsonEditBody({ data, onChange, onValidate }) {
16736
16868
 
16737
16869
  // src/components/KanbanCard/KanbanCard.tsx
16738
16870
  var import_icons22 = require("@octaviaflow/icons");
16739
- var import_react83 = require("react");
16871
+ var import_react84 = require("react");
16740
16872
  var import_jsx_runtime64 = require("react/jsx-runtime");
16741
16873
  function isAssigneeObject(v) {
16742
16874
  return typeof v === "object" && v !== null && "name" in v;
16743
16875
  }
16744
- var KanbanCard = (0, import_react83.forwardRef)(
16876
+ var KanbanCard = (0, import_react84.forwardRef)(
16745
16877
  function KanbanCard2({
16746
16878
  title,
16747
16879
  titleAs = "h3",
@@ -16762,7 +16894,7 @@ var KanbanCard = (0, import_react83.forwardRef)(
16762
16894
  className,
16763
16895
  ...rest
16764
16896
  }, ref) {
16765
- const reactId = (0, import_react83.useId)();
16897
+ const reactId = (0, import_react84.useId)();
16766
16898
  const baseId = providedId ?? `ods-kanban-card-${reactId}`;
16767
16899
  const titleId = `${baseId}-title`;
16768
16900
  const tagList = tags ?? (tag ? [tag] : []);
@@ -16882,9 +17014,9 @@ var KanbanCard = (0, import_react83.forwardRef)(
16882
17014
  KanbanCard.displayName = "KanbanCard";
16883
17015
 
16884
17016
  // src/components/Kbd/Kbd.tsx
16885
- var import_react84 = require("react");
17017
+ var import_react85 = require("react");
16886
17018
  var import_jsx_runtime65 = require("react/jsx-runtime");
16887
- var Kbd = (0, import_react84.forwardRef)(function Kbd2({ size = "md", children, className, ...rest }, ref) {
17019
+ var Kbd = (0, import_react85.forwardRef)(function Kbd2({ size = "md", children, className, ...rest }, ref) {
16888
17020
  return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
16889
17021
  "kbd",
16890
17022
  {
@@ -16896,7 +17028,7 @@ var Kbd = (0, import_react84.forwardRef)(function Kbd2({ size = "md", children,
16896
17028
  );
16897
17029
  });
16898
17030
  Kbd.displayName = "Kbd";
16899
- var KbdGroup = (0, import_react84.forwardRef)(
17031
+ var KbdGroup = (0, import_react85.forwardRef)(
16900
17032
  function KbdGroup2({ size = "md", separator = "+", keys, className, ...rest }, ref) {
16901
17033
  return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
16902
17034
  "span",
@@ -16920,7 +17052,7 @@ KbdGroup.displayName = "KbdGroup";
16920
17052
 
16921
17053
  // src/components/LineChart/LineChart.tsx
16922
17054
  var import_framer_motion25 = require("framer-motion");
16923
- var import_react85 = require("react");
17055
+ var import_react86 = require("react");
16924
17056
  var import_jsx_runtime66 = require("react/jsx-runtime");
16925
17057
  var defaultFormat5 = (n) => {
16926
17058
  if (Math.abs(n) >= 1e6) return `${(n / 1e6).toFixed(1)}M`;
@@ -16955,7 +17087,7 @@ function buildTicks2(min, max, count) {
16955
17087
  var W = 360;
16956
17088
  var H = 100;
16957
17089
  var PAD = 6;
16958
- var LineChart = (0, import_react85.forwardRef)(
17090
+ var LineChart = (0, import_react86.forwardRef)(
16959
17091
  function LineChart2({
16960
17092
  data,
16961
17093
  series,
@@ -16984,8 +17116,8 @@ var LineChart = (0, import_react85.forwardRef)(
16984
17116
  onZoomChange,
16985
17117
  ...rest
16986
17118
  }, ref) {
16987
- const reactId = (0, import_react85.useId)();
16988
- const allLines = (0, import_react85.useMemo)(() => {
17119
+ const reactId = (0, import_react86.useId)();
17120
+ const allLines = (0, import_react86.useMemo)(() => {
16989
17121
  if (series && series.length > 0) return series;
16990
17122
  return [
16991
17123
  {
@@ -16997,25 +17129,25 @@ var LineChart = (0, import_react85.forwardRef)(
16997
17129
  }
16998
17130
  ];
16999
17131
  }, [series, data, stroke, fill]);
17000
- const [zoom, setZoom] = (0, import_react85.useState)(
17132
+ const [zoom, setZoom] = (0, import_react86.useState)(
17001
17133
  null
17002
17134
  );
17003
17135
  const totalX = allLines[0]?.data.length ?? 0;
17004
17136
  const visibleRange = zoom ?? { start: 0, end: Math.max(0, totalX - 1) };
17005
- const lines = (0, import_react85.useMemo)(
17137
+ const lines = (0, import_react86.useMemo)(
17006
17138
  () => allLines.map((s) => ({
17007
17139
  ...s,
17008
17140
  data: s.data.slice(visibleRange.start, visibleRange.end + 1)
17009
17141
  })),
17010
17142
  [allLines, visibleRange.start, visibleRange.end]
17011
17143
  );
17012
- const xLabels = (0, import_react85.useMemo)(
17144
+ const xLabels = (0, import_react86.useMemo)(
17013
17145
  () => lines[0]?.data.map((p) => p.x) ?? [],
17014
17146
  [lines]
17015
17147
  );
17016
17148
  const xCount = xLabels.length;
17017
17149
  const stepX = (W - PAD * 2) / Math.max(1, xCount - 1);
17018
- const allYs = (0, import_react85.useMemo)(
17150
+ const allYs = (0, import_react86.useMemo)(
17019
17151
  () => lines.flatMap((s) => s.data.map((p) => p.y)),
17020
17152
  [lines]
17021
17153
  );
@@ -17023,7 +17155,7 @@ var LineChart = (0, import_react85.forwardRef)(
17023
17155
  const dataMax = allYs.length ? Math.max(...allYs) : 1;
17024
17156
  const lo = yMin ?? Math.min(0, dataMin);
17025
17157
  const hi = Math.max(lo + 1, yMax ?? dataMax);
17026
- const projected = (0, import_react85.useMemo)(
17158
+ const projected = (0, import_react86.useMemo)(
17027
17159
  () => lines.map(
17028
17160
  (s) => s.data.map(
17029
17161
  (p, i) => [
@@ -17034,15 +17166,15 @@ var LineChart = (0, import_react85.forwardRef)(
17034
17166
  ),
17035
17167
  [lines, stepX, lo, hi]
17036
17168
  );
17037
- const ticks = (0, import_react85.useMemo)(
17169
+ const ticks = (0, import_react86.useMemo)(
17038
17170
  () => buildTicks2(lo, hi, Math.max(2, yTicks)),
17039
17171
  [lo, hi, yTicks]
17040
17172
  );
17041
- const [hoveredIdx, setHoveredIdx] = (0, import_react85.useState)(null);
17042
- const [pointerPct, setPointerPct] = (0, import_react85.useState)(null);
17043
- const plotRef = (0, import_react85.useRef)(null);
17044
- const [brush, setBrush] = (0, import_react85.useState)(null);
17045
- const indexFromPct = (0, import_react85.useCallback)(
17173
+ const [hoveredIdx, setHoveredIdx] = (0, import_react86.useState)(null);
17174
+ const [pointerPct, setPointerPct] = (0, import_react86.useState)(null);
17175
+ const plotRef = (0, import_react86.useRef)(null);
17176
+ const [brush, setBrush] = (0, import_react86.useState)(null);
17177
+ const indexFromPct = (0, import_react86.useCallback)(
17046
17178
  (pct) => {
17047
17179
  if (xCount === 0) return 0;
17048
17180
  return Math.max(
@@ -17052,7 +17184,7 @@ var LineChart = (0, import_react85.forwardRef)(
17052
17184
  },
17053
17185
  [xCount]
17054
17186
  );
17055
- const handlePlotMove = (0, import_react85.useCallback)(
17187
+ const handlePlotMove = (0, import_react86.useCallback)(
17056
17188
  (e) => {
17057
17189
  if (xCount === 0) return;
17058
17190
  const rect = plotRef.current?.getBoundingClientRect();
@@ -17081,12 +17213,12 @@ var LineChart = (0, import_react85.forwardRef)(
17081
17213
  visibleRange.start
17082
17214
  ]
17083
17215
  );
17084
- const handlePlotLeave = (0, import_react85.useCallback)(() => {
17216
+ const handlePlotLeave = (0, import_react86.useCallback)(() => {
17085
17217
  setHoveredIdx(null);
17086
17218
  setPointerPct(null);
17087
17219
  onPointHover?.(null, null, null);
17088
17220
  }, [onPointHover]);
17089
- const handlePlotDown = (0, import_react85.useCallback)(
17221
+ const handlePlotDown = (0, import_react86.useCallback)(
17090
17222
  (e) => {
17091
17223
  if (!zoomable) return;
17092
17224
  const rect = plotRef.current?.getBoundingClientRect();
@@ -17099,7 +17231,7 @@ var LineChart = (0, import_react85.forwardRef)(
17099
17231
  },
17100
17232
  [zoomable]
17101
17233
  );
17102
- (0, import_react85.useEffect)(() => {
17234
+ (0, import_react86.useEffect)(() => {
17103
17235
  if (!brush) return;
17104
17236
  const onUp = () => {
17105
17237
  const a = Math.min(brush.startPct, brush.currentPct);
@@ -17120,18 +17252,18 @@ var LineChart = (0, import_react85.forwardRef)(
17120
17252
  window.addEventListener("mouseup", onUp);
17121
17253
  return () => window.removeEventListener("mouseup", onUp);
17122
17254
  }, [brush, indexFromPct, visibleRange.start, onZoomChange]);
17123
- const handleDoubleClick = (0, import_react85.useCallback)(() => {
17255
+ const handleDoubleClick = (0, import_react86.useCallback)(() => {
17124
17256
  if (!zoomable || !zoom) return;
17125
17257
  setZoom(null);
17126
17258
  onZoomChange?.(null);
17127
17259
  }, [zoomable, zoom, onZoomChange]);
17128
- const handlePlotClick = (0, import_react85.useCallback)(() => {
17260
+ const handlePlotClick = (0, import_react86.useCallback)(() => {
17129
17261
  if (hoveredIdx === null || !onPointClick) return;
17130
17262
  const s = lines[0];
17131
17263
  const p = s?.data[hoveredIdx];
17132
17264
  if (p) onPointClick(p, s.id, visibleRange.start + hoveredIdx);
17133
17265
  }, [hoveredIdx, lines, onPointClick, visibleRange.start]);
17134
- const resolvedAriaLabel = (0, import_react85.useMemo)(() => {
17266
+ const resolvedAriaLabel = (0, import_react86.useMemo)(() => {
17135
17267
  if (ariaLabel) return ariaLabel;
17136
17268
  const titleText = typeof title === "string" ? title : "";
17137
17269
  const summary = lines.map((s) => {
@@ -17145,11 +17277,11 @@ var LineChart = (0, import_react85.forwardRef)(
17145
17277
  const showX = showAxis === "x" || showAxis === "both";
17146
17278
  const isMulti = (series?.length ?? 0) > 0;
17147
17279
  const tooltipPoint = hoveredIdx !== null ? lines[0]?.data[hoveredIdx] : void 0;
17148
- const dataXPct = (0, import_react85.useCallback)(
17280
+ const dataXPct = (0, import_react86.useCallback)(
17149
17281
  (i) => (PAD + i * stepX) / W * 100,
17150
17282
  [stepX]
17151
17283
  );
17152
- const dataYPct = (0, import_react85.useCallback)(
17284
+ const dataYPct = (0, import_react86.useCallback)(
17153
17285
  (v) => (PAD + (1 - (v - lo) / (hi - lo)) * (H - PAD * 2)) / H * 100,
17154
17286
  [lo, hi]
17155
17287
  );
@@ -17457,9 +17589,9 @@ var LineChart = (0, import_react85.forwardRef)(
17457
17589
  LineChart.displayName = "LineChart";
17458
17590
 
17459
17591
  // src/components/LinkButton/LinkButton.tsx
17460
- var import_react86 = require("react");
17592
+ var import_react87 = require("react");
17461
17593
  var import_jsx_runtime67 = require("react/jsx-runtime");
17462
- var LinkButton = (0, import_react86.forwardRef)(
17594
+ var LinkButton = (0, import_react87.forwardRef)(
17463
17595
  function LinkButton2({
17464
17596
  variant = "primary",
17465
17597
  size = "md",
@@ -17531,16 +17663,16 @@ LinkButton.displayName = "LinkButton";
17531
17663
 
17532
17664
  // src/components/MetricCard/MetricCard.tsx
17533
17665
  var import_icons23 = require("@octaviaflow/icons");
17534
- var import_react89 = require("react");
17666
+ var import_react90 = require("react");
17535
17667
 
17536
17668
  // src/components/CountUp/CountUp.tsx
17537
- var import_react87 = require("react");
17669
+ var import_react88 = require("react");
17538
17670
  var import_jsx_runtime68 = require("react/jsx-runtime");
17539
17671
  var easeLinear = (t) => t;
17540
17672
  var easeOutCubic = (t) => 1 - Math.pow(1 - t, 3);
17541
17673
  var easeOutQuart = (t) => 1 - Math.pow(1 - t, 4);
17542
17674
  var easeOutExpo = (t) => t === 1 ? 1 : 1 - Math.pow(2, -10 * t);
17543
- var CountUp = (0, import_react87.forwardRef)(
17675
+ var CountUp = (0, import_react88.forwardRef)(
17544
17676
  function CountUp2({
17545
17677
  value,
17546
17678
  from = 0,
@@ -17556,9 +17688,9 @@ var CountUp = (0, import_react87.forwardRef)(
17556
17688
  className,
17557
17689
  ...rest
17558
17690
  }, ref) {
17559
- const [n, setN] = (0, import_react87.useState)(disableAnimation ? value : from);
17560
- const lastRendered = (0, import_react87.useRef)(disableAnimation ? value : from);
17561
- (0, import_react87.useEffect)(() => {
17691
+ const [n, setN] = (0, import_react88.useState)(disableAnimation ? value : from);
17692
+ const lastRendered = (0, import_react88.useRef)(disableAnimation ? value : from);
17693
+ (0, import_react88.useEffect)(() => {
17562
17694
  const reduced = typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
17563
17695
  if (disableAnimation || reduced) {
17564
17696
  setN(value);
@@ -17625,7 +17757,7 @@ CountUp.displayName = "CountUp";
17625
17757
 
17626
17758
  // src/components/Sparkline/Sparkline.tsx
17627
17759
  var import_framer_motion26 = require("framer-motion");
17628
- var import_react88 = require("react");
17760
+ var import_react89 = require("react");
17629
17761
  var import_jsx_runtime69 = require("react/jsx-runtime");
17630
17762
  var defaultFormat6 = (n) => {
17631
17763
  if (Math.abs(n) >= 1e6) return `${(n / 1e6).toFixed(1)}M`;
@@ -17650,7 +17782,7 @@ function buildSmoothPath(pts) {
17650
17782
  function buildLinePath(pts) {
17651
17783
  return `M${pts[0][0]},${pts[0][1]}` + pts.slice(1).map(([x, y]) => ` L${x},${y}`).join("");
17652
17784
  }
17653
- var Sparkline = (0, import_react88.forwardRef)(
17785
+ var Sparkline = (0, import_react89.forwardRef)(
17654
17786
  function Sparkline2({
17655
17787
  data,
17656
17788
  variant = "line",
@@ -17673,11 +17805,11 @@ var Sparkline = (0, import_react88.forwardRef)(
17673
17805
  emptyState,
17674
17806
  ...rest
17675
17807
  }, ref) {
17676
- const reactId = (0, import_react88.useId)();
17808
+ const reactId = (0, import_react89.useId)();
17677
17809
  const PAD2 = 1;
17678
17810
  const hasData = data.length > 0;
17679
17811
  const canDrawLine = variant === "line" ? data.length >= 2 : hasData;
17680
- const resolvedAriaLabel = (0, import_react88.useMemo)(() => {
17812
+ const resolvedAriaLabel = (0, import_react89.useMemo)(() => {
17681
17813
  if (ariaLabel) return ariaLabel;
17682
17814
  if (!hasData) return "Sparkline \u2014 no data";
17683
17815
  const first = formatValue(data[0]);
@@ -17974,7 +18106,7 @@ function resolveDeltaTone(trend, direction) {
17974
18106
  }
17975
18107
  return trend === "up" ? "failed" : "success";
17976
18108
  }
17977
- var MetricCard = (0, import_react89.forwardRef)(
18109
+ var MetricCard = (0, import_react90.forwardRef)(
17978
18110
  function MetricCard2({
17979
18111
  label,
17980
18112
  labelAs = "h3",
@@ -17997,7 +18129,7 @@ var MetricCard = (0, import_react89.forwardRef)(
17997
18129
  className,
17998
18130
  ...rest
17999
18131
  }, ref) {
18000
- const reactId = (0, import_react89.useId)();
18132
+ const reactId = (0, import_react90.useId)();
18001
18133
  const baseId = providedId ?? `ods-metric-card-${reactId}`;
18002
18134
  const labelId = `${baseId}-label`;
18003
18135
  const valueId = `${baseId}-value`;
@@ -18158,7 +18290,7 @@ MetricCard.displayName = "MetricCard";
18158
18290
 
18159
18291
  // src/components/MultiSelect/MultiSelect.tsx
18160
18292
  var import_framer_motion27 = require("framer-motion");
18161
- var import_react90 = require("react");
18293
+ var import_react91 = require("react");
18162
18294
  var import_react_dom10 = require("react-dom");
18163
18295
  var import_icons24 = require("@octaviaflow/icons");
18164
18296
  var import_jsx_runtime71 = require("react/jsx-runtime");
@@ -18172,7 +18304,7 @@ function OverflowTooltip2({
18172
18304
  if (!enabled || content == null || content === "") return children;
18173
18305
  return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Tooltip, { content, children });
18174
18306
  }
18175
- var MultiSelect = (0, import_react90.forwardRef)(
18307
+ var MultiSelect = (0, import_react91.forwardRef)(
18176
18308
  function MultiSelect2({
18177
18309
  options,
18178
18310
  value: controlledValue,
@@ -18195,37 +18327,37 @@ var MultiSelect = (0, import_react90.forwardRef)(
18195
18327
  className,
18196
18328
  ...rest
18197
18329
  }, ref) {
18198
- const reactId = (0, import_react90.useId)();
18330
+ const reactId = (0, import_react91.useId)();
18199
18331
  const baseId = providedId ?? `ods-multiselect-${reactId}`;
18200
- const [internalValue, setInternalValue] = (0, import_react90.useState)(
18332
+ const [internalValue, setInternalValue] = (0, import_react91.useState)(
18201
18333
  defaultValue ?? []
18202
18334
  );
18203
18335
  const selectedValues = controlledValue ?? internalValue;
18204
- const [open, setOpen] = (0, import_react90.useState)(false);
18205
- const [query, setQuery] = (0, import_react90.useState)("");
18206
- const [activeIdx, setActiveIdx] = (0, import_react90.useState)(0);
18207
- const [dropdownPos, setDropdownPos] = (0, import_react90.useState)({
18336
+ const [open, setOpen] = (0, import_react91.useState)(false);
18337
+ const [query, setQuery] = (0, import_react91.useState)("");
18338
+ const [activeIdx, setActiveIdx] = (0, import_react91.useState)(0);
18339
+ const [dropdownPos, setDropdownPos] = (0, import_react91.useState)({
18208
18340
  top: 0,
18209
18341
  left: 0,
18210
18342
  width: 0
18211
18343
  });
18212
- const wrapRef = (0, import_react90.useRef)(null);
18213
- const tagsRowRef = (0, import_react90.useRef)(null);
18214
- const searchRef = (0, import_react90.useRef)(null);
18215
- const dropdownRef = (0, import_react90.useRef)(null);
18216
- const chipRefs = (0, import_react90.useRef)([]);
18217
- const commit = (0, import_react90.useCallback)(
18344
+ const wrapRef = (0, import_react91.useRef)(null);
18345
+ const tagsRowRef = (0, import_react91.useRef)(null);
18346
+ const searchRef = (0, import_react91.useRef)(null);
18347
+ const dropdownRef = (0, import_react91.useRef)(null);
18348
+ const chipRefs = (0, import_react91.useRef)([]);
18349
+ const commit = (0, import_react91.useCallback)(
18218
18350
  (next) => {
18219
18351
  if (controlledValue === void 0) setInternalValue(next);
18220
18352
  onChange?.(next);
18221
18353
  },
18222
18354
  [controlledValue, onChange]
18223
18355
  );
18224
- const selectedSet = (0, import_react90.useMemo)(
18356
+ const selectedSet = (0, import_react91.useMemo)(
18225
18357
  () => new Set(selectedValues),
18226
18358
  [selectedValues]
18227
18359
  );
18228
- const filteredOptions = (0, import_react90.useMemo)(() => {
18360
+ const filteredOptions = (0, import_react91.useMemo)(() => {
18229
18361
  const base = hideSelected ? options.filter((o) => !selectedSet.has(o.value)) : options;
18230
18362
  if (!query.trim()) return base;
18231
18363
  const q2 = query.trim().toLowerCase();
@@ -18236,7 +18368,7 @@ var MultiSelect = (0, import_react90.forwardRef)(
18236
18368
  const showSearch = searchable ?? options.length > 6;
18237
18369
  const getLabel = (v) => options.find((o) => o.value === v)?.label ?? v;
18238
18370
  const getIcon = (v) => options.find((o) => o.value === v)?.icon;
18239
- const updatePosition = (0, import_react90.useCallback)(() => {
18371
+ const updatePosition = (0, import_react91.useCallback)(() => {
18240
18372
  if (!wrapRef.current) return;
18241
18373
  const rect = wrapRef.current.getBoundingClientRect();
18242
18374
  setDropdownPos({
@@ -18245,7 +18377,7 @@ var MultiSelect = (0, import_react90.forwardRef)(
18245
18377
  width: rect.width
18246
18378
  });
18247
18379
  }, []);
18248
- (0, import_react90.useEffect)(() => {
18380
+ (0, import_react91.useEffect)(() => {
18249
18381
  if (!open) return;
18250
18382
  updatePosition();
18251
18383
  window.addEventListener("scroll", updatePosition, true);
@@ -18255,7 +18387,7 @@ var MultiSelect = (0, import_react90.forwardRef)(
18255
18387
  window.removeEventListener("resize", updatePosition);
18256
18388
  };
18257
18389
  }, [open, updatePosition]);
18258
- (0, import_react90.useEffect)(() => {
18390
+ (0, import_react91.useEffect)(() => {
18259
18391
  if (!open) return;
18260
18392
  const onDoc = (e) => {
18261
18393
  const t = e.target;
@@ -18267,15 +18399,15 @@ var MultiSelect = (0, import_react90.forwardRef)(
18267
18399
  document.addEventListener("mousedown", onDoc);
18268
18400
  return () => document.removeEventListener("mousedown", onDoc);
18269
18401
  }, [open]);
18270
- (0, import_react90.useEffect)(() => {
18402
+ (0, import_react91.useEffect)(() => {
18271
18403
  if (open && showSearch) {
18272
18404
  requestAnimationFrame(() => searchRef.current?.focus());
18273
18405
  }
18274
18406
  }, [open, showSearch]);
18275
- (0, import_react90.useEffect)(() => setActiveIdx(0), [query, open]);
18276
- const [fitCount, setFitCount] = (0, import_react90.useState)(selectedValues.length);
18277
- const [tick, setTick] = (0, import_react90.useState)(0);
18278
- (0, import_react90.useLayoutEffect)(() => {
18407
+ (0, import_react91.useEffect)(() => setActiveIdx(0), [query, open]);
18408
+ const [fitCount, setFitCount] = (0, import_react91.useState)(selectedValues.length);
18409
+ const [tick, setTick] = (0, import_react91.useState)(0);
18410
+ (0, import_react91.useLayoutEffect)(() => {
18279
18411
  if (maxVisibleTags !== void 0) {
18280
18412
  setFitCount(Math.min(selectedValues.length, maxVisibleTags));
18281
18413
  return;
@@ -18302,7 +18434,7 @@ var MultiSelect = (0, import_react90.forwardRef)(
18302
18434
  count = Math.max(1, count - 1);
18303
18435
  setFitCount(count);
18304
18436
  }, [tick, selectedValues, maxVisibleTags]);
18305
- (0, import_react90.useEffect)(() => {
18437
+ (0, import_react91.useEffect)(() => {
18306
18438
  if (typeof ResizeObserver === "undefined") return;
18307
18439
  const row = tagsRowRef.current;
18308
18440
  if (!row) return;
@@ -18310,7 +18442,7 @@ var MultiSelect = (0, import_react90.forwardRef)(
18310
18442
  ro.observe(row);
18311
18443
  return () => ro.disconnect();
18312
18444
  }, []);
18313
- const addValue = (0, import_react90.useCallback)(
18445
+ const addValue = (0, import_react91.useCallback)(
18314
18446
  (val) => {
18315
18447
  if (maxTags && selectedValues.length >= maxTags) return;
18316
18448
  commit([...selectedValues, val]);
@@ -18320,13 +18452,13 @@ var MultiSelect = (0, import_react90.forwardRef)(
18320
18452
  },
18321
18453
  [selectedValues, maxTags, commit]
18322
18454
  );
18323
- const removeValue = (0, import_react90.useCallback)(
18455
+ const removeValue = (0, import_react91.useCallback)(
18324
18456
  (val) => {
18325
18457
  commit(selectedValues.filter((v) => v !== val));
18326
18458
  },
18327
18459
  [selectedValues, commit]
18328
18460
  );
18329
- const toggleValue = (0, import_react90.useCallback)(
18461
+ const toggleValue = (0, import_react91.useCallback)(
18330
18462
  (val) => {
18331
18463
  if (selectedSet.has(val)) {
18332
18464
  removeValue(val);
@@ -18336,11 +18468,11 @@ var MultiSelect = (0, import_react90.forwardRef)(
18336
18468
  },
18337
18469
  [selectedSet, addValue, removeValue]
18338
18470
  );
18339
- const clearAll = (0, import_react90.useCallback)(() => {
18471
+ const clearAll = (0, import_react91.useCallback)(() => {
18340
18472
  commit([]);
18341
18473
  setQuery("");
18342
18474
  }, [commit]);
18343
- const handleSearchKey = (0, import_react90.useCallback)(
18475
+ const handleSearchKey = (0, import_react91.useCallback)(
18344
18476
  (e) => {
18345
18477
  if (e.key === "Escape") {
18346
18478
  setOpen(false);
@@ -18423,7 +18555,10 @@ var MultiSelect = (0, import_react90.forwardRef)(
18423
18555
  "aria-label": labelId ? void 0 : ariaLabel ?? placeholder,
18424
18556
  "aria-disabled": disabled,
18425
18557
  tabIndex: disabled ? -1 : 0,
18426
- onClick: () => !disabled && setOpen(true),
18558
+ onClick: () => {
18559
+ if (disabled) return;
18560
+ setOpen((prev) => !prev);
18561
+ },
18427
18562
  onKeyDown: (e) => {
18428
18563
  if (disabled) return;
18429
18564
  if (!open && (e.key === "Enter" || e.key === " " || e.key === "ArrowDown")) {
@@ -18623,10 +18758,10 @@ var MultiSelect = (0, import_react90.forwardRef)(
18623
18758
  MultiSelect.displayName = "MultiSelect";
18624
18759
 
18625
18760
  // src/components/NumberInput/NumberInput.tsx
18626
- var import_react91 = require("react");
18761
+ var import_react92 = require("react");
18627
18762
  var import_icons25 = require("@octaviaflow/icons");
18628
18763
  var import_jsx_runtime72 = require("react/jsx-runtime");
18629
- var NumberInput = (0, import_react91.forwardRef)(
18764
+ var NumberInput = (0, import_react92.forwardRef)(
18630
18765
  function NumberInput2({
18631
18766
  label,
18632
18767
  value,
@@ -18648,11 +18783,11 @@ var NumberInput = (0, import_react91.forwardRef)(
18648
18783
  "aria-describedby": consumerDescribedBy,
18649
18784
  ...rest
18650
18785
  }, ref) {
18651
- const reactId = (0, import_react91.useId)();
18786
+ const reactId = (0, import_react92.useId)();
18652
18787
  const inputId = providedId ?? `ods-num-${reactId}`;
18653
18788
  const labelId = label ? `${inputId}-label` : void 0;
18654
18789
  const hintId = error || helperText ? `${inputId}-hint` : void 0;
18655
- const clamp = (0, import_react91.useCallback)(
18790
+ const clamp = (0, import_react92.useCallback)(
18656
18791
  (v) => {
18657
18792
  if (typeof min === "number") v = Math.max(min, v);
18658
18793
  if (typeof max === "number") v = Math.min(max, v);
@@ -18754,9 +18889,9 @@ var NumberInput = (0, import_react91.forwardRef)(
18754
18889
  NumberInput.displayName = "NumberInput";
18755
18890
 
18756
18891
  // src/components/OTPInput/OTPInput.tsx
18757
- var import_react92 = require("react");
18892
+ var import_react93 = require("react");
18758
18893
  var import_jsx_runtime73 = require("react/jsx-runtime");
18759
- var OTPInput = (0, import_react92.forwardRef)(
18894
+ var OTPInput = (0, import_react93.forwardRef)(
18760
18895
  function OTPInput2({
18761
18896
  label,
18762
18897
  length = 6,
@@ -18774,16 +18909,16 @@ var OTPInput = (0, import_react92.forwardRef)(
18774
18909
  "aria-label": ariaLabel,
18775
18910
  ...rest
18776
18911
  }, ref) {
18777
- const reactId = (0, import_react92.useId)();
18912
+ const reactId = (0, import_react93.useId)();
18778
18913
  const baseId = providedId ?? `ods-otp-${reactId}`;
18779
18914
  const labelId = label ? `${baseId}-label` : void 0;
18780
18915
  const hintId = error ? `${baseId}-hint` : void 0;
18781
- const refs = (0, import_react92.useRef)([]);
18916
+ const refs = (0, import_react93.useRef)([]);
18782
18917
  const resolvedMode = mode ?? (type === "alphanumeric" ? "alphanumeric" : mask ? "pin" : "otp");
18783
18918
  const isNumeric = resolvedMode !== "alphanumeric";
18784
18919
  const isMasked = mask ?? resolvedMode === "pin";
18785
18920
  const pattern = isNumeric ? /[^0-9]/g : /[^a-zA-Z0-9]/g;
18786
- (0, import_react92.useImperativeHandle)(
18921
+ (0, import_react93.useImperativeHandle)(
18787
18922
  ref,
18788
18923
  () => ({
18789
18924
  focus: () => {
@@ -18797,7 +18932,7 @@ var OTPInput = (0, import_react92.forwardRef)(
18797
18932
  }),
18798
18933
  [value, length, onChange]
18799
18934
  );
18800
- const setCharAt = (0, import_react92.useCallback)(
18935
+ const setCharAt = (0, import_react93.useCallback)(
18801
18936
  (idx, ch) => {
18802
18937
  const cleaned = ch.replace(pattern, "").slice(0, 1);
18803
18938
  const chars = value.split("");
@@ -18920,7 +19055,7 @@ function PageHeader({
18920
19055
 
18921
19056
  // src/components/Pagination/Pagination.tsx
18922
19057
  var import_icons26 = require("@octaviaflow/icons");
18923
- var import_react93 = require("react");
19058
+ var import_react94 = require("react");
18924
19059
  var import_jsx_runtime75 = require("react/jsx-runtime");
18925
19060
  function buildPageRange(totalPages, current, siblingCount, boundaryCount) {
18926
19061
  const totalShown = boundaryCount * 2 + siblingCount * 2 + 3;
@@ -18966,7 +19101,7 @@ function buildPageRange(totalPages, current, siblingCount, boundaryCount) {
18966
19101
  ) === i
18967
19102
  );
18968
19103
  }
18969
- var Pagination = (0, import_react93.forwardRef)(
19104
+ var Pagination = (0, import_react94.forwardRef)(
18970
19105
  function Pagination2({
18971
19106
  totalItems,
18972
19107
  pageSize,
@@ -18989,13 +19124,13 @@ var Pagination = (0, import_react93.forwardRef)(
18989
19124
  className,
18990
19125
  ...rest
18991
19126
  }, ref) {
18992
- const reactId = (0, import_react93.useId)();
19127
+ const reactId = (0, import_react94.useId)();
18993
19128
  const baseId = providedId ?? `ods-pagination-${reactId}`;
18994
19129
  const totalPages = Math.max(
18995
19130
  1,
18996
19131
  Math.ceil(Math.max(0, totalItems) / Math.max(1, pageSize))
18997
19132
  );
18998
- const [internalPage, setInternalPage] = (0, import_react93.useState)(
19133
+ const [internalPage, setInternalPage] = (0, import_react94.useState)(
18999
19134
  Math.min(Math.max(1, defaultPage), totalPages)
19000
19135
  );
19001
19136
  const isControlled = controlledPage !== void 0;
@@ -19003,7 +19138,7 @@ var Pagination = (0, import_react93.forwardRef)(
19003
19138
  totalPages,
19004
19139
  Math.max(1, isControlled ? controlledPage : internalPage)
19005
19140
  );
19006
- const goTo = (0, import_react93.useCallback)(
19141
+ const goTo = (0, import_react94.useCallback)(
19007
19142
  (next) => {
19008
19143
  const clamped = Math.min(totalPages, Math.max(1, next));
19009
19144
  if (clamped === currentPage) return;
@@ -19012,14 +19147,14 @@ var Pagination = (0, import_react93.forwardRef)(
19012
19147
  },
19013
19148
  [currentPage, isControlled, onPageChange, totalPages]
19014
19149
  );
19015
- const pages = (0, import_react93.useMemo)(
19150
+ const pages = (0, import_react94.useMemo)(
19016
19151
  () => buildPageRange(totalPages, currentPage, siblingCount, boundaryCount),
19017
19152
  [totalPages, currentPage, siblingCount, boundaryCount]
19018
19153
  );
19019
19154
  const from = totalItems === 0 ? 0 : (currentPage - 1) * pageSize + 1;
19020
19155
  const to = Math.min(totalItems, currentPage * pageSize);
19021
19156
  const totalContent = formatTotal ? formatTotal({ from, to, total: totalItems }) : `Showing ${from.toLocaleString()}\u2013${to.toLocaleString()} of ${totalItems.toLocaleString()}`;
19022
- const [jumpValue, setJumpValue] = (0, import_react93.useState)("");
19157
+ const [jumpValue, setJumpValue] = (0, import_react94.useState)("");
19023
19158
  const commitJump = (raw) => {
19024
19159
  const parsed = Number.parseInt(raw, 10);
19025
19160
  if (Number.isFinite(parsed)) goTo(parsed);
@@ -19200,11 +19335,11 @@ var Pagination = (0, import_react93.forwardRef)(
19200
19335
  Pagination.displayName = "Pagination";
19201
19336
 
19202
19337
  // src/components/PasswordInput/PasswordInput.tsx
19203
- var import_react95 = require("react");
19338
+ var import_react96 = require("react");
19204
19339
  var import_icons27 = require("@octaviaflow/icons");
19205
19340
 
19206
19341
  // src/hooks/usePasswordStrength.ts
19207
- var import_react94 = require("react");
19342
+ var import_react95 = require("react");
19208
19343
  var DEFAULT_PASSWORD_RULES = [
19209
19344
  { id: "length-8", label: "At least 8 characters", test: /.{8,}/ },
19210
19345
  { id: "lowercase", label: "A lower-case letter", test: /[a-z]/ },
@@ -19212,7 +19347,7 @@ var DEFAULT_PASSWORD_RULES = [
19212
19347
  { id: "digit", label: "A digit", test: /\d/ }
19213
19348
  ];
19214
19349
  function usePasswordStrength(value, rules = DEFAULT_PASSWORD_RULES) {
19215
- return (0, import_react94.useMemo)(() => {
19350
+ return (0, import_react95.useMemo)(() => {
19216
19351
  const evaluated = rules.map((r) => ({
19217
19352
  id: r.id,
19218
19353
  label: r.label,
@@ -19250,7 +19385,7 @@ var strengthLabels = [
19250
19385
  "Strong",
19251
19386
  "Very strong"
19252
19387
  ];
19253
- var PasswordInput = (0, import_react95.forwardRef)(
19388
+ var PasswordInput = (0, import_react96.forwardRef)(
19254
19389
  function PasswordInput2({
19255
19390
  label,
19256
19391
  value,
@@ -19272,11 +19407,11 @@ var PasswordInput = (0, import_react95.forwardRef)(
19272
19407
  "aria-describedby": consumerDescribedBy,
19273
19408
  ...rest
19274
19409
  }, ref) {
19275
- const reactId = (0, import_react95.useId)();
19410
+ const reactId = (0, import_react96.useId)();
19276
19411
  const inputId = providedId ?? `ods-pwd-${reactId}`;
19277
19412
  const labelId = label ? `${inputId}-label` : void 0;
19278
19413
  const hintId = error || helperText ? `${inputId}-hint` : void 0;
19279
- const [shown, setShown] = (0, import_react95.useState)(false);
19414
+ const [shown, setShown] = (0, import_react96.useState)(false);
19280
19415
  const handle = (e) => onChange?.(e.target.value);
19281
19416
  const derived = usePasswordStrength(value, strengthRules ?? []);
19282
19417
  const ruleDriven = (strengthRules?.length ?? 0) > 0;
@@ -19416,7 +19551,7 @@ var PasswordInput = (0, import_react95.forwardRef)(
19416
19551
  PasswordInput.displayName = "PasswordInput";
19417
19552
 
19418
19553
  // src/components/PhoneInput/PhoneInput.tsx
19419
- var import_react96 = require("react");
19554
+ var import_react97 = require("react");
19420
19555
  var import_icons28 = require("@octaviaflow/icons");
19421
19556
  var import_jsx_runtime77 = require("react/jsx-runtime");
19422
19557
  var DEFAULT_COUNTRIES = [
@@ -19429,7 +19564,7 @@ var DEFAULT_COUNTRIES = [
19429
19564
  { code: "AU", name: "Australia", dialCode: "+61", flag: "\u{1F1E6}\u{1F1FA}" },
19430
19565
  { code: "BR", name: "Brazil", dialCode: "+55", flag: "\u{1F1E7}\u{1F1F7}" }
19431
19566
  ];
19432
- var PhoneInput = (0, import_react96.forwardRef)(
19567
+ var PhoneInput = (0, import_react97.forwardRef)(
19433
19568
  function PhoneInput2({
19434
19569
  label,
19435
19570
  value,
@@ -19452,20 +19587,20 @@ var PhoneInput = (0, import_react96.forwardRef)(
19452
19587
  "aria-describedby": consumerDescribedBy,
19453
19588
  ...rest
19454
19589
  }, ref) {
19455
- const reactId = (0, import_react96.useId)();
19590
+ const reactId = (0, import_react97.useId)();
19456
19591
  const baseId = providedId ?? `ods-phone-${reactId}`;
19457
19592
  const inputId = `${baseId}-input`;
19458
19593
  const labelId = label ? `${baseId}-label` : void 0;
19459
19594
  const hintId = error || helperText ? `${baseId}-hint` : void 0;
19460
19595
  const listboxId = `${baseId}-listbox`;
19461
19596
  const countryBtnId = `${baseId}-country`;
19462
- const [open, setOpen] = (0, import_react96.useState)(false);
19463
- const [activeIdx, setActiveIdx] = (0, import_react96.useState)(0);
19464
- const [query, setQuery] = (0, import_react96.useState)("");
19465
- const fieldRef = (0, import_react96.useRef)(null);
19466
- const menuRef = (0, import_react96.useRef)(null);
19467
- const listRef = (0, import_react96.useRef)(null);
19468
- const searchRef = (0, import_react96.useRef)(null);
19597
+ const [open, setOpen] = (0, import_react97.useState)(false);
19598
+ const [activeIdx, setActiveIdx] = (0, import_react97.useState)(0);
19599
+ const [query, setQuery] = (0, import_react97.useState)("");
19600
+ const fieldRef = (0, import_react97.useRef)(null);
19601
+ const menuRef = (0, import_react97.useRef)(null);
19602
+ const listRef = (0, import_react97.useRef)(null);
19603
+ const searchRef = (0, import_react97.useRef)(null);
19469
19604
  const country = countries.find((c) => c.code === countryCode) ?? countries[0];
19470
19605
  const showSearch = searchable ?? countries.length > 8;
19471
19606
  const filteredCountries = (() => {
@@ -19475,7 +19610,7 @@ var PhoneInput = (0, import_react96.forwardRef)(
19475
19610
  (c) => c.name.toLowerCase().includes(q2) || c.dialCode.includes(q2) || c.code.toLowerCase().includes(q2)
19476
19611
  );
19477
19612
  })();
19478
- (0, import_react96.useEffect)(() => {
19613
+ (0, import_react97.useEffect)(() => {
19479
19614
  if (!open) return;
19480
19615
  const onDocMouseDown = (e) => {
19481
19616
  const t = e.target;
@@ -19493,7 +19628,7 @@ var PhoneInput = (0, import_react96.forwardRef)(
19493
19628
  document.removeEventListener("keydown", onDocKey);
19494
19629
  };
19495
19630
  }, [open]);
19496
- (0, import_react96.useEffect)(() => {
19631
+ (0, import_react97.useEffect)(() => {
19497
19632
  if (!open) {
19498
19633
  setQuery("");
19499
19634
  return;
@@ -19501,10 +19636,10 @@ var PhoneInput = (0, import_react96.forwardRef)(
19501
19636
  const idx = countries.findIndex((c) => c.code === country.code);
19502
19637
  setActiveIdx(idx === -1 ? 0 : idx);
19503
19638
  }, [open, countries, country.code]);
19504
- (0, import_react96.useEffect)(() => {
19639
+ (0, import_react97.useEffect)(() => {
19505
19640
  setActiveIdx(0);
19506
19641
  }, [query]);
19507
- const handleTriggerKey = (0, import_react96.useCallback)(
19642
+ const handleTriggerKey = (0, import_react97.useCallback)(
19508
19643
  (e) => {
19509
19644
  if (disabled) return;
19510
19645
  if (e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") {
@@ -19514,7 +19649,7 @@ var PhoneInput = (0, import_react96.forwardRef)(
19514
19649
  },
19515
19650
  [disabled]
19516
19651
  );
19517
- const handleNavKey = (0, import_react96.useCallback)(
19652
+ const handleNavKey = (0, import_react97.useCallback)(
19518
19653
  (e) => {
19519
19654
  if (e.key === "ArrowDown") {
19520
19655
  e.preventDefault();
@@ -19541,7 +19676,7 @@ var PhoneInput = (0, import_react96.forwardRef)(
19541
19676
  },
19542
19677
  [filteredCountries, activeIdx, onCountryChange]
19543
19678
  );
19544
- (0, import_react96.useEffect)(() => {
19679
+ (0, import_react97.useEffect)(() => {
19545
19680
  if (!open) return;
19546
19681
  if (showSearch) searchRef.current?.focus();
19547
19682
  else listRef.current?.focus();
@@ -20009,7 +20144,7 @@ function getAllCountries(locale = "en") {
20009
20144
  // src/components/PipelineCard/PipelineCard.tsx
20010
20145
  var import_icons29 = require("@octaviaflow/icons");
20011
20146
  var import_framer_motion28 = require("framer-motion");
20012
- var import_react97 = require("react");
20147
+ var import_react98 = require("react");
20013
20148
  var import_jsx_runtime78 = require("react/jsx-runtime");
20014
20149
  var STATUS_LABEL5 = {
20015
20150
  queued: "Queued",
@@ -20156,7 +20291,7 @@ function StatusRing({
20156
20291
  }
20157
20292
  );
20158
20293
  }
20159
- var PipelineCard = (0, import_react97.forwardRef)(
20294
+ var PipelineCard = (0, import_react98.forwardRef)(
20160
20295
  function PipelineCard2({
20161
20296
  name,
20162
20297
  nameAs = "h3",
@@ -20186,7 +20321,7 @@ var PipelineCard = (0, import_react97.forwardRef)(
20186
20321
  ...rest
20187
20322
  }, ref) {
20188
20323
  const reducedMotion = (0, import_framer_motion28.useReducedMotion)() ?? false;
20189
- const reactId = (0, import_react97.useId)();
20324
+ const reactId = (0, import_react98.useId)();
20190
20325
  const baseId = providedId ?? `ods-pipeline-card-${reactId}`;
20191
20326
  const nameId = `${baseId}-name`;
20192
20327
  const isInteractive = Boolean(href || onClick) && !disabled && !loading;
@@ -20398,7 +20533,7 @@ var PipelineCard = (0, import_react97.forwardRef)(
20398
20533
  PipelineCard.displayName = "PipelineCard";
20399
20534
 
20400
20535
  // src/components/Popover/Popover.tsx
20401
- var import_react98 = require("react");
20536
+ var import_react99 = require("react");
20402
20537
  var import_react_dom11 = require("react-dom");
20403
20538
  var import_jsx_runtime79 = require("react/jsx-runtime");
20404
20539
  function computePosition4(rect, popRect, placement, offset) {
@@ -20430,31 +20565,31 @@ function Popover({
20430
20565
  children,
20431
20566
  className
20432
20567
  }) {
20433
- const [openState, setOpenState] = (0, import_react98.useState)(defaultOpen);
20568
+ const [openState, setOpenState] = (0, import_react99.useState)(defaultOpen);
20434
20569
  const open = openProp ?? openState;
20435
- const setOpen = (0, import_react98.useCallback)(
20570
+ const setOpen = (0, import_react99.useCallback)(
20436
20571
  (v) => {
20437
20572
  if (openProp === void 0) setOpenState(v);
20438
20573
  onOpenChange?.(v);
20439
20574
  },
20440
20575
  [openProp, onOpenChange]
20441
20576
  );
20442
- const triggerRef = (0, import_react98.useRef)(null);
20443
- const popRef = (0, import_react98.useRef)(null);
20444
- const [coords, setCoords] = (0, import_react98.useState)(null);
20445
- const reposition = (0, import_react98.useCallback)(() => {
20577
+ const triggerRef = (0, import_react99.useRef)(null);
20578
+ const popRef = (0, import_react99.useRef)(null);
20579
+ const [coords, setCoords] = (0, import_react99.useState)(null);
20580
+ const reposition = (0, import_react99.useCallback)(() => {
20446
20581
  if (!triggerRef.current || !popRef.current) return;
20447
20582
  const trigRect = triggerRef.current.getBoundingClientRect();
20448
20583
  const popRect = popRef.current.getBoundingClientRect();
20449
20584
  setCoords(computePosition4(trigRect, popRect, placement, offset));
20450
20585
  }, [placement, offset]);
20451
- (0, import_react98.useLayoutEffect)(() => {
20586
+ (0, import_react99.useLayoutEffect)(() => {
20452
20587
  if (!open) return;
20453
20588
  reposition();
20454
20589
  const id = requestAnimationFrame(reposition);
20455
20590
  return () => cancelAnimationFrame(id);
20456
20591
  }, [open, reposition, content]);
20457
- (0, import_react98.useEffect)(() => {
20592
+ (0, import_react99.useEffect)(() => {
20458
20593
  if (!open) return;
20459
20594
  const onScroll = () => reposition();
20460
20595
  window.addEventListener("scroll", onScroll, true);
@@ -20464,7 +20599,7 @@ function Popover({
20464
20599
  window.removeEventListener("resize", onScroll);
20465
20600
  };
20466
20601
  }, [open, reposition]);
20467
- (0, import_react98.useEffect)(() => {
20602
+ (0, import_react99.useEffect)(() => {
20468
20603
  if (!open || !closeOnClickOutside) return;
20469
20604
  const onDoc = (e) => {
20470
20605
  const t = e.target;
@@ -20475,7 +20610,7 @@ function Popover({
20475
20610
  document.addEventListener("mousedown", onDoc);
20476
20611
  return () => document.removeEventListener("mousedown", onDoc);
20477
20612
  }, [open, closeOnClickOutside, setOpen]);
20478
- (0, import_react98.useEffect)(() => {
20613
+ (0, import_react99.useEffect)(() => {
20479
20614
  if (!open || !closeOnEsc) return;
20480
20615
  const onKey = (e) => {
20481
20616
  if (e.key === "Escape") setOpen(false);
@@ -20528,12 +20663,12 @@ function Popover({
20528
20663
 
20529
20664
  // src/components/PricingCard/PricingCard.tsx
20530
20665
  var import_icons30 = require("@octaviaflow/icons");
20531
- var import_react99 = require("react");
20666
+ var import_react100 = require("react");
20532
20667
  var import_jsx_runtime80 = require("react/jsx-runtime");
20533
20668
  function isStructuredFeature(f) {
20534
20669
  return typeof f === "object" && f !== null && "text" in f;
20535
20670
  }
20536
- var PricingCard = (0, import_react99.forwardRef)(
20671
+ var PricingCard = (0, import_react100.forwardRef)(
20537
20672
  function PricingCard2({
20538
20673
  name,
20539
20674
  nameAs = "h3",
@@ -20549,7 +20684,7 @@ var PricingCard = (0, import_react99.forwardRef)(
20549
20684
  className,
20550
20685
  ...rest
20551
20686
  }, ref) {
20552
- const reactId = (0, import_react99.useId)();
20687
+ const reactId = (0, import_react100.useId)();
20553
20688
  const baseId = providedId ?? `ods-pricing-card-${reactId}`;
20554
20689
  const nameId = `${baseId}-name`;
20555
20690
  const descId = description ? `${baseId}-desc` : void 0;
@@ -20635,7 +20770,7 @@ PricingCard.displayName = "PricingCard";
20635
20770
 
20636
20771
  // src/components/ProductCard/ProductCard.tsx
20637
20772
  var import_icons31 = require("@octaviaflow/icons");
20638
- var import_react100 = require("react");
20773
+ var import_react101 = require("react");
20639
20774
  var import_jsx_runtime81 = require("react/jsx-runtime");
20640
20775
  function Stars({ value, max = 5, count }) {
20641
20776
  return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
@@ -20658,7 +20793,7 @@ function Stars({ value, max = 5, count }) {
20658
20793
  }
20659
20794
  );
20660
20795
  }
20661
- var ProductCard = (0, import_react100.forwardRef)(
20796
+ var ProductCard = (0, import_react101.forwardRef)(
20662
20797
  function ProductCard2({
20663
20798
  image,
20664
20799
  imageAspect = "4/3",
@@ -20679,7 +20814,7 @@ var ProductCard = (0, import_react100.forwardRef)(
20679
20814
  className,
20680
20815
  ...rest
20681
20816
  }, ref) {
20682
- const reactId = (0, import_react100.useId)();
20817
+ const reactId = (0, import_react101.useId)();
20683
20818
  const baseId = providedId ?? `ods-product-card-${reactId}`;
20684
20819
  const nameId = `${baseId}-name`;
20685
20820
  const descId = description ? `${baseId}-desc` : void 0;
@@ -20777,9 +20912,9 @@ var ProductCard = (0, import_react100.forwardRef)(
20777
20912
  ProductCard.displayName = "ProductCard";
20778
20913
 
20779
20914
  // src/components/ProgressBar/ProgressBar.tsx
20780
- var import_react101 = require("react");
20915
+ var import_react102 = require("react");
20781
20916
  var import_jsx_runtime82 = require("react/jsx-runtime");
20782
- var ProgressBar = (0, import_react101.forwardRef)(
20917
+ var ProgressBar = (0, import_react102.forwardRef)(
20783
20918
  function ProgressBar2({
20784
20919
  value,
20785
20920
  min = 0,
@@ -20795,7 +20930,7 @@ var ProgressBar = (0, import_react101.forwardRef)(
20795
20930
  "aria-label": ariaLabel,
20796
20931
  ...rest
20797
20932
  }, ref) {
20798
- const reactId = (0, import_react101.useId)();
20933
+ const reactId = (0, import_react102.useId)();
20799
20934
  const baseId = providedId ?? `ods-progress-${reactId}`;
20800
20935
  const labelId = label ? `${baseId}-label` : void 0;
20801
20936
  const clamped = value === void 0 ? 0 : Math.min(max, Math.max(min, value));
@@ -20861,9 +20996,9 @@ var ProgressBar = (0, import_react101.forwardRef)(
20861
20996
  ProgressBar.displayName = "ProgressBar";
20862
20997
 
20863
20998
  // src/components/ProgressRing/ProgressRing.tsx
20864
- var import_react102 = require("react");
20999
+ var import_react103 = require("react");
20865
21000
  var import_jsx_runtime83 = require("react/jsx-runtime");
20866
- var ProgressRing = (0, import_react102.forwardRef)(
21001
+ var ProgressRing = (0, import_react103.forwardRef)(
20867
21002
  function ProgressRing2({
20868
21003
  value,
20869
21004
  max = 100,
@@ -20948,10 +21083,10 @@ var ProgressRing = (0, import_react102.forwardRef)(
20948
21083
  ProgressRing.displayName = "ProgressRing";
20949
21084
 
20950
21085
  // src/components/PromptInput/PromptInput.tsx
20951
- var import_react103 = require("react");
21086
+ var import_react104 = require("react");
20952
21087
  var import_icons32 = require("@octaviaflow/icons");
20953
21088
  var import_jsx_runtime84 = require("react/jsx-runtime");
20954
- var PromptInput = (0, import_react103.forwardRef)(
21089
+ var PromptInput = (0, import_react104.forwardRef)(
20955
21090
  function PromptInput2({
20956
21091
  value,
20957
21092
  defaultValue = "",
@@ -20986,28 +21121,28 @@ var PromptInput = (0, import_react103.forwardRef)(
20986
21121
  "aria-labelledby": ariaLabelledBy,
20987
21122
  ...rest
20988
21123
  }, ref) {
20989
- const reactId = (0, import_react103.useId)();
21124
+ const reactId = (0, import_react104.useId)();
20990
21125
  const baseId = providedId ?? `ods-prompt-${reactId}`;
20991
21126
  const textareaId = `${baseId}-textarea`;
20992
21127
  const labelId = label ? `${baseId}-label` : void 0;
20993
21128
  const suggestionsId = `${baseId}-suggestions`;
20994
21129
  const counterId = `${baseId}-counter`;
20995
- const taRef = (0, import_react103.useRef)(null);
20996
- const [internal, setInternal] = (0, import_react103.useState)(defaultValue);
21130
+ const taRef = (0, import_react104.useRef)(null);
21131
+ const [internal, setInternal] = (0, import_react104.useState)(defaultValue);
20997
21132
  const v = value ?? internal;
20998
21133
  const isControlled = value !== void 0;
20999
- const [suggestionsOpen, setSuggestionsOpen] = (0, import_react103.useState)(false);
21000
- const [suggestionIndex, setSuggestionIndex] = (0, import_react103.useState)(0);
21001
- const [isDragOver, setIsDragOver] = (0, import_react103.useState)(false);
21002
- const [historyIdx, setHistoryIdx] = (0, import_react103.useState)(null);
21003
- const setValue = (0, import_react103.useCallback)(
21134
+ const [suggestionsOpen, setSuggestionsOpen] = (0, import_react104.useState)(false);
21135
+ const [suggestionIndex, setSuggestionIndex] = (0, import_react104.useState)(0);
21136
+ const [isDragOver, setIsDragOver] = (0, import_react104.useState)(false);
21137
+ const [historyIdx, setHistoryIdx] = (0, import_react104.useState)(null);
21138
+ const setValue = (0, import_react104.useCallback)(
21004
21139
  (next) => {
21005
21140
  if (!isControlled) setInternal(next);
21006
21141
  onChange?.(next);
21007
21142
  },
21008
21143
  [isControlled, onChange]
21009
21144
  );
21010
- (0, import_react103.useImperativeHandle)(
21145
+ (0, import_react104.useImperativeHandle)(
21011
21146
  ref,
21012
21147
  () => ({
21013
21148
  focus: () => taRef.current?.focus(),
@@ -21041,7 +21176,7 @@ var PromptInput = (0, import_react103.forwardRef)(
21041
21176
  // biome-ignore lint/correctness/useExhaustiveDependencies: handleSubmit closes over up-to-date locals each render.
21042
21177
  [v, setValue]
21043
21178
  );
21044
- (0, import_react103.useEffect)(() => {
21179
+ (0, import_react104.useEffect)(() => {
21045
21180
  const el = taRef.current;
21046
21181
  if (!el) return;
21047
21182
  const computed = window.getComputedStyle(el);
@@ -21424,14 +21559,14 @@ var PromptInput = (0, import_react103.forwardRef)(
21424
21559
  PromptInput.displayName = "PromptInput";
21425
21560
 
21426
21561
  // src/components/Quote/Quote.tsx
21427
- var import_react104 = require("react");
21562
+ var import_react105 = require("react");
21428
21563
  var import_jsx_runtime85 = (
21429
21564
  // Left-double-quotation-mark (U+201C) — the typographic open
21430
21565
  // mark. `aria-hidden` because screen readers should hear the
21431
21566
  // quote content itself, not "left double quote".
21432
21567
  require("react/jsx-runtime")
21433
21568
  );
21434
- var Quote = (0, import_react104.forwardRef)(function Quote2({
21569
+ var Quote = (0, import_react105.forwardRef)(function Quote2({
21435
21570
  variant = "default",
21436
21571
  size = "md",
21437
21572
  author,
@@ -21468,22 +21603,22 @@ var Quote = (0, import_react104.forwardRef)(function Quote2({
21468
21603
  Quote.displayName = "Quote";
21469
21604
 
21470
21605
  // src/components/Radio/Radio.tsx
21471
- var import_react106 = require("react");
21606
+ var import_react107 = require("react");
21472
21607
  var import_react_aria10 = require("react-aria");
21473
21608
 
21474
21609
  // src/components/Radio/RadioGroup.tsx
21475
- var import_react105 = require("react");
21610
+ var import_react106 = require("react");
21476
21611
  var import_react_aria9 = require("react-aria");
21477
21612
  var import_jsx_runtime86 = require("react/jsx-runtime");
21478
- var RadioGroupContext = (0, import_react105.createContext)(null);
21613
+ var RadioGroupContext = (0, import_react106.createContext)(null);
21479
21614
  function useRadioGroupContext() {
21480
- const context = (0, import_react105.useContext)(RadioGroupContext);
21615
+ const context = (0, import_react106.useContext)(RadioGroupContext);
21481
21616
  if (!context) {
21482
21617
  throw new Error("Radio must be used within a RadioGroup");
21483
21618
  }
21484
21619
  return context;
21485
21620
  }
21486
- var RadioGroup = (0, import_react105.forwardRef)(
21621
+ var RadioGroup = (0, import_react106.forwardRef)(
21487
21622
  function RadioGroup2({
21488
21623
  value,
21489
21624
  defaultValue,
@@ -21503,10 +21638,10 @@ var RadioGroup = (0, import_react105.forwardRef)(
21503
21638
  "aria-describedby": consumerDescribedBy,
21504
21639
  ...rest
21505
21640
  }, ref) {
21506
- const reactId = (0, import_react105.useId)();
21641
+ const reactId = (0, import_react106.useId)();
21507
21642
  const baseId = providedId ?? `ods-radio-group-${reactId}`;
21508
21643
  const hintId = error || helperText ? `${baseId}-hint` : void 0;
21509
- const innerRef = (0, import_react105.useRef)(null);
21644
+ const innerRef = (0, import_react106.useRef)(null);
21510
21645
  const describedBy = [consumerDescribedBy, hintId].filter(Boolean).join(" ") || void 0;
21511
21646
  const ariaProps = {
21512
21647
  // react-aria wants a string label for its `<label>` association,
@@ -21567,7 +21702,7 @@ RadioGroup.displayName = "RadioGroup";
21567
21702
 
21568
21703
  // src/components/Radio/Radio.tsx
21569
21704
  var import_jsx_runtime87 = require("react/jsx-runtime");
21570
- var Radio = (0, import_react106.forwardRef)(function Radio2({
21705
+ var Radio = (0, import_react107.forwardRef)(function Radio2({
21571
21706
  value,
21572
21707
  label,
21573
21708
  description,
@@ -21577,7 +21712,7 @@ var Radio = (0, import_react106.forwardRef)(function Radio2({
21577
21712
  ...props
21578
21713
  }, forwardedRef) {
21579
21714
  const state = useRadioGroupContext();
21580
- const innerRef = (0, import_react106.useRef)(null);
21715
+ const innerRef = (0, import_react107.useRef)(null);
21581
21716
  const setRef = (node) => {
21582
21717
  innerRef.current = node;
21583
21718
  if (typeof forwardedRef === "function") forwardedRef(node);
@@ -21650,9 +21785,9 @@ var Radio = (0, import_react106.forwardRef)(function Radio2({
21650
21785
  Radio.displayName = "Radio";
21651
21786
 
21652
21787
  // src/components/RangeSlider/RangeSlider.tsx
21653
- var import_react107 = require("react");
21788
+ var import_react108 = require("react");
21654
21789
  var import_jsx_runtime88 = require("react/jsx-runtime");
21655
- var RangeSlider = (0, import_react107.forwardRef)(
21790
+ var RangeSlider = (0, import_react108.forwardRef)(
21656
21791
  function RangeSlider2({
21657
21792
  label,
21658
21793
  value,
@@ -21672,7 +21807,7 @@ var RangeSlider = (0, import_react107.forwardRef)(
21672
21807
  className,
21673
21808
  ...rest
21674
21809
  }, ref) {
21675
- const reactId = (0, import_react107.useId)();
21810
+ const reactId = (0, import_react108.useId)();
21676
21811
  const baseId = providedId ?? `ods-range-${reactId}`;
21677
21812
  const labelId = label ? `${baseId}-label` : void 0;
21678
21813
  const hintId = error || helperText ? `${baseId}-hint` : void 0;
@@ -21784,10 +21919,10 @@ var RangeSlider = (0, import_react107.forwardRef)(
21784
21919
  RangeSlider.displayName = "RangeSlider";
21785
21920
 
21786
21921
  // src/components/Rating/Rating.tsx
21787
- var import_react108 = require("react");
21922
+ var import_react109 = require("react");
21788
21923
  var import_icons33 = require("@octaviaflow/icons");
21789
21924
  var import_jsx_runtime89 = require("react/jsx-runtime");
21790
- var Rating = (0, import_react108.forwardRef)(function Rating2({
21925
+ var Rating = (0, import_react109.forwardRef)(function Rating2({
21791
21926
  value,
21792
21927
  onChange,
21793
21928
  max = 5,
@@ -21803,7 +21938,7 @@ var Rating = (0, import_react108.forwardRef)(function Rating2({
21803
21938
  "aria-label": ariaLabel,
21804
21939
  ...rest
21805
21940
  }, ref) {
21806
- const [hover, setHover] = (0, import_react108.useState)(null);
21941
+ const [hover, setHover] = (0, import_react109.useState)(null);
21807
21942
  const display = hover ?? value;
21808
21943
  const interactive = !readOnly && !disabled;
21809
21944
  const Empty = icon === "heart" ? import_icons33.FavoriteIcon : import_icons33.StarIcon;
@@ -21911,10 +22046,10 @@ var Rating = (0, import_react108.forwardRef)(function Rating2({
21911
22046
  Rating.displayName = "Rating";
21912
22047
 
21913
22048
  // src/components/Rating/BinaryRating.tsx
21914
- var import_react109 = require("react");
22049
+ var import_react110 = require("react");
21915
22050
  var import_icons34 = require("@octaviaflow/icons");
21916
22051
  var import_jsx_runtime90 = require("react/jsx-runtime");
21917
- var BinaryRating = (0, import_react109.forwardRef)(
22052
+ var BinaryRating = (0, import_react110.forwardRef)(
21918
22053
  function BinaryRating2({
21919
22054
  value,
21920
22055
  onChange,
@@ -22022,7 +22157,7 @@ function BinaryButton({
22022
22157
  }
22023
22158
 
22024
22159
  // src/components/Resizable/Resizable.tsx
22025
- var import_react110 = require("react");
22160
+ var import_react111 = require("react");
22026
22161
  var import_jsx_runtime91 = require("react/jsx-runtime");
22027
22162
  function setDragOverlay(direction) {
22028
22163
  const ID = "ods-resizable-drag-overlay";
@@ -22039,7 +22174,7 @@ function setDragOverlay(direction) {
22039
22174
  }
22040
22175
  el.style.cursor = direction === "horizontal" ? "col-resize" : "row-resize";
22041
22176
  }
22042
- var Resizable = (0, import_react110.forwardRef)(
22177
+ var Resizable = (0, import_react111.forwardRef)(
22043
22178
  function Resizable2({
22044
22179
  direction = "horizontal",
22045
22180
  children,
@@ -22053,17 +22188,17 @@ var Resizable = (0, import_react110.forwardRef)(
22053
22188
  ariaLabel = "Resize panels",
22054
22189
  ...rest
22055
22190
  }, ref) {
22056
- const wrapRef = (0, import_react110.useRef)(null);
22057
- const draggingRef = (0, import_react110.useRef)(false);
22058
- const [isDragging, setIsDragging] = (0, import_react110.useState)(false);
22059
- const [split, setSplit] = (0, import_react110.useState)(0);
22060
- const [total, setTotal] = (0, import_react110.useState)(0);
22191
+ const wrapRef = (0, import_react111.useRef)(null);
22192
+ const draggingRef = (0, import_react111.useRef)(false);
22193
+ const [isDragging, setIsDragging] = (0, import_react111.useState)(false);
22194
+ const [split, setSplit] = (0, import_react111.useState)(0);
22195
+ const [total, setTotal] = (0, import_react111.useState)(0);
22061
22196
  const setRef = (node) => {
22062
22197
  wrapRef.current = node;
22063
22198
  if (typeof ref === "function") ref(node);
22064
22199
  else if (ref) ref.current = node;
22065
22200
  };
22066
- (0, import_react110.useLayoutEffect)(() => {
22201
+ (0, import_react111.useLayoutEffect)(() => {
22067
22202
  const el = wrapRef.current;
22068
22203
  if (!el) return;
22069
22204
  const t = direction === "horizontal" ? el.offsetWidth : el.offsetHeight;
@@ -22087,7 +22222,7 @@ var Resizable = (0, import_react110.forwardRef)(
22087
22222
  }
22088
22223
  setSplit(defaultSplit >= 1 ? defaultSplit : t * defaultSplit);
22089
22224
  }, []);
22090
- (0, import_react110.useEffect)(() => {
22225
+ (0, import_react111.useEffect)(() => {
22091
22226
  const el = wrapRef.current;
22092
22227
  if (!el || typeof ResizeObserver === "undefined") return;
22093
22228
  const ro = new ResizeObserver(() => {
@@ -22101,7 +22236,7 @@ var Resizable = (0, import_react110.forwardRef)(
22101
22236
  ro.observe(el);
22102
22237
  return () => ro.disconnect();
22103
22238
  }, [direction, minSecond]);
22104
- const persist = (0, import_react110.useCallback)(
22239
+ const persist = (0, import_react111.useCallback)(
22105
22240
  (next) => {
22106
22241
  onSplitChange?.(next);
22107
22242
  if (storageKey && typeof window !== "undefined" && total > 0) {
@@ -22120,7 +22255,7 @@ var Resizable = (0, import_react110.forwardRef)(
22120
22255
  setIsDragging(true);
22121
22256
  setDragOverlay(direction);
22122
22257
  };
22123
- (0, import_react110.useEffect)(() => {
22258
+ (0, import_react111.useEffect)(() => {
22124
22259
  const onMove = (e) => {
22125
22260
  if (!draggingRef.current) return;
22126
22261
  const el = wrapRef.current;
@@ -22236,7 +22371,7 @@ var Resizable = (0, import_react110.forwardRef)(
22236
22371
  }
22237
22372
  );
22238
22373
  Resizable.displayName = "Resizable";
22239
- var ResizablePanel = (0, import_react110.forwardRef)(
22374
+ var ResizablePanel = (0, import_react111.forwardRef)(
22240
22375
  function ResizablePanel2({
22241
22376
  defaultSize = 240,
22242
22377
  minSize = 120,
@@ -22249,11 +22384,11 @@ var ResizablePanel = (0, import_react110.forwardRef)(
22249
22384
  ...rest
22250
22385
  }, ref) {
22251
22386
  const isVertical = side === "bottom";
22252
- const [internal, setInternal] = (0, import_react110.useState)(sizeProp ?? defaultSize);
22387
+ const [internal, setInternal] = (0, import_react111.useState)(sizeProp ?? defaultSize);
22253
22388
  const size = sizeProp ?? internal;
22254
- const draggingRef = (0, import_react110.useRef)(false);
22255
- const [isDragging, setIsDragging] = (0, import_react110.useState)(false);
22256
- const startRef = (0, import_react110.useRef)({ at: 0, size });
22389
+ const draggingRef = (0, import_react111.useRef)(false);
22390
+ const [isDragging, setIsDragging] = (0, import_react111.useState)(false);
22391
+ const startRef = (0, import_react111.useRef)({ at: 0, size });
22257
22392
  const onPointerDown = (e) => {
22258
22393
  e.preventDefault();
22259
22394
  e.currentTarget.setPointerCapture(e.pointerId);
@@ -22265,7 +22400,7 @@ var ResizablePanel = (0, import_react110.forwardRef)(
22265
22400
  };
22266
22401
  setDragOverlay(isVertical ? "vertical" : "horizontal");
22267
22402
  };
22268
- (0, import_react110.useEffect)(() => {
22403
+ (0, import_react111.useEffect)(() => {
22269
22404
  const onMove = (e) => {
22270
22405
  if (!draggingRef.current) return;
22271
22406
  const delta = (isVertical ? e.clientY : e.clientX) - startRef.current.at;
@@ -22328,9 +22463,9 @@ var ResizablePanel = (0, import_react110.forwardRef)(
22328
22463
  ResizablePanel.displayName = "ResizablePanel";
22329
22464
 
22330
22465
  // src/components/Ribbon/Ribbon.tsx
22331
- var import_react111 = require("react");
22466
+ var import_react112 = require("react");
22332
22467
  var import_jsx_runtime92 = require("react/jsx-runtime");
22333
- var Ribbon = (0, import_react111.forwardRef)(function Ribbon2({
22468
+ var Ribbon = (0, import_react112.forwardRef)(function Ribbon2({
22334
22469
  variant = "primary",
22335
22470
  size = "md",
22336
22471
  icon,
@@ -22361,13 +22496,13 @@ var Ribbon = (0, import_react111.forwardRef)(function Ribbon2({
22361
22496
  Ribbon.displayName = "Ribbon";
22362
22497
 
22363
22498
  // src/components/ScrollArea/ScrollArea.tsx
22364
- var import_react112 = require("react");
22499
+ var import_react113 = require("react");
22365
22500
  var import_jsx_runtime93 = require("react/jsx-runtime");
22366
22501
  function resolveDimension(value) {
22367
22502
  if (value === void 0) return void 0;
22368
22503
  return typeof value === "number" ? `${value}px` : value;
22369
22504
  }
22370
- var ScrollArea = (0, import_react112.forwardRef)(
22505
+ var ScrollArea = (0, import_react113.forwardRef)(
22371
22506
  function ScrollArea2({
22372
22507
  axis = "vertical",
22373
22508
  behavior = "hover",
@@ -22433,7 +22568,7 @@ function SettingsRow({
22433
22568
 
22434
22569
  // src/components/Sheet/Sheet.tsx
22435
22570
  var import_framer_motion29 = require("framer-motion");
22436
- var import_react113 = require("react");
22571
+ var import_react114 = require("react");
22437
22572
  var import_react_dom12 = require("react-dom");
22438
22573
  var import_jsx_runtime95 = require("react/jsx-runtime");
22439
22574
  var slideVariants = {
@@ -22468,7 +22603,7 @@ function Sheet({
22468
22603
  dragHandle = true,
22469
22604
  className
22470
22605
  }) {
22471
- (0, import_react113.useEffect)(() => {
22606
+ (0, import_react114.useEffect)(() => {
22472
22607
  if (!open || !closeOnEsc) return;
22473
22608
  const onKey = (e) => {
22474
22609
  if (e.key === "Escape") onClose();
@@ -22537,7 +22672,7 @@ function Show({ above, below, children, ...rest }) {
22537
22672
  Show.displayName = "Show";
22538
22673
 
22539
22674
  // src/components/Sidebar/Sidebar.tsx
22540
- var import_react114 = require("react");
22675
+ var import_react115 = require("react");
22541
22676
  var import_jsx_runtime97 = require("react/jsx-runtime");
22542
22677
  function Sidebar({
22543
22678
  variant = "expanded",
@@ -22557,8 +22692,8 @@ function Sidebar({
22557
22692
  className
22558
22693
  }) {
22559
22694
  const allSections = sections ?? (items ? [{ items }] : []);
22560
- const [internalPinned, setInternalPinned] = (0, import_react114.useState)(defaultPinned);
22561
- (0, import_react114.useEffect)(() => {
22695
+ const [internalPinned, setInternalPinned] = (0, import_react115.useState)(defaultPinned);
22696
+ (0, import_react115.useEffect)(() => {
22562
22697
  if (pinnedProp !== void 0) return;
22563
22698
  try {
22564
22699
  const stored = window.localStorage.getItem(pinStorageKey);
@@ -22569,7 +22704,7 @@ function Sidebar({
22569
22704
  }
22570
22705
  }, []);
22571
22706
  const pinned = pinnedProp ?? internalPinned;
22572
- const setPinned = (0, import_react114.useCallback)(
22707
+ const setPinned = (0, import_react115.useCallback)(
22573
22708
  (p) => {
22574
22709
  if (pinnedProp === void 0) setInternalPinned(p);
22575
22710
  try {
@@ -22580,9 +22715,9 @@ function Sidebar({
22580
22715
  },
22581
22716
  [pinnedProp, pinStorageKey, onPinnedChange]
22582
22717
  );
22583
- const [hoverOpen, setHoverOpen] = (0, import_react114.useState)(false);
22584
- const openTimer = (0, import_react114.useRef)(null);
22585
- const closeTimer = (0, import_react114.useRef)(null);
22718
+ const [hoverOpen, setHoverOpen] = (0, import_react115.useState)(false);
22719
+ const openTimer = (0, import_react115.useRef)(null);
22720
+ const closeTimer = (0, import_react115.useRef)(null);
22586
22721
  const clearTimers = () => {
22587
22722
  if (openTimer.current) {
22588
22723
  clearTimeout(openTimer.current);
@@ -22593,7 +22728,7 @@ function Sidebar({
22593
22728
  closeTimer.current = null;
22594
22729
  }
22595
22730
  };
22596
- (0, import_react114.useEffect)(() => () => clearTimers(), []);
22731
+ (0, import_react115.useEffect)(() => () => clearTimers(), []);
22597
22732
  const handleEnter = () => {
22598
22733
  clearTimers();
22599
22734
  openTimer.current = setTimeout(() => setHoverOpen(true), hoverOpenDelay);
@@ -22605,7 +22740,7 @@ function Sidebar({
22605
22740
  const autoMode = variant === "auto";
22606
22741
  const showAsRail = autoMode ? !pinned : variant === "rail";
22607
22742
  const overlayOpen = autoMode && !pinned && hoverOpen;
22608
- (0, import_react114.useEffect)(() => {
22743
+ (0, import_react115.useEffect)(() => {
22609
22744
  if (!overlayOpen) return;
22610
22745
  const handler = (e) => {
22611
22746
  if (e.key === "Escape") {
@@ -22739,8 +22874,8 @@ function RailItem({
22739
22874
  tooltipDelay,
22740
22875
  suppressTooltip
22741
22876
  }) {
22742
- const [open, setOpen] = (0, import_react114.useState)(false);
22743
- const timerRef = (0, import_react114.useRef)(null);
22877
+ const [open, setOpen] = (0, import_react115.useState)(false);
22878
+ const timerRef = (0, import_react115.useRef)(null);
22744
22879
  const hasChildren = !!(item.children && item.children.length > 0);
22745
22880
  const clear = () => {
22746
22881
  if (timerRef.current) {
@@ -22748,7 +22883,7 @@ function RailItem({
22748
22883
  timerRef.current = null;
22749
22884
  }
22750
22885
  };
22751
- (0, import_react114.useEffect)(() => () => clear(), []);
22886
+ (0, import_react115.useEffect)(() => () => clear(), []);
22752
22887
  const show = () => {
22753
22888
  if (suppressTooltip) return;
22754
22889
  clear();
@@ -22892,7 +23027,7 @@ function SidebarToggleIcon({ collapsed }) {
22892
23027
  }
22893
23028
  function ExpandedItem({ item, level }) {
22894
23029
  const hasChildren = !!(item.children && item.children.length > 0);
22895
- const [open, setOpen] = (0, import_react114.useState)(
23030
+ const [open, setOpen] = (0, import_react115.useState)(
22896
23031
  item.defaultExpanded ?? (hasChildren && hasActiveDescendant(item))
22897
23032
  );
22898
23033
  if (hasChildren) {
@@ -23015,7 +23150,7 @@ function hasActiveDescendant(item) {
23015
23150
  }
23016
23151
 
23017
23152
  // src/components/Skeleton/Skeleton.tsx
23018
- var import_react115 = require("react");
23153
+ var import_react116 = require("react");
23019
23154
  var import_jsx_runtime98 = require("react/jsx-runtime");
23020
23155
  function toCss(value) {
23021
23156
  if (value == null) return void 0;
@@ -23026,7 +23161,7 @@ var VARIANT_TO_SHAPE = {
23026
23161
  circular: "circle",
23027
23162
  rectangular: "rect"
23028
23163
  };
23029
- var Skeleton = (0, import_react115.forwardRef)(
23164
+ var Skeleton = (0, import_react116.forwardRef)(
23030
23165
  function Skeleton2({
23031
23166
  shape,
23032
23167
  variant,
@@ -23076,7 +23211,7 @@ var Skeleton = (0, import_react115.forwardRef)(
23076
23211
  }
23077
23212
  );
23078
23213
  Skeleton.displayName = "Skeleton";
23079
- var SkeletonText = (0, import_react115.forwardRef)(
23214
+ var SkeletonText = (0, import_react116.forwardRef)(
23080
23215
  function SkeletonText2({
23081
23216
  lines = 3,
23082
23217
  width,
@@ -23112,7 +23247,7 @@ var SkeletonText = (0, import_react115.forwardRef)(
23112
23247
  }
23113
23248
  );
23114
23249
  SkeletonText.displayName = "SkeletonText";
23115
- var SkeletonGroup = (0, import_react115.forwardRef)(
23250
+ var SkeletonGroup = (0, import_react116.forwardRef)(
23116
23251
  function SkeletonGroup2({
23117
23252
  direction = "vertical",
23118
23253
  gap = 8,
@@ -23148,7 +23283,7 @@ SkeletonGroup.displayName = "SkeletonGroup";
23148
23283
 
23149
23284
  // src/components/SlideoutPanel/SlideoutPanel.tsx
23150
23285
  var import_framer_motion30 = require("framer-motion");
23151
- var import_react116 = require("react");
23286
+ var import_react117 = require("react");
23152
23287
  var import_react_aria11 = require("react-aria");
23153
23288
  var import_react_dom13 = require("react-dom");
23154
23289
  var import_jsx_runtime99 = require("react/jsx-runtime");
@@ -23174,8 +23309,8 @@ function SlideoutContent({
23174
23309
  footer,
23175
23310
  className
23176
23311
  }) {
23177
- const overlayRef = (0, import_react116.useRef)(null);
23178
- const panelRef = (0, import_react116.useRef)(null);
23312
+ const overlayRef = (0, import_react117.useRef)(null);
23313
+ const panelRef = (0, import_react117.useRef)(null);
23179
23314
  const { overlayProps } = (0, import_react_aria11.useOverlay)(
23180
23315
  {
23181
23316
  isOpen: open,
@@ -23249,9 +23384,9 @@ function SlideoutPanel(props) {
23249
23384
  }
23250
23385
 
23251
23386
  // src/components/Slider/Slider.tsx
23252
- var import_react117 = require("react");
23387
+ var import_react118 = require("react");
23253
23388
  var import_jsx_runtime100 = require("react/jsx-runtime");
23254
- var Slider = (0, import_react117.forwardRef)(function Slider2({
23389
+ var Slider = (0, import_react118.forwardRef)(function Slider2({
23255
23390
  label,
23256
23391
  value,
23257
23392
  onChange,
@@ -23273,7 +23408,7 @@ var Slider = (0, import_react117.forwardRef)(function Slider2({
23273
23408
  "aria-describedby": consumerDescribedBy,
23274
23409
  ...rest
23275
23410
  }, ref) {
23276
- const reactId = (0, import_react117.useId)();
23411
+ const reactId = (0, import_react118.useId)();
23277
23412
  const baseId = providedId ?? `ods-slider-${reactId}`;
23278
23413
  const labelId = label ? `${baseId}-label` : void 0;
23279
23414
  const hintId = error || helperText ? `${baseId}-hint` : void 0;
@@ -23372,7 +23507,7 @@ Slider.displayName = "Slider";
23372
23507
 
23373
23508
  // src/components/SocialButton/SocialButton.tsx
23374
23509
  var import_icons35 = require("@octaviaflow/icons");
23375
- var import_react118 = require("react");
23510
+ var import_react119 = require("react");
23376
23511
  var import_jsx_runtime101 = require("react/jsx-runtime");
23377
23512
  var DEFAULT_LABELS = {
23378
23513
  google: "Continue with Google",
@@ -23445,7 +23580,7 @@ function resolveIcon2(provider) {
23445
23580
  return null;
23446
23581
  }
23447
23582
  }
23448
- var SocialButton = (0, import_react118.forwardRef)(
23583
+ var SocialButton = (0, import_react119.forwardRef)(
23449
23584
  function SocialButton2({
23450
23585
  provider,
23451
23586
  label,
@@ -23488,7 +23623,7 @@ var SocialButton = (0, import_react118.forwardRef)(
23488
23623
  SocialButton.displayName = "SocialButton";
23489
23624
 
23490
23625
  // src/components/Sortable/Sortable.tsx
23491
- var import_react119 = require("react");
23626
+ var import_react120 = require("react");
23492
23627
  var import_icons36 = require("@octaviaflow/icons");
23493
23628
  var import_jsx_runtime102 = require("react/jsx-runtime");
23494
23629
  var DT_TYPE = "application/x-ods-sortable";
@@ -23503,15 +23638,15 @@ function Sortable({
23503
23638
  className,
23504
23639
  ...rest
23505
23640
  }) {
23506
- const containerRef = (0, import_react119.useRef)(null);
23507
- const itemRefs = (0, import_react119.useRef)(/* @__PURE__ */ new Map());
23508
- const originalOrderRef = (0, import_react119.useRef)(null);
23509
- const scrollTimerRef = (0, import_react119.useRef)(null);
23510
- const [draggingId, setDraggingId] = (0, import_react119.useState)(null);
23511
- const [dropPos, setDropPos] = (0, import_react119.useState)(null);
23512
- const [kbActiveId, setKbActiveId] = (0, import_react119.useState)(null);
23641
+ const containerRef = (0, import_react120.useRef)(null);
23642
+ const itemRefs = (0, import_react120.useRef)(/* @__PURE__ */ new Map());
23643
+ const originalOrderRef = (0, import_react120.useRef)(null);
23644
+ const scrollTimerRef = (0, import_react120.useRef)(null);
23645
+ const [draggingId, setDraggingId] = (0, import_react120.useState)(null);
23646
+ const [dropPos, setDropPos] = (0, import_react120.useState)(null);
23647
+ const [kbActiveId, setKbActiveId] = (0, import_react120.useState)(null);
23513
23648
  const isVertical = direction === "vertical";
23514
- const onDragStart = (0, import_react119.useCallback)(
23649
+ const onDragStart = (0, import_react120.useCallback)(
23515
23650
  (id) => (e) => {
23516
23651
  if (disabled) return;
23517
23652
  e.dataTransfer.effectAllowed = "move";
@@ -23522,7 +23657,7 @@ function Sortable({
23522
23657
  },
23523
23658
  [disabled, items]
23524
23659
  );
23525
- const cancelDrag = (0, import_react119.useCallback)(() => {
23660
+ const cancelDrag = (0, import_react120.useCallback)(() => {
23526
23661
  setDraggingId(null);
23527
23662
  setDropPos(null);
23528
23663
  originalOrderRef.current = null;
@@ -23531,7 +23666,7 @@ function Sortable({
23531
23666
  scrollTimerRef.current = null;
23532
23667
  }
23533
23668
  }, []);
23534
- const onDragEnd = (0, import_react119.useCallback)(() => {
23669
+ const onDragEnd = (0, import_react120.useCallback)(() => {
23535
23670
  cancelDrag();
23536
23671
  }, [cancelDrag]);
23537
23672
  const onItemDragOver = (id) => (e) => {
@@ -23556,7 +23691,7 @@ function Sortable({
23556
23691
  if (sourceId === target.id) return;
23557
23692
  commitMove(sourceId, target.id, target.edge);
23558
23693
  };
23559
- const commitMove = (0, import_react119.useCallback)(
23694
+ const commitMove = (0, import_react120.useCallback)(
23560
23695
  (sourceId, targetId, edge) => {
23561
23696
  const from = items.findIndex((i) => i.id === sourceId);
23562
23697
  let to = items.findIndex((i) => i.id === targetId);
@@ -23570,7 +23705,7 @@ function Sortable({
23570
23705
  },
23571
23706
  [items, onChange]
23572
23707
  );
23573
- (0, import_react119.useEffect)(() => {
23708
+ (0, import_react120.useEffect)(() => {
23574
23709
  if (!autoScroll || !draggingId) return;
23575
23710
  const container = containerRef.current;
23576
23711
  if (!container) return;
@@ -23620,7 +23755,7 @@ function Sortable({
23620
23755
  }
23621
23756
  };
23622
23757
  }, [autoScroll, autoScrollEdge, draggingId, isVertical]);
23623
- (0, import_react119.useEffect)(() => {
23758
+ (0, import_react120.useEffect)(() => {
23624
23759
  if (!draggingId) return;
23625
23760
  const onKey = (e) => {
23626
23761
  if (e.key === "Escape") cancelDrag();
@@ -23748,7 +23883,7 @@ function Sortable({
23748
23883
  }
23749
23884
  );
23750
23885
  }
23751
- var DragHandle = (0, import_react119.forwardRef)(
23886
+ var DragHandle = (0, import_react120.forwardRef)(
23752
23887
  function DragHandle2({
23753
23888
  className,
23754
23889
  style,
@@ -23773,7 +23908,7 @@ var DragHandle = (0, import_react119.forwardRef)(
23773
23908
  DragHandle.displayName = "DragHandle";
23774
23909
 
23775
23910
  // src/components/Stack/Stack.tsx
23776
- var import_react120 = require("react");
23911
+ var import_react121 = require("react");
23777
23912
  var import_jsx_runtime103 = require("react/jsx-runtime");
23778
23913
  function resolveGap2(gap) {
23779
23914
  if (typeof gap === "string") return gap;
@@ -23795,7 +23930,7 @@ var JUSTIFY_MAP = {
23795
23930
  around: "space-around",
23796
23931
  evenly: "space-evenly"
23797
23932
  };
23798
- var Stack = (0, import_react120.forwardRef)(function Stack2({
23933
+ var Stack = (0, import_react121.forwardRef)(function Stack2({
23799
23934
  direction = "column",
23800
23935
  gap = 2,
23801
23936
  align = "stretch",
@@ -23811,11 +23946,11 @@ var Stack = (0, import_react120.forwardRef)(function Stack2({
23811
23946
  ...rest
23812
23947
  }, ref) {
23813
23948
  const Component = as ?? "div";
23814
- const items = divider ? import_react120.Children.toArray(children).flatMap(
23949
+ const items = divider ? import_react121.Children.toArray(children).flatMap(
23815
23950
  (child, i, arr) => i < arr.length - 1 ? [
23816
- /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_react120.Fragment, { children: child }, `item-${i}`),
23817
- /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_react120.Fragment, { children: divider }, `divider-${i}`)
23818
- ] : [/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_react120.Fragment, { children: child }, `item-${i}`)]
23951
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_react121.Fragment, { children: child }, `item-${i}`),
23952
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_react121.Fragment, { children: divider }, `divider-${i}`)
23953
+ ] : [/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_react121.Fragment, { children: child }, `item-${i}`)]
23819
23954
  ) : children;
23820
23955
  return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
23821
23956
  Component,
@@ -23843,13 +23978,13 @@ var Stack = (0, import_react120.forwardRef)(function Stack2({
23843
23978
  );
23844
23979
  });
23845
23980
  Stack.displayName = "Stack";
23846
- var HStack = (0, import_react120.forwardRef)(
23981
+ var HStack = (0, import_react121.forwardRef)(
23847
23982
  function HStack2(props, ref) {
23848
23983
  return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Stack, { ref, direction: "row", ...props });
23849
23984
  }
23850
23985
  );
23851
23986
  HStack.displayName = "HStack";
23852
- var VStack = (0, import_react120.forwardRef)(
23987
+ var VStack = (0, import_react121.forwardRef)(
23853
23988
  function VStack2(props, ref) {
23854
23989
  return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Stack, { ref, direction: "column", ...props });
23855
23990
  }
@@ -23858,10 +23993,10 @@ VStack.displayName = "VStack";
23858
23993
 
23859
23994
  // src/components/Spotlight/Spotlight.tsx
23860
23995
  var import_framer_motion31 = require("framer-motion");
23861
- var import_react121 = require("react");
23996
+ var import_react122 = require("react");
23862
23997
  var import_react_dom14 = require("react-dom");
23863
23998
  var import_jsx_runtime104 = require("react/jsx-runtime");
23864
- var Spotlight = (0, import_react121.forwardRef)(
23999
+ var Spotlight = (0, import_react122.forwardRef)(
23865
24000
  function Spotlight2({
23866
24001
  open,
23867
24002
  target,
@@ -23878,16 +24013,16 @@ var Spotlight = (0, import_react121.forwardRef)(
23878
24013
  ...rest
23879
24014
  }, ref) {
23880
24015
  const reducedMotion = (0, import_framer_motion31.useReducedMotion)();
23881
- const [rect, setRect] = (0, import_react121.useState)(null);
23882
- const [viewport, setViewport] = (0, import_react121.useState)(() => ({
24016
+ const [rect, setRect] = (0, import_react122.useState)(null);
24017
+ const [viewport, setViewport] = (0, import_react122.useState)(() => ({
23883
24018
  width: typeof window !== "undefined" ? window.innerWidth : 0,
23884
24019
  height: typeof window !== "undefined" ? window.innerHeight : 0
23885
24020
  }));
23886
- const maskId = (0, import_react121.useMemo)(
24021
+ const maskId = (0, import_react122.useMemo)(
23887
24022
  () => `ods-spotlight-${Math.random().toString(36).slice(2, 9)}`,
23888
24023
  []
23889
24024
  );
23890
- const measure = (0, import_react121.useCallback)(() => {
24025
+ const measure = (0, import_react122.useCallback)(() => {
23891
24026
  if (!open) return;
23892
24027
  const el = target.current;
23893
24028
  if (!el) return;
@@ -23897,10 +24032,10 @@ var Spotlight = (0, import_react121.forwardRef)(
23897
24032
  height: window.innerHeight
23898
24033
  });
23899
24034
  }, [open, target]);
23900
- (0, import_react121.useLayoutEffect)(() => {
24035
+ (0, import_react122.useLayoutEffect)(() => {
23901
24036
  measure();
23902
24037
  }, [measure]);
23903
- (0, import_react121.useEffect)(() => {
24038
+ (0, import_react122.useEffect)(() => {
23904
24039
  if (!open) return;
23905
24040
  const handler = () => measure();
23906
24041
  window.addEventListener("resize", handler);
@@ -23910,7 +24045,7 @@ var Spotlight = (0, import_react121.forwardRef)(
23910
24045
  window.removeEventListener("scroll", handler, true);
23911
24046
  };
23912
24047
  }, [open, measure]);
23913
- (0, import_react121.useEffect)(() => {
24048
+ (0, import_react122.useEffect)(() => {
23914
24049
  if (!open || !onDismiss) return;
23915
24050
  const onKey = (e) => {
23916
24051
  if (e.key === "Escape") onDismiss();
@@ -24012,10 +24147,10 @@ var Spotlight = (0, import_react121.forwardRef)(
24012
24147
  Spotlight.displayName = "Spotlight";
24013
24148
 
24014
24149
  // src/components/Stat/Stat.tsx
24015
- var import_react122 = require("react");
24150
+ var import_react123 = require("react");
24016
24151
  var import_icons37 = require("@octaviaflow/icons");
24017
24152
  var import_jsx_runtime105 = require("react/jsx-runtime");
24018
- var Stat = (0, import_react122.forwardRef)(function Stat2({
24153
+ var Stat = (0, import_react123.forwardRef)(function Stat2({
24019
24154
  label,
24020
24155
  value,
24021
24156
  delta,
@@ -24054,7 +24189,7 @@ Stat.displayName = "Stat";
24054
24189
 
24055
24190
  // src/components/StatusTiles/StatusTiles.tsx
24056
24191
  var import_framer_motion32 = require("framer-motion");
24057
- var import_react123 = require("react");
24192
+ var import_react124 = require("react");
24058
24193
  var import_jsx_runtime106 = require("react/jsx-runtime");
24059
24194
  var STATUS_COLORS = {
24060
24195
  success: "var(--ods-status-success)",
@@ -24072,7 +24207,7 @@ var STATUS_TEXT = {
24072
24207
  skipped: "Skipped",
24073
24208
  idle: "Idle"
24074
24209
  };
24075
- var StatusTiles = (0, import_react123.forwardRef)(
24210
+ var StatusTiles = (0, import_react124.forwardRef)(
24076
24211
  function StatusTiles2({
24077
24212
  data,
24078
24213
  tileWidth = 10,
@@ -24089,13 +24224,13 @@ var StatusTiles = (0, import_react123.forwardRef)(
24089
24224
  onTileClick,
24090
24225
  ...rest
24091
24226
  }, ref) {
24092
- const reactId = (0, import_react123.useId)();
24093
- const visible = (0, import_react123.useMemo)(
24227
+ const reactId = (0, import_react124.useId)();
24228
+ const visible = (0, import_react124.useMemo)(
24094
24229
  () => max < data.length ? data.slice(data.length - max) : data,
24095
24230
  [data, max]
24096
24231
  );
24097
- const [hoveredIdx, setHoveredIdx] = (0, import_react123.useState)(null);
24098
- const fire = (0, import_react123.useCallback)(
24232
+ const [hoveredIdx, setHoveredIdx] = (0, import_react124.useState)(null);
24233
+ const fire = (0, import_react124.useCallback)(
24099
24234
  (idx) => {
24100
24235
  setHoveredIdx(idx);
24101
24236
  if (idx === null) {
@@ -24107,7 +24242,7 @@ var StatusTiles = (0, import_react123.forwardRef)(
24107
24242
  },
24108
24243
  [onTileHover, visible]
24109
24244
  );
24110
- const handleKey = (0, import_react123.useCallback)(
24245
+ const handleKey = (0, import_react124.useCallback)(
24111
24246
  (e, idx) => {
24112
24247
  if (!onTileClick) return;
24113
24248
  if (e.key === "Enter" || e.key === " ") {
@@ -24117,7 +24252,7 @@ var StatusTiles = (0, import_react123.forwardRef)(
24117
24252
  },
24118
24253
  [visible, onTileClick]
24119
24254
  );
24120
- const resolvedAriaLabel = (0, import_react123.useMemo)(() => {
24255
+ const resolvedAriaLabel = (0, import_react124.useMemo)(() => {
24121
24256
  if (ariaLabel) return ariaLabel;
24122
24257
  const t = typeof title === "string" ? title : "Status";
24123
24258
  const tally = {};
@@ -24191,7 +24326,7 @@ StatusTiles.displayName = "StatusTiles";
24191
24326
 
24192
24327
  // src/components/Stepper/Stepper.tsx
24193
24328
  var import_icons38 = require("@octaviaflow/icons");
24194
- var import_react124 = require("react");
24329
+ var import_react125 = require("react");
24195
24330
  var import_jsx_runtime107 = require("react/jsx-runtime");
24196
24331
  function deriveStatus(step, index, active) {
24197
24332
  if (step.status) return step.status;
@@ -24199,7 +24334,7 @@ function deriveStatus(step, index, active) {
24199
24334
  if (index === active) return "active";
24200
24335
  return "pending";
24201
24336
  }
24202
- var Stepper = (0, import_react124.forwardRef)(
24337
+ var Stepper = (0, import_react125.forwardRef)(
24203
24338
  function Stepper2({
24204
24339
  steps,
24205
24340
  active = 0,
@@ -24213,7 +24348,7 @@ var Stepper = (0, import_react124.forwardRef)(
24213
24348
  className,
24214
24349
  ...rest
24215
24350
  }, ref) {
24216
- const reactId = (0, import_react124.useId)();
24351
+ const reactId = (0, import_react125.useId)();
24217
24352
  const baseId = providedId ?? `ods-stepper-${reactId}`;
24218
24353
  const activeIndex = active ?? defaultActive ?? 0;
24219
24354
  const isInteractive = Boolean(onStepChange) && !disabled;
@@ -24365,7 +24500,7 @@ Stepper.displayName = "Stepper";
24365
24500
 
24366
24501
  // src/components/Sankey/Sankey.tsx
24367
24502
  var import_framer_motion33 = require("framer-motion");
24368
- var import_react125 = require("react");
24503
+ var import_react126 = require("react");
24369
24504
  var import_jsx_runtime108 = require("react/jsx-runtime");
24370
24505
  var defaultFormat7 = (n) => {
24371
24506
  if (Math.abs(n) >= 1e6) return `${(n / 1e6).toFixed(1)}M`;
@@ -24405,7 +24540,7 @@ function assignColumns(nodes, links) {
24405
24540
  }
24406
24541
  return cols;
24407
24542
  }
24408
- var Sankey = (0, import_react125.forwardRef)(function Sankey2({
24543
+ var Sankey = (0, import_react126.forwardRef)(function Sankey2({
24409
24544
  nodes,
24410
24545
  links,
24411
24546
  width = 720,
@@ -24427,13 +24562,13 @@ var Sankey = (0, import_react125.forwardRef)(function Sankey2({
24427
24562
  onLinkClick,
24428
24563
  ...rest
24429
24564
  }, ref) {
24430
- const reactId = (0, import_react125.useId)();
24431
- const columnMap = (0, import_react125.useMemo)(
24565
+ const reactId = (0, import_react126.useId)();
24566
+ const columnMap = (0, import_react126.useMemo)(
24432
24567
  () => assignColumns(nodes, links),
24433
24568
  [nodes, links]
24434
24569
  );
24435
24570
  const columnCount = Math.max(0, ...Array.from(columnMap.values())) + 1;
24436
- const flows = (0, import_react125.useMemo)(() => {
24571
+ const flows = (0, import_react126.useMemo)(() => {
24437
24572
  const inFlow = /* @__PURE__ */ new Map();
24438
24573
  const outFlow = /* @__PURE__ */ new Map();
24439
24574
  for (const n of nodes) {
@@ -24446,7 +24581,7 @@ var Sankey = (0, import_react125.forwardRef)(function Sankey2({
24446
24581
  }
24447
24582
  return { inFlow, outFlow };
24448
24583
  }, [nodes, links]);
24449
- const columns = (0, import_react125.useMemo)(() => {
24584
+ const columns = (0, import_react126.useMemo)(() => {
24450
24585
  const grouped = Array.from(
24451
24586
  { length: columnCount },
24452
24587
  () => []
@@ -24457,7 +24592,7 @@ var Sankey = (0, import_react125.forwardRef)(function Sankey2({
24457
24592
  }
24458
24593
  return grouped;
24459
24594
  }, [nodes, columnMap, columnCount]);
24460
- const columnFlows = (0, import_react125.useMemo)(
24595
+ const columnFlows = (0, import_react126.useMemo)(
24461
24596
  () => columns.map(
24462
24597
  (col) => col.reduce((s, n) => {
24463
24598
  const f = Math.max(
@@ -24471,11 +24606,11 @@ var Sankey = (0, import_react125.forwardRef)(function Sankey2({
24471
24606
  );
24472
24607
  const maxColumnFlow = Math.max(1, ...columnFlows);
24473
24608
  const colAvail = (col) => height - Math.max(0, col.length - 1) * nodeGap;
24474
- const scale = (0, import_react125.useMemo)(() => {
24609
+ const scale = (0, import_react126.useMemo)(() => {
24475
24610
  const avail = Math.min(...columns.map(colAvail));
24476
24611
  return avail / maxColumnFlow;
24477
24612
  }, [columns, height, nodeGap, maxColumnFlow]);
24478
- const layoutNodes = (0, import_react125.useMemo)(() => {
24613
+ const layoutNodes = (0, import_react126.useMemo)(() => {
24479
24614
  const m = /* @__PURE__ */ new Map();
24480
24615
  const colX = (c) => {
24481
24616
  if (columnCount <= 1) return 0;
@@ -24516,7 +24651,7 @@ var Sankey = (0, import_react125.forwardRef)(function Sankey2({
24516
24651
  }
24517
24652
  return m;
24518
24653
  }, [columns, columnCount, width, nodeWidth, flows, scale, height, nodeGap]);
24519
- const layoutLinks = (0, import_react125.useMemo)(() => {
24654
+ const layoutLinks = (0, import_react126.useMemo)(() => {
24520
24655
  const sourceOffset = /* @__PURE__ */ new Map();
24521
24656
  const targetOffset = /* @__PURE__ */ new Map();
24522
24657
  for (const n of nodes) {
@@ -24559,23 +24694,23 @@ var Sankey = (0, import_react125.forwardRef)(function Sankey2({
24559
24694
  }
24560
24695
  return out;
24561
24696
  }, [links, layoutNodes, nodeWidth, scale]);
24562
- const [hoveredNode, setHoveredNode] = (0, import_react125.useState)(null);
24563
- const [hoveredLink, setHoveredLink] = (0, import_react125.useState)(null);
24564
- const fireNode = (0, import_react125.useCallback)(
24697
+ const [hoveredNode, setHoveredNode] = (0, import_react126.useState)(null);
24698
+ const [hoveredLink, setHoveredLink] = (0, import_react126.useState)(null);
24699
+ const fireNode = (0, import_react126.useCallback)(
24565
24700
  (n) => {
24566
24701
  setHoveredNode(n);
24567
24702
  onNodeHover?.(n);
24568
24703
  },
24569
24704
  [onNodeHover]
24570
24705
  );
24571
- const fireLink = (0, import_react125.useCallback)(
24706
+ const fireLink = (0, import_react126.useCallback)(
24572
24707
  (l) => {
24573
24708
  setHoveredLink(l);
24574
24709
  onLinkHover?.(l);
24575
24710
  },
24576
24711
  [onLinkHover]
24577
24712
  );
24578
- const handleNodeKey = (0, import_react125.useCallback)(
24713
+ const handleNodeKey = (0, import_react126.useCallback)(
24579
24714
  (e, n) => {
24580
24715
  if (!onNodeClick) return;
24581
24716
  if (e.key === "Enter" || e.key === " ") {
@@ -24585,7 +24720,7 @@ var Sankey = (0, import_react125.forwardRef)(function Sankey2({
24585
24720
  },
24586
24721
  [onNodeClick]
24587
24722
  );
24588
- const resolvedAriaLabel = (0, import_react125.useMemo)(() => {
24723
+ const resolvedAriaLabel = (0, import_react126.useMemo)(() => {
24589
24724
  if (ariaLabel) return ariaLabel;
24590
24725
  const t = typeof title === "string" ? title : "Sankey";
24591
24726
  return `${t} \u2014 ${nodes.length} nodes, ${links.length} flows`;
@@ -24718,10 +24853,10 @@ var Sankey = (0, import_react125.forwardRef)(function Sankey2({
24718
24853
  Sankey.displayName = "Sankey";
24719
24854
 
24720
24855
  // src/components/Switch/Switch.tsx
24721
- var import_react126 = require("react");
24856
+ var import_react127 = require("react");
24722
24857
  var import_react_aria12 = require("react-aria");
24723
24858
  var import_jsx_runtime109 = require("react/jsx-runtime");
24724
- var Switch = (0, import_react126.forwardRef)(function Switch2({
24859
+ var Switch = (0, import_react127.forwardRef)(function Switch2({
24725
24860
  checked,
24726
24861
  defaultChecked,
24727
24862
  onChange,
@@ -24732,7 +24867,7 @@ var Switch = (0, import_react126.forwardRef)(function Switch2({
24732
24867
  className,
24733
24868
  ...props
24734
24869
  }, forwardedRef) {
24735
- const innerRef = (0, import_react126.useRef)(null);
24870
+ const innerRef = (0, import_react127.useRef)(null);
24736
24871
  const setRef = (node) => {
24737
24872
  innerRef.current = node;
24738
24873
  if (typeof forwardedRef === "function") forwardedRef(node);
@@ -24808,7 +24943,7 @@ var Switch = (0, import_react126.forwardRef)(function Switch2({
24808
24943
  Switch.displayName = "Switch";
24809
24944
 
24810
24945
  // src/components/Table/Table.tsx
24811
- var import_react127 = require("react");
24946
+ var import_react128 = require("react");
24812
24947
  var import_icons39 = require("@octaviaflow/icons");
24813
24948
  var import_jsx_runtime110 = require("react/jsx-runtime");
24814
24949
  function TableInner({
@@ -24828,7 +24963,7 @@ function TableInner({
24828
24963
  "aria-label": ariaLabel = "Data table",
24829
24964
  ...rest
24830
24965
  }, ref) {
24831
- const handleSort = (0, import_react127.useCallback)(
24966
+ const handleSort = (0, import_react128.useCallback)(
24832
24967
  (key) => {
24833
24968
  if (!onSort) return;
24834
24969
  const col = columns.find((c) => c.key === key);
@@ -24838,7 +24973,7 @@ function TableInner({
24838
24973
  },
24839
24974
  [columns, onSort, sortKey, sortDirection]
24840
24975
  );
24841
- const handleSelectAll = (0, import_react127.useCallback)(() => {
24976
+ const handleSelectAll = (0, import_react128.useCallback)(() => {
24842
24977
  if (!onSelectionChange) return;
24843
24978
  const allSelected = selectedRows?.size === data.length;
24844
24979
  if (allSelected) {
@@ -24847,7 +24982,7 @@ function TableInner({
24847
24982
  onSelectionChange(new Set(data.map((_, i) => i)));
24848
24983
  }
24849
24984
  }, [data, onSelectionChange, selectedRows]);
24850
- const handleSelectRow = (0, import_react127.useCallback)(
24985
+ const handleSelectRow = (0, import_react128.useCallback)(
24851
24986
  (index) => {
24852
24987
  if (!onSelectionChange || !selectedRows) return;
24853
24988
  const next = new Set(selectedRows);
@@ -24930,7 +25065,7 @@ function TableInner({
24930
25065
  }
24931
25066
  );
24932
25067
  }
24933
- var Table = (0, import_react127.forwardRef)(TableInner);
25068
+ var Table = (0, import_react128.forwardRef)(TableInner);
24934
25069
  function TableRow({
24935
25070
  row,
24936
25071
  rowIndex,
@@ -24943,7 +25078,7 @@ function TableRow({
24943
25078
  totalCols
24944
25079
  }) {
24945
25080
  const isSelected = selectedRows?.has(rowIndex) ?? false;
24946
- const [expanded, setExpanded] = (0, import_react127.useState)(false);
25081
+ const [expanded, setExpanded] = (0, import_react128.useState)(false);
24947
25082
  return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(import_jsx_runtime110.Fragment, { children: [
24948
25083
  /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
24949
25084
  "tr",
@@ -24981,7 +25116,7 @@ function TableRow({
24981
25116
 
24982
25117
  // src/components/Tabs/Tabs.tsx
24983
25118
  var import_framer_motion34 = require("framer-motion");
24984
- var import_react128 = require("react");
25119
+ var import_react129 = require("react");
24985
25120
  var import_react_aria13 = require("react-aria");
24986
25121
  var import_jsx_runtime111 = require("react/jsx-runtime");
24987
25122
  function TabButton({
@@ -24989,7 +25124,7 @@ function TabButton({
24989
25124
  state,
24990
25125
  indicatorLayoutId
24991
25126
  }) {
24992
- const ref = (0, import_react128.useRef)(null);
25127
+ const ref = (0, import_react129.useRef)(null);
24993
25128
  const { tabProps } = (0, import_react_aria13.useTab)({ key: item.key }, state, ref);
24994
25129
  const isSelected = state.selectedKey === item.key;
24995
25130
  const isDisabled = state.disabledKeys.has(item.key);
@@ -25019,7 +25154,7 @@ function TabButton({
25019
25154
  );
25020
25155
  }
25021
25156
  function TabPanelContent({ state, panelContent, ...props }) {
25022
- const ref = (0, import_react128.useRef)(null);
25157
+ const ref = (0, import_react129.useRef)(null);
25023
25158
  const { tabPanelProps } = (0, import_react_aria13.useTabPanel)(props, state, ref);
25024
25159
  return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("div", { ...tabPanelProps, ref, className: "ods-tabs__panel", children: panelContent });
25025
25160
  }
@@ -25033,16 +25168,16 @@ function Tabs({
25033
25168
  orientation = "horizontal",
25034
25169
  className
25035
25170
  }) {
25036
- const reactId = (0, import_react128.useId)();
25171
+ const reactId = (0, import_react129.useId)();
25037
25172
  const indicatorLayoutId = `ods-tabs-indicator-${reactId}`;
25038
- const [internalValue, setInternalValue] = (0, import_react128.useState)(defaultValue || items[0]?.value);
25173
+ const [internalValue, setInternalValue] = (0, import_react129.useState)(defaultValue || items[0]?.value);
25039
25174
  const selectedKey = value ?? internalValue;
25040
25175
  const handleSelectionChange = (key) => {
25041
25176
  const keyStr = String(key);
25042
25177
  if (!value) setInternalValue(keyStr);
25043
25178
  onChange?.(keyStr);
25044
25179
  };
25045
- const panelContentMap = (0, import_react128.useMemo)(() => {
25180
+ const panelContentMap = (0, import_react129.useMemo)(() => {
25046
25181
  const map = /* @__PURE__ */ new Map();
25047
25182
  items.forEach((item) => {
25048
25183
  map.set(item.value, item.children);
@@ -25059,12 +25194,12 @@ function Tabs({
25059
25194
  disabledKeys: items.filter((i) => i.disabled).map((i) => i.value)
25060
25195
  };
25061
25196
  const state = $caeb030f09a278a1$export$4ba071daf4e486(stateProps);
25062
- const ref = (0, import_react128.useRef)(null);
25197
+ const ref = (0, import_react129.useRef)(null);
25063
25198
  const { tabListProps } = (0, import_react_aria13.useTabList)({ ...stateProps, orientation }, state, ref);
25064
- const scrollContainerRef = (0, import_react128.useRef)(null);
25065
- const [canScrollLeft, setCanScrollLeft] = (0, import_react128.useState)(false);
25066
- const [canScrollRight, setCanScrollRight] = (0, import_react128.useState)(false);
25067
- const measureOverflow = (0, import_react128.useCallback)(() => {
25199
+ const scrollContainerRef = (0, import_react129.useRef)(null);
25200
+ const [canScrollLeft, setCanScrollLeft] = (0, import_react129.useState)(false);
25201
+ const [canScrollRight, setCanScrollRight] = (0, import_react129.useState)(false);
25202
+ const measureOverflow = (0, import_react129.useCallback)(() => {
25068
25203
  const el = scrollContainerRef.current;
25069
25204
  if (!el || orientation !== "horizontal") {
25070
25205
  setCanScrollLeft(false);
@@ -25075,7 +25210,7 @@ function Tabs({
25075
25210
  setCanScrollLeft(el.scrollLeft > SCROLL_EDGE_EPSILON);
25076
25211
  setCanScrollRight(el.scrollLeft < max - SCROLL_EDGE_EPSILON);
25077
25212
  }, [orientation]);
25078
- (0, import_react128.useEffect)(() => {
25213
+ (0, import_react129.useEffect)(() => {
25079
25214
  measureOverflow();
25080
25215
  const el = scrollContainerRef.current;
25081
25216
  if (!el || typeof ResizeObserver === "undefined") return;
@@ -25155,10 +25290,10 @@ function ChevronSvg({ dir }) {
25155
25290
  }
25156
25291
 
25157
25292
  // src/components/TagsInput/TagsInput.tsx
25158
- var import_react129 = require("react");
25293
+ var import_react130 = require("react");
25159
25294
  var import_icons40 = require("@octaviaflow/icons");
25160
25295
  var import_jsx_runtime112 = require("react/jsx-runtime");
25161
- var TagsInput = (0, import_react129.forwardRef)(
25296
+ var TagsInput = (0, import_react130.forwardRef)(
25162
25297
  function TagsInput2({
25163
25298
  label,
25164
25299
  value,
@@ -25179,8 +25314,8 @@ var TagsInput = (0, import_react129.forwardRef)(
25179
25314
  "aria-describedby": consumerDescribedBy,
25180
25315
  ...rest
25181
25316
  }, ref) {
25182
- const [draft, setDraft] = (0, import_react129.useState)("");
25183
- const reactId = (0, import_react129.useId)();
25317
+ const [draft, setDraft] = (0, import_react130.useState)("");
25318
+ const reactId = (0, import_react130.useId)();
25184
25319
  const inputId = providedId ?? `ods-tags-${reactId}`;
25185
25320
  const labelId = label ? `${inputId}-label` : void 0;
25186
25321
  const hintId = error || helperText ? `${inputId}-hint` : void 0;
@@ -25280,9 +25415,9 @@ var TagsInput = (0, import_react129.forwardRef)(
25280
25415
  TagsInput.displayName = "TagsInput";
25281
25416
 
25282
25417
  // src/components/TemplateCard/TemplateCard.tsx
25283
- var import_react130 = require("react");
25418
+ var import_react131 = require("react");
25284
25419
  var import_jsx_runtime113 = require("react/jsx-runtime");
25285
- var TemplateCard = (0, import_react130.forwardRef)(
25420
+ var TemplateCard = (0, import_react131.forwardRef)(
25286
25421
  function TemplateCard2({
25287
25422
  name,
25288
25423
  nameAs = "h3",
@@ -25310,7 +25445,7 @@ var TemplateCard = (0, import_react130.forwardRef)(
25310
25445
  className,
25311
25446
  ...rest
25312
25447
  }, ref) {
25313
- const reactId = (0, import_react130.useId)();
25448
+ const reactId = (0, import_react131.useId)();
25314
25449
  const baseId = providedId ?? `ods-template-card-${reactId}`;
25315
25450
  const nameId = `${baseId}-name`;
25316
25451
  const descId = description ? `${baseId}-desc` : void 0;
@@ -25501,13 +25636,13 @@ TemplateCard.displayName = "TemplateCard";
25501
25636
 
25502
25637
  // src/components/TestimonialCard/TestimonialCard.tsx
25503
25638
  var import_icons41 = require("@octaviaflow/icons");
25504
- var import_react131 = require("react");
25639
+ var import_react132 = require("react");
25505
25640
  var import_jsx_runtime114 = require("react/jsx-runtime");
25506
25641
  function isAuthorObject(v) {
25507
25642
  return typeof v === "object" && v !== null && !("type" in v) && // exclude React elements
25508
25643
  "name" in v;
25509
25644
  }
25510
- var TestimonialCard = (0, import_react131.forwardRef)(function TestimonialCard2({
25645
+ var TestimonialCard = (0, import_react132.forwardRef)(function TestimonialCard2({
25511
25646
  quote,
25512
25647
  author,
25513
25648
  role: legacyRole,
@@ -25521,7 +25656,7 @@ var TestimonialCard = (0, import_react131.forwardRef)(function TestimonialCard2(
25521
25656
  className,
25522
25657
  ...rest
25523
25658
  }, ref) {
25524
- const reactId = (0, import_react131.useId)();
25659
+ const reactId = (0, import_react132.useId)();
25525
25660
  const baseId = providedId ?? `ods-testimonial-${reactId}`;
25526
25661
  const quoteId = `${baseId}-quote`;
25527
25662
  const authorId = `${baseId}-author`;
@@ -25615,13 +25750,13 @@ var TestimonialCard = (0, import_react131.forwardRef)(function TestimonialCard2(
25615
25750
  TestimonialCard.displayName = "TestimonialCard";
25616
25751
 
25617
25752
  // src/components/Textarea/Textarea.tsx
25618
- var import_react135 = require("react");
25753
+ var import_react136 = require("react");
25619
25754
  var import_react_aria14 = require("react-aria");
25620
25755
  var import_react_dom15 = require("react-dom");
25621
25756
  var import_icons43 = require("@octaviaflow/icons");
25622
25757
 
25623
25758
  // src/hooks/useTextareaCommands.ts
25624
- var import_react132 = require("react");
25759
+ var import_react133 = require("react");
25625
25760
  function findOpenTrigger(value, caret, trigger) {
25626
25761
  let i = caret - 1;
25627
25762
  while (i >= 0) {
@@ -25699,15 +25834,15 @@ function useTextareaCommands({
25699
25834
  openOnEmptyTrigger = true,
25700
25835
  maxItems = 8
25701
25836
  }) {
25702
- const [isOpen, setIsOpen] = (0, import_react132.useState)(false);
25703
- const [query, setQuery] = (0, import_react132.useState)("");
25704
- const [activeIndex, setActiveIndex] = (0, import_react132.useState)(0);
25705
- const [triggerIndex, setTriggerIndex] = (0, import_react132.useState)(null);
25706
- const [caretRect, setCaretRect] = (0, import_react132.useState)(null);
25707
- const dismissedAtRef = (0, import_react132.useRef)(
25837
+ const [isOpen, setIsOpen] = (0, import_react133.useState)(false);
25838
+ const [query, setQuery] = (0, import_react133.useState)("");
25839
+ const [activeIndex, setActiveIndex] = (0, import_react133.useState)(0);
25840
+ const [triggerIndex, setTriggerIndex] = (0, import_react133.useState)(null);
25841
+ const [caretRect, setCaretRect] = (0, import_react133.useState)(null);
25842
+ const dismissedAtRef = (0, import_react133.useRef)(
25708
25843
  null
25709
25844
  );
25710
- const items = (0, import_react132.useMemo)(() => {
25845
+ const items = (0, import_react133.useMemo)(() => {
25711
25846
  const q2 = query.trim().toLowerCase();
25712
25847
  if (!q2) return commands.slice(0, maxItems);
25713
25848
  return commands.filter((c) => {
@@ -25720,7 +25855,7 @@ function useTextareaCommands({
25720
25855
  return hay.includes(q2);
25721
25856
  }).slice(0, maxItems);
25722
25857
  }, [commands, query, maxItems]);
25723
- (0, import_react132.useEffect)(() => {
25858
+ (0, import_react133.useEffect)(() => {
25724
25859
  const ta = textareaRef.current;
25725
25860
  if (!ta) return;
25726
25861
  const caret = ta.selectionStart ?? 0;
@@ -25743,7 +25878,7 @@ function useTextareaCommands({
25743
25878
  setCaretRect(getCaretRect(ta, caret));
25744
25879
  }
25745
25880
  }, [value, trigger, openOnEmptyTrigger, isOpen, textareaRef]);
25746
- const commit = (0, import_react132.useCallback)(
25881
+ const commit = (0, import_react133.useCallback)(
25747
25882
  (cmd) => {
25748
25883
  const ta = textareaRef.current;
25749
25884
  if (!ta || triggerIndex == null) return;
@@ -25767,7 +25902,7 @@ function useTextareaCommands({
25767
25902
  },
25768
25903
  [textareaRef, triggerIndex, query, value, onChange]
25769
25904
  );
25770
- const dismiss = (0, import_react132.useCallback)(() => {
25905
+ const dismiss = (0, import_react133.useCallback)(() => {
25771
25906
  const ta = textareaRef.current;
25772
25907
  dismissedAtRef.current = {
25773
25908
  value,
@@ -25776,7 +25911,7 @@ function useTextareaCommands({
25776
25911
  setIsOpen(false);
25777
25912
  setTriggerIndex(null);
25778
25913
  }, [textareaRef, value]);
25779
- const onKeyDown = (0, import_react132.useCallback)(
25914
+ const onKeyDown = (0, import_react133.useCallback)(
25780
25915
  (e) => {
25781
25916
  if (!isOpen) return false;
25782
25917
  if (e.key === "ArrowDown") {
@@ -25819,7 +25954,7 @@ function useTextareaCommands({
25819
25954
  }
25820
25955
 
25821
25956
  // src/hooks/useTextareaSelection.ts
25822
- var import_react133 = require("react");
25957
+ var import_react134 = require("react");
25823
25958
  function getSelectionRect(textarea, start, end) {
25824
25959
  if (typeof document === "undefined") return null;
25825
25960
  if (start === end) return null;
@@ -25881,10 +26016,10 @@ function useTextareaSelection({
25881
26016
  value,
25882
26017
  onChange
25883
26018
  }) {
25884
- const [start, setStart] = (0, import_react133.useState)(0);
25885
- const [end, setEnd] = (0, import_react133.useState)(0);
25886
- const [rect, setRect] = (0, import_react133.useState)(null);
25887
- (0, import_react133.useEffect)(() => {
26019
+ const [start, setStart] = (0, import_react134.useState)(0);
26020
+ const [end, setEnd] = (0, import_react134.useState)(0);
26021
+ const [rect, setRect] = (0, import_react134.useState)(null);
26022
+ (0, import_react134.useEffect)(() => {
25888
26023
  if (typeof document === "undefined") return;
25889
26024
  const handler = () => {
25890
26025
  const ta = textareaRef.current;
@@ -25905,7 +26040,7 @@ function useTextareaSelection({
25905
26040
  }, [textareaRef]);
25906
26041
  const active = start !== end;
25907
26042
  const text = active ? value.slice(start, end) : "";
25908
- const writeToClipboard = (0, import_react133.useCallback)(
26043
+ const writeToClipboard = (0, import_react134.useCallback)(
25909
26044
  async (str) => {
25910
26045
  try {
25911
26046
  if (typeof navigator !== "undefined" && navigator.clipboard?.writeText) {
@@ -25930,11 +26065,11 @@ function useTextareaSelection({
25930
26065
  },
25931
26066
  []
25932
26067
  );
25933
- const copy = (0, import_react133.useCallback)(async () => {
26068
+ const copy = (0, import_react134.useCallback)(async () => {
25934
26069
  if (!active) return false;
25935
26070
  return writeToClipboard(text);
25936
26071
  }, [active, text, writeToClipboard]);
25937
- const replace = (0, import_react133.useCallback)(
26072
+ const replace = (0, import_react134.useCallback)(
25938
26073
  (str) => {
25939
26074
  const ta = textareaRef.current;
25940
26075
  if (!ta) return;
@@ -25948,13 +26083,13 @@ function useTextareaSelection({
25948
26083
  },
25949
26084
  [textareaRef, value, start, end, onChange]
25950
26085
  );
25951
- const cut = (0, import_react133.useCallback)(async () => {
26086
+ const cut = (0, import_react134.useCallback)(async () => {
25952
26087
  if (!active) return false;
25953
26088
  const ok = await writeToClipboard(text);
25954
26089
  if (ok) replace("");
25955
26090
  return ok;
25956
26091
  }, [active, text, writeToClipboard, replace]);
25957
- const wrap = (0, import_react133.useCallback)(
26092
+ const wrap = (0, import_react134.useCallback)(
25958
26093
  (open, close) => {
25959
26094
  const ta = textareaRef.current;
25960
26095
  if (!ta) return;
@@ -25988,7 +26123,7 @@ function useTextareaSelection({
25988
26123
 
25989
26124
  // src/hooks/useTextareaTools.tsx
25990
26125
  var import_icons42 = require("@octaviaflow/icons");
25991
- var import_react134 = require("react");
26126
+ var import_react135 = require("react");
25992
26127
  var import_jsx_runtime115 = require("react/jsx-runtime");
25993
26128
  function useTextareaTools({
25994
26129
  textareaRef,
@@ -25996,9 +26131,9 @@ function useTextareaTools({
25996
26131
  onChange,
25997
26132
  tools
25998
26133
  }) {
25999
- const valueRef = (0, import_react134.useRef)(value);
26134
+ const valueRef = (0, import_react135.useRef)(value);
26000
26135
  valueRef.current = value;
26001
- const helpers = (0, import_react134.useMemo)(() => {
26136
+ const helpers = (0, import_react135.useMemo)(() => {
26002
26137
  const getTa = () => textareaRef.current;
26003
26138
  const getSelection = () => {
26004
26139
  const ta = getTa();
@@ -26096,11 +26231,11 @@ function useTextareaTools({
26096
26231
  getTextarea: getTa
26097
26232
  };
26098
26233
  }, [textareaRef, onChange]);
26099
- const visibleTools = (0, import_react134.useMemo)(
26234
+ const visibleTools = (0, import_react135.useMemo)(
26100
26235
  () => tools.filter((t) => t.isVisible ? t.isVisible(helpers) : true),
26101
26236
  [tools, helpers]
26102
26237
  );
26103
- const runTool = (0, import_react134.useCallback)(
26238
+ const runTool = (0, import_react135.useCallback)(
26104
26239
  async (id) => {
26105
26240
  const tool = tools.find((t) => t.id === id);
26106
26241
  if (!tool || tool.kind === "divider") return;
@@ -26206,7 +26341,7 @@ var textareaTools = {
26206
26341
 
26207
26342
  // src/components/Textarea/Textarea.tsx
26208
26343
  var import_jsx_runtime116 = require("react/jsx-runtime");
26209
- var Textarea = (0, import_react135.forwardRef)(
26344
+ var Textarea = (0, import_react136.forwardRef)(
26210
26345
  function Textarea2({
26211
26346
  label,
26212
26347
  error = false,
@@ -26238,17 +26373,17 @@ var Textarea = (0, import_react135.forwardRef)(
26238
26373
  toolbarPosition = "top",
26239
26374
  ...props
26240
26375
  }, forwardedRef) {
26241
- const innerRef = (0, import_react135.useRef)(null);
26376
+ const innerRef = (0, import_react136.useRef)(null);
26242
26377
  const setRef = (node) => {
26243
26378
  innerRef.current = node;
26244
26379
  if (typeof forwardedRef === "function") forwardedRef(node);
26245
26380
  else if (forwardedRef)
26246
26381
  forwardedRef.current = node;
26247
26382
  };
26248
- const reactId = (0, import_react135.useId)();
26383
+ const reactId = (0, import_react136.useId)();
26249
26384
  const baseId = providedId ?? `ods-textarea-${reactId}`;
26250
26385
  const hintId = error && errorMessage || helperText ? `${baseId}-hint` : void 0;
26251
- const [charCount, setCharCount] = (0, import_react135.useState)(
26386
+ const [charCount, setCharCount] = (0, import_react136.useState)(
26252
26387
  () => String(value ?? defaultValue ?? "").length
26253
26388
  );
26254
26389
  const ariaNameProps = resolveAccessibleName({
@@ -26278,10 +26413,10 @@ var Textarea = (0, import_react135.forwardRef)(
26278
26413
  setCharCount(e.target.value.length);
26279
26414
  onChange?.(e);
26280
26415
  };
26281
- const [liveValue, setLiveValue] = (0, import_react135.useState)(
26416
+ const [liveValue, setLiveValue] = (0, import_react136.useState)(
26282
26417
  String(value ?? defaultValue ?? "")
26283
26418
  );
26284
- (0, import_react135.useEffect)(() => {
26419
+ (0, import_react136.useEffect)(() => {
26285
26420
  if (value != null) setLiveValue(String(value));
26286
26421
  }, [value]);
26287
26422
  const handleChangeWithMirror = (e) => {
@@ -26324,7 +26459,7 @@ var Textarea = (0, import_react135.forwardRef)(
26324
26459
  }
26325
26460
  props.onKeyDown?.(e);
26326
26461
  };
26327
- (0, import_react135.useEffect)(() => {
26462
+ (0, import_react136.useEffect)(() => {
26328
26463
  if (!autoResize) return;
26329
26464
  const el = innerRef.current;
26330
26465
  if (!el) return;
@@ -26592,9 +26727,9 @@ function TextareaToolbar({
26592
26727
 
26593
26728
  // src/components/Timeline/Timeline.tsx
26594
26729
  var import_framer_motion35 = require("framer-motion");
26595
- var import_react136 = require("react");
26730
+ var import_react137 = require("react");
26596
26731
  var import_jsx_runtime117 = require("react/jsx-runtime");
26597
- var Timeline = (0, import_react136.forwardRef)(
26732
+ var Timeline = (0, import_react137.forwardRef)(
26598
26733
  function Timeline2({
26599
26734
  items,
26600
26735
  size = "md",
@@ -26660,7 +26795,7 @@ var Timeline = (0, import_react136.forwardRef)(
26660
26795
  Timeline.displayName = "Timeline";
26661
26796
 
26662
26797
  // src/components/TimePicker/TimePicker.tsx
26663
- var import_react137 = require("react");
26798
+ var import_react138 = require("react");
26664
26799
  var import_icons44 = require("@octaviaflow/icons");
26665
26800
  var import_jsx_runtime118 = require("react/jsx-runtime");
26666
26801
  var pad = (n) => n.toString().padStart(2, "0");
@@ -26675,7 +26810,7 @@ function clampSeg(seg, n, use24h) {
26675
26810
  }
26676
26811
  return Math.max(0, Math.min(59, n));
26677
26812
  }
26678
- var TimePicker = (0, import_react137.forwardRef)(
26813
+ var TimePicker = (0, import_react138.forwardRef)(
26679
26814
  function TimePicker2({
26680
26815
  label,
26681
26816
  value,
@@ -26695,28 +26830,28 @@ var TimePicker = (0, import_react137.forwardRef)(
26695
26830
  "aria-describedby": consumerDescribedBy,
26696
26831
  ...rest
26697
26832
  }, forwardedRef) {
26698
- const reactId = (0, import_react137.useId)();
26833
+ const reactId = (0, import_react138.useId)();
26699
26834
  const baseId = providedId ?? `ods-timepicker-${reactId}`;
26700
26835
  const labelId = label ? `${baseId}-label` : void 0;
26701
26836
  const hintId = error || helperText ? `${baseId}-hint` : void 0;
26702
26837
  const describedBy = [consumerDescribedBy, hintId].filter(Boolean).join(" ") || void 0;
26703
- const [open, setOpen] = (0, import_react137.useState)(false);
26704
- const [activeSeg, setActiveSeg] = (0, import_react137.useState)(null);
26838
+ const [open, setOpen] = (0, import_react138.useState)(false);
26839
+ const [activeSeg, setActiveSeg] = (0, import_react138.useState)(null);
26705
26840
  const COMMIT_TIMEOUT_MS = 1500;
26706
- const [draft, setDraft] = (0, import_react137.useState)(
26841
+ const [draft, setDraft] = (0, import_react138.useState)(
26707
26842
  null
26708
26843
  );
26709
- const draftRef = (0, import_react137.useRef)(null);
26710
- const setDraftBoth = (0, import_react137.useCallback)(
26844
+ const draftRef = (0, import_react138.useRef)(null);
26845
+ const setDraftBoth = (0, import_react138.useCallback)(
26711
26846
  (next) => {
26712
26847
  draftRef.current = next;
26713
26848
  setDraft(next);
26714
26849
  },
26715
26850
  []
26716
26851
  );
26717
- const commitTimerRef = (0, import_react137.useRef)(null);
26718
- const wrapRef = (0, import_react137.useRef)(null);
26719
- const valueRef = (0, import_react137.useRef)(value);
26852
+ const commitTimerRef = (0, import_react138.useRef)(null);
26853
+ const wrapRef = (0, import_react138.useRef)(null);
26854
+ const valueRef = (0, import_react138.useRef)(value);
26720
26855
  valueRef.current = value;
26721
26856
  const setWrapRef = (node) => {
26722
26857
  wrapRef.current = node;
@@ -26724,11 +26859,11 @@ var TimePicker = (0, import_react137.forwardRef)(
26724
26859
  else if (forwardedRef)
26725
26860
  forwardedRef.current = node;
26726
26861
  };
26727
- const hoursRef = (0, import_react137.useRef)(null);
26728
- const minutesRef = (0, import_react137.useRef)(null);
26729
- const secondsRef = (0, import_react137.useRef)(null);
26862
+ const hoursRef = (0, import_react138.useRef)(null);
26863
+ const minutesRef = (0, import_react138.useRef)(null);
26864
+ const secondsRef = (0, import_react138.useRef)(null);
26730
26865
  const refOf = (s) => s === "hours" ? hoursRef : s === "minutes" ? minutesRef : secondsRef;
26731
- const commit = (0, import_react137.useCallback)(
26866
+ const commit = (0, import_react138.useCallback)(
26732
26867
  (seg, n) => {
26733
26868
  const base = valueRef.current;
26734
26869
  const next = { ...base, [seg]: clampSeg(seg, n, use24h) };
@@ -26760,13 +26895,13 @@ var TimePicker = (0, import_react137.forwardRef)(
26760
26895
  valueRef.current = next;
26761
26896
  onChange?.(next);
26762
26897
  };
26763
- const clearCommitTimer = (0, import_react137.useCallback)(() => {
26898
+ const clearCommitTimer = (0, import_react138.useCallback)(() => {
26764
26899
  if (commitTimerRef.current != null) {
26765
26900
  clearTimeout(commitTimerRef.current);
26766
26901
  commitTimerRef.current = null;
26767
26902
  }
26768
26903
  }, []);
26769
- const commitDraft = (0, import_react137.useCallback)(
26904
+ const commitDraft = (0, import_react138.useCallback)(
26770
26905
  (seg, digits) => {
26771
26906
  clearCommitTimer();
26772
26907
  const n = parseInt(digits || "0", 10);
@@ -26778,11 +26913,11 @@ var TimePicker = (0, import_react137.forwardRef)(
26778
26913
  },
26779
26914
  [clearCommitTimer, commit, use24h, setDraftBoth]
26780
26915
  );
26781
- const flushDraft = (0, import_react137.useCallback)(() => {
26916
+ const flushDraft = (0, import_react138.useCallback)(() => {
26782
26917
  const d = draftRef.current;
26783
26918
  if (d) commitDraft(d.seg, d.digits);
26784
26919
  }, [commitDraft]);
26785
- const focusSegment = (0, import_react137.useCallback)(
26920
+ const focusSegment = (0, import_react138.useCallback)(
26786
26921
  (seg) => {
26787
26922
  const d = draftRef.current;
26788
26923
  if (d && d.seg !== seg) commitDraft(d.seg, d.digits);
@@ -26791,14 +26926,14 @@ var TimePicker = (0, import_react137.forwardRef)(
26791
26926
  },
26792
26927
  [commitDraft]
26793
26928
  );
26794
- (0, import_react137.useEffect)(() => {
26929
+ (0, import_react138.useEffect)(() => {
26795
26930
  if (!open) {
26796
26931
  clearCommitTimer();
26797
26932
  setDraftBoth(null);
26798
26933
  }
26799
26934
  return clearCommitTimer;
26800
26935
  }, [open, clearCommitTimer, setDraftBoth]);
26801
- (0, import_react137.useEffect)(() => {
26936
+ (0, import_react138.useEffect)(() => {
26802
26937
  if (!open) return;
26803
26938
  const onDoc = (e) => {
26804
26939
  if (!wrapRef.current?.contains(e.target)) {
@@ -26995,7 +27130,7 @@ var TimePicker = (0, import_react137.forwardRef)(
26995
27130
  )
26996
27131
  ] })
26997
27132
  ] }),
26998
- /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("div", { className: "ods-timepicker__body", children: segOrder().map((seg, i, arr) => /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(import_react137.Fragment, { children: [
27133
+ /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("div", { className: "ods-timepicker__body", children: segOrder().map((seg, i, arr) => /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(import_react138.Fragment, { children: [
26999
27134
  /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)("div", { className: "ods-timepicker__col", children: [
27000
27135
  /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("span", { className: "ods-timepicker__col-lbl", children: seg === "hours" ? "HOUR" : seg === "minutes" ? "MIN" : "SEC" }),
27001
27136
  /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
@@ -27044,7 +27179,7 @@ var TimePicker = (0, import_react137.forwardRef)(
27044
27179
  TimePicker.displayName = "TimePicker";
27045
27180
 
27046
27181
  // src/components/TimezonePicker/TimezonePicker.tsx
27047
- var import_react138 = require("react");
27182
+ var import_react139 = require("react");
27048
27183
  var import_icons45 = require("@octaviaflow/icons");
27049
27184
  var import_jsx_runtime119 = require("react/jsx-runtime");
27050
27185
  var DEFAULT_TZS = [
@@ -27061,7 +27196,7 @@ var DEFAULT_TZS = [
27061
27196
  { iana: "Asia/Tokyo", label: "Tokyo", offset: "UTC+9" },
27062
27197
  { iana: "Australia/Sydney", label: "Sydney", offset: "UTC+10" }
27063
27198
  ];
27064
- var TimezonePicker = (0, import_react138.forwardRef)(
27199
+ var TimezonePicker = (0, import_react139.forwardRef)(
27065
27200
  function TimezonePicker2({
27066
27201
  label,
27067
27202
  value,
@@ -27079,46 +27214,46 @@ var TimezonePicker = (0, import_react138.forwardRef)(
27079
27214
  "aria-describedby": consumerDescribedBy,
27080
27215
  ...rest
27081
27216
  }, forwardedRef) {
27082
- const reactId = (0, import_react138.useId)();
27217
+ const reactId = (0, import_react139.useId)();
27083
27218
  const baseId = providedId ?? `ods-tzpicker-${reactId}`;
27084
27219
  const labelId = label ? `${baseId}-label` : void 0;
27085
27220
  const listboxId = `${baseId}-listbox`;
27086
27221
  const hintId = error || helperText ? `${baseId}-hint` : void 0;
27087
27222
  const describedBy = [consumerDescribedBy, hintId].filter(Boolean).join(" ") || void 0;
27088
- const [open, setOpen] = (0, import_react138.useState)(false);
27089
- const [query, setQuery] = (0, import_react138.useState)("");
27090
- const [activeIndex, setActiveIndex] = (0, import_react138.useState)(0);
27091
- const wrapRef = (0, import_react138.useRef)(null);
27092
- const triggerRef = (0, import_react138.useRef)(null);
27093
- const inputRef = (0, import_react138.useRef)(null);
27094
- const listRef = (0, import_react138.useRef)(null);
27223
+ const [open, setOpen] = (0, import_react139.useState)(false);
27224
+ const [query, setQuery] = (0, import_react139.useState)("");
27225
+ const [activeIndex, setActiveIndex] = (0, import_react139.useState)(0);
27226
+ const wrapRef = (0, import_react139.useRef)(null);
27227
+ const triggerRef = (0, import_react139.useRef)(null);
27228
+ const inputRef = (0, import_react139.useRef)(null);
27229
+ const listRef = (0, import_react139.useRef)(null);
27095
27230
  const setWrapRef = (node) => {
27096
27231
  wrapRef.current = node;
27097
27232
  if (typeof forwardedRef === "function") forwardedRef(node);
27098
27233
  else if (forwardedRef)
27099
27234
  forwardedRef.current = node;
27100
27235
  };
27101
- const selected = (0, import_react138.useMemo)(
27236
+ const selected = (0, import_react139.useMemo)(
27102
27237
  () => options.find((o) => o.iana === value),
27103
27238
  [options, value]
27104
27239
  );
27105
- const filtered = (0, import_react138.useMemo)(() => {
27240
+ const filtered = (0, import_react139.useMemo)(() => {
27106
27241
  if (!query.trim()) return options;
27107
27242
  const q2 = query.trim().toLowerCase();
27108
27243
  return options.filter(
27109
27244
  (o) => o.iana.toLowerCase().includes(q2) || o.label.toLowerCase().includes(q2) || o.offset.toLowerCase().includes(q2) || o.region?.toLowerCase().includes(q2)
27110
27245
  );
27111
27246
  }, [options, query]);
27112
- (0, import_react138.useEffect)(() => {
27247
+ (0, import_react139.useEffect)(() => {
27113
27248
  if (activeIndex >= filtered.length) setActiveIndex(0);
27114
27249
  }, [filtered.length, activeIndex]);
27115
- (0, import_react138.useEffect)(() => {
27250
+ (0, import_react139.useEffect)(() => {
27116
27251
  if (!open) return;
27117
27252
  const idx = filtered.findIndex((o) => o.iana === value);
27118
27253
  setActiveIndex(idx >= 0 ? idx : 0);
27119
27254
  inputRef.current?.focus();
27120
27255
  }, [open]);
27121
- (0, import_react138.useEffect)(() => {
27256
+ (0, import_react139.useEffect)(() => {
27122
27257
  if (!open) return;
27123
27258
  const onDoc = (e) => {
27124
27259
  if (!wrapRef.current?.contains(e.target)) {
@@ -27129,7 +27264,7 @@ var TimezonePicker = (0, import_react138.forwardRef)(
27129
27264
  document.addEventListener("mousedown", onDoc);
27130
27265
  return () => document.removeEventListener("mousedown", onDoc);
27131
27266
  }, [open]);
27132
- (0, import_react138.useEffect)(() => {
27267
+ (0, import_react139.useEffect)(() => {
27133
27268
  if (!open) return;
27134
27269
  const list = listRef.current;
27135
27270
  if (!list) return;
@@ -27138,7 +27273,7 @@ var TimezonePicker = (0, import_react138.forwardRef)(
27138
27273
  );
27139
27274
  active?.scrollIntoView?.({ block: "nearest" });
27140
27275
  }, [activeIndex, open]);
27141
- const select = (0, import_react138.useCallback)(
27276
+ const select = (0, import_react139.useCallback)(
27142
27277
  (iana) => {
27143
27278
  onChange?.(iana);
27144
27279
  setOpen(false);
@@ -27147,7 +27282,7 @@ var TimezonePicker = (0, import_react138.forwardRef)(
27147
27282
  },
27148
27283
  [onChange]
27149
27284
  );
27150
- const handlePopoverKey = (0, import_react138.useCallback)(
27285
+ const handlePopoverKey = (0, import_react139.useCallback)(
27151
27286
  (e) => {
27152
27287
  if (e.key === "ArrowDown") {
27153
27288
  e.preventDefault();
@@ -27341,7 +27476,7 @@ TimezonePicker.displayName = "TimezonePicker";
27341
27476
 
27342
27477
  // src/components/Toast/Toast.tsx
27343
27478
  var import_framer_motion36 = require("framer-motion");
27344
- var import_react139 = require("react");
27479
+ var import_react140 = require("react");
27345
27480
  var import_react_dom16 = require("react-dom");
27346
27481
  var import_jsx_runtime120 = require("react/jsx-runtime");
27347
27482
  var defaultIcons = {
@@ -27431,7 +27566,7 @@ var defaultIcons = {
27431
27566
  )
27432
27567
  ] })
27433
27568
  };
27434
- var ToastContext = (0, import_react139.createContext)(null);
27569
+ var ToastContext = (0, import_react140.createContext)(null);
27435
27570
  function ToastBody({ item, onDismiss }) {
27436
27571
  const dismiss = () => onDismiss(item.id);
27437
27572
  if (item.render) return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_jsx_runtime120.Fragment, { children: item.render({ id: item.id, dismiss }) });
@@ -27489,10 +27624,10 @@ function ToastBody({ item, onDismiss }) {
27489
27624
  ] });
27490
27625
  }
27491
27626
  function PositionStack({ items, position, onDismiss, maxStack }) {
27492
- const [hovered, setHovered] = (0, import_react139.useState)(false);
27493
- const [pinned, setPinned] = (0, import_react139.useState)(false);
27627
+ const [hovered, setHovered] = (0, import_react140.useState)(false);
27628
+ const [pinned, setPinned] = (0, import_react140.useState)(false);
27494
27629
  const expanded = hovered || pinned;
27495
- const ordered = (0, import_react139.useMemo)(() => [...items].reverse(), [items]);
27630
+ const ordered = (0, import_react140.useMemo)(() => [...items].reverse(), [items]);
27496
27631
  const isBottom = position.startsWith("bottom");
27497
27632
  const dir = isBottom ? -1 : 1;
27498
27633
  if (pinned && items.length === 0) setPinned(false);
@@ -27590,10 +27725,10 @@ function ToastProvider({
27590
27725
  defaultPosition = "bottom-right",
27591
27726
  maxStack = 3
27592
27727
  }) {
27593
- const [toasts, setToasts] = (0, import_react139.useState)([]);
27594
- const timers = (0, import_react139.useRef)(/* @__PURE__ */ new Map());
27595
- const idCounter2 = (0, import_react139.useRef)(0);
27596
- const dismiss = (0, import_react139.useCallback)((id) => {
27728
+ const [toasts, setToasts] = (0, import_react140.useState)([]);
27729
+ const timers = (0, import_react140.useRef)(/* @__PURE__ */ new Map());
27730
+ const idCounter2 = (0, import_react140.useRef)(0);
27731
+ const dismiss = (0, import_react140.useCallback)((id) => {
27597
27732
  setToasts((prev) => prev.filter((t) => t.id !== id));
27598
27733
  const timer = timers.current.get(id);
27599
27734
  if (timer) {
@@ -27601,7 +27736,7 @@ function ToastProvider({
27601
27736
  timers.current.delete(id);
27602
27737
  }
27603
27738
  }, []);
27604
- const dismissAll = (0, import_react139.useCallback)((position) => {
27739
+ const dismissAll = (0, import_react140.useCallback)((position) => {
27605
27740
  setToasts((prev) => {
27606
27741
  const remaining = position ? prev.filter((t) => t.position !== position) : [];
27607
27742
  for (const t of prev) {
@@ -27616,7 +27751,7 @@ function ToastProvider({
27616
27751
  return remaining;
27617
27752
  });
27618
27753
  }, []);
27619
- const toast = (0, import_react139.useCallback)(
27754
+ const toast = (0, import_react140.useCallback)(
27620
27755
  (options) => {
27621
27756
  const id = `toast-${++idCounter2.current}`;
27622
27757
  const item = {
@@ -27643,7 +27778,7 @@ function ToastProvider({
27643
27778
  },
27644
27779
  [dismiss, defaultPosition]
27645
27780
  );
27646
- const groups = (0, import_react139.useMemo)(() => {
27781
+ const groups = (0, import_react140.useMemo)(() => {
27647
27782
  const out = {
27648
27783
  "top-left": [],
27649
27784
  "top-center": [],
@@ -27676,7 +27811,7 @@ function ToastProvider({
27676
27811
  ] });
27677
27812
  }
27678
27813
  function useToast() {
27679
- const ctx = (0, import_react139.useContext)(ToastContext);
27814
+ const ctx = (0, import_react140.useContext)(ToastContext);
27680
27815
  if (!ctx) throw new Error("useToast must be used within a ToastProvider");
27681
27816
  const { toast: raw, dismiss, dismissAll } = ctx;
27682
27817
  const toast = Object.assign((options) => raw(options), {
@@ -27690,7 +27825,7 @@ function useToast() {
27690
27825
  }
27691
27826
 
27692
27827
  // src/components/Toggle/Toggle.tsx
27693
- var import_react140 = require("react");
27828
+ var import_react141 = require("react");
27694
27829
  var import_jsx_runtime121 = require("react/jsx-runtime");
27695
27830
  function Toggle({
27696
27831
  label,
@@ -27710,15 +27845,15 @@ function Toggle({
27710
27845
  ref,
27711
27846
  ...rest
27712
27847
  }) {
27713
- const reactId = (0, import_react140.useId)();
27848
+ const reactId = (0, import_react141.useId)();
27714
27849
  const baseId = providedId ?? `ods-toggle-${reactId}`;
27715
27850
  const labelId = label ? `${baseId}-label` : void 0;
27716
27851
  const hintId = error || helperText ? `${baseId}-hint` : void 0;
27717
27852
  const describedBy = [consumerDescribedBy, hintId].filter(Boolean).join(" ") || void 0;
27718
27853
  const groupLabelledBy = ariaLabelledBy ?? labelId;
27719
27854
  const groupAriaLabel = !groupLabelledBy ? ariaLabel ?? "Toggle group" : void 0;
27720
- const buttonRefs = (0, import_react140.useRef)([]);
27721
- const findNextEnabled = (0, import_react140.useCallback)(
27855
+ const buttonRefs = (0, import_react141.useRef)([]);
27856
+ const findNextEnabled = (0, import_react141.useCallback)(
27722
27857
  (from, dir) => {
27723
27858
  if (options.length === 0) return -1;
27724
27859
  let i = from;
@@ -27731,11 +27866,11 @@ function Toggle({
27731
27866
  },
27732
27867
  [options, disabled]
27733
27868
  );
27734
- const focusIndex = (0, import_react140.useCallback)((i) => {
27869
+ const focusIndex = (0, import_react141.useCallback)((i) => {
27735
27870
  if (i < 0) return;
27736
27871
  buttonRefs.current[i]?.focus();
27737
27872
  }, []);
27738
- const handleKey = (0, import_react140.useCallback)(
27873
+ const handleKey = (0, import_react141.useCallback)(
27739
27874
  (e, idx) => {
27740
27875
  if (e.key === "ArrowRight" || e.key === "ArrowDown") {
27741
27876
  e.preventDefault();
@@ -27884,7 +28019,7 @@ function ToolbarSpacer() {
27884
28019
  }
27885
28020
 
27886
28021
  // src/components/ToolCard/ToolCard.tsx
27887
- var import_react141 = require("react");
28022
+ var import_react142 = require("react");
27888
28023
  var import_icons46 = require("@octaviaflow/icons");
27889
28024
  var import_jsx_runtime123 = require("react/jsx-runtime");
27890
28025
  var CATEGORY_GLYPH = {
@@ -27897,7 +28032,7 @@ var CATEGORY_GLYPH = {
27897
28032
  ai: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_icons46.MagicWandIcon, { size: "xs" }),
27898
28033
  custom: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_icons46.ExtensionsIcon, { size: "xs" })
27899
28034
  };
27900
- var ToolCard = (0, import_react141.forwardRef)(
28035
+ var ToolCard = (0, import_react142.forwardRef)(
27901
28036
  function ToolCard2({
27902
28037
  name,
27903
28038
  description,
@@ -27918,7 +28053,7 @@ var ToolCard = (0, import_react141.forwardRef)(
27918
28053
  onKeyDown: consumerOnKeyDown,
27919
28054
  ...rest
27920
28055
  }, ref) {
27921
- const reactId = (0, import_react141.useId)();
28056
+ const reactId = (0, import_react142.useId)();
27922
28057
  const baseId = providedId ?? `ods-tool-card-${reactId}`;
27923
28058
  const nameId = `${baseId}-name`;
27924
28059
  const descId = description ? `${baseId}-desc` : void 0;
@@ -28089,7 +28224,7 @@ function TopBar({
28089
28224
 
28090
28225
  // src/components/TraceStep/TraceStep.tsx
28091
28226
  var import_framer_motion37 = require("framer-motion");
28092
- var import_react142 = require("react");
28227
+ var import_react143 = require("react");
28093
28228
  var import_icons47 = require("@octaviaflow/icons");
28094
28229
  var import_jsx_runtime125 = require("react/jsx-runtime");
28095
28230
  var DEFAULT_KIND_GLYPH = {
@@ -28100,7 +28235,7 @@ var DEFAULT_KIND_GLYPH = {
28100
28235
  error: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_icons47.WarningAltIcon, { size: "xs" })
28101
28236
  };
28102
28237
  var FALLBACK_GLYPH = DEFAULT_KIND_GLYPH.thought;
28103
- var TraceStep = (0, import_react142.forwardRef)(
28238
+ var TraceStep = (0, import_react143.forwardRef)(
28104
28239
  function TraceStep2({
28105
28240
  index,
28106
28241
  kind = "thought",
@@ -28122,15 +28257,15 @@ var TraceStep = (0, import_react142.forwardRef)(
28122
28257
  className,
28123
28258
  ...rest
28124
28259
  }, ref) {
28125
- const reactId = (0, import_react142.useId)();
28260
+ const reactId = (0, import_react143.useId)();
28126
28261
  const baseId = providedId ?? `ods-trace-step-${reactId}`;
28127
28262
  const headId = `${baseId}-head`;
28128
28263
  const contentId = `${baseId}-content`;
28129
- const [uncontrolledOpen, setUncontrolledOpen] = (0, import_react142.useState)(defaultOpen);
28264
+ const [uncontrolledOpen, setUncontrolledOpen] = (0, import_react143.useState)(defaultOpen);
28130
28265
  const isControlled = controlledOpen !== void 0;
28131
28266
  const open = isControlled ? controlledOpen : uncontrolledOpen;
28132
28267
  const canExpand = !!children;
28133
- const toggle = (0, import_react142.useCallback)(() => {
28268
+ const toggle = (0, import_react143.useCallback)(() => {
28134
28269
  if (!canExpand) return;
28135
28270
  const next = !open;
28136
28271
  if (!isControlled) setUncontrolledOpen(next);
@@ -28270,7 +28405,7 @@ TraceStep.displayName = "TraceStep";
28270
28405
  // src/components/TreeView/TreeView.tsx
28271
28406
  var import_icons48 = require("@octaviaflow/icons");
28272
28407
  var import_framer_motion38 = require("framer-motion");
28273
- var import_react143 = require("react");
28408
+ var import_react144 = require("react");
28274
28409
  var import_jsx_runtime126 = require("react/jsx-runtime");
28275
28410
  function buildVisibleList(nodes, expanded, out = [], level = 0, parentId = null) {
28276
28411
  for (const n of nodes) {
@@ -28281,7 +28416,7 @@ function buildVisibleList(nodes, expanded, out = [], level = 0, parentId = null)
28281
28416
  }
28282
28417
  return out;
28283
28418
  }
28284
- var TreeView = (0, import_react143.forwardRef)(
28419
+ var TreeView = (0, import_react144.forwardRef)(
28285
28420
  function TreeView2({
28286
28421
  nodes,
28287
28422
  selectedId: controlledSelected,
@@ -28298,24 +28433,24 @@ var TreeView = (0, import_react143.forwardRef)(
28298
28433
  className,
28299
28434
  ...rest
28300
28435
  }, ref) {
28301
- const reactId = (0, import_react143.useId)();
28436
+ const reactId = (0, import_react144.useId)();
28302
28437
  const baseId = providedId ?? `ods-tree-${reactId}`;
28303
28438
  const reducedMotion = (0, import_framer_motion38.useReducedMotion)();
28304
- const [internalSelected, setInternalSelected] = (0, import_react143.useState)(defaultSelectedId);
28439
+ const [internalSelected, setInternalSelected] = (0, import_react144.useState)(defaultSelectedId);
28305
28440
  const isSelectedControlled = controlledSelected !== void 0;
28306
28441
  const selectedId = isSelectedControlled ? controlledSelected : internalSelected;
28307
- const [internalExpanded, setInternalExpanded] = (0, import_react143.useState)(
28442
+ const [internalExpanded, setInternalExpanded] = (0, import_react144.useState)(
28308
28443
  () => new Set(defaultExpandedIds ?? [])
28309
28444
  );
28310
28445
  const isExpandedControlled = controlledExpanded !== void 0;
28311
28446
  const expandedSet = isExpandedControlled ? controlledExpanded : internalExpanded;
28312
- const [loaded, setLoaded] = (0, import_react143.useState)({});
28313
- const [loading, setLoading] = (0, import_react143.useState)(/* @__PURE__ */ new Set());
28314
- const resolveChildren = (0, import_react143.useCallback)(
28447
+ const [loaded, setLoaded] = (0, import_react144.useState)({});
28448
+ const [loading, setLoading] = (0, import_react144.useState)(/* @__PURE__ */ new Set());
28449
+ const resolveChildren = (0, import_react144.useCallback)(
28315
28450
  (node) => node.children ?? loaded[node.id],
28316
28451
  [loaded]
28317
28452
  );
28318
- const resolvedNodes = (0, import_react143.useMemo)(() => {
28453
+ const resolvedNodes = (0, import_react144.useMemo)(() => {
28319
28454
  const walk = (ns) => ns.map((n) => {
28320
28455
  const kids = resolveChildren(n);
28321
28456
  if (kids) return { ...n, children: walk(kids) };
@@ -28323,18 +28458,18 @@ var TreeView = (0, import_react143.forwardRef)(
28323
28458
  });
28324
28459
  return walk(nodes);
28325
28460
  }, [nodes, resolveChildren]);
28326
- const visibleList = (0, import_react143.useMemo)(
28461
+ const visibleList = (0, import_react144.useMemo)(
28327
28462
  () => buildVisibleList(resolvedNodes, expandedSet),
28328
28463
  [resolvedNodes, expandedSet]
28329
28464
  );
28330
- const setExpanded = (0, import_react143.useCallback)(
28465
+ const setExpanded = (0, import_react144.useCallback)(
28331
28466
  (next) => {
28332
28467
  if (!isExpandedControlled) setInternalExpanded(new Set(next));
28333
28468
  onExpandedChange?.(new Set(next));
28334
28469
  },
28335
28470
  [isExpandedControlled, onExpandedChange]
28336
28471
  );
28337
- const toggleExpand = (0, import_react143.useCallback)(
28472
+ const toggleExpand = (0, import_react144.useCallback)(
28338
28473
  async (node) => {
28339
28474
  const next = new Set(expandedSet);
28340
28475
  const isOpen = next.has(node.id);
@@ -28363,7 +28498,7 @@ var TreeView = (0, import_react143.forwardRef)(
28363
28498
  },
28364
28499
  [expandedSet, setExpanded, onLoadChildren, loaded, loading]
28365
28500
  );
28366
- const handleSelect = (0, import_react143.useCallback)(
28501
+ const handleSelect = (0, import_react144.useCallback)(
28367
28502
  (node) => {
28368
28503
  if (node.disabled || disabled) return;
28369
28504
  if (!isSelectedControlled) setInternalSelected(node.id);
@@ -28538,7 +28673,7 @@ var TreeView = (0, import_react143.forwardRef)(
28538
28673
  );
28539
28674
  };
28540
28675
  const visibleIdxCursor = { value: 0 };
28541
- (0, import_react143.useEffect)(() => {
28676
+ (0, import_react144.useEffect)(() => {
28542
28677
  }, [tabStopId]);
28543
28678
  return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
28544
28679
  "ul",
@@ -28563,9 +28698,9 @@ var TreeView = (0, import_react143.forwardRef)(
28563
28698
  TreeView.displayName = "TreeView";
28564
28699
 
28565
28700
  // src/components/UserCard/UserCard.tsx
28566
- var import_react144 = require("react");
28701
+ var import_react145 = require("react");
28567
28702
  var import_jsx_runtime127 = require("react/jsx-runtime");
28568
- var UserCard = (0, import_react144.forwardRef)(
28703
+ var UserCard = (0, import_react145.forwardRef)(
28569
28704
  function UserCard2({
28570
28705
  name,
28571
28706
  nameAs = "h3",
@@ -28586,7 +28721,7 @@ var UserCard = (0, import_react144.forwardRef)(
28586
28721
  className,
28587
28722
  ...rest
28588
28723
  }, ref) {
28589
- const reactId = (0, import_react144.useId)();
28724
+ const reactId = (0, import_react145.useId)();
28590
28725
  const baseId = providedId ?? `ods-user-card-${reactId}`;
28591
28726
  const nameId = `${baseId}-name`;
28592
28727
  const isInteractive = Boolean(href || onClick) && !disabled;
@@ -28688,7 +28823,7 @@ UserCard.displayName = "UserCard";
28688
28823
  var import_react155 = require("react");
28689
28824
 
28690
28825
  // src/hooks/useWorkflow.ts
28691
- var import_react145 = require("react");
28826
+ var import_react146 = require("react");
28692
28827
 
28693
28828
  // src/workflow/types.ts
28694
28829
  var types_exports = {};
@@ -29168,7 +29303,7 @@ function genId(prefix) {
29168
29303
  return `${prefix}_${Date.now().toString(36)}_${idCounter}`;
29169
29304
  }
29170
29305
  function useWorkflow(options = {}) {
29171
- const initial = (0, import_react145.useMemo)(
29306
+ const initial = (0, import_react146.useMemo)(
29172
29307
  () => buildInitialWorkflow({
29173
29308
  metadata: options.metadata ? { ...options.metadata } : void 0,
29174
29309
  canvas: {
@@ -29201,12 +29336,12 @@ function useWorkflow(options = {}) {
29201
29336
  // eslint-disable-next-line react-hooks/exhaustive-deps
29202
29337
  []
29203
29338
  );
29204
- const [workflow, dispatch] = (0, import_react145.useReducer)(reducer, initial);
29205
- const addNode = (0, import_react145.useCallback)(
29339
+ const [workflow, dispatch] = (0, import_react146.useReducer)(reducer, initial);
29340
+ const addNode = (0, import_react146.useCallback)(
29206
29341
  (node) => dispatch({ type: "ADD_NODE", payload: node }),
29207
29342
  []
29208
29343
  );
29209
- const createNode = (0, import_react145.useCallback)(
29344
+ const createNode = (0, import_react146.useCallback)(
29210
29345
  (partial) => {
29211
29346
  const id = partial.id ?? genId("node");
29212
29347
  const ports = partial.ports ?? {
@@ -29255,27 +29390,27 @@ function useWorkflow(options = {}) {
29255
29390
  },
29256
29391
  []
29257
29392
  );
29258
- const updateNode = (0, import_react145.useCallback)(
29393
+ const updateNode = (0, import_react146.useCallback)(
29259
29394
  (id, updates) => dispatch({ type: "UPDATE_NODE", payload: { id, updates } }),
29260
29395
  []
29261
29396
  );
29262
- const deleteNode = (0, import_react145.useCallback)(
29397
+ const deleteNode = (0, import_react146.useCallback)(
29263
29398
  (id) => dispatch({ type: "DELETE_NODE", payload: id }),
29264
29399
  []
29265
29400
  );
29266
- const deleteNodes = (0, import_react145.useCallback)(
29401
+ const deleteNodes = (0, import_react146.useCallback)(
29267
29402
  (ids) => dispatch({ type: "DELETE_NODES", payload: ids }),
29268
29403
  []
29269
29404
  );
29270
- const replaceNodes = (0, import_react145.useCallback)(
29405
+ const replaceNodes = (0, import_react146.useCallback)(
29271
29406
  (nodes) => dispatch({ type: "REPLACE_NODES", payload: nodes }),
29272
29407
  []
29273
29408
  );
29274
- const addEdge = (0, import_react145.useCallback)(
29409
+ const addEdge = (0, import_react146.useCallback)(
29275
29410
  (edge) => dispatch({ type: "ADD_EDGE", payload: edge }),
29276
29411
  []
29277
29412
  );
29278
- const createEdge = (0, import_react145.useCallback)(
29413
+ const createEdge = (0, import_react146.useCallback)(
29279
29414
  (source, sourcePort, target, targetPort) => {
29280
29415
  const edge = {
29281
29416
  id: genId("edge"),
@@ -29293,20 +29428,20 @@ function useWorkflow(options = {}) {
29293
29428
  },
29294
29429
  []
29295
29430
  );
29296
- const deleteEdge = (0, import_react145.useCallback)(
29431
+ const deleteEdge = (0, import_react146.useCallback)(
29297
29432
  (id) => dispatch({ type: "DELETE_EDGE", payload: id }),
29298
29433
  []
29299
29434
  );
29300
- const replaceEdges = (0, import_react145.useCallback)(
29435
+ const replaceEdges = (0, import_react146.useCallback)(
29301
29436
  (edges) => dispatch({ type: "REPLACE_EDGES", payload: edges }),
29302
29437
  []
29303
29438
  );
29304
- const startConnecting = (0, import_react145.useCallback)(
29439
+ const startConnecting = (0, import_react146.useCallback)(
29305
29440
  (nodeId, portId, portType) => dispatch({ type: "START_CONNECTING", payload: { nodeId, portId, portType } }),
29306
29441
  []
29307
29442
  );
29308
- const endConnecting = (0, import_react145.useCallback)(() => dispatch({ type: "END_CONNECTING" }), []);
29309
- const selectNode = (0, import_react145.useCallback)(
29443
+ const endConnecting = (0, import_react146.useCallback)(() => dispatch({ type: "END_CONNECTING" }), []);
29444
+ const selectNode = (0, import_react146.useCallback)(
29310
29445
  (id, multi = false) => {
29311
29446
  if (multi) {
29312
29447
  const current = workflow.canvas.selectedNodes;
@@ -29318,36 +29453,36 @@ function useWorkflow(options = {}) {
29318
29453
  },
29319
29454
  [workflow.canvas.selectedNodes]
29320
29455
  );
29321
- const selectNodes = (0, import_react145.useCallback)(
29456
+ const selectNodes = (0, import_react146.useCallback)(
29322
29457
  (ids) => dispatch({ type: "SELECT_NODES", payload: ids }),
29323
29458
  []
29324
29459
  );
29325
- const selectEdge = (0, import_react145.useCallback)(
29460
+ const selectEdge = (0, import_react146.useCallback)(
29326
29461
  (id) => dispatch({ type: "SELECT_EDGE", payload: id }),
29327
29462
  []
29328
29463
  );
29329
- const deselectAll = (0, import_react145.useCallback)(() => dispatch({ type: "DESELECT_ALL" }), []);
29330
- const zoomIn = (0, import_react145.useCallback)(() => {
29464
+ const deselectAll = (0, import_react146.useCallback)(() => dispatch({ type: "DESELECT_ALL" }), []);
29465
+ const zoomIn = (0, import_react146.useCallback)(() => {
29331
29466
  const z = Math.min(workflow.canvas.viewport.zoom * 1.2, 2);
29332
29467
  dispatch({ type: "UPDATE_VIEWPORT", payload: { zoom: z } });
29333
29468
  }, [workflow.canvas.viewport.zoom]);
29334
- const zoomOut = (0, import_react145.useCallback)(() => {
29469
+ const zoomOut = (0, import_react146.useCallback)(() => {
29335
29470
  const z = Math.max(workflow.canvas.viewport.zoom / 1.2, 0.25);
29336
29471
  dispatch({ type: "UPDATE_VIEWPORT", payload: { zoom: z } });
29337
29472
  }, [workflow.canvas.viewport.zoom]);
29338
- const resetViewport = (0, import_react145.useCallback)(
29473
+ const resetViewport = (0, import_react146.useCallback)(
29339
29474
  () => dispatch({ type: "UPDATE_VIEWPORT", payload: { x: 0, y: 0, zoom: 1 } }),
29340
29475
  []
29341
29476
  );
29342
- const setViewport = (0, import_react145.useCallback)(
29477
+ const setViewport = (0, import_react146.useCallback)(
29343
29478
  (viewport) => dispatch({ type: "UPDATE_VIEWPORT", payload: viewport }),
29344
29479
  []
29345
29480
  );
29346
- const undo = (0, import_react145.useCallback)(() => dispatch({ type: "UNDO" }), []);
29347
- const redo = (0, import_react145.useCallback)(() => dispatch({ type: "REDO" }), []);
29481
+ const undo = (0, import_react146.useCallback)(() => dispatch({ type: "UNDO" }), []);
29482
+ const redo = (0, import_react146.useCallback)(() => dispatch({ type: "REDO" }), []);
29348
29483
  const canUndo = workflow.canvas.history.past.length > 0;
29349
29484
  const canRedo = workflow.canvas.history.future.length > 0;
29350
- const validate = (0, import_react145.useCallback)(() => workflow.validation, [workflow.validation]);
29485
+ const validate = (0, import_react146.useCallback)(() => workflow.validation, [workflow.validation]);
29351
29486
  return {
29352
29487
  workflow,
29353
29488
  dispatch,
@@ -29594,55 +29729,11 @@ function createFlowStore({
29594
29729
  }
29595
29730
  var EMPTY_SET = /* @__PURE__ */ new Set();
29596
29731
 
29597
- // src/workflow/utils/geometry.ts
29598
- var DEFAULT_NODE_WIDTH3 = 368;
29599
- var DEFAULT_NODE_HEIGHT3 = 96;
29600
- var COLLAPSED_GROUP_HEIGHT = 36;
29601
- var COLLAPSED_FOREACH_HEIGHT = 40;
29602
- function effectiveHeight(node) {
29603
- const data = node.data;
29604
- if (data?.collapsed) {
29605
- if (node.type === "group") return COLLAPSED_GROUP_HEIGHT;
29606
- if (node.type === "forEach") return COLLAPSED_FOREACH_HEIGHT;
29607
- }
29608
- return node.height ?? DEFAULT_NODE_HEIGHT3;
29609
- }
29610
- function handleCentre(node, side, index, total) {
29611
- const w = node.width ?? DEFAULT_NODE_WIDTH3;
29612
- const h = effectiveHeight(node);
29613
- const x0 = node.position.x;
29614
- const y0 = node.position.y;
29615
- const denom = total + 1;
29616
- const ratio = (index + 1) / denom;
29617
- switch (side) {
29618
- case "top":
29619
- return { x: x0 + w * ratio, y: y0 };
29620
- case "bottom":
29621
- return { x: x0 + w * ratio, y: y0 + h };
29622
- case "left":
29623
- return { x: x0, y: y0 + h * ratio };
29624
- case "right":
29625
- return { x: x0 + w, y: y0 + h * ratio };
29626
- }
29627
- }
29628
- function screenToFlow(p, vp) {
29629
- return {
29630
- x: (p.x - vp.x) / vp.zoom,
29631
- y: (p.y - vp.y) / vp.zoom
29632
- };
29633
- }
29634
- function flowToScreen(p, vp) {
29635
- return {
29636
- x: p.x * vp.zoom + vp.x,
29637
- y: p.y * vp.zoom + vp.y
29638
- };
29639
- }
29640
-
29641
29732
  // src/workflow/utils/collision.ts
29642
29733
  function resolveNodeCollisions(node, proposed, others, opts) {
29643
29734
  const { gap, maxIterations = 8, exclude, scopeToSiblings = true } = opts;
29644
29735
  if (gap < 0 || others.length === 0) return proposed;
29645
- const w = node.width ?? DEFAULT_NODE_WIDTH3;
29736
+ const w = node.width ?? DEFAULT_NODE_WIDTH2;
29646
29737
  const h = effectiveHeight(node);
29647
29738
  const parentId = node.parentId;
29648
29739
  const candidates = others.filter((o) => {
@@ -29666,7 +29757,7 @@ function resolveNodeCollisions(node, proposed, others, opts) {
29666
29757
  const aTop = cur.y - gap;
29667
29758
  const aBottom = cur.y + h + gap;
29668
29759
  for (const o of candidates) {
29669
- const ow = o.width ?? DEFAULT_NODE_WIDTH3;
29760
+ const ow = o.width ?? DEFAULT_NODE_WIDTH2;
29670
29761
  const oh = effectiveHeight(o);
29671
29762
  const bLeft = o.position.x;
29672
29763
  const bRight = o.position.x + ow;
@@ -29732,9 +29823,9 @@ function clampToParentExtent(node, proposed, nodes) {
29732
29823
  if (node.extent !== "parent" || !node.parentId) return proposed;
29733
29824
  const parent = nodes.find((n) => n.id === node.parentId);
29734
29825
  if (!parent) return proposed;
29735
- const pw = parent.width ?? DEFAULT_NODE_WIDTH3;
29826
+ const pw = parent.width ?? DEFAULT_NODE_WIDTH2;
29736
29827
  const ph = effectiveHeight(parent);
29737
- const w = node.width ?? DEFAULT_NODE_WIDTH3;
29828
+ const w = node.width ?? DEFAULT_NODE_WIDTH2;
29738
29829
  const h = effectiveHeight(node);
29739
29830
  const minX = parent.position.x;
29740
29831
  const minY = parent.position.y;
@@ -29753,7 +29844,7 @@ function findContainingGroup(point, nodes, exclude = []) {
29753
29844
  if (n.data && typeof n.data === "object" && n.data.collapsed) {
29754
29845
  continue;
29755
29846
  }
29756
- const w = n.width ?? DEFAULT_NODE_WIDTH3;
29847
+ const w = n.width ?? DEFAULT_NODE_WIDTH2;
29757
29848
  const h = effectiveHeight(n);
29758
29849
  if (point.x >= n.position.x && point.y >= n.position.y && point.x <= n.position.x + w && point.y <= n.position.y + h) {
29759
29850
  return n;
@@ -29764,52 +29855,6 @@ function findContainingGroup(point, nodes, exclude = []) {
29764
29855
 
29765
29856
  // src/workflow/components/FlowEdge/FlowEdge.tsx
29766
29857
  var import_react147 = require("react");
29767
-
29768
- // src/workflow/components/Handle/handleRegistry.ts
29769
- var import_react146 = require("react");
29770
- var HandleRegistryContext = (0, import_react146.createContext)(null);
29771
- function useHandleRegistry() {
29772
- const r = (0, import_react146.useContext)(HandleRegistryContext);
29773
- if (!r) {
29774
- throw new Error("[@octaviaflow/core/workflow] Handle must be used inside <FlowCanvas>.");
29775
- }
29776
- return r;
29777
- }
29778
- function createHandleRegistry() {
29779
- const map = /* @__PURE__ */ new Map();
29780
- const key = (n, t, h) => `${n}::${t}::${h}`;
29781
- const listeners = /* @__PURE__ */ new Set();
29782
- const notify = () => {
29783
- for (const l of listeners) l();
29784
- };
29785
- return {
29786
- register(d) {
29787
- map.set(key(d.nodeId, d.type, d.handleId), d);
29788
- notify();
29789
- return () => {
29790
- const k = key(d.nodeId, d.type, d.handleId);
29791
- if (map.get(k) === d) {
29792
- map.delete(k);
29793
- notify();
29794
- }
29795
- };
29796
- },
29797
- resolve(nodeId, type, handleId) {
29798
- return map.get(key(nodeId, type, handleId));
29799
- },
29800
- all() {
29801
- return Array.from(map.values());
29802
- },
29803
- subscribe(listener) {
29804
- listeners.add(listener);
29805
- return () => {
29806
- listeners.delete(listener);
29807
- };
29808
- }
29809
- };
29810
- }
29811
-
29812
- // src/workflow/components/FlowEdge/FlowEdge.tsx
29813
29858
  var import_jsx_runtime128 = require("react/jsx-runtime");
29814
29859
  function FlowEdgeImpl({
29815
29860
  edge,
@@ -29848,7 +29893,7 @@ function FlowEdgeImpl({
29848
29893
  const targetTotal = targetDesc?.total ?? 1;
29849
29894
  const rawStart = handleCentre(sourceNode, sourceSide, sourceIndex, sourceTotal);
29850
29895
  const rawEnd = handleCentre(targetNode, targetSide, targetIndex, targetTotal);
29851
- const HANDLE_GAP = 8;
29896
+ const HANDLE_GAP = 2;
29852
29897
  const start = offsetAlongSide3(rawStart, sourceRoute, HANDLE_GAP);
29853
29898
  const end = offsetAlongSide3(rawEnd, targetRoute, HANDLE_GAP);
29854
29899
  const routing = edge.routing ?? "bezier";
@@ -30291,8 +30336,8 @@ function NodeResizer({
30291
30336
  e.preventDefault();
30292
30337
  e.stopPropagation();
30293
30338
  e.target.setPointerCapture(e.pointerId);
30294
- const w = node.width ?? DEFAULT_NODE_WIDTH3;
30295
- const h = node.height ?? DEFAULT_NODE_HEIGHT3;
30339
+ const w = node.width ?? DEFAULT_NODE_WIDTH2;
30340
+ const h = node.height ?? DEFAULT_NODE_HEIGHT2;
30296
30341
  dragRef.current = {
30297
30342
  pointerId: e.pointerId,
30298
30343
  corner,
@@ -30356,8 +30401,8 @@ function NodeResizer({
30356
30401
  const cur = flow.getNode(node.id);
30357
30402
  if (cur) {
30358
30403
  onResizeEnd?.({
30359
- width: cur.width ?? DEFAULT_NODE_WIDTH3,
30360
- height: cur.height ?? DEFAULT_NODE_HEIGHT3
30404
+ width: cur.width ?? DEFAULT_NODE_WIDTH2,
30405
+ height: cur.height ?? DEFAULT_NODE_HEIGHT2
30361
30406
  });
30362
30407
  }
30363
30408
  dragRef.current = null;
@@ -31535,7 +31580,7 @@ function FlowCanvas2(props) {
31535
31580
  let maxX = Number.NEGATIVE_INFINITY;
31536
31581
  let maxY = Number.NEGATIVE_INFINITY;
31537
31582
  for (const n of targetNodes) {
31538
- const w = n.width ?? DEFAULT_NODE_WIDTH3;
31583
+ const w = n.width ?? DEFAULT_NODE_WIDTH2;
31539
31584
  const h = effectiveHeight(n);
31540
31585
  if (n.position.x < minX) minX = n.position.x;
31541
31586
  if (n.position.y < minY) minY = n.position.y;
@@ -31589,7 +31634,7 @@ function FlowCanvas2(props) {
31589
31634
  let maxX = Number.NEGATIVE_INFINITY;
31590
31635
  let maxY = Number.NEGATIVE_INFINITY;
31591
31636
  for (const n of pool) {
31592
- const w = n.width ?? DEFAULT_NODE_WIDTH3;
31637
+ const w = n.width ?? DEFAULT_NODE_WIDTH2;
31593
31638
  const h = effectiveHeight(n);
31594
31639
  minX = Math.min(minX, n.position.x);
31595
31640
  minY = Math.min(minY, n.position.y);
@@ -31601,7 +31646,7 @@ function FlowCanvas2(props) {
31601
31646
  getIntersectingNodes: (area, partially = true) => {
31602
31647
  return nodesRef.current.filter((n) => {
31603
31648
  if (n.hidden) return false;
31604
- const w = n.width ?? DEFAULT_NODE_WIDTH3;
31649
+ const w = n.width ?? DEFAULT_NODE_WIDTH2;
31605
31650
  const h = effectiveHeight(n);
31606
31651
  if (partially) {
31607
31652
  return n.position.x < area.x + area.width && n.position.x + w > area.x && n.position.y < area.y + area.height && n.position.y + h > area.y;