@almadar/ui 2.32.0 → 2.34.0
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/avl/index.cjs +1049 -1086
- package/dist/avl/index.d.cts +352 -78
- package/dist/avl/index.d.ts +18 -3
- package/dist/avl/index.js +1029 -1086
- package/dist/components/atoms/index.d.ts +0 -1
- package/dist/components/index.cjs +1156 -1857
- package/dist/components/index.js +276 -962
- package/dist/components/molecules/avl/AvlBackwardEdge.d.ts +8 -0
- package/dist/components/molecules/avl/AvlBindingEdge.d.ts +9 -0
- package/dist/components/molecules/avl/AvlEventWireEdge.d.ts +14 -0
- package/dist/components/molecules/avl/AvlOrbitalNode.d.ts +12 -0
- package/dist/components/molecules/avl/AvlPageEdge.d.ts +8 -0
- package/dist/components/molecules/avl/AvlTransitionEdge.d.ts +16 -0
- package/dist/components/molecules/avl/BehaviorView.d.ts +12 -0
- package/dist/components/molecules/avl/DetailView.d.ts +13 -0
- package/dist/components/molecules/avl/MiniStateMachine.d.ts +14 -0
- package/dist/components/molecules/avl/ModuleCard.d.ts +14 -0
- package/dist/components/molecules/avl/SystemNode.d.ts +12 -0
- package/dist/components/molecules/avl/avl-canvas-types.d.ts +36 -0
- package/dist/components/molecules/avl/avl-elk-layout.d.ts +55 -0
- package/dist/components/molecules/avl/avl-flow-converter.d.ts +17 -0
- package/dist/components/molecules/avl/avl-story-schemas.d.ts +34 -0
- package/dist/components/molecules/avl/avl-zoom-band.d.ts +19 -0
- package/dist/components/molecules/avl/index.d.ts +15 -0
- package/dist/components/molecules/index.d.ts +0 -1
- package/dist/components/organisms/avl/AvlCosmicZoom.d.ts +10 -7
- package/dist/components/organisms/avl/FlowCanvas.d.ts +32 -0
- package/dist/components/organisms/avl/ZoomBreadcrumb.d.ts +16 -0
- package/dist/components/organisms/avl/ZoomLegend.d.ts +10 -0
- package/dist/components/organisms/avl/index.d.ts +5 -2
- package/dist/providers/index.cjs +148 -149
- package/dist/providers/index.js +39 -40
- package/dist/runtime/index.cjs +1055 -1030
- package/dist/runtime/index.js +270 -245
- package/dist/scripts/audit-tailwind-safelist.d.ts +27 -0
- package/package.json +2 -6
- package/tailwind-preset.cjs +170 -1
- package/dist/components/atoms/flow/FlowLabel.d.ts +0 -23
- package/dist/components/atoms/flow/FlowMinimap.d.ts +0 -28
- package/dist/components/atoms/flow/FlowNodeShell.d.ts +0 -25
- package/dist/components/atoms/flow/FlowPort.d.ts +0 -26
- package/dist/components/atoms/flow/FlowWire.d.ts +0 -39
- package/dist/components/atoms/flow/index.d.ts +0 -13
- package/dist/components/molecules/flow/BehaviorNode.d.ts +0 -28
- package/dist/components/molecules/flow/EffectNode.d.ts +0 -26
- package/dist/components/molecules/flow/EventWireEdge.d.ts +0 -23
- package/dist/components/molecules/flow/ExprNode.d.ts +0 -27
- package/dist/components/molecules/flow/FlowStateNode.d.ts +0 -18
- package/dist/components/molecules/flow/NodePalette.d.ts +0 -36
- package/dist/components/molecules/flow/OrbitalNode.d.ts +0 -31
- package/dist/components/molecules/flow/TransitionEdge.d.ts +0 -26
- package/dist/components/molecules/flow/index.d.ts +0 -8
- package/dist/components/molecules/svg/AIGenerates.d.ts +0 -7
- package/dist/components/molecules/svg/ClosedCircuit.d.ts +0 -7
- package/dist/components/molecules/svg/CommunityOwnership.d.ts +0 -7
- package/dist/components/molecules/svg/CompileAnywhere.d.ts +0 -7
- package/dist/components/molecules/svg/ComposableModels.d.ts +0 -7
- package/dist/components/molecules/svg/DescribeProveDeploy.d.ts +0 -7
- package/dist/components/molecules/svg/DomainGrid.d.ts +0 -7
- package/dist/components/molecules/svg/EventBus.d.ts +0 -7
- package/dist/components/molecules/svg/OrbitalUnit.d.ts +0 -7
- package/dist/components/molecules/svg/PlanVerifyRemember.d.ts +0 -7
- package/dist/components/molecules/svg/ProveCorrect.d.ts +0 -7
- package/dist/components/molecules/svg/ServiceLayers.d.ts +0 -7
- package/dist/components/molecules/svg/SharedReality.d.ts +0 -7
- package/dist/components/molecules/svg/StandardLibrary.d.ts +0 -7
- package/dist/components/molecules/svg/StateMachine.d.ts +0 -7
- package/dist/components/molecules/svg/WorldModel.d.ts +0 -7
- package/dist/components/molecules/svg/index.d.ts +0 -16
- package/dist/components/organisms/avl/AvlApplicationScene.d.ts +0 -17
- package/dist/components/organisms/avl/AvlOrbitalScene.d.ts +0 -21
- package/dist/flow/index.cjs +0 -3832
- package/dist/flow/index.d.cts +0 -367
- package/dist/flow/index.d.ts +0 -10
- package/dist/flow/index.js +0 -3793
- package/dist/illustrations/index.cjs +0 -7651
- package/dist/illustrations/index.d.cts +0 -544
- package/dist/illustrations/index.d.ts +0 -59
- package/dist/illustrations/index.js +0 -7594
package/dist/runtime/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React117 from 'react';
|
|
2
|
+
import React117__default, { createContext, useCallback, useState, useRef, useEffect, useLayoutEffect, lazy, useContext, useMemo, Suspense, useSyncExternalStore, useId } from 'react';
|
|
3
3
|
import { EventBusContext } from '@almadar/ui/providers';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import '@tanstack/react-query';
|
|
@@ -23,7 +23,6 @@ import remarkMath from 'remark-math';
|
|
|
23
23
|
import rehypeKatex from 'rehype-katex';
|
|
24
24
|
import SyntaxHighlighter from 'react-syntax-highlighter/dist/esm/prism';
|
|
25
25
|
import dark from 'react-syntax-highlighter/dist/esm/styles/prism/vsc-dark-plus';
|
|
26
|
-
import '@xyflow/react';
|
|
27
26
|
|
|
28
27
|
var __defProp = Object.defineProperty;
|
|
29
28
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
@@ -1615,7 +1614,7 @@ var positionStyles = {
|
|
|
1615
1614
|
fixed: "fixed",
|
|
1616
1615
|
sticky: "sticky"
|
|
1617
1616
|
};
|
|
1618
|
-
var Box =
|
|
1617
|
+
var Box = React117__default.forwardRef(
|
|
1619
1618
|
({
|
|
1620
1619
|
padding,
|
|
1621
1620
|
paddingX,
|
|
@@ -1784,7 +1783,7 @@ var Typography = ({
|
|
|
1784
1783
|
align,
|
|
1785
1784
|
weight,
|
|
1786
1785
|
size,
|
|
1787
|
-
truncate
|
|
1786
|
+
truncate = false,
|
|
1788
1787
|
overflow,
|
|
1789
1788
|
as,
|
|
1790
1789
|
id,
|
|
@@ -1806,7 +1805,7 @@ var Typography = ({
|
|
|
1806
1805
|
weight && weightStyles[weight],
|
|
1807
1806
|
size && typographySizeStyles[size],
|
|
1808
1807
|
align && `text-${align}`,
|
|
1809
|
-
|
|
1808
|
+
truncate && "truncate overflow-hidden text-ellipsis",
|
|
1810
1809
|
overflow && overflowStyles2[overflow],
|
|
1811
1810
|
className
|
|
1812
1811
|
),
|
|
@@ -2100,7 +2099,7 @@ function subscribeToStore(listener) {
|
|
|
2100
2099
|
function useEntityRef(entityType) {
|
|
2101
2100
|
const versionRef = useRef(0);
|
|
2102
2101
|
const dataRef = useRef([]);
|
|
2103
|
-
const getSnapshotStable =
|
|
2102
|
+
const getSnapshotStable = React117__default.useCallback(() => {
|
|
2104
2103
|
const currentVersion = getVersion(entityType);
|
|
2105
2104
|
if (currentVersion !== versionRef.current) {
|
|
2106
2105
|
versionRef.current = currentVersion;
|
|
@@ -2335,10 +2334,11 @@ var Overlay = ({
|
|
|
2335
2334
|
"div",
|
|
2336
2335
|
{
|
|
2337
2336
|
className: cn(
|
|
2338
|
-
"fixed inset-0 z-40
|
|
2337
|
+
"fixed inset-0 z-40",
|
|
2339
2338
|
blur && "backdrop-blur-sm",
|
|
2340
2339
|
className
|
|
2341
2340
|
),
|
|
2341
|
+
style: { backgroundColor: "rgba(0, 0, 0, 0.6)" },
|
|
2342
2342
|
onClick: action || onClick ? handleClick : void 0,
|
|
2343
2343
|
"aria-hidden": "true"
|
|
2344
2344
|
}
|
|
@@ -2346,11 +2346,18 @@ var Overlay = ({
|
|
|
2346
2346
|
};
|
|
2347
2347
|
var sizeClasses2 = {
|
|
2348
2348
|
sm: "max-w-md",
|
|
2349
|
-
md: "max-w-
|
|
2350
|
-
lg: "max-w-
|
|
2351
|
-
xl: "max-w-
|
|
2349
|
+
md: "max-w-2xl",
|
|
2350
|
+
lg: "max-w-3xl",
|
|
2351
|
+
xl: "max-w-5xl",
|
|
2352
2352
|
full: "max-w-full mx-4"
|
|
2353
2353
|
};
|
|
2354
|
+
var minWidths = {
|
|
2355
|
+
sm: "400px",
|
|
2356
|
+
md: "520px",
|
|
2357
|
+
lg: "600px",
|
|
2358
|
+
xl: "700px",
|
|
2359
|
+
full: "0"
|
|
2360
|
+
};
|
|
2354
2361
|
var Modal = ({
|
|
2355
2362
|
isOpen = true,
|
|
2356
2363
|
onClose = () => {
|
|
@@ -2424,102 +2431,113 @@ var Modal = ({
|
|
|
2424
2431
|
className: "z-40"
|
|
2425
2432
|
}
|
|
2426
2433
|
),
|
|
2427
|
-
/* @__PURE__ */ jsx(
|
|
2428
|
-
"
|
|
2429
|
-
"flex items-center justify-center p-4",
|
|
2430
|
-
"max-sm:items-end max-sm:p-0"
|
|
2431
|
-
), children: /* @__PURE__ */ jsxs(
|
|
2432
|
-
Box,
|
|
2434
|
+
/* @__PURE__ */ jsx(
|
|
2435
|
+
"div",
|
|
2433
2436
|
{
|
|
2434
|
-
ref: modalRef,
|
|
2435
|
-
bg: "surface",
|
|
2436
|
-
border: true,
|
|
2437
|
-
shadow: "lg",
|
|
2438
|
-
rounded: "md",
|
|
2439
2437
|
className: cn(
|
|
2440
|
-
"
|
|
2441
|
-
|
|
2442
|
-
"max-sm:
|
|
2443
|
-
className
|
|
2438
|
+
"fixed inset-0 z-50 pointer-events-none",
|
|
2439
|
+
"flex items-start justify-center px-4 pb-4",
|
|
2440
|
+
"max-sm:items-end max-sm:p-0"
|
|
2444
2441
|
),
|
|
2445
|
-
style:
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2442
|
+
style: { paddingTop: "10vh" },
|
|
2443
|
+
children: /* @__PURE__ */ jsxs(
|
|
2444
|
+
Box,
|
|
2445
|
+
{
|
|
2446
|
+
ref: modalRef,
|
|
2447
|
+
bg: "surface",
|
|
2448
|
+
border: true,
|
|
2449
|
+
shadow: "lg",
|
|
2450
|
+
rounded: "md",
|
|
2451
|
+
className: cn(
|
|
2452
|
+
"pointer-events-auto w-full flex flex-col",
|
|
2453
|
+
sizeClasses2[size],
|
|
2454
|
+
"max-sm:max-w-full max-sm:rounded-b-none max-sm:rounded-t-2xl",
|
|
2455
|
+
className
|
|
2456
|
+
),
|
|
2457
|
+
style: {
|
|
2458
|
+
minWidth: minWidths[size],
|
|
2459
|
+
maxHeight: "80vh",
|
|
2460
|
+
...dragY > 0 && {
|
|
2461
|
+
transform: `translateY(${dragY}px)`,
|
|
2462
|
+
transition: isDragging.current ? "none" : "transform 200ms ease-out"
|
|
2463
|
+
}
|
|
2464
|
+
},
|
|
2465
|
+
role: "dialog",
|
|
2466
|
+
"aria-modal": "true",
|
|
2467
|
+
...title && { "aria-labelledby": "modal-title" },
|
|
2468
|
+
children: [
|
|
2469
|
+
/* @__PURE__ */ jsx(
|
|
2470
|
+
"div",
|
|
2471
|
+
{
|
|
2472
|
+
className: "hidden max-sm:flex justify-center py-2 cursor-grab active:cursor-grabbing touch-none",
|
|
2473
|
+
onPointerDown: (e) => {
|
|
2474
|
+
if (!swipeDownToClose) return;
|
|
2475
|
+
dragStartY.current = e.clientY;
|
|
2476
|
+
isDragging.current = true;
|
|
2477
|
+
e.target.setPointerCapture(e.pointerId);
|
|
2478
|
+
},
|
|
2479
|
+
onPointerMove: (e) => {
|
|
2480
|
+
if (!isDragging.current) return;
|
|
2481
|
+
const dy = Math.max(0, e.clientY - dragStartY.current);
|
|
2482
|
+
setDragY(dy);
|
|
2483
|
+
},
|
|
2484
|
+
onPointerUp: () => {
|
|
2485
|
+
if (!isDragging.current) return;
|
|
2486
|
+
isDragging.current = false;
|
|
2487
|
+
if (dragY > 100) {
|
|
2488
|
+
handleClose();
|
|
2489
|
+
}
|
|
2490
|
+
setDragY(0);
|
|
2491
|
+
},
|
|
2492
|
+
onPointerCancel: () => {
|
|
2493
|
+
isDragging.current = false;
|
|
2494
|
+
setDragY(0);
|
|
2495
|
+
},
|
|
2496
|
+
children: /* @__PURE__ */ jsx("div", { className: "w-10 h-1 rounded-full bg-border" })
|
|
2473
2497
|
}
|
|
2474
|
-
setDragY(0);
|
|
2475
|
-
},
|
|
2476
|
-
onPointerCancel: () => {
|
|
2477
|
-
isDragging.current = false;
|
|
2478
|
-
setDragY(0);
|
|
2479
|
-
},
|
|
2480
|
-
children: /* @__PURE__ */ jsx("div", { className: "w-10 h-1 rounded-full bg-border" })
|
|
2481
|
-
}
|
|
2482
|
-
),
|
|
2483
|
-
(title || showCloseButton) && /* @__PURE__ */ jsxs(
|
|
2484
|
-
"div",
|
|
2485
|
-
{
|
|
2486
|
-
className: cn(
|
|
2487
|
-
"px-6 py-4 flex items-center justify-between",
|
|
2488
|
-
"border-b-[length:var(--border-width)] border-border"
|
|
2489
2498
|
),
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
"
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
"border-t-[length:var(--border-width)] border-border"
|
|
2499
|
+
(title || showCloseButton) && /* @__PURE__ */ jsxs(
|
|
2500
|
+
"div",
|
|
2501
|
+
{
|
|
2502
|
+
className: cn(
|
|
2503
|
+
"px-6 py-4 flex items-center justify-between",
|
|
2504
|
+
"border-b-[length:var(--border-width)] border-border"
|
|
2505
|
+
),
|
|
2506
|
+
children: [
|
|
2507
|
+
title && /* @__PURE__ */ jsx(Typography, { variant: "h4", as: "h2", id: "modal-title", children: title }),
|
|
2508
|
+
showCloseButton && /* @__PURE__ */ jsx(
|
|
2509
|
+
"button",
|
|
2510
|
+
{
|
|
2511
|
+
type: "button",
|
|
2512
|
+
onClick: handleClose,
|
|
2513
|
+
"data-event": "CLOSE",
|
|
2514
|
+
className: cn(
|
|
2515
|
+
"p-1 transition-colors rounded-sm",
|
|
2516
|
+
"hover:bg-muted"
|
|
2517
|
+
),
|
|
2518
|
+
"aria-label": "Close modal",
|
|
2519
|
+
children: /* @__PURE__ */ jsx(Icon, { icon: X, size: "md" })
|
|
2520
|
+
}
|
|
2521
|
+
)
|
|
2522
|
+
]
|
|
2523
|
+
}
|
|
2516
2524
|
),
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2525
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto p-6", children }),
|
|
2526
|
+
footer && /* @__PURE__ */ jsx(
|
|
2527
|
+
"div",
|
|
2528
|
+
{
|
|
2529
|
+
className: cn(
|
|
2530
|
+
"px-6 py-4 bg-muted",
|
|
2531
|
+
"border-t-[length:var(--border-width)] border-border"
|
|
2532
|
+
),
|
|
2533
|
+
children: footer
|
|
2534
|
+
}
|
|
2535
|
+
)
|
|
2536
|
+
]
|
|
2537
|
+
}
|
|
2538
|
+
)
|
|
2521
2539
|
}
|
|
2522
|
-
)
|
|
2540
|
+
)
|
|
2523
2541
|
] });
|
|
2524
2542
|
};
|
|
2525
2543
|
Modal.displayName = "Modal";
|
|
@@ -2765,7 +2783,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
2765
2783
|
const IconComp = value;
|
|
2766
2784
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
2767
2785
|
}
|
|
2768
|
-
if (
|
|
2786
|
+
if (React117__default.isValidElement(value)) {
|
|
2769
2787
|
return value;
|
|
2770
2788
|
}
|
|
2771
2789
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -2774,7 +2792,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
2774
2792
|
}
|
|
2775
2793
|
return value;
|
|
2776
2794
|
}
|
|
2777
|
-
var Button =
|
|
2795
|
+
var Button = React117__default.forwardRef(
|
|
2778
2796
|
({
|
|
2779
2797
|
className,
|
|
2780
2798
|
variant = "primary",
|
|
@@ -2870,7 +2888,7 @@ var sizeStyles3 = {
|
|
|
2870
2888
|
md: "px-2.5 py-1 text-sm",
|
|
2871
2889
|
lg: "px-3 py-1.5 text-base"
|
|
2872
2890
|
};
|
|
2873
|
-
var Badge =
|
|
2891
|
+
var Badge = React117__default.forwardRef(
|
|
2874
2892
|
({ className, variant = "default", size = "sm", amount, label, icon, children, ...props }, ref) => {
|
|
2875
2893
|
const iconSizes2 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
|
|
2876
2894
|
const resolvedIcon = typeof icon === "string" ? (() => {
|
|
@@ -2993,7 +3011,7 @@ var Toast = ({
|
|
|
2993
3011
|
);
|
|
2994
3012
|
};
|
|
2995
3013
|
Toast.displayName = "Toast";
|
|
2996
|
-
var Input =
|
|
3014
|
+
var Input = React117__default.forwardRef(
|
|
2997
3015
|
({
|
|
2998
3016
|
className,
|
|
2999
3017
|
inputType,
|
|
@@ -3105,7 +3123,7 @@ var Input = React118__default.forwardRef(
|
|
|
3105
3123
|
}
|
|
3106
3124
|
);
|
|
3107
3125
|
Input.displayName = "Input";
|
|
3108
|
-
var Label =
|
|
3126
|
+
var Label = React117__default.forwardRef(
|
|
3109
3127
|
({ className, required, children, ...props }, ref) => {
|
|
3110
3128
|
return /* @__PURE__ */ jsxs(
|
|
3111
3129
|
"label",
|
|
@@ -3125,7 +3143,7 @@ var Label = React118__default.forwardRef(
|
|
|
3125
3143
|
}
|
|
3126
3144
|
);
|
|
3127
3145
|
Label.displayName = "Label";
|
|
3128
|
-
var Textarea =
|
|
3146
|
+
var Textarea = React117__default.forwardRef(
|
|
3129
3147
|
({ className, error, ...props }, ref) => {
|
|
3130
3148
|
return /* @__PURE__ */ jsx(
|
|
3131
3149
|
"textarea",
|
|
@@ -3148,7 +3166,7 @@ var Textarea = React118__default.forwardRef(
|
|
|
3148
3166
|
}
|
|
3149
3167
|
);
|
|
3150
3168
|
Textarea.displayName = "Textarea";
|
|
3151
|
-
var Select =
|
|
3169
|
+
var Select = React117__default.forwardRef(
|
|
3152
3170
|
({ className, options, placeholder, error, ...props }, ref) => {
|
|
3153
3171
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
3154
3172
|
/* @__PURE__ */ jsxs(
|
|
@@ -3184,7 +3202,7 @@ var Select = React118__default.forwardRef(
|
|
|
3184
3202
|
}
|
|
3185
3203
|
);
|
|
3186
3204
|
Select.displayName = "Select";
|
|
3187
|
-
var Checkbox =
|
|
3205
|
+
var Checkbox = React117__default.forwardRef(
|
|
3188
3206
|
({ className, label, id, ...props }, ref) => {
|
|
3189
3207
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
3190
3208
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
@@ -3260,7 +3278,7 @@ var shadowStyles2 = {
|
|
|
3260
3278
|
md: "shadow",
|
|
3261
3279
|
lg: "shadow-lg"
|
|
3262
3280
|
};
|
|
3263
|
-
var Card =
|
|
3281
|
+
var Card = React117__default.forwardRef(
|
|
3264
3282
|
({
|
|
3265
3283
|
className,
|
|
3266
3284
|
variant = "bordered",
|
|
@@ -3296,9 +3314,9 @@ var Card = React118__default.forwardRef(
|
|
|
3296
3314
|
}
|
|
3297
3315
|
);
|
|
3298
3316
|
Card.displayName = "Card";
|
|
3299
|
-
var CardHeader =
|
|
3317
|
+
var CardHeader = React117__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
3300
3318
|
CardHeader.displayName = "CardHeader";
|
|
3301
|
-
var CardTitle =
|
|
3319
|
+
var CardTitle = React117__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3302
3320
|
"h3",
|
|
3303
3321
|
{
|
|
3304
3322
|
ref,
|
|
@@ -3311,11 +3329,11 @@ var CardTitle = React118__default.forwardRef(({ className, ...props }, ref) => /
|
|
|
3311
3329
|
}
|
|
3312
3330
|
));
|
|
3313
3331
|
CardTitle.displayName = "CardTitle";
|
|
3314
|
-
var CardContent =
|
|
3332
|
+
var CardContent = React117__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
3315
3333
|
CardContent.displayName = "CardContent";
|
|
3316
3334
|
var CardBody = CardContent;
|
|
3317
3335
|
CardBody.displayName = "CardBody";
|
|
3318
|
-
var CardFooter =
|
|
3336
|
+
var CardFooter = React117__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3319
3337
|
"div",
|
|
3320
3338
|
{
|
|
3321
3339
|
ref,
|
|
@@ -3330,7 +3348,7 @@ var sizeStyles4 = {
|
|
|
3330
3348
|
md: "h-6 w-6",
|
|
3331
3349
|
lg: "h-8 w-8"
|
|
3332
3350
|
};
|
|
3333
|
-
var Spinner =
|
|
3351
|
+
var Spinner = React117__default.forwardRef(
|
|
3334
3352
|
({ className, size = "md", ...props }, ref) => {
|
|
3335
3353
|
return /* @__PURE__ */ jsx(
|
|
3336
3354
|
"div",
|
|
@@ -3746,7 +3764,7 @@ var ProgressBar = ({
|
|
|
3746
3764
|
return null;
|
|
3747
3765
|
};
|
|
3748
3766
|
ProgressBar.displayName = "ProgressBar";
|
|
3749
|
-
var Radio =
|
|
3767
|
+
var Radio = React117__default.forwardRef(
|
|
3750
3768
|
({
|
|
3751
3769
|
label,
|
|
3752
3770
|
helperText,
|
|
@@ -3850,7 +3868,7 @@ var Radio = React118__default.forwardRef(
|
|
|
3850
3868
|
}
|
|
3851
3869
|
);
|
|
3852
3870
|
Radio.displayName = "Radio";
|
|
3853
|
-
var Switch =
|
|
3871
|
+
var Switch = React117.forwardRef(
|
|
3854
3872
|
({
|
|
3855
3873
|
checked,
|
|
3856
3874
|
defaultChecked = false,
|
|
@@ -3861,10 +3879,10 @@ var Switch = React118.forwardRef(
|
|
|
3861
3879
|
name,
|
|
3862
3880
|
className
|
|
3863
3881
|
}, ref) => {
|
|
3864
|
-
const [isChecked, setIsChecked] =
|
|
3882
|
+
const [isChecked, setIsChecked] = React117.useState(
|
|
3865
3883
|
checked !== void 0 ? checked : defaultChecked
|
|
3866
3884
|
);
|
|
3867
|
-
|
|
3885
|
+
React117.useEffect(() => {
|
|
3868
3886
|
if (checked !== void 0) {
|
|
3869
3887
|
setIsChecked(checked);
|
|
3870
3888
|
}
|
|
@@ -4229,8 +4247,8 @@ var LawReferenceTooltip = ({
|
|
|
4229
4247
|
position = "top",
|
|
4230
4248
|
className
|
|
4231
4249
|
}) => {
|
|
4232
|
-
const [isVisible, setIsVisible] =
|
|
4233
|
-
const timeoutRef =
|
|
4250
|
+
const [isVisible, setIsVisible] = React117__default.useState(false);
|
|
4251
|
+
const timeoutRef = React117__default.useRef(null);
|
|
4234
4252
|
const handleMouseEnter = () => {
|
|
4235
4253
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4236
4254
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -4239,7 +4257,7 @@ var LawReferenceTooltip = ({
|
|
|
4239
4257
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4240
4258
|
setIsVisible(false);
|
|
4241
4259
|
};
|
|
4242
|
-
|
|
4260
|
+
React117__default.useEffect(() => {
|
|
4243
4261
|
return () => {
|
|
4244
4262
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4245
4263
|
};
|
|
@@ -4427,7 +4445,7 @@ var sizeStyles5 = {
|
|
|
4427
4445
|
md: "w-2.5 h-2.5",
|
|
4428
4446
|
lg: "w-3 h-3"
|
|
4429
4447
|
};
|
|
4430
|
-
var StatusDot =
|
|
4448
|
+
var StatusDot = React117__default.forwardRef(
|
|
4431
4449
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
4432
4450
|
return /* @__PURE__ */ jsx(
|
|
4433
4451
|
"span",
|
|
@@ -4474,7 +4492,7 @@ var iconMap2 = {
|
|
|
4474
4492
|
down: TrendingDown,
|
|
4475
4493
|
flat: ArrowRight
|
|
4476
4494
|
};
|
|
4477
|
-
var TrendIndicator =
|
|
4495
|
+
var TrendIndicator = React117__default.forwardRef(
|
|
4478
4496
|
({
|
|
4479
4497
|
className,
|
|
4480
4498
|
value,
|
|
@@ -4533,7 +4551,7 @@ var thumbSizes = {
|
|
|
4533
4551
|
md: "w-4 h-4",
|
|
4534
4552
|
lg: "w-5 h-5"
|
|
4535
4553
|
};
|
|
4536
|
-
var RangeSlider =
|
|
4554
|
+
var RangeSlider = React117__default.forwardRef(
|
|
4537
4555
|
({
|
|
4538
4556
|
className,
|
|
4539
4557
|
min = 0,
|
|
@@ -4984,7 +5002,7 @@ var paddingClasses = {
|
|
|
4984
5002
|
md: "py-16",
|
|
4985
5003
|
lg: "py-24"
|
|
4986
5004
|
};
|
|
4987
|
-
var ContentSection =
|
|
5005
|
+
var ContentSection = React117__default.forwardRef(
|
|
4988
5006
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
4989
5007
|
return /* @__PURE__ */ jsx(
|
|
4990
5008
|
Box,
|
|
@@ -5023,7 +5041,7 @@ var animatedStyles = {
|
|
|
5023
5041
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
5024
5042
|
"none": {}
|
|
5025
5043
|
};
|
|
5026
|
-
var AnimatedReveal =
|
|
5044
|
+
var AnimatedReveal = React117__default.forwardRef(
|
|
5027
5045
|
({
|
|
5028
5046
|
trigger = "scroll",
|
|
5029
5047
|
animation = "fade-up",
|
|
@@ -5176,7 +5194,7 @@ function applyMorphAnimation(container, animate, duration, delay, easing) {
|
|
|
5176
5194
|
el.style.opacity = animate ? "1" : "0";
|
|
5177
5195
|
});
|
|
5178
5196
|
}
|
|
5179
|
-
var AnimatedGraphic =
|
|
5197
|
+
var AnimatedGraphic = React117__default.forwardRef(
|
|
5180
5198
|
({
|
|
5181
5199
|
src,
|
|
5182
5200
|
svgContent,
|
|
@@ -5199,7 +5217,7 @@ var AnimatedGraphic = React118__default.forwardRef(
|
|
|
5199
5217
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
5200
5218
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
5201
5219
|
const prevAnimateRef = useRef(animate);
|
|
5202
|
-
const setRef =
|
|
5220
|
+
const setRef = React117__default.useCallback(
|
|
5203
5221
|
(node) => {
|
|
5204
5222
|
containerRef.current = node;
|
|
5205
5223
|
if (typeof ref === "function") ref(node);
|
|
@@ -5370,9 +5388,9 @@ function ScoreDisplay({
|
|
|
5370
5388
|
...rest
|
|
5371
5389
|
}) {
|
|
5372
5390
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
|
|
5373
|
-
const [displayValue, setDisplayValue] =
|
|
5374
|
-
const [isAnimating, setIsAnimating] =
|
|
5375
|
-
|
|
5391
|
+
const [displayValue, setDisplayValue] = React117.useState(resolvedValue);
|
|
5392
|
+
const [isAnimating, setIsAnimating] = React117.useState(false);
|
|
5393
|
+
React117.useEffect(() => {
|
|
5376
5394
|
if (!animated || displayValue === resolvedValue) {
|
|
5377
5395
|
setDisplayValue(resolvedValue);
|
|
5378
5396
|
return;
|
|
@@ -5445,9 +5463,9 @@ function ControlButton({
|
|
|
5445
5463
|
className
|
|
5446
5464
|
}) {
|
|
5447
5465
|
const eventBus = useEventBus();
|
|
5448
|
-
const [isPressed, setIsPressed] =
|
|
5466
|
+
const [isPressed, setIsPressed] = React117.useState(false);
|
|
5449
5467
|
const actualPressed = pressed ?? isPressed;
|
|
5450
|
-
const handlePointerDown =
|
|
5468
|
+
const handlePointerDown = React117.useCallback(
|
|
5451
5469
|
(e) => {
|
|
5452
5470
|
e.preventDefault();
|
|
5453
5471
|
if (disabled) return;
|
|
@@ -5457,7 +5475,7 @@ function ControlButton({
|
|
|
5457
5475
|
},
|
|
5458
5476
|
[disabled, pressEvent, eventBus, onPress]
|
|
5459
5477
|
);
|
|
5460
|
-
const handlePointerUp =
|
|
5478
|
+
const handlePointerUp = React117.useCallback(
|
|
5461
5479
|
(e) => {
|
|
5462
5480
|
e.preventDefault();
|
|
5463
5481
|
if (disabled) return;
|
|
@@ -5467,7 +5485,7 @@ function ControlButton({
|
|
|
5467
5485
|
},
|
|
5468
5486
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
5469
5487
|
);
|
|
5470
|
-
const handlePointerLeave =
|
|
5488
|
+
const handlePointerLeave = React117.useCallback(
|
|
5471
5489
|
(e) => {
|
|
5472
5490
|
if (isPressed) {
|
|
5473
5491
|
setIsPressed(false);
|
|
@@ -6257,9 +6275,9 @@ function MiniMap({
|
|
|
6257
6275
|
viewportRect,
|
|
6258
6276
|
className
|
|
6259
6277
|
}) {
|
|
6260
|
-
const canvasRef =
|
|
6261
|
-
const frameRef =
|
|
6262
|
-
|
|
6278
|
+
const canvasRef = React117.useRef(null);
|
|
6279
|
+
const frameRef = React117.useRef(0);
|
|
6280
|
+
React117.useEffect(() => {
|
|
6263
6281
|
const canvas = canvasRef.current;
|
|
6264
6282
|
if (!canvas) return;
|
|
6265
6283
|
const ctx = canvas.getContext("2d");
|
|
@@ -6368,7 +6386,7 @@ var ErrorState = ({
|
|
|
6368
6386
|
);
|
|
6369
6387
|
};
|
|
6370
6388
|
ErrorState.displayName = "ErrorState";
|
|
6371
|
-
var ErrorBoundary = class extends
|
|
6389
|
+
var ErrorBoundary = class extends React117__default.Component {
|
|
6372
6390
|
constructor(props) {
|
|
6373
6391
|
super(props);
|
|
6374
6392
|
__publicField(this, "reset", () => {
|
|
@@ -6751,8 +6769,8 @@ var Tooltip = ({
|
|
|
6751
6769
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
6752
6770
|
};
|
|
6753
6771
|
}, []);
|
|
6754
|
-
const triggerElement =
|
|
6755
|
-
const trigger =
|
|
6772
|
+
const triggerElement = React117__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
6773
|
+
const trigger = React117__default.cloneElement(triggerElement, {
|
|
6756
6774
|
ref: triggerRef,
|
|
6757
6775
|
onMouseEnter: handleMouseEnter,
|
|
6758
6776
|
onMouseLeave: handleMouseLeave,
|
|
@@ -6865,8 +6883,8 @@ var Popover = ({
|
|
|
6865
6883
|
onMouseEnter: handleOpen,
|
|
6866
6884
|
onMouseLeave: handleClose
|
|
6867
6885
|
};
|
|
6868
|
-
const childElement =
|
|
6869
|
-
const triggerElement =
|
|
6886
|
+
const childElement = React117__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
6887
|
+
const triggerElement = React117__default.cloneElement(
|
|
6870
6888
|
childElement,
|
|
6871
6889
|
{
|
|
6872
6890
|
ref: triggerRef,
|
|
@@ -6970,8 +6988,8 @@ var Menu = ({
|
|
|
6970
6988
|
"bottom-start": "top-full left-0 mt-2",
|
|
6971
6989
|
"bottom-end": "top-full right-0 mt-2"
|
|
6972
6990
|
};
|
|
6973
|
-
const triggerChild =
|
|
6974
|
-
const triggerElement =
|
|
6991
|
+
const triggerChild = React117__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx("span", { children: trigger });
|
|
6992
|
+
const triggerElement = React117__default.cloneElement(
|
|
6975
6993
|
triggerChild,
|
|
6976
6994
|
{
|
|
6977
6995
|
ref: triggerRef,
|
|
@@ -7671,7 +7689,7 @@ function InputPattern({
|
|
|
7671
7689
|
className
|
|
7672
7690
|
}) {
|
|
7673
7691
|
const { emit } = useEventBus();
|
|
7674
|
-
const [localValue, setLocalValue] =
|
|
7692
|
+
const [localValue, setLocalValue] = React117__default.useState(value);
|
|
7675
7693
|
const handleChange = (e) => {
|
|
7676
7694
|
setLocalValue(e.target.value);
|
|
7677
7695
|
if (onChange) {
|
|
@@ -7708,7 +7726,7 @@ function TextareaPattern({
|
|
|
7708
7726
|
className
|
|
7709
7727
|
}) {
|
|
7710
7728
|
const { emit } = useEventBus();
|
|
7711
|
-
const [localValue, setLocalValue] =
|
|
7729
|
+
const [localValue, setLocalValue] = React117__default.useState(value);
|
|
7712
7730
|
const handleChange = (e) => {
|
|
7713
7731
|
setLocalValue(e.target.value);
|
|
7714
7732
|
if (onChange) {
|
|
@@ -7739,7 +7757,7 @@ function SelectPattern({
|
|
|
7739
7757
|
className
|
|
7740
7758
|
}) {
|
|
7741
7759
|
const { emit } = useEventBus();
|
|
7742
|
-
const [localValue, setLocalValue] =
|
|
7760
|
+
const [localValue, setLocalValue] = React117__default.useState(value);
|
|
7743
7761
|
const handleChange = (e) => {
|
|
7744
7762
|
setLocalValue(e.target.value);
|
|
7745
7763
|
if (onChange) {
|
|
@@ -7768,7 +7786,7 @@ function CheckboxPattern({
|
|
|
7768
7786
|
className
|
|
7769
7787
|
}) {
|
|
7770
7788
|
const { emit } = useEventBus();
|
|
7771
|
-
const [localChecked, setLocalChecked] =
|
|
7789
|
+
const [localChecked, setLocalChecked] = React117__default.useState(checked);
|
|
7772
7790
|
const handleChange = (e) => {
|
|
7773
7791
|
setLocalChecked(e.target.checked);
|
|
7774
7792
|
if (onChange) {
|
|
@@ -7969,8 +7987,8 @@ function ActionButtons({
|
|
|
7969
7987
|
disabled
|
|
7970
7988
|
}) {
|
|
7971
7989
|
const eventBus = useEventBus();
|
|
7972
|
-
const [activeButtons, setActiveButtons] =
|
|
7973
|
-
const handlePress =
|
|
7990
|
+
const [activeButtons, setActiveButtons] = React117.useState(/* @__PURE__ */ new Set());
|
|
7991
|
+
const handlePress = React117.useCallback(
|
|
7974
7992
|
(id) => {
|
|
7975
7993
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
7976
7994
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -7978,7 +7996,7 @@ function ActionButtons({
|
|
|
7978
7996
|
},
|
|
7979
7997
|
[actionEvent, eventBus, onAction]
|
|
7980
7998
|
);
|
|
7981
|
-
const handleRelease =
|
|
7999
|
+
const handleRelease = React117.useCallback(
|
|
7982
8000
|
(id) => {
|
|
7983
8001
|
setActiveButtons((prev) => {
|
|
7984
8002
|
const next = new Set(prev);
|
|
@@ -9642,7 +9660,7 @@ var ScaledDiagram = ({
|
|
|
9642
9660
|
);
|
|
9643
9661
|
};
|
|
9644
9662
|
ScaledDiagram.displayName = "ScaledDiagram";
|
|
9645
|
-
var MarkdownContent =
|
|
9663
|
+
var MarkdownContent = React117__default.memo(
|
|
9646
9664
|
({ content, direction, className }) => {
|
|
9647
9665
|
const { t: _t } = useTranslate();
|
|
9648
9666
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -9744,7 +9762,7 @@ var MarkdownContent = React118__default.memo(
|
|
|
9744
9762
|
(prev, next) => prev.content === next.content && prev.className === next.className && prev.direction === next.direction
|
|
9745
9763
|
);
|
|
9746
9764
|
MarkdownContent.displayName = "MarkdownContent";
|
|
9747
|
-
var CodeBlock =
|
|
9765
|
+
var CodeBlock = React117__default.memo(
|
|
9748
9766
|
({
|
|
9749
9767
|
code: rawCode,
|
|
9750
9768
|
language = "text",
|
|
@@ -10704,7 +10722,7 @@ var StateMachineView = ({
|
|
|
10704
10722
|
style: { top: title ? 30 : 0 },
|
|
10705
10723
|
children: [
|
|
10706
10724
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
10707
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
10725
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React117__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
10708
10726
|
StateNode,
|
|
10709
10727
|
{
|
|
10710
10728
|
state,
|
|
@@ -16041,7 +16059,7 @@ function CraftingRecipe({
|
|
|
16041
16059
|
className
|
|
16042
16060
|
}) {
|
|
16043
16061
|
const eventBus = useEventBus();
|
|
16044
|
-
const handleCraft =
|
|
16062
|
+
const handleCraft = React117.useCallback(() => {
|
|
16045
16063
|
onCraft?.();
|
|
16046
16064
|
if (craftEvent) {
|
|
16047
16065
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -16058,7 +16076,7 @@ function CraftingRecipe({
|
|
|
16058
16076
|
children: [
|
|
16059
16077
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
16060
16078
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
16061
|
-
return /* @__PURE__ */ jsxs(
|
|
16079
|
+
return /* @__PURE__ */ jsxs(React117.Fragment, { children: [
|
|
16062
16080
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
16063
16081
|
ItemSlot,
|
|
16064
16082
|
{
|
|
@@ -16337,8 +16355,8 @@ function DPad({
|
|
|
16337
16355
|
}) {
|
|
16338
16356
|
const eventBus = useEventBus();
|
|
16339
16357
|
const sizes = sizeMap15[size];
|
|
16340
|
-
const [activeDirections, setActiveDirections] =
|
|
16341
|
-
const handlePress =
|
|
16358
|
+
const [activeDirections, setActiveDirections] = React117.useState(/* @__PURE__ */ new Set());
|
|
16359
|
+
const handlePress = React117.useCallback(
|
|
16342
16360
|
(direction) => {
|
|
16343
16361
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
16344
16362
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -16346,7 +16364,7 @@ function DPad({
|
|
|
16346
16364
|
},
|
|
16347
16365
|
[directionEvent, eventBus, onDirection]
|
|
16348
16366
|
);
|
|
16349
|
-
const handleRelease =
|
|
16367
|
+
const handleRelease = React117.useCallback(
|
|
16350
16368
|
(direction) => {
|
|
16351
16369
|
setActiveDirections((prev) => {
|
|
16352
16370
|
const next = new Set(prev);
|
|
@@ -17123,7 +17141,7 @@ var DataList = ({
|
|
|
17123
17141
|
}) => {
|
|
17124
17142
|
const eventBus = useEventBus();
|
|
17125
17143
|
const { t } = useTranslate();
|
|
17126
|
-
const [visibleCount, setVisibleCount] =
|
|
17144
|
+
const [visibleCount, setVisibleCount] = React117__default.useState(pageSize || Infinity);
|
|
17127
17145
|
const fields = fieldsProp ?? columnsProp ?? [];
|
|
17128
17146
|
const allData = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
17129
17147
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
@@ -17160,7 +17178,7 @@ var DataList = ({
|
|
|
17160
17178
|
const items2 = data.map((item) => item);
|
|
17161
17179
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
17162
17180
|
const contentField = titleField?.name ?? fields[0]?.name ?? "";
|
|
17163
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
17181
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React117__default.Fragment, { children: [
|
|
17164
17182
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
17165
17183
|
group.items.map((itemData, index) => {
|
|
17166
17184
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -17363,7 +17381,7 @@ var DataList = ({
|
|
|
17363
17381
|
className
|
|
17364
17382
|
),
|
|
17365
17383
|
children: [
|
|
17366
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
17384
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React117__default.Fragment, { children: [
|
|
17367
17385
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
17368
17386
|
group.items.map(
|
|
17369
17387
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -18332,7 +18350,7 @@ var WizardProgress = ({
|
|
|
18332
18350
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: steps.map((step, index) => {
|
|
18333
18351
|
const isActive = index === currentStep;
|
|
18334
18352
|
const isCompleted = index < currentStep;
|
|
18335
|
-
return /* @__PURE__ */ jsxs(
|
|
18353
|
+
return /* @__PURE__ */ jsxs(React117__default.Fragment, { children: [
|
|
18336
18354
|
/* @__PURE__ */ jsx(
|
|
18337
18355
|
"button",
|
|
18338
18356
|
{
|
|
@@ -19157,7 +19175,7 @@ function InventoryGrid({
|
|
|
19157
19175
|
const eventBus = useEventBus();
|
|
19158
19176
|
const slotCount = totalSlots ?? items.length;
|
|
19159
19177
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
19160
|
-
const handleSelect =
|
|
19178
|
+
const handleSelect = React117.useCallback(
|
|
19161
19179
|
(id) => {
|
|
19162
19180
|
onSelect?.(id);
|
|
19163
19181
|
if (selectEvent) {
|
|
@@ -19330,15 +19348,15 @@ function GameCanvas2D({
|
|
|
19330
19348
|
fps = 60,
|
|
19331
19349
|
className
|
|
19332
19350
|
}) {
|
|
19333
|
-
const canvasRef =
|
|
19334
|
-
const rafRef =
|
|
19335
|
-
const frameRef =
|
|
19336
|
-
const lastTimeRef =
|
|
19337
|
-
const onDrawRef =
|
|
19351
|
+
const canvasRef = React117.useRef(null);
|
|
19352
|
+
const rafRef = React117.useRef(0);
|
|
19353
|
+
const frameRef = React117.useRef(0);
|
|
19354
|
+
const lastTimeRef = React117.useRef(0);
|
|
19355
|
+
const onDrawRef = React117.useRef(onDraw);
|
|
19338
19356
|
onDrawRef.current = onDraw;
|
|
19339
|
-
const onTickRef =
|
|
19357
|
+
const onTickRef = React117.useRef(onTick);
|
|
19340
19358
|
onTickRef.current = onTick;
|
|
19341
|
-
|
|
19359
|
+
React117.useEffect(() => {
|
|
19342
19360
|
const canvas = canvasRef.current;
|
|
19343
19361
|
if (!canvas) return;
|
|
19344
19362
|
const ctx = canvas.getContext("2d");
|
|
@@ -19591,7 +19609,7 @@ function TurnPanel({
|
|
|
19591
19609
|
className
|
|
19592
19610
|
}) {
|
|
19593
19611
|
const eventBus = useEventBus();
|
|
19594
|
-
const handleAction =
|
|
19612
|
+
const handleAction = React117.useCallback(
|
|
19595
19613
|
(event) => {
|
|
19596
19614
|
if (event) {
|
|
19597
19615
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -19716,7 +19734,7 @@ function UnitCommandBar({
|
|
|
19716
19734
|
className
|
|
19717
19735
|
}) {
|
|
19718
19736
|
const eventBus = useEventBus();
|
|
19719
|
-
const handleCommand =
|
|
19737
|
+
const handleCommand = React117.useCallback(
|
|
19720
19738
|
(event) => {
|
|
19721
19739
|
if (event) {
|
|
19722
19740
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -20175,7 +20193,7 @@ function GameMenu({
|
|
|
20175
20193
|
} catch {
|
|
20176
20194
|
}
|
|
20177
20195
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
20178
|
-
const handleOptionClick =
|
|
20196
|
+
const handleOptionClick = React117.useCallback(
|
|
20179
20197
|
(option) => {
|
|
20180
20198
|
if (option.event && eventBus) {
|
|
20181
20199
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -20298,7 +20316,7 @@ function GameOverScreen({
|
|
|
20298
20316
|
} catch {
|
|
20299
20317
|
}
|
|
20300
20318
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
20301
|
-
const handleActionClick =
|
|
20319
|
+
const handleActionClick = React117.useCallback(
|
|
20302
20320
|
(action) => {
|
|
20303
20321
|
if (action.event && eventBus) {
|
|
20304
20322
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -23398,7 +23416,7 @@ var DocumentViewer = ({
|
|
|
23398
23416
|
};
|
|
23399
23417
|
DocumentViewer.displayName = "DocumentViewer";
|
|
23400
23418
|
function extractTitle(children) {
|
|
23401
|
-
if (!
|
|
23419
|
+
if (!React117__default.isValidElement(children)) return void 0;
|
|
23402
23420
|
const props = children.props;
|
|
23403
23421
|
if (typeof props.title === "string") {
|
|
23404
23422
|
return props.title;
|
|
@@ -23450,7 +23468,7 @@ function LinearView({
|
|
|
23450
23468
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
23451
23469
|
const isDone = i < currentIdx;
|
|
23452
23470
|
const isCurrent = i === currentIdx;
|
|
23453
|
-
return /* @__PURE__ */ jsxs(
|
|
23471
|
+
return /* @__PURE__ */ jsxs(React117__default.Fragment, { children: [
|
|
23454
23472
|
i > 0 && /* @__PURE__ */ jsx(
|
|
23455
23473
|
Typography,
|
|
23456
23474
|
{
|
|
@@ -24116,7 +24134,7 @@ var Form = ({
|
|
|
24116
24134
|
const normalizedInitialData = initialData ?? {};
|
|
24117
24135
|
const resolvedEntity = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
24118
24136
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
24119
|
-
const entityDerivedFields =
|
|
24137
|
+
const entityDerivedFields = React117__default.useMemo(() => {
|
|
24120
24138
|
if (fields && fields.length > 0) return void 0;
|
|
24121
24139
|
if (!resolvedEntity) return void 0;
|
|
24122
24140
|
return resolvedEntity.fields.map(
|
|
@@ -24135,14 +24153,14 @@ var Form = ({
|
|
|
24135
24153
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
24136
24154
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
24137
24155
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
24138
|
-
const [formData, setFormData] =
|
|
24156
|
+
const [formData, setFormData] = React117__default.useState(
|
|
24139
24157
|
normalizedInitialData
|
|
24140
24158
|
);
|
|
24141
|
-
const [collapsedSections, setCollapsedSections] =
|
|
24159
|
+
const [collapsedSections, setCollapsedSections] = React117__default.useState(
|
|
24142
24160
|
/* @__PURE__ */ new Set()
|
|
24143
24161
|
);
|
|
24144
24162
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
24145
|
-
const evalContext =
|
|
24163
|
+
const evalContext = React117__default.useMemo(
|
|
24146
24164
|
() => ({
|
|
24147
24165
|
formValues: formData,
|
|
24148
24166
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -24151,13 +24169,13 @@ var Form = ({
|
|
|
24151
24169
|
}),
|
|
24152
24170
|
[formData, externalContext]
|
|
24153
24171
|
);
|
|
24154
|
-
|
|
24172
|
+
React117__default.useEffect(() => {
|
|
24155
24173
|
const data = initialData;
|
|
24156
24174
|
if (data && Object.keys(data).length > 0) {
|
|
24157
24175
|
setFormData(data);
|
|
24158
24176
|
}
|
|
24159
24177
|
}, [initialData]);
|
|
24160
|
-
const processCalculations =
|
|
24178
|
+
const processCalculations = React117__default.useCallback(
|
|
24161
24179
|
(changedFieldId, newFormData) => {
|
|
24162
24180
|
if (!hiddenCalculations.length) return;
|
|
24163
24181
|
const context = {
|
|
@@ -24182,7 +24200,7 @@ var Form = ({
|
|
|
24182
24200
|
},
|
|
24183
24201
|
[hiddenCalculations, externalContext, eventBus]
|
|
24184
24202
|
);
|
|
24185
|
-
const checkViolations =
|
|
24203
|
+
const checkViolations = React117__default.useCallback(
|
|
24186
24204
|
(changedFieldId, newFormData) => {
|
|
24187
24205
|
if (!violationTriggers.length) return;
|
|
24188
24206
|
const context = {
|
|
@@ -24219,7 +24237,7 @@ var Form = ({
|
|
|
24219
24237
|
processCalculations(name, newFormData);
|
|
24220
24238
|
checkViolations(name, newFormData);
|
|
24221
24239
|
};
|
|
24222
|
-
const isFieldVisible =
|
|
24240
|
+
const isFieldVisible = React117__default.useCallback(
|
|
24223
24241
|
(fieldName) => {
|
|
24224
24242
|
const condition = conditionalFields[fieldName];
|
|
24225
24243
|
if (!condition) return true;
|
|
@@ -24227,7 +24245,7 @@ var Form = ({
|
|
|
24227
24245
|
},
|
|
24228
24246
|
[conditionalFields, evalContext]
|
|
24229
24247
|
);
|
|
24230
|
-
const isSectionVisible =
|
|
24248
|
+
const isSectionVisible = React117__default.useCallback(
|
|
24231
24249
|
(section) => {
|
|
24232
24250
|
if (!section.condition) return true;
|
|
24233
24251
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -24259,7 +24277,7 @@ var Form = ({
|
|
|
24259
24277
|
eventBus.emit(`UI:${onCancel}`);
|
|
24260
24278
|
}
|
|
24261
24279
|
};
|
|
24262
|
-
const renderField =
|
|
24280
|
+
const renderField = React117__default.useCallback(
|
|
24263
24281
|
(field) => {
|
|
24264
24282
|
const fieldName = field.name || field.field;
|
|
24265
24283
|
if (!fieldName) return null;
|
|
@@ -24280,7 +24298,7 @@ var Form = ({
|
|
|
24280
24298
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
24281
24299
|
);
|
|
24282
24300
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
24283
|
-
const normalizedFields =
|
|
24301
|
+
const normalizedFields = React117__default.useMemo(() => {
|
|
24284
24302
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
24285
24303
|
return effectiveFields.map((field) => {
|
|
24286
24304
|
if (typeof field === "string") {
|
|
@@ -24302,7 +24320,7 @@ var Form = ({
|
|
|
24302
24320
|
return field;
|
|
24303
24321
|
});
|
|
24304
24322
|
}, [effectiveFields, resolvedEntity]);
|
|
24305
|
-
const schemaFields =
|
|
24323
|
+
const schemaFields = React117__default.useMemo(() => {
|
|
24306
24324
|
if (normalizedFields.length === 0) return null;
|
|
24307
24325
|
if (isDebugEnabled()) {
|
|
24308
24326
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -24312,7 +24330,7 @@ var Form = ({
|
|
|
24312
24330
|
}
|
|
24313
24331
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
24314
24332
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
24315
|
-
const sectionElements =
|
|
24333
|
+
const sectionElements = React117__default.useMemo(() => {
|
|
24316
24334
|
if (!sections || sections.length === 0) return null;
|
|
24317
24335
|
return sections.map((section) => {
|
|
24318
24336
|
if (!isSectionVisible(section)) {
|
|
@@ -25716,7 +25734,7 @@ var List2 = ({
|
|
|
25716
25734
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
25717
25735
|
return [];
|
|
25718
25736
|
}, [entity]);
|
|
25719
|
-
const getItemActions =
|
|
25737
|
+
const getItemActions = React117__default.useCallback(
|
|
25720
25738
|
(item) => {
|
|
25721
25739
|
if (!itemActions) return [];
|
|
25722
25740
|
if (typeof itemActions === "function") {
|
|
@@ -26142,7 +26160,7 @@ var MediaGallery = ({
|
|
|
26142
26160
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
26143
26161
|
);
|
|
26144
26162
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
26145
|
-
const items =
|
|
26163
|
+
const items = React117__default.useMemo(() => {
|
|
26146
26164
|
if (propItems) return propItems;
|
|
26147
26165
|
if (entityData.length === 0) return [];
|
|
26148
26166
|
return entityData.map((record, idx) => ({
|
|
@@ -26304,7 +26322,7 @@ var MediaGallery = ({
|
|
|
26304
26322
|
};
|
|
26305
26323
|
MediaGallery.displayName = "MediaGallery";
|
|
26306
26324
|
function extractTitle2(children) {
|
|
26307
|
-
if (!
|
|
26325
|
+
if (!React117__default.isValidElement(children)) return void 0;
|
|
26308
26326
|
const props = children.props;
|
|
26309
26327
|
if (typeof props.title === "string") {
|
|
26310
26328
|
return props.title;
|
|
@@ -26974,7 +26992,7 @@ var PageHeader = ({
|
|
|
26974
26992
|
info: "bg-info/10 text-info"
|
|
26975
26993
|
};
|
|
26976
26994
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
26977
|
-
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Box, { as: "nav", className: "mb-4", children: /* @__PURE__ */ jsx(Box, { as: "ol", className: "flex items-center gap-2 text-sm", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs(
|
|
26995
|
+
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Box, { as: "nav", className: "mb-4", children: /* @__PURE__ */ jsx(Box, { as: "ol", className: "flex items-center gap-2 text-sm", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs(React117__default.Fragment, { children: [
|
|
26978
26996
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
26979
26997
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
26980
26998
|
"a",
|
|
@@ -27100,7 +27118,7 @@ function subscribeToDebugEvents(listener) {
|
|
|
27100
27118
|
|
|
27101
27119
|
// components/organisms/debug/hooks/useDebugData.ts
|
|
27102
27120
|
function useDebugData() {
|
|
27103
|
-
const [data, setData] =
|
|
27121
|
+
const [data, setData] = React117.useState(() => ({
|
|
27104
27122
|
traits: [],
|
|
27105
27123
|
ticks: [],
|
|
27106
27124
|
guards: [],
|
|
@@ -27114,7 +27132,7 @@ function useDebugData() {
|
|
|
27114
27132
|
},
|
|
27115
27133
|
lastUpdate: Date.now()
|
|
27116
27134
|
}));
|
|
27117
|
-
|
|
27135
|
+
React117.useEffect(() => {
|
|
27118
27136
|
const updateData = () => {
|
|
27119
27137
|
setData({
|
|
27120
27138
|
traits: getAllTraits(),
|
|
@@ -27383,15 +27401,15 @@ var TYPE_BADGES = {
|
|
|
27383
27401
|
state: { variant: "danger", icon: "\u{1F4CA}" }
|
|
27384
27402
|
};
|
|
27385
27403
|
function EventFlowTab({ events: events2 }) {
|
|
27386
|
-
const [filter, setFilter] =
|
|
27387
|
-
const containerRef =
|
|
27388
|
-
const [autoScroll, setAutoScroll] =
|
|
27389
|
-
|
|
27404
|
+
const [filter, setFilter] = React117.useState("all");
|
|
27405
|
+
const containerRef = React117.useRef(null);
|
|
27406
|
+
const [autoScroll, setAutoScroll] = React117.useState(true);
|
|
27407
|
+
React117.useEffect(() => {
|
|
27390
27408
|
if (autoScroll && containerRef.current) {
|
|
27391
27409
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
27392
27410
|
}
|
|
27393
27411
|
}, [events2.length, autoScroll]);
|
|
27394
|
-
const filteredEvents =
|
|
27412
|
+
const filteredEvents = React117.useMemo(() => {
|
|
27395
27413
|
if (filter === "all") return events2;
|
|
27396
27414
|
return events2.filter((e) => e.type === filter);
|
|
27397
27415
|
}, [events2, filter]);
|
|
@@ -27490,7 +27508,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
27490
27508
|
}
|
|
27491
27509
|
EventFlowTab.displayName = "EventFlowTab";
|
|
27492
27510
|
function GuardsPanel({ guards }) {
|
|
27493
|
-
const [filter, setFilter] =
|
|
27511
|
+
const [filter, setFilter] = React117.useState("all");
|
|
27494
27512
|
if (guards.length === 0) {
|
|
27495
27513
|
return /* @__PURE__ */ jsx(
|
|
27496
27514
|
EmptyState,
|
|
@@ -27503,7 +27521,7 @@ function GuardsPanel({ guards }) {
|
|
|
27503
27521
|
}
|
|
27504
27522
|
const passedCount = guards.filter((g) => g.result).length;
|
|
27505
27523
|
const failedCount = guards.length - passedCount;
|
|
27506
|
-
const filteredGuards =
|
|
27524
|
+
const filteredGuards = React117.useMemo(() => {
|
|
27507
27525
|
if (filter === "all") return guards;
|
|
27508
27526
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
27509
27527
|
return guards.filter((g) => !g.result);
|
|
@@ -27647,10 +27665,10 @@ function EffectBadge({ effect }) {
|
|
|
27647
27665
|
] });
|
|
27648
27666
|
}
|
|
27649
27667
|
function TransitionTimeline({ transitions }) {
|
|
27650
|
-
const containerRef =
|
|
27651
|
-
const [autoScroll, setAutoScroll] =
|
|
27652
|
-
const [expandedId, setExpandedId] =
|
|
27653
|
-
|
|
27668
|
+
const containerRef = React117.useRef(null);
|
|
27669
|
+
const [autoScroll, setAutoScroll] = React117.useState(true);
|
|
27670
|
+
const [expandedId, setExpandedId] = React117.useState(null);
|
|
27671
|
+
React117.useEffect(() => {
|
|
27654
27672
|
if (autoScroll && containerRef.current) {
|
|
27655
27673
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
27656
27674
|
}
|
|
@@ -27911,9 +27929,9 @@ function getAllEvents(traits2) {
|
|
|
27911
27929
|
}
|
|
27912
27930
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
27913
27931
|
const eventBus = useEventBus();
|
|
27914
|
-
const [log, setLog] =
|
|
27915
|
-
const prevStatesRef =
|
|
27916
|
-
|
|
27932
|
+
const [log, setLog] = React117.useState([]);
|
|
27933
|
+
const prevStatesRef = React117.useRef(/* @__PURE__ */ new Map());
|
|
27934
|
+
React117.useEffect(() => {
|
|
27917
27935
|
for (const trait of traits2) {
|
|
27918
27936
|
const prev = prevStatesRef.current.get(trait.id);
|
|
27919
27937
|
if (prev && prev !== trait.currentState) {
|
|
@@ -28066,9 +28084,9 @@ function VerifyModePanel({
|
|
|
28066
28084
|
serverCount,
|
|
28067
28085
|
localCount
|
|
28068
28086
|
}) {
|
|
28069
|
-
const scrollRef =
|
|
28070
|
-
const prevCountRef =
|
|
28071
|
-
|
|
28087
|
+
const scrollRef = React117.useRef(null);
|
|
28088
|
+
const prevCountRef = React117.useRef(0);
|
|
28089
|
+
React117.useEffect(() => {
|
|
28072
28090
|
if (transitions.length > prevCountRef.current && scrollRef.current) {
|
|
28073
28091
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
28074
28092
|
}
|
|
@@ -28079,10 +28097,11 @@ function VerifyModePanel({
|
|
|
28079
28097
|
{
|
|
28080
28098
|
className: cn(
|
|
28081
28099
|
"runtime-debugger runtime-debugger--verify",
|
|
28082
|
-
"fixed bottom-0 left-0 right-0
|
|
28100
|
+
"fixed bottom-0 left-0 right-0 flex flex-col bg-gray-900 text-white border-t-2 border-cyan-500",
|
|
28083
28101
|
className
|
|
28084
28102
|
),
|
|
28085
28103
|
"data-testid": "debugger-verify",
|
|
28104
|
+
style: { zIndex: 30, height: "25vh" },
|
|
28086
28105
|
children: [
|
|
28087
28106
|
/* @__PURE__ */ jsxs("div", { className: "px-3 py-1.5 flex items-center gap-3 text-xs font-mono border-b border-gray-700 flex-shrink-0", children: [
|
|
28088
28107
|
/* @__PURE__ */ jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ? `${failedChecks} fail` : "OK" }),
|
|
@@ -28109,10 +28128,10 @@ function RuntimeDebugger({
|
|
|
28109
28128
|
defaultTab,
|
|
28110
28129
|
schema
|
|
28111
28130
|
}) {
|
|
28112
|
-
const [isCollapsed, setIsCollapsed] =
|
|
28113
|
-
const [isVisible, setIsVisible] =
|
|
28131
|
+
const [isCollapsed, setIsCollapsed] = React117.useState(mode === "verify" ? true : defaultCollapsed);
|
|
28132
|
+
const [isVisible, setIsVisible] = React117.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
28114
28133
|
const debugData = useDebugData();
|
|
28115
|
-
|
|
28134
|
+
React117.useEffect(() => {
|
|
28116
28135
|
if (mode === "inline") return;
|
|
28117
28136
|
return onDebugToggle((enabled) => {
|
|
28118
28137
|
setIsVisible(enabled);
|
|
@@ -28121,7 +28140,7 @@ function RuntimeDebugger({
|
|
|
28121
28140
|
}
|
|
28122
28141
|
});
|
|
28123
28142
|
}, [mode]);
|
|
28124
|
-
|
|
28143
|
+
React117.useEffect(() => {
|
|
28125
28144
|
if (mode === "inline") return;
|
|
28126
28145
|
const handleKeyDown = (e) => {
|
|
28127
28146
|
if (e.key === "`" && isVisible) {
|
|
@@ -28269,12 +28288,13 @@ function RuntimeDebugger({
|
|
|
28269
28288
|
{
|
|
28270
28289
|
className: cn(
|
|
28271
28290
|
"runtime-debugger",
|
|
28272
|
-
"fixed
|
|
28291
|
+
"fixed",
|
|
28273
28292
|
positionClasses3[position],
|
|
28274
28293
|
isCollapsed ? "runtime-debugger--collapsed" : "runtime-debugger--expanded",
|
|
28275
28294
|
className
|
|
28276
28295
|
),
|
|
28277
28296
|
"data-testid": isCollapsed ? "debugger-collapsed" : "debugger-expanded",
|
|
28297
|
+
style: { zIndex: 30 },
|
|
28278
28298
|
children: isCollapsed ? /* @__PURE__ */ jsx(
|
|
28279
28299
|
Button,
|
|
28280
28300
|
{
|
|
@@ -28626,7 +28646,7 @@ function SequenceBar({
|
|
|
28626
28646
|
onSlotRemove(index);
|
|
28627
28647
|
}, [onSlotRemove, playing]);
|
|
28628
28648
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
28629
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
28649
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React117__default.Fragment, { children: [
|
|
28630
28650
|
i > 0 && /* @__PURE__ */ jsx(
|
|
28631
28651
|
Typography,
|
|
28632
28652
|
{
|
|
@@ -29864,7 +29884,7 @@ var StatCard = ({
|
|
|
29864
29884
|
const labelToUse = propLabel ?? propTitle;
|
|
29865
29885
|
const eventBus = useEventBus();
|
|
29866
29886
|
const { t } = useTranslate();
|
|
29867
|
-
const handleActionClick =
|
|
29887
|
+
const handleActionClick = React117__default.useCallback(() => {
|
|
29868
29888
|
if (action?.event) {
|
|
29869
29889
|
eventBus.emit(`UI:${action.event}`, {});
|
|
29870
29890
|
}
|
|
@@ -29875,7 +29895,7 @@ var StatCard = ({
|
|
|
29875
29895
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
29876
29896
|
const isLoading = externalLoading ?? false;
|
|
29877
29897
|
const error = externalError;
|
|
29878
|
-
const computeMetricValue =
|
|
29898
|
+
const computeMetricValue = React117__default.useCallback(
|
|
29879
29899
|
(metric, items) => {
|
|
29880
29900
|
if (metric.value !== void 0) {
|
|
29881
29901
|
return metric.value;
|
|
@@ -29914,7 +29934,7 @@ var StatCard = ({
|
|
|
29914
29934
|
},
|
|
29915
29935
|
[]
|
|
29916
29936
|
);
|
|
29917
|
-
const schemaStats =
|
|
29937
|
+
const schemaStats = React117__default.useMemo(() => {
|
|
29918
29938
|
if (!metrics || metrics.length === 0) return null;
|
|
29919
29939
|
return metrics.map((metric) => ({
|
|
29920
29940
|
label: metric.label,
|
|
@@ -29922,7 +29942,7 @@ var StatCard = ({
|
|
|
29922
29942
|
format: metric.format
|
|
29923
29943
|
}));
|
|
29924
29944
|
}, [metrics, data, computeMetricValue]);
|
|
29925
|
-
const calculatedTrend =
|
|
29945
|
+
const calculatedTrend = React117__default.useMemo(() => {
|
|
29926
29946
|
if (manualTrend !== void 0) return manualTrend;
|
|
29927
29947
|
if (previousValue === void 0 || currentValue === void 0)
|
|
29928
29948
|
return void 0;
|
|
@@ -30833,7 +30853,7 @@ var Timeline = ({
|
|
|
30833
30853
|
}) => {
|
|
30834
30854
|
const { t } = useTranslate();
|
|
30835
30855
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
30836
|
-
const items =
|
|
30856
|
+
const items = React117__default.useMemo(() => {
|
|
30837
30857
|
if (propItems) return propItems;
|
|
30838
30858
|
if (entityData.length === 0) return [];
|
|
30839
30859
|
return entityData.map((record, idx) => {
|
|
@@ -30935,7 +30955,7 @@ var Timeline = ({
|
|
|
30935
30955
|
};
|
|
30936
30956
|
Timeline.displayName = "Timeline";
|
|
30937
30957
|
function extractToastProps(children) {
|
|
30938
|
-
if (!
|
|
30958
|
+
if (!React117__default.isValidElement(children)) {
|
|
30939
30959
|
if (typeof children === "string") {
|
|
30940
30960
|
return { message: children };
|
|
30941
30961
|
}
|
|
@@ -30966,7 +30986,7 @@ var ToastSlot = ({
|
|
|
30966
30986
|
eventBus.emit("UI:CLOSE");
|
|
30967
30987
|
};
|
|
30968
30988
|
if (!isVisible) return null;
|
|
30969
|
-
const isCustomContent =
|
|
30989
|
+
const isCustomContent = React117__default.isValidElement(children) && !message;
|
|
30970
30990
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
30971
30991
|
Toast,
|
|
30972
30992
|
{
|
|
@@ -31210,7 +31230,7 @@ var WizardContainer = ({
|
|
|
31210
31230
|
const isCompleted = index < currentStep;
|
|
31211
31231
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
31212
31232
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
31213
|
-
return /* @__PURE__ */ jsxs(
|
|
31233
|
+
return /* @__PURE__ */ jsxs(React117__default.Fragment, { children: [
|
|
31214
31234
|
/* @__PURE__ */ jsx(
|
|
31215
31235
|
Button,
|
|
31216
31236
|
{
|
|
@@ -31576,12 +31596,12 @@ WorldMapTemplate.displayName = "WorldMapTemplate";
|
|
|
31576
31596
|
|
|
31577
31597
|
// components/organisms/component-registry.generated.ts
|
|
31578
31598
|
function lazyThree(name, loader) {
|
|
31579
|
-
const Lazy =
|
|
31599
|
+
const Lazy = React117__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
31580
31600
|
function ThreeWrapper(props) {
|
|
31581
|
-
return
|
|
31582
|
-
|
|
31601
|
+
return React117__default.createElement(
|
|
31602
|
+
React117__default.Suspense,
|
|
31583
31603
|
{ fallback: null },
|
|
31584
|
-
|
|
31604
|
+
React117__default.createElement(Lazy, props)
|
|
31585
31605
|
);
|
|
31586
31606
|
}
|
|
31587
31607
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -31869,7 +31889,7 @@ function SuspenseConfigProvider({
|
|
|
31869
31889
|
config,
|
|
31870
31890
|
children
|
|
31871
31891
|
}) {
|
|
31872
|
-
return
|
|
31892
|
+
return React117__default.createElement(
|
|
31873
31893
|
SuspenseConfigContext.Provider,
|
|
31874
31894
|
{ value: config },
|
|
31875
31895
|
children
|
|
@@ -31930,7 +31950,8 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
31930
31950
|
return /* @__PURE__ */ jsx(
|
|
31931
31951
|
Box,
|
|
31932
31952
|
{
|
|
31933
|
-
className: "absolute inset-0 z-50 flex items-
|
|
31953
|
+
className: "absolute inset-0 z-50 flex items-start justify-center overflow-auto",
|
|
31954
|
+
style: { backgroundColor: "rgba(0, 0, 0, 0.5)", paddingTop: "10%" },
|
|
31934
31955
|
onClick: onDismiss,
|
|
31935
31956
|
children: /* @__PURE__ */ jsxs(
|
|
31936
31957
|
Box,
|
|
@@ -31939,7 +31960,8 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
31939
31960
|
border: true,
|
|
31940
31961
|
shadow: "lg",
|
|
31941
31962
|
rounded: "md",
|
|
31942
|
-
className: "pointer-events-auto
|
|
31963
|
+
className: "pointer-events-auto w-full overflow-auto flex flex-col",
|
|
31964
|
+
style: { minWidth: "520px", maxWidth: "700px", maxHeight: "80%" },
|
|
31943
31965
|
onClick: (e) => e.stopPropagation(),
|
|
31944
31966
|
children: [
|
|
31945
31967
|
content.props.title ? /* @__PURE__ */ jsxs(Box, { className: "flex items-center justify-between p-4 border-b border-border", children: [
|
|
@@ -31964,7 +31986,8 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
31964
31986
|
return /* @__PURE__ */ jsx(
|
|
31965
31987
|
Box,
|
|
31966
31988
|
{
|
|
31967
|
-
className: "absolute inset-0 z-50
|
|
31989
|
+
className: "absolute inset-0 z-50 overflow-hidden",
|
|
31990
|
+
style: { backgroundColor: "rgba(0, 0, 0, 0.5)" },
|
|
31968
31991
|
onClick: onDismiss,
|
|
31969
31992
|
children: /* @__PURE__ */ jsxs(
|
|
31970
31993
|
Box,
|
|
@@ -32008,7 +32031,8 @@ function renderContainedPortal(slot, content, onDismiss) {
|
|
|
32008
32031
|
return /* @__PURE__ */ jsx(
|
|
32009
32032
|
Box,
|
|
32010
32033
|
{
|
|
32011
|
-
className: "absolute inset-0 z-50
|
|
32034
|
+
className: "absolute inset-0 z-50 flex items-center justify-center overflow-auto",
|
|
32035
|
+
style: { backgroundColor: "rgba(0, 0, 0, 0.5)" },
|
|
32012
32036
|
onClick: onDismiss,
|
|
32013
32037
|
children: /* @__PURE__ */ jsx(Box, { className: "max-h-full overflow-auto", onClick: (e) => e.stopPropagation(), children: slotContent })
|
|
32014
32038
|
}
|
|
@@ -32384,12 +32408,13 @@ function UISlotRenderer({
|
|
|
32384
32408
|
const isContained = hudMode === "inline";
|
|
32385
32409
|
const suspenseConfig = suspense === true ? { enabled: true } : suspense && typeof suspense === "object" ? suspense : { enabled: false };
|
|
32386
32410
|
const content = /* @__PURE__ */ jsxs(Box, { className: cn(
|
|
32387
|
-
"ui-slot-renderer",
|
|
32388
|
-
isContained && "relative",
|
|
32411
|
+
"ui-slot-renderer relative min-h-full",
|
|
32389
32412
|
className
|
|
32390
32413
|
), children: [
|
|
32391
|
-
/* @__PURE__ */
|
|
32392
|
-
|
|
32414
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex min-h-full", children: [
|
|
32415
|
+
/* @__PURE__ */ jsx(UISlotComponent, { slot: "sidebar", className: "ui-slot-sidebar min-w-0 shrink-0" }),
|
|
32416
|
+
/* @__PURE__ */ jsx(UISlotComponent, { slot: "main", className: "ui-slot-main flex-1 min-h-[200px]" })
|
|
32417
|
+
] }),
|
|
32393
32418
|
/* @__PURE__ */ jsx(UISlotComponent, { slot: "modal", portal: true }),
|
|
32394
32419
|
/* @__PURE__ */ jsx(UISlotComponent, { slot: "drawer", portal: true }),
|
|
32395
32420
|
/* @__PURE__ */ jsx(UISlotComponent, { slot: "overlay", portal: true }),
|
|
@@ -32400,14 +32425,14 @@ function UISlotRenderer({
|
|
|
32400
32425
|
UISlotComponent,
|
|
32401
32426
|
{
|
|
32402
32427
|
slot: "hud-top",
|
|
32403
|
-
className: isContained ? "
|
|
32428
|
+
className: isContained ? "absolute top-0 left-0 right-0 z-40" : "fixed top-0 inset-x-0 z-40"
|
|
32404
32429
|
}
|
|
32405
32430
|
),
|
|
32406
32431
|
/* @__PURE__ */ jsx(
|
|
32407
32432
|
UISlotComponent,
|
|
32408
32433
|
{
|
|
32409
32434
|
slot: "hud-bottom",
|
|
32410
|
-
className: isContained ? "
|
|
32435
|
+
className: isContained ? "absolute bottom-0 left-0 right-0 z-40" : "fixed bottom-0 inset-x-0 z-40"
|
|
32411
32436
|
}
|
|
32412
32437
|
)
|
|
32413
32438
|
] }),
|
|
@@ -32415,7 +32440,7 @@ function UISlotRenderer({
|
|
|
32415
32440
|
UISlotComponent,
|
|
32416
32441
|
{
|
|
32417
32442
|
slot: "floating",
|
|
32418
|
-
className: isContained ? "absolute z-50" : "fixed z-50",
|
|
32443
|
+
className: isContained ? "absolute top-2 left-2 z-50" : "fixed z-50",
|
|
32419
32444
|
draggable: true
|
|
32420
32445
|
}
|
|
32421
32446
|
)
|