@octaviaflow/core 3.1.0-beta.73 → 3.1.0-beta.74
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/components/AuthScreen/AuthScreen.d.ts +29 -1
- package/dist/components/AuthScreen/AuthScreen.d.ts.map +1 -1
- package/dist/index.cjs +100 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +246 -147
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1180,6 +1180,7 @@ AuthBadge.displayName = "AuthBadge";
|
|
|
1180
1180
|
|
|
1181
1181
|
// src/components/AuthScreen/AuthScreen.tsx
|
|
1182
1182
|
import {
|
|
1183
|
+
useEffect,
|
|
1183
1184
|
useId as useId4,
|
|
1184
1185
|
useState as useState3
|
|
1185
1186
|
} from "react";
|
|
@@ -1715,8 +1716,19 @@ function AuthSignupForm({
|
|
|
1715
1716
|
error,
|
|
1716
1717
|
success,
|
|
1717
1718
|
loading = false,
|
|
1719
|
+
nameLayout = "single",
|
|
1718
1720
|
nameLabel = "Full name",
|
|
1719
1721
|
namePlaceholder = "Enter your full name",
|
|
1722
|
+
firstNameLabel = "First name",
|
|
1723
|
+
firstNamePlaceholder = "Enter your first name",
|
|
1724
|
+
lastNameLabel = "Last name",
|
|
1725
|
+
lastNamePlaceholder = "Enter your last name",
|
|
1726
|
+
showCompanyToggle = false,
|
|
1727
|
+
companyToggleLabel = "I'm signing up for a company",
|
|
1728
|
+
companyNameLabel = "Company name",
|
|
1729
|
+
companyNamePlaceholder = "Acme Inc",
|
|
1730
|
+
domainLabel = "Domain",
|
|
1731
|
+
domainPlaceholder = "acme.com",
|
|
1720
1732
|
emailLabel = "Email",
|
|
1721
1733
|
emailPlaceholder = "Enter your email address",
|
|
1722
1734
|
passwordLabel = "Password",
|
|
@@ -1739,12 +1751,31 @@ function AuthSignupForm({
|
|
|
1739
1751
|
}) {
|
|
1740
1752
|
const titleId = useId4();
|
|
1741
1753
|
const [name, setName] = useState3("");
|
|
1754
|
+
const [firstName, setFirstName] = useState3("");
|
|
1755
|
+
const [lastName, setLastName] = useState3("");
|
|
1742
1756
|
const [email, setEmail] = useState3("");
|
|
1743
1757
|
const [password, setPassword] = useState3("");
|
|
1744
1758
|
const [acceptTerms, setAcceptTerms] = useState3(false);
|
|
1759
|
+
const [isCompanyAccount, setIsCompanyAccount] = useState3(false);
|
|
1760
|
+
const [companyName, setCompanyName] = useState3("");
|
|
1761
|
+
const [domain, setDomain] = useState3("");
|
|
1762
|
+
useEffect(() => {
|
|
1763
|
+
if (!showCompanyToggle || !isCompanyAccount || domain) return;
|
|
1764
|
+
const at = email.indexOf("@");
|
|
1765
|
+
if (at > -1 && at < email.length - 1) setDomain(email.slice(at + 1));
|
|
1766
|
+
}, [showCompanyToggle, isCompanyAccount, email, domain]);
|
|
1745
1767
|
const handleSubmit = (event) => {
|
|
1746
1768
|
event.preventDefault();
|
|
1747
|
-
|
|
1769
|
+
const combinedName = nameLayout === "split" ? `${firstName} ${lastName}`.trim() : name;
|
|
1770
|
+
const values = {
|
|
1771
|
+
name: combinedName,
|
|
1772
|
+
email,
|
|
1773
|
+
password,
|
|
1774
|
+
acceptTerms,
|
|
1775
|
+
...nameLayout === "split" ? { firstName, lastName } : {},
|
|
1776
|
+
...showCompanyToggle ? { isCompanyAccount, companyName, domain } : {}
|
|
1777
|
+
};
|
|
1778
|
+
onSubmit?.(values, event);
|
|
1748
1779
|
};
|
|
1749
1780
|
return /* @__PURE__ */ jsxs6(
|
|
1750
1781
|
"form",
|
|
@@ -1769,7 +1800,36 @@ function AuthSignupForm({
|
|
|
1769
1800
|
success && /* @__PURE__ */ jsx6(Banner, { variant: "success", children: success })
|
|
1770
1801
|
] }),
|
|
1771
1802
|
/* @__PURE__ */ jsxs6("div", { className: "ods-auth-form__fields", children: [
|
|
1772
|
-
/* @__PURE__ */
|
|
1803
|
+
nameLayout === "split" ? /* @__PURE__ */ jsxs6("div", { className: "ods-auth-form__grid2", children: [
|
|
1804
|
+
/* @__PURE__ */ jsx6(
|
|
1805
|
+
Input,
|
|
1806
|
+
{
|
|
1807
|
+
label: firstNameLabel,
|
|
1808
|
+
type: "text",
|
|
1809
|
+
name: "firstName",
|
|
1810
|
+
autoComplete: "given-name",
|
|
1811
|
+
required: true,
|
|
1812
|
+
placeholder: firstNamePlaceholder,
|
|
1813
|
+
value: firstName,
|
|
1814
|
+
onChange: (e) => setFirstName(e.target.value),
|
|
1815
|
+
disabled: loading
|
|
1816
|
+
}
|
|
1817
|
+
),
|
|
1818
|
+
/* @__PURE__ */ jsx6(
|
|
1819
|
+
Input,
|
|
1820
|
+
{
|
|
1821
|
+
label: lastNameLabel,
|
|
1822
|
+
type: "text",
|
|
1823
|
+
name: "lastName",
|
|
1824
|
+
autoComplete: "family-name",
|
|
1825
|
+
required: true,
|
|
1826
|
+
placeholder: lastNamePlaceholder,
|
|
1827
|
+
value: lastName,
|
|
1828
|
+
onChange: (e) => setLastName(e.target.value),
|
|
1829
|
+
disabled: loading
|
|
1830
|
+
}
|
|
1831
|
+
)
|
|
1832
|
+
] }) : /* @__PURE__ */ jsx6(
|
|
1773
1833
|
Input,
|
|
1774
1834
|
{
|
|
1775
1835
|
label: nameLabel,
|
|
@@ -1812,6 +1872,45 @@ function AuthSignupForm({
|
|
|
1812
1872
|
}
|
|
1813
1873
|
)
|
|
1814
1874
|
] }),
|
|
1875
|
+
showCompanyToggle && /* @__PURE__ */ jsxs6(Fragment4, { children: [
|
|
1876
|
+
/* @__PURE__ */ jsx6(
|
|
1877
|
+
Checkbox,
|
|
1878
|
+
{
|
|
1879
|
+
label: companyToggleLabel,
|
|
1880
|
+
checked: isCompanyAccount,
|
|
1881
|
+
onChange: setIsCompanyAccount,
|
|
1882
|
+
disabled: loading
|
|
1883
|
+
}
|
|
1884
|
+
),
|
|
1885
|
+
isCompanyAccount && /* @__PURE__ */ jsxs6("div", { className: "ods-auth-form__grid2", children: [
|
|
1886
|
+
/* @__PURE__ */ jsx6(
|
|
1887
|
+
Input,
|
|
1888
|
+
{
|
|
1889
|
+
label: companyNameLabel,
|
|
1890
|
+
type: "text",
|
|
1891
|
+
name: "companyName",
|
|
1892
|
+
autoComplete: "organization",
|
|
1893
|
+
required: true,
|
|
1894
|
+
placeholder: companyNamePlaceholder,
|
|
1895
|
+
value: companyName,
|
|
1896
|
+
onChange: (e) => setCompanyName(e.target.value),
|
|
1897
|
+
disabled: loading
|
|
1898
|
+
}
|
|
1899
|
+
),
|
|
1900
|
+
/* @__PURE__ */ jsx6(
|
|
1901
|
+
Input,
|
|
1902
|
+
{
|
|
1903
|
+
label: domainLabel,
|
|
1904
|
+
type: "text",
|
|
1905
|
+
name: "domain",
|
|
1906
|
+
placeholder: domainPlaceholder,
|
|
1907
|
+
value: domain,
|
|
1908
|
+
onChange: (e) => setDomain(e.target.value),
|
|
1909
|
+
disabled: loading
|
|
1910
|
+
}
|
|
1911
|
+
)
|
|
1912
|
+
] })
|
|
1913
|
+
] }),
|
|
1815
1914
|
showTerms && /* @__PURE__ */ jsx6(
|
|
1816
1915
|
Checkbox,
|
|
1817
1916
|
{
|
|
@@ -2278,7 +2377,7 @@ import { ChevronLeftIcon, ChevronRightIcon } from "@octaviaflow/icons";
|
|
|
2278
2377
|
import {
|
|
2279
2378
|
forwardRef as forwardRef6,
|
|
2280
2379
|
useCallback as useCallback4,
|
|
2281
|
-
useEffect,
|
|
2380
|
+
useEffect as useEffect2,
|
|
2282
2381
|
useId as useId6,
|
|
2283
2382
|
useMemo as useMemo3,
|
|
2284
2383
|
useRef as useRef4,
|
|
@@ -2339,7 +2438,7 @@ var Calendar = forwardRef6(function Calendar2({
|
|
|
2339
2438
|
});
|
|
2340
2439
|
const gridRef = useRef4(null);
|
|
2341
2440
|
const gridId = useId6();
|
|
2342
|
-
|
|
2441
|
+
useEffect2(() => {
|
|
2343
2442
|
if (!gridRef.current) return;
|
|
2344
2443
|
const cell = gridRef.current.querySelector(
|
|
2345
2444
|
`[data-date="${focusedDate.toISOString()}"]`
|
|
@@ -3588,7 +3687,7 @@ ChatBubble.displayName = "ChatBubble";
|
|
|
3588
3687
|
// src/components/ChatComposer/ChatComposer.tsx
|
|
3589
3688
|
import {
|
|
3590
3689
|
forwardRef as forwardRef11,
|
|
3591
|
-
useEffect as
|
|
3690
|
+
useEffect as useEffect3,
|
|
3592
3691
|
useId as useId8,
|
|
3593
3692
|
useRef as useRef5,
|
|
3594
3693
|
useState as useState7
|
|
@@ -3651,7 +3750,7 @@ var ChatComposer = forwardRef11(
|
|
|
3651
3750
|
if (!isControlled) setInternal(next);
|
|
3652
3751
|
onChange?.(next);
|
|
3653
3752
|
};
|
|
3654
|
-
|
|
3753
|
+
useEffect3(() => {
|
|
3655
3754
|
const el = innerRef.current;
|
|
3656
3755
|
if (!el) return;
|
|
3657
3756
|
el.style.height = "auto";
|
|
@@ -3741,7 +3840,7 @@ ChatComposer.displayName = "ChatComposer";
|
|
|
3741
3840
|
import {
|
|
3742
3841
|
Children,
|
|
3743
3842
|
forwardRef as forwardRef12,
|
|
3744
|
-
useEffect as
|
|
3843
|
+
useEffect as useEffect4,
|
|
3745
3844
|
useRef as useRef6
|
|
3746
3845
|
} from "react";
|
|
3747
3846
|
import { jsx as jsx17, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
@@ -3772,7 +3871,7 @@ var ChatThread = forwardRef12(
|
|
|
3772
3871
|
following.current = el.scrollHeight - el.scrollTop - el.clientHeight < STICK_THRESHOLD;
|
|
3773
3872
|
onScroll?.(e);
|
|
3774
3873
|
};
|
|
3775
|
-
|
|
3874
|
+
useEffect4(() => {
|
|
3776
3875
|
if (!stickToBottom || loading) return;
|
|
3777
3876
|
const el = innerRef.current;
|
|
3778
3877
|
if (el && following.current) el.scrollTop = el.scrollHeight;
|
|
@@ -4179,7 +4278,7 @@ ChatToolTrace.displayName = "ChatToolTrace";
|
|
|
4179
4278
|
// src/components/ChatThinking/ChatThinking.tsx
|
|
4180
4279
|
import {
|
|
4181
4280
|
forwardRef as forwardRef17,
|
|
4182
|
-
useEffect as
|
|
4281
|
+
useEffect as useEffect5,
|
|
4183
4282
|
useState as useState11
|
|
4184
4283
|
} from "react";
|
|
4185
4284
|
import { Fragment as Fragment7, jsx as jsx22, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
@@ -4196,7 +4295,7 @@ var ChatThinking = forwardRef17(
|
|
|
4196
4295
|
}, ref) {
|
|
4197
4296
|
const cycling = Array.isArray(labels) && labels.length > 0;
|
|
4198
4297
|
const [idx, setIdx] = useState11(0);
|
|
4199
|
-
|
|
4298
|
+
useEffect5(() => {
|
|
4200
4299
|
if (!cycling || labels.length < 2) return;
|
|
4201
4300
|
const id = window.setInterval(
|
|
4202
4301
|
() => setIdx((i) => (i + 1) % labels.length),
|
|
@@ -4915,7 +5014,7 @@ import { AnimatePresence as AnimatePresence4, motion as motion6, useReducedMotio
|
|
|
4915
5014
|
import {
|
|
4916
5015
|
forwardRef as forwardRef26,
|
|
4917
5016
|
useCallback as useCallback7,
|
|
4918
|
-
useEffect as
|
|
5017
|
+
useEffect as useEffect6,
|
|
4919
5018
|
useLayoutEffect,
|
|
4920
5019
|
useRef as useRef8,
|
|
4921
5020
|
useState as useState14
|
|
@@ -5015,7 +5114,7 @@ var Coachmark = forwardRef26(
|
|
|
5015
5114
|
useLayoutEffect(() => {
|
|
5016
5115
|
measure();
|
|
5017
5116
|
}, [measure]);
|
|
5018
|
-
|
|
5117
|
+
useEffect6(() => {
|
|
5019
5118
|
if (!open) return;
|
|
5020
5119
|
const onChange = () => measure();
|
|
5021
5120
|
window.addEventListener("resize", onChange);
|
|
@@ -5025,7 +5124,7 @@ var Coachmark = forwardRef26(
|
|
|
5025
5124
|
window.removeEventListener("scroll", onChange, true);
|
|
5026
5125
|
};
|
|
5027
5126
|
}, [open, measure]);
|
|
5028
|
-
|
|
5127
|
+
useEffect6(() => {
|
|
5029
5128
|
if (!open) return;
|
|
5030
5129
|
const onKey = (e) => {
|
|
5031
5130
|
if (e.key === "Escape") onDismiss();
|
|
@@ -5185,7 +5284,7 @@ function useCoachmarkSeen(key, storagePrefix = "ods-coachmark:") {
|
|
|
5185
5284
|
import { EyedropperIcon } from "@octaviaflow/icons";
|
|
5186
5285
|
import {
|
|
5187
5286
|
forwardRef as forwardRef27,
|
|
5188
|
-
useEffect as
|
|
5287
|
+
useEffect as useEffect7,
|
|
5189
5288
|
useId as useId10,
|
|
5190
5289
|
useImperativeHandle,
|
|
5191
5290
|
useRef as useRef9,
|
|
@@ -5226,7 +5325,7 @@ var ColorPicker = forwardRef27(
|
|
|
5226
5325
|
...rest
|
|
5227
5326
|
}, forwardedRef) {
|
|
5228
5327
|
const [draft, setDraft] = useState15(value);
|
|
5229
|
-
|
|
5328
|
+
useEffect7(() => {
|
|
5230
5329
|
setDraft(value);
|
|
5231
5330
|
}, [value]);
|
|
5232
5331
|
const hexInputRef = useRef9(null);
|
|
@@ -5392,7 +5491,7 @@ import { AnimatePresence as AnimatePresence5, motion as motion7, useReducedMotio
|
|
|
5392
5491
|
import {
|
|
5393
5492
|
forwardRef as forwardRef28,
|
|
5394
5493
|
useCallback as useCallback8,
|
|
5395
|
-
useEffect as
|
|
5494
|
+
useEffect as useEffect8,
|
|
5396
5495
|
useId as useId11,
|
|
5397
5496
|
useMemo as useMemo5,
|
|
5398
5497
|
useRef as useRef10,
|
|
@@ -5444,19 +5543,19 @@ var CommandPalette = forwardRef28(
|
|
|
5444
5543
|
() => filteredGroups.flatMap((g) => g.items),
|
|
5445
5544
|
[filteredGroups]
|
|
5446
5545
|
);
|
|
5447
|
-
|
|
5546
|
+
useEffect8(() => {
|
|
5448
5547
|
if (activeIndex >= flatItems.length) {
|
|
5449
5548
|
setActiveIndex(Math.max(0, flatItems.length - 1));
|
|
5450
5549
|
}
|
|
5451
5550
|
}, [flatItems.length, activeIndex]);
|
|
5452
|
-
|
|
5551
|
+
useEffect8(() => {
|
|
5453
5552
|
if (open) {
|
|
5454
5553
|
setQuery("");
|
|
5455
5554
|
setActiveIndex(0);
|
|
5456
5555
|
requestAnimationFrame(() => inputRef.current?.focus());
|
|
5457
5556
|
}
|
|
5458
5557
|
}, [open]);
|
|
5459
|
-
|
|
5558
|
+
useEffect8(() => {
|
|
5460
5559
|
if (!open) return;
|
|
5461
5560
|
const el = document.getElementById(`${baseId}-opt-${activeIndex}`);
|
|
5462
5561
|
if (el && typeof el.scrollIntoView === "function") {
|
|
@@ -5641,7 +5740,7 @@ var CommandPalette = forwardRef28(
|
|
|
5641
5740
|
CommandPalette.displayName = "CommandPalette";
|
|
5642
5741
|
function useCommandPaletteShortcut(toggle, options2 = {}) {
|
|
5643
5742
|
const { skipInputs = true } = options2;
|
|
5644
|
-
|
|
5743
|
+
useEffect8(() => {
|
|
5645
5744
|
const handler = (e) => {
|
|
5646
5745
|
const isMod = e.metaKey || e.ctrlKey;
|
|
5647
5746
|
if (!isMod || e.key.toLowerCase() !== "k") return;
|
|
@@ -5668,7 +5767,7 @@ import {
|
|
|
5668
5767
|
import {
|
|
5669
5768
|
forwardRef as forwardRef29,
|
|
5670
5769
|
useCallback as useCallback9,
|
|
5671
|
-
useEffect as
|
|
5770
|
+
useEffect as useEffect9,
|
|
5672
5771
|
useId as useId12,
|
|
5673
5772
|
useLayoutEffect as useLayoutEffect2,
|
|
5674
5773
|
useMemo as useMemo6,
|
|
@@ -5718,10 +5817,10 @@ function OptionDropdown({
|
|
|
5718
5817
|
(o) => o.label.toLowerCase().includes(q2) || o.value.toLowerCase().includes(q2) || o.description?.toLowerCase().includes(q2)
|
|
5719
5818
|
);
|
|
5720
5819
|
}, [options2, query, showSearch]);
|
|
5721
|
-
|
|
5820
|
+
useEffect9(() => {
|
|
5722
5821
|
setActiveIdx(0);
|
|
5723
5822
|
}, [query, open]);
|
|
5724
|
-
|
|
5823
|
+
useEffect9(() => {
|
|
5725
5824
|
if (!open) return;
|
|
5726
5825
|
const onDoc = (e) => {
|
|
5727
5826
|
const t = e.target;
|
|
@@ -5733,7 +5832,7 @@ function OptionDropdown({
|
|
|
5733
5832
|
document.addEventListener("mousedown", onDoc);
|
|
5734
5833
|
return () => document.removeEventListener("mousedown", onDoc);
|
|
5735
5834
|
}, [open]);
|
|
5736
|
-
|
|
5835
|
+
useEffect9(() => {
|
|
5737
5836
|
if (open && showSearch) {
|
|
5738
5837
|
requestAnimationFrame(() => inputRef.current?.focus());
|
|
5739
5838
|
}
|
|
@@ -6056,7 +6155,7 @@ ConditionBuilder.displayName = "ConditionBuilder";
|
|
|
6056
6155
|
import { CheckmarkIcon as CheckmarkIcon3, ChevronDownIcon as ChevronDownIcon2, CloseIcon as CloseIcon5, SearchIcon as SearchIcon5 } from "@octaviaflow/icons";
|
|
6057
6156
|
import {
|
|
6058
6157
|
useCallback as useCallback10,
|
|
6059
|
-
useEffect as
|
|
6158
|
+
useEffect as useEffect10,
|
|
6060
6159
|
useId as useId13,
|
|
6061
6160
|
useLayoutEffect as useLayoutEffect3,
|
|
6062
6161
|
useMemo as useMemo7,
|
|
@@ -6132,10 +6231,10 @@ function FieldPicker({
|
|
|
6132
6231
|
window.removeEventListener("resize", updatePanelPos);
|
|
6133
6232
|
};
|
|
6134
6233
|
}, [open, updatePanelPos]);
|
|
6135
|
-
|
|
6234
|
+
useEffect10(() => {
|
|
6136
6235
|
if (open && searchable) requestAnimationFrame(() => searchRef.current?.focus());
|
|
6137
6236
|
}, [open, searchable]);
|
|
6138
|
-
|
|
6237
|
+
useEffect10(() => {
|
|
6139
6238
|
if (!open) return;
|
|
6140
6239
|
const onDoc = (e) => {
|
|
6141
6240
|
const t = e.target;
|
|
@@ -6601,7 +6700,7 @@ import { CloseIcon as CloseIcon8 } from "@octaviaflow/icons";
|
|
|
6601
6700
|
import { AnimatePresence as AnimatePresence6, motion as motion8, useReducedMotion as useReducedMotion4 } from "framer-motion";
|
|
6602
6701
|
import {
|
|
6603
6702
|
forwardRef as forwardRef30,
|
|
6604
|
-
useEffect as
|
|
6703
|
+
useEffect as useEffect11,
|
|
6605
6704
|
useRef as useRef13
|
|
6606
6705
|
} from "react";
|
|
6607
6706
|
import { useButton } from "react-aria";
|
|
@@ -6658,7 +6757,7 @@ var ConfigPanel = forwardRef30(
|
|
|
6658
6757
|
};
|
|
6659
6758
|
const reducedMotion = useReducedMotion4();
|
|
6660
6759
|
const offset = reducedMotion ? 0 : side === "right" ? 320 : -320;
|
|
6661
|
-
|
|
6760
|
+
useEffect11(() => {
|
|
6662
6761
|
if (open) {
|
|
6663
6762
|
requestAnimationFrame(() => closeRef.current?.focus());
|
|
6664
6763
|
}
|
|
@@ -6764,7 +6863,7 @@ function stripMotionConflicts(props) {
|
|
|
6764
6863
|
import {
|
|
6765
6864
|
forwardRef as forwardRef32,
|
|
6766
6865
|
useCallback as useCallback11,
|
|
6767
|
-
useEffect as
|
|
6866
|
+
useEffect as useEffect13,
|
|
6768
6867
|
useId as useId15,
|
|
6769
6868
|
useRef as useRef15,
|
|
6770
6869
|
useState as useState19
|
|
@@ -6776,7 +6875,7 @@ import { AnimatePresence as AnimatePresence7, motion as motion9, useReducedMotio
|
|
|
6776
6875
|
import {
|
|
6777
6876
|
forwardRef as forwardRef31,
|
|
6778
6877
|
useId as useId14,
|
|
6779
|
-
useEffect as
|
|
6878
|
+
useEffect as useEffect12,
|
|
6780
6879
|
useImperativeHandle as useImperativeHandle2,
|
|
6781
6880
|
useRef as useRef14
|
|
6782
6881
|
} from "react";
|
|
@@ -6847,7 +6946,7 @@ var DialogContent = forwardRef31(function DialogContent2({
|
|
|
6847
6946
|
const overlayRef = useRef14(null);
|
|
6848
6947
|
const dialogRef = useRef14(null);
|
|
6849
6948
|
useImperativeHandle2(forwardedRef, () => dialogRef.current);
|
|
6850
|
-
|
|
6949
|
+
useEffect12(() => {
|
|
6851
6950
|
if (!open) return;
|
|
6852
6951
|
const portalEl = Array.from(document.body.children).find(
|
|
6853
6952
|
(el) => el.contains(dialogRef.current)
|
|
@@ -6999,7 +7098,7 @@ var ConfirmDialog = forwardRef32(
|
|
|
6999
7098
|
const cancelBtnRef = useRef15(null);
|
|
7000
7099
|
const confirmBtnRef = useRef15(null);
|
|
7001
7100
|
const inputRef = useRef15(null);
|
|
7002
|
-
|
|
7101
|
+
useEffect13(() => {
|
|
7003
7102
|
if (open) {
|
|
7004
7103
|
setTyped("");
|
|
7005
7104
|
setInternalLoading(false);
|
|
@@ -7138,7 +7237,7 @@ import Papa from "papaparse";
|
|
|
7138
7237
|
import {
|
|
7139
7238
|
forwardRef as forwardRef33,
|
|
7140
7239
|
useCallback as useCallback12,
|
|
7141
|
-
useEffect as
|
|
7240
|
+
useEffect as useEffect14,
|
|
7142
7241
|
useId as useId16,
|
|
7143
7242
|
useMemo as useMemo8,
|
|
7144
7243
|
useState as useState20
|
|
@@ -7349,7 +7448,7 @@ function CsvEditBody({
|
|
|
7349
7448
|
onChange?.(next);
|
|
7350
7449
|
validate(next);
|
|
7351
7450
|
};
|
|
7352
|
-
|
|
7451
|
+
useEffect14(() => {
|
|
7353
7452
|
validate(initial);
|
|
7354
7453
|
}, []);
|
|
7355
7454
|
return /* @__PURE__ */ jsxs41("div", { className: "ods-csv-viewer__edit", children: [
|
|
@@ -7386,7 +7485,7 @@ import { AnimatePresence as AnimatePresence8, motion as motion10, useReducedMoti
|
|
|
7386
7485
|
import {
|
|
7387
7486
|
forwardRef as forwardRef34,
|
|
7388
7487
|
useCallback as useCallback13,
|
|
7389
|
-
useEffect as
|
|
7488
|
+
useEffect as useEffect15,
|
|
7390
7489
|
useId as useId17,
|
|
7391
7490
|
useLayoutEffect as useLayoutEffect4,
|
|
7392
7491
|
useRef as useRef16,
|
|
@@ -7472,7 +7571,7 @@ var ContextMenu = forwardRef34(
|
|
|
7472
7571
|
setAdjustedPosition(next);
|
|
7473
7572
|
}
|
|
7474
7573
|
}, [open, position.x, position.y]);
|
|
7475
|
-
|
|
7574
|
+
useEffect15(() => {
|
|
7476
7575
|
if (!open) return;
|
|
7477
7576
|
const closeOnOutside = (e) => {
|
|
7478
7577
|
if (panelRef.current && !panelRef.current.contains(e.target)) {
|
|
@@ -7521,7 +7620,7 @@ var ContextMenu = forwardRef34(
|
|
|
7521
7620
|
}
|
|
7522
7621
|
}
|
|
7523
7622
|
};
|
|
7524
|
-
|
|
7623
|
+
useEffect15(() => {
|
|
7525
7624
|
if (open) panelRef.current?.focus();
|
|
7526
7625
|
}, [open]);
|
|
7527
7626
|
const handleItemClick = (item) => {
|
|
@@ -7635,7 +7734,7 @@ ContextMenu.displayName = "ContextMenu";
|
|
|
7635
7734
|
import {
|
|
7636
7735
|
forwardRef as forwardRef35,
|
|
7637
7736
|
useCallback as useCallback14,
|
|
7638
|
-
useEffect as
|
|
7737
|
+
useEffect as useEffect16,
|
|
7639
7738
|
useImperativeHandle as useImperativeHandle3,
|
|
7640
7739
|
useMemo as useMemo9,
|
|
7641
7740
|
useRef as useRef17,
|
|
@@ -8010,7 +8109,7 @@ var DataMapper = forwardRef35(
|
|
|
8010
8109
|
const editorRef = useRef17(null);
|
|
8011
8110
|
const rootRef = useRef17(null);
|
|
8012
8111
|
useImperativeHandle3(forwardedRef, () => rootRef.current);
|
|
8013
|
-
|
|
8112
|
+
useEffect16(() => {
|
|
8014
8113
|
if (!selectedTarget) return;
|
|
8015
8114
|
const handler = (e) => {
|
|
8016
8115
|
const root = rootRef.current;
|
|
@@ -8029,7 +8128,7 @@ var DataMapper = forwardRef35(
|
|
|
8029
8128
|
document.addEventListener("mousedown", handler);
|
|
8030
8129
|
return () => document.removeEventListener("mousedown", handler);
|
|
8031
8130
|
}, [selectedTarget]);
|
|
8032
|
-
|
|
8131
|
+
useEffect16(() => {
|
|
8033
8132
|
if (!defaultGroupsExpanded) return;
|
|
8034
8133
|
const fresh = collectGroupKeys(targetFields).filter(
|
|
8035
8134
|
(k) => !appliedGroupKeysRef.current.has(k)
|
|
@@ -8042,7 +8141,7 @@ var DataMapper = forwardRef35(
|
|
|
8042
8141
|
});
|
|
8043
8142
|
fresh.forEach((k) => appliedGroupKeysRef.current.add(k));
|
|
8044
8143
|
}, [targetFields, defaultGroupsExpanded]);
|
|
8045
|
-
|
|
8144
|
+
useEffect16(() => {
|
|
8046
8145
|
if (!settingsOpen) return;
|
|
8047
8146
|
const onDown = (e) => {
|
|
8048
8147
|
const target = e.target;
|
|
@@ -8870,7 +8969,7 @@ function ExpressionEditor({
|
|
|
8870
8969
|
}) {
|
|
8871
8970
|
const lastEmittedRef = useRef17(value);
|
|
8872
8971
|
const isMountedRef = useRef17(false);
|
|
8873
|
-
|
|
8972
|
+
useEffect16(() => {
|
|
8874
8973
|
const el = editorRef.current;
|
|
8875
8974
|
if (!el || isMountedRef.current) return;
|
|
8876
8975
|
isMountedRef.current = true;
|
|
@@ -8884,7 +8983,7 @@ function ExpressionEditor({
|
|
|
8884
8983
|
sel?.addRange(range);
|
|
8885
8984
|
el.focus();
|
|
8886
8985
|
}, []);
|
|
8887
|
-
|
|
8986
|
+
useEffect16(() => {
|
|
8888
8987
|
const el = editorRef.current;
|
|
8889
8988
|
if (!el || !isMountedRef.current) return;
|
|
8890
8989
|
if (value === lastEmittedRef.current) return;
|
|
@@ -9300,7 +9399,7 @@ import {
|
|
|
9300
9399
|
} from "@octaviaflow/icons";
|
|
9301
9400
|
import {
|
|
9302
9401
|
useCallback as useCallback15,
|
|
9303
|
-
useEffect as
|
|
9402
|
+
useEffect as useEffect17,
|
|
9304
9403
|
useLayoutEffect as useLayoutEffect5,
|
|
9305
9404
|
useMemo as useMemo10,
|
|
9306
9405
|
useRef as useRef18,
|
|
@@ -9343,7 +9442,7 @@ function PortalMenu({
|
|
|
9343
9442
|
window.removeEventListener("scroll", update, true);
|
|
9344
9443
|
};
|
|
9345
9444
|
}, [open, triggerRef]);
|
|
9346
|
-
|
|
9445
|
+
useEffect17(() => {
|
|
9347
9446
|
if (!open) return;
|
|
9348
9447
|
const onPointer = (e) => {
|
|
9349
9448
|
const target = e.target;
|
|
@@ -9656,7 +9755,7 @@ function DataTable(props) {
|
|
|
9656
9755
|
const [internalPage, setInternalPage] = useState23(1);
|
|
9657
9756
|
const [internalPageSize, setInternalPageSize] = useState23(pgCfg?.pageSize ?? 10);
|
|
9658
9757
|
const page = pgCfg?.page ?? internalPage;
|
|
9659
|
-
|
|
9758
|
+
useEffect17(() => {
|
|
9660
9759
|
if (pgCfg?.pageSize !== void 0 && pgCfg.pageSize !== internalPageSize) {
|
|
9661
9760
|
setInternalPageSize(pgCfg.pageSize);
|
|
9662
9761
|
}
|
|
@@ -9729,7 +9828,7 @@ function DataTable(props) {
|
|
|
9729
9828
|
const start = (page - 1) * pageSize;
|
|
9730
9829
|
return processed.slice(start, start + pageSize);
|
|
9731
9830
|
}, [pgCfg, processed, page, pageSize]);
|
|
9732
|
-
|
|
9831
|
+
useEffect17(() => {
|
|
9733
9832
|
setPage(1);
|
|
9734
9833
|
}, [q2, JSON.stringify(filterValues), sortKey, sortDir]);
|
|
9735
9834
|
const handleSort = (key) => {
|
|
@@ -10309,7 +10408,7 @@ function ChevronRightSmall() {
|
|
|
10309
10408
|
import { CalendarIcon, ChevronDownIcon as ChevronDownIcon4 } from "@octaviaflow/icons";
|
|
10310
10409
|
import {
|
|
10311
10410
|
forwardRef as forwardRef37,
|
|
10312
|
-
useEffect as
|
|
10411
|
+
useEffect as useEffect19,
|
|
10313
10412
|
useId as useId19,
|
|
10314
10413
|
useImperativeHandle as useImperativeHandle4,
|
|
10315
10414
|
useRef as useRef19,
|
|
@@ -10320,11 +10419,11 @@ import { createPortal as createPortal8 } from "react-dom";
|
|
|
10320
10419
|
// src/utils/useAnchoredPopover.ts
|
|
10321
10420
|
import {
|
|
10322
10421
|
useCallback as useCallback16,
|
|
10323
|
-
useEffect as
|
|
10422
|
+
useEffect as useEffect18,
|
|
10324
10423
|
useLayoutEffect as useLayoutEffect6,
|
|
10325
10424
|
useState as useState24
|
|
10326
10425
|
} from "react";
|
|
10327
|
-
var useIsomorphicLayoutEffect = typeof document !== "undefined" ? useLayoutEffect6 :
|
|
10426
|
+
var useIsomorphicLayoutEffect = typeof document !== "undefined" ? useLayoutEffect6 : useEffect18;
|
|
10328
10427
|
function computeAnchoredPosition({
|
|
10329
10428
|
anchor,
|
|
10330
10429
|
viewport,
|
|
@@ -10457,7 +10556,7 @@ var DatePicker = forwardRef37(
|
|
|
10457
10556
|
const baseId = id ?? `ods-dp-${reactId}`;
|
|
10458
10557
|
const helperId = error || helperText ? `${baseId}-helper` : void 0;
|
|
10459
10558
|
const ariaLabelForDialog = popoverAriaLabel ?? (typeof label === "string" ? `${label} calendar` : "Date picker");
|
|
10460
|
-
|
|
10559
|
+
useEffect19(() => {
|
|
10461
10560
|
if (!open) return;
|
|
10462
10561
|
const onDoc = (e) => {
|
|
10463
10562
|
const target = e.target;
|
|
@@ -10887,7 +10986,7 @@ Drawer.displayName = "Drawer";
|
|
|
10887
10986
|
|
|
10888
10987
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
10889
10988
|
import { AnimatePresence as AnimatePresence9, motion as motion12 } from "framer-motion";
|
|
10890
|
-
import { useEffect as
|
|
10989
|
+
import { useEffect as useEffect20, useMemo as useMemo12, useRef as useRef20 } from "react";
|
|
10891
10990
|
import { useButton as useButton2, useMenu, useMenuItem, useMenuTrigger } from "react-aria";
|
|
10892
10991
|
import { createPortal as createPortal9 } from "react-dom";
|
|
10893
10992
|
import { Fragment as Fragment21, jsx as jsx50, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
@@ -10925,7 +11024,7 @@ function MenuPopup({
|
|
|
10925
11024
|
ariaNameProps
|
|
10926
11025
|
}) {
|
|
10927
11026
|
const menuRef = useRef20(null);
|
|
10928
|
-
|
|
11027
|
+
useEffect20(() => {
|
|
10929
11028
|
if (!state.isOpen || !closeOnOutsideClick) return;
|
|
10930
11029
|
const handler = (e) => {
|
|
10931
11030
|
const target = e.target;
|
|
@@ -10939,7 +11038,7 @@ function MenuPopup({
|
|
|
10939
11038
|
document.addEventListener("mousedown", handler, true);
|
|
10940
11039
|
return () => document.removeEventListener("mousedown", handler, true);
|
|
10941
11040
|
}, [state.isOpen, closeOnOutsideClick]);
|
|
10942
|
-
|
|
11041
|
+
useEffect20(() => {
|
|
10943
11042
|
if (!state.isOpen || !closeOnEscape) return;
|
|
10944
11043
|
const handler = (e) => {
|
|
10945
11044
|
if (e.key === "Escape") {
|
|
@@ -11150,7 +11249,7 @@ EmptyState.displayName = "EmptyState";
|
|
|
11150
11249
|
|
|
11151
11250
|
// src/components/ExecutionConsole/ExecutionConsole.tsx
|
|
11152
11251
|
import { motion as motion13 } from "framer-motion";
|
|
11153
|
-
import { useEffect as
|
|
11252
|
+
import { useEffect as useEffect21, useMemo as useMemo13, useRef as useRef21, useState as useState26 } from "react";
|
|
11154
11253
|
import { Fragment as Fragment22, jsx as jsx52, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
11155
11254
|
var iconProps = {
|
|
11156
11255
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -11252,13 +11351,13 @@ function ExecutionConsole({
|
|
|
11252
11351
|
});
|
|
11253
11352
|
}, [logs, query, activeLevels, activeNode]);
|
|
11254
11353
|
const prevRunningRef = useRef21(running);
|
|
11255
|
-
|
|
11354
|
+
useEffect21(() => {
|
|
11256
11355
|
if (prevRunningRef.current !== running) {
|
|
11257
11356
|
setAutoScroll(running);
|
|
11258
11357
|
prevRunningRef.current = running;
|
|
11259
11358
|
}
|
|
11260
11359
|
}, [running]);
|
|
11261
|
-
|
|
11360
|
+
useEffect21(() => {
|
|
11262
11361
|
if (!open || !autoScroll) return;
|
|
11263
11362
|
const el = logEndRef.current;
|
|
11264
11363
|
if (el && typeof el.scrollIntoView === "function") {
|
|
@@ -11748,7 +11847,7 @@ import {
|
|
|
11748
11847
|
import {
|
|
11749
11848
|
forwardRef as forwardRef43,
|
|
11750
11849
|
useCallback as useCallback17,
|
|
11751
|
-
useEffect as
|
|
11850
|
+
useEffect as useEffect22,
|
|
11752
11851
|
useId as useId22,
|
|
11753
11852
|
useImperativeHandle as useImperativeHandle5,
|
|
11754
11853
|
useRef as useRef22,
|
|
@@ -11921,7 +12020,7 @@ var FileDropzone = forwardRef43(
|
|
|
11921
12020
|
},
|
|
11922
12021
|
[disabled, onFiles, validate]
|
|
11923
12022
|
);
|
|
11924
|
-
|
|
12023
|
+
useEffect22(() => {
|
|
11925
12024
|
if (!files) return;
|
|
11926
12025
|
const next = {};
|
|
11927
12026
|
const created = [];
|
|
@@ -11938,7 +12037,7 @@ var FileDropzone = forwardRef43(
|
|
|
11938
12037
|
for (const u of created) URL.revokeObjectURL(u);
|
|
11939
12038
|
};
|
|
11940
12039
|
}, [files]);
|
|
11941
|
-
|
|
12040
|
+
useEffect22(() => {
|
|
11942
12041
|
if (!pasteEnabled || disabled) return;
|
|
11943
12042
|
const onPaste = (e) => {
|
|
11944
12043
|
const active = document.activeElement;
|
|
@@ -12204,7 +12303,7 @@ import {
|
|
|
12204
12303
|
} from "@octaviaflow/icons";
|
|
12205
12304
|
import {
|
|
12206
12305
|
useCallback as useCallback22,
|
|
12207
|
-
useEffect as
|
|
12306
|
+
useEffect as useEffect26,
|
|
12208
12307
|
useMemo as useMemo19,
|
|
12209
12308
|
useRef as useRef23,
|
|
12210
12309
|
useState as useState32
|
|
@@ -12773,7 +12872,7 @@ import { XMLValidator } from "fast-xml-parser";
|
|
|
12773
12872
|
import {
|
|
12774
12873
|
forwardRef as forwardRef45,
|
|
12775
12874
|
useCallback as useCallback19,
|
|
12776
|
-
useEffect as
|
|
12875
|
+
useEffect as useEffect23,
|
|
12777
12876
|
useId as useId23,
|
|
12778
12877
|
useMemo as useMemo15,
|
|
12779
12878
|
useState as useState29
|
|
@@ -12930,7 +13029,7 @@ function XmlEditBody({ text: initial, onChange, onValidate }) {
|
|
|
12930
13029
|
onChange?.(next);
|
|
12931
13030
|
validate(next);
|
|
12932
13031
|
};
|
|
12933
|
-
|
|
13032
|
+
useEffect23(() => {
|
|
12934
13033
|
validate(initial);
|
|
12935
13034
|
}, []);
|
|
12936
13035
|
return /* @__PURE__ */ jsxs56("div", { className: "ods-xml-viewer__edit", children: [
|
|
@@ -13159,7 +13258,7 @@ import {
|
|
|
13159
13258
|
import {
|
|
13160
13259
|
forwardRef as forwardRef46,
|
|
13161
13260
|
useCallback as useCallback20,
|
|
13162
|
-
useEffect as
|
|
13261
|
+
useEffect as useEffect24,
|
|
13163
13262
|
useId as useId24,
|
|
13164
13263
|
useMemo as useMemo16,
|
|
13165
13264
|
useState as useState30
|
|
@@ -13534,7 +13633,7 @@ function YamlEditBody({ text: initial, onChange, onValidate }) {
|
|
|
13534
13633
|
onChange?.(next);
|
|
13535
13634
|
validate(next);
|
|
13536
13635
|
};
|
|
13537
|
-
|
|
13636
|
+
useEffect24(() => {
|
|
13538
13637
|
validate(initial);
|
|
13539
13638
|
}, []);
|
|
13540
13639
|
return /* @__PURE__ */ jsxs57("div", { className: "ods-yaml-viewer__edit", children: [
|
|
@@ -13746,7 +13845,7 @@ import { motion as motion14, useReducedMotion as useReducedMotion7 } from "frame
|
|
|
13746
13845
|
import {
|
|
13747
13846
|
forwardRef as forwardRef47,
|
|
13748
13847
|
useCallback as useCallback21,
|
|
13749
|
-
useEffect as
|
|
13848
|
+
useEffect as useEffect25,
|
|
13750
13849
|
useId as useId25,
|
|
13751
13850
|
useMemo as useMemo18,
|
|
13752
13851
|
useState as useState31
|
|
@@ -14018,7 +14117,7 @@ var TreeView = forwardRef47(
|
|
|
14018
14117
|
);
|
|
14019
14118
|
};
|
|
14020
14119
|
const visibleIdxCursor = { value: 0 };
|
|
14021
|
-
|
|
14120
|
+
useEffect25(() => {
|
|
14022
14121
|
}, [tabStopId]);
|
|
14023
14122
|
return /* @__PURE__ */ jsx60(
|
|
14024
14123
|
"ul",
|
|
@@ -14102,7 +14201,7 @@ function FileBrowser({
|
|
|
14102
14201
|
},
|
|
14103
14202
|
[loadChildren]
|
|
14104
14203
|
);
|
|
14105
|
-
|
|
14204
|
+
useEffect26(() => {
|
|
14106
14205
|
void loadFolder(currentPath);
|
|
14107
14206
|
}, [currentPath, loadFolder]);
|
|
14108
14207
|
const navigate = useCallback22(
|
|
@@ -14365,7 +14464,7 @@ import {
|
|
|
14365
14464
|
} from "@octaviaflow/icons";
|
|
14366
14465
|
import {
|
|
14367
14466
|
useCallback as useCallback23,
|
|
14368
|
-
useEffect as
|
|
14467
|
+
useEffect as useEffect27,
|
|
14369
14468
|
useId as useId26,
|
|
14370
14469
|
useMemo as useMemo20,
|
|
14371
14470
|
useRef as useRef24,
|
|
@@ -14528,7 +14627,7 @@ function FilePicker({
|
|
|
14528
14627
|
},
|
|
14529
14628
|
[loadFolder, searchDepth, searchLimit]
|
|
14530
14629
|
);
|
|
14531
|
-
|
|
14630
|
+
useEffect27(() => {
|
|
14532
14631
|
if (!searchable || !open) return;
|
|
14533
14632
|
const q2 = query.trim();
|
|
14534
14633
|
if (!q2) {
|
|
@@ -14573,7 +14672,7 @@ function FilePicker({
|
|
|
14573
14672
|
},
|
|
14574
14673
|
[navigate, canSelectFiles, commit]
|
|
14575
14674
|
);
|
|
14576
|
-
|
|
14675
|
+
useEffect27(() => {
|
|
14577
14676
|
if (!open) return;
|
|
14578
14677
|
const onDoc = (e) => {
|
|
14579
14678
|
const t = e.target;
|
|
@@ -14594,7 +14693,7 @@ function FilePicker({
|
|
|
14594
14693
|
document.removeEventListener("keydown", onKey);
|
|
14595
14694
|
};
|
|
14596
14695
|
}, [open, closeOnEsc]);
|
|
14597
|
-
|
|
14696
|
+
useEffect27(() => {
|
|
14598
14697
|
if (open && searchable) searchRef.current?.focus();
|
|
14599
14698
|
}, [open, searchable]);
|
|
14600
14699
|
const folderState = cache[navPath];
|
|
@@ -15049,7 +15148,7 @@ import { motion as motion15 } from "framer-motion";
|
|
|
15049
15148
|
import {
|
|
15050
15149
|
forwardRef as forwardRef48,
|
|
15051
15150
|
useCallback as useCallback24,
|
|
15052
|
-
useEffect as
|
|
15151
|
+
useEffect as useEffect28,
|
|
15053
15152
|
useRef as useRef25,
|
|
15054
15153
|
useState as useState35
|
|
15055
15154
|
} from "react";
|
|
@@ -15165,7 +15264,7 @@ var FlowNode = forwardRef48(function FlowNode2({
|
|
|
15165
15264
|
},
|
|
15166
15265
|
[isLockMode]
|
|
15167
15266
|
);
|
|
15168
|
-
|
|
15267
|
+
useEffect28(() => {
|
|
15169
15268
|
if (!isDragging) return;
|
|
15170
15269
|
const applyDelta = (clientX, clientY) => {
|
|
15171
15270
|
const start = dragStartRef.current;
|
|
@@ -15718,7 +15817,7 @@ function FlowDoctor({
|
|
|
15718
15817
|
import {
|
|
15719
15818
|
useCallback as useCallback26,
|
|
15720
15819
|
useContext,
|
|
15721
|
-
useEffect as
|
|
15820
|
+
useEffect as useEffect29,
|
|
15722
15821
|
useMemo as useMemo21,
|
|
15723
15822
|
useRef as useRef27,
|
|
15724
15823
|
useState as useState36,
|
|
@@ -15753,7 +15852,7 @@ function FlowMinimap(props) {
|
|
|
15753
15852
|
);
|
|
15754
15853
|
const liveSnapshot = useSyncExternalStore(sub, snap, snap);
|
|
15755
15854
|
const [registryVersion, setRegistryVersion] = useState36(0);
|
|
15756
|
-
|
|
15855
|
+
useEffect29(() => {
|
|
15757
15856
|
if (!handleRegistry) return;
|
|
15758
15857
|
return handleRegistry.subscribe(() => setRegistryVersion((v) => v + 1));
|
|
15759
15858
|
}, [handleRegistry]);
|
|
@@ -15806,7 +15905,7 @@ function FlowMinimap(props) {
|
|
|
15806
15905
|
}, [edgesProp, liveSnapshot, handleRegistry, registryVersion]);
|
|
15807
15906
|
const minimapRef = useRef27(null);
|
|
15808
15907
|
const [canvasSize, setCanvasSize] = useState36(null);
|
|
15809
|
-
|
|
15908
|
+
useEffect29(() => {
|
|
15810
15909
|
if (!liveSnapshot) return;
|
|
15811
15910
|
const el = minimapRef.current?.closest(".ods-flow-canvas-v2");
|
|
15812
15911
|
if (!el) return;
|
|
@@ -16027,7 +16126,7 @@ function FlowMinimap(props) {
|
|
|
16027
16126
|
},
|
|
16028
16127
|
[zoomOnScroll, instance, liveSnapshot, canvasSize, pointToWorld, clampWorldTopLeft]
|
|
16029
16128
|
);
|
|
16030
|
-
|
|
16129
|
+
useEffect29(
|
|
16031
16130
|
() => () => {
|
|
16032
16131
|
dragRef.current.dragging = false;
|
|
16033
16132
|
},
|
|
@@ -16126,10 +16225,10 @@ import {
|
|
|
16126
16225
|
ZoomInIcon,
|
|
16127
16226
|
ZoomOutIcon
|
|
16128
16227
|
} from "@octaviaflow/icons";
|
|
16129
|
-
import { useEffect as
|
|
16228
|
+
import { useEffect as useEffect31, useRef as useRef29, useState as useState38 } from "react";
|
|
16130
16229
|
|
|
16131
16230
|
// src/components/HoverCard/HoverCard.tsx
|
|
16132
|
-
import { useCallback as useCallback27, useEffect as
|
|
16231
|
+
import { useCallback as useCallback27, useEffect as useEffect30, useLayoutEffect as useLayoutEffect7, useRef as useRef28, useState as useState37 } from "react";
|
|
16133
16232
|
import { createPortal as createPortal11 } from "react-dom";
|
|
16134
16233
|
import { Fragment as Fragment27, jsx as jsx68, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
16135
16234
|
function computePosition2(rect, panelRect, placement, offset) {
|
|
@@ -16171,7 +16270,7 @@ function HoverCard({
|
|
|
16171
16270
|
closeTimer.current = null;
|
|
16172
16271
|
}
|
|
16173
16272
|
};
|
|
16174
|
-
|
|
16273
|
+
useEffect30(() => () => clearTimers(), []);
|
|
16175
16274
|
const show = () => {
|
|
16176
16275
|
clearTimers();
|
|
16177
16276
|
openTimer.current = setTimeout(() => setOpen(true), openDelay);
|
|
@@ -16192,7 +16291,7 @@ function HoverCard({
|
|
|
16192
16291
|
const id = requestAnimationFrame(reposition);
|
|
16193
16292
|
return () => cancelAnimationFrame(id);
|
|
16194
16293
|
}, [open, reposition]);
|
|
16195
|
-
|
|
16294
|
+
useEffect30(() => {
|
|
16196
16295
|
if (!open) return;
|
|
16197
16296
|
const h = () => reposition();
|
|
16198
16297
|
window.addEventListener("scroll", h, true);
|
|
@@ -16341,7 +16440,7 @@ function FlowToolbarSave({
|
|
|
16341
16440
|
const [inferred, setInferred] = useState38("idle");
|
|
16342
16441
|
const prevSavedAt = useRef29(lastSavedAt);
|
|
16343
16442
|
const prevLoading = useRef29(loading);
|
|
16344
|
-
|
|
16443
|
+
useEffect31(() => {
|
|
16345
16444
|
if (state !== void 0) return;
|
|
16346
16445
|
if (error) {
|
|
16347
16446
|
setInferred("error");
|
|
@@ -17808,7 +17907,7 @@ import { AnimatePresence as AnimatePresence12, motion as motion18 } from "framer
|
|
|
17808
17907
|
import {
|
|
17809
17908
|
forwardRef as forwardRef56,
|
|
17810
17909
|
useCallback as useCallback29,
|
|
17811
|
-
useEffect as
|
|
17910
|
+
useEffect as useEffect32,
|
|
17812
17911
|
useId as useId33,
|
|
17813
17912
|
useMemo as useMemo24,
|
|
17814
17913
|
useRef as useRef30,
|
|
@@ -17992,7 +18091,7 @@ var LineChart = forwardRef56(
|
|
|
17992
18091
|
},
|
|
17993
18092
|
[zoomable]
|
|
17994
18093
|
);
|
|
17995
|
-
|
|
18094
|
+
useEffect32(() => {
|
|
17996
18095
|
if (!brush) return;
|
|
17997
18096
|
const onUp = () => {
|
|
17998
18097
|
const a = Math.min(brush.startPct, brush.currentPct);
|
|
@@ -18428,7 +18527,7 @@ LinkButton.displayName = "LinkButton";
|
|
|
18428
18527
|
import { AddIcon as AddIcon5, CodeIcon as CodeIcon4, CopyIcon as CopyIcon5, DataConnectedIcon, TrashCanIcon as TrashCanIcon2 } from "@octaviaflow/icons";
|
|
18429
18528
|
import {
|
|
18430
18529
|
useCallback as useCallback31,
|
|
18431
|
-
useEffect as
|
|
18530
|
+
useEffect as useEffect36,
|
|
18432
18531
|
useMemo as useMemo26,
|
|
18433
18532
|
useRef as useRef33,
|
|
18434
18533
|
useState as useState44
|
|
@@ -18438,7 +18537,7 @@ import {
|
|
|
18438
18537
|
import {
|
|
18439
18538
|
forwardRef as forwardRef58,
|
|
18440
18539
|
useCallback as useCallback30,
|
|
18441
|
-
useEffect as
|
|
18540
|
+
useEffect as useEffect33,
|
|
18442
18541
|
useRef as useRef31,
|
|
18443
18542
|
useState as useState41
|
|
18444
18543
|
} from "react";
|
|
@@ -18523,7 +18622,7 @@ function Sortable({
|
|
|
18523
18622
|
},
|
|
18524
18623
|
[items, onChange]
|
|
18525
18624
|
);
|
|
18526
|
-
|
|
18625
|
+
useEffect33(() => {
|
|
18527
18626
|
if (!autoScroll || !draggingId) return;
|
|
18528
18627
|
const container = containerRef.current;
|
|
18529
18628
|
if (!container) return;
|
|
@@ -18573,7 +18672,7 @@ function Sortable({
|
|
|
18573
18672
|
}
|
|
18574
18673
|
};
|
|
18575
18674
|
}, [autoScroll, autoScrollEdge, draggingId, isVertical]);
|
|
18576
|
-
|
|
18675
|
+
useEffect33(() => {
|
|
18577
18676
|
if (!draggingId) return;
|
|
18578
18677
|
const onKey = (e) => {
|
|
18579
18678
|
if (e.key === "Escape") cancelDrag();
|
|
@@ -18727,7 +18826,7 @@ DragHandle.displayName = "DragHandle";
|
|
|
18727
18826
|
|
|
18728
18827
|
// src/components/MessageBlockBuilder/BlockFieldsEditor.tsx
|
|
18729
18828
|
import { AddIcon as AddIcon4, ArrowDownIcon as ArrowDownIcon2, ArrowUpIcon as ArrowUpIcon2, TrashCanIcon } from "@octaviaflow/icons";
|
|
18730
|
-
import { useEffect as
|
|
18829
|
+
import { useEffect as useEffect34, useRef as useRef32, useState as useState42 } from "react";
|
|
18731
18830
|
|
|
18732
18831
|
// src/components/MessageBlockBuilder/internal.ts
|
|
18733
18832
|
var BLOCK_DRAG_MIME = "application/x-ods-message-block";
|
|
@@ -18908,7 +19007,7 @@ function TextLikeField({ spec, fieldId, value, onChange, tokenRegistry }) {
|
|
|
18908
19007
|
const end = el?.selectionEnd ?? start;
|
|
18909
19008
|
onChange(`${value.slice(0, start)}${token}${value.slice(end)}`);
|
|
18910
19009
|
};
|
|
18911
|
-
|
|
19010
|
+
useEffect34(() => {
|
|
18912
19011
|
if (!isActive2 || !tokenRegistry) return;
|
|
18913
19012
|
tokenRegistry.registerInsert(fieldId, insertAtCaret);
|
|
18914
19013
|
});
|
|
@@ -21656,7 +21755,7 @@ var messagePlatformAdapters = {
|
|
|
21656
21755
|
|
|
21657
21756
|
// src/components/MessageBlockBuilder/TokenPanel.tsx
|
|
21658
21757
|
import { CloseIcon as CloseIcon14 } from "@octaviaflow/icons";
|
|
21659
|
-
import { useEffect as
|
|
21758
|
+
import { useEffect as useEffect35, useMemo as useMemo25, useState as useState43 } from "react";
|
|
21660
21759
|
import { Fragment as Fragment33, jsx as jsx84, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
21661
21760
|
function TokenPanel({
|
|
21662
21761
|
tokenGroups,
|
|
@@ -21670,7 +21769,7 @@ function TokenPanel({
|
|
|
21670
21769
|
}) {
|
|
21671
21770
|
const [query, setQuery] = useState43("");
|
|
21672
21771
|
const [hintFlash, setHintFlash] = useState43(false);
|
|
21673
|
-
|
|
21772
|
+
useEffect35(() => {
|
|
21674
21773
|
if (!hintFlash) return;
|
|
21675
21774
|
const timer = setTimeout(() => setHintFlash(false), 1400);
|
|
21676
21775
|
return () => clearTimeout(timer);
|
|
@@ -21827,7 +21926,7 @@ function MessageBlockBuilder({
|
|
|
21827
21926
|
}
|
|
21828
21927
|
};
|
|
21829
21928
|
}, [hasTokens, activeField]);
|
|
21830
|
-
|
|
21929
|
+
useEffect36(() => {
|
|
21831
21930
|
if (!open) {
|
|
21832
21931
|
initializedFor.current = /* @__PURE__ */ Symbol("never");
|
|
21833
21932
|
return;
|
|
@@ -22938,7 +23037,7 @@ import { AnimatePresence as AnimatePresence13, motion as motion20 } from "framer
|
|
|
22938
23037
|
import {
|
|
22939
23038
|
forwardRef as forwardRef61,
|
|
22940
23039
|
useCallback as useCallback32,
|
|
22941
|
-
useEffect as
|
|
23040
|
+
useEffect as useEffect37,
|
|
22942
23041
|
useId as useId36,
|
|
22943
23042
|
useLayoutEffect as useLayoutEffect8,
|
|
22944
23043
|
useMemo as useMemo28,
|
|
@@ -23037,7 +23136,7 @@ var MultiSelect = forwardRef61(
|
|
|
23037
23136
|
width: rect.width
|
|
23038
23137
|
});
|
|
23039
23138
|
}, []);
|
|
23040
|
-
|
|
23139
|
+
useEffect37(() => {
|
|
23041
23140
|
if (!open) return;
|
|
23042
23141
|
updatePosition();
|
|
23043
23142
|
window.addEventListener("scroll", updatePosition, true);
|
|
@@ -23047,7 +23146,7 @@ var MultiSelect = forwardRef61(
|
|
|
23047
23146
|
window.removeEventListener("resize", updatePosition);
|
|
23048
23147
|
};
|
|
23049
23148
|
}, [open, updatePosition]);
|
|
23050
|
-
|
|
23149
|
+
useEffect37(() => {
|
|
23051
23150
|
if (!open) return;
|
|
23052
23151
|
const onDoc = (e) => {
|
|
23053
23152
|
const t = e.target;
|
|
@@ -23059,12 +23158,12 @@ var MultiSelect = forwardRef61(
|
|
|
23059
23158
|
document.addEventListener("mousedown", onDoc);
|
|
23060
23159
|
return () => document.removeEventListener("mousedown", onDoc);
|
|
23061
23160
|
}, [open]);
|
|
23062
|
-
|
|
23161
|
+
useEffect37(() => {
|
|
23063
23162
|
if (open && showSearch) {
|
|
23064
23163
|
requestAnimationFrame(() => searchRef.current?.focus());
|
|
23065
23164
|
}
|
|
23066
23165
|
}, [open, showSearch]);
|
|
23067
|
-
|
|
23166
|
+
useEffect37(() => setActiveIdx(0), [query, open]);
|
|
23068
23167
|
const [fitCount, setFitCount] = useState45(selectedValues.length);
|
|
23069
23168
|
const [tick, setTick] = useState45(0);
|
|
23070
23169
|
useLayoutEffect8(() => {
|
|
@@ -23094,7 +23193,7 @@ var MultiSelect = forwardRef61(
|
|
|
23094
23193
|
count = Math.max(1, count - 1);
|
|
23095
23194
|
setFitCount(count);
|
|
23096
23195
|
}, [tick, selectedValues, maxVisibleTags]);
|
|
23097
|
-
|
|
23196
|
+
useEffect37(() => {
|
|
23098
23197
|
if (typeof ResizeObserver === "undefined") return;
|
|
23099
23198
|
const row = tagsRowRef.current;
|
|
23100
23199
|
if (!row) return;
|
|
@@ -23972,7 +24071,7 @@ Pagination.displayName = "Pagination";
|
|
|
23972
24071
|
import {
|
|
23973
24072
|
forwardRef as forwardRef64,
|
|
23974
24073
|
useCallback as useCallback35,
|
|
23975
|
-
useEffect as
|
|
24074
|
+
useEffect as useEffect38,
|
|
23976
24075
|
useId as useId39,
|
|
23977
24076
|
useRef as useRef36,
|
|
23978
24077
|
useState as useState47
|
|
@@ -24035,7 +24134,7 @@ var PhoneInput = forwardRef64(
|
|
|
24035
24134
|
(c) => c.name.toLowerCase().includes(q2) || c.dialCode.includes(q2) || c.code.toLowerCase().includes(q2)
|
|
24036
24135
|
);
|
|
24037
24136
|
})();
|
|
24038
|
-
|
|
24137
|
+
useEffect38(() => {
|
|
24039
24138
|
if (!open) return;
|
|
24040
24139
|
const onDocMouseDown = (e) => {
|
|
24041
24140
|
const t = e.target;
|
|
@@ -24053,7 +24152,7 @@ var PhoneInput = forwardRef64(
|
|
|
24053
24152
|
document.removeEventListener("keydown", onDocKey);
|
|
24054
24153
|
};
|
|
24055
24154
|
}, [open]);
|
|
24056
|
-
|
|
24155
|
+
useEffect38(() => {
|
|
24057
24156
|
if (!open) {
|
|
24058
24157
|
setQuery("");
|
|
24059
24158
|
return;
|
|
@@ -24061,7 +24160,7 @@ var PhoneInput = forwardRef64(
|
|
|
24061
24160
|
const idx = countries.findIndex((c) => c.code === country.code);
|
|
24062
24161
|
setActiveIdx(idx === -1 ? 0 : idx);
|
|
24063
24162
|
}, [open, countries, country.code]);
|
|
24064
|
-
|
|
24163
|
+
useEffect38(() => {
|
|
24065
24164
|
setActiveIdx(0);
|
|
24066
24165
|
}, [query]);
|
|
24067
24166
|
const handleTriggerKey = useCallback35(
|
|
@@ -24101,7 +24200,7 @@ var PhoneInput = forwardRef64(
|
|
|
24101
24200
|
},
|
|
24102
24201
|
[filteredCountries, activeIdx, onCountryChange]
|
|
24103
24202
|
);
|
|
24104
|
-
|
|
24203
|
+
useEffect38(() => {
|
|
24105
24204
|
if (!open) return;
|
|
24106
24205
|
if (showSearch) searchRef.current?.focus();
|
|
24107
24206
|
else listRef.current?.focus();
|
|
@@ -25162,7 +25261,7 @@ var PlanPicker = forwardRef67(
|
|
|
25162
25261
|
PlanPicker.displayName = "PlanPicker";
|
|
25163
25262
|
|
|
25164
25263
|
// src/components/Popover/Popover.tsx
|
|
25165
|
-
import { useCallback as useCallback36, useEffect as
|
|
25264
|
+
import { useCallback as useCallback36, useEffect as useEffect39, useLayoutEffect as useLayoutEffect9, useRef as useRef37, useState as useState48 } from "react";
|
|
25166
25265
|
import { createPortal as createPortal13 } from "react-dom";
|
|
25167
25266
|
import { Fragment as Fragment40, jsx as jsx96, jsxs as jsxs93 } from "react/jsx-runtime";
|
|
25168
25267
|
function computePosition3(rect, popRect, placement, offset) {
|
|
@@ -25218,7 +25317,7 @@ function Popover({
|
|
|
25218
25317
|
const id = requestAnimationFrame(reposition);
|
|
25219
25318
|
return () => cancelAnimationFrame(id);
|
|
25220
25319
|
}, [open, reposition, content]);
|
|
25221
|
-
|
|
25320
|
+
useEffect39(() => {
|
|
25222
25321
|
if (!open) return;
|
|
25223
25322
|
const onScroll = () => reposition();
|
|
25224
25323
|
window.addEventListener("scroll", onScroll, true);
|
|
@@ -25228,7 +25327,7 @@ function Popover({
|
|
|
25228
25327
|
window.removeEventListener("resize", onScroll);
|
|
25229
25328
|
};
|
|
25230
25329
|
}, [open, reposition]);
|
|
25231
|
-
|
|
25330
|
+
useEffect39(() => {
|
|
25232
25331
|
if (!open || !closeOnClickOutside) return;
|
|
25233
25332
|
const onDoc = (e) => {
|
|
25234
25333
|
const t = e.target;
|
|
@@ -25239,7 +25338,7 @@ function Popover({
|
|
|
25239
25338
|
document.addEventListener("mousedown", onDoc);
|
|
25240
25339
|
return () => document.removeEventListener("mousedown", onDoc);
|
|
25241
25340
|
}, [open, closeOnClickOutside, setOpen]);
|
|
25242
|
-
|
|
25341
|
+
useEffect39(() => {
|
|
25243
25342
|
if (!open || !closeOnEsc) return;
|
|
25244
25343
|
const onKey = (e) => {
|
|
25245
25344
|
if (e.key === "Escape") setOpen(false);
|
|
@@ -25726,7 +25825,7 @@ ProgressRing.displayName = "ProgressRing";
|
|
|
25726
25825
|
import {
|
|
25727
25826
|
forwardRef as forwardRef72,
|
|
25728
25827
|
useCallback as useCallback37,
|
|
25729
|
-
useEffect as
|
|
25828
|
+
useEffect as useEffect40,
|
|
25730
25829
|
useId as useId44,
|
|
25731
25830
|
useImperativeHandle as useImperativeHandle7,
|
|
25732
25831
|
useRef as useRef38,
|
|
@@ -25830,7 +25929,7 @@ var PromptInput = forwardRef72(
|
|
|
25830
25929
|
// biome-ignore lint/correctness/useExhaustiveDependencies: handleSubmit closes over up-to-date locals each render.
|
|
25831
25930
|
[v, setValue]
|
|
25832
25931
|
);
|
|
25833
|
-
|
|
25932
|
+
useEffect40(() => {
|
|
25834
25933
|
const el = taRef.current;
|
|
25835
25934
|
if (!el) return;
|
|
25836
25935
|
const computed = window.getComputedStyle(el);
|
|
@@ -26843,7 +26942,7 @@ function BinaryButton({
|
|
|
26843
26942
|
import {
|
|
26844
26943
|
forwardRef as forwardRef79,
|
|
26845
26944
|
useCallback as useCallback38,
|
|
26846
|
-
useEffect as
|
|
26945
|
+
useEffect as useEffect41,
|
|
26847
26946
|
useLayoutEffect as useLayoutEffect10,
|
|
26848
26947
|
useRef as useRef41,
|
|
26849
26948
|
useState as useState51
|
|
@@ -26912,7 +27011,7 @@ var Resizable = forwardRef79(
|
|
|
26912
27011
|
}
|
|
26913
27012
|
setSplit(defaultSplit >= 1 ? defaultSplit : t * defaultSplit);
|
|
26914
27013
|
}, []);
|
|
26915
|
-
|
|
27014
|
+
useEffect41(() => {
|
|
26916
27015
|
const el = wrapRef.current;
|
|
26917
27016
|
if (!el || typeof ResizeObserver === "undefined") return;
|
|
26918
27017
|
const ro = new ResizeObserver(() => {
|
|
@@ -26945,7 +27044,7 @@ var Resizable = forwardRef79(
|
|
|
26945
27044
|
setIsDragging(true);
|
|
26946
27045
|
setDragOverlay(direction);
|
|
26947
27046
|
};
|
|
26948
|
-
|
|
27047
|
+
useEffect41(() => {
|
|
26949
27048
|
const onMove = (e) => {
|
|
26950
27049
|
if (!draggingRef.current) return;
|
|
26951
27050
|
const el = wrapRef.current;
|
|
@@ -27090,7 +27189,7 @@ var ResizablePanel = forwardRef79(
|
|
|
27090
27189
|
};
|
|
27091
27190
|
setDragOverlay(isVertical ? "vertical" : "horizontal");
|
|
27092
27191
|
};
|
|
27093
|
-
|
|
27192
|
+
useEffect41(() => {
|
|
27094
27193
|
const onMove = (e) => {
|
|
27095
27194
|
if (!draggingRef.current) return;
|
|
27096
27195
|
const delta = (isVertical ? e.clientY : e.clientX) - startRef.current.at;
|
|
@@ -27262,7 +27361,7 @@ function SettingsRow({
|
|
|
27262
27361
|
|
|
27263
27362
|
// src/components/Sheet/Sheet.tsx
|
|
27264
27363
|
import { AnimatePresence as AnimatePresence14, motion as motion22 } from "framer-motion";
|
|
27265
|
-
import { useEffect as
|
|
27364
|
+
import { useEffect as useEffect42 } from "react";
|
|
27266
27365
|
import { createPortal as createPortal14 } from "react-dom";
|
|
27267
27366
|
import { Fragment as Fragment43, jsx as jsx112, jsxs as jsxs108 } from "react/jsx-runtime";
|
|
27268
27367
|
var slideVariants = {
|
|
@@ -27297,7 +27396,7 @@ function Sheet({
|
|
|
27297
27396
|
dragHandle = true,
|
|
27298
27397
|
className
|
|
27299
27398
|
}) {
|
|
27300
|
-
|
|
27399
|
+
useEffect42(() => {
|
|
27301
27400
|
if (!open || !closeOnEsc) return;
|
|
27302
27401
|
const onKey = (e) => {
|
|
27303
27402
|
if (e.key === "Escape") onClose();
|
|
@@ -27366,7 +27465,7 @@ function Show({ above, below, children, ...rest }) {
|
|
|
27366
27465
|
Show.displayName = "Show";
|
|
27367
27466
|
|
|
27368
27467
|
// src/components/Sidebar/Sidebar.tsx
|
|
27369
|
-
import { useCallback as useCallback39, useEffect as
|
|
27468
|
+
import { useCallback as useCallback39, useEffect as useEffect43, useRef as useRef42, useState as useState52 } from "react";
|
|
27370
27469
|
import { Fragment as Fragment44, jsx as jsx114, jsxs as jsxs109 } from "react/jsx-runtime";
|
|
27371
27470
|
function Sidebar({
|
|
27372
27471
|
variant = "expanded",
|
|
@@ -27387,7 +27486,7 @@ function Sidebar({
|
|
|
27387
27486
|
}) {
|
|
27388
27487
|
const allSections = sections ?? (items ? [{ items }] : []);
|
|
27389
27488
|
const [internalPinned, setInternalPinned] = useState52(defaultPinned);
|
|
27390
|
-
|
|
27489
|
+
useEffect43(() => {
|
|
27391
27490
|
if (pinnedProp !== void 0) return;
|
|
27392
27491
|
try {
|
|
27393
27492
|
const stored = window.localStorage.getItem(pinStorageKey);
|
|
@@ -27422,7 +27521,7 @@ function Sidebar({
|
|
|
27422
27521
|
closeTimer.current = null;
|
|
27423
27522
|
}
|
|
27424
27523
|
};
|
|
27425
|
-
|
|
27524
|
+
useEffect43(() => () => clearTimers(), []);
|
|
27426
27525
|
const handleEnter = () => {
|
|
27427
27526
|
clearTimers();
|
|
27428
27527
|
openTimer.current = setTimeout(() => setHoverOpen(true), hoverOpenDelay);
|
|
@@ -27434,7 +27533,7 @@ function Sidebar({
|
|
|
27434
27533
|
const autoMode = variant === "auto";
|
|
27435
27534
|
const showAsRail = autoMode ? !pinned : variant === "rail";
|
|
27436
27535
|
const overlayOpen = autoMode && !pinned && hoverOpen;
|
|
27437
|
-
|
|
27536
|
+
useEffect43(() => {
|
|
27438
27537
|
if (!overlayOpen) return;
|
|
27439
27538
|
const handler = (e) => {
|
|
27440
27539
|
if (e.key === "Escape") {
|
|
@@ -27577,7 +27676,7 @@ function RailItem({
|
|
|
27577
27676
|
timerRef.current = null;
|
|
27578
27677
|
}
|
|
27579
27678
|
};
|
|
27580
|
-
|
|
27679
|
+
useEffect43(() => () => clear(), []);
|
|
27581
27680
|
const show = () => {
|
|
27582
27681
|
if (suppressTooltip) return;
|
|
27583
27682
|
clear();
|
|
@@ -27845,7 +27944,7 @@ function hasActiveDescendant(item) {
|
|
|
27845
27944
|
|
|
27846
27945
|
// src/components/SlideoutPanel/SlideoutPanel.tsx
|
|
27847
27946
|
import { AnimatePresence as AnimatePresence15, motion as motion23 } from "framer-motion";
|
|
27848
|
-
import { useEffect as
|
|
27947
|
+
import { useEffect as useEffect44, useRef as useRef43 } from "react";
|
|
27849
27948
|
import { FocusScope as FocusScope2, OverlayProvider as OverlayProvider2, useDialog as useDialog2, useModal as useModal2, useOverlay as useOverlay2 } from "react-aria";
|
|
27850
27949
|
import { createPortal as createPortal15 } from "react-dom";
|
|
27851
27950
|
import { Fragment as Fragment45, jsx as jsx115, jsxs as jsxs110 } from "react/jsx-runtime";
|
|
@@ -27879,7 +27978,7 @@ function SlideoutContent({
|
|
|
27879
27978
|
if (offsetBottom) insetStyle.bottom = toCss2(offsetBottom);
|
|
27880
27979
|
const overlayRef = useRef43(null);
|
|
27881
27980
|
const panelRef = useRef43(null);
|
|
27882
|
-
|
|
27981
|
+
useEffect44(() => {
|
|
27883
27982
|
if (!open) return;
|
|
27884
27983
|
const portalEl = Array.from(document.body.children).find(
|
|
27885
27984
|
(el) => el.contains(panelRef.current)
|
|
@@ -27978,7 +28077,7 @@ function SlideoutPanel(props) {
|
|
|
27978
28077
|
import { useId as useId47, useState as useState54 } from "react";
|
|
27979
28078
|
|
|
27980
28079
|
// src/hooks/useRelativeTime.ts
|
|
27981
|
-
import { useEffect as
|
|
28080
|
+
import { useEffect as useEffect45, useState as useState53 } from "react";
|
|
27982
28081
|
function toMs(t) {
|
|
27983
28082
|
if (t == null) return null;
|
|
27984
28083
|
return typeof t === "number" ? t : t.getTime();
|
|
@@ -27998,7 +28097,7 @@ function formatRelativeTime(when, now2 = Date.now()) {
|
|
|
27998
28097
|
function useRelativeTime(date, options2 = {}) {
|
|
27999
28098
|
const { intervalMs = 3e4 } = options2;
|
|
28000
28099
|
const [now2, setNow] = useState53(() => Date.now());
|
|
28001
|
-
|
|
28100
|
+
useEffect45(() => {
|
|
28002
28101
|
if (typeof window === "undefined") return;
|
|
28003
28102
|
const id = window.setInterval(() => setNow(Date.now()), intervalMs);
|
|
28004
28103
|
return () => window.clearInterval(id);
|
|
@@ -28501,7 +28600,7 @@ import { AnimatePresence as AnimatePresence16, motion as motion24, useReducedMot
|
|
|
28501
28600
|
import {
|
|
28502
28601
|
forwardRef as forwardRef84,
|
|
28503
28602
|
useCallback as useCallback40,
|
|
28504
|
-
useEffect as
|
|
28603
|
+
useEffect as useEffect46,
|
|
28505
28604
|
useLayoutEffect as useLayoutEffect11,
|
|
28506
28605
|
useMemo as useMemo31,
|
|
28507
28606
|
useState as useState55
|
|
@@ -28547,7 +28646,7 @@ var Spotlight = forwardRef84(
|
|
|
28547
28646
|
useLayoutEffect11(() => {
|
|
28548
28647
|
measure();
|
|
28549
28648
|
}, [measure]);
|
|
28550
|
-
|
|
28649
|
+
useEffect46(() => {
|
|
28551
28650
|
if (!open) return;
|
|
28552
28651
|
const handler = () => measure();
|
|
28553
28652
|
window.addEventListener("resize", handler);
|
|
@@ -28557,7 +28656,7 @@ var Spotlight = forwardRef84(
|
|
|
28557
28656
|
window.removeEventListener("scroll", handler, true);
|
|
28558
28657
|
};
|
|
28559
28658
|
}, [open, measure]);
|
|
28560
|
-
|
|
28659
|
+
useEffect46(() => {
|
|
28561
28660
|
if (!open || !onDismiss) return;
|
|
28562
28661
|
const onKey = (e) => {
|
|
28563
28662
|
if (e.key === "Escape") onDismiss();
|
|
@@ -30040,7 +30139,7 @@ import {
|
|
|
30040
30139
|
forwardRef as forwardRef93,
|
|
30041
30140
|
Fragment as Fragment50,
|
|
30042
30141
|
useCallback as useCallback44,
|
|
30043
|
-
useEffect as
|
|
30142
|
+
useEffect as useEffect47,
|
|
30044
30143
|
useId as useId54,
|
|
30045
30144
|
useRef as useRef44,
|
|
30046
30145
|
useState as useState60
|
|
@@ -30184,14 +30283,14 @@ var TimePicker = forwardRef93(
|
|
|
30184
30283
|
},
|
|
30185
30284
|
[commitDraft]
|
|
30186
30285
|
);
|
|
30187
|
-
|
|
30286
|
+
useEffect47(() => {
|
|
30188
30287
|
if (!open) {
|
|
30189
30288
|
clearCommitTimer();
|
|
30190
30289
|
setDraftBoth(null);
|
|
30191
30290
|
}
|
|
30192
30291
|
return clearCommitTimer;
|
|
30193
30292
|
}, [open, clearCommitTimer, setDraftBoth]);
|
|
30194
|
-
|
|
30293
|
+
useEffect47(() => {
|
|
30195
30294
|
if (!open) return;
|
|
30196
30295
|
const onDoc = (e) => {
|
|
30197
30296
|
const target = e.target;
|
|
@@ -30459,7 +30558,7 @@ TimePicker.displayName = "TimePicker";
|
|
|
30459
30558
|
import {
|
|
30460
30559
|
forwardRef as forwardRef94,
|
|
30461
30560
|
useCallback as useCallback45,
|
|
30462
|
-
useEffect as
|
|
30561
|
+
useEffect as useEffect48,
|
|
30463
30562
|
useId as useId55,
|
|
30464
30563
|
useMemo as useMemo34,
|
|
30465
30564
|
useRef as useRef45,
|
|
@@ -30534,16 +30633,16 @@ var TimezonePicker = forwardRef94(
|
|
|
30534
30633
|
(o) => o.iana.toLowerCase().includes(q2) || o.label.toLowerCase().includes(q2) || o.offset.toLowerCase().includes(q2) || o.region?.toLowerCase().includes(q2)
|
|
30535
30634
|
);
|
|
30536
30635
|
}, [options2, query]);
|
|
30537
|
-
|
|
30636
|
+
useEffect48(() => {
|
|
30538
30637
|
if (activeIndex >= filtered.length) setActiveIndex(0);
|
|
30539
30638
|
}, [filtered.length, activeIndex]);
|
|
30540
|
-
|
|
30639
|
+
useEffect48(() => {
|
|
30541
30640
|
if (!open) return;
|
|
30542
30641
|
const idx = filtered.findIndex((o) => o.iana === value);
|
|
30543
30642
|
setActiveIndex(idx >= 0 ? idx : 0);
|
|
30544
30643
|
inputRef.current?.focus();
|
|
30545
30644
|
}, [open]);
|
|
30546
|
-
|
|
30645
|
+
useEffect48(() => {
|
|
30547
30646
|
if (!open) return;
|
|
30548
30647
|
const onDoc = (e) => {
|
|
30549
30648
|
if (!wrapRef.current?.contains(e.target)) {
|
|
@@ -30554,7 +30653,7 @@ var TimezonePicker = forwardRef94(
|
|
|
30554
30653
|
document.addEventListener("mousedown", onDoc);
|
|
30555
30654
|
return () => document.removeEventListener("mousedown", onDoc);
|
|
30556
30655
|
}, [open]);
|
|
30557
|
-
|
|
30656
|
+
useEffect48(() => {
|
|
30558
30657
|
if (!open) return;
|
|
30559
30658
|
const list = listRef.current;
|
|
30560
30659
|
if (!list) return;
|
|
@@ -33083,7 +33182,7 @@ import {
|
|
|
33083
33182
|
} from "@octaviaflow/icons";
|
|
33084
33183
|
|
|
33085
33184
|
// src/hooks/useWorkflowRuntime.ts
|
|
33086
|
-
import { useEffect as
|
|
33185
|
+
import { useEffect as useEffect49, useState as useState65 } from "react";
|
|
33087
33186
|
function toMs2(t) {
|
|
33088
33187
|
if (t == null) return null;
|
|
33089
33188
|
return typeof t === "number" ? t : t.getTime();
|
|
@@ -33098,7 +33197,7 @@ function formatWorkflowRuntime(ms) {
|
|
|
33098
33197
|
}
|
|
33099
33198
|
function useWorkflowRuntime(startedAt, active) {
|
|
33100
33199
|
const [, force] = useState65(0);
|
|
33101
|
-
|
|
33200
|
+
useEffect49(() => {
|
|
33102
33201
|
if (!active || startedAt == null) return;
|
|
33103
33202
|
if (typeof window === "undefined") return;
|
|
33104
33203
|
const id = window.setInterval(() => force((n) => n + 1), 1e3);
|
|
@@ -33462,13 +33561,13 @@ function WorkflowHeaderExpanded({
|
|
|
33462
33561
|
}
|
|
33463
33562
|
|
|
33464
33563
|
// src/hooks/useBanner.ts
|
|
33465
|
-
import { useCallback as useCallback51, useEffect as
|
|
33564
|
+
import { useCallback as useCallback51, useEffect as useEffect50, useRef as useRef48, useState as useState66 } from "react";
|
|
33466
33565
|
function useBanner(options2 = {}) {
|
|
33467
33566
|
const { defaultOpen = false, autoDismissAfter, onDismiss } = options2;
|
|
33468
33567
|
const [open, setOpen] = useState66(defaultOpen);
|
|
33469
33568
|
const timerRef = useRef48(null);
|
|
33470
33569
|
const onDismissRef = useRef48(onDismiss);
|
|
33471
|
-
|
|
33570
|
+
useEffect50(() => {
|
|
33472
33571
|
onDismissRef.current = onDismiss;
|
|
33473
33572
|
}, [onDismiss]);
|
|
33474
33573
|
const clearTimer = useCallback51(() => {
|
|
@@ -33499,7 +33598,7 @@ function useBanner(options2 = {}) {
|
|
|
33499
33598
|
if (open) hide();
|
|
33500
33599
|
else show();
|
|
33501
33600
|
}, [open, show, hide]);
|
|
33502
|
-
|
|
33601
|
+
useEffect50(() => () => clearTimer(), [clearTimer]);
|
|
33503
33602
|
return {
|
|
33504
33603
|
open,
|
|
33505
33604
|
show,
|
|
@@ -33510,7 +33609,7 @@ function useBanner(options2 = {}) {
|
|
|
33510
33609
|
}
|
|
33511
33610
|
|
|
33512
33611
|
// src/hooks/useCallout.ts
|
|
33513
|
-
import { useCallback as useCallback52, useEffect as
|
|
33612
|
+
import { useCallback as useCallback52, useEffect as useEffect51, useState as useState67 } from "react";
|
|
33514
33613
|
var STORAGE_PREFIX = "ods:callout:dismissed:";
|
|
33515
33614
|
function readPersisted(key) {
|
|
33516
33615
|
if (!key || typeof window === "undefined") return false;
|
|
@@ -33534,7 +33633,7 @@ function writePersisted(key, value) {
|
|
|
33534
33633
|
function useCallout(options2 = {}) {
|
|
33535
33634
|
const { defaultOpen = true, persistKey, onDismiss } = options2;
|
|
33536
33635
|
const [open, setOpen] = useState67(defaultOpen);
|
|
33537
|
-
|
|
33636
|
+
useEffect51(() => {
|
|
33538
33637
|
if (persistKey && readPersisted(persistKey)) {
|
|
33539
33638
|
setOpen(false);
|
|
33540
33639
|
}
|
|
@@ -33850,13 +33949,13 @@ function useTraceTimeline({
|
|
|
33850
33949
|
|
|
33851
33950
|
// src/provider/OdsProvider.tsx
|
|
33852
33951
|
import { generateCssVars, resolveConfig } from "@octaviaflow/config";
|
|
33853
|
-
import { createContext as createContext4, useContext as useContext5, useEffect as
|
|
33952
|
+
import { createContext as createContext4, useContext as useContext5, useEffect as useEffect52, useMemo as useMemo38 } from "react";
|
|
33854
33953
|
import { OverlayProvider as OverlayProvider3 } from "react-aria";
|
|
33855
33954
|
import { jsx as jsx142 } from "react/jsx-runtime";
|
|
33856
33955
|
var OdsContext = createContext4(null);
|
|
33857
33956
|
function OdsProvider({ config: userConfig, children }) {
|
|
33858
33957
|
const resolved = useMemo38(() => resolveConfig(userConfig), [userConfig]);
|
|
33859
|
-
|
|
33958
|
+
useEffect52(() => {
|
|
33860
33959
|
const cssVarsBlock = generateCssVars(resolved);
|
|
33861
33960
|
const match = cssVarsBlock.match(/:root\s*\{([\s\S]*)\}/);
|
|
33862
33961
|
if (match) {
|