@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/providers/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React84 from 'react';
|
|
2
|
+
import React84__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useLayoutEffect, lazy, useId, useSyncExternalStore } from 'react';
|
|
3
3
|
import { EventBusContext, useTraitScopeChain, useEntitySchemaOptional, TraitScopeProvider, useCurrentPagePath, useGameAudioContextOptional } from '@almadar/ui/providers';
|
|
4
4
|
import { createLogger, isLogLevelEnabled } from '@almadar/logger';
|
|
5
5
|
import { clsx } from 'clsx';
|
|
@@ -430,7 +430,7 @@ var init_Box = __esm({
|
|
|
430
430
|
fixed: "fixed",
|
|
431
431
|
sticky: "sticky"
|
|
432
432
|
};
|
|
433
|
-
Box =
|
|
433
|
+
Box = React84__default.forwardRef(
|
|
434
434
|
({
|
|
435
435
|
padding,
|
|
436
436
|
paddingX,
|
|
@@ -495,7 +495,7 @@ var init_Box = __esm({
|
|
|
495
495
|
onPointerDown?.(e);
|
|
496
496
|
}, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
|
|
497
497
|
const isClickable = action || onClick;
|
|
498
|
-
return
|
|
498
|
+
return React84__default.createElement(
|
|
499
499
|
Component,
|
|
500
500
|
{
|
|
501
501
|
ref,
|
|
@@ -712,7 +712,7 @@ var init_Icon = __esm({
|
|
|
712
712
|
const effectiveName = typeof icon === "string" && icon !== "" ? icon : name;
|
|
713
713
|
const effectiveStrokeWidth = strokeWidth != null && strokeWidth > 0 ? strokeWidth : void 0;
|
|
714
714
|
const family = useIconFamily();
|
|
715
|
-
const RenderedComponent =
|
|
715
|
+
const RenderedComponent = React84__default.useMemo(() => {
|
|
716
716
|
if (directIcon) return null;
|
|
717
717
|
return effectiveName ? resolveIconForFamily(effectiveName) : null;
|
|
718
718
|
}, [directIcon, effectiveName, family]);
|
|
@@ -832,7 +832,7 @@ var init_atlasSlice = __esm({
|
|
|
832
832
|
}
|
|
833
833
|
});
|
|
834
834
|
function useAtlasSliceDataUrl(asset) {
|
|
835
|
-
const [, bump] =
|
|
835
|
+
const [, bump] = React84.useReducer((x) => x + 1, 0);
|
|
836
836
|
if (!isAtlasAsset(asset)) return void 0;
|
|
837
837
|
const key = `${asset.atlas}#${asset.sprite}`;
|
|
838
838
|
const cached = sliceDataUrlCache.get(key);
|
|
@@ -895,13 +895,13 @@ function AtlasImage({
|
|
|
895
895
|
style,
|
|
896
896
|
"aria-hidden": ariaHidden
|
|
897
897
|
}) {
|
|
898
|
-
const [, bump] =
|
|
899
|
-
const canvasRef =
|
|
898
|
+
const [, bump] = React84.useReducer((x) => x + 1, 0);
|
|
899
|
+
const canvasRef = React84.useRef(null);
|
|
900
900
|
const sliced = isAtlasAsset(asset);
|
|
901
901
|
const atlas = sliced ? getAtlas(asset.atlas, bump) : void 0;
|
|
902
902
|
const img = sliced && asset?.url ? getSheetImage(asset.url, bump) : null;
|
|
903
903
|
const rect = sliced && atlas ? subRectFor(atlas, asset.sprite) : null;
|
|
904
|
-
|
|
904
|
+
React84.useEffect(() => {
|
|
905
905
|
const canvas = canvasRef.current;
|
|
906
906
|
if (!canvas || !img || !rect) return;
|
|
907
907
|
canvas.width = rect.sw;
|
|
@@ -977,7 +977,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
977
977
|
const IconComp = value;
|
|
978
978
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
979
979
|
}
|
|
980
|
-
if (
|
|
980
|
+
if (React84__default.isValidElement(value)) {
|
|
981
981
|
return value;
|
|
982
982
|
}
|
|
983
983
|
if (typeof value === "object" && value !== null && isIconLike(value)) {
|
|
@@ -1054,7 +1054,7 @@ var init_Button = __esm({
|
|
|
1054
1054
|
md: "h-icon-default w-icon-default",
|
|
1055
1055
|
lg: "h-icon-default w-icon-default"
|
|
1056
1056
|
};
|
|
1057
|
-
Button =
|
|
1057
|
+
Button = React84__default.forwardRef(
|
|
1058
1058
|
({
|
|
1059
1059
|
className,
|
|
1060
1060
|
variant = "primary",
|
|
@@ -1124,7 +1124,7 @@ var Dialog;
|
|
|
1124
1124
|
var init_Dialog = __esm({
|
|
1125
1125
|
"components/core/atoms/Dialog.tsx"() {
|
|
1126
1126
|
init_cn();
|
|
1127
|
-
Dialog =
|
|
1127
|
+
Dialog = React84__default.forwardRef(
|
|
1128
1128
|
({
|
|
1129
1129
|
role = "dialog",
|
|
1130
1130
|
"aria-modal": ariaModal = true,
|
|
@@ -1197,6 +1197,32 @@ function formatValue(value, format) {
|
|
|
1197
1197
|
return String(value);
|
|
1198
1198
|
}
|
|
1199
1199
|
}
|
|
1200
|
+
function compareCellValues(a, b) {
|
|
1201
|
+
const aEmpty = a === null || a === void 0 || a === "";
|
|
1202
|
+
const bEmpty = b === null || b === void 0 || b === "";
|
|
1203
|
+
if (aEmpty || bEmpty) return aEmpty && bEmpty ? 0 : aEmpty ? 1 : -1;
|
|
1204
|
+
if (typeof a === "number" && typeof b === "number") return a - b;
|
|
1205
|
+
if (typeof a === "boolean" && typeof b === "boolean") return Number(a) - Number(b);
|
|
1206
|
+
const aNum = Number(a);
|
|
1207
|
+
const bNum = Number(b);
|
|
1208
|
+
if (Number.isFinite(aNum) && Number.isFinite(bNum)) return aNum - bNum;
|
|
1209
|
+
const aTime = dateLikeTime(a);
|
|
1210
|
+
const bTime = dateLikeTime(b);
|
|
1211
|
+
if (aTime !== null && bTime !== null) return aTime - bTime;
|
|
1212
|
+
return String(a).localeCompare(String(b));
|
|
1213
|
+
}
|
|
1214
|
+
function dateLikeTime(value) {
|
|
1215
|
+
if (value instanceof Date) return value.getTime();
|
|
1216
|
+
const text = String(value);
|
|
1217
|
+
if (!/\d/.test(text) || !/[-/:T]/.test(text)) return null;
|
|
1218
|
+
const time = Date.parse(text);
|
|
1219
|
+
return Number.isNaN(time) ? null : time;
|
|
1220
|
+
}
|
|
1221
|
+
function sortRows(rows, field, direction = "asc") {
|
|
1222
|
+
if (!field) return rows;
|
|
1223
|
+
const dir = direction === "desc" ? -1 : 1;
|
|
1224
|
+
return [...rows].sort((a, b) => dir * compareCellValues(a?.[field], b?.[field]));
|
|
1225
|
+
}
|
|
1200
1226
|
var init_format = __esm({
|
|
1201
1227
|
"lib/format.ts"() {
|
|
1202
1228
|
}
|
|
@@ -1309,7 +1335,7 @@ var init_Typography = __esm({
|
|
|
1309
1335
|
if (format !== void 0 && format !== "none" && (typeof body === "string" || typeof body === "number" || body instanceof Date)) {
|
|
1310
1336
|
body = formatValue(body, format);
|
|
1311
1337
|
}
|
|
1312
|
-
return
|
|
1338
|
+
return React84__default.createElement(
|
|
1313
1339
|
Component,
|
|
1314
1340
|
{
|
|
1315
1341
|
id,
|
|
@@ -1872,7 +1898,7 @@ var init_Badge = __esm({
|
|
|
1872
1898
|
md: "px-2.5 py-1 text-sm",
|
|
1873
1899
|
lg: "px-3 py-1.5 text-base"
|
|
1874
1900
|
};
|
|
1875
|
-
Badge =
|
|
1901
|
+
Badge = React84__default.forwardRef(
|
|
1876
1902
|
({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, ...props }, ref) => {
|
|
1877
1903
|
const iconSizes3 = {
|
|
1878
1904
|
sm: "h-icon-default w-icon-default",
|
|
@@ -2222,7 +2248,7 @@ var init_SvgFlow = __esm({
|
|
|
2222
2248
|
width = 100,
|
|
2223
2249
|
height = 100
|
|
2224
2250
|
}) => {
|
|
2225
|
-
const markerId =
|
|
2251
|
+
const markerId = React84__default.useMemo(() => {
|
|
2226
2252
|
flowIdCounter += 1;
|
|
2227
2253
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
2228
2254
|
}, []);
|
|
@@ -2815,7 +2841,7 @@ var init_SvgRing = __esm({
|
|
|
2815
2841
|
width = 100,
|
|
2816
2842
|
height = 100
|
|
2817
2843
|
}) => {
|
|
2818
|
-
const gradientId =
|
|
2844
|
+
const gradientId = React84__default.useMemo(() => {
|
|
2819
2845
|
ringIdCounter += 1;
|
|
2820
2846
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
2821
2847
|
}, []);
|
|
@@ -2996,7 +3022,7 @@ var init_Input = __esm({
|
|
|
2996
3022
|
init_cn();
|
|
2997
3023
|
init_Icon();
|
|
2998
3024
|
init_useEventBus();
|
|
2999
|
-
Input =
|
|
3025
|
+
Input = React84__default.forwardRef(
|
|
3000
3026
|
({
|
|
3001
3027
|
className,
|
|
3002
3028
|
inputType,
|
|
@@ -3164,7 +3190,7 @@ var Label;
|
|
|
3164
3190
|
var init_Label = __esm({
|
|
3165
3191
|
"components/core/atoms/Label.tsx"() {
|
|
3166
3192
|
init_cn();
|
|
3167
|
-
Label =
|
|
3193
|
+
Label = React84__default.forwardRef(
|
|
3168
3194
|
({ className, required, children, ...props }, ref) => {
|
|
3169
3195
|
return /* @__PURE__ */ jsxs(
|
|
3170
3196
|
"label",
|
|
@@ -3191,7 +3217,7 @@ var init_Textarea = __esm({
|
|
|
3191
3217
|
"components/core/atoms/Textarea.tsx"() {
|
|
3192
3218
|
init_cn();
|
|
3193
3219
|
init_useEventBus();
|
|
3194
|
-
Textarea =
|
|
3220
|
+
Textarea = React84__default.forwardRef(
|
|
3195
3221
|
({ className, error, onChange, ...props }, ref) => {
|
|
3196
3222
|
const eventBus = useEventBus();
|
|
3197
3223
|
const handleChange = (e) => {
|
|
@@ -3430,7 +3456,7 @@ var init_Select = __esm({
|
|
|
3430
3456
|
init_cn();
|
|
3431
3457
|
init_Icon();
|
|
3432
3458
|
init_useEventBus();
|
|
3433
|
-
Select =
|
|
3459
|
+
Select = React84__default.forwardRef(
|
|
3434
3460
|
(props, _ref) => {
|
|
3435
3461
|
const { multiple, searchable, clearable } = props;
|
|
3436
3462
|
if (multiple || searchable || clearable) {
|
|
@@ -3447,7 +3473,7 @@ var init_Checkbox = __esm({
|
|
|
3447
3473
|
"components/core/atoms/Checkbox.tsx"() {
|
|
3448
3474
|
init_cn();
|
|
3449
3475
|
init_useEventBus();
|
|
3450
|
-
Checkbox =
|
|
3476
|
+
Checkbox = React84__default.forwardRef(
|
|
3451
3477
|
({ className, label, id, onChange, ...props }, ref) => {
|
|
3452
3478
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
3453
3479
|
const eventBus = useEventBus();
|
|
@@ -3501,7 +3527,7 @@ var init_Spinner = __esm({
|
|
|
3501
3527
|
md: "h-6 w-6",
|
|
3502
3528
|
lg: "h-8 w-8"
|
|
3503
3529
|
};
|
|
3504
|
-
Spinner =
|
|
3530
|
+
Spinner = React84__default.forwardRef(
|
|
3505
3531
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
3506
3532
|
if (overlay) {
|
|
3507
3533
|
return /* @__PURE__ */ jsx(
|
|
@@ -3591,7 +3617,7 @@ var init_Card = __esm({
|
|
|
3591
3617
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
3592
3618
|
"tile-image-first": "p-0 overflow-hidden"
|
|
3593
3619
|
};
|
|
3594
|
-
Card =
|
|
3620
|
+
Card = React84__default.forwardRef(
|
|
3595
3621
|
({
|
|
3596
3622
|
className,
|
|
3597
3623
|
variant = "bordered",
|
|
@@ -3640,9 +3666,9 @@ var init_Card = __esm({
|
|
|
3640
3666
|
}
|
|
3641
3667
|
);
|
|
3642
3668
|
Card.displayName = "Card";
|
|
3643
|
-
CardHeader =
|
|
3669
|
+
CardHeader = React84__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
3644
3670
|
CardHeader.displayName = "CardHeader";
|
|
3645
|
-
CardTitle =
|
|
3671
|
+
CardTitle = React84__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3646
3672
|
"h3",
|
|
3647
3673
|
{
|
|
3648
3674
|
ref,
|
|
@@ -3655,11 +3681,11 @@ var init_Card = __esm({
|
|
|
3655
3681
|
}
|
|
3656
3682
|
));
|
|
3657
3683
|
CardTitle.displayName = "CardTitle";
|
|
3658
|
-
CardContent =
|
|
3684
|
+
CardContent = React84__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
3659
3685
|
CardContent.displayName = "CardContent";
|
|
3660
3686
|
CardBody = CardContent;
|
|
3661
3687
|
CardBody.displayName = "CardBody";
|
|
3662
|
-
CardFooter =
|
|
3688
|
+
CardFooter = React84__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3663
3689
|
"div",
|
|
3664
3690
|
{
|
|
3665
3691
|
ref,
|
|
@@ -3746,7 +3772,7 @@ var init_FilterPill = __esm({
|
|
|
3746
3772
|
md: "w-3.5 h-3.5",
|
|
3747
3773
|
lg: "w-4 h-4"
|
|
3748
3774
|
};
|
|
3749
|
-
FilterPill =
|
|
3775
|
+
FilterPill = React84__default.forwardRef(
|
|
3750
3776
|
({
|
|
3751
3777
|
className,
|
|
3752
3778
|
variant = "default",
|
|
@@ -3875,8 +3901,8 @@ var init_Avatar = __esm({
|
|
|
3875
3901
|
actionPayload
|
|
3876
3902
|
}) => {
|
|
3877
3903
|
const eventBus = useEventBus();
|
|
3878
|
-
const [imgFailed, setImgFailed] =
|
|
3879
|
-
|
|
3904
|
+
const [imgFailed, setImgFailed] = React84__default.useState(false);
|
|
3905
|
+
React84__default.useEffect(() => {
|
|
3880
3906
|
setImgFailed(false);
|
|
3881
3907
|
}, [src]);
|
|
3882
3908
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -3989,7 +4015,7 @@ var init_Center = __esm({
|
|
|
3989
4015
|
as: Component = "div"
|
|
3990
4016
|
}) => {
|
|
3991
4017
|
const mergedStyle = minHeight ? { minHeight, ...style } : style;
|
|
3992
|
-
return
|
|
4018
|
+
return React84__default.createElement(Component, {
|
|
3993
4019
|
className: cn(
|
|
3994
4020
|
inline ? "inline-flex" : "flex",
|
|
3995
4021
|
horizontal && "justify-center",
|
|
@@ -4257,7 +4283,7 @@ var init_Radio = __esm({
|
|
|
4257
4283
|
md: "w-2.5 h-2.5",
|
|
4258
4284
|
lg: "w-3 h-3"
|
|
4259
4285
|
};
|
|
4260
|
-
Radio =
|
|
4286
|
+
Radio = React84__default.forwardRef(
|
|
4261
4287
|
({
|
|
4262
4288
|
label,
|
|
4263
4289
|
helperText,
|
|
@@ -4274,12 +4300,12 @@ var init_Radio = __esm({
|
|
|
4274
4300
|
onChange,
|
|
4275
4301
|
...props
|
|
4276
4302
|
}, ref) => {
|
|
4277
|
-
const reactId =
|
|
4303
|
+
const reactId = React84__default.useId();
|
|
4278
4304
|
const baseId = id || `radio-${reactId}`;
|
|
4279
4305
|
const hasError = !!error;
|
|
4280
4306
|
const eventBus = useEventBus();
|
|
4281
|
-
const [selected, setSelected] =
|
|
4282
|
-
|
|
4307
|
+
const [selected, setSelected] = React84__default.useState(value);
|
|
4308
|
+
React84__default.useEffect(() => {
|
|
4283
4309
|
if (value !== void 0) setSelected(value);
|
|
4284
4310
|
}, [value]);
|
|
4285
4311
|
const pick = (next, e) => {
|
|
@@ -4461,7 +4487,7 @@ var init_Switch = __esm({
|
|
|
4461
4487
|
"components/core/atoms/Switch.tsx"() {
|
|
4462
4488
|
"use client";
|
|
4463
4489
|
init_cn();
|
|
4464
|
-
Switch =
|
|
4490
|
+
Switch = React84.forwardRef(
|
|
4465
4491
|
({
|
|
4466
4492
|
checked,
|
|
4467
4493
|
defaultChecked = false,
|
|
@@ -4472,10 +4498,10 @@ var init_Switch = __esm({
|
|
|
4472
4498
|
name,
|
|
4473
4499
|
className
|
|
4474
4500
|
}, ref) => {
|
|
4475
|
-
const [isChecked, setIsChecked] =
|
|
4501
|
+
const [isChecked, setIsChecked] = React84.useState(
|
|
4476
4502
|
checked !== void 0 ? checked : defaultChecked
|
|
4477
4503
|
);
|
|
4478
|
-
|
|
4504
|
+
React84.useEffect(() => {
|
|
4479
4505
|
if (checked !== void 0) {
|
|
4480
4506
|
setIsChecked(checked);
|
|
4481
4507
|
}
|
|
@@ -4638,7 +4664,7 @@ var init_Stack = __esm({
|
|
|
4638
4664
|
};
|
|
4639
4665
|
const isHorizontal = direction === "horizontal";
|
|
4640
4666
|
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";
|
|
4641
|
-
return
|
|
4667
|
+
return React84__default.createElement(
|
|
4642
4668
|
Component,
|
|
4643
4669
|
{
|
|
4644
4670
|
className: cn(
|
|
@@ -4838,7 +4864,7 @@ var Aside;
|
|
|
4838
4864
|
var init_Aside = __esm({
|
|
4839
4865
|
"components/core/atoms/Aside.tsx"() {
|
|
4840
4866
|
init_cn();
|
|
4841
|
-
Aside =
|
|
4867
|
+
Aside = React84__default.forwardRef(
|
|
4842
4868
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
4843
4869
|
);
|
|
4844
4870
|
Aside.displayName = "Aside";
|
|
@@ -4917,9 +4943,9 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4917
4943
|
className
|
|
4918
4944
|
}) => {
|
|
4919
4945
|
const { t } = useTranslate();
|
|
4920
|
-
const [isVisible, setIsVisible] =
|
|
4921
|
-
const timeoutRef =
|
|
4922
|
-
const triggerRef =
|
|
4946
|
+
const [isVisible, setIsVisible] = React84__default.useState(false);
|
|
4947
|
+
const timeoutRef = React84__default.useRef(null);
|
|
4948
|
+
const triggerRef = React84__default.useRef(null);
|
|
4923
4949
|
const handleMouseEnter = () => {
|
|
4924
4950
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4925
4951
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -4930,7 +4956,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4930
4956
|
};
|
|
4931
4957
|
const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
|
|
4932
4958
|
const open = isVisible || revealed;
|
|
4933
|
-
|
|
4959
|
+
React84__default.useEffect(() => {
|
|
4934
4960
|
return () => {
|
|
4935
4961
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4936
4962
|
};
|
|
@@ -5140,7 +5166,7 @@ var init_StatusDot = __esm({
|
|
|
5140
5166
|
md: "w-2.5 h-2.5",
|
|
5141
5167
|
lg: "w-3 h-3"
|
|
5142
5168
|
};
|
|
5143
|
-
StatusDot =
|
|
5169
|
+
StatusDot = React84__default.forwardRef(
|
|
5144
5170
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
5145
5171
|
return /* @__PURE__ */ jsx(
|
|
5146
5172
|
"span",
|
|
@@ -5194,7 +5220,7 @@ var init_TrendIndicator = __esm({
|
|
|
5194
5220
|
down: "trending-down",
|
|
5195
5221
|
flat: "arrow-right"
|
|
5196
5222
|
};
|
|
5197
|
-
TrendIndicator =
|
|
5223
|
+
TrendIndicator = React84__default.forwardRef(
|
|
5198
5224
|
({
|
|
5199
5225
|
className,
|
|
5200
5226
|
value,
|
|
@@ -5263,7 +5289,7 @@ var init_RangeSlider = __esm({
|
|
|
5263
5289
|
md: "w-4 h-4",
|
|
5264
5290
|
lg: "w-5 h-5"
|
|
5265
5291
|
};
|
|
5266
|
-
RangeSlider =
|
|
5292
|
+
RangeSlider = React84__default.forwardRef(
|
|
5267
5293
|
({
|
|
5268
5294
|
className,
|
|
5269
5295
|
min = 0,
|
|
@@ -5874,7 +5900,7 @@ var init_ContentSection = __esm({
|
|
|
5874
5900
|
md: "py-16",
|
|
5875
5901
|
lg: "py-24"
|
|
5876
5902
|
};
|
|
5877
|
-
ContentSection =
|
|
5903
|
+
ContentSection = React84__default.forwardRef(
|
|
5878
5904
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
5879
5905
|
return /* @__PURE__ */ jsx(
|
|
5880
5906
|
Box,
|
|
@@ -6408,7 +6434,7 @@ var init_AnimatedReveal = __esm({
|
|
|
6408
6434
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
6409
6435
|
"none": {}
|
|
6410
6436
|
};
|
|
6411
|
-
AnimatedReveal =
|
|
6437
|
+
AnimatedReveal = React84__default.forwardRef(
|
|
6412
6438
|
({
|
|
6413
6439
|
trigger = "scroll",
|
|
6414
6440
|
animation = "fade-up",
|
|
@@ -6568,7 +6594,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6568
6594
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
6569
6595
|
"use client";
|
|
6570
6596
|
init_cn();
|
|
6571
|
-
AnimatedGraphic =
|
|
6597
|
+
AnimatedGraphic = React84__default.forwardRef(
|
|
6572
6598
|
({
|
|
6573
6599
|
src,
|
|
6574
6600
|
svgContent,
|
|
@@ -6591,7 +6617,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6591
6617
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
6592
6618
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
6593
6619
|
const prevAnimateRef = useRef(animate);
|
|
6594
|
-
const setRef =
|
|
6620
|
+
const setRef = React84__default.useCallback(
|
|
6595
6621
|
(node) => {
|
|
6596
6622
|
containerRef.current = node;
|
|
6597
6623
|
if (typeof ref === "function") ref(node);
|
|
@@ -7320,9 +7346,9 @@ function ControlButton({
|
|
|
7320
7346
|
className
|
|
7321
7347
|
}) {
|
|
7322
7348
|
const eventBus = useEventBus();
|
|
7323
|
-
const [isPressed, setIsPressed] =
|
|
7349
|
+
const [isPressed, setIsPressed] = React84.useState(false);
|
|
7324
7350
|
const actualPressed = pressed ?? isPressed;
|
|
7325
|
-
const handlePointerDown =
|
|
7351
|
+
const handlePointerDown = React84.useCallback(
|
|
7326
7352
|
(e) => {
|
|
7327
7353
|
e.preventDefault();
|
|
7328
7354
|
if (disabled) return;
|
|
@@ -7332,7 +7358,7 @@ function ControlButton({
|
|
|
7332
7358
|
},
|
|
7333
7359
|
[disabled, pressEvent, eventBus, onPress]
|
|
7334
7360
|
);
|
|
7335
|
-
const handlePointerUp =
|
|
7361
|
+
const handlePointerUp = React84.useCallback(
|
|
7336
7362
|
(e) => {
|
|
7337
7363
|
e.preventDefault();
|
|
7338
7364
|
if (disabled) return;
|
|
@@ -7342,7 +7368,7 @@ function ControlButton({
|
|
|
7342
7368
|
},
|
|
7343
7369
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
7344
7370
|
);
|
|
7345
|
-
const handlePointerLeave =
|
|
7371
|
+
const handlePointerLeave = React84.useCallback(
|
|
7346
7372
|
(e) => {
|
|
7347
7373
|
if (isPressed) {
|
|
7348
7374
|
setIsPressed(false);
|
|
@@ -7583,210 +7609,6 @@ var init_ChoiceButton = __esm({
|
|
|
7583
7609
|
ChoiceButton.displayName = "ChoiceButton";
|
|
7584
7610
|
}
|
|
7585
7611
|
});
|
|
7586
|
-
function SvgStage({
|
|
7587
|
-
cols,
|
|
7588
|
-
rows,
|
|
7589
|
-
tileSize = 32,
|
|
7590
|
-
background = "var(--color-background)",
|
|
7591
|
-
tileClickEvent,
|
|
7592
|
-
tileHoverEvent,
|
|
7593
|
-
tileLeaveEvent,
|
|
7594
|
-
keyMap,
|
|
7595
|
-
keyUpMap,
|
|
7596
|
-
className,
|
|
7597
|
-
children
|
|
7598
|
-
}) {
|
|
7599
|
-
const eventBus = useEventBus();
|
|
7600
|
-
const svgRef = useRef(null);
|
|
7601
|
-
const pointerDownRef = useRef(null);
|
|
7602
|
-
const cellFromClient = useCallback((clientX, clientY) => {
|
|
7603
|
-
const svg = svgRef.current;
|
|
7604
|
-
if (!svg) return null;
|
|
7605
|
-
const rect = svg.getBoundingClientRect();
|
|
7606
|
-
if (rect.width === 0 || rect.height === 0) return null;
|
|
7607
|
-
const vbW = cols * tileSize;
|
|
7608
|
-
const vbH = rows * tileSize;
|
|
7609
|
-
const meet = Math.min(rect.width / vbW, rect.height / vbH);
|
|
7610
|
-
const offsetX = (rect.width - vbW * meet) / 2;
|
|
7611
|
-
const offsetY = (rect.height - vbH * meet) / 2;
|
|
7612
|
-
const svgX = (clientX - rect.left - offsetX) / meet;
|
|
7613
|
-
const svgY = (clientY - rect.top - offsetY) / meet;
|
|
7614
|
-
return {
|
|
7615
|
-
x: Math.min(Math.max(Math.floor(svgX / tileSize), 0), cols - 1),
|
|
7616
|
-
y: Math.min(Math.max(Math.floor(svgY / tileSize), 0), rows - 1)
|
|
7617
|
-
};
|
|
7618
|
-
}, [cols, rows, tileSize]);
|
|
7619
|
-
const handlePointerDown = useCallback((e) => {
|
|
7620
|
-
pointerDownRef.current = { clientX: e.clientX, clientY: e.clientY };
|
|
7621
|
-
}, []);
|
|
7622
|
-
const handlePointerUp = useCallback((e) => {
|
|
7623
|
-
const down = pointerDownRef.current;
|
|
7624
|
-
pointerDownRef.current = null;
|
|
7625
|
-
if (!tileClickEvent) return;
|
|
7626
|
-
if (down && Math.hypot(e.clientX - down.clientX, e.clientY - down.clientY) > 5) return;
|
|
7627
|
-
const cell = cellFromClient(e.clientX, e.clientY);
|
|
7628
|
-
if (cell) eventBus.emit(`UI:${tileClickEvent}`, cell);
|
|
7629
|
-
}, [cellFromClient, tileClickEvent, eventBus]);
|
|
7630
|
-
const handlePointerMove = useCallback((e) => {
|
|
7631
|
-
if (!tileHoverEvent) return;
|
|
7632
|
-
const cell = cellFromClient(e.clientX, e.clientY);
|
|
7633
|
-
if (cell) eventBus.emit(`UI:${tileHoverEvent}`, cell);
|
|
7634
|
-
}, [cellFromClient, tileHoverEvent, eventBus]);
|
|
7635
|
-
const handlePointerLeave = useCallback(() => {
|
|
7636
|
-
pointerDownRef.current = null;
|
|
7637
|
-
if (tileLeaveEvent) eventBus.emit(`UI:${tileLeaveEvent}`, {});
|
|
7638
|
-
}, [tileLeaveEvent, eventBus]);
|
|
7639
|
-
useEffect(() => {
|
|
7640
|
-
if (!keyMap && !keyUpMap) return;
|
|
7641
|
-
const onDown = (e) => {
|
|
7642
|
-
const ev = keyMap?.[e.code];
|
|
7643
|
-
if (ev) {
|
|
7644
|
-
eventBus.emit(`UI:${ev}`, {});
|
|
7645
|
-
e.preventDefault();
|
|
7646
|
-
}
|
|
7647
|
-
};
|
|
7648
|
-
const onUp = (e) => {
|
|
7649
|
-
const ev = keyUpMap?.[e.code];
|
|
7650
|
-
if (ev) eventBus.emit(`UI:${ev}`, {});
|
|
7651
|
-
};
|
|
7652
|
-
window.addEventListener("keydown", onDown);
|
|
7653
|
-
window.addEventListener("keyup", onUp);
|
|
7654
|
-
return () => {
|
|
7655
|
-
window.removeEventListener("keydown", onDown);
|
|
7656
|
-
window.removeEventListener("keyup", onUp);
|
|
7657
|
-
};
|
|
7658
|
-
}, [keyMap, keyUpMap, eventBus]);
|
|
7659
|
-
useEffect(() => {
|
|
7660
|
-
if (!keyMap && !keyUpMap) return;
|
|
7661
|
-
svgRef.current?.focus();
|
|
7662
|
-
}, [keyMap, keyUpMap]);
|
|
7663
|
-
const stageContext = useMemo(() => ({ tileSize }), [tileSize]);
|
|
7664
|
-
return /* @__PURE__ */ jsxs(
|
|
7665
|
-
"svg",
|
|
7666
|
-
{
|
|
7667
|
-
ref: svgRef,
|
|
7668
|
-
"data-testid": "svg-stage",
|
|
7669
|
-
viewBox: `0 0 ${cols * tileSize} ${rows * tileSize}`,
|
|
7670
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
7671
|
-
className: cn("block h-full w-full", className),
|
|
7672
|
-
tabIndex: keyMap || keyUpMap ? 0 : void 0,
|
|
7673
|
-
onPointerDown: handlePointerDown,
|
|
7674
|
-
onPointerMove: handlePointerMove,
|
|
7675
|
-
onPointerUp: handlePointerUp,
|
|
7676
|
-
onPointerLeave: handlePointerLeave,
|
|
7677
|
-
children: [
|
|
7678
|
-
/* @__PURE__ */ jsx("rect", { width: cols * tileSize, height: rows * tileSize, fill: background }),
|
|
7679
|
-
/* @__PURE__ */ jsx(SvgStageContext.Provider, { value: stageContext, children })
|
|
7680
|
-
]
|
|
7681
|
-
}
|
|
7682
|
-
);
|
|
7683
|
-
}
|
|
7684
|
-
var SvgStageContext;
|
|
7685
|
-
var init_SvgStage = __esm({
|
|
7686
|
-
"components/game/molecules/SvgStage.tsx"() {
|
|
7687
|
-
"use client";
|
|
7688
|
-
init_cn();
|
|
7689
|
-
init_useEventBus();
|
|
7690
|
-
SvgStageContext = React85.createContext({ tileSize: 1 });
|
|
7691
|
-
SvgStage.displayName = "SvgStage";
|
|
7692
|
-
}
|
|
7693
|
-
});
|
|
7694
|
-
function SvgDrawShape({
|
|
7695
|
-
shape,
|
|
7696
|
-
x,
|
|
7697
|
-
y,
|
|
7698
|
-
width,
|
|
7699
|
-
height,
|
|
7700
|
-
radius,
|
|
7701
|
-
radiusY,
|
|
7702
|
-
points,
|
|
7703
|
-
d,
|
|
7704
|
-
x2,
|
|
7705
|
-
y2,
|
|
7706
|
-
fill,
|
|
7707
|
-
stroke,
|
|
7708
|
-
strokeWidth,
|
|
7709
|
-
opacity,
|
|
7710
|
-
className
|
|
7711
|
-
}) {
|
|
7712
|
-
const { tileSize } = useContext(SvgStageContext);
|
|
7713
|
-
const cell = (v) => v === void 0 ? void 0 : v * tileSize;
|
|
7714
|
-
const paint = {
|
|
7715
|
-
fill: fill ?? (stroke === void 0 ? "var(--color-primary)" : "none"),
|
|
7716
|
-
stroke,
|
|
7717
|
-
strokeWidth,
|
|
7718
|
-
opacity,
|
|
7719
|
-
className
|
|
7720
|
-
};
|
|
7721
|
-
return /* @__PURE__ */ jsxs("g", { transform: `translate(${x * tileSize} ${y * tileSize})`, children: [
|
|
7722
|
-
shape === "rect" && /* @__PURE__ */ jsx("rect", { width: cell(width), height: cell(height), ...paint }),
|
|
7723
|
-
shape === "circle" && /* @__PURE__ */ jsx("circle", { r: cell(radius), ...paint }),
|
|
7724
|
-
shape === "ellipse" && /* @__PURE__ */ jsx("ellipse", { rx: cell(radius), ry: cell(radiusY ?? radius), ...paint }),
|
|
7725
|
-
shape === "polygon" && /* @__PURE__ */ jsx("polygon", { points, ...paint }),
|
|
7726
|
-
shape === "polyline" && /* @__PURE__ */ jsx("polyline", { points, ...paint }),
|
|
7727
|
-
shape === "path" && /* @__PURE__ */ jsx("path", { d, ...paint }),
|
|
7728
|
-
shape === "line" && /* @__PURE__ */ jsx("line", { x2: cell(x2), y2: cell(y2), ...paint })
|
|
7729
|
-
] });
|
|
7730
|
-
}
|
|
7731
|
-
var init_SvgDrawShape = __esm({
|
|
7732
|
-
"components/game/atoms/SvgDrawShape.tsx"() {
|
|
7733
|
-
"use client";
|
|
7734
|
-
init_SvgStage();
|
|
7735
|
-
SvgDrawShape.displayName = "SvgDrawShape";
|
|
7736
|
-
}
|
|
7737
|
-
});
|
|
7738
|
-
function SvgDrawGroup({
|
|
7739
|
-
x = 0,
|
|
7740
|
-
y = 0,
|
|
7741
|
-
scale,
|
|
7742
|
-
rotate,
|
|
7743
|
-
opacity,
|
|
7744
|
-
className,
|
|
7745
|
-
children
|
|
7746
|
-
}) {
|
|
7747
|
-
const { tileSize } = useContext(SvgStageContext);
|
|
7748
|
-
const transforms = [`translate(${x * tileSize} ${y * tileSize})`];
|
|
7749
|
-
if (rotate !== void 0) transforms.push(`rotate(${rotate})`);
|
|
7750
|
-
if (scale !== void 0) transforms.push(`scale(${scale})`);
|
|
7751
|
-
return /* @__PURE__ */ jsx("g", { transform: transforms.join(" "), opacity, className, children });
|
|
7752
|
-
}
|
|
7753
|
-
var init_SvgDrawGroup = __esm({
|
|
7754
|
-
"components/game/atoms/SvgDrawGroup.tsx"() {
|
|
7755
|
-
"use client";
|
|
7756
|
-
init_SvgStage();
|
|
7757
|
-
SvgDrawGroup.displayName = "SvgDrawGroup";
|
|
7758
|
-
}
|
|
7759
|
-
});
|
|
7760
|
-
function SvgDrawText({
|
|
7761
|
-
x,
|
|
7762
|
-
y,
|
|
7763
|
-
text,
|
|
7764
|
-
size = 12,
|
|
7765
|
-
fill = "var(--color-foreground)",
|
|
7766
|
-
anchor = "middle",
|
|
7767
|
-
className
|
|
7768
|
-
}) {
|
|
7769
|
-
const { tileSize } = useContext(SvgStageContext);
|
|
7770
|
-
return /* @__PURE__ */ jsx(
|
|
7771
|
-
"text",
|
|
7772
|
-
{
|
|
7773
|
-
x: x * tileSize,
|
|
7774
|
-
y: y * tileSize,
|
|
7775
|
-
fontSize: size,
|
|
7776
|
-
fill,
|
|
7777
|
-
textAnchor: anchor,
|
|
7778
|
-
className,
|
|
7779
|
-
children: text
|
|
7780
|
-
}
|
|
7781
|
-
);
|
|
7782
|
-
}
|
|
7783
|
-
var init_SvgDrawText = __esm({
|
|
7784
|
-
"components/game/atoms/SvgDrawText.tsx"() {
|
|
7785
|
-
"use client";
|
|
7786
|
-
init_SvgStage();
|
|
7787
|
-
SvgDrawText.displayName = "SvgDrawText";
|
|
7788
|
-
}
|
|
7789
|
-
});
|
|
7790
7612
|
function ControlGrid({
|
|
7791
7613
|
kind,
|
|
7792
7614
|
buttons = DEFAULT_BUTTONS,
|
|
@@ -7804,8 +7626,8 @@ function ControlGrid({
|
|
|
7804
7626
|
className
|
|
7805
7627
|
}) {
|
|
7806
7628
|
const eventBus = useEventBus();
|
|
7807
|
-
const [active, setActive] =
|
|
7808
|
-
const handlePress =
|
|
7629
|
+
const [active, setActive] = React84.useState(/* @__PURE__ */ new Set());
|
|
7630
|
+
const handlePress = React84.useCallback(
|
|
7809
7631
|
(id) => {
|
|
7810
7632
|
setActive((prev) => new Set(prev).add(id));
|
|
7811
7633
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -7819,7 +7641,7 @@ function ControlGrid({
|
|
|
7819
7641
|
},
|
|
7820
7642
|
[kind, actionEvent, directionEvent, directionEvents, eventBus, onAction, onDirection]
|
|
7821
7643
|
);
|
|
7822
|
-
const handleRelease =
|
|
7644
|
+
const handleRelease = React84.useCallback(
|
|
7823
7645
|
(id) => {
|
|
7824
7646
|
setActive((prev) => {
|
|
7825
7647
|
const next = new Set(prev);
|
|
@@ -8177,7 +7999,7 @@ function GameMenu({
|
|
|
8177
7999
|
}) {
|
|
8178
8000
|
const resolvedOptions = (options?.length ? options : void 0) ?? (menuItems?.length ? menuItems : void 0) ?? DEFAULT_MENU_OPTIONS;
|
|
8179
8001
|
const eventBus = useEventBus();
|
|
8180
|
-
const handleOptionClick =
|
|
8002
|
+
const handleOptionClick = React84.useCallback(
|
|
8181
8003
|
(option) => {
|
|
8182
8004
|
if (option.event) {
|
|
8183
8005
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -8413,7 +8235,7 @@ function StateGraph({
|
|
|
8413
8235
|
}) {
|
|
8414
8236
|
const eventBus = useEventBus();
|
|
8415
8237
|
const nodes = states ?? [];
|
|
8416
|
-
const positions =
|
|
8238
|
+
const positions = React84.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
|
|
8417
8239
|
return /* @__PURE__ */ jsxs(
|
|
8418
8240
|
Box,
|
|
8419
8241
|
{
|
|
@@ -8484,8 +8306,8 @@ function MiniMap({
|
|
|
8484
8306
|
tileAssets,
|
|
8485
8307
|
unitAssets
|
|
8486
8308
|
}) {
|
|
8487
|
-
const canvasRef =
|
|
8488
|
-
const imgCacheRef =
|
|
8309
|
+
const canvasRef = React84.useRef(null);
|
|
8310
|
+
const imgCacheRef = React84.useRef(/* @__PURE__ */ new Map());
|
|
8489
8311
|
function loadImg(url) {
|
|
8490
8312
|
const cached = imgCacheRef.current.get(url);
|
|
8491
8313
|
if (cached) return cached.complete ? cached : null;
|
|
@@ -8500,7 +8322,7 @@ function MiniMap({
|
|
|
8500
8322
|
imgCacheRef.current.set(url, img);
|
|
8501
8323
|
return null;
|
|
8502
8324
|
}
|
|
8503
|
-
|
|
8325
|
+
React84.useEffect(() => {
|
|
8504
8326
|
const canvas = canvasRef.current;
|
|
8505
8327
|
if (!canvas) return;
|
|
8506
8328
|
const ctx = canvas.getContext("2d");
|
|
@@ -8976,6 +8798,15 @@ function createWebPainter(ctx, onAssetLoad) {
|
|
|
8976
8798
|
ctx.lineWidth = lineWidth;
|
|
8977
8799
|
ctx.stroke();
|
|
8978
8800
|
},
|
|
8801
|
+
fillPath(d, color) {
|
|
8802
|
+
ctx.fillStyle = color;
|
|
8803
|
+
ctx.fill(new Path2D(d));
|
|
8804
|
+
},
|
|
8805
|
+
strokePath(d, color, lineWidth = 1) {
|
|
8806
|
+
ctx.strokeStyle = color;
|
|
8807
|
+
ctx.lineWidth = lineWidth;
|
|
8808
|
+
ctx.stroke(new Path2D(d));
|
|
8809
|
+
},
|
|
8979
8810
|
text(str, x, y, style) {
|
|
8980
8811
|
if (style.font) ctx.font = style.font;
|
|
8981
8812
|
ctx.fillStyle = style.color;
|
|
@@ -9151,6 +8982,16 @@ var init_DrawShape = __esm({
|
|
|
9151
8982
|
if (node.stroke) painter.strokePoly(pts, node.stroke, node.strokeWidth ?? 1, true);
|
|
9152
8983
|
break;
|
|
9153
8984
|
}
|
|
8985
|
+
case "path": {
|
|
8986
|
+
if (!node.d) break;
|
|
8987
|
+
const base = dctx.projector.project(node.position);
|
|
8988
|
+
const tw = dctx.projector.tileWidth;
|
|
8989
|
+
painter.translate(base.x, base.y);
|
|
8990
|
+
painter.scale(tw, tw);
|
|
8991
|
+
if (node.fill) painter.fillPath(node.d, node.fill);
|
|
8992
|
+
if (node.stroke) painter.strokePath(node.d, node.stroke, (node.strokeWidth ?? 1) / tw);
|
|
8993
|
+
break;
|
|
8994
|
+
}
|
|
9154
8995
|
}
|
|
9155
8996
|
painter.restore();
|
|
9156
8997
|
};
|
|
@@ -9242,6 +9083,19 @@ function paintDrawable(painter, node, dctx) {
|
|
|
9242
9083
|
case "draw-text":
|
|
9243
9084
|
paintText(painter, node, dctx);
|
|
9244
9085
|
break;
|
|
9086
|
+
case "draw-group": {
|
|
9087
|
+
if (!isValidScenePos(node.position)) break;
|
|
9088
|
+
if (!Array.isArray(node.items)) break;
|
|
9089
|
+
const p = dctx.projector.project(node.position);
|
|
9090
|
+
painter.save();
|
|
9091
|
+
painter.translate(p.x, p.y);
|
|
9092
|
+
if (node.scale !== void 0) painter.scale(node.scale, node.scale);
|
|
9093
|
+
if (node.rotate !== void 0) painter.rotate(node.rotate);
|
|
9094
|
+
if (node.opacity !== void 0 && node.opacity !== 1) painter.setAlpha(node.opacity);
|
|
9095
|
+
for (const item of node.items) paintDrawable(painter, item, dctx);
|
|
9096
|
+
painter.restore();
|
|
9097
|
+
break;
|
|
9098
|
+
}
|
|
9245
9099
|
case "draw-sprite-layer":
|
|
9246
9100
|
paintSpriteLayer(painter, node, dctx);
|
|
9247
9101
|
break;
|
|
@@ -9255,6 +9109,7 @@ function paintDrawable(painter, node, dctx) {
|
|
|
9255
9109
|
}
|
|
9256
9110
|
var init_paintDispatch = __esm({
|
|
9257
9111
|
"lib/drawable/paintDispatch.ts"() {
|
|
9112
|
+
init_contract();
|
|
9258
9113
|
init_DrawSprite();
|
|
9259
9114
|
init_DrawShape();
|
|
9260
9115
|
init_DrawText();
|
|
@@ -9272,6 +9127,7 @@ function collectDrawnItems(nodes) {
|
|
|
9272
9127
|
case "draw-sprite":
|
|
9273
9128
|
case "draw-shape":
|
|
9274
9129
|
case "draw-text":
|
|
9130
|
+
case "draw-group":
|
|
9275
9131
|
if (isValidScenePos(n.position)) out.push({ pos: n.position, id: n.id });
|
|
9276
9132
|
break;
|
|
9277
9133
|
case "draw-sprite-layer":
|
|
@@ -9812,32 +9668,6 @@ var init_Canvas = __esm({
|
|
|
9812
9668
|
Canvas.displayName = "Canvas";
|
|
9813
9669
|
}
|
|
9814
9670
|
});
|
|
9815
|
-
function SvgDrawShapeLayer({
|
|
9816
|
-
items,
|
|
9817
|
-
fill,
|
|
9818
|
-
stroke,
|
|
9819
|
-
strokeWidth,
|
|
9820
|
-
opacity
|
|
9821
|
-
}) {
|
|
9822
|
-
return /* @__PURE__ */ jsx("g", { children: items.map(({ id, ...shape }) => /* @__PURE__ */ jsx(
|
|
9823
|
-
SvgDrawShape,
|
|
9824
|
-
{
|
|
9825
|
-
...shape,
|
|
9826
|
-
fill: shape.fill ?? fill,
|
|
9827
|
-
stroke: shape.stroke ?? stroke,
|
|
9828
|
-
strokeWidth: shape.strokeWidth ?? strokeWidth,
|
|
9829
|
-
opacity: shape.opacity ?? opacity
|
|
9830
|
-
},
|
|
9831
|
-
id
|
|
9832
|
-
)) });
|
|
9833
|
-
}
|
|
9834
|
-
var init_SvgDrawShapeLayer = __esm({
|
|
9835
|
-
"components/game/molecules/SvgDrawShapeLayer.tsx"() {
|
|
9836
|
-
"use client";
|
|
9837
|
-
init_SvgDrawShape();
|
|
9838
|
-
SvgDrawShapeLayer.displayName = "SvgDrawShapeLayer";
|
|
9839
|
-
}
|
|
9840
|
-
});
|
|
9841
9671
|
function GameAudioToggle({
|
|
9842
9672
|
size = "sm",
|
|
9843
9673
|
className,
|
|
@@ -10221,7 +10051,7 @@ function LinearView({
|
|
|
10221
10051
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
10222
10052
|
const isDone = i < currentIdx;
|
|
10223
10053
|
const isCurrent = i === currentIdx;
|
|
10224
|
-
return /* @__PURE__ */ jsxs(
|
|
10054
|
+
return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
10225
10055
|
i > 0 && /* @__PURE__ */ jsx(
|
|
10226
10056
|
Typography,
|
|
10227
10057
|
{
|
|
@@ -10756,7 +10586,7 @@ function SequenceBar({
|
|
|
10756
10586
|
else onSlotRemove?.(index);
|
|
10757
10587
|
}, [emit, slotRemoveEvent, onSlotRemove, playing]);
|
|
10758
10588
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
10759
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
10589
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
10760
10590
|
i > 0 && /* @__PURE__ */ jsx(
|
|
10761
10591
|
Typography,
|
|
10762
10592
|
{
|
|
@@ -11405,7 +11235,7 @@ var init_ErrorBoundary = __esm({
|
|
|
11405
11235
|
}
|
|
11406
11236
|
);
|
|
11407
11237
|
};
|
|
11408
|
-
ErrorBoundary = class extends
|
|
11238
|
+
ErrorBoundary = class extends React84__default.Component {
|
|
11409
11239
|
constructor(props) {
|
|
11410
11240
|
super(props);
|
|
11411
11241
|
__publicField(this, "reset", () => {
|
|
@@ -12057,7 +11887,7 @@ var init_Container = __esm({
|
|
|
12057
11887
|
as: Component = "div"
|
|
12058
11888
|
}) => {
|
|
12059
11889
|
const resolvedSize = maxWidth ?? size ?? "lg";
|
|
12060
|
-
return
|
|
11890
|
+
return React84__default.createElement(
|
|
12061
11891
|
Component,
|
|
12062
11892
|
{
|
|
12063
11893
|
className: cn(
|
|
@@ -15022,7 +14852,7 @@ var init_CodeBlock = __esm({
|
|
|
15022
14852
|
DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
|
|
15023
14853
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
15024
14854
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
15025
|
-
CodeBlock =
|
|
14855
|
+
CodeBlock = React84__default.memo(
|
|
15026
14856
|
({
|
|
15027
14857
|
code: rawCode,
|
|
15028
14858
|
language = "text",
|
|
@@ -15610,7 +15440,7 @@ var init_MarkdownContent = __esm({
|
|
|
15610
15440
|
init_Box();
|
|
15611
15441
|
init_CodeBlock();
|
|
15612
15442
|
init_cn();
|
|
15613
|
-
MarkdownContent =
|
|
15443
|
+
MarkdownContent = React84__default.memo(
|
|
15614
15444
|
({ content, direction = "ltr", className }) => {
|
|
15615
15445
|
const { t: _t } = useTranslate();
|
|
15616
15446
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -16937,7 +16767,7 @@ var init_StateMachineView = __esm({
|
|
|
16937
16767
|
style: { top: title ? 30 : 0 },
|
|
16938
16768
|
children: [
|
|
16939
16769
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
16940
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
16770
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React84__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
16941
16771
|
StateNode2,
|
|
16942
16772
|
{
|
|
16943
16773
|
state,
|
|
@@ -22759,8 +22589,8 @@ var init_Menu = __esm({
|
|
|
22759
22589
|
"bottom-end": "bottom-start"
|
|
22760
22590
|
};
|
|
22761
22591
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
22762
|
-
const triggerChild =
|
|
22763
|
-
const triggerElement =
|
|
22592
|
+
const triggerChild = React84__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
22593
|
+
const triggerElement = React84__default.cloneElement(
|
|
22764
22594
|
triggerChild,
|
|
22765
22595
|
{
|
|
22766
22596
|
ref: triggerRef,
|
|
@@ -22855,14 +22685,14 @@ function useDataDnd(args) {
|
|
|
22855
22685
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
22856
22686
|
const enabled = isZone || Boolean(dndRoot);
|
|
22857
22687
|
const eventBus = useEventBus();
|
|
22858
|
-
const parentRoot =
|
|
22688
|
+
const parentRoot = React84__default.useContext(RootCtx);
|
|
22859
22689
|
const isRoot = enabled && parentRoot === null;
|
|
22860
|
-
const zoneId =
|
|
22690
|
+
const zoneId = React84__default.useId();
|
|
22861
22691
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
22862
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
22863
|
-
const optimisticOrdersRef =
|
|
22692
|
+
const [optimisticOrders, setOptimisticOrders] = React84__default.useState(() => /* @__PURE__ */ new Map());
|
|
22693
|
+
const optimisticOrdersRef = React84__default.useRef(optimisticOrders);
|
|
22864
22694
|
optimisticOrdersRef.current = optimisticOrders;
|
|
22865
|
-
const clearOptimisticOrder =
|
|
22695
|
+
const clearOptimisticOrder = React84__default.useCallback((group) => {
|
|
22866
22696
|
setOptimisticOrders((prev) => {
|
|
22867
22697
|
if (!prev.has(group)) return prev;
|
|
22868
22698
|
const next = new Map(prev);
|
|
@@ -22887,7 +22717,7 @@ function useDataDnd(args) {
|
|
|
22887
22717
|
const raw = it[dndItemIdField];
|
|
22888
22718
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
22889
22719
|
}).join("|");
|
|
22890
|
-
const itemIds =
|
|
22720
|
+
const itemIds = React84__default.useMemo(
|
|
22891
22721
|
() => orderedItems.map((it, idx) => {
|
|
22892
22722
|
const raw = it[dndItemIdField];
|
|
22893
22723
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
@@ -22898,7 +22728,7 @@ function useDataDnd(args) {
|
|
|
22898
22728
|
const raw = it[dndItemIdField];
|
|
22899
22729
|
return raw != null ? String(raw) : `__${idx}`;
|
|
22900
22730
|
}).join("|");
|
|
22901
|
-
|
|
22731
|
+
React84__default.useEffect(() => {
|
|
22902
22732
|
const root = isRoot ? null : parentRoot;
|
|
22903
22733
|
if (root) {
|
|
22904
22734
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -22906,20 +22736,20 @@ function useDataDnd(args) {
|
|
|
22906
22736
|
clearOptimisticOrder(ownGroup);
|
|
22907
22737
|
}
|
|
22908
22738
|
}, [itemsContentSig, ownGroup]);
|
|
22909
|
-
const zonesRef =
|
|
22910
|
-
const registerZone =
|
|
22739
|
+
const zonesRef = React84__default.useRef(/* @__PURE__ */ new Map());
|
|
22740
|
+
const registerZone = React84__default.useCallback((zoneId2, meta2) => {
|
|
22911
22741
|
zonesRef.current.set(zoneId2, meta2);
|
|
22912
22742
|
}, []);
|
|
22913
|
-
const unregisterZone =
|
|
22743
|
+
const unregisterZone = React84__default.useCallback((zoneId2) => {
|
|
22914
22744
|
zonesRef.current.delete(zoneId2);
|
|
22915
22745
|
}, []);
|
|
22916
|
-
const [activeDrag, setActiveDrag] =
|
|
22917
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
22918
|
-
const meta =
|
|
22746
|
+
const [activeDrag, setActiveDrag] = React84__default.useState(null);
|
|
22747
|
+
const [overZoneGroup, setOverZoneGroup] = React84__default.useState(null);
|
|
22748
|
+
const meta = React84__default.useMemo(
|
|
22919
22749
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
22920
22750
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
22921
22751
|
);
|
|
22922
|
-
|
|
22752
|
+
React84__default.useEffect(() => {
|
|
22923
22753
|
const target = isRoot ? null : parentRoot;
|
|
22924
22754
|
if (!target) {
|
|
22925
22755
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -22938,7 +22768,7 @@ function useDataDnd(args) {
|
|
|
22938
22768
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
22939
22769
|
const sensors = useAlmadarDndSensors(true);
|
|
22940
22770
|
const collisionDetection = almadarDndCollisionDetection;
|
|
22941
|
-
const findZoneByItem =
|
|
22771
|
+
const findZoneByItem = React84__default.useCallback(
|
|
22942
22772
|
(id) => {
|
|
22943
22773
|
for (const z of zonesRef.current.values()) {
|
|
22944
22774
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -22947,7 +22777,7 @@ function useDataDnd(args) {
|
|
|
22947
22777
|
},
|
|
22948
22778
|
[]
|
|
22949
22779
|
);
|
|
22950
|
-
|
|
22780
|
+
React84__default.useCallback(
|
|
22951
22781
|
(group) => {
|
|
22952
22782
|
for (const z of zonesRef.current.values()) {
|
|
22953
22783
|
if (z.group === group) return z;
|
|
@@ -22956,7 +22786,7 @@ function useDataDnd(args) {
|
|
|
22956
22786
|
},
|
|
22957
22787
|
[]
|
|
22958
22788
|
);
|
|
22959
|
-
const handleDragEnd =
|
|
22789
|
+
const handleDragEnd = React84__default.useCallback(
|
|
22960
22790
|
(event) => {
|
|
22961
22791
|
const { active, over } = event;
|
|
22962
22792
|
const activeIdStr = String(active.id);
|
|
@@ -23047,8 +22877,8 @@ function useDataDnd(args) {
|
|
|
23047
22877
|
},
|
|
23048
22878
|
[eventBus]
|
|
23049
22879
|
);
|
|
23050
|
-
const sortableData =
|
|
23051
|
-
const SortableItem =
|
|
22880
|
+
const sortableData = React84__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
22881
|
+
const SortableItem = React84__default.useCallback(
|
|
23052
22882
|
({ id, children }) => {
|
|
23053
22883
|
const {
|
|
23054
22884
|
attributes,
|
|
@@ -23088,7 +22918,7 @@ function useDataDnd(args) {
|
|
|
23088
22918
|
id: droppableId,
|
|
23089
22919
|
data: sortableData
|
|
23090
22920
|
});
|
|
23091
|
-
const ctx =
|
|
22921
|
+
const ctx = React84__default.useContext(RootCtx);
|
|
23092
22922
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
23093
22923
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
23094
22924
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -23103,7 +22933,7 @@ function useDataDnd(args) {
|
|
|
23103
22933
|
showForeignPlaceholder,
|
|
23104
22934
|
ctxAvailable: ctx != null
|
|
23105
22935
|
});
|
|
23106
|
-
|
|
22936
|
+
React84__default.useEffect(() => {
|
|
23107
22937
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
23108
22938
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
23109
22939
|
return /* @__PURE__ */ jsx(
|
|
@@ -23117,11 +22947,11 @@ function useDataDnd(args) {
|
|
|
23117
22947
|
}
|
|
23118
22948
|
);
|
|
23119
22949
|
};
|
|
23120
|
-
const rootContextValue =
|
|
22950
|
+
const rootContextValue = React84__default.useMemo(
|
|
23121
22951
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
23122
22952
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
23123
22953
|
);
|
|
23124
|
-
const handleDragStart =
|
|
22954
|
+
const handleDragStart = React84__default.useCallback((event) => {
|
|
23125
22955
|
const sourceZone = findZoneByItem(event.active.id);
|
|
23126
22956
|
const rect = event.active.rect.current.initial;
|
|
23127
22957
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -23140,7 +22970,7 @@ function useDataDnd(args) {
|
|
|
23140
22970
|
isRoot
|
|
23141
22971
|
});
|
|
23142
22972
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
23143
|
-
const handleDragOver =
|
|
22973
|
+
const handleDragOver = React84__default.useCallback((event) => {
|
|
23144
22974
|
const { active, over } = event;
|
|
23145
22975
|
const overData = over?.data?.current;
|
|
23146
22976
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -23210,7 +23040,7 @@ function useDataDnd(args) {
|
|
|
23210
23040
|
return next;
|
|
23211
23041
|
});
|
|
23212
23042
|
}, []);
|
|
23213
|
-
const handleDragCancel =
|
|
23043
|
+
const handleDragCancel = React84__default.useCallback((event) => {
|
|
23214
23044
|
setActiveDrag(null);
|
|
23215
23045
|
setOverZoneGroup(null);
|
|
23216
23046
|
dndLog.warn("dragCancel", {
|
|
@@ -23218,12 +23048,12 @@ function useDataDnd(args) {
|
|
|
23218
23048
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
23219
23049
|
});
|
|
23220
23050
|
}, []);
|
|
23221
|
-
const handleDragEndWithCleanup =
|
|
23051
|
+
const handleDragEndWithCleanup = React84__default.useCallback((event) => {
|
|
23222
23052
|
handleDragEnd(event);
|
|
23223
23053
|
setActiveDrag(null);
|
|
23224
23054
|
setOverZoneGroup(null);
|
|
23225
23055
|
}, [handleDragEnd]);
|
|
23226
|
-
const wrapContainer =
|
|
23056
|
+
const wrapContainer = React84__default.useCallback(
|
|
23227
23057
|
(children) => {
|
|
23228
23058
|
if (!enabled) return children;
|
|
23229
23059
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -23277,7 +23107,7 @@ var init_useDataDnd = __esm({
|
|
|
23277
23107
|
init_useAlmadarDndCollision();
|
|
23278
23108
|
init_Box();
|
|
23279
23109
|
dndLog = createLogger("almadar:ui:dnd");
|
|
23280
|
-
RootCtx =
|
|
23110
|
+
RootCtx = React84__default.createContext(null);
|
|
23281
23111
|
}
|
|
23282
23112
|
});
|
|
23283
23113
|
function renderIconInput(icon, props) {
|
|
@@ -23804,6 +23634,8 @@ function DataList({
|
|
|
23804
23634
|
hasMore,
|
|
23805
23635
|
children,
|
|
23806
23636
|
pageSize = 5,
|
|
23637
|
+
sortBy,
|
|
23638
|
+
sortDirection,
|
|
23807
23639
|
renderItem: schemaRenderItem,
|
|
23808
23640
|
dragGroup,
|
|
23809
23641
|
accepts,
|
|
@@ -23817,7 +23649,7 @@ function DataList({
|
|
|
23817
23649
|
}) {
|
|
23818
23650
|
const eventBus = useEventBus();
|
|
23819
23651
|
const { t } = useTranslate();
|
|
23820
|
-
const [visibleCount, setVisibleCount] =
|
|
23652
|
+
const [visibleCount, setVisibleCount] = React84__default.useState(pageSize || Infinity);
|
|
23821
23653
|
const fieldDefs = fields ?? columns ?? [];
|
|
23822
23654
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
23823
23655
|
const dnd = useDataDnd({
|
|
@@ -23832,11 +23664,15 @@ function DataList({
|
|
|
23832
23664
|
dndItemIdField,
|
|
23833
23665
|
dndRoot
|
|
23834
23666
|
});
|
|
23835
|
-
const
|
|
23667
|
+
const orderedData = dnd.orderedItems;
|
|
23668
|
+
const allData = React84__default.useMemo(
|
|
23669
|
+
() => sortRows(orderedData, sortBy, sortDirection),
|
|
23670
|
+
[orderedData, sortBy, sortDirection]
|
|
23671
|
+
);
|
|
23836
23672
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
23837
23673
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
23838
23674
|
const hasRenderProp = typeof children === "function";
|
|
23839
|
-
|
|
23675
|
+
React84__default.useEffect(() => {
|
|
23840
23676
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
23841
23677
|
const childrenTypeOf = typeof children;
|
|
23842
23678
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -23869,7 +23705,7 @@ function DataList({
|
|
|
23869
23705
|
};
|
|
23870
23706
|
eventBus.emit(`UI:${action.event}`, payload);
|
|
23871
23707
|
};
|
|
23872
|
-
const renderItemActions = (itemData) => {
|
|
23708
|
+
const renderItemActions = (itemData, onPrimary = false) => {
|
|
23873
23709
|
if (!itemActions || itemActions.length === 0) return null;
|
|
23874
23710
|
const inline = maxInlineActions != null ? itemActions.slice(0, maxInlineActions) : itemActions;
|
|
23875
23711
|
const overflow = maxInlineActions != null ? itemActions.slice(maxInlineActions) : [];
|
|
@@ -23882,7 +23718,12 @@ function DataList({
|
|
|
23882
23718
|
onClick: handleActionClick(action, itemData),
|
|
23883
23719
|
"data-testid": `action-${action.event}`,
|
|
23884
23720
|
"data-row-id": String(itemData.id),
|
|
23885
|
-
className: cn(
|
|
23721
|
+
className: cn(
|
|
23722
|
+
action.variant === "danger" && "text-error hover:bg-error/10",
|
|
23723
|
+
// Must sit on the Button itself: the variant's own text colour
|
|
23724
|
+
// beats an inherited one from the row wrapper.
|
|
23725
|
+
onPrimary && "!text-primary-foreground hover:bg-primary-foreground/15"
|
|
23726
|
+
),
|
|
23886
23727
|
children: [
|
|
23887
23728
|
action.icon && renderIconInput2(action.icon, { size: "xs", className: "mr-1" }),
|
|
23888
23729
|
action.label
|
|
@@ -23946,7 +23787,7 @@ function DataList({
|
|
|
23946
23787
|
return v === void 0 || v === null || v === "" ? raw : String(v);
|
|
23947
23788
|
};
|
|
23948
23789
|
return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("py-2", className), children: [
|
|
23949
|
-
groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
23790
|
+
groups2.map((group, gi) => /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
23950
23791
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
23951
23792
|
group.items.map((itemData, index) => {
|
|
23952
23793
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -24001,7 +23842,7 @@ function DataList({
|
|
|
24001
23842
|
children: formatDate(timestamp)
|
|
24002
23843
|
}
|
|
24003
23844
|
) : /* @__PURE__ */ jsx("span", {}),
|
|
24004
|
-
renderItemActions(itemData)
|
|
23845
|
+
renderItemActions(itemData, isSent)
|
|
24005
23846
|
] })
|
|
24006
23847
|
]
|
|
24007
23848
|
}
|
|
@@ -24141,7 +23982,7 @@ function DataList({
|
|
|
24141
23982
|
className
|
|
24142
23983
|
),
|
|
24143
23984
|
children: [
|
|
24144
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
23985
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
24145
23986
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
24146
23987
|
group.items.map(
|
|
24147
23988
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -24228,7 +24069,7 @@ var init_FormSection = __esm({
|
|
|
24228
24069
|
columns = 1,
|
|
24229
24070
|
className
|
|
24230
24071
|
}) => {
|
|
24231
|
-
const [collapsed, setCollapsed] =
|
|
24072
|
+
const [collapsed, setCollapsed] = React84__default.useState(defaultCollapsed);
|
|
24232
24073
|
const { t } = useTranslate();
|
|
24233
24074
|
const eventBus = useEventBus();
|
|
24234
24075
|
const gridClass = {
|
|
@@ -24236,7 +24077,7 @@ var init_FormSection = __esm({
|
|
|
24236
24077
|
2: "grid-cols-1 md:grid-cols-2",
|
|
24237
24078
|
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
24238
24079
|
}[columns];
|
|
24239
|
-
|
|
24080
|
+
React84__default.useCallback(() => {
|
|
24240
24081
|
if (collapsible) {
|
|
24241
24082
|
setCollapsed((prev) => !prev);
|
|
24242
24083
|
eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
|
|
@@ -25105,7 +24946,7 @@ var init_Flex = __esm({
|
|
|
25105
24946
|
flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
|
|
25106
24947
|
}
|
|
25107
24948
|
}
|
|
25108
|
-
return
|
|
24949
|
+
return React84__default.createElement(Component, {
|
|
25109
24950
|
className: cn(
|
|
25110
24951
|
inline ? "inline-flex" : "flex",
|
|
25111
24952
|
directionStyles[direction],
|
|
@@ -25224,7 +25065,7 @@ var init_Grid = __esm({
|
|
|
25224
25065
|
as: Component = "div"
|
|
25225
25066
|
}) => {
|
|
25226
25067
|
const mergedStyle = rows ? { gridTemplateRows: `repeat(${rows}, minmax(0, 1fr))`, ...style } : style;
|
|
25227
|
-
return
|
|
25068
|
+
return React84__default.createElement(
|
|
25228
25069
|
Component,
|
|
25229
25070
|
{
|
|
25230
25071
|
className: cn(
|
|
@@ -25432,9 +25273,9 @@ var init_Popover = __esm({
|
|
|
25432
25273
|
onMouseLeave: handleClose,
|
|
25433
25274
|
onPointerDown: tapTriggerProps.onPointerDown
|
|
25434
25275
|
};
|
|
25435
|
-
const childElement =
|
|
25276
|
+
const childElement = React84__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
25436
25277
|
const childPointerDown = childElement.props.onPointerDown;
|
|
25437
|
-
const triggerElement =
|
|
25278
|
+
const triggerElement = React84__default.cloneElement(
|
|
25438
25279
|
childElement,
|
|
25439
25280
|
{
|
|
25440
25281
|
ref: triggerRef,
|
|
@@ -26043,9 +25884,9 @@ var init_Tooltip = __esm({
|
|
|
26043
25884
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
26044
25885
|
};
|
|
26045
25886
|
}, []);
|
|
26046
|
-
const triggerElement =
|
|
25887
|
+
const triggerElement = React84__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
26047
25888
|
const childPointerDown = triggerElement.props.onPointerDown;
|
|
26048
|
-
const trigger =
|
|
25889
|
+
const trigger = React84__default.cloneElement(triggerElement, {
|
|
26049
25890
|
ref: triggerRef,
|
|
26050
25891
|
onMouseEnter: handleMouseEnter,
|
|
26051
25892
|
onMouseLeave: handleMouseLeave,
|
|
@@ -26135,7 +25976,7 @@ var init_WizardProgress = __esm({
|
|
|
26135
25976
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
26136
25977
|
const isActive = index === currentStep;
|
|
26137
25978
|
const isCompleted = index < currentStep;
|
|
26138
|
-
return /* @__PURE__ */ jsxs(
|
|
25979
|
+
return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
26139
25980
|
/* @__PURE__ */ jsx(
|
|
26140
25981
|
"button",
|
|
26141
25982
|
{
|
|
@@ -27696,13 +27537,13 @@ var init_MapView = __esm({
|
|
|
27696
27537
|
shadowSize: [41, 41]
|
|
27697
27538
|
});
|
|
27698
27539
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
27699
|
-
const { useEffect:
|
|
27540
|
+
const { useEffect: useEffect62, useRef: useRef60, useCallback: useCallback94, useState: useState91 } = React84__default;
|
|
27700
27541
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
27701
27542
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
27702
27543
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
27703
27544
|
const map = useMap();
|
|
27704
|
-
const prevRef =
|
|
27705
|
-
|
|
27545
|
+
const prevRef = useRef60({ centerLat, centerLng, zoom });
|
|
27546
|
+
useEffect62(() => {
|
|
27706
27547
|
const prev = prevRef.current;
|
|
27707
27548
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
27708
27549
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -27713,7 +27554,7 @@ var init_MapView = __esm({
|
|
|
27713
27554
|
}
|
|
27714
27555
|
function MapClickHandler({ onMapClick }) {
|
|
27715
27556
|
const map = useMap();
|
|
27716
|
-
|
|
27557
|
+
useEffect62(() => {
|
|
27717
27558
|
if (!onMapClick) return;
|
|
27718
27559
|
const handler = (e) => {
|
|
27719
27560
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -27742,7 +27583,7 @@ var init_MapView = __esm({
|
|
|
27742
27583
|
}) {
|
|
27743
27584
|
const eventBus = useEventBus2();
|
|
27744
27585
|
const [clickedPosition, setClickedPosition] = useState91(null);
|
|
27745
|
-
const handleMapClick =
|
|
27586
|
+
const handleMapClick = useCallback94((lat, lng) => {
|
|
27746
27587
|
if (showClickedPin) {
|
|
27747
27588
|
setClickedPosition({ lat, lng });
|
|
27748
27589
|
}
|
|
@@ -27751,7 +27592,7 @@ var init_MapView = __esm({
|
|
|
27751
27592
|
eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
|
|
27752
27593
|
}
|
|
27753
27594
|
}, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
|
|
27754
|
-
const handleMarkerClick =
|
|
27595
|
+
const handleMarkerClick = useCallback94((marker) => {
|
|
27755
27596
|
onMarkerClick?.(marker);
|
|
27756
27597
|
if (markerClickEvent) {
|
|
27757
27598
|
eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
|
|
@@ -28613,8 +28454,8 @@ function TableView({
|
|
|
28613
28454
|
}) {
|
|
28614
28455
|
const eventBus = useEventBus();
|
|
28615
28456
|
const { t } = useTranslate();
|
|
28616
|
-
const [visibleCount, setVisibleCount] =
|
|
28617
|
-
const [localSelected, setLocalSelected] =
|
|
28457
|
+
const [visibleCount, setVisibleCount] = React84__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
28458
|
+
const [localSelected, setLocalSelected] = React84__default.useState(/* @__PURE__ */ new Set());
|
|
28618
28459
|
const colDefs = (Array.isArray(columns) ? columns : void 0) ?? (Array.isArray(fields) ? fields : void 0) ?? [];
|
|
28619
28460
|
const actionDefs = Array.isArray(itemActions) ? itemActions : [];
|
|
28620
28461
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
@@ -28636,7 +28477,7 @@ function TableView({
|
|
|
28636
28477
|
const hasRenderProp = typeof children === "function";
|
|
28637
28478
|
const idField = dndItemIdField ?? "id";
|
|
28638
28479
|
const isCoarsePointer = useMediaQuery("(pointer: coarse)");
|
|
28639
|
-
|
|
28480
|
+
React84__default.useEffect(() => {
|
|
28640
28481
|
tableViewLog.debug("render", {
|
|
28641
28482
|
rowCount: data.length,
|
|
28642
28483
|
colCount: colDefs.length,
|
|
@@ -28685,7 +28526,7 @@ function TableView({
|
|
|
28685
28526
|
};
|
|
28686
28527
|
eventBus.emit(`UI:${action.event}`, payload);
|
|
28687
28528
|
};
|
|
28688
|
-
const colFloors =
|
|
28529
|
+
const colFloors = React84__default.useMemo(
|
|
28689
28530
|
() => colDefs.map((col) => {
|
|
28690
28531
|
const longest = data.reduce((widest, row) => {
|
|
28691
28532
|
const cell = formatCell(asFieldValue(getNestedValue(row, col.field ?? col.key)), col.format);
|
|
@@ -28844,12 +28685,12 @@ function TableView({
|
|
|
28844
28685
|
]
|
|
28845
28686
|
}
|
|
28846
28687
|
);
|
|
28847
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
28688
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React84__default.Fragment, { children: rowInner }, id);
|
|
28848
28689
|
};
|
|
28849
28690
|
const items = Array.from(data);
|
|
28850
28691
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
28851
28692
|
let runningIndex = 0;
|
|
28852
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
28693
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
28853
28694
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
28854
28695
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
28855
28696
|
] }, gi)) });
|
|
@@ -30212,7 +30053,7 @@ var init_StepFlow = __esm({
|
|
|
30212
30053
|
className
|
|
30213
30054
|
}) => {
|
|
30214
30055
|
if (orientation === "vertical") {
|
|
30215
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
30056
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React84__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
30216
30057
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
30217
30058
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
30218
30059
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -30223,7 +30064,7 @@ var init_StepFlow = __esm({
|
|
|
30223
30064
|
] })
|
|
30224
30065
|
] }) }, index)) });
|
|
30225
30066
|
}
|
|
30226
|
-
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(
|
|
30067
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
30227
30068
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
30228
30069
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
30229
30070
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -31213,7 +31054,7 @@ var init_LikertScale = __esm({
|
|
|
31213
31054
|
md: "text-base",
|
|
31214
31055
|
lg: "text-lg"
|
|
31215
31056
|
};
|
|
31216
|
-
LikertScale =
|
|
31057
|
+
LikertScale = React84__default.forwardRef(
|
|
31217
31058
|
({
|
|
31218
31059
|
question,
|
|
31219
31060
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -31225,7 +31066,7 @@ var init_LikertScale = __esm({
|
|
|
31225
31066
|
variant = "radios",
|
|
31226
31067
|
className
|
|
31227
31068
|
}, ref) => {
|
|
31228
|
-
const groupId =
|
|
31069
|
+
const groupId = React84__default.useId();
|
|
31229
31070
|
const eventBus = useEventBus();
|
|
31230
31071
|
const handleSelect = useCallback(
|
|
31231
31072
|
(next) => {
|
|
@@ -33514,7 +33355,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
33514
33355
|
"aria-label": t("aria.breadcrumb"),
|
|
33515
33356
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
33516
33357
|
const isLast = idx === items.length - 1;
|
|
33517
|
-
return /* @__PURE__ */ jsxs(
|
|
33358
|
+
return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
33518
33359
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
33519
33360
|
Icon,
|
|
33520
33361
|
{
|
|
@@ -34383,7 +34224,7 @@ var init_MiniStateMachine = __esm({
|
|
|
34383
34224
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
34384
34225
|
const tc = transitionCounts[s.name] ?? 0;
|
|
34385
34226
|
const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
34386
|
-
return /* @__PURE__ */ jsxs(
|
|
34227
|
+
return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
34387
34228
|
/* @__PURE__ */ jsx(
|
|
34388
34229
|
AvlState,
|
|
34389
34230
|
{
|
|
@@ -34587,7 +34428,7 @@ var init_PageHeader = __esm({
|
|
|
34587
34428
|
info: "bg-info/10 text-info"
|
|
34588
34429
|
};
|
|
34589
34430
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
34590
|
-
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(
|
|
34431
|
+
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Box, { as: "nav", className: "mb-4", children: /* @__PURE__ */ jsx(Box, { as: "ol", className: "flex items-center gap-2 text-sm", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
34591
34432
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
34592
34433
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
34593
34434
|
"a",
|
|
@@ -34945,7 +34786,7 @@ var init_Section = __esm({
|
|
|
34945
34786
|
as: Component = "section"
|
|
34946
34787
|
}) => {
|
|
34947
34788
|
const hasHeader = title || description || action;
|
|
34948
|
-
return
|
|
34789
|
+
return React84__default.createElement(
|
|
34949
34790
|
Component,
|
|
34950
34791
|
{
|
|
34951
34792
|
className: cn(
|
|
@@ -35319,7 +35160,7 @@ var init_WizardContainer = __esm({
|
|
|
35319
35160
|
const isCompleted = index < currentStep;
|
|
35320
35161
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
35321
35162
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
35322
|
-
return /* @__PURE__ */ jsxs(
|
|
35163
|
+
return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
35323
35164
|
/* @__PURE__ */ jsx(
|
|
35324
35165
|
Button,
|
|
35325
35166
|
{
|
|
@@ -37106,7 +36947,7 @@ var init_ImportPreviewTree = __esm({
|
|
|
37106
36947
|
const renderUnit = (unit, childrenByParent, depth) => {
|
|
37107
36948
|
const summary = fieldSummary(unit);
|
|
37108
36949
|
const children = childrenByParent.get(unit.ref) ?? [];
|
|
37109
|
-
return /* @__PURE__ */ jsxs(
|
|
36950
|
+
return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
37110
36951
|
/* @__PURE__ */ jsxs(
|
|
37111
36952
|
Box,
|
|
37112
36953
|
{
|
|
@@ -37203,7 +37044,7 @@ var init_ImportProgress = __esm({
|
|
|
37203
37044
|
PIPELINE.map((key, index) => {
|
|
37204
37045
|
const isComplete = index < currentIndex;
|
|
37205
37046
|
const isActive = index === currentIndex;
|
|
37206
|
-
return /* @__PURE__ */ jsxs(
|
|
37047
|
+
return /* @__PURE__ */ jsxs(React84__default.Fragment, { children: [
|
|
37207
37048
|
index > 0 ? /* @__PURE__ */ jsx(Box, { className: "h-px w-4 bg-border" }) : null,
|
|
37208
37049
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1", "data-testid": `import-progress-step-${key}`, children: [
|
|
37209
37050
|
/* @__PURE__ */ jsx(
|
|
@@ -38305,8 +38146,18 @@ var init_DetailPanel = __esm({
|
|
|
38305
38146
|
DetailPanel.displayName = "DetailPanel";
|
|
38306
38147
|
}
|
|
38307
38148
|
});
|
|
38149
|
+
|
|
38150
|
+
// components/game/atoms/DrawGroup.tsx
|
|
38151
|
+
function DrawGroup(_props) {
|
|
38152
|
+
return null;
|
|
38153
|
+
}
|
|
38154
|
+
var init_DrawGroup = __esm({
|
|
38155
|
+
"components/game/atoms/DrawGroup.tsx"() {
|
|
38156
|
+
"use client";
|
|
38157
|
+
}
|
|
38158
|
+
});
|
|
38308
38159
|
function extractTitle(children) {
|
|
38309
|
-
if (!
|
|
38160
|
+
if (!React84__default.isValidElement(children)) return void 0;
|
|
38310
38161
|
const props = children.props;
|
|
38311
38162
|
if (typeof props.title === "string") {
|
|
38312
38163
|
return props.title;
|
|
@@ -38656,12 +38507,12 @@ var init_Form = __esm({
|
|
|
38656
38507
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
38657
38508
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
38658
38509
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
38659
|
-
const normalizedInitialData =
|
|
38510
|
+
const normalizedInitialData = React84__default.useMemo(() => {
|
|
38660
38511
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
38661
38512
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
38662
38513
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
38663
38514
|
}, [entity, initialData]);
|
|
38664
|
-
const entityDerivedFields =
|
|
38515
|
+
const entityDerivedFields = React84__default.useMemo(() => {
|
|
38665
38516
|
if (fields && fields.length > 0) return void 0;
|
|
38666
38517
|
if (!resolvedEntity) return void 0;
|
|
38667
38518
|
return resolvedEntity.fields.map(
|
|
@@ -38682,16 +38533,16 @@ var init_Form = __esm({
|
|
|
38682
38533
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
38683
38534
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
38684
38535
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
38685
|
-
const [formData, setFormData] =
|
|
38536
|
+
const [formData, setFormData] = React84__default.useState(
|
|
38686
38537
|
normalizedInitialData
|
|
38687
38538
|
);
|
|
38688
|
-
const [collapsedSections, setCollapsedSections] =
|
|
38539
|
+
const [collapsedSections, setCollapsedSections] = React84__default.useState(
|
|
38689
38540
|
/* @__PURE__ */ new Set()
|
|
38690
38541
|
);
|
|
38691
|
-
const [submitError, setSubmitError] =
|
|
38692
|
-
const formRef =
|
|
38542
|
+
const [submitError, setSubmitError] = React84__default.useState(null);
|
|
38543
|
+
const formRef = React84__default.useRef(null);
|
|
38693
38544
|
const formMode = props.mode;
|
|
38694
|
-
const mountedRef =
|
|
38545
|
+
const mountedRef = React84__default.useRef(false);
|
|
38695
38546
|
if (!mountedRef.current) {
|
|
38696
38547
|
mountedRef.current = true;
|
|
38697
38548
|
debug("forms", "mount", {
|
|
@@ -38704,7 +38555,7 @@ var init_Form = __esm({
|
|
|
38704
38555
|
});
|
|
38705
38556
|
}
|
|
38706
38557
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
38707
|
-
const evalContext =
|
|
38558
|
+
const evalContext = React84__default.useMemo(
|
|
38708
38559
|
() => ({
|
|
38709
38560
|
formValues: formData,
|
|
38710
38561
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -38713,7 +38564,7 @@ var init_Form = __esm({
|
|
|
38713
38564
|
}),
|
|
38714
38565
|
[formData, externalContext]
|
|
38715
38566
|
);
|
|
38716
|
-
|
|
38567
|
+
React84__default.useEffect(() => {
|
|
38717
38568
|
debug("forms", "initialData-sync", {
|
|
38718
38569
|
mode: formMode,
|
|
38719
38570
|
normalizedInitialData,
|
|
@@ -38724,7 +38575,7 @@ var init_Form = __esm({
|
|
|
38724
38575
|
setFormData(normalizedInitialData);
|
|
38725
38576
|
}
|
|
38726
38577
|
}, [normalizedInitialData]);
|
|
38727
|
-
const processCalculations =
|
|
38578
|
+
const processCalculations = React84__default.useCallback(
|
|
38728
38579
|
(changedFieldId, newFormData) => {
|
|
38729
38580
|
if (!hiddenCalculations.length) return;
|
|
38730
38581
|
const context = {
|
|
@@ -38749,7 +38600,7 @@ var init_Form = __esm({
|
|
|
38749
38600
|
},
|
|
38750
38601
|
[hiddenCalculations, externalContext, eventBus]
|
|
38751
38602
|
);
|
|
38752
|
-
const checkViolations =
|
|
38603
|
+
const checkViolations = React84__default.useCallback(
|
|
38753
38604
|
(changedFieldId, newFormData) => {
|
|
38754
38605
|
if (!violationTriggers.length) return;
|
|
38755
38606
|
const context = {
|
|
@@ -38787,7 +38638,7 @@ var init_Form = __esm({
|
|
|
38787
38638
|
processCalculations(name, newFormData);
|
|
38788
38639
|
checkViolations(name, newFormData);
|
|
38789
38640
|
};
|
|
38790
|
-
const isFieldVisible =
|
|
38641
|
+
const isFieldVisible = React84__default.useCallback(
|
|
38791
38642
|
(fieldName) => {
|
|
38792
38643
|
const condition = conditionalFields[fieldName];
|
|
38793
38644
|
if (!condition) return true;
|
|
@@ -38795,7 +38646,7 @@ var init_Form = __esm({
|
|
|
38795
38646
|
},
|
|
38796
38647
|
[conditionalFields, evalContext]
|
|
38797
38648
|
);
|
|
38798
|
-
const isSectionVisible =
|
|
38649
|
+
const isSectionVisible = React84__default.useCallback(
|
|
38799
38650
|
(section) => {
|
|
38800
38651
|
if (!section.condition) return true;
|
|
38801
38652
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -38871,7 +38722,7 @@ var init_Form = __esm({
|
|
|
38871
38722
|
eventBus.emit(`UI:${onCancel}`);
|
|
38872
38723
|
}
|
|
38873
38724
|
};
|
|
38874
|
-
const renderField =
|
|
38725
|
+
const renderField = React84__default.useCallback(
|
|
38875
38726
|
(field) => {
|
|
38876
38727
|
const fieldName = field.name || field.field;
|
|
38877
38728
|
if (!fieldName) return null;
|
|
@@ -38892,7 +38743,7 @@ var init_Form = __esm({
|
|
|
38892
38743
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
38893
38744
|
);
|
|
38894
38745
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
38895
|
-
const normalizedFields =
|
|
38746
|
+
const normalizedFields = React84__default.useMemo(() => {
|
|
38896
38747
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
38897
38748
|
return effectiveFields.map((field) => {
|
|
38898
38749
|
if (typeof field === "string") {
|
|
@@ -38916,7 +38767,7 @@ var init_Form = __esm({
|
|
|
38916
38767
|
return field;
|
|
38917
38768
|
});
|
|
38918
38769
|
}, [effectiveFields, resolvedEntity]);
|
|
38919
|
-
const schemaFields =
|
|
38770
|
+
const schemaFields = React84__default.useMemo(() => {
|
|
38920
38771
|
if (normalizedFields.length === 0) return null;
|
|
38921
38772
|
if (isDebugEnabled()) {
|
|
38922
38773
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -38926,7 +38777,7 @@ var init_Form = __esm({
|
|
|
38926
38777
|
}
|
|
38927
38778
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
38928
38779
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
38929
|
-
const sectionElements =
|
|
38780
|
+
const sectionElements = React84__default.useMemo(() => {
|
|
38930
38781
|
if (!sections || sections.length === 0) return null;
|
|
38931
38782
|
return sections.map((section) => {
|
|
38932
38783
|
if (!isSectionVisible(section)) {
|
|
@@ -39652,7 +39503,7 @@ var init_List = __esm({
|
|
|
39652
39503
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
39653
39504
|
return [];
|
|
39654
39505
|
}, [entity]);
|
|
39655
|
-
const getItemActions =
|
|
39506
|
+
const getItemActions = React84__default.useCallback(
|
|
39656
39507
|
(item) => {
|
|
39657
39508
|
if (!itemActions) return [];
|
|
39658
39509
|
if (typeof itemActions === "function") {
|
|
@@ -40133,7 +39984,7 @@ var init_MediaGallery = __esm({
|
|
|
40133
39984
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
40134
39985
|
);
|
|
40135
39986
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
40136
|
-
const items =
|
|
39987
|
+
const items = React84__default.useMemo(() => {
|
|
40137
39988
|
if (propItems && propItems.length > 0) return propItems;
|
|
40138
39989
|
if (entityData.length === 0) return [];
|
|
40139
39990
|
return entityData.map((record, idx) => {
|
|
@@ -40298,7 +40149,7 @@ var init_MediaGallery = __esm({
|
|
|
40298
40149
|
}
|
|
40299
40150
|
});
|
|
40300
40151
|
function extractTitle2(children) {
|
|
40301
|
-
if (!
|
|
40152
|
+
if (!React84__default.isValidElement(children)) return void 0;
|
|
40302
40153
|
const props = children.props;
|
|
40303
40154
|
if (typeof props.title === "string") {
|
|
40304
40155
|
return props.title;
|
|
@@ -40553,7 +40404,7 @@ var init_debugRegistry = __esm({
|
|
|
40553
40404
|
}
|
|
40554
40405
|
});
|
|
40555
40406
|
function useDebugData() {
|
|
40556
|
-
const [data, setData] =
|
|
40407
|
+
const [data, setData] = React84.useState(() => ({
|
|
40557
40408
|
traits: [],
|
|
40558
40409
|
ticks: [],
|
|
40559
40410
|
guards: [],
|
|
@@ -40567,7 +40418,7 @@ function useDebugData() {
|
|
|
40567
40418
|
},
|
|
40568
40419
|
lastUpdate: Date.now()
|
|
40569
40420
|
}));
|
|
40570
|
-
|
|
40421
|
+
React84.useEffect(() => {
|
|
40571
40422
|
const updateData = () => {
|
|
40572
40423
|
setData({
|
|
40573
40424
|
traits: getAllTraits(),
|
|
@@ -40676,12 +40527,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
40676
40527
|
return positions;
|
|
40677
40528
|
}
|
|
40678
40529
|
function WalkMinimap() {
|
|
40679
|
-
const [walkStep, setWalkStep] =
|
|
40680
|
-
const [traits2, setTraits] =
|
|
40681
|
-
const [coveredEdges, setCoveredEdges] =
|
|
40682
|
-
const [completedTraits, setCompletedTraits] =
|
|
40683
|
-
const prevTraitRef =
|
|
40684
|
-
|
|
40530
|
+
const [walkStep, setWalkStep] = React84.useState(null);
|
|
40531
|
+
const [traits2, setTraits] = React84.useState([]);
|
|
40532
|
+
const [coveredEdges, setCoveredEdges] = React84.useState([]);
|
|
40533
|
+
const [completedTraits, setCompletedTraits] = React84.useState(/* @__PURE__ */ new Set());
|
|
40534
|
+
const prevTraitRef = React84.useRef(null);
|
|
40535
|
+
React84.useEffect(() => {
|
|
40685
40536
|
const interval = setInterval(() => {
|
|
40686
40537
|
const w = window;
|
|
40687
40538
|
const step = w.__orbitalWalkStep;
|
|
@@ -41117,15 +40968,15 @@ var init_EntitiesTab = __esm({
|
|
|
41117
40968
|
});
|
|
41118
40969
|
function EventFlowTab({ events: events2 }) {
|
|
41119
40970
|
const { t } = useTranslate();
|
|
41120
|
-
const [filter, setFilter] =
|
|
41121
|
-
const containerRef =
|
|
41122
|
-
const [autoScroll, setAutoScroll] =
|
|
41123
|
-
|
|
40971
|
+
const [filter, setFilter] = React84.useState("all");
|
|
40972
|
+
const containerRef = React84.useRef(null);
|
|
40973
|
+
const [autoScroll, setAutoScroll] = React84.useState(true);
|
|
40974
|
+
React84.useEffect(() => {
|
|
41124
40975
|
if (autoScroll && containerRef.current) {
|
|
41125
40976
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
41126
40977
|
}
|
|
41127
40978
|
}, [events2.length, autoScroll]);
|
|
41128
|
-
const filteredEvents =
|
|
40979
|
+
const filteredEvents = React84.useMemo(() => {
|
|
41129
40980
|
if (filter === "all") return events2;
|
|
41130
40981
|
return events2.filter((e) => e.type === filter);
|
|
41131
40982
|
}, [events2, filter]);
|
|
@@ -41241,7 +41092,7 @@ var init_EventFlowTab = __esm({
|
|
|
41241
41092
|
});
|
|
41242
41093
|
function GuardsPanel({ guards }) {
|
|
41243
41094
|
const { t } = useTranslate();
|
|
41244
|
-
const [filter, setFilter] =
|
|
41095
|
+
const [filter, setFilter] = React84.useState("all");
|
|
41245
41096
|
if (guards.length === 0) {
|
|
41246
41097
|
return /* @__PURE__ */ jsx(
|
|
41247
41098
|
EmptyState,
|
|
@@ -41254,7 +41105,7 @@ function GuardsPanel({ guards }) {
|
|
|
41254
41105
|
}
|
|
41255
41106
|
const passedCount = guards.filter((g) => g.result).length;
|
|
41256
41107
|
const failedCount = guards.length - passedCount;
|
|
41257
|
-
const filteredGuards =
|
|
41108
|
+
const filteredGuards = React84.useMemo(() => {
|
|
41258
41109
|
if (filter === "all") return guards;
|
|
41259
41110
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
41260
41111
|
return guards.filter((g) => !g.result);
|
|
@@ -41417,10 +41268,10 @@ function EffectBadge({ effect }) {
|
|
|
41417
41268
|
}
|
|
41418
41269
|
function TransitionTimeline({ transitions }) {
|
|
41419
41270
|
const { t } = useTranslate();
|
|
41420
|
-
const containerRef =
|
|
41421
|
-
const [autoScroll, setAutoScroll] =
|
|
41422
|
-
const [expandedId, setExpandedId] =
|
|
41423
|
-
|
|
41271
|
+
const containerRef = React84.useRef(null);
|
|
41272
|
+
const [autoScroll, setAutoScroll] = React84.useState(true);
|
|
41273
|
+
const [expandedId, setExpandedId] = React84.useState(null);
|
|
41274
|
+
React84.useEffect(() => {
|
|
41424
41275
|
if (autoScroll && containerRef.current) {
|
|
41425
41276
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
41426
41277
|
}
|
|
@@ -41700,9 +41551,9 @@ function getAllEvents(traits2) {
|
|
|
41700
41551
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
41701
41552
|
const eventBus = useEventBus();
|
|
41702
41553
|
const { t } = useTranslate();
|
|
41703
|
-
const [log13, setLog] =
|
|
41704
|
-
const prevStatesRef =
|
|
41705
|
-
|
|
41554
|
+
const [log13, setLog] = React84.useState([]);
|
|
41555
|
+
const prevStatesRef = React84.useRef(/* @__PURE__ */ new Map());
|
|
41556
|
+
React84.useEffect(() => {
|
|
41706
41557
|
for (const trait of traits2) {
|
|
41707
41558
|
const prev = prevStatesRef.current.get(trait.id);
|
|
41708
41559
|
if (prev && prev !== trait.currentState) {
|
|
@@ -41871,10 +41722,10 @@ function VerifyModePanel({
|
|
|
41871
41722
|
localCount
|
|
41872
41723
|
}) {
|
|
41873
41724
|
const { t } = useTranslate();
|
|
41874
|
-
const [expanded, setExpanded] =
|
|
41875
|
-
const scrollRef =
|
|
41876
|
-
const prevCountRef =
|
|
41877
|
-
|
|
41725
|
+
const [expanded, setExpanded] = React84.useState(true);
|
|
41726
|
+
const scrollRef = React84.useRef(null);
|
|
41727
|
+
const prevCountRef = React84.useRef(0);
|
|
41728
|
+
React84.useEffect(() => {
|
|
41878
41729
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
41879
41730
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
41880
41731
|
}
|
|
@@ -41931,10 +41782,10 @@ function RuntimeDebugger({
|
|
|
41931
41782
|
schema
|
|
41932
41783
|
}) {
|
|
41933
41784
|
const { t } = useTranslate();
|
|
41934
|
-
const [isCollapsed, setIsCollapsed] =
|
|
41935
|
-
const [isVisible, setIsVisible] =
|
|
41785
|
+
const [isCollapsed, setIsCollapsed] = React84.useState(mode === "verify" ? true : defaultCollapsed);
|
|
41786
|
+
const [isVisible, setIsVisible] = React84.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
41936
41787
|
const debugData = useDebugData();
|
|
41937
|
-
|
|
41788
|
+
React84.useEffect(() => {
|
|
41938
41789
|
if (mode === "inline") return;
|
|
41939
41790
|
return onDebugToggle((enabled) => {
|
|
41940
41791
|
setIsVisible(enabled);
|
|
@@ -41943,7 +41794,7 @@ function RuntimeDebugger({
|
|
|
41943
41794
|
}
|
|
41944
41795
|
});
|
|
41945
41796
|
}, [mode]);
|
|
41946
|
-
|
|
41797
|
+
React84.useEffect(() => {
|
|
41947
41798
|
if (mode === "inline") return;
|
|
41948
41799
|
const handleKeyDown = (e) => {
|
|
41949
41800
|
if (e.key === "`" && isVisible) {
|
|
@@ -42463,7 +42314,7 @@ var init_StatCard = __esm({
|
|
|
42463
42314
|
const labelToUse = propLabel ?? propTitle;
|
|
42464
42315
|
const eventBus = useEventBus();
|
|
42465
42316
|
const { t } = useTranslate();
|
|
42466
|
-
const handleActionClick =
|
|
42317
|
+
const handleActionClick = React84__default.useCallback(() => {
|
|
42467
42318
|
if (action?.event) {
|
|
42468
42319
|
eventBus.emit(`UI:${action.event}`, {});
|
|
42469
42320
|
}
|
|
@@ -42474,7 +42325,7 @@ var init_StatCard = __esm({
|
|
|
42474
42325
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
42475
42326
|
const isLoading = externalLoading ?? false;
|
|
42476
42327
|
const error = externalError;
|
|
42477
|
-
const computeMetricValue =
|
|
42328
|
+
const computeMetricValue = React84__default.useCallback(
|
|
42478
42329
|
(metric, items) => {
|
|
42479
42330
|
if (metric.value !== void 0) {
|
|
42480
42331
|
return metric.value;
|
|
@@ -42513,7 +42364,7 @@ var init_StatCard = __esm({
|
|
|
42513
42364
|
},
|
|
42514
42365
|
[]
|
|
42515
42366
|
);
|
|
42516
|
-
const schemaStats =
|
|
42367
|
+
const schemaStats = React84__default.useMemo(() => {
|
|
42517
42368
|
if (!metrics || metrics.length === 0) return null;
|
|
42518
42369
|
return metrics.map((metric) => ({
|
|
42519
42370
|
label: metric.label,
|
|
@@ -42521,7 +42372,7 @@ var init_StatCard = __esm({
|
|
|
42521
42372
|
format: metric.format
|
|
42522
42373
|
}));
|
|
42523
42374
|
}, [metrics, data, computeMetricValue]);
|
|
42524
|
-
const calculatedTrend =
|
|
42375
|
+
const calculatedTrend = React84__default.useMemo(() => {
|
|
42525
42376
|
if (manualTrend !== void 0) return manualTrend;
|
|
42526
42377
|
if (previousValue === void 0 || currentValue === void 0)
|
|
42527
42378
|
return void 0;
|
|
@@ -43161,8 +43012,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
43161
43012
|
] });
|
|
43162
43013
|
};
|
|
43163
43014
|
InlineActivityStream = ({ activities, autoScroll = true, className }) => {
|
|
43164
|
-
const endRef =
|
|
43165
|
-
|
|
43015
|
+
const endRef = React84__default.useRef(null);
|
|
43016
|
+
React84__default.useEffect(() => {
|
|
43166
43017
|
if (!autoScroll) return;
|
|
43167
43018
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
43168
43019
|
}, [activities.length, autoScroll]);
|
|
@@ -43256,7 +43107,7 @@ var init_SubagentTracePanel = __esm({
|
|
|
43256
43107
|
};
|
|
43257
43108
|
SubagentRichCard = ({ subagent }) => {
|
|
43258
43109
|
const { t } = useTranslate();
|
|
43259
|
-
const activities =
|
|
43110
|
+
const activities = React84__default.useMemo(
|
|
43260
43111
|
() => subagentMessagesToActivities(subagent.messages),
|
|
43261
43112
|
[subagent.messages]
|
|
43262
43113
|
);
|
|
@@ -43333,8 +43184,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
43333
43184
|
] });
|
|
43334
43185
|
};
|
|
43335
43186
|
CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
|
|
43336
|
-
const endRef =
|
|
43337
|
-
|
|
43187
|
+
const endRef = React84__default.useRef(null);
|
|
43188
|
+
React84__default.useEffect(() => {
|
|
43338
43189
|
if (!autoScroll) return;
|
|
43339
43190
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
43340
43191
|
}, [messages.length, autoScroll]);
|
|
@@ -43769,7 +43620,7 @@ var init_Timeline = __esm({
|
|
|
43769
43620
|
}) => {
|
|
43770
43621
|
const { t } = useTranslate();
|
|
43771
43622
|
const entityData = entity ?? [];
|
|
43772
|
-
const items =
|
|
43623
|
+
const items = React84__default.useMemo(() => {
|
|
43773
43624
|
if (propItems) return propItems;
|
|
43774
43625
|
if (entityData.length === 0) return [];
|
|
43775
43626
|
return entityData.map((record, idx) => {
|
|
@@ -43871,7 +43722,7 @@ var init_Timeline = __esm({
|
|
|
43871
43722
|
}
|
|
43872
43723
|
});
|
|
43873
43724
|
function extractToastProps(children) {
|
|
43874
|
-
if (!
|
|
43725
|
+
if (!React84__default.isValidElement(children)) {
|
|
43875
43726
|
if (typeof children === "string") {
|
|
43876
43727
|
return { message: children };
|
|
43877
43728
|
}
|
|
@@ -43913,7 +43764,7 @@ var init_ToastSlot = __esm({
|
|
|
43913
43764
|
eventBus.emit(`${prefix}CLOSE`);
|
|
43914
43765
|
};
|
|
43915
43766
|
if (!isVisible) return null;
|
|
43916
|
-
const isCustomContent =
|
|
43767
|
+
const isCustomContent = React84__default.isValidElement(children) && !message;
|
|
43917
43768
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
43918
43769
|
Toast,
|
|
43919
43770
|
{
|
|
@@ -44008,6 +43859,7 @@ var init_component_registry_generated = __esm({
|
|
|
44008
43859
|
init_DocSidebar();
|
|
44009
43860
|
init_DocTOC();
|
|
44010
43861
|
init_DocumentViewer();
|
|
43862
|
+
init_DrawGroup();
|
|
44011
43863
|
init_DrawShape();
|
|
44012
43864
|
init_DrawShapeLayer();
|
|
44013
43865
|
init_DrawSprite();
|
|
@@ -44151,10 +44003,6 @@ var init_component_registry_generated = __esm({
|
|
|
44151
44003
|
init_SubagentTracePanel();
|
|
44152
44004
|
init_SvgBranch();
|
|
44153
44005
|
init_SvgConnection();
|
|
44154
|
-
init_SvgDrawGroup();
|
|
44155
|
-
init_SvgDrawShape();
|
|
44156
|
-
init_SvgDrawShapeLayer();
|
|
44157
|
-
init_SvgDrawText();
|
|
44158
44006
|
init_SvgFlow();
|
|
44159
44007
|
init_SvgGrid();
|
|
44160
44008
|
init_SvgLobe();
|
|
@@ -44165,7 +44013,6 @@ var init_component_registry_generated = __esm({
|
|
|
44165
44013
|
init_SvgRing();
|
|
44166
44014
|
init_SvgShield();
|
|
44167
44015
|
init_SvgStack();
|
|
44168
|
-
init_SvgStage();
|
|
44169
44016
|
init_SwipeableRow();
|
|
44170
44017
|
init_Switch();
|
|
44171
44018
|
init_TabbedContainer();
|
|
@@ -44279,6 +44126,7 @@ var init_component_registry_generated = __esm({
|
|
|
44279
44126
|
"DocSidebar": DocSidebar,
|
|
44280
44127
|
"DocTOC": DocTOC,
|
|
44281
44128
|
"DocumentViewer": DocumentViewer,
|
|
44129
|
+
"DrawGroup": DrawGroup,
|
|
44282
44130
|
"DrawShape": DrawShape,
|
|
44283
44131
|
"DrawShapeLayer": DrawShapeLayer,
|
|
44284
44132
|
"DrawSprite": DrawSprite,
|
|
@@ -44427,10 +44275,6 @@ var init_component_registry_generated = __esm({
|
|
|
44427
44275
|
"SubagentTracePanel": SubagentTracePanel,
|
|
44428
44276
|
"SvgBranch": SvgBranch,
|
|
44429
44277
|
"SvgConnection": SvgConnection,
|
|
44430
|
-
"SvgDrawGroup": SvgDrawGroup,
|
|
44431
|
-
"SvgDrawShape": SvgDrawShape,
|
|
44432
|
-
"SvgDrawShapeLayer": SvgDrawShapeLayer,
|
|
44433
|
-
"SvgDrawText": SvgDrawText,
|
|
44434
44278
|
"SvgFlow": SvgFlow,
|
|
44435
44279
|
"SvgGrid": SvgGrid,
|
|
44436
44280
|
"SvgLobe": SvgLobe,
|
|
@@ -44441,7 +44285,6 @@ var init_component_registry_generated = __esm({
|
|
|
44441
44285
|
"SvgRing": SvgRing,
|
|
44442
44286
|
"SvgShield": SvgShield,
|
|
44443
44287
|
"SvgStack": SvgStack,
|
|
44444
|
-
"SvgStage": SvgStage,
|
|
44445
44288
|
"SwipeableRow": SwipeableRow,
|
|
44446
44289
|
"Switch": Switch,
|
|
44447
44290
|
"TabbedContainer": TabbedContainer,
|
|
@@ -44492,7 +44335,7 @@ function SuspenseConfigProvider({
|
|
|
44492
44335
|
config,
|
|
44493
44336
|
children
|
|
44494
44337
|
}) {
|
|
44495
|
-
return
|
|
44338
|
+
return React84__default.createElement(
|
|
44496
44339
|
SuspenseConfigContext.Provider,
|
|
44497
44340
|
{ value: config },
|
|
44498
44341
|
children
|
|
@@ -44534,7 +44377,7 @@ function enrichFormFields(fields, entityDef) {
|
|
|
44534
44377
|
}
|
|
44535
44378
|
return { name: field, label: humanizeFieldName(field) };
|
|
44536
44379
|
}
|
|
44537
|
-
if (field && typeof field === "object" && !Array.isArray(field) && !
|
|
44380
|
+
if (field && typeof field === "object" && !Array.isArray(field) && !React84__default.isValidElement(field) && !(field instanceof Date)) {
|
|
44538
44381
|
const obj = field;
|
|
44539
44382
|
const fieldName = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
|
|
44540
44383
|
if (!fieldName) return field;
|
|
@@ -44994,7 +44837,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
44994
44837
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
44995
44838
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
44996
44839
|
}
|
|
44997
|
-
return /* @__PURE__ */ jsx(
|
|
44840
|
+
return /* @__PURE__ */ jsx(React84__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
44998
44841
|
}
|
|
44999
44842
|
if (!child || typeof child !== "object") return null;
|
|
45000
44843
|
const childId = `${parentId}-${index}`;
|
|
@@ -45051,14 +44894,14 @@ function isPatternConfig(value) {
|
|
|
45051
44894
|
if (value === null || value === void 0) return false;
|
|
45052
44895
|
if (typeof value !== "object") return false;
|
|
45053
44896
|
if (Array.isArray(value)) return false;
|
|
45054
|
-
if (
|
|
44897
|
+
if (React84__default.isValidElement(value)) return false;
|
|
45055
44898
|
if (value instanceof Date) return false;
|
|
45056
44899
|
if (typeof value === "function") return false;
|
|
45057
44900
|
const record = value;
|
|
45058
44901
|
return "type" in record && typeof record.type === "string" && getComponentForPattern$1(record.type) !== null;
|
|
45059
44902
|
}
|
|
45060
44903
|
function isPlainConfigObject(value) {
|
|
45061
|
-
if (
|
|
44904
|
+
if (React84__default.isValidElement(value)) return false;
|
|
45062
44905
|
if (value instanceof Date) return false;
|
|
45063
44906
|
const proto = Object.getPrototypeOf(value);
|
|
45064
44907
|
return proto === Object.prototype || proto === null;
|
|
@@ -45186,7 +45029,7 @@ function SlotContentRenderer({
|
|
|
45186
45029
|
for (const slotKey of CONTENT_NODE_SLOTS) {
|
|
45187
45030
|
const slotVal = restProps[slotKey];
|
|
45188
45031
|
if (slotVal === void 0 || slotVal === null) continue;
|
|
45189
|
-
if (
|
|
45032
|
+
if (React84__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
|
|
45190
45033
|
const typelessChildren = !Array.isArray(slotVal) && typeof slotVal === "object" && !("type" in slotVal) && Array.isArray(slotVal.children) ? slotVal.children : void 0;
|
|
45191
45034
|
if (typelessChildren !== void 0 || Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
|
|
45192
45035
|
nodeSlotOverrides[slotKey] = renderPatternChildren(
|
|
@@ -45240,7 +45083,7 @@ function SlotContentRenderer({
|
|
|
45240
45083
|
const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
|
|
45241
45084
|
if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
|
|
45242
45085
|
const sample = resolvedItems[0];
|
|
45243
|
-
if (sample && typeof sample === "object" && !Array.isArray(sample) && !
|
|
45086
|
+
if (sample && typeof sample === "object" && !Array.isArray(sample) && !React84__default.isValidElement(sample) && !(sample instanceof Date)) {
|
|
45244
45087
|
const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
|
|
45245
45088
|
finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
|
|
45246
45089
|
}
|