@almadar/ui 5.137.0 → 5.139.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 +1321 -1236
- package/dist/avl/index.js +357 -272
- package/dist/components/index.cjs +1300 -1215
- package/dist/components/index.d.cts +9 -2
- package/dist/components/index.d.ts +9 -2
- package/dist/components/index.js +342 -257
- package/dist/lib/drawable/three/index.cjs +6 -0
- package/dist/lib/drawable/three/index.js +6 -0
- package/dist/providers/index.cjs +1204 -1119
- package/dist/providers/index.js +332 -247
- package/dist/runtime/index.cjs +1182 -1097
- package/dist/runtime/index.js +337 -252
- package/package.json +4 -4
package/dist/runtime/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React84 from 'react';
|
|
2
|
+
import React84__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useSyncExternalStore, useLayoutEffect, lazy, useId } from 'react';
|
|
3
3
|
import { EventBusContext, useTraitScopeChain, useEntitySchemaOptional, useEntityBindingSnapshot, useTraitScope, useEntitySchema, getAllPages, matchPathAmong, OrbitalProvider, TraitScopeProvider, ServerBridgeProvider, useCurrentPagePath, useGameAudioContextOptional, VerificationProvider, EntitySchemaProvider, OrbitalThemeProvider, useServerBridge, EntityBindingContext } from '@almadar/ui/providers';
|
|
4
4
|
export { EntitySchemaProvider, ServerBridgeProvider, TraitContext, TraitProvider, useEntitySchema, useEntitySchemaOptional, useServerBridge, useTrait, useTraitContext } from '@almadar/ui/providers';
|
|
5
5
|
import { createLogger, setNamespaceLevel, isLogLevelEnabled } from '@almadar/logger';
|
|
@@ -825,7 +825,7 @@ function resolveMarkerExpression(expression, entity, config, state) {
|
|
|
825
825
|
function isPlainObject(value) {
|
|
826
826
|
if (value === null || value === void 0 || typeof value !== "object") return false;
|
|
827
827
|
if (Array.isArray(value)) return false;
|
|
828
|
-
if (
|
|
828
|
+
if (React84__default.isValidElement(value)) return false;
|
|
829
829
|
if (value instanceof Date) return false;
|
|
830
830
|
if (typeof value === "function") return false;
|
|
831
831
|
return true;
|
|
@@ -998,7 +998,7 @@ var init_Box = __esm({
|
|
|
998
998
|
fixed: "fixed",
|
|
999
999
|
sticky: "sticky"
|
|
1000
1000
|
};
|
|
1001
|
-
Box =
|
|
1001
|
+
Box = React84__default.forwardRef(
|
|
1002
1002
|
({
|
|
1003
1003
|
padding,
|
|
1004
1004
|
paddingX,
|
|
@@ -1063,7 +1063,7 @@ var init_Box = __esm({
|
|
|
1063
1063
|
onPointerDown?.(e);
|
|
1064
1064
|
}, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
|
|
1065
1065
|
const isClickable = action || onClick;
|
|
1066
|
-
return
|
|
1066
|
+
return React84__default.createElement(
|
|
1067
1067
|
Component,
|
|
1068
1068
|
{
|
|
1069
1069
|
ref,
|
|
@@ -1280,7 +1280,7 @@ var init_Icon = __esm({
|
|
|
1280
1280
|
const effectiveName = typeof icon === "string" && icon !== "" ? icon : name;
|
|
1281
1281
|
const effectiveStrokeWidth = strokeWidth != null && strokeWidth > 0 ? strokeWidth : void 0;
|
|
1282
1282
|
const family = useIconFamily();
|
|
1283
|
-
const RenderedComponent =
|
|
1283
|
+
const RenderedComponent = React84__default.useMemo(() => {
|
|
1284
1284
|
if (directIcon) return null;
|
|
1285
1285
|
return effectiveName ? resolveIconForFamily(effectiveName) : null;
|
|
1286
1286
|
}, [directIcon, effectiveName, family]);
|
|
@@ -1404,7 +1404,7 @@ var init_atlasSlice = __esm({
|
|
|
1404
1404
|
}
|
|
1405
1405
|
});
|
|
1406
1406
|
function useAtlasSliceDataUrl(asset) {
|
|
1407
|
-
const [, bump] =
|
|
1407
|
+
const [, bump] = React84.useReducer((x) => x + 1, 0);
|
|
1408
1408
|
if (!isAtlasAsset(asset)) return void 0;
|
|
1409
1409
|
const key = `${asset.atlas}#${asset.sprite}`;
|
|
1410
1410
|
const cached = sliceDataUrlCache.get(key);
|
|
@@ -1467,13 +1467,13 @@ function AtlasImage({
|
|
|
1467
1467
|
style,
|
|
1468
1468
|
"aria-hidden": ariaHidden
|
|
1469
1469
|
}) {
|
|
1470
|
-
const [, bump] =
|
|
1471
|
-
const canvasRef =
|
|
1470
|
+
const [, bump] = React84.useReducer((x) => x + 1, 0);
|
|
1471
|
+
const canvasRef = React84.useRef(null);
|
|
1472
1472
|
const sliced = isAtlasAsset(asset);
|
|
1473
1473
|
const atlas = sliced ? getAtlas(asset.atlas, bump) : void 0;
|
|
1474
1474
|
const img = sliced && asset?.url ? getSheetImage(asset.url, bump) : null;
|
|
1475
1475
|
const rect = sliced && atlas ? subRectFor(atlas, asset.sprite) : null;
|
|
1476
|
-
|
|
1476
|
+
React84.useEffect(() => {
|
|
1477
1477
|
const canvas = canvasRef.current;
|
|
1478
1478
|
if (!canvas || !img || !rect) return;
|
|
1479
1479
|
canvas.width = rect.sw;
|
|
@@ -1549,7 +1549,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
1549
1549
|
const IconComp = value;
|
|
1550
1550
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
1551
1551
|
}
|
|
1552
|
-
if (
|
|
1552
|
+
if (React84__default.isValidElement(value)) {
|
|
1553
1553
|
return value;
|
|
1554
1554
|
}
|
|
1555
1555
|
if (typeof value === "object" && value !== null && isIconLike(value)) {
|
|
@@ -1626,7 +1626,7 @@ var init_Button = __esm({
|
|
|
1626
1626
|
md: "h-icon-default w-icon-default",
|
|
1627
1627
|
lg: "h-icon-default w-icon-default"
|
|
1628
1628
|
};
|
|
1629
|
-
Button =
|
|
1629
|
+
Button = React84__default.forwardRef(
|
|
1630
1630
|
({
|
|
1631
1631
|
className,
|
|
1632
1632
|
variant = "primary",
|
|
@@ -1696,7 +1696,7 @@ var Dialog;
|
|
|
1696
1696
|
var init_Dialog = __esm({
|
|
1697
1697
|
"components/core/atoms/Dialog.tsx"() {
|
|
1698
1698
|
init_cn();
|
|
1699
|
-
Dialog =
|
|
1699
|
+
Dialog = React84__default.forwardRef(
|
|
1700
1700
|
({
|
|
1701
1701
|
role = "dialog",
|
|
1702
1702
|
"aria-modal": ariaModal = true,
|
|
@@ -1907,7 +1907,7 @@ var init_Typography = __esm({
|
|
|
1907
1907
|
if (format !== void 0 && format !== "none" && (typeof body === "string" || typeof body === "number" || body instanceof Date)) {
|
|
1908
1908
|
body = formatValue(body, format);
|
|
1909
1909
|
}
|
|
1910
|
-
return
|
|
1910
|
+
return React84__default.createElement(
|
|
1911
1911
|
Component,
|
|
1912
1912
|
{
|
|
1913
1913
|
id,
|
|
@@ -2470,7 +2470,7 @@ var init_Badge = __esm({
|
|
|
2470
2470
|
md: "px-2.5 py-1 text-sm",
|
|
2471
2471
|
lg: "px-3 py-1.5 text-base"
|
|
2472
2472
|
};
|
|
2473
|
-
Badge =
|
|
2473
|
+
Badge = React84__default.forwardRef(
|
|
2474
2474
|
({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, ...props }, ref) => {
|
|
2475
2475
|
const iconSizes3 = {
|
|
2476
2476
|
sm: "h-icon-default w-icon-default",
|
|
@@ -2820,7 +2820,7 @@ var init_SvgFlow = __esm({
|
|
|
2820
2820
|
width = 100,
|
|
2821
2821
|
height = 100
|
|
2822
2822
|
}) => {
|
|
2823
|
-
const markerId =
|
|
2823
|
+
const markerId = React84__default.useMemo(() => {
|
|
2824
2824
|
flowIdCounter += 1;
|
|
2825
2825
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
2826
2826
|
}, []);
|
|
@@ -3413,7 +3413,7 @@ var init_SvgRing = __esm({
|
|
|
3413
3413
|
width = 100,
|
|
3414
3414
|
height = 100
|
|
3415
3415
|
}) => {
|
|
3416
|
-
const gradientId =
|
|
3416
|
+
const gradientId = React84__default.useMemo(() => {
|
|
3417
3417
|
ringIdCounter += 1;
|
|
3418
3418
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
3419
3419
|
}, []);
|
|
@@ -3594,7 +3594,7 @@ var init_Input = __esm({
|
|
|
3594
3594
|
init_cn();
|
|
3595
3595
|
init_Icon();
|
|
3596
3596
|
init_useEventBus();
|
|
3597
|
-
Input =
|
|
3597
|
+
Input = React84__default.forwardRef(
|
|
3598
3598
|
({
|
|
3599
3599
|
className,
|
|
3600
3600
|
inputType,
|
|
@@ -3618,9 +3618,9 @@ var init_Input = __esm({
|
|
|
3618
3618
|
const eventBus = useEventBus();
|
|
3619
3619
|
const type = inputType || htmlType || "text";
|
|
3620
3620
|
const isDeclarative = typeof onChange === "string";
|
|
3621
|
-
const [localValue, setLocalValue] =
|
|
3622
|
-
const pendingEchoRef =
|
|
3623
|
-
|
|
3621
|
+
const [localValue, setLocalValue] = React84__default.useState(value);
|
|
3622
|
+
const pendingEchoRef = React84__default.useRef(/* @__PURE__ */ new Set());
|
|
3623
|
+
React84__default.useEffect(() => {
|
|
3624
3624
|
if (!isDeclarative) return;
|
|
3625
3625
|
const incoming = value == null ? "" : String(value);
|
|
3626
3626
|
if (pendingEchoRef.current.has(incoming)) {
|
|
@@ -3780,7 +3780,7 @@ var Label;
|
|
|
3780
3780
|
var init_Label = __esm({
|
|
3781
3781
|
"components/core/atoms/Label.tsx"() {
|
|
3782
3782
|
init_cn();
|
|
3783
|
-
Label =
|
|
3783
|
+
Label = React84__default.forwardRef(
|
|
3784
3784
|
({ className, required, children, ...props }, ref) => {
|
|
3785
3785
|
return /* @__PURE__ */ jsxs(
|
|
3786
3786
|
"label",
|
|
@@ -3807,7 +3807,7 @@ var init_Textarea = __esm({
|
|
|
3807
3807
|
"components/core/atoms/Textarea.tsx"() {
|
|
3808
3808
|
init_cn();
|
|
3809
3809
|
init_useEventBus();
|
|
3810
|
-
Textarea =
|
|
3810
|
+
Textarea = React84__default.forwardRef(
|
|
3811
3811
|
({ className, error, onChange, ...props }, ref) => {
|
|
3812
3812
|
const eventBus = useEventBus();
|
|
3813
3813
|
const handleChange = (e) => {
|
|
@@ -4046,7 +4046,7 @@ var init_Select = __esm({
|
|
|
4046
4046
|
init_cn();
|
|
4047
4047
|
init_Icon();
|
|
4048
4048
|
init_useEventBus();
|
|
4049
|
-
Select =
|
|
4049
|
+
Select = React84__default.forwardRef(
|
|
4050
4050
|
(props, _ref) => {
|
|
4051
4051
|
const { multiple, searchable, clearable } = props;
|
|
4052
4052
|
if (multiple || searchable || clearable) {
|
|
@@ -4063,7 +4063,7 @@ var init_Checkbox = __esm({
|
|
|
4063
4063
|
"components/core/atoms/Checkbox.tsx"() {
|
|
4064
4064
|
init_cn();
|
|
4065
4065
|
init_useEventBus();
|
|
4066
|
-
Checkbox =
|
|
4066
|
+
Checkbox = React84__default.forwardRef(
|
|
4067
4067
|
({ className, label, id, onChange, ...props }, ref) => {
|
|
4068
4068
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
4069
4069
|
const eventBus = useEventBus();
|
|
@@ -4117,7 +4117,7 @@ var init_Spinner = __esm({
|
|
|
4117
4117
|
md: "h-6 w-6",
|
|
4118
4118
|
lg: "h-8 w-8"
|
|
4119
4119
|
};
|
|
4120
|
-
Spinner =
|
|
4120
|
+
Spinner = React84__default.forwardRef(
|
|
4121
4121
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
4122
4122
|
if (overlay) {
|
|
4123
4123
|
return /* @__PURE__ */ jsx(
|
|
@@ -4207,7 +4207,7 @@ var init_Card = __esm({
|
|
|
4207
4207
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
4208
4208
|
"tile-image-first": "p-0 overflow-hidden"
|
|
4209
4209
|
};
|
|
4210
|
-
Card =
|
|
4210
|
+
Card = React84__default.forwardRef(
|
|
4211
4211
|
({
|
|
4212
4212
|
className,
|
|
4213
4213
|
variant = "bordered",
|
|
@@ -4256,9 +4256,9 @@ var init_Card = __esm({
|
|
|
4256
4256
|
}
|
|
4257
4257
|
);
|
|
4258
4258
|
Card.displayName = "Card";
|
|
4259
|
-
CardHeader =
|
|
4259
|
+
CardHeader = React84__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
4260
4260
|
CardHeader.displayName = "CardHeader";
|
|
4261
|
-
CardTitle =
|
|
4261
|
+
CardTitle = React84__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4262
4262
|
"h3",
|
|
4263
4263
|
{
|
|
4264
4264
|
ref,
|
|
@@ -4271,11 +4271,11 @@ var init_Card = __esm({
|
|
|
4271
4271
|
}
|
|
4272
4272
|
));
|
|
4273
4273
|
CardTitle.displayName = "CardTitle";
|
|
4274
|
-
CardContent =
|
|
4274
|
+
CardContent = React84__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
4275
4275
|
CardContent.displayName = "CardContent";
|
|
4276
4276
|
CardBody = CardContent;
|
|
4277
4277
|
CardBody.displayName = "CardBody";
|
|
4278
|
-
CardFooter =
|
|
4278
|
+
CardFooter = React84__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4279
4279
|
"div",
|
|
4280
4280
|
{
|
|
4281
4281
|
ref,
|
|
@@ -4362,7 +4362,7 @@ var init_FilterPill = __esm({
|
|
|
4362
4362
|
md: "w-3.5 h-3.5",
|
|
4363
4363
|
lg: "w-4 h-4"
|
|
4364
4364
|
};
|
|
4365
|
-
FilterPill =
|
|
4365
|
+
FilterPill = React84__default.forwardRef(
|
|
4366
4366
|
({
|
|
4367
4367
|
className,
|
|
4368
4368
|
variant = "default",
|
|
@@ -4491,8 +4491,8 @@ var init_Avatar = __esm({
|
|
|
4491
4491
|
actionPayload
|
|
4492
4492
|
}) => {
|
|
4493
4493
|
const eventBus = useEventBus();
|
|
4494
|
-
const [imgFailed, setImgFailed] =
|
|
4495
|
-
|
|
4494
|
+
const [imgFailed, setImgFailed] = React84__default.useState(false);
|
|
4495
|
+
React84__default.useEffect(() => {
|
|
4496
4496
|
setImgFailed(false);
|
|
4497
4497
|
}, [src]);
|
|
4498
4498
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -4605,7 +4605,7 @@ var init_Center = __esm({
|
|
|
4605
4605
|
as: Component = "div"
|
|
4606
4606
|
}) => {
|
|
4607
4607
|
const mergedStyle = minHeight ? { minHeight, ...style } : style;
|
|
4608
|
-
return
|
|
4608
|
+
return React84__default.createElement(Component, {
|
|
4609
4609
|
className: cn(
|
|
4610
4610
|
inline ? "inline-flex" : "flex",
|
|
4611
4611
|
horizontal && "justify-center",
|
|
@@ -4873,7 +4873,7 @@ var init_Radio = __esm({
|
|
|
4873
4873
|
md: "w-2.5 h-2.5",
|
|
4874
4874
|
lg: "w-3 h-3"
|
|
4875
4875
|
};
|
|
4876
|
-
Radio =
|
|
4876
|
+
Radio = React84__default.forwardRef(
|
|
4877
4877
|
({
|
|
4878
4878
|
label,
|
|
4879
4879
|
helperText,
|
|
@@ -4890,12 +4890,12 @@ var init_Radio = __esm({
|
|
|
4890
4890
|
onChange,
|
|
4891
4891
|
...props
|
|
4892
4892
|
}, ref) => {
|
|
4893
|
-
const reactId =
|
|
4893
|
+
const reactId = React84__default.useId();
|
|
4894
4894
|
const baseId = id || `radio-${reactId}`;
|
|
4895
4895
|
const hasError = !!error;
|
|
4896
4896
|
const eventBus = useEventBus();
|
|
4897
|
-
const [selected, setSelected] =
|
|
4898
|
-
|
|
4897
|
+
const [selected, setSelected] = React84__default.useState(value);
|
|
4898
|
+
React84__default.useEffect(() => {
|
|
4899
4899
|
if (value !== void 0) setSelected(value);
|
|
4900
4900
|
}, [value]);
|
|
4901
4901
|
const pick = (next, e) => {
|
|
@@ -5077,7 +5077,7 @@ var init_Switch = __esm({
|
|
|
5077
5077
|
"components/core/atoms/Switch.tsx"() {
|
|
5078
5078
|
"use client";
|
|
5079
5079
|
init_cn();
|
|
5080
|
-
Switch =
|
|
5080
|
+
Switch = React84.forwardRef(
|
|
5081
5081
|
({
|
|
5082
5082
|
checked,
|
|
5083
5083
|
defaultChecked = false,
|
|
@@ -5088,10 +5088,10 @@ var init_Switch = __esm({
|
|
|
5088
5088
|
name,
|
|
5089
5089
|
className
|
|
5090
5090
|
}, ref) => {
|
|
5091
|
-
const [isChecked, setIsChecked] =
|
|
5091
|
+
const [isChecked, setIsChecked] = React84.useState(
|
|
5092
5092
|
checked !== void 0 ? checked : defaultChecked
|
|
5093
5093
|
);
|
|
5094
|
-
|
|
5094
|
+
React84.useEffect(() => {
|
|
5095
5095
|
if (checked !== void 0) {
|
|
5096
5096
|
setIsChecked(checked);
|
|
5097
5097
|
}
|
|
@@ -5254,7 +5254,7 @@ var init_Stack = __esm({
|
|
|
5254
5254
|
};
|
|
5255
5255
|
const isHorizontal = direction === "horizontal";
|
|
5256
5256
|
const directionClass = responsive && isHorizontal ? reverse ? "flex-col-reverse md:flex-row-reverse" : "flex-col md:flex-row" : isHorizontal ? reverse ? "flex-row-reverse" : "flex-row" : reverse ? "flex-col-reverse" : "flex-col";
|
|
5257
|
-
return
|
|
5257
|
+
return React84__default.createElement(
|
|
5258
5258
|
Component,
|
|
5259
5259
|
{
|
|
5260
5260
|
className: cn(
|
|
@@ -5454,7 +5454,7 @@ var Aside;
|
|
|
5454
5454
|
var init_Aside = __esm({
|
|
5455
5455
|
"components/core/atoms/Aside.tsx"() {
|
|
5456
5456
|
init_cn();
|
|
5457
|
-
Aside =
|
|
5457
|
+
Aside = React84__default.forwardRef(
|
|
5458
5458
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
5459
5459
|
);
|
|
5460
5460
|
Aside.displayName = "Aside";
|
|
@@ -5533,9 +5533,9 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5533
5533
|
className
|
|
5534
5534
|
}) => {
|
|
5535
5535
|
const { t } = useTranslate();
|
|
5536
|
-
const [isVisible, setIsVisible] =
|
|
5537
|
-
const timeoutRef =
|
|
5538
|
-
const triggerRef =
|
|
5536
|
+
const [isVisible, setIsVisible] = React84__default.useState(false);
|
|
5537
|
+
const timeoutRef = React84__default.useRef(null);
|
|
5538
|
+
const triggerRef = React84__default.useRef(null);
|
|
5539
5539
|
const handleMouseEnter = () => {
|
|
5540
5540
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5541
5541
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -5546,7 +5546,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5546
5546
|
};
|
|
5547
5547
|
const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
|
|
5548
5548
|
const open = isVisible || revealed;
|
|
5549
|
-
|
|
5549
|
+
React84__default.useEffect(() => {
|
|
5550
5550
|
return () => {
|
|
5551
5551
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5552
5552
|
};
|
|
@@ -5756,7 +5756,7 @@ var init_StatusDot = __esm({
|
|
|
5756
5756
|
md: "w-2.5 h-2.5",
|
|
5757
5757
|
lg: "w-3 h-3"
|
|
5758
5758
|
};
|
|
5759
|
-
StatusDot =
|
|
5759
|
+
StatusDot = React84__default.forwardRef(
|
|
5760
5760
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
5761
5761
|
return /* @__PURE__ */ jsx(
|
|
5762
5762
|
"span",
|
|
@@ -5810,7 +5810,7 @@ var init_TrendIndicator = __esm({
|
|
|
5810
5810
|
down: "trending-down",
|
|
5811
5811
|
flat: "arrow-right"
|
|
5812
5812
|
};
|
|
5813
|
-
TrendIndicator =
|
|
5813
|
+
TrendIndicator = React84__default.forwardRef(
|
|
5814
5814
|
({
|
|
5815
5815
|
className,
|
|
5816
5816
|
value,
|
|
@@ -5879,7 +5879,7 @@ var init_RangeSlider = __esm({
|
|
|
5879
5879
|
md: "w-4 h-4",
|
|
5880
5880
|
lg: "w-5 h-5"
|
|
5881
5881
|
};
|
|
5882
|
-
RangeSlider =
|
|
5882
|
+
RangeSlider = React84__default.forwardRef(
|
|
5883
5883
|
({
|
|
5884
5884
|
className,
|
|
5885
5885
|
min = 0,
|
|
@@ -6455,7 +6455,7 @@ var init_ContentSection = __esm({
|
|
|
6455
6455
|
md: "py-16",
|
|
6456
6456
|
lg: "py-24"
|
|
6457
6457
|
};
|
|
6458
|
-
ContentSection =
|
|
6458
|
+
ContentSection = React84__default.forwardRef(
|
|
6459
6459
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
6460
6460
|
return /* @__PURE__ */ jsx(
|
|
6461
6461
|
Box,
|
|
@@ -6989,7 +6989,7 @@ var init_AnimatedReveal = __esm({
|
|
|
6989
6989
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
6990
6990
|
"none": {}
|
|
6991
6991
|
};
|
|
6992
|
-
AnimatedReveal =
|
|
6992
|
+
AnimatedReveal = React84__default.forwardRef(
|
|
6993
6993
|
({
|
|
6994
6994
|
trigger = "scroll",
|
|
6995
6995
|
animation = "fade-up",
|
|
@@ -7149,7 +7149,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
7149
7149
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
7150
7150
|
"use client";
|
|
7151
7151
|
init_cn();
|
|
7152
|
-
AnimatedGraphic =
|
|
7152
|
+
AnimatedGraphic = React84__default.forwardRef(
|
|
7153
7153
|
({
|
|
7154
7154
|
src,
|
|
7155
7155
|
svgContent,
|
|
@@ -7172,7 +7172,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
7172
7172
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
7173
7173
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
7174
7174
|
const prevAnimateRef = useRef(animate);
|
|
7175
|
-
const setRef =
|
|
7175
|
+
const setRef = React84__default.useCallback(
|
|
7176
7176
|
(node) => {
|
|
7177
7177
|
containerRef.current = node;
|
|
7178
7178
|
if (typeof ref === "function") ref(node);
|
|
@@ -7899,9 +7899,9 @@ function ControlButton({
|
|
|
7899
7899
|
className
|
|
7900
7900
|
}) {
|
|
7901
7901
|
const eventBus = useEventBus();
|
|
7902
|
-
const [isPressed, setIsPressed] =
|
|
7902
|
+
const [isPressed, setIsPressed] = React84.useState(false);
|
|
7903
7903
|
const actualPressed = pressed ?? isPressed;
|
|
7904
|
-
const handlePointerDown =
|
|
7904
|
+
const handlePointerDown = React84.useCallback(
|
|
7905
7905
|
(e) => {
|
|
7906
7906
|
e.preventDefault();
|
|
7907
7907
|
if (disabled) return;
|
|
@@ -7911,7 +7911,7 @@ function ControlButton({
|
|
|
7911
7911
|
},
|
|
7912
7912
|
[disabled, pressEvent, eventBus, onPress]
|
|
7913
7913
|
);
|
|
7914
|
-
const handlePointerUp =
|
|
7914
|
+
const handlePointerUp = React84.useCallback(
|
|
7915
7915
|
(e) => {
|
|
7916
7916
|
e.preventDefault();
|
|
7917
7917
|
if (disabled) return;
|
|
@@ -7921,7 +7921,7 @@ function ControlButton({
|
|
|
7921
7921
|
},
|
|
7922
7922
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
7923
7923
|
);
|
|
7924
|
-
const handlePointerLeave =
|
|
7924
|
+
const handlePointerLeave = React84.useCallback(
|
|
7925
7925
|
(e) => {
|
|
7926
7926
|
if (isPressed) {
|
|
7927
7927
|
setIsPressed(false);
|
|
@@ -8179,8 +8179,8 @@ function ControlGrid({
|
|
|
8179
8179
|
className
|
|
8180
8180
|
}) {
|
|
8181
8181
|
const eventBus = useEventBus();
|
|
8182
|
-
const [active, setActive] =
|
|
8183
|
-
const handlePress =
|
|
8182
|
+
const [active, setActive] = React84.useState(/* @__PURE__ */ new Set());
|
|
8183
|
+
const handlePress = React84.useCallback(
|
|
8184
8184
|
(id) => {
|
|
8185
8185
|
setActive((prev) => new Set(prev).add(id));
|
|
8186
8186
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -8194,7 +8194,7 @@ function ControlGrid({
|
|
|
8194
8194
|
},
|
|
8195
8195
|
[kind, actionEvent, directionEvent, directionEvents, eventBus, onAction, onDirection]
|
|
8196
8196
|
);
|
|
8197
|
-
const handleRelease =
|
|
8197
|
+
const handleRelease = React84.useCallback(
|
|
8198
8198
|
(id) => {
|
|
8199
8199
|
setActive((prev) => {
|
|
8200
8200
|
const next = new Set(prev);
|
|
@@ -8552,7 +8552,7 @@ function GameMenu({
|
|
|
8552
8552
|
}) {
|
|
8553
8553
|
const resolvedOptions = (options?.length ? options : void 0) ?? (menuItems?.length ? menuItems : void 0) ?? DEFAULT_MENU_OPTIONS;
|
|
8554
8554
|
const eventBus = useEventBus();
|
|
8555
|
-
const handleOptionClick =
|
|
8555
|
+
const handleOptionClick = React84.useCallback(
|
|
8556
8556
|
(option) => {
|
|
8557
8557
|
if (option.event) {
|
|
8558
8558
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -8788,7 +8788,7 @@ function StateGraph({
|
|
|
8788
8788
|
}) {
|
|
8789
8789
|
const eventBus = useEventBus();
|
|
8790
8790
|
const nodes = states ?? [];
|
|
8791
|
-
const positions =
|
|
8791
|
+
const positions = React84.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
|
|
8792
8792
|
return /* @__PURE__ */ jsxs(
|
|
8793
8793
|
Box,
|
|
8794
8794
|
{
|
|
@@ -8859,8 +8859,8 @@ function MiniMap({
|
|
|
8859
8859
|
tileAssets,
|
|
8860
8860
|
unitAssets
|
|
8861
8861
|
}) {
|
|
8862
|
-
const canvasRef =
|
|
8863
|
-
const imgCacheRef =
|
|
8862
|
+
const canvasRef = React84.useRef(null);
|
|
8863
|
+
const imgCacheRef = React84.useRef(/* @__PURE__ */ new Map());
|
|
8864
8864
|
function loadImg(url) {
|
|
8865
8865
|
const cached = imgCacheRef.current.get(url);
|
|
8866
8866
|
if (cached) return cached.complete ? cached : null;
|
|
@@ -8876,7 +8876,7 @@ function MiniMap({
|
|
|
8876
8876
|
imgCacheRef.current.set(url, img);
|
|
8877
8877
|
return null;
|
|
8878
8878
|
}
|
|
8879
|
-
|
|
8879
|
+
React84.useEffect(() => {
|
|
8880
8880
|
const canvas = canvasRef.current;
|
|
8881
8881
|
if (!canvas) return;
|
|
8882
8882
|
const ctx = canvas.getContext("2d");
|
|
@@ -9116,19 +9116,12 @@ var init_useCamera = __esm({
|
|
|
9116
9116
|
});
|
|
9117
9117
|
|
|
9118
9118
|
// lib/imageCache.ts
|
|
9119
|
-
function
|
|
9120
|
-
if (!url || typeof window === "undefined") return null;
|
|
9121
|
-
const existing = cache.get(url);
|
|
9122
|
-
if (existing) {
|
|
9123
|
-
if (existing.status === "loaded") return existing.img;
|
|
9124
|
-
if (existing.status === "pending" && onReady) existing.onReady = onReady;
|
|
9125
|
-
return null;
|
|
9126
|
-
}
|
|
9119
|
+
function startLoad(url, onReady, existing) {
|
|
9127
9120
|
const img = new Image();
|
|
9128
9121
|
img.crossOrigin = "anonymous";
|
|
9129
|
-
const entry = { img, status: "pending"
|
|
9130
|
-
|
|
9131
|
-
|
|
9122
|
+
const entry = existing ?? { img, status: "pending" };
|
|
9123
|
+
entry.img = img;
|
|
9124
|
+
if (onReady) entry.onReady = onReady;
|
|
9132
9125
|
img.onload = () => {
|
|
9133
9126
|
entry.status = "loaded";
|
|
9134
9127
|
updateAssetStatus(url, "loaded");
|
|
@@ -9136,20 +9129,39 @@ function getOrLoadImage(url, onReady) {
|
|
|
9136
9129
|
};
|
|
9137
9130
|
img.onerror = () => {
|
|
9138
9131
|
entry.status = "failed";
|
|
9132
|
+
entry.failedAt = Date.now();
|
|
9139
9133
|
updateAssetStatus(url, "failed");
|
|
9140
9134
|
entry.onReady?.();
|
|
9141
9135
|
};
|
|
9142
9136
|
img.src = url;
|
|
9137
|
+
return entry;
|
|
9138
|
+
}
|
|
9139
|
+
function getOrLoadImage(url, onReady) {
|
|
9140
|
+
if (!url || typeof window === "undefined") return null;
|
|
9141
|
+
const existing = cache.get(url);
|
|
9142
|
+
if (existing) {
|
|
9143
|
+
if (existing.status === "loaded") return existing.img;
|
|
9144
|
+
if (existing.status === "pending" && onReady) existing.onReady = onReady;
|
|
9145
|
+
if (existing.status === "failed" && Date.now() - (existing.failedAt ?? 0) >= RETRY_AFTER_MS) {
|
|
9146
|
+
existing.failedAt = Date.now();
|
|
9147
|
+
startLoad(url, onReady, existing);
|
|
9148
|
+
}
|
|
9149
|
+
return null;
|
|
9150
|
+
}
|
|
9151
|
+
const entry = startLoad(url, onReady);
|
|
9152
|
+
cache.set(url, entry);
|
|
9153
|
+
updateAssetStatus(url, "pending");
|
|
9143
9154
|
return null;
|
|
9144
9155
|
}
|
|
9145
9156
|
function getImageStatus(url) {
|
|
9146
9157
|
return cache.get(url)?.status;
|
|
9147
9158
|
}
|
|
9148
|
-
var cache;
|
|
9159
|
+
var RETRY_AFTER_MS, cache;
|
|
9149
9160
|
var init_imageCache = __esm({
|
|
9150
9161
|
"lib/imageCache.ts"() {
|
|
9151
9162
|
"use client";
|
|
9152
9163
|
init_verificationRegistry();
|
|
9164
|
+
RETRY_AFTER_MS = 5e3;
|
|
9153
9165
|
cache = /* @__PURE__ */ new Map();
|
|
9154
9166
|
}
|
|
9155
9167
|
});
|
|
@@ -9332,6 +9344,21 @@ var init_projector = __esm({
|
|
|
9332
9344
|
function isValidScenePos(pos) {
|
|
9333
9345
|
return Number.isFinite(pos?.x) && Number.isFinite(pos?.y);
|
|
9334
9346
|
}
|
|
9347
|
+
function spriteRect(projector, node, natural) {
|
|
9348
|
+
const tw = projector.tileWidth;
|
|
9349
|
+
const fallbackW = projector.worldPixelDirect ? natural?.w ?? 0 : tw;
|
|
9350
|
+
const fallbackH = projector.worldPixelDirect ? natural?.h ?? 0 : tw;
|
|
9351
|
+
const w = node.width !== void 0 ? node.width * tw : fallbackW;
|
|
9352
|
+
const h = node.height !== void 0 ? node.height * tw : fallbackH;
|
|
9353
|
+
const anchor = node.anchor ?? "top-left";
|
|
9354
|
+
const p = projector.anchorPoint(node.position, anchor);
|
|
9355
|
+
return {
|
|
9356
|
+
x: anchor === "top-left" ? p.x : p.x - w / 2,
|
|
9357
|
+
y: anchor === "ground" ? p.y - h : anchor === "center" ? p.y - h / 2 : p.y,
|
|
9358
|
+
w,
|
|
9359
|
+
h
|
|
9360
|
+
};
|
|
9361
|
+
}
|
|
9335
9362
|
var init_contract = __esm({
|
|
9336
9363
|
"lib/drawable/contract.ts"() {
|
|
9337
9364
|
}
|
|
@@ -9346,16 +9373,11 @@ function paintFallbackSquare(painter, node, dctx, reason) {
|
|
|
9346
9373
|
warnMissingOnce(reason, node);
|
|
9347
9374
|
const tw = dctx.projector.tileWidth;
|
|
9348
9375
|
const natural = dctx.projector.worldPixelDirect ? FALLBACK_WORLD_PX : tw;
|
|
9349
|
-
const
|
|
9350
|
-
const h = node.height !== void 0 ? node.height * tw : natural;
|
|
9351
|
-
const anchor = node.anchor ?? "top-left";
|
|
9352
|
-
const p = dctx.projector.anchorPoint(node.position, anchor);
|
|
9353
|
-
const dx = anchor === "top-left" ? p.x : p.x - w / 2;
|
|
9354
|
-
const dy = anchor === "ground" ? p.y - h : anchor === "center" ? p.y - h / 2 : p.y;
|
|
9376
|
+
const rect = spriteRect(dctx.projector, node, { w: natural, h: natural });
|
|
9355
9377
|
painter.save();
|
|
9356
9378
|
if (node.opacity !== void 0 && node.opacity !== 1) painter.setAlpha(node.opacity);
|
|
9357
|
-
painter.fillRect(
|
|
9358
|
-
painter.strokeRect(
|
|
9379
|
+
painter.fillRect(rect.x, rect.y, rect.w, rect.h, "#9b8f7f");
|
|
9380
|
+
painter.strokeRect(rect.x, rect.y, rect.w, rect.h, "#5e564b", Math.max(1, tw / 32));
|
|
9359
9381
|
painter.restore();
|
|
9360
9382
|
}
|
|
9361
9383
|
function DrawSprite(_props) {
|
|
@@ -9392,15 +9414,10 @@ var init_DrawSprite = __esm({
|
|
|
9392
9414
|
}
|
|
9393
9415
|
src = { x: r.sx, y: r.sy, w: r.sw, h: r.sh };
|
|
9394
9416
|
}
|
|
9395
|
-
const
|
|
9396
|
-
const
|
|
9397
|
-
const
|
|
9398
|
-
const
|
|
9399
|
-
const h = node.height !== void 0 ? node.height * tw : fallbackH;
|
|
9400
|
-
const anchor = node.anchor ?? "top-left";
|
|
9401
|
-
const p = dctx.projector.anchorPoint(node.position, anchor);
|
|
9402
|
-
const dx = anchor === "top-left" ? p.x : p.x - w / 2;
|
|
9403
|
-
const dy = anchor === "ground" ? p.y - h : anchor === "center" ? p.y - h / 2 : p.y;
|
|
9417
|
+
const rect = spriteRect(dctx.projector, node, src ? { w: src.w, h: src.h } : { w: tex.width, h: tex.height });
|
|
9418
|
+
const { w, h } = rect;
|
|
9419
|
+
const dx = rect.x;
|
|
9420
|
+
const dy = rect.y;
|
|
9404
9421
|
painter.save();
|
|
9405
9422
|
if (node.opacity !== void 0 && node.opacity !== 1) painter.setAlpha(node.opacity);
|
|
9406
9423
|
if (node.shadow) painter.setShadow(node.shadow);
|
|
@@ -9422,9 +9439,24 @@ var init_DrawSprite = __esm({
|
|
|
9422
9439
|
};
|
|
9423
9440
|
}
|
|
9424
9441
|
});
|
|
9425
|
-
|
|
9426
|
-
|
|
9427
|
-
|
|
9442
|
+
var DrawableRegistryContext;
|
|
9443
|
+
var init_registry = __esm({
|
|
9444
|
+
"lib/drawable/registry.ts"() {
|
|
9445
|
+
DrawableRegistryContext = createContext(null);
|
|
9446
|
+
}
|
|
9447
|
+
});
|
|
9448
|
+
function DrawShape(props) {
|
|
9449
|
+
const register = useContext(DrawableRegistryContext);
|
|
9450
|
+
if (register) {
|
|
9451
|
+
const { opacity, ...rest } = props;
|
|
9452
|
+
const node = {
|
|
9453
|
+
...rest,
|
|
9454
|
+
type: "draw-shape",
|
|
9455
|
+
...opacity !== void 0 && opacity > 0 ? { opacity } : {}
|
|
9456
|
+
};
|
|
9457
|
+
register(node);
|
|
9458
|
+
return /* @__PURE__ */ jsx("div", { "data-draw-shape-debug": "", style: { position: "absolute", width: 4, height: 4, background: "red", zIndex: 9999 } });
|
|
9459
|
+
}
|
|
9428
9460
|
return null;
|
|
9429
9461
|
}
|
|
9430
9462
|
var paintShape;
|
|
@@ -9432,6 +9464,7 @@ var init_DrawShape = __esm({
|
|
|
9432
9464
|
"components/game/atoms/DrawShape.tsx"() {
|
|
9433
9465
|
"use client";
|
|
9434
9466
|
init_contract();
|
|
9467
|
+
init_registry();
|
|
9435
9468
|
paintShape = (painter, node, dctx) => {
|
|
9436
9469
|
if (!isValidScenePos(node.position)) return;
|
|
9437
9470
|
painter.save();
|
|
@@ -9616,12 +9649,18 @@ function collectDrawnItems(nodes) {
|
|
|
9616
9649
|
for (const n of nodes) {
|
|
9617
9650
|
switch (n.type) {
|
|
9618
9651
|
case "draw-sprite":
|
|
9652
|
+
if (isValidScenePos(n.position)) out.push({ pos: n.position, id: n.id, anchor: n.anchor, width: n.width, height: n.height });
|
|
9653
|
+
break;
|
|
9619
9654
|
case "draw-shape":
|
|
9620
9655
|
case "draw-text":
|
|
9621
9656
|
case "draw-group":
|
|
9622
9657
|
if (isValidScenePos(n.position)) out.push({ pos: n.position, id: n.id });
|
|
9623
9658
|
break;
|
|
9624
9659
|
case "draw-sprite-layer":
|
|
9660
|
+
for (const it of n.items) {
|
|
9661
|
+
if (isValidScenePos(it.position)) out.push({ pos: it.position, id: it.id, anchor: it.anchor, width: it.width, height: it.height });
|
|
9662
|
+
}
|
|
9663
|
+
break;
|
|
9625
9664
|
case "draw-shape-layer":
|
|
9626
9665
|
case "draw-text-layer":
|
|
9627
9666
|
for (const it of n.items) {
|
|
@@ -9639,6 +9678,15 @@ function buildHitIndex(items) {
|
|
|
9639
9678
|
}
|
|
9640
9679
|
return m;
|
|
9641
9680
|
}
|
|
9681
|
+
function hitTestSprites(items, projector, point) {
|
|
9682
|
+
for (let i = items.length - 1; i >= 0; i--) {
|
|
9683
|
+
const it = items[i];
|
|
9684
|
+
if (it.id === void 0) continue;
|
|
9685
|
+
const r = spriteRect(projector, { position: it.pos, anchor: it.anchor, width: it.width, height: it.height });
|
|
9686
|
+
if (point.x >= r.x && point.x <= r.x + r.w && point.y >= r.y && point.y <= r.y + r.h) return it.id;
|
|
9687
|
+
}
|
|
9688
|
+
return void 0;
|
|
9689
|
+
}
|
|
9642
9690
|
var init_hitTest = __esm({
|
|
9643
9691
|
"lib/drawable/hitTest.ts"() {
|
|
9644
9692
|
init_contract();
|
|
@@ -9667,9 +9715,17 @@ function Canvas2D({
|
|
|
9667
9715
|
showMinimap = true,
|
|
9668
9716
|
followTarget,
|
|
9669
9717
|
cameraPos,
|
|
9670
|
-
bgColor
|
|
9718
|
+
bgColor,
|
|
9719
|
+
children
|
|
9671
9720
|
}) {
|
|
9672
9721
|
const instanceId = useMemo(() => Math.random().toString(36).slice(2, 8), []);
|
|
9722
|
+
const childDrawablesRef = useRef([]);
|
|
9723
|
+
childDrawablesRef.current = [];
|
|
9724
|
+
const registerChildDrawable = useCallback((node) => {
|
|
9725
|
+
childDrawablesRef.current.push(node);
|
|
9726
|
+
}, []);
|
|
9727
|
+
const hasJsxChildren = React84.Children.count(children) > 0;
|
|
9728
|
+
drawables && drawables.length > 0 ? drawables : childDrawablesRef.current;
|
|
9673
9729
|
function isDrawableLayer(node) {
|
|
9674
9730
|
return node.type === "draw-sprite-layer" || node.type === "draw-shape-layer" || node.type === "draw-text-layer";
|
|
9675
9731
|
}
|
|
@@ -9852,7 +9908,19 @@ function Canvas2D({
|
|
|
9852
9908
|
ctx.fillStyle = bgColor ?? BACKGROUND_FALLBACK_COLOR;
|
|
9853
9909
|
ctx.fillRect(0, 0, viewportSize.width, viewportSize.height);
|
|
9854
9910
|
}
|
|
9855
|
-
if (!drawables || drawables.length === 0)
|
|
9911
|
+
if (!drawables || drawables.length === 0) {
|
|
9912
|
+
const childDrawables = childDrawablesRef.current;
|
|
9913
|
+
if (childDrawables.length === 0) return;
|
|
9914
|
+
const painter0 = createWebPainter(ctx, bumpAtlas);
|
|
9915
|
+
painter0.save();
|
|
9916
|
+
painter0.translate(viewportSize.width / 2, viewportSize.height / 2);
|
|
9917
|
+
painter0.scale(cameraRef.current.zoom, cameraRef.current.zoom);
|
|
9918
|
+
painter0.translate(-viewportSize.width / 2, -viewportSize.height / 2);
|
|
9919
|
+
const dctx0 = { projector, time: 0, invalidate: bumpAtlas };
|
|
9920
|
+
for (const node of childDrawables) paintDrawable(painter0, node, dctx0);
|
|
9921
|
+
painter0.restore();
|
|
9922
|
+
return;
|
|
9923
|
+
}
|
|
9856
9924
|
const cam = cameraRef.current;
|
|
9857
9925
|
if (camera !== "follow" && dragDistance() === 0) {
|
|
9858
9926
|
const focus = cameraPos ?? defaultGridFocus;
|
|
@@ -9936,6 +10004,11 @@ function Canvas2D({
|
|
|
9936
10004
|
if (dragDistance() > 5) return;
|
|
9937
10005
|
if (!canvasRef.current || !tileClickEvent && !unitClickEvent) return;
|
|
9938
10006
|
const world = screenToWorld(e.clientX, e.clientY, canvasRef.current, viewportSize);
|
|
10007
|
+
const spriteHit = unitClickEvent ? hitTestSprites(drawnItems, projector, world) : void 0;
|
|
10008
|
+
if (spriteHit !== void 0 && unitClickEvent) {
|
|
10009
|
+
eventBus.emit(`UI:${unitClickEvent}`, { unitId: spriteHit });
|
|
10010
|
+
return;
|
|
10011
|
+
}
|
|
9939
10012
|
const adjustedX = world.x - scaledTileWidth / 2;
|
|
9940
10013
|
const adjustedY = squareGrid ? world.y - scaledTileWidth / 2 : world.y - scaledDiamondTopY - scaledFloorHeight / 2;
|
|
9941
10014
|
const isoPos = unproject(adjustedX, adjustedY);
|
|
@@ -9945,7 +10018,7 @@ function Canvas2D({
|
|
|
9945
10018
|
} else if (tileClickEvent) {
|
|
9946
10019
|
eventBus.emit(`UI:${tileClickEvent}`, { x: isoPos.x, y: isoPos.y });
|
|
9947
10020
|
}
|
|
9948
|
-
}, [enableCamera, handlePointerUp, dragDistance, screenToWorld, viewportSize, scaledTileWidth, squareGrid, scaledDiamondTopY, scaledFloorHeight, unproject, hitIndex, tileClickEvent, unitClickEvent, eventBus]);
|
|
10021
|
+
}, [enableCamera, handlePointerUp, dragDistance, screenToWorld, viewportSize, scaledTileWidth, squareGrid, scaledDiamondTopY, scaledFloorHeight, unproject, hitIndex, drawnItems, projector, tileClickEvent, unitClickEvent, eventBus]);
|
|
9949
10022
|
const handleCanvasPointerLeave = useCallback(() => {
|
|
9950
10023
|
handleMouseLeave();
|
|
9951
10024
|
if (tileLeaveEvent) eventBus.emit(`UI:${tileLeaveEvent}`, {});
|
|
@@ -10015,7 +10088,7 @@ function Canvas2D({
|
|
|
10015
10088
|
/* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-muted-foreground", children: t("canvas.loadingMessage") || "Loading\u2026" })
|
|
10016
10089
|
] }) });
|
|
10017
10090
|
}
|
|
10018
|
-
if (!drawables || drawables.length === 0) {
|
|
10091
|
+
if ((!drawables || drawables.length === 0) && !hasJsxChildren) {
|
|
10019
10092
|
return /* @__PURE__ */ jsx(
|
|
10020
10093
|
Box,
|
|
10021
10094
|
{
|
|
@@ -10029,7 +10102,7 @@ function Canvas2D({
|
|
|
10029
10102
|
}
|
|
10030
10103
|
);
|
|
10031
10104
|
}
|
|
10032
|
-
return /* @__PURE__ */ jsxs(
|
|
10105
|
+
return /* @__PURE__ */ jsx(DrawableRegistryContext.Provider, { value: registerChildDrawable, children: /* @__PURE__ */ jsxs(
|
|
10033
10106
|
Box,
|
|
10034
10107
|
{
|
|
10035
10108
|
ref: containerRef,
|
|
@@ -10090,10 +10163,19 @@ function Canvas2D({
|
|
|
10090
10163
|
mapWidth: miniMapWidth,
|
|
10091
10164
|
mapHeight: miniMapHeight
|
|
10092
10165
|
}
|
|
10093
|
-
) })
|
|
10166
|
+
) }),
|
|
10167
|
+
hasJsxChildren && /* @__PURE__ */ jsx("div", { "aria-hidden": "true", style: { position: "absolute", width: 0, height: 0, overflow: "hidden" }, children }),
|
|
10168
|
+
/* @__PURE__ */ jsxs("div", { "data-debug": "", style: { position: "absolute", top: 0, left: 0, background: "yellow", color: "black", zIndex: 9999, fontSize: 24, padding: 8 }, children: [
|
|
10169
|
+
"C=",
|
|
10170
|
+
React84.Children.count(children),
|
|
10171
|
+
" J=",
|
|
10172
|
+
String(hasJsxChildren),
|
|
10173
|
+
" D=",
|
|
10174
|
+
drawables?.length ?? -1
|
|
10175
|
+
] })
|
|
10094
10176
|
]
|
|
10095
10177
|
}
|
|
10096
|
-
);
|
|
10178
|
+
) });
|
|
10097
10179
|
}
|
|
10098
10180
|
var canvas2DLog;
|
|
10099
10181
|
var init_Canvas2D = __esm({
|
|
@@ -10115,6 +10197,7 @@ var init_Canvas2D = __esm({
|
|
|
10115
10197
|
init_webPainter2d();
|
|
10116
10198
|
init_projector();
|
|
10117
10199
|
init_paintDispatch();
|
|
10200
|
+
init_registry();
|
|
10118
10201
|
init_hitTest();
|
|
10119
10202
|
init_isometric();
|
|
10120
10203
|
canvas2DLog = createLogger("almadar:ui:game-canvas");
|
|
@@ -10156,7 +10239,8 @@ function Canvas({
|
|
|
10156
10239
|
tileLeaveEvent,
|
|
10157
10240
|
featureClickEvent,
|
|
10158
10241
|
keyMap,
|
|
10159
|
-
keyUpMap
|
|
10242
|
+
keyUpMap,
|
|
10243
|
+
children
|
|
10160
10244
|
}) {
|
|
10161
10245
|
canvasLog.debug("Canvas render", { mode, drawablesCount: drawables?.length, projection, camera: camera ? JSON.stringify(camera) : void 0 });
|
|
10162
10246
|
const zoom = camera?.zoom;
|
|
@@ -10209,7 +10293,8 @@ function Canvas({
|
|
|
10209
10293
|
tileHoverEvent,
|
|
10210
10294
|
tileLeaveEvent,
|
|
10211
10295
|
keyMap,
|
|
10212
|
-
keyUpMap
|
|
10296
|
+
keyUpMap,
|
|
10297
|
+
...children !== void 0 ? { children } : {}
|
|
10213
10298
|
}
|
|
10214
10299
|
);
|
|
10215
10300
|
}
|
|
@@ -10341,7 +10426,7 @@ function LinearView({
|
|
|
10341
10426
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
10342
10427
|
const isDone = i < currentIdx;
|
|
10343
10428
|
const isCurrent = i === currentIdx;
|
|
10344
|
-
return /* @__PURE__ */ jsxs(
|
|
10429
|
+
return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
10345
10430
|
i > 0 && /* @__PURE__ */ jsx(
|
|
10346
10431
|
Typography,
|
|
10347
10432
|
{
|
|
@@ -10876,7 +10961,7 @@ function SequenceBar({
|
|
|
10876
10961
|
else onSlotRemove?.(index);
|
|
10877
10962
|
}, [emit, slotRemoveEvent, onSlotRemove, playing]);
|
|
10878
10963
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
10879
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
10964
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
10880
10965
|
i > 0 && /* @__PURE__ */ jsx(
|
|
10881
10966
|
Typography,
|
|
10882
10967
|
{
|
|
@@ -11525,7 +11610,7 @@ var init_ErrorBoundary = __esm({
|
|
|
11525
11610
|
}
|
|
11526
11611
|
);
|
|
11527
11612
|
};
|
|
11528
|
-
ErrorBoundary = class extends
|
|
11613
|
+
ErrorBoundary = class extends React84__default.Component {
|
|
11529
11614
|
constructor(props) {
|
|
11530
11615
|
super(props);
|
|
11531
11616
|
__publicField(this, "reset", () => {
|
|
@@ -11794,7 +11879,7 @@ var init_Container = __esm({
|
|
|
11794
11879
|
as: Component = "div"
|
|
11795
11880
|
}) => {
|
|
11796
11881
|
const resolvedSize = maxWidth ?? size ?? "lg";
|
|
11797
|
-
return
|
|
11882
|
+
return React84__default.createElement(
|
|
11798
11883
|
Component,
|
|
11799
11884
|
{
|
|
11800
11885
|
className: cn(
|
|
@@ -14759,7 +14844,7 @@ var init_CodeBlock = __esm({
|
|
|
14759
14844
|
DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
|
|
14760
14845
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
14761
14846
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
14762
|
-
CodeBlock =
|
|
14847
|
+
CodeBlock = React84__default.memo(
|
|
14763
14848
|
({
|
|
14764
14849
|
code: rawCode,
|
|
14765
14850
|
language = "text",
|
|
@@ -15347,7 +15432,7 @@ var init_MarkdownContent = __esm({
|
|
|
15347
15432
|
init_Box();
|
|
15348
15433
|
init_CodeBlock();
|
|
15349
15434
|
init_cn();
|
|
15350
|
-
MarkdownContent =
|
|
15435
|
+
MarkdownContent = React84__default.memo(
|
|
15351
15436
|
({ content, direction = "ltr", className }) => {
|
|
15352
15437
|
const { t: _t } = useTranslate();
|
|
15353
15438
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -16624,7 +16709,7 @@ var init_StateMachineView = __esm({
|
|
|
16624
16709
|
style: { top: title ? 30 : 0 },
|
|
16625
16710
|
children: [
|
|
16626
16711
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
16627
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
16712
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React84__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
16628
16713
|
StateNode2,
|
|
16629
16714
|
{
|
|
16630
16715
|
state,
|
|
@@ -22365,8 +22450,8 @@ var init_Menu = __esm({
|
|
|
22365
22450
|
"bottom-end": "bottom-start"
|
|
22366
22451
|
};
|
|
22367
22452
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
22368
|
-
const triggerChild =
|
|
22369
|
-
const triggerElement =
|
|
22453
|
+
const triggerChild = React84__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
22454
|
+
const triggerElement = React84__default.cloneElement(
|
|
22370
22455
|
triggerChild,
|
|
22371
22456
|
{
|
|
22372
22457
|
ref: triggerRef,
|
|
@@ -22461,14 +22546,14 @@ function useDataDnd(args) {
|
|
|
22461
22546
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
22462
22547
|
const enabled = isZone || Boolean(dndRoot);
|
|
22463
22548
|
const eventBus = useEventBus();
|
|
22464
|
-
const parentRoot =
|
|
22549
|
+
const parentRoot = React84__default.useContext(RootCtx);
|
|
22465
22550
|
const isRoot = enabled && parentRoot === null;
|
|
22466
|
-
const zoneId =
|
|
22551
|
+
const zoneId = React84__default.useId();
|
|
22467
22552
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
22468
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
22469
|
-
const optimisticOrdersRef =
|
|
22553
|
+
const [optimisticOrders, setOptimisticOrders] = React84__default.useState(() => /* @__PURE__ */ new Map());
|
|
22554
|
+
const optimisticOrdersRef = React84__default.useRef(optimisticOrders);
|
|
22470
22555
|
optimisticOrdersRef.current = optimisticOrders;
|
|
22471
|
-
const clearOptimisticOrder =
|
|
22556
|
+
const clearOptimisticOrder = React84__default.useCallback((group) => {
|
|
22472
22557
|
setOptimisticOrders((prev) => {
|
|
22473
22558
|
if (!prev.has(group)) return prev;
|
|
22474
22559
|
const next = new Map(prev);
|
|
@@ -22493,7 +22578,7 @@ function useDataDnd(args) {
|
|
|
22493
22578
|
const raw = it[dndItemIdField];
|
|
22494
22579
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
22495
22580
|
}).join("|");
|
|
22496
|
-
const itemIds =
|
|
22581
|
+
const itemIds = React84__default.useMemo(
|
|
22497
22582
|
() => orderedItems.map((it, idx) => {
|
|
22498
22583
|
const raw = it[dndItemIdField];
|
|
22499
22584
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
@@ -22504,7 +22589,7 @@ function useDataDnd(args) {
|
|
|
22504
22589
|
const raw = it[dndItemIdField];
|
|
22505
22590
|
return raw != null ? String(raw) : `__${idx}`;
|
|
22506
22591
|
}).join("|");
|
|
22507
|
-
|
|
22592
|
+
React84__default.useEffect(() => {
|
|
22508
22593
|
const root = isRoot ? null : parentRoot;
|
|
22509
22594
|
if (root) {
|
|
22510
22595
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -22512,20 +22597,20 @@ function useDataDnd(args) {
|
|
|
22512
22597
|
clearOptimisticOrder(ownGroup);
|
|
22513
22598
|
}
|
|
22514
22599
|
}, [itemsContentSig, ownGroup]);
|
|
22515
|
-
const zonesRef =
|
|
22516
|
-
const registerZone =
|
|
22600
|
+
const zonesRef = React84__default.useRef(/* @__PURE__ */ new Map());
|
|
22601
|
+
const registerZone = React84__default.useCallback((zoneId2, meta2) => {
|
|
22517
22602
|
zonesRef.current.set(zoneId2, meta2);
|
|
22518
22603
|
}, []);
|
|
22519
|
-
const unregisterZone =
|
|
22604
|
+
const unregisterZone = React84__default.useCallback((zoneId2) => {
|
|
22520
22605
|
zonesRef.current.delete(zoneId2);
|
|
22521
22606
|
}, []);
|
|
22522
|
-
const [activeDrag, setActiveDrag] =
|
|
22523
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
22524
|
-
const meta =
|
|
22607
|
+
const [activeDrag, setActiveDrag] = React84__default.useState(null);
|
|
22608
|
+
const [overZoneGroup, setOverZoneGroup] = React84__default.useState(null);
|
|
22609
|
+
const meta = React84__default.useMemo(
|
|
22525
22610
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
22526
22611
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
22527
22612
|
);
|
|
22528
|
-
|
|
22613
|
+
React84__default.useEffect(() => {
|
|
22529
22614
|
const target = isRoot ? null : parentRoot;
|
|
22530
22615
|
if (!target) {
|
|
22531
22616
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -22544,7 +22629,7 @@ function useDataDnd(args) {
|
|
|
22544
22629
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
22545
22630
|
const sensors = useAlmadarDndSensors(true);
|
|
22546
22631
|
const collisionDetection = almadarDndCollisionDetection;
|
|
22547
|
-
const findZoneByItem =
|
|
22632
|
+
const findZoneByItem = React84__default.useCallback(
|
|
22548
22633
|
(id) => {
|
|
22549
22634
|
for (const z of zonesRef.current.values()) {
|
|
22550
22635
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -22553,7 +22638,7 @@ function useDataDnd(args) {
|
|
|
22553
22638
|
},
|
|
22554
22639
|
[]
|
|
22555
22640
|
);
|
|
22556
|
-
|
|
22641
|
+
React84__default.useCallback(
|
|
22557
22642
|
(group) => {
|
|
22558
22643
|
for (const z of zonesRef.current.values()) {
|
|
22559
22644
|
if (z.group === group) return z;
|
|
@@ -22562,7 +22647,7 @@ function useDataDnd(args) {
|
|
|
22562
22647
|
},
|
|
22563
22648
|
[]
|
|
22564
22649
|
);
|
|
22565
|
-
const handleDragEnd =
|
|
22650
|
+
const handleDragEnd = React84__default.useCallback(
|
|
22566
22651
|
(event) => {
|
|
22567
22652
|
const { active, over } = event;
|
|
22568
22653
|
const activeIdStr = String(active.id);
|
|
@@ -22653,8 +22738,8 @@ function useDataDnd(args) {
|
|
|
22653
22738
|
},
|
|
22654
22739
|
[eventBus]
|
|
22655
22740
|
);
|
|
22656
|
-
const sortableData =
|
|
22657
|
-
const SortableItem =
|
|
22741
|
+
const sortableData = React84__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
22742
|
+
const SortableItem = React84__default.useCallback(
|
|
22658
22743
|
({ id, children }) => {
|
|
22659
22744
|
const {
|
|
22660
22745
|
attributes,
|
|
@@ -22694,7 +22779,7 @@ function useDataDnd(args) {
|
|
|
22694
22779
|
id: droppableId,
|
|
22695
22780
|
data: sortableData
|
|
22696
22781
|
});
|
|
22697
|
-
const ctx =
|
|
22782
|
+
const ctx = React84__default.useContext(RootCtx);
|
|
22698
22783
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
22699
22784
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
22700
22785
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -22709,7 +22794,7 @@ function useDataDnd(args) {
|
|
|
22709
22794
|
showForeignPlaceholder,
|
|
22710
22795
|
ctxAvailable: ctx != null
|
|
22711
22796
|
});
|
|
22712
|
-
|
|
22797
|
+
React84__default.useEffect(() => {
|
|
22713
22798
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
22714
22799
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
22715
22800
|
return /* @__PURE__ */ jsx(
|
|
@@ -22723,11 +22808,11 @@ function useDataDnd(args) {
|
|
|
22723
22808
|
}
|
|
22724
22809
|
);
|
|
22725
22810
|
};
|
|
22726
|
-
const rootContextValue =
|
|
22811
|
+
const rootContextValue = React84__default.useMemo(
|
|
22727
22812
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
22728
22813
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
22729
22814
|
);
|
|
22730
|
-
const handleDragStart =
|
|
22815
|
+
const handleDragStart = React84__default.useCallback((event) => {
|
|
22731
22816
|
const sourceZone = findZoneByItem(event.active.id);
|
|
22732
22817
|
const rect = event.active.rect.current.initial;
|
|
22733
22818
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -22746,7 +22831,7 @@ function useDataDnd(args) {
|
|
|
22746
22831
|
isRoot
|
|
22747
22832
|
});
|
|
22748
22833
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
22749
|
-
const handleDragOver =
|
|
22834
|
+
const handleDragOver = React84__default.useCallback((event) => {
|
|
22750
22835
|
const { active, over } = event;
|
|
22751
22836
|
const overData = over?.data?.current;
|
|
22752
22837
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -22816,7 +22901,7 @@ function useDataDnd(args) {
|
|
|
22816
22901
|
return next;
|
|
22817
22902
|
});
|
|
22818
22903
|
}, []);
|
|
22819
|
-
const handleDragCancel =
|
|
22904
|
+
const handleDragCancel = React84__default.useCallback((event) => {
|
|
22820
22905
|
setActiveDrag(null);
|
|
22821
22906
|
setOverZoneGroup(null);
|
|
22822
22907
|
dndLog.warn("dragCancel", {
|
|
@@ -22824,12 +22909,12 @@ function useDataDnd(args) {
|
|
|
22824
22909
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
22825
22910
|
});
|
|
22826
22911
|
}, []);
|
|
22827
|
-
const handleDragEndWithCleanup =
|
|
22912
|
+
const handleDragEndWithCleanup = React84__default.useCallback((event) => {
|
|
22828
22913
|
handleDragEnd(event);
|
|
22829
22914
|
setActiveDrag(null);
|
|
22830
22915
|
setOverZoneGroup(null);
|
|
22831
22916
|
}, [handleDragEnd]);
|
|
22832
|
-
const wrapContainer =
|
|
22917
|
+
const wrapContainer = React84__default.useCallback(
|
|
22833
22918
|
(children) => {
|
|
22834
22919
|
if (!enabled) return children;
|
|
22835
22920
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -22883,7 +22968,7 @@ var init_useDataDnd = __esm({
|
|
|
22883
22968
|
init_useAlmadarDndCollision();
|
|
22884
22969
|
init_Box();
|
|
22885
22970
|
dndLog = createLogger("almadar:ui:dnd");
|
|
22886
|
-
RootCtx =
|
|
22971
|
+
RootCtx = React84__default.createContext(null);
|
|
22887
22972
|
}
|
|
22888
22973
|
});
|
|
22889
22974
|
function renderIconInput(icon, props) {
|
|
@@ -23425,7 +23510,7 @@ function DataList({
|
|
|
23425
23510
|
}) {
|
|
23426
23511
|
const eventBus = useEventBus();
|
|
23427
23512
|
const { t } = useTranslate();
|
|
23428
|
-
const [visibleCount, setVisibleCount] =
|
|
23513
|
+
const [visibleCount, setVisibleCount] = React84__default.useState(pageSize || Infinity);
|
|
23429
23514
|
const fieldDefs = fields ?? columns ?? [];
|
|
23430
23515
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
23431
23516
|
const dnd = useDataDnd({
|
|
@@ -23441,14 +23526,14 @@ function DataList({
|
|
|
23441
23526
|
dndRoot
|
|
23442
23527
|
});
|
|
23443
23528
|
const orderedData = dnd.orderedItems;
|
|
23444
|
-
const allData =
|
|
23529
|
+
const allData = React84__default.useMemo(
|
|
23445
23530
|
() => sortRows(orderedData, sortBy, sortDirection),
|
|
23446
23531
|
[orderedData, sortBy, sortDirection]
|
|
23447
23532
|
);
|
|
23448
23533
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
23449
23534
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
23450
23535
|
const hasRenderProp = typeof children === "function";
|
|
23451
|
-
|
|
23536
|
+
React84__default.useEffect(() => {
|
|
23452
23537
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
23453
23538
|
const childrenTypeOf = typeof children;
|
|
23454
23539
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -23563,7 +23648,7 @@ function DataList({
|
|
|
23563
23648
|
return v === void 0 || v === null || v === "" ? raw : String(v);
|
|
23564
23649
|
};
|
|
23565
23650
|
return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("py-2", className), children: [
|
|
23566
|
-
groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
23651
|
+
groups2.map((group, gi) => /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
23567
23652
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
23568
23653
|
group.items.map((itemData, index) => {
|
|
23569
23654
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -23762,7 +23847,7 @@ function DataList({
|
|
|
23762
23847
|
className
|
|
23763
23848
|
),
|
|
23764
23849
|
children: [
|
|
23765
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
23850
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
23766
23851
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
23767
23852
|
group.items.map(
|
|
23768
23853
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -23849,7 +23934,7 @@ var init_FormSection = __esm({
|
|
|
23849
23934
|
columns = 1,
|
|
23850
23935
|
className
|
|
23851
23936
|
}) => {
|
|
23852
|
-
const [collapsed, setCollapsed] =
|
|
23937
|
+
const [collapsed, setCollapsed] = React84__default.useState(defaultCollapsed);
|
|
23853
23938
|
const { t } = useTranslate();
|
|
23854
23939
|
const eventBus = useEventBus();
|
|
23855
23940
|
const gridClass = {
|
|
@@ -23857,7 +23942,7 @@ var init_FormSection = __esm({
|
|
|
23857
23942
|
2: "grid-cols-1 md:grid-cols-2",
|
|
23858
23943
|
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
23859
23944
|
}[columns];
|
|
23860
|
-
|
|
23945
|
+
React84__default.useCallback(() => {
|
|
23861
23946
|
if (collapsible) {
|
|
23862
23947
|
setCollapsed((prev) => !prev);
|
|
23863
23948
|
eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
|
|
@@ -24838,7 +24923,7 @@ var init_Flex = __esm({
|
|
|
24838
24923
|
flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
|
|
24839
24924
|
}
|
|
24840
24925
|
}
|
|
24841
|
-
return
|
|
24926
|
+
return React84__default.createElement(Component, {
|
|
24842
24927
|
className: cn(
|
|
24843
24928
|
inline ? "inline-flex" : "flex",
|
|
24844
24929
|
directionStyles[direction],
|
|
@@ -24957,7 +25042,7 @@ var init_Grid = __esm({
|
|
|
24957
25042
|
as: Component = "div"
|
|
24958
25043
|
}) => {
|
|
24959
25044
|
const mergedStyle = rows ? { gridTemplateRows: `repeat(${rows}, minmax(0, 1fr))`, ...style } : style;
|
|
24960
|
-
return
|
|
25045
|
+
return React84__default.createElement(
|
|
24961
25046
|
Component,
|
|
24962
25047
|
{
|
|
24963
25048
|
className: cn(
|
|
@@ -25189,9 +25274,9 @@ var init_Popover = __esm({
|
|
|
25189
25274
|
onMouseLeave: handleClose,
|
|
25190
25275
|
onPointerDown: tapTriggerProps.onPointerDown
|
|
25191
25276
|
};
|
|
25192
|
-
const childElement =
|
|
25277
|
+
const childElement = React84__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
25193
25278
|
const childPointerDown = childElement.props.onPointerDown;
|
|
25194
|
-
const triggerElement =
|
|
25279
|
+
const triggerElement = React84__default.cloneElement(
|
|
25195
25280
|
childElement,
|
|
25196
25281
|
{
|
|
25197
25282
|
ref: triggerRef,
|
|
@@ -25800,9 +25885,9 @@ var init_Tooltip = __esm({
|
|
|
25800
25885
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
25801
25886
|
};
|
|
25802
25887
|
}, []);
|
|
25803
|
-
const triggerElement =
|
|
25888
|
+
const triggerElement = React84__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
25804
25889
|
const childPointerDown = triggerElement.props.onPointerDown;
|
|
25805
|
-
const trigger =
|
|
25890
|
+
const trigger = React84__default.cloneElement(triggerElement, {
|
|
25806
25891
|
ref: triggerRef,
|
|
25807
25892
|
onMouseEnter: handleMouseEnter,
|
|
25808
25893
|
onMouseLeave: handleMouseLeave,
|
|
@@ -25892,7 +25977,7 @@ var init_WizardProgress = __esm({
|
|
|
25892
25977
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
25893
25978
|
const isActive = index === currentStep;
|
|
25894
25979
|
const isCompleted = index < currentStep;
|
|
25895
|
-
return /* @__PURE__ */ jsxs(
|
|
25980
|
+
return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
25896
25981
|
/* @__PURE__ */ jsx(
|
|
25897
25982
|
"button",
|
|
25898
25983
|
{
|
|
@@ -27527,7 +27612,7 @@ var init_MapView = __esm({
|
|
|
27527
27612
|
shadowSize: [41, 41]
|
|
27528
27613
|
});
|
|
27529
27614
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
27530
|
-
const { useEffect: useEffect59, useRef: useRef61, useCallback: useCallback89, useState: useState91 } =
|
|
27615
|
+
const { useEffect: useEffect59, useRef: useRef61, useCallback: useCallback89, useState: useState91 } = React84__default;
|
|
27531
27616
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
27532
27617
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
27533
27618
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
@@ -28425,8 +28510,8 @@ function TableView({
|
|
|
28425
28510
|
}) {
|
|
28426
28511
|
const eventBus = useEventBus();
|
|
28427
28512
|
const { t } = useTranslate();
|
|
28428
|
-
const [visibleCount, setVisibleCount] =
|
|
28429
|
-
const [localSelected, setLocalSelected] =
|
|
28513
|
+
const [visibleCount, setVisibleCount] = React84__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
28514
|
+
const [localSelected, setLocalSelected] = React84__default.useState(/* @__PURE__ */ new Set());
|
|
28430
28515
|
const colDefs = (Array.isArray(columns) ? columns : void 0) ?? (Array.isArray(fields) ? fields : void 0) ?? [];
|
|
28431
28516
|
const actionDefs = Array.isArray(itemActions) ? itemActions : [];
|
|
28432
28517
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
@@ -28448,7 +28533,7 @@ function TableView({
|
|
|
28448
28533
|
const hasRenderProp = typeof children === "function";
|
|
28449
28534
|
const idField = dndItemIdField ?? "id";
|
|
28450
28535
|
const isCoarsePointer = useMediaQuery("(pointer: coarse)");
|
|
28451
|
-
|
|
28536
|
+
React84__default.useEffect(() => {
|
|
28452
28537
|
tableViewLog.debug("render", {
|
|
28453
28538
|
rowCount: data.length,
|
|
28454
28539
|
colCount: colDefs.length,
|
|
@@ -28505,7 +28590,7 @@ function TableView({
|
|
|
28505
28590
|
};
|
|
28506
28591
|
eventBus.emit(`UI:${itemClickEvent}`, payload);
|
|
28507
28592
|
};
|
|
28508
|
-
const colFloors =
|
|
28593
|
+
const colFloors = React84__default.useMemo(
|
|
28509
28594
|
() => colDefs.map((col) => {
|
|
28510
28595
|
const longest = data.reduce((widest, row) => {
|
|
28511
28596
|
const cell = formatCell(asFieldValue(getNestedValue(row, col.field ?? col.key)), col.format);
|
|
@@ -28667,12 +28752,12 @@ function TableView({
|
|
|
28667
28752
|
]
|
|
28668
28753
|
}
|
|
28669
28754
|
);
|
|
28670
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
28755
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React84__default.Fragment, { children: rowInner }, id);
|
|
28671
28756
|
};
|
|
28672
28757
|
const items = Array.from(data);
|
|
28673
28758
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
28674
28759
|
let runningIndex = 0;
|
|
28675
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
28760
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
28676
28761
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
28677
28762
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
28678
28763
|
] }, gi)) });
|
|
@@ -29897,7 +29982,7 @@ var init_StepFlow = __esm({
|
|
|
29897
29982
|
className
|
|
29898
29983
|
}) => {
|
|
29899
29984
|
if (orientation === "vertical") {
|
|
29900
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
29985
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React84__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
29901
29986
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
29902
29987
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
29903
29988
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -29908,7 +29993,7 @@ var init_StepFlow = __esm({
|
|
|
29908
29993
|
] })
|
|
29909
29994
|
] }) }, index)) });
|
|
29910
29995
|
}
|
|
29911
|
-
return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(
|
|
29996
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
29912
29997
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
29913
29998
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
29914
29999
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -30898,7 +30983,7 @@ var init_LikertScale = __esm({
|
|
|
30898
30983
|
md: "text-base",
|
|
30899
30984
|
lg: "text-lg"
|
|
30900
30985
|
};
|
|
30901
|
-
LikertScale =
|
|
30986
|
+
LikertScale = React84__default.forwardRef(
|
|
30902
30987
|
({
|
|
30903
30988
|
question,
|
|
30904
30989
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -30910,7 +30995,7 @@ var init_LikertScale = __esm({
|
|
|
30910
30995
|
variant = "radios",
|
|
30911
30996
|
className
|
|
30912
30997
|
}, ref) => {
|
|
30913
|
-
const groupId =
|
|
30998
|
+
const groupId = React84__default.useId();
|
|
30914
30999
|
const eventBus = useEventBus();
|
|
30915
31000
|
const handleSelect = useCallback(
|
|
30916
31001
|
(next) => {
|
|
@@ -33199,7 +33284,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
33199
33284
|
"aria-label": t("aria.breadcrumb"),
|
|
33200
33285
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
33201
33286
|
const isLast = idx === items.length - 1;
|
|
33202
|
-
return /* @__PURE__ */ jsxs(
|
|
33287
|
+
return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
33203
33288
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
33204
33289
|
Icon,
|
|
33205
33290
|
{
|
|
@@ -34068,7 +34153,7 @@ var init_MiniStateMachine = __esm({
|
|
|
34068
34153
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
34069
34154
|
const tc = transitionCounts[s.name] ?? 0;
|
|
34070
34155
|
const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
34071
|
-
return /* @__PURE__ */ jsxs(
|
|
34156
|
+
return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
34072
34157
|
/* @__PURE__ */ jsx(
|
|
34073
34158
|
AvlState,
|
|
34074
34159
|
{
|
|
@@ -34272,7 +34357,7 @@ var init_PageHeader = __esm({
|
|
|
34272
34357
|
info: "bg-info/10 text-info"
|
|
34273
34358
|
};
|
|
34274
34359
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
34275
|
-
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(
|
|
34360
|
+
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(React84__default.Fragment, { children: [
|
|
34276
34361
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
34277
34362
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
34278
34363
|
"a",
|
|
@@ -34630,7 +34715,7 @@ var init_Section = __esm({
|
|
|
34630
34715
|
as: Component = "section"
|
|
34631
34716
|
}) => {
|
|
34632
34717
|
const hasHeader = title || description || action;
|
|
34633
|
-
return
|
|
34718
|
+
return React84__default.createElement(
|
|
34634
34719
|
Component,
|
|
34635
34720
|
{
|
|
34636
34721
|
className: cn(
|
|
@@ -35004,7 +35089,7 @@ var init_WizardContainer = __esm({
|
|
|
35004
35089
|
const isCompleted = index < currentStep;
|
|
35005
35090
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
35006
35091
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
35007
|
-
return /* @__PURE__ */ jsxs(
|
|
35092
|
+
return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
35008
35093
|
/* @__PURE__ */ jsx(
|
|
35009
35094
|
Button,
|
|
35010
35095
|
{
|
|
@@ -36791,7 +36876,7 @@ var init_ImportPreviewTree = __esm({
|
|
|
36791
36876
|
const renderUnit = (unit, childrenByParent, depth) => {
|
|
36792
36877
|
const summary = fieldSummary(unit);
|
|
36793
36878
|
const children = childrenByParent.get(unit.ref) ?? [];
|
|
36794
|
-
return /* @__PURE__ */ jsxs(
|
|
36879
|
+
return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
36795
36880
|
/* @__PURE__ */ jsxs(
|
|
36796
36881
|
Box,
|
|
36797
36882
|
{
|
|
@@ -36888,7 +36973,7 @@ var init_ImportProgress = __esm({
|
|
|
36888
36973
|
PIPELINE.map((key, index) => {
|
|
36889
36974
|
const isComplete = index < currentIndex;
|
|
36890
36975
|
const isActive = index === currentIndex;
|
|
36891
|
-
return /* @__PURE__ */ jsxs(
|
|
36976
|
+
return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
36892
36977
|
index > 0 ? /* @__PURE__ */ jsx(Box, { className: "h-px w-4 bg-border" }) : null,
|
|
36893
36978
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1", "data-testid": `import-progress-step-${key}`, children: [
|
|
36894
36979
|
/* @__PURE__ */ jsx(
|
|
@@ -38001,7 +38086,7 @@ var init_DrawGroup = __esm({
|
|
|
38001
38086
|
}
|
|
38002
38087
|
});
|
|
38003
38088
|
function extractTitle(children) {
|
|
38004
|
-
if (!
|
|
38089
|
+
if (!React84__default.isValidElement(children)) return void 0;
|
|
38005
38090
|
const props = children.props;
|
|
38006
38091
|
if (typeof props.title === "string") {
|
|
38007
38092
|
return props.title;
|
|
@@ -38351,12 +38436,12 @@ var init_Form = __esm({
|
|
|
38351
38436
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
38352
38437
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
38353
38438
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
38354
|
-
const normalizedInitialData =
|
|
38439
|
+
const normalizedInitialData = React84__default.useMemo(() => {
|
|
38355
38440
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
38356
38441
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
38357
38442
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
38358
38443
|
}, [entity, initialData]);
|
|
38359
|
-
const entityDerivedFields =
|
|
38444
|
+
const entityDerivedFields = React84__default.useMemo(() => {
|
|
38360
38445
|
if (fields && fields.length > 0) return void 0;
|
|
38361
38446
|
if (!resolvedEntity) return void 0;
|
|
38362
38447
|
return resolvedEntity.fields.map(
|
|
@@ -38377,16 +38462,16 @@ var init_Form = __esm({
|
|
|
38377
38462
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
38378
38463
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
38379
38464
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
38380
|
-
const [formData, setFormData] =
|
|
38465
|
+
const [formData, setFormData] = React84__default.useState(
|
|
38381
38466
|
normalizedInitialData
|
|
38382
38467
|
);
|
|
38383
|
-
const [collapsedSections, setCollapsedSections] =
|
|
38468
|
+
const [collapsedSections, setCollapsedSections] = React84__default.useState(
|
|
38384
38469
|
/* @__PURE__ */ new Set()
|
|
38385
38470
|
);
|
|
38386
|
-
const [submitError, setSubmitError] =
|
|
38387
|
-
const formRef =
|
|
38471
|
+
const [submitError, setSubmitError] = React84__default.useState(null);
|
|
38472
|
+
const formRef = React84__default.useRef(null);
|
|
38388
38473
|
const formMode = props.mode;
|
|
38389
|
-
const mountedRef =
|
|
38474
|
+
const mountedRef = React84__default.useRef(false);
|
|
38390
38475
|
if (!mountedRef.current) {
|
|
38391
38476
|
mountedRef.current = true;
|
|
38392
38477
|
debug("forms", "mount", {
|
|
@@ -38399,7 +38484,7 @@ var init_Form = __esm({
|
|
|
38399
38484
|
});
|
|
38400
38485
|
}
|
|
38401
38486
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
38402
|
-
const evalContext =
|
|
38487
|
+
const evalContext = React84__default.useMemo(
|
|
38403
38488
|
() => ({
|
|
38404
38489
|
formValues: formData,
|
|
38405
38490
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -38408,7 +38493,7 @@ var init_Form = __esm({
|
|
|
38408
38493
|
}),
|
|
38409
38494
|
[formData, externalContext]
|
|
38410
38495
|
);
|
|
38411
|
-
|
|
38496
|
+
React84__default.useEffect(() => {
|
|
38412
38497
|
debug("forms", "initialData-sync", {
|
|
38413
38498
|
mode: formMode,
|
|
38414
38499
|
normalizedInitialData,
|
|
@@ -38419,7 +38504,7 @@ var init_Form = __esm({
|
|
|
38419
38504
|
setFormData(normalizedInitialData);
|
|
38420
38505
|
}
|
|
38421
38506
|
}, [normalizedInitialData]);
|
|
38422
|
-
const processCalculations =
|
|
38507
|
+
const processCalculations = React84__default.useCallback(
|
|
38423
38508
|
(changedFieldId, newFormData) => {
|
|
38424
38509
|
if (!hiddenCalculations.length) return;
|
|
38425
38510
|
const context = {
|
|
@@ -38444,7 +38529,7 @@ var init_Form = __esm({
|
|
|
38444
38529
|
},
|
|
38445
38530
|
[hiddenCalculations, externalContext, eventBus]
|
|
38446
38531
|
);
|
|
38447
|
-
const checkViolations =
|
|
38532
|
+
const checkViolations = React84__default.useCallback(
|
|
38448
38533
|
(changedFieldId, newFormData) => {
|
|
38449
38534
|
if (!violationTriggers.length) return;
|
|
38450
38535
|
const context = {
|
|
@@ -38482,7 +38567,7 @@ var init_Form = __esm({
|
|
|
38482
38567
|
processCalculations(name, newFormData);
|
|
38483
38568
|
checkViolations(name, newFormData);
|
|
38484
38569
|
};
|
|
38485
|
-
const isFieldVisible =
|
|
38570
|
+
const isFieldVisible = React84__default.useCallback(
|
|
38486
38571
|
(fieldName) => {
|
|
38487
38572
|
const condition = conditionalFields[fieldName];
|
|
38488
38573
|
if (!condition) return true;
|
|
@@ -38490,7 +38575,7 @@ var init_Form = __esm({
|
|
|
38490
38575
|
},
|
|
38491
38576
|
[conditionalFields, evalContext]
|
|
38492
38577
|
);
|
|
38493
|
-
const isSectionVisible =
|
|
38578
|
+
const isSectionVisible = React84__default.useCallback(
|
|
38494
38579
|
(section) => {
|
|
38495
38580
|
if (!section.condition) return true;
|
|
38496
38581
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -38566,7 +38651,7 @@ var init_Form = __esm({
|
|
|
38566
38651
|
eventBus.emit(`UI:${onCancel}`);
|
|
38567
38652
|
}
|
|
38568
38653
|
};
|
|
38569
|
-
const renderField =
|
|
38654
|
+
const renderField = React84__default.useCallback(
|
|
38570
38655
|
(field) => {
|
|
38571
38656
|
const fieldName = field.name || field.field;
|
|
38572
38657
|
if (!fieldName) return null;
|
|
@@ -38587,7 +38672,7 @@ var init_Form = __esm({
|
|
|
38587
38672
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
38588
38673
|
);
|
|
38589
38674
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
38590
|
-
const normalizedFields =
|
|
38675
|
+
const normalizedFields = React84__default.useMemo(() => {
|
|
38591
38676
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
38592
38677
|
return effectiveFields.map((field) => {
|
|
38593
38678
|
if (typeof field === "string") {
|
|
@@ -38611,7 +38696,7 @@ var init_Form = __esm({
|
|
|
38611
38696
|
return field;
|
|
38612
38697
|
});
|
|
38613
38698
|
}, [effectiveFields, resolvedEntity]);
|
|
38614
|
-
const schemaFields =
|
|
38699
|
+
const schemaFields = React84__default.useMemo(() => {
|
|
38615
38700
|
if (normalizedFields.length === 0) return null;
|
|
38616
38701
|
if (isDebugEnabled()) {
|
|
38617
38702
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -38621,7 +38706,7 @@ var init_Form = __esm({
|
|
|
38621
38706
|
}
|
|
38622
38707
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
38623
38708
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
38624
|
-
const sectionElements =
|
|
38709
|
+
const sectionElements = React84__default.useMemo(() => {
|
|
38625
38710
|
if (!sections || sections.length === 0) return null;
|
|
38626
38711
|
return sections.map((section) => {
|
|
38627
38712
|
if (!isSectionVisible(section)) {
|
|
@@ -39347,7 +39432,7 @@ var init_List = __esm({
|
|
|
39347
39432
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
39348
39433
|
return [];
|
|
39349
39434
|
}, [entity]);
|
|
39350
|
-
const getItemActions =
|
|
39435
|
+
const getItemActions = React84__default.useCallback(
|
|
39351
39436
|
(item) => {
|
|
39352
39437
|
if (!itemActions) return [];
|
|
39353
39438
|
if (typeof itemActions === "function") {
|
|
@@ -39828,7 +39913,7 @@ var init_MediaGallery = __esm({
|
|
|
39828
39913
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
39829
39914
|
);
|
|
39830
39915
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
39831
|
-
const items =
|
|
39916
|
+
const items = React84__default.useMemo(() => {
|
|
39832
39917
|
if (propItems && propItems.length > 0) return propItems;
|
|
39833
39918
|
if (entityData.length === 0) return [];
|
|
39834
39919
|
return entityData.map((record, idx) => {
|
|
@@ -39993,7 +40078,7 @@ var init_MediaGallery = __esm({
|
|
|
39993
40078
|
}
|
|
39994
40079
|
});
|
|
39995
40080
|
function extractTitle2(children) {
|
|
39996
|
-
if (!
|
|
40081
|
+
if (!React84__default.isValidElement(children)) return void 0;
|
|
39997
40082
|
const props = children.props;
|
|
39998
40083
|
if (typeof props.title === "string") {
|
|
39999
40084
|
return props.title;
|
|
@@ -40267,7 +40352,7 @@ var init_debugRegistry = __esm({
|
|
|
40267
40352
|
}
|
|
40268
40353
|
});
|
|
40269
40354
|
function useDebugData() {
|
|
40270
|
-
const [data, setData] =
|
|
40355
|
+
const [data, setData] = React84.useState(() => ({
|
|
40271
40356
|
traits: [],
|
|
40272
40357
|
ticks: [],
|
|
40273
40358
|
guards: [],
|
|
@@ -40281,7 +40366,7 @@ function useDebugData() {
|
|
|
40281
40366
|
},
|
|
40282
40367
|
lastUpdate: Date.now()
|
|
40283
40368
|
}));
|
|
40284
|
-
|
|
40369
|
+
React84.useEffect(() => {
|
|
40285
40370
|
const updateData = () => {
|
|
40286
40371
|
setData({
|
|
40287
40372
|
traits: getAllTraits(),
|
|
@@ -40390,12 +40475,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
40390
40475
|
return positions;
|
|
40391
40476
|
}
|
|
40392
40477
|
function WalkMinimap() {
|
|
40393
|
-
const [walkStep, setWalkStep] =
|
|
40394
|
-
const [traits2, setTraits] =
|
|
40395
|
-
const [coveredEdges, setCoveredEdges] =
|
|
40396
|
-
const [completedTraits, setCompletedTraits] =
|
|
40397
|
-
const prevTraitRef =
|
|
40398
|
-
|
|
40478
|
+
const [walkStep, setWalkStep] = React84.useState(null);
|
|
40479
|
+
const [traits2, setTraits] = React84.useState([]);
|
|
40480
|
+
const [coveredEdges, setCoveredEdges] = React84.useState([]);
|
|
40481
|
+
const [completedTraits, setCompletedTraits] = React84.useState(/* @__PURE__ */ new Set());
|
|
40482
|
+
const prevTraitRef = React84.useRef(null);
|
|
40483
|
+
React84.useEffect(() => {
|
|
40399
40484
|
const interval = setInterval(() => {
|
|
40400
40485
|
const w = window;
|
|
40401
40486
|
const step = w.__orbitalWalkStep;
|
|
@@ -40831,15 +40916,15 @@ var init_EntitiesTab = __esm({
|
|
|
40831
40916
|
});
|
|
40832
40917
|
function EventFlowTab({ events: events2 }) {
|
|
40833
40918
|
const { t } = useTranslate();
|
|
40834
|
-
const [filter, setFilter] =
|
|
40835
|
-
const containerRef =
|
|
40836
|
-
const [autoScroll, setAutoScroll] =
|
|
40837
|
-
|
|
40919
|
+
const [filter, setFilter] = React84.useState("all");
|
|
40920
|
+
const containerRef = React84.useRef(null);
|
|
40921
|
+
const [autoScroll, setAutoScroll] = React84.useState(true);
|
|
40922
|
+
React84.useEffect(() => {
|
|
40838
40923
|
if (autoScroll && containerRef.current) {
|
|
40839
40924
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
40840
40925
|
}
|
|
40841
40926
|
}, [events2.length, autoScroll]);
|
|
40842
|
-
const filteredEvents =
|
|
40927
|
+
const filteredEvents = React84.useMemo(() => {
|
|
40843
40928
|
if (filter === "all") return events2;
|
|
40844
40929
|
return events2.filter((e) => e.type === filter);
|
|
40845
40930
|
}, [events2, filter]);
|
|
@@ -40955,7 +41040,7 @@ var init_EventFlowTab = __esm({
|
|
|
40955
41040
|
});
|
|
40956
41041
|
function GuardsPanel({ guards }) {
|
|
40957
41042
|
const { t } = useTranslate();
|
|
40958
|
-
const [filter, setFilter] =
|
|
41043
|
+
const [filter, setFilter] = React84.useState("all");
|
|
40959
41044
|
if (guards.length === 0) {
|
|
40960
41045
|
return /* @__PURE__ */ jsx(
|
|
40961
41046
|
EmptyState,
|
|
@@ -40968,7 +41053,7 @@ function GuardsPanel({ guards }) {
|
|
|
40968
41053
|
}
|
|
40969
41054
|
const passedCount = guards.filter((g) => g.result).length;
|
|
40970
41055
|
const failedCount = guards.length - passedCount;
|
|
40971
|
-
const filteredGuards =
|
|
41056
|
+
const filteredGuards = React84.useMemo(() => {
|
|
40972
41057
|
if (filter === "all") return guards;
|
|
40973
41058
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
40974
41059
|
return guards.filter((g) => !g.result);
|
|
@@ -41131,10 +41216,10 @@ function EffectBadge({ effect }) {
|
|
|
41131
41216
|
}
|
|
41132
41217
|
function TransitionTimeline({ transitions }) {
|
|
41133
41218
|
const { t } = useTranslate();
|
|
41134
|
-
const containerRef =
|
|
41135
|
-
const [autoScroll, setAutoScroll] =
|
|
41136
|
-
const [expandedId, setExpandedId] =
|
|
41137
|
-
|
|
41219
|
+
const containerRef = React84.useRef(null);
|
|
41220
|
+
const [autoScroll, setAutoScroll] = React84.useState(true);
|
|
41221
|
+
const [expandedId, setExpandedId] = React84.useState(null);
|
|
41222
|
+
React84.useEffect(() => {
|
|
41138
41223
|
if (autoScroll && containerRef.current) {
|
|
41139
41224
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
41140
41225
|
}
|
|
@@ -41414,9 +41499,9 @@ function getAllEvents(traits2) {
|
|
|
41414
41499
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
41415
41500
|
const eventBus = useEventBus();
|
|
41416
41501
|
const { t } = useTranslate();
|
|
41417
|
-
const [log9, setLog] =
|
|
41418
|
-
const prevStatesRef =
|
|
41419
|
-
|
|
41502
|
+
const [log9, setLog] = React84.useState([]);
|
|
41503
|
+
const prevStatesRef = React84.useRef(/* @__PURE__ */ new Map());
|
|
41504
|
+
React84.useEffect(() => {
|
|
41420
41505
|
for (const trait of traits2) {
|
|
41421
41506
|
const prev = prevStatesRef.current.get(trait.id);
|
|
41422
41507
|
if (prev && prev !== trait.currentState) {
|
|
@@ -41585,10 +41670,10 @@ function VerifyModePanel({
|
|
|
41585
41670
|
localCount
|
|
41586
41671
|
}) {
|
|
41587
41672
|
const { t } = useTranslate();
|
|
41588
|
-
const [expanded, setExpanded] =
|
|
41589
|
-
const scrollRef =
|
|
41590
|
-
const prevCountRef =
|
|
41591
|
-
|
|
41673
|
+
const [expanded, setExpanded] = React84.useState(true);
|
|
41674
|
+
const scrollRef = React84.useRef(null);
|
|
41675
|
+
const prevCountRef = React84.useRef(0);
|
|
41676
|
+
React84.useEffect(() => {
|
|
41592
41677
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
41593
41678
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
41594
41679
|
}
|
|
@@ -41645,10 +41730,10 @@ function RuntimeDebugger({
|
|
|
41645
41730
|
schema
|
|
41646
41731
|
}) {
|
|
41647
41732
|
const { t } = useTranslate();
|
|
41648
|
-
const [isCollapsed, setIsCollapsed] =
|
|
41649
|
-
const [isVisible, setIsVisible] =
|
|
41733
|
+
const [isCollapsed, setIsCollapsed] = React84.useState(mode === "verify" ? true : defaultCollapsed);
|
|
41734
|
+
const [isVisible, setIsVisible] = React84.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
41650
41735
|
const debugData = useDebugData();
|
|
41651
|
-
|
|
41736
|
+
React84.useEffect(() => {
|
|
41652
41737
|
if (mode === "inline") return;
|
|
41653
41738
|
return onDebugToggle((enabled) => {
|
|
41654
41739
|
setIsVisible(enabled);
|
|
@@ -41657,7 +41742,7 @@ function RuntimeDebugger({
|
|
|
41657
41742
|
}
|
|
41658
41743
|
});
|
|
41659
41744
|
}, [mode]);
|
|
41660
|
-
|
|
41745
|
+
React84.useEffect(() => {
|
|
41661
41746
|
if (mode === "inline") return;
|
|
41662
41747
|
const handleKeyDown = (e) => {
|
|
41663
41748
|
if (e.key === "`" && isVisible) {
|
|
@@ -42177,7 +42262,7 @@ var init_StatCard = __esm({
|
|
|
42177
42262
|
const labelToUse = propLabel ?? propTitle;
|
|
42178
42263
|
const eventBus = useEventBus();
|
|
42179
42264
|
const { t } = useTranslate();
|
|
42180
|
-
const handleActionClick =
|
|
42265
|
+
const handleActionClick = React84__default.useCallback(() => {
|
|
42181
42266
|
if (action?.event) {
|
|
42182
42267
|
eventBus.emit(`UI:${action.event}`, {});
|
|
42183
42268
|
}
|
|
@@ -42188,7 +42273,7 @@ var init_StatCard = __esm({
|
|
|
42188
42273
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
42189
42274
|
const isLoading = externalLoading ?? false;
|
|
42190
42275
|
const error = externalError;
|
|
42191
|
-
const computeMetricValue =
|
|
42276
|
+
const computeMetricValue = React84__default.useCallback(
|
|
42192
42277
|
(metric, items) => {
|
|
42193
42278
|
if (metric.value !== void 0) {
|
|
42194
42279
|
return metric.value;
|
|
@@ -42227,7 +42312,7 @@ var init_StatCard = __esm({
|
|
|
42227
42312
|
},
|
|
42228
42313
|
[]
|
|
42229
42314
|
);
|
|
42230
|
-
const schemaStats =
|
|
42315
|
+
const schemaStats = React84__default.useMemo(() => {
|
|
42231
42316
|
if (!metrics || metrics.length === 0) return null;
|
|
42232
42317
|
return metrics.map((metric) => ({
|
|
42233
42318
|
label: metric.label,
|
|
@@ -42235,7 +42320,7 @@ var init_StatCard = __esm({
|
|
|
42235
42320
|
format: metric.format
|
|
42236
42321
|
}));
|
|
42237
42322
|
}, [metrics, data, computeMetricValue]);
|
|
42238
|
-
const calculatedTrend =
|
|
42323
|
+
const calculatedTrend = React84__default.useMemo(() => {
|
|
42239
42324
|
if (manualTrend !== void 0) return manualTrend;
|
|
42240
42325
|
if (previousValue === void 0 || currentValue === void 0)
|
|
42241
42326
|
return void 0;
|
|
@@ -42875,8 +42960,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
42875
42960
|
] });
|
|
42876
42961
|
};
|
|
42877
42962
|
InlineActivityStream = ({ activities, autoScroll = true, className }) => {
|
|
42878
|
-
const endRef =
|
|
42879
|
-
|
|
42963
|
+
const endRef = React84__default.useRef(null);
|
|
42964
|
+
React84__default.useEffect(() => {
|
|
42880
42965
|
if (!autoScroll) return;
|
|
42881
42966
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
42882
42967
|
}, [activities.length, autoScroll]);
|
|
@@ -42970,7 +43055,7 @@ var init_SubagentTracePanel = __esm({
|
|
|
42970
43055
|
};
|
|
42971
43056
|
SubagentRichCard = ({ subagent }) => {
|
|
42972
43057
|
const { t } = useTranslate();
|
|
42973
|
-
const activities =
|
|
43058
|
+
const activities = React84__default.useMemo(
|
|
42974
43059
|
() => subagentMessagesToActivities(subagent.messages),
|
|
42975
43060
|
[subagent.messages]
|
|
42976
43061
|
);
|
|
@@ -43047,8 +43132,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
43047
43132
|
] });
|
|
43048
43133
|
};
|
|
43049
43134
|
CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
|
|
43050
|
-
const endRef =
|
|
43051
|
-
|
|
43135
|
+
const endRef = React84__default.useRef(null);
|
|
43136
|
+
React84__default.useEffect(() => {
|
|
43052
43137
|
if (!autoScroll) return;
|
|
43053
43138
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
43054
43139
|
}, [messages.length, autoScroll]);
|
|
@@ -43483,7 +43568,7 @@ var init_Timeline = __esm({
|
|
|
43483
43568
|
}) => {
|
|
43484
43569
|
const { t } = useTranslate();
|
|
43485
43570
|
const entityData = entity ?? [];
|
|
43486
|
-
const items =
|
|
43571
|
+
const items = React84__default.useMemo(() => {
|
|
43487
43572
|
if (propItems) return propItems;
|
|
43488
43573
|
if (entityData.length === 0) return [];
|
|
43489
43574
|
return entityData.map((record, idx) => {
|
|
@@ -43585,7 +43670,7 @@ var init_Timeline = __esm({
|
|
|
43585
43670
|
}
|
|
43586
43671
|
});
|
|
43587
43672
|
function extractToastProps(children) {
|
|
43588
|
-
if (!
|
|
43673
|
+
if (!React84__default.isValidElement(children)) {
|
|
43589
43674
|
if (typeof children === "string") {
|
|
43590
43675
|
return { message: children };
|
|
43591
43676
|
}
|
|
@@ -43627,7 +43712,7 @@ var init_ToastSlot = __esm({
|
|
|
43627
43712
|
eventBus.emit(`${prefix}CLOSE`);
|
|
43628
43713
|
};
|
|
43629
43714
|
if (!isVisible) return null;
|
|
43630
|
-
const isCustomContent =
|
|
43715
|
+
const isCustomContent = React84__default.isValidElement(children) && !message;
|
|
43631
43716
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
43632
43717
|
Toast,
|
|
43633
43718
|
{
|
|
@@ -44200,7 +44285,7 @@ function SuspenseConfigProvider({
|
|
|
44200
44285
|
config,
|
|
44201
44286
|
children
|
|
44202
44287
|
}) {
|
|
44203
|
-
return
|
|
44288
|
+
return React84__default.createElement(
|
|
44204
44289
|
SuspenseConfigContext.Provider,
|
|
44205
44290
|
{ value: config },
|
|
44206
44291
|
children
|
|
@@ -44242,7 +44327,7 @@ function enrichFormFields(fields, entityDef) {
|
|
|
44242
44327
|
}
|
|
44243
44328
|
return { name: field, label: humanizeFieldName(field) };
|
|
44244
44329
|
}
|
|
44245
|
-
if (field && typeof field === "object" && !Array.isArray(field) && !
|
|
44330
|
+
if (field && typeof field === "object" && !Array.isArray(field) && !React84__default.isValidElement(field) && !(field instanceof Date)) {
|
|
44246
44331
|
const obj = field;
|
|
44247
44332
|
const fieldName = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
|
|
44248
44333
|
if (!fieldName) return field;
|
|
@@ -44714,7 +44799,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
44714
44799
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
44715
44800
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
44716
44801
|
}
|
|
44717
|
-
return /* @__PURE__ */ jsx(
|
|
44802
|
+
return /* @__PURE__ */ jsx(React84__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
44718
44803
|
}
|
|
44719
44804
|
if (!child || typeof child !== "object") return null;
|
|
44720
44805
|
const childId = `${parentId}-${index}`;
|
|
@@ -44771,14 +44856,14 @@ function isPatternConfig(value) {
|
|
|
44771
44856
|
if (value === null || value === void 0) return false;
|
|
44772
44857
|
if (typeof value !== "object") return false;
|
|
44773
44858
|
if (Array.isArray(value)) return false;
|
|
44774
|
-
if (
|
|
44859
|
+
if (React84__default.isValidElement(value)) return false;
|
|
44775
44860
|
if (value instanceof Date) return false;
|
|
44776
44861
|
if (typeof value === "function") return false;
|
|
44777
44862
|
const record = value;
|
|
44778
44863
|
return "type" in record && typeof record.type === "string" && getComponentForPattern$1(record.type) !== null;
|
|
44779
44864
|
}
|
|
44780
44865
|
function isPlainConfigObject(value) {
|
|
44781
|
-
if (
|
|
44866
|
+
if (React84__default.isValidElement(value)) return false;
|
|
44782
44867
|
if (value instanceof Date) return false;
|
|
44783
44868
|
const proto = Object.getPrototypeOf(value);
|
|
44784
44869
|
return proto === Object.prototype || proto === null;
|
|
@@ -44914,7 +44999,7 @@ function SlotContentRenderer({
|
|
|
44914
44999
|
for (const slotKey of CONTENT_NODE_SLOTS) {
|
|
44915
45000
|
const slotVal = restProps[slotKey];
|
|
44916
45001
|
if (slotVal === void 0 || slotVal === null) continue;
|
|
44917
|
-
if (
|
|
45002
|
+
if (React84__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
|
|
44918
45003
|
const typelessChildren = !Array.isArray(slotVal) && typeof slotVal === "object" && !("type" in slotVal) && Array.isArray(slotVal.children) ? slotVal.children : void 0;
|
|
44919
45004
|
if (typelessChildren !== void 0 || Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
|
|
44920
45005
|
nodeSlotOverrides[slotKey] = renderPatternChildren(
|
|
@@ -44968,7 +45053,7 @@ function SlotContentRenderer({
|
|
|
44968
45053
|
const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
|
|
44969
45054
|
if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
|
|
44970
45055
|
const sample = resolvedItems[0];
|
|
44971
|
-
if (sample && typeof sample === "object" && !Array.isArray(sample) && !
|
|
45056
|
+
if (sample && typeof sample === "object" && !Array.isArray(sample) && !React84__default.isValidElement(sample) && !(sample instanceof Date)) {
|
|
44972
45057
|
const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
|
|
44973
45058
|
finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
|
|
44974
45059
|
}
|
|
@@ -45344,7 +45429,7 @@ function resolveLambdaBindings(body, params, item, index) {
|
|
|
45344
45429
|
}
|
|
45345
45430
|
return substituted;
|
|
45346
45431
|
}
|
|
45347
|
-
if (body !== null && typeof body === "object" && !
|
|
45432
|
+
if (body !== null && typeof body === "object" && !React84__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
45348
45433
|
const out = {};
|
|
45349
45434
|
for (const [k, v] of Object.entries(body)) {
|
|
45350
45435
|
out[k] = recur(v);
|
|
@@ -45377,7 +45462,7 @@ function deferLambdaEntityExprs(value) {
|
|
|
45377
45462
|
}
|
|
45378
45463
|
return arr.map((v) => deferLambdaEntityExprs(v));
|
|
45379
45464
|
}
|
|
45380
|
-
if (value !== null && typeof value === "object" && !
|
|
45465
|
+
if (value !== null && typeof value === "object" && !React84__default.isValidElement(value) && !(value instanceof Date) && typeof value !== "function" && !isRenderBindingMarker(value)) {
|
|
45381
45466
|
const out = {};
|
|
45382
45467
|
for (const [k, v] of Object.entries(value)) {
|
|
45383
45468
|
out[k] = deferLambdaEntityExprs(v);
|
|
@@ -45391,7 +45476,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
45391
45476
|
const resolvedBody = deferLambdaEntityExprs(
|
|
45392
45477
|
resolveLambdaBindings(lambdaBody, params, item, index)
|
|
45393
45478
|
);
|
|
45394
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
45479
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React84__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
45395
45480
|
return null;
|
|
45396
45481
|
}
|
|
45397
45482
|
const record = resolvedBody;
|
|
@@ -45410,7 +45495,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
45410
45495
|
props: childProps,
|
|
45411
45496
|
priority: 0
|
|
45412
45497
|
};
|
|
45413
|
-
return
|
|
45498
|
+
return React84__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
45414
45499
|
};
|
|
45415
45500
|
}
|
|
45416
45501
|
function convertNode(node, callerKey) {
|
|
@@ -45430,7 +45515,7 @@ function convertNode(node, callerKey) {
|
|
|
45430
45515
|
});
|
|
45431
45516
|
return anyChanged ? mapped : node;
|
|
45432
45517
|
}
|
|
45433
|
-
if (typeof node === "object" && !
|
|
45518
|
+
if (typeof node === "object" && !React84__default.isValidElement(node) && !(node instanceof Date)) {
|
|
45434
45519
|
return convertObjectProps(node);
|
|
45435
45520
|
}
|
|
45436
45521
|
return node;
|