@almadar/ui 5.141.0 → 5.143.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avl/index.cjs +1326 -1240
- package/dist/avl/index.js +355 -269
- package/dist/{avl-schema-parser-B8Onmfsu.d.cts → avl-schema-parser-0hkiHOq3.d.ts} +233 -2
- package/dist/{avl-schema-parser-B8Onmfsu.d.ts → avl-schema-parser-BZ8pICOS.d.cts} +233 -2
- package/dist/{cn-rwc3svaX.d.cts → cn-CvImTgKH.d.cts} +1 -1
- package/dist/{cn-BDwC4QpH.d.ts → cn-DryTiahe.d.ts} +1 -1
- package/dist/components/index.cjs +1310 -1224
- package/dist/components/index.d.cts +13 -6
- package/dist/components/index.d.ts +13 -6
- package/dist/components/index.js +346 -260
- package/dist/lib/drawable/three/index.cjs +560 -194
- package/dist/lib/drawable/three/index.d.cts +14 -173
- package/dist/lib/drawable/three/index.d.ts +14 -173
- package/dist/lib/drawable/three/index.js +536 -170
- package/dist/lib/index.d.cts +2 -2
- package/dist/lib/index.d.ts +2 -2
- package/dist/{paintDispatch-BQn5Lyx1.d.cts → paintDispatch-D3-5_cOb.d.cts} +72 -32
- package/dist/{paintDispatch-BQn5Lyx1.d.ts → paintDispatch-D3-5_cOb.d.ts} +72 -32
- package/dist/providers/index.cjs +1209 -1123
- package/dist/providers/index.js +330 -244
- package/dist/runtime/index.cjs +1187 -1101
- package/dist/runtime/index.js +335 -249
- package/package.json +8 -8
package/dist/runtime/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React85 from 'react';
|
|
2
|
+
import React85__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useSyncExternalStore, useLayoutEffect, lazy, useId } from 'react';
|
|
3
3
|
import { EventBusContext, useTraitScopeChain, useEntitySchemaOptional, useEntityBindingSnapshot, useTraitScope, useEntitySchema, getAllPages, matchPathAmong, OrbitalProvider, TraitScopeProvider, ServerBridgeProvider, useCurrentPagePath, useGameAudioContextOptional, VerificationProvider, EntitySchemaProvider, OrbitalThemeProvider, useServerBridge, EntityBindingContext } from '@almadar/ui/providers';
|
|
4
4
|
export { EntitySchemaProvider, ServerBridgeProvider, TraitContext, TraitProvider, useEntitySchema, useEntitySchemaOptional, useServerBridge, useTrait, useTraitContext } from '@almadar/ui/providers';
|
|
5
5
|
import { createLogger, setNamespaceLevel, isLogLevelEnabled } from '@almadar/logger';
|
|
@@ -825,7 +825,7 @@ function resolveMarkerExpression(expression, entity, config, state) {
|
|
|
825
825
|
function isPlainObject(value) {
|
|
826
826
|
if (value === null || value === void 0 || typeof value !== "object") return false;
|
|
827
827
|
if (Array.isArray(value)) return false;
|
|
828
|
-
if (
|
|
828
|
+
if (React85__default.isValidElement(value)) return false;
|
|
829
829
|
if (value instanceof Date) return false;
|
|
830
830
|
if (typeof value === "function") return false;
|
|
831
831
|
return true;
|
|
@@ -998,7 +998,7 @@ var init_Box = __esm({
|
|
|
998
998
|
fixed: "fixed",
|
|
999
999
|
sticky: "sticky"
|
|
1000
1000
|
};
|
|
1001
|
-
Box =
|
|
1001
|
+
Box = React85__default.forwardRef(
|
|
1002
1002
|
({
|
|
1003
1003
|
padding,
|
|
1004
1004
|
paddingX,
|
|
@@ -1063,7 +1063,7 @@ var init_Box = __esm({
|
|
|
1063
1063
|
onPointerDown?.(e);
|
|
1064
1064
|
}, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
|
|
1065
1065
|
const isClickable = action || onClick;
|
|
1066
|
-
return
|
|
1066
|
+
return React85__default.createElement(
|
|
1067
1067
|
Component,
|
|
1068
1068
|
{
|
|
1069
1069
|
ref,
|
|
@@ -1280,7 +1280,7 @@ var init_Icon = __esm({
|
|
|
1280
1280
|
const effectiveName = typeof icon === "string" && icon !== "" ? icon : name;
|
|
1281
1281
|
const effectiveStrokeWidth = strokeWidth != null && strokeWidth > 0 ? strokeWidth : void 0;
|
|
1282
1282
|
const family = useIconFamily();
|
|
1283
|
-
const RenderedComponent =
|
|
1283
|
+
const RenderedComponent = React85__default.useMemo(() => {
|
|
1284
1284
|
if (directIcon) return null;
|
|
1285
1285
|
return effectiveName ? resolveIconForFamily(effectiveName) : null;
|
|
1286
1286
|
}, [directIcon, effectiveName, family]);
|
|
@@ -1404,7 +1404,7 @@ var init_atlasSlice = __esm({
|
|
|
1404
1404
|
}
|
|
1405
1405
|
});
|
|
1406
1406
|
function useAtlasSliceDataUrl(asset) {
|
|
1407
|
-
const [, bump] =
|
|
1407
|
+
const [, bump] = React85.useReducer((x) => x + 1, 0);
|
|
1408
1408
|
if (!isAtlasAsset(asset)) return void 0;
|
|
1409
1409
|
const key = `${asset.atlas}#${asset.sprite}`;
|
|
1410
1410
|
const cached = sliceDataUrlCache.get(key);
|
|
@@ -1467,13 +1467,13 @@ function AtlasImage({
|
|
|
1467
1467
|
style,
|
|
1468
1468
|
"aria-hidden": ariaHidden
|
|
1469
1469
|
}) {
|
|
1470
|
-
const [, bump] =
|
|
1471
|
-
const canvasRef =
|
|
1470
|
+
const [, bump] = React85.useReducer((x) => x + 1, 0);
|
|
1471
|
+
const canvasRef = React85.useRef(null);
|
|
1472
1472
|
const sliced = isAtlasAsset(asset);
|
|
1473
1473
|
const atlas = sliced ? getAtlas(asset.atlas, bump) : void 0;
|
|
1474
1474
|
const img = sliced && asset?.url ? getSheetImage(asset.url, bump) : null;
|
|
1475
1475
|
const rect = sliced && atlas ? subRectFor(atlas, asset.sprite) : null;
|
|
1476
|
-
|
|
1476
|
+
React85.useEffect(() => {
|
|
1477
1477
|
const canvas = canvasRef.current;
|
|
1478
1478
|
if (!canvas || !img || !rect) return;
|
|
1479
1479
|
canvas.width = rect.sw;
|
|
@@ -1549,7 +1549,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
1549
1549
|
const IconComp = value;
|
|
1550
1550
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
1551
1551
|
}
|
|
1552
|
-
if (
|
|
1552
|
+
if (React85__default.isValidElement(value)) {
|
|
1553
1553
|
return value;
|
|
1554
1554
|
}
|
|
1555
1555
|
if (typeof value === "object" && value !== null && isIconLike(value)) {
|
|
@@ -1626,7 +1626,7 @@ var init_Button = __esm({
|
|
|
1626
1626
|
md: "h-icon-default w-icon-default",
|
|
1627
1627
|
lg: "h-icon-default w-icon-default"
|
|
1628
1628
|
};
|
|
1629
|
-
Button =
|
|
1629
|
+
Button = React85__default.forwardRef(
|
|
1630
1630
|
({
|
|
1631
1631
|
className,
|
|
1632
1632
|
variant = "primary",
|
|
@@ -1696,7 +1696,7 @@ var Dialog;
|
|
|
1696
1696
|
var init_Dialog = __esm({
|
|
1697
1697
|
"components/core/atoms/Dialog.tsx"() {
|
|
1698
1698
|
init_cn();
|
|
1699
|
-
Dialog =
|
|
1699
|
+
Dialog = React85__default.forwardRef(
|
|
1700
1700
|
({
|
|
1701
1701
|
role = "dialog",
|
|
1702
1702
|
"aria-modal": ariaModal = true,
|
|
@@ -1907,7 +1907,7 @@ var init_Typography = __esm({
|
|
|
1907
1907
|
if (format !== void 0 && format !== "none" && (typeof body === "string" || typeof body === "number" || body instanceof Date)) {
|
|
1908
1908
|
body = formatValue(body, format);
|
|
1909
1909
|
}
|
|
1910
|
-
return
|
|
1910
|
+
return React85__default.createElement(
|
|
1911
1911
|
Component,
|
|
1912
1912
|
{
|
|
1913
1913
|
id,
|
|
@@ -2470,7 +2470,7 @@ var init_Badge = __esm({
|
|
|
2470
2470
|
md: "px-2.5 py-1 text-sm",
|
|
2471
2471
|
lg: "px-3 py-1.5 text-base"
|
|
2472
2472
|
};
|
|
2473
|
-
Badge =
|
|
2473
|
+
Badge = React85__default.forwardRef(
|
|
2474
2474
|
({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, ...props }, ref) => {
|
|
2475
2475
|
const iconSizes3 = {
|
|
2476
2476
|
sm: "h-icon-default w-icon-default",
|
|
@@ -2820,7 +2820,7 @@ var init_SvgFlow = __esm({
|
|
|
2820
2820
|
width = 100,
|
|
2821
2821
|
height = 100
|
|
2822
2822
|
}) => {
|
|
2823
|
-
const markerId =
|
|
2823
|
+
const markerId = React85__default.useMemo(() => {
|
|
2824
2824
|
flowIdCounter += 1;
|
|
2825
2825
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
2826
2826
|
}, []);
|
|
@@ -3413,7 +3413,7 @@ var init_SvgRing = __esm({
|
|
|
3413
3413
|
width = 100,
|
|
3414
3414
|
height = 100
|
|
3415
3415
|
}) => {
|
|
3416
|
-
const gradientId =
|
|
3416
|
+
const gradientId = React85__default.useMemo(() => {
|
|
3417
3417
|
ringIdCounter += 1;
|
|
3418
3418
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
3419
3419
|
}, []);
|
|
@@ -3594,7 +3594,7 @@ var init_Input = __esm({
|
|
|
3594
3594
|
init_cn();
|
|
3595
3595
|
init_Icon();
|
|
3596
3596
|
init_useEventBus();
|
|
3597
|
-
Input =
|
|
3597
|
+
Input = React85__default.forwardRef(
|
|
3598
3598
|
({
|
|
3599
3599
|
className,
|
|
3600
3600
|
inputType,
|
|
@@ -3618,9 +3618,9 @@ var init_Input = __esm({
|
|
|
3618
3618
|
const eventBus = useEventBus();
|
|
3619
3619
|
const type = inputType || htmlType || "text";
|
|
3620
3620
|
const isDeclarative = typeof onChange === "string";
|
|
3621
|
-
const [localValue, setLocalValue] =
|
|
3622
|
-
const pendingEchoRef =
|
|
3623
|
-
|
|
3621
|
+
const [localValue, setLocalValue] = React85__default.useState(value);
|
|
3622
|
+
const pendingEchoRef = React85__default.useRef(/* @__PURE__ */ new Set());
|
|
3623
|
+
React85__default.useEffect(() => {
|
|
3624
3624
|
if (!isDeclarative) return;
|
|
3625
3625
|
const incoming = value == null ? "" : String(value);
|
|
3626
3626
|
if (pendingEchoRef.current.has(incoming)) {
|
|
@@ -3780,7 +3780,7 @@ var Label;
|
|
|
3780
3780
|
var init_Label = __esm({
|
|
3781
3781
|
"components/core/atoms/Label.tsx"() {
|
|
3782
3782
|
init_cn();
|
|
3783
|
-
Label =
|
|
3783
|
+
Label = React85__default.forwardRef(
|
|
3784
3784
|
({ className, required, children, ...props }, ref) => {
|
|
3785
3785
|
return /* @__PURE__ */ jsxs(
|
|
3786
3786
|
"label",
|
|
@@ -3807,7 +3807,7 @@ var init_Textarea = __esm({
|
|
|
3807
3807
|
"components/core/atoms/Textarea.tsx"() {
|
|
3808
3808
|
init_cn();
|
|
3809
3809
|
init_useEventBus();
|
|
3810
|
-
Textarea =
|
|
3810
|
+
Textarea = React85__default.forwardRef(
|
|
3811
3811
|
({ className, error, onChange, ...props }, ref) => {
|
|
3812
3812
|
const eventBus = useEventBus();
|
|
3813
3813
|
const handleChange = (e) => {
|
|
@@ -4046,7 +4046,7 @@ var init_Select = __esm({
|
|
|
4046
4046
|
init_cn();
|
|
4047
4047
|
init_Icon();
|
|
4048
4048
|
init_useEventBus();
|
|
4049
|
-
Select =
|
|
4049
|
+
Select = React85__default.forwardRef(
|
|
4050
4050
|
(props, _ref) => {
|
|
4051
4051
|
const { multiple, searchable, clearable } = props;
|
|
4052
4052
|
if (multiple || searchable || clearable) {
|
|
@@ -4063,7 +4063,7 @@ var init_Checkbox = __esm({
|
|
|
4063
4063
|
"components/core/atoms/Checkbox.tsx"() {
|
|
4064
4064
|
init_cn();
|
|
4065
4065
|
init_useEventBus();
|
|
4066
|
-
Checkbox =
|
|
4066
|
+
Checkbox = React85__default.forwardRef(
|
|
4067
4067
|
({ className, label, id, onChange, ...props }, ref) => {
|
|
4068
4068
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
4069
4069
|
const eventBus = useEventBus();
|
|
@@ -4117,7 +4117,7 @@ var init_Spinner = __esm({
|
|
|
4117
4117
|
md: "h-6 w-6",
|
|
4118
4118
|
lg: "h-8 w-8"
|
|
4119
4119
|
};
|
|
4120
|
-
Spinner =
|
|
4120
|
+
Spinner = React85__default.forwardRef(
|
|
4121
4121
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
4122
4122
|
if (overlay) {
|
|
4123
4123
|
return /* @__PURE__ */ jsx(
|
|
@@ -4207,7 +4207,7 @@ var init_Card = __esm({
|
|
|
4207
4207
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
4208
4208
|
"tile-image-first": "p-0 overflow-hidden"
|
|
4209
4209
|
};
|
|
4210
|
-
Card =
|
|
4210
|
+
Card = React85__default.forwardRef(
|
|
4211
4211
|
({
|
|
4212
4212
|
className,
|
|
4213
4213
|
variant = "bordered",
|
|
@@ -4256,9 +4256,9 @@ var init_Card = __esm({
|
|
|
4256
4256
|
}
|
|
4257
4257
|
);
|
|
4258
4258
|
Card.displayName = "Card";
|
|
4259
|
-
CardHeader =
|
|
4259
|
+
CardHeader = React85__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
4260
4260
|
CardHeader.displayName = "CardHeader";
|
|
4261
|
-
CardTitle =
|
|
4261
|
+
CardTitle = React85__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4262
4262
|
"h3",
|
|
4263
4263
|
{
|
|
4264
4264
|
ref,
|
|
@@ -4271,11 +4271,11 @@ var init_Card = __esm({
|
|
|
4271
4271
|
}
|
|
4272
4272
|
));
|
|
4273
4273
|
CardTitle.displayName = "CardTitle";
|
|
4274
|
-
CardContent =
|
|
4274
|
+
CardContent = React85__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
4275
4275
|
CardContent.displayName = "CardContent";
|
|
4276
4276
|
CardBody = CardContent;
|
|
4277
4277
|
CardBody.displayName = "CardBody";
|
|
4278
|
-
CardFooter =
|
|
4278
|
+
CardFooter = React85__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4279
4279
|
"div",
|
|
4280
4280
|
{
|
|
4281
4281
|
ref,
|
|
@@ -4362,7 +4362,7 @@ var init_FilterPill = __esm({
|
|
|
4362
4362
|
md: "w-3.5 h-3.5",
|
|
4363
4363
|
lg: "w-4 h-4"
|
|
4364
4364
|
};
|
|
4365
|
-
FilterPill =
|
|
4365
|
+
FilterPill = React85__default.forwardRef(
|
|
4366
4366
|
({
|
|
4367
4367
|
className,
|
|
4368
4368
|
variant = "default",
|
|
@@ -4491,8 +4491,8 @@ var init_Avatar = __esm({
|
|
|
4491
4491
|
actionPayload
|
|
4492
4492
|
}) => {
|
|
4493
4493
|
const eventBus = useEventBus();
|
|
4494
|
-
const [imgFailed, setImgFailed] =
|
|
4495
|
-
|
|
4494
|
+
const [imgFailed, setImgFailed] = React85__default.useState(false);
|
|
4495
|
+
React85__default.useEffect(() => {
|
|
4496
4496
|
setImgFailed(false);
|
|
4497
4497
|
}, [src]);
|
|
4498
4498
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -4605,7 +4605,7 @@ var init_Center = __esm({
|
|
|
4605
4605
|
as: Component = "div"
|
|
4606
4606
|
}) => {
|
|
4607
4607
|
const mergedStyle = minHeight ? { minHeight, ...style } : style;
|
|
4608
|
-
return
|
|
4608
|
+
return React85__default.createElement(Component, {
|
|
4609
4609
|
className: cn(
|
|
4610
4610
|
inline ? "inline-flex" : "flex",
|
|
4611
4611
|
horizontal && "justify-center",
|
|
@@ -4873,7 +4873,7 @@ var init_Radio = __esm({
|
|
|
4873
4873
|
md: "w-2.5 h-2.5",
|
|
4874
4874
|
lg: "w-3 h-3"
|
|
4875
4875
|
};
|
|
4876
|
-
Radio =
|
|
4876
|
+
Radio = React85__default.forwardRef(
|
|
4877
4877
|
({
|
|
4878
4878
|
label,
|
|
4879
4879
|
helperText,
|
|
@@ -4890,12 +4890,12 @@ var init_Radio = __esm({
|
|
|
4890
4890
|
onChange,
|
|
4891
4891
|
...props
|
|
4892
4892
|
}, ref) => {
|
|
4893
|
-
const reactId =
|
|
4893
|
+
const reactId = React85__default.useId();
|
|
4894
4894
|
const baseId = id || `radio-${reactId}`;
|
|
4895
4895
|
const hasError = !!error;
|
|
4896
4896
|
const eventBus = useEventBus();
|
|
4897
|
-
const [selected, setSelected] =
|
|
4898
|
-
|
|
4897
|
+
const [selected, setSelected] = React85__default.useState(value);
|
|
4898
|
+
React85__default.useEffect(() => {
|
|
4899
4899
|
if (value !== void 0) setSelected(value);
|
|
4900
4900
|
}, [value]);
|
|
4901
4901
|
const pick = (next, e) => {
|
|
@@ -5077,7 +5077,7 @@ var init_Switch = __esm({
|
|
|
5077
5077
|
"components/core/atoms/Switch.tsx"() {
|
|
5078
5078
|
"use client";
|
|
5079
5079
|
init_cn();
|
|
5080
|
-
Switch =
|
|
5080
|
+
Switch = React85.forwardRef(
|
|
5081
5081
|
({
|
|
5082
5082
|
checked,
|
|
5083
5083
|
defaultChecked = false,
|
|
@@ -5088,10 +5088,10 @@ var init_Switch = __esm({
|
|
|
5088
5088
|
name,
|
|
5089
5089
|
className
|
|
5090
5090
|
}, ref) => {
|
|
5091
|
-
const [isChecked, setIsChecked] =
|
|
5091
|
+
const [isChecked, setIsChecked] = React85.useState(
|
|
5092
5092
|
checked !== void 0 ? checked : defaultChecked
|
|
5093
5093
|
);
|
|
5094
|
-
|
|
5094
|
+
React85.useEffect(() => {
|
|
5095
5095
|
if (checked !== void 0) {
|
|
5096
5096
|
setIsChecked(checked);
|
|
5097
5097
|
}
|
|
@@ -5254,7 +5254,7 @@ var init_Stack = __esm({
|
|
|
5254
5254
|
};
|
|
5255
5255
|
const isHorizontal = direction === "horizontal";
|
|
5256
5256
|
const directionClass = responsive && isHorizontal ? reverse ? "flex-col-reverse md:flex-row-reverse" : "flex-col md:flex-row" : isHorizontal ? reverse ? "flex-row-reverse" : "flex-row" : reverse ? "flex-col-reverse" : "flex-col";
|
|
5257
|
-
return
|
|
5257
|
+
return React85__default.createElement(
|
|
5258
5258
|
Component,
|
|
5259
5259
|
{
|
|
5260
5260
|
className: cn(
|
|
@@ -5454,7 +5454,7 @@ var Aside;
|
|
|
5454
5454
|
var init_Aside = __esm({
|
|
5455
5455
|
"components/core/atoms/Aside.tsx"() {
|
|
5456
5456
|
init_cn();
|
|
5457
|
-
Aside =
|
|
5457
|
+
Aside = React85__default.forwardRef(
|
|
5458
5458
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
5459
5459
|
);
|
|
5460
5460
|
Aside.displayName = "Aside";
|
|
@@ -5533,9 +5533,9 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5533
5533
|
className
|
|
5534
5534
|
}) => {
|
|
5535
5535
|
const { t } = useTranslate();
|
|
5536
|
-
const [isVisible, setIsVisible] =
|
|
5537
|
-
const timeoutRef =
|
|
5538
|
-
const triggerRef =
|
|
5536
|
+
const [isVisible, setIsVisible] = React85__default.useState(false);
|
|
5537
|
+
const timeoutRef = React85__default.useRef(null);
|
|
5538
|
+
const triggerRef = React85__default.useRef(null);
|
|
5539
5539
|
const handleMouseEnter = () => {
|
|
5540
5540
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5541
5541
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -5546,7 +5546,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5546
5546
|
};
|
|
5547
5547
|
const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
|
|
5548
5548
|
const open = isVisible || revealed;
|
|
5549
|
-
|
|
5549
|
+
React85__default.useEffect(() => {
|
|
5550
5550
|
return () => {
|
|
5551
5551
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5552
5552
|
};
|
|
@@ -5756,7 +5756,7 @@ var init_StatusDot = __esm({
|
|
|
5756
5756
|
md: "w-2.5 h-2.5",
|
|
5757
5757
|
lg: "w-3 h-3"
|
|
5758
5758
|
};
|
|
5759
|
-
StatusDot =
|
|
5759
|
+
StatusDot = React85__default.forwardRef(
|
|
5760
5760
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
5761
5761
|
return /* @__PURE__ */ jsx(
|
|
5762
5762
|
"span",
|
|
@@ -5810,7 +5810,7 @@ var init_TrendIndicator = __esm({
|
|
|
5810
5810
|
down: "trending-down",
|
|
5811
5811
|
flat: "arrow-right"
|
|
5812
5812
|
};
|
|
5813
|
-
TrendIndicator =
|
|
5813
|
+
TrendIndicator = React85__default.forwardRef(
|
|
5814
5814
|
({
|
|
5815
5815
|
className,
|
|
5816
5816
|
value,
|
|
@@ -5879,7 +5879,7 @@ var init_RangeSlider = __esm({
|
|
|
5879
5879
|
md: "w-4 h-4",
|
|
5880
5880
|
lg: "w-5 h-5"
|
|
5881
5881
|
};
|
|
5882
|
-
RangeSlider =
|
|
5882
|
+
RangeSlider = React85__default.forwardRef(
|
|
5883
5883
|
({
|
|
5884
5884
|
className,
|
|
5885
5885
|
min = 0,
|
|
@@ -6455,7 +6455,7 @@ var init_ContentSection = __esm({
|
|
|
6455
6455
|
md: "py-16",
|
|
6456
6456
|
lg: "py-24"
|
|
6457
6457
|
};
|
|
6458
|
-
ContentSection =
|
|
6458
|
+
ContentSection = React85__default.forwardRef(
|
|
6459
6459
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
6460
6460
|
return /* @__PURE__ */ jsx(
|
|
6461
6461
|
Box,
|
|
@@ -6989,7 +6989,7 @@ var init_AnimatedReveal = __esm({
|
|
|
6989
6989
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
6990
6990
|
"none": {}
|
|
6991
6991
|
};
|
|
6992
|
-
AnimatedReveal =
|
|
6992
|
+
AnimatedReveal = React85__default.forwardRef(
|
|
6993
6993
|
({
|
|
6994
6994
|
trigger = "scroll",
|
|
6995
6995
|
animation = "fade-up",
|
|
@@ -7149,7 +7149,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
7149
7149
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
7150
7150
|
"use client";
|
|
7151
7151
|
init_cn();
|
|
7152
|
-
AnimatedGraphic =
|
|
7152
|
+
AnimatedGraphic = React85__default.forwardRef(
|
|
7153
7153
|
({
|
|
7154
7154
|
src,
|
|
7155
7155
|
svgContent,
|
|
@@ -7172,7 +7172,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
7172
7172
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
7173
7173
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
7174
7174
|
const prevAnimateRef = useRef(animate);
|
|
7175
|
-
const setRef =
|
|
7175
|
+
const setRef = React85__default.useCallback(
|
|
7176
7176
|
(node) => {
|
|
7177
7177
|
containerRef.current = node;
|
|
7178
7178
|
if (typeof ref === "function") ref(node);
|
|
@@ -7899,9 +7899,9 @@ function ControlButton({
|
|
|
7899
7899
|
className
|
|
7900
7900
|
}) {
|
|
7901
7901
|
const eventBus = useEventBus();
|
|
7902
|
-
const [isPressed, setIsPressed] =
|
|
7902
|
+
const [isPressed, setIsPressed] = React85.useState(false);
|
|
7903
7903
|
const actualPressed = pressed ?? isPressed;
|
|
7904
|
-
const handlePointerDown =
|
|
7904
|
+
const handlePointerDown = React85.useCallback(
|
|
7905
7905
|
(e) => {
|
|
7906
7906
|
e.preventDefault();
|
|
7907
7907
|
if (disabled) return;
|
|
@@ -7911,7 +7911,7 @@ function ControlButton({
|
|
|
7911
7911
|
},
|
|
7912
7912
|
[disabled, pressEvent, eventBus, onPress]
|
|
7913
7913
|
);
|
|
7914
|
-
const handlePointerUp =
|
|
7914
|
+
const handlePointerUp = React85.useCallback(
|
|
7915
7915
|
(e) => {
|
|
7916
7916
|
e.preventDefault();
|
|
7917
7917
|
if (disabled) return;
|
|
@@ -7921,7 +7921,7 @@ function ControlButton({
|
|
|
7921
7921
|
},
|
|
7922
7922
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
7923
7923
|
);
|
|
7924
|
-
const handlePointerLeave =
|
|
7924
|
+
const handlePointerLeave = React85.useCallback(
|
|
7925
7925
|
(e) => {
|
|
7926
7926
|
if (isPressed) {
|
|
7927
7927
|
setIsPressed(false);
|
|
@@ -8179,8 +8179,8 @@ function ControlGrid({
|
|
|
8179
8179
|
className
|
|
8180
8180
|
}) {
|
|
8181
8181
|
const eventBus = useEventBus();
|
|
8182
|
-
const [active, setActive] =
|
|
8183
|
-
const handlePress =
|
|
8182
|
+
const [active, setActive] = React85.useState(/* @__PURE__ */ new Set());
|
|
8183
|
+
const handlePress = React85.useCallback(
|
|
8184
8184
|
(id) => {
|
|
8185
8185
|
setActive((prev) => new Set(prev).add(id));
|
|
8186
8186
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -8194,7 +8194,7 @@ function ControlGrid({
|
|
|
8194
8194
|
},
|
|
8195
8195
|
[kind, actionEvent, directionEvent, directionEvents, eventBus, onAction, onDirection]
|
|
8196
8196
|
);
|
|
8197
|
-
const handleRelease =
|
|
8197
|
+
const handleRelease = React85.useCallback(
|
|
8198
8198
|
(id) => {
|
|
8199
8199
|
setActive((prev) => {
|
|
8200
8200
|
const next = new Set(prev);
|
|
@@ -8552,7 +8552,7 @@ function GameMenu({
|
|
|
8552
8552
|
}) {
|
|
8553
8553
|
const resolvedOptions = (options?.length ? options : void 0) ?? (menuItems?.length ? menuItems : void 0) ?? DEFAULT_MENU_OPTIONS;
|
|
8554
8554
|
const eventBus = useEventBus();
|
|
8555
|
-
const handleOptionClick =
|
|
8555
|
+
const handleOptionClick = React85.useCallback(
|
|
8556
8556
|
(option) => {
|
|
8557
8557
|
if (option.event) {
|
|
8558
8558
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -8788,7 +8788,7 @@ function StateGraph({
|
|
|
8788
8788
|
}) {
|
|
8789
8789
|
const eventBus = useEventBus();
|
|
8790
8790
|
const nodes = states ?? [];
|
|
8791
|
-
const positions =
|
|
8791
|
+
const positions = React85.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
|
|
8792
8792
|
return /* @__PURE__ */ jsxs(
|
|
8793
8793
|
Box,
|
|
8794
8794
|
{
|
|
@@ -8859,8 +8859,8 @@ function MiniMap({
|
|
|
8859
8859
|
tileAssets,
|
|
8860
8860
|
unitAssets
|
|
8861
8861
|
}) {
|
|
8862
|
-
const canvasRef =
|
|
8863
|
-
const imgCacheRef =
|
|
8862
|
+
const canvasRef = React85.useRef(null);
|
|
8863
|
+
const imgCacheRef = React85.useRef(/* @__PURE__ */ new Map());
|
|
8864
8864
|
function loadImg(url) {
|
|
8865
8865
|
const cached = imgCacheRef.current.get(url);
|
|
8866
8866
|
if (cached) return cached.complete ? cached : null;
|
|
@@ -8876,7 +8876,7 @@ function MiniMap({
|
|
|
8876
8876
|
imgCacheRef.current.set(url, img);
|
|
8877
8877
|
return null;
|
|
8878
8878
|
}
|
|
8879
|
-
|
|
8879
|
+
React85.useEffect(() => {
|
|
8880
8880
|
const canvas = canvasRef.current;
|
|
8881
8881
|
if (!canvas) return;
|
|
8882
8882
|
const ctx = canvas.getContext("2d");
|
|
@@ -9752,6 +9752,83 @@ var init_DrawText = __esm({
|
|
|
9752
9752
|
};
|
|
9753
9753
|
}
|
|
9754
9754
|
});
|
|
9755
|
+
function isAnimatedGroup(node) {
|
|
9756
|
+
return Boolean(node.animation && node.animation.durationMs > 0 && node.animation.keyframes.length > 0);
|
|
9757
|
+
}
|
|
9758
|
+
function DrawGroup(props) {
|
|
9759
|
+
const register = useContext(DrawableRegistryContext);
|
|
9760
|
+
if (register) register({ ...props, type: "draw-group" });
|
|
9761
|
+
return null;
|
|
9762
|
+
}
|
|
9763
|
+
var init_DrawGroup = __esm({
|
|
9764
|
+
"components/game/atoms/DrawGroup.tsx"() {
|
|
9765
|
+
"use client";
|
|
9766
|
+
init_registry();
|
|
9767
|
+
}
|
|
9768
|
+
});
|
|
9769
|
+
function applyMeshAnimation(node, timeMs) {
|
|
9770
|
+
const anim = node.animation;
|
|
9771
|
+
if (!anim || !(anim.durationMs > 0) || anim.keyframes.length === 0) return null;
|
|
9772
|
+
const frames = [...anim.keyframes].sort((a, b) => a.at - b.at);
|
|
9773
|
+
const cycle = timeMs / anim.durationMs;
|
|
9774
|
+
const t = anim.loop === false ? Math.min(cycle, 1) : cycle - Math.floor(cycle);
|
|
9775
|
+
const trackValue = (key) => {
|
|
9776
|
+
const defined = frames.filter((f3) => f3[key] !== void 0);
|
|
9777
|
+
if (defined.length === 0) return void 0;
|
|
9778
|
+
let prev;
|
|
9779
|
+
let next;
|
|
9780
|
+
for (const f3 of defined) {
|
|
9781
|
+
if (f3.at <= t) prev = f3;
|
|
9782
|
+
else if (!next) next = f3;
|
|
9783
|
+
}
|
|
9784
|
+
if (!prev) return defined[0][key];
|
|
9785
|
+
if (!next) return prev[key];
|
|
9786
|
+
const span = next.at - prev.at;
|
|
9787
|
+
const k = span > 0 ? (t - prev.at) / span : 1;
|
|
9788
|
+
const a = prev[key];
|
|
9789
|
+
const b = next[key];
|
|
9790
|
+
if (typeof a === "number" && typeof b === "number") return lerp2(a, b, k);
|
|
9791
|
+
return a;
|
|
9792
|
+
};
|
|
9793
|
+
const num = {};
|
|
9794
|
+
for (const key of NUMERIC_TRACKS2) {
|
|
9795
|
+
const v = trackValue(key);
|
|
9796
|
+
if (v !== void 0) num[key] = v;
|
|
9797
|
+
}
|
|
9798
|
+
return {
|
|
9799
|
+
offset: [num.offsetX ?? 0, num.offsetY ?? 0, num.offsetZ ?? 0],
|
|
9800
|
+
rotate: [num.rotateX ?? 0, num.rotateY ?? 0, num.rotateZ ?? 0],
|
|
9801
|
+
scale: num.scale ?? 1,
|
|
9802
|
+
opacity: num.opacity,
|
|
9803
|
+
emissiveIntensity: num.emissiveIntensity,
|
|
9804
|
+
color: trackValue("color"),
|
|
9805
|
+
emissive: trackValue("emissive")
|
|
9806
|
+
};
|
|
9807
|
+
}
|
|
9808
|
+
function DrawMesh(props) {
|
|
9809
|
+
const register = useContext(DrawableRegistryContext);
|
|
9810
|
+
if (register) register({ ...props, type: "draw-mesh" });
|
|
9811
|
+
return null;
|
|
9812
|
+
}
|
|
9813
|
+
var lerp2, NUMERIC_TRACKS2;
|
|
9814
|
+
var init_DrawMesh = __esm({
|
|
9815
|
+
"components/game/atoms/DrawMesh.tsx"() {
|
|
9816
|
+
"use client";
|
|
9817
|
+
init_registry();
|
|
9818
|
+
lerp2 = (a, b, k) => a + (b - a) * k;
|
|
9819
|
+
NUMERIC_TRACKS2 = [
|
|
9820
|
+
"offsetX",
|
|
9821
|
+
"offsetY",
|
|
9822
|
+
"offsetZ",
|
|
9823
|
+
"rotateX",
|
|
9824
|
+
"rotateY",
|
|
9825
|
+
"rotateZ",
|
|
9826
|
+
"scale",
|
|
9827
|
+
"opacity",
|
|
9828
|
+
"emissiveIntensity"
|
|
9829
|
+
];
|
|
9830
|
+
}
|
|
9831
|
+
});
|
|
9755
9832
|
|
|
9756
9833
|
// components/game/molecules/DrawSpriteLayer.tsx
|
|
9757
9834
|
function DrawSpriteLayer(_props) {
|
|
@@ -9818,18 +9895,22 @@ function paintDrawable(painter, node, dctx) {
|
|
|
9818
9895
|
if (!isValidScenePos(node.position)) break;
|
|
9819
9896
|
if (!Array.isArray(node.items)) break;
|
|
9820
9897
|
const p = dctx.projector.project(node.position);
|
|
9898
|
+
const anim = dctx.time > 0 && isAnimatedGroup(node) ? applyMeshAnimation(node, dctx.time) : null;
|
|
9899
|
+
const tw = dctx.projector.tileWidth;
|
|
9821
9900
|
painter.save();
|
|
9822
|
-
painter.translate(p.x, p.y);
|
|
9823
|
-
|
|
9824
|
-
if (
|
|
9825
|
-
|
|
9901
|
+
painter.translate(p.x + (anim ? anim.offset[0] * tw : 0), p.y + (anim ? anim.offset[1] * tw : 0));
|
|
9902
|
+
const scale = (node.scale ?? 1) * (anim?.scale ?? 1);
|
|
9903
|
+
if (scale !== 1) painter.scale(scale, scale);
|
|
9904
|
+
const rotate = (node.rotate ?? 0) + (node.rotation?.[2] ?? 0) + (anim?.rotate[2] ?? 0);
|
|
9905
|
+
if (rotate !== 0) painter.rotate(rotate);
|
|
9906
|
+
const opacity = (node.opacity ?? 1) * (anim?.opacity ?? 1);
|
|
9907
|
+
if (opacity !== 1) painter.setAlpha(opacity);
|
|
9826
9908
|
if (node.clip) {
|
|
9827
|
-
const tw = dctx.projector.tileWidth;
|
|
9828
9909
|
painter.scale(tw, tw);
|
|
9829
9910
|
painter.clipPath(node.clip);
|
|
9830
9911
|
painter.scale(1 / tw, 1 / tw);
|
|
9831
9912
|
}
|
|
9832
|
-
const childCtx =
|
|
9913
|
+
const childCtx = scale !== 1 ? { ...dctx, groupScale: (dctx.groupScale ?? 1) * scale } : dctx;
|
|
9833
9914
|
for (const item of node.items) paintDrawable(painter, item, childCtx);
|
|
9834
9915
|
painter.restore();
|
|
9835
9916
|
break;
|
|
@@ -9855,6 +9936,8 @@ var init_paintDispatch = __esm({
|
|
|
9855
9936
|
init_DrawSprite();
|
|
9856
9937
|
init_DrawShape();
|
|
9857
9938
|
init_DrawText();
|
|
9939
|
+
init_DrawGroup();
|
|
9940
|
+
init_DrawMesh();
|
|
9858
9941
|
init_DrawSpriteLayer();
|
|
9859
9942
|
init_DrawShapeLayer();
|
|
9860
9943
|
init_DrawTextLayer();
|
|
@@ -9950,7 +10033,7 @@ function Canvas2D({
|
|
|
9950
10033
|
const registerChildDrawable = useCallback((node) => {
|
|
9951
10034
|
childDrawablesRef.current.push(node);
|
|
9952
10035
|
}, []);
|
|
9953
|
-
const hasJsxChildren =
|
|
10036
|
+
const hasJsxChildren = React85.Children.count(children) > 0;
|
|
9954
10037
|
function isDrawableLayer(node) {
|
|
9955
10038
|
return node.type === "draw-sprite-layer" || node.type === "draw-shape-layer" || node.type === "draw-text-layer";
|
|
9956
10039
|
}
|
|
@@ -10101,7 +10184,8 @@ function Canvas2D({
|
|
|
10101
10184
|
const miniMapHeight = gridExtent.height || 10;
|
|
10102
10185
|
const drawableIsAnimated = (node) => {
|
|
10103
10186
|
if (node.type === "draw-shape") return isAnimatedShape(node);
|
|
10104
|
-
if (node.type === "draw-group")
|
|
10187
|
+
if (node.type === "draw-group")
|
|
10188
|
+
return isAnimatedGroup(node) || Array.isArray(node.items) && node.items.some(drawableIsAnimated);
|
|
10105
10189
|
if (node.type === "draw-shape-layer") return Array.isArray(node.items) && node.items.some(isAnimatedShape);
|
|
10106
10190
|
return false;
|
|
10107
10191
|
};
|
|
@@ -10443,6 +10527,7 @@ var init_Canvas2D = __esm({
|
|
|
10443
10527
|
init_projector();
|
|
10444
10528
|
init_paintDispatch();
|
|
10445
10529
|
init_DrawShape();
|
|
10530
|
+
init_DrawGroup();
|
|
10446
10531
|
init_registry();
|
|
10447
10532
|
init_hitTest();
|
|
10448
10533
|
init_isometric();
|
|
@@ -10479,6 +10564,8 @@ function Canvas({
|
|
|
10479
10564
|
showCoordinates,
|
|
10480
10565
|
showTileInfo,
|
|
10481
10566
|
fogOfWar,
|
|
10567
|
+
lighting,
|
|
10568
|
+
post,
|
|
10482
10569
|
tileClickEvent,
|
|
10483
10570
|
unitClickEvent,
|
|
10484
10571
|
tileHoverEvent,
|
|
@@ -10490,10 +10577,25 @@ function Canvas({
|
|
|
10490
10577
|
}) {
|
|
10491
10578
|
canvasLog.debug("Canvas render", { mode, drawablesCount: drawables?.length, projection, camera: camera ? JSON.stringify(camera) : void 0 });
|
|
10492
10579
|
const zoom = camera?.zoom;
|
|
10580
|
+
const childDrawablesRef = useRef([]);
|
|
10581
|
+
if (mode === "3d") childDrawablesRef.current = [];
|
|
10582
|
+
const registerChildDrawable = useCallback((node) => {
|
|
10583
|
+
childDrawablesRef.current.push(node);
|
|
10584
|
+
}, []);
|
|
10585
|
+
const [childDrawables, setChildDrawables] = useState([]);
|
|
10586
|
+
useEffect(() => {
|
|
10587
|
+
if (mode !== "3d") return;
|
|
10588
|
+
const next = childDrawablesRef.current;
|
|
10589
|
+
canvasLog.debug("children:adopt", { registered: next.length, adopted: childDrawables.length });
|
|
10590
|
+
if (next.length === 0 && React85.Children.count(children) > 0) return;
|
|
10591
|
+
setChildDrawables(
|
|
10592
|
+
(prev) => prev.length === next.length && JSON.stringify(prev) === JSON.stringify(next) ? prev : [...next]
|
|
10593
|
+
);
|
|
10594
|
+
});
|
|
10493
10595
|
if (mode === "3d") {
|
|
10494
10596
|
const props3d = {
|
|
10495
10597
|
className,
|
|
10496
|
-
drawables,
|
|
10598
|
+
drawables: [...drawables ?? [], ...childDrawables],
|
|
10497
10599
|
isLoading,
|
|
10498
10600
|
cameraMode: to3DCameraMode(camera?.mode),
|
|
10499
10601
|
...zoom !== void 0 ? { scale: zoom } : {},
|
|
@@ -10509,6 +10611,8 @@ function Canvas({
|
|
|
10509
10611
|
showCoordinates,
|
|
10510
10612
|
showTileInfo,
|
|
10511
10613
|
fogOfWar,
|
|
10614
|
+
lighting,
|
|
10615
|
+
post,
|
|
10512
10616
|
tileClickEvent,
|
|
10513
10617
|
unitClickEvent,
|
|
10514
10618
|
tileHoverEvent,
|
|
@@ -10517,7 +10621,10 @@ function Canvas({
|
|
|
10517
10621
|
keyMap,
|
|
10518
10622
|
keyUpMap
|
|
10519
10623
|
};
|
|
10520
|
-
return /* @__PURE__ */
|
|
10624
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10625
|
+
/* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(Canvas3DHost, { ...props3d }) }),
|
|
10626
|
+
React85.Children.count(children) > 0 && /* @__PURE__ */ jsx(DrawableRegistryContext.Provider, { value: registerChildDrawable, children: /* @__PURE__ */ jsx("div", { "aria-hidden": "true", style: { position: "absolute", width: 0, height: 0, overflow: "hidden" }, children }) })
|
|
10627
|
+
] });
|
|
10521
10628
|
}
|
|
10522
10629
|
return /* @__PURE__ */ jsx(
|
|
10523
10630
|
Canvas2D,
|
|
@@ -10549,6 +10656,7 @@ var Canvas3DHost, canvasLog;
|
|
|
10549
10656
|
var init_Canvas = __esm({
|
|
10550
10657
|
"components/game/molecules/Canvas.tsx"() {
|
|
10551
10658
|
"use client";
|
|
10659
|
+
init_registry();
|
|
10552
10660
|
init_Canvas2D();
|
|
10553
10661
|
Canvas3DHost = lazy(
|
|
10554
10662
|
() => import('@almadar/ui/components/molecules/game/three').then((m) => ({ default: m.Canvas3DHost }))
|
|
@@ -10673,7 +10781,7 @@ function LinearView({
|
|
|
10673
10781
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
10674
10782
|
const isDone = i < currentIdx;
|
|
10675
10783
|
const isCurrent = i === currentIdx;
|
|
10676
|
-
return /* @__PURE__ */ jsxs(
|
|
10784
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
10677
10785
|
i > 0 && /* @__PURE__ */ jsx(
|
|
10678
10786
|
Typography,
|
|
10679
10787
|
{
|
|
@@ -11208,7 +11316,7 @@ function SequenceBar({
|
|
|
11208
11316
|
else onSlotRemove?.(index);
|
|
11209
11317
|
}, [emit, slotRemoveEvent, onSlotRemove, playing]);
|
|
11210
11318
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
11211
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
11319
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
11212
11320
|
i > 0 && /* @__PURE__ */ jsx(
|
|
11213
11321
|
Typography,
|
|
11214
11322
|
{
|
|
@@ -11857,7 +11965,7 @@ var init_ErrorBoundary = __esm({
|
|
|
11857
11965
|
}
|
|
11858
11966
|
);
|
|
11859
11967
|
};
|
|
11860
|
-
ErrorBoundary = class extends
|
|
11968
|
+
ErrorBoundary = class extends React85__default.Component {
|
|
11861
11969
|
constructor(props) {
|
|
11862
11970
|
super(props);
|
|
11863
11971
|
__publicField(this, "reset", () => {
|
|
@@ -12126,7 +12234,7 @@ var init_Container = __esm({
|
|
|
12126
12234
|
as: Component = "div"
|
|
12127
12235
|
}) => {
|
|
12128
12236
|
const resolvedSize = maxWidth ?? size ?? "lg";
|
|
12129
|
-
return
|
|
12237
|
+
return React85__default.createElement(
|
|
12130
12238
|
Component,
|
|
12131
12239
|
{
|
|
12132
12240
|
className: cn(
|
|
@@ -15091,7 +15199,7 @@ var init_CodeBlock = __esm({
|
|
|
15091
15199
|
DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
|
|
15092
15200
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
15093
15201
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
15094
|
-
CodeBlock =
|
|
15202
|
+
CodeBlock = React85__default.memo(
|
|
15095
15203
|
({
|
|
15096
15204
|
code: rawCode,
|
|
15097
15205
|
language = "text",
|
|
@@ -15679,7 +15787,7 @@ var init_MarkdownContent = __esm({
|
|
|
15679
15787
|
init_Box();
|
|
15680
15788
|
init_CodeBlock();
|
|
15681
15789
|
init_cn();
|
|
15682
|
-
MarkdownContent =
|
|
15790
|
+
MarkdownContent = React85__default.memo(
|
|
15683
15791
|
({ content, direction = "ltr", className }) => {
|
|
15684
15792
|
const { t: _t } = useTranslate();
|
|
15685
15793
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -16956,7 +17064,7 @@ var init_StateMachineView = __esm({
|
|
|
16956
17064
|
style: { top: title ? 30 : 0 },
|
|
16957
17065
|
children: [
|
|
16958
17066
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
16959
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
17067
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React85__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
16960
17068
|
StateNode2,
|
|
16961
17069
|
{
|
|
16962
17070
|
state,
|
|
@@ -22697,8 +22805,8 @@ var init_Menu = __esm({
|
|
|
22697
22805
|
"bottom-end": "bottom-start"
|
|
22698
22806
|
};
|
|
22699
22807
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
22700
|
-
const triggerChild =
|
|
22701
|
-
const triggerElement =
|
|
22808
|
+
const triggerChild = React85__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
22809
|
+
const triggerElement = React85__default.cloneElement(
|
|
22702
22810
|
triggerChild,
|
|
22703
22811
|
{
|
|
22704
22812
|
ref: triggerRef,
|
|
@@ -22793,14 +22901,14 @@ function useDataDnd(args) {
|
|
|
22793
22901
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
22794
22902
|
const enabled = isZone || Boolean(dndRoot);
|
|
22795
22903
|
const eventBus = useEventBus();
|
|
22796
|
-
const parentRoot =
|
|
22904
|
+
const parentRoot = React85__default.useContext(RootCtx);
|
|
22797
22905
|
const isRoot = enabled && parentRoot === null;
|
|
22798
|
-
const zoneId =
|
|
22906
|
+
const zoneId = React85__default.useId();
|
|
22799
22907
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
22800
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
22801
|
-
const optimisticOrdersRef =
|
|
22908
|
+
const [optimisticOrders, setOptimisticOrders] = React85__default.useState(() => /* @__PURE__ */ new Map());
|
|
22909
|
+
const optimisticOrdersRef = React85__default.useRef(optimisticOrders);
|
|
22802
22910
|
optimisticOrdersRef.current = optimisticOrders;
|
|
22803
|
-
const clearOptimisticOrder =
|
|
22911
|
+
const clearOptimisticOrder = React85__default.useCallback((group) => {
|
|
22804
22912
|
setOptimisticOrders((prev) => {
|
|
22805
22913
|
if (!prev.has(group)) return prev;
|
|
22806
22914
|
const next = new Map(prev);
|
|
@@ -22825,7 +22933,7 @@ function useDataDnd(args) {
|
|
|
22825
22933
|
const raw = it[dndItemIdField];
|
|
22826
22934
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
22827
22935
|
}).join("|");
|
|
22828
|
-
const itemIds =
|
|
22936
|
+
const itemIds = React85__default.useMemo(
|
|
22829
22937
|
() => orderedItems.map((it, idx) => {
|
|
22830
22938
|
const raw = it[dndItemIdField];
|
|
22831
22939
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
@@ -22836,7 +22944,7 @@ function useDataDnd(args) {
|
|
|
22836
22944
|
const raw = it[dndItemIdField];
|
|
22837
22945
|
return raw != null ? String(raw) : `__${idx}`;
|
|
22838
22946
|
}).join("|");
|
|
22839
|
-
|
|
22947
|
+
React85__default.useEffect(() => {
|
|
22840
22948
|
const root = isRoot ? null : parentRoot;
|
|
22841
22949
|
if (root) {
|
|
22842
22950
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -22844,20 +22952,20 @@ function useDataDnd(args) {
|
|
|
22844
22952
|
clearOptimisticOrder(ownGroup);
|
|
22845
22953
|
}
|
|
22846
22954
|
}, [itemsContentSig, ownGroup]);
|
|
22847
|
-
const zonesRef =
|
|
22848
|
-
const registerZone =
|
|
22955
|
+
const zonesRef = React85__default.useRef(/* @__PURE__ */ new Map());
|
|
22956
|
+
const registerZone = React85__default.useCallback((zoneId2, meta2) => {
|
|
22849
22957
|
zonesRef.current.set(zoneId2, meta2);
|
|
22850
22958
|
}, []);
|
|
22851
|
-
const unregisterZone =
|
|
22959
|
+
const unregisterZone = React85__default.useCallback((zoneId2) => {
|
|
22852
22960
|
zonesRef.current.delete(zoneId2);
|
|
22853
22961
|
}, []);
|
|
22854
|
-
const [activeDrag, setActiveDrag] =
|
|
22855
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
22856
|
-
const meta =
|
|
22962
|
+
const [activeDrag, setActiveDrag] = React85__default.useState(null);
|
|
22963
|
+
const [overZoneGroup, setOverZoneGroup] = React85__default.useState(null);
|
|
22964
|
+
const meta = React85__default.useMemo(
|
|
22857
22965
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
22858
22966
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
22859
22967
|
);
|
|
22860
|
-
|
|
22968
|
+
React85__default.useEffect(() => {
|
|
22861
22969
|
const target = isRoot ? null : parentRoot;
|
|
22862
22970
|
if (!target) {
|
|
22863
22971
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -22876,7 +22984,7 @@ function useDataDnd(args) {
|
|
|
22876
22984
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
22877
22985
|
const sensors = useAlmadarDndSensors(true);
|
|
22878
22986
|
const collisionDetection = almadarDndCollisionDetection;
|
|
22879
|
-
const findZoneByItem =
|
|
22987
|
+
const findZoneByItem = React85__default.useCallback(
|
|
22880
22988
|
(id) => {
|
|
22881
22989
|
for (const z of zonesRef.current.values()) {
|
|
22882
22990
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -22885,7 +22993,7 @@ function useDataDnd(args) {
|
|
|
22885
22993
|
},
|
|
22886
22994
|
[]
|
|
22887
22995
|
);
|
|
22888
|
-
|
|
22996
|
+
React85__default.useCallback(
|
|
22889
22997
|
(group) => {
|
|
22890
22998
|
for (const z of zonesRef.current.values()) {
|
|
22891
22999
|
if (z.group === group) return z;
|
|
@@ -22894,7 +23002,7 @@ function useDataDnd(args) {
|
|
|
22894
23002
|
},
|
|
22895
23003
|
[]
|
|
22896
23004
|
);
|
|
22897
|
-
const handleDragEnd =
|
|
23005
|
+
const handleDragEnd = React85__default.useCallback(
|
|
22898
23006
|
(event) => {
|
|
22899
23007
|
const { active, over } = event;
|
|
22900
23008
|
const activeIdStr = String(active.id);
|
|
@@ -22985,8 +23093,8 @@ function useDataDnd(args) {
|
|
|
22985
23093
|
},
|
|
22986
23094
|
[eventBus]
|
|
22987
23095
|
);
|
|
22988
|
-
const sortableData =
|
|
22989
|
-
const SortableItem =
|
|
23096
|
+
const sortableData = React85__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
23097
|
+
const SortableItem = React85__default.useCallback(
|
|
22990
23098
|
({ id, children }) => {
|
|
22991
23099
|
const {
|
|
22992
23100
|
attributes,
|
|
@@ -23026,7 +23134,7 @@ function useDataDnd(args) {
|
|
|
23026
23134
|
id: droppableId,
|
|
23027
23135
|
data: sortableData
|
|
23028
23136
|
});
|
|
23029
|
-
const ctx =
|
|
23137
|
+
const ctx = React85__default.useContext(RootCtx);
|
|
23030
23138
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
23031
23139
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
23032
23140
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -23041,7 +23149,7 @@ function useDataDnd(args) {
|
|
|
23041
23149
|
showForeignPlaceholder,
|
|
23042
23150
|
ctxAvailable: ctx != null
|
|
23043
23151
|
});
|
|
23044
|
-
|
|
23152
|
+
React85__default.useEffect(() => {
|
|
23045
23153
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
23046
23154
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
23047
23155
|
return /* @__PURE__ */ jsx(
|
|
@@ -23055,11 +23163,11 @@ function useDataDnd(args) {
|
|
|
23055
23163
|
}
|
|
23056
23164
|
);
|
|
23057
23165
|
};
|
|
23058
|
-
const rootContextValue =
|
|
23166
|
+
const rootContextValue = React85__default.useMemo(
|
|
23059
23167
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
23060
23168
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
23061
23169
|
);
|
|
23062
|
-
const handleDragStart =
|
|
23170
|
+
const handleDragStart = React85__default.useCallback((event) => {
|
|
23063
23171
|
const sourceZone = findZoneByItem(event.active.id);
|
|
23064
23172
|
const rect = event.active.rect.current.initial;
|
|
23065
23173
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -23078,7 +23186,7 @@ function useDataDnd(args) {
|
|
|
23078
23186
|
isRoot
|
|
23079
23187
|
});
|
|
23080
23188
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
23081
|
-
const handleDragOver =
|
|
23189
|
+
const handleDragOver = React85__default.useCallback((event) => {
|
|
23082
23190
|
const { active, over } = event;
|
|
23083
23191
|
const overData = over?.data?.current;
|
|
23084
23192
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -23148,7 +23256,7 @@ function useDataDnd(args) {
|
|
|
23148
23256
|
return next;
|
|
23149
23257
|
});
|
|
23150
23258
|
}, []);
|
|
23151
|
-
const handleDragCancel =
|
|
23259
|
+
const handleDragCancel = React85__default.useCallback((event) => {
|
|
23152
23260
|
setActiveDrag(null);
|
|
23153
23261
|
setOverZoneGroup(null);
|
|
23154
23262
|
dndLog.warn("dragCancel", {
|
|
@@ -23156,12 +23264,12 @@ function useDataDnd(args) {
|
|
|
23156
23264
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
23157
23265
|
});
|
|
23158
23266
|
}, []);
|
|
23159
|
-
const handleDragEndWithCleanup =
|
|
23267
|
+
const handleDragEndWithCleanup = React85__default.useCallback((event) => {
|
|
23160
23268
|
handleDragEnd(event);
|
|
23161
23269
|
setActiveDrag(null);
|
|
23162
23270
|
setOverZoneGroup(null);
|
|
23163
23271
|
}, [handleDragEnd]);
|
|
23164
|
-
const wrapContainer =
|
|
23272
|
+
const wrapContainer = React85__default.useCallback(
|
|
23165
23273
|
(children) => {
|
|
23166
23274
|
if (!enabled) return children;
|
|
23167
23275
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -23215,7 +23323,7 @@ var init_useDataDnd = __esm({
|
|
|
23215
23323
|
init_useAlmadarDndCollision();
|
|
23216
23324
|
init_Box();
|
|
23217
23325
|
dndLog = createLogger("almadar:ui:dnd");
|
|
23218
|
-
RootCtx =
|
|
23326
|
+
RootCtx = React85__default.createContext(null);
|
|
23219
23327
|
}
|
|
23220
23328
|
});
|
|
23221
23329
|
function renderIconInput(icon, props) {
|
|
@@ -23757,7 +23865,7 @@ function DataList({
|
|
|
23757
23865
|
}) {
|
|
23758
23866
|
const eventBus = useEventBus();
|
|
23759
23867
|
const { t } = useTranslate();
|
|
23760
|
-
const [visibleCount, setVisibleCount] =
|
|
23868
|
+
const [visibleCount, setVisibleCount] = React85__default.useState(pageSize || Infinity);
|
|
23761
23869
|
const fieldDefs = fields ?? columns ?? [];
|
|
23762
23870
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
23763
23871
|
const dnd = useDataDnd({
|
|
@@ -23773,14 +23881,14 @@ function DataList({
|
|
|
23773
23881
|
dndRoot
|
|
23774
23882
|
});
|
|
23775
23883
|
const orderedData = dnd.orderedItems;
|
|
23776
|
-
const allData =
|
|
23884
|
+
const allData = React85__default.useMemo(
|
|
23777
23885
|
() => sortRows(orderedData, sortBy, sortDirection),
|
|
23778
23886
|
[orderedData, sortBy, sortDirection]
|
|
23779
23887
|
);
|
|
23780
23888
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
23781
23889
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
23782
23890
|
const hasRenderProp = typeof children === "function";
|
|
23783
|
-
|
|
23891
|
+
React85__default.useEffect(() => {
|
|
23784
23892
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
23785
23893
|
const childrenTypeOf = typeof children;
|
|
23786
23894
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -23895,7 +24003,7 @@ function DataList({
|
|
|
23895
24003
|
return v === void 0 || v === null || v === "" ? raw : String(v);
|
|
23896
24004
|
};
|
|
23897
24005
|
return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("py-2", className), children: [
|
|
23898
|
-
groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
24006
|
+
groups2.map((group, gi) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
23899
24007
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
23900
24008
|
group.items.map((itemData, index) => {
|
|
23901
24009
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -24094,7 +24202,7 @@ function DataList({
|
|
|
24094
24202
|
className
|
|
24095
24203
|
),
|
|
24096
24204
|
children: [
|
|
24097
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
24205
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
24098
24206
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
24099
24207
|
group.items.map(
|
|
24100
24208
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -24181,7 +24289,7 @@ var init_FormSection = __esm({
|
|
|
24181
24289
|
columns = 1,
|
|
24182
24290
|
className
|
|
24183
24291
|
}) => {
|
|
24184
|
-
const [collapsed, setCollapsed] =
|
|
24292
|
+
const [collapsed, setCollapsed] = React85__default.useState(defaultCollapsed);
|
|
24185
24293
|
const { t } = useTranslate();
|
|
24186
24294
|
const eventBus = useEventBus();
|
|
24187
24295
|
const gridClass = {
|
|
@@ -24189,7 +24297,7 @@ var init_FormSection = __esm({
|
|
|
24189
24297
|
2: "grid-cols-1 md:grid-cols-2",
|
|
24190
24298
|
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
24191
24299
|
}[columns];
|
|
24192
|
-
|
|
24300
|
+
React85__default.useCallback(() => {
|
|
24193
24301
|
if (collapsible) {
|
|
24194
24302
|
setCollapsed((prev) => !prev);
|
|
24195
24303
|
eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
|
|
@@ -25170,7 +25278,7 @@ var init_Flex = __esm({
|
|
|
25170
25278
|
flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
|
|
25171
25279
|
}
|
|
25172
25280
|
}
|
|
25173
|
-
return
|
|
25281
|
+
return React85__default.createElement(Component, {
|
|
25174
25282
|
className: cn(
|
|
25175
25283
|
inline ? "inline-flex" : "flex",
|
|
25176
25284
|
directionStyles[direction],
|
|
@@ -25289,7 +25397,7 @@ var init_Grid = __esm({
|
|
|
25289
25397
|
as: Component = "div"
|
|
25290
25398
|
}) => {
|
|
25291
25399
|
const mergedStyle = rows ? { gridTemplateRows: `repeat(${rows}, minmax(0, 1fr))`, ...style } : style;
|
|
25292
|
-
return
|
|
25400
|
+
return React85__default.createElement(
|
|
25293
25401
|
Component,
|
|
25294
25402
|
{
|
|
25295
25403
|
className: cn(
|
|
@@ -25521,9 +25629,9 @@ var init_Popover = __esm({
|
|
|
25521
25629
|
onMouseLeave: handleClose,
|
|
25522
25630
|
onPointerDown: tapTriggerProps.onPointerDown
|
|
25523
25631
|
};
|
|
25524
|
-
const childElement =
|
|
25632
|
+
const childElement = React85__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
25525
25633
|
const childPointerDown = childElement.props.onPointerDown;
|
|
25526
|
-
const triggerElement =
|
|
25634
|
+
const triggerElement = React85__default.cloneElement(
|
|
25527
25635
|
childElement,
|
|
25528
25636
|
{
|
|
25529
25637
|
ref: triggerRef,
|
|
@@ -26132,9 +26240,9 @@ var init_Tooltip = __esm({
|
|
|
26132
26240
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
26133
26241
|
};
|
|
26134
26242
|
}, []);
|
|
26135
|
-
const triggerElement =
|
|
26243
|
+
const triggerElement = React85__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
26136
26244
|
const childPointerDown = triggerElement.props.onPointerDown;
|
|
26137
|
-
const trigger =
|
|
26245
|
+
const trigger = React85__default.cloneElement(triggerElement, {
|
|
26138
26246
|
ref: triggerRef,
|
|
26139
26247
|
onMouseEnter: handleMouseEnter,
|
|
26140
26248
|
onMouseLeave: handleMouseLeave,
|
|
@@ -26224,7 +26332,7 @@ var init_WizardProgress = __esm({
|
|
|
26224
26332
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
26225
26333
|
const isActive = index === currentStep;
|
|
26226
26334
|
const isCompleted = index < currentStep;
|
|
26227
|
-
return /* @__PURE__ */ jsxs(
|
|
26335
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
26228
26336
|
/* @__PURE__ */ jsx(
|
|
26229
26337
|
"button",
|
|
26230
26338
|
{
|
|
@@ -27859,13 +27967,13 @@ var init_MapView = __esm({
|
|
|
27859
27967
|
shadowSize: [41, 41]
|
|
27860
27968
|
});
|
|
27861
27969
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
27862
|
-
const { useEffect:
|
|
27970
|
+
const { useEffect: useEffect60, useRef: useRef62, useCallback: useCallback90, useState: useState92 } = React85__default;
|
|
27863
27971
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
27864
27972
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
27865
27973
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
27866
27974
|
const map = useMap();
|
|
27867
|
-
const prevRef =
|
|
27868
|
-
|
|
27975
|
+
const prevRef = useRef62({ centerLat, centerLng, zoom });
|
|
27976
|
+
useEffect60(() => {
|
|
27869
27977
|
const prev = prevRef.current;
|
|
27870
27978
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
27871
27979
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -27876,7 +27984,7 @@ var init_MapView = __esm({
|
|
|
27876
27984
|
}
|
|
27877
27985
|
function MapClickHandler({ onMapClick }) {
|
|
27878
27986
|
const map = useMap();
|
|
27879
|
-
|
|
27987
|
+
useEffect60(() => {
|
|
27880
27988
|
if (!onMapClick) return;
|
|
27881
27989
|
const handler = (e) => {
|
|
27882
27990
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -27904,8 +28012,8 @@ var init_MapView = __esm({
|
|
|
27904
28012
|
showAttribution = true
|
|
27905
28013
|
}) {
|
|
27906
28014
|
const eventBus = useEventBus2();
|
|
27907
|
-
const [clickedPosition, setClickedPosition] =
|
|
27908
|
-
const handleMapClick =
|
|
28015
|
+
const [clickedPosition, setClickedPosition] = useState92(null);
|
|
28016
|
+
const handleMapClick = useCallback90((lat, lng) => {
|
|
27909
28017
|
if (showClickedPin) {
|
|
27910
28018
|
setClickedPosition({ lat, lng });
|
|
27911
28019
|
}
|
|
@@ -27914,7 +28022,7 @@ var init_MapView = __esm({
|
|
|
27914
28022
|
eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
|
|
27915
28023
|
}
|
|
27916
28024
|
}, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
|
|
27917
|
-
const handleMarkerClick =
|
|
28025
|
+
const handleMarkerClick = useCallback90((marker) => {
|
|
27918
28026
|
onMarkerClick?.(marker);
|
|
27919
28027
|
if (markerClickEvent) {
|
|
27920
28028
|
eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
|
|
@@ -28757,8 +28865,8 @@ function TableView({
|
|
|
28757
28865
|
}) {
|
|
28758
28866
|
const eventBus = useEventBus();
|
|
28759
28867
|
const { t } = useTranslate();
|
|
28760
|
-
const [visibleCount, setVisibleCount] =
|
|
28761
|
-
const [localSelected, setLocalSelected] =
|
|
28868
|
+
const [visibleCount, setVisibleCount] = React85__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
28869
|
+
const [localSelected, setLocalSelected] = React85__default.useState(/* @__PURE__ */ new Set());
|
|
28762
28870
|
const colDefs = (Array.isArray(columns) ? columns : void 0) ?? (Array.isArray(fields) ? fields : void 0) ?? [];
|
|
28763
28871
|
const actionDefs = Array.isArray(itemActions) ? itemActions : [];
|
|
28764
28872
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
@@ -28780,7 +28888,7 @@ function TableView({
|
|
|
28780
28888
|
const hasRenderProp = typeof children === "function";
|
|
28781
28889
|
const idField = dndItemIdField ?? "id";
|
|
28782
28890
|
const isCoarsePointer = useMediaQuery("(pointer: coarse)");
|
|
28783
|
-
|
|
28891
|
+
React85__default.useEffect(() => {
|
|
28784
28892
|
tableViewLog.debug("render", {
|
|
28785
28893
|
rowCount: data.length,
|
|
28786
28894
|
colCount: colDefs.length,
|
|
@@ -28837,7 +28945,7 @@ function TableView({
|
|
|
28837
28945
|
};
|
|
28838
28946
|
eventBus.emit(`UI:${itemClickEvent}`, payload);
|
|
28839
28947
|
};
|
|
28840
|
-
const colFloors =
|
|
28948
|
+
const colFloors = React85__default.useMemo(
|
|
28841
28949
|
() => colDefs.map((col) => {
|
|
28842
28950
|
const longest = data.reduce((widest, row) => {
|
|
28843
28951
|
const cell = formatCell(asFieldValue(getNestedValue(row, col.field ?? col.key)), col.format);
|
|
@@ -28999,12 +29107,12 @@ function TableView({
|
|
|
28999
29107
|
]
|
|
29000
29108
|
}
|
|
29001
29109
|
);
|
|
29002
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
29110
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React85__default.Fragment, { children: rowInner }, id);
|
|
29003
29111
|
};
|
|
29004
29112
|
const items = Array.from(data);
|
|
29005
29113
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
29006
29114
|
let runningIndex = 0;
|
|
29007
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
29115
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
29008
29116
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
29009
29117
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
29010
29118
|
] }, gi)) });
|
|
@@ -30229,7 +30337,7 @@ var init_StepFlow = __esm({
|
|
|
30229
30337
|
className
|
|
30230
30338
|
}) => {
|
|
30231
30339
|
if (orientation === "vertical") {
|
|
30232
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
30340
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React85__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
30233
30341
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
30234
30342
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
30235
30343
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -30240,7 +30348,7 @@ var init_StepFlow = __esm({
|
|
|
30240
30348
|
] })
|
|
30241
30349
|
] }) }, index)) });
|
|
30242
30350
|
}
|
|
30243
|
-
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(
|
|
30351
|
+
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(React85__default.Fragment, { children: [
|
|
30244
30352
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
30245
30353
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
30246
30354
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -31230,7 +31338,7 @@ var init_LikertScale = __esm({
|
|
|
31230
31338
|
md: "text-base",
|
|
31231
31339
|
lg: "text-lg"
|
|
31232
31340
|
};
|
|
31233
|
-
LikertScale =
|
|
31341
|
+
LikertScale = React85__default.forwardRef(
|
|
31234
31342
|
({
|
|
31235
31343
|
question,
|
|
31236
31344
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -31242,7 +31350,7 @@ var init_LikertScale = __esm({
|
|
|
31242
31350
|
variant = "radios",
|
|
31243
31351
|
className
|
|
31244
31352
|
}, ref) => {
|
|
31245
|
-
const groupId =
|
|
31353
|
+
const groupId = React85__default.useId();
|
|
31246
31354
|
const eventBus = useEventBus();
|
|
31247
31355
|
const handleSelect = useCallback(
|
|
31248
31356
|
(next) => {
|
|
@@ -33531,7 +33639,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
33531
33639
|
"aria-label": t("aria.breadcrumb"),
|
|
33532
33640
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
33533
33641
|
const isLast = idx === items.length - 1;
|
|
33534
|
-
return /* @__PURE__ */ jsxs(
|
|
33642
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
33535
33643
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
33536
33644
|
Icon,
|
|
33537
33645
|
{
|
|
@@ -34400,7 +34508,7 @@ var init_MiniStateMachine = __esm({
|
|
|
34400
34508
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
34401
34509
|
const tc = transitionCounts[s.name] ?? 0;
|
|
34402
34510
|
const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
34403
|
-
return /* @__PURE__ */ jsxs(
|
|
34511
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
34404
34512
|
/* @__PURE__ */ jsx(
|
|
34405
34513
|
AvlState,
|
|
34406
34514
|
{
|
|
@@ -34604,7 +34712,7 @@ var init_PageHeader = __esm({
|
|
|
34604
34712
|
info: "bg-info/10 text-info"
|
|
34605
34713
|
};
|
|
34606
34714
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
34607
|
-
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(
|
|
34715
|
+
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(React85__default.Fragment, { children: [
|
|
34608
34716
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
34609
34717
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
34610
34718
|
"a",
|
|
@@ -34962,7 +35070,7 @@ var init_Section = __esm({
|
|
|
34962
35070
|
as: Component = "section"
|
|
34963
35071
|
}) => {
|
|
34964
35072
|
const hasHeader = title || description || action;
|
|
34965
|
-
return
|
|
35073
|
+
return React85__default.createElement(
|
|
34966
35074
|
Component,
|
|
34967
35075
|
{
|
|
34968
35076
|
className: cn(
|
|
@@ -35336,7 +35444,7 @@ var init_WizardContainer = __esm({
|
|
|
35336
35444
|
const isCompleted = index < currentStep;
|
|
35337
35445
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
35338
35446
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
35339
|
-
return /* @__PURE__ */ jsxs(
|
|
35447
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
35340
35448
|
/* @__PURE__ */ jsx(
|
|
35341
35449
|
Button,
|
|
35342
35450
|
{
|
|
@@ -37123,7 +37231,7 @@ var init_ImportPreviewTree = __esm({
|
|
|
37123
37231
|
const renderUnit = (unit, childrenByParent, depth) => {
|
|
37124
37232
|
const summary = fieldSummary(unit);
|
|
37125
37233
|
const children = childrenByParent.get(unit.ref) ?? [];
|
|
37126
|
-
return /* @__PURE__ */ jsxs(
|
|
37234
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
37127
37235
|
/* @__PURE__ */ jsxs(
|
|
37128
37236
|
Box,
|
|
37129
37237
|
{
|
|
@@ -37220,7 +37328,7 @@ var init_ImportProgress = __esm({
|
|
|
37220
37328
|
PIPELINE.map((key, index) => {
|
|
37221
37329
|
const isComplete = index < currentIndex;
|
|
37222
37330
|
const isActive = index === currentIndex;
|
|
37223
|
-
return /* @__PURE__ */ jsxs(
|
|
37331
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
37224
37332
|
index > 0 ? /* @__PURE__ */ jsx(Box, { className: "h-px w-4 bg-border" }) : null,
|
|
37225
37333
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1", "data-testid": `import-progress-step-${key}`, children: [
|
|
37226
37334
|
/* @__PURE__ */ jsx(
|
|
@@ -38322,30 +38430,8 @@ var init_DetailPanel = __esm({
|
|
|
38322
38430
|
DetailPanel.displayName = "DetailPanel";
|
|
38323
38431
|
}
|
|
38324
38432
|
});
|
|
38325
|
-
function DrawGroup(props) {
|
|
38326
|
-
const register = useContext(DrawableRegistryContext);
|
|
38327
|
-
if (register) register({ ...props, type: "draw-group" });
|
|
38328
|
-
return null;
|
|
38329
|
-
}
|
|
38330
|
-
var init_DrawGroup = __esm({
|
|
38331
|
-
"components/game/atoms/DrawGroup.tsx"() {
|
|
38332
|
-
"use client";
|
|
38333
|
-
init_registry();
|
|
38334
|
-
}
|
|
38335
|
-
});
|
|
38336
|
-
function DrawMesh(props) {
|
|
38337
|
-
const register = useContext(DrawableRegistryContext);
|
|
38338
|
-
if (register) register({ ...props, type: "draw-mesh" });
|
|
38339
|
-
return null;
|
|
38340
|
-
}
|
|
38341
|
-
var init_DrawMesh = __esm({
|
|
38342
|
-
"components/game/atoms/DrawMesh.tsx"() {
|
|
38343
|
-
"use client";
|
|
38344
|
-
init_registry();
|
|
38345
|
-
}
|
|
38346
|
-
});
|
|
38347
38433
|
function extractTitle(children) {
|
|
38348
|
-
if (!
|
|
38434
|
+
if (!React85__default.isValidElement(children)) return void 0;
|
|
38349
38435
|
const props = children.props;
|
|
38350
38436
|
if (typeof props.title === "string") {
|
|
38351
38437
|
return props.title;
|
|
@@ -38695,12 +38781,12 @@ var init_Form = __esm({
|
|
|
38695
38781
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
38696
38782
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
38697
38783
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
38698
|
-
const normalizedInitialData =
|
|
38784
|
+
const normalizedInitialData = React85__default.useMemo(() => {
|
|
38699
38785
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
38700
38786
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
38701
38787
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
38702
38788
|
}, [entity, initialData]);
|
|
38703
|
-
const entityDerivedFields =
|
|
38789
|
+
const entityDerivedFields = React85__default.useMemo(() => {
|
|
38704
38790
|
if (fields && fields.length > 0) return void 0;
|
|
38705
38791
|
if (!resolvedEntity) return void 0;
|
|
38706
38792
|
return resolvedEntity.fields.map(
|
|
@@ -38721,16 +38807,16 @@ var init_Form = __esm({
|
|
|
38721
38807
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
38722
38808
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
38723
38809
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
38724
|
-
const [formData, setFormData] =
|
|
38810
|
+
const [formData, setFormData] = React85__default.useState(
|
|
38725
38811
|
normalizedInitialData
|
|
38726
38812
|
);
|
|
38727
|
-
const [collapsedSections, setCollapsedSections] =
|
|
38813
|
+
const [collapsedSections, setCollapsedSections] = React85__default.useState(
|
|
38728
38814
|
/* @__PURE__ */ new Set()
|
|
38729
38815
|
);
|
|
38730
|
-
const [submitError, setSubmitError] =
|
|
38731
|
-
const formRef =
|
|
38816
|
+
const [submitError, setSubmitError] = React85__default.useState(null);
|
|
38817
|
+
const formRef = React85__default.useRef(null);
|
|
38732
38818
|
const formMode = props.mode;
|
|
38733
|
-
const mountedRef =
|
|
38819
|
+
const mountedRef = React85__default.useRef(false);
|
|
38734
38820
|
if (!mountedRef.current) {
|
|
38735
38821
|
mountedRef.current = true;
|
|
38736
38822
|
debug("forms", "mount", {
|
|
@@ -38743,7 +38829,7 @@ var init_Form = __esm({
|
|
|
38743
38829
|
});
|
|
38744
38830
|
}
|
|
38745
38831
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
38746
|
-
const evalContext =
|
|
38832
|
+
const evalContext = React85__default.useMemo(
|
|
38747
38833
|
() => ({
|
|
38748
38834
|
formValues: formData,
|
|
38749
38835
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -38752,7 +38838,7 @@ var init_Form = __esm({
|
|
|
38752
38838
|
}),
|
|
38753
38839
|
[formData, externalContext]
|
|
38754
38840
|
);
|
|
38755
|
-
|
|
38841
|
+
React85__default.useEffect(() => {
|
|
38756
38842
|
debug("forms", "initialData-sync", {
|
|
38757
38843
|
mode: formMode,
|
|
38758
38844
|
normalizedInitialData,
|
|
@@ -38763,7 +38849,7 @@ var init_Form = __esm({
|
|
|
38763
38849
|
setFormData(normalizedInitialData);
|
|
38764
38850
|
}
|
|
38765
38851
|
}, [normalizedInitialData]);
|
|
38766
|
-
const processCalculations =
|
|
38852
|
+
const processCalculations = React85__default.useCallback(
|
|
38767
38853
|
(changedFieldId, newFormData) => {
|
|
38768
38854
|
if (!hiddenCalculations.length) return;
|
|
38769
38855
|
const context = {
|
|
@@ -38788,7 +38874,7 @@ var init_Form = __esm({
|
|
|
38788
38874
|
},
|
|
38789
38875
|
[hiddenCalculations, externalContext, eventBus]
|
|
38790
38876
|
);
|
|
38791
|
-
const checkViolations =
|
|
38877
|
+
const checkViolations = React85__default.useCallback(
|
|
38792
38878
|
(changedFieldId, newFormData) => {
|
|
38793
38879
|
if (!violationTriggers.length) return;
|
|
38794
38880
|
const context = {
|
|
@@ -38826,7 +38912,7 @@ var init_Form = __esm({
|
|
|
38826
38912
|
processCalculations(name, newFormData);
|
|
38827
38913
|
checkViolations(name, newFormData);
|
|
38828
38914
|
};
|
|
38829
|
-
const isFieldVisible =
|
|
38915
|
+
const isFieldVisible = React85__default.useCallback(
|
|
38830
38916
|
(fieldName) => {
|
|
38831
38917
|
const condition = conditionalFields[fieldName];
|
|
38832
38918
|
if (!condition) return true;
|
|
@@ -38834,7 +38920,7 @@ var init_Form = __esm({
|
|
|
38834
38920
|
},
|
|
38835
38921
|
[conditionalFields, evalContext]
|
|
38836
38922
|
);
|
|
38837
|
-
const isSectionVisible =
|
|
38923
|
+
const isSectionVisible = React85__default.useCallback(
|
|
38838
38924
|
(section) => {
|
|
38839
38925
|
if (!section.condition) return true;
|
|
38840
38926
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -38910,7 +38996,7 @@ var init_Form = __esm({
|
|
|
38910
38996
|
eventBus.emit(`UI:${onCancel}`);
|
|
38911
38997
|
}
|
|
38912
38998
|
};
|
|
38913
|
-
const renderField =
|
|
38999
|
+
const renderField = React85__default.useCallback(
|
|
38914
39000
|
(field) => {
|
|
38915
39001
|
const fieldName = field.name || field.field;
|
|
38916
39002
|
if (!fieldName) return null;
|
|
@@ -38931,7 +39017,7 @@ var init_Form = __esm({
|
|
|
38931
39017
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
38932
39018
|
);
|
|
38933
39019
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
38934
|
-
const normalizedFields =
|
|
39020
|
+
const normalizedFields = React85__default.useMemo(() => {
|
|
38935
39021
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
38936
39022
|
return effectiveFields.map((field) => {
|
|
38937
39023
|
if (typeof field === "string") {
|
|
@@ -38955,7 +39041,7 @@ var init_Form = __esm({
|
|
|
38955
39041
|
return field;
|
|
38956
39042
|
});
|
|
38957
39043
|
}, [effectiveFields, resolvedEntity]);
|
|
38958
|
-
const schemaFields =
|
|
39044
|
+
const schemaFields = React85__default.useMemo(() => {
|
|
38959
39045
|
if (normalizedFields.length === 0) return null;
|
|
38960
39046
|
if (isDebugEnabled()) {
|
|
38961
39047
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -38965,7 +39051,7 @@ var init_Form = __esm({
|
|
|
38965
39051
|
}
|
|
38966
39052
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
38967
39053
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
38968
|
-
const sectionElements =
|
|
39054
|
+
const sectionElements = React85__default.useMemo(() => {
|
|
38969
39055
|
if (!sections || sections.length === 0) return null;
|
|
38970
39056
|
return sections.map((section) => {
|
|
38971
39057
|
if (!isSectionVisible(section)) {
|
|
@@ -39691,7 +39777,7 @@ var init_List = __esm({
|
|
|
39691
39777
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
39692
39778
|
return [];
|
|
39693
39779
|
}, [entity]);
|
|
39694
|
-
const getItemActions =
|
|
39780
|
+
const getItemActions = React85__default.useCallback(
|
|
39695
39781
|
(item) => {
|
|
39696
39782
|
if (!itemActions) return [];
|
|
39697
39783
|
if (typeof itemActions === "function") {
|
|
@@ -40172,7 +40258,7 @@ var init_MediaGallery = __esm({
|
|
|
40172
40258
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
40173
40259
|
);
|
|
40174
40260
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
40175
|
-
const items =
|
|
40261
|
+
const items = React85__default.useMemo(() => {
|
|
40176
40262
|
if (propItems && propItems.length > 0) return propItems;
|
|
40177
40263
|
if (entityData.length === 0) return [];
|
|
40178
40264
|
return entityData.map((record, idx) => {
|
|
@@ -40337,7 +40423,7 @@ var init_MediaGallery = __esm({
|
|
|
40337
40423
|
}
|
|
40338
40424
|
});
|
|
40339
40425
|
function extractTitle2(children) {
|
|
40340
|
-
if (!
|
|
40426
|
+
if (!React85__default.isValidElement(children)) return void 0;
|
|
40341
40427
|
const props = children.props;
|
|
40342
40428
|
if (typeof props.title === "string") {
|
|
40343
40429
|
return props.title;
|
|
@@ -40611,7 +40697,7 @@ var init_debugRegistry = __esm({
|
|
|
40611
40697
|
}
|
|
40612
40698
|
});
|
|
40613
40699
|
function useDebugData() {
|
|
40614
|
-
const [data, setData] =
|
|
40700
|
+
const [data, setData] = React85.useState(() => ({
|
|
40615
40701
|
traits: [],
|
|
40616
40702
|
ticks: [],
|
|
40617
40703
|
guards: [],
|
|
@@ -40625,7 +40711,7 @@ function useDebugData() {
|
|
|
40625
40711
|
},
|
|
40626
40712
|
lastUpdate: Date.now()
|
|
40627
40713
|
}));
|
|
40628
|
-
|
|
40714
|
+
React85.useEffect(() => {
|
|
40629
40715
|
const updateData = () => {
|
|
40630
40716
|
setData({
|
|
40631
40717
|
traits: getAllTraits(),
|
|
@@ -40734,12 +40820,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
40734
40820
|
return positions;
|
|
40735
40821
|
}
|
|
40736
40822
|
function WalkMinimap() {
|
|
40737
|
-
const [walkStep, setWalkStep] =
|
|
40738
|
-
const [traits2, setTraits] =
|
|
40739
|
-
const [coveredEdges, setCoveredEdges] =
|
|
40740
|
-
const [completedTraits, setCompletedTraits] =
|
|
40741
|
-
const prevTraitRef =
|
|
40742
|
-
|
|
40823
|
+
const [walkStep, setWalkStep] = React85.useState(null);
|
|
40824
|
+
const [traits2, setTraits] = React85.useState([]);
|
|
40825
|
+
const [coveredEdges, setCoveredEdges] = React85.useState([]);
|
|
40826
|
+
const [completedTraits, setCompletedTraits] = React85.useState(/* @__PURE__ */ new Set());
|
|
40827
|
+
const prevTraitRef = React85.useRef(null);
|
|
40828
|
+
React85.useEffect(() => {
|
|
40743
40829
|
const interval = setInterval(() => {
|
|
40744
40830
|
const w = window;
|
|
40745
40831
|
const step = w.__orbitalWalkStep;
|
|
@@ -41175,15 +41261,15 @@ var init_EntitiesTab = __esm({
|
|
|
41175
41261
|
});
|
|
41176
41262
|
function EventFlowTab({ events: events2 }) {
|
|
41177
41263
|
const { t } = useTranslate();
|
|
41178
|
-
const [filter, setFilter] =
|
|
41179
|
-
const containerRef =
|
|
41180
|
-
const [autoScroll, setAutoScroll] =
|
|
41181
|
-
|
|
41264
|
+
const [filter, setFilter] = React85.useState("all");
|
|
41265
|
+
const containerRef = React85.useRef(null);
|
|
41266
|
+
const [autoScroll, setAutoScroll] = React85.useState(true);
|
|
41267
|
+
React85.useEffect(() => {
|
|
41182
41268
|
if (autoScroll && containerRef.current) {
|
|
41183
41269
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
41184
41270
|
}
|
|
41185
41271
|
}, [events2.length, autoScroll]);
|
|
41186
|
-
const filteredEvents =
|
|
41272
|
+
const filteredEvents = React85.useMemo(() => {
|
|
41187
41273
|
if (filter === "all") return events2;
|
|
41188
41274
|
return events2.filter((e) => e.type === filter);
|
|
41189
41275
|
}, [events2, filter]);
|
|
@@ -41299,7 +41385,7 @@ var init_EventFlowTab = __esm({
|
|
|
41299
41385
|
});
|
|
41300
41386
|
function GuardsPanel({ guards }) {
|
|
41301
41387
|
const { t } = useTranslate();
|
|
41302
|
-
const [filter, setFilter] =
|
|
41388
|
+
const [filter, setFilter] = React85.useState("all");
|
|
41303
41389
|
if (guards.length === 0) {
|
|
41304
41390
|
return /* @__PURE__ */ jsx(
|
|
41305
41391
|
EmptyState,
|
|
@@ -41312,7 +41398,7 @@ function GuardsPanel({ guards }) {
|
|
|
41312
41398
|
}
|
|
41313
41399
|
const passedCount = guards.filter((g) => g.result).length;
|
|
41314
41400
|
const failedCount = guards.length - passedCount;
|
|
41315
|
-
const filteredGuards =
|
|
41401
|
+
const filteredGuards = React85.useMemo(() => {
|
|
41316
41402
|
if (filter === "all") return guards;
|
|
41317
41403
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
41318
41404
|
return guards.filter((g) => !g.result);
|
|
@@ -41475,10 +41561,10 @@ function EffectBadge({ effect }) {
|
|
|
41475
41561
|
}
|
|
41476
41562
|
function TransitionTimeline({ transitions }) {
|
|
41477
41563
|
const { t } = useTranslate();
|
|
41478
|
-
const containerRef =
|
|
41479
|
-
const [autoScroll, setAutoScroll] =
|
|
41480
|
-
const [expandedId, setExpandedId] =
|
|
41481
|
-
|
|
41564
|
+
const containerRef = React85.useRef(null);
|
|
41565
|
+
const [autoScroll, setAutoScroll] = React85.useState(true);
|
|
41566
|
+
const [expandedId, setExpandedId] = React85.useState(null);
|
|
41567
|
+
React85.useEffect(() => {
|
|
41482
41568
|
if (autoScroll && containerRef.current) {
|
|
41483
41569
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
41484
41570
|
}
|
|
@@ -41758,9 +41844,9 @@ function getAllEvents(traits2) {
|
|
|
41758
41844
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
41759
41845
|
const eventBus = useEventBus();
|
|
41760
41846
|
const { t } = useTranslate();
|
|
41761
|
-
const [log9, setLog] =
|
|
41762
|
-
const prevStatesRef =
|
|
41763
|
-
|
|
41847
|
+
const [log9, setLog] = React85.useState([]);
|
|
41848
|
+
const prevStatesRef = React85.useRef(/* @__PURE__ */ new Map());
|
|
41849
|
+
React85.useEffect(() => {
|
|
41764
41850
|
for (const trait of traits2) {
|
|
41765
41851
|
const prev = prevStatesRef.current.get(trait.id);
|
|
41766
41852
|
if (prev && prev !== trait.currentState) {
|
|
@@ -41929,10 +42015,10 @@ function VerifyModePanel({
|
|
|
41929
42015
|
localCount
|
|
41930
42016
|
}) {
|
|
41931
42017
|
const { t } = useTranslate();
|
|
41932
|
-
const [expanded, setExpanded] =
|
|
41933
|
-
const scrollRef =
|
|
41934
|
-
const prevCountRef =
|
|
41935
|
-
|
|
42018
|
+
const [expanded, setExpanded] = React85.useState(true);
|
|
42019
|
+
const scrollRef = React85.useRef(null);
|
|
42020
|
+
const prevCountRef = React85.useRef(0);
|
|
42021
|
+
React85.useEffect(() => {
|
|
41936
42022
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
41937
42023
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
41938
42024
|
}
|
|
@@ -41989,10 +42075,10 @@ function RuntimeDebugger({
|
|
|
41989
42075
|
schema
|
|
41990
42076
|
}) {
|
|
41991
42077
|
const { t } = useTranslate();
|
|
41992
|
-
const [isCollapsed, setIsCollapsed] =
|
|
41993
|
-
const [isVisible, setIsVisible] =
|
|
42078
|
+
const [isCollapsed, setIsCollapsed] = React85.useState(mode === "verify" ? true : defaultCollapsed);
|
|
42079
|
+
const [isVisible, setIsVisible] = React85.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
41994
42080
|
const debugData = useDebugData();
|
|
41995
|
-
|
|
42081
|
+
React85.useEffect(() => {
|
|
41996
42082
|
if (mode === "inline") return;
|
|
41997
42083
|
return onDebugToggle((enabled) => {
|
|
41998
42084
|
setIsVisible(enabled);
|
|
@@ -42001,7 +42087,7 @@ function RuntimeDebugger({
|
|
|
42001
42087
|
}
|
|
42002
42088
|
});
|
|
42003
42089
|
}, [mode]);
|
|
42004
|
-
|
|
42090
|
+
React85.useEffect(() => {
|
|
42005
42091
|
if (mode === "inline") return;
|
|
42006
42092
|
const handleKeyDown = (e) => {
|
|
42007
42093
|
if (e.key === "`" && isVisible) {
|
|
@@ -42521,7 +42607,7 @@ var init_StatCard = __esm({
|
|
|
42521
42607
|
const labelToUse = propLabel ?? propTitle;
|
|
42522
42608
|
const eventBus = useEventBus();
|
|
42523
42609
|
const { t } = useTranslate();
|
|
42524
|
-
const handleActionClick =
|
|
42610
|
+
const handleActionClick = React85__default.useCallback(() => {
|
|
42525
42611
|
if (action?.event) {
|
|
42526
42612
|
eventBus.emit(`UI:${action.event}`, {});
|
|
42527
42613
|
}
|
|
@@ -42532,7 +42618,7 @@ var init_StatCard = __esm({
|
|
|
42532
42618
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
42533
42619
|
const isLoading = externalLoading ?? false;
|
|
42534
42620
|
const error = externalError;
|
|
42535
|
-
const computeMetricValue =
|
|
42621
|
+
const computeMetricValue = React85__default.useCallback(
|
|
42536
42622
|
(metric, items) => {
|
|
42537
42623
|
if (metric.value !== void 0) {
|
|
42538
42624
|
return metric.value;
|
|
@@ -42571,7 +42657,7 @@ var init_StatCard = __esm({
|
|
|
42571
42657
|
},
|
|
42572
42658
|
[]
|
|
42573
42659
|
);
|
|
42574
|
-
const schemaStats =
|
|
42660
|
+
const schemaStats = React85__default.useMemo(() => {
|
|
42575
42661
|
if (!metrics || metrics.length === 0) return null;
|
|
42576
42662
|
return metrics.map((metric) => ({
|
|
42577
42663
|
label: metric.label,
|
|
@@ -42579,7 +42665,7 @@ var init_StatCard = __esm({
|
|
|
42579
42665
|
format: metric.format
|
|
42580
42666
|
}));
|
|
42581
42667
|
}, [metrics, data, computeMetricValue]);
|
|
42582
|
-
const calculatedTrend =
|
|
42668
|
+
const calculatedTrend = React85__default.useMemo(() => {
|
|
42583
42669
|
if (manualTrend !== void 0) return manualTrend;
|
|
42584
42670
|
if (previousValue === void 0 || currentValue === void 0)
|
|
42585
42671
|
return void 0;
|
|
@@ -43219,8 +43305,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
43219
43305
|
] });
|
|
43220
43306
|
};
|
|
43221
43307
|
InlineActivityStream = ({ activities, autoScroll = true, className }) => {
|
|
43222
|
-
const endRef =
|
|
43223
|
-
|
|
43308
|
+
const endRef = React85__default.useRef(null);
|
|
43309
|
+
React85__default.useEffect(() => {
|
|
43224
43310
|
if (!autoScroll) return;
|
|
43225
43311
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
43226
43312
|
}, [activities.length, autoScroll]);
|
|
@@ -43314,7 +43400,7 @@ var init_SubagentTracePanel = __esm({
|
|
|
43314
43400
|
};
|
|
43315
43401
|
SubagentRichCard = ({ subagent }) => {
|
|
43316
43402
|
const { t } = useTranslate();
|
|
43317
|
-
const activities =
|
|
43403
|
+
const activities = React85__default.useMemo(
|
|
43318
43404
|
() => subagentMessagesToActivities(subagent.messages),
|
|
43319
43405
|
[subagent.messages]
|
|
43320
43406
|
);
|
|
@@ -43391,8 +43477,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
43391
43477
|
] });
|
|
43392
43478
|
};
|
|
43393
43479
|
CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
|
|
43394
|
-
const endRef =
|
|
43395
|
-
|
|
43480
|
+
const endRef = React85__default.useRef(null);
|
|
43481
|
+
React85__default.useEffect(() => {
|
|
43396
43482
|
if (!autoScroll) return;
|
|
43397
43483
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
43398
43484
|
}, [messages.length, autoScroll]);
|
|
@@ -43827,7 +43913,7 @@ var init_Timeline = __esm({
|
|
|
43827
43913
|
}) => {
|
|
43828
43914
|
const { t } = useTranslate();
|
|
43829
43915
|
const entityData = entity ?? [];
|
|
43830
|
-
const items =
|
|
43916
|
+
const items = React85__default.useMemo(() => {
|
|
43831
43917
|
if (propItems) return propItems;
|
|
43832
43918
|
if (entityData.length === 0) return [];
|
|
43833
43919
|
return entityData.map((record, idx) => {
|
|
@@ -43929,7 +44015,7 @@ var init_Timeline = __esm({
|
|
|
43929
44015
|
}
|
|
43930
44016
|
});
|
|
43931
44017
|
function extractToastProps(children) {
|
|
43932
|
-
if (!
|
|
44018
|
+
if (!React85__default.isValidElement(children)) {
|
|
43933
44019
|
if (typeof children === "string") {
|
|
43934
44020
|
return { message: children };
|
|
43935
44021
|
}
|
|
@@ -43971,7 +44057,7 @@ var init_ToastSlot = __esm({
|
|
|
43971
44057
|
eventBus.emit(`${prefix}CLOSE`);
|
|
43972
44058
|
};
|
|
43973
44059
|
if (!isVisible) return null;
|
|
43974
|
-
const isCustomContent =
|
|
44060
|
+
const isCustomContent = React85__default.isValidElement(children) && !message;
|
|
43975
44061
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
43976
44062
|
Toast,
|
|
43977
44063
|
{
|
|
@@ -44546,7 +44632,7 @@ function SuspenseConfigProvider({
|
|
|
44546
44632
|
config,
|
|
44547
44633
|
children
|
|
44548
44634
|
}) {
|
|
44549
|
-
return
|
|
44635
|
+
return React85__default.createElement(
|
|
44550
44636
|
SuspenseConfigContext.Provider,
|
|
44551
44637
|
{ value: config },
|
|
44552
44638
|
children
|
|
@@ -44588,7 +44674,7 @@ function enrichFormFields(fields, entityDef) {
|
|
|
44588
44674
|
}
|
|
44589
44675
|
return { name: field, label: humanizeFieldName(field) };
|
|
44590
44676
|
}
|
|
44591
|
-
if (field && typeof field === "object" && !Array.isArray(field) && !
|
|
44677
|
+
if (field && typeof field === "object" && !Array.isArray(field) && !React85__default.isValidElement(field) && !(field instanceof Date)) {
|
|
44592
44678
|
const obj = field;
|
|
44593
44679
|
const fieldName = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
|
|
44594
44680
|
if (!fieldName) return field;
|
|
@@ -45060,7 +45146,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
45060
45146
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
45061
45147
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
45062
45148
|
}
|
|
45063
|
-
return /* @__PURE__ */ jsx(
|
|
45149
|
+
return /* @__PURE__ */ jsx(React85__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
45064
45150
|
}
|
|
45065
45151
|
if (!child || typeof child !== "object") return null;
|
|
45066
45152
|
const childId = `${parentId}-${index}`;
|
|
@@ -45117,14 +45203,14 @@ function isPatternConfig(value) {
|
|
|
45117
45203
|
if (value === null || value === void 0) return false;
|
|
45118
45204
|
if (typeof value !== "object") return false;
|
|
45119
45205
|
if (Array.isArray(value)) return false;
|
|
45120
|
-
if (
|
|
45206
|
+
if (React85__default.isValidElement(value)) return false;
|
|
45121
45207
|
if (value instanceof Date) return false;
|
|
45122
45208
|
if (typeof value === "function") return false;
|
|
45123
45209
|
const record = value;
|
|
45124
45210
|
return "type" in record && typeof record.type === "string" && getComponentForPattern$1(record.type) !== null;
|
|
45125
45211
|
}
|
|
45126
45212
|
function isPlainConfigObject(value) {
|
|
45127
|
-
if (
|
|
45213
|
+
if (React85__default.isValidElement(value)) return false;
|
|
45128
45214
|
if (value instanceof Date) return false;
|
|
45129
45215
|
const proto = Object.getPrototypeOf(value);
|
|
45130
45216
|
return proto === Object.prototype || proto === null;
|
|
@@ -45265,7 +45351,7 @@ function SlotContentRenderer({
|
|
|
45265
45351
|
for (const slotKey of CONTENT_NODE_SLOTS) {
|
|
45266
45352
|
const slotVal = restProps[slotKey];
|
|
45267
45353
|
if (slotVal === void 0 || slotVal === null) continue;
|
|
45268
|
-
if (
|
|
45354
|
+
if (React85__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
|
|
45269
45355
|
const typelessChildren = !Array.isArray(slotVal) && typeof slotVal === "object" && !("type" in slotVal) && Array.isArray(slotVal.children) ? slotVal.children : void 0;
|
|
45270
45356
|
if (typelessChildren !== void 0 || Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
|
|
45271
45357
|
nodeSlotOverrides[slotKey] = renderPatternChildren(
|
|
@@ -45319,7 +45405,7 @@ function SlotContentRenderer({
|
|
|
45319
45405
|
const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
|
|
45320
45406
|
if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
|
|
45321
45407
|
const sample = resolvedItems[0];
|
|
45322
|
-
if (sample && typeof sample === "object" && !Array.isArray(sample) && !
|
|
45408
|
+
if (sample && typeof sample === "object" && !Array.isArray(sample) && !React85__default.isValidElement(sample) && !(sample instanceof Date)) {
|
|
45323
45409
|
const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
|
|
45324
45410
|
finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
|
|
45325
45411
|
}
|
|
@@ -45697,7 +45783,7 @@ function resolveLambdaBindings(body, params, item, index) {
|
|
|
45697
45783
|
}
|
|
45698
45784
|
return substituted;
|
|
45699
45785
|
}
|
|
45700
|
-
if (body !== null && typeof body === "object" && !
|
|
45786
|
+
if (body !== null && typeof body === "object" && !React85__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
45701
45787
|
const out = {};
|
|
45702
45788
|
for (const [k, v] of Object.entries(body)) {
|
|
45703
45789
|
out[k] = recur(v);
|
|
@@ -45730,7 +45816,7 @@ function deferLambdaEntityExprs(value) {
|
|
|
45730
45816
|
}
|
|
45731
45817
|
return arr.map((v) => deferLambdaEntityExprs(v));
|
|
45732
45818
|
}
|
|
45733
|
-
if (value !== null && typeof value === "object" && !
|
|
45819
|
+
if (value !== null && typeof value === "object" && !React85__default.isValidElement(value) && !(value instanceof Date) && typeof value !== "function" && !isRenderBindingMarker(value)) {
|
|
45734
45820
|
const out = {};
|
|
45735
45821
|
for (const [k, v] of Object.entries(value)) {
|
|
45736
45822
|
out[k] = deferLambdaEntityExprs(v);
|
|
@@ -45744,7 +45830,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
45744
45830
|
const resolvedBody = deferLambdaEntityExprs(
|
|
45745
45831
|
resolveLambdaBindings(lambdaBody, params, item, index)
|
|
45746
45832
|
);
|
|
45747
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
45833
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React85__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
45748
45834
|
return null;
|
|
45749
45835
|
}
|
|
45750
45836
|
const record = resolvedBody;
|
|
@@ -45763,7 +45849,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
45763
45849
|
props: childProps,
|
|
45764
45850
|
priority: 0
|
|
45765
45851
|
};
|
|
45766
|
-
return
|
|
45852
|
+
return React85__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
45767
45853
|
};
|
|
45768
45854
|
}
|
|
45769
45855
|
function convertNode(node, callerKey) {
|
|
@@ -45783,7 +45869,7 @@ function convertNode(node, callerKey) {
|
|
|
45783
45869
|
});
|
|
45784
45870
|
return anyChanged ? mapped : node;
|
|
45785
45871
|
}
|
|
45786
|
-
if (typeof node === "object" && !
|
|
45872
|
+
if (typeof node === "object" && !React85__default.isValidElement(node) && !(node instanceof Date)) {
|
|
45787
45873
|
return convertObjectProps(node);
|
|
45788
45874
|
}
|
|
45789
45875
|
return node;
|