@almadar/ui 2.56.0 → 2.58.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 +1245 -1239
- package/dist/avl/index.js +174 -168
- package/dist/components/index.cjs +1180 -1056
- package/dist/components/index.js +277 -154
- package/dist/components/molecules/FileTree.d.ts +37 -0
- package/dist/components/molecules/index.d.ts +1 -0
- package/dist/providers/index.cjs +185 -182
- package/dist/providers/index.js +48 -45
- package/dist/runtime/index.cjs +916 -913
- package/dist/runtime/index.js +152 -149
- 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",
|
|
@@ -10162,7 +10162,7 @@ var CodeBlock = React114__default.memo(
|
|
|
10162
10162
|
}
|
|
10163
10163
|
};
|
|
10164
10164
|
const hasHeader = showLanguageBadge || showCopyButton;
|
|
10165
|
-
return /* @__PURE__ */ jsxs(Box, { className: `relative group ${className || ""}`, children: [
|
|
10165
|
+
return /* @__PURE__ */ jsxs(Box, { className: `relative group ${className || ""}`, style: { display: "flex", flexDirection: "column", height: "100%" }, children: [
|
|
10166
10166
|
hasHeader && /* @__PURE__ */ jsxs(
|
|
10167
10167
|
HStack,
|
|
10168
10168
|
{
|
|
@@ -10215,8 +10215,8 @@ var CodeBlock = React114__default.memo(
|
|
|
10215
10215
|
{
|
|
10216
10216
|
style: {
|
|
10217
10217
|
position: "relative",
|
|
10218
|
-
|
|
10219
|
-
minHeight:
|
|
10218
|
+
flex: 1,
|
|
10219
|
+
minHeight: 0,
|
|
10220
10220
|
maxHeight,
|
|
10221
10221
|
backgroundColor: "#1e1e1e",
|
|
10222
10222
|
borderRadius: hasHeader ? "0 0 0.5rem 0.5rem" : "0.5rem",
|
|
@@ -10312,6 +10312,8 @@ var CodeBlock = React114__default.memo(
|
|
|
10312
10312
|
{
|
|
10313
10313
|
ref: scrollRef,
|
|
10314
10314
|
style: {
|
|
10315
|
+
flex: 1,
|
|
10316
|
+
minHeight: 0,
|
|
10315
10317
|
overflowX: "auto",
|
|
10316
10318
|
overflowY: "auto",
|
|
10317
10319
|
WebkitOverflowScrolling: "touch",
|
|
@@ -11193,7 +11195,7 @@ var StateMachineView = ({
|
|
|
11193
11195
|
style: { top: title ? 30 : 0 },
|
|
11194
11196
|
children: [
|
|
11195
11197
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
11196
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
11198
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React115__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
11197
11199
|
StateNode,
|
|
11198
11200
|
{
|
|
11199
11201
|
state,
|
|
@@ -16623,7 +16625,7 @@ function CraftingRecipe({
|
|
|
16623
16625
|
className
|
|
16624
16626
|
}) {
|
|
16625
16627
|
const eventBus = useEventBus();
|
|
16626
|
-
const handleCraft =
|
|
16628
|
+
const handleCraft = React115.useCallback(() => {
|
|
16627
16629
|
onCraft?.();
|
|
16628
16630
|
if (craftEvent) {
|
|
16629
16631
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -16640,7 +16642,7 @@ function CraftingRecipe({
|
|
|
16640
16642
|
children: [
|
|
16641
16643
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
16642
16644
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
16643
|
-
return /* @__PURE__ */ jsxs(
|
|
16645
|
+
return /* @__PURE__ */ jsxs(React115.Fragment, { children: [
|
|
16644
16646
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
16645
16647
|
ItemSlot,
|
|
16646
16648
|
{
|
|
@@ -16928,8 +16930,8 @@ function DPad({
|
|
|
16928
16930
|
}) {
|
|
16929
16931
|
const eventBus = useEventBus();
|
|
16930
16932
|
const sizes = sizeMap15[size];
|
|
16931
|
-
const [activeDirections, setActiveDirections] =
|
|
16932
|
-
const handlePress =
|
|
16933
|
+
const [activeDirections, setActiveDirections] = React115.useState(/* @__PURE__ */ new Set());
|
|
16934
|
+
const handlePress = React115.useCallback(
|
|
16933
16935
|
(direction) => {
|
|
16934
16936
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
16935
16937
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -16937,7 +16939,7 @@ function DPad({
|
|
|
16937
16939
|
},
|
|
16938
16940
|
[directionEvent, eventBus, onDirection]
|
|
16939
16941
|
);
|
|
16940
|
-
const handleRelease =
|
|
16942
|
+
const handleRelease = React115.useCallback(
|
|
16941
16943
|
(direction) => {
|
|
16942
16944
|
setActiveDirections((prev) => {
|
|
16943
16945
|
const next = new Set(prev);
|
|
@@ -17731,7 +17733,7 @@ var DataList = ({
|
|
|
17731
17733
|
}) => {
|
|
17732
17734
|
const eventBus = useEventBus();
|
|
17733
17735
|
const { t } = useTranslate();
|
|
17734
|
-
const [visibleCount, setVisibleCount] =
|
|
17736
|
+
const [visibleCount, setVisibleCount] = React115__default.useState(pageSize || Infinity);
|
|
17735
17737
|
const fields = fieldsProp ?? columnsProp ?? [];
|
|
17736
17738
|
const allData = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
17737
17739
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
@@ -17768,7 +17770,7 @@ var DataList = ({
|
|
|
17768
17770
|
const items2 = data.map((item) => item);
|
|
17769
17771
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
17770
17772
|
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(
|
|
17773
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React115__default.Fragment, { children: [
|
|
17772
17774
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
17773
17775
|
group.items.map((itemData, index) => {
|
|
17774
17776
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -17971,7 +17973,7 @@ var DataList = ({
|
|
|
17971
17973
|
className
|
|
17972
17974
|
),
|
|
17973
17975
|
children: [
|
|
17974
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
17976
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React115__default.Fragment, { children: [
|
|
17975
17977
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
17976
17978
|
group.items.map(
|
|
17977
17979
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -18009,6 +18011,7 @@ DataList.displayName = "DataList";
|
|
|
18009
18011
|
// components/organisms/DataTable.tsx
|
|
18010
18012
|
init_cn();
|
|
18011
18013
|
init_Typography();
|
|
18014
|
+
init_Typography();
|
|
18012
18015
|
|
|
18013
18016
|
// components/molecules/FormField.tsx
|
|
18014
18017
|
init_cn();
|
|
@@ -18973,7 +18976,7 @@ var WizardProgress = ({
|
|
|
18973
18976
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: steps.map((step, index) => {
|
|
18974
18977
|
const isActive = index === currentStep;
|
|
18975
18978
|
const isCompleted = index < currentStep;
|
|
18976
|
-
return /* @__PURE__ */ jsxs(
|
|
18979
|
+
return /* @__PURE__ */ jsxs(React115__default.Fragment, { children: [
|
|
18977
18980
|
/* @__PURE__ */ jsx(
|
|
18978
18981
|
"button",
|
|
18979
18982
|
{
|
|
@@ -19833,7 +19836,7 @@ function InventoryGrid({
|
|
|
19833
19836
|
const eventBus = useEventBus();
|
|
19834
19837
|
const slotCount = totalSlots ?? items.length;
|
|
19835
19838
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
19836
|
-
const handleSelect =
|
|
19839
|
+
const handleSelect = React115.useCallback(
|
|
19837
19840
|
(id) => {
|
|
19838
19841
|
onSelect?.(id);
|
|
19839
19842
|
if (selectEvent) {
|
|
@@ -20017,15 +20020,15 @@ function GameCanvas2D({
|
|
|
20017
20020
|
fps = 60,
|
|
20018
20021
|
className
|
|
20019
20022
|
}) {
|
|
20020
|
-
const canvasRef =
|
|
20021
|
-
const rafRef =
|
|
20022
|
-
const frameRef =
|
|
20023
|
-
const lastTimeRef =
|
|
20024
|
-
const onDrawRef =
|
|
20023
|
+
const canvasRef = React115.useRef(null);
|
|
20024
|
+
const rafRef = React115.useRef(0);
|
|
20025
|
+
const frameRef = React115.useRef(0);
|
|
20026
|
+
const lastTimeRef = React115.useRef(0);
|
|
20027
|
+
const onDrawRef = React115.useRef(onDraw);
|
|
20025
20028
|
onDrawRef.current = onDraw;
|
|
20026
|
-
const onTickRef =
|
|
20029
|
+
const onTickRef = React115.useRef(onTick);
|
|
20027
20030
|
onTickRef.current = onTick;
|
|
20028
|
-
|
|
20031
|
+
React115.useEffect(() => {
|
|
20029
20032
|
const canvas = canvasRef.current;
|
|
20030
20033
|
if (!canvas) return;
|
|
20031
20034
|
const ctx = canvas.getContext("2d");
|
|
@@ -20292,7 +20295,7 @@ function TurnPanel({
|
|
|
20292
20295
|
className
|
|
20293
20296
|
}) {
|
|
20294
20297
|
const eventBus = useEventBus();
|
|
20295
|
-
const handleAction =
|
|
20298
|
+
const handleAction = React115.useCallback(
|
|
20296
20299
|
(event) => {
|
|
20297
20300
|
if (event) {
|
|
20298
20301
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -20426,7 +20429,7 @@ function UnitCommandBar({
|
|
|
20426
20429
|
className
|
|
20427
20430
|
}) {
|
|
20428
20431
|
const eventBus = useEventBus();
|
|
20429
|
-
const handleCommand =
|
|
20432
|
+
const handleCommand = React115.useCallback(
|
|
20430
20433
|
(event) => {
|
|
20431
20434
|
if (event) {
|
|
20432
20435
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -20900,7 +20903,7 @@ function GameMenu({
|
|
|
20900
20903
|
} catch {
|
|
20901
20904
|
}
|
|
20902
20905
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
20903
|
-
const handleOptionClick =
|
|
20906
|
+
const handleOptionClick = React115.useCallback(
|
|
20904
20907
|
(option) => {
|
|
20905
20908
|
if (option.event && eventBus) {
|
|
20906
20909
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -21027,7 +21030,7 @@ function GameOverScreen({
|
|
|
21027
21030
|
} catch {
|
|
21028
21031
|
}
|
|
21029
21032
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
21030
|
-
const handleActionClick =
|
|
21033
|
+
const handleActionClick = React115.useCallback(
|
|
21031
21034
|
(action) => {
|
|
21032
21035
|
if (action.event && eventBus) {
|
|
21033
21036
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -24260,7 +24263,7 @@ var DocumentViewer = ({
|
|
|
24260
24263
|
DocumentViewer.displayName = "DocumentViewer";
|
|
24261
24264
|
init_useEventBus();
|
|
24262
24265
|
function extractTitle(children) {
|
|
24263
|
-
if (!
|
|
24266
|
+
if (!React115__default.isValidElement(children)) return void 0;
|
|
24264
24267
|
const props = children.props;
|
|
24265
24268
|
if (typeof props.title === "string") {
|
|
24266
24269
|
return props.title;
|
|
@@ -24318,7 +24321,7 @@ function LinearView({
|
|
|
24318
24321
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
24319
24322
|
const isDone = i < currentIdx;
|
|
24320
24323
|
const isCurrent = i === currentIdx;
|
|
24321
|
-
return /* @__PURE__ */ jsxs(
|
|
24324
|
+
return /* @__PURE__ */ jsxs(React115__default.Fragment, { children: [
|
|
24322
24325
|
i > 0 && /* @__PURE__ */ jsx(
|
|
24323
24326
|
Typography,
|
|
24324
24327
|
{
|
|
@@ -24992,7 +24995,7 @@ var Form = ({
|
|
|
24992
24995
|
const normalizedInitialData = initialData ?? {};
|
|
24993
24996
|
const resolvedEntity = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
24994
24997
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
24995
|
-
const entityDerivedFields =
|
|
24998
|
+
const entityDerivedFields = React115__default.useMemo(() => {
|
|
24996
24999
|
if (fields && fields.length > 0) return void 0;
|
|
24997
25000
|
if (!resolvedEntity) return void 0;
|
|
24998
25001
|
return resolvedEntity.fields.map(
|
|
@@ -25011,14 +25014,14 @@ var Form = ({
|
|
|
25011
25014
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
25012
25015
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
25013
25016
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
25014
|
-
const [formData, setFormData] =
|
|
25017
|
+
const [formData, setFormData] = React115__default.useState(
|
|
25015
25018
|
normalizedInitialData
|
|
25016
25019
|
);
|
|
25017
|
-
const [collapsedSections, setCollapsedSections] =
|
|
25020
|
+
const [collapsedSections, setCollapsedSections] = React115__default.useState(
|
|
25018
25021
|
/* @__PURE__ */ new Set()
|
|
25019
25022
|
);
|
|
25020
25023
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
25021
|
-
const evalContext =
|
|
25024
|
+
const evalContext = React115__default.useMemo(
|
|
25022
25025
|
() => ({
|
|
25023
25026
|
formValues: formData,
|
|
25024
25027
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -25027,13 +25030,13 @@ var Form = ({
|
|
|
25027
25030
|
}),
|
|
25028
25031
|
[formData, externalContext]
|
|
25029
25032
|
);
|
|
25030
|
-
|
|
25033
|
+
React115__default.useEffect(() => {
|
|
25031
25034
|
const data = initialData;
|
|
25032
25035
|
if (data && Object.keys(data).length > 0) {
|
|
25033
25036
|
setFormData(data);
|
|
25034
25037
|
}
|
|
25035
25038
|
}, [initialData]);
|
|
25036
|
-
const processCalculations =
|
|
25039
|
+
const processCalculations = React115__default.useCallback(
|
|
25037
25040
|
(changedFieldId, newFormData) => {
|
|
25038
25041
|
if (!hiddenCalculations.length) return;
|
|
25039
25042
|
const context = {
|
|
@@ -25058,7 +25061,7 @@ var Form = ({
|
|
|
25058
25061
|
},
|
|
25059
25062
|
[hiddenCalculations, externalContext, eventBus]
|
|
25060
25063
|
);
|
|
25061
|
-
const checkViolations =
|
|
25064
|
+
const checkViolations = React115__default.useCallback(
|
|
25062
25065
|
(changedFieldId, newFormData) => {
|
|
25063
25066
|
if (!violationTriggers.length) return;
|
|
25064
25067
|
const context = {
|
|
@@ -25095,7 +25098,7 @@ var Form = ({
|
|
|
25095
25098
|
processCalculations(name, newFormData);
|
|
25096
25099
|
checkViolations(name, newFormData);
|
|
25097
25100
|
};
|
|
25098
|
-
const isFieldVisible =
|
|
25101
|
+
const isFieldVisible = React115__default.useCallback(
|
|
25099
25102
|
(fieldName) => {
|
|
25100
25103
|
const condition = conditionalFields[fieldName];
|
|
25101
25104
|
if (!condition) return true;
|
|
@@ -25103,7 +25106,7 @@ var Form = ({
|
|
|
25103
25106
|
},
|
|
25104
25107
|
[conditionalFields, evalContext]
|
|
25105
25108
|
);
|
|
25106
|
-
const isSectionVisible =
|
|
25109
|
+
const isSectionVisible = React115__default.useCallback(
|
|
25107
25110
|
(section) => {
|
|
25108
25111
|
if (!section.condition) return true;
|
|
25109
25112
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -25135,7 +25138,7 @@ var Form = ({
|
|
|
25135
25138
|
eventBus.emit(`UI:${onCancel}`);
|
|
25136
25139
|
}
|
|
25137
25140
|
};
|
|
25138
|
-
const renderField =
|
|
25141
|
+
const renderField = React115__default.useCallback(
|
|
25139
25142
|
(field) => {
|
|
25140
25143
|
const fieldName = field.name || field.field;
|
|
25141
25144
|
if (!fieldName) return null;
|
|
@@ -25156,7 +25159,7 @@ var Form = ({
|
|
|
25156
25159
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
25157
25160
|
);
|
|
25158
25161
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
25159
|
-
const normalizedFields =
|
|
25162
|
+
const normalizedFields = React115__default.useMemo(() => {
|
|
25160
25163
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
25161
25164
|
return effectiveFields.map((field) => {
|
|
25162
25165
|
if (typeof field === "string") {
|
|
@@ -25178,7 +25181,7 @@ var Form = ({
|
|
|
25178
25181
|
return field;
|
|
25179
25182
|
});
|
|
25180
25183
|
}, [effectiveFields, resolvedEntity]);
|
|
25181
|
-
const schemaFields =
|
|
25184
|
+
const schemaFields = React115__default.useMemo(() => {
|
|
25182
25185
|
if (normalizedFields.length === 0) return null;
|
|
25183
25186
|
if (isDebugEnabled()) {
|
|
25184
25187
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -25188,7 +25191,7 @@ var Form = ({
|
|
|
25188
25191
|
}
|
|
25189
25192
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
25190
25193
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
25191
|
-
const sectionElements =
|
|
25194
|
+
const sectionElements = React115__default.useMemo(() => {
|
|
25192
25195
|
if (!sections || sections.length === 0) return null;
|
|
25193
25196
|
return sections.map((section) => {
|
|
25194
25197
|
if (!isSectionVisible(section)) {
|
|
@@ -26616,7 +26619,7 @@ var List2 = ({
|
|
|
26616
26619
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
26617
26620
|
return [];
|
|
26618
26621
|
}, [entity]);
|
|
26619
|
-
const getItemActions =
|
|
26622
|
+
const getItemActions = React115__default.useCallback(
|
|
26620
26623
|
(item) => {
|
|
26621
26624
|
if (!itemActions) return [];
|
|
26622
26625
|
if (typeof itemActions === "function") {
|
|
@@ -27050,7 +27053,7 @@ var MediaGallery = ({
|
|
|
27050
27053
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
27051
27054
|
);
|
|
27052
27055
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
27053
|
-
const items =
|
|
27056
|
+
const items = React115__default.useMemo(() => {
|
|
27054
27057
|
if (propItems) return propItems;
|
|
27055
27058
|
if (entityData.length === 0) return [];
|
|
27056
27059
|
return entityData.map((record, idx) => ({
|
|
@@ -27213,7 +27216,7 @@ var MediaGallery = ({
|
|
|
27213
27216
|
MediaGallery.displayName = "MediaGallery";
|
|
27214
27217
|
init_useEventBus();
|
|
27215
27218
|
function extractTitle2(children) {
|
|
27216
|
-
if (!
|
|
27219
|
+
if (!React115__default.isValidElement(children)) return void 0;
|
|
27217
27220
|
const props = children.props;
|
|
27218
27221
|
if (typeof props.title === "string") {
|
|
27219
27222
|
return props.title;
|
|
@@ -27894,7 +27897,7 @@ var PageHeader = ({
|
|
|
27894
27897
|
info: "bg-info/10 text-info"
|
|
27895
27898
|
};
|
|
27896
27899
|
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(
|
|
27900
|
+
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
27901
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
27899
27902
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
27900
27903
|
"a",
|
|
@@ -28023,7 +28026,7 @@ function subscribeToDebugEvents(listener) {
|
|
|
28023
28026
|
|
|
28024
28027
|
// components/organisms/debug/hooks/useDebugData.ts
|
|
28025
28028
|
function useDebugData() {
|
|
28026
|
-
const [data, setData] =
|
|
28029
|
+
const [data, setData] = React115.useState(() => ({
|
|
28027
28030
|
traits: [],
|
|
28028
28031
|
ticks: [],
|
|
28029
28032
|
guards: [],
|
|
@@ -28037,7 +28040,7 @@ function useDebugData() {
|
|
|
28037
28040
|
},
|
|
28038
28041
|
lastUpdate: Date.now()
|
|
28039
28042
|
}));
|
|
28040
|
-
|
|
28043
|
+
React115.useEffect(() => {
|
|
28041
28044
|
const updateData = () => {
|
|
28042
28045
|
setData({
|
|
28043
28046
|
traits: getAllTraits(),
|
|
@@ -28134,12 +28137,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
28134
28137
|
return positions;
|
|
28135
28138
|
}
|
|
28136
28139
|
function WalkMinimap() {
|
|
28137
|
-
const [walkStep, setWalkStep] =
|
|
28138
|
-
const [traits2, setTraits] =
|
|
28139
|
-
const [coveredEdges, setCoveredEdges] =
|
|
28140
|
-
const [completedTraits, setCompletedTraits] =
|
|
28141
|
-
const prevTraitRef =
|
|
28142
|
-
|
|
28140
|
+
const [walkStep, setWalkStep] = React115.useState(null);
|
|
28141
|
+
const [traits2, setTraits] = React115.useState([]);
|
|
28142
|
+
const [coveredEdges, setCoveredEdges] = React115.useState([]);
|
|
28143
|
+
const [completedTraits, setCompletedTraits] = React115.useState(/* @__PURE__ */ new Set());
|
|
28144
|
+
const prevTraitRef = React115.useRef(null);
|
|
28145
|
+
React115.useEffect(() => {
|
|
28143
28146
|
const interval = setInterval(() => {
|
|
28144
28147
|
const w = window;
|
|
28145
28148
|
const step = w.__orbitalWalkStep;
|
|
@@ -28568,15 +28571,15 @@ var TYPE_BADGES = {
|
|
|
28568
28571
|
state: { variant: "danger", icon: "\u{1F4CA}" }
|
|
28569
28572
|
};
|
|
28570
28573
|
function EventFlowTab({ events: events2 }) {
|
|
28571
|
-
const [filter, setFilter] =
|
|
28572
|
-
const containerRef =
|
|
28573
|
-
const [autoScroll, setAutoScroll] =
|
|
28574
|
-
|
|
28574
|
+
const [filter, setFilter] = React115.useState("all");
|
|
28575
|
+
const containerRef = React115.useRef(null);
|
|
28576
|
+
const [autoScroll, setAutoScroll] = React115.useState(true);
|
|
28577
|
+
React115.useEffect(() => {
|
|
28575
28578
|
if (autoScroll && containerRef.current) {
|
|
28576
28579
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
28577
28580
|
}
|
|
28578
28581
|
}, [events2.length, autoScroll]);
|
|
28579
|
-
const filteredEvents =
|
|
28582
|
+
const filteredEvents = React115.useMemo(() => {
|
|
28580
28583
|
if (filter === "all") return events2;
|
|
28581
28584
|
return events2.filter((e) => e.type === filter);
|
|
28582
28585
|
}, [events2, filter]);
|
|
@@ -28676,7 +28679,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
28676
28679
|
EventFlowTab.displayName = "EventFlowTab";
|
|
28677
28680
|
init_Typography();
|
|
28678
28681
|
function GuardsPanel({ guards }) {
|
|
28679
|
-
const [filter, setFilter] =
|
|
28682
|
+
const [filter, setFilter] = React115.useState("all");
|
|
28680
28683
|
if (guards.length === 0) {
|
|
28681
28684
|
return /* @__PURE__ */ jsx(
|
|
28682
28685
|
EmptyState,
|
|
@@ -28689,7 +28692,7 @@ function GuardsPanel({ guards }) {
|
|
|
28689
28692
|
}
|
|
28690
28693
|
const passedCount = guards.filter((g) => g.result).length;
|
|
28691
28694
|
const failedCount = guards.length - passedCount;
|
|
28692
|
-
const filteredGuards =
|
|
28695
|
+
const filteredGuards = React115.useMemo(() => {
|
|
28693
28696
|
if (filter === "all") return guards;
|
|
28694
28697
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
28695
28698
|
return guards.filter((g) => !g.result);
|
|
@@ -28837,10 +28840,10 @@ function EffectBadge({ effect }) {
|
|
|
28837
28840
|
] });
|
|
28838
28841
|
}
|
|
28839
28842
|
function TransitionTimeline({ transitions }) {
|
|
28840
|
-
const containerRef =
|
|
28841
|
-
const [autoScroll, setAutoScroll] =
|
|
28842
|
-
const [expandedId, setExpandedId] =
|
|
28843
|
-
|
|
28843
|
+
const containerRef = React115.useRef(null);
|
|
28844
|
+
const [autoScroll, setAutoScroll] = React115.useState(true);
|
|
28845
|
+
const [expandedId, setExpandedId] = React115.useState(null);
|
|
28846
|
+
React115.useEffect(() => {
|
|
28844
28847
|
if (autoScroll && containerRef.current) {
|
|
28845
28848
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
28846
28849
|
}
|
|
@@ -29106,9 +29109,9 @@ function getAllEvents(traits2) {
|
|
|
29106
29109
|
}
|
|
29107
29110
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
29108
29111
|
const eventBus = useEventBus();
|
|
29109
|
-
const [log3, setLog] =
|
|
29110
|
-
const prevStatesRef =
|
|
29111
|
-
|
|
29112
|
+
const [log3, setLog] = React115.useState([]);
|
|
29113
|
+
const prevStatesRef = React115.useRef(/* @__PURE__ */ new Map());
|
|
29114
|
+
React115.useEffect(() => {
|
|
29112
29115
|
for (const trait of traits2) {
|
|
29113
29116
|
const prev = prevStatesRef.current.get(trait.id);
|
|
29114
29117
|
if (prev && prev !== trait.currentState) {
|
|
@@ -29261,9 +29264,9 @@ function VerifyModePanel({
|
|
|
29261
29264
|
serverCount,
|
|
29262
29265
|
localCount
|
|
29263
29266
|
}) {
|
|
29264
|
-
const scrollRef =
|
|
29265
|
-
const prevCountRef =
|
|
29266
|
-
|
|
29267
|
+
const scrollRef = React115.useRef(null);
|
|
29268
|
+
const prevCountRef = React115.useRef(0);
|
|
29269
|
+
React115.useEffect(() => {
|
|
29267
29270
|
if (transitions.length > prevCountRef.current && scrollRef.current) {
|
|
29268
29271
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
29269
29272
|
}
|
|
@@ -29311,10 +29314,10 @@ function RuntimeDebugger({
|
|
|
29311
29314
|
defaultTab,
|
|
29312
29315
|
schema
|
|
29313
29316
|
}) {
|
|
29314
|
-
const [isCollapsed, setIsCollapsed] =
|
|
29315
|
-
const [isVisible, setIsVisible] =
|
|
29317
|
+
const [isCollapsed, setIsCollapsed] = React115.useState(mode === "verify" ? true : defaultCollapsed);
|
|
29318
|
+
const [isVisible, setIsVisible] = React115.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
29316
29319
|
const debugData = useDebugData();
|
|
29317
|
-
|
|
29320
|
+
React115.useEffect(() => {
|
|
29318
29321
|
if (mode === "inline") return;
|
|
29319
29322
|
return onDebugToggle((enabled) => {
|
|
29320
29323
|
setIsVisible(enabled);
|
|
@@ -29323,7 +29326,7 @@ function RuntimeDebugger({
|
|
|
29323
29326
|
}
|
|
29324
29327
|
});
|
|
29325
29328
|
}, [mode]);
|
|
29326
|
-
|
|
29329
|
+
React115.useEffect(() => {
|
|
29327
29330
|
if (mode === "inline") return;
|
|
29328
29331
|
const handleKeyDown = (e) => {
|
|
29329
29332
|
if (e.key === "`" && isVisible) {
|
|
@@ -29839,7 +29842,7 @@ function SequenceBar({
|
|
|
29839
29842
|
onSlotRemove(index);
|
|
29840
29843
|
}, [onSlotRemove, playing]);
|
|
29841
29844
|
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(
|
|
29845
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React115__default.Fragment, { children: [
|
|
29843
29846
|
i > 0 && /* @__PURE__ */ jsx(
|
|
29844
29847
|
Typography,
|
|
29845
29848
|
{
|
|
@@ -31100,7 +31103,7 @@ var StatCard = ({
|
|
|
31100
31103
|
const labelToUse = propLabel ?? propTitle;
|
|
31101
31104
|
const eventBus = useEventBus();
|
|
31102
31105
|
const { t } = useTranslate();
|
|
31103
|
-
const handleActionClick =
|
|
31106
|
+
const handleActionClick = React115__default.useCallback(() => {
|
|
31104
31107
|
if (action?.event) {
|
|
31105
31108
|
eventBus.emit(`UI:${action.event}`, {});
|
|
31106
31109
|
}
|
|
@@ -31111,7 +31114,7 @@ var StatCard = ({
|
|
|
31111
31114
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
31112
31115
|
const isLoading = externalLoading ?? false;
|
|
31113
31116
|
const error = externalError;
|
|
31114
|
-
const computeMetricValue =
|
|
31117
|
+
const computeMetricValue = React115__default.useCallback(
|
|
31115
31118
|
(metric, items) => {
|
|
31116
31119
|
if (metric.value !== void 0) {
|
|
31117
31120
|
return metric.value;
|
|
@@ -31150,7 +31153,7 @@ var StatCard = ({
|
|
|
31150
31153
|
},
|
|
31151
31154
|
[]
|
|
31152
31155
|
);
|
|
31153
|
-
const schemaStats =
|
|
31156
|
+
const schemaStats = React115__default.useMemo(() => {
|
|
31154
31157
|
if (!metrics || metrics.length === 0) return null;
|
|
31155
31158
|
return metrics.map((metric) => ({
|
|
31156
31159
|
label: metric.label,
|
|
@@ -31158,7 +31161,7 @@ var StatCard = ({
|
|
|
31158
31161
|
format: metric.format
|
|
31159
31162
|
}));
|
|
31160
31163
|
}, [metrics, data, computeMetricValue]);
|
|
31161
|
-
const calculatedTrend =
|
|
31164
|
+
const calculatedTrend = React115__default.useMemo(() => {
|
|
31162
31165
|
if (manualTrend !== void 0) return manualTrend;
|
|
31163
31166
|
if (previousValue === void 0 || currentValue === void 0)
|
|
31164
31167
|
return void 0;
|
|
@@ -32090,7 +32093,7 @@ var Timeline = ({
|
|
|
32090
32093
|
}) => {
|
|
32091
32094
|
const { t } = useTranslate();
|
|
32092
32095
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
32093
|
-
const items =
|
|
32096
|
+
const items = React115__default.useMemo(() => {
|
|
32094
32097
|
if (propItems) return propItems;
|
|
32095
32098
|
if (entityData.length === 0) return [];
|
|
32096
32099
|
return entityData.map((record, idx) => {
|
|
@@ -32193,7 +32196,7 @@ var Timeline = ({
|
|
|
32193
32196
|
Timeline.displayName = "Timeline";
|
|
32194
32197
|
init_useEventBus();
|
|
32195
32198
|
function extractToastProps(children) {
|
|
32196
|
-
if (!
|
|
32199
|
+
if (!React115__default.isValidElement(children)) {
|
|
32197
32200
|
if (typeof children === "string") {
|
|
32198
32201
|
return { message: children };
|
|
32199
32202
|
}
|
|
@@ -32224,7 +32227,7 @@ var ToastSlot = ({
|
|
|
32224
32227
|
eventBus.emit("UI:CLOSE");
|
|
32225
32228
|
};
|
|
32226
32229
|
if (!isVisible) return null;
|
|
32227
|
-
const isCustomContent =
|
|
32230
|
+
const isCustomContent = React115__default.isValidElement(children) && !message;
|
|
32228
32231
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
32229
32232
|
Toast,
|
|
32230
32233
|
{
|
|
@@ -32476,7 +32479,7 @@ var WizardContainer = ({
|
|
|
32476
32479
|
const isCompleted = index < currentStep;
|
|
32477
32480
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
32478
32481
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
32479
|
-
return /* @__PURE__ */ jsxs(
|
|
32482
|
+
return /* @__PURE__ */ jsxs(React115__default.Fragment, { children: [
|
|
32480
32483
|
/* @__PURE__ */ jsx(
|
|
32481
32484
|
Button,
|
|
32482
32485
|
{
|
|
@@ -32846,12 +32849,12 @@ WorldMapTemplate.displayName = "WorldMapTemplate";
|
|
|
32846
32849
|
|
|
32847
32850
|
// components/organisms/component-registry.generated.ts
|
|
32848
32851
|
function lazyThree(name, loader) {
|
|
32849
|
-
const Lazy =
|
|
32852
|
+
const Lazy = React115__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
32850
32853
|
function ThreeWrapper(props) {
|
|
32851
|
-
return
|
|
32852
|
-
|
|
32854
|
+
return React115__default.createElement(
|
|
32855
|
+
React115__default.Suspense,
|
|
32853
32856
|
{ fallback: null },
|
|
32854
|
-
|
|
32857
|
+
React115__default.createElement(Lazy, props)
|
|
32855
32858
|
);
|
|
32856
32859
|
}
|
|
32857
32860
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -33139,7 +33142,7 @@ function SuspenseConfigProvider({
|
|
|
33139
33142
|
config,
|
|
33140
33143
|
children
|
|
33141
33144
|
}) {
|
|
33142
|
-
return
|
|
33145
|
+
return React115__default.createElement(
|
|
33143
33146
|
SuspenseConfigContext.Provider,
|
|
33144
33147
|
{ value: config },
|
|
33145
33148
|
children
|
|
@@ -34134,7 +34137,7 @@ function SchemaRunner({ schema, serverUrl, mockData, pageName, onNavigate, onLoc
|
|
|
34134
34137
|
const entityStore = useEntityStore();
|
|
34135
34138
|
const seededRef = useRef("");
|
|
34136
34139
|
const mockKey = mockData ? Object.keys(mockData).sort().join(",") : "";
|
|
34137
|
-
|
|
34140
|
+
React115__default.useLayoutEffect(() => {
|
|
34138
34141
|
if (!serverUrl && mockData && seededRef.current !== mockKey) {
|
|
34139
34142
|
seededRef.current = mockKey;
|
|
34140
34143
|
for (const [entityType, records] of Object.entries(mockData)) {
|