@almadar/ui 2.24.8 → 2.24.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/atoms/AnimatedGraphic.d.ts +29 -0
- package/dist/components/atoms/AnimatedReveal.d.ts +24 -0
- package/dist/components/atoms/index.d.ts +2 -0
- package/dist/components/index.cjs +1292 -1008
- package/dist/components/index.js +428 -146
- package/dist/docs/index.cjs +2 -1
- package/dist/docs/index.js +2 -1
- package/dist/marketing/index.cjs +295 -11
- package/dist/marketing/index.d.cts +54 -1
- package/dist/marketing/index.d.ts +4 -0
- package/dist/marketing/index.js +295 -13
- package/dist/providers/index.cjs +410 -125
- package/dist/providers/index.js +322 -37
- package/dist/runtime/index.cjs +1178 -893
- package/dist/runtime/index.js +418 -133
- package/package.json +1 -1
package/dist/components/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React90 from 'react';
|
|
2
|
+
import React90__default, { useCallback, createContext, useState, useRef, useEffect, useLayoutEffect, lazy, useContext, useMemo, useId, Suspense, useSyncExternalStore } from 'react';
|
|
3
3
|
import { clsx } from 'clsx';
|
|
4
4
|
import { twMerge } from 'tailwind-merge';
|
|
5
5
|
import * as LucideIcons from 'lucide-react';
|
|
@@ -215,7 +215,8 @@ var variantStyles = {
|
|
|
215
215
|
].join(" "),
|
|
216
216
|
ghost: [
|
|
217
217
|
"bg-transparent text-muted-foreground",
|
|
218
|
-
"
|
|
218
|
+
"border border-transparent",
|
|
219
|
+
"hover:text-primary-foreground hover:bg-primary hover:border-primary",
|
|
219
220
|
"active:scale-[var(--active-scale)]"
|
|
220
221
|
].join(" "),
|
|
221
222
|
danger: [
|
|
@@ -268,7 +269,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
268
269
|
const IconComp = value;
|
|
269
270
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
270
271
|
}
|
|
271
|
-
if (
|
|
272
|
+
if (React90__default.isValidElement(value)) {
|
|
272
273
|
return value;
|
|
273
274
|
}
|
|
274
275
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -277,7 +278,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
277
278
|
}
|
|
278
279
|
return value;
|
|
279
280
|
}
|
|
280
|
-
var Button =
|
|
281
|
+
var Button = React90__default.forwardRef(
|
|
281
282
|
({
|
|
282
283
|
className,
|
|
283
284
|
variant = "primary",
|
|
@@ -336,7 +337,7 @@ var Button = React88__default.forwardRef(
|
|
|
336
337
|
}
|
|
337
338
|
);
|
|
338
339
|
Button.displayName = "Button";
|
|
339
|
-
var Input =
|
|
340
|
+
var Input = React90__default.forwardRef(
|
|
340
341
|
({
|
|
341
342
|
className,
|
|
342
343
|
inputType,
|
|
@@ -448,7 +449,7 @@ var Input = React88__default.forwardRef(
|
|
|
448
449
|
}
|
|
449
450
|
);
|
|
450
451
|
Input.displayName = "Input";
|
|
451
|
-
var Label =
|
|
452
|
+
var Label = React90__default.forwardRef(
|
|
452
453
|
({ className, required, children, ...props }, ref) => {
|
|
453
454
|
return /* @__PURE__ */ jsxs(
|
|
454
455
|
"label",
|
|
@@ -468,7 +469,7 @@ var Label = React88__default.forwardRef(
|
|
|
468
469
|
}
|
|
469
470
|
);
|
|
470
471
|
Label.displayName = "Label";
|
|
471
|
-
var Textarea =
|
|
472
|
+
var Textarea = React90__default.forwardRef(
|
|
472
473
|
({ className, error, ...props }, ref) => {
|
|
473
474
|
return /* @__PURE__ */ jsx(
|
|
474
475
|
"textarea",
|
|
@@ -491,7 +492,7 @@ var Textarea = React88__default.forwardRef(
|
|
|
491
492
|
}
|
|
492
493
|
);
|
|
493
494
|
Textarea.displayName = "Textarea";
|
|
494
|
-
var Select =
|
|
495
|
+
var Select = React90__default.forwardRef(
|
|
495
496
|
({ className, options, placeholder, error, ...props }, ref) => {
|
|
496
497
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
497
498
|
/* @__PURE__ */ jsxs(
|
|
@@ -527,7 +528,7 @@ var Select = React88__default.forwardRef(
|
|
|
527
528
|
}
|
|
528
529
|
);
|
|
529
530
|
Select.displayName = "Select";
|
|
530
|
-
var Checkbox =
|
|
531
|
+
var Checkbox = React90__default.forwardRef(
|
|
531
532
|
({ className, label, id, ...props }, ref) => {
|
|
532
533
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
533
534
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
@@ -603,7 +604,7 @@ var shadowStyles = {
|
|
|
603
604
|
md: "shadow",
|
|
604
605
|
lg: "shadow-lg"
|
|
605
606
|
};
|
|
606
|
-
var Card =
|
|
607
|
+
var Card = React90__default.forwardRef(
|
|
607
608
|
({
|
|
608
609
|
className,
|
|
609
610
|
variant = "bordered",
|
|
@@ -639,9 +640,9 @@ var Card = React88__default.forwardRef(
|
|
|
639
640
|
}
|
|
640
641
|
);
|
|
641
642
|
Card.displayName = "Card";
|
|
642
|
-
var CardHeader =
|
|
643
|
+
var CardHeader = React90__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
643
644
|
CardHeader.displayName = "CardHeader";
|
|
644
|
-
var CardTitle =
|
|
645
|
+
var CardTitle = React90__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
645
646
|
"h3",
|
|
646
647
|
{
|
|
647
648
|
ref,
|
|
@@ -654,11 +655,11 @@ var CardTitle = React88__default.forwardRef(({ className, ...props }, ref) => /*
|
|
|
654
655
|
}
|
|
655
656
|
));
|
|
656
657
|
CardTitle.displayName = "CardTitle";
|
|
657
|
-
var CardContent =
|
|
658
|
+
var CardContent = React90__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
658
659
|
CardContent.displayName = "CardContent";
|
|
659
660
|
var CardBody = CardContent;
|
|
660
661
|
CardBody.displayName = "CardBody";
|
|
661
|
-
var CardFooter =
|
|
662
|
+
var CardFooter = React90__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
662
663
|
"div",
|
|
663
664
|
{
|
|
664
665
|
ref,
|
|
@@ -704,7 +705,7 @@ var sizeStyles2 = {
|
|
|
704
705
|
md: "px-2.5 py-1 text-sm",
|
|
705
706
|
lg: "px-3 py-1.5 text-base"
|
|
706
707
|
};
|
|
707
|
-
var Badge =
|
|
708
|
+
var Badge = React90__default.forwardRef(
|
|
708
709
|
({ className, variant = "default", size = "sm", amount, label, icon, children, ...props }, ref) => {
|
|
709
710
|
const iconSizes2 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
|
|
710
711
|
const resolvedIcon = typeof icon === "string" ? (() => {
|
|
@@ -737,7 +738,7 @@ var sizeStyles3 = {
|
|
|
737
738
|
md: "h-6 w-6",
|
|
738
739
|
lg: "h-8 w-8"
|
|
739
740
|
};
|
|
740
|
-
var Spinner =
|
|
741
|
+
var Spinner = React90__default.forwardRef(
|
|
741
742
|
({ className, size = "md", ...props }, ref) => {
|
|
742
743
|
return /* @__PURE__ */ jsx(
|
|
743
744
|
"div",
|
|
@@ -1002,7 +1003,7 @@ var positionStyles = {
|
|
|
1002
1003
|
fixed: "fixed",
|
|
1003
1004
|
sticky: "sticky"
|
|
1004
1005
|
};
|
|
1005
|
-
var Box =
|
|
1006
|
+
var Box = React90__default.forwardRef(
|
|
1006
1007
|
({
|
|
1007
1008
|
padding,
|
|
1008
1009
|
paddingX,
|
|
@@ -1349,7 +1350,7 @@ var ProgressBar = ({
|
|
|
1349
1350
|
return null;
|
|
1350
1351
|
};
|
|
1351
1352
|
ProgressBar.displayName = "ProgressBar";
|
|
1352
|
-
var Radio =
|
|
1353
|
+
var Radio = React90__default.forwardRef(
|
|
1353
1354
|
({
|
|
1354
1355
|
label,
|
|
1355
1356
|
helperText,
|
|
@@ -1453,7 +1454,7 @@ var Radio = React88__default.forwardRef(
|
|
|
1453
1454
|
}
|
|
1454
1455
|
);
|
|
1455
1456
|
Radio.displayName = "Radio";
|
|
1456
|
-
var Switch =
|
|
1457
|
+
var Switch = React90.forwardRef(
|
|
1457
1458
|
({
|
|
1458
1459
|
checked,
|
|
1459
1460
|
defaultChecked = false,
|
|
@@ -1464,10 +1465,10 @@ var Switch = React88.forwardRef(
|
|
|
1464
1465
|
name,
|
|
1465
1466
|
className
|
|
1466
1467
|
}, ref) => {
|
|
1467
|
-
const [isChecked, setIsChecked] =
|
|
1468
|
+
const [isChecked, setIsChecked] = React90.useState(
|
|
1468
1469
|
checked !== void 0 ? checked : defaultChecked
|
|
1469
1470
|
);
|
|
1470
|
-
|
|
1471
|
+
React90.useEffect(() => {
|
|
1471
1472
|
if (checked !== void 0) {
|
|
1472
1473
|
setIsChecked(checked);
|
|
1473
1474
|
}
|
|
@@ -2261,8 +2262,8 @@ var LawReferenceTooltip = ({
|
|
|
2261
2262
|
position = "top",
|
|
2262
2263
|
className
|
|
2263
2264
|
}) => {
|
|
2264
|
-
const [isVisible, setIsVisible] =
|
|
2265
|
-
const timeoutRef =
|
|
2265
|
+
const [isVisible, setIsVisible] = React90__default.useState(false);
|
|
2266
|
+
const timeoutRef = React90__default.useRef(null);
|
|
2266
2267
|
const handleMouseEnter = () => {
|
|
2267
2268
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
2268
2269
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -2271,7 +2272,7 @@ var LawReferenceTooltip = ({
|
|
|
2271
2272
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
2272
2273
|
setIsVisible(false);
|
|
2273
2274
|
};
|
|
2274
|
-
|
|
2275
|
+
React90__default.useEffect(() => {
|
|
2275
2276
|
return () => {
|
|
2276
2277
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
2277
2278
|
};
|
|
@@ -2459,7 +2460,7 @@ var sizeStyles5 = {
|
|
|
2459
2460
|
md: "w-2.5 h-2.5",
|
|
2460
2461
|
lg: "w-3 h-3"
|
|
2461
2462
|
};
|
|
2462
|
-
var StatusDot =
|
|
2463
|
+
var StatusDot = React90__default.forwardRef(
|
|
2463
2464
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
2464
2465
|
return /* @__PURE__ */ jsx(
|
|
2465
2466
|
"span",
|
|
@@ -2506,7 +2507,7 @@ var iconMap = {
|
|
|
2506
2507
|
down: TrendingDown,
|
|
2507
2508
|
flat: ArrowRight
|
|
2508
2509
|
};
|
|
2509
|
-
var TrendIndicator =
|
|
2510
|
+
var TrendIndicator = React90__default.forwardRef(
|
|
2510
2511
|
({
|
|
2511
2512
|
className,
|
|
2512
2513
|
value,
|
|
@@ -2565,7 +2566,7 @@ var thumbSizes = {
|
|
|
2565
2566
|
md: "w-4 h-4",
|
|
2566
2567
|
lg: "w-5 h-5"
|
|
2567
2568
|
};
|
|
2568
|
-
var RangeSlider =
|
|
2569
|
+
var RangeSlider = React90__default.forwardRef(
|
|
2569
2570
|
({
|
|
2570
2571
|
className,
|
|
2571
2572
|
min = 0,
|
|
@@ -3097,7 +3098,7 @@ var paddingClasses = {
|
|
|
3097
3098
|
md: "py-16",
|
|
3098
3099
|
lg: "py-24"
|
|
3099
3100
|
};
|
|
3100
|
-
var ContentSection =
|
|
3101
|
+
var ContentSection = React90__default.forwardRef(
|
|
3101
3102
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
3102
3103
|
return /* @__PURE__ */ jsx(
|
|
3103
3104
|
Box,
|
|
@@ -3598,6 +3599,289 @@ function getTileDimensions(variant, size) {
|
|
|
3598
3599
|
}
|
|
3599
3600
|
return { width: size, height: size };
|
|
3600
3601
|
}
|
|
3602
|
+
var initialStyles = {
|
|
3603
|
+
"fade-up": { opacity: 0, transform: "translateY(24px)" },
|
|
3604
|
+
"fade-down": { opacity: 0, transform: "translateY(-24px)" },
|
|
3605
|
+
"fade-in": { opacity: 0 },
|
|
3606
|
+
"fade-left": { opacity: 0, transform: "translateX(24px)" },
|
|
3607
|
+
"fade-right": { opacity: 0, transform: "translateX(-24px)" },
|
|
3608
|
+
"scale": { opacity: 0, transform: "scale(0.92)" },
|
|
3609
|
+
"scale-up": { opacity: 0, transform: "scale(0.92) translateY(16px)" },
|
|
3610
|
+
"none": {}
|
|
3611
|
+
};
|
|
3612
|
+
var animatedStyles = {
|
|
3613
|
+
"fade-up": { opacity: 1, transform: "translateY(0)" },
|
|
3614
|
+
"fade-down": { opacity: 1, transform: "translateY(0)" },
|
|
3615
|
+
"fade-in": { opacity: 1 },
|
|
3616
|
+
"fade-left": { opacity: 1, transform: "translateX(0)" },
|
|
3617
|
+
"fade-right": { opacity: 1, transform: "translateX(0)" },
|
|
3618
|
+
"scale": { opacity: 1, transform: "scale(1)" },
|
|
3619
|
+
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
3620
|
+
"none": {}
|
|
3621
|
+
};
|
|
3622
|
+
var AnimatedReveal = React90__default.forwardRef(
|
|
3623
|
+
({
|
|
3624
|
+
trigger = "scroll",
|
|
3625
|
+
animation = "fade-up",
|
|
3626
|
+
duration = 600,
|
|
3627
|
+
delay = 0,
|
|
3628
|
+
threshold = 0.15,
|
|
3629
|
+
once = true,
|
|
3630
|
+
animate: manualAnimate,
|
|
3631
|
+
easing = "cubic-bezier(0.16, 1, 0.3, 1)",
|
|
3632
|
+
children,
|
|
3633
|
+
className,
|
|
3634
|
+
style,
|
|
3635
|
+
...props
|
|
3636
|
+
}, forwardedRef) => {
|
|
3637
|
+
const [isAnimated, setIsAnimated] = useState(false);
|
|
3638
|
+
const internalRef = useRef(null);
|
|
3639
|
+
const hasAnimated = useRef(false);
|
|
3640
|
+
const setRef = useCallback(
|
|
3641
|
+
(node) => {
|
|
3642
|
+
internalRef.current = node;
|
|
3643
|
+
if (typeof forwardedRef === "function") forwardedRef(node);
|
|
3644
|
+
else if (forwardedRef) forwardedRef.current = node;
|
|
3645
|
+
},
|
|
3646
|
+
[forwardedRef]
|
|
3647
|
+
);
|
|
3648
|
+
useEffect(() => {
|
|
3649
|
+
if (trigger !== "scroll") return;
|
|
3650
|
+
const el = internalRef.current;
|
|
3651
|
+
if (!el) return;
|
|
3652
|
+
const observer = new IntersectionObserver(
|
|
3653
|
+
([entry]) => {
|
|
3654
|
+
if (entry.isIntersecting) {
|
|
3655
|
+
if (once && hasAnimated.current) return;
|
|
3656
|
+
hasAnimated.current = true;
|
|
3657
|
+
setIsAnimated(true);
|
|
3658
|
+
} else if (!once) {
|
|
3659
|
+
setIsAnimated(false);
|
|
3660
|
+
}
|
|
3661
|
+
},
|
|
3662
|
+
{ threshold }
|
|
3663
|
+
);
|
|
3664
|
+
observer.observe(el);
|
|
3665
|
+
return () => observer.disconnect();
|
|
3666
|
+
}, [trigger, threshold, once]);
|
|
3667
|
+
const handleMouseEnter = trigger === "hover" ? () => setIsAnimated(true) : void 0;
|
|
3668
|
+
const handleMouseLeave = trigger === "hover" ? () => {
|
|
3669
|
+
if (!once || !hasAnimated.current) {
|
|
3670
|
+
hasAnimated.current = true;
|
|
3671
|
+
setIsAnimated(false);
|
|
3672
|
+
}
|
|
3673
|
+
} : void 0;
|
|
3674
|
+
useEffect(() => {
|
|
3675
|
+
if (trigger === "manual" && manualAnimate !== void 0) {
|
|
3676
|
+
setIsAnimated(manualAnimate);
|
|
3677
|
+
}
|
|
3678
|
+
}, [trigger, manualAnimate]);
|
|
3679
|
+
const active = isAnimated;
|
|
3680
|
+
const currentStyle = active ? animatedStyles[animation] : initialStyles[animation];
|
|
3681
|
+
return /* @__PURE__ */ jsx(
|
|
3682
|
+
"div",
|
|
3683
|
+
{
|
|
3684
|
+
ref: setRef,
|
|
3685
|
+
className: cn("will-change-[opacity,transform]", className),
|
|
3686
|
+
style: {
|
|
3687
|
+
...currentStyle,
|
|
3688
|
+
transitionProperty: "opacity, transform",
|
|
3689
|
+
transitionDuration: `${duration}ms`,
|
|
3690
|
+
transitionDelay: `${delay}ms`,
|
|
3691
|
+
transitionTimingFunction: easing,
|
|
3692
|
+
...style
|
|
3693
|
+
},
|
|
3694
|
+
onMouseEnter: handleMouseEnter,
|
|
3695
|
+
onMouseLeave: handleMouseLeave,
|
|
3696
|
+
...props,
|
|
3697
|
+
children: typeof children === "function" ? children(active) : children
|
|
3698
|
+
}
|
|
3699
|
+
);
|
|
3700
|
+
}
|
|
3701
|
+
);
|
|
3702
|
+
AnimatedReveal.displayName = "AnimatedReveal";
|
|
3703
|
+
function useFetchedSvg(src) {
|
|
3704
|
+
const [svg, setSvg] = useState(null);
|
|
3705
|
+
const cache = useRef({});
|
|
3706
|
+
useEffect(() => {
|
|
3707
|
+
if (!src) {
|
|
3708
|
+
setSvg(null);
|
|
3709
|
+
return;
|
|
3710
|
+
}
|
|
3711
|
+
if (cache.current[src]) {
|
|
3712
|
+
setSvg(cache.current[src]);
|
|
3713
|
+
return;
|
|
3714
|
+
}
|
|
3715
|
+
let cancelled = false;
|
|
3716
|
+
fetch(src).then((res) => {
|
|
3717
|
+
if (!res.ok) throw new Error(`Failed to fetch SVG: ${res.status}`);
|
|
3718
|
+
return res.text();
|
|
3719
|
+
}).then((text) => {
|
|
3720
|
+
if (cancelled) return;
|
|
3721
|
+
cache.current[src] = text;
|
|
3722
|
+
setSvg(text);
|
|
3723
|
+
}).catch(() => {
|
|
3724
|
+
if (!cancelled) setSvg(null);
|
|
3725
|
+
});
|
|
3726
|
+
return () => {
|
|
3727
|
+
cancelled = true;
|
|
3728
|
+
};
|
|
3729
|
+
}, [src]);
|
|
3730
|
+
return svg;
|
|
3731
|
+
}
|
|
3732
|
+
function applyDrawAnimation(container, animate, duration, delay, easing) {
|
|
3733
|
+
const paths = container.querySelectorAll("path, line, polyline, polygon, circle, ellipse, rect");
|
|
3734
|
+
paths.forEach((el) => {
|
|
3735
|
+
if ("getTotalLength" in el && typeof el.getTotalLength === "function") {
|
|
3736
|
+
const len = el.getTotalLength();
|
|
3737
|
+
el.style.strokeDasharray = `${len}`;
|
|
3738
|
+
el.style.strokeDashoffset = animate ? "0" : `${len}`;
|
|
3739
|
+
el.style.transition = `stroke-dashoffset ${duration}ms ${easing} ${delay}ms`;
|
|
3740
|
+
}
|
|
3741
|
+
});
|
|
3742
|
+
}
|
|
3743
|
+
function applyFillAnimation(container, animate, duration, delay, easing, fillColor) {
|
|
3744
|
+
const paths = container.querySelectorAll("path, circle, ellipse, rect, polygon");
|
|
3745
|
+
paths.forEach((el) => {
|
|
3746
|
+
if ("getTotalLength" in el && typeof el.getTotalLength === "function") {
|
|
3747
|
+
const geom = el;
|
|
3748
|
+
const len = geom.getTotalLength();
|
|
3749
|
+
geom.style.strokeDasharray = `${len}`;
|
|
3750
|
+
geom.style.strokeDashoffset = animate ? "0" : `${len}`;
|
|
3751
|
+
geom.style.transition = `stroke-dashoffset ${duration * 0.6}ms ${easing} ${delay}ms, fill-opacity ${duration * 0.4}ms ${easing} ${delay + duration * 0.6}ms`;
|
|
3752
|
+
}
|
|
3753
|
+
if (fillColor) el.style.fill = fillColor;
|
|
3754
|
+
el.style.fillOpacity = animate ? "1" : "0";
|
|
3755
|
+
});
|
|
3756
|
+
}
|
|
3757
|
+
function applyPulseAnimation(container, animate, duration) {
|
|
3758
|
+
const svg = container.querySelector("svg");
|
|
3759
|
+
if (!svg) return;
|
|
3760
|
+
if (animate) {
|
|
3761
|
+
svg.style.animation = `ag-pulse ${duration}ms ease-in-out infinite`;
|
|
3762
|
+
} else {
|
|
3763
|
+
svg.style.animation = "none";
|
|
3764
|
+
}
|
|
3765
|
+
}
|
|
3766
|
+
function applyMorphAnimation(container, animate, duration, delay, easing) {
|
|
3767
|
+
const paths = container.querySelectorAll("path, circle, ellipse, rect, polygon");
|
|
3768
|
+
paths.forEach((el) => {
|
|
3769
|
+
el.style.transition = `all ${duration}ms ${easing} ${delay}ms`;
|
|
3770
|
+
el.style.transform = animate ? "scale(1)" : "scale(0)";
|
|
3771
|
+
el.style.transformOrigin = "center";
|
|
3772
|
+
el.style.opacity = animate ? "1" : "0";
|
|
3773
|
+
});
|
|
3774
|
+
}
|
|
3775
|
+
var AnimatedGraphic = React90__default.forwardRef(
|
|
3776
|
+
({
|
|
3777
|
+
src,
|
|
3778
|
+
svgContent,
|
|
3779
|
+
animation = "draw",
|
|
3780
|
+
animate = false,
|
|
3781
|
+
duration = 1200,
|
|
3782
|
+
delay = 0,
|
|
3783
|
+
easing = "cubic-bezier(0.16, 1, 0.3, 1)",
|
|
3784
|
+
width,
|
|
3785
|
+
height,
|
|
3786
|
+
strokeColor,
|
|
3787
|
+
fillColor,
|
|
3788
|
+
alt,
|
|
3789
|
+
className,
|
|
3790
|
+
style,
|
|
3791
|
+
children,
|
|
3792
|
+
...props
|
|
3793
|
+
}, ref) => {
|
|
3794
|
+
const containerRef = useRef(null);
|
|
3795
|
+
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
3796
|
+
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
3797
|
+
const prevAnimateRef = useRef(animate);
|
|
3798
|
+
const setRef = React90__default.useCallback(
|
|
3799
|
+
(node) => {
|
|
3800
|
+
containerRef.current = node;
|
|
3801
|
+
if (typeof ref === "function") ref(node);
|
|
3802
|
+
else if (ref) ref.current = node;
|
|
3803
|
+
},
|
|
3804
|
+
[ref]
|
|
3805
|
+
);
|
|
3806
|
+
useEffect(() => {
|
|
3807
|
+
const el = containerRef.current;
|
|
3808
|
+
if (!el || !strokeColor) return;
|
|
3809
|
+
const paths = el.querySelectorAll("path, line, polyline, polygon, circle, ellipse, rect");
|
|
3810
|
+
paths.forEach((p2) => {
|
|
3811
|
+
p2.style.stroke = strokeColor;
|
|
3812
|
+
});
|
|
3813
|
+
}, [resolvedSvg, strokeColor]);
|
|
3814
|
+
useEffect(() => {
|
|
3815
|
+
const el = containerRef.current;
|
|
3816
|
+
if (!el || !resolvedSvg) return;
|
|
3817
|
+
if (animation === "draw" || animation === "fill") {
|
|
3818
|
+
const paths = el.querySelectorAll("path, line, polyline, polygon, circle, ellipse, rect");
|
|
3819
|
+
paths.forEach((p2) => {
|
|
3820
|
+
if ("getTotalLength" in p2 && typeof p2.getTotalLength === "function") {
|
|
3821
|
+
const len = p2.getTotalLength();
|
|
3822
|
+
p2.style.strokeDasharray = `${len}`;
|
|
3823
|
+
p2.style.strokeDashoffset = `${len}`;
|
|
3824
|
+
}
|
|
3825
|
+
if (animation === "fill") {
|
|
3826
|
+
p2.style.fillOpacity = "0";
|
|
3827
|
+
}
|
|
3828
|
+
});
|
|
3829
|
+
}
|
|
3830
|
+
if (animation === "morph") {
|
|
3831
|
+
const paths = el.querySelectorAll("path, circle, ellipse, rect, polygon");
|
|
3832
|
+
paths.forEach((p2) => {
|
|
3833
|
+
p2.style.transform = "scale(0)";
|
|
3834
|
+
p2.style.transformOrigin = "center";
|
|
3835
|
+
p2.style.opacity = "0";
|
|
3836
|
+
});
|
|
3837
|
+
}
|
|
3838
|
+
}, [resolvedSvg, animation]);
|
|
3839
|
+
useEffect(() => {
|
|
3840
|
+
const el = containerRef.current;
|
|
3841
|
+
if (!el) return;
|
|
3842
|
+
const id = requestAnimationFrame(() => {
|
|
3843
|
+
switch (animation) {
|
|
3844
|
+
case "draw":
|
|
3845
|
+
applyDrawAnimation(el, animate, duration, delay, easing);
|
|
3846
|
+
break;
|
|
3847
|
+
case "fill":
|
|
3848
|
+
applyFillAnimation(el, animate, duration, delay, easing, fillColor);
|
|
3849
|
+
break;
|
|
3850
|
+
case "pulse":
|
|
3851
|
+
applyPulseAnimation(el, animate, duration);
|
|
3852
|
+
break;
|
|
3853
|
+
case "morph":
|
|
3854
|
+
applyMorphAnimation(el, animate, duration, delay, easing);
|
|
3855
|
+
break;
|
|
3856
|
+
}
|
|
3857
|
+
});
|
|
3858
|
+
prevAnimateRef.current = animate;
|
|
3859
|
+
return () => cancelAnimationFrame(id);
|
|
3860
|
+
}, [animate, animation, duration, delay, easing, fillColor, resolvedSvg]);
|
|
3861
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3862
|
+
/* @__PURE__ */ jsx("style", { children: `@keyframes ag-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.04); opacity: 0.85; } }` }),
|
|
3863
|
+
/* @__PURE__ */ jsx(
|
|
3864
|
+
"div",
|
|
3865
|
+
{
|
|
3866
|
+
ref: setRef,
|
|
3867
|
+
className: cn("inline-flex items-center justify-center", className),
|
|
3868
|
+
style: { width, height, ...style },
|
|
3869
|
+
role: alt ? "img" : void 0,
|
|
3870
|
+
"aria-label": alt,
|
|
3871
|
+
...props,
|
|
3872
|
+
children: resolvedSvg ? /* @__PURE__ */ jsx(
|
|
3873
|
+
"div",
|
|
3874
|
+
{
|
|
3875
|
+
className: "w-full h-full [&>svg]:w-full [&>svg]:h-full",
|
|
3876
|
+
dangerouslySetInnerHTML: { __html: resolvedSvg }
|
|
3877
|
+
}
|
|
3878
|
+
) : children
|
|
3879
|
+
}
|
|
3880
|
+
)
|
|
3881
|
+
] });
|
|
3882
|
+
}
|
|
3883
|
+
);
|
|
3884
|
+
AnimatedGraphic.displayName = "AnimatedGraphic";
|
|
3601
3885
|
var heartIcon = (filled, size) => /* @__PURE__ */ jsx(
|
|
3602
3886
|
"svg",
|
|
3603
3887
|
{
|
|
@@ -3682,9 +3966,9 @@ function ScoreDisplay({
|
|
|
3682
3966
|
...rest
|
|
3683
3967
|
}) {
|
|
3684
3968
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
|
|
3685
|
-
const [displayValue, setDisplayValue] =
|
|
3686
|
-
const [isAnimating, setIsAnimating] =
|
|
3687
|
-
|
|
3969
|
+
const [displayValue, setDisplayValue] = React90.useState(resolvedValue);
|
|
3970
|
+
const [isAnimating, setIsAnimating] = React90.useState(false);
|
|
3971
|
+
React90.useEffect(() => {
|
|
3688
3972
|
if (!animated || displayValue === resolvedValue) {
|
|
3689
3973
|
setDisplayValue(resolvedValue);
|
|
3690
3974
|
return;
|
|
@@ -3757,9 +4041,9 @@ function ControlButton({
|
|
|
3757
4041
|
className
|
|
3758
4042
|
}) {
|
|
3759
4043
|
const eventBus = useEventBus();
|
|
3760
|
-
const [isPressed, setIsPressed] =
|
|
4044
|
+
const [isPressed, setIsPressed] = React90.useState(false);
|
|
3761
4045
|
const actualPressed = pressed ?? isPressed;
|
|
3762
|
-
const handlePointerDown =
|
|
4046
|
+
const handlePointerDown = React90.useCallback(
|
|
3763
4047
|
(e) => {
|
|
3764
4048
|
e.preventDefault();
|
|
3765
4049
|
if (disabled) return;
|
|
@@ -3769,7 +4053,7 @@ function ControlButton({
|
|
|
3769
4053
|
},
|
|
3770
4054
|
[disabled, pressEvent, eventBus, onPress]
|
|
3771
4055
|
);
|
|
3772
|
-
const handlePointerUp =
|
|
4056
|
+
const handlePointerUp = React90.useCallback(
|
|
3773
4057
|
(e) => {
|
|
3774
4058
|
e.preventDefault();
|
|
3775
4059
|
if (disabled) return;
|
|
@@ -3779,7 +4063,7 @@ function ControlButton({
|
|
|
3779
4063
|
},
|
|
3780
4064
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
3781
4065
|
);
|
|
3782
|
-
const handlePointerLeave =
|
|
4066
|
+
const handlePointerLeave = React90.useCallback(
|
|
3783
4067
|
(e) => {
|
|
3784
4068
|
if (isPressed) {
|
|
3785
4069
|
setIsPressed(false);
|
|
@@ -4605,9 +4889,9 @@ function MiniMap({
|
|
|
4605
4889
|
viewportRect,
|
|
4606
4890
|
className
|
|
4607
4891
|
}) {
|
|
4608
|
-
const canvasRef =
|
|
4609
|
-
const frameRef =
|
|
4610
|
-
|
|
4892
|
+
const canvasRef = React90.useRef(null);
|
|
4893
|
+
const frameRef = React90.useRef(0);
|
|
4894
|
+
React90.useEffect(() => {
|
|
4611
4895
|
const canvas = canvasRef.current;
|
|
4612
4896
|
if (!canvas) return;
|
|
4613
4897
|
const ctx = canvas.getContext("2d");
|
|
@@ -4848,7 +5132,7 @@ var ErrorState = ({
|
|
|
4848
5132
|
);
|
|
4849
5133
|
};
|
|
4850
5134
|
ErrorState.displayName = "ErrorState";
|
|
4851
|
-
var ErrorBoundary = class extends
|
|
5135
|
+
var ErrorBoundary = class extends React90__default.Component {
|
|
4852
5136
|
constructor(props) {
|
|
4853
5137
|
super(props);
|
|
4854
5138
|
__publicField(this, "reset", () => {
|
|
@@ -6584,8 +6868,8 @@ var Menu = ({
|
|
|
6584
6868
|
"bottom-start": "top-full left-0 mt-2",
|
|
6585
6869
|
"bottom-end": "top-full right-0 mt-2"
|
|
6586
6870
|
};
|
|
6587
|
-
const triggerChild =
|
|
6588
|
-
const triggerElement =
|
|
6871
|
+
const triggerChild = React90__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx("span", { children: trigger });
|
|
6872
|
+
const triggerElement = React90__default.cloneElement(
|
|
6589
6873
|
triggerChild,
|
|
6590
6874
|
{
|
|
6591
6875
|
ref: triggerRef,
|
|
@@ -7090,8 +7374,8 @@ var Popover = ({
|
|
|
7090
7374
|
onMouseEnter: handleOpen,
|
|
7091
7375
|
onMouseLeave: handleClose
|
|
7092
7376
|
};
|
|
7093
|
-
const childElement =
|
|
7094
|
-
const triggerElement =
|
|
7377
|
+
const childElement = React90__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
7378
|
+
const triggerElement = React90__default.cloneElement(
|
|
7095
7379
|
childElement,
|
|
7096
7380
|
{
|
|
7097
7381
|
ref: triggerRef,
|
|
@@ -7846,8 +8130,8 @@ var Tooltip = ({
|
|
|
7846
8130
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
7847
8131
|
};
|
|
7848
8132
|
}, []);
|
|
7849
|
-
const triggerElement =
|
|
7850
|
-
const trigger =
|
|
8133
|
+
const triggerElement = React90__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
8134
|
+
const trigger = React90__default.cloneElement(triggerElement, {
|
|
7851
8135
|
ref: triggerRef,
|
|
7852
8136
|
onMouseEnter: handleMouseEnter,
|
|
7853
8137
|
onMouseLeave: handleMouseLeave,
|
|
@@ -8096,7 +8380,7 @@ var WizardProgress = ({
|
|
|
8096
8380
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: steps.map((step, index) => {
|
|
8097
8381
|
const isActive = index === currentStep;
|
|
8098
8382
|
const isCompleted = index < currentStep;
|
|
8099
|
-
return /* @__PURE__ */ jsxs(
|
|
8383
|
+
return /* @__PURE__ */ jsxs(React90__default.Fragment, { children: [
|
|
8100
8384
|
/* @__PURE__ */ jsx(
|
|
8101
8385
|
"button",
|
|
8102
8386
|
{
|
|
@@ -8226,7 +8510,7 @@ var WizardNavigation = ({
|
|
|
8226
8510
|
);
|
|
8227
8511
|
};
|
|
8228
8512
|
WizardNavigation.displayName = "WizardNavigation";
|
|
8229
|
-
var MarkdownContent =
|
|
8513
|
+
var MarkdownContent = React90__default.memo(
|
|
8230
8514
|
({ content, direction, className }) => {
|
|
8231
8515
|
const { t: _t } = useTranslate();
|
|
8232
8516
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -8328,7 +8612,7 @@ var MarkdownContent = React88__default.memo(
|
|
|
8328
8612
|
(prev, next) => prev.content === next.content && prev.className === next.className && prev.direction === next.direction
|
|
8329
8613
|
);
|
|
8330
8614
|
MarkdownContent.displayName = "MarkdownContent";
|
|
8331
|
-
var CodeBlock =
|
|
8615
|
+
var CodeBlock = React90__default.memo(
|
|
8332
8616
|
({
|
|
8333
8617
|
code: rawCode,
|
|
8334
8618
|
language = "text",
|
|
@@ -9449,8 +9733,8 @@ function DPad({
|
|
|
9449
9733
|
}) {
|
|
9450
9734
|
const eventBus = useEventBus();
|
|
9451
9735
|
const sizes = sizeMap15[size];
|
|
9452
|
-
const [activeDirections, setActiveDirections] =
|
|
9453
|
-
const handlePress =
|
|
9736
|
+
const [activeDirections, setActiveDirections] = React90.useState(/* @__PURE__ */ new Set());
|
|
9737
|
+
const handlePress = React90.useCallback(
|
|
9454
9738
|
(direction) => {
|
|
9455
9739
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
9456
9740
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -9458,7 +9742,7 @@ function DPad({
|
|
|
9458
9742
|
},
|
|
9459
9743
|
[directionEvent, eventBus, onDirection]
|
|
9460
9744
|
);
|
|
9461
|
-
const handleRelease =
|
|
9745
|
+
const handleRelease = React90.useCallback(
|
|
9462
9746
|
(direction) => {
|
|
9463
9747
|
setActiveDirections((prev) => {
|
|
9464
9748
|
const next = new Set(prev);
|
|
@@ -9516,8 +9800,8 @@ function ActionButtons({
|
|
|
9516
9800
|
disabled
|
|
9517
9801
|
}) {
|
|
9518
9802
|
const eventBus = useEventBus();
|
|
9519
|
-
const [activeButtons, setActiveButtons] =
|
|
9520
|
-
const handlePress =
|
|
9803
|
+
const [activeButtons, setActiveButtons] = React90.useState(/* @__PURE__ */ new Set());
|
|
9804
|
+
const handlePress = React90.useCallback(
|
|
9521
9805
|
(id) => {
|
|
9522
9806
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
9523
9807
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -9525,7 +9809,7 @@ function ActionButtons({
|
|
|
9525
9809
|
},
|
|
9526
9810
|
[actionEvent, eventBus, onAction]
|
|
9527
9811
|
);
|
|
9528
|
-
const handleRelease =
|
|
9812
|
+
const handleRelease = React90.useCallback(
|
|
9529
9813
|
(id) => {
|
|
9530
9814
|
setActiveButtons((prev) => {
|
|
9531
9815
|
const next = new Set(prev);
|
|
@@ -9710,7 +9994,7 @@ function InventoryGrid({
|
|
|
9710
9994
|
const eventBus = useEventBus();
|
|
9711
9995
|
const slotCount = totalSlots ?? items.length;
|
|
9712
9996
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
9713
|
-
const handleSelect =
|
|
9997
|
+
const handleSelect = React90.useCallback(
|
|
9714
9998
|
(id) => {
|
|
9715
9999
|
onSelect?.(id);
|
|
9716
10000
|
if (selectEvent) {
|
|
@@ -9834,7 +10118,7 @@ function CraftingRecipe({
|
|
|
9834
10118
|
className
|
|
9835
10119
|
}) {
|
|
9836
10120
|
const eventBus = useEventBus();
|
|
9837
|
-
const handleCraft =
|
|
10121
|
+
const handleCraft = React90.useCallback(() => {
|
|
9838
10122
|
onCraft?.();
|
|
9839
10123
|
if (craftEvent) {
|
|
9840
10124
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -9851,7 +10135,7 @@ function CraftingRecipe({
|
|
|
9851
10135
|
children: [
|
|
9852
10136
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
9853
10137
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
9854
|
-
return /* @__PURE__ */ jsxs(
|
|
10138
|
+
return /* @__PURE__ */ jsxs(React90.Fragment, { children: [
|
|
9855
10139
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
9856
10140
|
ItemSlot,
|
|
9857
10141
|
{
|
|
@@ -9953,15 +10237,15 @@ function GameCanvas2D({
|
|
|
9953
10237
|
fps = 60,
|
|
9954
10238
|
className
|
|
9955
10239
|
}) {
|
|
9956
|
-
const canvasRef =
|
|
9957
|
-
const rafRef =
|
|
9958
|
-
const frameRef =
|
|
9959
|
-
const lastTimeRef =
|
|
9960
|
-
const onDrawRef =
|
|
10240
|
+
const canvasRef = React90.useRef(null);
|
|
10241
|
+
const rafRef = React90.useRef(0);
|
|
10242
|
+
const frameRef = React90.useRef(0);
|
|
10243
|
+
const lastTimeRef = React90.useRef(0);
|
|
10244
|
+
const onDrawRef = React90.useRef(onDraw);
|
|
9961
10245
|
onDrawRef.current = onDraw;
|
|
9962
|
-
const onTickRef =
|
|
10246
|
+
const onTickRef = React90.useRef(onTick);
|
|
9963
10247
|
onTickRef.current = onTick;
|
|
9964
|
-
|
|
10248
|
+
React90.useEffect(() => {
|
|
9965
10249
|
const canvas = canvasRef.current;
|
|
9966
10250
|
if (!canvas) return;
|
|
9967
10251
|
const ctx = canvas.getContext("2d");
|
|
@@ -10214,7 +10498,7 @@ function TurnPanel({
|
|
|
10214
10498
|
className
|
|
10215
10499
|
}) {
|
|
10216
10500
|
const eventBus = useEventBus();
|
|
10217
|
-
const handleAction =
|
|
10501
|
+
const handleAction = React90.useCallback(
|
|
10218
10502
|
(event) => {
|
|
10219
10503
|
if (event) {
|
|
10220
10504
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -10339,7 +10623,7 @@ function UnitCommandBar({
|
|
|
10339
10623
|
className
|
|
10340
10624
|
}) {
|
|
10341
10625
|
const eventBus = useEventBus();
|
|
10342
|
-
const handleCommand =
|
|
10626
|
+
const handleCommand = React90.useCallback(
|
|
10343
10627
|
(event) => {
|
|
10344
10628
|
if (event) {
|
|
10345
10629
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -10878,7 +11162,7 @@ function GameMenu({
|
|
|
10878
11162
|
} catch {
|
|
10879
11163
|
}
|
|
10880
11164
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
10881
|
-
const handleOptionClick =
|
|
11165
|
+
const handleOptionClick = React90.useCallback(
|
|
10882
11166
|
(option) => {
|
|
10883
11167
|
if (option.event && eventBus) {
|
|
10884
11168
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -11001,7 +11285,7 @@ function GameOverScreen({
|
|
|
11001
11285
|
} catch {
|
|
11002
11286
|
}
|
|
11003
11287
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
11004
|
-
const handleActionClick =
|
|
11288
|
+
const handleActionClick = React90.useCallback(
|
|
11005
11289
|
(action) => {
|
|
11006
11290
|
if (action.event && eventBus) {
|
|
11007
11291
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -13817,7 +14101,7 @@ var DataList = ({
|
|
|
13817
14101
|
}) => {
|
|
13818
14102
|
const eventBus = useEventBus();
|
|
13819
14103
|
const { t } = useTranslate();
|
|
13820
|
-
const [visibleCount, setVisibleCount] =
|
|
14104
|
+
const [visibleCount, setVisibleCount] = React90__default.useState(pageSize || Infinity);
|
|
13821
14105
|
const fields = fieldsProp ?? columnsProp ?? [];
|
|
13822
14106
|
const allData = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
13823
14107
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
@@ -13854,7 +14138,7 @@ var DataList = ({
|
|
|
13854
14138
|
const items2 = data.map((item) => item);
|
|
13855
14139
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
13856
14140
|
const contentField = titleField?.name ?? fields[0]?.name ?? "";
|
|
13857
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
14141
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React90__default.Fragment, { children: [
|
|
13858
14142
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
13859
14143
|
group.items.map((itemData, index) => {
|
|
13860
14144
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -14057,7 +14341,7 @@ var DataList = ({
|
|
|
14057
14341
|
className
|
|
14058
14342
|
),
|
|
14059
14343
|
children: [
|
|
14060
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
14344
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React90__default.Fragment, { children: [
|
|
14061
14345
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
14062
14346
|
group.items.map(
|
|
14063
14347
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -15113,18 +15397,14 @@ var InstallBox = ({
|
|
|
15113
15397
|
/* @__PURE__ */ jsx(
|
|
15114
15398
|
Box,
|
|
15115
15399
|
{
|
|
15116
|
-
className:
|
|
15117
|
-
"bg-foreground",
|
|
15118
|
-
"rounded-md",
|
|
15119
|
-
"border-[length:var(--border-width)] border-border"
|
|
15120
|
-
),
|
|
15400
|
+
className: "bg-surface rounded-md border-[length:var(--border-width)] border-border",
|
|
15121
15401
|
padding: "md",
|
|
15122
|
-
children: /* @__PURE__ */ jsxs(
|
|
15402
|
+
children: /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-3", children: [
|
|
15123
15403
|
/* @__PURE__ */ jsx(
|
|
15124
15404
|
Typography,
|
|
15125
15405
|
{
|
|
15126
15406
|
variant: "body2",
|
|
15127
|
-
className: "font-mono flex-1 min-w-0
|
|
15407
|
+
className: "font-mono flex-1 min-w-0 select-all",
|
|
15128
15408
|
truncate: true,
|
|
15129
15409
|
children: command
|
|
15130
15410
|
}
|
|
@@ -15133,10 +15413,12 @@ var InstallBox = ({
|
|
|
15133
15413
|
Button,
|
|
15134
15414
|
{
|
|
15135
15415
|
variant: "ghost",
|
|
15136
|
-
size: "
|
|
15416
|
+
size: "sm",
|
|
15417
|
+
leftIcon: copied ? "check" : "copy",
|
|
15137
15418
|
onClick: handleCopy,
|
|
15138
|
-
className: "flex-shrink-0
|
|
15139
|
-
|
|
15419
|
+
className: "flex-shrink-0",
|
|
15420
|
+
"aria-label": copied ? "Copied" : "Copy to clipboard",
|
|
15421
|
+
children: copied ? "Copied" : "Copy"
|
|
15140
15422
|
}
|
|
15141
15423
|
)
|
|
15142
15424
|
] })
|
|
@@ -15791,7 +16073,7 @@ var StepFlow = ({
|
|
|
15791
16073
|
className
|
|
15792
16074
|
}) => {
|
|
15793
16075
|
if (orientation === "vertical") {
|
|
15794
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
16076
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React90__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
15795
16077
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
15796
16078
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
15797
16079
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -15802,7 +16084,7 @@ var StepFlow = ({
|
|
|
15802
16084
|
] })
|
|
15803
16085
|
] }) }, index)) });
|
|
15804
16086
|
}
|
|
15805
|
-
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(
|
|
16087
|
+
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(React90__default.Fragment, { children: [
|
|
15806
16088
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
15807
16089
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
15808
16090
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -16969,7 +17251,7 @@ var StatCard = ({
|
|
|
16969
17251
|
const labelToUse = propLabel ?? propTitle;
|
|
16970
17252
|
const eventBus = useEventBus();
|
|
16971
17253
|
const { t } = useTranslate();
|
|
16972
|
-
const handleActionClick =
|
|
17254
|
+
const handleActionClick = React90__default.useCallback(() => {
|
|
16973
17255
|
if (action?.event) {
|
|
16974
17256
|
eventBus.emit(`UI:${action.event}`, {});
|
|
16975
17257
|
}
|
|
@@ -16980,7 +17262,7 @@ var StatCard = ({
|
|
|
16980
17262
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
16981
17263
|
const isLoading = externalLoading ?? false;
|
|
16982
17264
|
const error = externalError;
|
|
16983
|
-
const computeMetricValue =
|
|
17265
|
+
const computeMetricValue = React90__default.useCallback(
|
|
16984
17266
|
(metric, items) => {
|
|
16985
17267
|
if (metric.value !== void 0) {
|
|
16986
17268
|
return metric.value;
|
|
@@ -17019,7 +17301,7 @@ var StatCard = ({
|
|
|
17019
17301
|
},
|
|
17020
17302
|
[]
|
|
17021
17303
|
);
|
|
17022
|
-
const schemaStats =
|
|
17304
|
+
const schemaStats = React90__default.useMemo(() => {
|
|
17023
17305
|
if (!metrics || metrics.length === 0) return null;
|
|
17024
17306
|
return metrics.map((metric) => ({
|
|
17025
17307
|
label: metric.label,
|
|
@@ -17027,7 +17309,7 @@ var StatCard = ({
|
|
|
17027
17309
|
format: metric.format
|
|
17028
17310
|
}));
|
|
17029
17311
|
}, [metrics, data, computeMetricValue]);
|
|
17030
|
-
const calculatedTrend =
|
|
17312
|
+
const calculatedTrend = React90__default.useMemo(() => {
|
|
17031
17313
|
if (manualTrend !== void 0) return manualTrend;
|
|
17032
17314
|
if (previousValue === void 0 || currentValue === void 0)
|
|
17033
17315
|
return void 0;
|
|
@@ -17191,7 +17473,7 @@ var PageHeader = ({
|
|
|
17191
17473
|
info: "bg-info/10 text-info"
|
|
17192
17474
|
};
|
|
17193
17475
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
17194
|
-
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(
|
|
17476
|
+
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(React90__default.Fragment, { children: [
|
|
17195
17477
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
17196
17478
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
17197
17479
|
"a",
|
|
@@ -17717,7 +17999,7 @@ var FormSection = ({
|
|
|
17717
17999
|
columns = 1,
|
|
17718
18000
|
className
|
|
17719
18001
|
}) => {
|
|
17720
|
-
const [collapsed, setCollapsed] =
|
|
18002
|
+
const [collapsed, setCollapsed] = React90__default.useState(defaultCollapsed);
|
|
17721
18003
|
const { t } = useTranslate();
|
|
17722
18004
|
const eventBus = useEventBus();
|
|
17723
18005
|
const gridClass = {
|
|
@@ -17725,7 +18007,7 @@ var FormSection = ({
|
|
|
17725
18007
|
2: "grid-cols-1 md:grid-cols-2",
|
|
17726
18008
|
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
17727
18009
|
}[columns];
|
|
17728
|
-
|
|
18010
|
+
React90__default.useCallback(() => {
|
|
17729
18011
|
if (collapsible) {
|
|
17730
18012
|
setCollapsed((prev) => !prev);
|
|
17731
18013
|
eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
|
|
@@ -17937,7 +18219,7 @@ var Form = ({
|
|
|
17937
18219
|
const normalizedInitialData = initialData ?? {};
|
|
17938
18220
|
const resolvedEntity = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
17939
18221
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
17940
|
-
const entityDerivedFields =
|
|
18222
|
+
const entityDerivedFields = React90__default.useMemo(() => {
|
|
17941
18223
|
if (fields && fields.length > 0) return void 0;
|
|
17942
18224
|
if (!resolvedEntity) return void 0;
|
|
17943
18225
|
return resolvedEntity.fields.map(
|
|
@@ -17956,14 +18238,14 @@ var Form = ({
|
|
|
17956
18238
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
17957
18239
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
17958
18240
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
17959
|
-
const [formData, setFormData] =
|
|
18241
|
+
const [formData, setFormData] = React90__default.useState(
|
|
17960
18242
|
normalizedInitialData
|
|
17961
18243
|
);
|
|
17962
|
-
const [collapsedSections, setCollapsedSections] =
|
|
18244
|
+
const [collapsedSections, setCollapsedSections] = React90__default.useState(
|
|
17963
18245
|
/* @__PURE__ */ new Set()
|
|
17964
18246
|
);
|
|
17965
18247
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
17966
|
-
const evalContext =
|
|
18248
|
+
const evalContext = React90__default.useMemo(
|
|
17967
18249
|
() => ({
|
|
17968
18250
|
formValues: formData,
|
|
17969
18251
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -17972,13 +18254,13 @@ var Form = ({
|
|
|
17972
18254
|
}),
|
|
17973
18255
|
[formData, externalContext]
|
|
17974
18256
|
);
|
|
17975
|
-
|
|
18257
|
+
React90__default.useEffect(() => {
|
|
17976
18258
|
const data = initialData;
|
|
17977
18259
|
if (data && Object.keys(data).length > 0) {
|
|
17978
18260
|
setFormData(data);
|
|
17979
18261
|
}
|
|
17980
18262
|
}, [initialData]);
|
|
17981
|
-
const processCalculations =
|
|
18263
|
+
const processCalculations = React90__default.useCallback(
|
|
17982
18264
|
(changedFieldId, newFormData) => {
|
|
17983
18265
|
if (!hiddenCalculations.length) return;
|
|
17984
18266
|
const context = {
|
|
@@ -18003,7 +18285,7 @@ var Form = ({
|
|
|
18003
18285
|
},
|
|
18004
18286
|
[hiddenCalculations, externalContext, eventBus]
|
|
18005
18287
|
);
|
|
18006
|
-
const checkViolations =
|
|
18288
|
+
const checkViolations = React90__default.useCallback(
|
|
18007
18289
|
(changedFieldId, newFormData) => {
|
|
18008
18290
|
if (!violationTriggers.length) return;
|
|
18009
18291
|
const context = {
|
|
@@ -18040,7 +18322,7 @@ var Form = ({
|
|
|
18040
18322
|
processCalculations(name, newFormData);
|
|
18041
18323
|
checkViolations(name, newFormData);
|
|
18042
18324
|
};
|
|
18043
|
-
const isFieldVisible =
|
|
18325
|
+
const isFieldVisible = React90__default.useCallback(
|
|
18044
18326
|
(fieldName) => {
|
|
18045
18327
|
const condition = conditionalFields[fieldName];
|
|
18046
18328
|
if (!condition) return true;
|
|
@@ -18048,7 +18330,7 @@ var Form = ({
|
|
|
18048
18330
|
},
|
|
18049
18331
|
[conditionalFields, evalContext]
|
|
18050
18332
|
);
|
|
18051
|
-
const isSectionVisible =
|
|
18333
|
+
const isSectionVisible = React90__default.useCallback(
|
|
18052
18334
|
(section) => {
|
|
18053
18335
|
if (!section.condition) return true;
|
|
18054
18336
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -18080,7 +18362,7 @@ var Form = ({
|
|
|
18080
18362
|
eventBus.emit(`UI:${onCancel}`);
|
|
18081
18363
|
}
|
|
18082
18364
|
};
|
|
18083
|
-
const renderField =
|
|
18365
|
+
const renderField = React90__default.useCallback(
|
|
18084
18366
|
(field) => {
|
|
18085
18367
|
const fieldName = field.name || field.field;
|
|
18086
18368
|
if (!fieldName) return null;
|
|
@@ -18101,7 +18383,7 @@ var Form = ({
|
|
|
18101
18383
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
18102
18384
|
);
|
|
18103
18385
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
18104
|
-
const normalizedFields =
|
|
18386
|
+
const normalizedFields = React90__default.useMemo(() => {
|
|
18105
18387
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
18106
18388
|
return effectiveFields.map((field) => {
|
|
18107
18389
|
if (typeof field === "string") {
|
|
@@ -18123,7 +18405,7 @@ var Form = ({
|
|
|
18123
18405
|
return field;
|
|
18124
18406
|
});
|
|
18125
18407
|
}, [effectiveFields, resolvedEntity]);
|
|
18126
|
-
const schemaFields =
|
|
18408
|
+
const schemaFields = React90__default.useMemo(() => {
|
|
18127
18409
|
if (normalizedFields.length === 0) return null;
|
|
18128
18410
|
if (isDebugEnabled()) {
|
|
18129
18411
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -18133,7 +18415,7 @@ var Form = ({
|
|
|
18133
18415
|
}
|
|
18134
18416
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
18135
18417
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
18136
|
-
const sectionElements =
|
|
18418
|
+
const sectionElements = React90__default.useMemo(() => {
|
|
18137
18419
|
if (!sections || sections.length === 0) return null;
|
|
18138
18420
|
return sections.map((section) => {
|
|
18139
18421
|
if (!isSectionVisible(section)) {
|
|
@@ -19258,7 +19540,7 @@ var List = ({
|
|
|
19258
19540
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
19259
19541
|
return [];
|
|
19260
19542
|
}, [entity]);
|
|
19261
|
-
const getItemActions =
|
|
19543
|
+
const getItemActions = React90__default.useCallback(
|
|
19262
19544
|
(item) => {
|
|
19263
19545
|
if (!itemActions) return [];
|
|
19264
19546
|
if (typeof itemActions === "function") {
|
|
@@ -20024,7 +20306,7 @@ var WizardContainer = ({
|
|
|
20024
20306
|
const isCompleted = index < currentStep;
|
|
20025
20307
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
20026
20308
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
20027
|
-
return /* @__PURE__ */ jsxs(
|
|
20309
|
+
return /* @__PURE__ */ jsxs(React90__default.Fragment, { children: [
|
|
20028
20310
|
/* @__PURE__ */ jsx(
|
|
20029
20311
|
Button,
|
|
20030
20312
|
{
|
|
@@ -21248,7 +21530,7 @@ var StateMachineView = ({
|
|
|
21248
21530
|
style: { top: title ? 30 : 0 },
|
|
21249
21531
|
children: [
|
|
21250
21532
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
21251
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
21533
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React90__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
21252
21534
|
StateNode,
|
|
21253
21535
|
{
|
|
21254
21536
|
state,
|
|
@@ -25694,7 +25976,7 @@ function LinearView({
|
|
|
25694
25976
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
25695
25977
|
const isDone = i < currentIdx;
|
|
25696
25978
|
const isCurrent = i === currentIdx;
|
|
25697
|
-
return /* @__PURE__ */ jsxs(
|
|
25979
|
+
return /* @__PURE__ */ jsxs(React90__default.Fragment, { children: [
|
|
25698
25980
|
i > 0 && /* @__PURE__ */ jsx(
|
|
25699
25981
|
Typography,
|
|
25700
25982
|
{
|
|
@@ -26348,7 +26630,7 @@ function SequenceBar({
|
|
|
26348
26630
|
onSlotRemove(index);
|
|
26349
26631
|
}, [onSlotRemove, playing]);
|
|
26350
26632
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
26351
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
26633
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React90__default.Fragment, { children: [
|
|
26352
26634
|
i > 0 && /* @__PURE__ */ jsx(
|
|
26353
26635
|
Typography,
|
|
26354
26636
|
{
|
|
@@ -28836,7 +29118,7 @@ function InputPattern({
|
|
|
28836
29118
|
className
|
|
28837
29119
|
}) {
|
|
28838
29120
|
const { emit } = useEventBus();
|
|
28839
|
-
const [localValue, setLocalValue] =
|
|
29121
|
+
const [localValue, setLocalValue] = React90__default.useState(value);
|
|
28840
29122
|
const handleChange = (e) => {
|
|
28841
29123
|
setLocalValue(e.target.value);
|
|
28842
29124
|
if (onChange) {
|
|
@@ -28873,7 +29155,7 @@ function TextareaPattern({
|
|
|
28873
29155
|
className
|
|
28874
29156
|
}) {
|
|
28875
29157
|
const { emit } = useEventBus();
|
|
28876
|
-
const [localValue, setLocalValue] =
|
|
29158
|
+
const [localValue, setLocalValue] = React90__default.useState(value);
|
|
28877
29159
|
const handleChange = (e) => {
|
|
28878
29160
|
setLocalValue(e.target.value);
|
|
28879
29161
|
if (onChange) {
|
|
@@ -28904,7 +29186,7 @@ function SelectPattern({
|
|
|
28904
29186
|
className
|
|
28905
29187
|
}) {
|
|
28906
29188
|
const { emit } = useEventBus();
|
|
28907
|
-
const [localValue, setLocalValue] =
|
|
29189
|
+
const [localValue, setLocalValue] = React90__default.useState(value);
|
|
28908
29190
|
const handleChange = (e) => {
|
|
28909
29191
|
setLocalValue(e.target.value);
|
|
28910
29192
|
if (onChange) {
|
|
@@ -28933,7 +29215,7 @@ function CheckboxPattern({
|
|
|
28933
29215
|
className
|
|
28934
29216
|
}) {
|
|
28935
29217
|
const { emit } = useEventBus();
|
|
28936
|
-
const [localChecked, setLocalChecked] =
|
|
29218
|
+
const [localChecked, setLocalChecked] = React90__default.useState(checked);
|
|
28937
29219
|
const handleChange = (e) => {
|
|
28938
29220
|
setLocalChecked(e.target.checked);
|
|
28939
29221
|
if (onChange) {
|
|
@@ -30815,7 +31097,7 @@ var DocumentViewer = ({
|
|
|
30815
31097
|
};
|
|
30816
31098
|
DocumentViewer.displayName = "DocumentViewer";
|
|
30817
31099
|
function extractTitle(children) {
|
|
30818
|
-
if (!
|
|
31100
|
+
if (!React90__default.isValidElement(children)) return void 0;
|
|
30819
31101
|
const props = children.props;
|
|
30820
31102
|
if (typeof props.title === "string") {
|
|
30821
31103
|
return props.title;
|
|
@@ -31413,7 +31695,7 @@ var MediaGallery = ({
|
|
|
31413
31695
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
31414
31696
|
);
|
|
31415
31697
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
31416
|
-
const items =
|
|
31698
|
+
const items = React90__default.useMemo(() => {
|
|
31417
31699
|
if (propItems) return propItems;
|
|
31418
31700
|
if (entityData.length === 0) return [];
|
|
31419
31701
|
return entityData.map((record, idx) => ({
|
|
@@ -31575,7 +31857,7 @@ var MediaGallery = ({
|
|
|
31575
31857
|
};
|
|
31576
31858
|
MediaGallery.displayName = "MediaGallery";
|
|
31577
31859
|
function extractTitle2(children) {
|
|
31578
|
-
if (!
|
|
31860
|
+
if (!React90__default.isValidElement(children)) return void 0;
|
|
31579
31861
|
const props = children.props;
|
|
31580
31862
|
if (typeof props.title === "string") {
|
|
31581
31863
|
return props.title;
|
|
@@ -31661,7 +31943,7 @@ function subscribeToDebugEvents(listener) {
|
|
|
31661
31943
|
|
|
31662
31944
|
// components/organisms/debug/hooks/useDebugData.ts
|
|
31663
31945
|
function useDebugData() {
|
|
31664
|
-
const [data, setData] =
|
|
31946
|
+
const [data, setData] = React90.useState(() => ({
|
|
31665
31947
|
traits: [],
|
|
31666
31948
|
ticks: [],
|
|
31667
31949
|
guards: [],
|
|
@@ -31675,7 +31957,7 @@ function useDebugData() {
|
|
|
31675
31957
|
},
|
|
31676
31958
|
lastUpdate: Date.now()
|
|
31677
31959
|
}));
|
|
31678
|
-
|
|
31960
|
+
React90.useEffect(() => {
|
|
31679
31961
|
const updateData = () => {
|
|
31680
31962
|
setData({
|
|
31681
31963
|
traits: getAllTraits(),
|
|
@@ -31944,15 +32226,15 @@ var TYPE_BADGES = {
|
|
|
31944
32226
|
state: { variant: "danger", icon: "\u{1F4CA}" }
|
|
31945
32227
|
};
|
|
31946
32228
|
function EventFlowTab({ events: events2 }) {
|
|
31947
|
-
const [filter, setFilter] =
|
|
31948
|
-
const containerRef =
|
|
31949
|
-
const [autoScroll, setAutoScroll] =
|
|
31950
|
-
|
|
32229
|
+
const [filter, setFilter] = React90.useState("all");
|
|
32230
|
+
const containerRef = React90.useRef(null);
|
|
32231
|
+
const [autoScroll, setAutoScroll] = React90.useState(true);
|
|
32232
|
+
React90.useEffect(() => {
|
|
31951
32233
|
if (autoScroll && containerRef.current) {
|
|
31952
32234
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
31953
32235
|
}
|
|
31954
32236
|
}, [events2.length, autoScroll]);
|
|
31955
|
-
const filteredEvents =
|
|
32237
|
+
const filteredEvents = React90.useMemo(() => {
|
|
31956
32238
|
if (filter === "all") return events2;
|
|
31957
32239
|
return events2.filter((e) => e.type === filter);
|
|
31958
32240
|
}, [events2, filter]);
|
|
@@ -32051,7 +32333,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
32051
32333
|
}
|
|
32052
32334
|
EventFlowTab.displayName = "EventFlowTab";
|
|
32053
32335
|
function GuardsPanel({ guards }) {
|
|
32054
|
-
const [filter, setFilter] =
|
|
32336
|
+
const [filter, setFilter] = React90.useState("all");
|
|
32055
32337
|
if (guards.length === 0) {
|
|
32056
32338
|
return /* @__PURE__ */ jsx(
|
|
32057
32339
|
EmptyState,
|
|
@@ -32064,7 +32346,7 @@ function GuardsPanel({ guards }) {
|
|
|
32064
32346
|
}
|
|
32065
32347
|
const passedCount = guards.filter((g) => g.result).length;
|
|
32066
32348
|
const failedCount = guards.length - passedCount;
|
|
32067
|
-
const filteredGuards =
|
|
32349
|
+
const filteredGuards = React90.useMemo(() => {
|
|
32068
32350
|
if (filter === "all") return guards;
|
|
32069
32351
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
32070
32352
|
return guards.filter((g) => !g.result);
|
|
@@ -32208,10 +32490,10 @@ function EffectBadge({ effect }) {
|
|
|
32208
32490
|
] });
|
|
32209
32491
|
}
|
|
32210
32492
|
function TransitionTimeline({ transitions }) {
|
|
32211
|
-
const containerRef =
|
|
32212
|
-
const [autoScroll, setAutoScroll] =
|
|
32213
|
-
const [expandedId, setExpandedId] =
|
|
32214
|
-
|
|
32493
|
+
const containerRef = React90.useRef(null);
|
|
32494
|
+
const [autoScroll, setAutoScroll] = React90.useState(true);
|
|
32495
|
+
const [expandedId, setExpandedId] = React90.useState(null);
|
|
32496
|
+
React90.useEffect(() => {
|
|
32215
32497
|
if (autoScroll && containerRef.current) {
|
|
32216
32498
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
32217
32499
|
}
|
|
@@ -32472,9 +32754,9 @@ function getAllEvents(traits2) {
|
|
|
32472
32754
|
}
|
|
32473
32755
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
32474
32756
|
const eventBus = useEventBus();
|
|
32475
|
-
const [log, setLog] =
|
|
32476
|
-
const prevStatesRef =
|
|
32477
|
-
|
|
32757
|
+
const [log, setLog] = React90.useState([]);
|
|
32758
|
+
const prevStatesRef = React90.useRef(/* @__PURE__ */ new Map());
|
|
32759
|
+
React90.useEffect(() => {
|
|
32478
32760
|
for (const trait of traits2) {
|
|
32479
32761
|
const prev = prevStatesRef.current.get(trait.id);
|
|
32480
32762
|
if (prev && prev !== trait.currentState) {
|
|
@@ -32557,10 +32839,10 @@ function RuntimeDebugger({
|
|
|
32557
32839
|
defaultTab,
|
|
32558
32840
|
schema
|
|
32559
32841
|
}) {
|
|
32560
|
-
const [isCollapsed, setIsCollapsed] =
|
|
32561
|
-
const [isVisible, setIsVisible] =
|
|
32842
|
+
const [isCollapsed, setIsCollapsed] = React90.useState(mode === "verify" ? true : defaultCollapsed);
|
|
32843
|
+
const [isVisible, setIsVisible] = React90.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
32562
32844
|
const debugData = useDebugData();
|
|
32563
|
-
|
|
32845
|
+
React90.useEffect(() => {
|
|
32564
32846
|
if (mode === "inline") return;
|
|
32565
32847
|
return onDebugToggle((enabled) => {
|
|
32566
32848
|
setIsVisible(enabled);
|
|
@@ -32569,7 +32851,7 @@ function RuntimeDebugger({
|
|
|
32569
32851
|
}
|
|
32570
32852
|
});
|
|
32571
32853
|
}, [mode]);
|
|
32572
|
-
|
|
32854
|
+
React90.useEffect(() => {
|
|
32573
32855
|
if (mode === "inline") return;
|
|
32574
32856
|
const handleKeyDown = (e) => {
|
|
32575
32857
|
if (e.key === "`" && isVisible) {
|
|
@@ -33016,7 +33298,7 @@ var Timeline = ({
|
|
|
33016
33298
|
}) => {
|
|
33017
33299
|
const { t } = useTranslate();
|
|
33018
33300
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
33019
|
-
const items =
|
|
33301
|
+
const items = React90__default.useMemo(() => {
|
|
33020
33302
|
if (propItems) return propItems;
|
|
33021
33303
|
if (entityData.length === 0) return [];
|
|
33022
33304
|
return entityData.map((record, idx) => {
|
|
@@ -33118,7 +33400,7 @@ var Timeline = ({
|
|
|
33118
33400
|
};
|
|
33119
33401
|
Timeline.displayName = "Timeline";
|
|
33120
33402
|
function extractToastProps(children) {
|
|
33121
|
-
if (!
|
|
33403
|
+
if (!React90__default.isValidElement(children)) {
|
|
33122
33404
|
if (typeof children === "string") {
|
|
33123
33405
|
return { message: children };
|
|
33124
33406
|
}
|
|
@@ -33149,7 +33431,7 @@ var ToastSlot = ({
|
|
|
33149
33431
|
eventBus.emit("UI:CLOSE");
|
|
33150
33432
|
};
|
|
33151
33433
|
if (!isVisible) return null;
|
|
33152
|
-
const isCustomContent =
|
|
33434
|
+
const isCustomContent = React90__default.isValidElement(children) && !message;
|
|
33153
33435
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
33154
33436
|
Toast,
|
|
33155
33437
|
{
|
|
@@ -33191,12 +33473,12 @@ WorldMapTemplate.displayName = "WorldMapTemplate";
|
|
|
33191
33473
|
|
|
33192
33474
|
// components/organisms/component-registry.generated.ts
|
|
33193
33475
|
function lazyThree(name, loader) {
|
|
33194
|
-
const Lazy =
|
|
33476
|
+
const Lazy = React90__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
33195
33477
|
function ThreeWrapper(props) {
|
|
33196
|
-
return
|
|
33197
|
-
|
|
33478
|
+
return React90__default.createElement(
|
|
33479
|
+
React90__default.Suspense,
|
|
33198
33480
|
{ fallback: null },
|
|
33199
|
-
|
|
33481
|
+
React90__default.createElement(Lazy, props)
|
|
33200
33482
|
);
|
|
33201
33483
|
}
|
|
33202
33484
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -33484,7 +33766,7 @@ function SuspenseConfigProvider({
|
|
|
33484
33766
|
config,
|
|
33485
33767
|
children
|
|
33486
33768
|
}) {
|
|
33487
|
-
return
|
|
33769
|
+
return React90__default.createElement(
|
|
33488
33770
|
SuspenseConfigContext.Provider,
|
|
33489
33771
|
{ value: config },
|
|
33490
33772
|
children
|
|
@@ -35867,7 +36149,7 @@ function EntityDataProvider({
|
|
|
35867
36149
|
adapter,
|
|
35868
36150
|
children
|
|
35869
36151
|
}) {
|
|
35870
|
-
return
|
|
36152
|
+
return React90__default.createElement(
|
|
35871
36153
|
EntityDataContext.Provider,
|
|
35872
36154
|
{ value: adapter },
|
|
35873
36155
|
children
|
|
@@ -36693,4 +36975,4 @@ function useGitHubBranches(owner, repo, enabled = true) {
|
|
|
36693
36975
|
});
|
|
36694
36976
|
}
|
|
36695
36977
|
|
|
36696
|
-
export { ALL_PRESETS, AR_BOOK_FIELDS, AboutPageTemplate, Accordion, ActionButton, ActionButtons, Card2 as ActionCard, ActionPalette, ActionTile, Alert, AnimatedCounter, ArticleSection, AuthLayout, Avatar, Badge, BattleBoard, BattleTemplate, BookChapterView, BookCoverPage, BookNavBar, BookTableOfContents, BookViewer, Box, Breadcrumb, BuilderBoard, Button, ButtonGroup, CTABanner, CalendarGrid, CanvasEffect, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, CaseStudyCard, CaseStudyOrganism, CastleBoard, CastleTemplate, Center, Chart, ChartLegend, Checkbox, ChoiceButton, ClassifierBoard, CodeBlock, CodeExample, CodeView, CodeViewer, CollapsibleSection, CombatLog, ComboCounter, CommunityLinks, ConditionalWrapper, ConfettiEffect, ConfirmDialog, Container, ContentRenderer, ContentSection, ControlButton, CounterTemplate, CraftingRecipe, DEFAULT_SLOTS, DIAMOND_TOP_Y, DPad, DamageNumber, DashboardGrid, DashboardLayout, DataGrid, DataList, DataTable, DateRangeSelector, DayCell, DebuggerBoard, DetailPanel, DialogueBox, DialogueBubble, Divider, DocumentViewer, StateMachineView as DomStateMachineVisualizer, Drawer, DrawerSlot, ENTITY_EVENTS, EdgeDecoration, EditorCheckbox, EditorSelect, EditorSlider, EditorTextInput, EditorToolbar, EmptyState, EnemyPlate, EntityDataProvider, EntityDisplayEvents, ErrorBoundary, ErrorState, EventHandlerBoard, EventLog, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, FeatureCard, FeatureDetailPageTemplate, FeatureGrid, FeatureGridOrganism, FilterGroup, Flex, FlipCard, FlipContainer, FloatingActionButton, Form, FormActions, FormField, FormLayout, FormSection, FormSectionHeader, GameAudioContext, GameAudioProvider, GameAudioToggle, GameCanvas2D, GameHud, GameMenu, GameOverScreen, GameShell, GameTemplate, GenericAppTemplate, GeometricPattern, GraphCanvas, GraphView, Grid, HStack, Header, Heading, HealthBar, HealthPanel, HeroOrganism, HeroSection, I18nProvider, IDENTITY_BOOK_FIELDS, Icon, InfiniteScrollSentinel, Input, InputGroup, InstallBox, InventoryGrid, InventoryPanel, IsometricCanvas, ItemSlot, JazariStateMachine, Label, LandingPageTemplate, LawReferenceTooltip, Lightbox, LineChart, List, LoadingState, MapView, MarkdownContent, MarketingStatCard, MasterDetail, MediaGallery, Menu, Meter, MiniMap, Modal, ModalSlot, Navigation, NegotiatorBoard, NotifyListener, NumberStepper, ObjectRulePanel, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, Overlay, PageHeader, Pagination, PatternTile, PhysicsManager, PlatformerCanvas, Popover, PowerupSlots, PricingCard, PricingGrid, PricingOrganism, PricingPageTemplate, ProgressBar, ProgressDots, PullToRefresh, QuestTracker, QuizBlock, Radio, RangeSlider, RelationSelect, RepeatableFormSection, ResourceBar, ResourceCounter, RuleEditor, RuntimeDebugger, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, ScaledDiagram, ScoreBoard, ScoreDisplay, SearchInput, Section, SectionHeader, Select, SequenceBar, SequencerBoard, ServiceCatalog, ShowcaseCard, ShowcaseOrganism, SidePanel, Sidebar, SignaturePad, SimpleGrid, SimulationCanvas, SimulationControls, SimulationGraph, SimulatorBoard, Skeleton, SlotContentRenderer, SocialProof, SortableList, Spacer, Spinner, Split, SplitPane, SplitSection, Sprite, Stack, StarRating, StatBadge, StatCard, StatDisplay, StateArchitectBoard, StateIndicator, StateMachineView, StateNode2 as StateNode, StatsGrid, StatsOrganism, StatusBar, StatusDot, StatusEffect, StepFlow, StepFlowOrganism, SwipeableRow, Switch, TERRAIN_COLORS, TILE_HEIGHT, TILE_WIDTH, TabbedContainer, Table, Tabs, TagCloud, TeamCard, TeamOrganism, TerrainPalette, Text, TextHighlight, Textarea, ThemeSelector, ThemeToggle, TimeSlotCell, Timeline, TimerDisplay, Toast, ToastSlot, Tooltip, TraitSlot, TraitStateViewer, TransitionArrow, TrendIndicator, TurnIndicator, TurnPanel, TypewriterText, Typography, UISlotComponent, UISlotRenderer, UncontrolledBattleBoard, UnitCommandBar, UploadDropZone, VStack, VariablePanel, ViolationAlert, WaypointMarker, WizardContainer, WizardNavigation, WizardProgress, WorldMapBoard, WorldMapTemplate, XPBar, applyTemporaryEffect, calculateAttackTargets, calculateDamage, calculateValidMoves, clearEntities, cn, combatAnimations, combatClasses, combatEffects, createInitialGameState, createTranslate, createUnitAnimationState, drawSprite, entityDataKeys, generateCombatMessage, getAllEntities, getByType, getCurrentFrame, getEntity, getSingleton, getTileDimensions, inferDirection, isoToScreen, mapBookData, parseQueryBinding, pendulum, projectileMotion, removeEntity, resolveFieldMap, resolveFrame, resolveSheetDirection, screenToIso, spawnEntity, springOscillator, tickAnimationState, transitionAnimation, updateEntity, updateSingleton, useAgentChat, useAuthContext, useBattleState, useCamera, useCompile, useConnectGitHub, useCreateEntity, useDeepAgentGeneration, useDeleteEntity, useDisconnectGitHub, useDragReorder, useEmitEvent, useEntities, useEntitiesByType, useEntity, useEntity2 as useEntityById, useEntityDataAdapter, useEntityDetail, useEntityList, useEntityListSuspense, useEntityMutations, useEntitySuspense, useEventBus, useEventListener, useExtensions, useFileEditor, useFileSystem, useGameAudio, useGameAudioContext, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useImageCache, useInfiniteScroll, useInput, useLongPress, useOrbitalHistory, useOrbitalMutations, usePhysics, usePhysics2D, usePinchZoom, usePlayer, usePreview, usePullToRefresh, useQuerySingleton, useResolvedEntity, useSelectedEntity, useSendOrbitalEvent, useSingletonEntity, useSpriteAnimations, useSwipeGesture, useTranslate, useUIEvents, useUISlotManager, useUpdateEntity, useValidation };
|
|
36978
|
+
export { ALL_PRESETS, AR_BOOK_FIELDS, AboutPageTemplate, Accordion, ActionButton, ActionButtons, Card2 as ActionCard, ActionPalette, ActionTile, Alert, AnimatedCounter, AnimatedGraphic, AnimatedReveal, ArticleSection, AuthLayout, Avatar, Badge, BattleBoard, BattleTemplate, BookChapterView, BookCoverPage, BookNavBar, BookTableOfContents, BookViewer, Box, Breadcrumb, BuilderBoard, Button, ButtonGroup, CTABanner, CalendarGrid, CanvasEffect, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, CaseStudyCard, CaseStudyOrganism, CastleBoard, CastleTemplate, Center, Chart, ChartLegend, Checkbox, ChoiceButton, ClassifierBoard, CodeBlock, CodeExample, CodeView, CodeViewer, CollapsibleSection, CombatLog, ComboCounter, CommunityLinks, ConditionalWrapper, ConfettiEffect, ConfirmDialog, Container, ContentRenderer, ContentSection, ControlButton, CounterTemplate, CraftingRecipe, DEFAULT_SLOTS, DIAMOND_TOP_Y, DPad, DamageNumber, DashboardGrid, DashboardLayout, DataGrid, DataList, DataTable, DateRangeSelector, DayCell, DebuggerBoard, DetailPanel, DialogueBox, DialogueBubble, Divider, DocumentViewer, StateMachineView as DomStateMachineVisualizer, Drawer, DrawerSlot, ENTITY_EVENTS, EdgeDecoration, EditorCheckbox, EditorSelect, EditorSlider, EditorTextInput, EditorToolbar, EmptyState, EnemyPlate, EntityDataProvider, EntityDisplayEvents, ErrorBoundary, ErrorState, EventHandlerBoard, EventLog, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, FeatureCard, FeatureDetailPageTemplate, FeatureGrid, FeatureGridOrganism, FilterGroup, Flex, FlipCard, FlipContainer, FloatingActionButton, Form, FormActions, FormField, FormLayout, FormSection, FormSectionHeader, GameAudioContext, GameAudioProvider, GameAudioToggle, GameCanvas2D, GameHud, GameMenu, GameOverScreen, GameShell, GameTemplate, GenericAppTemplate, GeometricPattern, GraphCanvas, GraphView, Grid, HStack, Header, Heading, HealthBar, HealthPanel, HeroOrganism, HeroSection, I18nProvider, IDENTITY_BOOK_FIELDS, Icon, InfiniteScrollSentinel, Input, InputGroup, InstallBox, InventoryGrid, InventoryPanel, IsometricCanvas, ItemSlot, JazariStateMachine, Label, LandingPageTemplate, LawReferenceTooltip, Lightbox, LineChart, List, LoadingState, MapView, MarkdownContent, MarketingStatCard, MasterDetail, MediaGallery, Menu, Meter, MiniMap, Modal, ModalSlot, Navigation, NegotiatorBoard, NotifyListener, NumberStepper, ObjectRulePanel, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, Overlay, PageHeader, Pagination, PatternTile, PhysicsManager, PlatformerCanvas, Popover, PowerupSlots, PricingCard, PricingGrid, PricingOrganism, PricingPageTemplate, ProgressBar, ProgressDots, PullToRefresh, QuestTracker, QuizBlock, Radio, RangeSlider, RelationSelect, RepeatableFormSection, ResourceBar, ResourceCounter, RuleEditor, RuntimeDebugger, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, ScaledDiagram, ScoreBoard, ScoreDisplay, SearchInput, Section, SectionHeader, Select, SequenceBar, SequencerBoard, ServiceCatalog, ShowcaseCard, ShowcaseOrganism, SidePanel, Sidebar, SignaturePad, SimpleGrid, SimulationCanvas, SimulationControls, SimulationGraph, SimulatorBoard, Skeleton, SlotContentRenderer, SocialProof, SortableList, Spacer, Spinner, Split, SplitPane, SplitSection, Sprite, Stack, StarRating, StatBadge, StatCard, StatDisplay, StateArchitectBoard, StateIndicator, StateMachineView, StateNode2 as StateNode, StatsGrid, StatsOrganism, StatusBar, StatusDot, StatusEffect, StepFlow, StepFlowOrganism, SwipeableRow, Switch, TERRAIN_COLORS, TILE_HEIGHT, TILE_WIDTH, TabbedContainer, Table, Tabs, TagCloud, TeamCard, TeamOrganism, TerrainPalette, Text, TextHighlight, Textarea, ThemeSelector, ThemeToggle, TimeSlotCell, Timeline, TimerDisplay, Toast, ToastSlot, Tooltip, TraitSlot, TraitStateViewer, TransitionArrow, TrendIndicator, TurnIndicator, TurnPanel, TypewriterText, Typography, UISlotComponent, UISlotRenderer, UncontrolledBattleBoard, UnitCommandBar, UploadDropZone, VStack, VariablePanel, ViolationAlert, WaypointMarker, WizardContainer, WizardNavigation, WizardProgress, WorldMapBoard, WorldMapTemplate, XPBar, applyTemporaryEffect, calculateAttackTargets, calculateDamage, calculateValidMoves, clearEntities, cn, combatAnimations, combatClasses, combatEffects, createInitialGameState, createTranslate, createUnitAnimationState, drawSprite, entityDataKeys, generateCombatMessage, getAllEntities, getByType, getCurrentFrame, getEntity, getSingleton, getTileDimensions, inferDirection, isoToScreen, mapBookData, parseQueryBinding, pendulum, projectileMotion, removeEntity, resolveFieldMap, resolveFrame, resolveSheetDirection, screenToIso, spawnEntity, springOscillator, tickAnimationState, transitionAnimation, updateEntity, updateSingleton, useAgentChat, useAuthContext, useBattleState, useCamera, useCompile, useConnectGitHub, useCreateEntity, useDeepAgentGeneration, useDeleteEntity, useDisconnectGitHub, useDragReorder, useEmitEvent, useEntities, useEntitiesByType, useEntity, useEntity2 as useEntityById, useEntityDataAdapter, useEntityDetail, useEntityList, useEntityListSuspense, useEntityMutations, useEntitySuspense, useEventBus, useEventListener, useExtensions, useFileEditor, useFileSystem, useGameAudio, useGameAudioContext, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useImageCache, useInfiniteScroll, useInput, useLongPress, useOrbitalHistory, useOrbitalMutations, usePhysics, usePhysics2D, usePinchZoom, usePlayer, usePreview, usePullToRefresh, useQuerySingleton, useResolvedEntity, useSelectedEntity, useSendOrbitalEvent, useSingletonEntity, useSpriteAnimations, useSwipeGesture, useTranslate, useUIEvents, useUISlotManager, useUpdateEntity, useValidation };
|