@almadar/ui 4.32.0 → 4.33.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 +1267 -1250
- package/dist/avl/index.js +187 -170
- package/dist/components/index.cjs +1072 -1055
- package/dist/components/index.js +173 -156
- package/dist/components/templates/DashboardLayout.d.ts +7 -0
- package/dist/context/CurrentPagePathContext.d.ts +9 -0
- package/dist/context/index.cjs +10 -0
- package/dist/context/index.d.ts +1 -0
- package/dist/context/index.js +8 -1
- package/dist/providers/index.cjs +897 -880
- package/dist/providers/index.js +165 -148
- package/dist/runtime/index.cjs +933 -916
- package/dist/runtime/index.js +169 -152
- package/package.json +1 -1
package/dist/runtime/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React105 from 'react';
|
|
2
|
+
import React105__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useLayoutEffect, lazy, useId } from 'react';
|
|
3
3
|
import { EventBusContext, useTraitScope, OrbitalProvider, TraitScopeProvider, VerificationProvider } from '@almadar/ui/providers';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import { clsx } from 'clsx';
|
|
@@ -1015,7 +1015,7 @@ var init_Box = __esm({
|
|
|
1015
1015
|
fixed: "fixed",
|
|
1016
1016
|
sticky: "sticky"
|
|
1017
1017
|
};
|
|
1018
|
-
Box =
|
|
1018
|
+
Box = React105__default.forwardRef(
|
|
1019
1019
|
({
|
|
1020
1020
|
padding,
|
|
1021
1021
|
paddingX,
|
|
@@ -1714,7 +1714,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
1714
1714
|
const IconComp = value;
|
|
1715
1715
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
1716
1716
|
}
|
|
1717
|
-
if (
|
|
1717
|
+
if (React105__default.isValidElement(value)) {
|
|
1718
1718
|
return value;
|
|
1719
1719
|
}
|
|
1720
1720
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -1790,7 +1790,7 @@ var init_Button = __esm({
|
|
|
1790
1790
|
md: "h-4 w-4",
|
|
1791
1791
|
lg: "h-5 w-5"
|
|
1792
1792
|
};
|
|
1793
|
-
Button =
|
|
1793
|
+
Button = React105__default.forwardRef(
|
|
1794
1794
|
({
|
|
1795
1795
|
className,
|
|
1796
1796
|
variant = "primary",
|
|
@@ -1893,7 +1893,7 @@ var init_Badge = __esm({
|
|
|
1893
1893
|
md: "px-2.5 py-1 text-sm",
|
|
1894
1894
|
lg: "px-3 py-1.5 text-base"
|
|
1895
1895
|
};
|
|
1896
|
-
Badge =
|
|
1896
|
+
Badge = React105__default.forwardRef(
|
|
1897
1897
|
({ className, variant = "default", size = "sm", amount, label, icon, children, ...props }, ref) => {
|
|
1898
1898
|
const iconSizes2 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
|
|
1899
1899
|
const resolvedIcon = typeof icon === "string" ? (() => {
|
|
@@ -2053,7 +2053,7 @@ var Input;
|
|
|
2053
2053
|
var init_Input = __esm({
|
|
2054
2054
|
"components/atoms/Input.tsx"() {
|
|
2055
2055
|
init_cn();
|
|
2056
|
-
Input =
|
|
2056
|
+
Input = React105__default.forwardRef(
|
|
2057
2057
|
({
|
|
2058
2058
|
className,
|
|
2059
2059
|
inputType,
|
|
@@ -2171,7 +2171,7 @@ var Label;
|
|
|
2171
2171
|
var init_Label = __esm({
|
|
2172
2172
|
"components/atoms/Label.tsx"() {
|
|
2173
2173
|
init_cn();
|
|
2174
|
-
Label =
|
|
2174
|
+
Label = React105__default.forwardRef(
|
|
2175
2175
|
({ className, required, children, ...props }, ref) => {
|
|
2176
2176
|
return /* @__PURE__ */ jsxs(
|
|
2177
2177
|
"label",
|
|
@@ -2197,7 +2197,7 @@ var Textarea;
|
|
|
2197
2197
|
var init_Textarea = __esm({
|
|
2198
2198
|
"components/atoms/Textarea.tsx"() {
|
|
2199
2199
|
init_cn();
|
|
2200
|
-
Textarea =
|
|
2200
|
+
Textarea = React105__default.forwardRef(
|
|
2201
2201
|
({ className, error, ...props }, ref) => {
|
|
2202
2202
|
return /* @__PURE__ */ jsx(
|
|
2203
2203
|
"textarea",
|
|
@@ -2226,7 +2226,7 @@ var Select;
|
|
|
2226
2226
|
var init_Select = __esm({
|
|
2227
2227
|
"components/atoms/Select.tsx"() {
|
|
2228
2228
|
init_cn();
|
|
2229
|
-
Select =
|
|
2229
|
+
Select = React105__default.forwardRef(
|
|
2230
2230
|
({ className, options, placeholder, error, ...props }, ref) => {
|
|
2231
2231
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
2232
2232
|
/* @__PURE__ */ jsxs(
|
|
@@ -2268,7 +2268,7 @@ var Checkbox;
|
|
|
2268
2268
|
var init_Checkbox = __esm({
|
|
2269
2269
|
"components/atoms/Checkbox.tsx"() {
|
|
2270
2270
|
init_cn();
|
|
2271
|
-
Checkbox =
|
|
2271
|
+
Checkbox = React105__default.forwardRef(
|
|
2272
2272
|
({ className, label, id, ...props }, ref) => {
|
|
2273
2273
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
2274
2274
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
@@ -2350,7 +2350,7 @@ var init_Card = __esm({
|
|
|
2350
2350
|
md: "shadow",
|
|
2351
2351
|
lg: "shadow-lg"
|
|
2352
2352
|
};
|
|
2353
|
-
Card =
|
|
2353
|
+
Card = React105__default.forwardRef(
|
|
2354
2354
|
({
|
|
2355
2355
|
className,
|
|
2356
2356
|
variant = "bordered",
|
|
@@ -2386,9 +2386,9 @@ var init_Card = __esm({
|
|
|
2386
2386
|
}
|
|
2387
2387
|
);
|
|
2388
2388
|
Card.displayName = "Card";
|
|
2389
|
-
CardHeader =
|
|
2389
|
+
CardHeader = React105__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
2390
2390
|
CardHeader.displayName = "CardHeader";
|
|
2391
|
-
CardTitle =
|
|
2391
|
+
CardTitle = React105__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2392
2392
|
"h3",
|
|
2393
2393
|
{
|
|
2394
2394
|
ref,
|
|
@@ -2401,11 +2401,11 @@ var init_Card = __esm({
|
|
|
2401
2401
|
}
|
|
2402
2402
|
));
|
|
2403
2403
|
CardTitle.displayName = "CardTitle";
|
|
2404
|
-
CardContent =
|
|
2404
|
+
CardContent = React105__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
2405
2405
|
CardContent.displayName = "CardContent";
|
|
2406
2406
|
CardBody = CardContent;
|
|
2407
2407
|
CardBody.displayName = "CardBody";
|
|
2408
|
-
CardFooter =
|
|
2408
|
+
CardFooter = React105__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2409
2409
|
"div",
|
|
2410
2410
|
{
|
|
2411
2411
|
ref,
|
|
@@ -2426,7 +2426,7 @@ var init_Spinner = __esm({
|
|
|
2426
2426
|
md: "h-6 w-6",
|
|
2427
2427
|
lg: "h-8 w-8"
|
|
2428
2428
|
};
|
|
2429
|
-
Spinner =
|
|
2429
|
+
Spinner = React105__default.forwardRef(
|
|
2430
2430
|
({ className, size = "md", ...props }, ref) => {
|
|
2431
2431
|
return /* @__PURE__ */ jsx(
|
|
2432
2432
|
"div",
|
|
@@ -2874,7 +2874,7 @@ var Radio;
|
|
|
2874
2874
|
var init_Radio = __esm({
|
|
2875
2875
|
"components/atoms/Radio.tsx"() {
|
|
2876
2876
|
init_cn();
|
|
2877
|
-
Radio =
|
|
2877
|
+
Radio = React105__default.forwardRef(
|
|
2878
2878
|
({
|
|
2879
2879
|
label,
|
|
2880
2880
|
helperText,
|
|
@@ -2985,7 +2985,7 @@ var init_Switch = __esm({
|
|
|
2985
2985
|
"components/atoms/Switch.tsx"() {
|
|
2986
2986
|
"use client";
|
|
2987
2987
|
init_cn();
|
|
2988
|
-
Switch =
|
|
2988
|
+
Switch = React105.forwardRef(
|
|
2989
2989
|
({
|
|
2990
2990
|
checked,
|
|
2991
2991
|
defaultChecked = false,
|
|
@@ -2996,10 +2996,10 @@ var init_Switch = __esm({
|
|
|
2996
2996
|
name,
|
|
2997
2997
|
className
|
|
2998
2998
|
}, ref) => {
|
|
2999
|
-
const [isChecked, setIsChecked] =
|
|
2999
|
+
const [isChecked, setIsChecked] = React105.useState(
|
|
3000
3000
|
checked !== void 0 ? checked : defaultChecked
|
|
3001
3001
|
);
|
|
3002
|
-
|
|
3002
|
+
React105.useEffect(() => {
|
|
3003
3003
|
if (checked !== void 0) {
|
|
3004
3004
|
setIsChecked(checked);
|
|
3005
3005
|
}
|
|
@@ -3544,8 +3544,8 @@ var init_LawReferenceTooltip = __esm({
|
|
|
3544
3544
|
position = "top",
|
|
3545
3545
|
className
|
|
3546
3546
|
}) => {
|
|
3547
|
-
const [isVisible, setIsVisible] =
|
|
3548
|
-
const timeoutRef =
|
|
3547
|
+
const [isVisible, setIsVisible] = React105__default.useState(false);
|
|
3548
|
+
const timeoutRef = React105__default.useRef(null);
|
|
3549
3549
|
const handleMouseEnter = () => {
|
|
3550
3550
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
3551
3551
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -3554,7 +3554,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
3554
3554
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
3555
3555
|
setIsVisible(false);
|
|
3556
3556
|
};
|
|
3557
|
-
|
|
3557
|
+
React105__default.useEffect(() => {
|
|
3558
3558
|
return () => {
|
|
3559
3559
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
3560
3560
|
};
|
|
@@ -3764,7 +3764,7 @@ var init_StatusDot = __esm({
|
|
|
3764
3764
|
md: "w-2.5 h-2.5",
|
|
3765
3765
|
lg: "w-3 h-3"
|
|
3766
3766
|
};
|
|
3767
|
-
StatusDot =
|
|
3767
|
+
StatusDot = React105__default.forwardRef(
|
|
3768
3768
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
3769
3769
|
return /* @__PURE__ */ jsx(
|
|
3770
3770
|
"span",
|
|
@@ -3817,7 +3817,7 @@ var init_TrendIndicator = __esm({
|
|
|
3817
3817
|
down: TrendingDown,
|
|
3818
3818
|
flat: ArrowRight
|
|
3819
3819
|
};
|
|
3820
|
-
TrendIndicator =
|
|
3820
|
+
TrendIndicator = React105__default.forwardRef(
|
|
3821
3821
|
({
|
|
3822
3822
|
className,
|
|
3823
3823
|
value,
|
|
@@ -3884,7 +3884,7 @@ var init_RangeSlider = __esm({
|
|
|
3884
3884
|
md: "w-4 h-4",
|
|
3885
3885
|
lg: "w-5 h-5"
|
|
3886
3886
|
};
|
|
3887
|
-
RangeSlider =
|
|
3887
|
+
RangeSlider = React105__default.forwardRef(
|
|
3888
3888
|
({
|
|
3889
3889
|
className,
|
|
3890
3890
|
min = 0,
|
|
@@ -4494,9 +4494,9 @@ function ScoreDisplay({
|
|
|
4494
4494
|
...rest
|
|
4495
4495
|
}) {
|
|
4496
4496
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
|
|
4497
|
-
const [displayValue, setDisplayValue] =
|
|
4498
|
-
const [isAnimating, setIsAnimating] =
|
|
4499
|
-
|
|
4497
|
+
const [displayValue, setDisplayValue] = React105.useState(resolvedValue);
|
|
4498
|
+
const [isAnimating, setIsAnimating] = React105.useState(false);
|
|
4499
|
+
React105.useEffect(() => {
|
|
4500
4500
|
if (!animated || displayValue === resolvedValue) {
|
|
4501
4501
|
setDisplayValue(resolvedValue);
|
|
4502
4502
|
return;
|
|
@@ -4566,9 +4566,9 @@ function ControlButton({
|
|
|
4566
4566
|
className
|
|
4567
4567
|
}) {
|
|
4568
4568
|
const eventBus = useEventBus();
|
|
4569
|
-
const [isPressed, setIsPressed] =
|
|
4569
|
+
const [isPressed, setIsPressed] = React105.useState(false);
|
|
4570
4570
|
const actualPressed = pressed ?? isPressed;
|
|
4571
|
-
const handlePointerDown =
|
|
4571
|
+
const handlePointerDown = React105.useCallback(
|
|
4572
4572
|
(e) => {
|
|
4573
4573
|
e.preventDefault();
|
|
4574
4574
|
if (disabled) return;
|
|
@@ -4578,7 +4578,7 @@ function ControlButton({
|
|
|
4578
4578
|
},
|
|
4579
4579
|
[disabled, pressEvent, eventBus, onPress]
|
|
4580
4580
|
);
|
|
4581
|
-
const handlePointerUp =
|
|
4581
|
+
const handlePointerUp = React105.useCallback(
|
|
4582
4582
|
(e) => {
|
|
4583
4583
|
e.preventDefault();
|
|
4584
4584
|
if (disabled) return;
|
|
@@ -4588,7 +4588,7 @@ function ControlButton({
|
|
|
4588
4588
|
},
|
|
4589
4589
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
4590
4590
|
);
|
|
4591
|
-
const handlePointerLeave =
|
|
4591
|
+
const handlePointerLeave = React105.useCallback(
|
|
4592
4592
|
(e) => {
|
|
4593
4593
|
if (isPressed) {
|
|
4594
4594
|
setIsPressed(false);
|
|
@@ -5486,9 +5486,9 @@ function MiniMap({
|
|
|
5486
5486
|
viewportRect,
|
|
5487
5487
|
className
|
|
5488
5488
|
}) {
|
|
5489
|
-
const canvasRef =
|
|
5490
|
-
const frameRef =
|
|
5491
|
-
|
|
5489
|
+
const canvasRef = React105.useRef(null);
|
|
5490
|
+
const frameRef = React105.useRef(0);
|
|
5491
|
+
React105.useEffect(() => {
|
|
5492
5492
|
const canvas = canvasRef.current;
|
|
5493
5493
|
if (!canvas) return;
|
|
5494
5494
|
const ctx = canvas.getContext("2d");
|
|
@@ -5650,7 +5650,7 @@ var init_ErrorBoundary = __esm({
|
|
|
5650
5650
|
"use client";
|
|
5651
5651
|
init_cn();
|
|
5652
5652
|
init_ErrorState();
|
|
5653
|
-
ErrorBoundary = class extends
|
|
5653
|
+
ErrorBoundary = class extends React105__default.Component {
|
|
5654
5654
|
constructor(props) {
|
|
5655
5655
|
super(props);
|
|
5656
5656
|
__publicField(this, "reset", () => {
|
|
@@ -6097,8 +6097,8 @@ var init_Tooltip = __esm({
|
|
|
6097
6097
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
6098
6098
|
};
|
|
6099
6099
|
}, []);
|
|
6100
|
-
const triggerElement =
|
|
6101
|
-
const trigger =
|
|
6100
|
+
const triggerElement = React105__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
6101
|
+
const trigger = React105__default.cloneElement(triggerElement, {
|
|
6102
6102
|
ref: triggerRef,
|
|
6103
6103
|
onMouseEnter: handleMouseEnter,
|
|
6104
6104
|
onMouseLeave: handleMouseLeave,
|
|
@@ -6219,8 +6219,8 @@ var init_Popover = __esm({
|
|
|
6219
6219
|
onMouseEnter: handleOpen,
|
|
6220
6220
|
onMouseLeave: handleClose
|
|
6221
6221
|
};
|
|
6222
|
-
const childElement =
|
|
6223
|
-
const triggerElement =
|
|
6222
|
+
const childElement = React105__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
6223
|
+
const triggerElement = React105__default.cloneElement(
|
|
6224
6224
|
childElement,
|
|
6225
6225
|
{
|
|
6226
6226
|
ref: triggerRef,
|
|
@@ -6337,8 +6337,8 @@ var init_Menu = __esm({
|
|
|
6337
6337
|
"bottom-start": "top-full left-0 mt-2",
|
|
6338
6338
|
"bottom-end": "top-full right-0 mt-2"
|
|
6339
6339
|
};
|
|
6340
|
-
const triggerChild =
|
|
6341
|
-
const triggerElement =
|
|
6340
|
+
const triggerChild = React105__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx("span", { children: trigger });
|
|
6341
|
+
const triggerElement = React105__default.cloneElement(
|
|
6342
6342
|
triggerChild,
|
|
6343
6343
|
{
|
|
6344
6344
|
ref: triggerRef,
|
|
@@ -6857,7 +6857,7 @@ var init_MapView = __esm({
|
|
|
6857
6857
|
shadowSize: [41, 41]
|
|
6858
6858
|
});
|
|
6859
6859
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
6860
|
-
const { useEffect: useEffect61, useRef: useRef58, useCallback: useCallback88, useState: useState83 } =
|
|
6860
|
+
const { useEffect: useEffect61, useRef: useRef58, useCallback: useCallback88, useState: useState83 } = React105__default;
|
|
6861
6861
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
6862
6862
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
6863
6863
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
@@ -7088,7 +7088,7 @@ function InputPattern({
|
|
|
7088
7088
|
fieldName
|
|
7089
7089
|
}) {
|
|
7090
7090
|
const { emit } = useEventBus();
|
|
7091
|
-
const [localValue, setLocalValue] =
|
|
7091
|
+
const [localValue, setLocalValue] = React105__default.useState(value);
|
|
7092
7092
|
const handleChange = (e) => {
|
|
7093
7093
|
setLocalValue(e.target.value);
|
|
7094
7094
|
if (onChange) {
|
|
@@ -7126,7 +7126,7 @@ function TextareaPattern({
|
|
|
7126
7126
|
fieldName
|
|
7127
7127
|
}) {
|
|
7128
7128
|
const { emit } = useEventBus();
|
|
7129
|
-
const [localValue, setLocalValue] =
|
|
7129
|
+
const [localValue, setLocalValue] = React105__default.useState(value);
|
|
7130
7130
|
const handleChange = (e) => {
|
|
7131
7131
|
setLocalValue(e.target.value);
|
|
7132
7132
|
if (onChange) {
|
|
@@ -7158,7 +7158,7 @@ function SelectPattern({
|
|
|
7158
7158
|
fieldName
|
|
7159
7159
|
}) {
|
|
7160
7160
|
const { emit } = useEventBus();
|
|
7161
|
-
const [localValue, setLocalValue] =
|
|
7161
|
+
const [localValue, setLocalValue] = React105__default.useState(value);
|
|
7162
7162
|
const handleChange = (e) => {
|
|
7163
7163
|
setLocalValue(e.target.value);
|
|
7164
7164
|
if (onChange) {
|
|
@@ -7187,7 +7187,7 @@ function CheckboxPattern({
|
|
|
7187
7187
|
className
|
|
7188
7188
|
}) {
|
|
7189
7189
|
const { emit } = useEventBus();
|
|
7190
|
-
const [localChecked, setLocalChecked] =
|
|
7190
|
+
const [localChecked, setLocalChecked] = React105__default.useState(checked);
|
|
7191
7191
|
const handleChange = (e) => {
|
|
7192
7192
|
setLocalChecked(e.target.checked);
|
|
7193
7193
|
if (onChange) {
|
|
@@ -7418,8 +7418,8 @@ function ActionButtons({
|
|
|
7418
7418
|
disabled
|
|
7419
7419
|
}) {
|
|
7420
7420
|
const eventBus = useEventBus();
|
|
7421
|
-
const [activeButtons, setActiveButtons] =
|
|
7422
|
-
const handlePress =
|
|
7421
|
+
const [activeButtons, setActiveButtons] = React105.useState(/* @__PURE__ */ new Set());
|
|
7422
|
+
const handlePress = React105.useCallback(
|
|
7423
7423
|
(id) => {
|
|
7424
7424
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
7425
7425
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -7427,7 +7427,7 @@ function ActionButtons({
|
|
|
7427
7427
|
},
|
|
7428
7428
|
[actionEvent, eventBus, onAction]
|
|
7429
7429
|
);
|
|
7430
|
-
const handleRelease =
|
|
7430
|
+
const handleRelease = React105.useCallback(
|
|
7431
7431
|
(id) => {
|
|
7432
7432
|
setActiveButtons((prev) => {
|
|
7433
7433
|
const next = new Set(prev);
|
|
@@ -9462,7 +9462,7 @@ var init_MarkdownContent = __esm({
|
|
|
9462
9462
|
init_Box();
|
|
9463
9463
|
init_useTranslate();
|
|
9464
9464
|
init_cn();
|
|
9465
|
-
MarkdownContent =
|
|
9465
|
+
MarkdownContent = React105__default.memo(
|
|
9466
9466
|
({ content, direction, className }) => {
|
|
9467
9467
|
const { t: _t } = useTranslate();
|
|
9468
9468
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -9679,7 +9679,7 @@ var init_CodeBlock = __esm({
|
|
|
9679
9679
|
loloStyle = { ...dark, ...loloStyleOverrides };
|
|
9680
9680
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
9681
9681
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
9682
|
-
CodeBlock =
|
|
9682
|
+
CodeBlock = React105__default.memo(
|
|
9683
9683
|
({
|
|
9684
9684
|
code: rawCode,
|
|
9685
9685
|
language = "text",
|
|
@@ -10938,7 +10938,7 @@ var init_StateMachineView = __esm({
|
|
|
10938
10938
|
style: { top: title ? 30 : 0 },
|
|
10939
10939
|
children: [
|
|
10940
10940
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
10941
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
10941
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React105__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
10942
10942
|
StateNode,
|
|
10943
10943
|
{
|
|
10944
10944
|
state,
|
|
@@ -16658,7 +16658,7 @@ function CraftingRecipe({
|
|
|
16658
16658
|
className
|
|
16659
16659
|
}) {
|
|
16660
16660
|
const eventBus = useEventBus();
|
|
16661
|
-
const handleCraft =
|
|
16661
|
+
const handleCraft = React105.useCallback(() => {
|
|
16662
16662
|
onCraft?.();
|
|
16663
16663
|
if (craftEvent) {
|
|
16664
16664
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -16675,7 +16675,7 @@ function CraftingRecipe({
|
|
|
16675
16675
|
children: [
|
|
16676
16676
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
16677
16677
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
16678
|
-
return /* @__PURE__ */ jsxs(
|
|
16678
|
+
return /* @__PURE__ */ jsxs(React105.Fragment, { children: [
|
|
16679
16679
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
16680
16680
|
ItemSlot,
|
|
16681
16681
|
{
|
|
@@ -16969,8 +16969,8 @@ function DPad({
|
|
|
16969
16969
|
}) {
|
|
16970
16970
|
const eventBus = useEventBus();
|
|
16971
16971
|
const sizes = sizeMap15[size];
|
|
16972
|
-
const [activeDirections, setActiveDirections] =
|
|
16973
|
-
const handlePress =
|
|
16972
|
+
const [activeDirections, setActiveDirections] = React105.useState(/* @__PURE__ */ new Set());
|
|
16973
|
+
const handlePress = React105.useCallback(
|
|
16974
16974
|
(direction) => {
|
|
16975
16975
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
16976
16976
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -16978,7 +16978,7 @@ function DPad({
|
|
|
16978
16978
|
},
|
|
16979
16979
|
[directionEvent, eventBus, onDirection]
|
|
16980
16980
|
);
|
|
16981
|
-
const handleRelease =
|
|
16981
|
+
const handleRelease = React105.useCallback(
|
|
16982
16982
|
(direction) => {
|
|
16983
16983
|
setActiveDirections((prev) => {
|
|
16984
16984
|
const next = new Set(prev);
|
|
@@ -17096,6 +17096,19 @@ var init_DashboardGrid = __esm({
|
|
|
17096
17096
|
DashboardGrid.displayName = "DashboardGrid";
|
|
17097
17097
|
}
|
|
17098
17098
|
});
|
|
17099
|
+
var CurrentPagePathContext, CurrentPagePathProvider, useCurrentPagePath;
|
|
17100
|
+
var init_CurrentPagePathContext = __esm({
|
|
17101
|
+
"context/CurrentPagePathContext.tsx"() {
|
|
17102
|
+
"use client";
|
|
17103
|
+
CurrentPagePathContext = createContext(void 0);
|
|
17104
|
+
CurrentPagePathProvider = ({
|
|
17105
|
+
value,
|
|
17106
|
+
children
|
|
17107
|
+
}) => /* @__PURE__ */ jsx(CurrentPagePathContext.Provider, { value, children });
|
|
17108
|
+
CurrentPagePathProvider.displayName = "CurrentPagePathProvider";
|
|
17109
|
+
useCurrentPagePath = () => useContext(CurrentPagePathContext);
|
|
17110
|
+
}
|
|
17111
|
+
});
|
|
17099
17112
|
var DashboardLayout, NavLink;
|
|
17100
17113
|
var init_DashboardLayout = __esm({
|
|
17101
17114
|
"components/templates/DashboardLayout.tsx"() {
|
|
@@ -17109,6 +17122,7 @@ var init_DashboardLayout = __esm({
|
|
|
17109
17122
|
init_useAuthContext();
|
|
17110
17123
|
init_useEventBus();
|
|
17111
17124
|
init_useTranslate();
|
|
17125
|
+
init_CurrentPagePathContext();
|
|
17112
17126
|
DashboardLayout = ({
|
|
17113
17127
|
appName = "{{APP_TITLE}}",
|
|
17114
17128
|
logo,
|
|
@@ -17125,6 +17139,7 @@ var init_DashboardLayout = __esm({
|
|
|
17125
17139
|
showThemeToggle = true,
|
|
17126
17140
|
sidebarFooter,
|
|
17127
17141
|
onSignOut: onSignOutProp,
|
|
17142
|
+
currentPath,
|
|
17128
17143
|
children
|
|
17129
17144
|
}) => {
|
|
17130
17145
|
const eventBus = useEventBus();
|
|
@@ -17145,6 +17160,8 @@ var init_DashboardLayout = __esm({
|
|
|
17145
17160
|
const [sidebarOpen, setSidebarOpen] = useState(false);
|
|
17146
17161
|
const [userMenuOpen, setUserMenuOpen] = useState(false);
|
|
17147
17162
|
const location = useLocation();
|
|
17163
|
+
const ctxPagePath = useCurrentPagePath();
|
|
17164
|
+
const activePath = currentPath ?? ctxPagePath ?? location.pathname;
|
|
17148
17165
|
const { signOut: authSignOut } = useAuthContext();
|
|
17149
17166
|
const user = userProp || (null);
|
|
17150
17167
|
const { t } = useTranslate();
|
|
@@ -17223,7 +17240,7 @@ var init_DashboardLayout = __esm({
|
|
|
17223
17240
|
NavLink,
|
|
17224
17241
|
{
|
|
17225
17242
|
item,
|
|
17226
|
-
currentPath:
|
|
17243
|
+
currentPath: activePath
|
|
17227
17244
|
},
|
|
17228
17245
|
item.href
|
|
17229
17246
|
))
|
|
@@ -17901,13 +17918,13 @@ function DataList({
|
|
|
17901
17918
|
}) {
|
|
17902
17919
|
const eventBus = useEventBus();
|
|
17903
17920
|
const { t } = useTranslate();
|
|
17904
|
-
const [visibleCount, setVisibleCount] =
|
|
17921
|
+
const [visibleCount, setVisibleCount] = React105__default.useState(pageSize || Infinity);
|
|
17905
17922
|
const fieldDefs = fields ?? columns ?? [];
|
|
17906
17923
|
const allData = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
17907
17924
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
17908
17925
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
17909
17926
|
const hasRenderProp = typeof children === "function";
|
|
17910
|
-
|
|
17927
|
+
React105__default.useEffect(() => {
|
|
17911
17928
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
17912
17929
|
const childrenTypeOf = typeof children;
|
|
17913
17930
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -17963,7 +17980,7 @@ function DataList({
|
|
|
17963
17980
|
const items2 = data.map((item) => item);
|
|
17964
17981
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
17965
17982
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
17966
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
17983
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
|
|
17967
17984
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
17968
17985
|
group.items.map((itemData, index) => {
|
|
17969
17986
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -18154,7 +18171,7 @@ function DataList({
|
|
|
18154
18171
|
className
|
|
18155
18172
|
),
|
|
18156
18173
|
children: [
|
|
18157
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
18174
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
|
|
18158
18175
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
18159
18176
|
group.items.map(
|
|
18160
18177
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -19237,7 +19254,7 @@ var init_WizardProgress = __esm({
|
|
|
19237
19254
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
19238
19255
|
const isActive = index === currentStep;
|
|
19239
19256
|
const isCompleted = index < currentStep;
|
|
19240
|
-
return /* @__PURE__ */ jsxs(
|
|
19257
|
+
return /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
|
|
19241
19258
|
/* @__PURE__ */ jsx(
|
|
19242
19259
|
"button",
|
|
19243
19260
|
{
|
|
@@ -20148,7 +20165,7 @@ function InventoryGrid({
|
|
|
20148
20165
|
const eventBus = useEventBus();
|
|
20149
20166
|
const slotCount = totalSlots ?? items.length;
|
|
20150
20167
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
20151
|
-
const handleSelect =
|
|
20168
|
+
const handleSelect = React105.useCallback(
|
|
20152
20169
|
(id) => {
|
|
20153
20170
|
onSelect?.(id);
|
|
20154
20171
|
if (selectEvent) {
|
|
@@ -20361,15 +20378,15 @@ function GameCanvas2D({
|
|
|
20361
20378
|
fps = 60,
|
|
20362
20379
|
className
|
|
20363
20380
|
}) {
|
|
20364
|
-
const canvasRef =
|
|
20365
|
-
const rafRef =
|
|
20366
|
-
const frameRef =
|
|
20367
|
-
const lastTimeRef =
|
|
20368
|
-
const onDrawRef =
|
|
20381
|
+
const canvasRef = React105.useRef(null);
|
|
20382
|
+
const rafRef = React105.useRef(0);
|
|
20383
|
+
const frameRef = React105.useRef(0);
|
|
20384
|
+
const lastTimeRef = React105.useRef(0);
|
|
20385
|
+
const onDrawRef = React105.useRef(onDraw);
|
|
20369
20386
|
onDrawRef.current = onDraw;
|
|
20370
|
-
const onTickRef =
|
|
20387
|
+
const onTickRef = React105.useRef(onTick);
|
|
20371
20388
|
onTickRef.current = onTick;
|
|
20372
|
-
|
|
20389
|
+
React105.useEffect(() => {
|
|
20373
20390
|
const canvas = canvasRef.current;
|
|
20374
20391
|
if (!canvas) return;
|
|
20375
20392
|
const ctx = canvas.getContext("2d");
|
|
@@ -20658,7 +20675,7 @@ function TurnPanel({
|
|
|
20658
20675
|
className
|
|
20659
20676
|
}) {
|
|
20660
20677
|
const eventBus = useEventBus();
|
|
20661
|
-
const handleAction =
|
|
20678
|
+
const handleAction = React105.useCallback(
|
|
20662
20679
|
(event) => {
|
|
20663
20680
|
if (event) {
|
|
20664
20681
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -20804,7 +20821,7 @@ function UnitCommandBar({
|
|
|
20804
20821
|
className
|
|
20805
20822
|
}) {
|
|
20806
20823
|
const eventBus = useEventBus();
|
|
20807
|
-
const handleCommand =
|
|
20824
|
+
const handleCommand = React105.useCallback(
|
|
20808
20825
|
(event) => {
|
|
20809
20826
|
if (event) {
|
|
20810
20827
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -21289,7 +21306,7 @@ function GameMenu({
|
|
|
21289
21306
|
} catch {
|
|
21290
21307
|
}
|
|
21291
21308
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
21292
|
-
const handleOptionClick =
|
|
21309
|
+
const handleOptionClick = React105.useCallback(
|
|
21293
21310
|
(option) => {
|
|
21294
21311
|
if (option.event && eventBus) {
|
|
21295
21312
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -21403,7 +21420,7 @@ function GameOverScreen({
|
|
|
21403
21420
|
} catch {
|
|
21404
21421
|
}
|
|
21405
21422
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
21406
|
-
const handleActionClick =
|
|
21423
|
+
const handleActionClick = React105.useCallback(
|
|
21407
21424
|
(action) => {
|
|
21408
21425
|
if (action.event && eventBus) {
|
|
21409
21426
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -24754,7 +24771,7 @@ var init_DocumentViewer = __esm({
|
|
|
24754
24771
|
}
|
|
24755
24772
|
});
|
|
24756
24773
|
function extractTitle(children) {
|
|
24757
|
-
if (!
|
|
24774
|
+
if (!React105__default.isValidElement(children)) return void 0;
|
|
24758
24775
|
const props = children.props;
|
|
24759
24776
|
if (typeof props.title === "string") {
|
|
24760
24777
|
return props.title;
|
|
@@ -24809,7 +24826,7 @@ function LinearView({
|
|
|
24809
24826
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
24810
24827
|
const isDone = i < currentIdx;
|
|
24811
24828
|
const isCurrent = i === currentIdx;
|
|
24812
|
-
return /* @__PURE__ */ jsxs(
|
|
24829
|
+
return /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
|
|
24813
24830
|
i > 0 && /* @__PURE__ */ jsx(
|
|
24814
24831
|
Typography,
|
|
24815
24832
|
{
|
|
@@ -25593,12 +25610,12 @@ var init_Form = __esm({
|
|
|
25593
25610
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
25594
25611
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
25595
25612
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
25596
|
-
const normalizedInitialData =
|
|
25613
|
+
const normalizedInitialData = React105__default.useMemo(() => {
|
|
25597
25614
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
25598
25615
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
25599
25616
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
25600
25617
|
}, [entity, initialData]);
|
|
25601
|
-
const entityDerivedFields =
|
|
25618
|
+
const entityDerivedFields = React105__default.useMemo(() => {
|
|
25602
25619
|
if (fields && fields.length > 0) return void 0;
|
|
25603
25620
|
if (!resolvedEntity) return void 0;
|
|
25604
25621
|
return resolvedEntity.fields.map(
|
|
@@ -25617,16 +25634,16 @@ var init_Form = __esm({
|
|
|
25617
25634
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
25618
25635
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
25619
25636
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
25620
|
-
const [formData, setFormData] =
|
|
25637
|
+
const [formData, setFormData] = React105__default.useState(
|
|
25621
25638
|
normalizedInitialData
|
|
25622
25639
|
);
|
|
25623
|
-
const [collapsedSections, setCollapsedSections] =
|
|
25640
|
+
const [collapsedSections, setCollapsedSections] = React105__default.useState(
|
|
25624
25641
|
/* @__PURE__ */ new Set()
|
|
25625
25642
|
);
|
|
25626
|
-
const [submitError, setSubmitError] =
|
|
25627
|
-
const formRef =
|
|
25643
|
+
const [submitError, setSubmitError] = React105__default.useState(null);
|
|
25644
|
+
const formRef = React105__default.useRef(null);
|
|
25628
25645
|
const formMode = props.mode;
|
|
25629
|
-
const mountedRef =
|
|
25646
|
+
const mountedRef = React105__default.useRef(false);
|
|
25630
25647
|
if (!mountedRef.current) {
|
|
25631
25648
|
mountedRef.current = true;
|
|
25632
25649
|
debug("forms", "mount", {
|
|
@@ -25639,7 +25656,7 @@ var init_Form = __esm({
|
|
|
25639
25656
|
});
|
|
25640
25657
|
}
|
|
25641
25658
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
25642
|
-
const evalContext =
|
|
25659
|
+
const evalContext = React105__default.useMemo(
|
|
25643
25660
|
() => ({
|
|
25644
25661
|
formValues: formData,
|
|
25645
25662
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -25648,7 +25665,7 @@ var init_Form = __esm({
|
|
|
25648
25665
|
}),
|
|
25649
25666
|
[formData, externalContext]
|
|
25650
25667
|
);
|
|
25651
|
-
|
|
25668
|
+
React105__default.useEffect(() => {
|
|
25652
25669
|
debug("forms", "initialData-sync", {
|
|
25653
25670
|
mode: formMode,
|
|
25654
25671
|
normalizedInitialData,
|
|
@@ -25659,7 +25676,7 @@ var init_Form = __esm({
|
|
|
25659
25676
|
setFormData(normalizedInitialData);
|
|
25660
25677
|
}
|
|
25661
25678
|
}, [normalizedInitialData]);
|
|
25662
|
-
const processCalculations =
|
|
25679
|
+
const processCalculations = React105__default.useCallback(
|
|
25663
25680
|
(changedFieldId, newFormData) => {
|
|
25664
25681
|
if (!hiddenCalculations.length) return;
|
|
25665
25682
|
const context = {
|
|
@@ -25684,7 +25701,7 @@ var init_Form = __esm({
|
|
|
25684
25701
|
},
|
|
25685
25702
|
[hiddenCalculations, externalContext, eventBus]
|
|
25686
25703
|
);
|
|
25687
|
-
const checkViolations =
|
|
25704
|
+
const checkViolations = React105__default.useCallback(
|
|
25688
25705
|
(changedFieldId, newFormData) => {
|
|
25689
25706
|
if (!violationTriggers.length) return;
|
|
25690
25707
|
const context = {
|
|
@@ -25722,7 +25739,7 @@ var init_Form = __esm({
|
|
|
25722
25739
|
processCalculations(name, newFormData);
|
|
25723
25740
|
checkViolations(name, newFormData);
|
|
25724
25741
|
};
|
|
25725
|
-
const isFieldVisible =
|
|
25742
|
+
const isFieldVisible = React105__default.useCallback(
|
|
25726
25743
|
(fieldName) => {
|
|
25727
25744
|
const condition = conditionalFields[fieldName];
|
|
25728
25745
|
if (!condition) return true;
|
|
@@ -25730,7 +25747,7 @@ var init_Form = __esm({
|
|
|
25730
25747
|
},
|
|
25731
25748
|
[conditionalFields, evalContext]
|
|
25732
25749
|
);
|
|
25733
|
-
const isSectionVisible =
|
|
25750
|
+
const isSectionVisible = React105__default.useCallback(
|
|
25734
25751
|
(section) => {
|
|
25735
25752
|
if (!section.condition) return true;
|
|
25736
25753
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -25806,7 +25823,7 @@ var init_Form = __esm({
|
|
|
25806
25823
|
eventBus.emit(`UI:${onCancel}`);
|
|
25807
25824
|
}
|
|
25808
25825
|
};
|
|
25809
|
-
const renderField =
|
|
25826
|
+
const renderField = React105__default.useCallback(
|
|
25810
25827
|
(field) => {
|
|
25811
25828
|
const fieldName = field.name || field.field;
|
|
25812
25829
|
if (!fieldName) return null;
|
|
@@ -25827,7 +25844,7 @@ var init_Form = __esm({
|
|
|
25827
25844
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
25828
25845
|
);
|
|
25829
25846
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
25830
|
-
const normalizedFields =
|
|
25847
|
+
const normalizedFields = React105__default.useMemo(() => {
|
|
25831
25848
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
25832
25849
|
return effectiveFields.map((field) => {
|
|
25833
25850
|
if (typeof field === "string") {
|
|
@@ -25849,7 +25866,7 @@ var init_Form = __esm({
|
|
|
25849
25866
|
return field;
|
|
25850
25867
|
});
|
|
25851
25868
|
}, [effectiveFields, resolvedEntity]);
|
|
25852
|
-
const schemaFields =
|
|
25869
|
+
const schemaFields = React105__default.useMemo(() => {
|
|
25853
25870
|
if (normalizedFields.length === 0) return null;
|
|
25854
25871
|
if (isDebugEnabled()) {
|
|
25855
25872
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -25859,7 +25876,7 @@ var init_Form = __esm({
|
|
|
25859
25876
|
}
|
|
25860
25877
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
25861
25878
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
25862
|
-
const sectionElements =
|
|
25879
|
+
const sectionElements = React105__default.useMemo(() => {
|
|
25863
25880
|
if (!sections || sections.length === 0) return null;
|
|
25864
25881
|
return sections.map((section) => {
|
|
25865
25882
|
if (!isSectionVisible(section)) {
|
|
@@ -27391,7 +27408,7 @@ var init_List = __esm({
|
|
|
27391
27408
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
27392
27409
|
return [];
|
|
27393
27410
|
}, [entity]);
|
|
27394
|
-
const getItemActions =
|
|
27411
|
+
const getItemActions = React105__default.useCallback(
|
|
27395
27412
|
(item) => {
|
|
27396
27413
|
if (!itemActions) return [];
|
|
27397
27414
|
if (typeof itemActions === "function") {
|
|
@@ -27828,7 +27845,7 @@ var init_MediaGallery = __esm({
|
|
|
27828
27845
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
27829
27846
|
);
|
|
27830
27847
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
27831
|
-
const items =
|
|
27848
|
+
const items = React105__default.useMemo(() => {
|
|
27832
27849
|
if (propItems) return propItems;
|
|
27833
27850
|
if (entityData.length === 0) return [];
|
|
27834
27851
|
return entityData.map((record, idx) => ({
|
|
@@ -27992,7 +28009,7 @@ var init_MediaGallery = __esm({
|
|
|
27992
28009
|
}
|
|
27993
28010
|
});
|
|
27994
28011
|
function extractTitle2(children) {
|
|
27995
|
-
if (!
|
|
28012
|
+
if (!React105__default.isValidElement(children)) return void 0;
|
|
27996
28013
|
const props = children.props;
|
|
27997
28014
|
if (typeof props.title === "string") {
|
|
27998
28015
|
return props.title;
|
|
@@ -28705,7 +28722,7 @@ var init_PageHeader = __esm({
|
|
|
28705
28722
|
info: "bg-info/10 text-info"
|
|
28706
28723
|
};
|
|
28707
28724
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
28708
|
-
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(
|
|
28725
|
+
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(React105__default.Fragment, { children: [
|
|
28709
28726
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
28710
28727
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
28711
28728
|
"a",
|
|
@@ -28898,7 +28915,7 @@ var init_debugRegistry = __esm({
|
|
|
28898
28915
|
}
|
|
28899
28916
|
});
|
|
28900
28917
|
function useDebugData() {
|
|
28901
|
-
const [data, setData] =
|
|
28918
|
+
const [data, setData] = React105.useState(() => ({
|
|
28902
28919
|
traits: [],
|
|
28903
28920
|
ticks: [],
|
|
28904
28921
|
guards: [],
|
|
@@ -28912,7 +28929,7 @@ function useDebugData() {
|
|
|
28912
28929
|
},
|
|
28913
28930
|
lastUpdate: Date.now()
|
|
28914
28931
|
}));
|
|
28915
|
-
|
|
28932
|
+
React105.useEffect(() => {
|
|
28916
28933
|
const updateData = () => {
|
|
28917
28934
|
setData({
|
|
28918
28935
|
traits: getAllTraits(),
|
|
@@ -29021,12 +29038,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
29021
29038
|
return positions;
|
|
29022
29039
|
}
|
|
29023
29040
|
function WalkMinimap() {
|
|
29024
|
-
const [walkStep, setWalkStep] =
|
|
29025
|
-
const [traits2, setTraits] =
|
|
29026
|
-
const [coveredEdges, setCoveredEdges] =
|
|
29027
|
-
const [completedTraits, setCompletedTraits] =
|
|
29028
|
-
const prevTraitRef =
|
|
29029
|
-
|
|
29041
|
+
const [walkStep, setWalkStep] = React105.useState(null);
|
|
29042
|
+
const [traits2, setTraits] = React105.useState([]);
|
|
29043
|
+
const [coveredEdges, setCoveredEdges] = React105.useState([]);
|
|
29044
|
+
const [completedTraits, setCompletedTraits] = React105.useState(/* @__PURE__ */ new Set());
|
|
29045
|
+
const prevTraitRef = React105.useRef(null);
|
|
29046
|
+
React105.useEffect(() => {
|
|
29030
29047
|
const interval = setInterval(() => {
|
|
29031
29048
|
const w = window;
|
|
29032
29049
|
const step = w.__orbitalWalkStep;
|
|
@@ -29473,15 +29490,15 @@ var init_EntitiesTab = __esm({
|
|
|
29473
29490
|
}
|
|
29474
29491
|
});
|
|
29475
29492
|
function EventFlowTab({ events: events2 }) {
|
|
29476
|
-
const [filter, setFilter] =
|
|
29477
|
-
const containerRef =
|
|
29478
|
-
const [autoScroll, setAutoScroll] =
|
|
29479
|
-
|
|
29493
|
+
const [filter, setFilter] = React105.useState("all");
|
|
29494
|
+
const containerRef = React105.useRef(null);
|
|
29495
|
+
const [autoScroll, setAutoScroll] = React105.useState(true);
|
|
29496
|
+
React105.useEffect(() => {
|
|
29480
29497
|
if (autoScroll && containerRef.current) {
|
|
29481
29498
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
29482
29499
|
}
|
|
29483
29500
|
}, [events2.length, autoScroll]);
|
|
29484
|
-
const filteredEvents =
|
|
29501
|
+
const filteredEvents = React105.useMemo(() => {
|
|
29485
29502
|
if (filter === "all") return events2;
|
|
29486
29503
|
return events2.filter((e) => e.type === filter);
|
|
29487
29504
|
}, [events2, filter]);
|
|
@@ -29600,7 +29617,7 @@ var init_EventFlowTab = __esm({
|
|
|
29600
29617
|
}
|
|
29601
29618
|
});
|
|
29602
29619
|
function GuardsPanel({ guards }) {
|
|
29603
|
-
const [filter, setFilter] =
|
|
29620
|
+
const [filter, setFilter] = React105.useState("all");
|
|
29604
29621
|
if (guards.length === 0) {
|
|
29605
29622
|
return /* @__PURE__ */ jsx(
|
|
29606
29623
|
EmptyState,
|
|
@@ -29613,7 +29630,7 @@ function GuardsPanel({ guards }) {
|
|
|
29613
29630
|
}
|
|
29614
29631
|
const passedCount = guards.filter((g) => g.result).length;
|
|
29615
29632
|
const failedCount = guards.length - passedCount;
|
|
29616
|
-
const filteredGuards =
|
|
29633
|
+
const filteredGuards = React105.useMemo(() => {
|
|
29617
29634
|
if (filter === "all") return guards;
|
|
29618
29635
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
29619
29636
|
return guards.filter((g) => !g.result);
|
|
@@ -29774,10 +29791,10 @@ function EffectBadge({ effect }) {
|
|
|
29774
29791
|
] });
|
|
29775
29792
|
}
|
|
29776
29793
|
function TransitionTimeline({ transitions }) {
|
|
29777
|
-
const containerRef =
|
|
29778
|
-
const [autoScroll, setAutoScroll] =
|
|
29779
|
-
const [expandedId, setExpandedId] =
|
|
29780
|
-
|
|
29794
|
+
const containerRef = React105.useRef(null);
|
|
29795
|
+
const [autoScroll, setAutoScroll] = React105.useState(true);
|
|
29796
|
+
const [expandedId, setExpandedId] = React105.useState(null);
|
|
29797
|
+
React105.useEffect(() => {
|
|
29781
29798
|
if (autoScroll && containerRef.current) {
|
|
29782
29799
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
29783
29800
|
}
|
|
@@ -30063,9 +30080,9 @@ function getAllEvents(traits2) {
|
|
|
30063
30080
|
}
|
|
30064
30081
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
30065
30082
|
const eventBus = useEventBus();
|
|
30066
|
-
const [log3, setLog] =
|
|
30067
|
-
const prevStatesRef =
|
|
30068
|
-
|
|
30083
|
+
const [log3, setLog] = React105.useState([]);
|
|
30084
|
+
const prevStatesRef = React105.useRef(/* @__PURE__ */ new Map());
|
|
30085
|
+
React105.useEffect(() => {
|
|
30069
30086
|
for (const trait of traits2) {
|
|
30070
30087
|
const prev = prevStatesRef.current.get(trait.id);
|
|
30071
30088
|
if (prev && prev !== trait.currentState) {
|
|
@@ -30235,10 +30252,10 @@ function VerifyModePanel({
|
|
|
30235
30252
|
serverCount,
|
|
30236
30253
|
localCount
|
|
30237
30254
|
}) {
|
|
30238
|
-
const [expanded, setExpanded] =
|
|
30239
|
-
const scrollRef =
|
|
30240
|
-
const prevCountRef =
|
|
30241
|
-
|
|
30255
|
+
const [expanded, setExpanded] = React105.useState(true);
|
|
30256
|
+
const scrollRef = React105.useRef(null);
|
|
30257
|
+
const prevCountRef = React105.useRef(0);
|
|
30258
|
+
React105.useEffect(() => {
|
|
30242
30259
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
30243
30260
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
30244
30261
|
}
|
|
@@ -30304,10 +30321,10 @@ function RuntimeDebugger({
|
|
|
30304
30321
|
defaultTab,
|
|
30305
30322
|
schema
|
|
30306
30323
|
}) {
|
|
30307
|
-
const [isCollapsed, setIsCollapsed] =
|
|
30308
|
-
const [isVisible, setIsVisible] =
|
|
30324
|
+
const [isCollapsed, setIsCollapsed] = React105.useState(mode === "verify" ? true : defaultCollapsed);
|
|
30325
|
+
const [isVisible, setIsVisible] = React105.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
30309
30326
|
const debugData = useDebugData();
|
|
30310
|
-
|
|
30327
|
+
React105.useEffect(() => {
|
|
30311
30328
|
if (mode === "inline") return;
|
|
30312
30329
|
return onDebugToggle((enabled) => {
|
|
30313
30330
|
setIsVisible(enabled);
|
|
@@ -30316,7 +30333,7 @@ function RuntimeDebugger({
|
|
|
30316
30333
|
}
|
|
30317
30334
|
});
|
|
30318
30335
|
}, [mode]);
|
|
30319
|
-
|
|
30336
|
+
React105.useEffect(() => {
|
|
30320
30337
|
if (mode === "inline") return;
|
|
30321
30338
|
const handleKeyDown = (e) => {
|
|
30322
30339
|
if (e.key === "`" && isVisible) {
|
|
@@ -30865,7 +30882,7 @@ function SequenceBar({
|
|
|
30865
30882
|
onSlotRemove(index);
|
|
30866
30883
|
}, [onSlotRemove, playing]);
|
|
30867
30884
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
30868
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
30885
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
|
|
30869
30886
|
i > 0 && /* @__PURE__ */ jsx(
|
|
30870
30887
|
Typography,
|
|
30871
30888
|
{
|
|
@@ -32210,7 +32227,7 @@ var init_StatCard = __esm({
|
|
|
32210
32227
|
const labelToUse = propLabel ?? propTitle;
|
|
32211
32228
|
const eventBus = useEventBus();
|
|
32212
32229
|
const { t } = useTranslate();
|
|
32213
|
-
const handleActionClick =
|
|
32230
|
+
const handleActionClick = React105__default.useCallback(() => {
|
|
32214
32231
|
if (action?.event) {
|
|
32215
32232
|
eventBus.emit(`UI:${action.event}`, {});
|
|
32216
32233
|
}
|
|
@@ -32221,7 +32238,7 @@ var init_StatCard = __esm({
|
|
|
32221
32238
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
32222
32239
|
const isLoading = externalLoading ?? false;
|
|
32223
32240
|
const error = externalError;
|
|
32224
|
-
const computeMetricValue =
|
|
32241
|
+
const computeMetricValue = React105__default.useCallback(
|
|
32225
32242
|
(metric, items) => {
|
|
32226
32243
|
if (metric.value !== void 0) {
|
|
32227
32244
|
return metric.value;
|
|
@@ -32260,7 +32277,7 @@ var init_StatCard = __esm({
|
|
|
32260
32277
|
},
|
|
32261
32278
|
[]
|
|
32262
32279
|
);
|
|
32263
|
-
const schemaStats =
|
|
32280
|
+
const schemaStats = React105__default.useMemo(() => {
|
|
32264
32281
|
if (!metrics || metrics.length === 0) return null;
|
|
32265
32282
|
return metrics.map((metric) => ({
|
|
32266
32283
|
label: metric.label,
|
|
@@ -32268,7 +32285,7 @@ var init_StatCard = __esm({
|
|
|
32268
32285
|
format: metric.format
|
|
32269
32286
|
}));
|
|
32270
32287
|
}, [metrics, data, computeMetricValue]);
|
|
32271
|
-
const calculatedTrend =
|
|
32288
|
+
const calculatedTrend = React105__default.useMemo(() => {
|
|
32272
32289
|
if (manualTrend !== void 0) return manualTrend;
|
|
32273
32290
|
if (previousValue === void 0 || currentValue === void 0)
|
|
32274
32291
|
return void 0;
|
|
@@ -33252,7 +33269,7 @@ var init_Timeline = __esm({
|
|
|
33252
33269
|
}) => {
|
|
33253
33270
|
const { t } = useTranslate();
|
|
33254
33271
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
33255
|
-
const items =
|
|
33272
|
+
const items = React105__default.useMemo(() => {
|
|
33256
33273
|
if (propItems) return propItems;
|
|
33257
33274
|
if (entityData.length === 0) return [];
|
|
33258
33275
|
return entityData.map((record, idx) => {
|
|
@@ -33359,7 +33376,7 @@ var init_Timeline = __esm({
|
|
|
33359
33376
|
}
|
|
33360
33377
|
});
|
|
33361
33378
|
function extractToastProps(children) {
|
|
33362
|
-
if (!
|
|
33379
|
+
if (!React105__default.isValidElement(children)) {
|
|
33363
33380
|
if (typeof children === "string") {
|
|
33364
33381
|
return { message: children };
|
|
33365
33382
|
}
|
|
@@ -33397,7 +33414,7 @@ var init_ToastSlot = __esm({
|
|
|
33397
33414
|
eventBus.emit("UI:CLOSE");
|
|
33398
33415
|
};
|
|
33399
33416
|
if (!isVisible) return null;
|
|
33400
|
-
const isCustomContent =
|
|
33417
|
+
const isCustomContent = React105__default.isValidElement(children) && !message;
|
|
33401
33418
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
33402
33419
|
Toast,
|
|
33403
33420
|
{
|
|
@@ -33666,7 +33683,7 @@ var init_WizardContainer = __esm({
|
|
|
33666
33683
|
const isCompleted = index < currentStep;
|
|
33667
33684
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
33668
33685
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
33669
|
-
return /* @__PURE__ */ jsxs(
|
|
33686
|
+
return /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
|
|
33670
33687
|
/* @__PURE__ */ jsx(
|
|
33671
33688
|
Button,
|
|
33672
33689
|
{
|
|
@@ -34048,12 +34065,12 @@ var init_WorldMapTemplate = __esm({
|
|
|
34048
34065
|
}
|
|
34049
34066
|
});
|
|
34050
34067
|
function lazyThree(name, loader) {
|
|
34051
|
-
const Lazy =
|
|
34068
|
+
const Lazy = React105__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
34052
34069
|
function ThreeWrapper(props) {
|
|
34053
|
-
return
|
|
34054
|
-
|
|
34070
|
+
return React105__default.createElement(
|
|
34071
|
+
React105__default.Suspense,
|
|
34055
34072
|
{ fallback: null },
|
|
34056
|
-
|
|
34073
|
+
React105__default.createElement(Lazy, props)
|
|
34057
34074
|
);
|
|
34058
34075
|
}
|
|
34059
34076
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -34541,7 +34558,7 @@ function SuspenseConfigProvider({
|
|
|
34541
34558
|
config,
|
|
34542
34559
|
children
|
|
34543
34560
|
}) {
|
|
34544
|
-
return
|
|
34561
|
+
return React105__default.createElement(
|
|
34545
34562
|
SuspenseConfigContext.Provider,
|
|
34546
34563
|
{ value: config },
|
|
34547
34564
|
children
|
|
@@ -35024,7 +35041,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
35024
35041
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
35025
35042
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
35026
35043
|
}
|
|
35027
|
-
return /* @__PURE__ */ jsx(
|
|
35044
|
+
return /* @__PURE__ */ jsx(React105__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
35028
35045
|
}
|
|
35029
35046
|
if (!child || typeof child !== "object") return null;
|
|
35030
35047
|
const childId = `${parentId}-${index}`;
|
|
@@ -35061,14 +35078,14 @@ function isPatternConfig(value) {
|
|
|
35061
35078
|
if (value === null || value === void 0) return false;
|
|
35062
35079
|
if (typeof value !== "object") return false;
|
|
35063
35080
|
if (Array.isArray(value)) return false;
|
|
35064
|
-
if (
|
|
35081
|
+
if (React105__default.isValidElement(value)) return false;
|
|
35065
35082
|
if (value instanceof Date) return false;
|
|
35066
35083
|
if (typeof value === "function") return false;
|
|
35067
35084
|
const record = value;
|
|
35068
35085
|
return "type" in record && typeof record.type === "string";
|
|
35069
35086
|
}
|
|
35070
35087
|
function isPlainConfigObject(value) {
|
|
35071
|
-
if (
|
|
35088
|
+
if (React105__default.isValidElement(value)) return false;
|
|
35072
35089
|
if (value instanceof Date) return false;
|
|
35073
35090
|
const proto = Object.getPrototypeOf(value);
|
|
35074
35091
|
return proto === Object.prototype || proto === null;
|
|
@@ -35437,7 +35454,7 @@ function resolveLambdaBindings(body, argName, arg) {
|
|
|
35437
35454
|
if (Array.isArray(body)) {
|
|
35438
35455
|
return body.map((b) => resolveLambdaBindings(b, argName, arg));
|
|
35439
35456
|
}
|
|
35440
|
-
if (body !== null && typeof body === "object" && !
|
|
35457
|
+
if (body !== null && typeof body === "object" && !React105__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
35441
35458
|
const out = {};
|
|
35442
35459
|
for (const [k, v] of Object.entries(body)) {
|
|
35443
35460
|
out[k] = resolveLambdaBindings(v, argName, arg);
|
|
@@ -35456,7 +35473,7 @@ function getSlotContentRenderer2() {
|
|
|
35456
35473
|
function makeLambdaFn(argName, lambdaBody, callerKey) {
|
|
35457
35474
|
return (item, index) => {
|
|
35458
35475
|
const resolvedBody = resolveLambdaBindings(lambdaBody, argName, item);
|
|
35459
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
35476
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React105__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
35460
35477
|
return null;
|
|
35461
35478
|
}
|
|
35462
35479
|
const record = resolvedBody;
|
|
@@ -35474,7 +35491,7 @@ function makeLambdaFn(argName, lambdaBody, callerKey) {
|
|
|
35474
35491
|
props: childProps,
|
|
35475
35492
|
priority: 0
|
|
35476
35493
|
};
|
|
35477
|
-
return
|
|
35494
|
+
return React105__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
35478
35495
|
};
|
|
35479
35496
|
}
|
|
35480
35497
|
function convertNode(node, callerKey) {
|
|
@@ -35493,7 +35510,7 @@ function convertNode(node, callerKey) {
|
|
|
35493
35510
|
});
|
|
35494
35511
|
return anyChanged ? mapped : node;
|
|
35495
35512
|
}
|
|
35496
|
-
if (typeof node === "object" && !
|
|
35513
|
+
if (typeof node === "object" && !React105__default.isValidElement(node) && !(node instanceof Date)) {
|
|
35497
35514
|
return convertObjectProps(node);
|
|
35498
35515
|
}
|
|
35499
35516
|
return node;
|