@almadar/ui 5.134.0 → 5.135.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 +1262 -1419
- package/dist/avl/index.js +317 -474
- package/dist/{cn-D3H9UzCW.d.cts → cn-B8GXqrtp.d.cts} +1 -1
- package/dist/{cn-Dm0VrLRG.d.ts → cn-CZq0uJLA.d.ts} +1 -1
- package/dist/components/index.cjs +93 -260
- package/dist/components/index.d.cts +20 -194
- package/dist/components/index.d.ts +20 -194
- package/dist/components/index.js +94 -256
- package/dist/lib/drawable/three/index.cjs +15 -0
- package/dist/lib/drawable/three/index.d.cts +1 -1
- package/dist/lib/drawable/three/index.d.ts +1 -1
- package/dist/lib/drawable/three/index.js +15 -0
- package/dist/lib/index.cjs +28 -0
- package/dist/lib/index.d.cts +21 -3
- package/dist/lib/index.d.ts +21 -3
- package/dist/lib/index.js +27 -1
- package/dist/{paintDispatch-BXJgISot.d.cts → paintDispatch-Bl2sfRFb.d.cts} +37 -8
- package/dist/{paintDispatch-BXJgISot.d.ts → paintDispatch-Bl2sfRFb.d.ts} +37 -8
- package/dist/providers/index.cjs +1144 -1301
- package/dist/providers/index.js +293 -450
- package/dist/runtime/index.cjs +1123 -1280
- package/dist/runtime/index.js +297 -454
- package/package.json +4 -4
package/dist/runtime/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React82 from 'react';
|
|
2
|
+
import React82__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useSyncExternalStore, useLayoutEffect, lazy, useId } from 'react';
|
|
3
3
|
import { EventBusContext, useTraitScopeChain, useEntitySchemaOptional, useEntitySchema, getAllPages, matchPathAmong, OrbitalProvider, TraitScopeProvider, ServerBridgeProvider, useCurrentPagePath, useGameAudioContextOptional, VerificationProvider, EntitySchemaProvider, OrbitalThemeProvider, useServerBridge } from '@almadar/ui/providers';
|
|
4
4
|
export { EntitySchemaProvider, ServerBridgeProvider, TraitContext, TraitProvider, useEntitySchema, useEntitySchemaOptional, useServerBridge, useTrait, useTraitContext } from '@almadar/ui/providers';
|
|
5
5
|
import { createLogger, setNamespaceLevel, isLogLevelEnabled } from '@almadar/logger';
|
|
@@ -928,7 +928,7 @@ var init_Box = __esm({
|
|
|
928
928
|
fixed: "fixed",
|
|
929
929
|
sticky: "sticky"
|
|
930
930
|
};
|
|
931
|
-
Box =
|
|
931
|
+
Box = React82__default.forwardRef(
|
|
932
932
|
({
|
|
933
933
|
padding,
|
|
934
934
|
paddingX,
|
|
@@ -993,7 +993,7 @@ var init_Box = __esm({
|
|
|
993
993
|
onPointerDown?.(e);
|
|
994
994
|
}, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
|
|
995
995
|
const isClickable = action || onClick;
|
|
996
|
-
return
|
|
996
|
+
return React82__default.createElement(
|
|
997
997
|
Component,
|
|
998
998
|
{
|
|
999
999
|
ref,
|
|
@@ -1210,7 +1210,7 @@ var init_Icon = __esm({
|
|
|
1210
1210
|
const effectiveName = typeof icon === "string" && icon !== "" ? icon : name;
|
|
1211
1211
|
const effectiveStrokeWidth = strokeWidth != null && strokeWidth > 0 ? strokeWidth : void 0;
|
|
1212
1212
|
const family = useIconFamily();
|
|
1213
|
-
const RenderedComponent =
|
|
1213
|
+
const RenderedComponent = React82__default.useMemo(() => {
|
|
1214
1214
|
if (directIcon) return null;
|
|
1215
1215
|
return effectiveName ? resolveIconForFamily(effectiveName) : null;
|
|
1216
1216
|
}, [directIcon, effectiveName, family]);
|
|
@@ -1330,7 +1330,7 @@ var init_atlasSlice = __esm({
|
|
|
1330
1330
|
}
|
|
1331
1331
|
});
|
|
1332
1332
|
function useAtlasSliceDataUrl(asset) {
|
|
1333
|
-
const [, bump] =
|
|
1333
|
+
const [, bump] = React82.useReducer((x) => x + 1, 0);
|
|
1334
1334
|
if (!isAtlasAsset(asset)) return void 0;
|
|
1335
1335
|
const key = `${asset.atlas}#${asset.sprite}`;
|
|
1336
1336
|
const cached = sliceDataUrlCache.get(key);
|
|
@@ -1393,13 +1393,13 @@ function AtlasImage({
|
|
|
1393
1393
|
style,
|
|
1394
1394
|
"aria-hidden": ariaHidden
|
|
1395
1395
|
}) {
|
|
1396
|
-
const [, bump] =
|
|
1397
|
-
const canvasRef =
|
|
1396
|
+
const [, bump] = React82.useReducer((x) => x + 1, 0);
|
|
1397
|
+
const canvasRef = React82.useRef(null);
|
|
1398
1398
|
const sliced = isAtlasAsset(asset);
|
|
1399
1399
|
const atlas = sliced ? getAtlas(asset.atlas, bump) : void 0;
|
|
1400
1400
|
const img = sliced && asset?.url ? getSheetImage(asset.url, bump) : null;
|
|
1401
1401
|
const rect = sliced && atlas ? subRectFor(atlas, asset.sprite) : null;
|
|
1402
|
-
|
|
1402
|
+
React82.useEffect(() => {
|
|
1403
1403
|
const canvas = canvasRef.current;
|
|
1404
1404
|
if (!canvas || !img || !rect) return;
|
|
1405
1405
|
canvas.width = rect.sw;
|
|
@@ -1475,7 +1475,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
1475
1475
|
const IconComp = value;
|
|
1476
1476
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
1477
1477
|
}
|
|
1478
|
-
if (
|
|
1478
|
+
if (React82__default.isValidElement(value)) {
|
|
1479
1479
|
return value;
|
|
1480
1480
|
}
|
|
1481
1481
|
if (typeof value === "object" && value !== null && isIconLike(value)) {
|
|
@@ -1552,7 +1552,7 @@ var init_Button = __esm({
|
|
|
1552
1552
|
md: "h-icon-default w-icon-default",
|
|
1553
1553
|
lg: "h-icon-default w-icon-default"
|
|
1554
1554
|
};
|
|
1555
|
-
Button =
|
|
1555
|
+
Button = React82__default.forwardRef(
|
|
1556
1556
|
({
|
|
1557
1557
|
className,
|
|
1558
1558
|
variant = "primary",
|
|
@@ -1622,7 +1622,7 @@ var Dialog;
|
|
|
1622
1622
|
var init_Dialog = __esm({
|
|
1623
1623
|
"components/core/atoms/Dialog.tsx"() {
|
|
1624
1624
|
init_cn();
|
|
1625
|
-
Dialog =
|
|
1625
|
+
Dialog = React82__default.forwardRef(
|
|
1626
1626
|
({
|
|
1627
1627
|
role = "dialog",
|
|
1628
1628
|
"aria-modal": ariaModal = true,
|
|
@@ -1695,6 +1695,32 @@ function formatValue(value, format) {
|
|
|
1695
1695
|
return String(value);
|
|
1696
1696
|
}
|
|
1697
1697
|
}
|
|
1698
|
+
function compareCellValues(a, b) {
|
|
1699
|
+
const aEmpty = a === null || a === void 0 || a === "";
|
|
1700
|
+
const bEmpty = b === null || b === void 0 || b === "";
|
|
1701
|
+
if (aEmpty || bEmpty) return aEmpty && bEmpty ? 0 : aEmpty ? 1 : -1;
|
|
1702
|
+
if (typeof a === "number" && typeof b === "number") return a - b;
|
|
1703
|
+
if (typeof a === "boolean" && typeof b === "boolean") return Number(a) - Number(b);
|
|
1704
|
+
const aNum = Number(a);
|
|
1705
|
+
const bNum = Number(b);
|
|
1706
|
+
if (Number.isFinite(aNum) && Number.isFinite(bNum)) return aNum - bNum;
|
|
1707
|
+
const aTime = dateLikeTime(a);
|
|
1708
|
+
const bTime = dateLikeTime(b);
|
|
1709
|
+
if (aTime !== null && bTime !== null) return aTime - bTime;
|
|
1710
|
+
return String(a).localeCompare(String(b));
|
|
1711
|
+
}
|
|
1712
|
+
function dateLikeTime(value) {
|
|
1713
|
+
if (value instanceof Date) return value.getTime();
|
|
1714
|
+
const text = String(value);
|
|
1715
|
+
if (!/\d/.test(text) || !/[-/:T]/.test(text)) return null;
|
|
1716
|
+
const time = Date.parse(text);
|
|
1717
|
+
return Number.isNaN(time) ? null : time;
|
|
1718
|
+
}
|
|
1719
|
+
function sortRows(rows, field, direction = "asc") {
|
|
1720
|
+
if (!field) return rows;
|
|
1721
|
+
const dir = direction === "desc" ? -1 : 1;
|
|
1722
|
+
return [...rows].sort((a, b) => dir * compareCellValues(a?.[field], b?.[field]));
|
|
1723
|
+
}
|
|
1698
1724
|
var init_format = __esm({
|
|
1699
1725
|
"lib/format.ts"() {
|
|
1700
1726
|
}
|
|
@@ -1807,7 +1833,7 @@ var init_Typography = __esm({
|
|
|
1807
1833
|
if (format !== void 0 && format !== "none" && (typeof body === "string" || typeof body === "number" || body instanceof Date)) {
|
|
1808
1834
|
body = formatValue(body, format);
|
|
1809
1835
|
}
|
|
1810
|
-
return
|
|
1836
|
+
return React82__default.createElement(
|
|
1811
1837
|
Component,
|
|
1812
1838
|
{
|
|
1813
1839
|
id,
|
|
@@ -2370,7 +2396,7 @@ var init_Badge = __esm({
|
|
|
2370
2396
|
md: "px-2.5 py-1 text-sm",
|
|
2371
2397
|
lg: "px-3 py-1.5 text-base"
|
|
2372
2398
|
};
|
|
2373
|
-
Badge =
|
|
2399
|
+
Badge = React82__default.forwardRef(
|
|
2374
2400
|
({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, ...props }, ref) => {
|
|
2375
2401
|
const iconSizes3 = {
|
|
2376
2402
|
sm: "h-icon-default w-icon-default",
|
|
@@ -2720,7 +2746,7 @@ var init_SvgFlow = __esm({
|
|
|
2720
2746
|
width = 100,
|
|
2721
2747
|
height = 100
|
|
2722
2748
|
}) => {
|
|
2723
|
-
const markerId =
|
|
2749
|
+
const markerId = React82__default.useMemo(() => {
|
|
2724
2750
|
flowIdCounter += 1;
|
|
2725
2751
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
2726
2752
|
}, []);
|
|
@@ -3313,7 +3339,7 @@ var init_SvgRing = __esm({
|
|
|
3313
3339
|
width = 100,
|
|
3314
3340
|
height = 100
|
|
3315
3341
|
}) => {
|
|
3316
|
-
const gradientId =
|
|
3342
|
+
const gradientId = React82__default.useMemo(() => {
|
|
3317
3343
|
ringIdCounter += 1;
|
|
3318
3344
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
3319
3345
|
}, []);
|
|
@@ -3494,7 +3520,7 @@ var init_Input = __esm({
|
|
|
3494
3520
|
init_cn();
|
|
3495
3521
|
init_Icon();
|
|
3496
3522
|
init_useEventBus();
|
|
3497
|
-
Input =
|
|
3523
|
+
Input = React82__default.forwardRef(
|
|
3498
3524
|
({
|
|
3499
3525
|
className,
|
|
3500
3526
|
inputType,
|
|
@@ -3662,7 +3688,7 @@ var Label;
|
|
|
3662
3688
|
var init_Label = __esm({
|
|
3663
3689
|
"components/core/atoms/Label.tsx"() {
|
|
3664
3690
|
init_cn();
|
|
3665
|
-
Label =
|
|
3691
|
+
Label = React82__default.forwardRef(
|
|
3666
3692
|
({ className, required, children, ...props }, ref) => {
|
|
3667
3693
|
return /* @__PURE__ */ jsxs(
|
|
3668
3694
|
"label",
|
|
@@ -3689,7 +3715,7 @@ var init_Textarea = __esm({
|
|
|
3689
3715
|
"components/core/atoms/Textarea.tsx"() {
|
|
3690
3716
|
init_cn();
|
|
3691
3717
|
init_useEventBus();
|
|
3692
|
-
Textarea =
|
|
3718
|
+
Textarea = React82__default.forwardRef(
|
|
3693
3719
|
({ className, error, onChange, ...props }, ref) => {
|
|
3694
3720
|
const eventBus = useEventBus();
|
|
3695
3721
|
const handleChange = (e) => {
|
|
@@ -3928,7 +3954,7 @@ var init_Select = __esm({
|
|
|
3928
3954
|
init_cn();
|
|
3929
3955
|
init_Icon();
|
|
3930
3956
|
init_useEventBus();
|
|
3931
|
-
Select =
|
|
3957
|
+
Select = React82__default.forwardRef(
|
|
3932
3958
|
(props, _ref) => {
|
|
3933
3959
|
const { multiple, searchable, clearable } = props;
|
|
3934
3960
|
if (multiple || searchable || clearable) {
|
|
@@ -3945,7 +3971,7 @@ var init_Checkbox = __esm({
|
|
|
3945
3971
|
"components/core/atoms/Checkbox.tsx"() {
|
|
3946
3972
|
init_cn();
|
|
3947
3973
|
init_useEventBus();
|
|
3948
|
-
Checkbox =
|
|
3974
|
+
Checkbox = React82__default.forwardRef(
|
|
3949
3975
|
({ className, label, id, onChange, ...props }, ref) => {
|
|
3950
3976
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
3951
3977
|
const eventBus = useEventBus();
|
|
@@ -3999,7 +4025,7 @@ var init_Spinner = __esm({
|
|
|
3999
4025
|
md: "h-6 w-6",
|
|
4000
4026
|
lg: "h-8 w-8"
|
|
4001
4027
|
};
|
|
4002
|
-
Spinner =
|
|
4028
|
+
Spinner = React82__default.forwardRef(
|
|
4003
4029
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
4004
4030
|
if (overlay) {
|
|
4005
4031
|
return /* @__PURE__ */ jsx(
|
|
@@ -4089,7 +4115,7 @@ var init_Card = __esm({
|
|
|
4089
4115
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
4090
4116
|
"tile-image-first": "p-0 overflow-hidden"
|
|
4091
4117
|
};
|
|
4092
|
-
Card =
|
|
4118
|
+
Card = React82__default.forwardRef(
|
|
4093
4119
|
({
|
|
4094
4120
|
className,
|
|
4095
4121
|
variant = "bordered",
|
|
@@ -4138,9 +4164,9 @@ var init_Card = __esm({
|
|
|
4138
4164
|
}
|
|
4139
4165
|
);
|
|
4140
4166
|
Card.displayName = "Card";
|
|
4141
|
-
CardHeader =
|
|
4167
|
+
CardHeader = React82__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
4142
4168
|
CardHeader.displayName = "CardHeader";
|
|
4143
|
-
CardTitle =
|
|
4169
|
+
CardTitle = React82__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4144
4170
|
"h3",
|
|
4145
4171
|
{
|
|
4146
4172
|
ref,
|
|
@@ -4153,11 +4179,11 @@ var init_Card = __esm({
|
|
|
4153
4179
|
}
|
|
4154
4180
|
));
|
|
4155
4181
|
CardTitle.displayName = "CardTitle";
|
|
4156
|
-
CardContent =
|
|
4182
|
+
CardContent = React82__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
4157
4183
|
CardContent.displayName = "CardContent";
|
|
4158
4184
|
CardBody = CardContent;
|
|
4159
4185
|
CardBody.displayName = "CardBody";
|
|
4160
|
-
CardFooter =
|
|
4186
|
+
CardFooter = React82__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4161
4187
|
"div",
|
|
4162
4188
|
{
|
|
4163
4189
|
ref,
|
|
@@ -4244,7 +4270,7 @@ var init_FilterPill = __esm({
|
|
|
4244
4270
|
md: "w-3.5 h-3.5",
|
|
4245
4271
|
lg: "w-4 h-4"
|
|
4246
4272
|
};
|
|
4247
|
-
FilterPill =
|
|
4273
|
+
FilterPill = React82__default.forwardRef(
|
|
4248
4274
|
({
|
|
4249
4275
|
className,
|
|
4250
4276
|
variant = "default",
|
|
@@ -4373,8 +4399,8 @@ var init_Avatar = __esm({
|
|
|
4373
4399
|
actionPayload
|
|
4374
4400
|
}) => {
|
|
4375
4401
|
const eventBus = useEventBus();
|
|
4376
|
-
const [imgFailed, setImgFailed] =
|
|
4377
|
-
|
|
4402
|
+
const [imgFailed, setImgFailed] = React82__default.useState(false);
|
|
4403
|
+
React82__default.useEffect(() => {
|
|
4378
4404
|
setImgFailed(false);
|
|
4379
4405
|
}, [src]);
|
|
4380
4406
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -4487,7 +4513,7 @@ var init_Center = __esm({
|
|
|
4487
4513
|
as: Component = "div"
|
|
4488
4514
|
}) => {
|
|
4489
4515
|
const mergedStyle = minHeight ? { minHeight, ...style } : style;
|
|
4490
|
-
return
|
|
4516
|
+
return React82__default.createElement(Component, {
|
|
4491
4517
|
className: cn(
|
|
4492
4518
|
inline ? "inline-flex" : "flex",
|
|
4493
4519
|
horizontal && "justify-center",
|
|
@@ -4755,7 +4781,7 @@ var init_Radio = __esm({
|
|
|
4755
4781
|
md: "w-2.5 h-2.5",
|
|
4756
4782
|
lg: "w-3 h-3"
|
|
4757
4783
|
};
|
|
4758
|
-
Radio =
|
|
4784
|
+
Radio = React82__default.forwardRef(
|
|
4759
4785
|
({
|
|
4760
4786
|
label,
|
|
4761
4787
|
helperText,
|
|
@@ -4772,12 +4798,12 @@ var init_Radio = __esm({
|
|
|
4772
4798
|
onChange,
|
|
4773
4799
|
...props
|
|
4774
4800
|
}, ref) => {
|
|
4775
|
-
const reactId =
|
|
4801
|
+
const reactId = React82__default.useId();
|
|
4776
4802
|
const baseId = id || `radio-${reactId}`;
|
|
4777
4803
|
const hasError = !!error;
|
|
4778
4804
|
const eventBus = useEventBus();
|
|
4779
|
-
const [selected, setSelected] =
|
|
4780
|
-
|
|
4805
|
+
const [selected, setSelected] = React82__default.useState(value);
|
|
4806
|
+
React82__default.useEffect(() => {
|
|
4781
4807
|
if (value !== void 0) setSelected(value);
|
|
4782
4808
|
}, [value]);
|
|
4783
4809
|
const pick = (next, e) => {
|
|
@@ -4959,7 +4985,7 @@ var init_Switch = __esm({
|
|
|
4959
4985
|
"components/core/atoms/Switch.tsx"() {
|
|
4960
4986
|
"use client";
|
|
4961
4987
|
init_cn();
|
|
4962
|
-
Switch =
|
|
4988
|
+
Switch = React82.forwardRef(
|
|
4963
4989
|
({
|
|
4964
4990
|
checked,
|
|
4965
4991
|
defaultChecked = false,
|
|
@@ -4970,10 +4996,10 @@ var init_Switch = __esm({
|
|
|
4970
4996
|
name,
|
|
4971
4997
|
className
|
|
4972
4998
|
}, ref) => {
|
|
4973
|
-
const [isChecked, setIsChecked] =
|
|
4999
|
+
const [isChecked, setIsChecked] = React82.useState(
|
|
4974
5000
|
checked !== void 0 ? checked : defaultChecked
|
|
4975
5001
|
);
|
|
4976
|
-
|
|
5002
|
+
React82.useEffect(() => {
|
|
4977
5003
|
if (checked !== void 0) {
|
|
4978
5004
|
setIsChecked(checked);
|
|
4979
5005
|
}
|
|
@@ -5136,7 +5162,7 @@ var init_Stack = __esm({
|
|
|
5136
5162
|
};
|
|
5137
5163
|
const isHorizontal = direction === "horizontal";
|
|
5138
5164
|
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";
|
|
5139
|
-
return
|
|
5165
|
+
return React82__default.createElement(
|
|
5140
5166
|
Component,
|
|
5141
5167
|
{
|
|
5142
5168
|
className: cn(
|
|
@@ -5336,7 +5362,7 @@ var Aside;
|
|
|
5336
5362
|
var init_Aside = __esm({
|
|
5337
5363
|
"components/core/atoms/Aside.tsx"() {
|
|
5338
5364
|
init_cn();
|
|
5339
|
-
Aside =
|
|
5365
|
+
Aside = React82__default.forwardRef(
|
|
5340
5366
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
5341
5367
|
);
|
|
5342
5368
|
Aside.displayName = "Aside";
|
|
@@ -5415,9 +5441,9 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5415
5441
|
className
|
|
5416
5442
|
}) => {
|
|
5417
5443
|
const { t } = useTranslate();
|
|
5418
|
-
const [isVisible, setIsVisible] =
|
|
5419
|
-
const timeoutRef =
|
|
5420
|
-
const triggerRef =
|
|
5444
|
+
const [isVisible, setIsVisible] = React82__default.useState(false);
|
|
5445
|
+
const timeoutRef = React82__default.useRef(null);
|
|
5446
|
+
const triggerRef = React82__default.useRef(null);
|
|
5421
5447
|
const handleMouseEnter = () => {
|
|
5422
5448
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5423
5449
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -5428,7 +5454,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5428
5454
|
};
|
|
5429
5455
|
const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
|
|
5430
5456
|
const open = isVisible || revealed;
|
|
5431
|
-
|
|
5457
|
+
React82__default.useEffect(() => {
|
|
5432
5458
|
return () => {
|
|
5433
5459
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5434
5460
|
};
|
|
@@ -5638,7 +5664,7 @@ var init_StatusDot = __esm({
|
|
|
5638
5664
|
md: "w-2.5 h-2.5",
|
|
5639
5665
|
lg: "w-3 h-3"
|
|
5640
5666
|
};
|
|
5641
|
-
StatusDot =
|
|
5667
|
+
StatusDot = React82__default.forwardRef(
|
|
5642
5668
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
5643
5669
|
return /* @__PURE__ */ jsx(
|
|
5644
5670
|
"span",
|
|
@@ -5692,7 +5718,7 @@ var init_TrendIndicator = __esm({
|
|
|
5692
5718
|
down: "trending-down",
|
|
5693
5719
|
flat: "arrow-right"
|
|
5694
5720
|
};
|
|
5695
|
-
TrendIndicator =
|
|
5721
|
+
TrendIndicator = React82__default.forwardRef(
|
|
5696
5722
|
({
|
|
5697
5723
|
className,
|
|
5698
5724
|
value,
|
|
@@ -5761,7 +5787,7 @@ var init_RangeSlider = __esm({
|
|
|
5761
5787
|
md: "w-4 h-4",
|
|
5762
5788
|
lg: "w-5 h-5"
|
|
5763
5789
|
};
|
|
5764
|
-
RangeSlider =
|
|
5790
|
+
RangeSlider = React82__default.forwardRef(
|
|
5765
5791
|
({
|
|
5766
5792
|
className,
|
|
5767
5793
|
min = 0,
|
|
@@ -6337,7 +6363,7 @@ var init_ContentSection = __esm({
|
|
|
6337
6363
|
md: "py-16",
|
|
6338
6364
|
lg: "py-24"
|
|
6339
6365
|
};
|
|
6340
|
-
ContentSection =
|
|
6366
|
+
ContentSection = React82__default.forwardRef(
|
|
6341
6367
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
6342
6368
|
return /* @__PURE__ */ jsx(
|
|
6343
6369
|
Box,
|
|
@@ -6871,7 +6897,7 @@ var init_AnimatedReveal = __esm({
|
|
|
6871
6897
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
6872
6898
|
"none": {}
|
|
6873
6899
|
};
|
|
6874
|
-
AnimatedReveal =
|
|
6900
|
+
AnimatedReveal = React82__default.forwardRef(
|
|
6875
6901
|
({
|
|
6876
6902
|
trigger = "scroll",
|
|
6877
6903
|
animation = "fade-up",
|
|
@@ -7031,7 +7057,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
7031
7057
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
7032
7058
|
"use client";
|
|
7033
7059
|
init_cn();
|
|
7034
|
-
AnimatedGraphic =
|
|
7060
|
+
AnimatedGraphic = React82__default.forwardRef(
|
|
7035
7061
|
({
|
|
7036
7062
|
src,
|
|
7037
7063
|
svgContent,
|
|
@@ -7054,7 +7080,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
7054
7080
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
7055
7081
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
7056
7082
|
const prevAnimateRef = useRef(animate);
|
|
7057
|
-
const setRef =
|
|
7083
|
+
const setRef = React82__default.useCallback(
|
|
7058
7084
|
(node) => {
|
|
7059
7085
|
containerRef.current = node;
|
|
7060
7086
|
if (typeof ref === "function") ref(node);
|
|
@@ -7782,9 +7808,9 @@ function ControlButton({
|
|
|
7782
7808
|
className
|
|
7783
7809
|
}) {
|
|
7784
7810
|
const eventBus = useEventBus();
|
|
7785
|
-
const [isPressed, setIsPressed] =
|
|
7811
|
+
const [isPressed, setIsPressed] = React82.useState(false);
|
|
7786
7812
|
const actualPressed = pressed ?? isPressed;
|
|
7787
|
-
const handlePointerDown =
|
|
7813
|
+
const handlePointerDown = React82.useCallback(
|
|
7788
7814
|
(e) => {
|
|
7789
7815
|
e.preventDefault();
|
|
7790
7816
|
if (disabled) return;
|
|
@@ -7794,7 +7820,7 @@ function ControlButton({
|
|
|
7794
7820
|
},
|
|
7795
7821
|
[disabled, pressEvent, eventBus, onPress]
|
|
7796
7822
|
);
|
|
7797
|
-
const handlePointerUp =
|
|
7823
|
+
const handlePointerUp = React82.useCallback(
|
|
7798
7824
|
(e) => {
|
|
7799
7825
|
e.preventDefault();
|
|
7800
7826
|
if (disabled) return;
|
|
@@ -7804,7 +7830,7 @@ function ControlButton({
|
|
|
7804
7830
|
},
|
|
7805
7831
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
7806
7832
|
);
|
|
7807
|
-
const handlePointerLeave =
|
|
7833
|
+
const handlePointerLeave = React82.useCallback(
|
|
7808
7834
|
(e) => {
|
|
7809
7835
|
if (isPressed) {
|
|
7810
7836
|
setIsPressed(false);
|
|
@@ -8045,210 +8071,6 @@ var init_ChoiceButton = __esm({
|
|
|
8045
8071
|
ChoiceButton.displayName = "ChoiceButton";
|
|
8046
8072
|
}
|
|
8047
8073
|
});
|
|
8048
|
-
function SvgStage({
|
|
8049
|
-
cols,
|
|
8050
|
-
rows,
|
|
8051
|
-
tileSize = 32,
|
|
8052
|
-
background = "var(--color-background)",
|
|
8053
|
-
tileClickEvent,
|
|
8054
|
-
tileHoverEvent,
|
|
8055
|
-
tileLeaveEvent,
|
|
8056
|
-
keyMap,
|
|
8057
|
-
keyUpMap,
|
|
8058
|
-
className,
|
|
8059
|
-
children
|
|
8060
|
-
}) {
|
|
8061
|
-
const eventBus = useEventBus();
|
|
8062
|
-
const svgRef = useRef(null);
|
|
8063
|
-
const pointerDownRef = useRef(null);
|
|
8064
|
-
const cellFromClient = useCallback((clientX, clientY) => {
|
|
8065
|
-
const svg = svgRef.current;
|
|
8066
|
-
if (!svg) return null;
|
|
8067
|
-
const rect = svg.getBoundingClientRect();
|
|
8068
|
-
if (rect.width === 0 || rect.height === 0) return null;
|
|
8069
|
-
const vbW = cols * tileSize;
|
|
8070
|
-
const vbH = rows * tileSize;
|
|
8071
|
-
const meet = Math.min(rect.width / vbW, rect.height / vbH);
|
|
8072
|
-
const offsetX = (rect.width - vbW * meet) / 2;
|
|
8073
|
-
const offsetY = (rect.height - vbH * meet) / 2;
|
|
8074
|
-
const svgX = (clientX - rect.left - offsetX) / meet;
|
|
8075
|
-
const svgY = (clientY - rect.top - offsetY) / meet;
|
|
8076
|
-
return {
|
|
8077
|
-
x: Math.min(Math.max(Math.floor(svgX / tileSize), 0), cols - 1),
|
|
8078
|
-
y: Math.min(Math.max(Math.floor(svgY / tileSize), 0), rows - 1)
|
|
8079
|
-
};
|
|
8080
|
-
}, [cols, rows, tileSize]);
|
|
8081
|
-
const handlePointerDown = useCallback((e) => {
|
|
8082
|
-
pointerDownRef.current = { clientX: e.clientX, clientY: e.clientY };
|
|
8083
|
-
}, []);
|
|
8084
|
-
const handlePointerUp = useCallback((e) => {
|
|
8085
|
-
const down = pointerDownRef.current;
|
|
8086
|
-
pointerDownRef.current = null;
|
|
8087
|
-
if (!tileClickEvent) return;
|
|
8088
|
-
if (down && Math.hypot(e.clientX - down.clientX, e.clientY - down.clientY) > 5) return;
|
|
8089
|
-
const cell = cellFromClient(e.clientX, e.clientY);
|
|
8090
|
-
if (cell) eventBus.emit(`UI:${tileClickEvent}`, cell);
|
|
8091
|
-
}, [cellFromClient, tileClickEvent, eventBus]);
|
|
8092
|
-
const handlePointerMove = useCallback((e) => {
|
|
8093
|
-
if (!tileHoverEvent) return;
|
|
8094
|
-
const cell = cellFromClient(e.clientX, e.clientY);
|
|
8095
|
-
if (cell) eventBus.emit(`UI:${tileHoverEvent}`, cell);
|
|
8096
|
-
}, [cellFromClient, tileHoverEvent, eventBus]);
|
|
8097
|
-
const handlePointerLeave = useCallback(() => {
|
|
8098
|
-
pointerDownRef.current = null;
|
|
8099
|
-
if (tileLeaveEvent) eventBus.emit(`UI:${tileLeaveEvent}`, {});
|
|
8100
|
-
}, [tileLeaveEvent, eventBus]);
|
|
8101
|
-
useEffect(() => {
|
|
8102
|
-
if (!keyMap && !keyUpMap) return;
|
|
8103
|
-
const onDown = (e) => {
|
|
8104
|
-
const ev = keyMap?.[e.code];
|
|
8105
|
-
if (ev) {
|
|
8106
|
-
eventBus.emit(`UI:${ev}`, {});
|
|
8107
|
-
e.preventDefault();
|
|
8108
|
-
}
|
|
8109
|
-
};
|
|
8110
|
-
const onUp = (e) => {
|
|
8111
|
-
const ev = keyUpMap?.[e.code];
|
|
8112
|
-
if (ev) eventBus.emit(`UI:${ev}`, {});
|
|
8113
|
-
};
|
|
8114
|
-
window.addEventListener("keydown", onDown);
|
|
8115
|
-
window.addEventListener("keyup", onUp);
|
|
8116
|
-
return () => {
|
|
8117
|
-
window.removeEventListener("keydown", onDown);
|
|
8118
|
-
window.removeEventListener("keyup", onUp);
|
|
8119
|
-
};
|
|
8120
|
-
}, [keyMap, keyUpMap, eventBus]);
|
|
8121
|
-
useEffect(() => {
|
|
8122
|
-
if (!keyMap && !keyUpMap) return;
|
|
8123
|
-
svgRef.current?.focus();
|
|
8124
|
-
}, [keyMap, keyUpMap]);
|
|
8125
|
-
const stageContext = useMemo(() => ({ tileSize }), [tileSize]);
|
|
8126
|
-
return /* @__PURE__ */ jsxs(
|
|
8127
|
-
"svg",
|
|
8128
|
-
{
|
|
8129
|
-
ref: svgRef,
|
|
8130
|
-
"data-testid": "svg-stage",
|
|
8131
|
-
viewBox: `0 0 ${cols * tileSize} ${rows * tileSize}`,
|
|
8132
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
8133
|
-
className: cn("block h-full w-full", className),
|
|
8134
|
-
tabIndex: keyMap || keyUpMap ? 0 : void 0,
|
|
8135
|
-
onPointerDown: handlePointerDown,
|
|
8136
|
-
onPointerMove: handlePointerMove,
|
|
8137
|
-
onPointerUp: handlePointerUp,
|
|
8138
|
-
onPointerLeave: handlePointerLeave,
|
|
8139
|
-
children: [
|
|
8140
|
-
/* @__PURE__ */ jsx("rect", { width: cols * tileSize, height: rows * tileSize, fill: background }),
|
|
8141
|
-
/* @__PURE__ */ jsx(SvgStageContext.Provider, { value: stageContext, children })
|
|
8142
|
-
]
|
|
8143
|
-
}
|
|
8144
|
-
);
|
|
8145
|
-
}
|
|
8146
|
-
var SvgStageContext;
|
|
8147
|
-
var init_SvgStage = __esm({
|
|
8148
|
-
"components/game/molecules/SvgStage.tsx"() {
|
|
8149
|
-
"use client";
|
|
8150
|
-
init_cn();
|
|
8151
|
-
init_useEventBus();
|
|
8152
|
-
SvgStageContext = React83.createContext({ tileSize: 1 });
|
|
8153
|
-
SvgStage.displayName = "SvgStage";
|
|
8154
|
-
}
|
|
8155
|
-
});
|
|
8156
|
-
function SvgDrawShape({
|
|
8157
|
-
shape,
|
|
8158
|
-
x,
|
|
8159
|
-
y,
|
|
8160
|
-
width,
|
|
8161
|
-
height,
|
|
8162
|
-
radius,
|
|
8163
|
-
radiusY,
|
|
8164
|
-
points,
|
|
8165
|
-
d,
|
|
8166
|
-
x2,
|
|
8167
|
-
y2,
|
|
8168
|
-
fill,
|
|
8169
|
-
stroke,
|
|
8170
|
-
strokeWidth,
|
|
8171
|
-
opacity,
|
|
8172
|
-
className
|
|
8173
|
-
}) {
|
|
8174
|
-
const { tileSize } = useContext(SvgStageContext);
|
|
8175
|
-
const cell = (v) => v === void 0 ? void 0 : v * tileSize;
|
|
8176
|
-
const paint = {
|
|
8177
|
-
fill: fill ?? (stroke === void 0 ? "var(--color-primary)" : "none"),
|
|
8178
|
-
stroke,
|
|
8179
|
-
strokeWidth,
|
|
8180
|
-
opacity,
|
|
8181
|
-
className
|
|
8182
|
-
};
|
|
8183
|
-
return /* @__PURE__ */ jsxs("g", { transform: `translate(${x * tileSize} ${y * tileSize})`, children: [
|
|
8184
|
-
shape === "rect" && /* @__PURE__ */ jsx("rect", { width: cell(width), height: cell(height), ...paint }),
|
|
8185
|
-
shape === "circle" && /* @__PURE__ */ jsx("circle", { r: cell(radius), ...paint }),
|
|
8186
|
-
shape === "ellipse" && /* @__PURE__ */ jsx("ellipse", { rx: cell(radius), ry: cell(radiusY ?? radius), ...paint }),
|
|
8187
|
-
shape === "polygon" && /* @__PURE__ */ jsx("polygon", { points, ...paint }),
|
|
8188
|
-
shape === "polyline" && /* @__PURE__ */ jsx("polyline", { points, ...paint }),
|
|
8189
|
-
shape === "path" && /* @__PURE__ */ jsx("path", { d, ...paint }),
|
|
8190
|
-
shape === "line" && /* @__PURE__ */ jsx("line", { x2: cell(x2), y2: cell(y2), ...paint })
|
|
8191
|
-
] });
|
|
8192
|
-
}
|
|
8193
|
-
var init_SvgDrawShape = __esm({
|
|
8194
|
-
"components/game/atoms/SvgDrawShape.tsx"() {
|
|
8195
|
-
"use client";
|
|
8196
|
-
init_SvgStage();
|
|
8197
|
-
SvgDrawShape.displayName = "SvgDrawShape";
|
|
8198
|
-
}
|
|
8199
|
-
});
|
|
8200
|
-
function SvgDrawGroup({
|
|
8201
|
-
x = 0,
|
|
8202
|
-
y = 0,
|
|
8203
|
-
scale,
|
|
8204
|
-
rotate,
|
|
8205
|
-
opacity,
|
|
8206
|
-
className,
|
|
8207
|
-
children
|
|
8208
|
-
}) {
|
|
8209
|
-
const { tileSize } = useContext(SvgStageContext);
|
|
8210
|
-
const transforms = [`translate(${x * tileSize} ${y * tileSize})`];
|
|
8211
|
-
if (rotate !== void 0) transforms.push(`rotate(${rotate})`);
|
|
8212
|
-
if (scale !== void 0) transforms.push(`scale(${scale})`);
|
|
8213
|
-
return /* @__PURE__ */ jsx("g", { transform: transforms.join(" "), opacity, className, children });
|
|
8214
|
-
}
|
|
8215
|
-
var init_SvgDrawGroup = __esm({
|
|
8216
|
-
"components/game/atoms/SvgDrawGroup.tsx"() {
|
|
8217
|
-
"use client";
|
|
8218
|
-
init_SvgStage();
|
|
8219
|
-
SvgDrawGroup.displayName = "SvgDrawGroup";
|
|
8220
|
-
}
|
|
8221
|
-
});
|
|
8222
|
-
function SvgDrawText({
|
|
8223
|
-
x,
|
|
8224
|
-
y,
|
|
8225
|
-
text,
|
|
8226
|
-
size = 12,
|
|
8227
|
-
fill = "var(--color-foreground)",
|
|
8228
|
-
anchor = "middle",
|
|
8229
|
-
className
|
|
8230
|
-
}) {
|
|
8231
|
-
const { tileSize } = useContext(SvgStageContext);
|
|
8232
|
-
return /* @__PURE__ */ jsx(
|
|
8233
|
-
"text",
|
|
8234
|
-
{
|
|
8235
|
-
x: x * tileSize,
|
|
8236
|
-
y: y * tileSize,
|
|
8237
|
-
fontSize: size,
|
|
8238
|
-
fill,
|
|
8239
|
-
textAnchor: anchor,
|
|
8240
|
-
className,
|
|
8241
|
-
children: text
|
|
8242
|
-
}
|
|
8243
|
-
);
|
|
8244
|
-
}
|
|
8245
|
-
var init_SvgDrawText = __esm({
|
|
8246
|
-
"components/game/atoms/SvgDrawText.tsx"() {
|
|
8247
|
-
"use client";
|
|
8248
|
-
init_SvgStage();
|
|
8249
|
-
SvgDrawText.displayName = "SvgDrawText";
|
|
8250
|
-
}
|
|
8251
|
-
});
|
|
8252
8074
|
function ControlGrid({
|
|
8253
8075
|
kind,
|
|
8254
8076
|
buttons = DEFAULT_BUTTONS,
|
|
@@ -8266,8 +8088,8 @@ function ControlGrid({
|
|
|
8266
8088
|
className
|
|
8267
8089
|
}) {
|
|
8268
8090
|
const eventBus = useEventBus();
|
|
8269
|
-
const [active, setActive] =
|
|
8270
|
-
const handlePress =
|
|
8091
|
+
const [active, setActive] = React82.useState(/* @__PURE__ */ new Set());
|
|
8092
|
+
const handlePress = React82.useCallback(
|
|
8271
8093
|
(id) => {
|
|
8272
8094
|
setActive((prev) => new Set(prev).add(id));
|
|
8273
8095
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -8281,7 +8103,7 @@ function ControlGrid({
|
|
|
8281
8103
|
},
|
|
8282
8104
|
[kind, actionEvent, directionEvent, directionEvents, eventBus, onAction, onDirection]
|
|
8283
8105
|
);
|
|
8284
|
-
const handleRelease =
|
|
8106
|
+
const handleRelease = React82.useCallback(
|
|
8285
8107
|
(id) => {
|
|
8286
8108
|
setActive((prev) => {
|
|
8287
8109
|
const next = new Set(prev);
|
|
@@ -8639,7 +8461,7 @@ function GameMenu({
|
|
|
8639
8461
|
}) {
|
|
8640
8462
|
const resolvedOptions = (options?.length ? options : void 0) ?? (menuItems?.length ? menuItems : void 0) ?? DEFAULT_MENU_OPTIONS;
|
|
8641
8463
|
const eventBus = useEventBus();
|
|
8642
|
-
const handleOptionClick =
|
|
8464
|
+
const handleOptionClick = React82.useCallback(
|
|
8643
8465
|
(option) => {
|
|
8644
8466
|
if (option.event) {
|
|
8645
8467
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -8875,7 +8697,7 @@ function StateGraph({
|
|
|
8875
8697
|
}) {
|
|
8876
8698
|
const eventBus = useEventBus();
|
|
8877
8699
|
const nodes = states ?? [];
|
|
8878
|
-
const positions =
|
|
8700
|
+
const positions = React82.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
|
|
8879
8701
|
return /* @__PURE__ */ jsxs(
|
|
8880
8702
|
Box,
|
|
8881
8703
|
{
|
|
@@ -8946,8 +8768,8 @@ function MiniMap({
|
|
|
8946
8768
|
tileAssets,
|
|
8947
8769
|
unitAssets
|
|
8948
8770
|
}) {
|
|
8949
|
-
const canvasRef =
|
|
8950
|
-
const imgCacheRef =
|
|
8771
|
+
const canvasRef = React82.useRef(null);
|
|
8772
|
+
const imgCacheRef = React82.useRef(/* @__PURE__ */ new Map());
|
|
8951
8773
|
function loadImg(url) {
|
|
8952
8774
|
const cached = imgCacheRef.current.get(url);
|
|
8953
8775
|
if (cached) return cached.complete ? cached : null;
|
|
@@ -8962,7 +8784,7 @@ function MiniMap({
|
|
|
8962
8784
|
imgCacheRef.current.set(url, img);
|
|
8963
8785
|
return null;
|
|
8964
8786
|
}
|
|
8965
|
-
|
|
8787
|
+
React82.useEffect(() => {
|
|
8966
8788
|
const canvas = canvasRef.current;
|
|
8967
8789
|
if (!canvas) return;
|
|
8968
8790
|
const ctx = canvas.getContext("2d");
|
|
@@ -9331,6 +9153,15 @@ function createWebPainter(ctx, onAssetLoad) {
|
|
|
9331
9153
|
ctx.lineWidth = lineWidth;
|
|
9332
9154
|
ctx.stroke();
|
|
9333
9155
|
},
|
|
9156
|
+
fillPath(d, color) {
|
|
9157
|
+
ctx.fillStyle = color;
|
|
9158
|
+
ctx.fill(new Path2D(d));
|
|
9159
|
+
},
|
|
9160
|
+
strokePath(d, color, lineWidth = 1) {
|
|
9161
|
+
ctx.strokeStyle = color;
|
|
9162
|
+
ctx.lineWidth = lineWidth;
|
|
9163
|
+
ctx.stroke(new Path2D(d));
|
|
9164
|
+
},
|
|
9334
9165
|
text(str, x, y, style) {
|
|
9335
9166
|
if (style.font) ctx.font = style.font;
|
|
9336
9167
|
ctx.fillStyle = style.color;
|
|
@@ -9506,6 +9337,16 @@ var init_DrawShape = __esm({
|
|
|
9506
9337
|
if (node.stroke) painter.strokePoly(pts, node.stroke, node.strokeWidth ?? 1, true);
|
|
9507
9338
|
break;
|
|
9508
9339
|
}
|
|
9340
|
+
case "path": {
|
|
9341
|
+
if (!node.d) break;
|
|
9342
|
+
const base = dctx.projector.project(node.position);
|
|
9343
|
+
const tw = dctx.projector.tileWidth;
|
|
9344
|
+
painter.translate(base.x, base.y);
|
|
9345
|
+
painter.scale(tw, tw);
|
|
9346
|
+
if (node.fill) painter.fillPath(node.d, node.fill);
|
|
9347
|
+
if (node.stroke) painter.strokePath(node.d, node.stroke, (node.strokeWidth ?? 1) / tw);
|
|
9348
|
+
break;
|
|
9349
|
+
}
|
|
9509
9350
|
}
|
|
9510
9351
|
painter.restore();
|
|
9511
9352
|
};
|
|
@@ -9597,6 +9438,19 @@ function paintDrawable(painter, node, dctx) {
|
|
|
9597
9438
|
case "draw-text":
|
|
9598
9439
|
paintText(painter, node, dctx);
|
|
9599
9440
|
break;
|
|
9441
|
+
case "draw-group": {
|
|
9442
|
+
if (!isValidScenePos(node.position)) break;
|
|
9443
|
+
if (!Array.isArray(node.items)) break;
|
|
9444
|
+
const p = dctx.projector.project(node.position);
|
|
9445
|
+
painter.save();
|
|
9446
|
+
painter.translate(p.x, p.y);
|
|
9447
|
+
if (node.scale !== void 0) painter.scale(node.scale, node.scale);
|
|
9448
|
+
if (node.rotate !== void 0) painter.rotate(node.rotate);
|
|
9449
|
+
if (node.opacity !== void 0 && node.opacity !== 1) painter.setAlpha(node.opacity);
|
|
9450
|
+
for (const item of node.items) paintDrawable(painter, item, dctx);
|
|
9451
|
+
painter.restore();
|
|
9452
|
+
break;
|
|
9453
|
+
}
|
|
9600
9454
|
case "draw-sprite-layer":
|
|
9601
9455
|
paintSpriteLayer(painter, node, dctx);
|
|
9602
9456
|
break;
|
|
@@ -9610,6 +9464,7 @@ function paintDrawable(painter, node, dctx) {
|
|
|
9610
9464
|
}
|
|
9611
9465
|
var init_paintDispatch = __esm({
|
|
9612
9466
|
"lib/drawable/paintDispatch.ts"() {
|
|
9467
|
+
init_contract();
|
|
9613
9468
|
init_DrawSprite();
|
|
9614
9469
|
init_DrawShape();
|
|
9615
9470
|
init_DrawText();
|
|
@@ -9627,6 +9482,7 @@ function collectDrawnItems(nodes) {
|
|
|
9627
9482
|
case "draw-sprite":
|
|
9628
9483
|
case "draw-shape":
|
|
9629
9484
|
case "draw-text":
|
|
9485
|
+
case "draw-group":
|
|
9630
9486
|
if (isValidScenePos(n.position)) out.push({ pos: n.position, id: n.id });
|
|
9631
9487
|
break;
|
|
9632
9488
|
case "draw-sprite-layer":
|
|
@@ -10167,32 +10023,6 @@ var init_Canvas = __esm({
|
|
|
10167
10023
|
Canvas.displayName = "Canvas";
|
|
10168
10024
|
}
|
|
10169
10025
|
});
|
|
10170
|
-
function SvgDrawShapeLayer({
|
|
10171
|
-
items,
|
|
10172
|
-
fill,
|
|
10173
|
-
stroke,
|
|
10174
|
-
strokeWidth,
|
|
10175
|
-
opacity
|
|
10176
|
-
}) {
|
|
10177
|
-
return /* @__PURE__ */ jsx("g", { children: items.map(({ id, ...shape }) => /* @__PURE__ */ jsx(
|
|
10178
|
-
SvgDrawShape,
|
|
10179
|
-
{
|
|
10180
|
-
...shape,
|
|
10181
|
-
fill: shape.fill ?? fill,
|
|
10182
|
-
stroke: shape.stroke ?? stroke,
|
|
10183
|
-
strokeWidth: shape.strokeWidth ?? strokeWidth,
|
|
10184
|
-
opacity: shape.opacity ?? opacity
|
|
10185
|
-
},
|
|
10186
|
-
id
|
|
10187
|
-
)) });
|
|
10188
|
-
}
|
|
10189
|
-
var init_SvgDrawShapeLayer = __esm({
|
|
10190
|
-
"components/game/molecules/SvgDrawShapeLayer.tsx"() {
|
|
10191
|
-
"use client";
|
|
10192
|
-
init_SvgDrawShape();
|
|
10193
|
-
SvgDrawShapeLayer.displayName = "SvgDrawShapeLayer";
|
|
10194
|
-
}
|
|
10195
|
-
});
|
|
10196
10026
|
function GameAudioToggle({
|
|
10197
10027
|
size = "sm",
|
|
10198
10028
|
className,
|
|
@@ -10309,7 +10139,7 @@ function LinearView({
|
|
|
10309
10139
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
10310
10140
|
const isDone = i < currentIdx;
|
|
10311
10141
|
const isCurrent = i === currentIdx;
|
|
10312
|
-
return /* @__PURE__ */ jsxs(
|
|
10142
|
+
return /* @__PURE__ */ jsxs(React82__default.Fragment, { children: [
|
|
10313
10143
|
i > 0 && /* @__PURE__ */ jsx(
|
|
10314
10144
|
Typography,
|
|
10315
10145
|
{
|
|
@@ -10844,7 +10674,7 @@ function SequenceBar({
|
|
|
10844
10674
|
else onSlotRemove?.(index);
|
|
10845
10675
|
}, [emit, slotRemoveEvent, onSlotRemove, playing]);
|
|
10846
10676
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
10847
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
10677
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React82__default.Fragment, { children: [
|
|
10848
10678
|
i > 0 && /* @__PURE__ */ jsx(
|
|
10849
10679
|
Typography,
|
|
10850
10680
|
{
|
|
@@ -11493,7 +11323,7 @@ var init_ErrorBoundary = __esm({
|
|
|
11493
11323
|
}
|
|
11494
11324
|
);
|
|
11495
11325
|
};
|
|
11496
|
-
ErrorBoundary = class extends
|
|
11326
|
+
ErrorBoundary = class extends React82__default.Component {
|
|
11497
11327
|
constructor(props) {
|
|
11498
11328
|
super(props);
|
|
11499
11329
|
__publicField(this, "reset", () => {
|
|
@@ -11762,7 +11592,7 @@ var init_Container = __esm({
|
|
|
11762
11592
|
as: Component = "div"
|
|
11763
11593
|
}) => {
|
|
11764
11594
|
const resolvedSize = maxWidth ?? size ?? "lg";
|
|
11765
|
-
return
|
|
11595
|
+
return React82__default.createElement(
|
|
11766
11596
|
Component,
|
|
11767
11597
|
{
|
|
11768
11598
|
className: cn(
|
|
@@ -14727,7 +14557,7 @@ var init_CodeBlock = __esm({
|
|
|
14727
14557
|
DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
|
|
14728
14558
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
14729
14559
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
14730
|
-
CodeBlock =
|
|
14560
|
+
CodeBlock = React82__default.memo(
|
|
14731
14561
|
({
|
|
14732
14562
|
code: rawCode,
|
|
14733
14563
|
language = "text",
|
|
@@ -15315,7 +15145,7 @@ var init_MarkdownContent = __esm({
|
|
|
15315
15145
|
init_Box();
|
|
15316
15146
|
init_CodeBlock();
|
|
15317
15147
|
init_cn();
|
|
15318
|
-
MarkdownContent =
|
|
15148
|
+
MarkdownContent = React82__default.memo(
|
|
15319
15149
|
({ content, direction = "ltr", className }) => {
|
|
15320
15150
|
const { t: _t } = useTranslate();
|
|
15321
15151
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -16592,7 +16422,7 @@ var init_StateMachineView = __esm({
|
|
|
16592
16422
|
style: { top: title ? 30 : 0 },
|
|
16593
16423
|
children: [
|
|
16594
16424
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
16595
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
16425
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React82__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
16596
16426
|
StateNode2,
|
|
16597
16427
|
{
|
|
16598
16428
|
state,
|
|
@@ -22333,8 +22163,8 @@ var init_Menu = __esm({
|
|
|
22333
22163
|
"bottom-end": "bottom-start"
|
|
22334
22164
|
};
|
|
22335
22165
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
22336
|
-
const triggerChild =
|
|
22337
|
-
const triggerElement =
|
|
22166
|
+
const triggerChild = React82__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
22167
|
+
const triggerElement = React82__default.cloneElement(
|
|
22338
22168
|
triggerChild,
|
|
22339
22169
|
{
|
|
22340
22170
|
ref: triggerRef,
|
|
@@ -22429,14 +22259,14 @@ function useDataDnd(args) {
|
|
|
22429
22259
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
22430
22260
|
const enabled = isZone || Boolean(dndRoot);
|
|
22431
22261
|
const eventBus = useEventBus();
|
|
22432
|
-
const parentRoot =
|
|
22262
|
+
const parentRoot = React82__default.useContext(RootCtx);
|
|
22433
22263
|
const isRoot = enabled && parentRoot === null;
|
|
22434
|
-
const zoneId =
|
|
22264
|
+
const zoneId = React82__default.useId();
|
|
22435
22265
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
22436
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
22437
|
-
const optimisticOrdersRef =
|
|
22266
|
+
const [optimisticOrders, setOptimisticOrders] = React82__default.useState(() => /* @__PURE__ */ new Map());
|
|
22267
|
+
const optimisticOrdersRef = React82__default.useRef(optimisticOrders);
|
|
22438
22268
|
optimisticOrdersRef.current = optimisticOrders;
|
|
22439
|
-
const clearOptimisticOrder =
|
|
22269
|
+
const clearOptimisticOrder = React82__default.useCallback((group) => {
|
|
22440
22270
|
setOptimisticOrders((prev) => {
|
|
22441
22271
|
if (!prev.has(group)) return prev;
|
|
22442
22272
|
const next = new Map(prev);
|
|
@@ -22461,7 +22291,7 @@ function useDataDnd(args) {
|
|
|
22461
22291
|
const raw = it[dndItemIdField];
|
|
22462
22292
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
22463
22293
|
}).join("|");
|
|
22464
|
-
const itemIds =
|
|
22294
|
+
const itemIds = React82__default.useMemo(
|
|
22465
22295
|
() => orderedItems.map((it, idx) => {
|
|
22466
22296
|
const raw = it[dndItemIdField];
|
|
22467
22297
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
@@ -22472,7 +22302,7 @@ function useDataDnd(args) {
|
|
|
22472
22302
|
const raw = it[dndItemIdField];
|
|
22473
22303
|
return raw != null ? String(raw) : `__${idx}`;
|
|
22474
22304
|
}).join("|");
|
|
22475
|
-
|
|
22305
|
+
React82__default.useEffect(() => {
|
|
22476
22306
|
const root = isRoot ? null : parentRoot;
|
|
22477
22307
|
if (root) {
|
|
22478
22308
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -22480,20 +22310,20 @@ function useDataDnd(args) {
|
|
|
22480
22310
|
clearOptimisticOrder(ownGroup);
|
|
22481
22311
|
}
|
|
22482
22312
|
}, [itemsContentSig, ownGroup]);
|
|
22483
|
-
const zonesRef =
|
|
22484
|
-
const registerZone =
|
|
22313
|
+
const zonesRef = React82__default.useRef(/* @__PURE__ */ new Map());
|
|
22314
|
+
const registerZone = React82__default.useCallback((zoneId2, meta2) => {
|
|
22485
22315
|
zonesRef.current.set(zoneId2, meta2);
|
|
22486
22316
|
}, []);
|
|
22487
|
-
const unregisterZone =
|
|
22317
|
+
const unregisterZone = React82__default.useCallback((zoneId2) => {
|
|
22488
22318
|
zonesRef.current.delete(zoneId2);
|
|
22489
22319
|
}, []);
|
|
22490
|
-
const [activeDrag, setActiveDrag] =
|
|
22491
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
22492
|
-
const meta =
|
|
22320
|
+
const [activeDrag, setActiveDrag] = React82__default.useState(null);
|
|
22321
|
+
const [overZoneGroup, setOverZoneGroup] = React82__default.useState(null);
|
|
22322
|
+
const meta = React82__default.useMemo(
|
|
22493
22323
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
22494
22324
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
22495
22325
|
);
|
|
22496
|
-
|
|
22326
|
+
React82__default.useEffect(() => {
|
|
22497
22327
|
const target = isRoot ? null : parentRoot;
|
|
22498
22328
|
if (!target) {
|
|
22499
22329
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -22512,7 +22342,7 @@ function useDataDnd(args) {
|
|
|
22512
22342
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
22513
22343
|
const sensors = useAlmadarDndSensors(true);
|
|
22514
22344
|
const collisionDetection = almadarDndCollisionDetection;
|
|
22515
|
-
const findZoneByItem =
|
|
22345
|
+
const findZoneByItem = React82__default.useCallback(
|
|
22516
22346
|
(id) => {
|
|
22517
22347
|
for (const z of zonesRef.current.values()) {
|
|
22518
22348
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -22521,7 +22351,7 @@ function useDataDnd(args) {
|
|
|
22521
22351
|
},
|
|
22522
22352
|
[]
|
|
22523
22353
|
);
|
|
22524
|
-
|
|
22354
|
+
React82__default.useCallback(
|
|
22525
22355
|
(group) => {
|
|
22526
22356
|
for (const z of zonesRef.current.values()) {
|
|
22527
22357
|
if (z.group === group) return z;
|
|
@@ -22530,7 +22360,7 @@ function useDataDnd(args) {
|
|
|
22530
22360
|
},
|
|
22531
22361
|
[]
|
|
22532
22362
|
);
|
|
22533
|
-
const handleDragEnd =
|
|
22363
|
+
const handleDragEnd = React82__default.useCallback(
|
|
22534
22364
|
(event) => {
|
|
22535
22365
|
const { active, over } = event;
|
|
22536
22366
|
const activeIdStr = String(active.id);
|
|
@@ -22621,8 +22451,8 @@ function useDataDnd(args) {
|
|
|
22621
22451
|
},
|
|
22622
22452
|
[eventBus]
|
|
22623
22453
|
);
|
|
22624
|
-
const sortableData =
|
|
22625
|
-
const SortableItem =
|
|
22454
|
+
const sortableData = React82__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
22455
|
+
const SortableItem = React82__default.useCallback(
|
|
22626
22456
|
({ id, children }) => {
|
|
22627
22457
|
const {
|
|
22628
22458
|
attributes,
|
|
@@ -22662,7 +22492,7 @@ function useDataDnd(args) {
|
|
|
22662
22492
|
id: droppableId,
|
|
22663
22493
|
data: sortableData
|
|
22664
22494
|
});
|
|
22665
|
-
const ctx =
|
|
22495
|
+
const ctx = React82__default.useContext(RootCtx);
|
|
22666
22496
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
22667
22497
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
22668
22498
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -22677,7 +22507,7 @@ function useDataDnd(args) {
|
|
|
22677
22507
|
showForeignPlaceholder,
|
|
22678
22508
|
ctxAvailable: ctx != null
|
|
22679
22509
|
});
|
|
22680
|
-
|
|
22510
|
+
React82__default.useEffect(() => {
|
|
22681
22511
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
22682
22512
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
22683
22513
|
return /* @__PURE__ */ jsx(
|
|
@@ -22691,11 +22521,11 @@ function useDataDnd(args) {
|
|
|
22691
22521
|
}
|
|
22692
22522
|
);
|
|
22693
22523
|
};
|
|
22694
|
-
const rootContextValue =
|
|
22524
|
+
const rootContextValue = React82__default.useMemo(
|
|
22695
22525
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
22696
22526
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
22697
22527
|
);
|
|
22698
|
-
const handleDragStart =
|
|
22528
|
+
const handleDragStart = React82__default.useCallback((event) => {
|
|
22699
22529
|
const sourceZone = findZoneByItem(event.active.id);
|
|
22700
22530
|
const rect = event.active.rect.current.initial;
|
|
22701
22531
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -22714,7 +22544,7 @@ function useDataDnd(args) {
|
|
|
22714
22544
|
isRoot
|
|
22715
22545
|
});
|
|
22716
22546
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
22717
|
-
const handleDragOver =
|
|
22547
|
+
const handleDragOver = React82__default.useCallback((event) => {
|
|
22718
22548
|
const { active, over } = event;
|
|
22719
22549
|
const overData = over?.data?.current;
|
|
22720
22550
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -22784,7 +22614,7 @@ function useDataDnd(args) {
|
|
|
22784
22614
|
return next;
|
|
22785
22615
|
});
|
|
22786
22616
|
}, []);
|
|
22787
|
-
const handleDragCancel =
|
|
22617
|
+
const handleDragCancel = React82__default.useCallback((event) => {
|
|
22788
22618
|
setActiveDrag(null);
|
|
22789
22619
|
setOverZoneGroup(null);
|
|
22790
22620
|
dndLog.warn("dragCancel", {
|
|
@@ -22792,12 +22622,12 @@ function useDataDnd(args) {
|
|
|
22792
22622
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
22793
22623
|
});
|
|
22794
22624
|
}, []);
|
|
22795
|
-
const handleDragEndWithCleanup =
|
|
22625
|
+
const handleDragEndWithCleanup = React82__default.useCallback((event) => {
|
|
22796
22626
|
handleDragEnd(event);
|
|
22797
22627
|
setActiveDrag(null);
|
|
22798
22628
|
setOverZoneGroup(null);
|
|
22799
22629
|
}, [handleDragEnd]);
|
|
22800
|
-
const wrapContainer =
|
|
22630
|
+
const wrapContainer = React82__default.useCallback(
|
|
22801
22631
|
(children) => {
|
|
22802
22632
|
if (!enabled) return children;
|
|
22803
22633
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -22851,7 +22681,7 @@ var init_useDataDnd = __esm({
|
|
|
22851
22681
|
init_useAlmadarDndCollision();
|
|
22852
22682
|
init_Box();
|
|
22853
22683
|
dndLog = createLogger("almadar:ui:dnd");
|
|
22854
|
-
RootCtx =
|
|
22684
|
+
RootCtx = React82__default.createContext(null);
|
|
22855
22685
|
}
|
|
22856
22686
|
});
|
|
22857
22687
|
function renderIconInput(icon, props) {
|
|
@@ -23378,6 +23208,8 @@ function DataList({
|
|
|
23378
23208
|
hasMore,
|
|
23379
23209
|
children,
|
|
23380
23210
|
pageSize = 5,
|
|
23211
|
+
sortBy,
|
|
23212
|
+
sortDirection,
|
|
23381
23213
|
renderItem: schemaRenderItem,
|
|
23382
23214
|
dragGroup,
|
|
23383
23215
|
accepts,
|
|
@@ -23391,7 +23223,7 @@ function DataList({
|
|
|
23391
23223
|
}) {
|
|
23392
23224
|
const eventBus = useEventBus();
|
|
23393
23225
|
const { t } = useTranslate();
|
|
23394
|
-
const [visibleCount, setVisibleCount] =
|
|
23226
|
+
const [visibleCount, setVisibleCount] = React82__default.useState(pageSize || Infinity);
|
|
23395
23227
|
const fieldDefs = fields ?? columns ?? [];
|
|
23396
23228
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
23397
23229
|
const dnd = useDataDnd({
|
|
@@ -23406,11 +23238,15 @@ function DataList({
|
|
|
23406
23238
|
dndItemIdField,
|
|
23407
23239
|
dndRoot
|
|
23408
23240
|
});
|
|
23409
|
-
const
|
|
23241
|
+
const orderedData = dnd.orderedItems;
|
|
23242
|
+
const allData = React82__default.useMemo(
|
|
23243
|
+
() => sortRows(orderedData, sortBy, sortDirection),
|
|
23244
|
+
[orderedData, sortBy, sortDirection]
|
|
23245
|
+
);
|
|
23410
23246
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
23411
23247
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
23412
23248
|
const hasRenderProp = typeof children === "function";
|
|
23413
|
-
|
|
23249
|
+
React82__default.useEffect(() => {
|
|
23414
23250
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
23415
23251
|
const childrenTypeOf = typeof children;
|
|
23416
23252
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -23443,7 +23279,7 @@ function DataList({
|
|
|
23443
23279
|
};
|
|
23444
23280
|
eventBus.emit(`UI:${action.event}`, payload);
|
|
23445
23281
|
};
|
|
23446
|
-
const renderItemActions = (itemData) => {
|
|
23282
|
+
const renderItemActions = (itemData, onPrimary = false) => {
|
|
23447
23283
|
if (!itemActions || itemActions.length === 0) return null;
|
|
23448
23284
|
const inline = maxInlineActions != null ? itemActions.slice(0, maxInlineActions) : itemActions;
|
|
23449
23285
|
const overflow = maxInlineActions != null ? itemActions.slice(maxInlineActions) : [];
|
|
@@ -23456,7 +23292,12 @@ function DataList({
|
|
|
23456
23292
|
onClick: handleActionClick(action, itemData),
|
|
23457
23293
|
"data-testid": `action-${action.event}`,
|
|
23458
23294
|
"data-row-id": String(itemData.id),
|
|
23459
|
-
className: cn(
|
|
23295
|
+
className: cn(
|
|
23296
|
+
action.variant === "danger" && "text-error hover:bg-error/10",
|
|
23297
|
+
// Must sit on the Button itself: the variant's own text colour
|
|
23298
|
+
// beats an inherited one from the row wrapper.
|
|
23299
|
+
onPrimary && "!text-primary-foreground hover:bg-primary-foreground/15"
|
|
23300
|
+
),
|
|
23460
23301
|
children: [
|
|
23461
23302
|
action.icon && renderIconInput2(action.icon, { size: "xs", className: "mr-1" }),
|
|
23462
23303
|
action.label
|
|
@@ -23520,7 +23361,7 @@ function DataList({
|
|
|
23520
23361
|
return v === void 0 || v === null || v === "" ? raw : String(v);
|
|
23521
23362
|
};
|
|
23522
23363
|
return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("py-2", className), children: [
|
|
23523
|
-
groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
23364
|
+
groups2.map((group, gi) => /* @__PURE__ */ jsxs(React82__default.Fragment, { children: [
|
|
23524
23365
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
23525
23366
|
group.items.map((itemData, index) => {
|
|
23526
23367
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -23575,7 +23416,7 @@ function DataList({
|
|
|
23575
23416
|
children: formatDate(timestamp)
|
|
23576
23417
|
}
|
|
23577
23418
|
) : /* @__PURE__ */ jsx("span", {}),
|
|
23578
|
-
renderItemActions(itemData)
|
|
23419
|
+
renderItemActions(itemData, isSent)
|
|
23579
23420
|
] })
|
|
23580
23421
|
]
|
|
23581
23422
|
}
|
|
@@ -23715,7 +23556,7 @@ function DataList({
|
|
|
23715
23556
|
className
|
|
23716
23557
|
),
|
|
23717
23558
|
children: [
|
|
23718
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
23559
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React82__default.Fragment, { children: [
|
|
23719
23560
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
23720
23561
|
group.items.map(
|
|
23721
23562
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -23802,7 +23643,7 @@ var init_FormSection = __esm({
|
|
|
23802
23643
|
columns = 1,
|
|
23803
23644
|
className
|
|
23804
23645
|
}) => {
|
|
23805
|
-
const [collapsed, setCollapsed] =
|
|
23646
|
+
const [collapsed, setCollapsed] = React82__default.useState(defaultCollapsed);
|
|
23806
23647
|
const { t } = useTranslate();
|
|
23807
23648
|
const eventBus = useEventBus();
|
|
23808
23649
|
const gridClass = {
|
|
@@ -23810,7 +23651,7 @@ var init_FormSection = __esm({
|
|
|
23810
23651
|
2: "grid-cols-1 md:grid-cols-2",
|
|
23811
23652
|
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
23812
23653
|
}[columns];
|
|
23813
|
-
|
|
23654
|
+
React82__default.useCallback(() => {
|
|
23814
23655
|
if (collapsible) {
|
|
23815
23656
|
setCollapsed((prev) => !prev);
|
|
23816
23657
|
eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
|
|
@@ -24615,7 +24456,7 @@ var init_Flex = __esm({
|
|
|
24615
24456
|
flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
|
|
24616
24457
|
}
|
|
24617
24458
|
}
|
|
24618
|
-
return
|
|
24459
|
+
return React82__default.createElement(Component, {
|
|
24619
24460
|
className: cn(
|
|
24620
24461
|
inline ? "inline-flex" : "flex",
|
|
24621
24462
|
directionStyles[direction],
|
|
@@ -24734,7 +24575,7 @@ var init_Grid = __esm({
|
|
|
24734
24575
|
as: Component = "div"
|
|
24735
24576
|
}) => {
|
|
24736
24577
|
const mergedStyle = rows ? { gridTemplateRows: `repeat(${rows}, minmax(0, 1fr))`, ...style } : style;
|
|
24737
|
-
return
|
|
24578
|
+
return React82__default.createElement(
|
|
24738
24579
|
Component,
|
|
24739
24580
|
{
|
|
24740
24581
|
className: cn(
|
|
@@ -24942,9 +24783,9 @@ var init_Popover = __esm({
|
|
|
24942
24783
|
onMouseLeave: handleClose,
|
|
24943
24784
|
onPointerDown: tapTriggerProps.onPointerDown
|
|
24944
24785
|
};
|
|
24945
|
-
const childElement =
|
|
24786
|
+
const childElement = React82__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
24946
24787
|
const childPointerDown = childElement.props.onPointerDown;
|
|
24947
|
-
const triggerElement =
|
|
24788
|
+
const triggerElement = React82__default.cloneElement(
|
|
24948
24789
|
childElement,
|
|
24949
24790
|
{
|
|
24950
24791
|
ref: triggerRef,
|
|
@@ -25553,9 +25394,9 @@ var init_Tooltip = __esm({
|
|
|
25553
25394
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
25554
25395
|
};
|
|
25555
25396
|
}, []);
|
|
25556
|
-
const triggerElement =
|
|
25397
|
+
const triggerElement = React82__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
25557
25398
|
const childPointerDown = triggerElement.props.onPointerDown;
|
|
25558
|
-
const trigger =
|
|
25399
|
+
const trigger = React82__default.cloneElement(triggerElement, {
|
|
25559
25400
|
ref: triggerRef,
|
|
25560
25401
|
onMouseEnter: handleMouseEnter,
|
|
25561
25402
|
onMouseLeave: handleMouseLeave,
|
|
@@ -25645,7 +25486,7 @@ var init_WizardProgress = __esm({
|
|
|
25645
25486
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
25646
25487
|
const isActive = index === currentStep;
|
|
25647
25488
|
const isCompleted = index < currentStep;
|
|
25648
|
-
return /* @__PURE__ */ jsxs(
|
|
25489
|
+
return /* @__PURE__ */ jsxs(React82__default.Fragment, { children: [
|
|
25649
25490
|
/* @__PURE__ */ jsx(
|
|
25650
25491
|
"button",
|
|
25651
25492
|
{
|
|
@@ -27206,13 +27047,13 @@ var init_MapView = __esm({
|
|
|
27206
27047
|
shadowSize: [41, 41]
|
|
27207
27048
|
});
|
|
27208
27049
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
27209
|
-
const { useEffect:
|
|
27050
|
+
const { useEffect: useEffect59, useRef: useRef60, useCallback: useCallback88, useState: useState89 } = React82__default;
|
|
27210
27051
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
27211
27052
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
27212
27053
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
27213
27054
|
const map = useMap();
|
|
27214
|
-
const prevRef =
|
|
27215
|
-
|
|
27055
|
+
const prevRef = useRef60({ centerLat, centerLng, zoom });
|
|
27056
|
+
useEffect59(() => {
|
|
27216
27057
|
const prev = prevRef.current;
|
|
27217
27058
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
27218
27059
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -27223,7 +27064,7 @@ var init_MapView = __esm({
|
|
|
27223
27064
|
}
|
|
27224
27065
|
function MapClickHandler({ onMapClick }) {
|
|
27225
27066
|
const map = useMap();
|
|
27226
|
-
|
|
27067
|
+
useEffect59(() => {
|
|
27227
27068
|
if (!onMapClick) return;
|
|
27228
27069
|
const handler = (e) => {
|
|
27229
27070
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -27252,7 +27093,7 @@ var init_MapView = __esm({
|
|
|
27252
27093
|
}) {
|
|
27253
27094
|
const eventBus = useEventBus2();
|
|
27254
27095
|
const [clickedPosition, setClickedPosition] = useState89(null);
|
|
27255
|
-
const handleMapClick =
|
|
27096
|
+
const handleMapClick = useCallback88((lat, lng) => {
|
|
27256
27097
|
if (showClickedPin) {
|
|
27257
27098
|
setClickedPosition({ lat, lng });
|
|
27258
27099
|
}
|
|
@@ -27261,7 +27102,7 @@ var init_MapView = __esm({
|
|
|
27261
27102
|
eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
|
|
27262
27103
|
}
|
|
27263
27104
|
}, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
|
|
27264
|
-
const handleMarkerClick =
|
|
27105
|
+
const handleMarkerClick = useCallback88((marker) => {
|
|
27265
27106
|
onMarkerClick?.(marker);
|
|
27266
27107
|
if (markerClickEvent) {
|
|
27267
27108
|
eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
|
|
@@ -28103,8 +27944,8 @@ function TableView({
|
|
|
28103
27944
|
}) {
|
|
28104
27945
|
const eventBus = useEventBus();
|
|
28105
27946
|
const { t } = useTranslate();
|
|
28106
|
-
const [visibleCount, setVisibleCount] =
|
|
28107
|
-
const [localSelected, setLocalSelected] =
|
|
27947
|
+
const [visibleCount, setVisibleCount] = React82__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
27948
|
+
const [localSelected, setLocalSelected] = React82__default.useState(/* @__PURE__ */ new Set());
|
|
28108
27949
|
const colDefs = (Array.isArray(columns) ? columns : void 0) ?? (Array.isArray(fields) ? fields : void 0) ?? [];
|
|
28109
27950
|
const actionDefs = Array.isArray(itemActions) ? itemActions : [];
|
|
28110
27951
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
@@ -28126,7 +27967,7 @@ function TableView({
|
|
|
28126
27967
|
const hasRenderProp = typeof children === "function";
|
|
28127
27968
|
const idField = dndItemIdField ?? "id";
|
|
28128
27969
|
const isCoarsePointer = useMediaQuery("(pointer: coarse)");
|
|
28129
|
-
|
|
27970
|
+
React82__default.useEffect(() => {
|
|
28130
27971
|
tableViewLog.debug("render", {
|
|
28131
27972
|
rowCount: data.length,
|
|
28132
27973
|
colCount: colDefs.length,
|
|
@@ -28175,7 +28016,7 @@ function TableView({
|
|
|
28175
28016
|
};
|
|
28176
28017
|
eventBus.emit(`UI:${action.event}`, payload);
|
|
28177
28018
|
};
|
|
28178
|
-
const colFloors =
|
|
28019
|
+
const colFloors = React82__default.useMemo(
|
|
28179
28020
|
() => colDefs.map((col) => {
|
|
28180
28021
|
const longest = data.reduce((widest, row) => {
|
|
28181
28022
|
const cell = formatCell(asFieldValue(getNestedValue(row, col.field ?? col.key)), col.format);
|
|
@@ -28334,12 +28175,12 @@ function TableView({
|
|
|
28334
28175
|
]
|
|
28335
28176
|
}
|
|
28336
28177
|
);
|
|
28337
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
28178
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React82__default.Fragment, { children: rowInner }, id);
|
|
28338
28179
|
};
|
|
28339
28180
|
const items = Array.from(data);
|
|
28340
28181
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
28341
28182
|
let runningIndex = 0;
|
|
28342
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
28183
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React82__default.Fragment, { children: [
|
|
28343
28184
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
28344
28185
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
28345
28186
|
] }, gi)) });
|
|
@@ -29564,7 +29405,7 @@ var init_StepFlow = __esm({
|
|
|
29564
29405
|
className
|
|
29565
29406
|
}) => {
|
|
29566
29407
|
if (orientation === "vertical") {
|
|
29567
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
29408
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React82__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
29568
29409
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
29569
29410
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
29570
29411
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -29575,7 +29416,7 @@ var init_StepFlow = __esm({
|
|
|
29575
29416
|
] })
|
|
29576
29417
|
] }) }, index)) });
|
|
29577
29418
|
}
|
|
29578
|
-
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(
|
|
29419
|
+
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(React82__default.Fragment, { children: [
|
|
29579
29420
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
29580
29421
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
29581
29422
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -30565,7 +30406,7 @@ var init_LikertScale = __esm({
|
|
|
30565
30406
|
md: "text-base",
|
|
30566
30407
|
lg: "text-lg"
|
|
30567
30408
|
};
|
|
30568
|
-
LikertScale =
|
|
30409
|
+
LikertScale = React82__default.forwardRef(
|
|
30569
30410
|
({
|
|
30570
30411
|
question,
|
|
30571
30412
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -30577,7 +30418,7 @@ var init_LikertScale = __esm({
|
|
|
30577
30418
|
variant = "radios",
|
|
30578
30419
|
className
|
|
30579
30420
|
}, ref) => {
|
|
30580
|
-
const groupId =
|
|
30421
|
+
const groupId = React82__default.useId();
|
|
30581
30422
|
const eventBus = useEventBus();
|
|
30582
30423
|
const handleSelect = useCallback(
|
|
30583
30424
|
(next) => {
|
|
@@ -32866,7 +32707,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
32866
32707
|
"aria-label": t("aria.breadcrumb"),
|
|
32867
32708
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
32868
32709
|
const isLast = idx === items.length - 1;
|
|
32869
|
-
return /* @__PURE__ */ jsxs(
|
|
32710
|
+
return /* @__PURE__ */ jsxs(React82__default.Fragment, { children: [
|
|
32870
32711
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
32871
32712
|
Icon,
|
|
32872
32713
|
{
|
|
@@ -33735,7 +33576,7 @@ var init_MiniStateMachine = __esm({
|
|
|
33735
33576
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
33736
33577
|
const tc = transitionCounts[s.name] ?? 0;
|
|
33737
33578
|
const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
33738
|
-
return /* @__PURE__ */ jsxs(
|
|
33579
|
+
return /* @__PURE__ */ jsxs(React82__default.Fragment, { children: [
|
|
33739
33580
|
/* @__PURE__ */ jsx(
|
|
33740
33581
|
AvlState,
|
|
33741
33582
|
{
|
|
@@ -33939,7 +33780,7 @@ var init_PageHeader = __esm({
|
|
|
33939
33780
|
info: "bg-info/10 text-info"
|
|
33940
33781
|
};
|
|
33941
33782
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
33942
|
-
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(
|
|
33783
|
+
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(React82__default.Fragment, { children: [
|
|
33943
33784
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
33944
33785
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
33945
33786
|
"a",
|
|
@@ -34297,7 +34138,7 @@ var init_Section = __esm({
|
|
|
34297
34138
|
as: Component = "section"
|
|
34298
34139
|
}) => {
|
|
34299
34140
|
const hasHeader = title || description || action;
|
|
34300
|
-
return
|
|
34141
|
+
return React82__default.createElement(
|
|
34301
34142
|
Component,
|
|
34302
34143
|
{
|
|
34303
34144
|
className: cn(
|
|
@@ -34671,7 +34512,7 @@ var init_WizardContainer = __esm({
|
|
|
34671
34512
|
const isCompleted = index < currentStep;
|
|
34672
34513
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
34673
34514
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
34674
|
-
return /* @__PURE__ */ jsxs(
|
|
34515
|
+
return /* @__PURE__ */ jsxs(React82__default.Fragment, { children: [
|
|
34675
34516
|
/* @__PURE__ */ jsx(
|
|
34676
34517
|
Button,
|
|
34677
34518
|
{
|
|
@@ -36458,7 +36299,7 @@ var init_ImportPreviewTree = __esm({
|
|
|
36458
36299
|
const renderUnit = (unit, childrenByParent, depth) => {
|
|
36459
36300
|
const summary = fieldSummary(unit);
|
|
36460
36301
|
const children = childrenByParent.get(unit.ref) ?? [];
|
|
36461
|
-
return /* @__PURE__ */ jsxs(
|
|
36302
|
+
return /* @__PURE__ */ jsxs(React82__default.Fragment, { children: [
|
|
36462
36303
|
/* @__PURE__ */ jsxs(
|
|
36463
36304
|
Box,
|
|
36464
36305
|
{
|
|
@@ -36555,7 +36396,7 @@ var init_ImportProgress = __esm({
|
|
|
36555
36396
|
PIPELINE.map((key, index) => {
|
|
36556
36397
|
const isComplete = index < currentIndex;
|
|
36557
36398
|
const isActive = index === currentIndex;
|
|
36558
|
-
return /* @__PURE__ */ jsxs(
|
|
36399
|
+
return /* @__PURE__ */ jsxs(React82__default.Fragment, { children: [
|
|
36559
36400
|
index > 0 ? /* @__PURE__ */ jsx(Box, { className: "h-px w-4 bg-border" }) : null,
|
|
36560
36401
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1", "data-testid": `import-progress-step-${key}`, children: [
|
|
36561
36402
|
/* @__PURE__ */ jsx(
|
|
@@ -37657,8 +37498,18 @@ var init_DetailPanel = __esm({
|
|
|
37657
37498
|
DetailPanel.displayName = "DetailPanel";
|
|
37658
37499
|
}
|
|
37659
37500
|
});
|
|
37501
|
+
|
|
37502
|
+
// components/game/atoms/DrawGroup.tsx
|
|
37503
|
+
function DrawGroup(_props) {
|
|
37504
|
+
return null;
|
|
37505
|
+
}
|
|
37506
|
+
var init_DrawGroup = __esm({
|
|
37507
|
+
"components/game/atoms/DrawGroup.tsx"() {
|
|
37508
|
+
"use client";
|
|
37509
|
+
}
|
|
37510
|
+
});
|
|
37660
37511
|
function extractTitle(children) {
|
|
37661
|
-
if (!
|
|
37512
|
+
if (!React82__default.isValidElement(children)) return void 0;
|
|
37662
37513
|
const props = children.props;
|
|
37663
37514
|
if (typeof props.title === "string") {
|
|
37664
37515
|
return props.title;
|
|
@@ -38008,12 +37859,12 @@ var init_Form = __esm({
|
|
|
38008
37859
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
38009
37860
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
38010
37861
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
38011
|
-
const normalizedInitialData =
|
|
37862
|
+
const normalizedInitialData = React82__default.useMemo(() => {
|
|
38012
37863
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
38013
37864
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
38014
37865
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
38015
37866
|
}, [entity, initialData]);
|
|
38016
|
-
const entityDerivedFields =
|
|
37867
|
+
const entityDerivedFields = React82__default.useMemo(() => {
|
|
38017
37868
|
if (fields && fields.length > 0) return void 0;
|
|
38018
37869
|
if (!resolvedEntity) return void 0;
|
|
38019
37870
|
return resolvedEntity.fields.map(
|
|
@@ -38034,16 +37885,16 @@ var init_Form = __esm({
|
|
|
38034
37885
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
38035
37886
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
38036
37887
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
38037
|
-
const [formData, setFormData] =
|
|
37888
|
+
const [formData, setFormData] = React82__default.useState(
|
|
38038
37889
|
normalizedInitialData
|
|
38039
37890
|
);
|
|
38040
|
-
const [collapsedSections, setCollapsedSections] =
|
|
37891
|
+
const [collapsedSections, setCollapsedSections] = React82__default.useState(
|
|
38041
37892
|
/* @__PURE__ */ new Set()
|
|
38042
37893
|
);
|
|
38043
|
-
const [submitError, setSubmitError] =
|
|
38044
|
-
const formRef =
|
|
37894
|
+
const [submitError, setSubmitError] = React82__default.useState(null);
|
|
37895
|
+
const formRef = React82__default.useRef(null);
|
|
38045
37896
|
const formMode = props.mode;
|
|
38046
|
-
const mountedRef =
|
|
37897
|
+
const mountedRef = React82__default.useRef(false);
|
|
38047
37898
|
if (!mountedRef.current) {
|
|
38048
37899
|
mountedRef.current = true;
|
|
38049
37900
|
debug("forms", "mount", {
|
|
@@ -38056,7 +37907,7 @@ var init_Form = __esm({
|
|
|
38056
37907
|
});
|
|
38057
37908
|
}
|
|
38058
37909
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
38059
|
-
const evalContext =
|
|
37910
|
+
const evalContext = React82__default.useMemo(
|
|
38060
37911
|
() => ({
|
|
38061
37912
|
formValues: formData,
|
|
38062
37913
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -38065,7 +37916,7 @@ var init_Form = __esm({
|
|
|
38065
37916
|
}),
|
|
38066
37917
|
[formData, externalContext]
|
|
38067
37918
|
);
|
|
38068
|
-
|
|
37919
|
+
React82__default.useEffect(() => {
|
|
38069
37920
|
debug("forms", "initialData-sync", {
|
|
38070
37921
|
mode: formMode,
|
|
38071
37922
|
normalizedInitialData,
|
|
@@ -38076,7 +37927,7 @@ var init_Form = __esm({
|
|
|
38076
37927
|
setFormData(normalizedInitialData);
|
|
38077
37928
|
}
|
|
38078
37929
|
}, [normalizedInitialData]);
|
|
38079
|
-
const processCalculations =
|
|
37930
|
+
const processCalculations = React82__default.useCallback(
|
|
38080
37931
|
(changedFieldId, newFormData) => {
|
|
38081
37932
|
if (!hiddenCalculations.length) return;
|
|
38082
37933
|
const context = {
|
|
@@ -38101,7 +37952,7 @@ var init_Form = __esm({
|
|
|
38101
37952
|
},
|
|
38102
37953
|
[hiddenCalculations, externalContext, eventBus]
|
|
38103
37954
|
);
|
|
38104
|
-
const checkViolations =
|
|
37955
|
+
const checkViolations = React82__default.useCallback(
|
|
38105
37956
|
(changedFieldId, newFormData) => {
|
|
38106
37957
|
if (!violationTriggers.length) return;
|
|
38107
37958
|
const context = {
|
|
@@ -38139,7 +37990,7 @@ var init_Form = __esm({
|
|
|
38139
37990
|
processCalculations(name, newFormData);
|
|
38140
37991
|
checkViolations(name, newFormData);
|
|
38141
37992
|
};
|
|
38142
|
-
const isFieldVisible =
|
|
37993
|
+
const isFieldVisible = React82__default.useCallback(
|
|
38143
37994
|
(fieldName) => {
|
|
38144
37995
|
const condition = conditionalFields[fieldName];
|
|
38145
37996
|
if (!condition) return true;
|
|
@@ -38147,7 +37998,7 @@ var init_Form = __esm({
|
|
|
38147
37998
|
},
|
|
38148
37999
|
[conditionalFields, evalContext]
|
|
38149
38000
|
);
|
|
38150
|
-
const isSectionVisible =
|
|
38001
|
+
const isSectionVisible = React82__default.useCallback(
|
|
38151
38002
|
(section) => {
|
|
38152
38003
|
if (!section.condition) return true;
|
|
38153
38004
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -38223,7 +38074,7 @@ var init_Form = __esm({
|
|
|
38223
38074
|
eventBus.emit(`UI:${onCancel}`);
|
|
38224
38075
|
}
|
|
38225
38076
|
};
|
|
38226
|
-
const renderField =
|
|
38077
|
+
const renderField = React82__default.useCallback(
|
|
38227
38078
|
(field) => {
|
|
38228
38079
|
const fieldName = field.name || field.field;
|
|
38229
38080
|
if (!fieldName) return null;
|
|
@@ -38244,7 +38095,7 @@ var init_Form = __esm({
|
|
|
38244
38095
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
38245
38096
|
);
|
|
38246
38097
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
38247
|
-
const normalizedFields =
|
|
38098
|
+
const normalizedFields = React82__default.useMemo(() => {
|
|
38248
38099
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
38249
38100
|
return effectiveFields.map((field) => {
|
|
38250
38101
|
if (typeof field === "string") {
|
|
@@ -38268,7 +38119,7 @@ var init_Form = __esm({
|
|
|
38268
38119
|
return field;
|
|
38269
38120
|
});
|
|
38270
38121
|
}, [effectiveFields, resolvedEntity]);
|
|
38271
|
-
const schemaFields =
|
|
38122
|
+
const schemaFields = React82__default.useMemo(() => {
|
|
38272
38123
|
if (normalizedFields.length === 0) return null;
|
|
38273
38124
|
if (isDebugEnabled()) {
|
|
38274
38125
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -38278,7 +38129,7 @@ var init_Form = __esm({
|
|
|
38278
38129
|
}
|
|
38279
38130
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
38280
38131
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
38281
|
-
const sectionElements =
|
|
38132
|
+
const sectionElements = React82__default.useMemo(() => {
|
|
38282
38133
|
if (!sections || sections.length === 0) return null;
|
|
38283
38134
|
return sections.map((section) => {
|
|
38284
38135
|
if (!isSectionVisible(section)) {
|
|
@@ -39004,7 +38855,7 @@ var init_List = __esm({
|
|
|
39004
38855
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
39005
38856
|
return [];
|
|
39006
38857
|
}, [entity]);
|
|
39007
|
-
const getItemActions =
|
|
38858
|
+
const getItemActions = React82__default.useCallback(
|
|
39008
38859
|
(item) => {
|
|
39009
38860
|
if (!itemActions) return [];
|
|
39010
38861
|
if (typeof itemActions === "function") {
|
|
@@ -39485,7 +39336,7 @@ var init_MediaGallery = __esm({
|
|
|
39485
39336
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
39486
39337
|
);
|
|
39487
39338
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
39488
|
-
const items =
|
|
39339
|
+
const items = React82__default.useMemo(() => {
|
|
39489
39340
|
if (propItems && propItems.length > 0) return propItems;
|
|
39490
39341
|
if (entityData.length === 0) return [];
|
|
39491
39342
|
return entityData.map((record, idx) => {
|
|
@@ -39650,7 +39501,7 @@ var init_MediaGallery = __esm({
|
|
|
39650
39501
|
}
|
|
39651
39502
|
});
|
|
39652
39503
|
function extractTitle2(children) {
|
|
39653
|
-
if (!
|
|
39504
|
+
if (!React82__default.isValidElement(children)) return void 0;
|
|
39654
39505
|
const props = children.props;
|
|
39655
39506
|
if (typeof props.title === "string") {
|
|
39656
39507
|
return props.title;
|
|
@@ -39924,7 +39775,7 @@ var init_debugRegistry = __esm({
|
|
|
39924
39775
|
}
|
|
39925
39776
|
});
|
|
39926
39777
|
function useDebugData() {
|
|
39927
|
-
const [data, setData] =
|
|
39778
|
+
const [data, setData] = React82.useState(() => ({
|
|
39928
39779
|
traits: [],
|
|
39929
39780
|
ticks: [],
|
|
39930
39781
|
guards: [],
|
|
@@ -39938,7 +39789,7 @@ function useDebugData() {
|
|
|
39938
39789
|
},
|
|
39939
39790
|
lastUpdate: Date.now()
|
|
39940
39791
|
}));
|
|
39941
|
-
|
|
39792
|
+
React82.useEffect(() => {
|
|
39942
39793
|
const updateData = () => {
|
|
39943
39794
|
setData({
|
|
39944
39795
|
traits: getAllTraits(),
|
|
@@ -40047,12 +39898,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
40047
39898
|
return positions;
|
|
40048
39899
|
}
|
|
40049
39900
|
function WalkMinimap() {
|
|
40050
|
-
const [walkStep, setWalkStep] =
|
|
40051
|
-
const [traits2, setTraits] =
|
|
40052
|
-
const [coveredEdges, setCoveredEdges] =
|
|
40053
|
-
const [completedTraits, setCompletedTraits] =
|
|
40054
|
-
const prevTraitRef =
|
|
40055
|
-
|
|
39901
|
+
const [walkStep, setWalkStep] = React82.useState(null);
|
|
39902
|
+
const [traits2, setTraits] = React82.useState([]);
|
|
39903
|
+
const [coveredEdges, setCoveredEdges] = React82.useState([]);
|
|
39904
|
+
const [completedTraits, setCompletedTraits] = React82.useState(/* @__PURE__ */ new Set());
|
|
39905
|
+
const prevTraitRef = React82.useRef(null);
|
|
39906
|
+
React82.useEffect(() => {
|
|
40056
39907
|
const interval = setInterval(() => {
|
|
40057
39908
|
const w = window;
|
|
40058
39909
|
const step = w.__orbitalWalkStep;
|
|
@@ -40488,15 +40339,15 @@ var init_EntitiesTab = __esm({
|
|
|
40488
40339
|
});
|
|
40489
40340
|
function EventFlowTab({ events: events2 }) {
|
|
40490
40341
|
const { t } = useTranslate();
|
|
40491
|
-
const [filter, setFilter] =
|
|
40492
|
-
const containerRef =
|
|
40493
|
-
const [autoScroll, setAutoScroll] =
|
|
40494
|
-
|
|
40342
|
+
const [filter, setFilter] = React82.useState("all");
|
|
40343
|
+
const containerRef = React82.useRef(null);
|
|
40344
|
+
const [autoScroll, setAutoScroll] = React82.useState(true);
|
|
40345
|
+
React82.useEffect(() => {
|
|
40495
40346
|
if (autoScroll && containerRef.current) {
|
|
40496
40347
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
40497
40348
|
}
|
|
40498
40349
|
}, [events2.length, autoScroll]);
|
|
40499
|
-
const filteredEvents =
|
|
40350
|
+
const filteredEvents = React82.useMemo(() => {
|
|
40500
40351
|
if (filter === "all") return events2;
|
|
40501
40352
|
return events2.filter((e) => e.type === filter);
|
|
40502
40353
|
}, [events2, filter]);
|
|
@@ -40612,7 +40463,7 @@ var init_EventFlowTab = __esm({
|
|
|
40612
40463
|
});
|
|
40613
40464
|
function GuardsPanel({ guards }) {
|
|
40614
40465
|
const { t } = useTranslate();
|
|
40615
|
-
const [filter, setFilter] =
|
|
40466
|
+
const [filter, setFilter] = React82.useState("all");
|
|
40616
40467
|
if (guards.length === 0) {
|
|
40617
40468
|
return /* @__PURE__ */ jsx(
|
|
40618
40469
|
EmptyState,
|
|
@@ -40625,7 +40476,7 @@ function GuardsPanel({ guards }) {
|
|
|
40625
40476
|
}
|
|
40626
40477
|
const passedCount = guards.filter((g) => g.result).length;
|
|
40627
40478
|
const failedCount = guards.length - passedCount;
|
|
40628
|
-
const filteredGuards =
|
|
40479
|
+
const filteredGuards = React82.useMemo(() => {
|
|
40629
40480
|
if (filter === "all") return guards;
|
|
40630
40481
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
40631
40482
|
return guards.filter((g) => !g.result);
|
|
@@ -40788,10 +40639,10 @@ function EffectBadge({ effect }) {
|
|
|
40788
40639
|
}
|
|
40789
40640
|
function TransitionTimeline({ transitions }) {
|
|
40790
40641
|
const { t } = useTranslate();
|
|
40791
|
-
const containerRef =
|
|
40792
|
-
const [autoScroll, setAutoScroll] =
|
|
40793
|
-
const [expandedId, setExpandedId] =
|
|
40794
|
-
|
|
40642
|
+
const containerRef = React82.useRef(null);
|
|
40643
|
+
const [autoScroll, setAutoScroll] = React82.useState(true);
|
|
40644
|
+
const [expandedId, setExpandedId] = React82.useState(null);
|
|
40645
|
+
React82.useEffect(() => {
|
|
40795
40646
|
if (autoScroll && containerRef.current) {
|
|
40796
40647
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
40797
40648
|
}
|
|
@@ -41071,9 +40922,9 @@ function getAllEvents(traits2) {
|
|
|
41071
40922
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
41072
40923
|
const eventBus = useEventBus();
|
|
41073
40924
|
const { t } = useTranslate();
|
|
41074
|
-
const [log9, setLog] =
|
|
41075
|
-
const prevStatesRef =
|
|
41076
|
-
|
|
40925
|
+
const [log9, setLog] = React82.useState([]);
|
|
40926
|
+
const prevStatesRef = React82.useRef(/* @__PURE__ */ new Map());
|
|
40927
|
+
React82.useEffect(() => {
|
|
41077
40928
|
for (const trait of traits2) {
|
|
41078
40929
|
const prev = prevStatesRef.current.get(trait.id);
|
|
41079
40930
|
if (prev && prev !== trait.currentState) {
|
|
@@ -41242,10 +41093,10 @@ function VerifyModePanel({
|
|
|
41242
41093
|
localCount
|
|
41243
41094
|
}) {
|
|
41244
41095
|
const { t } = useTranslate();
|
|
41245
|
-
const [expanded, setExpanded] =
|
|
41246
|
-
const scrollRef =
|
|
41247
|
-
const prevCountRef =
|
|
41248
|
-
|
|
41096
|
+
const [expanded, setExpanded] = React82.useState(true);
|
|
41097
|
+
const scrollRef = React82.useRef(null);
|
|
41098
|
+
const prevCountRef = React82.useRef(0);
|
|
41099
|
+
React82.useEffect(() => {
|
|
41249
41100
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
41250
41101
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
41251
41102
|
}
|
|
@@ -41302,10 +41153,10 @@ function RuntimeDebugger({
|
|
|
41302
41153
|
schema
|
|
41303
41154
|
}) {
|
|
41304
41155
|
const { t } = useTranslate();
|
|
41305
|
-
const [isCollapsed, setIsCollapsed] =
|
|
41306
|
-
const [isVisible, setIsVisible] =
|
|
41156
|
+
const [isCollapsed, setIsCollapsed] = React82.useState(mode === "verify" ? true : defaultCollapsed);
|
|
41157
|
+
const [isVisible, setIsVisible] = React82.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
41307
41158
|
const debugData = useDebugData();
|
|
41308
|
-
|
|
41159
|
+
React82.useEffect(() => {
|
|
41309
41160
|
if (mode === "inline") return;
|
|
41310
41161
|
return onDebugToggle((enabled) => {
|
|
41311
41162
|
setIsVisible(enabled);
|
|
@@ -41314,7 +41165,7 @@ function RuntimeDebugger({
|
|
|
41314
41165
|
}
|
|
41315
41166
|
});
|
|
41316
41167
|
}, [mode]);
|
|
41317
|
-
|
|
41168
|
+
React82.useEffect(() => {
|
|
41318
41169
|
if (mode === "inline") return;
|
|
41319
41170
|
const handleKeyDown = (e) => {
|
|
41320
41171
|
if (e.key === "`" && isVisible) {
|
|
@@ -41834,7 +41685,7 @@ var init_StatCard = __esm({
|
|
|
41834
41685
|
const labelToUse = propLabel ?? propTitle;
|
|
41835
41686
|
const eventBus = useEventBus();
|
|
41836
41687
|
const { t } = useTranslate();
|
|
41837
|
-
const handleActionClick =
|
|
41688
|
+
const handleActionClick = React82__default.useCallback(() => {
|
|
41838
41689
|
if (action?.event) {
|
|
41839
41690
|
eventBus.emit(`UI:${action.event}`, {});
|
|
41840
41691
|
}
|
|
@@ -41845,7 +41696,7 @@ var init_StatCard = __esm({
|
|
|
41845
41696
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
41846
41697
|
const isLoading = externalLoading ?? false;
|
|
41847
41698
|
const error = externalError;
|
|
41848
|
-
const computeMetricValue =
|
|
41699
|
+
const computeMetricValue = React82__default.useCallback(
|
|
41849
41700
|
(metric, items) => {
|
|
41850
41701
|
if (metric.value !== void 0) {
|
|
41851
41702
|
return metric.value;
|
|
@@ -41884,7 +41735,7 @@ var init_StatCard = __esm({
|
|
|
41884
41735
|
},
|
|
41885
41736
|
[]
|
|
41886
41737
|
);
|
|
41887
|
-
const schemaStats =
|
|
41738
|
+
const schemaStats = React82__default.useMemo(() => {
|
|
41888
41739
|
if (!metrics || metrics.length === 0) return null;
|
|
41889
41740
|
return metrics.map((metric) => ({
|
|
41890
41741
|
label: metric.label,
|
|
@@ -41892,7 +41743,7 @@ var init_StatCard = __esm({
|
|
|
41892
41743
|
format: metric.format
|
|
41893
41744
|
}));
|
|
41894
41745
|
}, [metrics, data, computeMetricValue]);
|
|
41895
|
-
const calculatedTrend =
|
|
41746
|
+
const calculatedTrend = React82__default.useMemo(() => {
|
|
41896
41747
|
if (manualTrend !== void 0) return manualTrend;
|
|
41897
41748
|
if (previousValue === void 0 || currentValue === void 0)
|
|
41898
41749
|
return void 0;
|
|
@@ -42532,8 +42383,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
42532
42383
|
] });
|
|
42533
42384
|
};
|
|
42534
42385
|
InlineActivityStream = ({ activities, autoScroll = true, className }) => {
|
|
42535
|
-
const endRef =
|
|
42536
|
-
|
|
42386
|
+
const endRef = React82__default.useRef(null);
|
|
42387
|
+
React82__default.useEffect(() => {
|
|
42537
42388
|
if (!autoScroll) return;
|
|
42538
42389
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
42539
42390
|
}, [activities.length, autoScroll]);
|
|
@@ -42627,7 +42478,7 @@ var init_SubagentTracePanel = __esm({
|
|
|
42627
42478
|
};
|
|
42628
42479
|
SubagentRichCard = ({ subagent }) => {
|
|
42629
42480
|
const { t } = useTranslate();
|
|
42630
|
-
const activities =
|
|
42481
|
+
const activities = React82__default.useMemo(
|
|
42631
42482
|
() => subagentMessagesToActivities(subagent.messages),
|
|
42632
42483
|
[subagent.messages]
|
|
42633
42484
|
);
|
|
@@ -42704,8 +42555,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
42704
42555
|
] });
|
|
42705
42556
|
};
|
|
42706
42557
|
CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
|
|
42707
|
-
const endRef =
|
|
42708
|
-
|
|
42558
|
+
const endRef = React82__default.useRef(null);
|
|
42559
|
+
React82__default.useEffect(() => {
|
|
42709
42560
|
if (!autoScroll) return;
|
|
42710
42561
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
42711
42562
|
}, [messages.length, autoScroll]);
|
|
@@ -43140,7 +42991,7 @@ var init_Timeline = __esm({
|
|
|
43140
42991
|
}) => {
|
|
43141
42992
|
const { t } = useTranslate();
|
|
43142
42993
|
const entityData = entity ?? [];
|
|
43143
|
-
const items =
|
|
42994
|
+
const items = React82__default.useMemo(() => {
|
|
43144
42995
|
if (propItems) return propItems;
|
|
43145
42996
|
if (entityData.length === 0) return [];
|
|
43146
42997
|
return entityData.map((record, idx) => {
|
|
@@ -43242,7 +43093,7 @@ var init_Timeline = __esm({
|
|
|
43242
43093
|
}
|
|
43243
43094
|
});
|
|
43244
43095
|
function extractToastProps(children) {
|
|
43245
|
-
if (!
|
|
43096
|
+
if (!React82__default.isValidElement(children)) {
|
|
43246
43097
|
if (typeof children === "string") {
|
|
43247
43098
|
return { message: children };
|
|
43248
43099
|
}
|
|
@@ -43284,7 +43135,7 @@ var init_ToastSlot = __esm({
|
|
|
43284
43135
|
eventBus.emit(`${prefix}CLOSE`);
|
|
43285
43136
|
};
|
|
43286
43137
|
if (!isVisible) return null;
|
|
43287
|
-
const isCustomContent =
|
|
43138
|
+
const isCustomContent = React82__default.isValidElement(children) && !message;
|
|
43288
43139
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
43289
43140
|
Toast,
|
|
43290
43141
|
{
|
|
@@ -43379,6 +43230,7 @@ var init_component_registry_generated = __esm({
|
|
|
43379
43230
|
init_DocSidebar();
|
|
43380
43231
|
init_DocTOC();
|
|
43381
43232
|
init_DocumentViewer();
|
|
43233
|
+
init_DrawGroup();
|
|
43382
43234
|
init_DrawShape();
|
|
43383
43235
|
init_DrawShapeLayer();
|
|
43384
43236
|
init_DrawSprite();
|
|
@@ -43522,10 +43374,6 @@ var init_component_registry_generated = __esm({
|
|
|
43522
43374
|
init_SubagentTracePanel();
|
|
43523
43375
|
init_SvgBranch();
|
|
43524
43376
|
init_SvgConnection();
|
|
43525
|
-
init_SvgDrawGroup();
|
|
43526
|
-
init_SvgDrawShape();
|
|
43527
|
-
init_SvgDrawShapeLayer();
|
|
43528
|
-
init_SvgDrawText();
|
|
43529
43377
|
init_SvgFlow();
|
|
43530
43378
|
init_SvgGrid();
|
|
43531
43379
|
init_SvgLobe();
|
|
@@ -43536,7 +43384,6 @@ var init_component_registry_generated = __esm({
|
|
|
43536
43384
|
init_SvgRing();
|
|
43537
43385
|
init_SvgShield();
|
|
43538
43386
|
init_SvgStack();
|
|
43539
|
-
init_SvgStage();
|
|
43540
43387
|
init_SwipeableRow();
|
|
43541
43388
|
init_Switch();
|
|
43542
43389
|
init_TabbedContainer();
|
|
@@ -43650,6 +43497,7 @@ var init_component_registry_generated = __esm({
|
|
|
43650
43497
|
"DocSidebar": DocSidebar,
|
|
43651
43498
|
"DocTOC": DocTOC,
|
|
43652
43499
|
"DocumentViewer": DocumentViewer,
|
|
43500
|
+
"DrawGroup": DrawGroup,
|
|
43653
43501
|
"DrawShape": DrawShape,
|
|
43654
43502
|
"DrawShapeLayer": DrawShapeLayer,
|
|
43655
43503
|
"DrawSprite": DrawSprite,
|
|
@@ -43798,10 +43646,6 @@ var init_component_registry_generated = __esm({
|
|
|
43798
43646
|
"SubagentTracePanel": SubagentTracePanel,
|
|
43799
43647
|
"SvgBranch": SvgBranch,
|
|
43800
43648
|
"SvgConnection": SvgConnection,
|
|
43801
|
-
"SvgDrawGroup": SvgDrawGroup,
|
|
43802
|
-
"SvgDrawShape": SvgDrawShape,
|
|
43803
|
-
"SvgDrawShapeLayer": SvgDrawShapeLayer,
|
|
43804
|
-
"SvgDrawText": SvgDrawText,
|
|
43805
43649
|
"SvgFlow": SvgFlow,
|
|
43806
43650
|
"SvgGrid": SvgGrid,
|
|
43807
43651
|
"SvgLobe": SvgLobe,
|
|
@@ -43812,7 +43656,6 @@ var init_component_registry_generated = __esm({
|
|
|
43812
43656
|
"SvgRing": SvgRing,
|
|
43813
43657
|
"SvgShield": SvgShield,
|
|
43814
43658
|
"SvgStack": SvgStack,
|
|
43815
|
-
"SvgStage": SvgStage,
|
|
43816
43659
|
"SwipeableRow": SwipeableRow,
|
|
43817
43660
|
"Switch": Switch,
|
|
43818
43661
|
"TabbedContainer": TabbedContainer,
|
|
@@ -43863,7 +43706,7 @@ function SuspenseConfigProvider({
|
|
|
43863
43706
|
config,
|
|
43864
43707
|
children
|
|
43865
43708
|
}) {
|
|
43866
|
-
return
|
|
43709
|
+
return React82__default.createElement(
|
|
43867
43710
|
SuspenseConfigContext.Provider,
|
|
43868
43711
|
{ value: config },
|
|
43869
43712
|
children
|
|
@@ -43905,7 +43748,7 @@ function enrichFormFields(fields, entityDef) {
|
|
|
43905
43748
|
}
|
|
43906
43749
|
return { name: field, label: humanizeFieldName(field) };
|
|
43907
43750
|
}
|
|
43908
|
-
if (field && typeof field === "object" && !Array.isArray(field) && !
|
|
43751
|
+
if (field && typeof field === "object" && !Array.isArray(field) && !React82__default.isValidElement(field) && !(field instanceof Date)) {
|
|
43909
43752
|
const obj = field;
|
|
43910
43753
|
const fieldName = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
|
|
43911
43754
|
if (!fieldName) return field;
|
|
@@ -44365,7 +44208,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
44365
44208
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
44366
44209
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
44367
44210
|
}
|
|
44368
|
-
return /* @__PURE__ */ jsx(
|
|
44211
|
+
return /* @__PURE__ */ jsx(React82__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
44369
44212
|
}
|
|
44370
44213
|
if (!child || typeof child !== "object") return null;
|
|
44371
44214
|
const childId = `${parentId}-${index}`;
|
|
@@ -44422,14 +44265,14 @@ function isPatternConfig(value) {
|
|
|
44422
44265
|
if (value === null || value === void 0) return false;
|
|
44423
44266
|
if (typeof value !== "object") return false;
|
|
44424
44267
|
if (Array.isArray(value)) return false;
|
|
44425
|
-
if (
|
|
44268
|
+
if (React82__default.isValidElement(value)) return false;
|
|
44426
44269
|
if (value instanceof Date) return false;
|
|
44427
44270
|
if (typeof value === "function") return false;
|
|
44428
44271
|
const record = value;
|
|
44429
44272
|
return "type" in record && typeof record.type === "string" && getComponentForPattern$1(record.type) !== null;
|
|
44430
44273
|
}
|
|
44431
44274
|
function isPlainConfigObject(value) {
|
|
44432
|
-
if (
|
|
44275
|
+
if (React82__default.isValidElement(value)) return false;
|
|
44433
44276
|
if (value instanceof Date) return false;
|
|
44434
44277
|
const proto = Object.getPrototypeOf(value);
|
|
44435
44278
|
return proto === Object.prototype || proto === null;
|
|
@@ -44557,7 +44400,7 @@ function SlotContentRenderer({
|
|
|
44557
44400
|
for (const slotKey of CONTENT_NODE_SLOTS) {
|
|
44558
44401
|
const slotVal = restProps[slotKey];
|
|
44559
44402
|
if (slotVal === void 0 || slotVal === null) continue;
|
|
44560
|
-
if (
|
|
44403
|
+
if (React82__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
|
|
44561
44404
|
const typelessChildren = !Array.isArray(slotVal) && typeof slotVal === "object" && !("type" in slotVal) && Array.isArray(slotVal.children) ? slotVal.children : void 0;
|
|
44562
44405
|
if (typelessChildren !== void 0 || Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
|
|
44563
44406
|
nodeSlotOverrides[slotKey] = renderPatternChildren(
|
|
@@ -44611,7 +44454,7 @@ function SlotContentRenderer({
|
|
|
44611
44454
|
const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
|
|
44612
44455
|
if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
|
|
44613
44456
|
const sample = resolvedItems[0];
|
|
44614
|
-
if (sample && typeof sample === "object" && !Array.isArray(sample) && !
|
|
44457
|
+
if (sample && typeof sample === "object" && !Array.isArray(sample) && !React82__default.isValidElement(sample) && !(sample instanceof Date)) {
|
|
44615
44458
|
const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
|
|
44616
44459
|
finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
|
|
44617
44460
|
}
|
|
@@ -44983,7 +44826,7 @@ function resolveLambdaBindings(body, params, item, index) {
|
|
|
44983
44826
|
}
|
|
44984
44827
|
return substituted;
|
|
44985
44828
|
}
|
|
44986
|
-
if (body !== null && typeof body === "object" && !
|
|
44829
|
+
if (body !== null && typeof body === "object" && !React82__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
44987
44830
|
const out = {};
|
|
44988
44831
|
for (const [k, v] of Object.entries(body)) {
|
|
44989
44832
|
out[k] = recur(v);
|
|
@@ -45002,7 +44845,7 @@ function getSlotContentRenderer2() {
|
|
|
45002
44845
|
function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
45003
44846
|
return (item, index) => {
|
|
45004
44847
|
const resolvedBody = resolveLambdaBindings(lambdaBody, params, item, index);
|
|
45005
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
44848
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React82__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
45006
44849
|
return null;
|
|
45007
44850
|
}
|
|
45008
44851
|
const record = resolvedBody;
|
|
@@ -45021,7 +44864,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
45021
44864
|
props: childProps,
|
|
45022
44865
|
priority: 0
|
|
45023
44866
|
};
|
|
45024
|
-
return
|
|
44867
|
+
return React82__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
45025
44868
|
};
|
|
45026
44869
|
}
|
|
45027
44870
|
function convertNode(node, callerKey) {
|
|
@@ -45040,7 +44883,7 @@ function convertNode(node, callerKey) {
|
|
|
45040
44883
|
});
|
|
45041
44884
|
return anyChanged ? mapped : node;
|
|
45042
44885
|
}
|
|
45043
|
-
if (typeof node === "object" && !
|
|
44886
|
+
if (typeof node === "object" && !React82__default.isValidElement(node) && !(node instanceof Date)) {
|
|
45044
44887
|
return convertObjectProps(node);
|
|
45045
44888
|
}
|
|
45046
44889
|
return node;
|