@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/runtime/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React116 from 'react';
|
|
2
|
+
import React116__default, { createContext, useCallback, useState, useRef, useEffect, useLayoutEffect, lazy, useContext, useMemo, Suspense, useId } from 'react';
|
|
3
3
|
import { EventBusContext } from '@almadar/ui/providers';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import '@tanstack/react-query';
|
|
@@ -1585,7 +1585,7 @@ var positionStyles = {
|
|
|
1585
1585
|
fixed: "fixed",
|
|
1586
1586
|
sticky: "sticky"
|
|
1587
1587
|
};
|
|
1588
|
-
var Box =
|
|
1588
|
+
var Box = React116__default.forwardRef(
|
|
1589
1589
|
({
|
|
1590
1590
|
padding,
|
|
1591
1591
|
paddingX,
|
|
@@ -2626,7 +2626,8 @@ var variantStyles2 = {
|
|
|
2626
2626
|
].join(" "),
|
|
2627
2627
|
ghost: [
|
|
2628
2628
|
"bg-transparent text-muted-foreground",
|
|
2629
|
-
"
|
|
2629
|
+
"border border-transparent",
|
|
2630
|
+
"hover:text-primary-foreground hover:bg-primary hover:border-primary",
|
|
2630
2631
|
"active:scale-[var(--active-scale)]"
|
|
2631
2632
|
].join(" "),
|
|
2632
2633
|
danger: [
|
|
@@ -2679,7 +2680,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
2679
2680
|
const IconComp = value;
|
|
2680
2681
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
2681
2682
|
}
|
|
2682
|
-
if (
|
|
2683
|
+
if (React116__default.isValidElement(value)) {
|
|
2683
2684
|
return value;
|
|
2684
2685
|
}
|
|
2685
2686
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -2688,7 +2689,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
2688
2689
|
}
|
|
2689
2690
|
return value;
|
|
2690
2691
|
}
|
|
2691
|
-
var Button =
|
|
2692
|
+
var Button = React116__default.forwardRef(
|
|
2692
2693
|
({
|
|
2693
2694
|
className,
|
|
2694
2695
|
variant = "primary",
|
|
@@ -2784,7 +2785,7 @@ var sizeStyles3 = {
|
|
|
2784
2785
|
md: "px-2.5 py-1 text-sm",
|
|
2785
2786
|
lg: "px-3 py-1.5 text-base"
|
|
2786
2787
|
};
|
|
2787
|
-
var Badge =
|
|
2788
|
+
var Badge = React116__default.forwardRef(
|
|
2788
2789
|
({ className, variant = "default", size = "sm", amount, label, icon, children, ...props }, ref) => {
|
|
2789
2790
|
const iconSizes2 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
|
|
2790
2791
|
const resolvedIcon = typeof icon === "string" ? (() => {
|
|
@@ -2907,7 +2908,7 @@ var Toast = ({
|
|
|
2907
2908
|
);
|
|
2908
2909
|
};
|
|
2909
2910
|
Toast.displayName = "Toast";
|
|
2910
|
-
var Input =
|
|
2911
|
+
var Input = React116__default.forwardRef(
|
|
2911
2912
|
({
|
|
2912
2913
|
className,
|
|
2913
2914
|
inputType,
|
|
@@ -3019,7 +3020,7 @@ var Input = React114__default.forwardRef(
|
|
|
3019
3020
|
}
|
|
3020
3021
|
);
|
|
3021
3022
|
Input.displayName = "Input";
|
|
3022
|
-
var Label =
|
|
3023
|
+
var Label = React116__default.forwardRef(
|
|
3023
3024
|
({ className, required, children, ...props }, ref) => {
|
|
3024
3025
|
return /* @__PURE__ */ jsxs(
|
|
3025
3026
|
"label",
|
|
@@ -3039,7 +3040,7 @@ var Label = React114__default.forwardRef(
|
|
|
3039
3040
|
}
|
|
3040
3041
|
);
|
|
3041
3042
|
Label.displayName = "Label";
|
|
3042
|
-
var Textarea =
|
|
3043
|
+
var Textarea = React116__default.forwardRef(
|
|
3043
3044
|
({ className, error, ...props }, ref) => {
|
|
3044
3045
|
return /* @__PURE__ */ jsx(
|
|
3045
3046
|
"textarea",
|
|
@@ -3062,7 +3063,7 @@ var Textarea = React114__default.forwardRef(
|
|
|
3062
3063
|
}
|
|
3063
3064
|
);
|
|
3064
3065
|
Textarea.displayName = "Textarea";
|
|
3065
|
-
var Select =
|
|
3066
|
+
var Select = React116__default.forwardRef(
|
|
3066
3067
|
({ className, options, placeholder, error, ...props }, ref) => {
|
|
3067
3068
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
3068
3069
|
/* @__PURE__ */ jsxs(
|
|
@@ -3098,7 +3099,7 @@ var Select = React114__default.forwardRef(
|
|
|
3098
3099
|
}
|
|
3099
3100
|
);
|
|
3100
3101
|
Select.displayName = "Select";
|
|
3101
|
-
var Checkbox =
|
|
3102
|
+
var Checkbox = React116__default.forwardRef(
|
|
3102
3103
|
({ className, label, id, ...props }, ref) => {
|
|
3103
3104
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
3104
3105
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
@@ -3174,7 +3175,7 @@ var shadowStyles2 = {
|
|
|
3174
3175
|
md: "shadow",
|
|
3175
3176
|
lg: "shadow-lg"
|
|
3176
3177
|
};
|
|
3177
|
-
var Card =
|
|
3178
|
+
var Card = React116__default.forwardRef(
|
|
3178
3179
|
({
|
|
3179
3180
|
className,
|
|
3180
3181
|
variant = "bordered",
|
|
@@ -3210,9 +3211,9 @@ var Card = React114__default.forwardRef(
|
|
|
3210
3211
|
}
|
|
3211
3212
|
);
|
|
3212
3213
|
Card.displayName = "Card";
|
|
3213
|
-
var CardHeader =
|
|
3214
|
+
var CardHeader = React116__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
3214
3215
|
CardHeader.displayName = "CardHeader";
|
|
3215
|
-
var CardTitle =
|
|
3216
|
+
var CardTitle = React116__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3216
3217
|
"h3",
|
|
3217
3218
|
{
|
|
3218
3219
|
ref,
|
|
@@ -3225,11 +3226,11 @@ var CardTitle = React114__default.forwardRef(({ className, ...props }, ref) => /
|
|
|
3225
3226
|
}
|
|
3226
3227
|
));
|
|
3227
3228
|
CardTitle.displayName = "CardTitle";
|
|
3228
|
-
var CardContent =
|
|
3229
|
+
var CardContent = React116__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
3229
3230
|
CardContent.displayName = "CardContent";
|
|
3230
3231
|
var CardBody = CardContent;
|
|
3231
3232
|
CardBody.displayName = "CardBody";
|
|
3232
|
-
var CardFooter =
|
|
3233
|
+
var CardFooter = React116__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3233
3234
|
"div",
|
|
3234
3235
|
{
|
|
3235
3236
|
ref,
|
|
@@ -3244,7 +3245,7 @@ var sizeStyles4 = {
|
|
|
3244
3245
|
md: "h-6 w-6",
|
|
3245
3246
|
lg: "h-8 w-8"
|
|
3246
3247
|
};
|
|
3247
|
-
var Spinner =
|
|
3248
|
+
var Spinner = React116__default.forwardRef(
|
|
3248
3249
|
({ className, size = "md", ...props }, ref) => {
|
|
3249
3250
|
return /* @__PURE__ */ jsx(
|
|
3250
3251
|
"div",
|
|
@@ -3660,7 +3661,7 @@ var ProgressBar = ({
|
|
|
3660
3661
|
return null;
|
|
3661
3662
|
};
|
|
3662
3663
|
ProgressBar.displayName = "ProgressBar";
|
|
3663
|
-
var Radio =
|
|
3664
|
+
var Radio = React116__default.forwardRef(
|
|
3664
3665
|
({
|
|
3665
3666
|
label,
|
|
3666
3667
|
helperText,
|
|
@@ -3764,7 +3765,7 @@ var Radio = React114__default.forwardRef(
|
|
|
3764
3765
|
}
|
|
3765
3766
|
);
|
|
3766
3767
|
Radio.displayName = "Radio";
|
|
3767
|
-
var Switch =
|
|
3768
|
+
var Switch = React116.forwardRef(
|
|
3768
3769
|
({
|
|
3769
3770
|
checked,
|
|
3770
3771
|
defaultChecked = false,
|
|
@@ -3775,10 +3776,10 @@ var Switch = React114.forwardRef(
|
|
|
3775
3776
|
name,
|
|
3776
3777
|
className
|
|
3777
3778
|
}, ref) => {
|
|
3778
|
-
const [isChecked, setIsChecked] =
|
|
3779
|
+
const [isChecked, setIsChecked] = React116.useState(
|
|
3779
3780
|
checked !== void 0 ? checked : defaultChecked
|
|
3780
3781
|
);
|
|
3781
|
-
|
|
3782
|
+
React116.useEffect(() => {
|
|
3782
3783
|
if (checked !== void 0) {
|
|
3783
3784
|
setIsChecked(checked);
|
|
3784
3785
|
}
|
|
@@ -4143,8 +4144,8 @@ var LawReferenceTooltip = ({
|
|
|
4143
4144
|
position = "top",
|
|
4144
4145
|
className
|
|
4145
4146
|
}) => {
|
|
4146
|
-
const [isVisible, setIsVisible] =
|
|
4147
|
-
const timeoutRef =
|
|
4147
|
+
const [isVisible, setIsVisible] = React116__default.useState(false);
|
|
4148
|
+
const timeoutRef = React116__default.useRef(null);
|
|
4148
4149
|
const handleMouseEnter = () => {
|
|
4149
4150
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4150
4151
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -4153,7 +4154,7 @@ var LawReferenceTooltip = ({
|
|
|
4153
4154
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4154
4155
|
setIsVisible(false);
|
|
4155
4156
|
};
|
|
4156
|
-
|
|
4157
|
+
React116__default.useEffect(() => {
|
|
4157
4158
|
return () => {
|
|
4158
4159
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4159
4160
|
};
|
|
@@ -4341,7 +4342,7 @@ var sizeStyles5 = {
|
|
|
4341
4342
|
md: "w-2.5 h-2.5",
|
|
4342
4343
|
lg: "w-3 h-3"
|
|
4343
4344
|
};
|
|
4344
|
-
var StatusDot =
|
|
4345
|
+
var StatusDot = React116__default.forwardRef(
|
|
4345
4346
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
4346
4347
|
return /* @__PURE__ */ jsx(
|
|
4347
4348
|
"span",
|
|
@@ -4388,7 +4389,7 @@ var iconMap2 = {
|
|
|
4388
4389
|
down: TrendingDown,
|
|
4389
4390
|
flat: ArrowRight
|
|
4390
4391
|
};
|
|
4391
|
-
var TrendIndicator =
|
|
4392
|
+
var TrendIndicator = React116__default.forwardRef(
|
|
4392
4393
|
({
|
|
4393
4394
|
className,
|
|
4394
4395
|
value,
|
|
@@ -4447,7 +4448,7 @@ var thumbSizes = {
|
|
|
4447
4448
|
md: "w-4 h-4",
|
|
4448
4449
|
lg: "w-5 h-5"
|
|
4449
4450
|
};
|
|
4450
|
-
var RangeSlider =
|
|
4451
|
+
var RangeSlider = React116__default.forwardRef(
|
|
4451
4452
|
({
|
|
4452
4453
|
className,
|
|
4453
4454
|
min = 0,
|
|
@@ -4898,7 +4899,7 @@ var paddingClasses = {
|
|
|
4898
4899
|
md: "py-16",
|
|
4899
4900
|
lg: "py-24"
|
|
4900
4901
|
};
|
|
4901
|
-
var ContentSection =
|
|
4902
|
+
var ContentSection = React116__default.forwardRef(
|
|
4902
4903
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
4903
4904
|
return /* @__PURE__ */ jsx(
|
|
4904
4905
|
Box,
|
|
@@ -4917,6 +4918,289 @@ var ContentSection = React114__default.forwardRef(
|
|
|
4917
4918
|
}
|
|
4918
4919
|
);
|
|
4919
4920
|
ContentSection.displayName = "ContentSection";
|
|
4921
|
+
var initialStyles = {
|
|
4922
|
+
"fade-up": { opacity: 0, transform: "translateY(24px)" },
|
|
4923
|
+
"fade-down": { opacity: 0, transform: "translateY(-24px)" },
|
|
4924
|
+
"fade-in": { opacity: 0 },
|
|
4925
|
+
"fade-left": { opacity: 0, transform: "translateX(24px)" },
|
|
4926
|
+
"fade-right": { opacity: 0, transform: "translateX(-24px)" },
|
|
4927
|
+
"scale": { opacity: 0, transform: "scale(0.92)" },
|
|
4928
|
+
"scale-up": { opacity: 0, transform: "scale(0.92) translateY(16px)" },
|
|
4929
|
+
"none": {}
|
|
4930
|
+
};
|
|
4931
|
+
var animatedStyles = {
|
|
4932
|
+
"fade-up": { opacity: 1, transform: "translateY(0)" },
|
|
4933
|
+
"fade-down": { opacity: 1, transform: "translateY(0)" },
|
|
4934
|
+
"fade-in": { opacity: 1 },
|
|
4935
|
+
"fade-left": { opacity: 1, transform: "translateX(0)" },
|
|
4936
|
+
"fade-right": { opacity: 1, transform: "translateX(0)" },
|
|
4937
|
+
"scale": { opacity: 1, transform: "scale(1)" },
|
|
4938
|
+
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
4939
|
+
"none": {}
|
|
4940
|
+
};
|
|
4941
|
+
var AnimatedReveal = React116__default.forwardRef(
|
|
4942
|
+
({
|
|
4943
|
+
trigger = "scroll",
|
|
4944
|
+
animation = "fade-up",
|
|
4945
|
+
duration = 600,
|
|
4946
|
+
delay = 0,
|
|
4947
|
+
threshold = 0.15,
|
|
4948
|
+
once = true,
|
|
4949
|
+
animate: manualAnimate,
|
|
4950
|
+
easing = "cubic-bezier(0.16, 1, 0.3, 1)",
|
|
4951
|
+
children,
|
|
4952
|
+
className,
|
|
4953
|
+
style,
|
|
4954
|
+
...props
|
|
4955
|
+
}, forwardedRef) => {
|
|
4956
|
+
const [isAnimated, setIsAnimated] = useState(false);
|
|
4957
|
+
const internalRef = useRef(null);
|
|
4958
|
+
const hasAnimated = useRef(false);
|
|
4959
|
+
const setRef = useCallback(
|
|
4960
|
+
(node) => {
|
|
4961
|
+
internalRef.current = node;
|
|
4962
|
+
if (typeof forwardedRef === "function") forwardedRef(node);
|
|
4963
|
+
else if (forwardedRef) forwardedRef.current = node;
|
|
4964
|
+
},
|
|
4965
|
+
[forwardedRef]
|
|
4966
|
+
);
|
|
4967
|
+
useEffect(() => {
|
|
4968
|
+
if (trigger !== "scroll") return;
|
|
4969
|
+
const el = internalRef.current;
|
|
4970
|
+
if (!el) return;
|
|
4971
|
+
const observer = new IntersectionObserver(
|
|
4972
|
+
([entry]) => {
|
|
4973
|
+
if (entry.isIntersecting) {
|
|
4974
|
+
if (once && hasAnimated.current) return;
|
|
4975
|
+
hasAnimated.current = true;
|
|
4976
|
+
setIsAnimated(true);
|
|
4977
|
+
} else if (!once) {
|
|
4978
|
+
setIsAnimated(false);
|
|
4979
|
+
}
|
|
4980
|
+
},
|
|
4981
|
+
{ threshold }
|
|
4982
|
+
);
|
|
4983
|
+
observer.observe(el);
|
|
4984
|
+
return () => observer.disconnect();
|
|
4985
|
+
}, [trigger, threshold, once]);
|
|
4986
|
+
const handleMouseEnter = trigger === "hover" ? () => setIsAnimated(true) : void 0;
|
|
4987
|
+
const handleMouseLeave = trigger === "hover" ? () => {
|
|
4988
|
+
if (!once || !hasAnimated.current) {
|
|
4989
|
+
hasAnimated.current = true;
|
|
4990
|
+
setIsAnimated(false);
|
|
4991
|
+
}
|
|
4992
|
+
} : void 0;
|
|
4993
|
+
useEffect(() => {
|
|
4994
|
+
if (trigger === "manual" && manualAnimate !== void 0) {
|
|
4995
|
+
setIsAnimated(manualAnimate);
|
|
4996
|
+
}
|
|
4997
|
+
}, [trigger, manualAnimate]);
|
|
4998
|
+
const active = isAnimated;
|
|
4999
|
+
const currentStyle = active ? animatedStyles[animation] : initialStyles[animation];
|
|
5000
|
+
return /* @__PURE__ */ jsx(
|
|
5001
|
+
"div",
|
|
5002
|
+
{
|
|
5003
|
+
ref: setRef,
|
|
5004
|
+
className: cn("will-change-[opacity,transform]", className),
|
|
5005
|
+
style: {
|
|
5006
|
+
...currentStyle,
|
|
5007
|
+
transitionProperty: "opacity, transform",
|
|
5008
|
+
transitionDuration: `${duration}ms`,
|
|
5009
|
+
transitionDelay: `${delay}ms`,
|
|
5010
|
+
transitionTimingFunction: easing,
|
|
5011
|
+
...style
|
|
5012
|
+
},
|
|
5013
|
+
onMouseEnter: handleMouseEnter,
|
|
5014
|
+
onMouseLeave: handleMouseLeave,
|
|
5015
|
+
...props,
|
|
5016
|
+
children: typeof children === "function" ? children(active) : children
|
|
5017
|
+
}
|
|
5018
|
+
);
|
|
5019
|
+
}
|
|
5020
|
+
);
|
|
5021
|
+
AnimatedReveal.displayName = "AnimatedReveal";
|
|
5022
|
+
function useFetchedSvg(src) {
|
|
5023
|
+
const [svg, setSvg] = useState(null);
|
|
5024
|
+
const cache = useRef({});
|
|
5025
|
+
useEffect(() => {
|
|
5026
|
+
if (!src) {
|
|
5027
|
+
setSvg(null);
|
|
5028
|
+
return;
|
|
5029
|
+
}
|
|
5030
|
+
if (cache.current[src]) {
|
|
5031
|
+
setSvg(cache.current[src]);
|
|
5032
|
+
return;
|
|
5033
|
+
}
|
|
5034
|
+
let cancelled = false;
|
|
5035
|
+
fetch(src).then((res) => {
|
|
5036
|
+
if (!res.ok) throw new Error(`Failed to fetch SVG: ${res.status}`);
|
|
5037
|
+
return res.text();
|
|
5038
|
+
}).then((text) => {
|
|
5039
|
+
if (cancelled) return;
|
|
5040
|
+
cache.current[src] = text;
|
|
5041
|
+
setSvg(text);
|
|
5042
|
+
}).catch(() => {
|
|
5043
|
+
if (!cancelled) setSvg(null);
|
|
5044
|
+
});
|
|
5045
|
+
return () => {
|
|
5046
|
+
cancelled = true;
|
|
5047
|
+
};
|
|
5048
|
+
}, [src]);
|
|
5049
|
+
return svg;
|
|
5050
|
+
}
|
|
5051
|
+
function applyDrawAnimation(container, animate, duration, delay, easing) {
|
|
5052
|
+
const paths = container.querySelectorAll("path, line, polyline, polygon, circle, ellipse, rect");
|
|
5053
|
+
paths.forEach((el) => {
|
|
5054
|
+
if ("getTotalLength" in el && typeof el.getTotalLength === "function") {
|
|
5055
|
+
const len = el.getTotalLength();
|
|
5056
|
+
el.style.strokeDasharray = `${len}`;
|
|
5057
|
+
el.style.strokeDashoffset = animate ? "0" : `${len}`;
|
|
5058
|
+
el.style.transition = `stroke-dashoffset ${duration}ms ${easing} ${delay}ms`;
|
|
5059
|
+
}
|
|
5060
|
+
});
|
|
5061
|
+
}
|
|
5062
|
+
function applyFillAnimation(container, animate, duration, delay, easing, fillColor) {
|
|
5063
|
+
const paths = container.querySelectorAll("path, circle, ellipse, rect, polygon");
|
|
5064
|
+
paths.forEach((el) => {
|
|
5065
|
+
if ("getTotalLength" in el && typeof el.getTotalLength === "function") {
|
|
5066
|
+
const geom = el;
|
|
5067
|
+
const len = geom.getTotalLength();
|
|
5068
|
+
geom.style.strokeDasharray = `${len}`;
|
|
5069
|
+
geom.style.strokeDashoffset = animate ? "0" : `${len}`;
|
|
5070
|
+
geom.style.transition = `stroke-dashoffset ${duration * 0.6}ms ${easing} ${delay}ms, fill-opacity ${duration * 0.4}ms ${easing} ${delay + duration * 0.6}ms`;
|
|
5071
|
+
}
|
|
5072
|
+
if (fillColor) el.style.fill = fillColor;
|
|
5073
|
+
el.style.fillOpacity = animate ? "1" : "0";
|
|
5074
|
+
});
|
|
5075
|
+
}
|
|
5076
|
+
function applyPulseAnimation(container, animate, duration) {
|
|
5077
|
+
const svg = container.querySelector("svg");
|
|
5078
|
+
if (!svg) return;
|
|
5079
|
+
if (animate) {
|
|
5080
|
+
svg.style.animation = `ag-pulse ${duration}ms ease-in-out infinite`;
|
|
5081
|
+
} else {
|
|
5082
|
+
svg.style.animation = "none";
|
|
5083
|
+
}
|
|
5084
|
+
}
|
|
5085
|
+
function applyMorphAnimation(container, animate, duration, delay, easing) {
|
|
5086
|
+
const paths = container.querySelectorAll("path, circle, ellipse, rect, polygon");
|
|
5087
|
+
paths.forEach((el) => {
|
|
5088
|
+
el.style.transition = `all ${duration}ms ${easing} ${delay}ms`;
|
|
5089
|
+
el.style.transform = animate ? "scale(1)" : "scale(0)";
|
|
5090
|
+
el.style.transformOrigin = "center";
|
|
5091
|
+
el.style.opacity = animate ? "1" : "0";
|
|
5092
|
+
});
|
|
5093
|
+
}
|
|
5094
|
+
var AnimatedGraphic = React116__default.forwardRef(
|
|
5095
|
+
({
|
|
5096
|
+
src,
|
|
5097
|
+
svgContent,
|
|
5098
|
+
animation = "draw",
|
|
5099
|
+
animate = false,
|
|
5100
|
+
duration = 1200,
|
|
5101
|
+
delay = 0,
|
|
5102
|
+
easing = "cubic-bezier(0.16, 1, 0.3, 1)",
|
|
5103
|
+
width,
|
|
5104
|
+
height,
|
|
5105
|
+
strokeColor,
|
|
5106
|
+
fillColor,
|
|
5107
|
+
alt,
|
|
5108
|
+
className,
|
|
5109
|
+
style,
|
|
5110
|
+
children,
|
|
5111
|
+
...props
|
|
5112
|
+
}, ref) => {
|
|
5113
|
+
const containerRef = useRef(null);
|
|
5114
|
+
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
5115
|
+
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
5116
|
+
const prevAnimateRef = useRef(animate);
|
|
5117
|
+
const setRef = React116__default.useCallback(
|
|
5118
|
+
(node) => {
|
|
5119
|
+
containerRef.current = node;
|
|
5120
|
+
if (typeof ref === "function") ref(node);
|
|
5121
|
+
else if (ref) ref.current = node;
|
|
5122
|
+
},
|
|
5123
|
+
[ref]
|
|
5124
|
+
);
|
|
5125
|
+
useEffect(() => {
|
|
5126
|
+
const el = containerRef.current;
|
|
5127
|
+
if (!el || !strokeColor) return;
|
|
5128
|
+
const paths = el.querySelectorAll("path, line, polyline, polygon, circle, ellipse, rect");
|
|
5129
|
+
paths.forEach((p2) => {
|
|
5130
|
+
p2.style.stroke = strokeColor;
|
|
5131
|
+
});
|
|
5132
|
+
}, [resolvedSvg, strokeColor]);
|
|
5133
|
+
useEffect(() => {
|
|
5134
|
+
const el = containerRef.current;
|
|
5135
|
+
if (!el || !resolvedSvg) return;
|
|
5136
|
+
if (animation === "draw" || animation === "fill") {
|
|
5137
|
+
const paths = el.querySelectorAll("path, line, polyline, polygon, circle, ellipse, rect");
|
|
5138
|
+
paths.forEach((p2) => {
|
|
5139
|
+
if ("getTotalLength" in p2 && typeof p2.getTotalLength === "function") {
|
|
5140
|
+
const len = p2.getTotalLength();
|
|
5141
|
+
p2.style.strokeDasharray = `${len}`;
|
|
5142
|
+
p2.style.strokeDashoffset = `${len}`;
|
|
5143
|
+
}
|
|
5144
|
+
if (animation === "fill") {
|
|
5145
|
+
p2.style.fillOpacity = "0";
|
|
5146
|
+
}
|
|
5147
|
+
});
|
|
5148
|
+
}
|
|
5149
|
+
if (animation === "morph") {
|
|
5150
|
+
const paths = el.querySelectorAll("path, circle, ellipse, rect, polygon");
|
|
5151
|
+
paths.forEach((p2) => {
|
|
5152
|
+
p2.style.transform = "scale(0)";
|
|
5153
|
+
p2.style.transformOrigin = "center";
|
|
5154
|
+
p2.style.opacity = "0";
|
|
5155
|
+
});
|
|
5156
|
+
}
|
|
5157
|
+
}, [resolvedSvg, animation]);
|
|
5158
|
+
useEffect(() => {
|
|
5159
|
+
const el = containerRef.current;
|
|
5160
|
+
if (!el) return;
|
|
5161
|
+
const id = requestAnimationFrame(() => {
|
|
5162
|
+
switch (animation) {
|
|
5163
|
+
case "draw":
|
|
5164
|
+
applyDrawAnimation(el, animate, duration, delay, easing);
|
|
5165
|
+
break;
|
|
5166
|
+
case "fill":
|
|
5167
|
+
applyFillAnimation(el, animate, duration, delay, easing, fillColor);
|
|
5168
|
+
break;
|
|
5169
|
+
case "pulse":
|
|
5170
|
+
applyPulseAnimation(el, animate, duration);
|
|
5171
|
+
break;
|
|
5172
|
+
case "morph":
|
|
5173
|
+
applyMorphAnimation(el, animate, duration, delay, easing);
|
|
5174
|
+
break;
|
|
5175
|
+
}
|
|
5176
|
+
});
|
|
5177
|
+
prevAnimateRef.current = animate;
|
|
5178
|
+
return () => cancelAnimationFrame(id);
|
|
5179
|
+
}, [animate, animation, duration, delay, easing, fillColor, resolvedSvg]);
|
|
5180
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5181
|
+
/* @__PURE__ */ jsx("style", { children: `@keyframes ag-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.04); opacity: 0.85; } }` }),
|
|
5182
|
+
/* @__PURE__ */ jsx(
|
|
5183
|
+
"div",
|
|
5184
|
+
{
|
|
5185
|
+
ref: setRef,
|
|
5186
|
+
className: cn("inline-flex items-center justify-center", className),
|
|
5187
|
+
style: { width, height, ...style },
|
|
5188
|
+
role: alt ? "img" : void 0,
|
|
5189
|
+
"aria-label": alt,
|
|
5190
|
+
...props,
|
|
5191
|
+
children: resolvedSvg ? /* @__PURE__ */ jsx(
|
|
5192
|
+
"div",
|
|
5193
|
+
{
|
|
5194
|
+
className: "w-full h-full [&>svg]:w-full [&>svg]:h-full",
|
|
5195
|
+
dangerouslySetInnerHTML: { __html: resolvedSvg }
|
|
5196
|
+
}
|
|
5197
|
+
) : children
|
|
5198
|
+
}
|
|
5199
|
+
)
|
|
5200
|
+
] });
|
|
5201
|
+
}
|
|
5202
|
+
);
|
|
5203
|
+
AnimatedGraphic.displayName = "AnimatedGraphic";
|
|
4920
5204
|
var heartIcon = (filled, size) => /* @__PURE__ */ jsx(
|
|
4921
5205
|
"svg",
|
|
4922
5206
|
{
|
|
@@ -5001,9 +5285,9 @@ function ScoreDisplay({
|
|
|
5001
5285
|
...rest
|
|
5002
5286
|
}) {
|
|
5003
5287
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
|
|
5004
|
-
const [displayValue, setDisplayValue] =
|
|
5005
|
-
const [isAnimating, setIsAnimating] =
|
|
5006
|
-
|
|
5288
|
+
const [displayValue, setDisplayValue] = React116.useState(resolvedValue);
|
|
5289
|
+
const [isAnimating, setIsAnimating] = React116.useState(false);
|
|
5290
|
+
React116.useEffect(() => {
|
|
5007
5291
|
if (!animated || displayValue === resolvedValue) {
|
|
5008
5292
|
setDisplayValue(resolvedValue);
|
|
5009
5293
|
return;
|
|
@@ -5076,9 +5360,9 @@ function ControlButton({
|
|
|
5076
5360
|
className
|
|
5077
5361
|
}) {
|
|
5078
5362
|
const eventBus = useEventBus();
|
|
5079
|
-
const [isPressed, setIsPressed] =
|
|
5363
|
+
const [isPressed, setIsPressed] = React116.useState(false);
|
|
5080
5364
|
const actualPressed = pressed ?? isPressed;
|
|
5081
|
-
const handlePointerDown =
|
|
5365
|
+
const handlePointerDown = React116.useCallback(
|
|
5082
5366
|
(e) => {
|
|
5083
5367
|
e.preventDefault();
|
|
5084
5368
|
if (disabled) return;
|
|
@@ -5088,7 +5372,7 @@ function ControlButton({
|
|
|
5088
5372
|
},
|
|
5089
5373
|
[disabled, pressEvent, eventBus, onPress]
|
|
5090
5374
|
);
|
|
5091
|
-
const handlePointerUp =
|
|
5375
|
+
const handlePointerUp = React116.useCallback(
|
|
5092
5376
|
(e) => {
|
|
5093
5377
|
e.preventDefault();
|
|
5094
5378
|
if (disabled) return;
|
|
@@ -5098,7 +5382,7 @@ function ControlButton({
|
|
|
5098
5382
|
},
|
|
5099
5383
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
5100
5384
|
);
|
|
5101
|
-
const handlePointerLeave =
|
|
5385
|
+
const handlePointerLeave = React116.useCallback(
|
|
5102
5386
|
(e) => {
|
|
5103
5387
|
if (isPressed) {
|
|
5104
5388
|
setIsPressed(false);
|
|
@@ -5888,9 +6172,9 @@ function MiniMap({
|
|
|
5888
6172
|
viewportRect,
|
|
5889
6173
|
className
|
|
5890
6174
|
}) {
|
|
5891
|
-
const canvasRef =
|
|
5892
|
-
const frameRef =
|
|
5893
|
-
|
|
6175
|
+
const canvasRef = React116.useRef(null);
|
|
6176
|
+
const frameRef = React116.useRef(0);
|
|
6177
|
+
React116.useEffect(() => {
|
|
5894
6178
|
const canvas = canvasRef.current;
|
|
5895
6179
|
if (!canvas) return;
|
|
5896
6180
|
const ctx = canvas.getContext("2d");
|
|
@@ -5999,7 +6283,7 @@ var ErrorState = ({
|
|
|
5999
6283
|
);
|
|
6000
6284
|
};
|
|
6001
6285
|
ErrorState.displayName = "ErrorState";
|
|
6002
|
-
var ErrorBoundary = class extends
|
|
6286
|
+
var ErrorBoundary = class extends React116__default.Component {
|
|
6003
6287
|
constructor(props) {
|
|
6004
6288
|
super(props);
|
|
6005
6289
|
__publicField(this, "reset", () => {
|
|
@@ -6362,8 +6646,8 @@ var Tooltip = ({
|
|
|
6362
6646
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
6363
6647
|
};
|
|
6364
6648
|
}, []);
|
|
6365
|
-
const triggerElement =
|
|
6366
|
-
const trigger =
|
|
6649
|
+
const triggerElement = React116__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
6650
|
+
const trigger = React116__default.cloneElement(triggerElement, {
|
|
6367
6651
|
ref: triggerRef,
|
|
6368
6652
|
onMouseEnter: handleMouseEnter,
|
|
6369
6653
|
onMouseLeave: handleMouseLeave,
|
|
@@ -6476,8 +6760,8 @@ var Popover = ({
|
|
|
6476
6760
|
onMouseEnter: handleOpen,
|
|
6477
6761
|
onMouseLeave: handleClose
|
|
6478
6762
|
};
|
|
6479
|
-
const childElement =
|
|
6480
|
-
const triggerElement =
|
|
6763
|
+
const childElement = React116__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
6764
|
+
const triggerElement = React116__default.cloneElement(
|
|
6481
6765
|
childElement,
|
|
6482
6766
|
{
|
|
6483
6767
|
ref: triggerRef,
|
|
@@ -6581,8 +6865,8 @@ var Menu = ({
|
|
|
6581
6865
|
"bottom-start": "top-full left-0 mt-2",
|
|
6582
6866
|
"bottom-end": "top-full right-0 mt-2"
|
|
6583
6867
|
};
|
|
6584
|
-
const triggerChild =
|
|
6585
|
-
const triggerElement =
|
|
6868
|
+
const triggerChild = React116__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx("span", { children: trigger });
|
|
6869
|
+
const triggerElement = React116__default.cloneElement(
|
|
6586
6870
|
triggerChild,
|
|
6587
6871
|
{
|
|
6588
6872
|
ref: triggerRef,
|
|
@@ -7282,7 +7566,7 @@ function InputPattern({
|
|
|
7282
7566
|
className
|
|
7283
7567
|
}) {
|
|
7284
7568
|
const { emit } = useEventBus();
|
|
7285
|
-
const [localValue, setLocalValue] =
|
|
7569
|
+
const [localValue, setLocalValue] = React116__default.useState(value);
|
|
7286
7570
|
const handleChange = (e) => {
|
|
7287
7571
|
setLocalValue(e.target.value);
|
|
7288
7572
|
if (onChange) {
|
|
@@ -7319,7 +7603,7 @@ function TextareaPattern({
|
|
|
7319
7603
|
className
|
|
7320
7604
|
}) {
|
|
7321
7605
|
const { emit } = useEventBus();
|
|
7322
|
-
const [localValue, setLocalValue] =
|
|
7606
|
+
const [localValue, setLocalValue] = React116__default.useState(value);
|
|
7323
7607
|
const handleChange = (e) => {
|
|
7324
7608
|
setLocalValue(e.target.value);
|
|
7325
7609
|
if (onChange) {
|
|
@@ -7350,7 +7634,7 @@ function SelectPattern({
|
|
|
7350
7634
|
className
|
|
7351
7635
|
}) {
|
|
7352
7636
|
const { emit } = useEventBus();
|
|
7353
|
-
const [localValue, setLocalValue] =
|
|
7637
|
+
const [localValue, setLocalValue] = React116__default.useState(value);
|
|
7354
7638
|
const handleChange = (e) => {
|
|
7355
7639
|
setLocalValue(e.target.value);
|
|
7356
7640
|
if (onChange) {
|
|
@@ -7379,7 +7663,7 @@ function CheckboxPattern({
|
|
|
7379
7663
|
className
|
|
7380
7664
|
}) {
|
|
7381
7665
|
const { emit } = useEventBus();
|
|
7382
|
-
const [localChecked, setLocalChecked] =
|
|
7666
|
+
const [localChecked, setLocalChecked] = React116__default.useState(checked);
|
|
7383
7667
|
const handleChange = (e) => {
|
|
7384
7668
|
setLocalChecked(e.target.checked);
|
|
7385
7669
|
if (onChange) {
|
|
@@ -7580,8 +7864,8 @@ function ActionButtons({
|
|
|
7580
7864
|
disabled
|
|
7581
7865
|
}) {
|
|
7582
7866
|
const eventBus = useEventBus();
|
|
7583
|
-
const [activeButtons, setActiveButtons] =
|
|
7584
|
-
const handlePress =
|
|
7867
|
+
const [activeButtons, setActiveButtons] = React116.useState(/* @__PURE__ */ new Set());
|
|
7868
|
+
const handlePress = React116.useCallback(
|
|
7585
7869
|
(id) => {
|
|
7586
7870
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
7587
7871
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -7589,7 +7873,7 @@ function ActionButtons({
|
|
|
7589
7873
|
},
|
|
7590
7874
|
[actionEvent, eventBus, onAction]
|
|
7591
7875
|
);
|
|
7592
|
-
const handleRelease =
|
|
7876
|
+
const handleRelease = React116.useCallback(
|
|
7593
7877
|
(id) => {
|
|
7594
7878
|
setActiveButtons((prev) => {
|
|
7595
7879
|
const next = new Set(prev);
|
|
@@ -9253,7 +9537,7 @@ var ScaledDiagram = ({
|
|
|
9253
9537
|
);
|
|
9254
9538
|
};
|
|
9255
9539
|
ScaledDiagram.displayName = "ScaledDiagram";
|
|
9256
|
-
var MarkdownContent =
|
|
9540
|
+
var MarkdownContent = React116__default.memo(
|
|
9257
9541
|
({ content, direction, className }) => {
|
|
9258
9542
|
const { t: _t } = useTranslate();
|
|
9259
9543
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -9355,7 +9639,7 @@ var MarkdownContent = React114__default.memo(
|
|
|
9355
9639
|
(prev, next) => prev.content === next.content && prev.className === next.className && prev.direction === next.direction
|
|
9356
9640
|
);
|
|
9357
9641
|
MarkdownContent.displayName = "MarkdownContent";
|
|
9358
|
-
var CodeBlock =
|
|
9642
|
+
var CodeBlock = React116__default.memo(
|
|
9359
9643
|
({
|
|
9360
9644
|
code: rawCode,
|
|
9361
9645
|
language = "text",
|
|
@@ -10315,7 +10599,7 @@ var StateMachineView = ({
|
|
|
10315
10599
|
style: { top: title ? 30 : 0 },
|
|
10316
10600
|
children: [
|
|
10317
10601
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
10318
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
10602
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React116__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
10319
10603
|
StateNode,
|
|
10320
10604
|
{
|
|
10321
10605
|
state,
|
|
@@ -15652,7 +15936,7 @@ function CraftingRecipe({
|
|
|
15652
15936
|
className
|
|
15653
15937
|
}) {
|
|
15654
15938
|
const eventBus = useEventBus();
|
|
15655
|
-
const handleCraft =
|
|
15939
|
+
const handleCraft = React116.useCallback(() => {
|
|
15656
15940
|
onCraft?.();
|
|
15657
15941
|
if (craftEvent) {
|
|
15658
15942
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -15669,7 +15953,7 @@ function CraftingRecipe({
|
|
|
15669
15953
|
children: [
|
|
15670
15954
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
15671
15955
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
15672
|
-
return /* @__PURE__ */ jsxs(
|
|
15956
|
+
return /* @__PURE__ */ jsxs(React116.Fragment, { children: [
|
|
15673
15957
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
15674
15958
|
ItemSlot,
|
|
15675
15959
|
{
|
|
@@ -15948,8 +16232,8 @@ function DPad({
|
|
|
15948
16232
|
}) {
|
|
15949
16233
|
const eventBus = useEventBus();
|
|
15950
16234
|
const sizes = sizeMap15[size];
|
|
15951
|
-
const [activeDirections, setActiveDirections] =
|
|
15952
|
-
const handlePress =
|
|
16235
|
+
const [activeDirections, setActiveDirections] = React116.useState(/* @__PURE__ */ new Set());
|
|
16236
|
+
const handlePress = React116.useCallback(
|
|
15953
16237
|
(direction) => {
|
|
15954
16238
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
15955
16239
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -15957,7 +16241,7 @@ function DPad({
|
|
|
15957
16241
|
},
|
|
15958
16242
|
[directionEvent, eventBus, onDirection]
|
|
15959
16243
|
);
|
|
15960
|
-
const handleRelease =
|
|
16244
|
+
const handleRelease = React116.useCallback(
|
|
15961
16245
|
(direction) => {
|
|
15962
16246
|
setActiveDirections((prev) => {
|
|
15963
16247
|
const next = new Set(prev);
|
|
@@ -16734,7 +17018,7 @@ var DataList = ({
|
|
|
16734
17018
|
}) => {
|
|
16735
17019
|
const eventBus = useEventBus();
|
|
16736
17020
|
const { t } = useTranslate();
|
|
16737
|
-
const [visibleCount, setVisibleCount] =
|
|
17021
|
+
const [visibleCount, setVisibleCount] = React116__default.useState(pageSize || Infinity);
|
|
16738
17022
|
const fields = fieldsProp ?? columnsProp ?? [];
|
|
16739
17023
|
const allData = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
16740
17024
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
@@ -16771,7 +17055,7 @@ var DataList = ({
|
|
|
16771
17055
|
const items2 = data.map((item) => item);
|
|
16772
17056
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
16773
17057
|
const contentField = titleField?.name ?? fields[0]?.name ?? "";
|
|
16774
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
17058
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React116__default.Fragment, { children: [
|
|
16775
17059
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
16776
17060
|
group.items.map((itemData, index) => {
|
|
16777
17061
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -16974,7 +17258,7 @@ var DataList = ({
|
|
|
16974
17258
|
className
|
|
16975
17259
|
),
|
|
16976
17260
|
children: [
|
|
16977
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
17261
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React116__default.Fragment, { children: [
|
|
16978
17262
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
16979
17263
|
group.items.map(
|
|
16980
17264
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -17943,7 +18227,7 @@ var WizardProgress = ({
|
|
|
17943
18227
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: steps.map((step, index) => {
|
|
17944
18228
|
const isActive = index === currentStep;
|
|
17945
18229
|
const isCompleted = index < currentStep;
|
|
17946
|
-
return /* @__PURE__ */ jsxs(
|
|
18230
|
+
return /* @__PURE__ */ jsxs(React116__default.Fragment, { children: [
|
|
17947
18231
|
/* @__PURE__ */ jsx(
|
|
17948
18232
|
"button",
|
|
17949
18233
|
{
|
|
@@ -18768,7 +19052,7 @@ function InventoryGrid({
|
|
|
18768
19052
|
const eventBus = useEventBus();
|
|
18769
19053
|
const slotCount = totalSlots ?? items.length;
|
|
18770
19054
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
18771
|
-
const handleSelect =
|
|
19055
|
+
const handleSelect = React116.useCallback(
|
|
18772
19056
|
(id) => {
|
|
18773
19057
|
onSelect?.(id);
|
|
18774
19058
|
if (selectEvent) {
|
|
@@ -18941,15 +19225,15 @@ function GameCanvas2D({
|
|
|
18941
19225
|
fps = 60,
|
|
18942
19226
|
className
|
|
18943
19227
|
}) {
|
|
18944
|
-
const canvasRef =
|
|
18945
|
-
const rafRef =
|
|
18946
|
-
const frameRef =
|
|
18947
|
-
const lastTimeRef =
|
|
18948
|
-
const onDrawRef =
|
|
19228
|
+
const canvasRef = React116.useRef(null);
|
|
19229
|
+
const rafRef = React116.useRef(0);
|
|
19230
|
+
const frameRef = React116.useRef(0);
|
|
19231
|
+
const lastTimeRef = React116.useRef(0);
|
|
19232
|
+
const onDrawRef = React116.useRef(onDraw);
|
|
18949
19233
|
onDrawRef.current = onDraw;
|
|
18950
|
-
const onTickRef =
|
|
19234
|
+
const onTickRef = React116.useRef(onTick);
|
|
18951
19235
|
onTickRef.current = onTick;
|
|
18952
|
-
|
|
19236
|
+
React116.useEffect(() => {
|
|
18953
19237
|
const canvas = canvasRef.current;
|
|
18954
19238
|
if (!canvas) return;
|
|
18955
19239
|
const ctx = canvas.getContext("2d");
|
|
@@ -19202,7 +19486,7 @@ function TurnPanel({
|
|
|
19202
19486
|
className
|
|
19203
19487
|
}) {
|
|
19204
19488
|
const eventBus = useEventBus();
|
|
19205
|
-
const handleAction =
|
|
19489
|
+
const handleAction = React116.useCallback(
|
|
19206
19490
|
(event) => {
|
|
19207
19491
|
if (event) {
|
|
19208
19492
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -19327,7 +19611,7 @@ function UnitCommandBar({
|
|
|
19327
19611
|
className
|
|
19328
19612
|
}) {
|
|
19329
19613
|
const eventBus = useEventBus();
|
|
19330
|
-
const handleCommand =
|
|
19614
|
+
const handleCommand = React116.useCallback(
|
|
19331
19615
|
(event) => {
|
|
19332
19616
|
if (event) {
|
|
19333
19617
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -19786,7 +20070,7 @@ function GameMenu({
|
|
|
19786
20070
|
} catch {
|
|
19787
20071
|
}
|
|
19788
20072
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
19789
|
-
const handleOptionClick =
|
|
20073
|
+
const handleOptionClick = React116.useCallback(
|
|
19790
20074
|
(option) => {
|
|
19791
20075
|
if (option.event && eventBus) {
|
|
19792
20076
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -19909,7 +20193,7 @@ function GameOverScreen({
|
|
|
19909
20193
|
} catch {
|
|
19910
20194
|
}
|
|
19911
20195
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
19912
|
-
const handleActionClick =
|
|
20196
|
+
const handleActionClick = React116.useCallback(
|
|
19913
20197
|
(action) => {
|
|
19914
20198
|
if (action.event && eventBus) {
|
|
19915
20199
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -23009,7 +23293,7 @@ var DocumentViewer = ({
|
|
|
23009
23293
|
};
|
|
23010
23294
|
DocumentViewer.displayName = "DocumentViewer";
|
|
23011
23295
|
function extractTitle(children) {
|
|
23012
|
-
if (!
|
|
23296
|
+
if (!React116__default.isValidElement(children)) return void 0;
|
|
23013
23297
|
const props = children.props;
|
|
23014
23298
|
if (typeof props.title === "string") {
|
|
23015
23299
|
return props.title;
|
|
@@ -23061,7 +23345,7 @@ function LinearView({
|
|
|
23061
23345
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
23062
23346
|
const isDone = i < currentIdx;
|
|
23063
23347
|
const isCurrent = i === currentIdx;
|
|
23064
|
-
return /* @__PURE__ */ jsxs(
|
|
23348
|
+
return /* @__PURE__ */ jsxs(React116__default.Fragment, { children: [
|
|
23065
23349
|
i > 0 && /* @__PURE__ */ jsx(
|
|
23066
23350
|
Typography,
|
|
23067
23351
|
{
|
|
@@ -23727,7 +24011,7 @@ var Form = ({
|
|
|
23727
24011
|
const normalizedInitialData = initialData ?? {};
|
|
23728
24012
|
const resolvedEntity = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
23729
24013
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
23730
|
-
const entityDerivedFields =
|
|
24014
|
+
const entityDerivedFields = React116__default.useMemo(() => {
|
|
23731
24015
|
if (fields && fields.length > 0) return void 0;
|
|
23732
24016
|
if (!resolvedEntity) return void 0;
|
|
23733
24017
|
return resolvedEntity.fields.map(
|
|
@@ -23746,14 +24030,14 @@ var Form = ({
|
|
|
23746
24030
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
23747
24031
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
23748
24032
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
23749
|
-
const [formData, setFormData] =
|
|
24033
|
+
const [formData, setFormData] = React116__default.useState(
|
|
23750
24034
|
normalizedInitialData
|
|
23751
24035
|
);
|
|
23752
|
-
const [collapsedSections, setCollapsedSections] =
|
|
24036
|
+
const [collapsedSections, setCollapsedSections] = React116__default.useState(
|
|
23753
24037
|
/* @__PURE__ */ new Set()
|
|
23754
24038
|
);
|
|
23755
24039
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
23756
|
-
const evalContext =
|
|
24040
|
+
const evalContext = React116__default.useMemo(
|
|
23757
24041
|
() => ({
|
|
23758
24042
|
formValues: formData,
|
|
23759
24043
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -23762,13 +24046,13 @@ var Form = ({
|
|
|
23762
24046
|
}),
|
|
23763
24047
|
[formData, externalContext]
|
|
23764
24048
|
);
|
|
23765
|
-
|
|
24049
|
+
React116__default.useEffect(() => {
|
|
23766
24050
|
const data = initialData;
|
|
23767
24051
|
if (data && Object.keys(data).length > 0) {
|
|
23768
24052
|
setFormData(data);
|
|
23769
24053
|
}
|
|
23770
24054
|
}, [initialData]);
|
|
23771
|
-
const processCalculations =
|
|
24055
|
+
const processCalculations = React116__default.useCallback(
|
|
23772
24056
|
(changedFieldId, newFormData) => {
|
|
23773
24057
|
if (!hiddenCalculations.length) return;
|
|
23774
24058
|
const context = {
|
|
@@ -23793,7 +24077,7 @@ var Form = ({
|
|
|
23793
24077
|
},
|
|
23794
24078
|
[hiddenCalculations, externalContext, eventBus]
|
|
23795
24079
|
);
|
|
23796
|
-
const checkViolations =
|
|
24080
|
+
const checkViolations = React116__default.useCallback(
|
|
23797
24081
|
(changedFieldId, newFormData) => {
|
|
23798
24082
|
if (!violationTriggers.length) return;
|
|
23799
24083
|
const context = {
|
|
@@ -23830,7 +24114,7 @@ var Form = ({
|
|
|
23830
24114
|
processCalculations(name, newFormData);
|
|
23831
24115
|
checkViolations(name, newFormData);
|
|
23832
24116
|
};
|
|
23833
|
-
const isFieldVisible =
|
|
24117
|
+
const isFieldVisible = React116__default.useCallback(
|
|
23834
24118
|
(fieldName) => {
|
|
23835
24119
|
const condition = conditionalFields[fieldName];
|
|
23836
24120
|
if (!condition) return true;
|
|
@@ -23838,7 +24122,7 @@ var Form = ({
|
|
|
23838
24122
|
},
|
|
23839
24123
|
[conditionalFields, evalContext]
|
|
23840
24124
|
);
|
|
23841
|
-
const isSectionVisible =
|
|
24125
|
+
const isSectionVisible = React116__default.useCallback(
|
|
23842
24126
|
(section) => {
|
|
23843
24127
|
if (!section.condition) return true;
|
|
23844
24128
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -23870,7 +24154,7 @@ var Form = ({
|
|
|
23870
24154
|
eventBus.emit(`UI:${onCancel}`);
|
|
23871
24155
|
}
|
|
23872
24156
|
};
|
|
23873
|
-
const renderField =
|
|
24157
|
+
const renderField = React116__default.useCallback(
|
|
23874
24158
|
(field) => {
|
|
23875
24159
|
const fieldName = field.name || field.field;
|
|
23876
24160
|
if (!fieldName) return null;
|
|
@@ -23891,7 +24175,7 @@ var Form = ({
|
|
|
23891
24175
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
23892
24176
|
);
|
|
23893
24177
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
23894
|
-
const normalizedFields =
|
|
24178
|
+
const normalizedFields = React116__default.useMemo(() => {
|
|
23895
24179
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
23896
24180
|
return effectiveFields.map((field) => {
|
|
23897
24181
|
if (typeof field === "string") {
|
|
@@ -23913,7 +24197,7 @@ var Form = ({
|
|
|
23913
24197
|
return field;
|
|
23914
24198
|
});
|
|
23915
24199
|
}, [effectiveFields, resolvedEntity]);
|
|
23916
|
-
const schemaFields =
|
|
24200
|
+
const schemaFields = React116__default.useMemo(() => {
|
|
23917
24201
|
if (normalizedFields.length === 0) return null;
|
|
23918
24202
|
if (isDebugEnabled()) {
|
|
23919
24203
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -23923,7 +24207,7 @@ var Form = ({
|
|
|
23923
24207
|
}
|
|
23924
24208
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
23925
24209
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
23926
|
-
const sectionElements =
|
|
24210
|
+
const sectionElements = React116__default.useMemo(() => {
|
|
23927
24211
|
if (!sections || sections.length === 0) return null;
|
|
23928
24212
|
return sections.map((section) => {
|
|
23929
24213
|
if (!isSectionVisible(section)) {
|
|
@@ -25327,7 +25611,7 @@ var List2 = ({
|
|
|
25327
25611
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
25328
25612
|
return [];
|
|
25329
25613
|
}, [entity]);
|
|
25330
|
-
const getItemActions =
|
|
25614
|
+
const getItemActions = React116__default.useCallback(
|
|
25331
25615
|
(item) => {
|
|
25332
25616
|
if (!itemActions) return [];
|
|
25333
25617
|
if (typeof itemActions === "function") {
|
|
@@ -25753,7 +26037,7 @@ var MediaGallery = ({
|
|
|
25753
26037
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
25754
26038
|
);
|
|
25755
26039
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
25756
|
-
const items =
|
|
26040
|
+
const items = React116__default.useMemo(() => {
|
|
25757
26041
|
if (propItems) return propItems;
|
|
25758
26042
|
if (entityData.length === 0) return [];
|
|
25759
26043
|
return entityData.map((record, idx) => ({
|
|
@@ -25915,7 +26199,7 @@ var MediaGallery = ({
|
|
|
25915
26199
|
};
|
|
25916
26200
|
MediaGallery.displayName = "MediaGallery";
|
|
25917
26201
|
function extractTitle2(children) {
|
|
25918
|
-
if (!
|
|
26202
|
+
if (!React116__default.isValidElement(children)) return void 0;
|
|
25919
26203
|
const props = children.props;
|
|
25920
26204
|
if (typeof props.title === "string") {
|
|
25921
26205
|
return props.title;
|
|
@@ -26585,7 +26869,7 @@ var PageHeader = ({
|
|
|
26585
26869
|
info: "bg-info/10 text-info"
|
|
26586
26870
|
};
|
|
26587
26871
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
26588
|
-
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(
|
|
26872
|
+
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(React116__default.Fragment, { children: [
|
|
26589
26873
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
26590
26874
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
26591
26875
|
"a",
|
|
@@ -26711,7 +26995,7 @@ function subscribeToDebugEvents(listener) {
|
|
|
26711
26995
|
|
|
26712
26996
|
// components/organisms/debug/hooks/useDebugData.ts
|
|
26713
26997
|
function useDebugData() {
|
|
26714
|
-
const [data, setData] =
|
|
26998
|
+
const [data, setData] = React116.useState(() => ({
|
|
26715
26999
|
traits: [],
|
|
26716
27000
|
ticks: [],
|
|
26717
27001
|
guards: [],
|
|
@@ -26725,7 +27009,7 @@ function useDebugData() {
|
|
|
26725
27009
|
},
|
|
26726
27010
|
lastUpdate: Date.now()
|
|
26727
27011
|
}));
|
|
26728
|
-
|
|
27012
|
+
React116.useEffect(() => {
|
|
26729
27013
|
const updateData = () => {
|
|
26730
27014
|
setData({
|
|
26731
27015
|
traits: getAllTraits(),
|
|
@@ -26994,15 +27278,15 @@ var TYPE_BADGES = {
|
|
|
26994
27278
|
state: { variant: "danger", icon: "\u{1F4CA}" }
|
|
26995
27279
|
};
|
|
26996
27280
|
function EventFlowTab({ events: events2 }) {
|
|
26997
|
-
const [filter, setFilter] =
|
|
26998
|
-
const containerRef =
|
|
26999
|
-
const [autoScroll, setAutoScroll] =
|
|
27000
|
-
|
|
27281
|
+
const [filter, setFilter] = React116.useState("all");
|
|
27282
|
+
const containerRef = React116.useRef(null);
|
|
27283
|
+
const [autoScroll, setAutoScroll] = React116.useState(true);
|
|
27284
|
+
React116.useEffect(() => {
|
|
27001
27285
|
if (autoScroll && containerRef.current) {
|
|
27002
27286
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
27003
27287
|
}
|
|
27004
27288
|
}, [events2.length, autoScroll]);
|
|
27005
|
-
const filteredEvents =
|
|
27289
|
+
const filteredEvents = React116.useMemo(() => {
|
|
27006
27290
|
if (filter === "all") return events2;
|
|
27007
27291
|
return events2.filter((e) => e.type === filter);
|
|
27008
27292
|
}, [events2, filter]);
|
|
@@ -27101,7 +27385,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
27101
27385
|
}
|
|
27102
27386
|
EventFlowTab.displayName = "EventFlowTab";
|
|
27103
27387
|
function GuardsPanel({ guards }) {
|
|
27104
|
-
const [filter, setFilter] =
|
|
27388
|
+
const [filter, setFilter] = React116.useState("all");
|
|
27105
27389
|
if (guards.length === 0) {
|
|
27106
27390
|
return /* @__PURE__ */ jsx(
|
|
27107
27391
|
EmptyState,
|
|
@@ -27114,7 +27398,7 @@ function GuardsPanel({ guards }) {
|
|
|
27114
27398
|
}
|
|
27115
27399
|
const passedCount = guards.filter((g) => g.result).length;
|
|
27116
27400
|
const failedCount = guards.length - passedCount;
|
|
27117
|
-
const filteredGuards =
|
|
27401
|
+
const filteredGuards = React116.useMemo(() => {
|
|
27118
27402
|
if (filter === "all") return guards;
|
|
27119
27403
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
27120
27404
|
return guards.filter((g) => !g.result);
|
|
@@ -27258,10 +27542,10 @@ function EffectBadge({ effect }) {
|
|
|
27258
27542
|
] });
|
|
27259
27543
|
}
|
|
27260
27544
|
function TransitionTimeline({ transitions }) {
|
|
27261
|
-
const containerRef =
|
|
27262
|
-
const [autoScroll, setAutoScroll] =
|
|
27263
|
-
const [expandedId, setExpandedId] =
|
|
27264
|
-
|
|
27545
|
+
const containerRef = React116.useRef(null);
|
|
27546
|
+
const [autoScroll, setAutoScroll] = React116.useState(true);
|
|
27547
|
+
const [expandedId, setExpandedId] = React116.useState(null);
|
|
27548
|
+
React116.useEffect(() => {
|
|
27265
27549
|
if (autoScroll && containerRef.current) {
|
|
27266
27550
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
27267
27551
|
}
|
|
@@ -27522,9 +27806,9 @@ function getAllEvents(traits2) {
|
|
|
27522
27806
|
}
|
|
27523
27807
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
27524
27808
|
const eventBus = useEventBus();
|
|
27525
|
-
const [log, setLog] =
|
|
27526
|
-
const prevStatesRef =
|
|
27527
|
-
|
|
27809
|
+
const [log, setLog] = React116.useState([]);
|
|
27810
|
+
const prevStatesRef = React116.useRef(/* @__PURE__ */ new Map());
|
|
27811
|
+
React116.useEffect(() => {
|
|
27528
27812
|
for (const trait of traits2) {
|
|
27529
27813
|
const prev = prevStatesRef.current.get(trait.id);
|
|
27530
27814
|
if (prev && prev !== trait.currentState) {
|
|
@@ -27607,10 +27891,10 @@ function RuntimeDebugger({
|
|
|
27607
27891
|
defaultTab,
|
|
27608
27892
|
schema
|
|
27609
27893
|
}) {
|
|
27610
|
-
const [isCollapsed, setIsCollapsed] =
|
|
27611
|
-
const [isVisible, setIsVisible] =
|
|
27894
|
+
const [isCollapsed, setIsCollapsed] = React116.useState(mode === "verify" ? true : defaultCollapsed);
|
|
27895
|
+
const [isVisible, setIsVisible] = React116.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
27612
27896
|
const debugData = useDebugData();
|
|
27613
|
-
|
|
27897
|
+
React116.useEffect(() => {
|
|
27614
27898
|
if (mode === "inline") return;
|
|
27615
27899
|
return onDebugToggle((enabled) => {
|
|
27616
27900
|
setIsVisible(enabled);
|
|
@@ -27619,7 +27903,7 @@ function RuntimeDebugger({
|
|
|
27619
27903
|
}
|
|
27620
27904
|
});
|
|
27621
27905
|
}, [mode]);
|
|
27622
|
-
|
|
27906
|
+
React116.useEffect(() => {
|
|
27623
27907
|
if (mode === "inline") return;
|
|
27624
27908
|
const handleKeyDown = (e) => {
|
|
27625
27909
|
if (e.key === "`" && isVisible) {
|
|
@@ -28158,7 +28442,7 @@ function SequenceBar({
|
|
|
28158
28442
|
onSlotRemove(index);
|
|
28159
28443
|
}, [onSlotRemove, playing]);
|
|
28160
28444
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
28161
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
28445
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React116__default.Fragment, { children: [
|
|
28162
28446
|
i > 0 && /* @__PURE__ */ jsx(
|
|
28163
28447
|
Typography,
|
|
28164
28448
|
{
|
|
@@ -29396,7 +29680,7 @@ var StatCard = ({
|
|
|
29396
29680
|
const labelToUse = propLabel ?? propTitle;
|
|
29397
29681
|
const eventBus = useEventBus();
|
|
29398
29682
|
const { t } = useTranslate();
|
|
29399
|
-
const handleActionClick =
|
|
29683
|
+
const handleActionClick = React116__default.useCallback(() => {
|
|
29400
29684
|
if (action?.event) {
|
|
29401
29685
|
eventBus.emit(`UI:${action.event}`, {});
|
|
29402
29686
|
}
|
|
@@ -29407,7 +29691,7 @@ var StatCard = ({
|
|
|
29407
29691
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
29408
29692
|
const isLoading = externalLoading ?? false;
|
|
29409
29693
|
const error = externalError;
|
|
29410
|
-
const computeMetricValue =
|
|
29694
|
+
const computeMetricValue = React116__default.useCallback(
|
|
29411
29695
|
(metric, items) => {
|
|
29412
29696
|
if (metric.value !== void 0) {
|
|
29413
29697
|
return metric.value;
|
|
@@ -29446,7 +29730,7 @@ var StatCard = ({
|
|
|
29446
29730
|
},
|
|
29447
29731
|
[]
|
|
29448
29732
|
);
|
|
29449
|
-
const schemaStats =
|
|
29733
|
+
const schemaStats = React116__default.useMemo(() => {
|
|
29450
29734
|
if (!metrics || metrics.length === 0) return null;
|
|
29451
29735
|
return metrics.map((metric) => ({
|
|
29452
29736
|
label: metric.label,
|
|
@@ -29454,7 +29738,7 @@ var StatCard = ({
|
|
|
29454
29738
|
format: metric.format
|
|
29455
29739
|
}));
|
|
29456
29740
|
}, [metrics, data, computeMetricValue]);
|
|
29457
|
-
const calculatedTrend =
|
|
29741
|
+
const calculatedTrend = React116__default.useMemo(() => {
|
|
29458
29742
|
if (manualTrend !== void 0) return manualTrend;
|
|
29459
29743
|
if (previousValue === void 0 || currentValue === void 0)
|
|
29460
29744
|
return void 0;
|
|
@@ -30365,7 +30649,7 @@ var Timeline = ({
|
|
|
30365
30649
|
}) => {
|
|
30366
30650
|
const { t } = useTranslate();
|
|
30367
30651
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
30368
|
-
const items =
|
|
30652
|
+
const items = React116__default.useMemo(() => {
|
|
30369
30653
|
if (propItems) return propItems;
|
|
30370
30654
|
if (entityData.length === 0) return [];
|
|
30371
30655
|
return entityData.map((record, idx) => {
|
|
@@ -30467,7 +30751,7 @@ var Timeline = ({
|
|
|
30467
30751
|
};
|
|
30468
30752
|
Timeline.displayName = "Timeline";
|
|
30469
30753
|
function extractToastProps(children) {
|
|
30470
|
-
if (!
|
|
30754
|
+
if (!React116__default.isValidElement(children)) {
|
|
30471
30755
|
if (typeof children === "string") {
|
|
30472
30756
|
return { message: children };
|
|
30473
30757
|
}
|
|
@@ -30498,7 +30782,7 @@ var ToastSlot = ({
|
|
|
30498
30782
|
eventBus.emit("UI:CLOSE");
|
|
30499
30783
|
};
|
|
30500
30784
|
if (!isVisible) return null;
|
|
30501
|
-
const isCustomContent =
|
|
30785
|
+
const isCustomContent = React116__default.isValidElement(children) && !message;
|
|
30502
30786
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
30503
30787
|
Toast,
|
|
30504
30788
|
{
|
|
@@ -30742,7 +31026,7 @@ var WizardContainer = ({
|
|
|
30742
31026
|
const isCompleted = index < currentStep;
|
|
30743
31027
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
30744
31028
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
30745
|
-
return /* @__PURE__ */ jsxs(
|
|
31029
|
+
return /* @__PURE__ */ jsxs(React116__default.Fragment, { children: [
|
|
30746
31030
|
/* @__PURE__ */ jsx(
|
|
30747
31031
|
Button,
|
|
30748
31032
|
{
|
|
@@ -31108,12 +31392,12 @@ WorldMapTemplate.displayName = "WorldMapTemplate";
|
|
|
31108
31392
|
|
|
31109
31393
|
// components/organisms/component-registry.generated.ts
|
|
31110
31394
|
function lazyThree(name, loader) {
|
|
31111
|
-
const Lazy =
|
|
31395
|
+
const Lazy = React116__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
31112
31396
|
function ThreeWrapper(props) {
|
|
31113
|
-
return
|
|
31114
|
-
|
|
31397
|
+
return React116__default.createElement(
|
|
31398
|
+
React116__default.Suspense,
|
|
31115
31399
|
{ fallback: null },
|
|
31116
|
-
|
|
31400
|
+
React116__default.createElement(Lazy, props)
|
|
31117
31401
|
);
|
|
31118
31402
|
}
|
|
31119
31403
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -31401,7 +31685,7 @@ function SuspenseConfigProvider({
|
|
|
31401
31685
|
config,
|
|
31402
31686
|
children
|
|
31403
31687
|
}) {
|
|
31404
|
-
return
|
|
31688
|
+
return React116__default.createElement(
|
|
31405
31689
|
SuspenseConfigContext.Provider,
|
|
31406
31690
|
{ value: config },
|
|
31407
31691
|
children
|
|
@@ -32007,7 +32291,7 @@ function VerificationProvider({
|
|
|
32007
32291
|
})) : [];
|
|
32008
32292
|
recordTransition({
|
|
32009
32293
|
traitName: parsed.traitName,
|
|
32010
|
-
from: pending?.from ??
|
|
32294
|
+
from: pending?.from ?? payload["currentState"] ?? newState,
|
|
32011
32295
|
to: newState,
|
|
32012
32296
|
event: parsed.event,
|
|
32013
32297
|
effects,
|
|
@@ -32018,10 +32302,11 @@ function VerificationProvider({
|
|
|
32018
32302
|
const pending = pendingRef.current.get(key);
|
|
32019
32303
|
pendingRef.current.delete(key);
|
|
32020
32304
|
const errorMsg = payload["error"] ?? "Unknown error";
|
|
32305
|
+
const fromState = pending?.from ?? payload["currentState"] ?? "unknown";
|
|
32021
32306
|
recordTransition({
|
|
32022
32307
|
traitName: parsed.traitName,
|
|
32023
|
-
from:
|
|
32024
|
-
to:
|
|
32308
|
+
from: fromState,
|
|
32309
|
+
to: fromState,
|
|
32025
32310
|
// state didn't change on error
|
|
32026
32311
|
event: parsed.event,
|
|
32027
32312
|
effects: [{
|