@almadar/ui 2.56.0 → 2.57.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avl/index.cjs +1240 -1236
- package/dist/avl/index.js +169 -165
- package/dist/components/index.cjs +1175 -1053
- package/dist/components/index.js +272 -151
- package/dist/components/molecules/FileTree.d.ts +37 -0
- package/dist/components/molecules/index.d.ts +1 -0
- package/dist/providers/index.cjs +180 -179
- package/dist/providers/index.js +43 -42
- package/dist/runtime/index.cjs +911 -910
- package/dist/runtime/index.js +147 -146
- package/package.json +1 -1
package/dist/runtime/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React115 from 'react';
|
|
2
|
+
import React115__default, { createContext, useCallback, useState, useRef, useEffect, lazy, useMemo, useLayoutEffect, useContext, Suspense, useId } from 'react';
|
|
3
3
|
import { EventBusContext, OrbitalProvider, useEntityStore, VerificationProvider, useEntityRef } from '@almadar/ui/providers';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
@@ -1809,7 +1809,7 @@ var positionStyles = {
|
|
|
1809
1809
|
fixed: "fixed",
|
|
1810
1810
|
sticky: "sticky"
|
|
1811
1811
|
};
|
|
1812
|
-
var Box =
|
|
1812
|
+
var Box = React115__default.forwardRef(
|
|
1813
1813
|
({
|
|
1814
1814
|
padding,
|
|
1815
1815
|
paddingX,
|
|
@@ -2476,7 +2476,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
2476
2476
|
const IconComp = value;
|
|
2477
2477
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
2478
2478
|
}
|
|
2479
|
-
if (
|
|
2479
|
+
if (React115__default.isValidElement(value)) {
|
|
2480
2480
|
return value;
|
|
2481
2481
|
}
|
|
2482
2482
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -2485,7 +2485,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
2485
2485
|
}
|
|
2486
2486
|
return value;
|
|
2487
2487
|
}
|
|
2488
|
-
var Button =
|
|
2488
|
+
var Button = React115__default.forwardRef(
|
|
2489
2489
|
({
|
|
2490
2490
|
className,
|
|
2491
2491
|
variant = "primary",
|
|
@@ -2584,7 +2584,7 @@ var sizeStyles3 = {
|
|
|
2584
2584
|
md: "px-2.5 py-1 text-sm",
|
|
2585
2585
|
lg: "px-3 py-1.5 text-base"
|
|
2586
2586
|
};
|
|
2587
|
-
var Badge =
|
|
2587
|
+
var Badge = React115__default.forwardRef(
|
|
2588
2588
|
({ className, variant = "default", size = "sm", amount, label, icon, children, ...props }, ref) => {
|
|
2589
2589
|
const iconSizes2 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
|
|
2590
2590
|
const resolvedIcon = typeof icon === "string" ? (() => {
|
|
@@ -2724,7 +2724,7 @@ init_cn();
|
|
|
2724
2724
|
|
|
2725
2725
|
// components/atoms/Input.tsx
|
|
2726
2726
|
init_cn();
|
|
2727
|
-
var Input =
|
|
2727
|
+
var Input = React115__default.forwardRef(
|
|
2728
2728
|
({
|
|
2729
2729
|
className,
|
|
2730
2730
|
inputType,
|
|
@@ -2839,7 +2839,7 @@ Input.displayName = "Input";
|
|
|
2839
2839
|
|
|
2840
2840
|
// components/atoms/Label.tsx
|
|
2841
2841
|
init_cn();
|
|
2842
|
-
var Label =
|
|
2842
|
+
var Label = React115__default.forwardRef(
|
|
2843
2843
|
({ className, required, children, ...props }, ref) => {
|
|
2844
2844
|
return /* @__PURE__ */ jsxs(
|
|
2845
2845
|
"label",
|
|
@@ -2862,7 +2862,7 @@ Label.displayName = "Label";
|
|
|
2862
2862
|
|
|
2863
2863
|
// components/atoms/Textarea.tsx
|
|
2864
2864
|
init_cn();
|
|
2865
|
-
var Textarea =
|
|
2865
|
+
var Textarea = React115__default.forwardRef(
|
|
2866
2866
|
({ className, error, ...props }, ref) => {
|
|
2867
2867
|
return /* @__PURE__ */ jsx(
|
|
2868
2868
|
"textarea",
|
|
@@ -2888,7 +2888,7 @@ Textarea.displayName = "Textarea";
|
|
|
2888
2888
|
|
|
2889
2889
|
// components/atoms/Select.tsx
|
|
2890
2890
|
init_cn();
|
|
2891
|
-
var Select =
|
|
2891
|
+
var Select = React115__default.forwardRef(
|
|
2892
2892
|
({ className, options, placeholder, error, ...props }, ref) => {
|
|
2893
2893
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
2894
2894
|
/* @__PURE__ */ jsxs(
|
|
@@ -2927,7 +2927,7 @@ Select.displayName = "Select";
|
|
|
2927
2927
|
|
|
2928
2928
|
// components/atoms/Checkbox.tsx
|
|
2929
2929
|
init_cn();
|
|
2930
|
-
var Checkbox =
|
|
2930
|
+
var Checkbox = React115__default.forwardRef(
|
|
2931
2931
|
({ className, label, id, ...props }, ref) => {
|
|
2932
2932
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
2933
2933
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
@@ -3006,7 +3006,7 @@ var shadowStyles2 = {
|
|
|
3006
3006
|
md: "shadow",
|
|
3007
3007
|
lg: "shadow-lg"
|
|
3008
3008
|
};
|
|
3009
|
-
var Card =
|
|
3009
|
+
var Card = React115__default.forwardRef(
|
|
3010
3010
|
({
|
|
3011
3011
|
className,
|
|
3012
3012
|
variant = "bordered",
|
|
@@ -3042,9 +3042,9 @@ var Card = React114__default.forwardRef(
|
|
|
3042
3042
|
}
|
|
3043
3043
|
);
|
|
3044
3044
|
Card.displayName = "Card";
|
|
3045
|
-
var CardHeader =
|
|
3045
|
+
var CardHeader = React115__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
3046
3046
|
CardHeader.displayName = "CardHeader";
|
|
3047
|
-
var CardTitle =
|
|
3047
|
+
var CardTitle = React115__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3048
3048
|
"h3",
|
|
3049
3049
|
{
|
|
3050
3050
|
ref,
|
|
@@ -3057,11 +3057,11 @@ var CardTitle = React114__default.forwardRef(({ className, ...props }, ref) => /
|
|
|
3057
3057
|
}
|
|
3058
3058
|
));
|
|
3059
3059
|
CardTitle.displayName = "CardTitle";
|
|
3060
|
-
var CardContent =
|
|
3060
|
+
var CardContent = React115__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
3061
3061
|
CardContent.displayName = "CardContent";
|
|
3062
3062
|
var CardBody = CardContent;
|
|
3063
3063
|
CardBody.displayName = "CardBody";
|
|
3064
|
-
var CardFooter =
|
|
3064
|
+
var CardFooter = React115__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3065
3065
|
"div",
|
|
3066
3066
|
{
|
|
3067
3067
|
ref,
|
|
@@ -3079,7 +3079,7 @@ var sizeStyles4 = {
|
|
|
3079
3079
|
md: "h-6 w-6",
|
|
3080
3080
|
lg: "h-8 w-8"
|
|
3081
3081
|
};
|
|
3082
|
-
var Spinner =
|
|
3082
|
+
var Spinner = React115__default.forwardRef(
|
|
3083
3083
|
({ className, size = "md", ...props }, ref) => {
|
|
3084
3084
|
return /* @__PURE__ */ jsx(
|
|
3085
3085
|
"div",
|
|
@@ -3511,7 +3511,7 @@ ProgressBar.displayName = "ProgressBar";
|
|
|
3511
3511
|
|
|
3512
3512
|
// components/atoms/Radio.tsx
|
|
3513
3513
|
init_cn();
|
|
3514
|
-
var Radio =
|
|
3514
|
+
var Radio = React115__default.forwardRef(
|
|
3515
3515
|
({
|
|
3516
3516
|
label,
|
|
3517
3517
|
helperText,
|
|
@@ -3618,7 +3618,7 @@ Radio.displayName = "Radio";
|
|
|
3618
3618
|
|
|
3619
3619
|
// components/atoms/Switch.tsx
|
|
3620
3620
|
init_cn();
|
|
3621
|
-
var Switch =
|
|
3621
|
+
var Switch = React115.forwardRef(
|
|
3622
3622
|
({
|
|
3623
3623
|
checked,
|
|
3624
3624
|
defaultChecked = false,
|
|
@@ -3629,10 +3629,10 @@ var Switch = React114.forwardRef(
|
|
|
3629
3629
|
name,
|
|
3630
3630
|
className
|
|
3631
3631
|
}, ref) => {
|
|
3632
|
-
const [isChecked, setIsChecked] =
|
|
3632
|
+
const [isChecked, setIsChecked] = React115.useState(
|
|
3633
3633
|
checked !== void 0 ? checked : defaultChecked
|
|
3634
3634
|
);
|
|
3635
|
-
|
|
3635
|
+
React115.useEffect(() => {
|
|
3636
3636
|
if (checked !== void 0) {
|
|
3637
3637
|
setIsChecked(checked);
|
|
3638
3638
|
}
|
|
@@ -4138,8 +4138,8 @@ var LawReferenceTooltip = ({
|
|
|
4138
4138
|
position = "top",
|
|
4139
4139
|
className
|
|
4140
4140
|
}) => {
|
|
4141
|
-
const [isVisible, setIsVisible] =
|
|
4142
|
-
const timeoutRef =
|
|
4141
|
+
const [isVisible, setIsVisible] = React115__default.useState(false);
|
|
4142
|
+
const timeoutRef = React115__default.useRef(null);
|
|
4143
4143
|
const handleMouseEnter = () => {
|
|
4144
4144
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4145
4145
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -4148,7 +4148,7 @@ var LawReferenceTooltip = ({
|
|
|
4148
4148
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4149
4149
|
setIsVisible(false);
|
|
4150
4150
|
};
|
|
4151
|
-
|
|
4151
|
+
React115__default.useEffect(() => {
|
|
4152
4152
|
return () => {
|
|
4153
4153
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4154
4154
|
};
|
|
@@ -4346,7 +4346,7 @@ var sizeStyles5 = {
|
|
|
4346
4346
|
md: "w-2.5 h-2.5",
|
|
4347
4347
|
lg: "w-3 h-3"
|
|
4348
4348
|
};
|
|
4349
|
-
var StatusDot =
|
|
4349
|
+
var StatusDot = React115__default.forwardRef(
|
|
4350
4350
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
4351
4351
|
return /* @__PURE__ */ jsx(
|
|
4352
4352
|
"span",
|
|
@@ -4396,7 +4396,7 @@ var iconMap2 = {
|
|
|
4396
4396
|
down: TrendingDown,
|
|
4397
4397
|
flat: ArrowRight
|
|
4398
4398
|
};
|
|
4399
|
-
var TrendIndicator =
|
|
4399
|
+
var TrendIndicator = React115__default.forwardRef(
|
|
4400
4400
|
({
|
|
4401
4401
|
className,
|
|
4402
4402
|
value,
|
|
@@ -4459,7 +4459,7 @@ var thumbSizes = {
|
|
|
4459
4459
|
md: "w-4 h-4",
|
|
4460
4460
|
lg: "w-5 h-5"
|
|
4461
4461
|
};
|
|
4462
|
-
var RangeSlider =
|
|
4462
|
+
var RangeSlider = React115__default.forwardRef(
|
|
4463
4463
|
({
|
|
4464
4464
|
className,
|
|
4465
4465
|
min = 0,
|
|
@@ -4936,7 +4936,7 @@ var paddingClasses = {
|
|
|
4936
4936
|
md: "py-16",
|
|
4937
4937
|
lg: "py-24"
|
|
4938
4938
|
};
|
|
4939
|
-
var ContentSection =
|
|
4939
|
+
var ContentSection = React115__default.forwardRef(
|
|
4940
4940
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
4941
4941
|
return /* @__PURE__ */ jsx(
|
|
4942
4942
|
Box,
|
|
@@ -4978,7 +4978,7 @@ var animatedStyles = {
|
|
|
4978
4978
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
4979
4979
|
"none": {}
|
|
4980
4980
|
};
|
|
4981
|
-
var AnimatedReveal =
|
|
4981
|
+
var AnimatedReveal = React115__default.forwardRef(
|
|
4982
4982
|
({
|
|
4983
4983
|
trigger = "scroll",
|
|
4984
4984
|
animation = "fade-up",
|
|
@@ -5134,7 +5134,7 @@ function applyMorphAnimation(container, animate, duration, delay, easing) {
|
|
|
5134
5134
|
el.style.opacity = animate ? "1" : "0";
|
|
5135
5135
|
});
|
|
5136
5136
|
}
|
|
5137
|
-
var AnimatedGraphic =
|
|
5137
|
+
var AnimatedGraphic = React115__default.forwardRef(
|
|
5138
5138
|
({
|
|
5139
5139
|
src,
|
|
5140
5140
|
svgContent,
|
|
@@ -5157,7 +5157,7 @@ var AnimatedGraphic = React114__default.forwardRef(
|
|
|
5157
5157
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
5158
5158
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
5159
5159
|
const prevAnimateRef = useRef(animate);
|
|
5160
|
-
const setRef =
|
|
5160
|
+
const setRef = React115__default.useCallback(
|
|
5161
5161
|
(node) => {
|
|
5162
5162
|
containerRef.current = node;
|
|
5163
5163
|
if (typeof ref === "function") ref(node);
|
|
@@ -5334,9 +5334,9 @@ function ScoreDisplay({
|
|
|
5334
5334
|
...rest
|
|
5335
5335
|
}) {
|
|
5336
5336
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
|
|
5337
|
-
const [displayValue, setDisplayValue] =
|
|
5338
|
-
const [isAnimating, setIsAnimating] =
|
|
5339
|
-
|
|
5337
|
+
const [displayValue, setDisplayValue] = React115.useState(resolvedValue);
|
|
5338
|
+
const [isAnimating, setIsAnimating] = React115.useState(false);
|
|
5339
|
+
React115.useEffect(() => {
|
|
5340
5340
|
if (!animated || displayValue === resolvedValue) {
|
|
5341
5341
|
setDisplayValue(resolvedValue);
|
|
5342
5342
|
return;
|
|
@@ -5413,9 +5413,9 @@ function ControlButton({
|
|
|
5413
5413
|
className
|
|
5414
5414
|
}) {
|
|
5415
5415
|
const eventBus = useEventBus();
|
|
5416
|
-
const [isPressed, setIsPressed] =
|
|
5416
|
+
const [isPressed, setIsPressed] = React115.useState(false);
|
|
5417
5417
|
const actualPressed = pressed ?? isPressed;
|
|
5418
|
-
const handlePointerDown =
|
|
5418
|
+
const handlePointerDown = React115.useCallback(
|
|
5419
5419
|
(e) => {
|
|
5420
5420
|
e.preventDefault();
|
|
5421
5421
|
if (disabled) return;
|
|
@@ -5425,7 +5425,7 @@ function ControlButton({
|
|
|
5425
5425
|
},
|
|
5426
5426
|
[disabled, pressEvent, eventBus, onPress]
|
|
5427
5427
|
);
|
|
5428
|
-
const handlePointerUp =
|
|
5428
|
+
const handlePointerUp = React115.useCallback(
|
|
5429
5429
|
(e) => {
|
|
5430
5430
|
e.preventDefault();
|
|
5431
5431
|
if (disabled) return;
|
|
@@ -5435,7 +5435,7 @@ function ControlButton({
|
|
|
5435
5435
|
},
|
|
5436
5436
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
5437
5437
|
);
|
|
5438
|
-
const handlePointerLeave =
|
|
5438
|
+
const handlePointerLeave = React115.useCallback(
|
|
5439
5439
|
(e) => {
|
|
5440
5440
|
if (isPressed) {
|
|
5441
5441
|
setIsPressed(false);
|
|
@@ -6270,9 +6270,9 @@ function MiniMap({
|
|
|
6270
6270
|
viewportRect,
|
|
6271
6271
|
className
|
|
6272
6272
|
}) {
|
|
6273
|
-
const canvasRef =
|
|
6274
|
-
const frameRef =
|
|
6275
|
-
|
|
6273
|
+
const canvasRef = React115.useRef(null);
|
|
6274
|
+
const frameRef = React115.useRef(0);
|
|
6275
|
+
React115.useEffect(() => {
|
|
6276
6276
|
const canvas = canvasRef.current;
|
|
6277
6277
|
if (!canvas) return;
|
|
6278
6278
|
const ctx = canvas.getContext("2d");
|
|
@@ -6385,7 +6385,7 @@ var ErrorState = ({
|
|
|
6385
6385
|
);
|
|
6386
6386
|
};
|
|
6387
6387
|
ErrorState.displayName = "ErrorState";
|
|
6388
|
-
var ErrorBoundary = class extends
|
|
6388
|
+
var ErrorBoundary = class extends React115__default.Component {
|
|
6389
6389
|
constructor(props) {
|
|
6390
6390
|
super(props);
|
|
6391
6391
|
__publicField(this, "reset", () => {
|
|
@@ -6784,8 +6784,8 @@ var Tooltip = ({
|
|
|
6784
6784
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
6785
6785
|
};
|
|
6786
6786
|
}, []);
|
|
6787
|
-
const triggerElement =
|
|
6788
|
-
const trigger =
|
|
6787
|
+
const triggerElement = React115__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
6788
|
+
const trigger = React115__default.cloneElement(triggerElement, {
|
|
6789
6789
|
ref: triggerRef,
|
|
6790
6790
|
onMouseEnter: handleMouseEnter,
|
|
6791
6791
|
onMouseLeave: handleMouseLeave,
|
|
@@ -6902,8 +6902,8 @@ var Popover = ({
|
|
|
6902
6902
|
onMouseEnter: handleOpen,
|
|
6903
6903
|
onMouseLeave: handleClose
|
|
6904
6904
|
};
|
|
6905
|
-
const childElement =
|
|
6906
|
-
const triggerElement =
|
|
6905
|
+
const childElement = React115__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
6906
|
+
const triggerElement = React115__default.cloneElement(
|
|
6907
6907
|
childElement,
|
|
6908
6908
|
{
|
|
6909
6909
|
ref: triggerRef,
|
|
@@ -7010,8 +7010,8 @@ var Menu = ({
|
|
|
7010
7010
|
"bottom-start": "top-full left-0 mt-2",
|
|
7011
7011
|
"bottom-end": "top-full right-0 mt-2"
|
|
7012
7012
|
};
|
|
7013
|
-
const triggerChild =
|
|
7014
|
-
const triggerElement =
|
|
7013
|
+
const triggerChild = React115__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx("span", { children: trigger });
|
|
7014
|
+
const triggerElement = React115__default.cloneElement(
|
|
7015
7015
|
triggerChild,
|
|
7016
7016
|
{
|
|
7017
7017
|
ref: triggerRef,
|
|
@@ -7479,7 +7479,7 @@ var MapViewImpl = lazy(async () => {
|
|
|
7479
7479
|
shadowSize: [41, 41]
|
|
7480
7480
|
});
|
|
7481
7481
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
7482
|
-
const { useEffect: useEffect68, useRef: useRef65, useCallback:
|
|
7482
|
+
const { useEffect: useEffect68, useRef: useRef65, useCallback: useCallback110, useState: useState103 } = React115__default;
|
|
7483
7483
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
7484
7484
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
7485
7485
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
@@ -7523,8 +7523,8 @@ var MapViewImpl = lazy(async () => {
|
|
|
7523
7523
|
showAttribution = true
|
|
7524
7524
|
}) {
|
|
7525
7525
|
const eventBus = useEventBus2();
|
|
7526
|
-
const [clickedPosition, setClickedPosition] =
|
|
7527
|
-
const handleMapClick =
|
|
7526
|
+
const [clickedPosition, setClickedPosition] = useState103(null);
|
|
7527
|
+
const handleMapClick = useCallback110((lat, lng) => {
|
|
7528
7528
|
if (showClickedPin) {
|
|
7529
7529
|
setClickedPosition({ lat, lng });
|
|
7530
7530
|
}
|
|
@@ -7533,7 +7533,7 @@ var MapViewImpl = lazy(async () => {
|
|
|
7533
7533
|
eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
|
|
7534
7534
|
}
|
|
7535
7535
|
}, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
|
|
7536
|
-
const handleMarkerClick =
|
|
7536
|
+
const handleMarkerClick = useCallback110((marker) => {
|
|
7537
7537
|
onMarkerClick?.(marker);
|
|
7538
7538
|
if (markerClickEvent) {
|
|
7539
7539
|
eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
|
|
@@ -7753,7 +7753,7 @@ function InputPattern({
|
|
|
7753
7753
|
className
|
|
7754
7754
|
}) {
|
|
7755
7755
|
const { emit } = useEventBus();
|
|
7756
|
-
const [localValue, setLocalValue] =
|
|
7756
|
+
const [localValue, setLocalValue] = React115__default.useState(value);
|
|
7757
7757
|
const handleChange = (e) => {
|
|
7758
7758
|
setLocalValue(e.target.value);
|
|
7759
7759
|
if (onChange) {
|
|
@@ -7790,7 +7790,7 @@ function TextareaPattern({
|
|
|
7790
7790
|
className
|
|
7791
7791
|
}) {
|
|
7792
7792
|
const { emit } = useEventBus();
|
|
7793
|
-
const [localValue, setLocalValue] =
|
|
7793
|
+
const [localValue, setLocalValue] = React115__default.useState(value);
|
|
7794
7794
|
const handleChange = (e) => {
|
|
7795
7795
|
setLocalValue(e.target.value);
|
|
7796
7796
|
if (onChange) {
|
|
@@ -7821,7 +7821,7 @@ function SelectPattern({
|
|
|
7821
7821
|
className
|
|
7822
7822
|
}) {
|
|
7823
7823
|
const { emit } = useEventBus();
|
|
7824
|
-
const [localValue, setLocalValue] =
|
|
7824
|
+
const [localValue, setLocalValue] = React115__default.useState(value);
|
|
7825
7825
|
const handleChange = (e) => {
|
|
7826
7826
|
setLocalValue(e.target.value);
|
|
7827
7827
|
if (onChange) {
|
|
@@ -7850,7 +7850,7 @@ function CheckboxPattern({
|
|
|
7850
7850
|
className
|
|
7851
7851
|
}) {
|
|
7852
7852
|
const { emit } = useEventBus();
|
|
7853
|
-
const [localChecked, setLocalChecked] =
|
|
7853
|
+
const [localChecked, setLocalChecked] = React115__default.useState(checked);
|
|
7854
7854
|
const handleChange = (e) => {
|
|
7855
7855
|
setLocalChecked(e.target.checked);
|
|
7856
7856
|
if (onChange) {
|
|
@@ -8055,8 +8055,8 @@ function ActionButtons({
|
|
|
8055
8055
|
disabled
|
|
8056
8056
|
}) {
|
|
8057
8057
|
const eventBus = useEventBus();
|
|
8058
|
-
const [activeButtons, setActiveButtons] =
|
|
8059
|
-
const handlePress =
|
|
8058
|
+
const [activeButtons, setActiveButtons] = React115.useState(/* @__PURE__ */ new Set());
|
|
8059
|
+
const handlePress = React115.useCallback(
|
|
8060
8060
|
(id) => {
|
|
8061
8061
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
8062
8062
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -8064,7 +8064,7 @@ function ActionButtons({
|
|
|
8064
8064
|
},
|
|
8065
8065
|
[actionEvent, eventBus, onAction]
|
|
8066
8066
|
);
|
|
8067
|
-
const handleRelease =
|
|
8067
|
+
const handleRelease = React115.useCallback(
|
|
8068
8068
|
(id) => {
|
|
8069
8069
|
setActiveButtons((prev) => {
|
|
8070
8070
|
const next = new Set(prev);
|
|
@@ -9755,7 +9755,7 @@ var ScaledDiagram = ({
|
|
|
9755
9755
|
};
|
|
9756
9756
|
ScaledDiagram.displayName = "ScaledDiagram";
|
|
9757
9757
|
init_cn();
|
|
9758
|
-
var MarkdownContent =
|
|
9758
|
+
var MarkdownContent = React115__default.memo(
|
|
9759
9759
|
({ content, direction, className }) => {
|
|
9760
9760
|
const { t: _t } = useTranslate();
|
|
9761
9761
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -9961,7 +9961,7 @@ function computeFoldRegions(code) {
|
|
|
9961
9961
|
}
|
|
9962
9962
|
var LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
9963
9963
|
var HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
9964
|
-
var CodeBlock =
|
|
9964
|
+
var CodeBlock = React115__default.memo(
|
|
9965
9965
|
({
|
|
9966
9966
|
code: rawCode,
|
|
9967
9967
|
language = "text",
|
|
@@ -11193,7 +11193,7 @@ var StateMachineView = ({
|
|
|
11193
11193
|
style: { top: title ? 30 : 0 },
|
|
11194
11194
|
children: [
|
|
11195
11195
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
11196
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
11196
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React115__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
11197
11197
|
StateNode,
|
|
11198
11198
|
{
|
|
11199
11199
|
state,
|
|
@@ -16623,7 +16623,7 @@ function CraftingRecipe({
|
|
|
16623
16623
|
className
|
|
16624
16624
|
}) {
|
|
16625
16625
|
const eventBus = useEventBus();
|
|
16626
|
-
const handleCraft =
|
|
16626
|
+
const handleCraft = React115.useCallback(() => {
|
|
16627
16627
|
onCraft?.();
|
|
16628
16628
|
if (craftEvent) {
|
|
16629
16629
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -16640,7 +16640,7 @@ function CraftingRecipe({
|
|
|
16640
16640
|
children: [
|
|
16641
16641
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
16642
16642
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
16643
|
-
return /* @__PURE__ */ jsxs(
|
|
16643
|
+
return /* @__PURE__ */ jsxs(React115.Fragment, { children: [
|
|
16644
16644
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
16645
16645
|
ItemSlot,
|
|
16646
16646
|
{
|
|
@@ -16928,8 +16928,8 @@ function DPad({
|
|
|
16928
16928
|
}) {
|
|
16929
16929
|
const eventBus = useEventBus();
|
|
16930
16930
|
const sizes = sizeMap15[size];
|
|
16931
|
-
const [activeDirections, setActiveDirections] =
|
|
16932
|
-
const handlePress =
|
|
16931
|
+
const [activeDirections, setActiveDirections] = React115.useState(/* @__PURE__ */ new Set());
|
|
16932
|
+
const handlePress = React115.useCallback(
|
|
16933
16933
|
(direction) => {
|
|
16934
16934
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
16935
16935
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -16937,7 +16937,7 @@ function DPad({
|
|
|
16937
16937
|
},
|
|
16938
16938
|
[directionEvent, eventBus, onDirection]
|
|
16939
16939
|
);
|
|
16940
|
-
const handleRelease =
|
|
16940
|
+
const handleRelease = React115.useCallback(
|
|
16941
16941
|
(direction) => {
|
|
16942
16942
|
setActiveDirections((prev) => {
|
|
16943
16943
|
const next = new Set(prev);
|
|
@@ -17731,7 +17731,7 @@ var DataList = ({
|
|
|
17731
17731
|
}) => {
|
|
17732
17732
|
const eventBus = useEventBus();
|
|
17733
17733
|
const { t } = useTranslate();
|
|
17734
|
-
const [visibleCount, setVisibleCount] =
|
|
17734
|
+
const [visibleCount, setVisibleCount] = React115__default.useState(pageSize || Infinity);
|
|
17735
17735
|
const fields = fieldsProp ?? columnsProp ?? [];
|
|
17736
17736
|
const allData = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
17737
17737
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
@@ -17768,7 +17768,7 @@ var DataList = ({
|
|
|
17768
17768
|
const items2 = data.map((item) => item);
|
|
17769
17769
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
17770
17770
|
const contentField = titleField?.name ?? fields[0]?.name ?? "";
|
|
17771
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
17771
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React115__default.Fragment, { children: [
|
|
17772
17772
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
17773
17773
|
group.items.map((itemData, index) => {
|
|
17774
17774
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -17971,7 +17971,7 @@ var DataList = ({
|
|
|
17971
17971
|
className
|
|
17972
17972
|
),
|
|
17973
17973
|
children: [
|
|
17974
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
17974
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React115__default.Fragment, { children: [
|
|
17975
17975
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
17976
17976
|
group.items.map(
|
|
17977
17977
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -18009,6 +18009,7 @@ DataList.displayName = "DataList";
|
|
|
18009
18009
|
// components/organisms/DataTable.tsx
|
|
18010
18010
|
init_cn();
|
|
18011
18011
|
init_Typography();
|
|
18012
|
+
init_Typography();
|
|
18012
18013
|
|
|
18013
18014
|
// components/molecules/FormField.tsx
|
|
18014
18015
|
init_cn();
|
|
@@ -18973,7 +18974,7 @@ var WizardProgress = ({
|
|
|
18973
18974
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: steps.map((step, index) => {
|
|
18974
18975
|
const isActive = index === currentStep;
|
|
18975
18976
|
const isCompleted = index < currentStep;
|
|
18976
|
-
return /* @__PURE__ */ jsxs(
|
|
18977
|
+
return /* @__PURE__ */ jsxs(React115__default.Fragment, { children: [
|
|
18977
18978
|
/* @__PURE__ */ jsx(
|
|
18978
18979
|
"button",
|
|
18979
18980
|
{
|
|
@@ -19833,7 +19834,7 @@ function InventoryGrid({
|
|
|
19833
19834
|
const eventBus = useEventBus();
|
|
19834
19835
|
const slotCount = totalSlots ?? items.length;
|
|
19835
19836
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
19836
|
-
const handleSelect =
|
|
19837
|
+
const handleSelect = React115.useCallback(
|
|
19837
19838
|
(id) => {
|
|
19838
19839
|
onSelect?.(id);
|
|
19839
19840
|
if (selectEvent) {
|
|
@@ -20017,15 +20018,15 @@ function GameCanvas2D({
|
|
|
20017
20018
|
fps = 60,
|
|
20018
20019
|
className
|
|
20019
20020
|
}) {
|
|
20020
|
-
const canvasRef =
|
|
20021
|
-
const rafRef =
|
|
20022
|
-
const frameRef =
|
|
20023
|
-
const lastTimeRef =
|
|
20024
|
-
const onDrawRef =
|
|
20021
|
+
const canvasRef = React115.useRef(null);
|
|
20022
|
+
const rafRef = React115.useRef(0);
|
|
20023
|
+
const frameRef = React115.useRef(0);
|
|
20024
|
+
const lastTimeRef = React115.useRef(0);
|
|
20025
|
+
const onDrawRef = React115.useRef(onDraw);
|
|
20025
20026
|
onDrawRef.current = onDraw;
|
|
20026
|
-
const onTickRef =
|
|
20027
|
+
const onTickRef = React115.useRef(onTick);
|
|
20027
20028
|
onTickRef.current = onTick;
|
|
20028
|
-
|
|
20029
|
+
React115.useEffect(() => {
|
|
20029
20030
|
const canvas = canvasRef.current;
|
|
20030
20031
|
if (!canvas) return;
|
|
20031
20032
|
const ctx = canvas.getContext("2d");
|
|
@@ -20292,7 +20293,7 @@ function TurnPanel({
|
|
|
20292
20293
|
className
|
|
20293
20294
|
}) {
|
|
20294
20295
|
const eventBus = useEventBus();
|
|
20295
|
-
const handleAction =
|
|
20296
|
+
const handleAction = React115.useCallback(
|
|
20296
20297
|
(event) => {
|
|
20297
20298
|
if (event) {
|
|
20298
20299
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -20426,7 +20427,7 @@ function UnitCommandBar({
|
|
|
20426
20427
|
className
|
|
20427
20428
|
}) {
|
|
20428
20429
|
const eventBus = useEventBus();
|
|
20429
|
-
const handleCommand =
|
|
20430
|
+
const handleCommand = React115.useCallback(
|
|
20430
20431
|
(event) => {
|
|
20431
20432
|
if (event) {
|
|
20432
20433
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -20900,7 +20901,7 @@ function GameMenu({
|
|
|
20900
20901
|
} catch {
|
|
20901
20902
|
}
|
|
20902
20903
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
20903
|
-
const handleOptionClick =
|
|
20904
|
+
const handleOptionClick = React115.useCallback(
|
|
20904
20905
|
(option) => {
|
|
20905
20906
|
if (option.event && eventBus) {
|
|
20906
20907
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -21027,7 +21028,7 @@ function GameOverScreen({
|
|
|
21027
21028
|
} catch {
|
|
21028
21029
|
}
|
|
21029
21030
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
21030
|
-
const handleActionClick =
|
|
21031
|
+
const handleActionClick = React115.useCallback(
|
|
21031
21032
|
(action) => {
|
|
21032
21033
|
if (action.event && eventBus) {
|
|
21033
21034
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -24260,7 +24261,7 @@ var DocumentViewer = ({
|
|
|
24260
24261
|
DocumentViewer.displayName = "DocumentViewer";
|
|
24261
24262
|
init_useEventBus();
|
|
24262
24263
|
function extractTitle(children) {
|
|
24263
|
-
if (!
|
|
24264
|
+
if (!React115__default.isValidElement(children)) return void 0;
|
|
24264
24265
|
const props = children.props;
|
|
24265
24266
|
if (typeof props.title === "string") {
|
|
24266
24267
|
return props.title;
|
|
@@ -24318,7 +24319,7 @@ function LinearView({
|
|
|
24318
24319
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
24319
24320
|
const isDone = i < currentIdx;
|
|
24320
24321
|
const isCurrent = i === currentIdx;
|
|
24321
|
-
return /* @__PURE__ */ jsxs(
|
|
24322
|
+
return /* @__PURE__ */ jsxs(React115__default.Fragment, { children: [
|
|
24322
24323
|
i > 0 && /* @__PURE__ */ jsx(
|
|
24323
24324
|
Typography,
|
|
24324
24325
|
{
|
|
@@ -24992,7 +24993,7 @@ var Form = ({
|
|
|
24992
24993
|
const normalizedInitialData = initialData ?? {};
|
|
24993
24994
|
const resolvedEntity = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
24994
24995
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
24995
|
-
const entityDerivedFields =
|
|
24996
|
+
const entityDerivedFields = React115__default.useMemo(() => {
|
|
24996
24997
|
if (fields && fields.length > 0) return void 0;
|
|
24997
24998
|
if (!resolvedEntity) return void 0;
|
|
24998
24999
|
return resolvedEntity.fields.map(
|
|
@@ -25011,14 +25012,14 @@ var Form = ({
|
|
|
25011
25012
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
25012
25013
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
25013
25014
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
25014
|
-
const [formData, setFormData] =
|
|
25015
|
+
const [formData, setFormData] = React115__default.useState(
|
|
25015
25016
|
normalizedInitialData
|
|
25016
25017
|
);
|
|
25017
|
-
const [collapsedSections, setCollapsedSections] =
|
|
25018
|
+
const [collapsedSections, setCollapsedSections] = React115__default.useState(
|
|
25018
25019
|
/* @__PURE__ */ new Set()
|
|
25019
25020
|
);
|
|
25020
25021
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
25021
|
-
const evalContext =
|
|
25022
|
+
const evalContext = React115__default.useMemo(
|
|
25022
25023
|
() => ({
|
|
25023
25024
|
formValues: formData,
|
|
25024
25025
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -25027,13 +25028,13 @@ var Form = ({
|
|
|
25027
25028
|
}),
|
|
25028
25029
|
[formData, externalContext]
|
|
25029
25030
|
);
|
|
25030
|
-
|
|
25031
|
+
React115__default.useEffect(() => {
|
|
25031
25032
|
const data = initialData;
|
|
25032
25033
|
if (data && Object.keys(data).length > 0) {
|
|
25033
25034
|
setFormData(data);
|
|
25034
25035
|
}
|
|
25035
25036
|
}, [initialData]);
|
|
25036
|
-
const processCalculations =
|
|
25037
|
+
const processCalculations = React115__default.useCallback(
|
|
25037
25038
|
(changedFieldId, newFormData) => {
|
|
25038
25039
|
if (!hiddenCalculations.length) return;
|
|
25039
25040
|
const context = {
|
|
@@ -25058,7 +25059,7 @@ var Form = ({
|
|
|
25058
25059
|
},
|
|
25059
25060
|
[hiddenCalculations, externalContext, eventBus]
|
|
25060
25061
|
);
|
|
25061
|
-
const checkViolations =
|
|
25062
|
+
const checkViolations = React115__default.useCallback(
|
|
25062
25063
|
(changedFieldId, newFormData) => {
|
|
25063
25064
|
if (!violationTriggers.length) return;
|
|
25064
25065
|
const context = {
|
|
@@ -25095,7 +25096,7 @@ var Form = ({
|
|
|
25095
25096
|
processCalculations(name, newFormData);
|
|
25096
25097
|
checkViolations(name, newFormData);
|
|
25097
25098
|
};
|
|
25098
|
-
const isFieldVisible =
|
|
25099
|
+
const isFieldVisible = React115__default.useCallback(
|
|
25099
25100
|
(fieldName) => {
|
|
25100
25101
|
const condition = conditionalFields[fieldName];
|
|
25101
25102
|
if (!condition) return true;
|
|
@@ -25103,7 +25104,7 @@ var Form = ({
|
|
|
25103
25104
|
},
|
|
25104
25105
|
[conditionalFields, evalContext]
|
|
25105
25106
|
);
|
|
25106
|
-
const isSectionVisible =
|
|
25107
|
+
const isSectionVisible = React115__default.useCallback(
|
|
25107
25108
|
(section) => {
|
|
25108
25109
|
if (!section.condition) return true;
|
|
25109
25110
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -25135,7 +25136,7 @@ var Form = ({
|
|
|
25135
25136
|
eventBus.emit(`UI:${onCancel}`);
|
|
25136
25137
|
}
|
|
25137
25138
|
};
|
|
25138
|
-
const renderField =
|
|
25139
|
+
const renderField = React115__default.useCallback(
|
|
25139
25140
|
(field) => {
|
|
25140
25141
|
const fieldName = field.name || field.field;
|
|
25141
25142
|
if (!fieldName) return null;
|
|
@@ -25156,7 +25157,7 @@ var Form = ({
|
|
|
25156
25157
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
25157
25158
|
);
|
|
25158
25159
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
25159
|
-
const normalizedFields =
|
|
25160
|
+
const normalizedFields = React115__default.useMemo(() => {
|
|
25160
25161
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
25161
25162
|
return effectiveFields.map((field) => {
|
|
25162
25163
|
if (typeof field === "string") {
|
|
@@ -25178,7 +25179,7 @@ var Form = ({
|
|
|
25178
25179
|
return field;
|
|
25179
25180
|
});
|
|
25180
25181
|
}, [effectiveFields, resolvedEntity]);
|
|
25181
|
-
const schemaFields =
|
|
25182
|
+
const schemaFields = React115__default.useMemo(() => {
|
|
25182
25183
|
if (normalizedFields.length === 0) return null;
|
|
25183
25184
|
if (isDebugEnabled()) {
|
|
25184
25185
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -25188,7 +25189,7 @@ var Form = ({
|
|
|
25188
25189
|
}
|
|
25189
25190
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
25190
25191
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
25191
|
-
const sectionElements =
|
|
25192
|
+
const sectionElements = React115__default.useMemo(() => {
|
|
25192
25193
|
if (!sections || sections.length === 0) return null;
|
|
25193
25194
|
return sections.map((section) => {
|
|
25194
25195
|
if (!isSectionVisible(section)) {
|
|
@@ -26616,7 +26617,7 @@ var List2 = ({
|
|
|
26616
26617
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
26617
26618
|
return [];
|
|
26618
26619
|
}, [entity]);
|
|
26619
|
-
const getItemActions =
|
|
26620
|
+
const getItemActions = React115__default.useCallback(
|
|
26620
26621
|
(item) => {
|
|
26621
26622
|
if (!itemActions) return [];
|
|
26622
26623
|
if (typeof itemActions === "function") {
|
|
@@ -27050,7 +27051,7 @@ var MediaGallery = ({
|
|
|
27050
27051
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
27051
27052
|
);
|
|
27052
27053
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
27053
|
-
const items =
|
|
27054
|
+
const items = React115__default.useMemo(() => {
|
|
27054
27055
|
if (propItems) return propItems;
|
|
27055
27056
|
if (entityData.length === 0) return [];
|
|
27056
27057
|
return entityData.map((record, idx) => ({
|
|
@@ -27213,7 +27214,7 @@ var MediaGallery = ({
|
|
|
27213
27214
|
MediaGallery.displayName = "MediaGallery";
|
|
27214
27215
|
init_useEventBus();
|
|
27215
27216
|
function extractTitle2(children) {
|
|
27216
|
-
if (!
|
|
27217
|
+
if (!React115__default.isValidElement(children)) return void 0;
|
|
27217
27218
|
const props = children.props;
|
|
27218
27219
|
if (typeof props.title === "string") {
|
|
27219
27220
|
return props.title;
|
|
@@ -27894,7 +27895,7 @@ var PageHeader = ({
|
|
|
27894
27895
|
info: "bg-info/10 text-info"
|
|
27895
27896
|
};
|
|
27896
27897
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
27897
|
-
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(
|
|
27898
|
+
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(React115__default.Fragment, { children: [
|
|
27898
27899
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
27899
27900
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
27900
27901
|
"a",
|
|
@@ -28023,7 +28024,7 @@ function subscribeToDebugEvents(listener) {
|
|
|
28023
28024
|
|
|
28024
28025
|
// components/organisms/debug/hooks/useDebugData.ts
|
|
28025
28026
|
function useDebugData() {
|
|
28026
|
-
const [data, setData] =
|
|
28027
|
+
const [data, setData] = React115.useState(() => ({
|
|
28027
28028
|
traits: [],
|
|
28028
28029
|
ticks: [],
|
|
28029
28030
|
guards: [],
|
|
@@ -28037,7 +28038,7 @@ function useDebugData() {
|
|
|
28037
28038
|
},
|
|
28038
28039
|
lastUpdate: Date.now()
|
|
28039
28040
|
}));
|
|
28040
|
-
|
|
28041
|
+
React115.useEffect(() => {
|
|
28041
28042
|
const updateData = () => {
|
|
28042
28043
|
setData({
|
|
28043
28044
|
traits: getAllTraits(),
|
|
@@ -28134,12 +28135,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
28134
28135
|
return positions;
|
|
28135
28136
|
}
|
|
28136
28137
|
function WalkMinimap() {
|
|
28137
|
-
const [walkStep, setWalkStep] =
|
|
28138
|
-
const [traits2, setTraits] =
|
|
28139
|
-
const [coveredEdges, setCoveredEdges] =
|
|
28140
|
-
const [completedTraits, setCompletedTraits] =
|
|
28141
|
-
const prevTraitRef =
|
|
28142
|
-
|
|
28138
|
+
const [walkStep, setWalkStep] = React115.useState(null);
|
|
28139
|
+
const [traits2, setTraits] = React115.useState([]);
|
|
28140
|
+
const [coveredEdges, setCoveredEdges] = React115.useState([]);
|
|
28141
|
+
const [completedTraits, setCompletedTraits] = React115.useState(/* @__PURE__ */ new Set());
|
|
28142
|
+
const prevTraitRef = React115.useRef(null);
|
|
28143
|
+
React115.useEffect(() => {
|
|
28143
28144
|
const interval = setInterval(() => {
|
|
28144
28145
|
const w = window;
|
|
28145
28146
|
const step = w.__orbitalWalkStep;
|
|
@@ -28568,15 +28569,15 @@ var TYPE_BADGES = {
|
|
|
28568
28569
|
state: { variant: "danger", icon: "\u{1F4CA}" }
|
|
28569
28570
|
};
|
|
28570
28571
|
function EventFlowTab({ events: events2 }) {
|
|
28571
|
-
const [filter, setFilter] =
|
|
28572
|
-
const containerRef =
|
|
28573
|
-
const [autoScroll, setAutoScroll] =
|
|
28574
|
-
|
|
28572
|
+
const [filter, setFilter] = React115.useState("all");
|
|
28573
|
+
const containerRef = React115.useRef(null);
|
|
28574
|
+
const [autoScroll, setAutoScroll] = React115.useState(true);
|
|
28575
|
+
React115.useEffect(() => {
|
|
28575
28576
|
if (autoScroll && containerRef.current) {
|
|
28576
28577
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
28577
28578
|
}
|
|
28578
28579
|
}, [events2.length, autoScroll]);
|
|
28579
|
-
const filteredEvents =
|
|
28580
|
+
const filteredEvents = React115.useMemo(() => {
|
|
28580
28581
|
if (filter === "all") return events2;
|
|
28581
28582
|
return events2.filter((e) => e.type === filter);
|
|
28582
28583
|
}, [events2, filter]);
|
|
@@ -28676,7 +28677,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
28676
28677
|
EventFlowTab.displayName = "EventFlowTab";
|
|
28677
28678
|
init_Typography();
|
|
28678
28679
|
function GuardsPanel({ guards }) {
|
|
28679
|
-
const [filter, setFilter] =
|
|
28680
|
+
const [filter, setFilter] = React115.useState("all");
|
|
28680
28681
|
if (guards.length === 0) {
|
|
28681
28682
|
return /* @__PURE__ */ jsx(
|
|
28682
28683
|
EmptyState,
|
|
@@ -28689,7 +28690,7 @@ function GuardsPanel({ guards }) {
|
|
|
28689
28690
|
}
|
|
28690
28691
|
const passedCount = guards.filter((g) => g.result).length;
|
|
28691
28692
|
const failedCount = guards.length - passedCount;
|
|
28692
|
-
const filteredGuards =
|
|
28693
|
+
const filteredGuards = React115.useMemo(() => {
|
|
28693
28694
|
if (filter === "all") return guards;
|
|
28694
28695
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
28695
28696
|
return guards.filter((g) => !g.result);
|
|
@@ -28837,10 +28838,10 @@ function EffectBadge({ effect }) {
|
|
|
28837
28838
|
] });
|
|
28838
28839
|
}
|
|
28839
28840
|
function TransitionTimeline({ transitions }) {
|
|
28840
|
-
const containerRef =
|
|
28841
|
-
const [autoScroll, setAutoScroll] =
|
|
28842
|
-
const [expandedId, setExpandedId] =
|
|
28843
|
-
|
|
28841
|
+
const containerRef = React115.useRef(null);
|
|
28842
|
+
const [autoScroll, setAutoScroll] = React115.useState(true);
|
|
28843
|
+
const [expandedId, setExpandedId] = React115.useState(null);
|
|
28844
|
+
React115.useEffect(() => {
|
|
28844
28845
|
if (autoScroll && containerRef.current) {
|
|
28845
28846
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
28846
28847
|
}
|
|
@@ -29106,9 +29107,9 @@ function getAllEvents(traits2) {
|
|
|
29106
29107
|
}
|
|
29107
29108
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
29108
29109
|
const eventBus = useEventBus();
|
|
29109
|
-
const [log3, setLog] =
|
|
29110
|
-
const prevStatesRef =
|
|
29111
|
-
|
|
29110
|
+
const [log3, setLog] = React115.useState([]);
|
|
29111
|
+
const prevStatesRef = React115.useRef(/* @__PURE__ */ new Map());
|
|
29112
|
+
React115.useEffect(() => {
|
|
29112
29113
|
for (const trait of traits2) {
|
|
29113
29114
|
const prev = prevStatesRef.current.get(trait.id);
|
|
29114
29115
|
if (prev && prev !== trait.currentState) {
|
|
@@ -29261,9 +29262,9 @@ function VerifyModePanel({
|
|
|
29261
29262
|
serverCount,
|
|
29262
29263
|
localCount
|
|
29263
29264
|
}) {
|
|
29264
|
-
const scrollRef =
|
|
29265
|
-
const prevCountRef =
|
|
29266
|
-
|
|
29265
|
+
const scrollRef = React115.useRef(null);
|
|
29266
|
+
const prevCountRef = React115.useRef(0);
|
|
29267
|
+
React115.useEffect(() => {
|
|
29267
29268
|
if (transitions.length > prevCountRef.current && scrollRef.current) {
|
|
29268
29269
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
29269
29270
|
}
|
|
@@ -29311,10 +29312,10 @@ function RuntimeDebugger({
|
|
|
29311
29312
|
defaultTab,
|
|
29312
29313
|
schema
|
|
29313
29314
|
}) {
|
|
29314
|
-
const [isCollapsed, setIsCollapsed] =
|
|
29315
|
-
const [isVisible, setIsVisible] =
|
|
29315
|
+
const [isCollapsed, setIsCollapsed] = React115.useState(mode === "verify" ? true : defaultCollapsed);
|
|
29316
|
+
const [isVisible, setIsVisible] = React115.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
29316
29317
|
const debugData = useDebugData();
|
|
29317
|
-
|
|
29318
|
+
React115.useEffect(() => {
|
|
29318
29319
|
if (mode === "inline") return;
|
|
29319
29320
|
return onDebugToggle((enabled) => {
|
|
29320
29321
|
setIsVisible(enabled);
|
|
@@ -29323,7 +29324,7 @@ function RuntimeDebugger({
|
|
|
29323
29324
|
}
|
|
29324
29325
|
});
|
|
29325
29326
|
}, [mode]);
|
|
29326
|
-
|
|
29327
|
+
React115.useEffect(() => {
|
|
29327
29328
|
if (mode === "inline") return;
|
|
29328
29329
|
const handleKeyDown = (e) => {
|
|
29329
29330
|
if (e.key === "`" && isVisible) {
|
|
@@ -29839,7 +29840,7 @@ function SequenceBar({
|
|
|
29839
29840
|
onSlotRemove(index);
|
|
29840
29841
|
}, [onSlotRemove, playing]);
|
|
29841
29842
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
29842
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
29843
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React115__default.Fragment, { children: [
|
|
29843
29844
|
i > 0 && /* @__PURE__ */ jsx(
|
|
29844
29845
|
Typography,
|
|
29845
29846
|
{
|
|
@@ -31100,7 +31101,7 @@ var StatCard = ({
|
|
|
31100
31101
|
const labelToUse = propLabel ?? propTitle;
|
|
31101
31102
|
const eventBus = useEventBus();
|
|
31102
31103
|
const { t } = useTranslate();
|
|
31103
|
-
const handleActionClick =
|
|
31104
|
+
const handleActionClick = React115__default.useCallback(() => {
|
|
31104
31105
|
if (action?.event) {
|
|
31105
31106
|
eventBus.emit(`UI:${action.event}`, {});
|
|
31106
31107
|
}
|
|
@@ -31111,7 +31112,7 @@ var StatCard = ({
|
|
|
31111
31112
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
31112
31113
|
const isLoading = externalLoading ?? false;
|
|
31113
31114
|
const error = externalError;
|
|
31114
|
-
const computeMetricValue =
|
|
31115
|
+
const computeMetricValue = React115__default.useCallback(
|
|
31115
31116
|
(metric, items) => {
|
|
31116
31117
|
if (metric.value !== void 0) {
|
|
31117
31118
|
return metric.value;
|
|
@@ -31150,7 +31151,7 @@ var StatCard = ({
|
|
|
31150
31151
|
},
|
|
31151
31152
|
[]
|
|
31152
31153
|
);
|
|
31153
|
-
const schemaStats =
|
|
31154
|
+
const schemaStats = React115__default.useMemo(() => {
|
|
31154
31155
|
if (!metrics || metrics.length === 0) return null;
|
|
31155
31156
|
return metrics.map((metric) => ({
|
|
31156
31157
|
label: metric.label,
|
|
@@ -31158,7 +31159,7 @@ var StatCard = ({
|
|
|
31158
31159
|
format: metric.format
|
|
31159
31160
|
}));
|
|
31160
31161
|
}, [metrics, data, computeMetricValue]);
|
|
31161
|
-
const calculatedTrend =
|
|
31162
|
+
const calculatedTrend = React115__default.useMemo(() => {
|
|
31162
31163
|
if (manualTrend !== void 0) return manualTrend;
|
|
31163
31164
|
if (previousValue === void 0 || currentValue === void 0)
|
|
31164
31165
|
return void 0;
|
|
@@ -32090,7 +32091,7 @@ var Timeline = ({
|
|
|
32090
32091
|
}) => {
|
|
32091
32092
|
const { t } = useTranslate();
|
|
32092
32093
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
32093
|
-
const items =
|
|
32094
|
+
const items = React115__default.useMemo(() => {
|
|
32094
32095
|
if (propItems) return propItems;
|
|
32095
32096
|
if (entityData.length === 0) return [];
|
|
32096
32097
|
return entityData.map((record, idx) => {
|
|
@@ -32193,7 +32194,7 @@ var Timeline = ({
|
|
|
32193
32194
|
Timeline.displayName = "Timeline";
|
|
32194
32195
|
init_useEventBus();
|
|
32195
32196
|
function extractToastProps(children) {
|
|
32196
|
-
if (!
|
|
32197
|
+
if (!React115__default.isValidElement(children)) {
|
|
32197
32198
|
if (typeof children === "string") {
|
|
32198
32199
|
return { message: children };
|
|
32199
32200
|
}
|
|
@@ -32224,7 +32225,7 @@ var ToastSlot = ({
|
|
|
32224
32225
|
eventBus.emit("UI:CLOSE");
|
|
32225
32226
|
};
|
|
32226
32227
|
if (!isVisible) return null;
|
|
32227
|
-
const isCustomContent =
|
|
32228
|
+
const isCustomContent = React115__default.isValidElement(children) && !message;
|
|
32228
32229
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
32229
32230
|
Toast,
|
|
32230
32231
|
{
|
|
@@ -32476,7 +32477,7 @@ var WizardContainer = ({
|
|
|
32476
32477
|
const isCompleted = index < currentStep;
|
|
32477
32478
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
32478
32479
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
32479
|
-
return /* @__PURE__ */ jsxs(
|
|
32480
|
+
return /* @__PURE__ */ jsxs(React115__default.Fragment, { children: [
|
|
32480
32481
|
/* @__PURE__ */ jsx(
|
|
32481
32482
|
Button,
|
|
32482
32483
|
{
|
|
@@ -32846,12 +32847,12 @@ WorldMapTemplate.displayName = "WorldMapTemplate";
|
|
|
32846
32847
|
|
|
32847
32848
|
// components/organisms/component-registry.generated.ts
|
|
32848
32849
|
function lazyThree(name, loader) {
|
|
32849
|
-
const Lazy =
|
|
32850
|
+
const Lazy = React115__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
32850
32851
|
function ThreeWrapper(props) {
|
|
32851
|
-
return
|
|
32852
|
-
|
|
32852
|
+
return React115__default.createElement(
|
|
32853
|
+
React115__default.Suspense,
|
|
32853
32854
|
{ fallback: null },
|
|
32854
|
-
|
|
32855
|
+
React115__default.createElement(Lazy, props)
|
|
32855
32856
|
);
|
|
32856
32857
|
}
|
|
32857
32858
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -33139,7 +33140,7 @@ function SuspenseConfigProvider({
|
|
|
33139
33140
|
config,
|
|
33140
33141
|
children
|
|
33141
33142
|
}) {
|
|
33142
|
-
return
|
|
33143
|
+
return React115__default.createElement(
|
|
33143
33144
|
SuspenseConfigContext.Provider,
|
|
33144
33145
|
{ value: config },
|
|
33145
33146
|
children
|
|
@@ -34134,7 +34135,7 @@ function SchemaRunner({ schema, serverUrl, mockData, pageName, onNavigate, onLoc
|
|
|
34134
34135
|
const entityStore = useEntityStore();
|
|
34135
34136
|
const seededRef = useRef("");
|
|
34136
34137
|
const mockKey = mockData ? Object.keys(mockData).sort().join(",") : "";
|
|
34137
|
-
|
|
34138
|
+
React115__default.useLayoutEffect(() => {
|
|
34138
34139
|
if (!serverUrl && mockData && seededRef.current !== mockKey) {
|
|
34139
34140
|
seededRef.current = mockKey;
|
|
34140
34141
|
for (const [entityType, records] of Object.entries(mockData)) {
|