@octaviaflow/core 3.0.11 → 3.0.13
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/AuthCard/AuthCard.d.ts +42 -2
- package/dist/components/AuthCard/AuthCard.d.ts.map +1 -1
- package/dist/components/AuthCard/index.d.ts +1 -1
- package/dist/components/AuthCard/index.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +13 -1
- package/dist/components/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/index.cjs +153 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +277 -144
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -196,30 +196,95 @@ function AgentCard({
|
|
|
196
196
|
|
|
197
197
|
// src/components/AuthCard/AuthCard.tsx
|
|
198
198
|
import { useId, useRef as useRef2, useState } from "react";
|
|
199
|
-
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
199
|
+
import { Fragment, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
200
200
|
function AuthCard({
|
|
201
201
|
logo,
|
|
202
202
|
title,
|
|
203
203
|
description,
|
|
204
204
|
scope,
|
|
205
|
+
header,
|
|
206
|
+
headerExtra,
|
|
207
|
+
error,
|
|
208
|
+
success,
|
|
209
|
+
align = "center",
|
|
210
|
+
width,
|
|
205
211
|
children,
|
|
206
212
|
divider,
|
|
207
213
|
footer,
|
|
208
214
|
className
|
|
209
215
|
}) {
|
|
210
|
-
return /* @__PURE__ */ jsxs3(
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
216
|
+
return /* @__PURE__ */ jsxs3(
|
|
217
|
+
"div",
|
|
218
|
+
{
|
|
219
|
+
className: cn(
|
|
220
|
+
"ods-auth-card",
|
|
221
|
+
align === "left" && "ods-auth-card--left",
|
|
222
|
+
className
|
|
223
|
+
),
|
|
224
|
+
style: width != null ? { width: typeof width === "number" ? `${width}px` : width } : void 0,
|
|
225
|
+
children: [
|
|
226
|
+
header ?? /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
227
|
+
logo && /* @__PURE__ */ jsx3("div", { className: "ods-auth-card__logo", children: logo }),
|
|
228
|
+
(title || description || scope) && /* @__PURE__ */ jsxs3("div", { className: "ods-auth-card__head", children: [
|
|
229
|
+
(title || scope) && /* @__PURE__ */ jsxs3("div", { className: "ods-auth-card__title-row", children: [
|
|
230
|
+
title && /* @__PURE__ */ jsx3("h1", { className: "ods-auth-card__title", children: title }),
|
|
231
|
+
scope && /* @__PURE__ */ jsx3("span", { className: "ods-auth-card__scope", children: scope })
|
|
232
|
+
] }),
|
|
233
|
+
description && /* @__PURE__ */ jsx3("p", { className: "ods-auth-card__desc", children: description })
|
|
234
|
+
] })
|
|
235
|
+
] }),
|
|
236
|
+
headerExtra && /* @__PURE__ */ jsx3("div", { className: "ods-auth-card__header-extra", children: headerExtra }),
|
|
237
|
+
(error || success) && /* @__PURE__ */ jsxs3(
|
|
238
|
+
"div",
|
|
239
|
+
{
|
|
240
|
+
className: "ods-auth-card__messages",
|
|
241
|
+
style: {
|
|
242
|
+
display: "flex",
|
|
243
|
+
flexDirection: "column",
|
|
244
|
+
gap: "var(--ods-space-2)"
|
|
245
|
+
},
|
|
246
|
+
children: [
|
|
247
|
+
error && /* @__PURE__ */ jsx3(AutoBanner, { variant: "error", children: error }),
|
|
248
|
+
success && /* @__PURE__ */ jsx3(AutoBanner, { variant: "success", children: success })
|
|
249
|
+
]
|
|
250
|
+
}
|
|
251
|
+
),
|
|
252
|
+
/* @__PURE__ */ jsx3("div", { className: "ods-auth-card__body", children }),
|
|
253
|
+
divider && /* @__PURE__ */ jsx3("div", { className: "ods-auth-card__divider", children: divider }),
|
|
254
|
+
footer && /* @__PURE__ */ jsx3("div", { className: "ods-auth-card__footer", children: footer })
|
|
255
|
+
]
|
|
256
|
+
}
|
|
257
|
+
);
|
|
258
|
+
}
|
|
259
|
+
function AutoBanner({
|
|
260
|
+
variant,
|
|
261
|
+
children
|
|
262
|
+
}) {
|
|
263
|
+
const tone = variant === "error" ? {
|
|
264
|
+
bg: "var(--ods-status-error-bg)",
|
|
265
|
+
fg: "var(--ods-status-error-fg)",
|
|
266
|
+
bd: "var(--ods-status-error-bd)"
|
|
267
|
+
} : {
|
|
268
|
+
bg: "var(--ods-status-success-bg)",
|
|
269
|
+
fg: "var(--ods-status-success-fg)",
|
|
270
|
+
bd: "var(--ods-status-success-bd)"
|
|
271
|
+
};
|
|
272
|
+
return /* @__PURE__ */ jsx3(
|
|
273
|
+
"div",
|
|
274
|
+
{
|
|
275
|
+
role: variant === "error" ? "alert" : "status",
|
|
276
|
+
style: {
|
|
277
|
+
padding: "10px 12px",
|
|
278
|
+
background: tone.bg,
|
|
279
|
+
color: tone.fg,
|
|
280
|
+
border: `1px solid ${tone.bd}`,
|
|
281
|
+
borderRadius: "var(--ods-radius-1)",
|
|
282
|
+
fontSize: 13,
|
|
283
|
+
lineHeight: 1.45
|
|
284
|
+
},
|
|
285
|
+
children
|
|
286
|
+
}
|
|
287
|
+
);
|
|
223
288
|
}
|
|
224
289
|
function AuthDivider({ children = "OR", className }) {
|
|
225
290
|
return /* @__PURE__ */ jsxs3("div", { className: cn("ods-auth-divider", className), children: [
|
|
@@ -585,14 +650,14 @@ function BlogCard({
|
|
|
585
650
|
// src/components/Breadcrumb/Breadcrumb.tsx
|
|
586
651
|
import { useRef as useRef3 } from "react";
|
|
587
652
|
import { useBreadcrumbItem, useBreadcrumbs } from "react-aria";
|
|
588
|
-
import { Fragment, jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
653
|
+
import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
589
654
|
function BreadcrumbItem({ item, isCurrent }) {
|
|
590
655
|
const ref = useRef3(null);
|
|
591
656
|
const { itemProps } = useBreadcrumbItem(
|
|
592
657
|
{ children: item.label, isCurrent, elementType: item.href ? "a" : "span" },
|
|
593
658
|
ref
|
|
594
659
|
);
|
|
595
|
-
const content = /* @__PURE__ */ jsxs9(
|
|
660
|
+
const content = /* @__PURE__ */ jsxs9(Fragment2, { children: [
|
|
596
661
|
item.icon && /* @__PURE__ */ jsx9("span", { className: "ods-breadcrumb__icon", children: item.icon }),
|
|
597
662
|
/* @__PURE__ */ jsx9("span", { children: item.label })
|
|
598
663
|
] });
|
|
@@ -2749,7 +2814,7 @@ function ChoiceCard({
|
|
|
2749
2814
|
|
|
2750
2815
|
// src/components/CodeEditor/CodeEditor.tsx
|
|
2751
2816
|
import { useEffect, useMemo as useMemo3, useRef as useRef6, useState as useState3 } from "react";
|
|
2752
|
-
import { Fragment as
|
|
2817
|
+
import { Fragment as Fragment3, jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2753
2818
|
var COMMENT_PREFIX = {
|
|
2754
2819
|
sql: "-- ",
|
|
2755
2820
|
json: "// ",
|
|
@@ -3263,7 +3328,7 @@ ${indent}`;
|
|
|
3263
3328
|
/* @__PURE__ */ jsxs17("span", { className: "ods-code-editor__pos", children: [
|
|
3264
3329
|
"Ln ",
|
|
3265
3330
|
activeLine,
|
|
3266
|
-
selectionLen > 0 && /* @__PURE__ */ jsxs17(
|
|
3331
|
+
selectionLen > 0 && /* @__PURE__ */ jsxs17(Fragment3, { children: [
|
|
3267
3332
|
" ",
|
|
3268
3333
|
"\xB7 ",
|
|
3269
3334
|
selectionLen,
|
|
@@ -3281,7 +3346,7 @@ ${indent}`;
|
|
|
3281
3346
|
/* @__PURE__ */ jsx18("span", { className: "ods-code-editor__sep", children: "\xB7" }),
|
|
3282
3347
|
/* @__PURE__ */ jsx18("kbd", { className: "ods-code-editor__kbd", children: "\u2325\u2191\u2193" }),
|
|
3283
3348
|
" move",
|
|
3284
|
-
searchable && /* @__PURE__ */ jsxs17(
|
|
3349
|
+
searchable && /* @__PURE__ */ jsxs17(Fragment3, { children: [
|
|
3285
3350
|
/* @__PURE__ */ jsx18("span", { className: "ods-code-editor__sep", children: "\xB7" }),
|
|
3286
3351
|
/* @__PURE__ */ jsx18("kbd", { className: "ods-code-editor__kbd", children: "\u2318F" }),
|
|
3287
3352
|
" find"
|
|
@@ -3826,7 +3891,7 @@ import {
|
|
|
3826
3891
|
useRef as useRef9,
|
|
3827
3892
|
useState as useState6
|
|
3828
3893
|
} from "react";
|
|
3829
|
-
import { Fragment as
|
|
3894
|
+
import { Fragment as Fragment4, jsx as jsx22, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3830
3895
|
var TYPE_CLASSES = {
|
|
3831
3896
|
string: "string",
|
|
3832
3897
|
integer: "integer",
|
|
@@ -4381,7 +4446,7 @@ function DataMapper({
|
|
|
4381
4446
|
" mapped"
|
|
4382
4447
|
] })
|
|
4383
4448
|
] }),
|
|
4384
|
-
requiredUnmapped > 0 && /* @__PURE__ */ jsxs21(
|
|
4449
|
+
requiredUnmapped > 0 && /* @__PURE__ */ jsxs21(Fragment4, { children: [
|
|
4385
4450
|
/* @__PURE__ */ jsx22("span", { className: "ods-data-mapper__stat-sep", children: "\xB7" }),
|
|
4386
4451
|
/* @__PURE__ */ jsxs21("span", { className: "ods-data-mapper__stat ods-data-mapper__stat--warn", children: [
|
|
4387
4452
|
/* @__PURE__ */ jsx22("span", { className: "ods-data-mapper__stat-value", children: requiredUnmapped }),
|
|
@@ -5148,7 +5213,7 @@ import {
|
|
|
5148
5213
|
useRef as useRef10,
|
|
5149
5214
|
useState as useState7
|
|
5150
5215
|
} from "react";
|
|
5151
|
-
import { Fragment as
|
|
5216
|
+
import { Fragment as Fragment5, jsx as jsx23, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5152
5217
|
function readValue(row, col) {
|
|
5153
5218
|
if (typeof col.accessor === "function") return col.accessor(row);
|
|
5154
5219
|
const k = col.accessor ?? col.key;
|
|
@@ -5429,7 +5494,7 @@ function DataTable(props) {
|
|
|
5429
5494
|
className
|
|
5430
5495
|
);
|
|
5431
5496
|
return /* @__PURE__ */ jsxs22("div", { className: wrapperClass, role: "region", "aria-label": "Data table", children: [
|
|
5432
|
-
/* @__PURE__ */ jsx23("div", { className: "ods-datatable__toolbar", children: showBulkBar ? /* @__PURE__ */ jsxs22(
|
|
5497
|
+
/* @__PURE__ */ jsx23("div", { className: "ods-datatable__toolbar", children: showBulkBar ? /* @__PURE__ */ jsxs22(Fragment5, { children: [
|
|
5433
5498
|
/* @__PURE__ */ jsxs22("div", { className: "ods-datatable__bulk-summary", children: [
|
|
5434
5499
|
/* @__PURE__ */ jsx23("span", { className: "ods-datatable__bulk-count", children: selectedCount }),
|
|
5435
5500
|
/* @__PURE__ */ jsx23("span", { children: "selected" }),
|
|
@@ -5463,7 +5528,7 @@ function DataTable(props) {
|
|
|
5463
5528
|
},
|
|
5464
5529
|
i
|
|
5465
5530
|
)) })
|
|
5466
|
-
] }) : /* @__PURE__ */ jsxs22(
|
|
5531
|
+
] }) : /* @__PURE__ */ jsxs22(Fragment5, { children: [
|
|
5467
5532
|
/* @__PURE__ */ jsxs22("div", { className: "ods-datatable__title-block", children: [
|
|
5468
5533
|
title && /* @__PURE__ */ jsxs22("h2", { className: "ods-datatable__title", children: [
|
|
5469
5534
|
title,
|
|
@@ -5806,7 +5871,7 @@ function Row({
|
|
|
5806
5871
|
document.addEventListener("mousedown", close);
|
|
5807
5872
|
return () => document.removeEventListener("mousedown", close);
|
|
5808
5873
|
}, [menuOpen]);
|
|
5809
|
-
return /* @__PURE__ */ jsxs22(
|
|
5874
|
+
return /* @__PURE__ */ jsxs22(Fragment5, { children: [
|
|
5810
5875
|
/* @__PURE__ */ jsxs22(
|
|
5811
5876
|
"tr",
|
|
5812
5877
|
{
|
|
@@ -6224,7 +6289,7 @@ function Dialog(props) {
|
|
|
6224
6289
|
}
|
|
6225
6290
|
|
|
6226
6291
|
// src/components/DonutChart/DonutChart.tsx
|
|
6227
|
-
import { Fragment as
|
|
6292
|
+
import { Fragment as Fragment6, jsx as jsx27, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
6228
6293
|
function DonutChart({
|
|
6229
6294
|
data,
|
|
6230
6295
|
size = 160,
|
|
@@ -6275,7 +6340,7 @@ function DonutChart({
|
|
|
6275
6340
|
i
|
|
6276
6341
|
)) })
|
|
6277
6342
|
] }),
|
|
6278
|
-
/* @__PURE__ */ jsx27("div", { className: "ods-donut__center", children: centerLabel ?? /* @__PURE__ */ jsxs26(
|
|
6343
|
+
/* @__PURE__ */ jsx27("div", { className: "ods-donut__center", children: centerLabel ?? /* @__PURE__ */ jsxs26(Fragment6, { children: [
|
|
6279
6344
|
/* @__PURE__ */ jsx27("div", { className: "ods-donut__value", children: total }),
|
|
6280
6345
|
/* @__PURE__ */ jsx27("div", { className: "ods-donut__small", children: "total" })
|
|
6281
6346
|
] }) })
|
|
@@ -6343,10 +6408,10 @@ function Drawer({
|
|
|
6343
6408
|
|
|
6344
6409
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
6345
6410
|
import { AnimatePresence as AnimatePresence4, motion as motion6 } from "framer-motion";
|
|
6346
|
-
import { useRef as useRef13 } from "react";
|
|
6411
|
+
import { useEffect as useEffect6, useRef as useRef13 } from "react";
|
|
6347
6412
|
import { useButton as useButton3, useMenu, useMenuItem, useMenuTrigger } from "react-aria";
|
|
6348
6413
|
import { createPortal as createPortal2 } from "react-dom";
|
|
6349
|
-
import { Fragment as
|
|
6414
|
+
import { Fragment as Fragment7, jsx as jsx29, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6350
6415
|
function MenuItemComponent({ item, state, onAction }) {
|
|
6351
6416
|
const ref = useRef13(null);
|
|
6352
6417
|
const { menuItemProps } = useMenuItem({ key: item.key, onAction }, state, ref);
|
|
@@ -6374,9 +6439,37 @@ function MenuPopup({
|
|
|
6374
6439
|
menuItems,
|
|
6375
6440
|
triggerRef,
|
|
6376
6441
|
align,
|
|
6377
|
-
className
|
|
6442
|
+
className,
|
|
6443
|
+
closeOnOutsideClick,
|
|
6444
|
+
closeOnEscape
|
|
6378
6445
|
}) {
|
|
6379
6446
|
const menuRef = useRef13(null);
|
|
6447
|
+
useEffect6(() => {
|
|
6448
|
+
if (!state.isOpen || !closeOnOutsideClick) return;
|
|
6449
|
+
const handler = (e) => {
|
|
6450
|
+
const target = e.target;
|
|
6451
|
+
if (!target) return;
|
|
6452
|
+
const insideMenu = menuRef.current?.contains(target);
|
|
6453
|
+
const insideTrigger = triggerRef.current?.contains(target);
|
|
6454
|
+
if (!insideMenu && !insideTrigger) {
|
|
6455
|
+
state.close();
|
|
6456
|
+
}
|
|
6457
|
+
};
|
|
6458
|
+
document.addEventListener("mousedown", handler, true);
|
|
6459
|
+
return () => document.removeEventListener("mousedown", handler, true);
|
|
6460
|
+
}, [state.isOpen, closeOnOutsideClick]);
|
|
6461
|
+
useEffect6(() => {
|
|
6462
|
+
if (!state.isOpen || !closeOnEscape) return;
|
|
6463
|
+
const handler = (e) => {
|
|
6464
|
+
if (e.key === "Escape") {
|
|
6465
|
+
e.stopPropagation();
|
|
6466
|
+
state.close();
|
|
6467
|
+
triggerRef.current?.focus();
|
|
6468
|
+
}
|
|
6469
|
+
};
|
|
6470
|
+
document.addEventListener("keydown", handler);
|
|
6471
|
+
return () => document.removeEventListener("keydown", handler);
|
|
6472
|
+
}, [state.isOpen, closeOnEscape]);
|
|
6380
6473
|
const nonSepItems = menuItems.filter((i) => !i.separator);
|
|
6381
6474
|
const children = nonSepItems.map((item, idx) => /* @__PURE__ */ jsx29($05678f3aee5e7d1a$export$6d08773d2e66f8f2, { textValue: item.label, children: item.label }, idx));
|
|
6382
6475
|
const treeState = $6b915bde6cd300dd$export$728d6ba534403756({
|
|
@@ -6456,6 +6549,8 @@ function DropdownMenu({
|
|
|
6456
6549
|
align = "start",
|
|
6457
6550
|
className,
|
|
6458
6551
|
triggerClassName,
|
|
6552
|
+
closeOnOutsideClick = true,
|
|
6553
|
+
closeOnEscape = true,
|
|
6459
6554
|
"aria-label": ariaLabel,
|
|
6460
6555
|
"aria-labelledby": ariaLabelledby
|
|
6461
6556
|
}) {
|
|
@@ -6473,7 +6568,7 @@ function DropdownMenu({
|
|
|
6473
6568
|
triggerRef
|
|
6474
6569
|
);
|
|
6475
6570
|
const { onDrag, onDragStart, onDragEnd, onAnimationStart, ...safeTriggerProps } = buttonProps;
|
|
6476
|
-
return /* @__PURE__ */ jsxs28(
|
|
6571
|
+
return /* @__PURE__ */ jsxs28(Fragment7, { children: [
|
|
6477
6572
|
/* @__PURE__ */ jsx29(
|
|
6478
6573
|
"button",
|
|
6479
6574
|
{
|
|
@@ -6490,7 +6585,9 @@ function DropdownMenu({
|
|
|
6490
6585
|
menuItems: items,
|
|
6491
6586
|
triggerRef,
|
|
6492
6587
|
align,
|
|
6493
|
-
className
|
|
6588
|
+
className,
|
|
6589
|
+
closeOnOutsideClick,
|
|
6590
|
+
closeOnEscape
|
|
6494
6591
|
}
|
|
6495
6592
|
)
|
|
6496
6593
|
] });
|
|
@@ -6509,8 +6606,8 @@ function EmptyState({ icon, title, description, action, className }) {
|
|
|
6509
6606
|
|
|
6510
6607
|
// src/components/ExecutionConsole/ExecutionConsole.tsx
|
|
6511
6608
|
import { motion as motion7 } from "framer-motion";
|
|
6512
|
-
import { useEffect as
|
|
6513
|
-
import { Fragment as
|
|
6609
|
+
import { useEffect as useEffect7, useRef as useRef14 } from "react";
|
|
6610
|
+
import { Fragment as Fragment8, jsx as jsx31, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
6514
6611
|
var iconProps = {
|
|
6515
6612
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6516
6613
|
viewBox: "0 0 24 24",
|
|
@@ -6556,7 +6653,7 @@ function ExecutionConsole({
|
|
|
6556
6653
|
void navigator.clipboard.writeText(text);
|
|
6557
6654
|
}
|
|
6558
6655
|
};
|
|
6559
|
-
|
|
6656
|
+
useEffect7(() => {
|
|
6560
6657
|
if (open && logEndRef.current) {
|
|
6561
6658
|
logEndRef.current.scrollIntoView?.({ behavior: "smooth" });
|
|
6562
6659
|
}
|
|
@@ -6651,7 +6748,7 @@ function ExecutionConsole({
|
|
|
6651
6748
|
children: /* @__PURE__ */ jsx31(TrashIcon2, {})
|
|
6652
6749
|
}
|
|
6653
6750
|
),
|
|
6654
|
-
toolbar && /* @__PURE__ */ jsxs30(
|
|
6751
|
+
toolbar && /* @__PURE__ */ jsxs30(Fragment8, { children: [
|
|
6655
6752
|
/* @__PURE__ */ jsx31("span", { className: "ods-console__action-separator", "aria-hidden": "true" }),
|
|
6656
6753
|
toolbar
|
|
6657
6754
|
] })
|
|
@@ -6722,7 +6819,7 @@ function FeatureCard({
|
|
|
6722
6819
|
// src/components/FileDropzone/FileDropzone.tsx
|
|
6723
6820
|
import {
|
|
6724
6821
|
useCallback as useCallback4,
|
|
6725
|
-
useEffect as
|
|
6822
|
+
useEffect as useEffect8,
|
|
6726
6823
|
useId as useId3,
|
|
6727
6824
|
useRef as useRef15,
|
|
6728
6825
|
useState as useState9
|
|
@@ -6794,7 +6891,7 @@ function sanitizeHref(url) {
|
|
|
6794
6891
|
}
|
|
6795
6892
|
|
|
6796
6893
|
// src/components/FileDropzone/FileDropzone.tsx
|
|
6797
|
-
import { Fragment as
|
|
6894
|
+
import { Fragment as Fragment9, jsx as jsx33, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
6798
6895
|
var UPLOAD_ICON = /* @__PURE__ */ jsx33("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx33(
|
|
6799
6896
|
"path",
|
|
6800
6897
|
{
|
|
@@ -6908,7 +7005,7 @@ function FileDropzone({
|
|
|
6908
7005
|
},
|
|
6909
7006
|
[disabled, onFiles, validate]
|
|
6910
7007
|
);
|
|
6911
|
-
|
|
7008
|
+
useEffect8(() => {
|
|
6912
7009
|
if (!files) return;
|
|
6913
7010
|
const next = {};
|
|
6914
7011
|
const created = [];
|
|
@@ -6925,7 +7022,7 @@ function FileDropzone({
|
|
|
6925
7022
|
created.forEach((u) => URL.revokeObjectURL(u));
|
|
6926
7023
|
};
|
|
6927
7024
|
}, [files]);
|
|
6928
|
-
|
|
7025
|
+
useEffect8(() => {
|
|
6929
7026
|
if (!pasteEnabled || disabled) return;
|
|
6930
7027
|
const onPaste = (e) => {
|
|
6931
7028
|
const active = document.activeElement;
|
|
@@ -7114,7 +7211,7 @@ function FileDropzone({
|
|
|
7114
7211
|
children: CHECK_ICON
|
|
7115
7212
|
}
|
|
7116
7213
|
),
|
|
7117
|
-
status === "error" && /* @__PURE__ */ jsxs32(
|
|
7214
|
+
status === "error" && /* @__PURE__ */ jsxs32(Fragment9, { children: [
|
|
7118
7215
|
/* @__PURE__ */ jsx33(
|
|
7119
7216
|
"span",
|
|
7120
7217
|
{
|
|
@@ -7210,7 +7307,7 @@ import { motion as motion8 } from "framer-motion";
|
|
|
7210
7307
|
import {
|
|
7211
7308
|
forwardRef,
|
|
7212
7309
|
useCallback as useCallback5,
|
|
7213
|
-
useEffect as
|
|
7310
|
+
useEffect as useEffect9,
|
|
7214
7311
|
useRef as useRef16,
|
|
7215
7312
|
useState as useState10
|
|
7216
7313
|
} from "react";
|
|
@@ -7326,7 +7423,7 @@ var FlowNode = forwardRef(function FlowNode2({
|
|
|
7326
7423
|
},
|
|
7327
7424
|
[isLockMode]
|
|
7328
7425
|
);
|
|
7329
|
-
|
|
7426
|
+
useEffect9(() => {
|
|
7330
7427
|
if (!isDragging) return;
|
|
7331
7428
|
const applyDelta = (clientX, clientY) => {
|
|
7332
7429
|
const start = dragStartRef.current;
|
|
@@ -7822,7 +7919,7 @@ function FlowMinimap({
|
|
|
7822
7919
|
}
|
|
7823
7920
|
|
|
7824
7921
|
// src/components/FlowToolbar/FlowToolbar.tsx
|
|
7825
|
-
import { Fragment as
|
|
7922
|
+
import { Fragment as Fragment10, jsx as jsx38, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
7826
7923
|
function FlowToolbar({ children, placement = "left", className }) {
|
|
7827
7924
|
return /* @__PURE__ */ jsx38(
|
|
7828
7925
|
"div",
|
|
@@ -7882,7 +7979,7 @@ var SVG_BASE = {
|
|
|
7882
7979
|
var mkIcon = (children) => /* @__PURE__ */ jsx38("svg", { ...SVG_BASE, width: "16", height: "16", children });
|
|
7883
7980
|
var FlowToolbarIcons = {
|
|
7884
7981
|
save: mkIcon(
|
|
7885
|
-
/* @__PURE__ */ jsxs37(
|
|
7982
|
+
/* @__PURE__ */ jsxs37(Fragment10, { children: [
|
|
7886
7983
|
/* @__PURE__ */ jsx38("path", { d: "M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z" }),
|
|
7887
7984
|
/* @__PURE__ */ jsx38("polyline", { points: "17 21 17 13 7 13 7 21" }),
|
|
7888
7985
|
/* @__PURE__ */ jsx38("polyline", { points: "7 3 7 8 15 8" })
|
|
@@ -7891,70 +7988,70 @@ var FlowToolbarIcons = {
|
|
|
7891
7988
|
run: mkIcon(/* @__PURE__ */ jsx38("polygon", { points: "6 4 20 12 6 20 6 4", fill: "currentColor", stroke: "none" })),
|
|
7892
7989
|
stop: mkIcon(/* @__PURE__ */ jsx38("rect", { x: "6", y: "6", width: "12", height: "12", rx: "1" })),
|
|
7893
7990
|
lock: mkIcon(
|
|
7894
|
-
/* @__PURE__ */ jsxs37(
|
|
7991
|
+
/* @__PURE__ */ jsxs37(Fragment10, { children: [
|
|
7895
7992
|
/* @__PURE__ */ jsx38("rect", { x: "4", y: "11", width: "16", height: "10", rx: "2" }),
|
|
7896
7993
|
/* @__PURE__ */ jsx38("path", { d: "M8 11V7a4 4 0 0 1 8 0v4" })
|
|
7897
7994
|
] })
|
|
7898
7995
|
),
|
|
7899
7996
|
unlock: mkIcon(
|
|
7900
|
-
/* @__PURE__ */ jsxs37(
|
|
7997
|
+
/* @__PURE__ */ jsxs37(Fragment10, { children: [
|
|
7901
7998
|
/* @__PURE__ */ jsx38("rect", { x: "4", y: "11", width: "16", height: "10", rx: "2" }),
|
|
7902
7999
|
/* @__PURE__ */ jsx38("path", { d: "M8 11V7a4 4 0 0 1 8 0" })
|
|
7903
8000
|
] })
|
|
7904
8001
|
),
|
|
7905
8002
|
reset: mkIcon(
|
|
7906
|
-
/* @__PURE__ */ jsxs37(
|
|
8003
|
+
/* @__PURE__ */ jsxs37(Fragment10, { children: [
|
|
7907
8004
|
/* @__PURE__ */ jsx38("polyline", { points: "1 4 1 10 7 10" }),
|
|
7908
8005
|
/* @__PURE__ */ jsx38("path", { d: "M3.51 15a9 9 0 1 0 2.13-9.36L1 10" })
|
|
7909
8006
|
] })
|
|
7910
8007
|
),
|
|
7911
8008
|
undo: mkIcon(
|
|
7912
|
-
/* @__PURE__ */ jsxs37(
|
|
8009
|
+
/* @__PURE__ */ jsxs37(Fragment10, { children: [
|
|
7913
8010
|
/* @__PURE__ */ jsx38("path", { d: "M3 7v6h6" }),
|
|
7914
8011
|
/* @__PURE__ */ jsx38("path", { d: "M21 17a9 9 0 0 0-9-9 9 9 0 0 0-7.07 3.43L3 13" })
|
|
7915
8012
|
] })
|
|
7916
8013
|
),
|
|
7917
8014
|
redo: mkIcon(
|
|
7918
|
-
/* @__PURE__ */ jsxs37(
|
|
8015
|
+
/* @__PURE__ */ jsxs37(Fragment10, { children: [
|
|
7919
8016
|
/* @__PURE__ */ jsx38("path", { d: "M21 7v6h-6" }),
|
|
7920
8017
|
/* @__PURE__ */ jsx38("path", { d: "M3 17a9 9 0 0 1 9-9 9 9 0 0 1 7.07 3.43L21 13" })
|
|
7921
8018
|
] })
|
|
7922
8019
|
),
|
|
7923
8020
|
drawerOpen: mkIcon(
|
|
7924
|
-
/* @__PURE__ */ jsxs37(
|
|
8021
|
+
/* @__PURE__ */ jsxs37(Fragment10, { children: [
|
|
7925
8022
|
/* @__PURE__ */ jsx38("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
|
|
7926
8023
|
/* @__PURE__ */ jsx38("line", { x1: "9", y1: "3", x2: "9", y2: "21" }),
|
|
7927
8024
|
/* @__PURE__ */ jsx38("polyline", { points: "13 9 16 12 13 15" })
|
|
7928
8025
|
] })
|
|
7929
8026
|
),
|
|
7930
8027
|
drawerClose: mkIcon(
|
|
7931
|
-
/* @__PURE__ */ jsxs37(
|
|
8028
|
+
/* @__PURE__ */ jsxs37(Fragment10, { children: [
|
|
7932
8029
|
/* @__PURE__ */ jsx38("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
|
|
7933
8030
|
/* @__PURE__ */ jsx38("line", { x1: "9", y1: "3", x2: "9", y2: "21" }),
|
|
7934
8031
|
/* @__PURE__ */ jsx38("polyline", { points: "16 9 13 12 16 15" })
|
|
7935
8032
|
] })
|
|
7936
8033
|
),
|
|
7937
8034
|
settings: mkIcon(
|
|
7938
|
-
/* @__PURE__ */ jsxs37(
|
|
8035
|
+
/* @__PURE__ */ jsxs37(Fragment10, { children: [
|
|
7939
8036
|
/* @__PURE__ */ jsx38("circle", { cx: "12", cy: "12", r: "3" }),
|
|
7940
8037
|
/* @__PURE__ */ jsx38("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z" })
|
|
7941
8038
|
] })
|
|
7942
8039
|
),
|
|
7943
8040
|
history: mkIcon(
|
|
7944
|
-
/* @__PURE__ */ jsxs37(
|
|
8041
|
+
/* @__PURE__ */ jsxs37(Fragment10, { children: [
|
|
7945
8042
|
/* @__PURE__ */ jsx38("path", { d: "M22 12A10 10 0 1 1 12 2" }),
|
|
7946
8043
|
/* @__PURE__ */ jsx38("polyline", { points: "22 2 22 8 16 8" }),
|
|
7947
8044
|
/* @__PURE__ */ jsx38("polyline", { points: "12 7 12 12 15 15" })
|
|
7948
8045
|
] })
|
|
7949
8046
|
),
|
|
7950
8047
|
debug: mkIcon(
|
|
7951
|
-
/* @__PURE__ */ jsxs37(
|
|
8048
|
+
/* @__PURE__ */ jsxs37(Fragment10, { children: [
|
|
7952
8049
|
/* @__PURE__ */ jsx38("polyline", { points: "4 17 10 11 4 5" }),
|
|
7953
8050
|
/* @__PURE__ */ jsx38("line", { x1: "12", y1: "19", x2: "20", y2: "19" })
|
|
7954
8051
|
] })
|
|
7955
8052
|
),
|
|
7956
8053
|
zoomIn: mkIcon(
|
|
7957
|
-
/* @__PURE__ */ jsxs37(
|
|
8054
|
+
/* @__PURE__ */ jsxs37(Fragment10, { children: [
|
|
7958
8055
|
/* @__PURE__ */ jsx38("circle", { cx: "11", cy: "11", r: "7" }),
|
|
7959
8056
|
/* @__PURE__ */ jsx38("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" }),
|
|
7960
8057
|
/* @__PURE__ */ jsx38("line", { x1: "11", y1: "8", x2: "11", y2: "14" }),
|
|
@@ -7962,14 +8059,14 @@ var FlowToolbarIcons = {
|
|
|
7962
8059
|
] })
|
|
7963
8060
|
),
|
|
7964
8061
|
zoomOut: mkIcon(
|
|
7965
|
-
/* @__PURE__ */ jsxs37(
|
|
8062
|
+
/* @__PURE__ */ jsxs37(Fragment10, { children: [
|
|
7966
8063
|
/* @__PURE__ */ jsx38("circle", { cx: "11", cy: "11", r: "7" }),
|
|
7967
8064
|
/* @__PURE__ */ jsx38("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" }),
|
|
7968
8065
|
/* @__PURE__ */ jsx38("line", { x1: "8", y1: "11", x2: "14", y2: "11" })
|
|
7969
8066
|
] })
|
|
7970
8067
|
),
|
|
7971
8068
|
zoomReset: mkIcon(
|
|
7972
|
-
/* @__PURE__ */ jsxs37(
|
|
8069
|
+
/* @__PURE__ */ jsxs37(Fragment10, { children: [
|
|
7973
8070
|
/* @__PURE__ */ jsx38("circle", { cx: "11", cy: "11", r: "7" }),
|
|
7974
8071
|
/* @__PURE__ */ jsx38("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" }),
|
|
7975
8072
|
/* @__PURE__ */ jsx38("polyline", { points: "8 9 8 13 12 13" }),
|
|
@@ -7977,7 +8074,7 @@ var FlowToolbarIcons = {
|
|
|
7977
8074
|
] })
|
|
7978
8075
|
),
|
|
7979
8076
|
fit: mkIcon(
|
|
7980
|
-
/* @__PURE__ */ jsxs37(
|
|
8077
|
+
/* @__PURE__ */ jsxs37(Fragment10, { children: [
|
|
7981
8078
|
/* @__PURE__ */ jsx38("path", { d: "M3 7V5a2 2 0 0 1 2-2h2" }),
|
|
7982
8079
|
/* @__PURE__ */ jsx38("path", { d: "M17 3h2a2 2 0 0 1 2 2v2" }),
|
|
7983
8080
|
/* @__PURE__ */ jsx38("path", { d: "M21 17v2a2 2 0 0 1-2 2h-2" }),
|
|
@@ -8067,9 +8164,9 @@ function FormSection({
|
|
|
8067
8164
|
}
|
|
8068
8165
|
|
|
8069
8166
|
// src/components/HoverCard/HoverCard.tsx
|
|
8070
|
-
import { useCallback as useCallback8, useEffect as
|
|
8167
|
+
import { useCallback as useCallback8, useEffect as useEffect10, useLayoutEffect, useRef as useRef18, useState as useState11 } from "react";
|
|
8071
8168
|
import { createPortal as createPortal3 } from "react-dom";
|
|
8072
|
-
import { Fragment as
|
|
8169
|
+
import { Fragment as Fragment11, jsx as jsx40, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
8073
8170
|
function computePosition(rect, panelRect, placement, offset) {
|
|
8074
8171
|
const cx = rect.left + rect.width / 2;
|
|
8075
8172
|
const cy = rect.top + rect.height / 2;
|
|
@@ -8109,7 +8206,7 @@ function HoverCard({
|
|
|
8109
8206
|
closeTimer.current = null;
|
|
8110
8207
|
}
|
|
8111
8208
|
};
|
|
8112
|
-
|
|
8209
|
+
useEffect10(() => () => clearTimers(), []);
|
|
8113
8210
|
const show = () => {
|
|
8114
8211
|
clearTimers();
|
|
8115
8212
|
openTimer.current = setTimeout(() => setOpen(true), openDelay);
|
|
@@ -8130,7 +8227,7 @@ function HoverCard({
|
|
|
8130
8227
|
const id = requestAnimationFrame(reposition);
|
|
8131
8228
|
return () => cancelAnimationFrame(id);
|
|
8132
8229
|
}, [open, reposition]);
|
|
8133
|
-
|
|
8230
|
+
useEffect10(() => {
|
|
8134
8231
|
if (!open) return;
|
|
8135
8232
|
const h = () => reposition();
|
|
8136
8233
|
window.addEventListener("scroll", h, true);
|
|
@@ -8174,7 +8271,7 @@ function HoverCard({
|
|
|
8174
8271
|
),
|
|
8175
8272
|
document.body
|
|
8176
8273
|
) : null;
|
|
8177
|
-
return /* @__PURE__ */ jsxs39(
|
|
8274
|
+
return /* @__PURE__ */ jsxs39(Fragment11, { children: [
|
|
8178
8275
|
triggerEl,
|
|
8179
8276
|
portal
|
|
8180
8277
|
] });
|
|
@@ -8333,7 +8430,7 @@ Input.displayName = "Input";
|
|
|
8333
8430
|
|
|
8334
8431
|
// src/components/JsonViewer/JsonViewer.tsx
|
|
8335
8432
|
import { useMemo as useMemo8, useState as useState12 } from "react";
|
|
8336
|
-
import { Fragment as
|
|
8433
|
+
import { Fragment as Fragment12, jsx as jsx43, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
8337
8434
|
var VARIANT = {
|
|
8338
8435
|
string: "string",
|
|
8339
8436
|
number: "number",
|
|
@@ -8435,7 +8532,7 @@ function JsonNode({
|
|
|
8435
8532
|
renderKey,
|
|
8436
8533
|
renderKey != null && /* @__PURE__ */ jsx43("span", { className: "ods-json-viewer__colon", children: ":" }),
|
|
8437
8534
|
/* @__PURE__ */ jsx43("span", { className: "ods-json-viewer__bracket", children: openBracket }),
|
|
8438
|
-
!open && /* @__PURE__ */ jsxs42(
|
|
8535
|
+
!open && /* @__PURE__ */ jsxs42(Fragment12, { children: [
|
|
8439
8536
|
/* @__PURE__ */ jsx43("span", { className: "ods-json-viewer__preview", children: isArray ? entries.length === 0 ? "" : `${entries.length} item${entries.length === 1 ? "" : "s"}` : entries.length === 0 ? "" : `${entries.length} key${entries.length === 1 ? "" : "s"}` }),
|
|
8440
8537
|
/* @__PURE__ */ jsx43("span", { className: "ods-json-viewer__bracket", children: closeBracket })
|
|
8441
8538
|
] }),
|
|
@@ -8443,7 +8540,7 @@ function JsonNode({
|
|
|
8443
8540
|
]
|
|
8444
8541
|
}
|
|
8445
8542
|
),
|
|
8446
|
-
open && /* @__PURE__ */ jsxs42(
|
|
8543
|
+
open && /* @__PURE__ */ jsxs42(Fragment12, { children: [
|
|
8447
8544
|
entries.map(([k, v], i) => /* @__PURE__ */ jsx43(
|
|
8448
8545
|
JsonNode,
|
|
8449
8546
|
{
|
|
@@ -8741,7 +8838,7 @@ function LinkButton({
|
|
|
8741
8838
|
import { AnimatePresence as AnimatePresence6, motion as motion9 } from "framer-motion";
|
|
8742
8839
|
import {
|
|
8743
8840
|
useCallback as useCallback9,
|
|
8744
|
-
useEffect as
|
|
8841
|
+
useEffect as useEffect11,
|
|
8745
8842
|
useLayoutEffect as useLayoutEffect2,
|
|
8746
8843
|
useMemo as useMemo9,
|
|
8747
8844
|
useRef as useRef20,
|
|
@@ -8803,7 +8900,7 @@ function MultiSelect({
|
|
|
8803
8900
|
const rect = wrapRef.current.getBoundingClientRect();
|
|
8804
8901
|
setDropdownPos({ top: rect.bottom + 4, left: rect.left, width: rect.width });
|
|
8805
8902
|
}, []);
|
|
8806
|
-
|
|
8903
|
+
useEffect11(() => {
|
|
8807
8904
|
if (!open) return;
|
|
8808
8905
|
updatePosition();
|
|
8809
8906
|
window.addEventListener("scroll", updatePosition, true);
|
|
@@ -8813,7 +8910,7 @@ function MultiSelect({
|
|
|
8813
8910
|
window.removeEventListener("resize", updatePosition);
|
|
8814
8911
|
};
|
|
8815
8912
|
}, [open, updatePosition]);
|
|
8816
|
-
|
|
8913
|
+
useEffect11(() => {
|
|
8817
8914
|
if (!open) return;
|
|
8818
8915
|
const onDoc = (e) => {
|
|
8819
8916
|
const t = e.target;
|
|
@@ -8825,12 +8922,12 @@ function MultiSelect({
|
|
|
8825
8922
|
document.addEventListener("mousedown", onDoc);
|
|
8826
8923
|
return () => document.removeEventListener("mousedown", onDoc);
|
|
8827
8924
|
}, [open]);
|
|
8828
|
-
|
|
8925
|
+
useEffect11(() => {
|
|
8829
8926
|
if (open && showSearch) {
|
|
8830
8927
|
requestAnimationFrame(() => searchRef.current?.focus());
|
|
8831
8928
|
}
|
|
8832
8929
|
}, [open, showSearch]);
|
|
8833
|
-
|
|
8930
|
+
useEffect11(() => setActiveIdx(0), [query, open]);
|
|
8834
8931
|
const [fitCount, setFitCount] = useState13(selectedValues.length);
|
|
8835
8932
|
const [tick, setTick] = useState13(0);
|
|
8836
8933
|
useLayoutEffect2(() => {
|
|
@@ -8859,7 +8956,7 @@ function MultiSelect({
|
|
|
8859
8956
|
if (count < selectedValues.length && count > 0) count = Math.max(1, count - 1);
|
|
8860
8957
|
setFitCount(count);
|
|
8861
8958
|
}, [tick, selectedValues, maxVisibleTags]);
|
|
8862
|
-
|
|
8959
|
+
useEffect11(() => {
|
|
8863
8960
|
if (typeof ResizeObserver === "undefined") return;
|
|
8864
8961
|
const row = tagsRowRef.current;
|
|
8865
8962
|
if (!row) return;
|
|
@@ -9542,9 +9639,9 @@ function PhoneInput({
|
|
|
9542
9639
|
}
|
|
9543
9640
|
|
|
9544
9641
|
// src/components/Popover/Popover.tsx
|
|
9545
|
-
import { useCallback as useCallback12, useEffect as
|
|
9642
|
+
import { useCallback as useCallback12, useEffect as useEffect12, useLayoutEffect as useLayoutEffect3, useRef as useRef22, useState as useState16 } from "react";
|
|
9546
9643
|
import { createPortal as createPortal5 } from "react-dom";
|
|
9547
|
-
import { Fragment as
|
|
9644
|
+
import { Fragment as Fragment13, jsx as jsx54, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
9548
9645
|
function computePosition2(rect, popRect, placement, offset) {
|
|
9549
9646
|
const cx = rect.left + rect.width / 2;
|
|
9550
9647
|
const cy = rect.top + rect.height / 2;
|
|
@@ -9597,7 +9694,7 @@ function Popover({
|
|
|
9597
9694
|
const id = requestAnimationFrame(reposition);
|
|
9598
9695
|
return () => cancelAnimationFrame(id);
|
|
9599
9696
|
}, [open, reposition, content]);
|
|
9600
|
-
|
|
9697
|
+
useEffect12(() => {
|
|
9601
9698
|
if (!open) return;
|
|
9602
9699
|
const onScroll = () => reposition();
|
|
9603
9700
|
window.addEventListener("scroll", onScroll, true);
|
|
@@ -9607,7 +9704,7 @@ function Popover({
|
|
|
9607
9704
|
window.removeEventListener("resize", onScroll);
|
|
9608
9705
|
};
|
|
9609
9706
|
}, [open, reposition]);
|
|
9610
|
-
|
|
9707
|
+
useEffect12(() => {
|
|
9611
9708
|
if (!open || !closeOnClickOutside) return;
|
|
9612
9709
|
const onDoc = (e) => {
|
|
9613
9710
|
const t = e.target;
|
|
@@ -9618,7 +9715,7 @@ function Popover({
|
|
|
9618
9715
|
document.addEventListener("mousedown", onDoc);
|
|
9619
9716
|
return () => document.removeEventListener("mousedown", onDoc);
|
|
9620
9717
|
}, [open, closeOnClickOutside, setOpen]);
|
|
9621
|
-
|
|
9718
|
+
useEffect12(() => {
|
|
9622
9719
|
if (!open || !closeOnEsc) return;
|
|
9623
9720
|
const onKey = (e) => {
|
|
9624
9721
|
if (e.key === "Escape") setOpen(false);
|
|
@@ -9662,7 +9759,7 @@ function Popover({
|
|
|
9662
9759
|
),
|
|
9663
9760
|
document.body
|
|
9664
9761
|
) : null;
|
|
9665
|
-
return /* @__PURE__ */ jsxs53(
|
|
9762
|
+
return /* @__PURE__ */ jsxs53(Fragment13, { children: [
|
|
9666
9763
|
triggerEl,
|
|
9667
9764
|
portal
|
|
9668
9765
|
] });
|
|
@@ -9819,7 +9916,7 @@ function ProgressRing({
|
|
|
9819
9916
|
// src/components/PromptInput/PromptInput.tsx
|
|
9820
9917
|
import {
|
|
9821
9918
|
useCallback as useCallback13,
|
|
9822
|
-
useEffect as
|
|
9919
|
+
useEffect as useEffect13,
|
|
9823
9920
|
useRef as useRef23,
|
|
9824
9921
|
useState as useState17
|
|
9825
9922
|
} from "react";
|
|
@@ -9888,7 +9985,7 @@ function PromptInput({
|
|
|
9888
9985
|
},
|
|
9889
9986
|
[isControlled, onChange]
|
|
9890
9987
|
);
|
|
9891
|
-
|
|
9988
|
+
useEffect13(() => {
|
|
9892
9989
|
const el = taRef.current;
|
|
9893
9990
|
if (!el) return;
|
|
9894
9991
|
const computed = window.getComputedStyle(el);
|
|
@@ -10551,7 +10648,7 @@ function Rating({
|
|
|
10551
10648
|
// src/components/Resizable/Resizable.tsx
|
|
10552
10649
|
import {
|
|
10553
10650
|
useCallback as useCallback14,
|
|
10554
|
-
useEffect as
|
|
10651
|
+
useEffect as useEffect14,
|
|
10555
10652
|
useRef as useRef26,
|
|
10556
10653
|
useState as useState19
|
|
10557
10654
|
} from "react";
|
|
@@ -10592,7 +10689,7 @@ function Resizable({
|
|
|
10592
10689
|
if (internalSplit != null) return internalSplit;
|
|
10593
10690
|
return defaultSplit > 0 && defaultSplit < 1 ? 0 : defaultSplit;
|
|
10594
10691
|
});
|
|
10595
|
-
|
|
10692
|
+
useEffect14(() => {
|
|
10596
10693
|
if (splitProp != null) {
|
|
10597
10694
|
setSplit(splitProp);
|
|
10598
10695
|
return;
|
|
@@ -10625,7 +10722,7 @@ function Resizable({
|
|
|
10625
10722
|
draggingRef.current = true;
|
|
10626
10723
|
setDragging(true);
|
|
10627
10724
|
};
|
|
10628
|
-
|
|
10725
|
+
useEffect14(() => {
|
|
10629
10726
|
const onMove = (e) => {
|
|
10630
10727
|
if (!draggingRef.current) return;
|
|
10631
10728
|
const el = wrapRef.current;
|
|
@@ -10732,7 +10829,7 @@ function ResizablePanel({
|
|
|
10732
10829
|
setDragging(true);
|
|
10733
10830
|
startRef.current = { x: e.clientX, size };
|
|
10734
10831
|
};
|
|
10735
|
-
|
|
10832
|
+
useEffect14(() => {
|
|
10736
10833
|
const onMove = (e) => {
|
|
10737
10834
|
if (!draggingRef.current) return;
|
|
10738
10835
|
const dx = e.clientX - startRef.current.x;
|
|
@@ -10795,10 +10892,10 @@ function Ribbon({
|
|
|
10795
10892
|
|
|
10796
10893
|
// src/components/Select/Select.tsx
|
|
10797
10894
|
import { AnimatePresence as AnimatePresence7, motion as motion10 } from "framer-motion";
|
|
10798
|
-
import { useCallback as useCallback15, useEffect as
|
|
10895
|
+
import { useCallback as useCallback15, useEffect as useEffect15, useMemo as useMemo10, useRef as useRef27, useState as useState20 } from "react";
|
|
10799
10896
|
import { HiddenSelect, useButton as useButton4, useListBox, useOption, useSelect } from "react-aria";
|
|
10800
10897
|
import { createPortal as createPortal6 } from "react-dom";
|
|
10801
|
-
import { Fragment as
|
|
10898
|
+
import { Fragment as Fragment14, jsx as jsx66, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
10802
10899
|
function ListBox(props) {
|
|
10803
10900
|
const ref = useRef27(null);
|
|
10804
10901
|
const { listBoxRef = ref, state } = props;
|
|
@@ -10951,7 +11048,7 @@ function Select({
|
|
|
10951
11048
|
width: rect.width
|
|
10952
11049
|
});
|
|
10953
11050
|
}, []);
|
|
10954
|
-
|
|
11051
|
+
useEffect15(() => {
|
|
10955
11052
|
if (state.isOpen) {
|
|
10956
11053
|
updatePosition();
|
|
10957
11054
|
window.addEventListener("scroll", updatePosition, true);
|
|
@@ -10962,7 +11059,7 @@ function Select({
|
|
|
10962
11059
|
};
|
|
10963
11060
|
}
|
|
10964
11061
|
}, [state.isOpen, updatePosition]);
|
|
10965
|
-
|
|
11062
|
+
useEffect15(() => {
|
|
10966
11063
|
if (state.isOpen && searchable && searchRef.current) {
|
|
10967
11064
|
requestAnimationFrame(() => searchRef.current?.focus());
|
|
10968
11065
|
}
|
|
@@ -10995,7 +11092,7 @@ function Select({
|
|
|
10995
11092
|
"aria-required": required || void 0,
|
|
10996
11093
|
className: cn("ods-select__trigger", state.isOpen && "ods-select__trigger--open"),
|
|
10997
11094
|
children: [
|
|
10998
|
-
/* @__PURE__ */ jsx66("span", { className: "ods-select__value", children: selectedOption ? /* @__PURE__ */ jsxs65(
|
|
11095
|
+
/* @__PURE__ */ jsx66("span", { className: "ods-select__value", children: selectedOption ? /* @__PURE__ */ jsxs65(Fragment14, { children: [
|
|
10999
11096
|
selectedOption.icon && /* @__PURE__ */ jsx66("span", { className: "ods-select__value-icon", children: selectedOption.icon }),
|
|
11000
11097
|
selectedOption.label
|
|
11001
11098
|
] }) : /* @__PURE__ */ jsx66("span", { className: "ods-select__placeholder", children: placeholder }) }),
|
|
@@ -11076,9 +11173,9 @@ function SettingsRow({
|
|
|
11076
11173
|
|
|
11077
11174
|
// src/components/Sheet/Sheet.tsx
|
|
11078
11175
|
import { AnimatePresence as AnimatePresence8, motion as motion11 } from "framer-motion";
|
|
11079
|
-
import { useEffect as
|
|
11176
|
+
import { useEffect as useEffect16 } from "react";
|
|
11080
11177
|
import { createPortal as createPortal7 } from "react-dom";
|
|
11081
|
-
import { Fragment as
|
|
11178
|
+
import { Fragment as Fragment15, jsx as jsx68, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
11082
11179
|
var slideVariants = {
|
|
11083
11180
|
top: { initial: { y: "-100%" }, animate: { y: 0 }, exit: { y: "-100%" } },
|
|
11084
11181
|
bottom: { initial: { y: "100%" }, animate: { y: 0 }, exit: { y: "100%" } },
|
|
@@ -11111,7 +11208,7 @@ function Sheet({
|
|
|
11111
11208
|
dragHandle = true,
|
|
11112
11209
|
className
|
|
11113
11210
|
}) {
|
|
11114
|
-
|
|
11211
|
+
useEffect16(() => {
|
|
11115
11212
|
if (!open || !closeOnEsc) return;
|
|
11116
11213
|
const onKey = (e) => {
|
|
11117
11214
|
if (e.key === "Escape") onClose();
|
|
@@ -11122,7 +11219,7 @@ function Sheet({
|
|
|
11122
11219
|
const variant = slideVariants[side];
|
|
11123
11220
|
const resolved = resolveSize(side, size);
|
|
11124
11221
|
const isVertical = side === "left" || side === "right";
|
|
11125
|
-
const content = /* @__PURE__ */ jsx68(AnimatePresence8, { children: open && /* @__PURE__ */ jsxs67(
|
|
11222
|
+
const content = /* @__PURE__ */ jsx68(AnimatePresence8, { children: open && /* @__PURE__ */ jsxs67(Fragment15, { children: [
|
|
11126
11223
|
/* @__PURE__ */ jsx68(
|
|
11127
11224
|
motion11.div,
|
|
11128
11225
|
{
|
|
@@ -11163,8 +11260,8 @@ function Sheet({
|
|
|
11163
11260
|
}
|
|
11164
11261
|
|
|
11165
11262
|
// src/components/Sidebar/Sidebar.tsx
|
|
11166
|
-
import { useCallback as useCallback16, useEffect as
|
|
11167
|
-
import { Fragment as
|
|
11263
|
+
import { useCallback as useCallback16, useEffect as useEffect17, useRef as useRef28, useState as useState21 } from "react";
|
|
11264
|
+
import { Fragment as Fragment16, jsx as jsx69, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
11168
11265
|
function Sidebar({
|
|
11169
11266
|
variant = "expanded",
|
|
11170
11267
|
brand,
|
|
@@ -11186,7 +11283,7 @@ function Sidebar({
|
|
|
11186
11283
|
}) {
|
|
11187
11284
|
const allSections = sections ?? (items ? [{ items }] : []);
|
|
11188
11285
|
const [internalPinned, setInternalPinned] = useState21(defaultPinned);
|
|
11189
|
-
|
|
11286
|
+
useEffect17(() => {
|
|
11190
11287
|
if (pinnedProp !== void 0) return;
|
|
11191
11288
|
try {
|
|
11192
11289
|
const stored = window.localStorage.getItem(pinStorageKey);
|
|
@@ -11221,7 +11318,7 @@ function Sidebar({
|
|
|
11221
11318
|
closeTimer.current = null;
|
|
11222
11319
|
}
|
|
11223
11320
|
};
|
|
11224
|
-
|
|
11321
|
+
useEffect17(() => () => clearTimers(), []);
|
|
11225
11322
|
const handleEnter = () => {
|
|
11226
11323
|
clearTimers();
|
|
11227
11324
|
openTimer.current = setTimeout(() => setHoverOpen(true), hoverOpenDelay);
|
|
@@ -11233,7 +11330,7 @@ function Sidebar({
|
|
|
11233
11330
|
const autoMode = variant === "auto";
|
|
11234
11331
|
const showAsRail = autoMode ? !pinned : variant === "rail";
|
|
11235
11332
|
const overlayOpen = autoMode && !pinned && hoverOpen;
|
|
11236
|
-
|
|
11333
|
+
useEffect17(() => {
|
|
11237
11334
|
if (!overlayOpen) return;
|
|
11238
11335
|
const handler = (e) => {
|
|
11239
11336
|
if (e.key === "Escape") {
|
|
@@ -11309,7 +11406,7 @@ function RailLayout({
|
|
|
11309
11406
|
tooltipDelay,
|
|
11310
11407
|
suppressTooltips
|
|
11311
11408
|
}) {
|
|
11312
|
-
return /* @__PURE__ */ jsxs68(
|
|
11409
|
+
return /* @__PURE__ */ jsxs68(Fragment16, { children: [
|
|
11313
11410
|
logo && /* @__PURE__ */ jsx69("div", { className: "ods-sidebar__logo-rail", children: logo }),
|
|
11314
11411
|
onToggle && /* @__PURE__ */ jsx69(
|
|
11315
11412
|
"button",
|
|
@@ -11383,23 +11480,24 @@ function RailItem({
|
|
|
11383
11480
|
tooltipDelay,
|
|
11384
11481
|
suppressTooltip
|
|
11385
11482
|
}) {
|
|
11386
|
-
const [
|
|
11483
|
+
const [open, setOpen] = useState21(false);
|
|
11387
11484
|
const timerRef = useRef28(null);
|
|
11485
|
+
const hasChildren = !!(item.children && item.children.length > 0);
|
|
11388
11486
|
const clear = () => {
|
|
11389
11487
|
if (timerRef.current) {
|
|
11390
11488
|
clearTimeout(timerRef.current);
|
|
11391
11489
|
timerRef.current = null;
|
|
11392
11490
|
}
|
|
11393
11491
|
};
|
|
11394
|
-
|
|
11492
|
+
useEffect17(() => () => clear(), []);
|
|
11395
11493
|
const show = () => {
|
|
11396
11494
|
if (suppressTooltip) return;
|
|
11397
11495
|
clear();
|
|
11398
|
-
timerRef.current = setTimeout(() =>
|
|
11496
|
+
timerRef.current = setTimeout(() => setOpen(true), tooltipDelay);
|
|
11399
11497
|
};
|
|
11400
11498
|
const hide = () => {
|
|
11401
11499
|
clear();
|
|
11402
|
-
|
|
11500
|
+
setOpen(false);
|
|
11403
11501
|
};
|
|
11404
11502
|
const Comp = item.href ? "a" : "button";
|
|
11405
11503
|
const labelText = typeof item.label === "string" ? item.label : void 0;
|
|
@@ -11418,13 +11516,20 @@ function RailItem({
|
|
|
11418
11516
|
type: item.href ? void 0 : "button",
|
|
11419
11517
|
href: item.href,
|
|
11420
11518
|
onClick: item.onClick,
|
|
11421
|
-
className: cn(
|
|
11519
|
+
className: cn(
|
|
11520
|
+
"ods-sidebar__rail-item",
|
|
11521
|
+
hasChildren && "ods-sidebar__rail-item--parent",
|
|
11522
|
+
item.active && "ods-sidebar__rail-item--active"
|
|
11523
|
+
),
|
|
11422
11524
|
"aria-current": item.active ? "page" : void 0,
|
|
11423
11525
|
"aria-label": labelText,
|
|
11526
|
+
"aria-haspopup": hasChildren ? "menu" : void 0,
|
|
11527
|
+
"aria-expanded": hasChildren ? open : void 0,
|
|
11424
11528
|
children: /* @__PURE__ */ jsx69("span", { className: "ods-sidebar__rail-icon", children: item.icon })
|
|
11425
11529
|
}
|
|
11426
11530
|
),
|
|
11427
|
-
|
|
11531
|
+
open && labelText && hasChildren && /* @__PURE__ */ jsx69(RailFlyout, { title: labelText, items: item.children ?? [] }),
|
|
11532
|
+
open && labelText && !hasChildren && /* @__PURE__ */ jsxs68("div", { className: "ods-sidebar__rail-tooltip", role: "tooltip", children: [
|
|
11428
11533
|
/* @__PURE__ */ jsx69("span", { className: "ods-sidebar__rail-tooltip-label", children: labelText }),
|
|
11429
11534
|
item.shortcut && /* @__PURE__ */ jsx69("kbd", { className: "ods-sidebar__rail-kbd", children: item.shortcut })
|
|
11430
11535
|
] })
|
|
@@ -11432,6 +11537,34 @@ function RailItem({
|
|
|
11432
11537
|
}
|
|
11433
11538
|
);
|
|
11434
11539
|
}
|
|
11540
|
+
function RailFlyout({ title, items }) {
|
|
11541
|
+
return /* @__PURE__ */ jsxs68("div", { className: "ods-sidebar__rail-flyout", role: "menu", children: [
|
|
11542
|
+
/* @__PURE__ */ jsx69("div", { className: "ods-sidebar__rail-flyout-header", children: /* @__PURE__ */ jsx69("span", { className: "ods-sidebar__rail-flyout-title", children: title }) }),
|
|
11543
|
+
/* @__PURE__ */ jsx69("ul", { className: "ods-sidebar__rail-flyout-list", children: items.map((child) => {
|
|
11544
|
+
const ChildComp = child.href ? "a" : "button";
|
|
11545
|
+
return /* @__PURE__ */ jsx69("li", { children: /* @__PURE__ */ jsxs68(
|
|
11546
|
+
ChildComp,
|
|
11547
|
+
{
|
|
11548
|
+
type: child.href ? void 0 : "button",
|
|
11549
|
+
href: child.href,
|
|
11550
|
+
onClick: child.onClick,
|
|
11551
|
+
role: "menuitem",
|
|
11552
|
+
className: cn(
|
|
11553
|
+
"ods-sidebar__rail-flyout-item",
|
|
11554
|
+
child.active && "ods-sidebar__rail-flyout-item--active"
|
|
11555
|
+
),
|
|
11556
|
+
"aria-current": child.active ? "page" : void 0,
|
|
11557
|
+
children: [
|
|
11558
|
+
/* @__PURE__ */ jsx69("span", { className: "ods-sidebar__rail-flyout-icon", children: child.icon }),
|
|
11559
|
+
/* @__PURE__ */ jsx69("span", { className: "ods-sidebar__rail-flyout-label", children: child.label }),
|
|
11560
|
+
child.tag && /* @__PURE__ */ jsx69("span", { className: "ods-sidebar__rail-flyout-tag", children: child.tag }),
|
|
11561
|
+
child.badge && /* @__PURE__ */ jsx69("span", { className: "ods-sidebar__rail-flyout-badge", children: child.badge })
|
|
11562
|
+
]
|
|
11563
|
+
}
|
|
11564
|
+
) }, child.id);
|
|
11565
|
+
}) })
|
|
11566
|
+
] });
|
|
11567
|
+
}
|
|
11435
11568
|
function ExpandedLayout({
|
|
11436
11569
|
logo,
|
|
11437
11570
|
brand,
|
|
@@ -11442,7 +11575,7 @@ function ExpandedLayout({
|
|
|
11442
11575
|
pinned,
|
|
11443
11576
|
onPinToggle
|
|
11444
11577
|
}) {
|
|
11445
|
-
return /* @__PURE__ */ jsxs68(
|
|
11578
|
+
return /* @__PURE__ */ jsxs68(Fragment16, { children: [
|
|
11446
11579
|
/* @__PURE__ */ jsxs68("div", { className: "ods-sidebar__header", children: [
|
|
11447
11580
|
logo && /* @__PURE__ */ jsx69("div", { className: "ods-sidebar__logo", children: logo }),
|
|
11448
11581
|
brand && /* @__PURE__ */ jsxs68("div", { className: "ods-sidebar__brand", children: [
|
|
@@ -11505,7 +11638,7 @@ function ExpandedItem({ item, level }) {
|
|
|
11505
11638
|
item.defaultExpanded ?? (hasChildren && hasActiveDescendant(item))
|
|
11506
11639
|
);
|
|
11507
11640
|
if (hasChildren) {
|
|
11508
|
-
return /* @__PURE__ */ jsxs68(
|
|
11641
|
+
return /* @__PURE__ */ jsxs68(Fragment16, { children: [
|
|
11509
11642
|
/* @__PURE__ */ jsxs68(
|
|
11510
11643
|
"button",
|
|
11511
11644
|
{
|
|
@@ -11587,7 +11720,7 @@ function ExpandedItem({ item, level }) {
|
|
|
11587
11720
|
}
|
|
11588
11721
|
function SidebarUserCard({ user }) {
|
|
11589
11722
|
const labelText = typeof user.name === "string" ? user.name : "User";
|
|
11590
|
-
const body = /* @__PURE__ */ jsxs68(
|
|
11723
|
+
const body = /* @__PURE__ */ jsxs68(Fragment16, { children: [
|
|
11591
11724
|
/* @__PURE__ */ jsx69("span", { className: "ods-sidebar__user-avatar", children: user.avatar ?? /* @__PURE__ */ jsx69("span", { children: user.initial ?? (typeof user.name === "string" ? user.name.charAt(0).toUpperCase() : "?") }) }),
|
|
11592
11725
|
/* @__PURE__ */ jsxs68("span", { className: "ods-sidebar__user-info", children: [
|
|
11593
11726
|
/* @__PURE__ */ jsx69("span", { className: "ods-sidebar__user-name", children: user.name }),
|
|
@@ -11659,7 +11792,7 @@ import { AnimatePresence as AnimatePresence9, motion as motion12 } from "framer-
|
|
|
11659
11792
|
import { useRef as useRef29 } from "react";
|
|
11660
11793
|
import { FocusScope as FocusScope2, OverlayProvider as OverlayProvider2, useDialog as useDialog2, useModal as useModal2, useOverlay as useOverlay2 } from "react-aria";
|
|
11661
11794
|
import { createPortal as createPortal8 } from "react-dom";
|
|
11662
|
-
import { Fragment as
|
|
11795
|
+
import { Fragment as Fragment17, jsx as jsx71, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
11663
11796
|
var slideVariants2 = {
|
|
11664
11797
|
left: {
|
|
11665
11798
|
initial: { x: "-100%" },
|
|
@@ -11697,7 +11830,7 @@ function SlideoutContent({
|
|
|
11697
11830
|
const { onDrag, onDragStart, onDragEnd, onAnimationStart, ...safeOverlayProps } = overlayProps;
|
|
11698
11831
|
const variant = slideVariants2[position];
|
|
11699
11832
|
const panelWidth = typeof width === "number" ? `${width}px` : width;
|
|
11700
|
-
return /* @__PURE__ */ jsx71(AnimatePresence9, { children: open && /* @__PURE__ */ jsxs69(
|
|
11833
|
+
return /* @__PURE__ */ jsx71(AnimatePresence9, { children: open && /* @__PURE__ */ jsxs69(Fragment17, { children: [
|
|
11701
11834
|
/* @__PURE__ */ jsx71(
|
|
11702
11835
|
motion12.div,
|
|
11703
11836
|
{
|
|
@@ -11913,7 +12046,7 @@ function SocialButton({
|
|
|
11913
12046
|
// src/components/Sortable/Sortable.tsx
|
|
11914
12047
|
import {
|
|
11915
12048
|
useCallback as useCallback17,
|
|
11916
|
-
useEffect as
|
|
12049
|
+
useEffect as useEffect18,
|
|
11917
12050
|
useRef as useRef30,
|
|
11918
12051
|
useState as useState22
|
|
11919
12052
|
} from "react";
|
|
@@ -11996,7 +12129,7 @@ function Sortable({
|
|
|
11996
12129
|
},
|
|
11997
12130
|
[items, onChange]
|
|
11998
12131
|
);
|
|
11999
|
-
|
|
12132
|
+
useEffect18(() => {
|
|
12000
12133
|
if (!autoScroll || !draggingId) return;
|
|
12001
12134
|
const container = containerRef.current;
|
|
12002
12135
|
if (!container) return;
|
|
@@ -12046,7 +12179,7 @@ function Sortable({
|
|
|
12046
12179
|
}
|
|
12047
12180
|
};
|
|
12048
12181
|
}, [autoScroll, autoScrollEdge, draggingId, isVertical]);
|
|
12049
|
-
|
|
12182
|
+
useEffect18(() => {
|
|
12050
12183
|
if (!draggingId) return;
|
|
12051
12184
|
const onKey = (e) => {
|
|
12052
12185
|
if (e.key === "Escape") cancelDrag();
|
|
@@ -12397,7 +12530,7 @@ function Switch({
|
|
|
12397
12530
|
|
|
12398
12531
|
// src/components/Table/Table.tsx
|
|
12399
12532
|
import { useCallback as useCallback18, useState as useState23 } from "react";
|
|
12400
|
-
import { Fragment as
|
|
12533
|
+
import { Fragment as Fragment18, jsx as jsx79, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
12401
12534
|
function Table({
|
|
12402
12535
|
columns,
|
|
12403
12536
|
data,
|
|
@@ -12520,7 +12653,7 @@ function TableRow({
|
|
|
12520
12653
|
}) {
|
|
12521
12654
|
const isSelected = selectedRows?.has(rowIndex) ?? false;
|
|
12522
12655
|
const [expanded, setExpanded] = useState23(false);
|
|
12523
|
-
return /* @__PURE__ */ jsxs76(
|
|
12656
|
+
return /* @__PURE__ */ jsxs76(Fragment18, { children: [
|
|
12524
12657
|
/* @__PURE__ */ jsxs76(
|
|
12525
12658
|
"tr",
|
|
12526
12659
|
{
|
|
@@ -12897,13 +13030,13 @@ function Timeline({ items, size = "md", className }) {
|
|
|
12897
13030
|
|
|
12898
13031
|
// src/components/TimePicker/TimePicker.tsx
|
|
12899
13032
|
import {
|
|
12900
|
-
Fragment as
|
|
13033
|
+
Fragment as Fragment19,
|
|
12901
13034
|
useCallback as useCallback19,
|
|
12902
|
-
useEffect as
|
|
13035
|
+
useEffect as useEffect19,
|
|
12903
13036
|
useRef as useRef34,
|
|
12904
13037
|
useState as useState27
|
|
12905
13038
|
} from "react";
|
|
12906
|
-
import { Fragment as
|
|
13039
|
+
import { Fragment as Fragment20, jsx as jsx85, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
12907
13040
|
var pad = (n) => n.toString().padStart(2, "0");
|
|
12908
13041
|
function format(v, use24h, showSeconds) {
|
|
12909
13042
|
const base = `${pad(v.hours)}:${pad(v.minutes)}${showSeconds ? `:${pad(v.seconds ?? 0)}` : ""}`;
|
|
@@ -12938,7 +13071,7 @@ function TimePicker({
|
|
|
12938
13071
|
const minutesRef = useRef34(null);
|
|
12939
13072
|
const secondsRef = useRef34(null);
|
|
12940
13073
|
const refOf = (s) => s === "hours" ? hoursRef : s === "minutes" ? minutesRef : secondsRef;
|
|
12941
|
-
|
|
13074
|
+
useEffect19(() => {
|
|
12942
13075
|
if (!open) return;
|
|
12943
13076
|
const onDoc = (e) => {
|
|
12944
13077
|
if (!wrapRef.current?.contains(e.target)) {
|
|
@@ -13112,7 +13245,7 @@ function TimePicker({
|
|
|
13112
13245
|
segButton("hours", value.hours),
|
|
13113
13246
|
/* @__PURE__ */ jsx85("span", { className: "ods-timepicker__display-sep", children: ":" }),
|
|
13114
13247
|
segButton("minutes", value.minutes),
|
|
13115
|
-
showSeconds && /* @__PURE__ */ jsxs82(
|
|
13248
|
+
showSeconds && /* @__PURE__ */ jsxs82(Fragment20, { children: [
|
|
13116
13249
|
/* @__PURE__ */ jsx85("span", { className: "ods-timepicker__display-sep", children: ":" }),
|
|
13117
13250
|
segButton("seconds", value.seconds ?? 0)
|
|
13118
13251
|
] })
|
|
@@ -13144,7 +13277,7 @@ function TimePicker({
|
|
|
13144
13277
|
)
|
|
13145
13278
|
] })
|
|
13146
13279
|
] }),
|
|
13147
|
-
/* @__PURE__ */ jsx85("div", { className: "ods-timepicker__body", children: segOrder().map((seg, i, arr) => /* @__PURE__ */ jsxs82(
|
|
13280
|
+
/* @__PURE__ */ jsx85("div", { className: "ods-timepicker__body", children: segOrder().map((seg, i, arr) => /* @__PURE__ */ jsxs82(Fragment19, { children: [
|
|
13148
13281
|
/* @__PURE__ */ jsxs82("div", { className: "ods-timepicker__col", children: [
|
|
13149
13282
|
/* @__PURE__ */ jsx85("span", { className: "ods-timepicker__col-lbl", children: seg === "hours" ? "HOUR" : seg === "minutes" ? "MIN" : "SEC" }),
|
|
13150
13283
|
/* @__PURE__ */ jsx85(
|
|
@@ -13199,8 +13332,8 @@ function TimePicker({
|
|
|
13199
13332
|
}
|
|
13200
13333
|
|
|
13201
13334
|
// src/components/TimezonePicker/TimezonePicker.tsx
|
|
13202
|
-
import { useEffect as
|
|
13203
|
-
import { Fragment as
|
|
13335
|
+
import { useEffect as useEffect20, useMemo as useMemo12, useRef as useRef35, useState as useState28 } from "react";
|
|
13336
|
+
import { Fragment as Fragment21, jsx as jsx86, jsxs as jsxs83 } from "react/jsx-runtime";
|
|
13204
13337
|
var DEFAULT_TZS = [
|
|
13205
13338
|
{ iana: "America/Los_Angeles", label: "Pacific Time", offset: "UTC\u22128" },
|
|
13206
13339
|
{ iana: "America/Denver", label: "Mountain Time", offset: "UTC\u22127" },
|
|
@@ -13239,7 +13372,7 @@ function TimezonePicker({
|
|
|
13239
13372
|
(o) => o.iana.toLowerCase().includes(q) || o.label.toLowerCase().includes(q) || o.offset.toLowerCase().includes(q) || o.region?.toLowerCase().includes(q)
|
|
13240
13373
|
);
|
|
13241
13374
|
}, [options, query]);
|
|
13242
|
-
|
|
13375
|
+
useEffect20(() => {
|
|
13243
13376
|
if (!open) return;
|
|
13244
13377
|
const onDoc = (e) => {
|
|
13245
13378
|
if (!wrapRef.current?.contains(e.target)) {
|
|
@@ -13250,7 +13383,7 @@ function TimezonePicker({
|
|
|
13250
13383
|
document.addEventListener("mousedown", onDoc);
|
|
13251
13384
|
return () => document.removeEventListener("mousedown", onDoc);
|
|
13252
13385
|
}, [open]);
|
|
13253
|
-
|
|
13386
|
+
useEffect20(() => {
|
|
13254
13387
|
if (open) requestAnimationFrame(() => inputRef.current?.focus());
|
|
13255
13388
|
}, [open]);
|
|
13256
13389
|
const select = (iana) => {
|
|
@@ -13293,7 +13426,7 @@ function TimezonePicker({
|
|
|
13293
13426
|
}
|
|
13294
13427
|
)
|
|
13295
13428
|
] }),
|
|
13296
|
-
/* @__PURE__ */ jsx86("span", { className: "ods-tzpicker__info", children: selected ? /* @__PURE__ */ jsxs83(
|
|
13429
|
+
/* @__PURE__ */ jsx86("span", { className: "ods-tzpicker__info", children: selected ? /* @__PURE__ */ jsxs83(Fragment21, { children: [
|
|
13297
13430
|
/* @__PURE__ */ jsx86("span", { className: "ods-tzpicker__name", children: selected.label }),
|
|
13298
13431
|
/* @__PURE__ */ jsxs83("span", { className: "ods-tzpicker__meta", children: [
|
|
13299
13432
|
selected.iana.split("/").pop()?.replace(/_/g, " "),
|
|
@@ -13412,7 +13545,7 @@ import {
|
|
|
13412
13545
|
useState as useState29
|
|
13413
13546
|
} from "react";
|
|
13414
13547
|
import { createPortal as createPortal9 } from "react-dom";
|
|
13415
|
-
import { Fragment as
|
|
13548
|
+
import { Fragment as Fragment22, jsx as jsx87, jsxs as jsxs84 } from "react/jsx-runtime";
|
|
13416
13549
|
var defaultIcons = {
|
|
13417
13550
|
success: /* @__PURE__ */ jsxs84("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
13418
13551
|
/* @__PURE__ */ jsx87("circle", { cx: "8", cy: "8", r: "7", fill: "var(--ods-status-success-bg)", stroke: "var(--ods-status-success-bd)" }),
|
|
@@ -13467,9 +13600,9 @@ var defaultIcons = {
|
|
|
13467
13600
|
var ToastContext = createContext2(null);
|
|
13468
13601
|
function ToastBody({ item, onDismiss }) {
|
|
13469
13602
|
const dismiss = () => onDismiss(item.id);
|
|
13470
|
-
if (item.render) return /* @__PURE__ */ jsx87(
|
|
13603
|
+
if (item.render) return /* @__PURE__ */ jsx87(Fragment22, { children: item.render({ id: item.id, dismiss }) });
|
|
13471
13604
|
const title = item.title ?? item.message;
|
|
13472
|
-
return /* @__PURE__ */ jsxs84(
|
|
13605
|
+
return /* @__PURE__ */ jsxs84(Fragment22, { children: [
|
|
13473
13606
|
/* @__PURE__ */ jsx87("span", { className: "ods-toast__icon", "aria-hidden": "true", children: item.icon ?? defaultIcons[item.variant] }),
|
|
13474
13607
|
/* @__PURE__ */ jsxs84("div", { className: "ods-toast__body", children: [
|
|
13475
13608
|
title && /* @__PURE__ */ jsx87("div", { className: "ods-toast__title", children: title }),
|
|
@@ -13665,7 +13798,7 @@ function ToastProvider({
|
|
|
13665
13798
|
return out;
|
|
13666
13799
|
}, [toasts]);
|
|
13667
13800
|
const ctx = { toast, dismiss, dismissAll };
|
|
13668
|
-
const containers = /* @__PURE__ */ jsx87(
|
|
13801
|
+
const containers = /* @__PURE__ */ jsx87(Fragment22, { children: POSITIONS.map((pos) => {
|
|
13669
13802
|
const list = groups[pos];
|
|
13670
13803
|
if (list.length === 0) return null;
|
|
13671
13804
|
return /* @__PURE__ */ jsx87(
|
|
@@ -13871,14 +14004,14 @@ import { AnimatePresence as AnimatePresence11, motion as motion15 } from "framer
|
|
|
13871
14004
|
import {
|
|
13872
14005
|
cloneElement,
|
|
13873
14006
|
useCallback as useCallback21,
|
|
13874
|
-
useEffect as
|
|
14007
|
+
useEffect as useEffect21,
|
|
13875
14008
|
useLayoutEffect as useLayoutEffect4,
|
|
13876
14009
|
useRef as useRef37,
|
|
13877
14010
|
useState as useState30
|
|
13878
14011
|
} from "react";
|
|
13879
14012
|
import { useTooltip, useTooltipTrigger } from "react-aria";
|
|
13880
14013
|
import { createPortal as createPortal10 } from "react-dom";
|
|
13881
|
-
import { Fragment as
|
|
14014
|
+
import { Fragment as Fragment23, jsx as jsx91, jsxs as jsxs88 } from "react/jsx-runtime";
|
|
13882
14015
|
function computePosition3(rect, tipRect, position, offset) {
|
|
13883
14016
|
const cx = rect.left + rect.width / 2;
|
|
13884
14017
|
const cy = rect.top + rect.height / 2;
|
|
@@ -13922,7 +14055,7 @@ function TooltipContent({
|
|
|
13922
14055
|
const id = requestAnimationFrame(reposition);
|
|
13923
14056
|
return () => cancelAnimationFrame(id);
|
|
13924
14057
|
}, [state.isOpen, reposition]);
|
|
13925
|
-
|
|
14058
|
+
useEffect21(() => {
|
|
13926
14059
|
if (!state.isOpen) return;
|
|
13927
14060
|
const handler = () => reposition();
|
|
13928
14061
|
window.addEventListener("scroll", handler, true);
|
|
@@ -13981,7 +14114,7 @@ function Tooltip({
|
|
|
13981
14114
|
const triggerRef = useRef37(null);
|
|
13982
14115
|
const state = $3834487504f4fc00$export$4d40659c25ecb50b({ delay });
|
|
13983
14116
|
const { triggerProps } = useTooltipTrigger({ delay }, state, triggerRef);
|
|
13984
|
-
return /* @__PURE__ */ jsxs88(
|
|
14117
|
+
return /* @__PURE__ */ jsxs88(Fragment23, { children: [
|
|
13985
14118
|
cloneElement(children, {
|
|
13986
14119
|
...triggerProps,
|
|
13987
14120
|
ref: triggerRef
|
|
@@ -15251,7 +15384,7 @@ function DefaultEmptyState() {
|
|
|
15251
15384
|
|
|
15252
15385
|
// src/components/XmlViewer/XmlViewer.tsx
|
|
15253
15386
|
import { useMemo as useMemo16, useState as useState33 } from "react";
|
|
15254
|
-
import { Fragment as
|
|
15387
|
+
import { Fragment as Fragment24, jsx as jsx96, jsxs as jsxs93 } from "react/jsx-runtime";
|
|
15255
15388
|
function parseXml(src) {
|
|
15256
15389
|
if (typeof window !== "undefined" && typeof window.DOMParser !== "undefined") {
|
|
15257
15390
|
try {
|
|
@@ -15392,9 +15525,9 @@ function XmlNodeRow({
|
|
|
15392
15525
|
/* @__PURE__ */ jsx96("span", { className: "ods-xml-viewer__attr-eq", children: "=" }),
|
|
15393
15526
|
/* @__PURE__ */ jsx96("span", { className: "ods-xml-viewer__attr-value", children: `"${v}"` })
|
|
15394
15527
|
] }, k)),
|
|
15395
|
-
isSelfClosing ? /* @__PURE__ */ jsx96("span", { className: "ods-xml-viewer__bracket", children: " />" }) : /* @__PURE__ */ jsxs93(
|
|
15528
|
+
isSelfClosing ? /* @__PURE__ */ jsx96("span", { className: "ods-xml-viewer__bracket", children: " />" }) : /* @__PURE__ */ jsxs93(Fragment24, { children: [
|
|
15396
15529
|
/* @__PURE__ */ jsx96("span", { className: "ods-xml-viewer__bracket", children: ">" }),
|
|
15397
|
-
!open && /* @__PURE__ */ jsxs93(
|
|
15530
|
+
!open && /* @__PURE__ */ jsxs93(Fragment24, { children: [
|
|
15398
15531
|
/* @__PURE__ */ jsxs93("span", { className: "ods-xml-viewer__preview", children: [
|
|
15399
15532
|
children.length,
|
|
15400
15533
|
" child",
|
|
@@ -15408,7 +15541,7 @@ function XmlNodeRow({
|
|
|
15408
15541
|
]
|
|
15409
15542
|
}
|
|
15410
15543
|
),
|
|
15411
|
-
!isSelfClosing && open && /* @__PURE__ */ jsxs93(
|
|
15544
|
+
!isSelfClosing && open && /* @__PURE__ */ jsxs93(Fragment24, { children: [
|
|
15412
15545
|
children.map((c, i) => /* @__PURE__ */ jsx96(
|
|
15413
15546
|
XmlNodeRow,
|
|
15414
15547
|
{
|
|
@@ -15432,7 +15565,7 @@ function XmlNodeRow({
|
|
|
15432
15565
|
|
|
15433
15566
|
// src/components/YamlViewer/YamlViewer.tsx
|
|
15434
15567
|
import { useMemo as useMemo17, useState as useState34 } from "react";
|
|
15435
|
-
import { Fragment as
|
|
15568
|
+
import { Fragment as Fragment25, jsx as jsx97, jsxs as jsxs94 } from "react/jsx-runtime";
|
|
15436
15569
|
function toYaml(value, indent = 0) {
|
|
15437
15570
|
const pad2 = " ".repeat(indent);
|
|
15438
15571
|
if (value === null) return "null";
|
|
@@ -15649,7 +15782,7 @@ function YamlViewer({
|
|
|
15649
15782
|
}
|
|
15650
15783
|
) : /* @__PURE__ */ jsx97("span", { className: "ods-yaml-viewer__caret-spacer" }),
|
|
15651
15784
|
t.kind === "comment" && /* @__PURE__ */ jsx97("span", { className: "ods-yaml-viewer__comment", children: t.raw.trim() }),
|
|
15652
|
-
t.kind === "key" && /* @__PURE__ */ jsxs94(
|
|
15785
|
+
t.kind === "key" && /* @__PURE__ */ jsxs94(Fragment25, { children: [
|
|
15653
15786
|
t.raw.trim().startsWith("-") && /* @__PURE__ */ jsx97("span", { className: "ods-yaml-viewer__dash", children: "- " }),
|
|
15654
15787
|
/* @__PURE__ */ jsx97("span", { className: "ods-yaml-viewer__key", children: t.key }),
|
|
15655
15788
|
/* @__PURE__ */ jsx97("span", { className: "ods-yaml-viewer__colon", children: ":" }),
|
|
@@ -15668,7 +15801,7 @@ function YamlViewer({
|
|
|
15668
15801
|
),
|
|
15669
15802
|
isCollapsed && /* @__PURE__ */ jsx97("span", { className: "ods-yaml-viewer__preview", children: " \u2026" })
|
|
15670
15803
|
] }),
|
|
15671
|
-
t.kind === "sequence" && /* @__PURE__ */ jsxs94(
|
|
15804
|
+
t.kind === "sequence" && /* @__PURE__ */ jsxs94(Fragment25, { children: [
|
|
15672
15805
|
/* @__PURE__ */ jsx97("span", { className: "ods-yaml-viewer__dash", children: "- " }),
|
|
15673
15806
|
/* @__PURE__ */ jsx97(
|
|
15674
15807
|
"span",
|
|
@@ -15702,13 +15835,13 @@ function YamlViewer({
|
|
|
15702
15835
|
|
|
15703
15836
|
// src/provider/OdsProvider.tsx
|
|
15704
15837
|
import { generateCssVars, resolveConfig } from "@octaviaflow/config";
|
|
15705
|
-
import { createContext as createContext3, useContext as useContext3, useEffect as
|
|
15838
|
+
import { createContext as createContext3, useContext as useContext3, useEffect as useEffect22, useMemo as useMemo18 } from "react";
|
|
15706
15839
|
import { OverlayProvider as OverlayProvider3 } from "react-aria";
|
|
15707
15840
|
import { jsx as jsx98 } from "react/jsx-runtime";
|
|
15708
15841
|
var OdsContext = createContext3(null);
|
|
15709
15842
|
function OdsProvider({ config: userConfig, children }) {
|
|
15710
15843
|
const resolved = useMemo18(() => resolveConfig(userConfig), [userConfig]);
|
|
15711
|
-
|
|
15844
|
+
useEffect22(() => {
|
|
15712
15845
|
const cssVarsBlock = generateCssVars(resolved);
|
|
15713
15846
|
const match = cssVarsBlock.match(/:root\s*\{([\s\S]*)\}/);
|
|
15714
15847
|
if (match) {
|