@octaviaflow/core 3.0.18-beta.40 → 3.0.18-beta.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -7771,10 +7771,12 @@ import {
7771
7771
  useCallback as useCallback12,
7772
7772
  useEffect as useEffect9,
7773
7773
  useId as useId15,
7774
+ useLayoutEffect as useLayoutEffect3,
7774
7775
  useMemo as useMemo9,
7775
7776
  useRef as useRef14,
7776
7777
  useState as useState14
7777
7778
  } from "react";
7779
+ import { createPortal as createPortal5 } from "react-dom";
7778
7780
  import { jsx as jsx28, jsxs as jsxs27 } from "react/jsx-runtime";
7779
7781
  function OptionDropdown({
7780
7782
  value,
@@ -7792,6 +7794,22 @@ function OptionDropdown({
7792
7794
  const panelRef = useRef14(null);
7793
7795
  const inputRef = useRef14(null);
7794
7796
  const listboxId = useId15();
7797
+ const [panelPos, setPanelPos] = useState14(null);
7798
+ const updatePanelPos = useCallback12(() => {
7799
+ if (!triggerRef.current) return;
7800
+ const r = triggerRef.current.getBoundingClientRect();
7801
+ setPanelPos({ top: r.bottom + 4, left: r.left, width: r.width });
7802
+ }, []);
7803
+ useLayoutEffect3(() => {
7804
+ if (!open) return;
7805
+ updatePanelPos();
7806
+ window.addEventListener("scroll", updatePanelPos, true);
7807
+ window.addEventListener("resize", updatePanelPos);
7808
+ return () => {
7809
+ window.removeEventListener("scroll", updatePanelPos, true);
7810
+ window.removeEventListener("resize", updatePanelPos);
7811
+ };
7812
+ }, [open, updatePanelPos]);
7795
7813
  const showSearch = searchable === true || searchable === "auto" && options.length > 8;
7796
7814
  const selected = options.find((o) => o.value === value);
7797
7815
  const filtered = useMemo9(() => {
@@ -7878,54 +7896,71 @@ function OptionDropdown({
7878
7896
  ]
7879
7897
  }
7880
7898
  ),
7881
- open && /* @__PURE__ */ jsxs27("div", { ref: panelRef, className: "ods-cb-dd__panel", role: "presentation", children: [
7882
- showSearch && /* @__PURE__ */ jsxs27("div", { className: "ods-cb-dd__search", children: [
7883
- /* @__PURE__ */ jsx28(SearchIcon4, { "aria-hidden": "true" }),
7884
- /* @__PURE__ */ jsx28(
7885
- "input",
7886
- {
7887
- ref: inputRef,
7888
- value: query,
7889
- onChange: (e) => setQuery(e.target.value),
7890
- placeholder: "Search\u2026",
7891
- "aria-label": "Search options"
7892
- }
7893
- )
7894
- ] }),
7895
- /* @__PURE__ */ jsxs27("ul", { id: listboxId, role: "listbox", "aria-label": ariaLabel, className: "ods-cb-dd__list", children: [
7896
- filtered.length === 0 && /* @__PURE__ */ jsx28("li", { className: "ods-cb-dd__empty", children: "No matches" }),
7897
- filtered.map((opt, idx) => /* @__PURE__ */ jsx28("li", { children: /* @__PURE__ */ jsxs27(
7898
- "button",
7899
- {
7900
- type: "button",
7901
- role: "option",
7902
- "aria-selected": opt.value === value,
7903
- className: cn(
7904
- "ods-cb-dd__opt",
7905
- opt.value === value && "ods-cb-dd__opt--selected",
7906
- idx === activeIdx && "ods-cb-dd__opt--active"
7907
- ),
7908
- onClick: () => select(opt.value),
7909
- onMouseEnter: () => setActiveIdx(idx),
7910
- children: [
7911
- opt.icon && /* @__PURE__ */ jsx28("span", { className: "ods-cb-dd__opt-icon", "aria-hidden": "true", children: opt.icon }),
7912
- opt.symbol && /* @__PURE__ */ jsx28("span", { className: "ods-cb-dd__opt-symbol", children: opt.symbol }),
7913
- /* @__PURE__ */ jsxs27("span", { className: "ods-cb-dd__opt-text", children: [
7914
- /* @__PURE__ */ jsx28("span", { className: "ods-cb-dd__opt-label", children: opt.label }),
7915
- opt.description && /* @__PURE__ */ jsx28("span", { className: "ods-cb-dd__opt-desc", children: opt.description })
7916
- ] }),
7917
- opt.value === value && /* @__PURE__ */ jsx28(
7918
- CheckmarkIcon4,
7899
+ open && panelPos && typeof document !== "undefined" && createPortal5(
7900
+ /* @__PURE__ */ jsxs27(
7901
+ "div",
7902
+ {
7903
+ ref: panelRef,
7904
+ className: "ods-cb-dd__panel ods-cb-dd__panel--portal",
7905
+ role: "presentation",
7906
+ style: {
7907
+ position: "fixed",
7908
+ top: panelPos.top,
7909
+ left: panelPos.left,
7910
+ minWidth: panelPos.width
7911
+ },
7912
+ children: [
7913
+ showSearch && /* @__PURE__ */ jsxs27("div", { className: "ods-cb-dd__search", children: [
7914
+ /* @__PURE__ */ jsx28(SearchIcon4, { "aria-hidden": "true" }),
7915
+ /* @__PURE__ */ jsx28(
7916
+ "input",
7919
7917
  {
7920
- "aria-hidden": "true",
7921
- className: "ods-cb-dd__opt-check"
7918
+ ref: inputRef,
7919
+ value: query,
7920
+ onChange: (e) => setQuery(e.target.value),
7921
+ placeholder: "Search\u2026",
7922
+ "aria-label": "Search options"
7922
7923
  }
7923
7924
  )
7924
- ]
7925
- }
7926
- ) }, opt.value))
7927
- ] })
7928
- ] })
7925
+ ] }),
7926
+ /* @__PURE__ */ jsxs27("ul", { id: listboxId, role: "listbox", "aria-label": ariaLabel, className: "ods-cb-dd__list", children: [
7927
+ filtered.length === 0 && /* @__PURE__ */ jsx28("li", { className: "ods-cb-dd__empty", children: "No matches" }),
7928
+ filtered.map((opt, idx) => /* @__PURE__ */ jsx28("li", { children: /* @__PURE__ */ jsxs27(
7929
+ "button",
7930
+ {
7931
+ type: "button",
7932
+ role: "option",
7933
+ "aria-selected": opt.value === value,
7934
+ className: cn(
7935
+ "ods-cb-dd__opt",
7936
+ opt.value === value && "ods-cb-dd__opt--selected",
7937
+ idx === activeIdx && "ods-cb-dd__opt--active"
7938
+ ),
7939
+ onClick: () => select(opt.value),
7940
+ onMouseEnter: () => setActiveIdx(idx),
7941
+ children: [
7942
+ opt.icon && /* @__PURE__ */ jsx28("span", { className: "ods-cb-dd__opt-icon", "aria-hidden": "true", children: opt.icon }),
7943
+ opt.symbol && /* @__PURE__ */ jsx28("span", { className: "ods-cb-dd__opt-symbol", children: opt.symbol }),
7944
+ /* @__PURE__ */ jsxs27("span", { className: "ods-cb-dd__opt-text", children: [
7945
+ /* @__PURE__ */ jsx28("span", { className: "ods-cb-dd__opt-label", children: opt.label }),
7946
+ opt.description && /* @__PURE__ */ jsx28("span", { className: "ods-cb-dd__opt-desc", children: opt.description })
7947
+ ] }),
7948
+ opt.value === value && /* @__PURE__ */ jsx28(
7949
+ CheckmarkIcon4,
7950
+ {
7951
+ "aria-hidden": "true",
7952
+ className: "ods-cb-dd__opt-check"
7953
+ }
7954
+ )
7955
+ ]
7956
+ }
7957
+ ) }, opt.value))
7958
+ ] })
7959
+ ]
7960
+ }
7961
+ ),
7962
+ document.body
7963
+ )
7929
7964
  ] });
7930
7965
  }
7931
7966
  var ConditionBuilder = forwardRef26(function ConditionBuilder2({
@@ -7939,6 +7974,7 @@ var ConditionBuilder = forwardRef26(function ConditionBuilder2({
7939
7974
  onJoinChange,
7940
7975
  addLabel = "Add condition",
7941
7976
  removeLabel = "Remove condition",
7977
+ maxVisibleRows,
7942
7978
  className,
7943
7979
  ...rest
7944
7980
  }, ref) {
@@ -7998,6 +8034,12 @@ var ConditionBuilder = forwardRef26(function ConditionBuilder2({
7998
8034
  },
7999
8035
  [conditions, joinOperator, onChange]
8000
8036
  );
8037
+ const cappedRows = Boolean(maxVisibleRows && maxVisibleRows > 0);
8038
+ const rowsViewportStyle = cappedRows ? {
8039
+ maxHeight: `calc((var(--ods-layout-control-height, 32px) + var(--ods-space-2, 8px)) * ${maxVisibleRows} + var(--ods-space-1, 4px))`,
8040
+ overflowY: "auto",
8041
+ paddingRight: "var(--ods-space-1, 4px)"
8042
+ } : void 0;
8001
8043
  return /* @__PURE__ */ jsxs27(
8002
8044
  "div",
8003
8045
  {
@@ -8009,7 +8051,7 @@ var ConditionBuilder = forwardRef26(function ConditionBuilder2({
8009
8051
  className
8010
8052
  ),
8011
8053
  children: [
8012
- conditions.map((condition, index) => /* @__PURE__ */ jsxs27("div", { className: "ods-condition-row", children: [
8054
+ /* @__PURE__ */ jsx28("div", { className: "ods-condition-builder__rows", style: rowsViewportStyle, children: conditions.map((condition, index) => /* @__PURE__ */ jsxs27("div", { className: "ods-condition-row", children: [
8013
8055
  index === 0 ? /* @__PURE__ */ jsx28(
8014
8056
  "span",
8015
8057
  {
@@ -8079,7 +8121,7 @@ var ConditionBuilder = forwardRef26(function ConditionBuilder2({
8079
8121
  children: /* @__PURE__ */ jsx28(CloseIcon3, { "aria-hidden": "true" })
8080
8122
  }
8081
8123
  )
8082
- ] }, index)),
8124
+ ] }, index)) }),
8083
8125
  /* @__PURE__ */ jsx28("div", { className: "ods-condition-builder__actions", children: /* @__PURE__ */ jsxs27(
8084
8126
  "button",
8085
8127
  {
@@ -8266,7 +8308,7 @@ import {
8266
8308
  useRef as useRef16
8267
8309
  } from "react";
8268
8310
  import { FocusScope, OverlayProvider, useDialog, useModal, useOverlay } from "react-aria";
8269
- import { createPortal as createPortal5 } from "react-dom";
8311
+ import { createPortal as createPortal6 } from "react-dom";
8270
8312
 
8271
8313
  // src/utils/motion.ts
8272
8314
  var odsMotion = {
@@ -8422,7 +8464,7 @@ var DialogContent = forwardRef28(function DialogContent2({
8422
8464
  DialogContent.displayName = "Dialog.Content";
8423
8465
  var Dialog = forwardRef28(function Dialog2(props, ref) {
8424
8466
  if (typeof document === "undefined") return null;
8425
- return createPortal5(
8467
+ return createPortal6(
8426
8468
  /* @__PURE__ */ jsx30(OverlayProvider, { children: /* @__PURE__ */ jsx30(DialogContent, { ref, ...props }) }),
8427
8469
  document.body
8428
8470
  );
@@ -9041,11 +9083,11 @@ import {
9041
9083
  useCallback as useCallback16,
9042
9084
  useEffect as useEffect14,
9043
9085
  useId as useId19,
9044
- useLayoutEffect as useLayoutEffect3,
9086
+ useLayoutEffect as useLayoutEffect4,
9045
9087
  useRef as useRef18,
9046
9088
  useState as useState18
9047
9089
  } from "react";
9048
- import { createPortal as createPortal6 } from "react-dom";
9090
+ import { createPortal as createPortal7 } from "react-dom";
9049
9091
  import { Fragment as Fragment17, jsx as jsx35, jsxs as jsxs34 } from "react/jsx-runtime";
9050
9092
  function flipIntoViewport(cursor, panelRect, viewport, margin = 8) {
9051
9093
  if (!panelRect) return cursor;
@@ -9111,7 +9153,7 @@ var ContextMenu = forwardRef33(
9111
9153
  setActiveIndex(navigableIndices[0] ?? -1);
9112
9154
  onOpenChange?.(true);
9113
9155
  };
9114
- useLayoutEffect3(() => {
9156
+ useLayoutEffect4(() => {
9115
9157
  if (!open) return;
9116
9158
  const panel2 = panelRef.current;
9117
9159
  if (!panel2) return;
@@ -9278,7 +9320,7 @@ var ContextMenu = forwardRef33(
9278
9320
  children
9279
9321
  }
9280
9322
  ),
9281
- createPortal6(panel, portalTarget)
9323
+ createPortal7(panel, portalTarget)
9282
9324
  ] });
9283
9325
  }
9284
9326
  );
@@ -10817,12 +10859,12 @@ import {
10817
10859
  import {
10818
10860
  useCallback as useCallback18,
10819
10861
  useEffect as useEffect16,
10820
- useLayoutEffect as useLayoutEffect4,
10862
+ useLayoutEffect as useLayoutEffect5,
10821
10863
  useMemo as useMemo12,
10822
10864
  useRef as useRef20,
10823
10865
  useState as useState20
10824
10866
  } from "react";
10825
- import { createPortal as createPortal7 } from "react-dom";
10867
+ import { createPortal as createPortal8 } from "react-dom";
10826
10868
  import { Fragment as Fragment20, jsx as jsx38, jsxs as jsxs37 } from "react/jsx-runtime";
10827
10869
  function readValue(row, col) {
10828
10870
  if (typeof col.accessor === "function") return col.accessor(row);
@@ -10839,7 +10881,7 @@ function PortalMenu({
10839
10881
  }) {
10840
10882
  const menuRef = useRef20(null);
10841
10883
  const [pos, setPos] = useState20(null);
10842
- useLayoutEffect4(() => {
10884
+ useLayoutEffect5(() => {
10843
10885
  if (!open) return;
10844
10886
  const update = () => {
10845
10887
  const t = triggerRef.current;
@@ -10885,7 +10927,7 @@ function PortalMenu({
10885
10927
  right: align === "end" ? pos.right : "auto",
10886
10928
  zIndex: 1e3
10887
10929
  };
10888
- return createPortal7(
10930
+ return createPortal8(
10889
10931
  /* @__PURE__ */ jsx38("div", { ref: menuRef, className: cn("ods-datatable__menu", className), style, children }),
10890
10932
  document.body
10891
10933
  );
@@ -12330,7 +12372,7 @@ Drawer.displayName = "Drawer";
12330
12372
  import { AnimatePresence as AnimatePresence13, motion as motion19 } from "framer-motion";
12331
12373
  import { useEffect as useEffect18, useMemo as useMemo14, useRef as useRef22 } from "react";
12332
12374
  import { useButton as useButton4, useMenu, useMenuItem, useMenuTrigger } from "react-aria";
12333
- import { createPortal as createPortal8 } from "react-dom";
12375
+ import { createPortal as createPortal9 } from "react-dom";
12334
12376
  import { Fragment as Fragment22, jsx as jsx44, jsxs as jsxs43 } from "react/jsx-runtime";
12335
12377
  function MenuItemComponent({ item, state, onAction }) {
12336
12378
  const ref = useRef22(null);
@@ -12494,7 +12536,7 @@ function MenuPopup({
12494
12536
  }
12495
12537
  ) });
12496
12538
  if (typeof document !== "undefined") {
12497
- return createPortal8(portalContent, document.body);
12539
+ return createPortal9(portalContent, document.body);
12498
12540
  }
12499
12541
  return null;
12500
12542
  }
@@ -15790,8 +15832,8 @@ var Heatmap = forwardRef48(
15790
15832
  Heatmap.displayName = "Heatmap";
15791
15833
 
15792
15834
  // src/components/HoverCard/HoverCard.tsx
15793
- import { useCallback as useCallback24, useEffect as useEffect24, useLayoutEffect as useLayoutEffect5, useRef as useRef29, useState as useState29 } from "react";
15794
- import { createPortal as createPortal9 } from "react-dom";
15835
+ import { useCallback as useCallback24, useEffect as useEffect24, useLayoutEffect as useLayoutEffect6, useRef as useRef29, useState as useState29 } from "react";
15836
+ import { createPortal as createPortal10 } from "react-dom";
15795
15837
  import { Fragment as Fragment25, jsx as jsx59, jsxs as jsxs56 } from "react/jsx-runtime";
15796
15838
  function computePosition3(rect, panelRect, placement, offset) {
15797
15839
  const cx = rect.left + rect.width / 2;
@@ -15847,7 +15889,7 @@ function HoverCard({
15847
15889
  const panelRect = panelRef.current.getBoundingClientRect();
15848
15890
  setCoords(computePosition3(trigRect, panelRect, placement, offset));
15849
15891
  }, [placement, offset]);
15850
- useLayoutEffect5(() => {
15892
+ useLayoutEffect6(() => {
15851
15893
  if (!open) return;
15852
15894
  reposition();
15853
15895
  const id = requestAnimationFrame(reposition);
@@ -15875,7 +15917,7 @@ function HoverCard({
15875
15917
  children
15876
15918
  }
15877
15919
  );
15878
- const portal = typeof document !== "undefined" && open ? createPortal9(
15920
+ const portal = typeof document !== "undefined" && open ? createPortal10(
15879
15921
  /* @__PURE__ */ jsx59(
15880
15922
  "div",
15881
15923
  {
@@ -18108,12 +18150,12 @@ import {
18108
18150
  useCallback as useCallback26,
18109
18151
  useEffect as useEffect28,
18110
18152
  useId as useId35,
18111
- useLayoutEffect as useLayoutEffect6,
18153
+ useLayoutEffect as useLayoutEffect7,
18112
18154
  useMemo as useMemo22,
18113
18155
  useRef as useRef33,
18114
18156
  useState as useState33
18115
18157
  } from "react";
18116
- import { createPortal as createPortal10 } from "react-dom";
18158
+ import { createPortal as createPortal11 } from "react-dom";
18117
18159
  import {
18118
18160
  ChevronDownIcon as ChevronDownIcon6,
18119
18161
  CloseIcon as CloseIcon11,
@@ -18235,7 +18277,7 @@ var MultiSelect = forwardRef60(
18235
18277
  useEffect28(() => setActiveIdx(0), [query, open]);
18236
18278
  const [fitCount, setFitCount] = useState33(selectedValues.length);
18237
18279
  const [tick, setTick] = useState33(0);
18238
- useLayoutEffect6(() => {
18280
+ useLayoutEffect7(() => {
18239
18281
  if (maxVisibleTags !== void 0) {
18240
18282
  setFitCount(Math.min(selectedValues.length, maxVisibleTags));
18241
18283
  return;
@@ -18485,7 +18527,7 @@ var MultiSelect = forwardRef60(
18485
18527
  ]
18486
18528
  }
18487
18529
  ),
18488
- typeof document !== "undefined" && createPortal10(
18530
+ typeof document !== "undefined" && createPortal11(
18489
18531
  /* @__PURE__ */ jsx70(AnimatePresence17, { children: open && /* @__PURE__ */ jsxs68(
18490
18532
  motion26.div,
18491
18533
  {
@@ -20488,8 +20530,8 @@ var PipelineCard = forwardRef66(
20488
20530
  PipelineCard.displayName = "PipelineCard";
20489
20531
 
20490
20532
  // src/components/Popover/Popover.tsx
20491
- import { useCallback as useCallback31, useEffect as useEffect30, useLayoutEffect as useLayoutEffect7, useRef as useRef36, useState as useState37 } from "react";
20492
- import { createPortal as createPortal11 } from "react-dom";
20533
+ import { useCallback as useCallback31, useEffect as useEffect30, useLayoutEffect as useLayoutEffect8, useRef as useRef36, useState as useState37 } from "react";
20534
+ import { createPortal as createPortal12 } from "react-dom";
20493
20535
  import { Fragment as Fragment34, jsx as jsx78, jsxs as jsxs76 } from "react/jsx-runtime";
20494
20536
  function computePosition4(rect, popRect, placement, offset) {
20495
20537
  const cx = rect.left + rect.width / 2;
@@ -20538,7 +20580,7 @@ function Popover({
20538
20580
  const popRect = popRef.current.getBoundingClientRect();
20539
20581
  setCoords(computePosition4(trigRect, popRect, placement, offset));
20540
20582
  }, [placement, offset]);
20541
- useLayoutEffect7(() => {
20583
+ useLayoutEffect8(() => {
20542
20584
  if (!open) return;
20543
20585
  reposition();
20544
20586
  const id = requestAnimationFrame(reposition);
@@ -20586,7 +20628,7 @@ function Popover({
20586
20628
  children
20587
20629
  }
20588
20630
  );
20589
- const portal = typeof document !== "undefined" && open ? createPortal11(
20631
+ const portal = typeof document !== "undefined" && open ? createPortal12(
20590
20632
  /* @__PURE__ */ jsxs76(
20591
20633
  "div",
20592
20634
  {
@@ -22170,7 +22212,7 @@ import {
22170
22212
  forwardRef as forwardRef78,
22171
22213
  useCallback as useCallback33,
22172
22214
  useEffect as useEffect32,
22173
- useLayoutEffect as useLayoutEffect8,
22215
+ useLayoutEffect as useLayoutEffect9,
22174
22216
  useRef as useRef40,
22175
22217
  useState as useState40
22176
22218
  } from "react";
@@ -22214,7 +22256,7 @@ var Resizable = forwardRef78(
22214
22256
  if (typeof ref === "function") ref(node);
22215
22257
  else if (ref) ref.current = node;
22216
22258
  };
22217
- useLayoutEffect8(() => {
22259
+ useLayoutEffect9(() => {
22218
22260
  const el = wrapRef.current;
22219
22261
  if (!el) return;
22220
22262
  const t = direction === "horizontal" ? el.offsetWidth : el.offsetHeight;
@@ -22589,7 +22631,7 @@ function SettingsRow({
22589
22631
  // src/components/Sheet/Sheet.tsx
22590
22632
  import { AnimatePresence as AnimatePresence18, motion as motion28 } from "framer-motion";
22591
22633
  import { useEffect as useEffect33 } from "react";
22592
- import { createPortal as createPortal12 } from "react-dom";
22634
+ import { createPortal as createPortal13 } from "react-dom";
22593
22635
  import { Fragment as Fragment37, jsx as jsx94, jsxs as jsxs91 } from "react/jsx-runtime";
22594
22636
  var slideVariants = {
22595
22637
  top: { initial: { y: "-100%" }, animate: { y: 0 }, exit: { y: "-100%" } },
@@ -22672,7 +22714,7 @@ function Sheet({
22672
22714
  )
22673
22715
  ] }) });
22674
22716
  if (typeof document === "undefined") return null;
22675
- return createPortal12(content, document.body);
22717
+ return createPortal13(content, document.body);
22676
22718
  }
22677
22719
 
22678
22720
  // src/components/Show/Show.tsx
@@ -23307,7 +23349,7 @@ SkeletonGroup.displayName = "SkeletonGroup";
23307
23349
  import { AnimatePresence as AnimatePresence19, motion as motion29 } from "framer-motion";
23308
23350
  import { useRef as useRef42 } from "react";
23309
23351
  import { FocusScope as FocusScope2, OverlayProvider as OverlayProvider2, useDialog as useDialog2, useModal as useModal2, useOverlay as useOverlay2 } from "react-aria";
23310
- import { createPortal as createPortal13 } from "react-dom";
23352
+ import { createPortal as createPortal14 } from "react-dom";
23311
23353
  import { Fragment as Fragment39, jsx as jsx98, jsxs as jsxs93 } from "react/jsx-runtime";
23312
23354
  var slideVariants2 = {
23313
23355
  left: {
@@ -23399,7 +23441,7 @@ function SlideoutContent({
23399
23441
  }
23400
23442
  function SlideoutPanel(props) {
23401
23443
  if (typeof document === "undefined") return null;
23402
- return createPortal13(
23444
+ return createPortal14(
23403
23445
  /* @__PURE__ */ jsx98(OverlayProvider2, { children: /* @__PURE__ */ jsx98(SlideoutContent, { ...props }) }),
23404
23446
  document.body
23405
23447
  );
@@ -24034,11 +24076,11 @@ import {
24034
24076
  forwardRef as forwardRef86,
24035
24077
  useCallback as useCallback36,
24036
24078
  useEffect as useEffect36,
24037
- useLayoutEffect as useLayoutEffect9,
24079
+ useLayoutEffect as useLayoutEffect10,
24038
24080
  useMemo as useMemo25,
24039
24081
  useState as useState43
24040
24082
  } from "react";
24041
- import { createPortal as createPortal14 } from "react-dom";
24083
+ import { createPortal as createPortal15 } from "react-dom";
24042
24084
  import { jsx as jsx103, jsxs as jsxs97 } from "react/jsx-runtime";
24043
24085
  var Spotlight = forwardRef86(
24044
24086
  function Spotlight2({
@@ -24076,7 +24118,7 @@ var Spotlight = forwardRef86(
24076
24118
  height: window.innerHeight
24077
24119
  });
24078
24120
  }, [open, target]);
24079
- useLayoutEffect9(() => {
24121
+ useLayoutEffect10(() => {
24080
24122
  measure();
24081
24123
  }, [measure]);
24082
24124
  useEffect36(() => {
@@ -24105,7 +24147,7 @@ var Spotlight = forwardRef86(
24105
24147
  width: rect.width + padding * 2,
24106
24148
  height: rect.height + padding * 2
24107
24149
  } : null;
24108
- return createPortal14(
24150
+ return createPortal15(
24109
24151
  /* @__PURE__ */ jsx103(AnimatePresence20, { children: open && /* @__PURE__ */ jsxs97(
24110
24152
  motion30.div,
24111
24153
  {
@@ -25845,7 +25887,7 @@ import {
25845
25887
  useState as useState51
25846
25888
  } from "react";
25847
25889
  import { useTextField } from "react-aria";
25848
- import { createPortal as createPortal15 } from "react-dom";
25890
+ import { createPortal as createPortal16 } from "react-dom";
25849
25891
  import { CopyIcon as CopyIcon5, CutIcon } from "@octaviaflow/icons";
25850
25892
 
25851
25893
  // src/hooks/useTextareaCommands.ts
@@ -26655,7 +26697,7 @@ var Textarea = forwardRef96(
26655
26697
  "aria-activedescendant": cmdEnabled && cmdPalette.isOpen && cmdPalette.items[cmdPalette.activeIndex] ? `${baseId}-cmd-${cmdPalette.items[cmdPalette.activeIndex].id}` : void 0
26656
26698
  }
26657
26699
  ),
26658
- cmdEnabled && cmdPalette.isOpen && cmdPalette.items.length > 0 && typeof document !== "undefined" && createPortal15(
26700
+ cmdEnabled && cmdPalette.isOpen && cmdPalette.items.length > 0 && typeof document !== "undefined" && createPortal16(
26659
26701
  /* @__PURE__ */ jsx115(
26660
26702
  "ul",
26661
26703
  {
@@ -26698,7 +26740,7 @@ var Textarea = forwardRef96(
26698
26740
  ),
26699
26741
  document.body
26700
26742
  ),
26701
- selectionToolbar && sel.active && sel.rect && typeof document !== "undefined" && createPortal15(
26743
+ selectionToolbar && sel.active && sel.rect && typeof document !== "undefined" && createPortal16(
26702
26744
  /* @__PURE__ */ jsxs108(
26703
26745
  "div",
26704
26746
  {
@@ -27623,7 +27665,7 @@ import {
27623
27665
  useRef as useRef51,
27624
27666
  useState as useState54
27625
27667
  } from "react";
27626
- import { createPortal as createPortal16 } from "react-dom";
27668
+ import { createPortal as createPortal17 } from "react-dom";
27627
27669
  import { Fragment as Fragment46, jsx as jsx119, jsxs as jsxs112 } from "react/jsx-runtime";
27628
27670
  var defaultIcons = {
27629
27671
  success: /* @__PURE__ */ jsxs112("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
@@ -27953,7 +27995,7 @@ function ToastProvider({
27953
27995
  }) });
27954
27996
  return /* @__PURE__ */ jsxs112(ToastContext.Provider, { value: ctx, children: [
27955
27997
  children,
27956
- typeof document !== "undefined" && createPortal16(containers, document.body)
27998
+ typeof document !== "undefined" && createPortal17(containers, document.body)
27957
27999
  ] });
27958
28000
  }
27959
28001
  function useToast() {