@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/runtime/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React104 from 'react';
|
|
2
|
+
import React104__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 = React104__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 (React104__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 = React104__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 = React104__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 = React104__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 = React104__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 = React104__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 = React104__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 = React104__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 = React104__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 = React104__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
2390
2390
|
CardHeader.displayName = "CardHeader";
|
|
2391
|
-
CardTitle =
|
|
2391
|
+
CardTitle = React104__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 = React104__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 = React104__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 = React104__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 = React104__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 = React104.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] = React104.useState(
|
|
3000
3000
|
checked !== void 0 ? checked : defaultChecked
|
|
3001
3001
|
);
|
|
3002
|
-
|
|
3002
|
+
React104.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] = React104__default.useState(false);
|
|
3548
|
+
const timeoutRef = React104__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
|
+
React104__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 = React104__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 = React104__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 = React104__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] = React104.useState(resolvedValue);
|
|
4498
|
+
const [isAnimating, setIsAnimating] = React104.useState(false);
|
|
4499
|
+
React104.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] = React104.useState(false);
|
|
4570
4570
|
const actualPressed = pressed ?? isPressed;
|
|
4571
|
-
const handlePointerDown =
|
|
4571
|
+
const handlePointerDown = React104.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 = React104.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 = React104.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 = React104.useRef(null);
|
|
5490
|
+
const frameRef = React104.useRef(0);
|
|
5491
|
+
React104.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 React104__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 = React104__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
6101
|
+
const trigger = React104__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 = React104__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
6223
|
+
const triggerElement = React104__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 = React104__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx("span", { children: trigger });
|
|
6341
|
+
const triggerElement = React104__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 } = React104__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] = React104__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] = React104__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] = React104__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] = React104__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] = React104.useState(/* @__PURE__ */ new Set());
|
|
7422
|
+
const handlePress = React104.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 = React104.useCallback(
|
|
7431
7431
|
(id) => {
|
|
7432
7432
|
setActiveButtons((prev) => {
|
|
7433
7433
|
const next = new Set(prev);
|
|
@@ -9450,9 +9450,9 @@ var init_ScaledDiagram = __esm({
|
|
|
9450
9450
|
}
|
|
9451
9451
|
});
|
|
9452
9452
|
|
|
9453
|
-
// node_modules
|
|
9453
|
+
// node_modules/katex/dist/katex.min.css
|
|
9454
9454
|
var init_katex_min = __esm({
|
|
9455
|
-
"node_modules
|
|
9455
|
+
"node_modules/katex/dist/katex.min.css"() {
|
|
9456
9456
|
}
|
|
9457
9457
|
});
|
|
9458
9458
|
var MarkdownContent;
|
|
@@ -9462,7 +9462,7 @@ var init_MarkdownContent = __esm({
|
|
|
9462
9462
|
init_Box();
|
|
9463
9463
|
init_useTranslate();
|
|
9464
9464
|
init_cn();
|
|
9465
|
-
MarkdownContent =
|
|
9465
|
+
MarkdownContent = React104__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 = React104__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(React104__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 = React104.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(React104.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] = React104.useState(/* @__PURE__ */ new Set());
|
|
16973
|
+
const handlePress = React104.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 = React104.useCallback(
|
|
16982
16982
|
(direction) => {
|
|
16983
16983
|
setActiveDirections((prev) => {
|
|
16984
16984
|
const next = new Set(prev);
|
|
@@ -17096,19 +17096,6 @@ 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
|
-
});
|
|
17112
17099
|
var DashboardLayout, NavLink;
|
|
17113
17100
|
var init_DashboardLayout = __esm({
|
|
17114
17101
|
"components/templates/DashboardLayout.tsx"() {
|
|
@@ -17122,7 +17109,6 @@ var init_DashboardLayout = __esm({
|
|
|
17122
17109
|
init_useAuthContext();
|
|
17123
17110
|
init_useEventBus();
|
|
17124
17111
|
init_useTranslate();
|
|
17125
|
-
init_CurrentPagePathContext();
|
|
17126
17112
|
DashboardLayout = ({
|
|
17127
17113
|
appName = "{{APP_TITLE}}",
|
|
17128
17114
|
logo,
|
|
@@ -17139,7 +17125,6 @@ var init_DashboardLayout = __esm({
|
|
|
17139
17125
|
showThemeToggle = true,
|
|
17140
17126
|
sidebarFooter,
|
|
17141
17127
|
onSignOut: onSignOutProp,
|
|
17142
|
-
currentPath,
|
|
17143
17128
|
children
|
|
17144
17129
|
}) => {
|
|
17145
17130
|
const eventBus = useEventBus();
|
|
@@ -17160,271 +17145,259 @@ var init_DashboardLayout = __esm({
|
|
|
17160
17145
|
const [sidebarOpen, setSidebarOpen] = useState(false);
|
|
17161
17146
|
const [userMenuOpen, setUserMenuOpen] = useState(false);
|
|
17162
17147
|
const location = useLocation();
|
|
17163
|
-
const ctxPagePath = useCurrentPagePath();
|
|
17164
|
-
const activePath = currentPath ?? ctxPagePath ?? location.pathname;
|
|
17165
17148
|
const { signOut: authSignOut } = useAuthContext();
|
|
17166
17149
|
const user = userProp || (null);
|
|
17167
17150
|
const { t } = useTranslate();
|
|
17168
17151
|
const handleSignOut = onSignOutProp || authSignOut;
|
|
17169
|
-
return /* @__PURE__ */ jsxs(
|
|
17170
|
-
|
|
17171
|
-
|
|
17172
|
-
|
|
17173
|
-
|
|
17174
|
-
|
|
17175
|
-
|
|
17176
|
-
|
|
17177
|
-
|
|
17178
|
-
|
|
17179
|
-
|
|
17180
|
-
|
|
17152
|
+
return /* @__PURE__ */ jsxs(Box, { className: "min-h-screen bg-background dark:bg-background", children: [
|
|
17153
|
+
sidebarOpen && /* @__PURE__ */ jsx(
|
|
17154
|
+
Box,
|
|
17155
|
+
{
|
|
17156
|
+
className: "fixed inset-0 bg-foreground/50 dark:bg-foreground/70 z-20 lg:hidden",
|
|
17157
|
+
onClick: () => setSidebarOpen(false)
|
|
17158
|
+
}
|
|
17159
|
+
),
|
|
17160
|
+
/* @__PURE__ */ jsxs(
|
|
17161
|
+
Box,
|
|
17162
|
+
{
|
|
17163
|
+
as: "aside",
|
|
17164
|
+
className: cn(
|
|
17165
|
+
"fixed inset-y-0 left-0 z-30 w-64 bg-card dark:bg-card border-r border-border dark:border-border",
|
|
17166
|
+
"transform transition-transform duration-200 ease-in-out lg:translate-x-0",
|
|
17167
|
+
sidebarOpen ? "translate-x-0" : "-translate-x-full"
|
|
17181
17168
|
),
|
|
17182
|
-
|
|
17183
|
-
|
|
17184
|
-
|
|
17185
|
-
|
|
17186
|
-
|
|
17187
|
-
|
|
17188
|
-
"
|
|
17189
|
-
|
|
17190
|
-
|
|
17191
|
-
|
|
17192
|
-
|
|
17193
|
-
|
|
17194
|
-
|
|
17195
|
-
|
|
17169
|
+
children: [
|
|
17170
|
+
/* @__PURE__ */ jsxs(
|
|
17171
|
+
HStack,
|
|
17172
|
+
{
|
|
17173
|
+
align: "center",
|
|
17174
|
+
justify: "between",
|
|
17175
|
+
className: "h-16 px-4 border-b border-border dark:border-border",
|
|
17176
|
+
children: [
|
|
17177
|
+
/* @__PURE__ */ jsxs(Link, { to: "/", className: "flex items-center gap-2", children: [
|
|
17178
|
+
logo || /* @__PURE__ */ jsx(Box, { className: "w-8 h-8 bg-primary-600 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsx(
|
|
17179
|
+
Typography,
|
|
17180
|
+
{
|
|
17181
|
+
variant: "small",
|
|
17182
|
+
className: "text-white font-bold text-sm",
|
|
17183
|
+
as: "span",
|
|
17184
|
+
children: appName.charAt(0).toUpperCase()
|
|
17185
|
+
}
|
|
17186
|
+
) }),
|
|
17187
|
+
/* @__PURE__ */ jsx(
|
|
17188
|
+
Typography,
|
|
17189
|
+
{
|
|
17190
|
+
variant: "label",
|
|
17191
|
+
className: "font-semibold text-foreground dark:text-foreground",
|
|
17192
|
+
as: "span",
|
|
17193
|
+
children: appName
|
|
17194
|
+
}
|
|
17195
|
+
)
|
|
17196
|
+
] }),
|
|
17197
|
+
/* @__PURE__ */ jsx(
|
|
17198
|
+
Button,
|
|
17199
|
+
{
|
|
17200
|
+
variant: "ghost",
|
|
17201
|
+
className: "lg:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground",
|
|
17202
|
+
onClick: () => setSidebarOpen(false),
|
|
17203
|
+
children: /* @__PURE__ */ jsx(X, { className: "h-5 w-5" })
|
|
17204
|
+
}
|
|
17205
|
+
)
|
|
17206
|
+
]
|
|
17207
|
+
}
|
|
17208
|
+
),
|
|
17209
|
+
/* @__PURE__ */ jsx(
|
|
17210
|
+
VStack,
|
|
17211
|
+
{
|
|
17212
|
+
as: "nav",
|
|
17213
|
+
gap: "none",
|
|
17214
|
+
className: "flex-1 px-3 py-4 space-y-1 overflow-y-auto",
|
|
17215
|
+
children: navItems.map((item) => /* @__PURE__ */ jsx(
|
|
17216
|
+
NavLink,
|
|
17196
17217
|
{
|
|
17197
|
-
|
|
17198
|
-
|
|
17199
|
-
|
|
17200
|
-
|
|
17201
|
-
|
|
17202
|
-
|
|
17203
|
-
|
|
17204
|
-
|
|
17205
|
-
|
|
17206
|
-
|
|
17207
|
-
|
|
17208
|
-
|
|
17209
|
-
|
|
17210
|
-
|
|
17211
|
-
|
|
17212
|
-
|
|
17213
|
-
|
|
17214
|
-
|
|
17215
|
-
|
|
17216
|
-
|
|
17217
|
-
|
|
17218
|
+
item,
|
|
17219
|
+
currentPath: location.pathname
|
|
17220
|
+
},
|
|
17221
|
+
item.href
|
|
17222
|
+
))
|
|
17223
|
+
}
|
|
17224
|
+
),
|
|
17225
|
+
sidebarFooter && /* @__PURE__ */ jsx(Box, { className: "p-4 border-t border-border dark:border-border", children: sidebarFooter })
|
|
17226
|
+
]
|
|
17227
|
+
}
|
|
17228
|
+
),
|
|
17229
|
+
/* @__PURE__ */ jsxs(Box, { className: "lg:pl-64", children: [
|
|
17230
|
+
/* @__PURE__ */ jsx(
|
|
17231
|
+
Box,
|
|
17232
|
+
{
|
|
17233
|
+
as: "header",
|
|
17234
|
+
className: "sticky top-0 z-20 h-16 bg-card dark:bg-card border-b border-border dark:border-border",
|
|
17235
|
+
children: /* @__PURE__ */ jsxs(
|
|
17236
|
+
HStack,
|
|
17237
|
+
{
|
|
17238
|
+
align: "center",
|
|
17239
|
+
justify: "between",
|
|
17240
|
+
className: "h-full px-4 gap-4",
|
|
17241
|
+
children: [
|
|
17242
|
+
/* @__PURE__ */ jsx(
|
|
17243
|
+
Button,
|
|
17244
|
+
{
|
|
17245
|
+
variant: "ghost",
|
|
17246
|
+
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",
|
|
17247
|
+
onClick: () => setSidebarOpen(true),
|
|
17248
|
+
"aria-label": "Open sidebar",
|
|
17249
|
+
children: /* @__PURE__ */ jsx(Menu$1, { className: "h-5 w-5" })
|
|
17250
|
+
}
|
|
17251
|
+
),
|
|
17252
|
+
searchEnabled && /* @__PURE__ */ jsx(Box, { className: "hidden sm:block flex-1 max-w-md", children: /* @__PURE__ */ jsxs(Box, { className: "relative", children: [
|
|
17253
|
+
/* @__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" }),
|
|
17254
|
+
/* @__PURE__ */ jsx(
|
|
17255
|
+
Input,
|
|
17256
|
+
{
|
|
17257
|
+
type: "search",
|
|
17258
|
+
placeholder: t("common.search"),
|
|
17259
|
+
className: "pl-10 w-full",
|
|
17260
|
+
onKeyDown: (e) => {
|
|
17261
|
+
if (e.key === "Enter") {
|
|
17262
|
+
handleSearchSubmit(e.target.value);
|
|
17218
17263
|
}
|
|
17219
|
-
)
|
|
17220
|
-
] }),
|
|
17221
|
-
/* @__PURE__ */ jsx(
|
|
17222
|
-
Button,
|
|
17223
|
-
{
|
|
17224
|
-
variant: "ghost",
|
|
17225
|
-
className: "lg:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground",
|
|
17226
|
-
onClick: () => setSidebarOpen(false),
|
|
17227
|
-
children: /* @__PURE__ */ jsx(X, { className: "h-5 w-5" })
|
|
17228
17264
|
}
|
|
17229
|
-
|
|
17230
|
-
|
|
17231
|
-
}
|
|
17232
|
-
|
|
17233
|
-
|
|
17234
|
-
|
|
17235
|
-
|
|
17236
|
-
|
|
17237
|
-
gap: "none",
|
|
17238
|
-
className: "flex-1 px-3 py-4 space-y-1 overflow-y-auto",
|
|
17239
|
-
children: navItems.map((item) => /* @__PURE__ */ jsx(
|
|
17240
|
-
NavLink,
|
|
17265
|
+
}
|
|
17266
|
+
)
|
|
17267
|
+
] }) }),
|
|
17268
|
+
/* @__PURE__ */ jsxs(HStack, { align: "center", gap: "xs", children: [
|
|
17269
|
+
headerActions,
|
|
17270
|
+
showThemeToggle && /* @__PURE__ */ jsx(ThemeToggle, {}),
|
|
17271
|
+
topBarActions.map((action, idx) => /* @__PURE__ */ jsxs(
|
|
17272
|
+
Button,
|
|
17241
17273
|
{
|
|
17242
|
-
|
|
17243
|
-
|
|
17274
|
+
variant: "ghost",
|
|
17275
|
+
className: "relative p-2 rounded-full hover:bg-muted dark:hover:bg-muted",
|
|
17276
|
+
onClick: () => handleTopBarActionClick(action.event),
|
|
17277
|
+
"aria-label": action.label ?? action.icon,
|
|
17278
|
+
children: [
|
|
17279
|
+
/* @__PURE__ */ jsx(Icon, { name: action.icon, className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
|
|
17280
|
+
action.badge !== void 0 && action.badge !== null && action.badge !== 0 && action.badge !== "" && /* @__PURE__ */ jsx(
|
|
17281
|
+
Box,
|
|
17282
|
+
{
|
|
17283
|
+
as: "span",
|
|
17284
|
+
className: cn(
|
|
17285
|
+
"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",
|
|
17286
|
+
action.variant === "danger" ? "bg-error" : action.variant === "primary" ? "bg-primary" : "bg-foreground"
|
|
17287
|
+
),
|
|
17288
|
+
children: action.badge
|
|
17289
|
+
}
|
|
17290
|
+
)
|
|
17291
|
+
]
|
|
17244
17292
|
},
|
|
17245
|
-
|
|
17246
|
-
))
|
|
17247
|
-
|
|
17248
|
-
|
|
17249
|
-
|
|
17250
|
-
|
|
17251
|
-
|
|
17252
|
-
|
|
17253
|
-
|
|
17254
|
-
|
|
17255
|
-
|
|
17256
|
-
|
|
17257
|
-
|
|
17258
|
-
|
|
17259
|
-
|
|
17260
|
-
|
|
17261
|
-
|
|
17262
|
-
|
|
17263
|
-
|
|
17264
|
-
|
|
17265
|
-
|
|
17266
|
-
|
|
17293
|
+
`${action.event}-${idx}`
|
|
17294
|
+
)),
|
|
17295
|
+
notificationsEnabled && /* @__PURE__ */ jsxs(
|
|
17296
|
+
Button,
|
|
17297
|
+
{
|
|
17298
|
+
variant: "ghost",
|
|
17299
|
+
className: "relative p-2 rounded-full hover:bg-muted dark:hover:bg-muted",
|
|
17300
|
+
onClick: handleNotificationClick,
|
|
17301
|
+
"aria-label": t("common.notifications"),
|
|
17302
|
+
children: [
|
|
17303
|
+
/* @__PURE__ */ jsx(Bell, { className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
|
|
17304
|
+
unreadCount > 0 && /* @__PURE__ */ jsx(
|
|
17305
|
+
Box,
|
|
17306
|
+
{
|
|
17307
|
+
as: "span",
|
|
17308
|
+
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",
|
|
17309
|
+
children: unreadCount > 99 ? "99+" : unreadCount
|
|
17310
|
+
}
|
|
17311
|
+
)
|
|
17312
|
+
]
|
|
17313
|
+
}
|
|
17314
|
+
),
|
|
17315
|
+
user && /* @__PURE__ */ jsxs(Box, { className: "relative", children: [
|
|
17316
|
+
/* @__PURE__ */ jsxs(
|
|
17267
17317
|
Button,
|
|
17268
17318
|
{
|
|
17269
17319
|
variant: "ghost",
|
|
17270
|
-
className: "
|
|
17271
|
-
onClick: () =>
|
|
17272
|
-
|
|
17273
|
-
|
|
17320
|
+
className: "flex items-center gap-2 p-2 rounded-lg hover:bg-muted dark:hover:bg-muted",
|
|
17321
|
+
onClick: () => setUserMenuOpen(!userMenuOpen),
|
|
17322
|
+
children: [
|
|
17323
|
+
/* @__PURE__ */ jsx(
|
|
17324
|
+
Avatar,
|
|
17325
|
+
{
|
|
17326
|
+
src: user.avatar,
|
|
17327
|
+
alt: user.name,
|
|
17328
|
+
initials: user.name.split(" ").map((n) => n[0]).join("").substring(0, 2),
|
|
17329
|
+
size: "sm"
|
|
17330
|
+
}
|
|
17331
|
+
),
|
|
17332
|
+
/* @__PURE__ */ jsx(
|
|
17333
|
+
Typography,
|
|
17334
|
+
{
|
|
17335
|
+
variant: "small",
|
|
17336
|
+
className: "hidden sm:block text-sm font-medium text-foreground dark:text-foreground",
|
|
17337
|
+
as: "span",
|
|
17338
|
+
children: user.name
|
|
17339
|
+
}
|
|
17340
|
+
),
|
|
17341
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: "hidden sm:block h-4 w-4 text-muted-foreground dark:text-muted-foreground" })
|
|
17342
|
+
]
|
|
17274
17343
|
}
|
|
17275
17344
|
),
|
|
17276
|
-
|
|
17277
|
-
/* @__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" }),
|
|
17345
|
+
userMenuOpen && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
17278
17346
|
/* @__PURE__ */ jsx(
|
|
17279
|
-
|
|
17280
|
-
{
|
|
17281
|
-
type: "search",
|
|
17282
|
-
placeholder: t("common.search"),
|
|
17283
|
-
className: "pl-10 w-full",
|
|
17284
|
-
onKeyDown: (e) => {
|
|
17285
|
-
if (e.key === "Enter") {
|
|
17286
|
-
handleSearchSubmit(e.target.value);
|
|
17287
|
-
}
|
|
17288
|
-
}
|
|
17289
|
-
}
|
|
17290
|
-
)
|
|
17291
|
-
] }) }),
|
|
17292
|
-
!searchEnabled && /* @__PURE__ */ jsx(Box, { className: "flex-1" }),
|
|
17293
|
-
/* @__PURE__ */ jsxs(HStack, { align: "center", gap: "xs", children: [
|
|
17294
|
-
headerActions,
|
|
17295
|
-
showThemeToggle && /* @__PURE__ */ jsx(ThemeToggle, {}),
|
|
17296
|
-
topBarActions.map((action, idx) => /* @__PURE__ */ jsxs(
|
|
17297
|
-
Button,
|
|
17298
|
-
{
|
|
17299
|
-
variant: "ghost",
|
|
17300
|
-
className: "relative p-2 rounded-full hover:bg-muted dark:hover:bg-muted",
|
|
17301
|
-
onClick: () => handleTopBarActionClick(action.event),
|
|
17302
|
-
"aria-label": action.label ?? action.icon,
|
|
17303
|
-
children: [
|
|
17304
|
-
/* @__PURE__ */ jsx(Icon, { name: action.icon, className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
|
|
17305
|
-
action.badge !== void 0 && action.badge !== null && action.badge !== 0 && action.badge !== "" && /* @__PURE__ */ jsx(
|
|
17306
|
-
Box,
|
|
17307
|
-
{
|
|
17308
|
-
as: "span",
|
|
17309
|
-
className: cn(
|
|
17310
|
-
"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",
|
|
17311
|
-
action.variant === "danger" ? "bg-error" : action.variant === "primary" ? "bg-primary" : "bg-foreground"
|
|
17312
|
-
),
|
|
17313
|
-
children: action.badge
|
|
17314
|
-
}
|
|
17315
|
-
)
|
|
17316
|
-
]
|
|
17317
|
-
},
|
|
17318
|
-
`${action.event}-${idx}`
|
|
17319
|
-
)),
|
|
17320
|
-
notificationsEnabled && /* @__PURE__ */ jsxs(
|
|
17321
|
-
Button,
|
|
17347
|
+
Box,
|
|
17322
17348
|
{
|
|
17323
|
-
|
|
17324
|
-
|
|
17325
|
-
onClick: handleNotificationClick,
|
|
17326
|
-
"aria-label": t("common.notifications"),
|
|
17327
|
-
children: [
|
|
17328
|
-
/* @__PURE__ */ jsx(Bell, { className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
|
|
17329
|
-
unreadCount > 0 && /* @__PURE__ */ jsx(
|
|
17330
|
-
Box,
|
|
17331
|
-
{
|
|
17332
|
-
as: "span",
|
|
17333
|
-
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",
|
|
17334
|
-
children: unreadCount > 99 ? "99+" : unreadCount
|
|
17335
|
-
}
|
|
17336
|
-
)
|
|
17337
|
-
]
|
|
17349
|
+
className: "fixed inset-0 z-20",
|
|
17350
|
+
onClick: () => setUserMenuOpen(false)
|
|
17338
17351
|
}
|
|
17339
17352
|
),
|
|
17340
|
-
|
|
17353
|
+
/* @__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: [
|
|
17354
|
+
/* @__PURE__ */ jsxs(Box, { className: "px-4 py-2 border-b border-border dark:border-border", children: [
|
|
17355
|
+
/* @__PURE__ */ jsx(
|
|
17356
|
+
Typography,
|
|
17357
|
+
{
|
|
17358
|
+
variant: "small",
|
|
17359
|
+
className: "text-sm font-medium text-foreground dark:text-foreground",
|
|
17360
|
+
as: "p",
|
|
17361
|
+
children: user.name
|
|
17362
|
+
}
|
|
17363
|
+
),
|
|
17364
|
+
/* @__PURE__ */ jsx(
|
|
17365
|
+
Typography,
|
|
17366
|
+
{
|
|
17367
|
+
variant: "caption",
|
|
17368
|
+
className: "text-xs text-muted-foreground dark:text-muted-foreground",
|
|
17369
|
+
as: "p",
|
|
17370
|
+
children: user.email
|
|
17371
|
+
}
|
|
17372
|
+
)
|
|
17373
|
+
] }),
|
|
17341
17374
|
/* @__PURE__ */ jsxs(
|
|
17342
17375
|
Button,
|
|
17343
17376
|
{
|
|
17344
17377
|
variant: "ghost",
|
|
17345
|
-
|
|
17346
|
-
|
|
17378
|
+
onClick: () => {
|
|
17379
|
+
setUserMenuOpen(false);
|
|
17380
|
+
handleSignOut?.();
|
|
17381
|
+
},
|
|
17382
|
+
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",
|
|
17347
17383
|
children: [
|
|
17348
|
-
/* @__PURE__ */ jsx(
|
|
17349
|
-
|
|
17350
|
-
{
|
|
17351
|
-
src: user.avatar,
|
|
17352
|
-
alt: user.name,
|
|
17353
|
-
initials: user.name.split(" ").map((n) => n[0]).join("").substring(0, 2),
|
|
17354
|
-
size: "sm"
|
|
17355
|
-
}
|
|
17356
|
-
),
|
|
17357
|
-
/* @__PURE__ */ jsx(
|
|
17358
|
-
Typography,
|
|
17359
|
-
{
|
|
17360
|
-
variant: "small",
|
|
17361
|
-
className: "hidden sm:block text-sm font-medium text-foreground dark:text-foreground",
|
|
17362
|
-
as: "span",
|
|
17363
|
-
children: user.name
|
|
17364
|
-
}
|
|
17365
|
-
),
|
|
17366
|
-
/* @__PURE__ */ jsx(ChevronDown, { className: "hidden sm:block h-4 w-4 text-muted-foreground dark:text-muted-foreground" })
|
|
17384
|
+
/* @__PURE__ */ jsx(LogOut, { className: "h-4 w-4" }),
|
|
17385
|
+
t("auth.signOut")
|
|
17367
17386
|
]
|
|
17368
17387
|
}
|
|
17369
|
-
)
|
|
17370
|
-
userMenuOpen && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
17371
|
-
/* @__PURE__ */ jsx(
|
|
17372
|
-
Box,
|
|
17373
|
-
{
|
|
17374
|
-
className: "fixed inset-0 z-20",
|
|
17375
|
-
onClick: () => setUserMenuOpen(false)
|
|
17376
|
-
}
|
|
17377
|
-
),
|
|
17378
|
-
/* @__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: [
|
|
17379
|
-
/* @__PURE__ */ jsxs(Box, { className: "px-4 py-2 border-b border-border dark:border-border", children: [
|
|
17380
|
-
/* @__PURE__ */ jsx(
|
|
17381
|
-
Typography,
|
|
17382
|
-
{
|
|
17383
|
-
variant: "small",
|
|
17384
|
-
className: "text-sm font-medium text-foreground dark:text-foreground",
|
|
17385
|
-
as: "p",
|
|
17386
|
-
children: user.name
|
|
17387
|
-
}
|
|
17388
|
-
),
|
|
17389
|
-
/* @__PURE__ */ jsx(
|
|
17390
|
-
Typography,
|
|
17391
|
-
{
|
|
17392
|
-
variant: "caption",
|
|
17393
|
-
className: "text-xs text-muted-foreground dark:text-muted-foreground",
|
|
17394
|
-
as: "p",
|
|
17395
|
-
children: user.email
|
|
17396
|
-
}
|
|
17397
|
-
)
|
|
17398
|
-
] }),
|
|
17399
|
-
/* @__PURE__ */ jsxs(
|
|
17400
|
-
Button,
|
|
17401
|
-
{
|
|
17402
|
-
variant: "ghost",
|
|
17403
|
-
onClick: () => {
|
|
17404
|
-
setUserMenuOpen(false);
|
|
17405
|
-
handleSignOut?.();
|
|
17406
|
-
},
|
|
17407
|
-
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",
|
|
17408
|
-
children: [
|
|
17409
|
-
/* @__PURE__ */ jsx(LogOut, { className: "h-4 w-4" }),
|
|
17410
|
-
t("auth.signOut")
|
|
17411
|
-
]
|
|
17412
|
-
}
|
|
17413
|
-
)
|
|
17414
|
-
] })
|
|
17415
|
-
] })
|
|
17388
|
+
)
|
|
17416
17389
|
] })
|
|
17417
17390
|
] })
|
|
17418
|
-
]
|
|
17419
|
-
}
|
|
17420
|
-
|
|
17391
|
+
] })
|
|
17392
|
+
] })
|
|
17393
|
+
]
|
|
17421
17394
|
}
|
|
17422
|
-
)
|
|
17423
|
-
|
|
17424
|
-
|
|
17425
|
-
|
|
17426
|
-
}
|
|
17427
|
-
);
|
|
17395
|
+
)
|
|
17396
|
+
}
|
|
17397
|
+
),
|
|
17398
|
+
/* @__PURE__ */ jsx(Box, { as: "main", className: "p-4 sm:p-6", children })
|
|
17399
|
+
] })
|
|
17400
|
+
] });
|
|
17428
17401
|
};
|
|
17429
17402
|
DashboardLayout.displayName = "DashboardLayout";
|
|
17430
17403
|
NavLink = ({
|
|
@@ -17918,13 +17891,13 @@ function DataList({
|
|
|
17918
17891
|
}) {
|
|
17919
17892
|
const eventBus = useEventBus();
|
|
17920
17893
|
const { t } = useTranslate();
|
|
17921
|
-
const [visibleCount, setVisibleCount] =
|
|
17894
|
+
const [visibleCount, setVisibleCount] = React104__default.useState(pageSize || Infinity);
|
|
17922
17895
|
const fieldDefs = fields ?? columns ?? [];
|
|
17923
17896
|
const allData = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
17924
17897
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
17925
17898
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
17926
17899
|
const hasRenderProp = typeof children === "function";
|
|
17927
|
-
|
|
17900
|
+
React104__default.useEffect(() => {
|
|
17928
17901
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
17929
17902
|
const childrenTypeOf = typeof children;
|
|
17930
17903
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -17980,7 +17953,7 @@ function DataList({
|
|
|
17980
17953
|
const items2 = data.map((item) => item);
|
|
17981
17954
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
17982
17955
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
17983
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
17956
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
|
|
17984
17957
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
17985
17958
|
group.items.map((itemData, index) => {
|
|
17986
17959
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -18171,7 +18144,7 @@ function DataList({
|
|
|
18171
18144
|
className
|
|
18172
18145
|
),
|
|
18173
18146
|
children: [
|
|
18174
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
18147
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
|
|
18175
18148
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
18176
18149
|
group.items.map(
|
|
18177
18150
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -19254,7 +19227,7 @@ var init_WizardProgress = __esm({
|
|
|
19254
19227
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
19255
19228
|
const isActive = index === currentStep;
|
|
19256
19229
|
const isCompleted = index < currentStep;
|
|
19257
|
-
return /* @__PURE__ */ jsxs(
|
|
19230
|
+
return /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
|
|
19258
19231
|
/* @__PURE__ */ jsx(
|
|
19259
19232
|
"button",
|
|
19260
19233
|
{
|
|
@@ -20165,7 +20138,7 @@ function InventoryGrid({
|
|
|
20165
20138
|
const eventBus = useEventBus();
|
|
20166
20139
|
const slotCount = totalSlots ?? items.length;
|
|
20167
20140
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
20168
|
-
const handleSelect =
|
|
20141
|
+
const handleSelect = React104.useCallback(
|
|
20169
20142
|
(id) => {
|
|
20170
20143
|
onSelect?.(id);
|
|
20171
20144
|
if (selectEvent) {
|
|
@@ -20378,15 +20351,15 @@ function GameCanvas2D({
|
|
|
20378
20351
|
fps = 60,
|
|
20379
20352
|
className
|
|
20380
20353
|
}) {
|
|
20381
|
-
const canvasRef =
|
|
20382
|
-
const rafRef =
|
|
20383
|
-
const frameRef =
|
|
20384
|
-
const lastTimeRef =
|
|
20385
|
-
const onDrawRef =
|
|
20354
|
+
const canvasRef = React104.useRef(null);
|
|
20355
|
+
const rafRef = React104.useRef(0);
|
|
20356
|
+
const frameRef = React104.useRef(0);
|
|
20357
|
+
const lastTimeRef = React104.useRef(0);
|
|
20358
|
+
const onDrawRef = React104.useRef(onDraw);
|
|
20386
20359
|
onDrawRef.current = onDraw;
|
|
20387
|
-
const onTickRef =
|
|
20360
|
+
const onTickRef = React104.useRef(onTick);
|
|
20388
20361
|
onTickRef.current = onTick;
|
|
20389
|
-
|
|
20362
|
+
React104.useEffect(() => {
|
|
20390
20363
|
const canvas = canvasRef.current;
|
|
20391
20364
|
if (!canvas) return;
|
|
20392
20365
|
const ctx = canvas.getContext("2d");
|
|
@@ -20675,7 +20648,7 @@ function TurnPanel({
|
|
|
20675
20648
|
className
|
|
20676
20649
|
}) {
|
|
20677
20650
|
const eventBus = useEventBus();
|
|
20678
|
-
const handleAction =
|
|
20651
|
+
const handleAction = React104.useCallback(
|
|
20679
20652
|
(event) => {
|
|
20680
20653
|
if (event) {
|
|
20681
20654
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -20821,7 +20794,7 @@ function UnitCommandBar({
|
|
|
20821
20794
|
className
|
|
20822
20795
|
}) {
|
|
20823
20796
|
const eventBus = useEventBus();
|
|
20824
|
-
const handleCommand =
|
|
20797
|
+
const handleCommand = React104.useCallback(
|
|
20825
20798
|
(event) => {
|
|
20826
20799
|
if (event) {
|
|
20827
20800
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -21306,7 +21279,7 @@ function GameMenu({
|
|
|
21306
21279
|
} catch {
|
|
21307
21280
|
}
|
|
21308
21281
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
21309
|
-
const handleOptionClick =
|
|
21282
|
+
const handleOptionClick = React104.useCallback(
|
|
21310
21283
|
(option) => {
|
|
21311
21284
|
if (option.event && eventBus) {
|
|
21312
21285
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -21420,7 +21393,7 @@ function GameOverScreen({
|
|
|
21420
21393
|
} catch {
|
|
21421
21394
|
}
|
|
21422
21395
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
21423
|
-
const handleActionClick =
|
|
21396
|
+
const handleActionClick = React104.useCallback(
|
|
21424
21397
|
(action) => {
|
|
21425
21398
|
if (action.event && eventBus) {
|
|
21426
21399
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -24771,7 +24744,7 @@ var init_DocumentViewer = __esm({
|
|
|
24771
24744
|
}
|
|
24772
24745
|
});
|
|
24773
24746
|
function extractTitle(children) {
|
|
24774
|
-
if (!
|
|
24747
|
+
if (!React104__default.isValidElement(children)) return void 0;
|
|
24775
24748
|
const props = children.props;
|
|
24776
24749
|
if (typeof props.title === "string") {
|
|
24777
24750
|
return props.title;
|
|
@@ -24826,7 +24799,7 @@ function LinearView({
|
|
|
24826
24799
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
24827
24800
|
const isDone = i < currentIdx;
|
|
24828
24801
|
const isCurrent = i === currentIdx;
|
|
24829
|
-
return /* @__PURE__ */ jsxs(
|
|
24802
|
+
return /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
|
|
24830
24803
|
i > 0 && /* @__PURE__ */ jsx(
|
|
24831
24804
|
Typography,
|
|
24832
24805
|
{
|
|
@@ -25610,12 +25583,12 @@ var init_Form = __esm({
|
|
|
25610
25583
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
25611
25584
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
25612
25585
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
25613
|
-
const normalizedInitialData =
|
|
25586
|
+
const normalizedInitialData = React104__default.useMemo(() => {
|
|
25614
25587
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
25615
25588
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
25616
25589
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
25617
25590
|
}, [entity, initialData]);
|
|
25618
|
-
const entityDerivedFields =
|
|
25591
|
+
const entityDerivedFields = React104__default.useMemo(() => {
|
|
25619
25592
|
if (fields && fields.length > 0) return void 0;
|
|
25620
25593
|
if (!resolvedEntity) return void 0;
|
|
25621
25594
|
return resolvedEntity.fields.map(
|
|
@@ -25634,16 +25607,16 @@ var init_Form = __esm({
|
|
|
25634
25607
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
25635
25608
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
25636
25609
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
25637
|
-
const [formData, setFormData] =
|
|
25610
|
+
const [formData, setFormData] = React104__default.useState(
|
|
25638
25611
|
normalizedInitialData
|
|
25639
25612
|
);
|
|
25640
|
-
const [collapsedSections, setCollapsedSections] =
|
|
25613
|
+
const [collapsedSections, setCollapsedSections] = React104__default.useState(
|
|
25641
25614
|
/* @__PURE__ */ new Set()
|
|
25642
25615
|
);
|
|
25643
|
-
const [submitError, setSubmitError] =
|
|
25644
|
-
const formRef =
|
|
25616
|
+
const [submitError, setSubmitError] = React104__default.useState(null);
|
|
25617
|
+
const formRef = React104__default.useRef(null);
|
|
25645
25618
|
const formMode = props.mode;
|
|
25646
|
-
const mountedRef =
|
|
25619
|
+
const mountedRef = React104__default.useRef(false);
|
|
25647
25620
|
if (!mountedRef.current) {
|
|
25648
25621
|
mountedRef.current = true;
|
|
25649
25622
|
debug("forms", "mount", {
|
|
@@ -25656,7 +25629,7 @@ var init_Form = __esm({
|
|
|
25656
25629
|
});
|
|
25657
25630
|
}
|
|
25658
25631
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
25659
|
-
const evalContext =
|
|
25632
|
+
const evalContext = React104__default.useMemo(
|
|
25660
25633
|
() => ({
|
|
25661
25634
|
formValues: formData,
|
|
25662
25635
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -25665,7 +25638,7 @@ var init_Form = __esm({
|
|
|
25665
25638
|
}),
|
|
25666
25639
|
[formData, externalContext]
|
|
25667
25640
|
);
|
|
25668
|
-
|
|
25641
|
+
React104__default.useEffect(() => {
|
|
25669
25642
|
debug("forms", "initialData-sync", {
|
|
25670
25643
|
mode: formMode,
|
|
25671
25644
|
normalizedInitialData,
|
|
@@ -25676,7 +25649,7 @@ var init_Form = __esm({
|
|
|
25676
25649
|
setFormData(normalizedInitialData);
|
|
25677
25650
|
}
|
|
25678
25651
|
}, [normalizedInitialData]);
|
|
25679
|
-
const processCalculations =
|
|
25652
|
+
const processCalculations = React104__default.useCallback(
|
|
25680
25653
|
(changedFieldId, newFormData) => {
|
|
25681
25654
|
if (!hiddenCalculations.length) return;
|
|
25682
25655
|
const context = {
|
|
@@ -25701,7 +25674,7 @@ var init_Form = __esm({
|
|
|
25701
25674
|
},
|
|
25702
25675
|
[hiddenCalculations, externalContext, eventBus]
|
|
25703
25676
|
);
|
|
25704
|
-
const checkViolations =
|
|
25677
|
+
const checkViolations = React104__default.useCallback(
|
|
25705
25678
|
(changedFieldId, newFormData) => {
|
|
25706
25679
|
if (!violationTriggers.length) return;
|
|
25707
25680
|
const context = {
|
|
@@ -25739,7 +25712,7 @@ var init_Form = __esm({
|
|
|
25739
25712
|
processCalculations(name, newFormData);
|
|
25740
25713
|
checkViolations(name, newFormData);
|
|
25741
25714
|
};
|
|
25742
|
-
const isFieldVisible =
|
|
25715
|
+
const isFieldVisible = React104__default.useCallback(
|
|
25743
25716
|
(fieldName) => {
|
|
25744
25717
|
const condition = conditionalFields[fieldName];
|
|
25745
25718
|
if (!condition) return true;
|
|
@@ -25747,7 +25720,7 @@ var init_Form = __esm({
|
|
|
25747
25720
|
},
|
|
25748
25721
|
[conditionalFields, evalContext]
|
|
25749
25722
|
);
|
|
25750
|
-
const isSectionVisible =
|
|
25723
|
+
const isSectionVisible = React104__default.useCallback(
|
|
25751
25724
|
(section) => {
|
|
25752
25725
|
if (!section.condition) return true;
|
|
25753
25726
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -25823,7 +25796,7 @@ var init_Form = __esm({
|
|
|
25823
25796
|
eventBus.emit(`UI:${onCancel}`);
|
|
25824
25797
|
}
|
|
25825
25798
|
};
|
|
25826
|
-
const renderField =
|
|
25799
|
+
const renderField = React104__default.useCallback(
|
|
25827
25800
|
(field) => {
|
|
25828
25801
|
const fieldName = field.name || field.field;
|
|
25829
25802
|
if (!fieldName) return null;
|
|
@@ -25844,7 +25817,7 @@ var init_Form = __esm({
|
|
|
25844
25817
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
25845
25818
|
);
|
|
25846
25819
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
25847
|
-
const normalizedFields =
|
|
25820
|
+
const normalizedFields = React104__default.useMemo(() => {
|
|
25848
25821
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
25849
25822
|
return effectiveFields.map((field) => {
|
|
25850
25823
|
if (typeof field === "string") {
|
|
@@ -25866,7 +25839,7 @@ var init_Form = __esm({
|
|
|
25866
25839
|
return field;
|
|
25867
25840
|
});
|
|
25868
25841
|
}, [effectiveFields, resolvedEntity]);
|
|
25869
|
-
const schemaFields =
|
|
25842
|
+
const schemaFields = React104__default.useMemo(() => {
|
|
25870
25843
|
if (normalizedFields.length === 0) return null;
|
|
25871
25844
|
if (isDebugEnabled()) {
|
|
25872
25845
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -25876,7 +25849,7 @@ var init_Form = __esm({
|
|
|
25876
25849
|
}
|
|
25877
25850
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
25878
25851
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
25879
|
-
const sectionElements =
|
|
25852
|
+
const sectionElements = React104__default.useMemo(() => {
|
|
25880
25853
|
if (!sections || sections.length === 0) return null;
|
|
25881
25854
|
return sections.map((section) => {
|
|
25882
25855
|
if (!isSectionVisible(section)) {
|
|
@@ -27408,7 +27381,7 @@ var init_List = __esm({
|
|
|
27408
27381
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
27409
27382
|
return [];
|
|
27410
27383
|
}, [entity]);
|
|
27411
|
-
const getItemActions =
|
|
27384
|
+
const getItemActions = React104__default.useCallback(
|
|
27412
27385
|
(item) => {
|
|
27413
27386
|
if (!itemActions) return [];
|
|
27414
27387
|
if (typeof itemActions === "function") {
|
|
@@ -27845,7 +27818,7 @@ var init_MediaGallery = __esm({
|
|
|
27845
27818
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
27846
27819
|
);
|
|
27847
27820
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
27848
|
-
const items =
|
|
27821
|
+
const items = React104__default.useMemo(() => {
|
|
27849
27822
|
if (propItems) return propItems;
|
|
27850
27823
|
if (entityData.length === 0) return [];
|
|
27851
27824
|
return entityData.map((record, idx) => ({
|
|
@@ -28009,7 +27982,7 @@ var init_MediaGallery = __esm({
|
|
|
28009
27982
|
}
|
|
28010
27983
|
});
|
|
28011
27984
|
function extractTitle2(children) {
|
|
28012
|
-
if (!
|
|
27985
|
+
if (!React104__default.isValidElement(children)) return void 0;
|
|
28013
27986
|
const props = children.props;
|
|
28014
27987
|
if (typeof props.title === "string") {
|
|
28015
27988
|
return props.title;
|
|
@@ -28722,7 +28695,7 @@ var init_PageHeader = __esm({
|
|
|
28722
28695
|
info: "bg-info/10 text-info"
|
|
28723
28696
|
};
|
|
28724
28697
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
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(
|
|
28698
|
+
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(React104__default.Fragment, { children: [
|
|
28726
28699
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
28727
28700
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
28728
28701
|
"a",
|
|
@@ -28915,7 +28888,7 @@ var init_debugRegistry = __esm({
|
|
|
28915
28888
|
}
|
|
28916
28889
|
});
|
|
28917
28890
|
function useDebugData() {
|
|
28918
|
-
const [data, setData] =
|
|
28891
|
+
const [data, setData] = React104.useState(() => ({
|
|
28919
28892
|
traits: [],
|
|
28920
28893
|
ticks: [],
|
|
28921
28894
|
guards: [],
|
|
@@ -28929,7 +28902,7 @@ function useDebugData() {
|
|
|
28929
28902
|
},
|
|
28930
28903
|
lastUpdate: Date.now()
|
|
28931
28904
|
}));
|
|
28932
|
-
|
|
28905
|
+
React104.useEffect(() => {
|
|
28933
28906
|
const updateData = () => {
|
|
28934
28907
|
setData({
|
|
28935
28908
|
traits: getAllTraits(),
|
|
@@ -29038,12 +29011,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
29038
29011
|
return positions;
|
|
29039
29012
|
}
|
|
29040
29013
|
function WalkMinimap() {
|
|
29041
|
-
const [walkStep, setWalkStep] =
|
|
29042
|
-
const [traits2, setTraits] =
|
|
29043
|
-
const [coveredEdges, setCoveredEdges] =
|
|
29044
|
-
const [completedTraits, setCompletedTraits] =
|
|
29045
|
-
const prevTraitRef =
|
|
29046
|
-
|
|
29014
|
+
const [walkStep, setWalkStep] = React104.useState(null);
|
|
29015
|
+
const [traits2, setTraits] = React104.useState([]);
|
|
29016
|
+
const [coveredEdges, setCoveredEdges] = React104.useState([]);
|
|
29017
|
+
const [completedTraits, setCompletedTraits] = React104.useState(/* @__PURE__ */ new Set());
|
|
29018
|
+
const prevTraitRef = React104.useRef(null);
|
|
29019
|
+
React104.useEffect(() => {
|
|
29047
29020
|
const interval = setInterval(() => {
|
|
29048
29021
|
const w = window;
|
|
29049
29022
|
const step = w.__orbitalWalkStep;
|
|
@@ -29490,15 +29463,15 @@ var init_EntitiesTab = __esm({
|
|
|
29490
29463
|
}
|
|
29491
29464
|
});
|
|
29492
29465
|
function EventFlowTab({ events: events2 }) {
|
|
29493
|
-
const [filter, setFilter] =
|
|
29494
|
-
const containerRef =
|
|
29495
|
-
const [autoScroll, setAutoScroll] =
|
|
29496
|
-
|
|
29466
|
+
const [filter, setFilter] = React104.useState("all");
|
|
29467
|
+
const containerRef = React104.useRef(null);
|
|
29468
|
+
const [autoScroll, setAutoScroll] = React104.useState(true);
|
|
29469
|
+
React104.useEffect(() => {
|
|
29497
29470
|
if (autoScroll && containerRef.current) {
|
|
29498
29471
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
29499
29472
|
}
|
|
29500
29473
|
}, [events2.length, autoScroll]);
|
|
29501
|
-
const filteredEvents =
|
|
29474
|
+
const filteredEvents = React104.useMemo(() => {
|
|
29502
29475
|
if (filter === "all") return events2;
|
|
29503
29476
|
return events2.filter((e) => e.type === filter);
|
|
29504
29477
|
}, [events2, filter]);
|
|
@@ -29617,7 +29590,7 @@ var init_EventFlowTab = __esm({
|
|
|
29617
29590
|
}
|
|
29618
29591
|
});
|
|
29619
29592
|
function GuardsPanel({ guards }) {
|
|
29620
|
-
const [filter, setFilter] =
|
|
29593
|
+
const [filter, setFilter] = React104.useState("all");
|
|
29621
29594
|
if (guards.length === 0) {
|
|
29622
29595
|
return /* @__PURE__ */ jsx(
|
|
29623
29596
|
EmptyState,
|
|
@@ -29630,7 +29603,7 @@ function GuardsPanel({ guards }) {
|
|
|
29630
29603
|
}
|
|
29631
29604
|
const passedCount = guards.filter((g) => g.result).length;
|
|
29632
29605
|
const failedCount = guards.length - passedCount;
|
|
29633
|
-
const filteredGuards =
|
|
29606
|
+
const filteredGuards = React104.useMemo(() => {
|
|
29634
29607
|
if (filter === "all") return guards;
|
|
29635
29608
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
29636
29609
|
return guards.filter((g) => !g.result);
|
|
@@ -29791,10 +29764,10 @@ function EffectBadge({ effect }) {
|
|
|
29791
29764
|
] });
|
|
29792
29765
|
}
|
|
29793
29766
|
function TransitionTimeline({ transitions }) {
|
|
29794
|
-
const containerRef =
|
|
29795
|
-
const [autoScroll, setAutoScroll] =
|
|
29796
|
-
const [expandedId, setExpandedId] =
|
|
29797
|
-
|
|
29767
|
+
const containerRef = React104.useRef(null);
|
|
29768
|
+
const [autoScroll, setAutoScroll] = React104.useState(true);
|
|
29769
|
+
const [expandedId, setExpandedId] = React104.useState(null);
|
|
29770
|
+
React104.useEffect(() => {
|
|
29798
29771
|
if (autoScroll && containerRef.current) {
|
|
29799
29772
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
29800
29773
|
}
|
|
@@ -30080,9 +30053,9 @@ function getAllEvents(traits2) {
|
|
|
30080
30053
|
}
|
|
30081
30054
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
30082
30055
|
const eventBus = useEventBus();
|
|
30083
|
-
const [log3, setLog] =
|
|
30084
|
-
const prevStatesRef =
|
|
30085
|
-
|
|
30056
|
+
const [log3, setLog] = React104.useState([]);
|
|
30057
|
+
const prevStatesRef = React104.useRef(/* @__PURE__ */ new Map());
|
|
30058
|
+
React104.useEffect(() => {
|
|
30086
30059
|
for (const trait of traits2) {
|
|
30087
30060
|
const prev = prevStatesRef.current.get(trait.id);
|
|
30088
30061
|
if (prev && prev !== trait.currentState) {
|
|
@@ -30252,10 +30225,10 @@ function VerifyModePanel({
|
|
|
30252
30225
|
serverCount,
|
|
30253
30226
|
localCount
|
|
30254
30227
|
}) {
|
|
30255
|
-
const [expanded, setExpanded] =
|
|
30256
|
-
const scrollRef =
|
|
30257
|
-
const prevCountRef =
|
|
30258
|
-
|
|
30228
|
+
const [expanded, setExpanded] = React104.useState(true);
|
|
30229
|
+
const scrollRef = React104.useRef(null);
|
|
30230
|
+
const prevCountRef = React104.useRef(0);
|
|
30231
|
+
React104.useEffect(() => {
|
|
30259
30232
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
30260
30233
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
30261
30234
|
}
|
|
@@ -30321,10 +30294,10 @@ function RuntimeDebugger({
|
|
|
30321
30294
|
defaultTab,
|
|
30322
30295
|
schema
|
|
30323
30296
|
}) {
|
|
30324
|
-
const [isCollapsed, setIsCollapsed] =
|
|
30325
|
-
const [isVisible, setIsVisible] =
|
|
30297
|
+
const [isCollapsed, setIsCollapsed] = React104.useState(mode === "verify" ? true : defaultCollapsed);
|
|
30298
|
+
const [isVisible, setIsVisible] = React104.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
30326
30299
|
const debugData = useDebugData();
|
|
30327
|
-
|
|
30300
|
+
React104.useEffect(() => {
|
|
30328
30301
|
if (mode === "inline") return;
|
|
30329
30302
|
return onDebugToggle((enabled) => {
|
|
30330
30303
|
setIsVisible(enabled);
|
|
@@ -30333,7 +30306,7 @@ function RuntimeDebugger({
|
|
|
30333
30306
|
}
|
|
30334
30307
|
});
|
|
30335
30308
|
}, [mode]);
|
|
30336
|
-
|
|
30309
|
+
React104.useEffect(() => {
|
|
30337
30310
|
if (mode === "inline") return;
|
|
30338
30311
|
const handleKeyDown = (e) => {
|
|
30339
30312
|
if (e.key === "`" && isVisible) {
|
|
@@ -30882,7 +30855,7 @@ function SequenceBar({
|
|
|
30882
30855
|
onSlotRemove(index);
|
|
30883
30856
|
}, [onSlotRemove, playing]);
|
|
30884
30857
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
30885
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
30858
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
|
|
30886
30859
|
i > 0 && /* @__PURE__ */ jsx(
|
|
30887
30860
|
Typography,
|
|
30888
30861
|
{
|
|
@@ -32227,7 +32200,7 @@ var init_StatCard = __esm({
|
|
|
32227
32200
|
const labelToUse = propLabel ?? propTitle;
|
|
32228
32201
|
const eventBus = useEventBus();
|
|
32229
32202
|
const { t } = useTranslate();
|
|
32230
|
-
const handleActionClick =
|
|
32203
|
+
const handleActionClick = React104__default.useCallback(() => {
|
|
32231
32204
|
if (action?.event) {
|
|
32232
32205
|
eventBus.emit(`UI:${action.event}`, {});
|
|
32233
32206
|
}
|
|
@@ -32238,7 +32211,7 @@ var init_StatCard = __esm({
|
|
|
32238
32211
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
32239
32212
|
const isLoading = externalLoading ?? false;
|
|
32240
32213
|
const error = externalError;
|
|
32241
|
-
const computeMetricValue =
|
|
32214
|
+
const computeMetricValue = React104__default.useCallback(
|
|
32242
32215
|
(metric, items) => {
|
|
32243
32216
|
if (metric.value !== void 0) {
|
|
32244
32217
|
return metric.value;
|
|
@@ -32277,7 +32250,7 @@ var init_StatCard = __esm({
|
|
|
32277
32250
|
},
|
|
32278
32251
|
[]
|
|
32279
32252
|
);
|
|
32280
|
-
const schemaStats =
|
|
32253
|
+
const schemaStats = React104__default.useMemo(() => {
|
|
32281
32254
|
if (!metrics || metrics.length === 0) return null;
|
|
32282
32255
|
return metrics.map((metric) => ({
|
|
32283
32256
|
label: metric.label,
|
|
@@ -32285,7 +32258,7 @@ var init_StatCard = __esm({
|
|
|
32285
32258
|
format: metric.format
|
|
32286
32259
|
}));
|
|
32287
32260
|
}, [metrics, data, computeMetricValue]);
|
|
32288
|
-
const calculatedTrend =
|
|
32261
|
+
const calculatedTrend = React104__default.useMemo(() => {
|
|
32289
32262
|
if (manualTrend !== void 0) return manualTrend;
|
|
32290
32263
|
if (previousValue === void 0 || currentValue === void 0)
|
|
32291
32264
|
return void 0;
|
|
@@ -33269,7 +33242,7 @@ var init_Timeline = __esm({
|
|
|
33269
33242
|
}) => {
|
|
33270
33243
|
const { t } = useTranslate();
|
|
33271
33244
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
33272
|
-
const items =
|
|
33245
|
+
const items = React104__default.useMemo(() => {
|
|
33273
33246
|
if (propItems) return propItems;
|
|
33274
33247
|
if (entityData.length === 0) return [];
|
|
33275
33248
|
return entityData.map((record, idx) => {
|
|
@@ -33376,7 +33349,7 @@ var init_Timeline = __esm({
|
|
|
33376
33349
|
}
|
|
33377
33350
|
});
|
|
33378
33351
|
function extractToastProps(children) {
|
|
33379
|
-
if (!
|
|
33352
|
+
if (!React104__default.isValidElement(children)) {
|
|
33380
33353
|
if (typeof children === "string") {
|
|
33381
33354
|
return { message: children };
|
|
33382
33355
|
}
|
|
@@ -33414,7 +33387,7 @@ var init_ToastSlot = __esm({
|
|
|
33414
33387
|
eventBus.emit("UI:CLOSE");
|
|
33415
33388
|
};
|
|
33416
33389
|
if (!isVisible) return null;
|
|
33417
|
-
const isCustomContent =
|
|
33390
|
+
const isCustomContent = React104__default.isValidElement(children) && !message;
|
|
33418
33391
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
33419
33392
|
Toast,
|
|
33420
33393
|
{
|
|
@@ -33683,7 +33656,7 @@ var init_WizardContainer = __esm({
|
|
|
33683
33656
|
const isCompleted = index < currentStep;
|
|
33684
33657
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
33685
33658
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
33686
|
-
return /* @__PURE__ */ jsxs(
|
|
33659
|
+
return /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
|
|
33687
33660
|
/* @__PURE__ */ jsx(
|
|
33688
33661
|
Button,
|
|
33689
33662
|
{
|
|
@@ -34065,12 +34038,12 @@ var init_WorldMapTemplate = __esm({
|
|
|
34065
34038
|
}
|
|
34066
34039
|
});
|
|
34067
34040
|
function lazyThree(name, loader) {
|
|
34068
|
-
const Lazy =
|
|
34041
|
+
const Lazy = React104__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
34069
34042
|
function ThreeWrapper(props) {
|
|
34070
|
-
return
|
|
34071
|
-
|
|
34043
|
+
return React104__default.createElement(
|
|
34044
|
+
React104__default.Suspense,
|
|
34072
34045
|
{ fallback: null },
|
|
34073
|
-
|
|
34046
|
+
React104__default.createElement(Lazy, props)
|
|
34074
34047
|
);
|
|
34075
34048
|
}
|
|
34076
34049
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -34558,7 +34531,7 @@ function SuspenseConfigProvider({
|
|
|
34558
34531
|
config,
|
|
34559
34532
|
children
|
|
34560
34533
|
}) {
|
|
34561
|
-
return
|
|
34534
|
+
return React104__default.createElement(
|
|
34562
34535
|
SuspenseConfigContext.Provider,
|
|
34563
34536
|
{ value: config },
|
|
34564
34537
|
children
|
|
@@ -35041,7 +35014,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
35041
35014
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
35042
35015
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
35043
35016
|
}
|
|
35044
|
-
return /* @__PURE__ */ jsx(
|
|
35017
|
+
return /* @__PURE__ */ jsx(React104__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
35045
35018
|
}
|
|
35046
35019
|
if (!child || typeof child !== "object") return null;
|
|
35047
35020
|
const childId = `${parentId}-${index}`;
|
|
@@ -35078,14 +35051,14 @@ function isPatternConfig(value) {
|
|
|
35078
35051
|
if (value === null || value === void 0) return false;
|
|
35079
35052
|
if (typeof value !== "object") return false;
|
|
35080
35053
|
if (Array.isArray(value)) return false;
|
|
35081
|
-
if (
|
|
35054
|
+
if (React104__default.isValidElement(value)) return false;
|
|
35082
35055
|
if (value instanceof Date) return false;
|
|
35083
35056
|
if (typeof value === "function") return false;
|
|
35084
35057
|
const record = value;
|
|
35085
35058
|
return "type" in record && typeof record.type === "string";
|
|
35086
35059
|
}
|
|
35087
35060
|
function isPlainConfigObject(value) {
|
|
35088
|
-
if (
|
|
35061
|
+
if (React104__default.isValidElement(value)) return false;
|
|
35089
35062
|
if (value instanceof Date) return false;
|
|
35090
35063
|
const proto = Object.getPrototypeOf(value);
|
|
35091
35064
|
return proto === Object.prototype || proto === null;
|
|
@@ -35379,7 +35352,7 @@ init_logger();
|
|
|
35379
35352
|
|
|
35380
35353
|
// runtime/createClientEffectHandlers.ts
|
|
35381
35354
|
function createClientEffectHandlers(options) {
|
|
35382
|
-
const { eventBus, slotSetter, navigate, notify
|
|
35355
|
+
const { eventBus, slotSetter, navigate, notify } = options;
|
|
35383
35356
|
return {
|
|
35384
35357
|
emit: (event, payload) => {
|
|
35385
35358
|
const prefixedEvent = event.startsWith("UI:") ? event : `UI:${event}`;
|
|
@@ -35391,24 +35364,9 @@ function createClientEffectHandlers(options) {
|
|
|
35391
35364
|
set: () => {
|
|
35392
35365
|
console.warn("[ClientEffectHandlers] set is server-side only, ignored on client");
|
|
35393
35366
|
},
|
|
35394
|
-
callService: async (
|
|
35395
|
-
|
|
35396
|
-
|
|
35397
|
-
const paramsEcho = {};
|
|
35398
|
-
if (params) {
|
|
35399
|
-
for (const [k, v] of Object.entries(params)) {
|
|
35400
|
-
if (v !== void 0 && (typeof v === "string" || typeof v === "number" || typeof v === "boolean" || v === null || v instanceof Date)) {
|
|
35401
|
-
paramsEcho[k] = v;
|
|
35402
|
-
}
|
|
35403
|
-
}
|
|
35404
|
-
}
|
|
35405
|
-
return {
|
|
35406
|
-
id: mockId,
|
|
35407
|
-
clientSecret: `secret_${mockId}`,
|
|
35408
|
-
success: true,
|
|
35409
|
-
status: "succeeded",
|
|
35410
|
-
...paramsEcho
|
|
35411
|
-
};
|
|
35367
|
+
callService: async () => {
|
|
35368
|
+
console.warn("[ClientEffectHandlers] callService is server-side only, ignored on client");
|
|
35369
|
+
return {};
|
|
35412
35370
|
},
|
|
35413
35371
|
renderUI: (slot, pattern, props) => {
|
|
35414
35372
|
if (pattern === null) {
|
|
@@ -35454,7 +35412,7 @@ function resolveLambdaBindings(body, argName, arg) {
|
|
|
35454
35412
|
if (Array.isArray(body)) {
|
|
35455
35413
|
return body.map((b) => resolveLambdaBindings(b, argName, arg));
|
|
35456
35414
|
}
|
|
35457
|
-
if (body !== null && typeof body === "object" && !
|
|
35415
|
+
if (body !== null && typeof body === "object" && !React104__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
35458
35416
|
const out = {};
|
|
35459
35417
|
for (const [k, v] of Object.entries(body)) {
|
|
35460
35418
|
out[k] = resolveLambdaBindings(v, argName, arg);
|
|
@@ -35473,7 +35431,7 @@ function getSlotContentRenderer2() {
|
|
|
35473
35431
|
function makeLambdaFn(argName, lambdaBody, callerKey) {
|
|
35474
35432
|
return (item, index) => {
|
|
35475
35433
|
const resolvedBody = resolveLambdaBindings(lambdaBody, argName, item);
|
|
35476
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
35434
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React104__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
35477
35435
|
return null;
|
|
35478
35436
|
}
|
|
35479
35437
|
const record = resolvedBody;
|
|
@@ -35491,7 +35449,7 @@ function makeLambdaFn(argName, lambdaBody, callerKey) {
|
|
|
35491
35449
|
props: childProps,
|
|
35492
35450
|
priority: 0
|
|
35493
35451
|
};
|
|
35494
|
-
return
|
|
35452
|
+
return React104__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
35495
35453
|
};
|
|
35496
35454
|
}
|
|
35497
35455
|
function convertNode(node, callerKey) {
|
|
@@ -35510,7 +35468,7 @@ function convertNode(node, callerKey) {
|
|
|
35510
35468
|
});
|
|
35511
35469
|
return anyChanged ? mapped : node;
|
|
35512
35470
|
}
|
|
35513
|
-
if (typeof node === "object" && !
|
|
35471
|
+
if (typeof node === "object" && !React104__default.isValidElement(node) && !(node instanceof Date)) {
|
|
35514
35472
|
return convertObjectProps(node);
|
|
35515
35473
|
}
|
|
35516
35474
|
return node;
|
|
@@ -35902,8 +35860,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
35902
35860
|
}
|
|
35903
35861
|
},
|
|
35904
35862
|
navigate: optionsRef.current?.navigate,
|
|
35905
|
-
notify: optionsRef.current?.notify
|
|
35906
|
-
callService: optionsRef.current?.callService
|
|
35863
|
+
notify: optionsRef.current?.notify
|
|
35907
35864
|
});
|
|
35908
35865
|
const persistence = optionsRef.current?.persistence;
|
|
35909
35866
|
let handlers = clientHandlers;
|