@almadar/ui 4.33.0 → 4.34.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 +1484 -1527
- package/dist/avl/index.css +1 -1
- package/dist/avl/index.js +404 -447
- package/dist/components/index.cjs +1280 -1307
- package/dist/components/index.css +1 -1
- package/dist/components/index.js +381 -408
- package/dist/components/templates/DashboardLayout.d.ts +0 -7
- package/dist/context/index.cjs +0 -10
- package/dist/context/index.d.ts +0 -1
- package/dist/context/index.js +1 -8
- package/dist/docs/index.cjs +2 -2
- package/dist/docs/index.js +2 -2
- package/dist/marketing/index.cjs +2 -2
- package/dist/marketing/index.js +2 -2
- package/dist/providers/index.cjs +1105 -1132
- package/dist/providers/index.css +1 -1
- package/dist/providers/index.js +373 -400
- package/dist/runtime/createClientEffectHandlers.d.ts +1 -9
- package/dist/runtime/index.cjs +1146 -1189
- package/dist/runtime/index.css +1 -1
- package/dist/runtime/index.js +382 -425
- package/package.json +14 -8
- package/dist/context/CurrentPagePathContext.d.ts +0 -9
package/dist/providers/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 { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
4
|
import { EventBusContext, useTraitScope, TraitScopeProvider } from '@almadar/ui/providers';
|
|
5
5
|
import { clsx } from 'clsx';
|
|
@@ -729,7 +729,7 @@ var init_Box = __esm({
|
|
|
729
729
|
fixed: "fixed",
|
|
730
730
|
sticky: "sticky"
|
|
731
731
|
};
|
|
732
|
-
Box =
|
|
732
|
+
Box = React105__default.forwardRef(
|
|
733
733
|
({
|
|
734
734
|
padding,
|
|
735
735
|
paddingX,
|
|
@@ -1428,7 +1428,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
1428
1428
|
const IconComp = value;
|
|
1429
1429
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
1430
1430
|
}
|
|
1431
|
-
if (
|
|
1431
|
+
if (React105__default.isValidElement(value)) {
|
|
1432
1432
|
return value;
|
|
1433
1433
|
}
|
|
1434
1434
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -1504,7 +1504,7 @@ var init_Button = __esm({
|
|
|
1504
1504
|
md: "h-4 w-4",
|
|
1505
1505
|
lg: "h-5 w-5"
|
|
1506
1506
|
};
|
|
1507
|
-
Button =
|
|
1507
|
+
Button = React105__default.forwardRef(
|
|
1508
1508
|
({
|
|
1509
1509
|
className,
|
|
1510
1510
|
variant = "primary",
|
|
@@ -1607,7 +1607,7 @@ var init_Badge = __esm({
|
|
|
1607
1607
|
md: "px-2.5 py-1 text-sm",
|
|
1608
1608
|
lg: "px-3 py-1.5 text-base"
|
|
1609
1609
|
};
|
|
1610
|
-
Badge =
|
|
1610
|
+
Badge = React105__default.forwardRef(
|
|
1611
1611
|
({ className, variant = "default", size = "sm", amount, label, icon, children, ...props }, ref) => {
|
|
1612
1612
|
const iconSizes2 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
|
|
1613
1613
|
const resolvedIcon = typeof icon === "string" ? (() => {
|
|
@@ -1767,7 +1767,7 @@ var Input;
|
|
|
1767
1767
|
var init_Input = __esm({
|
|
1768
1768
|
"components/atoms/Input.tsx"() {
|
|
1769
1769
|
init_cn();
|
|
1770
|
-
Input =
|
|
1770
|
+
Input = React105__default.forwardRef(
|
|
1771
1771
|
({
|
|
1772
1772
|
className,
|
|
1773
1773
|
inputType,
|
|
@@ -1885,7 +1885,7 @@ var Label;
|
|
|
1885
1885
|
var init_Label = __esm({
|
|
1886
1886
|
"components/atoms/Label.tsx"() {
|
|
1887
1887
|
init_cn();
|
|
1888
|
-
Label =
|
|
1888
|
+
Label = React105__default.forwardRef(
|
|
1889
1889
|
({ className, required, children, ...props }, ref) => {
|
|
1890
1890
|
return /* @__PURE__ */ jsxs(
|
|
1891
1891
|
"label",
|
|
@@ -1911,7 +1911,7 @@ var Textarea;
|
|
|
1911
1911
|
var init_Textarea = __esm({
|
|
1912
1912
|
"components/atoms/Textarea.tsx"() {
|
|
1913
1913
|
init_cn();
|
|
1914
|
-
Textarea =
|
|
1914
|
+
Textarea = React105__default.forwardRef(
|
|
1915
1915
|
({ className, error, ...props }, ref) => {
|
|
1916
1916
|
return /* @__PURE__ */ jsx(
|
|
1917
1917
|
"textarea",
|
|
@@ -1940,7 +1940,7 @@ var Select;
|
|
|
1940
1940
|
var init_Select = __esm({
|
|
1941
1941
|
"components/atoms/Select.tsx"() {
|
|
1942
1942
|
init_cn();
|
|
1943
|
-
Select =
|
|
1943
|
+
Select = React105__default.forwardRef(
|
|
1944
1944
|
({ className, options, placeholder, error, ...props }, ref) => {
|
|
1945
1945
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
1946
1946
|
/* @__PURE__ */ jsxs(
|
|
@@ -1982,7 +1982,7 @@ var Checkbox;
|
|
|
1982
1982
|
var init_Checkbox = __esm({
|
|
1983
1983
|
"components/atoms/Checkbox.tsx"() {
|
|
1984
1984
|
init_cn();
|
|
1985
|
-
Checkbox =
|
|
1985
|
+
Checkbox = React105__default.forwardRef(
|
|
1986
1986
|
({ className, label, id, ...props }, ref) => {
|
|
1987
1987
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
1988
1988
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
@@ -2064,7 +2064,7 @@ var init_Card = __esm({
|
|
|
2064
2064
|
md: "shadow",
|
|
2065
2065
|
lg: "shadow-lg"
|
|
2066
2066
|
};
|
|
2067
|
-
Card =
|
|
2067
|
+
Card = React105__default.forwardRef(
|
|
2068
2068
|
({
|
|
2069
2069
|
className,
|
|
2070
2070
|
variant = "bordered",
|
|
@@ -2100,9 +2100,9 @@ var init_Card = __esm({
|
|
|
2100
2100
|
}
|
|
2101
2101
|
);
|
|
2102
2102
|
Card.displayName = "Card";
|
|
2103
|
-
CardHeader =
|
|
2103
|
+
CardHeader = React105__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
2104
2104
|
CardHeader.displayName = "CardHeader";
|
|
2105
|
-
CardTitle =
|
|
2105
|
+
CardTitle = React105__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2106
2106
|
"h3",
|
|
2107
2107
|
{
|
|
2108
2108
|
ref,
|
|
@@ -2115,11 +2115,11 @@ var init_Card = __esm({
|
|
|
2115
2115
|
}
|
|
2116
2116
|
));
|
|
2117
2117
|
CardTitle.displayName = "CardTitle";
|
|
2118
|
-
CardContent =
|
|
2118
|
+
CardContent = React105__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
2119
2119
|
CardContent.displayName = "CardContent";
|
|
2120
2120
|
CardBody = CardContent;
|
|
2121
2121
|
CardBody.displayName = "CardBody";
|
|
2122
|
-
CardFooter =
|
|
2122
|
+
CardFooter = React105__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2123
2123
|
"div",
|
|
2124
2124
|
{
|
|
2125
2125
|
ref,
|
|
@@ -2140,7 +2140,7 @@ var init_Spinner = __esm({
|
|
|
2140
2140
|
md: "h-6 w-6",
|
|
2141
2141
|
lg: "h-8 w-8"
|
|
2142
2142
|
};
|
|
2143
|
-
Spinner =
|
|
2143
|
+
Spinner = React105__default.forwardRef(
|
|
2144
2144
|
({ className, size = "md", ...props }, ref) => {
|
|
2145
2145
|
return /* @__PURE__ */ jsx(
|
|
2146
2146
|
"div",
|
|
@@ -2588,7 +2588,7 @@ var Radio;
|
|
|
2588
2588
|
var init_Radio = __esm({
|
|
2589
2589
|
"components/atoms/Radio.tsx"() {
|
|
2590
2590
|
init_cn();
|
|
2591
|
-
Radio =
|
|
2591
|
+
Radio = React105__default.forwardRef(
|
|
2592
2592
|
({
|
|
2593
2593
|
label,
|
|
2594
2594
|
helperText,
|
|
@@ -2699,7 +2699,7 @@ var init_Switch = __esm({
|
|
|
2699
2699
|
"components/atoms/Switch.tsx"() {
|
|
2700
2700
|
"use client";
|
|
2701
2701
|
init_cn();
|
|
2702
|
-
Switch =
|
|
2702
|
+
Switch = React105.forwardRef(
|
|
2703
2703
|
({
|
|
2704
2704
|
checked,
|
|
2705
2705
|
defaultChecked = false,
|
|
@@ -2710,10 +2710,10 @@ var init_Switch = __esm({
|
|
|
2710
2710
|
name,
|
|
2711
2711
|
className
|
|
2712
2712
|
}, ref) => {
|
|
2713
|
-
const [isChecked, setIsChecked] =
|
|
2713
|
+
const [isChecked, setIsChecked] = React105.useState(
|
|
2714
2714
|
checked !== void 0 ? checked : defaultChecked
|
|
2715
2715
|
);
|
|
2716
|
-
|
|
2716
|
+
React105.useEffect(() => {
|
|
2717
2717
|
if (checked !== void 0) {
|
|
2718
2718
|
setIsChecked(checked);
|
|
2719
2719
|
}
|
|
@@ -3133,8 +3133,8 @@ var init_LawReferenceTooltip = __esm({
|
|
|
3133
3133
|
position = "top",
|
|
3134
3134
|
className
|
|
3135
3135
|
}) => {
|
|
3136
|
-
const [isVisible, setIsVisible] =
|
|
3137
|
-
const timeoutRef =
|
|
3136
|
+
const [isVisible, setIsVisible] = React105__default.useState(false);
|
|
3137
|
+
const timeoutRef = React105__default.useRef(null);
|
|
3138
3138
|
const handleMouseEnter = () => {
|
|
3139
3139
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
3140
3140
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -3143,7 +3143,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
3143
3143
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
3144
3144
|
setIsVisible(false);
|
|
3145
3145
|
};
|
|
3146
|
-
|
|
3146
|
+
React105__default.useEffect(() => {
|
|
3147
3147
|
return () => {
|
|
3148
3148
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
3149
3149
|
};
|
|
@@ -3353,7 +3353,7 @@ var init_StatusDot = __esm({
|
|
|
3353
3353
|
md: "w-2.5 h-2.5",
|
|
3354
3354
|
lg: "w-3 h-3"
|
|
3355
3355
|
};
|
|
3356
|
-
StatusDot =
|
|
3356
|
+
StatusDot = React105__default.forwardRef(
|
|
3357
3357
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
3358
3358
|
return /* @__PURE__ */ jsx(
|
|
3359
3359
|
"span",
|
|
@@ -3406,7 +3406,7 @@ var init_TrendIndicator = __esm({
|
|
|
3406
3406
|
down: TrendingDown,
|
|
3407
3407
|
flat: ArrowRight
|
|
3408
3408
|
};
|
|
3409
|
-
TrendIndicator =
|
|
3409
|
+
TrendIndicator = React105__default.forwardRef(
|
|
3410
3410
|
({
|
|
3411
3411
|
className,
|
|
3412
3412
|
value,
|
|
@@ -3473,7 +3473,7 @@ var init_RangeSlider = __esm({
|
|
|
3473
3473
|
md: "w-4 h-4",
|
|
3474
3474
|
lg: "w-5 h-5"
|
|
3475
3475
|
};
|
|
3476
|
-
RangeSlider =
|
|
3476
|
+
RangeSlider = React105__default.forwardRef(
|
|
3477
3477
|
({
|
|
3478
3478
|
className,
|
|
3479
3479
|
min = 0,
|
|
@@ -4118,9 +4118,9 @@ function ScoreDisplay({
|
|
|
4118
4118
|
...rest
|
|
4119
4119
|
}) {
|
|
4120
4120
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
|
|
4121
|
-
const [displayValue, setDisplayValue] =
|
|
4122
|
-
const [isAnimating, setIsAnimating] =
|
|
4123
|
-
|
|
4121
|
+
const [displayValue, setDisplayValue] = React105.useState(resolvedValue);
|
|
4122
|
+
const [isAnimating, setIsAnimating] = React105.useState(false);
|
|
4123
|
+
React105.useEffect(() => {
|
|
4124
4124
|
if (!animated || displayValue === resolvedValue) {
|
|
4125
4125
|
setDisplayValue(resolvedValue);
|
|
4126
4126
|
return;
|
|
@@ -4190,9 +4190,9 @@ function ControlButton({
|
|
|
4190
4190
|
className
|
|
4191
4191
|
}) {
|
|
4192
4192
|
const eventBus = useEventBus();
|
|
4193
|
-
const [isPressed, setIsPressed] =
|
|
4193
|
+
const [isPressed, setIsPressed] = React105.useState(false);
|
|
4194
4194
|
const actualPressed = pressed ?? isPressed;
|
|
4195
|
-
const handlePointerDown =
|
|
4195
|
+
const handlePointerDown = React105.useCallback(
|
|
4196
4196
|
(e) => {
|
|
4197
4197
|
e.preventDefault();
|
|
4198
4198
|
if (disabled) return;
|
|
@@ -4202,7 +4202,7 @@ function ControlButton({
|
|
|
4202
4202
|
},
|
|
4203
4203
|
[disabled, pressEvent, eventBus, onPress]
|
|
4204
4204
|
);
|
|
4205
|
-
const handlePointerUp =
|
|
4205
|
+
const handlePointerUp = React105.useCallback(
|
|
4206
4206
|
(e) => {
|
|
4207
4207
|
e.preventDefault();
|
|
4208
4208
|
if (disabled) return;
|
|
@@ -4212,7 +4212,7 @@ function ControlButton({
|
|
|
4212
4212
|
},
|
|
4213
4213
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
4214
4214
|
);
|
|
4215
|
-
const handlePointerLeave =
|
|
4215
|
+
const handlePointerLeave = React105.useCallback(
|
|
4216
4216
|
(e) => {
|
|
4217
4217
|
if (isPressed) {
|
|
4218
4218
|
setIsPressed(false);
|
|
@@ -5110,9 +5110,9 @@ function MiniMap({
|
|
|
5110
5110
|
viewportRect,
|
|
5111
5111
|
className
|
|
5112
5112
|
}) {
|
|
5113
|
-
const canvasRef =
|
|
5114
|
-
const frameRef =
|
|
5115
|
-
|
|
5113
|
+
const canvasRef = React105.useRef(null);
|
|
5114
|
+
const frameRef = React105.useRef(0);
|
|
5115
|
+
React105.useEffect(() => {
|
|
5116
5116
|
const canvas = canvasRef.current;
|
|
5117
5117
|
if (!canvas) return;
|
|
5118
5118
|
const ctx = canvas.getContext("2d");
|
|
@@ -5405,7 +5405,7 @@ var init_ErrorBoundary = __esm({
|
|
|
5405
5405
|
"use client";
|
|
5406
5406
|
init_cn();
|
|
5407
5407
|
init_ErrorState();
|
|
5408
|
-
ErrorBoundary = class extends
|
|
5408
|
+
ErrorBoundary = class extends React105__default.Component {
|
|
5409
5409
|
constructor(props) {
|
|
5410
5410
|
super(props);
|
|
5411
5411
|
__publicField(this, "reset", () => {
|
|
@@ -6209,8 +6209,8 @@ var init_Tooltip = __esm({
|
|
|
6209
6209
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
6210
6210
|
};
|
|
6211
6211
|
}, []);
|
|
6212
|
-
const triggerElement =
|
|
6213
|
-
const trigger =
|
|
6212
|
+
const triggerElement = React105__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
6213
|
+
const trigger = React105__default.cloneElement(triggerElement, {
|
|
6214
6214
|
ref: triggerRef,
|
|
6215
6215
|
onMouseEnter: handleMouseEnter,
|
|
6216
6216
|
onMouseLeave: handleMouseLeave,
|
|
@@ -6331,8 +6331,8 @@ var init_Popover = __esm({
|
|
|
6331
6331
|
onMouseEnter: handleOpen,
|
|
6332
6332
|
onMouseLeave: handleClose
|
|
6333
6333
|
};
|
|
6334
|
-
const childElement =
|
|
6335
|
-
const triggerElement =
|
|
6334
|
+
const childElement = React105__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
6335
|
+
const triggerElement = React105__default.cloneElement(
|
|
6336
6336
|
childElement,
|
|
6337
6337
|
{
|
|
6338
6338
|
ref: triggerRef,
|
|
@@ -6449,8 +6449,8 @@ var init_Menu = __esm({
|
|
|
6449
6449
|
"bottom-start": "top-full left-0 mt-2",
|
|
6450
6450
|
"bottom-end": "top-full right-0 mt-2"
|
|
6451
6451
|
};
|
|
6452
|
-
const triggerChild =
|
|
6453
|
-
const triggerElement =
|
|
6452
|
+
const triggerChild = React105__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx("span", { children: trigger });
|
|
6453
|
+
const triggerElement = React105__default.cloneElement(
|
|
6454
6454
|
triggerChild,
|
|
6455
6455
|
{
|
|
6456
6456
|
ref: triggerRef,
|
|
@@ -6969,7 +6969,7 @@ var init_MapView = __esm({
|
|
|
6969
6969
|
shadowSize: [41, 41]
|
|
6970
6970
|
});
|
|
6971
6971
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
6972
|
-
const { useEffect: useEffect60, useRef: useRef59, useCallback: useCallback88, useState: useState80 } =
|
|
6972
|
+
const { useEffect: useEffect60, useRef: useRef59, useCallback: useCallback88, useState: useState80 } = React105__default;
|
|
6973
6973
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
6974
6974
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
6975
6975
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
@@ -7200,7 +7200,7 @@ function InputPattern({
|
|
|
7200
7200
|
fieldName
|
|
7201
7201
|
}) {
|
|
7202
7202
|
const { emit } = useEventBus();
|
|
7203
|
-
const [localValue, setLocalValue] =
|
|
7203
|
+
const [localValue, setLocalValue] = React105__default.useState(value);
|
|
7204
7204
|
const handleChange = (e) => {
|
|
7205
7205
|
setLocalValue(e.target.value);
|
|
7206
7206
|
if (onChange) {
|
|
@@ -7238,7 +7238,7 @@ function TextareaPattern({
|
|
|
7238
7238
|
fieldName
|
|
7239
7239
|
}) {
|
|
7240
7240
|
const { emit } = useEventBus();
|
|
7241
|
-
const [localValue, setLocalValue] =
|
|
7241
|
+
const [localValue, setLocalValue] = React105__default.useState(value);
|
|
7242
7242
|
const handleChange = (e) => {
|
|
7243
7243
|
setLocalValue(e.target.value);
|
|
7244
7244
|
if (onChange) {
|
|
@@ -7270,7 +7270,7 @@ function SelectPattern({
|
|
|
7270
7270
|
fieldName
|
|
7271
7271
|
}) {
|
|
7272
7272
|
const { emit } = useEventBus();
|
|
7273
|
-
const [localValue, setLocalValue] =
|
|
7273
|
+
const [localValue, setLocalValue] = React105__default.useState(value);
|
|
7274
7274
|
const handleChange = (e) => {
|
|
7275
7275
|
setLocalValue(e.target.value);
|
|
7276
7276
|
if (onChange) {
|
|
@@ -7299,7 +7299,7 @@ function CheckboxPattern({
|
|
|
7299
7299
|
className
|
|
7300
7300
|
}) {
|
|
7301
7301
|
const { emit } = useEventBus();
|
|
7302
|
-
const [localChecked, setLocalChecked] =
|
|
7302
|
+
const [localChecked, setLocalChecked] = React105__default.useState(checked);
|
|
7303
7303
|
const handleChange = (e) => {
|
|
7304
7304
|
setLocalChecked(e.target.checked);
|
|
7305
7305
|
if (onChange) {
|
|
@@ -7530,8 +7530,8 @@ function ActionButtons({
|
|
|
7530
7530
|
disabled
|
|
7531
7531
|
}) {
|
|
7532
7532
|
const eventBus = useEventBus();
|
|
7533
|
-
const [activeButtons, setActiveButtons] =
|
|
7534
|
-
const handlePress =
|
|
7533
|
+
const [activeButtons, setActiveButtons] = React105.useState(/* @__PURE__ */ new Set());
|
|
7534
|
+
const handlePress = React105.useCallback(
|
|
7535
7535
|
(id) => {
|
|
7536
7536
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
7537
7537
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -7539,7 +7539,7 @@ function ActionButtons({
|
|
|
7539
7539
|
},
|
|
7540
7540
|
[actionEvent, eventBus, onAction]
|
|
7541
7541
|
);
|
|
7542
|
-
const handleRelease =
|
|
7542
|
+
const handleRelease = React105.useCallback(
|
|
7543
7543
|
(id) => {
|
|
7544
7544
|
setActiveButtons((prev) => {
|
|
7545
7545
|
const next = new Set(prev);
|
|
@@ -9550,9 +9550,9 @@ var init_ScaledDiagram = __esm({
|
|
|
9550
9550
|
}
|
|
9551
9551
|
});
|
|
9552
9552
|
|
|
9553
|
-
// node_modules
|
|
9553
|
+
// node_modules/katex/dist/katex.min.css
|
|
9554
9554
|
var init_katex_min = __esm({
|
|
9555
|
-
"node_modules
|
|
9555
|
+
"node_modules/katex/dist/katex.min.css"() {
|
|
9556
9556
|
}
|
|
9557
9557
|
});
|
|
9558
9558
|
var MarkdownContent;
|
|
@@ -9562,7 +9562,7 @@ var init_MarkdownContent = __esm({
|
|
|
9562
9562
|
init_Box();
|
|
9563
9563
|
init_useTranslate();
|
|
9564
9564
|
init_cn();
|
|
9565
|
-
MarkdownContent =
|
|
9565
|
+
MarkdownContent = React105__default.memo(
|
|
9566
9566
|
({ content, direction, className }) => {
|
|
9567
9567
|
const { t: _t } = useTranslate();
|
|
9568
9568
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -9779,7 +9779,7 @@ var init_CodeBlock = __esm({
|
|
|
9779
9779
|
loloStyle = { ...dark, ...loloStyleOverrides };
|
|
9780
9780
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
9781
9781
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
9782
|
-
CodeBlock =
|
|
9782
|
+
CodeBlock = React105__default.memo(
|
|
9783
9783
|
({
|
|
9784
9784
|
code: rawCode,
|
|
9785
9785
|
language = "text",
|
|
@@ -11088,7 +11088,7 @@ var init_StateMachineView = __esm({
|
|
|
11088
11088
|
style: { top: title ? 30 : 0 },
|
|
11089
11089
|
children: [
|
|
11090
11090
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
11091
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
11091
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React105__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
11092
11092
|
StateNode,
|
|
11093
11093
|
{
|
|
11094
11094
|
state,
|
|
@@ -16875,7 +16875,7 @@ function CraftingRecipe({
|
|
|
16875
16875
|
className
|
|
16876
16876
|
}) {
|
|
16877
16877
|
const eventBus = useEventBus();
|
|
16878
|
-
const handleCraft =
|
|
16878
|
+
const handleCraft = React105.useCallback(() => {
|
|
16879
16879
|
onCraft?.();
|
|
16880
16880
|
if (craftEvent) {
|
|
16881
16881
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -16892,7 +16892,7 @@ function CraftingRecipe({
|
|
|
16892
16892
|
children: [
|
|
16893
16893
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
16894
16894
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
16895
|
-
return /* @__PURE__ */ jsxs(
|
|
16895
|
+
return /* @__PURE__ */ jsxs(React105.Fragment, { children: [
|
|
16896
16896
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
16897
16897
|
ItemSlot,
|
|
16898
16898
|
{
|
|
@@ -17186,8 +17186,8 @@ function DPad({
|
|
|
17186
17186
|
}) {
|
|
17187
17187
|
const eventBus = useEventBus();
|
|
17188
17188
|
const sizes = sizeMap15[size];
|
|
17189
|
-
const [activeDirections, setActiveDirections] =
|
|
17190
|
-
const handlePress =
|
|
17189
|
+
const [activeDirections, setActiveDirections] = React105.useState(/* @__PURE__ */ new Set());
|
|
17190
|
+
const handlePress = React105.useCallback(
|
|
17191
17191
|
(direction) => {
|
|
17192
17192
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
17193
17193
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -17195,7 +17195,7 @@ function DPad({
|
|
|
17195
17195
|
},
|
|
17196
17196
|
[directionEvent, eventBus, onDirection]
|
|
17197
17197
|
);
|
|
17198
|
-
const handleRelease =
|
|
17198
|
+
const handleRelease = React105.useCallback(
|
|
17199
17199
|
(direction) => {
|
|
17200
17200
|
setActiveDirections((prev) => {
|
|
17201
17201
|
const next = new Set(prev);
|
|
@@ -17327,19 +17327,6 @@ var init_useAuthContext = __esm({
|
|
|
17327
17327
|
"hooks/useAuthContext.ts"() {
|
|
17328
17328
|
}
|
|
17329
17329
|
});
|
|
17330
|
-
var CurrentPagePathContext, CurrentPagePathProvider, useCurrentPagePath;
|
|
17331
|
-
var init_CurrentPagePathContext = __esm({
|
|
17332
|
-
"context/CurrentPagePathContext.tsx"() {
|
|
17333
|
-
"use client";
|
|
17334
|
-
CurrentPagePathContext = createContext(void 0);
|
|
17335
|
-
CurrentPagePathProvider = ({
|
|
17336
|
-
value,
|
|
17337
|
-
children
|
|
17338
|
-
}) => /* @__PURE__ */ jsx(CurrentPagePathContext.Provider, { value, children });
|
|
17339
|
-
CurrentPagePathProvider.displayName = "CurrentPagePathProvider";
|
|
17340
|
-
useCurrentPagePath = () => useContext(CurrentPagePathContext);
|
|
17341
|
-
}
|
|
17342
|
-
});
|
|
17343
17330
|
var DashboardLayout, NavLink;
|
|
17344
17331
|
var init_DashboardLayout = __esm({
|
|
17345
17332
|
"components/templates/DashboardLayout.tsx"() {
|
|
@@ -17353,7 +17340,6 @@ var init_DashboardLayout = __esm({
|
|
|
17353
17340
|
init_useAuthContext();
|
|
17354
17341
|
init_useEventBus();
|
|
17355
17342
|
init_useTranslate();
|
|
17356
|
-
init_CurrentPagePathContext();
|
|
17357
17343
|
DashboardLayout = ({
|
|
17358
17344
|
appName = "{{APP_TITLE}}",
|
|
17359
17345
|
logo,
|
|
@@ -17370,7 +17356,6 @@ var init_DashboardLayout = __esm({
|
|
|
17370
17356
|
showThemeToggle = true,
|
|
17371
17357
|
sidebarFooter,
|
|
17372
17358
|
onSignOut: onSignOutProp,
|
|
17373
|
-
currentPath,
|
|
17374
17359
|
children
|
|
17375
17360
|
}) => {
|
|
17376
17361
|
const eventBus = useEventBus();
|
|
@@ -17391,271 +17376,259 @@ var init_DashboardLayout = __esm({
|
|
|
17391
17376
|
const [sidebarOpen, setSidebarOpen] = useState(false);
|
|
17392
17377
|
const [userMenuOpen, setUserMenuOpen] = useState(false);
|
|
17393
17378
|
const location = useLocation();
|
|
17394
|
-
const ctxPagePath = useCurrentPagePath();
|
|
17395
|
-
const activePath = currentPath ?? ctxPagePath ?? location.pathname;
|
|
17396
17379
|
const { signOut: authSignOut } = useAuthContext();
|
|
17397
17380
|
const user = userProp || (null);
|
|
17398
17381
|
const { t } = useTranslate();
|
|
17399
17382
|
const handleSignOut = onSignOutProp || authSignOut;
|
|
17400
|
-
return /* @__PURE__ */ jsxs(
|
|
17401
|
-
|
|
17402
|
-
|
|
17403
|
-
|
|
17404
|
-
|
|
17405
|
-
|
|
17406
|
-
|
|
17407
|
-
|
|
17408
|
-
|
|
17409
|
-
|
|
17410
|
-
|
|
17411
|
-
|
|
17383
|
+
return /* @__PURE__ */ jsxs(Box, { className: "min-h-screen bg-background dark:bg-background", children: [
|
|
17384
|
+
sidebarOpen && /* @__PURE__ */ jsx(
|
|
17385
|
+
Box,
|
|
17386
|
+
{
|
|
17387
|
+
className: "fixed inset-0 bg-foreground/50 dark:bg-foreground/70 z-20 lg:hidden",
|
|
17388
|
+
onClick: () => setSidebarOpen(false)
|
|
17389
|
+
}
|
|
17390
|
+
),
|
|
17391
|
+
/* @__PURE__ */ jsxs(
|
|
17392
|
+
Box,
|
|
17393
|
+
{
|
|
17394
|
+
as: "aside",
|
|
17395
|
+
className: cn(
|
|
17396
|
+
"fixed inset-y-0 left-0 z-30 w-64 bg-card dark:bg-card border-r border-border dark:border-border",
|
|
17397
|
+
"transform transition-transform duration-200 ease-in-out lg:translate-x-0",
|
|
17398
|
+
sidebarOpen ? "translate-x-0" : "-translate-x-full"
|
|
17412
17399
|
),
|
|
17413
|
-
|
|
17414
|
-
|
|
17415
|
-
|
|
17416
|
-
|
|
17417
|
-
|
|
17418
|
-
|
|
17419
|
-
"
|
|
17420
|
-
|
|
17421
|
-
|
|
17422
|
-
|
|
17423
|
-
|
|
17424
|
-
|
|
17425
|
-
|
|
17426
|
-
|
|
17400
|
+
children: [
|
|
17401
|
+
/* @__PURE__ */ jsxs(
|
|
17402
|
+
HStack,
|
|
17403
|
+
{
|
|
17404
|
+
align: "center",
|
|
17405
|
+
justify: "between",
|
|
17406
|
+
className: "h-16 px-4 border-b border-border dark:border-border",
|
|
17407
|
+
children: [
|
|
17408
|
+
/* @__PURE__ */ jsxs(Link, { to: "/", className: "flex items-center gap-2", children: [
|
|
17409
|
+
logo || /* @__PURE__ */ jsx(Box, { className: "w-8 h-8 bg-primary-600 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsx(
|
|
17410
|
+
Typography,
|
|
17411
|
+
{
|
|
17412
|
+
variant: "small",
|
|
17413
|
+
className: "text-white font-bold text-sm",
|
|
17414
|
+
as: "span",
|
|
17415
|
+
children: appName.charAt(0).toUpperCase()
|
|
17416
|
+
}
|
|
17417
|
+
) }),
|
|
17418
|
+
/* @__PURE__ */ jsx(
|
|
17419
|
+
Typography,
|
|
17420
|
+
{
|
|
17421
|
+
variant: "label",
|
|
17422
|
+
className: "font-semibold text-foreground dark:text-foreground",
|
|
17423
|
+
as: "span",
|
|
17424
|
+
children: appName
|
|
17425
|
+
}
|
|
17426
|
+
)
|
|
17427
|
+
] }),
|
|
17428
|
+
/* @__PURE__ */ jsx(
|
|
17429
|
+
Button,
|
|
17430
|
+
{
|
|
17431
|
+
variant: "ghost",
|
|
17432
|
+
className: "lg:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground",
|
|
17433
|
+
onClick: () => setSidebarOpen(false),
|
|
17434
|
+
children: /* @__PURE__ */ jsx(X, { className: "h-5 w-5" })
|
|
17435
|
+
}
|
|
17436
|
+
)
|
|
17437
|
+
]
|
|
17438
|
+
}
|
|
17439
|
+
),
|
|
17440
|
+
/* @__PURE__ */ jsx(
|
|
17441
|
+
VStack,
|
|
17442
|
+
{
|
|
17443
|
+
as: "nav",
|
|
17444
|
+
gap: "none",
|
|
17445
|
+
className: "flex-1 px-3 py-4 space-y-1 overflow-y-auto",
|
|
17446
|
+
children: navItems.map((item) => /* @__PURE__ */ jsx(
|
|
17447
|
+
NavLink,
|
|
17427
17448
|
{
|
|
17428
|
-
|
|
17429
|
-
|
|
17430
|
-
|
|
17431
|
-
|
|
17432
|
-
|
|
17433
|
-
|
|
17434
|
-
|
|
17435
|
-
|
|
17436
|
-
|
|
17437
|
-
|
|
17438
|
-
|
|
17439
|
-
|
|
17440
|
-
|
|
17441
|
-
|
|
17442
|
-
|
|
17443
|
-
|
|
17444
|
-
|
|
17445
|
-
|
|
17446
|
-
|
|
17447
|
-
|
|
17448
|
-
|
|
17449
|
+
item,
|
|
17450
|
+
currentPath: location.pathname
|
|
17451
|
+
},
|
|
17452
|
+
item.href
|
|
17453
|
+
))
|
|
17454
|
+
}
|
|
17455
|
+
),
|
|
17456
|
+
sidebarFooter && /* @__PURE__ */ jsx(Box, { className: "p-4 border-t border-border dark:border-border", children: sidebarFooter })
|
|
17457
|
+
]
|
|
17458
|
+
}
|
|
17459
|
+
),
|
|
17460
|
+
/* @__PURE__ */ jsxs(Box, { className: "lg:pl-64", children: [
|
|
17461
|
+
/* @__PURE__ */ jsx(
|
|
17462
|
+
Box,
|
|
17463
|
+
{
|
|
17464
|
+
as: "header",
|
|
17465
|
+
className: "sticky top-0 z-20 h-16 bg-card dark:bg-card border-b border-border dark:border-border",
|
|
17466
|
+
children: /* @__PURE__ */ jsxs(
|
|
17467
|
+
HStack,
|
|
17468
|
+
{
|
|
17469
|
+
align: "center",
|
|
17470
|
+
justify: "between",
|
|
17471
|
+
className: "h-full px-4 gap-4",
|
|
17472
|
+
children: [
|
|
17473
|
+
/* @__PURE__ */ jsx(
|
|
17474
|
+
Button,
|
|
17475
|
+
{
|
|
17476
|
+
variant: "ghost",
|
|
17477
|
+
className: "lg:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground touch-manipulation min-h-[44px] min-w-[44px] flex items-center justify-center",
|
|
17478
|
+
onClick: () => setSidebarOpen(true),
|
|
17479
|
+
"aria-label": "Open sidebar",
|
|
17480
|
+
children: /* @__PURE__ */ jsx(Menu$1, { className: "h-5 w-5" })
|
|
17481
|
+
}
|
|
17482
|
+
),
|
|
17483
|
+
searchEnabled && /* @__PURE__ */ jsx(Box, { className: "hidden sm:block flex-1 max-w-md", children: /* @__PURE__ */ jsxs(Box, { className: "relative", children: [
|
|
17484
|
+
/* @__PURE__ */ jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground dark:text-muted-foreground" }),
|
|
17485
|
+
/* @__PURE__ */ jsx(
|
|
17486
|
+
Input,
|
|
17487
|
+
{
|
|
17488
|
+
type: "search",
|
|
17489
|
+
placeholder: t("common.search"),
|
|
17490
|
+
className: "pl-10 w-full",
|
|
17491
|
+
onKeyDown: (e) => {
|
|
17492
|
+
if (e.key === "Enter") {
|
|
17493
|
+
handleSearchSubmit(e.target.value);
|
|
17449
17494
|
}
|
|
17450
|
-
)
|
|
17451
|
-
] }),
|
|
17452
|
-
/* @__PURE__ */ jsx(
|
|
17453
|
-
Button,
|
|
17454
|
-
{
|
|
17455
|
-
variant: "ghost",
|
|
17456
|
-
className: "lg:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground",
|
|
17457
|
-
onClick: () => setSidebarOpen(false),
|
|
17458
|
-
children: /* @__PURE__ */ jsx(X, { className: "h-5 w-5" })
|
|
17459
17495
|
}
|
|
17460
|
-
|
|
17461
|
-
|
|
17462
|
-
}
|
|
17463
|
-
|
|
17464
|
-
|
|
17465
|
-
|
|
17466
|
-
|
|
17467
|
-
|
|
17468
|
-
gap: "none",
|
|
17469
|
-
className: "flex-1 px-3 py-4 space-y-1 overflow-y-auto",
|
|
17470
|
-
children: navItems.map((item) => /* @__PURE__ */ jsx(
|
|
17471
|
-
NavLink,
|
|
17496
|
+
}
|
|
17497
|
+
)
|
|
17498
|
+
] }) }),
|
|
17499
|
+
/* @__PURE__ */ jsxs(HStack, { align: "center", gap: "xs", children: [
|
|
17500
|
+
headerActions,
|
|
17501
|
+
showThemeToggle && /* @__PURE__ */ jsx(ThemeToggle, {}),
|
|
17502
|
+
topBarActions.map((action, idx) => /* @__PURE__ */ jsxs(
|
|
17503
|
+
Button,
|
|
17472
17504
|
{
|
|
17473
|
-
|
|
17474
|
-
|
|
17505
|
+
variant: "ghost",
|
|
17506
|
+
className: "relative p-2 rounded-full hover:bg-muted dark:hover:bg-muted",
|
|
17507
|
+
onClick: () => handleTopBarActionClick(action.event),
|
|
17508
|
+
"aria-label": action.label ?? action.icon,
|
|
17509
|
+
children: [
|
|
17510
|
+
/* @__PURE__ */ jsx(Icon, { name: action.icon, className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
|
|
17511
|
+
action.badge !== void 0 && action.badge !== null && action.badge !== 0 && action.badge !== "" && /* @__PURE__ */ jsx(
|
|
17512
|
+
Box,
|
|
17513
|
+
{
|
|
17514
|
+
as: "span",
|
|
17515
|
+
className: cn(
|
|
17516
|
+
"absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 rounded-full text-[10px] font-semibold text-white flex items-center justify-center",
|
|
17517
|
+
action.variant === "danger" ? "bg-error" : action.variant === "primary" ? "bg-primary" : "bg-foreground"
|
|
17518
|
+
),
|
|
17519
|
+
children: action.badge
|
|
17520
|
+
}
|
|
17521
|
+
)
|
|
17522
|
+
]
|
|
17475
17523
|
},
|
|
17476
|
-
|
|
17477
|
-
))
|
|
17478
|
-
|
|
17479
|
-
|
|
17480
|
-
|
|
17481
|
-
|
|
17482
|
-
|
|
17483
|
-
|
|
17484
|
-
|
|
17485
|
-
|
|
17486
|
-
|
|
17487
|
-
|
|
17488
|
-
|
|
17489
|
-
|
|
17490
|
-
|
|
17491
|
-
|
|
17492
|
-
|
|
17493
|
-
|
|
17494
|
-
|
|
17495
|
-
|
|
17496
|
-
|
|
17497
|
-
|
|
17524
|
+
`${action.event}-${idx}`
|
|
17525
|
+
)),
|
|
17526
|
+
notificationsEnabled && /* @__PURE__ */ jsxs(
|
|
17527
|
+
Button,
|
|
17528
|
+
{
|
|
17529
|
+
variant: "ghost",
|
|
17530
|
+
className: "relative p-2 rounded-full hover:bg-muted dark:hover:bg-muted",
|
|
17531
|
+
onClick: handleNotificationClick,
|
|
17532
|
+
"aria-label": t("common.notifications"),
|
|
17533
|
+
children: [
|
|
17534
|
+
/* @__PURE__ */ jsx(Bell, { className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
|
|
17535
|
+
unreadCount > 0 && /* @__PURE__ */ jsx(
|
|
17536
|
+
Box,
|
|
17537
|
+
{
|
|
17538
|
+
as: "span",
|
|
17539
|
+
className: "absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 bg-error rounded-full text-[10px] font-semibold text-white flex items-center justify-center",
|
|
17540
|
+
children: unreadCount > 99 ? "99+" : unreadCount
|
|
17541
|
+
}
|
|
17542
|
+
)
|
|
17543
|
+
]
|
|
17544
|
+
}
|
|
17545
|
+
),
|
|
17546
|
+
user && /* @__PURE__ */ jsxs(Box, { className: "relative", children: [
|
|
17547
|
+
/* @__PURE__ */ jsxs(
|
|
17498
17548
|
Button,
|
|
17499
17549
|
{
|
|
17500
17550
|
variant: "ghost",
|
|
17501
|
-
className: "
|
|
17502
|
-
onClick: () =>
|
|
17503
|
-
|
|
17504
|
-
|
|
17551
|
+
className: "flex items-center gap-2 p-2 rounded-lg hover:bg-muted dark:hover:bg-muted",
|
|
17552
|
+
onClick: () => setUserMenuOpen(!userMenuOpen),
|
|
17553
|
+
children: [
|
|
17554
|
+
/* @__PURE__ */ jsx(
|
|
17555
|
+
Avatar,
|
|
17556
|
+
{
|
|
17557
|
+
src: user.avatar,
|
|
17558
|
+
alt: user.name,
|
|
17559
|
+
initials: user.name.split(" ").map((n) => n[0]).join("").substring(0, 2),
|
|
17560
|
+
size: "sm"
|
|
17561
|
+
}
|
|
17562
|
+
),
|
|
17563
|
+
/* @__PURE__ */ jsx(
|
|
17564
|
+
Typography,
|
|
17565
|
+
{
|
|
17566
|
+
variant: "small",
|
|
17567
|
+
className: "hidden sm:block text-sm font-medium text-foreground dark:text-foreground",
|
|
17568
|
+
as: "span",
|
|
17569
|
+
children: user.name
|
|
17570
|
+
}
|
|
17571
|
+
),
|
|
17572
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: "hidden sm:block h-4 w-4 text-muted-foreground dark:text-muted-foreground" })
|
|
17573
|
+
]
|
|
17505
17574
|
}
|
|
17506
17575
|
),
|
|
17507
|
-
|
|
17508
|
-
/* @__PURE__ */ jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground dark:text-muted-foreground" }),
|
|
17576
|
+
userMenuOpen && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
17509
17577
|
/* @__PURE__ */ jsx(
|
|
17510
|
-
|
|
17511
|
-
{
|
|
17512
|
-
type: "search",
|
|
17513
|
-
placeholder: t("common.search"),
|
|
17514
|
-
className: "pl-10 w-full",
|
|
17515
|
-
onKeyDown: (e) => {
|
|
17516
|
-
if (e.key === "Enter") {
|
|
17517
|
-
handleSearchSubmit(e.target.value);
|
|
17518
|
-
}
|
|
17519
|
-
}
|
|
17520
|
-
}
|
|
17521
|
-
)
|
|
17522
|
-
] }) }),
|
|
17523
|
-
!searchEnabled && /* @__PURE__ */ jsx(Box, { className: "flex-1" }),
|
|
17524
|
-
/* @__PURE__ */ jsxs(HStack, { align: "center", gap: "xs", children: [
|
|
17525
|
-
headerActions,
|
|
17526
|
-
showThemeToggle && /* @__PURE__ */ jsx(ThemeToggle, {}),
|
|
17527
|
-
topBarActions.map((action, idx) => /* @__PURE__ */ jsxs(
|
|
17528
|
-
Button,
|
|
17529
|
-
{
|
|
17530
|
-
variant: "ghost",
|
|
17531
|
-
className: "relative p-2 rounded-full hover:bg-muted dark:hover:bg-muted",
|
|
17532
|
-
onClick: () => handleTopBarActionClick(action.event),
|
|
17533
|
-
"aria-label": action.label ?? action.icon,
|
|
17534
|
-
children: [
|
|
17535
|
-
/* @__PURE__ */ jsx(Icon, { name: action.icon, className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
|
|
17536
|
-
action.badge !== void 0 && action.badge !== null && action.badge !== 0 && action.badge !== "" && /* @__PURE__ */ jsx(
|
|
17537
|
-
Box,
|
|
17538
|
-
{
|
|
17539
|
-
as: "span",
|
|
17540
|
-
className: cn(
|
|
17541
|
-
"absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 rounded-full text-[10px] font-semibold text-white flex items-center justify-center",
|
|
17542
|
-
action.variant === "danger" ? "bg-error" : action.variant === "primary" ? "bg-primary" : "bg-foreground"
|
|
17543
|
-
),
|
|
17544
|
-
children: action.badge
|
|
17545
|
-
}
|
|
17546
|
-
)
|
|
17547
|
-
]
|
|
17548
|
-
},
|
|
17549
|
-
`${action.event}-${idx}`
|
|
17550
|
-
)),
|
|
17551
|
-
notificationsEnabled && /* @__PURE__ */ jsxs(
|
|
17552
|
-
Button,
|
|
17578
|
+
Box,
|
|
17553
17579
|
{
|
|
17554
|
-
|
|
17555
|
-
|
|
17556
|
-
onClick: handleNotificationClick,
|
|
17557
|
-
"aria-label": t("common.notifications"),
|
|
17558
|
-
children: [
|
|
17559
|
-
/* @__PURE__ */ jsx(Bell, { className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
|
|
17560
|
-
unreadCount > 0 && /* @__PURE__ */ jsx(
|
|
17561
|
-
Box,
|
|
17562
|
-
{
|
|
17563
|
-
as: "span",
|
|
17564
|
-
className: "absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 bg-error rounded-full text-[10px] font-semibold text-white flex items-center justify-center",
|
|
17565
|
-
children: unreadCount > 99 ? "99+" : unreadCount
|
|
17566
|
-
}
|
|
17567
|
-
)
|
|
17568
|
-
]
|
|
17580
|
+
className: "fixed inset-0 z-20",
|
|
17581
|
+
onClick: () => setUserMenuOpen(false)
|
|
17569
17582
|
}
|
|
17570
17583
|
),
|
|
17571
|
-
|
|
17584
|
+
/* @__PURE__ */ jsxs(Box, { className: "absolute right-0 mt-2 w-48 bg-card dark:bg-card rounded-lg shadow-lg border border-border dark:border-border py-1 z-30", children: [
|
|
17585
|
+
/* @__PURE__ */ jsxs(Box, { className: "px-4 py-2 border-b border-border dark:border-border", children: [
|
|
17586
|
+
/* @__PURE__ */ jsx(
|
|
17587
|
+
Typography,
|
|
17588
|
+
{
|
|
17589
|
+
variant: "small",
|
|
17590
|
+
className: "text-sm font-medium text-foreground dark:text-foreground",
|
|
17591
|
+
as: "p",
|
|
17592
|
+
children: user.name
|
|
17593
|
+
}
|
|
17594
|
+
),
|
|
17595
|
+
/* @__PURE__ */ jsx(
|
|
17596
|
+
Typography,
|
|
17597
|
+
{
|
|
17598
|
+
variant: "caption",
|
|
17599
|
+
className: "text-xs text-muted-foreground dark:text-muted-foreground",
|
|
17600
|
+
as: "p",
|
|
17601
|
+
children: user.email
|
|
17602
|
+
}
|
|
17603
|
+
)
|
|
17604
|
+
] }),
|
|
17572
17605
|
/* @__PURE__ */ jsxs(
|
|
17573
17606
|
Button,
|
|
17574
17607
|
{
|
|
17575
17608
|
variant: "ghost",
|
|
17576
|
-
|
|
17577
|
-
|
|
17609
|
+
onClick: () => {
|
|
17610
|
+
setUserMenuOpen(false);
|
|
17611
|
+
handleSignOut?.();
|
|
17612
|
+
},
|
|
17613
|
+
className: "w-full flex items-center gap-2 px-4 py-2 text-sm text-error dark:text-error hover:bg-error/10 dark:hover:bg-error/20",
|
|
17578
17614
|
children: [
|
|
17579
|
-
/* @__PURE__ */ jsx(
|
|
17580
|
-
|
|
17581
|
-
{
|
|
17582
|
-
src: user.avatar,
|
|
17583
|
-
alt: user.name,
|
|
17584
|
-
initials: user.name.split(" ").map((n) => n[0]).join("").substring(0, 2),
|
|
17585
|
-
size: "sm"
|
|
17586
|
-
}
|
|
17587
|
-
),
|
|
17588
|
-
/* @__PURE__ */ jsx(
|
|
17589
|
-
Typography,
|
|
17590
|
-
{
|
|
17591
|
-
variant: "small",
|
|
17592
|
-
className: "hidden sm:block text-sm font-medium text-foreground dark:text-foreground",
|
|
17593
|
-
as: "span",
|
|
17594
|
-
children: user.name
|
|
17595
|
-
}
|
|
17596
|
-
),
|
|
17597
|
-
/* @__PURE__ */ jsx(ChevronDown, { className: "hidden sm:block h-4 w-4 text-muted-foreground dark:text-muted-foreground" })
|
|
17615
|
+
/* @__PURE__ */ jsx(LogOut, { className: "h-4 w-4" }),
|
|
17616
|
+
t("auth.signOut")
|
|
17598
17617
|
]
|
|
17599
17618
|
}
|
|
17600
|
-
)
|
|
17601
|
-
userMenuOpen && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
17602
|
-
/* @__PURE__ */ jsx(
|
|
17603
|
-
Box,
|
|
17604
|
-
{
|
|
17605
|
-
className: "fixed inset-0 z-20",
|
|
17606
|
-
onClick: () => setUserMenuOpen(false)
|
|
17607
|
-
}
|
|
17608
|
-
),
|
|
17609
|
-
/* @__PURE__ */ jsxs(Box, { className: "absolute right-0 mt-2 w-48 bg-card dark:bg-card rounded-lg shadow-lg border border-border dark:border-border py-1 z-30", children: [
|
|
17610
|
-
/* @__PURE__ */ jsxs(Box, { className: "px-4 py-2 border-b border-border dark:border-border", children: [
|
|
17611
|
-
/* @__PURE__ */ jsx(
|
|
17612
|
-
Typography,
|
|
17613
|
-
{
|
|
17614
|
-
variant: "small",
|
|
17615
|
-
className: "text-sm font-medium text-foreground dark:text-foreground",
|
|
17616
|
-
as: "p",
|
|
17617
|
-
children: user.name
|
|
17618
|
-
}
|
|
17619
|
-
),
|
|
17620
|
-
/* @__PURE__ */ jsx(
|
|
17621
|
-
Typography,
|
|
17622
|
-
{
|
|
17623
|
-
variant: "caption",
|
|
17624
|
-
className: "text-xs text-muted-foreground dark:text-muted-foreground",
|
|
17625
|
-
as: "p",
|
|
17626
|
-
children: user.email
|
|
17627
|
-
}
|
|
17628
|
-
)
|
|
17629
|
-
] }),
|
|
17630
|
-
/* @__PURE__ */ jsxs(
|
|
17631
|
-
Button,
|
|
17632
|
-
{
|
|
17633
|
-
variant: "ghost",
|
|
17634
|
-
onClick: () => {
|
|
17635
|
-
setUserMenuOpen(false);
|
|
17636
|
-
handleSignOut?.();
|
|
17637
|
-
},
|
|
17638
|
-
className: "w-full flex items-center gap-2 px-4 py-2 text-sm text-error dark:text-error hover:bg-error/10 dark:hover:bg-error/20",
|
|
17639
|
-
children: [
|
|
17640
|
-
/* @__PURE__ */ jsx(LogOut, { className: "h-4 w-4" }),
|
|
17641
|
-
t("auth.signOut")
|
|
17642
|
-
]
|
|
17643
|
-
}
|
|
17644
|
-
)
|
|
17645
|
-
] })
|
|
17646
|
-
] })
|
|
17619
|
+
)
|
|
17647
17620
|
] })
|
|
17648
17621
|
] })
|
|
17649
|
-
]
|
|
17650
|
-
}
|
|
17651
|
-
|
|
17622
|
+
] })
|
|
17623
|
+
] })
|
|
17624
|
+
]
|
|
17652
17625
|
}
|
|
17653
|
-
)
|
|
17654
|
-
|
|
17655
|
-
|
|
17656
|
-
|
|
17657
|
-
}
|
|
17658
|
-
);
|
|
17626
|
+
)
|
|
17627
|
+
}
|
|
17628
|
+
),
|
|
17629
|
+
/* @__PURE__ */ jsx(Box, { as: "main", className: "p-4 sm:p-6", children })
|
|
17630
|
+
] })
|
|
17631
|
+
] });
|
|
17659
17632
|
};
|
|
17660
17633
|
DashboardLayout.displayName = "DashboardLayout";
|
|
17661
17634
|
NavLink = ({
|
|
@@ -18149,13 +18122,13 @@ function DataList({
|
|
|
18149
18122
|
}) {
|
|
18150
18123
|
const eventBus = useEventBus();
|
|
18151
18124
|
const { t } = useTranslate();
|
|
18152
|
-
const [visibleCount, setVisibleCount] =
|
|
18125
|
+
const [visibleCount, setVisibleCount] = React105__default.useState(pageSize || Infinity);
|
|
18153
18126
|
const fieldDefs = fields ?? columns ?? [];
|
|
18154
18127
|
const allData = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
18155
18128
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
18156
18129
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
18157
18130
|
const hasRenderProp = typeof children === "function";
|
|
18158
|
-
|
|
18131
|
+
React105__default.useEffect(() => {
|
|
18159
18132
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
18160
18133
|
const childrenTypeOf = typeof children;
|
|
18161
18134
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -18211,7 +18184,7 @@ function DataList({
|
|
|
18211
18184
|
const items2 = data.map((item) => item);
|
|
18212
18185
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
18213
18186
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
18214
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
18187
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
|
|
18215
18188
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
18216
18189
|
group.items.map((itemData, index) => {
|
|
18217
18190
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -18402,7 +18375,7 @@ function DataList({
|
|
|
18402
18375
|
className
|
|
18403
18376
|
),
|
|
18404
18377
|
children: [
|
|
18405
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
18378
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
|
|
18406
18379
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
18407
18380
|
group.items.map(
|
|
18408
18381
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -19549,7 +19522,7 @@ var init_WizardProgress = __esm({
|
|
|
19549
19522
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
19550
19523
|
const isActive = index === currentStep;
|
|
19551
19524
|
const isCompleted = index < currentStep;
|
|
19552
|
-
return /* @__PURE__ */ jsxs(
|
|
19525
|
+
return /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
|
|
19553
19526
|
/* @__PURE__ */ jsx(
|
|
19554
19527
|
"button",
|
|
19555
19528
|
{
|
|
@@ -20460,7 +20433,7 @@ function InventoryGrid({
|
|
|
20460
20433
|
const eventBus = useEventBus();
|
|
20461
20434
|
const slotCount = totalSlots ?? items.length;
|
|
20462
20435
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
20463
|
-
const handleSelect =
|
|
20436
|
+
const handleSelect = React105.useCallback(
|
|
20464
20437
|
(id) => {
|
|
20465
20438
|
onSelect?.(id);
|
|
20466
20439
|
if (selectEvent) {
|
|
@@ -20673,15 +20646,15 @@ function GameCanvas2D({
|
|
|
20673
20646
|
fps = 60,
|
|
20674
20647
|
className
|
|
20675
20648
|
}) {
|
|
20676
|
-
const canvasRef =
|
|
20677
|
-
const rafRef =
|
|
20678
|
-
const frameRef =
|
|
20679
|
-
const lastTimeRef =
|
|
20680
|
-
const onDrawRef =
|
|
20649
|
+
const canvasRef = React105.useRef(null);
|
|
20650
|
+
const rafRef = React105.useRef(0);
|
|
20651
|
+
const frameRef = React105.useRef(0);
|
|
20652
|
+
const lastTimeRef = React105.useRef(0);
|
|
20653
|
+
const onDrawRef = React105.useRef(onDraw);
|
|
20681
20654
|
onDrawRef.current = onDraw;
|
|
20682
|
-
const onTickRef =
|
|
20655
|
+
const onTickRef = React105.useRef(onTick);
|
|
20683
20656
|
onTickRef.current = onTick;
|
|
20684
|
-
|
|
20657
|
+
React105.useEffect(() => {
|
|
20685
20658
|
const canvas = canvasRef.current;
|
|
20686
20659
|
if (!canvas) return;
|
|
20687
20660
|
const ctx = canvas.getContext("2d");
|
|
@@ -20970,7 +20943,7 @@ function TurnPanel({
|
|
|
20970
20943
|
className
|
|
20971
20944
|
}) {
|
|
20972
20945
|
const eventBus = useEventBus();
|
|
20973
|
-
const handleAction =
|
|
20946
|
+
const handleAction = React105.useCallback(
|
|
20974
20947
|
(event) => {
|
|
20975
20948
|
if (event) {
|
|
20976
20949
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -21116,7 +21089,7 @@ function UnitCommandBar({
|
|
|
21116
21089
|
className
|
|
21117
21090
|
}) {
|
|
21118
21091
|
const eventBus = useEventBus();
|
|
21119
|
-
const handleCommand =
|
|
21092
|
+
const handleCommand = React105.useCallback(
|
|
21120
21093
|
(event) => {
|
|
21121
21094
|
if (event) {
|
|
21122
21095
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -21601,7 +21574,7 @@ function GameMenu({
|
|
|
21601
21574
|
} catch {
|
|
21602
21575
|
}
|
|
21603
21576
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
21604
|
-
const handleOptionClick =
|
|
21577
|
+
const handleOptionClick = React105.useCallback(
|
|
21605
21578
|
(option) => {
|
|
21606
21579
|
if (option.event && eventBus) {
|
|
21607
21580
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -21715,7 +21688,7 @@ function GameOverScreen({
|
|
|
21715
21688
|
} catch {
|
|
21716
21689
|
}
|
|
21717
21690
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
21718
|
-
const handleActionClick =
|
|
21691
|
+
const handleActionClick = React105.useCallback(
|
|
21719
21692
|
(action) => {
|
|
21720
21693
|
if (action.event && eventBus) {
|
|
21721
21694
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -25204,7 +25177,7 @@ var init_DocumentViewer = __esm({
|
|
|
25204
25177
|
}
|
|
25205
25178
|
});
|
|
25206
25179
|
function extractTitle(children) {
|
|
25207
|
-
if (!
|
|
25180
|
+
if (!React105__default.isValidElement(children)) return void 0;
|
|
25208
25181
|
const props = children.props;
|
|
25209
25182
|
if (typeof props.title === "string") {
|
|
25210
25183
|
return props.title;
|
|
@@ -25259,7 +25232,7 @@ function LinearView({
|
|
|
25259
25232
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
25260
25233
|
const isDone = i < currentIdx;
|
|
25261
25234
|
const isCurrent = i === currentIdx;
|
|
25262
|
-
return /* @__PURE__ */ jsxs(
|
|
25235
|
+
return /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
|
|
25263
25236
|
i > 0 && /* @__PURE__ */ jsx(
|
|
25264
25237
|
Typography,
|
|
25265
25238
|
{
|
|
@@ -26043,12 +26016,12 @@ var init_Form = __esm({
|
|
|
26043
26016
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
26044
26017
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
26045
26018
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
26046
|
-
const normalizedInitialData =
|
|
26019
|
+
const normalizedInitialData = React105__default.useMemo(() => {
|
|
26047
26020
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
26048
26021
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
26049
26022
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
26050
26023
|
}, [entity, initialData]);
|
|
26051
|
-
const entityDerivedFields =
|
|
26024
|
+
const entityDerivedFields = React105__default.useMemo(() => {
|
|
26052
26025
|
if (fields && fields.length > 0) return void 0;
|
|
26053
26026
|
if (!resolvedEntity) return void 0;
|
|
26054
26027
|
return resolvedEntity.fields.map(
|
|
@@ -26067,16 +26040,16 @@ var init_Form = __esm({
|
|
|
26067
26040
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
26068
26041
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
26069
26042
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
26070
|
-
const [formData, setFormData] =
|
|
26043
|
+
const [formData, setFormData] = React105__default.useState(
|
|
26071
26044
|
normalizedInitialData
|
|
26072
26045
|
);
|
|
26073
|
-
const [collapsedSections, setCollapsedSections] =
|
|
26046
|
+
const [collapsedSections, setCollapsedSections] = React105__default.useState(
|
|
26074
26047
|
/* @__PURE__ */ new Set()
|
|
26075
26048
|
);
|
|
26076
|
-
const [submitError, setSubmitError] =
|
|
26077
|
-
const formRef =
|
|
26049
|
+
const [submitError, setSubmitError] = React105__default.useState(null);
|
|
26050
|
+
const formRef = React105__default.useRef(null);
|
|
26078
26051
|
const formMode = props.mode;
|
|
26079
|
-
const mountedRef =
|
|
26052
|
+
const mountedRef = React105__default.useRef(false);
|
|
26080
26053
|
if (!mountedRef.current) {
|
|
26081
26054
|
mountedRef.current = true;
|
|
26082
26055
|
debug("forms", "mount", {
|
|
@@ -26089,7 +26062,7 @@ var init_Form = __esm({
|
|
|
26089
26062
|
});
|
|
26090
26063
|
}
|
|
26091
26064
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
26092
|
-
const evalContext =
|
|
26065
|
+
const evalContext = React105__default.useMemo(
|
|
26093
26066
|
() => ({
|
|
26094
26067
|
formValues: formData,
|
|
26095
26068
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -26098,7 +26071,7 @@ var init_Form = __esm({
|
|
|
26098
26071
|
}),
|
|
26099
26072
|
[formData, externalContext]
|
|
26100
26073
|
);
|
|
26101
|
-
|
|
26074
|
+
React105__default.useEffect(() => {
|
|
26102
26075
|
debug("forms", "initialData-sync", {
|
|
26103
26076
|
mode: formMode,
|
|
26104
26077
|
normalizedInitialData,
|
|
@@ -26109,7 +26082,7 @@ var init_Form = __esm({
|
|
|
26109
26082
|
setFormData(normalizedInitialData);
|
|
26110
26083
|
}
|
|
26111
26084
|
}, [normalizedInitialData]);
|
|
26112
|
-
const processCalculations =
|
|
26085
|
+
const processCalculations = React105__default.useCallback(
|
|
26113
26086
|
(changedFieldId, newFormData) => {
|
|
26114
26087
|
if (!hiddenCalculations.length) return;
|
|
26115
26088
|
const context = {
|
|
@@ -26134,7 +26107,7 @@ var init_Form = __esm({
|
|
|
26134
26107
|
},
|
|
26135
26108
|
[hiddenCalculations, externalContext, eventBus]
|
|
26136
26109
|
);
|
|
26137
|
-
const checkViolations =
|
|
26110
|
+
const checkViolations = React105__default.useCallback(
|
|
26138
26111
|
(changedFieldId, newFormData) => {
|
|
26139
26112
|
if (!violationTriggers.length) return;
|
|
26140
26113
|
const context = {
|
|
@@ -26172,7 +26145,7 @@ var init_Form = __esm({
|
|
|
26172
26145
|
processCalculations(name, newFormData);
|
|
26173
26146
|
checkViolations(name, newFormData);
|
|
26174
26147
|
};
|
|
26175
|
-
const isFieldVisible =
|
|
26148
|
+
const isFieldVisible = React105__default.useCallback(
|
|
26176
26149
|
(fieldName) => {
|
|
26177
26150
|
const condition = conditionalFields[fieldName];
|
|
26178
26151
|
if (!condition) return true;
|
|
@@ -26180,7 +26153,7 @@ var init_Form = __esm({
|
|
|
26180
26153
|
},
|
|
26181
26154
|
[conditionalFields, evalContext]
|
|
26182
26155
|
);
|
|
26183
|
-
const isSectionVisible =
|
|
26156
|
+
const isSectionVisible = React105__default.useCallback(
|
|
26184
26157
|
(section) => {
|
|
26185
26158
|
if (!section.condition) return true;
|
|
26186
26159
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -26256,7 +26229,7 @@ var init_Form = __esm({
|
|
|
26256
26229
|
eventBus.emit(`UI:${onCancel}`);
|
|
26257
26230
|
}
|
|
26258
26231
|
};
|
|
26259
|
-
const renderField =
|
|
26232
|
+
const renderField = React105__default.useCallback(
|
|
26260
26233
|
(field) => {
|
|
26261
26234
|
const fieldName = field.name || field.field;
|
|
26262
26235
|
if (!fieldName) return null;
|
|
@@ -26277,7 +26250,7 @@ var init_Form = __esm({
|
|
|
26277
26250
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
26278
26251
|
);
|
|
26279
26252
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
26280
|
-
const normalizedFields =
|
|
26253
|
+
const normalizedFields = React105__default.useMemo(() => {
|
|
26281
26254
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
26282
26255
|
return effectiveFields.map((field) => {
|
|
26283
26256
|
if (typeof field === "string") {
|
|
@@ -26299,7 +26272,7 @@ var init_Form = __esm({
|
|
|
26299
26272
|
return field;
|
|
26300
26273
|
});
|
|
26301
26274
|
}, [effectiveFields, resolvedEntity]);
|
|
26302
|
-
const schemaFields =
|
|
26275
|
+
const schemaFields = React105__default.useMemo(() => {
|
|
26303
26276
|
if (normalizedFields.length === 0) return null;
|
|
26304
26277
|
if (isDebugEnabled()) {
|
|
26305
26278
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -26309,7 +26282,7 @@ var init_Form = __esm({
|
|
|
26309
26282
|
}
|
|
26310
26283
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
26311
26284
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
26312
|
-
const sectionElements =
|
|
26285
|
+
const sectionElements = React105__default.useMemo(() => {
|
|
26313
26286
|
if (!sections || sections.length === 0) return null;
|
|
26314
26287
|
return sections.map((section) => {
|
|
26315
26288
|
if (!isSectionVisible(section)) {
|
|
@@ -27841,7 +27814,7 @@ var init_List = __esm({
|
|
|
27841
27814
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
27842
27815
|
return [];
|
|
27843
27816
|
}, [entity]);
|
|
27844
|
-
const getItemActions =
|
|
27817
|
+
const getItemActions = React105__default.useCallback(
|
|
27845
27818
|
(item) => {
|
|
27846
27819
|
if (!itemActions) return [];
|
|
27847
27820
|
if (typeof itemActions === "function") {
|
|
@@ -28278,7 +28251,7 @@ var init_MediaGallery = __esm({
|
|
|
28278
28251
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
28279
28252
|
);
|
|
28280
28253
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
28281
|
-
const items =
|
|
28254
|
+
const items = React105__default.useMemo(() => {
|
|
28282
28255
|
if (propItems) return propItems;
|
|
28283
28256
|
if (entityData.length === 0) return [];
|
|
28284
28257
|
return entityData.map((record, idx) => ({
|
|
@@ -28442,7 +28415,7 @@ var init_MediaGallery = __esm({
|
|
|
28442
28415
|
}
|
|
28443
28416
|
});
|
|
28444
28417
|
function extractTitle2(children) {
|
|
28445
|
-
if (!
|
|
28418
|
+
if (!React105__default.isValidElement(children)) return void 0;
|
|
28446
28419
|
const props = children.props;
|
|
28447
28420
|
if (typeof props.title === "string") {
|
|
28448
28421
|
return props.title;
|
|
@@ -29155,7 +29128,7 @@ var init_PageHeader = __esm({
|
|
|
29155
29128
|
info: "bg-info/10 text-info"
|
|
29156
29129
|
};
|
|
29157
29130
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
29158
|
-
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(
|
|
29131
|
+
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: [
|
|
29159
29132
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
29160
29133
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
29161
29134
|
"a",
|
|
@@ -29329,7 +29302,7 @@ var init_debugRegistry = __esm({
|
|
|
29329
29302
|
}
|
|
29330
29303
|
});
|
|
29331
29304
|
function useDebugData() {
|
|
29332
|
-
const [data, setData] =
|
|
29305
|
+
const [data, setData] = React105.useState(() => ({
|
|
29333
29306
|
traits: [],
|
|
29334
29307
|
ticks: [],
|
|
29335
29308
|
guards: [],
|
|
@@ -29343,7 +29316,7 @@ function useDebugData() {
|
|
|
29343
29316
|
},
|
|
29344
29317
|
lastUpdate: Date.now()
|
|
29345
29318
|
}));
|
|
29346
|
-
|
|
29319
|
+
React105.useEffect(() => {
|
|
29347
29320
|
const updateData = () => {
|
|
29348
29321
|
setData({
|
|
29349
29322
|
traits: getAllTraits(),
|
|
@@ -29452,12 +29425,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
29452
29425
|
return positions;
|
|
29453
29426
|
}
|
|
29454
29427
|
function WalkMinimap() {
|
|
29455
|
-
const [walkStep, setWalkStep] =
|
|
29456
|
-
const [traits2, setTraits] =
|
|
29457
|
-
const [coveredEdges, setCoveredEdges] =
|
|
29458
|
-
const [completedTraits, setCompletedTraits] =
|
|
29459
|
-
const prevTraitRef =
|
|
29460
|
-
|
|
29428
|
+
const [walkStep, setWalkStep] = React105.useState(null);
|
|
29429
|
+
const [traits2, setTraits] = React105.useState([]);
|
|
29430
|
+
const [coveredEdges, setCoveredEdges] = React105.useState([]);
|
|
29431
|
+
const [completedTraits, setCompletedTraits] = React105.useState(/* @__PURE__ */ new Set());
|
|
29432
|
+
const prevTraitRef = React105.useRef(null);
|
|
29433
|
+
React105.useEffect(() => {
|
|
29461
29434
|
const interval = setInterval(() => {
|
|
29462
29435
|
const w = window;
|
|
29463
29436
|
const step = w.__orbitalWalkStep;
|
|
@@ -29904,15 +29877,15 @@ var init_EntitiesTab = __esm({
|
|
|
29904
29877
|
}
|
|
29905
29878
|
});
|
|
29906
29879
|
function EventFlowTab({ events: events2 }) {
|
|
29907
|
-
const [filter, setFilter] =
|
|
29908
|
-
const containerRef =
|
|
29909
|
-
const [autoScroll, setAutoScroll] =
|
|
29910
|
-
|
|
29880
|
+
const [filter, setFilter] = React105.useState("all");
|
|
29881
|
+
const containerRef = React105.useRef(null);
|
|
29882
|
+
const [autoScroll, setAutoScroll] = React105.useState(true);
|
|
29883
|
+
React105.useEffect(() => {
|
|
29911
29884
|
if (autoScroll && containerRef.current) {
|
|
29912
29885
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
29913
29886
|
}
|
|
29914
29887
|
}, [events2.length, autoScroll]);
|
|
29915
|
-
const filteredEvents =
|
|
29888
|
+
const filteredEvents = React105.useMemo(() => {
|
|
29916
29889
|
if (filter === "all") return events2;
|
|
29917
29890
|
return events2.filter((e) => e.type === filter);
|
|
29918
29891
|
}, [events2, filter]);
|
|
@@ -30031,7 +30004,7 @@ var init_EventFlowTab = __esm({
|
|
|
30031
30004
|
}
|
|
30032
30005
|
});
|
|
30033
30006
|
function GuardsPanel({ guards }) {
|
|
30034
|
-
const [filter, setFilter] =
|
|
30007
|
+
const [filter, setFilter] = React105.useState("all");
|
|
30035
30008
|
if (guards.length === 0) {
|
|
30036
30009
|
return /* @__PURE__ */ jsx(
|
|
30037
30010
|
EmptyState,
|
|
@@ -30044,7 +30017,7 @@ function GuardsPanel({ guards }) {
|
|
|
30044
30017
|
}
|
|
30045
30018
|
const passedCount = guards.filter((g) => g.result).length;
|
|
30046
30019
|
const failedCount = guards.length - passedCount;
|
|
30047
|
-
const filteredGuards =
|
|
30020
|
+
const filteredGuards = React105.useMemo(() => {
|
|
30048
30021
|
if (filter === "all") return guards;
|
|
30049
30022
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
30050
30023
|
return guards.filter((g) => !g.result);
|
|
@@ -30205,10 +30178,10 @@ function EffectBadge({ effect }) {
|
|
|
30205
30178
|
] });
|
|
30206
30179
|
}
|
|
30207
30180
|
function TransitionTimeline({ transitions }) {
|
|
30208
|
-
const containerRef =
|
|
30209
|
-
const [autoScroll, setAutoScroll] =
|
|
30210
|
-
const [expandedId, setExpandedId] =
|
|
30211
|
-
|
|
30181
|
+
const containerRef = React105.useRef(null);
|
|
30182
|
+
const [autoScroll, setAutoScroll] = React105.useState(true);
|
|
30183
|
+
const [expandedId, setExpandedId] = React105.useState(null);
|
|
30184
|
+
React105.useEffect(() => {
|
|
30212
30185
|
if (autoScroll && containerRef.current) {
|
|
30213
30186
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
30214
30187
|
}
|
|
@@ -30494,9 +30467,9 @@ function getAllEvents(traits2) {
|
|
|
30494
30467
|
}
|
|
30495
30468
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
30496
30469
|
const eventBus = useEventBus();
|
|
30497
|
-
const [log4, setLog] =
|
|
30498
|
-
const prevStatesRef =
|
|
30499
|
-
|
|
30470
|
+
const [log4, setLog] = React105.useState([]);
|
|
30471
|
+
const prevStatesRef = React105.useRef(/* @__PURE__ */ new Map());
|
|
30472
|
+
React105.useEffect(() => {
|
|
30500
30473
|
for (const trait of traits2) {
|
|
30501
30474
|
const prev = prevStatesRef.current.get(trait.id);
|
|
30502
30475
|
if (prev && prev !== trait.currentState) {
|
|
@@ -30666,10 +30639,10 @@ function VerifyModePanel({
|
|
|
30666
30639
|
serverCount,
|
|
30667
30640
|
localCount
|
|
30668
30641
|
}) {
|
|
30669
|
-
const [expanded, setExpanded] =
|
|
30670
|
-
const scrollRef =
|
|
30671
|
-
const prevCountRef =
|
|
30672
|
-
|
|
30642
|
+
const [expanded, setExpanded] = React105.useState(true);
|
|
30643
|
+
const scrollRef = React105.useRef(null);
|
|
30644
|
+
const prevCountRef = React105.useRef(0);
|
|
30645
|
+
React105.useEffect(() => {
|
|
30673
30646
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
30674
30647
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
30675
30648
|
}
|
|
@@ -30735,10 +30708,10 @@ function RuntimeDebugger({
|
|
|
30735
30708
|
defaultTab,
|
|
30736
30709
|
schema
|
|
30737
30710
|
}) {
|
|
30738
|
-
const [isCollapsed, setIsCollapsed] =
|
|
30739
|
-
const [isVisible, setIsVisible] =
|
|
30711
|
+
const [isCollapsed, setIsCollapsed] = React105.useState(mode === "verify" ? true : defaultCollapsed);
|
|
30712
|
+
const [isVisible, setIsVisible] = React105.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
30740
30713
|
const debugData = useDebugData();
|
|
30741
|
-
|
|
30714
|
+
React105.useEffect(() => {
|
|
30742
30715
|
if (mode === "inline") return;
|
|
30743
30716
|
return onDebugToggle((enabled) => {
|
|
30744
30717
|
setIsVisible(enabled);
|
|
@@ -30747,7 +30720,7 @@ function RuntimeDebugger({
|
|
|
30747
30720
|
}
|
|
30748
30721
|
});
|
|
30749
30722
|
}, [mode]);
|
|
30750
|
-
|
|
30723
|
+
React105.useEffect(() => {
|
|
30751
30724
|
if (mode === "inline") return;
|
|
30752
30725
|
const handleKeyDown = (e) => {
|
|
30753
30726
|
if (e.key === "`" && isVisible) {
|
|
@@ -31296,7 +31269,7 @@ function SequenceBar({
|
|
|
31296
31269
|
onSlotRemove(index);
|
|
31297
31270
|
}, [onSlotRemove, playing]);
|
|
31298
31271
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
31299
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
31272
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
|
|
31300
31273
|
i > 0 && /* @__PURE__ */ jsx(
|
|
31301
31274
|
Typography,
|
|
31302
31275
|
{
|
|
@@ -32641,7 +32614,7 @@ var init_StatCard = __esm({
|
|
|
32641
32614
|
const labelToUse = propLabel ?? propTitle;
|
|
32642
32615
|
const eventBus = useEventBus();
|
|
32643
32616
|
const { t } = useTranslate();
|
|
32644
|
-
const handleActionClick =
|
|
32617
|
+
const handleActionClick = React105__default.useCallback(() => {
|
|
32645
32618
|
if (action?.event) {
|
|
32646
32619
|
eventBus.emit(`UI:${action.event}`, {});
|
|
32647
32620
|
}
|
|
@@ -32652,7 +32625,7 @@ var init_StatCard = __esm({
|
|
|
32652
32625
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
32653
32626
|
const isLoading = externalLoading ?? false;
|
|
32654
32627
|
const error = externalError;
|
|
32655
|
-
const computeMetricValue =
|
|
32628
|
+
const computeMetricValue = React105__default.useCallback(
|
|
32656
32629
|
(metric, items) => {
|
|
32657
32630
|
if (metric.value !== void 0) {
|
|
32658
32631
|
return metric.value;
|
|
@@ -32691,7 +32664,7 @@ var init_StatCard = __esm({
|
|
|
32691
32664
|
},
|
|
32692
32665
|
[]
|
|
32693
32666
|
);
|
|
32694
|
-
const schemaStats =
|
|
32667
|
+
const schemaStats = React105__default.useMemo(() => {
|
|
32695
32668
|
if (!metrics || metrics.length === 0) return null;
|
|
32696
32669
|
return metrics.map((metric) => ({
|
|
32697
32670
|
label: metric.label,
|
|
@@ -32699,7 +32672,7 @@ var init_StatCard = __esm({
|
|
|
32699
32672
|
format: metric.format
|
|
32700
32673
|
}));
|
|
32701
32674
|
}, [metrics, data, computeMetricValue]);
|
|
32702
|
-
const calculatedTrend =
|
|
32675
|
+
const calculatedTrend = React105__default.useMemo(() => {
|
|
32703
32676
|
if (manualTrend !== void 0) return manualTrend;
|
|
32704
32677
|
if (previousValue === void 0 || currentValue === void 0)
|
|
32705
32678
|
return void 0;
|
|
@@ -33683,7 +33656,7 @@ var init_Timeline = __esm({
|
|
|
33683
33656
|
}) => {
|
|
33684
33657
|
const { t } = useTranslate();
|
|
33685
33658
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
33686
|
-
const items =
|
|
33659
|
+
const items = React105__default.useMemo(() => {
|
|
33687
33660
|
if (propItems) return propItems;
|
|
33688
33661
|
if (entityData.length === 0) return [];
|
|
33689
33662
|
return entityData.map((record, idx) => {
|
|
@@ -33790,7 +33763,7 @@ var init_Timeline = __esm({
|
|
|
33790
33763
|
}
|
|
33791
33764
|
});
|
|
33792
33765
|
function extractToastProps(children) {
|
|
33793
|
-
if (!
|
|
33766
|
+
if (!React105__default.isValidElement(children)) {
|
|
33794
33767
|
if (typeof children === "string") {
|
|
33795
33768
|
return { message: children };
|
|
33796
33769
|
}
|
|
@@ -33828,7 +33801,7 @@ var init_ToastSlot = __esm({
|
|
|
33828
33801
|
eventBus.emit("UI:CLOSE");
|
|
33829
33802
|
};
|
|
33830
33803
|
if (!isVisible) return null;
|
|
33831
|
-
const isCustomContent =
|
|
33804
|
+
const isCustomContent = React105__default.isValidElement(children) && !message;
|
|
33832
33805
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
33833
33806
|
Toast,
|
|
33834
33807
|
{
|
|
@@ -34097,7 +34070,7 @@ var init_WizardContainer = __esm({
|
|
|
34097
34070
|
const isCompleted = index < currentStep;
|
|
34098
34071
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
34099
34072
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
34100
|
-
return /* @__PURE__ */ jsxs(
|
|
34073
|
+
return /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
|
|
34101
34074
|
/* @__PURE__ */ jsx(
|
|
34102
34075
|
Button,
|
|
34103
34076
|
{
|
|
@@ -34479,12 +34452,12 @@ var init_WorldMapTemplate = __esm({
|
|
|
34479
34452
|
}
|
|
34480
34453
|
});
|
|
34481
34454
|
function lazyThree(name, loader) {
|
|
34482
|
-
const Lazy =
|
|
34455
|
+
const Lazy = React105__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
34483
34456
|
function ThreeWrapper(props) {
|
|
34484
|
-
return
|
|
34485
|
-
|
|
34457
|
+
return React105__default.createElement(
|
|
34458
|
+
React105__default.Suspense,
|
|
34486
34459
|
{ fallback: null },
|
|
34487
|
-
|
|
34460
|
+
React105__default.createElement(Lazy, props)
|
|
34488
34461
|
);
|
|
34489
34462
|
}
|
|
34490
34463
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -34972,7 +34945,7 @@ function SuspenseConfigProvider({
|
|
|
34972
34945
|
config,
|
|
34973
34946
|
children
|
|
34974
34947
|
}) {
|
|
34975
|
-
return
|
|
34948
|
+
return React105__default.createElement(
|
|
34976
34949
|
SuspenseConfigContext.Provider,
|
|
34977
34950
|
{ value: config },
|
|
34978
34951
|
children
|
|
@@ -35455,7 +35428,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
35455
35428
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
35456
35429
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
35457
35430
|
}
|
|
35458
|
-
return /* @__PURE__ */ jsx(
|
|
35431
|
+
return /* @__PURE__ */ jsx(React105__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
35459
35432
|
}
|
|
35460
35433
|
if (!child || typeof child !== "object") return null;
|
|
35461
35434
|
const childId = `${parentId}-${index}`;
|
|
@@ -35492,14 +35465,14 @@ function isPatternConfig(value) {
|
|
|
35492
35465
|
if (value === null || value === void 0) return false;
|
|
35493
35466
|
if (typeof value !== "object") return false;
|
|
35494
35467
|
if (Array.isArray(value)) return false;
|
|
35495
|
-
if (
|
|
35468
|
+
if (React105__default.isValidElement(value)) return false;
|
|
35496
35469
|
if (value instanceof Date) return false;
|
|
35497
35470
|
if (typeof value === "function") return false;
|
|
35498
35471
|
const record = value;
|
|
35499
35472
|
return "type" in record && typeof record.type === "string";
|
|
35500
35473
|
}
|
|
35501
35474
|
function isPlainConfigObject(value) {
|
|
35502
|
-
if (
|
|
35475
|
+
if (React105__default.isValidElement(value)) return false;
|
|
35503
35476
|
if (value instanceof Date) return false;
|
|
35504
35477
|
const proto = Object.getPrototypeOf(value);
|
|
35505
35478
|
return proto === Object.prototype || proto === null;
|