@almadar/ui 5.141.0 → 5.143.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 +1326 -1240
- package/dist/avl/index.js +355 -269
- package/dist/{avl-schema-parser-B8Onmfsu.d.cts → avl-schema-parser-0hkiHOq3.d.ts} +233 -2
- package/dist/{avl-schema-parser-B8Onmfsu.d.ts → avl-schema-parser-BZ8pICOS.d.cts} +233 -2
- package/dist/{cn-rwc3svaX.d.cts → cn-CvImTgKH.d.cts} +1 -1
- package/dist/{cn-BDwC4QpH.d.ts → cn-DryTiahe.d.ts} +1 -1
- package/dist/components/index.cjs +1310 -1224
- package/dist/components/index.d.cts +13 -6
- package/dist/components/index.d.ts +13 -6
- package/dist/components/index.js +346 -260
- package/dist/lib/drawable/three/index.cjs +560 -194
- package/dist/lib/drawable/three/index.d.cts +14 -173
- package/dist/lib/drawable/three/index.d.ts +14 -173
- package/dist/lib/drawable/three/index.js +536 -170
- package/dist/lib/index.d.cts +2 -2
- package/dist/lib/index.d.ts +2 -2
- package/dist/{paintDispatch-BQn5Lyx1.d.cts → paintDispatch-D3-5_cOb.d.cts} +72 -32
- package/dist/{paintDispatch-BQn5Lyx1.d.ts → paintDispatch-D3-5_cOb.d.ts} +72 -32
- package/dist/providers/index.cjs +1209 -1123
- package/dist/providers/index.js +330 -244
- package/dist/runtime/index.cjs +1187 -1101
- package/dist/runtime/index.js +335 -249
- package/package.json +8 -8
package/dist/components/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
2
|
+
import * as React77 from 'react';
|
|
3
|
+
import React77__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, useState, useLayoutEffect, Suspense, useSyncExternalStore, lazy, useId } from 'react';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { EventBusContext, useTraitScopeChain, useCurrentPagePath, useGameAudioContextOptional, useEntitySchemaOptional, useEntityBindingSnapshot, useTraitScope, TraitScopeProvider } from '@almadar/ui/providers';
|
|
@@ -262,7 +262,7 @@ var init_SvgFlow = __esm({
|
|
|
262
262
|
width = 100,
|
|
263
263
|
height = 100
|
|
264
264
|
}) => {
|
|
265
|
-
const markerId =
|
|
265
|
+
const markerId = React77__default.useMemo(() => {
|
|
266
266
|
flowIdCounter += 1;
|
|
267
267
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
268
268
|
}, []);
|
|
@@ -855,7 +855,7 @@ var init_SvgRing = __esm({
|
|
|
855
855
|
width = 100,
|
|
856
856
|
height = 100
|
|
857
857
|
}) => {
|
|
858
|
-
const gradientId =
|
|
858
|
+
const gradientId = React77__default.useMemo(() => {
|
|
859
859
|
ringIdCounter += 1;
|
|
860
860
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
861
861
|
}, []);
|
|
@@ -1397,7 +1397,7 @@ var init_Icon = __esm({
|
|
|
1397
1397
|
const effectiveName = typeof icon === "string" && icon !== "" ? icon : name;
|
|
1398
1398
|
const effectiveStrokeWidth = strokeWidth != null && strokeWidth > 0 ? strokeWidth : void 0;
|
|
1399
1399
|
const family = useIconFamily();
|
|
1400
|
-
const RenderedComponent =
|
|
1400
|
+
const RenderedComponent = React77__default.useMemo(() => {
|
|
1401
1401
|
if (directIcon) return null;
|
|
1402
1402
|
return effectiveName ? resolveIconForFamily(effectiveName) : null;
|
|
1403
1403
|
}, [directIcon, effectiveName, family]);
|
|
@@ -1521,7 +1521,7 @@ var init_atlasSlice = __esm({
|
|
|
1521
1521
|
}
|
|
1522
1522
|
});
|
|
1523
1523
|
function useAtlasSliceDataUrl(asset) {
|
|
1524
|
-
const [, bump] =
|
|
1524
|
+
const [, bump] = React77.useReducer((x) => x + 1, 0);
|
|
1525
1525
|
if (!isAtlasAsset(asset)) return void 0;
|
|
1526
1526
|
const key = `${asset.atlas}#${asset.sprite}`;
|
|
1527
1527
|
const cached = sliceDataUrlCache.get(key);
|
|
@@ -1584,13 +1584,13 @@ function AtlasImage({
|
|
|
1584
1584
|
style,
|
|
1585
1585
|
"aria-hidden": ariaHidden
|
|
1586
1586
|
}) {
|
|
1587
|
-
const [, bump] =
|
|
1588
|
-
const canvasRef =
|
|
1587
|
+
const [, bump] = React77.useReducer((x) => x + 1, 0);
|
|
1588
|
+
const canvasRef = React77.useRef(null);
|
|
1589
1589
|
const sliced = isAtlasAsset(asset);
|
|
1590
1590
|
const atlas = sliced ? getAtlas(asset.atlas, bump) : void 0;
|
|
1591
1591
|
const img = sliced && asset?.url ? getSheetImage(asset.url, bump) : null;
|
|
1592
1592
|
const rect = sliced && atlas ? subRectFor(atlas, asset.sprite) : null;
|
|
1593
|
-
|
|
1593
|
+
React77.useEffect(() => {
|
|
1594
1594
|
const canvas = canvasRef.current;
|
|
1595
1595
|
if (!canvas || !img || !rect) return;
|
|
1596
1596
|
canvas.width = rect.sw;
|
|
@@ -1666,7 +1666,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
1666
1666
|
const IconComp = value;
|
|
1667
1667
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
1668
1668
|
}
|
|
1669
|
-
if (
|
|
1669
|
+
if (React77__default.isValidElement(value)) {
|
|
1670
1670
|
return value;
|
|
1671
1671
|
}
|
|
1672
1672
|
if (typeof value === "object" && value !== null && isIconLike(value)) {
|
|
@@ -1743,7 +1743,7 @@ var init_Button = __esm({
|
|
|
1743
1743
|
md: "h-icon-default w-icon-default",
|
|
1744
1744
|
lg: "h-icon-default w-icon-default"
|
|
1745
1745
|
};
|
|
1746
|
-
Button =
|
|
1746
|
+
Button = React77__default.forwardRef(
|
|
1747
1747
|
({
|
|
1748
1748
|
className,
|
|
1749
1749
|
variant = "primary",
|
|
@@ -1815,7 +1815,7 @@ var init_Input = __esm({
|
|
|
1815
1815
|
init_cn();
|
|
1816
1816
|
init_Icon();
|
|
1817
1817
|
init_useEventBus();
|
|
1818
|
-
Input =
|
|
1818
|
+
Input = React77__default.forwardRef(
|
|
1819
1819
|
({
|
|
1820
1820
|
className,
|
|
1821
1821
|
inputType,
|
|
@@ -1839,9 +1839,9 @@ var init_Input = __esm({
|
|
|
1839
1839
|
const eventBus = useEventBus();
|
|
1840
1840
|
const type = inputType || htmlType || "text";
|
|
1841
1841
|
const isDeclarative = typeof onChange === "string";
|
|
1842
|
-
const [localValue, setLocalValue] =
|
|
1843
|
-
const pendingEchoRef =
|
|
1844
|
-
|
|
1842
|
+
const [localValue, setLocalValue] = React77__default.useState(value);
|
|
1843
|
+
const pendingEchoRef = React77__default.useRef(/* @__PURE__ */ new Set());
|
|
1844
|
+
React77__default.useEffect(() => {
|
|
1845
1845
|
if (!isDeclarative) return;
|
|
1846
1846
|
const incoming = value == null ? "" : String(value);
|
|
1847
1847
|
if (pendingEchoRef.current.has(incoming)) {
|
|
@@ -2001,7 +2001,7 @@ var Label;
|
|
|
2001
2001
|
var init_Label = __esm({
|
|
2002
2002
|
"components/core/atoms/Label.tsx"() {
|
|
2003
2003
|
init_cn();
|
|
2004
|
-
Label =
|
|
2004
|
+
Label = React77__default.forwardRef(
|
|
2005
2005
|
({ className, required, children, ...props }, ref) => {
|
|
2006
2006
|
return /* @__PURE__ */ jsxs(
|
|
2007
2007
|
"label",
|
|
@@ -2028,7 +2028,7 @@ var init_Textarea = __esm({
|
|
|
2028
2028
|
"components/core/atoms/Textarea.tsx"() {
|
|
2029
2029
|
init_cn();
|
|
2030
2030
|
init_useEventBus();
|
|
2031
|
-
Textarea =
|
|
2031
|
+
Textarea = React77__default.forwardRef(
|
|
2032
2032
|
({ className, error, onChange, ...props }, ref) => {
|
|
2033
2033
|
const eventBus = useEventBus();
|
|
2034
2034
|
const handleChange = (e) => {
|
|
@@ -2267,7 +2267,7 @@ var init_Select = __esm({
|
|
|
2267
2267
|
init_cn();
|
|
2268
2268
|
init_Icon();
|
|
2269
2269
|
init_useEventBus();
|
|
2270
|
-
Select =
|
|
2270
|
+
Select = React77__default.forwardRef(
|
|
2271
2271
|
(props, _ref) => {
|
|
2272
2272
|
const { multiple, searchable, clearable } = props;
|
|
2273
2273
|
if (multiple || searchable || clearable) {
|
|
@@ -2284,7 +2284,7 @@ var init_Checkbox = __esm({
|
|
|
2284
2284
|
"components/core/atoms/Checkbox.tsx"() {
|
|
2285
2285
|
init_cn();
|
|
2286
2286
|
init_useEventBus();
|
|
2287
|
-
Checkbox =
|
|
2287
|
+
Checkbox = React77__default.forwardRef(
|
|
2288
2288
|
({ className, label, id, onChange, ...props }, ref) => {
|
|
2289
2289
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
2290
2290
|
const eventBus = useEventBus();
|
|
@@ -2338,7 +2338,7 @@ var init_Spinner = __esm({
|
|
|
2338
2338
|
md: "h-6 w-6",
|
|
2339
2339
|
lg: "h-8 w-8"
|
|
2340
2340
|
};
|
|
2341
|
-
Spinner =
|
|
2341
|
+
Spinner = React77__default.forwardRef(
|
|
2342
2342
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
2343
2343
|
if (overlay) {
|
|
2344
2344
|
return /* @__PURE__ */ jsx(
|
|
@@ -2428,7 +2428,7 @@ var init_Card = __esm({
|
|
|
2428
2428
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
2429
2429
|
"tile-image-first": "p-0 overflow-hidden"
|
|
2430
2430
|
};
|
|
2431
|
-
Card =
|
|
2431
|
+
Card = React77__default.forwardRef(
|
|
2432
2432
|
({
|
|
2433
2433
|
className,
|
|
2434
2434
|
variant = "bordered",
|
|
@@ -2477,9 +2477,9 @@ var init_Card = __esm({
|
|
|
2477
2477
|
}
|
|
2478
2478
|
);
|
|
2479
2479
|
Card.displayName = "Card";
|
|
2480
|
-
CardHeader =
|
|
2480
|
+
CardHeader = React77__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
2481
2481
|
CardHeader.displayName = "CardHeader";
|
|
2482
|
-
CardTitle =
|
|
2482
|
+
CardTitle = React77__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2483
2483
|
"h3",
|
|
2484
2484
|
{
|
|
2485
2485
|
ref,
|
|
@@ -2492,11 +2492,11 @@ var init_Card = __esm({
|
|
|
2492
2492
|
}
|
|
2493
2493
|
));
|
|
2494
2494
|
CardTitle.displayName = "CardTitle";
|
|
2495
|
-
CardContent =
|
|
2495
|
+
CardContent = React77__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
2496
2496
|
CardContent.displayName = "CardContent";
|
|
2497
2497
|
CardBody = CardContent;
|
|
2498
2498
|
CardBody.displayName = "CardBody";
|
|
2499
|
-
CardFooter =
|
|
2499
|
+
CardFooter = React77__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2500
2500
|
"div",
|
|
2501
2501
|
{
|
|
2502
2502
|
ref,
|
|
@@ -2550,7 +2550,7 @@ var init_Badge = __esm({
|
|
|
2550
2550
|
md: "px-2.5 py-1 text-sm",
|
|
2551
2551
|
lg: "px-3 py-1.5 text-base"
|
|
2552
2552
|
};
|
|
2553
|
-
Badge =
|
|
2553
|
+
Badge = React77__default.forwardRef(
|
|
2554
2554
|
({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, ...props }, ref) => {
|
|
2555
2555
|
const iconSizes3 = {
|
|
2556
2556
|
sm: "h-icon-default w-icon-default",
|
|
@@ -2678,7 +2678,7 @@ var init_FilterPill = __esm({
|
|
|
2678
2678
|
md: "w-3.5 h-3.5",
|
|
2679
2679
|
lg: "w-4 h-4"
|
|
2680
2680
|
};
|
|
2681
|
-
FilterPill =
|
|
2681
|
+
FilterPill = React77__default.forwardRef(
|
|
2682
2682
|
({
|
|
2683
2683
|
className,
|
|
2684
2684
|
variant = "default",
|
|
@@ -2807,8 +2807,8 @@ var init_Avatar = __esm({
|
|
|
2807
2807
|
actionPayload
|
|
2808
2808
|
}) => {
|
|
2809
2809
|
const eventBus = useEventBus();
|
|
2810
|
-
const [imgFailed, setImgFailed] =
|
|
2811
|
-
|
|
2810
|
+
const [imgFailed, setImgFailed] = React77__default.useState(false);
|
|
2811
|
+
React77__default.useEffect(() => {
|
|
2812
2812
|
setImgFailed(false);
|
|
2813
2813
|
}, [src]);
|
|
2814
2814
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -3060,7 +3060,7 @@ var init_Box = __esm({
|
|
|
3060
3060
|
fixed: "fixed",
|
|
3061
3061
|
sticky: "sticky"
|
|
3062
3062
|
};
|
|
3063
|
-
Box =
|
|
3063
|
+
Box = React77__default.forwardRef(
|
|
3064
3064
|
({
|
|
3065
3065
|
padding,
|
|
3066
3066
|
paddingX,
|
|
@@ -3125,7 +3125,7 @@ var init_Box = __esm({
|
|
|
3125
3125
|
onPointerDown?.(e);
|
|
3126
3126
|
}, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
|
|
3127
3127
|
const isClickable = action || onClick;
|
|
3128
|
-
return
|
|
3128
|
+
return React77__default.createElement(
|
|
3129
3129
|
Component,
|
|
3130
3130
|
{
|
|
3131
3131
|
ref,
|
|
@@ -3179,7 +3179,7 @@ var init_Center = __esm({
|
|
|
3179
3179
|
as: Component = "div"
|
|
3180
3180
|
}) => {
|
|
3181
3181
|
const mergedStyle = minHeight ? { minHeight, ...style } : style;
|
|
3182
|
-
return
|
|
3182
|
+
return React77__default.createElement(Component, {
|
|
3183
3183
|
className: cn(
|
|
3184
3184
|
inline ? "inline-flex" : "flex",
|
|
3185
3185
|
horizontal && "justify-center",
|
|
@@ -3447,7 +3447,7 @@ var init_Radio = __esm({
|
|
|
3447
3447
|
md: "w-2.5 h-2.5",
|
|
3448
3448
|
lg: "w-3 h-3"
|
|
3449
3449
|
};
|
|
3450
|
-
Radio =
|
|
3450
|
+
Radio = React77__default.forwardRef(
|
|
3451
3451
|
({
|
|
3452
3452
|
label,
|
|
3453
3453
|
helperText,
|
|
@@ -3464,12 +3464,12 @@ var init_Radio = __esm({
|
|
|
3464
3464
|
onChange,
|
|
3465
3465
|
...props
|
|
3466
3466
|
}, ref) => {
|
|
3467
|
-
const reactId =
|
|
3467
|
+
const reactId = React77__default.useId();
|
|
3468
3468
|
const baseId = id || `radio-${reactId}`;
|
|
3469
3469
|
const hasError = !!error;
|
|
3470
3470
|
const eventBus = useEventBus();
|
|
3471
|
-
const [selected, setSelected] =
|
|
3472
|
-
|
|
3471
|
+
const [selected, setSelected] = React77__default.useState(value);
|
|
3472
|
+
React77__default.useEffect(() => {
|
|
3473
3473
|
if (value !== void 0) setSelected(value);
|
|
3474
3474
|
}, [value]);
|
|
3475
3475
|
const pick = (next, e) => {
|
|
@@ -3651,7 +3651,7 @@ var init_Switch = __esm({
|
|
|
3651
3651
|
"components/core/atoms/Switch.tsx"() {
|
|
3652
3652
|
"use client";
|
|
3653
3653
|
init_cn();
|
|
3654
|
-
Switch =
|
|
3654
|
+
Switch = React77.forwardRef(
|
|
3655
3655
|
({
|
|
3656
3656
|
checked,
|
|
3657
3657
|
defaultChecked = false,
|
|
@@ -3662,10 +3662,10 @@ var init_Switch = __esm({
|
|
|
3662
3662
|
name,
|
|
3663
3663
|
className
|
|
3664
3664
|
}, ref) => {
|
|
3665
|
-
const [isChecked, setIsChecked] =
|
|
3665
|
+
const [isChecked, setIsChecked] = React77.useState(
|
|
3666
3666
|
checked !== void 0 ? checked : defaultChecked
|
|
3667
3667
|
);
|
|
3668
|
-
|
|
3668
|
+
React77.useEffect(() => {
|
|
3669
3669
|
if (checked !== void 0) {
|
|
3670
3670
|
setIsChecked(checked);
|
|
3671
3671
|
}
|
|
@@ -3828,7 +3828,7 @@ var init_Stack = __esm({
|
|
|
3828
3828
|
};
|
|
3829
3829
|
const isHorizontal = direction === "horizontal";
|
|
3830
3830
|
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";
|
|
3831
|
-
return
|
|
3831
|
+
return React77__default.createElement(
|
|
3832
3832
|
Component,
|
|
3833
3833
|
{
|
|
3834
3834
|
className: cn(
|
|
@@ -4117,7 +4117,7 @@ var init_Typography = __esm({
|
|
|
4117
4117
|
if (format !== void 0 && format !== "none" && (typeof body === "string" || typeof body === "number" || body instanceof Date)) {
|
|
4118
4118
|
body = formatValue(body, format);
|
|
4119
4119
|
}
|
|
4120
|
-
return
|
|
4120
|
+
return React77__default.createElement(
|
|
4121
4121
|
Component,
|
|
4122
4122
|
{
|
|
4123
4123
|
id,
|
|
@@ -4351,7 +4351,7 @@ var Dialog;
|
|
|
4351
4351
|
var init_Dialog = __esm({
|
|
4352
4352
|
"components/core/atoms/Dialog.tsx"() {
|
|
4353
4353
|
init_cn();
|
|
4354
|
-
Dialog =
|
|
4354
|
+
Dialog = React77__default.forwardRef(
|
|
4355
4355
|
({
|
|
4356
4356
|
role = "dialog",
|
|
4357
4357
|
"aria-modal": ariaModal = true,
|
|
@@ -4377,7 +4377,7 @@ var Aside;
|
|
|
4377
4377
|
var init_Aside = __esm({
|
|
4378
4378
|
"components/core/atoms/Aside.tsx"() {
|
|
4379
4379
|
init_cn();
|
|
4380
|
-
Aside =
|
|
4380
|
+
Aside = React77__default.forwardRef(
|
|
4381
4381
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
4382
4382
|
);
|
|
4383
4383
|
Aside.displayName = "Aside";
|
|
@@ -4456,9 +4456,9 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4456
4456
|
className
|
|
4457
4457
|
}) => {
|
|
4458
4458
|
const { t } = useTranslate();
|
|
4459
|
-
const [isVisible, setIsVisible] =
|
|
4460
|
-
const timeoutRef =
|
|
4461
|
-
const triggerRef =
|
|
4459
|
+
const [isVisible, setIsVisible] = React77__default.useState(false);
|
|
4460
|
+
const timeoutRef = React77__default.useRef(null);
|
|
4461
|
+
const triggerRef = React77__default.useRef(null);
|
|
4462
4462
|
const handleMouseEnter = () => {
|
|
4463
4463
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4464
4464
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -4469,7 +4469,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4469
4469
|
};
|
|
4470
4470
|
const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
|
|
4471
4471
|
const open = isVisible || revealed;
|
|
4472
|
-
|
|
4472
|
+
React77__default.useEffect(() => {
|
|
4473
4473
|
return () => {
|
|
4474
4474
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4475
4475
|
};
|
|
@@ -4679,7 +4679,7 @@ var init_StatusDot = __esm({
|
|
|
4679
4679
|
md: "w-2.5 h-2.5",
|
|
4680
4680
|
lg: "w-3 h-3"
|
|
4681
4681
|
};
|
|
4682
|
-
StatusDot =
|
|
4682
|
+
StatusDot = React77__default.forwardRef(
|
|
4683
4683
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
4684
4684
|
return /* @__PURE__ */ jsx(
|
|
4685
4685
|
"span",
|
|
@@ -4733,7 +4733,7 @@ var init_TrendIndicator = __esm({
|
|
|
4733
4733
|
down: "trending-down",
|
|
4734
4734
|
flat: "arrow-right"
|
|
4735
4735
|
};
|
|
4736
|
-
TrendIndicator =
|
|
4736
|
+
TrendIndicator = React77__default.forwardRef(
|
|
4737
4737
|
({
|
|
4738
4738
|
className,
|
|
4739
4739
|
value,
|
|
@@ -4802,7 +4802,7 @@ var init_RangeSlider = __esm({
|
|
|
4802
4802
|
md: "w-4 h-4",
|
|
4803
4803
|
lg: "w-5 h-5"
|
|
4804
4804
|
};
|
|
4805
|
-
RangeSlider =
|
|
4805
|
+
RangeSlider = React77__default.forwardRef(
|
|
4806
4806
|
({
|
|
4807
4807
|
className,
|
|
4808
4808
|
min = 0,
|
|
@@ -5413,7 +5413,7 @@ var init_ContentSection = __esm({
|
|
|
5413
5413
|
md: "py-16",
|
|
5414
5414
|
lg: "py-24"
|
|
5415
5415
|
};
|
|
5416
|
-
ContentSection =
|
|
5416
|
+
ContentSection = React77__default.forwardRef(
|
|
5417
5417
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
5418
5418
|
return /* @__PURE__ */ jsx(
|
|
5419
5419
|
Box,
|
|
@@ -5947,7 +5947,7 @@ var init_AnimatedReveal = __esm({
|
|
|
5947
5947
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
5948
5948
|
"none": {}
|
|
5949
5949
|
};
|
|
5950
|
-
AnimatedReveal =
|
|
5950
|
+
AnimatedReveal = React77__default.forwardRef(
|
|
5951
5951
|
({
|
|
5952
5952
|
trigger = "scroll",
|
|
5953
5953
|
animation = "fade-up",
|
|
@@ -6107,7 +6107,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6107
6107
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
6108
6108
|
"use client";
|
|
6109
6109
|
init_cn();
|
|
6110
|
-
AnimatedGraphic =
|
|
6110
|
+
AnimatedGraphic = React77__default.forwardRef(
|
|
6111
6111
|
({
|
|
6112
6112
|
src,
|
|
6113
6113
|
svgContent,
|
|
@@ -6130,7 +6130,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6130
6130
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
6131
6131
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
6132
6132
|
const prevAnimateRef = useRef(animate);
|
|
6133
|
-
const setRef =
|
|
6133
|
+
const setRef = React77__default.useCallback(
|
|
6134
6134
|
(node) => {
|
|
6135
6135
|
containerRef.current = node;
|
|
6136
6136
|
if (typeof ref === "function") ref(node);
|
|
@@ -6231,7 +6231,7 @@ function resolveMarkerExpression(expression, entity, config, state) {
|
|
|
6231
6231
|
function isPlainObject(value) {
|
|
6232
6232
|
if (value === null || value === void 0 || typeof value !== "object") return false;
|
|
6233
6233
|
if (Array.isArray(value)) return false;
|
|
6234
|
-
if (
|
|
6234
|
+
if (React77__default.isValidElement(value)) return false;
|
|
6235
6235
|
if (value instanceof Date) return false;
|
|
6236
6236
|
if (typeof value === "function") return false;
|
|
6237
6237
|
return true;
|
|
@@ -6875,7 +6875,7 @@ var init_ErrorBoundary = __esm({
|
|
|
6875
6875
|
}
|
|
6876
6876
|
);
|
|
6877
6877
|
};
|
|
6878
|
-
ErrorBoundary = class extends
|
|
6878
|
+
ErrorBoundary = class extends React77__default.Component {
|
|
6879
6879
|
constructor(props) {
|
|
6880
6880
|
super(props);
|
|
6881
6881
|
__publicField(this, "reset", () => {
|
|
@@ -7158,7 +7158,7 @@ var init_Container = __esm({
|
|
|
7158
7158
|
as: Component = "div"
|
|
7159
7159
|
}) => {
|
|
7160
7160
|
const resolvedSize = maxWidth ?? size ?? "lg";
|
|
7161
|
-
return
|
|
7161
|
+
return React77__default.createElement(
|
|
7162
7162
|
Component,
|
|
7163
7163
|
{
|
|
7164
7164
|
className: cn(
|
|
@@ -10522,7 +10522,7 @@ var init_CodeBlock = __esm({
|
|
|
10522
10522
|
DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
|
|
10523
10523
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
10524
10524
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
10525
|
-
CodeBlock =
|
|
10525
|
+
CodeBlock = React77__default.memo(
|
|
10526
10526
|
({
|
|
10527
10527
|
code: rawCode,
|
|
10528
10528
|
language = "text",
|
|
@@ -11110,7 +11110,7 @@ var init_MarkdownContent = __esm({
|
|
|
11110
11110
|
init_Box();
|
|
11111
11111
|
init_CodeBlock();
|
|
11112
11112
|
init_cn();
|
|
11113
|
-
MarkdownContent =
|
|
11113
|
+
MarkdownContent = React77__default.memo(
|
|
11114
11114
|
({ content, direction = "ltr", className }) => {
|
|
11115
11115
|
const { t: _t } = useTranslate();
|
|
11116
11116
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -12437,7 +12437,7 @@ var init_StateMachineView = __esm({
|
|
|
12437
12437
|
style: { top: title ? 30 : 0 },
|
|
12438
12438
|
children: [
|
|
12439
12439
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
12440
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
12440
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React77__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
12441
12441
|
StateNode,
|
|
12442
12442
|
{
|
|
12443
12443
|
state,
|
|
@@ -15002,6 +15002,12 @@ var init_CalendarGrid = __esm({
|
|
|
15002
15002
|
CalendarGrid.displayName = "CalendarGrid";
|
|
15003
15003
|
}
|
|
15004
15004
|
});
|
|
15005
|
+
var DrawableRegistryContext;
|
|
15006
|
+
var init_registry = __esm({
|
|
15007
|
+
"lib/drawable/registry.ts"() {
|
|
15008
|
+
DrawableRegistryContext = createContext(null);
|
|
15009
|
+
}
|
|
15010
|
+
});
|
|
15005
15011
|
function MiniMap({
|
|
15006
15012
|
tiles = DEFAULT_TILES,
|
|
15007
15013
|
units = DEFAULT_UNITS,
|
|
@@ -15014,8 +15020,8 @@ function MiniMap({
|
|
|
15014
15020
|
tileAssets,
|
|
15015
15021
|
unitAssets
|
|
15016
15022
|
}) {
|
|
15017
|
-
const canvasRef =
|
|
15018
|
-
const imgCacheRef =
|
|
15023
|
+
const canvasRef = React77.useRef(null);
|
|
15024
|
+
const imgCacheRef = React77.useRef(/* @__PURE__ */ new Map());
|
|
15019
15025
|
function loadImg(url) {
|
|
15020
15026
|
const cached = imgCacheRef.current.get(url);
|
|
15021
15027
|
if (cached) return cached.complete ? cached : null;
|
|
@@ -15031,7 +15037,7 @@ function MiniMap({
|
|
|
15031
15037
|
imgCacheRef.current.set(url, img);
|
|
15032
15038
|
return null;
|
|
15033
15039
|
}
|
|
15034
|
-
|
|
15040
|
+
React77.useEffect(() => {
|
|
15035
15041
|
const canvas = canvasRef.current;
|
|
15036
15042
|
if (!canvas) return;
|
|
15037
15043
|
const ctx = canvas.getContext("2d");
|
|
@@ -16016,12 +16022,6 @@ var init_DrawSprite = __esm({
|
|
|
16016
16022
|
};
|
|
16017
16023
|
}
|
|
16018
16024
|
});
|
|
16019
|
-
var DrawableRegistryContext;
|
|
16020
|
-
var init_registry = __esm({
|
|
16021
|
-
"lib/drawable/registry.ts"() {
|
|
16022
|
-
DrawableRegistryContext = createContext(null);
|
|
16023
|
-
}
|
|
16024
|
-
});
|
|
16025
16025
|
function isAnimatedShape(node) {
|
|
16026
16026
|
return Boolean(node.animation && node.animation.durationMs > 0 && node.animation.keyframes.length > 0);
|
|
16027
16027
|
}
|
|
@@ -16269,6 +16269,83 @@ var init_DrawText = __esm({
|
|
|
16269
16269
|
};
|
|
16270
16270
|
}
|
|
16271
16271
|
});
|
|
16272
|
+
function isAnimatedGroup(node) {
|
|
16273
|
+
return Boolean(node.animation && node.animation.durationMs > 0 && node.animation.keyframes.length > 0);
|
|
16274
|
+
}
|
|
16275
|
+
function DrawGroup(props) {
|
|
16276
|
+
const register = useContext(DrawableRegistryContext);
|
|
16277
|
+
if (register) register({ ...props, type: "draw-group" });
|
|
16278
|
+
return null;
|
|
16279
|
+
}
|
|
16280
|
+
var init_DrawGroup = __esm({
|
|
16281
|
+
"components/game/atoms/DrawGroup.tsx"() {
|
|
16282
|
+
"use client";
|
|
16283
|
+
init_registry();
|
|
16284
|
+
}
|
|
16285
|
+
});
|
|
16286
|
+
function applyMeshAnimation(node, timeMs) {
|
|
16287
|
+
const anim = node.animation;
|
|
16288
|
+
if (!anim || !(anim.durationMs > 0) || anim.keyframes.length === 0) return null;
|
|
16289
|
+
const frames = [...anim.keyframes].sort((a, b) => a.at - b.at);
|
|
16290
|
+
const cycle = timeMs / anim.durationMs;
|
|
16291
|
+
const t = anim.loop === false ? Math.min(cycle, 1) : cycle - Math.floor(cycle);
|
|
16292
|
+
const trackValue = (key) => {
|
|
16293
|
+
const defined = frames.filter((f3) => f3[key] !== void 0);
|
|
16294
|
+
if (defined.length === 0) return void 0;
|
|
16295
|
+
let prev;
|
|
16296
|
+
let next;
|
|
16297
|
+
for (const f3 of defined) {
|
|
16298
|
+
if (f3.at <= t) prev = f3;
|
|
16299
|
+
else if (!next) next = f3;
|
|
16300
|
+
}
|
|
16301
|
+
if (!prev) return defined[0][key];
|
|
16302
|
+
if (!next) return prev[key];
|
|
16303
|
+
const span = next.at - prev.at;
|
|
16304
|
+
const k = span > 0 ? (t - prev.at) / span : 1;
|
|
16305
|
+
const a = prev[key];
|
|
16306
|
+
const b = next[key];
|
|
16307
|
+
if (typeof a === "number" && typeof b === "number") return lerp2(a, b, k);
|
|
16308
|
+
return a;
|
|
16309
|
+
};
|
|
16310
|
+
const num2 = {};
|
|
16311
|
+
for (const key of NUMERIC_TRACKS2) {
|
|
16312
|
+
const v = trackValue(key);
|
|
16313
|
+
if (v !== void 0) num2[key] = v;
|
|
16314
|
+
}
|
|
16315
|
+
return {
|
|
16316
|
+
offset: [num2.offsetX ?? 0, num2.offsetY ?? 0, num2.offsetZ ?? 0],
|
|
16317
|
+
rotate: [num2.rotateX ?? 0, num2.rotateY ?? 0, num2.rotateZ ?? 0],
|
|
16318
|
+
scale: num2.scale ?? 1,
|
|
16319
|
+
opacity: num2.opacity,
|
|
16320
|
+
emissiveIntensity: num2.emissiveIntensity,
|
|
16321
|
+
color: trackValue("color"),
|
|
16322
|
+
emissive: trackValue("emissive")
|
|
16323
|
+
};
|
|
16324
|
+
}
|
|
16325
|
+
function DrawMesh(props) {
|
|
16326
|
+
const register = useContext(DrawableRegistryContext);
|
|
16327
|
+
if (register) register({ ...props, type: "draw-mesh" });
|
|
16328
|
+
return null;
|
|
16329
|
+
}
|
|
16330
|
+
var lerp2, NUMERIC_TRACKS2;
|
|
16331
|
+
var init_DrawMesh = __esm({
|
|
16332
|
+
"components/game/atoms/DrawMesh.tsx"() {
|
|
16333
|
+
"use client";
|
|
16334
|
+
init_registry();
|
|
16335
|
+
lerp2 = (a, b, k) => a + (b - a) * k;
|
|
16336
|
+
NUMERIC_TRACKS2 = [
|
|
16337
|
+
"offsetX",
|
|
16338
|
+
"offsetY",
|
|
16339
|
+
"offsetZ",
|
|
16340
|
+
"rotateX",
|
|
16341
|
+
"rotateY",
|
|
16342
|
+
"rotateZ",
|
|
16343
|
+
"scale",
|
|
16344
|
+
"opacity",
|
|
16345
|
+
"emissiveIntensity"
|
|
16346
|
+
];
|
|
16347
|
+
}
|
|
16348
|
+
});
|
|
16272
16349
|
|
|
16273
16350
|
// components/game/molecules/DrawSpriteLayer.tsx
|
|
16274
16351
|
function DrawSpriteLayer(_props) {
|
|
@@ -16335,18 +16412,22 @@ function paintDrawable(painter, node, dctx) {
|
|
|
16335
16412
|
if (!isValidScenePos(node.position)) break;
|
|
16336
16413
|
if (!Array.isArray(node.items)) break;
|
|
16337
16414
|
const p = dctx.projector.project(node.position);
|
|
16415
|
+
const anim = dctx.time > 0 && isAnimatedGroup(node) ? applyMeshAnimation(node, dctx.time) : null;
|
|
16416
|
+
const tw = dctx.projector.tileWidth;
|
|
16338
16417
|
painter.save();
|
|
16339
|
-
painter.translate(p.x, p.y);
|
|
16340
|
-
|
|
16341
|
-
if (
|
|
16342
|
-
|
|
16418
|
+
painter.translate(p.x + (anim ? anim.offset[0] * tw : 0), p.y + (anim ? anim.offset[1] * tw : 0));
|
|
16419
|
+
const scale = (node.scale ?? 1) * (anim?.scale ?? 1);
|
|
16420
|
+
if (scale !== 1) painter.scale(scale, scale);
|
|
16421
|
+
const rotate = (node.rotate ?? 0) + (node.rotation?.[2] ?? 0) + (anim?.rotate[2] ?? 0);
|
|
16422
|
+
if (rotate !== 0) painter.rotate(rotate);
|
|
16423
|
+
const opacity = (node.opacity ?? 1) * (anim?.opacity ?? 1);
|
|
16424
|
+
if (opacity !== 1) painter.setAlpha(opacity);
|
|
16343
16425
|
if (node.clip) {
|
|
16344
|
-
const tw = dctx.projector.tileWidth;
|
|
16345
16426
|
painter.scale(tw, tw);
|
|
16346
16427
|
painter.clipPath(node.clip);
|
|
16347
16428
|
painter.scale(1 / tw, 1 / tw);
|
|
16348
16429
|
}
|
|
16349
|
-
const childCtx =
|
|
16430
|
+
const childCtx = scale !== 1 ? { ...dctx, groupScale: (dctx.groupScale ?? 1) * scale } : dctx;
|
|
16350
16431
|
for (const item of node.items) paintDrawable(painter, item, childCtx);
|
|
16351
16432
|
painter.restore();
|
|
16352
16433
|
break;
|
|
@@ -16372,6 +16453,8 @@ var init_paintDispatch = __esm({
|
|
|
16372
16453
|
init_DrawSprite();
|
|
16373
16454
|
init_DrawShape();
|
|
16374
16455
|
init_DrawText();
|
|
16456
|
+
init_DrawGroup();
|
|
16457
|
+
init_DrawMesh();
|
|
16375
16458
|
init_DrawSpriteLayer();
|
|
16376
16459
|
init_DrawShapeLayer();
|
|
16377
16460
|
init_DrawTextLayer();
|
|
@@ -16467,7 +16550,7 @@ function Canvas2D({
|
|
|
16467
16550
|
const registerChildDrawable = useCallback((node) => {
|
|
16468
16551
|
childDrawablesRef.current.push(node);
|
|
16469
16552
|
}, []);
|
|
16470
|
-
const hasJsxChildren =
|
|
16553
|
+
const hasJsxChildren = React77.Children.count(children) > 0;
|
|
16471
16554
|
function isDrawableLayer(node) {
|
|
16472
16555
|
return node.type === "draw-sprite-layer" || node.type === "draw-shape-layer" || node.type === "draw-text-layer";
|
|
16473
16556
|
}
|
|
@@ -16618,7 +16701,8 @@ function Canvas2D({
|
|
|
16618
16701
|
const miniMapHeight = gridExtent.height || 10;
|
|
16619
16702
|
const drawableIsAnimated = (node) => {
|
|
16620
16703
|
if (node.type === "draw-shape") return isAnimatedShape(node);
|
|
16621
|
-
if (node.type === "draw-group")
|
|
16704
|
+
if (node.type === "draw-group")
|
|
16705
|
+
return isAnimatedGroup(node) || Array.isArray(node.items) && node.items.some(drawableIsAnimated);
|
|
16622
16706
|
if (node.type === "draw-shape-layer") return Array.isArray(node.items) && node.items.some(isAnimatedShape);
|
|
16623
16707
|
return false;
|
|
16624
16708
|
};
|
|
@@ -16960,6 +17044,7 @@ var init_Canvas2D = __esm({
|
|
|
16960
17044
|
init_projector();
|
|
16961
17045
|
init_paintDispatch();
|
|
16962
17046
|
init_DrawShape();
|
|
17047
|
+
init_DrawGroup();
|
|
16963
17048
|
init_registry();
|
|
16964
17049
|
init_hitTest();
|
|
16965
17050
|
init_isometric();
|
|
@@ -16996,6 +17081,8 @@ function Canvas({
|
|
|
16996
17081
|
showCoordinates,
|
|
16997
17082
|
showTileInfo,
|
|
16998
17083
|
fogOfWar,
|
|
17084
|
+
lighting,
|
|
17085
|
+
post,
|
|
16999
17086
|
tileClickEvent,
|
|
17000
17087
|
unitClickEvent,
|
|
17001
17088
|
tileHoverEvent,
|
|
@@ -17007,10 +17094,25 @@ function Canvas({
|
|
|
17007
17094
|
}) {
|
|
17008
17095
|
canvasLog.debug("Canvas render", { mode, drawablesCount: drawables?.length, projection, camera: camera ? JSON.stringify(camera) : void 0 });
|
|
17009
17096
|
const zoom = camera?.zoom;
|
|
17097
|
+
const childDrawablesRef = useRef([]);
|
|
17098
|
+
if (mode === "3d") childDrawablesRef.current = [];
|
|
17099
|
+
const registerChildDrawable = useCallback((node) => {
|
|
17100
|
+
childDrawablesRef.current.push(node);
|
|
17101
|
+
}, []);
|
|
17102
|
+
const [childDrawables, setChildDrawables] = useState([]);
|
|
17103
|
+
useEffect(() => {
|
|
17104
|
+
if (mode !== "3d") return;
|
|
17105
|
+
const next = childDrawablesRef.current;
|
|
17106
|
+
canvasLog.debug("children:adopt", { registered: next.length, adopted: childDrawables.length });
|
|
17107
|
+
if (next.length === 0 && React77.Children.count(children) > 0) return;
|
|
17108
|
+
setChildDrawables(
|
|
17109
|
+
(prev) => prev.length === next.length && JSON.stringify(prev) === JSON.stringify(next) ? prev : [...next]
|
|
17110
|
+
);
|
|
17111
|
+
});
|
|
17010
17112
|
if (mode === "3d") {
|
|
17011
17113
|
const props3d = {
|
|
17012
17114
|
className,
|
|
17013
|
-
drawables,
|
|
17115
|
+
drawables: [...drawables ?? [], ...childDrawables],
|
|
17014
17116
|
isLoading,
|
|
17015
17117
|
cameraMode: to3DCameraMode(camera?.mode),
|
|
17016
17118
|
...zoom !== void 0 ? { scale: zoom } : {},
|
|
@@ -17026,6 +17128,8 @@ function Canvas({
|
|
|
17026
17128
|
showCoordinates,
|
|
17027
17129
|
showTileInfo,
|
|
17028
17130
|
fogOfWar,
|
|
17131
|
+
lighting,
|
|
17132
|
+
post,
|
|
17029
17133
|
tileClickEvent,
|
|
17030
17134
|
unitClickEvent,
|
|
17031
17135
|
tileHoverEvent,
|
|
@@ -17034,7 +17138,10 @@ function Canvas({
|
|
|
17034
17138
|
keyMap,
|
|
17035
17139
|
keyUpMap
|
|
17036
17140
|
};
|
|
17037
|
-
return /* @__PURE__ */
|
|
17141
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
17142
|
+
/* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(Canvas3DHost, { ...props3d }) }),
|
|
17143
|
+
React77.Children.count(children) > 0 && /* @__PURE__ */ jsx(DrawableRegistryContext.Provider, { value: registerChildDrawable, children: /* @__PURE__ */ jsx("div", { "aria-hidden": "true", style: { position: "absolute", width: 0, height: 0, overflow: "hidden" }, children }) })
|
|
17144
|
+
] });
|
|
17038
17145
|
}
|
|
17039
17146
|
return /* @__PURE__ */ jsx(
|
|
17040
17147
|
Canvas2D,
|
|
@@ -17066,6 +17173,7 @@ var Canvas3DHost, canvasLog;
|
|
|
17066
17173
|
var init_Canvas = __esm({
|
|
17067
17174
|
"components/game/molecules/Canvas.tsx"() {
|
|
17068
17175
|
"use client";
|
|
17176
|
+
init_registry();
|
|
17069
17177
|
init_Canvas2D();
|
|
17070
17178
|
Canvas3DHost = lazy(
|
|
17071
17179
|
() => import('@almadar/ui/components/molecules/game/three').then((m) => ({ default: m.Canvas3DHost }))
|
|
@@ -19341,9 +19449,9 @@ function ControlButton({
|
|
|
19341
19449
|
className
|
|
19342
19450
|
}) {
|
|
19343
19451
|
const eventBus = useEventBus();
|
|
19344
|
-
const [isPressed, setIsPressed] =
|
|
19452
|
+
const [isPressed, setIsPressed] = React77.useState(false);
|
|
19345
19453
|
const actualPressed = pressed ?? isPressed;
|
|
19346
|
-
const handlePointerDown =
|
|
19454
|
+
const handlePointerDown = React77.useCallback(
|
|
19347
19455
|
(e) => {
|
|
19348
19456
|
e.preventDefault();
|
|
19349
19457
|
if (disabled) return;
|
|
@@ -19353,7 +19461,7 @@ function ControlButton({
|
|
|
19353
19461
|
},
|
|
19354
19462
|
[disabled, pressEvent, eventBus, onPress]
|
|
19355
19463
|
);
|
|
19356
|
-
const handlePointerUp =
|
|
19464
|
+
const handlePointerUp = React77.useCallback(
|
|
19357
19465
|
(e) => {
|
|
19358
19466
|
e.preventDefault();
|
|
19359
19467
|
if (disabled) return;
|
|
@@ -19363,7 +19471,7 @@ function ControlButton({
|
|
|
19363
19471
|
},
|
|
19364
19472
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
19365
19473
|
);
|
|
19366
|
-
const handlePointerLeave =
|
|
19474
|
+
const handlePointerLeave = React77.useCallback(
|
|
19367
19475
|
(e) => {
|
|
19368
19476
|
if (isPressed) {
|
|
19369
19477
|
setIsPressed(false);
|
|
@@ -19451,8 +19559,8 @@ function ControlGrid({
|
|
|
19451
19559
|
className
|
|
19452
19560
|
}) {
|
|
19453
19561
|
const eventBus = useEventBus();
|
|
19454
|
-
const [active, setActive] =
|
|
19455
|
-
const handlePress =
|
|
19562
|
+
const [active, setActive] = React77.useState(/* @__PURE__ */ new Set());
|
|
19563
|
+
const handlePress = React77.useCallback(
|
|
19456
19564
|
(id) => {
|
|
19457
19565
|
setActive((prev) => new Set(prev).add(id));
|
|
19458
19566
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -19466,7 +19574,7 @@ function ControlGrid({
|
|
|
19466
19574
|
},
|
|
19467
19575
|
[kind, actionEvent, directionEvent, directionEvents, eventBus, onAction, onDirection]
|
|
19468
19576
|
);
|
|
19469
|
-
const handleRelease =
|
|
19577
|
+
const handleRelease = React77.useCallback(
|
|
19470
19578
|
(id) => {
|
|
19471
19579
|
setActive((prev) => {
|
|
19472
19580
|
const next = new Set(prev);
|
|
@@ -20704,8 +20812,8 @@ var init_Menu = __esm({
|
|
|
20704
20812
|
"bottom-end": "bottom-start"
|
|
20705
20813
|
};
|
|
20706
20814
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
20707
|
-
const triggerChild =
|
|
20708
|
-
const triggerElement =
|
|
20815
|
+
const triggerChild = React77__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
20816
|
+
const triggerElement = React77__default.cloneElement(
|
|
20709
20817
|
triggerChild,
|
|
20710
20818
|
{
|
|
20711
20819
|
ref: triggerRef,
|
|
@@ -20800,14 +20908,14 @@ function useDataDnd(args) {
|
|
|
20800
20908
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
20801
20909
|
const enabled = isZone || Boolean(dndRoot);
|
|
20802
20910
|
const eventBus = useEventBus();
|
|
20803
|
-
const parentRoot =
|
|
20911
|
+
const parentRoot = React77__default.useContext(RootCtx);
|
|
20804
20912
|
const isRoot = enabled && parentRoot === null;
|
|
20805
|
-
const zoneId =
|
|
20913
|
+
const zoneId = React77__default.useId();
|
|
20806
20914
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
20807
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
20808
|
-
const optimisticOrdersRef =
|
|
20915
|
+
const [optimisticOrders, setOptimisticOrders] = React77__default.useState(() => /* @__PURE__ */ new Map());
|
|
20916
|
+
const optimisticOrdersRef = React77__default.useRef(optimisticOrders);
|
|
20809
20917
|
optimisticOrdersRef.current = optimisticOrders;
|
|
20810
|
-
const clearOptimisticOrder =
|
|
20918
|
+
const clearOptimisticOrder = React77__default.useCallback((group) => {
|
|
20811
20919
|
setOptimisticOrders((prev) => {
|
|
20812
20920
|
if (!prev.has(group)) return prev;
|
|
20813
20921
|
const next = new Map(prev);
|
|
@@ -20832,7 +20940,7 @@ function useDataDnd(args) {
|
|
|
20832
20940
|
const raw = it[dndItemIdField];
|
|
20833
20941
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
20834
20942
|
}).join("|");
|
|
20835
|
-
const itemIds =
|
|
20943
|
+
const itemIds = React77__default.useMemo(
|
|
20836
20944
|
() => orderedItems.map((it, idx) => {
|
|
20837
20945
|
const raw = it[dndItemIdField];
|
|
20838
20946
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
@@ -20843,7 +20951,7 @@ function useDataDnd(args) {
|
|
|
20843
20951
|
const raw = it[dndItemIdField];
|
|
20844
20952
|
return raw != null ? String(raw) : `__${idx}`;
|
|
20845
20953
|
}).join("|");
|
|
20846
|
-
|
|
20954
|
+
React77__default.useEffect(() => {
|
|
20847
20955
|
const root = isRoot ? null : parentRoot;
|
|
20848
20956
|
if (root) {
|
|
20849
20957
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -20851,20 +20959,20 @@ function useDataDnd(args) {
|
|
|
20851
20959
|
clearOptimisticOrder(ownGroup);
|
|
20852
20960
|
}
|
|
20853
20961
|
}, [itemsContentSig, ownGroup]);
|
|
20854
|
-
const zonesRef =
|
|
20855
|
-
const registerZone =
|
|
20962
|
+
const zonesRef = React77__default.useRef(/* @__PURE__ */ new Map());
|
|
20963
|
+
const registerZone = React77__default.useCallback((zoneId2, meta2) => {
|
|
20856
20964
|
zonesRef.current.set(zoneId2, meta2);
|
|
20857
20965
|
}, []);
|
|
20858
|
-
const unregisterZone =
|
|
20966
|
+
const unregisterZone = React77__default.useCallback((zoneId2) => {
|
|
20859
20967
|
zonesRef.current.delete(zoneId2);
|
|
20860
20968
|
}, []);
|
|
20861
|
-
const [activeDrag, setActiveDrag] =
|
|
20862
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
20863
|
-
const meta =
|
|
20969
|
+
const [activeDrag, setActiveDrag] = React77__default.useState(null);
|
|
20970
|
+
const [overZoneGroup, setOverZoneGroup] = React77__default.useState(null);
|
|
20971
|
+
const meta = React77__default.useMemo(
|
|
20864
20972
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
20865
20973
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
20866
20974
|
);
|
|
20867
|
-
|
|
20975
|
+
React77__default.useEffect(() => {
|
|
20868
20976
|
const target = isRoot ? null : parentRoot;
|
|
20869
20977
|
if (!target) {
|
|
20870
20978
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -20883,7 +20991,7 @@ function useDataDnd(args) {
|
|
|
20883
20991
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
20884
20992
|
const sensors = useAlmadarDndSensors(true);
|
|
20885
20993
|
const collisionDetection = almadarDndCollisionDetection;
|
|
20886
|
-
const findZoneByItem =
|
|
20994
|
+
const findZoneByItem = React77__default.useCallback(
|
|
20887
20995
|
(id) => {
|
|
20888
20996
|
for (const z of zonesRef.current.values()) {
|
|
20889
20997
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -20892,7 +21000,7 @@ function useDataDnd(args) {
|
|
|
20892
21000
|
},
|
|
20893
21001
|
[]
|
|
20894
21002
|
);
|
|
20895
|
-
|
|
21003
|
+
React77__default.useCallback(
|
|
20896
21004
|
(group) => {
|
|
20897
21005
|
for (const z of zonesRef.current.values()) {
|
|
20898
21006
|
if (z.group === group) return z;
|
|
@@ -20901,7 +21009,7 @@ function useDataDnd(args) {
|
|
|
20901
21009
|
},
|
|
20902
21010
|
[]
|
|
20903
21011
|
);
|
|
20904
|
-
const handleDragEnd =
|
|
21012
|
+
const handleDragEnd = React77__default.useCallback(
|
|
20905
21013
|
(event) => {
|
|
20906
21014
|
const { active, over } = event;
|
|
20907
21015
|
const activeIdStr = String(active.id);
|
|
@@ -20992,8 +21100,8 @@ function useDataDnd(args) {
|
|
|
20992
21100
|
},
|
|
20993
21101
|
[eventBus]
|
|
20994
21102
|
);
|
|
20995
|
-
const sortableData =
|
|
20996
|
-
const SortableItem =
|
|
21103
|
+
const sortableData = React77__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
21104
|
+
const SortableItem = React77__default.useCallback(
|
|
20997
21105
|
({ id, children }) => {
|
|
20998
21106
|
const {
|
|
20999
21107
|
attributes,
|
|
@@ -21033,7 +21141,7 @@ function useDataDnd(args) {
|
|
|
21033
21141
|
id: droppableId,
|
|
21034
21142
|
data: sortableData
|
|
21035
21143
|
});
|
|
21036
|
-
const ctx =
|
|
21144
|
+
const ctx = React77__default.useContext(RootCtx);
|
|
21037
21145
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
21038
21146
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
21039
21147
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -21048,7 +21156,7 @@ function useDataDnd(args) {
|
|
|
21048
21156
|
showForeignPlaceholder,
|
|
21049
21157
|
ctxAvailable: ctx != null
|
|
21050
21158
|
});
|
|
21051
|
-
|
|
21159
|
+
React77__default.useEffect(() => {
|
|
21052
21160
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
21053
21161
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
21054
21162
|
return /* @__PURE__ */ jsx(
|
|
@@ -21062,11 +21170,11 @@ function useDataDnd(args) {
|
|
|
21062
21170
|
}
|
|
21063
21171
|
);
|
|
21064
21172
|
};
|
|
21065
|
-
const rootContextValue =
|
|
21173
|
+
const rootContextValue = React77__default.useMemo(
|
|
21066
21174
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
21067
21175
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
21068
21176
|
);
|
|
21069
|
-
const handleDragStart =
|
|
21177
|
+
const handleDragStart = React77__default.useCallback((event) => {
|
|
21070
21178
|
const sourceZone = findZoneByItem(event.active.id);
|
|
21071
21179
|
const rect = event.active.rect.current.initial;
|
|
21072
21180
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -21085,7 +21193,7 @@ function useDataDnd(args) {
|
|
|
21085
21193
|
isRoot
|
|
21086
21194
|
});
|
|
21087
21195
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
21088
|
-
const handleDragOver =
|
|
21196
|
+
const handleDragOver = React77__default.useCallback((event) => {
|
|
21089
21197
|
const { active, over } = event;
|
|
21090
21198
|
const overData = over?.data?.current;
|
|
21091
21199
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -21155,7 +21263,7 @@ function useDataDnd(args) {
|
|
|
21155
21263
|
return next;
|
|
21156
21264
|
});
|
|
21157
21265
|
}, []);
|
|
21158
|
-
const handleDragCancel =
|
|
21266
|
+
const handleDragCancel = React77__default.useCallback((event) => {
|
|
21159
21267
|
setActiveDrag(null);
|
|
21160
21268
|
setOverZoneGroup(null);
|
|
21161
21269
|
dndLog.warn("dragCancel", {
|
|
@@ -21163,12 +21271,12 @@ function useDataDnd(args) {
|
|
|
21163
21271
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
21164
21272
|
});
|
|
21165
21273
|
}, []);
|
|
21166
|
-
const handleDragEndWithCleanup =
|
|
21274
|
+
const handleDragEndWithCleanup = React77__default.useCallback((event) => {
|
|
21167
21275
|
handleDragEnd(event);
|
|
21168
21276
|
setActiveDrag(null);
|
|
21169
21277
|
setOverZoneGroup(null);
|
|
21170
21278
|
}, [handleDragEnd]);
|
|
21171
|
-
const wrapContainer =
|
|
21279
|
+
const wrapContainer = React77__default.useCallback(
|
|
21172
21280
|
(children) => {
|
|
21173
21281
|
if (!enabled) return children;
|
|
21174
21282
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -21222,7 +21330,7 @@ var init_useDataDnd = __esm({
|
|
|
21222
21330
|
init_useAlmadarDndCollision();
|
|
21223
21331
|
init_Box();
|
|
21224
21332
|
dndLog = createLogger("almadar:ui:dnd");
|
|
21225
|
-
RootCtx =
|
|
21333
|
+
RootCtx = React77__default.createContext(null);
|
|
21226
21334
|
}
|
|
21227
21335
|
});
|
|
21228
21336
|
function renderIconInput(icon, props) {
|
|
@@ -21764,7 +21872,7 @@ function DataList({
|
|
|
21764
21872
|
}) {
|
|
21765
21873
|
const eventBus = useEventBus();
|
|
21766
21874
|
const { t } = useTranslate();
|
|
21767
|
-
const [visibleCount, setVisibleCount] =
|
|
21875
|
+
const [visibleCount, setVisibleCount] = React77__default.useState(pageSize || Infinity);
|
|
21768
21876
|
const fieldDefs = fields ?? columns ?? [];
|
|
21769
21877
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
21770
21878
|
const dnd = useDataDnd({
|
|
@@ -21780,14 +21888,14 @@ function DataList({
|
|
|
21780
21888
|
dndRoot
|
|
21781
21889
|
});
|
|
21782
21890
|
const orderedData = dnd.orderedItems;
|
|
21783
|
-
const allData =
|
|
21891
|
+
const allData = React77__default.useMemo(
|
|
21784
21892
|
() => sortRows(orderedData, sortBy, sortDirection),
|
|
21785
21893
|
[orderedData, sortBy, sortDirection]
|
|
21786
21894
|
);
|
|
21787
21895
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
21788
21896
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
21789
21897
|
const hasRenderProp = typeof children === "function";
|
|
21790
|
-
|
|
21898
|
+
React77__default.useEffect(() => {
|
|
21791
21899
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
21792
21900
|
const childrenTypeOf = typeof children;
|
|
21793
21901
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -21902,7 +22010,7 @@ function DataList({
|
|
|
21902
22010
|
return v === void 0 || v === null || v === "" ? raw : String(v);
|
|
21903
22011
|
};
|
|
21904
22012
|
return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("py-2", className), children: [
|
|
21905
|
-
groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
22013
|
+
groups2.map((group, gi) => /* @__PURE__ */ jsxs(React77__default.Fragment, { children: [
|
|
21906
22014
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
21907
22015
|
group.items.map((itemData, index) => {
|
|
21908
22016
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -22101,7 +22209,7 @@ function DataList({
|
|
|
22101
22209
|
className
|
|
22102
22210
|
),
|
|
22103
22211
|
children: [
|
|
22104
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
22212
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React77__default.Fragment, { children: [
|
|
22105
22213
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
22106
22214
|
group.items.map(
|
|
22107
22215
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -22210,8 +22318,8 @@ function ScalarControl({
|
|
|
22210
22318
|
}
|
|
22211
22319
|
const numeric = typeof value === "number";
|
|
22212
22320
|
const initial = value === null ? "" : String(value);
|
|
22213
|
-
const [draft, setDraft] =
|
|
22214
|
-
|
|
22321
|
+
const [draft, setDraft] = React77__default.useState(initial);
|
|
22322
|
+
React77__default.useEffect(() => setDraft(initial), [initial]);
|
|
22215
22323
|
const commit = () => {
|
|
22216
22324
|
if (numeric) {
|
|
22217
22325
|
const n = draft.trim() === "" ? 0 : Number(draft);
|
|
@@ -22279,8 +22387,8 @@ function Row({
|
|
|
22279
22387
|
onRemove,
|
|
22280
22388
|
readonly
|
|
22281
22389
|
}) {
|
|
22282
|
-
const [keyDraft, setKeyDraft] =
|
|
22283
|
-
|
|
22390
|
+
const [keyDraft, setKeyDraft] = React77__default.useState(rowKey);
|
|
22391
|
+
React77__default.useEffect(() => setKeyDraft(rowKey), [rowKey]);
|
|
22284
22392
|
const container = isObj(value) || isArr(value);
|
|
22285
22393
|
return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "group w-max min-w-full", children: [
|
|
22286
22394
|
/* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", className: "py-0.5 w-max", children: [
|
|
@@ -22323,7 +22431,7 @@ function ContainerNode({
|
|
|
22323
22431
|
depth,
|
|
22324
22432
|
readonly
|
|
22325
22433
|
}) {
|
|
22326
|
-
const [open, setOpen] =
|
|
22434
|
+
const [open, setOpen] = React77__default.useState(depth < 2);
|
|
22327
22435
|
const array = isArr(value);
|
|
22328
22436
|
const entries = array ? value.map((v, i) => [String(i), v]) : Object.entries(value);
|
|
22329
22437
|
const setObjValue = (key, next) => {
|
|
@@ -22465,7 +22573,7 @@ var init_FormSection = __esm({
|
|
|
22465
22573
|
columns = 1,
|
|
22466
22574
|
className
|
|
22467
22575
|
}) => {
|
|
22468
|
-
const [collapsed, setCollapsed] =
|
|
22576
|
+
const [collapsed, setCollapsed] = React77__default.useState(defaultCollapsed);
|
|
22469
22577
|
const { t } = useTranslate();
|
|
22470
22578
|
const eventBus = useEventBus();
|
|
22471
22579
|
const gridClass = {
|
|
@@ -22473,7 +22581,7 @@ var init_FormSection = __esm({
|
|
|
22473
22581
|
2: "grid-cols-1 md:grid-cols-2",
|
|
22474
22582
|
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
22475
22583
|
}[columns];
|
|
22476
|
-
|
|
22584
|
+
React77__default.useCallback(() => {
|
|
22477
22585
|
if (collapsible) {
|
|
22478
22586
|
setCollapsed((prev) => !prev);
|
|
22479
22587
|
eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
|
|
@@ -22881,8 +22989,8 @@ function TextLikeControl({
|
|
|
22881
22989
|
onCommit
|
|
22882
22990
|
}) {
|
|
22883
22991
|
const initial = value === void 0 || value === null ? "" : String(value);
|
|
22884
|
-
const [draft, setDraft] =
|
|
22885
|
-
|
|
22992
|
+
const [draft, setDraft] = React77__default.useState(initial);
|
|
22993
|
+
React77__default.useEffect(() => setDraft(initial), [initial]);
|
|
22886
22994
|
const commit = () => {
|
|
22887
22995
|
if (numeric) {
|
|
22888
22996
|
const n = draft.trim() === "" ? 0 : Number(draft);
|
|
@@ -23067,14 +23175,14 @@ var init_NodeSlotEditor = __esm({
|
|
|
23067
23175
|
isObj2 = (v) => v !== null && v !== void 0 && typeof v === "object" && !Array.isArray(v);
|
|
23068
23176
|
NodeSlotEditor = ({ value, onChange, className }) => {
|
|
23069
23177
|
const { type, props, wasArray } = normalize(value);
|
|
23070
|
-
const patterns =
|
|
23178
|
+
const patterns = React77__default.useMemo(() => {
|
|
23071
23179
|
try {
|
|
23072
23180
|
return [...getKnownPatterns()].sort();
|
|
23073
23181
|
} catch {
|
|
23074
23182
|
return [];
|
|
23075
23183
|
}
|
|
23076
23184
|
}, []);
|
|
23077
|
-
const options =
|
|
23185
|
+
const options = React77__default.useMemo(
|
|
23078
23186
|
() => [{ value: "", label: "\u2014 none \u2014" }, ...patterns.map((p) => ({ value: p, label: p }))],
|
|
23079
23187
|
[patterns]
|
|
23080
23188
|
);
|
|
@@ -23086,7 +23194,7 @@ var init_NodeSlotEditor = __esm({
|
|
|
23086
23194
|
const pattern = { type: nextType, ...nextProps };
|
|
23087
23195
|
onChange(wasArray || value === void 0 ? [pattern] : pattern);
|
|
23088
23196
|
};
|
|
23089
|
-
const schemaEntries =
|
|
23197
|
+
const schemaEntries = React77__default.useMemo(() => {
|
|
23090
23198
|
if (!type) return [];
|
|
23091
23199
|
const def = getPatternDefinition(type);
|
|
23092
23200
|
if (!def?.propsSchema) return [];
|
|
@@ -23907,7 +24015,7 @@ var init_Flex = __esm({
|
|
|
23907
24015
|
flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
|
|
23908
24016
|
}
|
|
23909
24017
|
}
|
|
23910
|
-
return
|
|
24018
|
+
return React77__default.createElement(Component, {
|
|
23911
24019
|
className: cn(
|
|
23912
24020
|
inline ? "inline-flex" : "flex",
|
|
23913
24021
|
directionStyles[direction],
|
|
@@ -24026,7 +24134,7 @@ var init_Grid = __esm({
|
|
|
24026
24134
|
as: Component = "div"
|
|
24027
24135
|
}) => {
|
|
24028
24136
|
const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
|
|
24029
|
-
return
|
|
24137
|
+
return React77__default.createElement(
|
|
24030
24138
|
Component,
|
|
24031
24139
|
{
|
|
24032
24140
|
className: cn(
|
|
@@ -24258,9 +24366,9 @@ var init_Popover = __esm({
|
|
|
24258
24366
|
onMouseLeave: handleClose,
|
|
24259
24367
|
onPointerDown: tapTriggerProps.onPointerDown
|
|
24260
24368
|
};
|
|
24261
|
-
const childElement =
|
|
24369
|
+
const childElement = React77__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
24262
24370
|
const childPointerDown = childElement.props.onPointerDown;
|
|
24263
|
-
const triggerElement =
|
|
24371
|
+
const triggerElement = React77__default.cloneElement(
|
|
24264
24372
|
childElement,
|
|
24265
24373
|
{
|
|
24266
24374
|
ref: triggerRef,
|
|
@@ -25119,9 +25227,9 @@ var init_Tooltip = __esm({
|
|
|
25119
25227
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
25120
25228
|
};
|
|
25121
25229
|
}, []);
|
|
25122
|
-
const triggerElement =
|
|
25230
|
+
const triggerElement = React77__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
25123
25231
|
const childPointerDown = triggerElement.props.onPointerDown;
|
|
25124
|
-
const trigger =
|
|
25232
|
+
const trigger = React77__default.cloneElement(triggerElement, {
|
|
25125
25233
|
ref: triggerRef,
|
|
25126
25234
|
onMouseEnter: handleMouseEnter,
|
|
25127
25235
|
onMouseLeave: handleMouseLeave,
|
|
@@ -25211,7 +25319,7 @@ var init_WizardProgress = __esm({
|
|
|
25211
25319
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
25212
25320
|
const isActive = index === currentStep;
|
|
25213
25321
|
const isCompleted = index < currentStep;
|
|
25214
|
-
return /* @__PURE__ */ jsxs(
|
|
25322
|
+
return /* @__PURE__ */ jsxs(React77__default.Fragment, { children: [
|
|
25215
25323
|
/* @__PURE__ */ jsx(
|
|
25216
25324
|
"button",
|
|
25217
25325
|
{
|
|
@@ -27022,7 +27130,7 @@ function GameMenu({
|
|
|
27022
27130
|
}) {
|
|
27023
27131
|
const resolvedOptions = (options?.length ? options : void 0) ?? (menuItems?.length ? menuItems : void 0) ?? DEFAULT_MENU_OPTIONS;
|
|
27024
27132
|
const eventBus = useEventBus();
|
|
27025
|
-
const handleOptionClick =
|
|
27133
|
+
const handleOptionClick = React77.useCallback(
|
|
27026
27134
|
(option) => {
|
|
27027
27135
|
if (option.event) {
|
|
27028
27136
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -27258,7 +27366,7 @@ function StateGraph({
|
|
|
27258
27366
|
}) {
|
|
27259
27367
|
const eventBus = useEventBus();
|
|
27260
27368
|
const nodes = states ?? [];
|
|
27261
|
-
const positions =
|
|
27369
|
+
const positions = React77.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
|
|
27262
27370
|
return /* @__PURE__ */ jsxs(
|
|
27263
27371
|
Box,
|
|
27264
27372
|
{
|
|
@@ -27795,7 +27903,7 @@ function LinearView({
|
|
|
27795
27903
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
27796
27904
|
const isDone = i < currentIdx;
|
|
27797
27905
|
const isCurrent = i === currentIdx;
|
|
27798
|
-
return /* @__PURE__ */ jsxs(
|
|
27906
|
+
return /* @__PURE__ */ jsxs(React77__default.Fragment, { children: [
|
|
27799
27907
|
i > 0 && /* @__PURE__ */ jsx(
|
|
27800
27908
|
Typography,
|
|
27801
27909
|
{
|
|
@@ -28428,7 +28536,7 @@ function SequenceBar({
|
|
|
28428
28536
|
else onSlotRemove?.(index);
|
|
28429
28537
|
}, [emit, slotRemoveEvent, onSlotRemove, playing]);
|
|
28430
28538
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
28431
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
28539
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React77__default.Fragment, { children: [
|
|
28432
28540
|
i > 0 && /* @__PURE__ */ jsx(
|
|
28433
28541
|
Typography,
|
|
28434
28542
|
{
|
|
@@ -29408,13 +29516,13 @@ var init_MapView = __esm({
|
|
|
29408
29516
|
shadowSize: [41, 41]
|
|
29409
29517
|
});
|
|
29410
29518
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
29411
|
-
const { useEffect:
|
|
29519
|
+
const { useEffect: useEffect66, useRef: useRef64, useCallback: useCallback107, useState: useState104 } = React77__default;
|
|
29412
29520
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
29413
29521
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
29414
29522
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
29415
29523
|
const map = useMap();
|
|
29416
|
-
const prevRef =
|
|
29417
|
-
|
|
29524
|
+
const prevRef = useRef64({ centerLat, centerLng, zoom });
|
|
29525
|
+
useEffect66(() => {
|
|
29418
29526
|
const prev = prevRef.current;
|
|
29419
29527
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
29420
29528
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -29425,7 +29533,7 @@ var init_MapView = __esm({
|
|
|
29425
29533
|
}
|
|
29426
29534
|
function MapClickHandler({ onMapClick }) {
|
|
29427
29535
|
const map = useMap();
|
|
29428
|
-
|
|
29536
|
+
useEffect66(() => {
|
|
29429
29537
|
if (!onMapClick) return;
|
|
29430
29538
|
const handler = (e) => {
|
|
29431
29539
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -29453,8 +29561,8 @@ var init_MapView = __esm({
|
|
|
29453
29561
|
showAttribution = true
|
|
29454
29562
|
}) {
|
|
29455
29563
|
const eventBus = useEventBus2();
|
|
29456
|
-
const [clickedPosition, setClickedPosition] =
|
|
29457
|
-
const handleMapClick =
|
|
29564
|
+
const [clickedPosition, setClickedPosition] = useState104(null);
|
|
29565
|
+
const handleMapClick = useCallback107((lat, lng) => {
|
|
29458
29566
|
if (showClickedPin) {
|
|
29459
29567
|
setClickedPosition({ lat, lng });
|
|
29460
29568
|
}
|
|
@@ -29463,7 +29571,7 @@ var init_MapView = __esm({
|
|
|
29463
29571
|
eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
|
|
29464
29572
|
}
|
|
29465
29573
|
}, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
|
|
29466
|
-
const handleMarkerClick =
|
|
29574
|
+
const handleMarkerClick = useCallback107((marker) => {
|
|
29467
29575
|
onMarkerClick?.(marker);
|
|
29468
29576
|
if (markerClickEvent) {
|
|
29469
29577
|
eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
|
|
@@ -30326,8 +30434,8 @@ function TableView({
|
|
|
30326
30434
|
}) {
|
|
30327
30435
|
const eventBus = useEventBus();
|
|
30328
30436
|
const { t } = useTranslate();
|
|
30329
|
-
const [visibleCount, setVisibleCount] =
|
|
30330
|
-
const [localSelected, setLocalSelected] =
|
|
30437
|
+
const [visibleCount, setVisibleCount] = React77__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
30438
|
+
const [localSelected, setLocalSelected] = React77__default.useState(/* @__PURE__ */ new Set());
|
|
30331
30439
|
const colDefs = (Array.isArray(columns) ? columns : void 0) ?? (Array.isArray(fields) ? fields : void 0) ?? [];
|
|
30332
30440
|
const actionDefs = Array.isArray(itemActions) ? itemActions : [];
|
|
30333
30441
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
@@ -30349,7 +30457,7 @@ function TableView({
|
|
|
30349
30457
|
const hasRenderProp = typeof children === "function";
|
|
30350
30458
|
const idField = dndItemIdField ?? "id";
|
|
30351
30459
|
const isCoarsePointer = useMediaQuery("(pointer: coarse)");
|
|
30352
|
-
|
|
30460
|
+
React77__default.useEffect(() => {
|
|
30353
30461
|
tableViewLog.debug("render", {
|
|
30354
30462
|
rowCount: data.length,
|
|
30355
30463
|
colCount: colDefs.length,
|
|
@@ -30406,7 +30514,7 @@ function TableView({
|
|
|
30406
30514
|
};
|
|
30407
30515
|
eventBus.emit(`UI:${itemClickEvent}`, payload);
|
|
30408
30516
|
};
|
|
30409
|
-
const colFloors =
|
|
30517
|
+
const colFloors = React77__default.useMemo(
|
|
30410
30518
|
() => colDefs.map((col) => {
|
|
30411
30519
|
const longest = data.reduce((widest, row) => {
|
|
30412
30520
|
const cell = formatCell(asFieldValue(getNestedValue(row, col.field ?? col.key)), col.format);
|
|
@@ -30568,12 +30676,12 @@ function TableView({
|
|
|
30568
30676
|
]
|
|
30569
30677
|
}
|
|
30570
30678
|
);
|
|
30571
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
30679
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React77__default.Fragment, { children: rowInner }, id);
|
|
30572
30680
|
};
|
|
30573
30681
|
const items = Array.from(data);
|
|
30574
30682
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
30575
30683
|
let runningIndex = 0;
|
|
30576
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
30684
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React77__default.Fragment, { children: [
|
|
30577
30685
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
30578
30686
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
30579
30687
|
] }, gi)) });
|
|
@@ -31936,7 +32044,7 @@ var init_StepFlow = __esm({
|
|
|
31936
32044
|
className
|
|
31937
32045
|
}) => {
|
|
31938
32046
|
if (orientation === "vertical") {
|
|
31939
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
32047
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React77__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
31940
32048
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
31941
32049
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
31942
32050
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -31947,7 +32055,7 @@ var init_StepFlow = __esm({
|
|
|
31947
32055
|
] })
|
|
31948
32056
|
] }) }, index)) });
|
|
31949
32057
|
}
|
|
31950
|
-
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(
|
|
32058
|
+
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(React77__default.Fragment, { children: [
|
|
31951
32059
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
31952
32060
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
31953
32061
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -32937,7 +33045,7 @@ var init_LikertScale = __esm({
|
|
|
32937
33045
|
md: "text-base",
|
|
32938
33046
|
lg: "text-lg"
|
|
32939
33047
|
};
|
|
32940
|
-
LikertScale =
|
|
33048
|
+
LikertScale = React77__default.forwardRef(
|
|
32941
33049
|
({
|
|
32942
33050
|
question,
|
|
32943
33051
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -32949,7 +33057,7 @@ var init_LikertScale = __esm({
|
|
|
32949
33057
|
variant = "radios",
|
|
32950
33058
|
className
|
|
32951
33059
|
}, ref) => {
|
|
32952
|
-
const groupId =
|
|
33060
|
+
const groupId = React77__default.useId();
|
|
32953
33061
|
const eventBus = useEventBus();
|
|
32954
33062
|
const handleSelect = useCallback(
|
|
32955
33063
|
(next) => {
|
|
@@ -35238,7 +35346,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
35238
35346
|
"aria-label": t("aria.breadcrumb"),
|
|
35239
35347
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
35240
35348
|
const isLast = idx === items.length - 1;
|
|
35241
|
-
return /* @__PURE__ */ jsxs(
|
|
35349
|
+
return /* @__PURE__ */ jsxs(React77__default.Fragment, { children: [
|
|
35242
35350
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
35243
35351
|
Icon,
|
|
35244
35352
|
{
|
|
@@ -36107,7 +36215,7 @@ var init_MiniStateMachine = __esm({
|
|
|
36107
36215
|
const x = 2 + i * (NODE_W + GAP2 + ARROW_W + GAP2);
|
|
36108
36216
|
const tc = transitionCounts[s.name] ?? 0;
|
|
36109
36217
|
const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
36110
|
-
return /* @__PURE__ */ jsxs(
|
|
36218
|
+
return /* @__PURE__ */ jsxs(React77__default.Fragment, { children: [
|
|
36111
36219
|
/* @__PURE__ */ jsx(
|
|
36112
36220
|
AvlState,
|
|
36113
36221
|
{
|
|
@@ -36311,7 +36419,7 @@ var init_PageHeader = __esm({
|
|
|
36311
36419
|
info: "bg-info/10 text-info"
|
|
36312
36420
|
};
|
|
36313
36421
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
36314
|
-
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(
|
|
36422
|
+
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(React77__default.Fragment, { children: [
|
|
36315
36423
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
36316
36424
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
36317
36425
|
"a",
|
|
@@ -36669,7 +36777,7 @@ var init_Section = __esm({
|
|
|
36669
36777
|
as: Component = "section"
|
|
36670
36778
|
}) => {
|
|
36671
36779
|
const hasHeader = title || description || action;
|
|
36672
|
-
return
|
|
36780
|
+
return React77__default.createElement(
|
|
36673
36781
|
Component,
|
|
36674
36782
|
{
|
|
36675
36783
|
className: cn(
|
|
@@ -37043,7 +37151,7 @@ var init_WizardContainer = __esm({
|
|
|
37043
37151
|
const isCompleted = index < currentStep;
|
|
37044
37152
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
37045
37153
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
37046
|
-
return /* @__PURE__ */ jsxs(
|
|
37154
|
+
return /* @__PURE__ */ jsxs(React77__default.Fragment, { children: [
|
|
37047
37155
|
/* @__PURE__ */ jsx(
|
|
37048
37156
|
Button,
|
|
37049
37157
|
{
|
|
@@ -38830,7 +38938,7 @@ var init_ImportPreviewTree = __esm({
|
|
|
38830
38938
|
const renderUnit = (unit, childrenByParent, depth) => {
|
|
38831
38939
|
const summary = fieldSummary(unit);
|
|
38832
38940
|
const children = childrenByParent.get(unit.ref) ?? [];
|
|
38833
|
-
return /* @__PURE__ */ jsxs(
|
|
38941
|
+
return /* @__PURE__ */ jsxs(React77__default.Fragment, { children: [
|
|
38834
38942
|
/* @__PURE__ */ jsxs(
|
|
38835
38943
|
Box,
|
|
38836
38944
|
{
|
|
@@ -38927,7 +39035,7 @@ var init_ImportProgress = __esm({
|
|
|
38927
39035
|
PIPELINE.map((key, index) => {
|
|
38928
39036
|
const isComplete = index < currentIndex;
|
|
38929
39037
|
const isActive = index === currentIndex;
|
|
38930
|
-
return /* @__PURE__ */ jsxs(
|
|
39038
|
+
return /* @__PURE__ */ jsxs(React77__default.Fragment, { children: [
|
|
38931
39039
|
index > 0 ? /* @__PURE__ */ jsx(Box, { className: "h-px w-4 bg-border" }) : null,
|
|
38932
39040
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1", "data-testid": `import-progress-step-${key}`, children: [
|
|
38933
39041
|
/* @__PURE__ */ jsx(
|
|
@@ -40251,30 +40359,8 @@ var init_DetailPanel = __esm({
|
|
|
40251
40359
|
DetailPanel.displayName = "DetailPanel";
|
|
40252
40360
|
}
|
|
40253
40361
|
});
|
|
40254
|
-
function DrawGroup(props) {
|
|
40255
|
-
const register = useContext(DrawableRegistryContext);
|
|
40256
|
-
if (register) register({ ...props, type: "draw-group" });
|
|
40257
|
-
return null;
|
|
40258
|
-
}
|
|
40259
|
-
var init_DrawGroup = __esm({
|
|
40260
|
-
"components/game/atoms/DrawGroup.tsx"() {
|
|
40261
|
-
"use client";
|
|
40262
|
-
init_registry();
|
|
40263
|
-
}
|
|
40264
|
-
});
|
|
40265
|
-
function DrawMesh(props) {
|
|
40266
|
-
const register = useContext(DrawableRegistryContext);
|
|
40267
|
-
if (register) register({ ...props, type: "draw-mesh" });
|
|
40268
|
-
return null;
|
|
40269
|
-
}
|
|
40270
|
-
var init_DrawMesh = __esm({
|
|
40271
|
-
"components/game/atoms/DrawMesh.tsx"() {
|
|
40272
|
-
"use client";
|
|
40273
|
-
init_registry();
|
|
40274
|
-
}
|
|
40275
|
-
});
|
|
40276
40362
|
function extractTitle(children) {
|
|
40277
|
-
if (!
|
|
40363
|
+
if (!React77__default.isValidElement(children)) return void 0;
|
|
40278
40364
|
const props = children.props;
|
|
40279
40365
|
if (typeof props.title === "string") {
|
|
40280
40366
|
return props.title;
|
|
@@ -40624,12 +40710,12 @@ var init_Form = __esm({
|
|
|
40624
40710
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
40625
40711
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
40626
40712
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
40627
|
-
const normalizedInitialData =
|
|
40713
|
+
const normalizedInitialData = React77__default.useMemo(() => {
|
|
40628
40714
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
40629
40715
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
40630
40716
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
40631
40717
|
}, [entity, initialData]);
|
|
40632
|
-
const entityDerivedFields =
|
|
40718
|
+
const entityDerivedFields = React77__default.useMemo(() => {
|
|
40633
40719
|
if (fields && fields.length > 0) return void 0;
|
|
40634
40720
|
if (!resolvedEntity) return void 0;
|
|
40635
40721
|
return resolvedEntity.fields.map(
|
|
@@ -40650,16 +40736,16 @@ var init_Form = __esm({
|
|
|
40650
40736
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
40651
40737
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
40652
40738
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
40653
|
-
const [formData, setFormData] =
|
|
40739
|
+
const [formData, setFormData] = React77__default.useState(
|
|
40654
40740
|
normalizedInitialData
|
|
40655
40741
|
);
|
|
40656
|
-
const [collapsedSections, setCollapsedSections] =
|
|
40742
|
+
const [collapsedSections, setCollapsedSections] = React77__default.useState(
|
|
40657
40743
|
/* @__PURE__ */ new Set()
|
|
40658
40744
|
);
|
|
40659
|
-
const [submitError, setSubmitError] =
|
|
40660
|
-
const formRef =
|
|
40745
|
+
const [submitError, setSubmitError] = React77__default.useState(null);
|
|
40746
|
+
const formRef = React77__default.useRef(null);
|
|
40661
40747
|
const formMode = props.mode;
|
|
40662
|
-
const mountedRef =
|
|
40748
|
+
const mountedRef = React77__default.useRef(false);
|
|
40663
40749
|
if (!mountedRef.current) {
|
|
40664
40750
|
mountedRef.current = true;
|
|
40665
40751
|
debug("forms", "mount", {
|
|
@@ -40672,7 +40758,7 @@ var init_Form = __esm({
|
|
|
40672
40758
|
});
|
|
40673
40759
|
}
|
|
40674
40760
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
40675
|
-
const evalContext =
|
|
40761
|
+
const evalContext = React77__default.useMemo(
|
|
40676
40762
|
() => ({
|
|
40677
40763
|
formValues: formData,
|
|
40678
40764
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -40681,7 +40767,7 @@ var init_Form = __esm({
|
|
|
40681
40767
|
}),
|
|
40682
40768
|
[formData, externalContext]
|
|
40683
40769
|
);
|
|
40684
|
-
|
|
40770
|
+
React77__default.useEffect(() => {
|
|
40685
40771
|
debug("forms", "initialData-sync", {
|
|
40686
40772
|
mode: formMode,
|
|
40687
40773
|
normalizedInitialData,
|
|
@@ -40692,7 +40778,7 @@ var init_Form = __esm({
|
|
|
40692
40778
|
setFormData(normalizedInitialData);
|
|
40693
40779
|
}
|
|
40694
40780
|
}, [normalizedInitialData]);
|
|
40695
|
-
const processCalculations =
|
|
40781
|
+
const processCalculations = React77__default.useCallback(
|
|
40696
40782
|
(changedFieldId, newFormData) => {
|
|
40697
40783
|
if (!hiddenCalculations.length) return;
|
|
40698
40784
|
const context = {
|
|
@@ -40717,7 +40803,7 @@ var init_Form = __esm({
|
|
|
40717
40803
|
},
|
|
40718
40804
|
[hiddenCalculations, externalContext, eventBus]
|
|
40719
40805
|
);
|
|
40720
|
-
const checkViolations =
|
|
40806
|
+
const checkViolations = React77__default.useCallback(
|
|
40721
40807
|
(changedFieldId, newFormData) => {
|
|
40722
40808
|
if (!violationTriggers.length) return;
|
|
40723
40809
|
const context = {
|
|
@@ -40755,7 +40841,7 @@ var init_Form = __esm({
|
|
|
40755
40841
|
processCalculations(name, newFormData);
|
|
40756
40842
|
checkViolations(name, newFormData);
|
|
40757
40843
|
};
|
|
40758
|
-
const isFieldVisible =
|
|
40844
|
+
const isFieldVisible = React77__default.useCallback(
|
|
40759
40845
|
(fieldName) => {
|
|
40760
40846
|
const condition = conditionalFields[fieldName];
|
|
40761
40847
|
if (!condition) return true;
|
|
@@ -40763,7 +40849,7 @@ var init_Form = __esm({
|
|
|
40763
40849
|
},
|
|
40764
40850
|
[conditionalFields, evalContext]
|
|
40765
40851
|
);
|
|
40766
|
-
const isSectionVisible =
|
|
40852
|
+
const isSectionVisible = React77__default.useCallback(
|
|
40767
40853
|
(section) => {
|
|
40768
40854
|
if (!section.condition) return true;
|
|
40769
40855
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -40839,7 +40925,7 @@ var init_Form = __esm({
|
|
|
40839
40925
|
eventBus.emit(`UI:${onCancel}`);
|
|
40840
40926
|
}
|
|
40841
40927
|
};
|
|
40842
|
-
const renderField =
|
|
40928
|
+
const renderField = React77__default.useCallback(
|
|
40843
40929
|
(field) => {
|
|
40844
40930
|
const fieldName = field.name || field.field;
|
|
40845
40931
|
if (!fieldName) return null;
|
|
@@ -40860,7 +40946,7 @@ var init_Form = __esm({
|
|
|
40860
40946
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
40861
40947
|
);
|
|
40862
40948
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
40863
|
-
const normalizedFields =
|
|
40949
|
+
const normalizedFields = React77__default.useMemo(() => {
|
|
40864
40950
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
40865
40951
|
return effectiveFields.map((field) => {
|
|
40866
40952
|
if (typeof field === "string") {
|
|
@@ -40884,7 +40970,7 @@ var init_Form = __esm({
|
|
|
40884
40970
|
return field;
|
|
40885
40971
|
});
|
|
40886
40972
|
}, [effectiveFields, resolvedEntity]);
|
|
40887
|
-
const schemaFields =
|
|
40973
|
+
const schemaFields = React77__default.useMemo(() => {
|
|
40888
40974
|
if (normalizedFields.length === 0) return null;
|
|
40889
40975
|
if (isDebugEnabled()) {
|
|
40890
40976
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -40894,7 +40980,7 @@ var init_Form = __esm({
|
|
|
40894
40980
|
}
|
|
40895
40981
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
40896
40982
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
40897
|
-
const sectionElements =
|
|
40983
|
+
const sectionElements = React77__default.useMemo(() => {
|
|
40898
40984
|
if (!sections || sections.length === 0) return null;
|
|
40899
40985
|
return sections.map((section) => {
|
|
40900
40986
|
if (!isSectionVisible(section)) {
|
|
@@ -41620,7 +41706,7 @@ var init_List = __esm({
|
|
|
41620
41706
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
41621
41707
|
return [];
|
|
41622
41708
|
}, [entity]);
|
|
41623
|
-
const getItemActions =
|
|
41709
|
+
const getItemActions = React77__default.useCallback(
|
|
41624
41710
|
(item) => {
|
|
41625
41711
|
if (!itemActions) return [];
|
|
41626
41712
|
if (typeof itemActions === "function") {
|
|
@@ -42101,7 +42187,7 @@ var init_MediaGallery = __esm({
|
|
|
42101
42187
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
42102
42188
|
);
|
|
42103
42189
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
42104
|
-
const items =
|
|
42190
|
+
const items = React77__default.useMemo(() => {
|
|
42105
42191
|
if (propItems && propItems.length > 0) return propItems;
|
|
42106
42192
|
if (entityData.length === 0) return [];
|
|
42107
42193
|
return entityData.map((record, idx) => {
|
|
@@ -42266,7 +42352,7 @@ var init_MediaGallery = __esm({
|
|
|
42266
42352
|
}
|
|
42267
42353
|
});
|
|
42268
42354
|
function extractTitle2(children) {
|
|
42269
|
-
if (!
|
|
42355
|
+
if (!React77__default.isValidElement(children)) return void 0;
|
|
42270
42356
|
const props = children.props;
|
|
42271
42357
|
if (typeof props.title === "string") {
|
|
42272
42358
|
return props.title;
|
|
@@ -42521,7 +42607,7 @@ var init_debugRegistry = __esm({
|
|
|
42521
42607
|
}
|
|
42522
42608
|
});
|
|
42523
42609
|
function useDebugData() {
|
|
42524
|
-
const [data, setData] =
|
|
42610
|
+
const [data, setData] = React77.useState(() => ({
|
|
42525
42611
|
traits: [],
|
|
42526
42612
|
ticks: [],
|
|
42527
42613
|
guards: [],
|
|
@@ -42535,7 +42621,7 @@ function useDebugData() {
|
|
|
42535
42621
|
},
|
|
42536
42622
|
lastUpdate: Date.now()
|
|
42537
42623
|
}));
|
|
42538
|
-
|
|
42624
|
+
React77.useEffect(() => {
|
|
42539
42625
|
const updateData = () => {
|
|
42540
42626
|
setData({
|
|
42541
42627
|
traits: getAllTraits(),
|
|
@@ -42644,12 +42730,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
42644
42730
|
return positions;
|
|
42645
42731
|
}
|
|
42646
42732
|
function WalkMinimap() {
|
|
42647
|
-
const [walkStep, setWalkStep] =
|
|
42648
|
-
const [traits2, setTraits] =
|
|
42649
|
-
const [coveredEdges, setCoveredEdges] =
|
|
42650
|
-
const [completedTraits, setCompletedTraits] =
|
|
42651
|
-
const prevTraitRef =
|
|
42652
|
-
|
|
42733
|
+
const [walkStep, setWalkStep] = React77.useState(null);
|
|
42734
|
+
const [traits2, setTraits] = React77.useState([]);
|
|
42735
|
+
const [coveredEdges, setCoveredEdges] = React77.useState([]);
|
|
42736
|
+
const [completedTraits, setCompletedTraits] = React77.useState(/* @__PURE__ */ new Set());
|
|
42737
|
+
const prevTraitRef = React77.useRef(null);
|
|
42738
|
+
React77.useEffect(() => {
|
|
42653
42739
|
const interval = setInterval(() => {
|
|
42654
42740
|
const w = window;
|
|
42655
42741
|
const step = w.__orbitalWalkStep;
|
|
@@ -43085,15 +43171,15 @@ var init_EntitiesTab = __esm({
|
|
|
43085
43171
|
});
|
|
43086
43172
|
function EventFlowTab({ events: events2 }) {
|
|
43087
43173
|
const { t } = useTranslate();
|
|
43088
|
-
const [filter, setFilter] =
|
|
43089
|
-
const containerRef =
|
|
43090
|
-
const [autoScroll, setAutoScroll] =
|
|
43091
|
-
|
|
43174
|
+
const [filter, setFilter] = React77.useState("all");
|
|
43175
|
+
const containerRef = React77.useRef(null);
|
|
43176
|
+
const [autoScroll, setAutoScroll] = React77.useState(true);
|
|
43177
|
+
React77.useEffect(() => {
|
|
43092
43178
|
if (autoScroll && containerRef.current) {
|
|
43093
43179
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
43094
43180
|
}
|
|
43095
43181
|
}, [events2.length, autoScroll]);
|
|
43096
|
-
const filteredEvents =
|
|
43182
|
+
const filteredEvents = React77.useMemo(() => {
|
|
43097
43183
|
if (filter === "all") return events2;
|
|
43098
43184
|
return events2.filter((e) => e.type === filter);
|
|
43099
43185
|
}, [events2, filter]);
|
|
@@ -43209,7 +43295,7 @@ var init_EventFlowTab = __esm({
|
|
|
43209
43295
|
});
|
|
43210
43296
|
function GuardsPanel({ guards }) {
|
|
43211
43297
|
const { t } = useTranslate();
|
|
43212
|
-
const [filter, setFilter] =
|
|
43298
|
+
const [filter, setFilter] = React77.useState("all");
|
|
43213
43299
|
if (guards.length === 0) {
|
|
43214
43300
|
return /* @__PURE__ */ jsx(
|
|
43215
43301
|
EmptyState,
|
|
@@ -43222,7 +43308,7 @@ function GuardsPanel({ guards }) {
|
|
|
43222
43308
|
}
|
|
43223
43309
|
const passedCount = guards.filter((g) => g.result).length;
|
|
43224
43310
|
const failedCount = guards.length - passedCount;
|
|
43225
|
-
const filteredGuards =
|
|
43311
|
+
const filteredGuards = React77.useMemo(() => {
|
|
43226
43312
|
if (filter === "all") return guards;
|
|
43227
43313
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
43228
43314
|
return guards.filter((g) => !g.result);
|
|
@@ -43385,10 +43471,10 @@ function EffectBadge({ effect }) {
|
|
|
43385
43471
|
}
|
|
43386
43472
|
function TransitionTimeline({ transitions }) {
|
|
43387
43473
|
const { t } = useTranslate();
|
|
43388
|
-
const containerRef =
|
|
43389
|
-
const [autoScroll, setAutoScroll] =
|
|
43390
|
-
const [expandedId, setExpandedId] =
|
|
43391
|
-
|
|
43474
|
+
const containerRef = React77.useRef(null);
|
|
43475
|
+
const [autoScroll, setAutoScroll] = React77.useState(true);
|
|
43476
|
+
const [expandedId, setExpandedId] = React77.useState(null);
|
|
43477
|
+
React77.useEffect(() => {
|
|
43392
43478
|
if (autoScroll && containerRef.current) {
|
|
43393
43479
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
43394
43480
|
}
|
|
@@ -43668,9 +43754,9 @@ function getAllEvents(traits2) {
|
|
|
43668
43754
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
43669
43755
|
const eventBus = useEventBus();
|
|
43670
43756
|
const { t } = useTranslate();
|
|
43671
|
-
const [log19, setLog] =
|
|
43672
|
-
const prevStatesRef =
|
|
43673
|
-
|
|
43757
|
+
const [log19, setLog] = React77.useState([]);
|
|
43758
|
+
const prevStatesRef = React77.useRef(/* @__PURE__ */ new Map());
|
|
43759
|
+
React77.useEffect(() => {
|
|
43674
43760
|
for (const trait of traits2) {
|
|
43675
43761
|
const prev = prevStatesRef.current.get(trait.id);
|
|
43676
43762
|
if (prev && prev !== trait.currentState) {
|
|
@@ -43839,10 +43925,10 @@ function VerifyModePanel({
|
|
|
43839
43925
|
localCount
|
|
43840
43926
|
}) {
|
|
43841
43927
|
const { t } = useTranslate();
|
|
43842
|
-
const [expanded, setExpanded] =
|
|
43843
|
-
const scrollRef =
|
|
43844
|
-
const prevCountRef =
|
|
43845
|
-
|
|
43928
|
+
const [expanded, setExpanded] = React77.useState(true);
|
|
43929
|
+
const scrollRef = React77.useRef(null);
|
|
43930
|
+
const prevCountRef = React77.useRef(0);
|
|
43931
|
+
React77.useEffect(() => {
|
|
43846
43932
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
43847
43933
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
43848
43934
|
}
|
|
@@ -43899,10 +43985,10 @@ function RuntimeDebugger({
|
|
|
43899
43985
|
schema
|
|
43900
43986
|
}) {
|
|
43901
43987
|
const { t } = useTranslate();
|
|
43902
|
-
const [isCollapsed, setIsCollapsed] =
|
|
43903
|
-
const [isVisible, setIsVisible] =
|
|
43988
|
+
const [isCollapsed, setIsCollapsed] = React77.useState(mode === "verify" ? true : defaultCollapsed);
|
|
43989
|
+
const [isVisible, setIsVisible] = React77.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
43904
43990
|
const debugData = useDebugData();
|
|
43905
|
-
|
|
43991
|
+
React77.useEffect(() => {
|
|
43906
43992
|
if (mode === "inline") return;
|
|
43907
43993
|
return onDebugToggle((enabled) => {
|
|
43908
43994
|
setIsVisible(enabled);
|
|
@@ -43911,7 +43997,7 @@ function RuntimeDebugger({
|
|
|
43911
43997
|
}
|
|
43912
43998
|
});
|
|
43913
43999
|
}, [mode]);
|
|
43914
|
-
|
|
44000
|
+
React77.useEffect(() => {
|
|
43915
44001
|
if (mode === "inline") return;
|
|
43916
44002
|
const handleKeyDown = (e) => {
|
|
43917
44003
|
if (e.key === "`" && isVisible) {
|
|
@@ -44431,7 +44517,7 @@ var init_StatCard = __esm({
|
|
|
44431
44517
|
const labelToUse = propLabel ?? propTitle;
|
|
44432
44518
|
const eventBus = useEventBus();
|
|
44433
44519
|
const { t } = useTranslate();
|
|
44434
|
-
const handleActionClick =
|
|
44520
|
+
const handleActionClick = React77__default.useCallback(() => {
|
|
44435
44521
|
if (action?.event) {
|
|
44436
44522
|
eventBus.emit(`UI:${action.event}`, {});
|
|
44437
44523
|
}
|
|
@@ -44442,7 +44528,7 @@ var init_StatCard = __esm({
|
|
|
44442
44528
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
44443
44529
|
const isLoading = externalLoading ?? false;
|
|
44444
44530
|
const error = externalError;
|
|
44445
|
-
const computeMetricValue =
|
|
44531
|
+
const computeMetricValue = React77__default.useCallback(
|
|
44446
44532
|
(metric, items) => {
|
|
44447
44533
|
if (metric.value !== void 0) {
|
|
44448
44534
|
return metric.value;
|
|
@@ -44481,7 +44567,7 @@ var init_StatCard = __esm({
|
|
|
44481
44567
|
},
|
|
44482
44568
|
[]
|
|
44483
44569
|
);
|
|
44484
|
-
const schemaStats =
|
|
44570
|
+
const schemaStats = React77__default.useMemo(() => {
|
|
44485
44571
|
if (!metrics || metrics.length === 0) return null;
|
|
44486
44572
|
return metrics.map((metric) => ({
|
|
44487
44573
|
label: metric.label,
|
|
@@ -44489,7 +44575,7 @@ var init_StatCard = __esm({
|
|
|
44489
44575
|
format: metric.format
|
|
44490
44576
|
}));
|
|
44491
44577
|
}, [metrics, data, computeMetricValue]);
|
|
44492
|
-
const calculatedTrend =
|
|
44578
|
+
const calculatedTrend = React77__default.useMemo(() => {
|
|
44493
44579
|
if (manualTrend !== void 0) return manualTrend;
|
|
44494
44580
|
if (previousValue === void 0 || currentValue2 === void 0)
|
|
44495
44581
|
return void 0;
|
|
@@ -45129,8 +45215,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
45129
45215
|
] });
|
|
45130
45216
|
};
|
|
45131
45217
|
InlineActivityStream = ({ activities, autoScroll = true, className }) => {
|
|
45132
|
-
const endRef =
|
|
45133
|
-
|
|
45218
|
+
const endRef = React77__default.useRef(null);
|
|
45219
|
+
React77__default.useEffect(() => {
|
|
45134
45220
|
if (!autoScroll) return;
|
|
45135
45221
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
45136
45222
|
}, [activities.length, autoScroll]);
|
|
@@ -45224,7 +45310,7 @@ var init_SubagentTracePanel = __esm({
|
|
|
45224
45310
|
};
|
|
45225
45311
|
SubagentRichCard = ({ subagent }) => {
|
|
45226
45312
|
const { t } = useTranslate();
|
|
45227
|
-
const activities =
|
|
45313
|
+
const activities = React77__default.useMemo(
|
|
45228
45314
|
() => subagentMessagesToActivities(subagent.messages),
|
|
45229
45315
|
[subagent.messages]
|
|
45230
45316
|
);
|
|
@@ -45301,8 +45387,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
45301
45387
|
] });
|
|
45302
45388
|
};
|
|
45303
45389
|
CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
|
|
45304
|
-
const endRef =
|
|
45305
|
-
|
|
45390
|
+
const endRef = React77__default.useRef(null);
|
|
45391
|
+
React77__default.useEffect(() => {
|
|
45306
45392
|
if (!autoScroll) return;
|
|
45307
45393
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
45308
45394
|
}, [messages.length, autoScroll]);
|
|
@@ -45737,7 +45823,7 @@ var init_Timeline = __esm({
|
|
|
45737
45823
|
}) => {
|
|
45738
45824
|
const { t } = useTranslate();
|
|
45739
45825
|
const entityData = entity ?? [];
|
|
45740
|
-
const items =
|
|
45826
|
+
const items = React77__default.useMemo(() => {
|
|
45741
45827
|
if (propItems) return propItems;
|
|
45742
45828
|
if (entityData.length === 0) return [];
|
|
45743
45829
|
return entityData.map((record, idx) => {
|
|
@@ -45839,7 +45925,7 @@ var init_Timeline = __esm({
|
|
|
45839
45925
|
}
|
|
45840
45926
|
});
|
|
45841
45927
|
function extractToastProps(children) {
|
|
45842
|
-
if (!
|
|
45928
|
+
if (!React77__default.isValidElement(children)) {
|
|
45843
45929
|
if (typeof children === "string") {
|
|
45844
45930
|
return { message: children };
|
|
45845
45931
|
}
|
|
@@ -45881,7 +45967,7 @@ var init_ToastSlot = __esm({
|
|
|
45881
45967
|
eventBus.emit(`${prefix}CLOSE`);
|
|
45882
45968
|
};
|
|
45883
45969
|
if (!isVisible) return null;
|
|
45884
|
-
const isCustomContent =
|
|
45970
|
+
const isCustomContent = React77__default.isValidElement(children) && !message;
|
|
45885
45971
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
45886
45972
|
Toast,
|
|
45887
45973
|
{
|
|
@@ -46456,7 +46542,7 @@ function SuspenseConfigProvider({
|
|
|
46456
46542
|
config,
|
|
46457
46543
|
children
|
|
46458
46544
|
}) {
|
|
46459
|
-
return
|
|
46545
|
+
return React77__default.createElement(
|
|
46460
46546
|
SuspenseConfigContext.Provider,
|
|
46461
46547
|
{ value: config },
|
|
46462
46548
|
children
|
|
@@ -46498,7 +46584,7 @@ function enrichFormFields(fields, entityDef) {
|
|
|
46498
46584
|
}
|
|
46499
46585
|
return { name: field, label: humanizeFieldName(field) };
|
|
46500
46586
|
}
|
|
46501
|
-
if (field && typeof field === "object" && !Array.isArray(field) && !
|
|
46587
|
+
if (field && typeof field === "object" && !Array.isArray(field) && !React77__default.isValidElement(field) && !(field instanceof Date)) {
|
|
46502
46588
|
const obj = field;
|
|
46503
46589
|
const fieldName = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
|
|
46504
46590
|
if (!fieldName) return field;
|
|
@@ -46970,7 +47056,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
46970
47056
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
46971
47057
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
46972
47058
|
}
|
|
46973
|
-
return /* @__PURE__ */ jsx(
|
|
47059
|
+
return /* @__PURE__ */ jsx(React77__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
46974
47060
|
}
|
|
46975
47061
|
if (!child || typeof child !== "object") return null;
|
|
46976
47062
|
const childId = `${parentId}-${index}`;
|
|
@@ -47027,14 +47113,14 @@ function isPatternConfig(value) {
|
|
|
47027
47113
|
if (value === null || value === void 0) return false;
|
|
47028
47114
|
if (typeof value !== "object") return false;
|
|
47029
47115
|
if (Array.isArray(value)) return false;
|
|
47030
|
-
if (
|
|
47116
|
+
if (React77__default.isValidElement(value)) return false;
|
|
47031
47117
|
if (value instanceof Date) return false;
|
|
47032
47118
|
if (typeof value === "function") return false;
|
|
47033
47119
|
const record = value;
|
|
47034
47120
|
return "type" in record && typeof record.type === "string" && getComponentForPattern$1(record.type) !== null;
|
|
47035
47121
|
}
|
|
47036
47122
|
function isPlainConfigObject(value) {
|
|
47037
|
-
if (
|
|
47123
|
+
if (React77__default.isValidElement(value)) return false;
|
|
47038
47124
|
if (value instanceof Date) return false;
|
|
47039
47125
|
const proto = Object.getPrototypeOf(value);
|
|
47040
47126
|
return proto === Object.prototype || proto === null;
|
|
@@ -47175,7 +47261,7 @@ function SlotContentRenderer({
|
|
|
47175
47261
|
for (const slotKey of CONTENT_NODE_SLOTS) {
|
|
47176
47262
|
const slotVal = restProps[slotKey];
|
|
47177
47263
|
if (slotVal === void 0 || slotVal === null) continue;
|
|
47178
|
-
if (
|
|
47264
|
+
if (React77__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
|
|
47179
47265
|
const typelessChildren = !Array.isArray(slotVal) && typeof slotVal === "object" && !("type" in slotVal) && Array.isArray(slotVal.children) ? slotVal.children : void 0;
|
|
47180
47266
|
if (typelessChildren !== void 0 || Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
|
|
47181
47267
|
nodeSlotOverrides[slotKey] = renderPatternChildren(
|
|
@@ -47229,7 +47315,7 @@ function SlotContentRenderer({
|
|
|
47229
47315
|
const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
|
|
47230
47316
|
if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
|
|
47231
47317
|
const sample = resolvedItems[0];
|
|
47232
|
-
if (sample && typeof sample === "object" && !Array.isArray(sample) && !
|
|
47318
|
+
if (sample && typeof sample === "object" && !Array.isArray(sample) && !React77__default.isValidElement(sample) && !(sample instanceof Date)) {
|
|
47233
47319
|
const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
|
|
47234
47320
|
finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
|
|
47235
47321
|
}
|