@almadar/ui 5.87.0 → 5.89.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 +1450 -1364
- package/dist/avl/index.js +439 -353
- package/dist/components/game/2d/molecules/StateGraph.d.ts +38 -0
- package/dist/components/game/2d/molecules/index.d.ts +1 -0
- package/dist/components/index.cjs +214 -126
- package/dist/components/index.js +214 -127
- package/dist/providers/index.cjs +1317 -1231
- package/dist/providers/index.js +415 -329
- package/dist/runtime/index.cjs +1311 -1225
- package/dist/runtime/index.js +419 -333
- package/package.json +1 -1
package/dist/providers/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React98 from 'react';
|
|
2
|
+
import React98__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useLayoutEffect, lazy, useId, useSyncExternalStore } from 'react';
|
|
3
3
|
import { EventBusContext, useTraitScope, useEntitySchemaOptional, TraitScopeProvider, useCurrentPagePath } from '@almadar/ui/providers';
|
|
4
4
|
import { createLogger, isLogLevelEnabled } from '@almadar/logger';
|
|
5
5
|
import { clsx } from 'clsx';
|
|
@@ -388,7 +388,7 @@ var init_Box = __esm({
|
|
|
388
388
|
fixed: "fixed",
|
|
389
389
|
sticky: "sticky"
|
|
390
390
|
};
|
|
391
|
-
Box =
|
|
391
|
+
Box = React98__default.forwardRef(
|
|
392
392
|
({
|
|
393
393
|
padding,
|
|
394
394
|
paddingX,
|
|
@@ -453,7 +453,7 @@ var init_Box = __esm({
|
|
|
453
453
|
onPointerDown?.(e);
|
|
454
454
|
}, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
|
|
455
455
|
const isClickable = action || onClick;
|
|
456
|
-
return
|
|
456
|
+
return React98__default.createElement(
|
|
457
457
|
Component,
|
|
458
458
|
{
|
|
459
459
|
ref,
|
|
@@ -549,7 +549,7 @@ function loadLib(key, importer) {
|
|
|
549
549
|
return p;
|
|
550
550
|
}
|
|
551
551
|
function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
|
|
552
|
-
const Lazy =
|
|
552
|
+
const Lazy = React98__default.lazy(async () => {
|
|
553
553
|
const lib = await loadLib(libKey, importer);
|
|
554
554
|
const Comp = pick(lib);
|
|
555
555
|
if (!Comp) {
|
|
@@ -559,7 +559,7 @@ function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
|
|
|
559
559
|
return { default: Comp };
|
|
560
560
|
});
|
|
561
561
|
const Wrapped = (props) => /* @__PURE__ */ jsx(
|
|
562
|
-
|
|
562
|
+
React98__default.Suspense,
|
|
563
563
|
{
|
|
564
564
|
fallback: /* @__PURE__ */ jsx(
|
|
565
565
|
"span",
|
|
@@ -1290,7 +1290,7 @@ var init_Icon = __esm({
|
|
|
1290
1290
|
const directIcon = typeof icon === "string" ? void 0 : icon;
|
|
1291
1291
|
const effectiveName = typeof icon === "string" ? icon : name;
|
|
1292
1292
|
const family = useIconFamily();
|
|
1293
|
-
const RenderedComponent =
|
|
1293
|
+
const RenderedComponent = React98__default.useMemo(() => {
|
|
1294
1294
|
if (directIcon) return null;
|
|
1295
1295
|
return effectiveName ? resolveIconForFamily(effectiveName, family) : null;
|
|
1296
1296
|
}, [directIcon, effectiveName, family]);
|
|
@@ -1352,7 +1352,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
1352
1352
|
const IconComp = value;
|
|
1353
1353
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
1354
1354
|
}
|
|
1355
|
-
if (
|
|
1355
|
+
if (React98__default.isValidElement(value)) {
|
|
1356
1356
|
return value;
|
|
1357
1357
|
}
|
|
1358
1358
|
if (typeof value === "object" && value !== null && isIconLike(value)) {
|
|
@@ -1428,7 +1428,7 @@ var init_Button = __esm({
|
|
|
1428
1428
|
md: "h-icon-default w-icon-default",
|
|
1429
1429
|
lg: "h-icon-default w-icon-default"
|
|
1430
1430
|
};
|
|
1431
|
-
Button =
|
|
1431
|
+
Button = React98__default.forwardRef(
|
|
1432
1432
|
({
|
|
1433
1433
|
className,
|
|
1434
1434
|
variant = "primary",
|
|
@@ -1496,7 +1496,7 @@ var Dialog;
|
|
|
1496
1496
|
var init_Dialog = __esm({
|
|
1497
1497
|
"components/core/atoms/Dialog.tsx"() {
|
|
1498
1498
|
init_cn();
|
|
1499
|
-
Dialog =
|
|
1499
|
+
Dialog = React98__default.forwardRef(
|
|
1500
1500
|
({
|
|
1501
1501
|
role = "dialog",
|
|
1502
1502
|
"aria-modal": ariaModal = true,
|
|
@@ -1614,7 +1614,7 @@ var init_Typography = __esm({
|
|
|
1614
1614
|
}) => {
|
|
1615
1615
|
const variant = variantProp ?? (level ? `h${level}` : "body1");
|
|
1616
1616
|
const Component = as || defaultElements[variant];
|
|
1617
|
-
return
|
|
1617
|
+
return React98__default.createElement(
|
|
1618
1618
|
Component,
|
|
1619
1619
|
{
|
|
1620
1620
|
id,
|
|
@@ -2109,7 +2109,7 @@ var init_Badge = __esm({
|
|
|
2109
2109
|
md: "px-2.5 py-1 text-sm",
|
|
2110
2110
|
lg: "px-3 py-1.5 text-base"
|
|
2111
2111
|
};
|
|
2112
|
-
Badge =
|
|
2112
|
+
Badge = React98__default.forwardRef(
|
|
2113
2113
|
({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, ...props }, ref) => {
|
|
2114
2114
|
const iconSizes3 = {
|
|
2115
2115
|
sm: "h-icon-default w-icon-default",
|
|
@@ -2446,7 +2446,7 @@ var init_SvgFlow = __esm({
|
|
|
2446
2446
|
width = 100,
|
|
2447
2447
|
height = 100
|
|
2448
2448
|
}) => {
|
|
2449
|
-
const markerId =
|
|
2449
|
+
const markerId = React98__default.useMemo(() => {
|
|
2450
2450
|
flowIdCounter += 1;
|
|
2451
2451
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
2452
2452
|
}, []);
|
|
@@ -3039,7 +3039,7 @@ var init_SvgRing = __esm({
|
|
|
3039
3039
|
width = 100,
|
|
3040
3040
|
height = 100
|
|
3041
3041
|
}) => {
|
|
3042
|
-
const gradientId =
|
|
3042
|
+
const gradientId = React98__default.useMemo(() => {
|
|
3043
3043
|
ringIdCounter += 1;
|
|
3044
3044
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
3045
3045
|
}, []);
|
|
@@ -3220,7 +3220,7 @@ var init_Input = __esm({
|
|
|
3220
3220
|
init_cn();
|
|
3221
3221
|
init_Icon();
|
|
3222
3222
|
init_useEventBus();
|
|
3223
|
-
Input =
|
|
3223
|
+
Input = React98__default.forwardRef(
|
|
3224
3224
|
({
|
|
3225
3225
|
className,
|
|
3226
3226
|
inputType,
|
|
@@ -3380,7 +3380,7 @@ var Label;
|
|
|
3380
3380
|
var init_Label = __esm({
|
|
3381
3381
|
"components/core/atoms/Label.tsx"() {
|
|
3382
3382
|
init_cn();
|
|
3383
|
-
Label =
|
|
3383
|
+
Label = React98__default.forwardRef(
|
|
3384
3384
|
({ className, required, children, ...props }, ref) => {
|
|
3385
3385
|
return /* @__PURE__ */ jsxs(
|
|
3386
3386
|
"label",
|
|
@@ -3407,7 +3407,7 @@ var init_Textarea = __esm({
|
|
|
3407
3407
|
"components/core/atoms/Textarea.tsx"() {
|
|
3408
3408
|
init_cn();
|
|
3409
3409
|
init_useEventBus();
|
|
3410
|
-
Textarea =
|
|
3410
|
+
Textarea = React98__default.forwardRef(
|
|
3411
3411
|
({ className, error, onChange, ...props }, ref) => {
|
|
3412
3412
|
const eventBus = useEventBus();
|
|
3413
3413
|
const handleChange = (e) => {
|
|
@@ -3646,7 +3646,7 @@ var init_Select = __esm({
|
|
|
3646
3646
|
init_cn();
|
|
3647
3647
|
init_Icon();
|
|
3648
3648
|
init_useEventBus();
|
|
3649
|
-
Select =
|
|
3649
|
+
Select = React98__default.forwardRef(
|
|
3650
3650
|
(props, _ref) => {
|
|
3651
3651
|
const { multiple, searchable, clearable } = props;
|
|
3652
3652
|
if (multiple || searchable || clearable) {
|
|
@@ -3663,7 +3663,7 @@ var init_Checkbox = __esm({
|
|
|
3663
3663
|
"components/core/atoms/Checkbox.tsx"() {
|
|
3664
3664
|
init_cn();
|
|
3665
3665
|
init_useEventBus();
|
|
3666
|
-
Checkbox =
|
|
3666
|
+
Checkbox = React98__default.forwardRef(
|
|
3667
3667
|
({ className, label, id, onChange, ...props }, ref) => {
|
|
3668
3668
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
3669
3669
|
const eventBus = useEventBus();
|
|
@@ -3717,7 +3717,7 @@ var init_Spinner = __esm({
|
|
|
3717
3717
|
md: "h-6 w-6",
|
|
3718
3718
|
lg: "h-8 w-8"
|
|
3719
3719
|
};
|
|
3720
|
-
Spinner =
|
|
3720
|
+
Spinner = React98__default.forwardRef(
|
|
3721
3721
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
3722
3722
|
if (overlay) {
|
|
3723
3723
|
return /* @__PURE__ */ jsx(
|
|
@@ -3807,7 +3807,7 @@ var init_Card = __esm({
|
|
|
3807
3807
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
3808
3808
|
"tile-image-first": "p-0 overflow-hidden"
|
|
3809
3809
|
};
|
|
3810
|
-
Card =
|
|
3810
|
+
Card = React98__default.forwardRef(
|
|
3811
3811
|
({
|
|
3812
3812
|
className,
|
|
3813
3813
|
variant = "bordered",
|
|
@@ -3855,9 +3855,9 @@ var init_Card = __esm({
|
|
|
3855
3855
|
}
|
|
3856
3856
|
);
|
|
3857
3857
|
Card.displayName = "Card";
|
|
3858
|
-
CardHeader =
|
|
3858
|
+
CardHeader = React98__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
3859
3859
|
CardHeader.displayName = "CardHeader";
|
|
3860
|
-
CardTitle =
|
|
3860
|
+
CardTitle = React98__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3861
3861
|
"h3",
|
|
3862
3862
|
{
|
|
3863
3863
|
ref,
|
|
@@ -3870,11 +3870,11 @@ var init_Card = __esm({
|
|
|
3870
3870
|
}
|
|
3871
3871
|
));
|
|
3872
3872
|
CardTitle.displayName = "CardTitle";
|
|
3873
|
-
CardContent =
|
|
3873
|
+
CardContent = React98__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
3874
3874
|
CardContent.displayName = "CardContent";
|
|
3875
3875
|
CardBody = CardContent;
|
|
3876
3876
|
CardBody.displayName = "CardBody";
|
|
3877
|
-
CardFooter =
|
|
3877
|
+
CardFooter = React98__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3878
3878
|
"div",
|
|
3879
3879
|
{
|
|
3880
3880
|
ref,
|
|
@@ -3929,7 +3929,7 @@ var init_FilterPill = __esm({
|
|
|
3929
3929
|
md: "w-3.5 h-3.5",
|
|
3930
3930
|
lg: "w-4 h-4"
|
|
3931
3931
|
};
|
|
3932
|
-
FilterPill =
|
|
3932
|
+
FilterPill = React98__default.forwardRef(
|
|
3933
3933
|
({
|
|
3934
3934
|
className,
|
|
3935
3935
|
variant = "default",
|
|
@@ -4058,8 +4058,8 @@ var init_Avatar = __esm({
|
|
|
4058
4058
|
actionPayload
|
|
4059
4059
|
}) => {
|
|
4060
4060
|
const eventBus = useEventBus();
|
|
4061
|
-
const [imgFailed, setImgFailed] =
|
|
4062
|
-
|
|
4061
|
+
const [imgFailed, setImgFailed] = React98__default.useState(false);
|
|
4062
|
+
React98__default.useEffect(() => {
|
|
4063
4063
|
setImgFailed(false);
|
|
4064
4064
|
}, [src]);
|
|
4065
4065
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -4172,7 +4172,7 @@ var init_Center = __esm({
|
|
|
4172
4172
|
as: Component = "div"
|
|
4173
4173
|
}) => {
|
|
4174
4174
|
const mergedStyle = minHeight ? { minHeight, ...style } : style;
|
|
4175
|
-
return
|
|
4175
|
+
return React98__default.createElement(Component, {
|
|
4176
4176
|
className: cn(
|
|
4177
4177
|
inline ? "inline-flex" : "flex",
|
|
4178
4178
|
horizontal && "justify-center",
|
|
@@ -4440,7 +4440,7 @@ var init_Radio = __esm({
|
|
|
4440
4440
|
md: "w-2.5 h-2.5",
|
|
4441
4441
|
lg: "w-3 h-3"
|
|
4442
4442
|
};
|
|
4443
|
-
Radio =
|
|
4443
|
+
Radio = React98__default.forwardRef(
|
|
4444
4444
|
({
|
|
4445
4445
|
label,
|
|
4446
4446
|
helperText,
|
|
@@ -4457,12 +4457,12 @@ var init_Radio = __esm({
|
|
|
4457
4457
|
onChange,
|
|
4458
4458
|
...props
|
|
4459
4459
|
}, ref) => {
|
|
4460
|
-
const reactId =
|
|
4460
|
+
const reactId = React98__default.useId();
|
|
4461
4461
|
const baseId = id || `radio-${reactId}`;
|
|
4462
4462
|
const hasError = !!error;
|
|
4463
4463
|
const eventBus = useEventBus();
|
|
4464
|
-
const [selected, setSelected] =
|
|
4465
|
-
|
|
4464
|
+
const [selected, setSelected] = React98__default.useState(value);
|
|
4465
|
+
React98__default.useEffect(() => {
|
|
4466
4466
|
if (value !== void 0) setSelected(value);
|
|
4467
4467
|
}, [value]);
|
|
4468
4468
|
const pick = (next, e) => {
|
|
@@ -4644,7 +4644,7 @@ var init_Switch = __esm({
|
|
|
4644
4644
|
"components/core/atoms/Switch.tsx"() {
|
|
4645
4645
|
"use client";
|
|
4646
4646
|
init_cn();
|
|
4647
|
-
Switch =
|
|
4647
|
+
Switch = React98.forwardRef(
|
|
4648
4648
|
({
|
|
4649
4649
|
checked,
|
|
4650
4650
|
defaultChecked = false,
|
|
@@ -4655,10 +4655,10 @@ var init_Switch = __esm({
|
|
|
4655
4655
|
name,
|
|
4656
4656
|
className
|
|
4657
4657
|
}, ref) => {
|
|
4658
|
-
const [isChecked, setIsChecked] =
|
|
4658
|
+
const [isChecked, setIsChecked] = React98.useState(
|
|
4659
4659
|
checked !== void 0 ? checked : defaultChecked
|
|
4660
4660
|
);
|
|
4661
|
-
|
|
4661
|
+
React98.useEffect(() => {
|
|
4662
4662
|
if (checked !== void 0) {
|
|
4663
4663
|
setIsChecked(checked);
|
|
4664
4664
|
}
|
|
@@ -4821,7 +4821,7 @@ var init_Stack = __esm({
|
|
|
4821
4821
|
};
|
|
4822
4822
|
const isHorizontal = direction === "horizontal";
|
|
4823
4823
|
const directionClass = responsive && isHorizontal ? reverse ? "flex-col-reverse md:flex-row-reverse" : "flex-col md:flex-row" : isHorizontal ? reverse ? "flex-row-reverse" : "flex-row" : reverse ? "flex-col-reverse" : "flex-col";
|
|
4824
|
-
return
|
|
4824
|
+
return React98__default.createElement(
|
|
4825
4825
|
Component,
|
|
4826
4826
|
{
|
|
4827
4827
|
className: cn(
|
|
@@ -5021,7 +5021,7 @@ var Aside;
|
|
|
5021
5021
|
var init_Aside = __esm({
|
|
5022
5022
|
"components/core/atoms/Aside.tsx"() {
|
|
5023
5023
|
init_cn();
|
|
5024
|
-
Aside =
|
|
5024
|
+
Aside = React98__default.forwardRef(
|
|
5025
5025
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
5026
5026
|
);
|
|
5027
5027
|
Aside.displayName = "Aside";
|
|
@@ -5100,9 +5100,9 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5100
5100
|
className
|
|
5101
5101
|
}) => {
|
|
5102
5102
|
const { t } = useTranslate();
|
|
5103
|
-
const [isVisible, setIsVisible] =
|
|
5104
|
-
const timeoutRef =
|
|
5105
|
-
const triggerRef =
|
|
5103
|
+
const [isVisible, setIsVisible] = React98__default.useState(false);
|
|
5104
|
+
const timeoutRef = React98__default.useRef(null);
|
|
5105
|
+
const triggerRef = React98__default.useRef(null);
|
|
5106
5106
|
const handleMouseEnter = () => {
|
|
5107
5107
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5108
5108
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -5113,7 +5113,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5113
5113
|
};
|
|
5114
5114
|
const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
|
|
5115
5115
|
const open = isVisible || revealed;
|
|
5116
|
-
|
|
5116
|
+
React98__default.useEffect(() => {
|
|
5117
5117
|
return () => {
|
|
5118
5118
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5119
5119
|
};
|
|
@@ -5323,7 +5323,7 @@ var init_StatusDot = __esm({
|
|
|
5323
5323
|
md: "w-2.5 h-2.5",
|
|
5324
5324
|
lg: "w-3 h-3"
|
|
5325
5325
|
};
|
|
5326
|
-
StatusDot =
|
|
5326
|
+
StatusDot = React98__default.forwardRef(
|
|
5327
5327
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
5328
5328
|
return /* @__PURE__ */ jsx(
|
|
5329
5329
|
"span",
|
|
@@ -5377,7 +5377,7 @@ var init_TrendIndicator = __esm({
|
|
|
5377
5377
|
down: "trending-down",
|
|
5378
5378
|
flat: "arrow-right"
|
|
5379
5379
|
};
|
|
5380
|
-
TrendIndicator =
|
|
5380
|
+
TrendIndicator = React98__default.forwardRef(
|
|
5381
5381
|
({
|
|
5382
5382
|
className,
|
|
5383
5383
|
value,
|
|
@@ -5444,7 +5444,7 @@ var init_RangeSlider = __esm({
|
|
|
5444
5444
|
md: "w-4 h-4",
|
|
5445
5445
|
lg: "w-5 h-5"
|
|
5446
5446
|
};
|
|
5447
|
-
RangeSlider =
|
|
5447
|
+
RangeSlider = React98__default.forwardRef(
|
|
5448
5448
|
({
|
|
5449
5449
|
className,
|
|
5450
5450
|
min = 0,
|
|
@@ -6038,7 +6038,7 @@ var init_ContentSection = __esm({
|
|
|
6038
6038
|
md: "py-16",
|
|
6039
6039
|
lg: "py-24"
|
|
6040
6040
|
};
|
|
6041
|
-
ContentSection =
|
|
6041
|
+
ContentSection = React98__default.forwardRef(
|
|
6042
6042
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
6043
6043
|
return /* @__PURE__ */ jsx(
|
|
6044
6044
|
Box,
|
|
@@ -6572,7 +6572,7 @@ var init_AnimatedReveal = __esm({
|
|
|
6572
6572
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
6573
6573
|
"none": {}
|
|
6574
6574
|
};
|
|
6575
|
-
AnimatedReveal =
|
|
6575
|
+
AnimatedReveal = React98__default.forwardRef(
|
|
6576
6576
|
({
|
|
6577
6577
|
trigger = "scroll",
|
|
6578
6578
|
animation = "fade-up",
|
|
@@ -6732,7 +6732,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6732
6732
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
6733
6733
|
"use client";
|
|
6734
6734
|
init_cn();
|
|
6735
|
-
AnimatedGraphic =
|
|
6735
|
+
AnimatedGraphic = React98__default.forwardRef(
|
|
6736
6736
|
({
|
|
6737
6737
|
src,
|
|
6738
6738
|
svgContent,
|
|
@@ -6755,7 +6755,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6755
6755
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
6756
6756
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
6757
6757
|
const prevAnimateRef = useRef(animate);
|
|
6758
|
-
const setRef =
|
|
6758
|
+
const setRef = React98__default.useCallback(
|
|
6759
6759
|
(node) => {
|
|
6760
6760
|
containerRef.current = node;
|
|
6761
6761
|
if (typeof ref === "function") ref(node);
|
|
@@ -7350,7 +7350,7 @@ function GameCard({
|
|
|
7350
7350
|
className
|
|
7351
7351
|
}) {
|
|
7352
7352
|
const eventBus = useEventBus();
|
|
7353
|
-
const handleClick =
|
|
7353
|
+
const handleClick = React98.useCallback(() => {
|
|
7354
7354
|
if (disabled) return;
|
|
7355
7355
|
onClick?.(id);
|
|
7356
7356
|
if (clickEvent) eventBus.emit(`UI:${clickEvent}`, { cardId: id });
|
|
@@ -7632,9 +7632,9 @@ function ControlButton({
|
|
|
7632
7632
|
className
|
|
7633
7633
|
}) {
|
|
7634
7634
|
const eventBus = useEventBus();
|
|
7635
|
-
const [isPressed, setIsPressed] =
|
|
7635
|
+
const [isPressed, setIsPressed] = React98.useState(false);
|
|
7636
7636
|
const actualPressed = pressed ?? isPressed;
|
|
7637
|
-
const handlePointerDown =
|
|
7637
|
+
const handlePointerDown = React98.useCallback(
|
|
7638
7638
|
(e) => {
|
|
7639
7639
|
e.preventDefault();
|
|
7640
7640
|
if (disabled) return;
|
|
@@ -7644,7 +7644,7 @@ function ControlButton({
|
|
|
7644
7644
|
},
|
|
7645
7645
|
[disabled, pressEvent, eventBus, onPress]
|
|
7646
7646
|
);
|
|
7647
|
-
const handlePointerUp =
|
|
7647
|
+
const handlePointerUp = React98.useCallback(
|
|
7648
7648
|
(e) => {
|
|
7649
7649
|
e.preventDefault();
|
|
7650
7650
|
if (disabled) return;
|
|
@@ -7654,7 +7654,7 @@ function ControlButton({
|
|
|
7654
7654
|
},
|
|
7655
7655
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
7656
7656
|
);
|
|
7657
|
-
const handlePointerLeave =
|
|
7657
|
+
const handlePointerLeave = React98.useCallback(
|
|
7658
7658
|
(e) => {
|
|
7659
7659
|
if (isPressed) {
|
|
7660
7660
|
setIsPressed(false);
|
|
@@ -8673,8 +8673,8 @@ function MiniMap({
|
|
|
8673
8673
|
tileAssets,
|
|
8674
8674
|
unitAssets
|
|
8675
8675
|
}) {
|
|
8676
|
-
const canvasRef =
|
|
8677
|
-
const imgCacheRef =
|
|
8676
|
+
const canvasRef = React98.useRef(null);
|
|
8677
|
+
const imgCacheRef = React98.useRef(/* @__PURE__ */ new Map());
|
|
8678
8678
|
function loadImg(url) {
|
|
8679
8679
|
const cached = imgCacheRef.current.get(url);
|
|
8680
8680
|
if (cached) return cached.complete ? cached : null;
|
|
@@ -8689,7 +8689,7 @@ function MiniMap({
|
|
|
8689
8689
|
imgCacheRef.current.set(url, img);
|
|
8690
8690
|
return null;
|
|
8691
8691
|
}
|
|
8692
|
-
|
|
8692
|
+
React98.useEffect(() => {
|
|
8693
8693
|
const canvas = canvasRef.current;
|
|
8694
8694
|
if (!canvas) return;
|
|
8695
8695
|
const ctx = canvas.getContext("2d");
|
|
@@ -8824,8 +8824,8 @@ function ControlGrid({
|
|
|
8824
8824
|
className
|
|
8825
8825
|
}) {
|
|
8826
8826
|
const eventBus = useEventBus();
|
|
8827
|
-
const [active, setActive] =
|
|
8828
|
-
const handlePress =
|
|
8827
|
+
const [active, setActive] = React98.useState(/* @__PURE__ */ new Set());
|
|
8828
|
+
const handlePress = React98.useCallback(
|
|
8829
8829
|
(id) => {
|
|
8830
8830
|
setActive((prev) => new Set(prev).add(id));
|
|
8831
8831
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -8839,7 +8839,7 @@ function ControlGrid({
|
|
|
8839
8839
|
},
|
|
8840
8840
|
[kind, actionEvent, directionEvent, directionEvents, eventBus, onAction, onDirection]
|
|
8841
8841
|
);
|
|
8842
|
-
const handleRelease =
|
|
8842
|
+
const handleRelease = React98.useCallback(
|
|
8843
8843
|
(id) => {
|
|
8844
8844
|
setActive((prev) => {
|
|
8845
8845
|
const next = new Set(prev);
|
|
@@ -9097,7 +9097,7 @@ function InventoryGrid({
|
|
|
9097
9097
|
const eventBus = useEventBus();
|
|
9098
9098
|
const slotCount = totalSlots ?? items.length;
|
|
9099
9099
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
9100
|
-
const handleSelect =
|
|
9100
|
+
const handleSelect = React98.useCallback(
|
|
9101
9101
|
(id) => {
|
|
9102
9102
|
onSelect?.(id);
|
|
9103
9103
|
if (selectEvent) {
|
|
@@ -9314,7 +9314,7 @@ function GameMenu({
|
|
|
9314
9314
|
}) {
|
|
9315
9315
|
const resolvedOptions = options ?? menuItems ?? DEFAULT_MENU_OPTIONS;
|
|
9316
9316
|
const eventBus = useEventBus();
|
|
9317
|
-
const handleOptionClick =
|
|
9317
|
+
const handleOptionClick = React98.useCallback(
|
|
9318
9318
|
(option) => {
|
|
9319
9319
|
if (option.event) {
|
|
9320
9320
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -9391,6 +9391,214 @@ var init_GameMenu = __esm({
|
|
|
9391
9391
|
GameMenu.displayName = "GameMenu";
|
|
9392
9392
|
}
|
|
9393
9393
|
});
|
|
9394
|
+
function StateNode({
|
|
9395
|
+
name,
|
|
9396
|
+
isCurrent = false,
|
|
9397
|
+
isSelected = false,
|
|
9398
|
+
isInitial = false,
|
|
9399
|
+
position,
|
|
9400
|
+
onClick,
|
|
9401
|
+
className
|
|
9402
|
+
}) {
|
|
9403
|
+
return /* @__PURE__ */ jsx(
|
|
9404
|
+
Box,
|
|
9405
|
+
{
|
|
9406
|
+
position: "absolute",
|
|
9407
|
+
display: "flex",
|
|
9408
|
+
className: cn(
|
|
9409
|
+
"items-center justify-center rounded-pill border-3 transition-all cursor-pointer select-none",
|
|
9410
|
+
"min-w-[80px] h-[80px] px-3",
|
|
9411
|
+
isCurrent && "bg-primary/20 border-primary shadow-lg shadow-primary/30 scale-110",
|
|
9412
|
+
isSelected && !isCurrent && "bg-accent/20 border-accent ring-2 ring-accent/50",
|
|
9413
|
+
!isCurrent && !isSelected && "bg-card border-border hover:border-muted-foreground hover:scale-105",
|
|
9414
|
+
className
|
|
9415
|
+
),
|
|
9416
|
+
style: {
|
|
9417
|
+
left: position.x,
|
|
9418
|
+
top: position.y,
|
|
9419
|
+
transform: "translate(-50%, -50%)"
|
|
9420
|
+
},
|
|
9421
|
+
onClick,
|
|
9422
|
+
children: /* @__PURE__ */ jsxs(Box, { className: "text-center", children: [
|
|
9423
|
+
isInitial && /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-muted-foreground text-xs block", children: "\u25B6 start" }),
|
|
9424
|
+
/* @__PURE__ */ jsx(
|
|
9425
|
+
Typography,
|
|
9426
|
+
{
|
|
9427
|
+
variant: "body2",
|
|
9428
|
+
className: cn(
|
|
9429
|
+
"font-bold whitespace-nowrap",
|
|
9430
|
+
isCurrent ? "text-primary" : "text-foreground"
|
|
9431
|
+
),
|
|
9432
|
+
children: name
|
|
9433
|
+
}
|
|
9434
|
+
)
|
|
9435
|
+
] })
|
|
9436
|
+
}
|
|
9437
|
+
);
|
|
9438
|
+
}
|
|
9439
|
+
var init_StateNode = __esm({
|
|
9440
|
+
"components/game/2d/organisms/StateNode.tsx"() {
|
|
9441
|
+
init_atoms();
|
|
9442
|
+
init_cn();
|
|
9443
|
+
StateNode.displayName = "StateNode";
|
|
9444
|
+
}
|
|
9445
|
+
});
|
|
9446
|
+
function TransitionArrow({
|
|
9447
|
+
from,
|
|
9448
|
+
to,
|
|
9449
|
+
eventLabel,
|
|
9450
|
+
guardHint,
|
|
9451
|
+
isActive = false,
|
|
9452
|
+
onClick,
|
|
9453
|
+
className
|
|
9454
|
+
}) {
|
|
9455
|
+
const dx = to.x - from.x;
|
|
9456
|
+
const dy = to.y - from.y;
|
|
9457
|
+
const dist = Math.sqrt(dx * dx + dy * dy);
|
|
9458
|
+
if (dist === 0) return /* @__PURE__ */ jsx(Fragment, {});
|
|
9459
|
+
const nx = dx / dist;
|
|
9460
|
+
const ny = dy / dist;
|
|
9461
|
+
const startX = from.x + nx * NODE_RADIUS;
|
|
9462
|
+
const startY = from.y + ny * NODE_RADIUS;
|
|
9463
|
+
const endX = to.x - nx * NODE_RADIUS;
|
|
9464
|
+
const endY = to.y - ny * NODE_RADIUS;
|
|
9465
|
+
const midX = (startX + endX) / 2;
|
|
9466
|
+
const midY = (startY + endY) / 2;
|
|
9467
|
+
const perpX = -ny * 20;
|
|
9468
|
+
const perpY = nx * 20;
|
|
9469
|
+
const ctrlX = midX + perpX;
|
|
9470
|
+
const ctrlY = midY + perpY;
|
|
9471
|
+
const path = `M ${startX} ${startY} Q ${ctrlX} ${ctrlY} ${endX} ${endY}`;
|
|
9472
|
+
return /* @__PURE__ */ jsxs("g", { className: cn("cursor-pointer", className), onClick, children: [
|
|
9473
|
+
/* @__PURE__ */ jsx(
|
|
9474
|
+
"path",
|
|
9475
|
+
{
|
|
9476
|
+
d: path,
|
|
9477
|
+
fill: "none",
|
|
9478
|
+
stroke: isActive ? "var(--color-primary)" : "var(--color-border)",
|
|
9479
|
+
strokeWidth: isActive ? 3 : 2,
|
|
9480
|
+
markerEnd: isActive ? "url(#arrowhead-active)" : "url(#arrowhead)"
|
|
9481
|
+
}
|
|
9482
|
+
),
|
|
9483
|
+
/* @__PURE__ */ jsx(
|
|
9484
|
+
"text",
|
|
9485
|
+
{
|
|
9486
|
+
x: ctrlX,
|
|
9487
|
+
y: ctrlY - 8,
|
|
9488
|
+
textAnchor: "middle",
|
|
9489
|
+
fill: isActive ? "var(--color-primary)" : "var(--color-foreground)",
|
|
9490
|
+
fontSize: 12,
|
|
9491
|
+
fontWeight: isActive ? "bold" : "normal",
|
|
9492
|
+
className: "select-none",
|
|
9493
|
+
children: eventLabel
|
|
9494
|
+
}
|
|
9495
|
+
),
|
|
9496
|
+
guardHint && /* @__PURE__ */ jsx(
|
|
9497
|
+
"text",
|
|
9498
|
+
{
|
|
9499
|
+
x: ctrlX,
|
|
9500
|
+
y: ctrlY + 6,
|
|
9501
|
+
textAnchor: "middle",
|
|
9502
|
+
fill: "var(--color-warning)",
|
|
9503
|
+
fontSize: 10,
|
|
9504
|
+
className: "select-none",
|
|
9505
|
+
children: "\u26A0 " + guardHint
|
|
9506
|
+
}
|
|
9507
|
+
)
|
|
9508
|
+
] });
|
|
9509
|
+
}
|
|
9510
|
+
var NODE_RADIUS;
|
|
9511
|
+
var init_TransitionArrow = __esm({
|
|
9512
|
+
"components/game/2d/organisms/TransitionArrow.tsx"() {
|
|
9513
|
+
init_cn();
|
|
9514
|
+
NODE_RADIUS = 40;
|
|
9515
|
+
TransitionArrow.displayName = "TransitionArrow";
|
|
9516
|
+
}
|
|
9517
|
+
});
|
|
9518
|
+
function layoutStates(states, width, height) {
|
|
9519
|
+
const cx = width / 2;
|
|
9520
|
+
const cy = height / 2;
|
|
9521
|
+
const radius = Math.min(cx, cy) - 60;
|
|
9522
|
+
const positions = {};
|
|
9523
|
+
states.forEach((state, i) => {
|
|
9524
|
+
const angle = 2 * Math.PI * i / Math.max(states.length, 1) - Math.PI / 2;
|
|
9525
|
+
positions[state] = { x: cx + radius * Math.cos(angle), y: cy + radius * Math.sin(angle) };
|
|
9526
|
+
});
|
|
9527
|
+
return positions;
|
|
9528
|
+
}
|
|
9529
|
+
function StateGraph({
|
|
9530
|
+
states,
|
|
9531
|
+
transitions = [],
|
|
9532
|
+
currentState,
|
|
9533
|
+
selectedState,
|
|
9534
|
+
addingFrom,
|
|
9535
|
+
initialState,
|
|
9536
|
+
width = 500,
|
|
9537
|
+
height = 400,
|
|
9538
|
+
nodeClickEvent,
|
|
9539
|
+
className
|
|
9540
|
+
}) {
|
|
9541
|
+
const eventBus = useEventBus();
|
|
9542
|
+
const nodes = states ?? [];
|
|
9543
|
+
const positions = React98.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
|
|
9544
|
+
return /* @__PURE__ */ jsxs(
|
|
9545
|
+
Box,
|
|
9546
|
+
{
|
|
9547
|
+
position: "relative",
|
|
9548
|
+
className: cn("rounded-container border border-border bg-background overflow-hidden", className),
|
|
9549
|
+
style: { width, height },
|
|
9550
|
+
children: [
|
|
9551
|
+
/* @__PURE__ */ jsxs("svg", { width, height, className: "absolute inset-0", style: { pointerEvents: "none" }, children: [
|
|
9552
|
+
/* @__PURE__ */ jsxs("defs", { children: [
|
|
9553
|
+
/* @__PURE__ */ jsx("marker", { id: "arrowhead", markerWidth: "10", markerHeight: "7", refX: "10", refY: "3.5", orient: "auto", children: /* @__PURE__ */ jsx("polygon", { points: "0 0, 10 3.5, 0 7", fill: "var(--color-border)" }) }),
|
|
9554
|
+
/* @__PURE__ */ jsx("marker", { id: "arrowhead-active", markerWidth: "10", markerHeight: "7", refX: "10", refY: "3.5", orient: "auto", children: /* @__PURE__ */ jsx("polygon", { points: "0 0, 10 3.5, 0 7", fill: "var(--color-primary)" }) })
|
|
9555
|
+
] }),
|
|
9556
|
+
transitions.map((tr, i) => {
|
|
9557
|
+
const fromPos = positions[tr.from];
|
|
9558
|
+
const toPos = positions[tr.to];
|
|
9559
|
+
if (!fromPos || !toPos) return null;
|
|
9560
|
+
return /* @__PURE__ */ jsx(
|
|
9561
|
+
TransitionArrow,
|
|
9562
|
+
{
|
|
9563
|
+
from: fromPos,
|
|
9564
|
+
to: toPos,
|
|
9565
|
+
eventLabel: tr.event,
|
|
9566
|
+
guardHint: tr.guardHint,
|
|
9567
|
+
isActive: tr.from === currentState
|
|
9568
|
+
},
|
|
9569
|
+
`${tr.from}-${tr.event}-${tr.to}-${i}`
|
|
9570
|
+
);
|
|
9571
|
+
})
|
|
9572
|
+
] }),
|
|
9573
|
+
nodes.map((state) => {
|
|
9574
|
+
const pos = positions[state];
|
|
9575
|
+
if (!pos) return null;
|
|
9576
|
+
return /* @__PURE__ */ jsx(
|
|
9577
|
+
StateNode,
|
|
9578
|
+
{
|
|
9579
|
+
name: state,
|
|
9580
|
+
position: pos,
|
|
9581
|
+
isCurrent: state === currentState,
|
|
9582
|
+
isSelected: state === selectedState || state === addingFrom,
|
|
9583
|
+
isInitial: state === initialState,
|
|
9584
|
+
onClick: nodeClickEvent ? () => eventBus.emit(`UI:${nodeClickEvent}`, { stateId: state }) : void 0
|
|
9585
|
+
},
|
|
9586
|
+
state
|
|
9587
|
+
);
|
|
9588
|
+
})
|
|
9589
|
+
]
|
|
9590
|
+
}
|
|
9591
|
+
);
|
|
9592
|
+
}
|
|
9593
|
+
var init_StateGraph = __esm({
|
|
9594
|
+
"components/game/2d/molecules/StateGraph.tsx"() {
|
|
9595
|
+
init_atoms();
|
|
9596
|
+
init_cn();
|
|
9597
|
+
init_useEventBus();
|
|
9598
|
+
init_StateNode();
|
|
9599
|
+
init_TransitionArrow();
|
|
9600
|
+
}
|
|
9601
|
+
});
|
|
9394
9602
|
function useCamera() {
|
|
9395
9603
|
const cameraRef = useRef({ x: 0, y: 0, zoom: 1 });
|
|
9396
9604
|
const targetCameraRef = useRef(null);
|
|
@@ -10988,7 +11196,7 @@ function LinearView({
|
|
|
10988
11196
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
10989
11197
|
const isDone = i < currentIdx;
|
|
10990
11198
|
const isCurrent = i === currentIdx;
|
|
10991
|
-
return /* @__PURE__ */ jsxs(
|
|
11199
|
+
return /* @__PURE__ */ jsxs(React98__default.Fragment, { children: [
|
|
10992
11200
|
i > 0 && /* @__PURE__ */ jsx(
|
|
10993
11201
|
Typography,
|
|
10994
11202
|
{
|
|
@@ -11516,7 +11724,7 @@ function SequenceBar({
|
|
|
11516
11724
|
onSlotRemove(index);
|
|
11517
11725
|
}, [onSlotRemove, playing]);
|
|
11518
11726
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
11519
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
11727
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React98__default.Fragment, { children: [
|
|
11520
11728
|
i > 0 && /* @__PURE__ */ jsx(
|
|
11521
11729
|
Typography,
|
|
11522
11730
|
{
|
|
@@ -12257,130 +12465,6 @@ var init_EventHandlerBoard = __esm({
|
|
|
12257
12465
|
EventHandlerBoard.displayName = "EventHandlerBoard";
|
|
12258
12466
|
}
|
|
12259
12467
|
});
|
|
12260
|
-
function StateNode({
|
|
12261
|
-
name,
|
|
12262
|
-
isCurrent = false,
|
|
12263
|
-
isSelected = false,
|
|
12264
|
-
isInitial = false,
|
|
12265
|
-
position,
|
|
12266
|
-
onClick,
|
|
12267
|
-
className
|
|
12268
|
-
}) {
|
|
12269
|
-
return /* @__PURE__ */ jsx(
|
|
12270
|
-
Box,
|
|
12271
|
-
{
|
|
12272
|
-
position: "absolute",
|
|
12273
|
-
display: "flex",
|
|
12274
|
-
className: cn(
|
|
12275
|
-
"items-center justify-center rounded-pill border-3 transition-all cursor-pointer select-none",
|
|
12276
|
-
"min-w-[80px] h-[80px] px-3",
|
|
12277
|
-
isCurrent && "bg-primary/20 border-primary shadow-lg shadow-primary/30 scale-110",
|
|
12278
|
-
isSelected && !isCurrent && "bg-accent/20 border-accent ring-2 ring-accent/50",
|
|
12279
|
-
!isCurrent && !isSelected && "bg-card border-border hover:border-muted-foreground hover:scale-105",
|
|
12280
|
-
className
|
|
12281
|
-
),
|
|
12282
|
-
style: {
|
|
12283
|
-
left: position.x,
|
|
12284
|
-
top: position.y,
|
|
12285
|
-
transform: "translate(-50%, -50%)"
|
|
12286
|
-
},
|
|
12287
|
-
onClick,
|
|
12288
|
-
children: /* @__PURE__ */ jsxs(Box, { className: "text-center", children: [
|
|
12289
|
-
isInitial && /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-muted-foreground text-xs block", children: "\u25B6 start" }),
|
|
12290
|
-
/* @__PURE__ */ jsx(
|
|
12291
|
-
Typography,
|
|
12292
|
-
{
|
|
12293
|
-
variant: "body2",
|
|
12294
|
-
className: cn(
|
|
12295
|
-
"font-bold whitespace-nowrap",
|
|
12296
|
-
isCurrent ? "text-primary" : "text-foreground"
|
|
12297
|
-
),
|
|
12298
|
-
children: name
|
|
12299
|
-
}
|
|
12300
|
-
)
|
|
12301
|
-
] })
|
|
12302
|
-
}
|
|
12303
|
-
);
|
|
12304
|
-
}
|
|
12305
|
-
var init_StateNode = __esm({
|
|
12306
|
-
"components/game/2d/organisms/StateNode.tsx"() {
|
|
12307
|
-
init_atoms();
|
|
12308
|
-
init_cn();
|
|
12309
|
-
StateNode.displayName = "StateNode";
|
|
12310
|
-
}
|
|
12311
|
-
});
|
|
12312
|
-
function TransitionArrow({
|
|
12313
|
-
from,
|
|
12314
|
-
to,
|
|
12315
|
-
eventLabel,
|
|
12316
|
-
guardHint,
|
|
12317
|
-
isActive = false,
|
|
12318
|
-
onClick,
|
|
12319
|
-
className
|
|
12320
|
-
}) {
|
|
12321
|
-
const dx = to.x - from.x;
|
|
12322
|
-
const dy = to.y - from.y;
|
|
12323
|
-
const dist = Math.sqrt(dx * dx + dy * dy);
|
|
12324
|
-
if (dist === 0) return /* @__PURE__ */ jsx(Fragment, {});
|
|
12325
|
-
const nx = dx / dist;
|
|
12326
|
-
const ny = dy / dist;
|
|
12327
|
-
const startX = from.x + nx * NODE_RADIUS;
|
|
12328
|
-
const startY = from.y + ny * NODE_RADIUS;
|
|
12329
|
-
const endX = to.x - nx * NODE_RADIUS;
|
|
12330
|
-
const endY = to.y - ny * NODE_RADIUS;
|
|
12331
|
-
const midX = (startX + endX) / 2;
|
|
12332
|
-
const midY = (startY + endY) / 2;
|
|
12333
|
-
const perpX = -ny * 20;
|
|
12334
|
-
const perpY = nx * 20;
|
|
12335
|
-
const ctrlX = midX + perpX;
|
|
12336
|
-
const ctrlY = midY + perpY;
|
|
12337
|
-
const path = `M ${startX} ${startY} Q ${ctrlX} ${ctrlY} ${endX} ${endY}`;
|
|
12338
|
-
return /* @__PURE__ */ jsxs("g", { className: cn("cursor-pointer", className), onClick, children: [
|
|
12339
|
-
/* @__PURE__ */ jsx(
|
|
12340
|
-
"path",
|
|
12341
|
-
{
|
|
12342
|
-
d: path,
|
|
12343
|
-
fill: "none",
|
|
12344
|
-
stroke: isActive ? "var(--color-primary)" : "var(--color-border)",
|
|
12345
|
-
strokeWidth: isActive ? 3 : 2,
|
|
12346
|
-
markerEnd: isActive ? "url(#arrowhead-active)" : "url(#arrowhead)"
|
|
12347
|
-
}
|
|
12348
|
-
),
|
|
12349
|
-
/* @__PURE__ */ jsx(
|
|
12350
|
-
"text",
|
|
12351
|
-
{
|
|
12352
|
-
x: ctrlX,
|
|
12353
|
-
y: ctrlY - 8,
|
|
12354
|
-
textAnchor: "middle",
|
|
12355
|
-
fill: isActive ? "var(--color-primary)" : "var(--color-foreground)",
|
|
12356
|
-
fontSize: 12,
|
|
12357
|
-
fontWeight: isActive ? "bold" : "normal",
|
|
12358
|
-
className: "select-none",
|
|
12359
|
-
children: eventLabel
|
|
12360
|
-
}
|
|
12361
|
-
),
|
|
12362
|
-
guardHint && /* @__PURE__ */ jsx(
|
|
12363
|
-
"text",
|
|
12364
|
-
{
|
|
12365
|
-
x: ctrlX,
|
|
12366
|
-
y: ctrlY + 6,
|
|
12367
|
-
textAnchor: "middle",
|
|
12368
|
-
fill: "var(--color-warning)",
|
|
12369
|
-
fontSize: 10,
|
|
12370
|
-
className: "select-none",
|
|
12371
|
-
children: "\u26A0 " + guardHint
|
|
12372
|
-
}
|
|
12373
|
-
)
|
|
12374
|
-
] });
|
|
12375
|
-
}
|
|
12376
|
-
var NODE_RADIUS;
|
|
12377
|
-
var init_TransitionArrow = __esm({
|
|
12378
|
-
"components/game/2d/organisms/TransitionArrow.tsx"() {
|
|
12379
|
-
init_cn();
|
|
12380
|
-
NODE_RADIUS = 40;
|
|
12381
|
-
TransitionArrow.displayName = "TransitionArrow";
|
|
12382
|
-
}
|
|
12383
|
-
});
|
|
12384
12468
|
function VariablePanel({
|
|
12385
12469
|
entityName,
|
|
12386
12470
|
variables,
|
|
@@ -12466,7 +12550,7 @@ var init_StateJsonView = __esm({
|
|
|
12466
12550
|
StateJsonView.displayName = "StateJsonView";
|
|
12467
12551
|
}
|
|
12468
12552
|
});
|
|
12469
|
-
function
|
|
12553
|
+
function layoutStates2(states, width, height) {
|
|
12470
12554
|
const cx = width / 2;
|
|
12471
12555
|
const cy = height / 2;
|
|
12472
12556
|
const radius = Math.min(cx, cy) - 60;
|
|
@@ -12534,7 +12618,7 @@ function StateArchitectBoard({
|
|
|
12534
12618
|
}, []);
|
|
12535
12619
|
const GRAPH_W = 500;
|
|
12536
12620
|
const GRAPH_H = 400;
|
|
12537
|
-
const positions = useMemo(() =>
|
|
12621
|
+
const positions = useMemo(() => layoutStates2(entityStates, GRAPH_W, GRAPH_H), [entityStates]);
|
|
12538
12622
|
const handleStateClick = useCallback((state) => {
|
|
12539
12623
|
if (isTesting) return;
|
|
12540
12624
|
if (addingFrom) {
|
|
@@ -14516,7 +14600,7 @@ var init_ErrorBoundary = __esm({
|
|
|
14516
14600
|
}
|
|
14517
14601
|
);
|
|
14518
14602
|
};
|
|
14519
|
-
ErrorBoundary = class extends
|
|
14603
|
+
ErrorBoundary = class extends React98__default.Component {
|
|
14520
14604
|
constructor(props) {
|
|
14521
14605
|
super(props);
|
|
14522
14606
|
__publicField(this, "reset", () => {
|
|
@@ -15181,7 +15265,7 @@ var init_Container = __esm({
|
|
|
15181
15265
|
as: Component = "div"
|
|
15182
15266
|
}) => {
|
|
15183
15267
|
const resolvedSize = maxWidth ?? size ?? "lg";
|
|
15184
|
-
return
|
|
15268
|
+
return React98__default.createElement(
|
|
15185
15269
|
Component,
|
|
15186
15270
|
{
|
|
15187
15271
|
className: cn(
|
|
@@ -17849,7 +17933,7 @@ var init_CodeBlock = __esm({
|
|
|
17849
17933
|
DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
|
|
17850
17934
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
17851
17935
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
17852
|
-
CodeBlock =
|
|
17936
|
+
CodeBlock = React98__default.memo(
|
|
17853
17937
|
({
|
|
17854
17938
|
code: rawCode,
|
|
17855
17939
|
language = "text",
|
|
@@ -18436,7 +18520,7 @@ var init_MarkdownContent = __esm({
|
|
|
18436
18520
|
init_Box();
|
|
18437
18521
|
init_CodeBlock();
|
|
18438
18522
|
init_cn();
|
|
18439
|
-
MarkdownContent =
|
|
18523
|
+
MarkdownContent = React98__default.memo(
|
|
18440
18524
|
({ content, direction = "ltr", className }) => {
|
|
18441
18525
|
const { t: _t } = useTranslate();
|
|
18442
18526
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -19763,7 +19847,7 @@ var init_StateMachineView = __esm({
|
|
|
19763
19847
|
style: { top: title ? 30 : 0 },
|
|
19764
19848
|
children: [
|
|
19765
19849
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
19766
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
19850
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React98__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
19767
19851
|
StateNode2,
|
|
19768
19852
|
{
|
|
19769
19853
|
state,
|
|
@@ -25401,8 +25485,8 @@ var init_Menu = __esm({
|
|
|
25401
25485
|
"bottom-end": "bottom-start"
|
|
25402
25486
|
};
|
|
25403
25487
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
25404
|
-
const triggerChild =
|
|
25405
|
-
const triggerElement =
|
|
25488
|
+
const triggerChild = React98__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
25489
|
+
const triggerElement = React98__default.cloneElement(
|
|
25406
25490
|
triggerChild,
|
|
25407
25491
|
{
|
|
25408
25492
|
ref: triggerRef,
|
|
@@ -25497,14 +25581,14 @@ function useDataDnd(args) {
|
|
|
25497
25581
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
25498
25582
|
const enabled = isZone || Boolean(dndRoot);
|
|
25499
25583
|
const eventBus = useEventBus();
|
|
25500
|
-
const parentRoot =
|
|
25584
|
+
const parentRoot = React98__default.useContext(RootCtx);
|
|
25501
25585
|
const isRoot = enabled && parentRoot === null;
|
|
25502
|
-
const zoneId =
|
|
25586
|
+
const zoneId = React98__default.useId();
|
|
25503
25587
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
25504
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
25505
|
-
const optimisticOrdersRef =
|
|
25588
|
+
const [optimisticOrders, setOptimisticOrders] = React98__default.useState(() => /* @__PURE__ */ new Map());
|
|
25589
|
+
const optimisticOrdersRef = React98__default.useRef(optimisticOrders);
|
|
25506
25590
|
optimisticOrdersRef.current = optimisticOrders;
|
|
25507
|
-
const clearOptimisticOrder =
|
|
25591
|
+
const clearOptimisticOrder = React98__default.useCallback((group) => {
|
|
25508
25592
|
setOptimisticOrders((prev) => {
|
|
25509
25593
|
if (!prev.has(group)) return prev;
|
|
25510
25594
|
const next = new Map(prev);
|
|
@@ -25529,7 +25613,7 @@ function useDataDnd(args) {
|
|
|
25529
25613
|
const raw = it[dndItemIdField];
|
|
25530
25614
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
25531
25615
|
}).join("|");
|
|
25532
|
-
const itemIds =
|
|
25616
|
+
const itemIds = React98__default.useMemo(
|
|
25533
25617
|
() => orderedItems.map((it, idx) => {
|
|
25534
25618
|
const raw = it[dndItemIdField];
|
|
25535
25619
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
@@ -25540,7 +25624,7 @@ function useDataDnd(args) {
|
|
|
25540
25624
|
const raw = it[dndItemIdField];
|
|
25541
25625
|
return raw != null ? String(raw) : `__${idx}`;
|
|
25542
25626
|
}).join("|");
|
|
25543
|
-
|
|
25627
|
+
React98__default.useEffect(() => {
|
|
25544
25628
|
const root = isRoot ? null : parentRoot;
|
|
25545
25629
|
if (root) {
|
|
25546
25630
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -25548,20 +25632,20 @@ function useDataDnd(args) {
|
|
|
25548
25632
|
clearOptimisticOrder(ownGroup);
|
|
25549
25633
|
}
|
|
25550
25634
|
}, [itemsContentSig, ownGroup]);
|
|
25551
|
-
const zonesRef =
|
|
25552
|
-
const registerZone =
|
|
25635
|
+
const zonesRef = React98__default.useRef(/* @__PURE__ */ new Map());
|
|
25636
|
+
const registerZone = React98__default.useCallback((zoneId2, meta2) => {
|
|
25553
25637
|
zonesRef.current.set(zoneId2, meta2);
|
|
25554
25638
|
}, []);
|
|
25555
|
-
const unregisterZone =
|
|
25639
|
+
const unregisterZone = React98__default.useCallback((zoneId2) => {
|
|
25556
25640
|
zonesRef.current.delete(zoneId2);
|
|
25557
25641
|
}, []);
|
|
25558
|
-
const [activeDrag, setActiveDrag] =
|
|
25559
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
25560
|
-
const meta =
|
|
25642
|
+
const [activeDrag, setActiveDrag] = React98__default.useState(null);
|
|
25643
|
+
const [overZoneGroup, setOverZoneGroup] = React98__default.useState(null);
|
|
25644
|
+
const meta = React98__default.useMemo(
|
|
25561
25645
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
25562
25646
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
25563
25647
|
);
|
|
25564
|
-
|
|
25648
|
+
React98__default.useEffect(() => {
|
|
25565
25649
|
const target = isRoot ? null : parentRoot;
|
|
25566
25650
|
if (!target) {
|
|
25567
25651
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -25580,7 +25664,7 @@ function useDataDnd(args) {
|
|
|
25580
25664
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
25581
25665
|
const sensors = useAlmadarDndSensors(true);
|
|
25582
25666
|
const collisionDetection = almadarDndCollisionDetection;
|
|
25583
|
-
const findZoneByItem =
|
|
25667
|
+
const findZoneByItem = React98__default.useCallback(
|
|
25584
25668
|
(id) => {
|
|
25585
25669
|
for (const z of zonesRef.current.values()) {
|
|
25586
25670
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -25589,7 +25673,7 @@ function useDataDnd(args) {
|
|
|
25589
25673
|
},
|
|
25590
25674
|
[]
|
|
25591
25675
|
);
|
|
25592
|
-
|
|
25676
|
+
React98__default.useCallback(
|
|
25593
25677
|
(group) => {
|
|
25594
25678
|
for (const z of zonesRef.current.values()) {
|
|
25595
25679
|
if (z.group === group) return z;
|
|
@@ -25598,7 +25682,7 @@ function useDataDnd(args) {
|
|
|
25598
25682
|
},
|
|
25599
25683
|
[]
|
|
25600
25684
|
);
|
|
25601
|
-
const handleDragEnd =
|
|
25685
|
+
const handleDragEnd = React98__default.useCallback(
|
|
25602
25686
|
(event) => {
|
|
25603
25687
|
const { active, over } = event;
|
|
25604
25688
|
const activeIdStr = String(active.id);
|
|
@@ -25689,8 +25773,8 @@ function useDataDnd(args) {
|
|
|
25689
25773
|
},
|
|
25690
25774
|
[eventBus]
|
|
25691
25775
|
);
|
|
25692
|
-
const sortableData =
|
|
25693
|
-
const SortableItem =
|
|
25776
|
+
const sortableData = React98__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
25777
|
+
const SortableItem = React98__default.useCallback(
|
|
25694
25778
|
({ id, children }) => {
|
|
25695
25779
|
const {
|
|
25696
25780
|
attributes,
|
|
@@ -25730,7 +25814,7 @@ function useDataDnd(args) {
|
|
|
25730
25814
|
id: droppableId,
|
|
25731
25815
|
data: sortableData
|
|
25732
25816
|
});
|
|
25733
|
-
const ctx =
|
|
25817
|
+
const ctx = React98__default.useContext(RootCtx);
|
|
25734
25818
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
25735
25819
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
25736
25820
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -25745,7 +25829,7 @@ function useDataDnd(args) {
|
|
|
25745
25829
|
showForeignPlaceholder,
|
|
25746
25830
|
ctxAvailable: ctx != null
|
|
25747
25831
|
});
|
|
25748
|
-
|
|
25832
|
+
React98__default.useEffect(() => {
|
|
25749
25833
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
25750
25834
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
25751
25835
|
return /* @__PURE__ */ jsx(
|
|
@@ -25759,11 +25843,11 @@ function useDataDnd(args) {
|
|
|
25759
25843
|
}
|
|
25760
25844
|
);
|
|
25761
25845
|
};
|
|
25762
|
-
const rootContextValue =
|
|
25846
|
+
const rootContextValue = React98__default.useMemo(
|
|
25763
25847
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
25764
25848
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
25765
25849
|
);
|
|
25766
|
-
const handleDragStart =
|
|
25850
|
+
const handleDragStart = React98__default.useCallback((event) => {
|
|
25767
25851
|
const sourceZone = findZoneByItem(event.active.id);
|
|
25768
25852
|
const rect = event.active.rect.current.initial;
|
|
25769
25853
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -25782,7 +25866,7 @@ function useDataDnd(args) {
|
|
|
25782
25866
|
isRoot
|
|
25783
25867
|
});
|
|
25784
25868
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
25785
|
-
const handleDragOver =
|
|
25869
|
+
const handleDragOver = React98__default.useCallback((event) => {
|
|
25786
25870
|
const { active, over } = event;
|
|
25787
25871
|
const overData = over?.data?.current;
|
|
25788
25872
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -25852,7 +25936,7 @@ function useDataDnd(args) {
|
|
|
25852
25936
|
return next;
|
|
25853
25937
|
});
|
|
25854
25938
|
}, []);
|
|
25855
|
-
const handleDragCancel =
|
|
25939
|
+
const handleDragCancel = React98__default.useCallback((event) => {
|
|
25856
25940
|
setActiveDrag(null);
|
|
25857
25941
|
setOverZoneGroup(null);
|
|
25858
25942
|
dndLog.warn("dragCancel", {
|
|
@@ -25860,12 +25944,12 @@ function useDataDnd(args) {
|
|
|
25860
25944
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
25861
25945
|
});
|
|
25862
25946
|
}, []);
|
|
25863
|
-
const handleDragEndWithCleanup =
|
|
25947
|
+
const handleDragEndWithCleanup = React98__default.useCallback((event) => {
|
|
25864
25948
|
handleDragEnd(event);
|
|
25865
25949
|
setActiveDrag(null);
|
|
25866
25950
|
setOverZoneGroup(null);
|
|
25867
25951
|
}, [handleDragEnd]);
|
|
25868
|
-
const wrapContainer =
|
|
25952
|
+
const wrapContainer = React98__default.useCallback(
|
|
25869
25953
|
(children) => {
|
|
25870
25954
|
if (!enabled) return children;
|
|
25871
25955
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -25919,7 +26003,7 @@ var init_useDataDnd = __esm({
|
|
|
25919
26003
|
init_useAlmadarDndCollision();
|
|
25920
26004
|
init_Box();
|
|
25921
26005
|
dndLog = createLogger("almadar:ui:dnd");
|
|
25922
|
-
RootCtx =
|
|
26006
|
+
RootCtx = React98__default.createContext(null);
|
|
25923
26007
|
}
|
|
25924
26008
|
});
|
|
25925
26009
|
function renderIconInput(icon, props) {
|
|
@@ -26445,7 +26529,7 @@ function DataList({
|
|
|
26445
26529
|
}) {
|
|
26446
26530
|
const eventBus = useEventBus();
|
|
26447
26531
|
const { t } = useTranslate();
|
|
26448
|
-
const [visibleCount, setVisibleCount] =
|
|
26532
|
+
const [visibleCount, setVisibleCount] = React98__default.useState(pageSize || Infinity);
|
|
26449
26533
|
const fieldDefs = fields ?? columns ?? [];
|
|
26450
26534
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
26451
26535
|
const dnd = useDataDnd({
|
|
@@ -26464,7 +26548,7 @@ function DataList({
|
|
|
26464
26548
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
26465
26549
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
26466
26550
|
const hasRenderProp = typeof children === "function";
|
|
26467
|
-
|
|
26551
|
+
React98__default.useEffect(() => {
|
|
26468
26552
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
26469
26553
|
const childrenTypeOf = typeof children;
|
|
26470
26554
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -26568,7 +26652,7 @@ function DataList({
|
|
|
26568
26652
|
const items2 = [...data];
|
|
26569
26653
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
26570
26654
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
26571
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
26655
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React98__default.Fragment, { children: [
|
|
26572
26656
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
26573
26657
|
group.items.map((itemData, index) => {
|
|
26574
26658
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -26709,7 +26793,7 @@ function DataList({
|
|
|
26709
26793
|
className
|
|
26710
26794
|
),
|
|
26711
26795
|
children: [
|
|
26712
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
26796
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React98__default.Fragment, { children: [
|
|
26713
26797
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
26714
26798
|
group.items.map(
|
|
26715
26799
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -26794,7 +26878,7 @@ var init_FormSection = __esm({
|
|
|
26794
26878
|
columns = 1,
|
|
26795
26879
|
className
|
|
26796
26880
|
}) => {
|
|
26797
|
-
const [collapsed, setCollapsed] =
|
|
26881
|
+
const [collapsed, setCollapsed] = React98__default.useState(defaultCollapsed);
|
|
26798
26882
|
const { t } = useTranslate();
|
|
26799
26883
|
const eventBus = useEventBus();
|
|
26800
26884
|
const gridClass = {
|
|
@@ -26802,7 +26886,7 @@ var init_FormSection = __esm({
|
|
|
26802
26886
|
2: "grid-cols-1 md:grid-cols-2",
|
|
26803
26887
|
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
26804
26888
|
}[columns];
|
|
26805
|
-
|
|
26889
|
+
React98__default.useCallback(() => {
|
|
26806
26890
|
if (collapsible) {
|
|
26807
26891
|
setCollapsed((prev) => !prev);
|
|
26808
26892
|
eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
|
|
@@ -27752,7 +27836,7 @@ var init_Flex = __esm({
|
|
|
27752
27836
|
flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
|
|
27753
27837
|
}
|
|
27754
27838
|
}
|
|
27755
|
-
return
|
|
27839
|
+
return React98__default.createElement(Component, {
|
|
27756
27840
|
className: cn(
|
|
27757
27841
|
inline ? "inline-flex" : "flex",
|
|
27758
27842
|
directionStyles[direction],
|
|
@@ -27871,7 +27955,7 @@ var init_Grid = __esm({
|
|
|
27871
27955
|
as: Component = "div"
|
|
27872
27956
|
}) => {
|
|
27873
27957
|
const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
|
|
27874
|
-
return
|
|
27958
|
+
return React98__default.createElement(
|
|
27875
27959
|
Component,
|
|
27876
27960
|
{
|
|
27877
27961
|
className: cn(
|
|
@@ -28067,9 +28151,9 @@ var init_Popover = __esm({
|
|
|
28067
28151
|
onMouseLeave: handleClose,
|
|
28068
28152
|
onPointerDown: tapTriggerProps.onPointerDown
|
|
28069
28153
|
};
|
|
28070
|
-
const childElement =
|
|
28154
|
+
const childElement = React98__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
28071
28155
|
const childPointerDown = childElement.props.onPointerDown;
|
|
28072
|
-
const triggerElement =
|
|
28156
|
+
const triggerElement = React98__default.cloneElement(
|
|
28073
28157
|
childElement,
|
|
28074
28158
|
{
|
|
28075
28159
|
ref: triggerRef,
|
|
@@ -28671,9 +28755,9 @@ var init_Tooltip = __esm({
|
|
|
28671
28755
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
28672
28756
|
};
|
|
28673
28757
|
}, []);
|
|
28674
|
-
const triggerElement =
|
|
28758
|
+
const triggerElement = React98__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
28675
28759
|
const childPointerDown = triggerElement.props.onPointerDown;
|
|
28676
|
-
const trigger =
|
|
28760
|
+
const trigger = React98__default.cloneElement(triggerElement, {
|
|
28677
28761
|
ref: triggerRef,
|
|
28678
28762
|
onMouseEnter: handleMouseEnter,
|
|
28679
28763
|
onMouseLeave: handleMouseLeave,
|
|
@@ -28763,7 +28847,7 @@ var init_WizardProgress = __esm({
|
|
|
28763
28847
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
28764
28848
|
const isActive = index === currentStep;
|
|
28765
28849
|
const isCompleted = index < currentStep;
|
|
28766
|
-
return /* @__PURE__ */ jsxs(
|
|
28850
|
+
return /* @__PURE__ */ jsxs(React98__default.Fragment, { children: [
|
|
28767
28851
|
/* @__PURE__ */ jsx(
|
|
28768
28852
|
"button",
|
|
28769
28853
|
{
|
|
@@ -30323,7 +30407,7 @@ var init_MapView = __esm({
|
|
|
30323
30407
|
shadowSize: [41, 41]
|
|
30324
30408
|
});
|
|
30325
30409
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
30326
|
-
const { useEffect: useEffect68, useRef: useRef65, useCallback: useCallback104, useState: useState98 } =
|
|
30410
|
+
const { useEffect: useEffect68, useRef: useRef65, useCallback: useCallback104, useState: useState98 } = React98__default;
|
|
30327
30411
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
30328
30412
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
30329
30413
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
@@ -31238,8 +31322,8 @@ function TableView({
|
|
|
31238
31322
|
}) {
|
|
31239
31323
|
const eventBus = useEventBus();
|
|
31240
31324
|
const { t } = useTranslate();
|
|
31241
|
-
const [visibleCount, setVisibleCount] =
|
|
31242
|
-
const [localSelected, setLocalSelected] =
|
|
31325
|
+
const [visibleCount, setVisibleCount] = React98__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
31326
|
+
const [localSelected, setLocalSelected] = React98__default.useState(/* @__PURE__ */ new Set());
|
|
31243
31327
|
const colDefs = columns ?? fields ?? [];
|
|
31244
31328
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
31245
31329
|
const dnd = useDataDnd({
|
|
@@ -31434,12 +31518,12 @@ function TableView({
|
|
|
31434
31518
|
]
|
|
31435
31519
|
}
|
|
31436
31520
|
);
|
|
31437
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
31521
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React98__default.Fragment, { children: rowInner }, id);
|
|
31438
31522
|
};
|
|
31439
31523
|
const items = Array.from(data);
|
|
31440
31524
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
31441
31525
|
let runningIndex = 0;
|
|
31442
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
31526
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React98__default.Fragment, { children: [
|
|
31443
31527
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
31444
31528
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
31445
31529
|
] }, gi)) });
|
|
@@ -32796,7 +32880,7 @@ var init_StepFlow = __esm({
|
|
|
32796
32880
|
className
|
|
32797
32881
|
}) => {
|
|
32798
32882
|
if (orientation === "vertical") {
|
|
32799
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
32883
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React98__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
32800
32884
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
32801
32885
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
32802
32886
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -32807,7 +32891,7 @@ var init_StepFlow = __esm({
|
|
|
32807
32891
|
] })
|
|
32808
32892
|
] }) }, index)) });
|
|
32809
32893
|
}
|
|
32810
|
-
return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(
|
|
32894
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(React98__default.Fragment, { children: [
|
|
32811
32895
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
32812
32896
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
32813
32897
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -33792,7 +33876,7 @@ var init_LikertScale = __esm({
|
|
|
33792
33876
|
md: "text-base",
|
|
33793
33877
|
lg: "text-lg"
|
|
33794
33878
|
};
|
|
33795
|
-
LikertScale =
|
|
33879
|
+
LikertScale = React98__default.forwardRef(
|
|
33796
33880
|
({
|
|
33797
33881
|
question,
|
|
33798
33882
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -33804,7 +33888,7 @@ var init_LikertScale = __esm({
|
|
|
33804
33888
|
variant = "radios",
|
|
33805
33889
|
className
|
|
33806
33890
|
}, ref) => {
|
|
33807
|
-
const groupId =
|
|
33891
|
+
const groupId = React98__default.useId();
|
|
33808
33892
|
const eventBus = useEventBus();
|
|
33809
33893
|
const handleSelect = useCallback(
|
|
33810
33894
|
(next) => {
|
|
@@ -36086,7 +36170,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
36086
36170
|
"aria-label": t("aria.breadcrumb"),
|
|
36087
36171
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
36088
36172
|
const isLast = idx === items.length - 1;
|
|
36089
|
-
return /* @__PURE__ */ jsxs(
|
|
36173
|
+
return /* @__PURE__ */ jsxs(React98__default.Fragment, { children: [
|
|
36090
36174
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
36091
36175
|
Icon,
|
|
36092
36176
|
{
|
|
@@ -36955,7 +37039,7 @@ var init_MiniStateMachine = __esm({
|
|
|
36955
37039
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
36956
37040
|
const tc = transitionCounts[s.name] ?? 0;
|
|
36957
37041
|
const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
36958
|
-
return /* @__PURE__ */ jsxs(
|
|
37042
|
+
return /* @__PURE__ */ jsxs(React98__default.Fragment, { children: [
|
|
36959
37043
|
/* @__PURE__ */ jsx(
|
|
36960
37044
|
AvlState,
|
|
36961
37045
|
{
|
|
@@ -37159,7 +37243,7 @@ var init_PageHeader = __esm({
|
|
|
37159
37243
|
info: "bg-info/10 text-info"
|
|
37160
37244
|
};
|
|
37161
37245
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
37162
|
-
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(
|
|
37246
|
+
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(React98__default.Fragment, { children: [
|
|
37163
37247
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
37164
37248
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
37165
37249
|
"a",
|
|
@@ -37517,7 +37601,7 @@ var init_Section = __esm({
|
|
|
37517
37601
|
as: Component = "section"
|
|
37518
37602
|
}) => {
|
|
37519
37603
|
const hasHeader = title || description || action;
|
|
37520
|
-
return
|
|
37604
|
+
return React98__default.createElement(
|
|
37521
37605
|
Component,
|
|
37522
37606
|
{
|
|
37523
37607
|
className: cn(
|
|
@@ -37891,7 +37975,7 @@ var init_WizardContainer = __esm({
|
|
|
37891
37975
|
const isCompleted = index < currentStep;
|
|
37892
37976
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
37893
37977
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
37894
|
-
return /* @__PURE__ */ jsxs(
|
|
37978
|
+
return /* @__PURE__ */ jsxs(React98__default.Fragment, { children: [
|
|
37895
37979
|
/* @__PURE__ */ jsx(
|
|
37896
37980
|
Button,
|
|
37897
37981
|
{
|
|
@@ -40324,7 +40408,7 @@ var init_DetailPanel = __esm({
|
|
|
40324
40408
|
}
|
|
40325
40409
|
});
|
|
40326
40410
|
function extractTitle(children) {
|
|
40327
|
-
if (!
|
|
40411
|
+
if (!React98__default.isValidElement(children)) return void 0;
|
|
40328
40412
|
const props = children.props;
|
|
40329
40413
|
if (typeof props.title === "string") {
|
|
40330
40414
|
return props.title;
|
|
@@ -40674,12 +40758,12 @@ var init_Form = __esm({
|
|
|
40674
40758
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
40675
40759
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
40676
40760
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
40677
|
-
const normalizedInitialData =
|
|
40761
|
+
const normalizedInitialData = React98__default.useMemo(() => {
|
|
40678
40762
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
40679
40763
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
40680
40764
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
40681
40765
|
}, [entity, initialData]);
|
|
40682
|
-
const entityDerivedFields =
|
|
40766
|
+
const entityDerivedFields = React98__default.useMemo(() => {
|
|
40683
40767
|
if (fields && fields.length > 0) return void 0;
|
|
40684
40768
|
if (!resolvedEntity) return void 0;
|
|
40685
40769
|
return resolvedEntity.fields.map(
|
|
@@ -40700,16 +40784,16 @@ var init_Form = __esm({
|
|
|
40700
40784
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
40701
40785
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
40702
40786
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
40703
|
-
const [formData, setFormData] =
|
|
40787
|
+
const [formData, setFormData] = React98__default.useState(
|
|
40704
40788
|
normalizedInitialData
|
|
40705
40789
|
);
|
|
40706
|
-
const [collapsedSections, setCollapsedSections] =
|
|
40790
|
+
const [collapsedSections, setCollapsedSections] = React98__default.useState(
|
|
40707
40791
|
/* @__PURE__ */ new Set()
|
|
40708
40792
|
);
|
|
40709
|
-
const [submitError, setSubmitError] =
|
|
40710
|
-
const formRef =
|
|
40793
|
+
const [submitError, setSubmitError] = React98__default.useState(null);
|
|
40794
|
+
const formRef = React98__default.useRef(null);
|
|
40711
40795
|
const formMode = props.mode;
|
|
40712
|
-
const mountedRef =
|
|
40796
|
+
const mountedRef = React98__default.useRef(false);
|
|
40713
40797
|
if (!mountedRef.current) {
|
|
40714
40798
|
mountedRef.current = true;
|
|
40715
40799
|
debug("forms", "mount", {
|
|
@@ -40722,7 +40806,7 @@ var init_Form = __esm({
|
|
|
40722
40806
|
});
|
|
40723
40807
|
}
|
|
40724
40808
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
40725
|
-
const evalContext =
|
|
40809
|
+
const evalContext = React98__default.useMemo(
|
|
40726
40810
|
() => ({
|
|
40727
40811
|
formValues: formData,
|
|
40728
40812
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -40731,7 +40815,7 @@ var init_Form = __esm({
|
|
|
40731
40815
|
}),
|
|
40732
40816
|
[formData, externalContext]
|
|
40733
40817
|
);
|
|
40734
|
-
|
|
40818
|
+
React98__default.useEffect(() => {
|
|
40735
40819
|
debug("forms", "initialData-sync", {
|
|
40736
40820
|
mode: formMode,
|
|
40737
40821
|
normalizedInitialData,
|
|
@@ -40742,7 +40826,7 @@ var init_Form = __esm({
|
|
|
40742
40826
|
setFormData(normalizedInitialData);
|
|
40743
40827
|
}
|
|
40744
40828
|
}, [normalizedInitialData]);
|
|
40745
|
-
const processCalculations =
|
|
40829
|
+
const processCalculations = React98__default.useCallback(
|
|
40746
40830
|
(changedFieldId, newFormData) => {
|
|
40747
40831
|
if (!hiddenCalculations.length) return;
|
|
40748
40832
|
const context = {
|
|
@@ -40767,7 +40851,7 @@ var init_Form = __esm({
|
|
|
40767
40851
|
},
|
|
40768
40852
|
[hiddenCalculations, externalContext, eventBus]
|
|
40769
40853
|
);
|
|
40770
|
-
const checkViolations =
|
|
40854
|
+
const checkViolations = React98__default.useCallback(
|
|
40771
40855
|
(changedFieldId, newFormData) => {
|
|
40772
40856
|
if (!violationTriggers.length) return;
|
|
40773
40857
|
const context = {
|
|
@@ -40805,7 +40889,7 @@ var init_Form = __esm({
|
|
|
40805
40889
|
processCalculations(name, newFormData);
|
|
40806
40890
|
checkViolations(name, newFormData);
|
|
40807
40891
|
};
|
|
40808
|
-
const isFieldVisible =
|
|
40892
|
+
const isFieldVisible = React98__default.useCallback(
|
|
40809
40893
|
(fieldName) => {
|
|
40810
40894
|
const condition = conditionalFields[fieldName];
|
|
40811
40895
|
if (!condition) return true;
|
|
@@ -40813,7 +40897,7 @@ var init_Form = __esm({
|
|
|
40813
40897
|
},
|
|
40814
40898
|
[conditionalFields, evalContext]
|
|
40815
40899
|
);
|
|
40816
|
-
const isSectionVisible =
|
|
40900
|
+
const isSectionVisible = React98__default.useCallback(
|
|
40817
40901
|
(section) => {
|
|
40818
40902
|
if (!section.condition) return true;
|
|
40819
40903
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -40889,7 +40973,7 @@ var init_Form = __esm({
|
|
|
40889
40973
|
eventBus.emit(`UI:${onCancel}`);
|
|
40890
40974
|
}
|
|
40891
40975
|
};
|
|
40892
|
-
const renderField =
|
|
40976
|
+
const renderField = React98__default.useCallback(
|
|
40893
40977
|
(field) => {
|
|
40894
40978
|
const fieldName = field.name || field.field;
|
|
40895
40979
|
if (!fieldName) return null;
|
|
@@ -40910,7 +40994,7 @@ var init_Form = __esm({
|
|
|
40910
40994
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
40911
40995
|
);
|
|
40912
40996
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
40913
|
-
const normalizedFields =
|
|
40997
|
+
const normalizedFields = React98__default.useMemo(() => {
|
|
40914
40998
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
40915
40999
|
return effectiveFields.map((field) => {
|
|
40916
41000
|
if (typeof field === "string") {
|
|
@@ -40934,7 +41018,7 @@ var init_Form = __esm({
|
|
|
40934
41018
|
return field;
|
|
40935
41019
|
});
|
|
40936
41020
|
}, [effectiveFields, resolvedEntity]);
|
|
40937
|
-
const schemaFields =
|
|
41021
|
+
const schemaFields = React98__default.useMemo(() => {
|
|
40938
41022
|
if (normalizedFields.length === 0) return null;
|
|
40939
41023
|
if (isDebugEnabled()) {
|
|
40940
41024
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -40944,7 +41028,7 @@ var init_Form = __esm({
|
|
|
40944
41028
|
}
|
|
40945
41029
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
40946
41030
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
40947
|
-
const sectionElements =
|
|
41031
|
+
const sectionElements = React98__default.useMemo(() => {
|
|
40948
41032
|
if (!sections || sections.length === 0) return null;
|
|
40949
41033
|
return sections.map((section) => {
|
|
40950
41034
|
if (!isSectionVisible(section)) {
|
|
@@ -41669,7 +41753,7 @@ var init_List = __esm({
|
|
|
41669
41753
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
41670
41754
|
return [];
|
|
41671
41755
|
}, [entity]);
|
|
41672
|
-
const getItemActions =
|
|
41756
|
+
const getItemActions = React98__default.useCallback(
|
|
41673
41757
|
(item) => {
|
|
41674
41758
|
if (!itemActions) return [];
|
|
41675
41759
|
if (typeof itemActions === "function") {
|
|
@@ -42144,7 +42228,7 @@ var init_MediaGallery = __esm({
|
|
|
42144
42228
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
42145
42229
|
);
|
|
42146
42230
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
42147
|
-
const items =
|
|
42231
|
+
const items = React98__default.useMemo(() => {
|
|
42148
42232
|
if (propItems) return propItems;
|
|
42149
42233
|
if (entityData.length === 0) return [];
|
|
42150
42234
|
return entityData.map((record, idx) => {
|
|
@@ -42307,7 +42391,7 @@ var init_MediaGallery = __esm({
|
|
|
42307
42391
|
}
|
|
42308
42392
|
});
|
|
42309
42393
|
function extractTitle2(children) {
|
|
42310
|
-
if (!
|
|
42394
|
+
if (!React98__default.isValidElement(children)) return void 0;
|
|
42311
42395
|
const props = children.props;
|
|
42312
42396
|
if (typeof props.title === "string") {
|
|
42313
42397
|
return props.title;
|
|
@@ -42562,7 +42646,7 @@ var init_debugRegistry = __esm({
|
|
|
42562
42646
|
}
|
|
42563
42647
|
});
|
|
42564
42648
|
function useDebugData() {
|
|
42565
|
-
const [data, setData] =
|
|
42649
|
+
const [data, setData] = React98.useState(() => ({
|
|
42566
42650
|
traits: [],
|
|
42567
42651
|
ticks: [],
|
|
42568
42652
|
guards: [],
|
|
@@ -42576,7 +42660,7 @@ function useDebugData() {
|
|
|
42576
42660
|
},
|
|
42577
42661
|
lastUpdate: Date.now()
|
|
42578
42662
|
}));
|
|
42579
|
-
|
|
42663
|
+
React98.useEffect(() => {
|
|
42580
42664
|
const updateData = () => {
|
|
42581
42665
|
setData({
|
|
42582
42666
|
traits: getAllTraits(),
|
|
@@ -42685,12 +42769,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
42685
42769
|
return positions;
|
|
42686
42770
|
}
|
|
42687
42771
|
function WalkMinimap() {
|
|
42688
|
-
const [walkStep, setWalkStep] =
|
|
42689
|
-
const [traits2, setTraits] =
|
|
42690
|
-
const [coveredEdges, setCoveredEdges] =
|
|
42691
|
-
const [completedTraits, setCompletedTraits] =
|
|
42692
|
-
const prevTraitRef =
|
|
42693
|
-
|
|
42772
|
+
const [walkStep, setWalkStep] = React98.useState(null);
|
|
42773
|
+
const [traits2, setTraits] = React98.useState([]);
|
|
42774
|
+
const [coveredEdges, setCoveredEdges] = React98.useState([]);
|
|
42775
|
+
const [completedTraits, setCompletedTraits] = React98.useState(/* @__PURE__ */ new Set());
|
|
42776
|
+
const prevTraitRef = React98.useRef(null);
|
|
42777
|
+
React98.useEffect(() => {
|
|
42694
42778
|
const interval = setInterval(() => {
|
|
42695
42779
|
const w = window;
|
|
42696
42780
|
const step = w.__orbitalWalkStep;
|
|
@@ -43126,15 +43210,15 @@ var init_EntitiesTab = __esm({
|
|
|
43126
43210
|
});
|
|
43127
43211
|
function EventFlowTab({ events: events2 }) {
|
|
43128
43212
|
const { t } = useTranslate();
|
|
43129
|
-
const [filter, setFilter] =
|
|
43130
|
-
const containerRef =
|
|
43131
|
-
const [autoScroll, setAutoScroll] =
|
|
43132
|
-
|
|
43213
|
+
const [filter, setFilter] = React98.useState("all");
|
|
43214
|
+
const containerRef = React98.useRef(null);
|
|
43215
|
+
const [autoScroll, setAutoScroll] = React98.useState(true);
|
|
43216
|
+
React98.useEffect(() => {
|
|
43133
43217
|
if (autoScroll && containerRef.current) {
|
|
43134
43218
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
43135
43219
|
}
|
|
43136
43220
|
}, [events2.length, autoScroll]);
|
|
43137
|
-
const filteredEvents =
|
|
43221
|
+
const filteredEvents = React98.useMemo(() => {
|
|
43138
43222
|
if (filter === "all") return events2;
|
|
43139
43223
|
return events2.filter((e) => e.type === filter);
|
|
43140
43224
|
}, [events2, filter]);
|
|
@@ -43250,7 +43334,7 @@ var init_EventFlowTab = __esm({
|
|
|
43250
43334
|
});
|
|
43251
43335
|
function GuardsPanel({ guards }) {
|
|
43252
43336
|
const { t } = useTranslate();
|
|
43253
|
-
const [filter, setFilter] =
|
|
43337
|
+
const [filter, setFilter] = React98.useState("all");
|
|
43254
43338
|
if (guards.length === 0) {
|
|
43255
43339
|
return /* @__PURE__ */ jsx(
|
|
43256
43340
|
EmptyState,
|
|
@@ -43263,7 +43347,7 @@ function GuardsPanel({ guards }) {
|
|
|
43263
43347
|
}
|
|
43264
43348
|
const passedCount = guards.filter((g) => g.result).length;
|
|
43265
43349
|
const failedCount = guards.length - passedCount;
|
|
43266
|
-
const filteredGuards =
|
|
43350
|
+
const filteredGuards = React98.useMemo(() => {
|
|
43267
43351
|
if (filter === "all") return guards;
|
|
43268
43352
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
43269
43353
|
return guards.filter((g) => !g.result);
|
|
@@ -43426,10 +43510,10 @@ function EffectBadge({ effect }) {
|
|
|
43426
43510
|
}
|
|
43427
43511
|
function TransitionTimeline({ transitions }) {
|
|
43428
43512
|
const { t } = useTranslate();
|
|
43429
|
-
const containerRef =
|
|
43430
|
-
const [autoScroll, setAutoScroll] =
|
|
43431
|
-
const [expandedId, setExpandedId] =
|
|
43432
|
-
|
|
43513
|
+
const containerRef = React98.useRef(null);
|
|
43514
|
+
const [autoScroll, setAutoScroll] = React98.useState(true);
|
|
43515
|
+
const [expandedId, setExpandedId] = React98.useState(null);
|
|
43516
|
+
React98.useEffect(() => {
|
|
43433
43517
|
if (autoScroll && containerRef.current) {
|
|
43434
43518
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
43435
43519
|
}
|
|
@@ -43709,9 +43793,9 @@ function getAllEvents(traits2) {
|
|
|
43709
43793
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
43710
43794
|
const eventBus = useEventBus();
|
|
43711
43795
|
const { t } = useTranslate();
|
|
43712
|
-
const [log13, setLog] =
|
|
43713
|
-
const prevStatesRef =
|
|
43714
|
-
|
|
43796
|
+
const [log13, setLog] = React98.useState([]);
|
|
43797
|
+
const prevStatesRef = React98.useRef(/* @__PURE__ */ new Map());
|
|
43798
|
+
React98.useEffect(() => {
|
|
43715
43799
|
for (const trait of traits2) {
|
|
43716
43800
|
const prev = prevStatesRef.current.get(trait.id);
|
|
43717
43801
|
if (prev && prev !== trait.currentState) {
|
|
@@ -43880,10 +43964,10 @@ function VerifyModePanel({
|
|
|
43880
43964
|
localCount
|
|
43881
43965
|
}) {
|
|
43882
43966
|
const { t } = useTranslate();
|
|
43883
|
-
const [expanded, setExpanded] =
|
|
43884
|
-
const scrollRef =
|
|
43885
|
-
const prevCountRef =
|
|
43886
|
-
|
|
43967
|
+
const [expanded, setExpanded] = React98.useState(true);
|
|
43968
|
+
const scrollRef = React98.useRef(null);
|
|
43969
|
+
const prevCountRef = React98.useRef(0);
|
|
43970
|
+
React98.useEffect(() => {
|
|
43887
43971
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
43888
43972
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
43889
43973
|
}
|
|
@@ -43940,10 +44024,10 @@ function RuntimeDebugger({
|
|
|
43940
44024
|
schema
|
|
43941
44025
|
}) {
|
|
43942
44026
|
const { t } = useTranslate();
|
|
43943
|
-
const [isCollapsed, setIsCollapsed] =
|
|
43944
|
-
const [isVisible, setIsVisible] =
|
|
44027
|
+
const [isCollapsed, setIsCollapsed] = React98.useState(mode === "verify" ? true : defaultCollapsed);
|
|
44028
|
+
const [isVisible, setIsVisible] = React98.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
43945
44029
|
const debugData = useDebugData();
|
|
43946
|
-
|
|
44030
|
+
React98.useEffect(() => {
|
|
43947
44031
|
if (mode === "inline") return;
|
|
43948
44032
|
return onDebugToggle((enabled) => {
|
|
43949
44033
|
setIsVisible(enabled);
|
|
@@ -43952,7 +44036,7 @@ function RuntimeDebugger({
|
|
|
43952
44036
|
}
|
|
43953
44037
|
});
|
|
43954
44038
|
}, [mode]);
|
|
43955
|
-
|
|
44039
|
+
React98.useEffect(() => {
|
|
43956
44040
|
if (mode === "inline") return;
|
|
43957
44041
|
const handleKeyDown = (e) => {
|
|
43958
44042
|
if (e.key === "`" && isVisible) {
|
|
@@ -44472,7 +44556,7 @@ var init_StatCard = __esm({
|
|
|
44472
44556
|
const labelToUse = propLabel ?? propTitle;
|
|
44473
44557
|
const eventBus = useEventBus();
|
|
44474
44558
|
const { t } = useTranslate();
|
|
44475
|
-
const handleActionClick =
|
|
44559
|
+
const handleActionClick = React98__default.useCallback(() => {
|
|
44476
44560
|
if (action?.event) {
|
|
44477
44561
|
eventBus.emit(`UI:${action.event}`, {});
|
|
44478
44562
|
}
|
|
@@ -44483,7 +44567,7 @@ var init_StatCard = __esm({
|
|
|
44483
44567
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
44484
44568
|
const isLoading = externalLoading ?? false;
|
|
44485
44569
|
const error = externalError;
|
|
44486
|
-
const computeMetricValue =
|
|
44570
|
+
const computeMetricValue = React98__default.useCallback(
|
|
44487
44571
|
(metric, items) => {
|
|
44488
44572
|
if (metric.value !== void 0) {
|
|
44489
44573
|
return metric.value;
|
|
@@ -44522,7 +44606,7 @@ var init_StatCard = __esm({
|
|
|
44522
44606
|
},
|
|
44523
44607
|
[]
|
|
44524
44608
|
);
|
|
44525
|
-
const schemaStats =
|
|
44609
|
+
const schemaStats = React98__default.useMemo(() => {
|
|
44526
44610
|
if (!metrics || metrics.length === 0) return null;
|
|
44527
44611
|
return metrics.map((metric) => ({
|
|
44528
44612
|
label: metric.label,
|
|
@@ -44530,7 +44614,7 @@ var init_StatCard = __esm({
|
|
|
44530
44614
|
format: metric.format
|
|
44531
44615
|
}));
|
|
44532
44616
|
}, [metrics, data, computeMetricValue]);
|
|
44533
|
-
const calculatedTrend =
|
|
44617
|
+
const calculatedTrend = React98__default.useMemo(() => {
|
|
44534
44618
|
if (manualTrend !== void 0) return manualTrend;
|
|
44535
44619
|
if (previousValue === void 0 || currentValue === void 0)
|
|
44536
44620
|
return void 0;
|
|
@@ -45170,8 +45254,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
45170
45254
|
] });
|
|
45171
45255
|
};
|
|
45172
45256
|
InlineActivityStream = ({ activities, autoScroll = true, className }) => {
|
|
45173
|
-
const endRef =
|
|
45174
|
-
|
|
45257
|
+
const endRef = React98__default.useRef(null);
|
|
45258
|
+
React98__default.useEffect(() => {
|
|
45175
45259
|
if (!autoScroll) return;
|
|
45176
45260
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
45177
45261
|
}, [activities.length, autoScroll]);
|
|
@@ -45265,7 +45349,7 @@ var init_SubagentTracePanel = __esm({
|
|
|
45265
45349
|
};
|
|
45266
45350
|
SubagentRichCard = ({ subagent }) => {
|
|
45267
45351
|
const { t } = useTranslate();
|
|
45268
|
-
const activities =
|
|
45352
|
+
const activities = React98__default.useMemo(
|
|
45269
45353
|
() => subagentMessagesToActivities(subagent.messages),
|
|
45270
45354
|
[subagent.messages]
|
|
45271
45355
|
);
|
|
@@ -45342,8 +45426,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
45342
45426
|
] });
|
|
45343
45427
|
};
|
|
45344
45428
|
CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
|
|
45345
|
-
const endRef =
|
|
45346
|
-
|
|
45429
|
+
const endRef = React98__default.useRef(null);
|
|
45430
|
+
React98__default.useEffect(() => {
|
|
45347
45431
|
if (!autoScroll) return;
|
|
45348
45432
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
45349
45433
|
}, [messages.length, autoScroll]);
|
|
@@ -45773,7 +45857,7 @@ var init_Timeline = __esm({
|
|
|
45773
45857
|
}) => {
|
|
45774
45858
|
const { t } = useTranslate();
|
|
45775
45859
|
const entityData = entity ?? [];
|
|
45776
|
-
const items =
|
|
45860
|
+
const items = React98__default.useMemo(() => {
|
|
45777
45861
|
if (propItems) return propItems;
|
|
45778
45862
|
if (entityData.length === 0) return [];
|
|
45779
45863
|
return entityData.map((record, idx) => {
|
|
@@ -45875,7 +45959,7 @@ var init_Timeline = __esm({
|
|
|
45875
45959
|
}
|
|
45876
45960
|
});
|
|
45877
45961
|
function extractToastProps(children) {
|
|
45878
|
-
if (!
|
|
45962
|
+
if (!React98__default.isValidElement(children)) {
|
|
45879
45963
|
if (typeof children === "string") {
|
|
45880
45964
|
return { message: children };
|
|
45881
45965
|
}
|
|
@@ -45917,7 +46001,7 @@ var init_ToastSlot = __esm({
|
|
|
45917
46001
|
eventBus.emit(`${prefix}CLOSE`);
|
|
45918
46002
|
};
|
|
45919
46003
|
if (!isVisible) return null;
|
|
45920
|
-
const isCustomContent =
|
|
46004
|
+
const isCustomContent = React98__default.isValidElement(children) && !message;
|
|
45921
46005
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
45922
46006
|
Toast,
|
|
45923
46007
|
{
|
|
@@ -45934,7 +46018,7 @@ var init_ToastSlot = __esm({
|
|
|
45934
46018
|
}
|
|
45935
46019
|
});
|
|
45936
46020
|
function lazyThree(name, loader) {
|
|
45937
|
-
const Lazy =
|
|
46021
|
+
const Lazy = React98__default.lazy(
|
|
45938
46022
|
() => loader().then((m) => {
|
|
45939
46023
|
const Resolved = m[name];
|
|
45940
46024
|
if (!Resolved) {
|
|
@@ -45946,13 +46030,13 @@ function lazyThree(name, loader) {
|
|
|
45946
46030
|
})
|
|
45947
46031
|
);
|
|
45948
46032
|
function ThreeWrapper(props) {
|
|
45949
|
-
return
|
|
46033
|
+
return React98__default.createElement(
|
|
45950
46034
|
ThreeBoundary,
|
|
45951
46035
|
{ name },
|
|
45952
|
-
|
|
45953
|
-
|
|
46036
|
+
React98__default.createElement(
|
|
46037
|
+
React98__default.Suspense,
|
|
45954
46038
|
{ fallback: null },
|
|
45955
|
-
|
|
46039
|
+
React98__default.createElement(Lazy, props)
|
|
45956
46040
|
)
|
|
45957
46041
|
);
|
|
45958
46042
|
}
|
|
@@ -46174,6 +46258,7 @@ var init_component_registry_generated = __esm({
|
|
|
46174
46258
|
init_StatCard();
|
|
46175
46259
|
init_StatDisplay();
|
|
46176
46260
|
init_StateArchitectBoard();
|
|
46261
|
+
init_StateGraph();
|
|
46177
46262
|
init_StateIndicator();
|
|
46178
46263
|
init_StateMachineView();
|
|
46179
46264
|
init_StatsGrid();
|
|
@@ -46228,7 +46313,7 @@ var init_component_registry_generated = __esm({
|
|
|
46228
46313
|
init_WizardContainer();
|
|
46229
46314
|
init_WizardNavigation();
|
|
46230
46315
|
init_WizardProgress();
|
|
46231
|
-
ThreeBoundary = class extends
|
|
46316
|
+
ThreeBoundary = class extends React98__default.Component {
|
|
46232
46317
|
constructor() {
|
|
46233
46318
|
super(...arguments);
|
|
46234
46319
|
__publicField(this, "state", { failed: false });
|
|
@@ -46238,7 +46323,7 @@ var init_component_registry_generated = __esm({
|
|
|
46238
46323
|
}
|
|
46239
46324
|
render() {
|
|
46240
46325
|
if (this.state.failed) {
|
|
46241
|
-
return
|
|
46326
|
+
return React98__default.createElement(
|
|
46242
46327
|
"div",
|
|
46243
46328
|
{
|
|
46244
46329
|
"data-testid": "three-unavailable",
|
|
@@ -46485,6 +46570,7 @@ var init_component_registry_generated = __esm({
|
|
|
46485
46570
|
"StatCard": StatCard,
|
|
46486
46571
|
"StatDisplay": StatDisplay,
|
|
46487
46572
|
"StateArchitectBoard": StateArchitectBoard,
|
|
46573
|
+
"StateGraph": StateGraph,
|
|
46488
46574
|
"StateIndicator": StateIndicator,
|
|
46489
46575
|
"StateMachineView": StateMachineView,
|
|
46490
46576
|
"StatsGrid": StatsGrid,
|
|
@@ -46558,7 +46644,7 @@ function SuspenseConfigProvider({
|
|
|
46558
46644
|
config,
|
|
46559
46645
|
children
|
|
46560
46646
|
}) {
|
|
46561
|
-
return
|
|
46647
|
+
return React98__default.createElement(
|
|
46562
46648
|
SuspenseConfigContext.Provider,
|
|
46563
46649
|
{ value: config },
|
|
46564
46650
|
children
|
|
@@ -46600,7 +46686,7 @@ function enrichFormFields(fields, entityDef) {
|
|
|
46600
46686
|
}
|
|
46601
46687
|
return { name: field, label: field.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (c) => c.toUpperCase()) };
|
|
46602
46688
|
}
|
|
46603
|
-
if (field && typeof field === "object" && !Array.isArray(field) && !
|
|
46689
|
+
if (field && typeof field === "object" && !Array.isArray(field) && !React98__default.isValidElement(field) && !(field instanceof Date)) {
|
|
46604
46690
|
const obj = field;
|
|
46605
46691
|
const fieldName = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
|
|
46606
46692
|
if (!fieldName) return field;
|
|
@@ -47053,7 +47139,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
47053
47139
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
47054
47140
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
47055
47141
|
}
|
|
47056
|
-
return /* @__PURE__ */ jsx(
|
|
47142
|
+
return /* @__PURE__ */ jsx(React98__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
47057
47143
|
}
|
|
47058
47144
|
if (!child || typeof child !== "object") return null;
|
|
47059
47145
|
const childId = `${parentId}-${index}`;
|
|
@@ -47093,14 +47179,14 @@ function isPatternConfig(value) {
|
|
|
47093
47179
|
if (value === null || value === void 0) return false;
|
|
47094
47180
|
if (typeof value !== "object") return false;
|
|
47095
47181
|
if (Array.isArray(value)) return false;
|
|
47096
|
-
if (
|
|
47182
|
+
if (React98__default.isValidElement(value)) return false;
|
|
47097
47183
|
if (value instanceof Date) return false;
|
|
47098
47184
|
if (typeof value === "function") return false;
|
|
47099
47185
|
const record = value;
|
|
47100
47186
|
return "type" in record && typeof record.type === "string" && getComponentForPattern$1(record.type) !== null;
|
|
47101
47187
|
}
|
|
47102
47188
|
function isPlainConfigObject(value) {
|
|
47103
|
-
if (
|
|
47189
|
+
if (React98__default.isValidElement(value)) return false;
|
|
47104
47190
|
if (value instanceof Date) return false;
|
|
47105
47191
|
const proto = Object.getPrototypeOf(value);
|
|
47106
47192
|
return proto === Object.prototype || proto === null;
|
|
@@ -47226,7 +47312,7 @@ function SlotContentRenderer({
|
|
|
47226
47312
|
for (const slotKey of CONTENT_NODE_SLOTS) {
|
|
47227
47313
|
const slotVal = restProps[slotKey];
|
|
47228
47314
|
if (slotVal === void 0 || slotVal === null) continue;
|
|
47229
|
-
if (
|
|
47315
|
+
if (React98__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
|
|
47230
47316
|
if (Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
|
|
47231
47317
|
nodeSlotOverrides[slotKey] = renderPatternChildren(
|
|
47232
47318
|
slotVal,
|
|
@@ -47275,7 +47361,7 @@ function SlotContentRenderer({
|
|
|
47275
47361
|
const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
|
|
47276
47362
|
if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
|
|
47277
47363
|
const sample = resolvedItems[0];
|
|
47278
|
-
if (sample && typeof sample === "object" && !Array.isArray(sample) && !
|
|
47364
|
+
if (sample && typeof sample === "object" && !Array.isArray(sample) && !React98__default.isValidElement(sample) && !(sample instanceof Date)) {
|
|
47279
47365
|
const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
|
|
47280
47366
|
finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
|
|
47281
47367
|
}
|