@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/avl/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
2
|
+
import * as React94 from 'react';
|
|
3
|
+
import React94__default, { createContext, useState, useMemo, useRef, useEffect, useContext, useCallback, Suspense, useLayoutEffect, Profiler, useReducer, useSyncExternalStore, lazy, useId } from 'react';
|
|
4
4
|
import { getAllPages, matchPathAmong, OrbitalProvider, EventBusContext, useTraitScopeChain, ServerBridgeProvider, VerificationProvider, EntitySchemaProvider, OrbitalThemeProvider, useServerBridge, EntityBindingContext, useEntitySchema, useEntitySchemaOptional, useEntityBindingSnapshot, TraitScopeProvider, useTraitScope, useCurrentPagePath, useGameAudioContextOptional } from '@almadar/ui/providers';
|
|
5
5
|
import { createLogger, setNamespaceLevel, isLogLevelEnabled } from '@almadar/logger';
|
|
6
6
|
import ELK from 'elkjs/lib/elk.bundled.js';
|
|
@@ -3301,7 +3301,7 @@ var init_Typography = __esm({
|
|
|
3301
3301
|
if (format !== void 0 && format !== "none" && (typeof body === "string" || typeof body === "number" || body instanceof Date)) {
|
|
3302
3302
|
body = formatValue(body, format);
|
|
3303
3303
|
}
|
|
3304
|
-
return
|
|
3304
|
+
return React94__default.createElement(
|
|
3305
3305
|
Component,
|
|
3306
3306
|
{
|
|
3307
3307
|
id,
|
|
@@ -3647,7 +3647,7 @@ var init_Box = __esm({
|
|
|
3647
3647
|
fixed: "fixed",
|
|
3648
3648
|
sticky: "sticky"
|
|
3649
3649
|
};
|
|
3650
|
-
Box =
|
|
3650
|
+
Box = React94__default.forwardRef(
|
|
3651
3651
|
({
|
|
3652
3652
|
padding,
|
|
3653
3653
|
paddingX,
|
|
@@ -3712,7 +3712,7 @@ var init_Box = __esm({
|
|
|
3712
3712
|
onPointerDown?.(e);
|
|
3713
3713
|
}, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
|
|
3714
3714
|
const isClickable = action || onClick;
|
|
3715
|
-
return
|
|
3715
|
+
return React94__default.createElement(
|
|
3716
3716
|
Component,
|
|
3717
3717
|
{
|
|
3718
3718
|
ref,
|
|
@@ -3808,7 +3808,7 @@ var init_Stack = __esm({
|
|
|
3808
3808
|
};
|
|
3809
3809
|
const isHorizontal = direction === "horizontal";
|
|
3810
3810
|
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";
|
|
3811
|
-
return
|
|
3811
|
+
return React94__default.createElement(
|
|
3812
3812
|
Component,
|
|
3813
3813
|
{
|
|
3814
3814
|
className: cn(
|
|
@@ -4300,7 +4300,7 @@ var init_MiniStateMachine = __esm({
|
|
|
4300
4300
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
4301
4301
|
const tc = transitionCounts[s.name] ?? 0;
|
|
4302
4302
|
const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
4303
|
-
return /* @__PURE__ */ jsxs(
|
|
4303
|
+
return /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
|
|
4304
4304
|
/* @__PURE__ */ jsx(
|
|
4305
4305
|
AvlState,
|
|
4306
4306
|
{
|
|
@@ -4583,7 +4583,7 @@ function resolveMarkerExpression(expression, entity, config, state) {
|
|
|
4583
4583
|
function isPlainObject(value) {
|
|
4584
4584
|
if (value === null || value === void 0 || typeof value !== "object") return false;
|
|
4585
4585
|
if (Array.isArray(value)) return false;
|
|
4586
|
-
if (
|
|
4586
|
+
if (React94__default.isValidElement(value)) return false;
|
|
4587
4587
|
if (value instanceof Date) return false;
|
|
4588
4588
|
if (typeof value === "function") return false;
|
|
4589
4589
|
return true;
|
|
@@ -4820,7 +4820,7 @@ var init_Icon = __esm({
|
|
|
4820
4820
|
const effectiveName = typeof icon === "string" && icon !== "" ? icon : name;
|
|
4821
4821
|
const effectiveStrokeWidth = strokeWidth != null && strokeWidth > 0 ? strokeWidth : void 0;
|
|
4822
4822
|
const family = useIconFamily();
|
|
4823
|
-
const RenderedComponent =
|
|
4823
|
+
const RenderedComponent = React94__default.useMemo(() => {
|
|
4824
4824
|
if (directIcon) return null;
|
|
4825
4825
|
return effectiveName ? resolveIconForFamily(effectiveName) : null;
|
|
4826
4826
|
}, [directIcon, effectiveName, family]);
|
|
@@ -4944,7 +4944,7 @@ var init_atlasSlice = __esm({
|
|
|
4944
4944
|
}
|
|
4945
4945
|
});
|
|
4946
4946
|
function useAtlasSliceDataUrl(asset) {
|
|
4947
|
-
const [, bump] =
|
|
4947
|
+
const [, bump] = React94.useReducer((x) => x + 1, 0);
|
|
4948
4948
|
if (!isAtlasAsset(asset)) return void 0;
|
|
4949
4949
|
const key = `${asset.atlas}#${asset.sprite}`;
|
|
4950
4950
|
const cached = sliceDataUrlCache.get(key);
|
|
@@ -5007,13 +5007,13 @@ function AtlasImage({
|
|
|
5007
5007
|
style,
|
|
5008
5008
|
"aria-hidden": ariaHidden
|
|
5009
5009
|
}) {
|
|
5010
|
-
const [, bump] =
|
|
5011
|
-
const canvasRef =
|
|
5010
|
+
const [, bump] = React94.useReducer((x) => x + 1, 0);
|
|
5011
|
+
const canvasRef = React94.useRef(null);
|
|
5012
5012
|
const sliced = isAtlasAsset(asset);
|
|
5013
5013
|
const atlas = sliced ? getAtlas(asset.atlas, bump) : void 0;
|
|
5014
5014
|
const img = sliced && asset?.url ? getSheetImage(asset.url, bump) : null;
|
|
5015
5015
|
const rect = sliced && atlas ? subRectFor(atlas, asset.sprite) : null;
|
|
5016
|
-
|
|
5016
|
+
React94.useEffect(() => {
|
|
5017
5017
|
const canvas = canvasRef.current;
|
|
5018
5018
|
if (!canvas || !img || !rect) return;
|
|
5019
5019
|
canvas.width = rect.sw;
|
|
@@ -5089,7 +5089,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
5089
5089
|
const IconComp = value;
|
|
5090
5090
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
5091
5091
|
}
|
|
5092
|
-
if (
|
|
5092
|
+
if (React94__default.isValidElement(value)) {
|
|
5093
5093
|
return value;
|
|
5094
5094
|
}
|
|
5095
5095
|
if (typeof value === "object" && value !== null && isIconLike(value)) {
|
|
@@ -5166,7 +5166,7 @@ var init_Button = __esm({
|
|
|
5166
5166
|
md: "h-icon-default w-icon-default",
|
|
5167
5167
|
lg: "h-icon-default w-icon-default"
|
|
5168
5168
|
};
|
|
5169
|
-
Button =
|
|
5169
|
+
Button = React94__default.forwardRef(
|
|
5170
5170
|
({
|
|
5171
5171
|
className,
|
|
5172
5172
|
variant = "primary",
|
|
@@ -5236,7 +5236,7 @@ var Dialog;
|
|
|
5236
5236
|
var init_Dialog = __esm({
|
|
5237
5237
|
"components/core/atoms/Dialog.tsx"() {
|
|
5238
5238
|
init_cn();
|
|
5239
|
-
Dialog =
|
|
5239
|
+
Dialog = React94__default.forwardRef(
|
|
5240
5240
|
({
|
|
5241
5241
|
role = "dialog",
|
|
5242
5242
|
"aria-modal": ariaModal = true,
|
|
@@ -5799,7 +5799,7 @@ var init_Badge = __esm({
|
|
|
5799
5799
|
md: "px-2.5 py-1 text-sm",
|
|
5800
5800
|
lg: "px-3 py-1.5 text-base"
|
|
5801
5801
|
};
|
|
5802
|
-
Badge =
|
|
5802
|
+
Badge = React94__default.forwardRef(
|
|
5803
5803
|
({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, ...props }, ref) => {
|
|
5804
5804
|
const iconSizes3 = {
|
|
5805
5805
|
sm: "h-icon-default w-icon-default",
|
|
@@ -6149,7 +6149,7 @@ var init_SvgFlow = __esm({
|
|
|
6149
6149
|
width = 100,
|
|
6150
6150
|
height = 100
|
|
6151
6151
|
}) => {
|
|
6152
|
-
const markerId =
|
|
6152
|
+
const markerId = React94__default.useMemo(() => {
|
|
6153
6153
|
flowIdCounter += 1;
|
|
6154
6154
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
6155
6155
|
}, []);
|
|
@@ -6742,7 +6742,7 @@ var init_SvgRing = __esm({
|
|
|
6742
6742
|
width = 100,
|
|
6743
6743
|
height = 100
|
|
6744
6744
|
}) => {
|
|
6745
|
-
const gradientId =
|
|
6745
|
+
const gradientId = React94__default.useMemo(() => {
|
|
6746
6746
|
ringIdCounter += 1;
|
|
6747
6747
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
6748
6748
|
}, []);
|
|
@@ -6923,7 +6923,7 @@ var init_Input = __esm({
|
|
|
6923
6923
|
init_cn();
|
|
6924
6924
|
init_Icon();
|
|
6925
6925
|
init_useEventBus();
|
|
6926
|
-
Input =
|
|
6926
|
+
Input = React94__default.forwardRef(
|
|
6927
6927
|
({
|
|
6928
6928
|
className,
|
|
6929
6929
|
inputType,
|
|
@@ -6947,9 +6947,9 @@ var init_Input = __esm({
|
|
|
6947
6947
|
const eventBus = useEventBus();
|
|
6948
6948
|
const type = inputType || htmlType || "text";
|
|
6949
6949
|
const isDeclarative = typeof onChange === "string";
|
|
6950
|
-
const [localValue, setLocalValue] =
|
|
6951
|
-
const pendingEchoRef =
|
|
6952
|
-
|
|
6950
|
+
const [localValue, setLocalValue] = React94__default.useState(value);
|
|
6951
|
+
const pendingEchoRef = React94__default.useRef(/* @__PURE__ */ new Set());
|
|
6952
|
+
React94__default.useEffect(() => {
|
|
6953
6953
|
if (!isDeclarative) return;
|
|
6954
6954
|
const incoming = value == null ? "" : String(value);
|
|
6955
6955
|
if (pendingEchoRef.current.has(incoming)) {
|
|
@@ -7109,7 +7109,7 @@ var Label;
|
|
|
7109
7109
|
var init_Label = __esm({
|
|
7110
7110
|
"components/core/atoms/Label.tsx"() {
|
|
7111
7111
|
init_cn();
|
|
7112
|
-
Label =
|
|
7112
|
+
Label = React94__default.forwardRef(
|
|
7113
7113
|
({ className, required, children, ...props }, ref) => {
|
|
7114
7114
|
return /* @__PURE__ */ jsxs(
|
|
7115
7115
|
"label",
|
|
@@ -7136,7 +7136,7 @@ var init_Textarea = __esm({
|
|
|
7136
7136
|
"components/core/atoms/Textarea.tsx"() {
|
|
7137
7137
|
init_cn();
|
|
7138
7138
|
init_useEventBus();
|
|
7139
|
-
Textarea =
|
|
7139
|
+
Textarea = React94__default.forwardRef(
|
|
7140
7140
|
({ className, error, onChange, ...props }, ref) => {
|
|
7141
7141
|
const eventBus = useEventBus();
|
|
7142
7142
|
const handleChange = (e) => {
|
|
@@ -7375,7 +7375,7 @@ var init_Select = __esm({
|
|
|
7375
7375
|
init_cn();
|
|
7376
7376
|
init_Icon();
|
|
7377
7377
|
init_useEventBus();
|
|
7378
|
-
Select =
|
|
7378
|
+
Select = React94__default.forwardRef(
|
|
7379
7379
|
(props, _ref) => {
|
|
7380
7380
|
const { multiple, searchable, clearable } = props;
|
|
7381
7381
|
if (multiple || searchable || clearable) {
|
|
@@ -7392,7 +7392,7 @@ var init_Checkbox = __esm({
|
|
|
7392
7392
|
"components/core/atoms/Checkbox.tsx"() {
|
|
7393
7393
|
init_cn();
|
|
7394
7394
|
init_useEventBus();
|
|
7395
|
-
Checkbox =
|
|
7395
|
+
Checkbox = React94__default.forwardRef(
|
|
7396
7396
|
({ className, label, id, onChange, ...props }, ref) => {
|
|
7397
7397
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
7398
7398
|
const eventBus = useEventBus();
|
|
@@ -7446,7 +7446,7 @@ var init_Spinner = __esm({
|
|
|
7446
7446
|
md: "h-6 w-6",
|
|
7447
7447
|
lg: "h-8 w-8"
|
|
7448
7448
|
};
|
|
7449
|
-
Spinner =
|
|
7449
|
+
Spinner = React94__default.forwardRef(
|
|
7450
7450
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
7451
7451
|
if (overlay) {
|
|
7452
7452
|
return /* @__PURE__ */ jsx(
|
|
@@ -7536,7 +7536,7 @@ var init_Card = __esm({
|
|
|
7536
7536
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
7537
7537
|
"tile-image-first": "p-0 overflow-hidden"
|
|
7538
7538
|
};
|
|
7539
|
-
Card =
|
|
7539
|
+
Card = React94__default.forwardRef(
|
|
7540
7540
|
({
|
|
7541
7541
|
className,
|
|
7542
7542
|
variant = "bordered",
|
|
@@ -7585,9 +7585,9 @@ var init_Card = __esm({
|
|
|
7585
7585
|
}
|
|
7586
7586
|
);
|
|
7587
7587
|
Card.displayName = "Card";
|
|
7588
|
-
CardHeader =
|
|
7588
|
+
CardHeader = React94__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
7589
7589
|
CardHeader.displayName = "CardHeader";
|
|
7590
|
-
CardTitle =
|
|
7590
|
+
CardTitle = React94__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7591
7591
|
"h3",
|
|
7592
7592
|
{
|
|
7593
7593
|
ref,
|
|
@@ -7600,11 +7600,11 @@ var init_Card = __esm({
|
|
|
7600
7600
|
}
|
|
7601
7601
|
));
|
|
7602
7602
|
CardTitle.displayName = "CardTitle";
|
|
7603
|
-
CardContent =
|
|
7603
|
+
CardContent = React94__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
7604
7604
|
CardContent.displayName = "CardContent";
|
|
7605
7605
|
CardBody = CardContent;
|
|
7606
7606
|
CardBody.displayName = "CardBody";
|
|
7607
|
-
CardFooter =
|
|
7607
|
+
CardFooter = React94__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7608
7608
|
"div",
|
|
7609
7609
|
{
|
|
7610
7610
|
ref,
|
|
@@ -7691,7 +7691,7 @@ var init_FilterPill = __esm({
|
|
|
7691
7691
|
md: "w-3.5 h-3.5",
|
|
7692
7692
|
lg: "w-4 h-4"
|
|
7693
7693
|
};
|
|
7694
|
-
FilterPill =
|
|
7694
|
+
FilterPill = React94__default.forwardRef(
|
|
7695
7695
|
({
|
|
7696
7696
|
className,
|
|
7697
7697
|
variant = "default",
|
|
@@ -7820,8 +7820,8 @@ var init_Avatar = __esm({
|
|
|
7820
7820
|
actionPayload
|
|
7821
7821
|
}) => {
|
|
7822
7822
|
const eventBus = useEventBus();
|
|
7823
|
-
const [imgFailed, setImgFailed] =
|
|
7824
|
-
|
|
7823
|
+
const [imgFailed, setImgFailed] = React94__default.useState(false);
|
|
7824
|
+
React94__default.useEffect(() => {
|
|
7825
7825
|
setImgFailed(false);
|
|
7826
7826
|
}, [src]);
|
|
7827
7827
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -7934,7 +7934,7 @@ var init_Center = __esm({
|
|
|
7934
7934
|
as: Component = "div"
|
|
7935
7935
|
}) => {
|
|
7936
7936
|
const mergedStyle = minHeight ? { minHeight, ...style } : style;
|
|
7937
|
-
return
|
|
7937
|
+
return React94__default.createElement(Component, {
|
|
7938
7938
|
className: cn(
|
|
7939
7939
|
inline ? "inline-flex" : "flex",
|
|
7940
7940
|
horizontal && "justify-center",
|
|
@@ -8202,7 +8202,7 @@ var init_Radio = __esm({
|
|
|
8202
8202
|
md: "w-2.5 h-2.5",
|
|
8203
8203
|
lg: "w-3 h-3"
|
|
8204
8204
|
};
|
|
8205
|
-
Radio =
|
|
8205
|
+
Radio = React94__default.forwardRef(
|
|
8206
8206
|
({
|
|
8207
8207
|
label,
|
|
8208
8208
|
helperText,
|
|
@@ -8219,12 +8219,12 @@ var init_Radio = __esm({
|
|
|
8219
8219
|
onChange,
|
|
8220
8220
|
...props
|
|
8221
8221
|
}, ref) => {
|
|
8222
|
-
const reactId =
|
|
8222
|
+
const reactId = React94__default.useId();
|
|
8223
8223
|
const baseId = id || `radio-${reactId}`;
|
|
8224
8224
|
const hasError = !!error;
|
|
8225
8225
|
const eventBus = useEventBus();
|
|
8226
|
-
const [selected, setSelected] =
|
|
8227
|
-
|
|
8226
|
+
const [selected, setSelected] = React94__default.useState(value);
|
|
8227
|
+
React94__default.useEffect(() => {
|
|
8228
8228
|
if (value !== void 0) setSelected(value);
|
|
8229
8229
|
}, [value]);
|
|
8230
8230
|
const pick = (next, e) => {
|
|
@@ -8406,7 +8406,7 @@ var init_Switch = __esm({
|
|
|
8406
8406
|
"components/core/atoms/Switch.tsx"() {
|
|
8407
8407
|
"use client";
|
|
8408
8408
|
init_cn();
|
|
8409
|
-
Switch =
|
|
8409
|
+
Switch = React94.forwardRef(
|
|
8410
8410
|
({
|
|
8411
8411
|
checked,
|
|
8412
8412
|
defaultChecked = false,
|
|
@@ -8417,10 +8417,10 @@ var init_Switch = __esm({
|
|
|
8417
8417
|
name,
|
|
8418
8418
|
className
|
|
8419
8419
|
}, ref) => {
|
|
8420
|
-
const [isChecked, setIsChecked] =
|
|
8420
|
+
const [isChecked, setIsChecked] = React94.useState(
|
|
8421
8421
|
checked !== void 0 ? checked : defaultChecked
|
|
8422
8422
|
);
|
|
8423
|
-
|
|
8423
|
+
React94.useEffect(() => {
|
|
8424
8424
|
if (checked !== void 0) {
|
|
8425
8425
|
setIsChecked(checked);
|
|
8426
8426
|
}
|
|
@@ -8698,7 +8698,7 @@ var Aside;
|
|
|
8698
8698
|
var init_Aside = __esm({
|
|
8699
8699
|
"components/core/atoms/Aside.tsx"() {
|
|
8700
8700
|
init_cn();
|
|
8701
|
-
Aside =
|
|
8701
|
+
Aside = React94__default.forwardRef(
|
|
8702
8702
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
8703
8703
|
);
|
|
8704
8704
|
Aside.displayName = "Aside";
|
|
@@ -8777,9 +8777,9 @@ var init_LawReferenceTooltip = __esm({
|
|
|
8777
8777
|
className
|
|
8778
8778
|
}) => {
|
|
8779
8779
|
const { t } = useTranslate();
|
|
8780
|
-
const [isVisible, setIsVisible] =
|
|
8781
|
-
const timeoutRef =
|
|
8782
|
-
const triggerRef =
|
|
8780
|
+
const [isVisible, setIsVisible] = React94__default.useState(false);
|
|
8781
|
+
const timeoutRef = React94__default.useRef(null);
|
|
8782
|
+
const triggerRef = React94__default.useRef(null);
|
|
8783
8783
|
const handleMouseEnter = () => {
|
|
8784
8784
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
8785
8785
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -8790,7 +8790,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
8790
8790
|
};
|
|
8791
8791
|
const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
|
|
8792
8792
|
const open = isVisible || revealed;
|
|
8793
|
-
|
|
8793
|
+
React94__default.useEffect(() => {
|
|
8794
8794
|
return () => {
|
|
8795
8795
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
8796
8796
|
};
|
|
@@ -9000,7 +9000,7 @@ var init_StatusDot = __esm({
|
|
|
9000
9000
|
md: "w-2.5 h-2.5",
|
|
9001
9001
|
lg: "w-3 h-3"
|
|
9002
9002
|
};
|
|
9003
|
-
StatusDot =
|
|
9003
|
+
StatusDot = React94__default.forwardRef(
|
|
9004
9004
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
9005
9005
|
return /* @__PURE__ */ jsx(
|
|
9006
9006
|
"span",
|
|
@@ -9054,7 +9054,7 @@ var init_TrendIndicator = __esm({
|
|
|
9054
9054
|
down: "trending-down",
|
|
9055
9055
|
flat: "arrow-right"
|
|
9056
9056
|
};
|
|
9057
|
-
TrendIndicator =
|
|
9057
|
+
TrendIndicator = React94__default.forwardRef(
|
|
9058
9058
|
({
|
|
9059
9059
|
className,
|
|
9060
9060
|
value,
|
|
@@ -9123,7 +9123,7 @@ var init_RangeSlider = __esm({
|
|
|
9123
9123
|
md: "w-4 h-4",
|
|
9124
9124
|
lg: "w-5 h-5"
|
|
9125
9125
|
};
|
|
9126
|
-
RangeSlider =
|
|
9126
|
+
RangeSlider = React94__default.forwardRef(
|
|
9127
9127
|
({
|
|
9128
9128
|
className,
|
|
9129
9129
|
min = 0,
|
|
@@ -9734,7 +9734,7 @@ var init_ContentSection = __esm({
|
|
|
9734
9734
|
md: "py-16",
|
|
9735
9735
|
lg: "py-24"
|
|
9736
9736
|
};
|
|
9737
|
-
ContentSection =
|
|
9737
|
+
ContentSection = React94__default.forwardRef(
|
|
9738
9738
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
9739
9739
|
return /* @__PURE__ */ jsx(
|
|
9740
9740
|
Box,
|
|
@@ -10268,7 +10268,7 @@ var init_AnimatedReveal = __esm({
|
|
|
10268
10268
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
10269
10269
|
"none": {}
|
|
10270
10270
|
};
|
|
10271
|
-
AnimatedReveal =
|
|
10271
|
+
AnimatedReveal = React94__default.forwardRef(
|
|
10272
10272
|
({
|
|
10273
10273
|
trigger = "scroll",
|
|
10274
10274
|
animation = "fade-up",
|
|
@@ -10428,7 +10428,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
10428
10428
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
10429
10429
|
"use client";
|
|
10430
10430
|
init_cn();
|
|
10431
|
-
AnimatedGraphic =
|
|
10431
|
+
AnimatedGraphic = React94__default.forwardRef(
|
|
10432
10432
|
({
|
|
10433
10433
|
src,
|
|
10434
10434
|
svgContent,
|
|
@@ -10451,7 +10451,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
10451
10451
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
10452
10452
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
10453
10453
|
const prevAnimateRef = useRef(animate);
|
|
10454
|
-
const setRef =
|
|
10454
|
+
const setRef = React94__default.useCallback(
|
|
10455
10455
|
(node) => {
|
|
10456
10456
|
containerRef.current = node;
|
|
10457
10457
|
if (typeof ref === "function") ref(node);
|
|
@@ -11178,9 +11178,9 @@ function ControlButton({
|
|
|
11178
11178
|
className
|
|
11179
11179
|
}) {
|
|
11180
11180
|
const eventBus = useEventBus();
|
|
11181
|
-
const [isPressed, setIsPressed] =
|
|
11181
|
+
const [isPressed, setIsPressed] = React94.useState(false);
|
|
11182
11182
|
const actualPressed = pressed ?? isPressed;
|
|
11183
|
-
const handlePointerDown =
|
|
11183
|
+
const handlePointerDown = React94.useCallback(
|
|
11184
11184
|
(e) => {
|
|
11185
11185
|
e.preventDefault();
|
|
11186
11186
|
if (disabled) return;
|
|
@@ -11190,7 +11190,7 @@ function ControlButton({
|
|
|
11190
11190
|
},
|
|
11191
11191
|
[disabled, pressEvent, eventBus, onPress]
|
|
11192
11192
|
);
|
|
11193
|
-
const handlePointerUp =
|
|
11193
|
+
const handlePointerUp = React94.useCallback(
|
|
11194
11194
|
(e) => {
|
|
11195
11195
|
e.preventDefault();
|
|
11196
11196
|
if (disabled) return;
|
|
@@ -11200,7 +11200,7 @@ function ControlButton({
|
|
|
11200
11200
|
},
|
|
11201
11201
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
11202
11202
|
);
|
|
11203
|
-
const handlePointerLeave =
|
|
11203
|
+
const handlePointerLeave = React94.useCallback(
|
|
11204
11204
|
(e) => {
|
|
11205
11205
|
if (isPressed) {
|
|
11206
11206
|
setIsPressed(false);
|
|
@@ -11458,8 +11458,8 @@ function ControlGrid({
|
|
|
11458
11458
|
className
|
|
11459
11459
|
}) {
|
|
11460
11460
|
const eventBus = useEventBus();
|
|
11461
|
-
const [active, setActive] =
|
|
11462
|
-
const handlePress =
|
|
11461
|
+
const [active, setActive] = React94.useState(/* @__PURE__ */ new Set());
|
|
11462
|
+
const handlePress = React94.useCallback(
|
|
11463
11463
|
(id) => {
|
|
11464
11464
|
setActive((prev) => new Set(prev).add(id));
|
|
11465
11465
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -11473,7 +11473,7 @@ function ControlGrid({
|
|
|
11473
11473
|
},
|
|
11474
11474
|
[kind, actionEvent, directionEvent, directionEvents, eventBus, onAction, onDirection]
|
|
11475
11475
|
);
|
|
11476
|
-
const handleRelease =
|
|
11476
|
+
const handleRelease = React94.useCallback(
|
|
11477
11477
|
(id) => {
|
|
11478
11478
|
setActive((prev) => {
|
|
11479
11479
|
const next = new Set(prev);
|
|
@@ -11831,7 +11831,7 @@ function GameMenu({
|
|
|
11831
11831
|
}) {
|
|
11832
11832
|
const resolvedOptions = (options?.length ? options : void 0) ?? (menuItems?.length ? menuItems : void 0) ?? DEFAULT_MENU_OPTIONS;
|
|
11833
11833
|
const eventBus = useEventBus();
|
|
11834
|
-
const handleOptionClick =
|
|
11834
|
+
const handleOptionClick = React94.useCallback(
|
|
11835
11835
|
(option) => {
|
|
11836
11836
|
if (option.event) {
|
|
11837
11837
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -12067,7 +12067,7 @@ function StateGraph({
|
|
|
12067
12067
|
}) {
|
|
12068
12068
|
const eventBus = useEventBus();
|
|
12069
12069
|
const nodes = states ?? [];
|
|
12070
|
-
const positions =
|
|
12070
|
+
const positions = React94.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
|
|
12071
12071
|
return /* @__PURE__ */ jsxs(
|
|
12072
12072
|
Box,
|
|
12073
12073
|
{
|
|
@@ -12138,8 +12138,8 @@ function MiniMap({
|
|
|
12138
12138
|
tileAssets,
|
|
12139
12139
|
unitAssets
|
|
12140
12140
|
}) {
|
|
12141
|
-
const canvasRef =
|
|
12142
|
-
const imgCacheRef =
|
|
12141
|
+
const canvasRef = React94.useRef(null);
|
|
12142
|
+
const imgCacheRef = React94.useRef(/* @__PURE__ */ new Map());
|
|
12143
12143
|
function loadImg(url) {
|
|
12144
12144
|
const cached = imgCacheRef.current.get(url);
|
|
12145
12145
|
if (cached) return cached.complete ? cached : null;
|
|
@@ -12155,7 +12155,7 @@ function MiniMap({
|
|
|
12155
12155
|
imgCacheRef.current.set(url, img);
|
|
12156
12156
|
return null;
|
|
12157
12157
|
}
|
|
12158
|
-
|
|
12158
|
+
React94.useEffect(() => {
|
|
12159
12159
|
const canvas = canvasRef.current;
|
|
12160
12160
|
if (!canvas) return;
|
|
12161
12161
|
const ctx = canvas.getContext("2d");
|
|
@@ -13138,6 +13138,83 @@ var init_DrawText = __esm({
|
|
|
13138
13138
|
};
|
|
13139
13139
|
}
|
|
13140
13140
|
});
|
|
13141
|
+
function isAnimatedGroup(node) {
|
|
13142
|
+
return Boolean(node.animation && node.animation.durationMs > 0 && node.animation.keyframes.length > 0);
|
|
13143
|
+
}
|
|
13144
|
+
function DrawGroup(props) {
|
|
13145
|
+
const register = useContext(DrawableRegistryContext);
|
|
13146
|
+
if (register) register({ ...props, type: "draw-group" });
|
|
13147
|
+
return null;
|
|
13148
|
+
}
|
|
13149
|
+
var init_DrawGroup = __esm({
|
|
13150
|
+
"components/game/atoms/DrawGroup.tsx"() {
|
|
13151
|
+
"use client";
|
|
13152
|
+
init_registry();
|
|
13153
|
+
}
|
|
13154
|
+
});
|
|
13155
|
+
function applyMeshAnimation(node, timeMs) {
|
|
13156
|
+
const anim = node.animation;
|
|
13157
|
+
if (!anim || !(anim.durationMs > 0) || anim.keyframes.length === 0) return null;
|
|
13158
|
+
const frames = [...anim.keyframes].sort((a, b) => a.at - b.at);
|
|
13159
|
+
const cycle = timeMs / anim.durationMs;
|
|
13160
|
+
const t = anim.loop === false ? Math.min(cycle, 1) : cycle - Math.floor(cycle);
|
|
13161
|
+
const trackValue = (key) => {
|
|
13162
|
+
const defined = frames.filter((f3) => f3[key] !== void 0);
|
|
13163
|
+
if (defined.length === 0) return void 0;
|
|
13164
|
+
let prev;
|
|
13165
|
+
let next;
|
|
13166
|
+
for (const f3 of defined) {
|
|
13167
|
+
if (f3.at <= t) prev = f3;
|
|
13168
|
+
else if (!next) next = f3;
|
|
13169
|
+
}
|
|
13170
|
+
if (!prev) return defined[0][key];
|
|
13171
|
+
if (!next) return prev[key];
|
|
13172
|
+
const span = next.at - prev.at;
|
|
13173
|
+
const k = span > 0 ? (t - prev.at) / span : 1;
|
|
13174
|
+
const a = prev[key];
|
|
13175
|
+
const b = next[key];
|
|
13176
|
+
if (typeof a === "number" && typeof b === "number") return lerp2(a, b, k);
|
|
13177
|
+
return a;
|
|
13178
|
+
};
|
|
13179
|
+
const num = {};
|
|
13180
|
+
for (const key of NUMERIC_TRACKS2) {
|
|
13181
|
+
const v = trackValue(key);
|
|
13182
|
+
if (v !== void 0) num[key] = v;
|
|
13183
|
+
}
|
|
13184
|
+
return {
|
|
13185
|
+
offset: [num.offsetX ?? 0, num.offsetY ?? 0, num.offsetZ ?? 0],
|
|
13186
|
+
rotate: [num.rotateX ?? 0, num.rotateY ?? 0, num.rotateZ ?? 0],
|
|
13187
|
+
scale: num.scale ?? 1,
|
|
13188
|
+
opacity: num.opacity,
|
|
13189
|
+
emissiveIntensity: num.emissiveIntensity,
|
|
13190
|
+
color: trackValue("color"),
|
|
13191
|
+
emissive: trackValue("emissive")
|
|
13192
|
+
};
|
|
13193
|
+
}
|
|
13194
|
+
function DrawMesh(props) {
|
|
13195
|
+
const register = useContext(DrawableRegistryContext);
|
|
13196
|
+
if (register) register({ ...props, type: "draw-mesh" });
|
|
13197
|
+
return null;
|
|
13198
|
+
}
|
|
13199
|
+
var lerp2, NUMERIC_TRACKS2;
|
|
13200
|
+
var init_DrawMesh = __esm({
|
|
13201
|
+
"components/game/atoms/DrawMesh.tsx"() {
|
|
13202
|
+
"use client";
|
|
13203
|
+
init_registry();
|
|
13204
|
+
lerp2 = (a, b, k) => a + (b - a) * k;
|
|
13205
|
+
NUMERIC_TRACKS2 = [
|
|
13206
|
+
"offsetX",
|
|
13207
|
+
"offsetY",
|
|
13208
|
+
"offsetZ",
|
|
13209
|
+
"rotateX",
|
|
13210
|
+
"rotateY",
|
|
13211
|
+
"rotateZ",
|
|
13212
|
+
"scale",
|
|
13213
|
+
"opacity",
|
|
13214
|
+
"emissiveIntensity"
|
|
13215
|
+
];
|
|
13216
|
+
}
|
|
13217
|
+
});
|
|
13141
13218
|
|
|
13142
13219
|
// components/game/molecules/DrawSpriteLayer.tsx
|
|
13143
13220
|
function DrawSpriteLayer(_props) {
|
|
@@ -13204,18 +13281,22 @@ function paintDrawable(painter, node, dctx) {
|
|
|
13204
13281
|
if (!isValidScenePos(node.position)) break;
|
|
13205
13282
|
if (!Array.isArray(node.items)) break;
|
|
13206
13283
|
const p = dctx.projector.project(node.position);
|
|
13284
|
+
const anim = dctx.time > 0 && isAnimatedGroup(node) ? applyMeshAnimation(node, dctx.time) : null;
|
|
13285
|
+
const tw = dctx.projector.tileWidth;
|
|
13207
13286
|
painter.save();
|
|
13208
|
-
painter.translate(p.x, p.y);
|
|
13209
|
-
|
|
13210
|
-
if (
|
|
13211
|
-
|
|
13287
|
+
painter.translate(p.x + (anim ? anim.offset[0] * tw : 0), p.y + (anim ? anim.offset[1] * tw : 0));
|
|
13288
|
+
const scale = (node.scale ?? 1) * (anim?.scale ?? 1);
|
|
13289
|
+
if (scale !== 1) painter.scale(scale, scale);
|
|
13290
|
+
const rotate = (node.rotate ?? 0) + (node.rotation?.[2] ?? 0) + (anim?.rotate[2] ?? 0);
|
|
13291
|
+
if (rotate !== 0) painter.rotate(rotate);
|
|
13292
|
+
const opacity = (node.opacity ?? 1) * (anim?.opacity ?? 1);
|
|
13293
|
+
if (opacity !== 1) painter.setAlpha(opacity);
|
|
13212
13294
|
if (node.clip) {
|
|
13213
|
-
const tw = dctx.projector.tileWidth;
|
|
13214
13295
|
painter.scale(tw, tw);
|
|
13215
13296
|
painter.clipPath(node.clip);
|
|
13216
13297
|
painter.scale(1 / tw, 1 / tw);
|
|
13217
13298
|
}
|
|
13218
|
-
const childCtx =
|
|
13299
|
+
const childCtx = scale !== 1 ? { ...dctx, groupScale: (dctx.groupScale ?? 1) * scale } : dctx;
|
|
13219
13300
|
for (const item of node.items) paintDrawable(painter, item, childCtx);
|
|
13220
13301
|
painter.restore();
|
|
13221
13302
|
break;
|
|
@@ -13241,6 +13322,8 @@ var init_paintDispatch = __esm({
|
|
|
13241
13322
|
init_DrawSprite();
|
|
13242
13323
|
init_DrawShape();
|
|
13243
13324
|
init_DrawText();
|
|
13325
|
+
init_DrawGroup();
|
|
13326
|
+
init_DrawMesh();
|
|
13244
13327
|
init_DrawSpriteLayer();
|
|
13245
13328
|
init_DrawShapeLayer();
|
|
13246
13329
|
init_DrawTextLayer();
|
|
@@ -13336,7 +13419,7 @@ function Canvas2D({
|
|
|
13336
13419
|
const registerChildDrawable = useCallback((node) => {
|
|
13337
13420
|
childDrawablesRef.current.push(node);
|
|
13338
13421
|
}, []);
|
|
13339
|
-
const hasJsxChildren =
|
|
13422
|
+
const hasJsxChildren = React94.Children.count(children) > 0;
|
|
13340
13423
|
function isDrawableLayer(node) {
|
|
13341
13424
|
return node.type === "draw-sprite-layer" || node.type === "draw-shape-layer" || node.type === "draw-text-layer";
|
|
13342
13425
|
}
|
|
@@ -13487,7 +13570,8 @@ function Canvas2D({
|
|
|
13487
13570
|
const miniMapHeight = gridExtent.height || 10;
|
|
13488
13571
|
const drawableIsAnimated = (node) => {
|
|
13489
13572
|
if (node.type === "draw-shape") return isAnimatedShape(node);
|
|
13490
|
-
if (node.type === "draw-group")
|
|
13573
|
+
if (node.type === "draw-group")
|
|
13574
|
+
return isAnimatedGroup(node) || Array.isArray(node.items) && node.items.some(drawableIsAnimated);
|
|
13491
13575
|
if (node.type === "draw-shape-layer") return Array.isArray(node.items) && node.items.some(isAnimatedShape);
|
|
13492
13576
|
return false;
|
|
13493
13577
|
};
|
|
@@ -13829,6 +13913,7 @@ var init_Canvas2D = __esm({
|
|
|
13829
13913
|
init_projector();
|
|
13830
13914
|
init_paintDispatch();
|
|
13831
13915
|
init_DrawShape();
|
|
13916
|
+
init_DrawGroup();
|
|
13832
13917
|
init_registry();
|
|
13833
13918
|
init_hitTest();
|
|
13834
13919
|
init_isometric();
|
|
@@ -13865,6 +13950,8 @@ function Canvas({
|
|
|
13865
13950
|
showCoordinates,
|
|
13866
13951
|
showTileInfo,
|
|
13867
13952
|
fogOfWar,
|
|
13953
|
+
lighting,
|
|
13954
|
+
post,
|
|
13868
13955
|
tileClickEvent,
|
|
13869
13956
|
unitClickEvent,
|
|
13870
13957
|
tileHoverEvent,
|
|
@@ -13876,10 +13963,25 @@ function Canvas({
|
|
|
13876
13963
|
}) {
|
|
13877
13964
|
canvasLog.debug("Canvas render", { mode, drawablesCount: drawables?.length, projection, camera: camera ? JSON.stringify(camera) : void 0 });
|
|
13878
13965
|
const zoom = camera?.zoom;
|
|
13966
|
+
const childDrawablesRef = useRef([]);
|
|
13967
|
+
if (mode === "3d") childDrawablesRef.current = [];
|
|
13968
|
+
const registerChildDrawable = useCallback((node) => {
|
|
13969
|
+
childDrawablesRef.current.push(node);
|
|
13970
|
+
}, []);
|
|
13971
|
+
const [childDrawables, setChildDrawables] = useState([]);
|
|
13972
|
+
useEffect(() => {
|
|
13973
|
+
if (mode !== "3d") return;
|
|
13974
|
+
const next = childDrawablesRef.current;
|
|
13975
|
+
canvasLog.debug("children:adopt", { registered: next.length, adopted: childDrawables.length });
|
|
13976
|
+
if (next.length === 0 && React94.Children.count(children) > 0) return;
|
|
13977
|
+
setChildDrawables(
|
|
13978
|
+
(prev) => prev.length === next.length && JSON.stringify(prev) === JSON.stringify(next) ? prev : [...next]
|
|
13979
|
+
);
|
|
13980
|
+
});
|
|
13879
13981
|
if (mode === "3d") {
|
|
13880
13982
|
const props3d = {
|
|
13881
13983
|
className,
|
|
13882
|
-
drawables,
|
|
13984
|
+
drawables: [...drawables ?? [], ...childDrawables],
|
|
13883
13985
|
isLoading,
|
|
13884
13986
|
cameraMode: to3DCameraMode(camera?.mode),
|
|
13885
13987
|
...zoom !== void 0 ? { scale: zoom } : {},
|
|
@@ -13895,6 +13997,8 @@ function Canvas({
|
|
|
13895
13997
|
showCoordinates,
|
|
13896
13998
|
showTileInfo,
|
|
13897
13999
|
fogOfWar,
|
|
14000
|
+
lighting,
|
|
14001
|
+
post,
|
|
13898
14002
|
tileClickEvent,
|
|
13899
14003
|
unitClickEvent,
|
|
13900
14004
|
tileHoverEvent,
|
|
@@ -13903,7 +14007,10 @@ function Canvas({
|
|
|
13903
14007
|
keyMap,
|
|
13904
14008
|
keyUpMap
|
|
13905
14009
|
};
|
|
13906
|
-
return /* @__PURE__ */
|
|
14010
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
14011
|
+
/* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(Canvas3DHost, { ...props3d }) }),
|
|
14012
|
+
React94.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 }) })
|
|
14013
|
+
] });
|
|
13907
14014
|
}
|
|
13908
14015
|
return /* @__PURE__ */ jsx(
|
|
13909
14016
|
Canvas2D,
|
|
@@ -13935,6 +14042,7 @@ var Canvas3DHost, canvasLog;
|
|
|
13935
14042
|
var init_Canvas = __esm({
|
|
13936
14043
|
"components/game/molecules/Canvas.tsx"() {
|
|
13937
14044
|
"use client";
|
|
14045
|
+
init_registry();
|
|
13938
14046
|
init_Canvas2D();
|
|
13939
14047
|
Canvas3DHost = lazy(
|
|
13940
14048
|
() => import('@almadar/ui/components/molecules/game/three').then((m) => ({ default: m.Canvas3DHost }))
|
|
@@ -14059,7 +14167,7 @@ function LinearView({
|
|
|
14059
14167
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
14060
14168
|
const isDone = i < currentIdx;
|
|
14061
14169
|
const isCurrent = i === currentIdx;
|
|
14062
|
-
return /* @__PURE__ */ jsxs(
|
|
14170
|
+
return /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
|
|
14063
14171
|
i > 0 && /* @__PURE__ */ jsx(
|
|
14064
14172
|
Typography,
|
|
14065
14173
|
{
|
|
@@ -14594,7 +14702,7 @@ function SequenceBar({
|
|
|
14594
14702
|
else onSlotRemove?.(index);
|
|
14595
14703
|
}, [emit, slotRemoveEvent, onSlotRemove, playing]);
|
|
14596
14704
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
14597
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
14705
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
|
|
14598
14706
|
i > 0 && /* @__PURE__ */ jsx(
|
|
14599
14707
|
Typography,
|
|
14600
14708
|
{
|
|
@@ -15243,7 +15351,7 @@ var init_ErrorBoundary = __esm({
|
|
|
15243
15351
|
}
|
|
15244
15352
|
);
|
|
15245
15353
|
};
|
|
15246
|
-
ErrorBoundary = class extends
|
|
15354
|
+
ErrorBoundary = class extends React94__default.Component {
|
|
15247
15355
|
constructor(props) {
|
|
15248
15356
|
super(props);
|
|
15249
15357
|
__publicField(this, "reset", () => {
|
|
@@ -15512,7 +15620,7 @@ var init_Container = __esm({
|
|
|
15512
15620
|
as: Component = "div"
|
|
15513
15621
|
}) => {
|
|
15514
15622
|
const resolvedSize = maxWidth ?? size ?? "lg";
|
|
15515
|
-
return
|
|
15623
|
+
return React94__default.createElement(
|
|
15516
15624
|
Component,
|
|
15517
15625
|
{
|
|
15518
15626
|
className: cn(
|
|
@@ -17650,7 +17758,7 @@ var init_CodeBlock = __esm({
|
|
|
17650
17758
|
DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
|
|
17651
17759
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
17652
17760
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
17653
|
-
CodeBlock =
|
|
17761
|
+
CodeBlock = React94__default.memo(
|
|
17654
17762
|
({
|
|
17655
17763
|
code: rawCode,
|
|
17656
17764
|
language = "text",
|
|
@@ -18238,7 +18346,7 @@ var init_MarkdownContent = __esm({
|
|
|
18238
18346
|
init_Box();
|
|
18239
18347
|
init_CodeBlock();
|
|
18240
18348
|
init_cn();
|
|
18241
|
-
MarkdownContent =
|
|
18349
|
+
MarkdownContent = React94__default.memo(
|
|
18242
18350
|
({ content, direction = "ltr", className }) => {
|
|
18243
18351
|
const { t: _t } = useTranslate();
|
|
18244
18352
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -19565,7 +19673,7 @@ var init_StateMachineView = __esm({
|
|
|
19565
19673
|
style: { top: title ? 30 : 0 },
|
|
19566
19674
|
children: [
|
|
19567
19675
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
19568
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
19676
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React94__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
19569
19677
|
StateNode2,
|
|
19570
19678
|
{
|
|
19571
19679
|
state,
|
|
@@ -25387,8 +25495,8 @@ var init_Menu = __esm({
|
|
|
25387
25495
|
"bottom-end": "bottom-start"
|
|
25388
25496
|
};
|
|
25389
25497
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
25390
|
-
const triggerChild =
|
|
25391
|
-
const triggerElement =
|
|
25498
|
+
const triggerChild = React94__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
25499
|
+
const triggerElement = React94__default.cloneElement(
|
|
25392
25500
|
triggerChild,
|
|
25393
25501
|
{
|
|
25394
25502
|
ref: triggerRef,
|
|
@@ -25483,14 +25591,14 @@ function useDataDnd(args) {
|
|
|
25483
25591
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
25484
25592
|
const enabled = isZone || Boolean(dndRoot);
|
|
25485
25593
|
const eventBus = useEventBus();
|
|
25486
|
-
const parentRoot =
|
|
25594
|
+
const parentRoot = React94__default.useContext(RootCtx);
|
|
25487
25595
|
const isRoot = enabled && parentRoot === null;
|
|
25488
|
-
const zoneId =
|
|
25596
|
+
const zoneId = React94__default.useId();
|
|
25489
25597
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
25490
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
25491
|
-
const optimisticOrdersRef =
|
|
25598
|
+
const [optimisticOrders, setOptimisticOrders] = React94__default.useState(() => /* @__PURE__ */ new Map());
|
|
25599
|
+
const optimisticOrdersRef = React94__default.useRef(optimisticOrders);
|
|
25492
25600
|
optimisticOrdersRef.current = optimisticOrders;
|
|
25493
|
-
const clearOptimisticOrder =
|
|
25601
|
+
const clearOptimisticOrder = React94__default.useCallback((group) => {
|
|
25494
25602
|
setOptimisticOrders((prev) => {
|
|
25495
25603
|
if (!prev.has(group)) return prev;
|
|
25496
25604
|
const next = new Map(prev);
|
|
@@ -25515,7 +25623,7 @@ function useDataDnd(args) {
|
|
|
25515
25623
|
const raw = it[dndItemIdField];
|
|
25516
25624
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
25517
25625
|
}).join("|");
|
|
25518
|
-
const itemIds =
|
|
25626
|
+
const itemIds = React94__default.useMemo(
|
|
25519
25627
|
() => orderedItems.map((it, idx) => {
|
|
25520
25628
|
const raw = it[dndItemIdField];
|
|
25521
25629
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
@@ -25526,7 +25634,7 @@ function useDataDnd(args) {
|
|
|
25526
25634
|
const raw = it[dndItemIdField];
|
|
25527
25635
|
return raw != null ? String(raw) : `__${idx}`;
|
|
25528
25636
|
}).join("|");
|
|
25529
|
-
|
|
25637
|
+
React94__default.useEffect(() => {
|
|
25530
25638
|
const root = isRoot ? null : parentRoot;
|
|
25531
25639
|
if (root) {
|
|
25532
25640
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -25534,20 +25642,20 @@ function useDataDnd(args) {
|
|
|
25534
25642
|
clearOptimisticOrder(ownGroup);
|
|
25535
25643
|
}
|
|
25536
25644
|
}, [itemsContentSig, ownGroup]);
|
|
25537
|
-
const zonesRef =
|
|
25538
|
-
const registerZone =
|
|
25645
|
+
const zonesRef = React94__default.useRef(/* @__PURE__ */ new Map());
|
|
25646
|
+
const registerZone = React94__default.useCallback((zoneId2, meta2) => {
|
|
25539
25647
|
zonesRef.current.set(zoneId2, meta2);
|
|
25540
25648
|
}, []);
|
|
25541
|
-
const unregisterZone =
|
|
25649
|
+
const unregisterZone = React94__default.useCallback((zoneId2) => {
|
|
25542
25650
|
zonesRef.current.delete(zoneId2);
|
|
25543
25651
|
}, []);
|
|
25544
|
-
const [activeDrag, setActiveDrag] =
|
|
25545
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
25546
|
-
const meta =
|
|
25652
|
+
const [activeDrag, setActiveDrag] = React94__default.useState(null);
|
|
25653
|
+
const [overZoneGroup, setOverZoneGroup] = React94__default.useState(null);
|
|
25654
|
+
const meta = React94__default.useMemo(
|
|
25547
25655
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
25548
25656
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
25549
25657
|
);
|
|
25550
|
-
|
|
25658
|
+
React94__default.useEffect(() => {
|
|
25551
25659
|
const target = isRoot ? null : parentRoot;
|
|
25552
25660
|
if (!target) {
|
|
25553
25661
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -25566,7 +25674,7 @@ function useDataDnd(args) {
|
|
|
25566
25674
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
25567
25675
|
const sensors = useAlmadarDndSensors(true);
|
|
25568
25676
|
const collisionDetection = almadarDndCollisionDetection;
|
|
25569
|
-
const findZoneByItem =
|
|
25677
|
+
const findZoneByItem = React94__default.useCallback(
|
|
25570
25678
|
(id) => {
|
|
25571
25679
|
for (const z of zonesRef.current.values()) {
|
|
25572
25680
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -25575,7 +25683,7 @@ function useDataDnd(args) {
|
|
|
25575
25683
|
},
|
|
25576
25684
|
[]
|
|
25577
25685
|
);
|
|
25578
|
-
|
|
25686
|
+
React94__default.useCallback(
|
|
25579
25687
|
(group) => {
|
|
25580
25688
|
for (const z of zonesRef.current.values()) {
|
|
25581
25689
|
if (z.group === group) return z;
|
|
@@ -25584,7 +25692,7 @@ function useDataDnd(args) {
|
|
|
25584
25692
|
},
|
|
25585
25693
|
[]
|
|
25586
25694
|
);
|
|
25587
|
-
const handleDragEnd =
|
|
25695
|
+
const handleDragEnd = React94__default.useCallback(
|
|
25588
25696
|
(event) => {
|
|
25589
25697
|
const { active, over } = event;
|
|
25590
25698
|
const activeIdStr = String(active.id);
|
|
@@ -25675,8 +25783,8 @@ function useDataDnd(args) {
|
|
|
25675
25783
|
},
|
|
25676
25784
|
[eventBus]
|
|
25677
25785
|
);
|
|
25678
|
-
const sortableData =
|
|
25679
|
-
const SortableItem =
|
|
25786
|
+
const sortableData = React94__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
25787
|
+
const SortableItem = React94__default.useCallback(
|
|
25680
25788
|
({ id, children }) => {
|
|
25681
25789
|
const {
|
|
25682
25790
|
attributes,
|
|
@@ -25716,7 +25824,7 @@ function useDataDnd(args) {
|
|
|
25716
25824
|
id: droppableId,
|
|
25717
25825
|
data: sortableData
|
|
25718
25826
|
});
|
|
25719
|
-
const ctx =
|
|
25827
|
+
const ctx = React94__default.useContext(RootCtx);
|
|
25720
25828
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
25721
25829
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
25722
25830
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -25731,7 +25839,7 @@ function useDataDnd(args) {
|
|
|
25731
25839
|
showForeignPlaceholder,
|
|
25732
25840
|
ctxAvailable: ctx != null
|
|
25733
25841
|
});
|
|
25734
|
-
|
|
25842
|
+
React94__default.useEffect(() => {
|
|
25735
25843
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
25736
25844
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
25737
25845
|
return /* @__PURE__ */ jsx(
|
|
@@ -25745,11 +25853,11 @@ function useDataDnd(args) {
|
|
|
25745
25853
|
}
|
|
25746
25854
|
);
|
|
25747
25855
|
};
|
|
25748
|
-
const rootContextValue =
|
|
25856
|
+
const rootContextValue = React94__default.useMemo(
|
|
25749
25857
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
25750
25858
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
25751
25859
|
);
|
|
25752
|
-
const handleDragStart =
|
|
25860
|
+
const handleDragStart = React94__default.useCallback((event) => {
|
|
25753
25861
|
const sourceZone = findZoneByItem(event.active.id);
|
|
25754
25862
|
const rect = event.active.rect.current.initial;
|
|
25755
25863
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -25768,7 +25876,7 @@ function useDataDnd(args) {
|
|
|
25768
25876
|
isRoot
|
|
25769
25877
|
});
|
|
25770
25878
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
25771
|
-
const handleDragOver =
|
|
25879
|
+
const handleDragOver = React94__default.useCallback((event) => {
|
|
25772
25880
|
const { active, over } = event;
|
|
25773
25881
|
const overData = over?.data?.current;
|
|
25774
25882
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -25838,7 +25946,7 @@ function useDataDnd(args) {
|
|
|
25838
25946
|
return next;
|
|
25839
25947
|
});
|
|
25840
25948
|
}, []);
|
|
25841
|
-
const handleDragCancel =
|
|
25949
|
+
const handleDragCancel = React94__default.useCallback((event) => {
|
|
25842
25950
|
setActiveDrag(null);
|
|
25843
25951
|
setOverZoneGroup(null);
|
|
25844
25952
|
dndLog.warn("dragCancel", {
|
|
@@ -25846,12 +25954,12 @@ function useDataDnd(args) {
|
|
|
25846
25954
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
25847
25955
|
});
|
|
25848
25956
|
}, []);
|
|
25849
|
-
const handleDragEndWithCleanup =
|
|
25957
|
+
const handleDragEndWithCleanup = React94__default.useCallback((event) => {
|
|
25850
25958
|
handleDragEnd(event);
|
|
25851
25959
|
setActiveDrag(null);
|
|
25852
25960
|
setOverZoneGroup(null);
|
|
25853
25961
|
}, [handleDragEnd]);
|
|
25854
|
-
const wrapContainer =
|
|
25962
|
+
const wrapContainer = React94__default.useCallback(
|
|
25855
25963
|
(children) => {
|
|
25856
25964
|
if (!enabled) return children;
|
|
25857
25965
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -25905,7 +26013,7 @@ var init_useDataDnd = __esm({
|
|
|
25905
26013
|
init_useAlmadarDndCollision();
|
|
25906
26014
|
init_Box();
|
|
25907
26015
|
dndLog = createLogger("almadar:ui:dnd");
|
|
25908
|
-
RootCtx =
|
|
26016
|
+
RootCtx = React94__default.createContext(null);
|
|
25909
26017
|
}
|
|
25910
26018
|
});
|
|
25911
26019
|
function renderIconInput(icon, props) {
|
|
@@ -26447,7 +26555,7 @@ function DataList({
|
|
|
26447
26555
|
}) {
|
|
26448
26556
|
const eventBus = useEventBus();
|
|
26449
26557
|
const { t } = useTranslate();
|
|
26450
|
-
const [visibleCount, setVisibleCount] =
|
|
26558
|
+
const [visibleCount, setVisibleCount] = React94__default.useState(pageSize || Infinity);
|
|
26451
26559
|
const fieldDefs = fields ?? columns ?? [];
|
|
26452
26560
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
26453
26561
|
const dnd = useDataDnd({
|
|
@@ -26463,14 +26571,14 @@ function DataList({
|
|
|
26463
26571
|
dndRoot
|
|
26464
26572
|
});
|
|
26465
26573
|
const orderedData = dnd.orderedItems;
|
|
26466
|
-
const allData =
|
|
26574
|
+
const allData = React94__default.useMemo(
|
|
26467
26575
|
() => sortRows(orderedData, sortBy, sortDirection),
|
|
26468
26576
|
[orderedData, sortBy, sortDirection]
|
|
26469
26577
|
);
|
|
26470
26578
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
26471
26579
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
26472
26580
|
const hasRenderProp = typeof children === "function";
|
|
26473
|
-
|
|
26581
|
+
React94__default.useEffect(() => {
|
|
26474
26582
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
26475
26583
|
const childrenTypeOf = typeof children;
|
|
26476
26584
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -26585,7 +26693,7 @@ function DataList({
|
|
|
26585
26693
|
return v === void 0 || v === null || v === "" ? raw : String(v);
|
|
26586
26694
|
};
|
|
26587
26695
|
return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("py-2", className), children: [
|
|
26588
|
-
groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
26696
|
+
groups2.map((group, gi) => /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
|
|
26589
26697
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
26590
26698
|
group.items.map((itemData, index) => {
|
|
26591
26699
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -26784,7 +26892,7 @@ function DataList({
|
|
|
26784
26892
|
className
|
|
26785
26893
|
),
|
|
26786
26894
|
children: [
|
|
26787
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
26895
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
|
|
26788
26896
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
26789
26897
|
group.items.map(
|
|
26790
26898
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -26871,7 +26979,7 @@ var init_FormSection = __esm({
|
|
|
26871
26979
|
columns = 1,
|
|
26872
26980
|
className
|
|
26873
26981
|
}) => {
|
|
26874
|
-
const [collapsed, setCollapsed] =
|
|
26982
|
+
const [collapsed, setCollapsed] = React94__default.useState(defaultCollapsed);
|
|
26875
26983
|
const { t } = useTranslate();
|
|
26876
26984
|
const eventBus = useEventBus();
|
|
26877
26985
|
const gridClass = {
|
|
@@ -26879,7 +26987,7 @@ var init_FormSection = __esm({
|
|
|
26879
26987
|
2: "grid-cols-1 md:grid-cols-2",
|
|
26880
26988
|
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
26881
26989
|
}[columns];
|
|
26882
|
-
|
|
26990
|
+
React94__default.useCallback(() => {
|
|
26883
26991
|
if (collapsible) {
|
|
26884
26992
|
setCollapsed((prev) => !prev);
|
|
26885
26993
|
eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
|
|
@@ -27924,7 +28032,7 @@ var init_Flex = __esm({
|
|
|
27924
28032
|
flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
|
|
27925
28033
|
}
|
|
27926
28034
|
}
|
|
27927
|
-
return
|
|
28035
|
+
return React94__default.createElement(Component, {
|
|
27928
28036
|
className: cn(
|
|
27929
28037
|
inline ? "inline-flex" : "flex",
|
|
27930
28038
|
directionStyles[direction],
|
|
@@ -28043,7 +28151,7 @@ var init_Grid = __esm({
|
|
|
28043
28151
|
as: Component = "div"
|
|
28044
28152
|
}) => {
|
|
28045
28153
|
const mergedStyle = rows ? { gridTemplateRows: `repeat(${rows}, minmax(0, 1fr))`, ...style } : style;
|
|
28046
|
-
return
|
|
28154
|
+
return React94__default.createElement(
|
|
28047
28155
|
Component,
|
|
28048
28156
|
{
|
|
28049
28157
|
className: cn(
|
|
@@ -28275,9 +28383,9 @@ var init_Popover = __esm({
|
|
|
28275
28383
|
onMouseLeave: handleClose,
|
|
28276
28384
|
onPointerDown: tapTriggerProps.onPointerDown
|
|
28277
28385
|
};
|
|
28278
|
-
const childElement =
|
|
28386
|
+
const childElement = React94__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
28279
28387
|
const childPointerDown = childElement.props.onPointerDown;
|
|
28280
|
-
const triggerElement =
|
|
28388
|
+
const triggerElement = React94__default.cloneElement(
|
|
28281
28389
|
childElement,
|
|
28282
28390
|
{
|
|
28283
28391
|
ref: triggerRef,
|
|
@@ -28886,9 +28994,9 @@ var init_Tooltip = __esm({
|
|
|
28886
28994
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
28887
28995
|
};
|
|
28888
28996
|
}, []);
|
|
28889
|
-
const triggerElement =
|
|
28997
|
+
const triggerElement = React94__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
28890
28998
|
const childPointerDown = triggerElement.props.onPointerDown;
|
|
28891
|
-
const trigger =
|
|
28999
|
+
const trigger = React94__default.cloneElement(triggerElement, {
|
|
28892
29000
|
ref: triggerRef,
|
|
28893
29001
|
onMouseEnter: handleMouseEnter,
|
|
28894
29002
|
onMouseLeave: handleMouseLeave,
|
|
@@ -28978,7 +29086,7 @@ var init_WizardProgress = __esm({
|
|
|
28978
29086
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
28979
29087
|
const isActive = index === currentStep;
|
|
28980
29088
|
const isCompleted = index < currentStep;
|
|
28981
|
-
return /* @__PURE__ */ jsxs(
|
|
29089
|
+
return /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
|
|
28982
29090
|
/* @__PURE__ */ jsx(
|
|
28983
29091
|
"button",
|
|
28984
29092
|
{
|
|
@@ -30613,13 +30721,13 @@ var init_MapView = __esm({
|
|
|
30613
30721
|
shadowSize: [41, 41]
|
|
30614
30722
|
});
|
|
30615
30723
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
30616
|
-
const { useEffect:
|
|
30724
|
+
const { useEffect: useEffect64, useRef: useRef64, useCallback: useCallback96, useState: useState100 } = React94__default;
|
|
30617
30725
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
30618
30726
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
30619
30727
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
30620
30728
|
const map = useMap();
|
|
30621
|
-
const prevRef =
|
|
30622
|
-
|
|
30729
|
+
const prevRef = useRef64({ centerLat, centerLng, zoom });
|
|
30730
|
+
useEffect64(() => {
|
|
30623
30731
|
const prev = prevRef.current;
|
|
30624
30732
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
30625
30733
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -30630,7 +30738,7 @@ var init_MapView = __esm({
|
|
|
30630
30738
|
}
|
|
30631
30739
|
function MapClickHandler({ onMapClick }) {
|
|
30632
30740
|
const map = useMap();
|
|
30633
|
-
|
|
30741
|
+
useEffect64(() => {
|
|
30634
30742
|
if (!onMapClick) return;
|
|
30635
30743
|
const handler = (e) => {
|
|
30636
30744
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -30658,8 +30766,8 @@ var init_MapView = __esm({
|
|
|
30658
30766
|
showAttribution = true
|
|
30659
30767
|
}) {
|
|
30660
30768
|
const eventBus = useEventBus2();
|
|
30661
|
-
const [clickedPosition, setClickedPosition] =
|
|
30662
|
-
const handleMapClick =
|
|
30769
|
+
const [clickedPosition, setClickedPosition] = useState100(null);
|
|
30770
|
+
const handleMapClick = useCallback96((lat, lng) => {
|
|
30663
30771
|
if (showClickedPin) {
|
|
30664
30772
|
setClickedPosition({ lat, lng });
|
|
30665
30773
|
}
|
|
@@ -30668,7 +30776,7 @@ var init_MapView = __esm({
|
|
|
30668
30776
|
eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
|
|
30669
30777
|
}
|
|
30670
30778
|
}, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
|
|
30671
|
-
const handleMarkerClick =
|
|
30779
|
+
const handleMarkerClick = useCallback96((marker) => {
|
|
30672
30780
|
onMarkerClick?.(marker);
|
|
30673
30781
|
if (markerClickEvent) {
|
|
30674
30782
|
eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
|
|
@@ -31531,8 +31639,8 @@ function TableView({
|
|
|
31531
31639
|
}) {
|
|
31532
31640
|
const eventBus = useEventBus();
|
|
31533
31641
|
const { t } = useTranslate();
|
|
31534
|
-
const [visibleCount, setVisibleCount] =
|
|
31535
|
-
const [localSelected, setLocalSelected] =
|
|
31642
|
+
const [visibleCount, setVisibleCount] = React94__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
31643
|
+
const [localSelected, setLocalSelected] = React94__default.useState(/* @__PURE__ */ new Set());
|
|
31536
31644
|
const colDefs = (Array.isArray(columns) ? columns : void 0) ?? (Array.isArray(fields) ? fields : void 0) ?? [];
|
|
31537
31645
|
const actionDefs = Array.isArray(itemActions) ? itemActions : [];
|
|
31538
31646
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
@@ -31554,7 +31662,7 @@ function TableView({
|
|
|
31554
31662
|
const hasRenderProp = typeof children === "function";
|
|
31555
31663
|
const idField = dndItemIdField ?? "id";
|
|
31556
31664
|
const isCoarsePointer = useMediaQuery("(pointer: coarse)");
|
|
31557
|
-
|
|
31665
|
+
React94__default.useEffect(() => {
|
|
31558
31666
|
tableViewLog.debug("render", {
|
|
31559
31667
|
rowCount: data.length,
|
|
31560
31668
|
colCount: colDefs.length,
|
|
@@ -31611,7 +31719,7 @@ function TableView({
|
|
|
31611
31719
|
};
|
|
31612
31720
|
eventBus.emit(`UI:${itemClickEvent}`, payload);
|
|
31613
31721
|
};
|
|
31614
|
-
const colFloors =
|
|
31722
|
+
const colFloors = React94__default.useMemo(
|
|
31615
31723
|
() => colDefs.map((col) => {
|
|
31616
31724
|
const longest = data.reduce((widest, row) => {
|
|
31617
31725
|
const cell = formatCell(asFieldValue(getNestedValue(row, col.field ?? col.key)), col.format);
|
|
@@ -31773,12 +31881,12 @@ function TableView({
|
|
|
31773
31881
|
]
|
|
31774
31882
|
}
|
|
31775
31883
|
);
|
|
31776
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
31884
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React94__default.Fragment, { children: rowInner }, id);
|
|
31777
31885
|
};
|
|
31778
31886
|
const items = Array.from(data);
|
|
31779
31887
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
31780
31888
|
let runningIndex = 0;
|
|
31781
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
31889
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
|
|
31782
31890
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
31783
31891
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
31784
31892
|
] }, gi)) });
|
|
@@ -33141,7 +33249,7 @@ var init_StepFlow = __esm({
|
|
|
33141
33249
|
className
|
|
33142
33250
|
}) => {
|
|
33143
33251
|
if (orientation === "vertical") {
|
|
33144
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
33252
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React94__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
33145
33253
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
33146
33254
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
33147
33255
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -33152,7 +33260,7 @@ var init_StepFlow = __esm({
|
|
|
33152
33260
|
] })
|
|
33153
33261
|
] }) }, index)) });
|
|
33154
33262
|
}
|
|
33155
|
-
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(
|
|
33263
|
+
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(React94__default.Fragment, { children: [
|
|
33156
33264
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
33157
33265
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
33158
33266
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -34142,7 +34250,7 @@ var init_LikertScale = __esm({
|
|
|
34142
34250
|
md: "text-base",
|
|
34143
34251
|
lg: "text-lg"
|
|
34144
34252
|
};
|
|
34145
|
-
LikertScale =
|
|
34253
|
+
LikertScale = React94__default.forwardRef(
|
|
34146
34254
|
({
|
|
34147
34255
|
question,
|
|
34148
34256
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -34154,7 +34262,7 @@ var init_LikertScale = __esm({
|
|
|
34154
34262
|
variant = "radios",
|
|
34155
34263
|
className
|
|
34156
34264
|
}, ref) => {
|
|
34157
|
-
const groupId =
|
|
34265
|
+
const groupId = React94__default.useId();
|
|
34158
34266
|
const eventBus = useEventBus();
|
|
34159
34267
|
const handleSelect = useCallback(
|
|
34160
34268
|
(next) => {
|
|
@@ -36443,7 +36551,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
36443
36551
|
"aria-label": t("aria.breadcrumb"),
|
|
36444
36552
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
36445
36553
|
const isLast = idx === items.length - 1;
|
|
36446
|
-
return /* @__PURE__ */ jsxs(
|
|
36554
|
+
return /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
|
|
36447
36555
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
36448
36556
|
Icon,
|
|
36449
36557
|
{
|
|
@@ -37107,7 +37215,7 @@ var init_PageHeader = __esm({
|
|
|
37107
37215
|
info: "bg-info/10 text-info"
|
|
37108
37216
|
};
|
|
37109
37217
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
37110
|
-
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(
|
|
37218
|
+
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(React94__default.Fragment, { children: [
|
|
37111
37219
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
37112
37220
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
37113
37221
|
"a",
|
|
@@ -37465,7 +37573,7 @@ var init_Section = __esm({
|
|
|
37465
37573
|
as: Component = "section"
|
|
37466
37574
|
}) => {
|
|
37467
37575
|
const hasHeader = title || description || action;
|
|
37468
|
-
return
|
|
37576
|
+
return React94__default.createElement(
|
|
37469
37577
|
Component,
|
|
37470
37578
|
{
|
|
37471
37579
|
className: cn(
|
|
@@ -37839,7 +37947,7 @@ var init_WizardContainer = __esm({
|
|
|
37839
37947
|
const isCompleted = index < currentStep;
|
|
37840
37948
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
37841
37949
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
37842
|
-
return /* @__PURE__ */ jsxs(
|
|
37950
|
+
return /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
|
|
37843
37951
|
/* @__PURE__ */ jsx(
|
|
37844
37952
|
Button,
|
|
37845
37953
|
{
|
|
@@ -39626,7 +39734,7 @@ var init_ImportPreviewTree = __esm({
|
|
|
39626
39734
|
const renderUnit = (unit, childrenByParent, depth) => {
|
|
39627
39735
|
const summary = fieldSummary(unit);
|
|
39628
39736
|
const children = childrenByParent.get(unit.ref) ?? [];
|
|
39629
|
-
return /* @__PURE__ */ jsxs(
|
|
39737
|
+
return /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
|
|
39630
39738
|
/* @__PURE__ */ jsxs(
|
|
39631
39739
|
Box,
|
|
39632
39740
|
{
|
|
@@ -39723,7 +39831,7 @@ var init_ImportProgress = __esm({
|
|
|
39723
39831
|
PIPELINE.map((key, index) => {
|
|
39724
39832
|
const isComplete = index < currentIndex;
|
|
39725
39833
|
const isActive = index === currentIndex;
|
|
39726
|
-
return /* @__PURE__ */ jsxs(
|
|
39834
|
+
return /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
|
|
39727
39835
|
index > 0 ? /* @__PURE__ */ jsx(Box, { className: "h-px w-4 bg-border" }) : null,
|
|
39728
39836
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1", "data-testid": `import-progress-step-${key}`, children: [
|
|
39729
39837
|
/* @__PURE__ */ jsx(
|
|
@@ -40825,30 +40933,8 @@ var init_DetailPanel = __esm({
|
|
|
40825
40933
|
DetailPanel.displayName = "DetailPanel";
|
|
40826
40934
|
}
|
|
40827
40935
|
});
|
|
40828
|
-
function DrawGroup(props) {
|
|
40829
|
-
const register = useContext(DrawableRegistryContext);
|
|
40830
|
-
if (register) register({ ...props, type: "draw-group" });
|
|
40831
|
-
return null;
|
|
40832
|
-
}
|
|
40833
|
-
var init_DrawGroup = __esm({
|
|
40834
|
-
"components/game/atoms/DrawGroup.tsx"() {
|
|
40835
|
-
"use client";
|
|
40836
|
-
init_registry();
|
|
40837
|
-
}
|
|
40838
|
-
});
|
|
40839
|
-
function DrawMesh(props) {
|
|
40840
|
-
const register = useContext(DrawableRegistryContext);
|
|
40841
|
-
if (register) register({ ...props, type: "draw-mesh" });
|
|
40842
|
-
return null;
|
|
40843
|
-
}
|
|
40844
|
-
var init_DrawMesh = __esm({
|
|
40845
|
-
"components/game/atoms/DrawMesh.tsx"() {
|
|
40846
|
-
"use client";
|
|
40847
|
-
init_registry();
|
|
40848
|
-
}
|
|
40849
|
-
});
|
|
40850
40936
|
function extractTitle(children) {
|
|
40851
|
-
if (!
|
|
40937
|
+
if (!React94__default.isValidElement(children)) return void 0;
|
|
40852
40938
|
const props = children.props;
|
|
40853
40939
|
if (typeof props.title === "string") {
|
|
40854
40940
|
return props.title;
|
|
@@ -41198,12 +41284,12 @@ var init_Form = __esm({
|
|
|
41198
41284
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
41199
41285
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
41200
41286
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
41201
|
-
const normalizedInitialData =
|
|
41287
|
+
const normalizedInitialData = React94__default.useMemo(() => {
|
|
41202
41288
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
41203
41289
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
41204
41290
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
41205
41291
|
}, [entity, initialData]);
|
|
41206
|
-
const entityDerivedFields =
|
|
41292
|
+
const entityDerivedFields = React94__default.useMemo(() => {
|
|
41207
41293
|
if (fields && fields.length > 0) return void 0;
|
|
41208
41294
|
if (!resolvedEntity) return void 0;
|
|
41209
41295
|
return resolvedEntity.fields.map(
|
|
@@ -41224,16 +41310,16 @@ var init_Form = __esm({
|
|
|
41224
41310
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
41225
41311
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
41226
41312
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
41227
|
-
const [formData, setFormData] =
|
|
41313
|
+
const [formData, setFormData] = React94__default.useState(
|
|
41228
41314
|
normalizedInitialData
|
|
41229
41315
|
);
|
|
41230
|
-
const [collapsedSections, setCollapsedSections] =
|
|
41316
|
+
const [collapsedSections, setCollapsedSections] = React94__default.useState(
|
|
41231
41317
|
/* @__PURE__ */ new Set()
|
|
41232
41318
|
);
|
|
41233
|
-
const [submitError, setSubmitError] =
|
|
41234
|
-
const formRef =
|
|
41319
|
+
const [submitError, setSubmitError] = React94__default.useState(null);
|
|
41320
|
+
const formRef = React94__default.useRef(null);
|
|
41235
41321
|
const formMode = props.mode;
|
|
41236
|
-
const mountedRef =
|
|
41322
|
+
const mountedRef = React94__default.useRef(false);
|
|
41237
41323
|
if (!mountedRef.current) {
|
|
41238
41324
|
mountedRef.current = true;
|
|
41239
41325
|
debug("forms", "mount", {
|
|
@@ -41246,7 +41332,7 @@ var init_Form = __esm({
|
|
|
41246
41332
|
});
|
|
41247
41333
|
}
|
|
41248
41334
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
41249
|
-
const evalContext =
|
|
41335
|
+
const evalContext = React94__default.useMemo(
|
|
41250
41336
|
() => ({
|
|
41251
41337
|
formValues: formData,
|
|
41252
41338
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -41255,7 +41341,7 @@ var init_Form = __esm({
|
|
|
41255
41341
|
}),
|
|
41256
41342
|
[formData, externalContext]
|
|
41257
41343
|
);
|
|
41258
|
-
|
|
41344
|
+
React94__default.useEffect(() => {
|
|
41259
41345
|
debug("forms", "initialData-sync", {
|
|
41260
41346
|
mode: formMode,
|
|
41261
41347
|
normalizedInitialData,
|
|
@@ -41266,7 +41352,7 @@ var init_Form = __esm({
|
|
|
41266
41352
|
setFormData(normalizedInitialData);
|
|
41267
41353
|
}
|
|
41268
41354
|
}, [normalizedInitialData]);
|
|
41269
|
-
const processCalculations =
|
|
41355
|
+
const processCalculations = React94__default.useCallback(
|
|
41270
41356
|
(changedFieldId, newFormData) => {
|
|
41271
41357
|
if (!hiddenCalculations.length) return;
|
|
41272
41358
|
const context = {
|
|
@@ -41291,7 +41377,7 @@ var init_Form = __esm({
|
|
|
41291
41377
|
},
|
|
41292
41378
|
[hiddenCalculations, externalContext, eventBus]
|
|
41293
41379
|
);
|
|
41294
|
-
const checkViolations =
|
|
41380
|
+
const checkViolations = React94__default.useCallback(
|
|
41295
41381
|
(changedFieldId, newFormData) => {
|
|
41296
41382
|
if (!violationTriggers.length) return;
|
|
41297
41383
|
const context = {
|
|
@@ -41329,7 +41415,7 @@ var init_Form = __esm({
|
|
|
41329
41415
|
processCalculations(name, newFormData);
|
|
41330
41416
|
checkViolations(name, newFormData);
|
|
41331
41417
|
};
|
|
41332
|
-
const isFieldVisible =
|
|
41418
|
+
const isFieldVisible = React94__default.useCallback(
|
|
41333
41419
|
(fieldName) => {
|
|
41334
41420
|
const condition = conditionalFields[fieldName];
|
|
41335
41421
|
if (!condition) return true;
|
|
@@ -41337,7 +41423,7 @@ var init_Form = __esm({
|
|
|
41337
41423
|
},
|
|
41338
41424
|
[conditionalFields, evalContext]
|
|
41339
41425
|
);
|
|
41340
|
-
const isSectionVisible =
|
|
41426
|
+
const isSectionVisible = React94__default.useCallback(
|
|
41341
41427
|
(section) => {
|
|
41342
41428
|
if (!section.condition) return true;
|
|
41343
41429
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -41413,7 +41499,7 @@ var init_Form = __esm({
|
|
|
41413
41499
|
eventBus.emit(`UI:${onCancel}`);
|
|
41414
41500
|
}
|
|
41415
41501
|
};
|
|
41416
|
-
const renderField =
|
|
41502
|
+
const renderField = React94__default.useCallback(
|
|
41417
41503
|
(field) => {
|
|
41418
41504
|
const fieldName = field.name || field.field;
|
|
41419
41505
|
if (!fieldName) return null;
|
|
@@ -41434,7 +41520,7 @@ var init_Form = __esm({
|
|
|
41434
41520
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
41435
41521
|
);
|
|
41436
41522
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
41437
|
-
const normalizedFields =
|
|
41523
|
+
const normalizedFields = React94__default.useMemo(() => {
|
|
41438
41524
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
41439
41525
|
return effectiveFields.map((field) => {
|
|
41440
41526
|
if (typeof field === "string") {
|
|
@@ -41458,7 +41544,7 @@ var init_Form = __esm({
|
|
|
41458
41544
|
return field;
|
|
41459
41545
|
});
|
|
41460
41546
|
}, [effectiveFields, resolvedEntity]);
|
|
41461
|
-
const schemaFields =
|
|
41547
|
+
const schemaFields = React94__default.useMemo(() => {
|
|
41462
41548
|
if (normalizedFields.length === 0) return null;
|
|
41463
41549
|
if (isDebugEnabled()) {
|
|
41464
41550
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -41468,7 +41554,7 @@ var init_Form = __esm({
|
|
|
41468
41554
|
}
|
|
41469
41555
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
41470
41556
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
41471
|
-
const sectionElements =
|
|
41557
|
+
const sectionElements = React94__default.useMemo(() => {
|
|
41472
41558
|
if (!sections || sections.length === 0) return null;
|
|
41473
41559
|
return sections.map((section) => {
|
|
41474
41560
|
if (!isSectionVisible(section)) {
|
|
@@ -42194,7 +42280,7 @@ var init_List = __esm({
|
|
|
42194
42280
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
42195
42281
|
return [];
|
|
42196
42282
|
}, [entity]);
|
|
42197
|
-
const getItemActions =
|
|
42283
|
+
const getItemActions = React94__default.useCallback(
|
|
42198
42284
|
(item) => {
|
|
42199
42285
|
if (!itemActions) return [];
|
|
42200
42286
|
if (typeof itemActions === "function") {
|
|
@@ -42675,7 +42761,7 @@ var init_MediaGallery = __esm({
|
|
|
42675
42761
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
42676
42762
|
);
|
|
42677
42763
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
42678
|
-
const items =
|
|
42764
|
+
const items = React94__default.useMemo(() => {
|
|
42679
42765
|
if (propItems && propItems.length > 0) return propItems;
|
|
42680
42766
|
if (entityData.length === 0) return [];
|
|
42681
42767
|
return entityData.map((record, idx) => {
|
|
@@ -42840,7 +42926,7 @@ var init_MediaGallery = __esm({
|
|
|
42840
42926
|
}
|
|
42841
42927
|
});
|
|
42842
42928
|
function extractTitle2(children) {
|
|
42843
|
-
if (!
|
|
42929
|
+
if (!React94__default.isValidElement(children)) return void 0;
|
|
42844
42930
|
const props = children.props;
|
|
42845
42931
|
if (typeof props.title === "string") {
|
|
42846
42932
|
return props.title;
|
|
@@ -43114,7 +43200,7 @@ var init_debugRegistry = __esm({
|
|
|
43114
43200
|
}
|
|
43115
43201
|
});
|
|
43116
43202
|
function useDebugData() {
|
|
43117
|
-
const [data, setData] =
|
|
43203
|
+
const [data, setData] = React94.useState(() => ({
|
|
43118
43204
|
traits: [],
|
|
43119
43205
|
ticks: [],
|
|
43120
43206
|
guards: [],
|
|
@@ -43128,7 +43214,7 @@ function useDebugData() {
|
|
|
43128
43214
|
},
|
|
43129
43215
|
lastUpdate: Date.now()
|
|
43130
43216
|
}));
|
|
43131
|
-
|
|
43217
|
+
React94.useEffect(() => {
|
|
43132
43218
|
const updateData = () => {
|
|
43133
43219
|
setData({
|
|
43134
43220
|
traits: getAllTraits(),
|
|
@@ -43237,12 +43323,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
43237
43323
|
return positions;
|
|
43238
43324
|
}
|
|
43239
43325
|
function WalkMinimap() {
|
|
43240
|
-
const [walkStep, setWalkStep] =
|
|
43241
|
-
const [traits2, setTraits] =
|
|
43242
|
-
const [coveredEdges, setCoveredEdges] =
|
|
43243
|
-
const [completedTraits, setCompletedTraits] =
|
|
43244
|
-
const prevTraitRef =
|
|
43245
|
-
|
|
43326
|
+
const [walkStep, setWalkStep] = React94.useState(null);
|
|
43327
|
+
const [traits2, setTraits] = React94.useState([]);
|
|
43328
|
+
const [coveredEdges, setCoveredEdges] = React94.useState([]);
|
|
43329
|
+
const [completedTraits, setCompletedTraits] = React94.useState(/* @__PURE__ */ new Set());
|
|
43330
|
+
const prevTraitRef = React94.useRef(null);
|
|
43331
|
+
React94.useEffect(() => {
|
|
43246
43332
|
const interval = setInterval(() => {
|
|
43247
43333
|
const w = window;
|
|
43248
43334
|
const step = w.__orbitalWalkStep;
|
|
@@ -43678,15 +43764,15 @@ var init_EntitiesTab = __esm({
|
|
|
43678
43764
|
});
|
|
43679
43765
|
function EventFlowTab({ events: events2 }) {
|
|
43680
43766
|
const { t } = useTranslate();
|
|
43681
|
-
const [filter, setFilter] =
|
|
43682
|
-
const containerRef =
|
|
43683
|
-
const [autoScroll, setAutoScroll] =
|
|
43684
|
-
|
|
43767
|
+
const [filter, setFilter] = React94.useState("all");
|
|
43768
|
+
const containerRef = React94.useRef(null);
|
|
43769
|
+
const [autoScroll, setAutoScroll] = React94.useState(true);
|
|
43770
|
+
React94.useEffect(() => {
|
|
43685
43771
|
if (autoScroll && containerRef.current) {
|
|
43686
43772
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
43687
43773
|
}
|
|
43688
43774
|
}, [events2.length, autoScroll]);
|
|
43689
|
-
const filteredEvents =
|
|
43775
|
+
const filteredEvents = React94.useMemo(() => {
|
|
43690
43776
|
if (filter === "all") return events2;
|
|
43691
43777
|
return events2.filter((e) => e.type === filter);
|
|
43692
43778
|
}, [events2, filter]);
|
|
@@ -43802,7 +43888,7 @@ var init_EventFlowTab = __esm({
|
|
|
43802
43888
|
});
|
|
43803
43889
|
function GuardsPanel({ guards }) {
|
|
43804
43890
|
const { t } = useTranslate();
|
|
43805
|
-
const [filter, setFilter] =
|
|
43891
|
+
const [filter, setFilter] = React94.useState("all");
|
|
43806
43892
|
if (guards.length === 0) {
|
|
43807
43893
|
return /* @__PURE__ */ jsx(
|
|
43808
43894
|
EmptyState,
|
|
@@ -43815,7 +43901,7 @@ function GuardsPanel({ guards }) {
|
|
|
43815
43901
|
}
|
|
43816
43902
|
const passedCount = guards.filter((g) => g.result).length;
|
|
43817
43903
|
const failedCount = guards.length - passedCount;
|
|
43818
|
-
const filteredGuards =
|
|
43904
|
+
const filteredGuards = React94.useMemo(() => {
|
|
43819
43905
|
if (filter === "all") return guards;
|
|
43820
43906
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
43821
43907
|
return guards.filter((g) => !g.result);
|
|
@@ -43978,10 +44064,10 @@ function EffectBadge({ effect }) {
|
|
|
43978
44064
|
}
|
|
43979
44065
|
function TransitionTimeline({ transitions }) {
|
|
43980
44066
|
const { t } = useTranslate();
|
|
43981
|
-
const containerRef =
|
|
43982
|
-
const [autoScroll, setAutoScroll] =
|
|
43983
|
-
const [expandedId, setExpandedId] =
|
|
43984
|
-
|
|
44067
|
+
const containerRef = React94.useRef(null);
|
|
44068
|
+
const [autoScroll, setAutoScroll] = React94.useState(true);
|
|
44069
|
+
const [expandedId, setExpandedId] = React94.useState(null);
|
|
44070
|
+
React94.useEffect(() => {
|
|
43985
44071
|
if (autoScroll && containerRef.current) {
|
|
43986
44072
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
43987
44073
|
}
|
|
@@ -44261,9 +44347,9 @@ function getAllEvents(traits2) {
|
|
|
44261
44347
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
44262
44348
|
const eventBus = useEventBus();
|
|
44263
44349
|
const { t } = useTranslate();
|
|
44264
|
-
const [log11, setLog] =
|
|
44265
|
-
const prevStatesRef =
|
|
44266
|
-
|
|
44350
|
+
const [log11, setLog] = React94.useState([]);
|
|
44351
|
+
const prevStatesRef = React94.useRef(/* @__PURE__ */ new Map());
|
|
44352
|
+
React94.useEffect(() => {
|
|
44267
44353
|
for (const trait of traits2) {
|
|
44268
44354
|
const prev = prevStatesRef.current.get(trait.id);
|
|
44269
44355
|
if (prev && prev !== trait.currentState) {
|
|
@@ -44432,10 +44518,10 @@ function VerifyModePanel({
|
|
|
44432
44518
|
localCount
|
|
44433
44519
|
}) {
|
|
44434
44520
|
const { t } = useTranslate();
|
|
44435
|
-
const [expanded, setExpanded] =
|
|
44436
|
-
const scrollRef =
|
|
44437
|
-
const prevCountRef =
|
|
44438
|
-
|
|
44521
|
+
const [expanded, setExpanded] = React94.useState(true);
|
|
44522
|
+
const scrollRef = React94.useRef(null);
|
|
44523
|
+
const prevCountRef = React94.useRef(0);
|
|
44524
|
+
React94.useEffect(() => {
|
|
44439
44525
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
44440
44526
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
44441
44527
|
}
|
|
@@ -44492,10 +44578,10 @@ function RuntimeDebugger({
|
|
|
44492
44578
|
schema
|
|
44493
44579
|
}) {
|
|
44494
44580
|
const { t } = useTranslate();
|
|
44495
|
-
const [isCollapsed, setIsCollapsed] =
|
|
44496
|
-
const [isVisible, setIsVisible] =
|
|
44581
|
+
const [isCollapsed, setIsCollapsed] = React94.useState(mode === "verify" ? true : defaultCollapsed);
|
|
44582
|
+
const [isVisible, setIsVisible] = React94.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
44497
44583
|
const debugData = useDebugData();
|
|
44498
|
-
|
|
44584
|
+
React94.useEffect(() => {
|
|
44499
44585
|
if (mode === "inline") return;
|
|
44500
44586
|
return onDebugToggle((enabled) => {
|
|
44501
44587
|
setIsVisible(enabled);
|
|
@@ -44504,7 +44590,7 @@ function RuntimeDebugger({
|
|
|
44504
44590
|
}
|
|
44505
44591
|
});
|
|
44506
44592
|
}, [mode]);
|
|
44507
|
-
|
|
44593
|
+
React94.useEffect(() => {
|
|
44508
44594
|
if (mode === "inline") return;
|
|
44509
44595
|
const handleKeyDown = (e) => {
|
|
44510
44596
|
if (e.key === "`" && isVisible) {
|
|
@@ -45024,7 +45110,7 @@ var init_StatCard = __esm({
|
|
|
45024
45110
|
const labelToUse = propLabel ?? propTitle;
|
|
45025
45111
|
const eventBus = useEventBus();
|
|
45026
45112
|
const { t } = useTranslate();
|
|
45027
|
-
const handleActionClick =
|
|
45113
|
+
const handleActionClick = React94__default.useCallback(() => {
|
|
45028
45114
|
if (action?.event) {
|
|
45029
45115
|
eventBus.emit(`UI:${action.event}`, {});
|
|
45030
45116
|
}
|
|
@@ -45035,7 +45121,7 @@ var init_StatCard = __esm({
|
|
|
45035
45121
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
45036
45122
|
const isLoading = externalLoading ?? false;
|
|
45037
45123
|
const error = externalError;
|
|
45038
|
-
const computeMetricValue =
|
|
45124
|
+
const computeMetricValue = React94__default.useCallback(
|
|
45039
45125
|
(metric, items) => {
|
|
45040
45126
|
if (metric.value !== void 0) {
|
|
45041
45127
|
return metric.value;
|
|
@@ -45074,7 +45160,7 @@ var init_StatCard = __esm({
|
|
|
45074
45160
|
},
|
|
45075
45161
|
[]
|
|
45076
45162
|
);
|
|
45077
|
-
const schemaStats =
|
|
45163
|
+
const schemaStats = React94__default.useMemo(() => {
|
|
45078
45164
|
if (!metrics || metrics.length === 0) return null;
|
|
45079
45165
|
return metrics.map((metric) => ({
|
|
45080
45166
|
label: metric.label,
|
|
@@ -45082,7 +45168,7 @@ var init_StatCard = __esm({
|
|
|
45082
45168
|
format: metric.format
|
|
45083
45169
|
}));
|
|
45084
45170
|
}, [metrics, data, computeMetricValue]);
|
|
45085
|
-
const calculatedTrend =
|
|
45171
|
+
const calculatedTrend = React94__default.useMemo(() => {
|
|
45086
45172
|
if (manualTrend !== void 0) return manualTrend;
|
|
45087
45173
|
if (previousValue === void 0 || currentValue === void 0)
|
|
45088
45174
|
return void 0;
|
|
@@ -45722,8 +45808,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
45722
45808
|
] });
|
|
45723
45809
|
};
|
|
45724
45810
|
InlineActivityStream = ({ activities, autoScroll = true, className }) => {
|
|
45725
|
-
const endRef =
|
|
45726
|
-
|
|
45811
|
+
const endRef = React94__default.useRef(null);
|
|
45812
|
+
React94__default.useEffect(() => {
|
|
45727
45813
|
if (!autoScroll) return;
|
|
45728
45814
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
45729
45815
|
}, [activities.length, autoScroll]);
|
|
@@ -45817,7 +45903,7 @@ var init_SubagentTracePanel = __esm({
|
|
|
45817
45903
|
};
|
|
45818
45904
|
SubagentRichCard = ({ subagent }) => {
|
|
45819
45905
|
const { t } = useTranslate();
|
|
45820
|
-
const activities =
|
|
45906
|
+
const activities = React94__default.useMemo(
|
|
45821
45907
|
() => subagentMessagesToActivities(subagent.messages),
|
|
45822
45908
|
[subagent.messages]
|
|
45823
45909
|
);
|
|
@@ -45894,8 +45980,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
45894
45980
|
] });
|
|
45895
45981
|
};
|
|
45896
45982
|
CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
|
|
45897
|
-
const endRef =
|
|
45898
|
-
|
|
45983
|
+
const endRef = React94__default.useRef(null);
|
|
45984
|
+
React94__default.useEffect(() => {
|
|
45899
45985
|
if (!autoScroll) return;
|
|
45900
45986
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
45901
45987
|
}, [messages.length, autoScroll]);
|
|
@@ -46330,7 +46416,7 @@ var init_Timeline = __esm({
|
|
|
46330
46416
|
}) => {
|
|
46331
46417
|
const { t } = useTranslate();
|
|
46332
46418
|
const entityData = entity ?? [];
|
|
46333
|
-
const items =
|
|
46419
|
+
const items = React94__default.useMemo(() => {
|
|
46334
46420
|
if (propItems) return propItems;
|
|
46335
46421
|
if (entityData.length === 0) return [];
|
|
46336
46422
|
return entityData.map((record, idx) => {
|
|
@@ -46432,7 +46518,7 @@ var init_Timeline = __esm({
|
|
|
46432
46518
|
}
|
|
46433
46519
|
});
|
|
46434
46520
|
function extractToastProps(children) {
|
|
46435
|
-
if (!
|
|
46521
|
+
if (!React94__default.isValidElement(children)) {
|
|
46436
46522
|
if (typeof children === "string") {
|
|
46437
46523
|
return { message: children };
|
|
46438
46524
|
}
|
|
@@ -46474,7 +46560,7 @@ var init_ToastSlot = __esm({
|
|
|
46474
46560
|
eventBus.emit(`${prefix}CLOSE`);
|
|
46475
46561
|
};
|
|
46476
46562
|
if (!isVisible) return null;
|
|
46477
|
-
const isCustomContent =
|
|
46563
|
+
const isCustomContent = React94__default.isValidElement(children) && !message;
|
|
46478
46564
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
46479
46565
|
Toast,
|
|
46480
46566
|
{
|
|
@@ -47049,7 +47135,7 @@ function SuspenseConfigProvider({
|
|
|
47049
47135
|
config,
|
|
47050
47136
|
children
|
|
47051
47137
|
}) {
|
|
47052
|
-
return
|
|
47138
|
+
return React94__default.createElement(
|
|
47053
47139
|
SuspenseConfigContext.Provider,
|
|
47054
47140
|
{ value: config },
|
|
47055
47141
|
children
|
|
@@ -47091,7 +47177,7 @@ function enrichFormFields(fields, entityDef) {
|
|
|
47091
47177
|
}
|
|
47092
47178
|
return { name: field, label: humanizeFieldName(field) };
|
|
47093
47179
|
}
|
|
47094
|
-
if (field && typeof field === "object" && !Array.isArray(field) && !
|
|
47180
|
+
if (field && typeof field === "object" && !Array.isArray(field) && !React94__default.isValidElement(field) && !(field instanceof Date)) {
|
|
47095
47181
|
const obj = field;
|
|
47096
47182
|
const fieldName = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
|
|
47097
47183
|
if (!fieldName) return field;
|
|
@@ -47563,7 +47649,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
47563
47649
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
47564
47650
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
47565
47651
|
}
|
|
47566
|
-
return /* @__PURE__ */ jsx(
|
|
47652
|
+
return /* @__PURE__ */ jsx(React94__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
47567
47653
|
}
|
|
47568
47654
|
if (!child || typeof child !== "object") return null;
|
|
47569
47655
|
const childId = `${parentId}-${index}`;
|
|
@@ -47620,14 +47706,14 @@ function isPatternConfig(value) {
|
|
|
47620
47706
|
if (value === null || value === void 0) return false;
|
|
47621
47707
|
if (typeof value !== "object") return false;
|
|
47622
47708
|
if (Array.isArray(value)) return false;
|
|
47623
|
-
if (
|
|
47709
|
+
if (React94__default.isValidElement(value)) return false;
|
|
47624
47710
|
if (value instanceof Date) return false;
|
|
47625
47711
|
if (typeof value === "function") return false;
|
|
47626
47712
|
const record = value;
|
|
47627
47713
|
return "type" in record && typeof record.type === "string" && getComponentForPattern$1(record.type) !== null;
|
|
47628
47714
|
}
|
|
47629
47715
|
function isPlainConfigObject(value) {
|
|
47630
|
-
if (
|
|
47716
|
+
if (React94__default.isValidElement(value)) return false;
|
|
47631
47717
|
if (value instanceof Date) return false;
|
|
47632
47718
|
const proto = Object.getPrototypeOf(value);
|
|
47633
47719
|
return proto === Object.prototype || proto === null;
|
|
@@ -47768,7 +47854,7 @@ function SlotContentRenderer({
|
|
|
47768
47854
|
for (const slotKey of CONTENT_NODE_SLOTS) {
|
|
47769
47855
|
const slotVal = restProps[slotKey];
|
|
47770
47856
|
if (slotVal === void 0 || slotVal === null) continue;
|
|
47771
|
-
if (
|
|
47857
|
+
if (React94__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
|
|
47772
47858
|
const typelessChildren = !Array.isArray(slotVal) && typeof slotVal === "object" && !("type" in slotVal) && Array.isArray(slotVal.children) ? slotVal.children : void 0;
|
|
47773
47859
|
if (typelessChildren !== void 0 || Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
|
|
47774
47860
|
nodeSlotOverrides[slotKey] = renderPatternChildren(
|
|
@@ -47822,7 +47908,7 @@ function SlotContentRenderer({
|
|
|
47822
47908
|
const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
|
|
47823
47909
|
if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
|
|
47824
47910
|
const sample = resolvedItems[0];
|
|
47825
|
-
if (sample && typeof sample === "object" && !Array.isArray(sample) && !
|
|
47911
|
+
if (sample && typeof sample === "object" && !Array.isArray(sample) && !React94__default.isValidElement(sample) && !(sample instanceof Date)) {
|
|
47826
47912
|
const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
|
|
47827
47913
|
finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
|
|
47828
47914
|
}
|
|
@@ -48191,7 +48277,7 @@ var AvlTransition = ({
|
|
|
48191
48277
|
opacity = 1,
|
|
48192
48278
|
className
|
|
48193
48279
|
}) => {
|
|
48194
|
-
const ids =
|
|
48280
|
+
const ids = React94__default.useMemo(() => {
|
|
48195
48281
|
avlTransitionId += 1;
|
|
48196
48282
|
return { arrow: `avl-tr-${avlTransitionId}-arrow` };
|
|
48197
48283
|
}, []);
|
|
@@ -48752,7 +48838,7 @@ var AvlStateMachine = ({
|
|
|
48752
48838
|
color = "var(--color-primary)",
|
|
48753
48839
|
animated = false
|
|
48754
48840
|
}) => {
|
|
48755
|
-
const ids =
|
|
48841
|
+
const ids = React94__default.useMemo(() => {
|
|
48756
48842
|
avlSmId += 1;
|
|
48757
48843
|
const base = `avl-sm-${avlSmId}`;
|
|
48758
48844
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -48951,7 +49037,7 @@ var AvlOrbitalUnit = ({
|
|
|
48951
49037
|
color = "var(--color-primary)",
|
|
48952
49038
|
animated = false
|
|
48953
49039
|
}) => {
|
|
48954
|
-
const ids =
|
|
49040
|
+
const ids = React94__default.useMemo(() => {
|
|
48955
49041
|
avlOuId += 1;
|
|
48956
49042
|
const base = `avl-ou-${avlOuId}`;
|
|
48957
49043
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -49047,7 +49133,7 @@ var AvlClosedCircuit = ({
|
|
|
49047
49133
|
color = "var(--color-primary)",
|
|
49048
49134
|
animated = false
|
|
49049
49135
|
}) => {
|
|
49050
|
-
const ids =
|
|
49136
|
+
const ids = React94__default.useMemo(() => {
|
|
49051
49137
|
avlCcId += 1;
|
|
49052
49138
|
const base = `avl-cc-${avlCcId}`;
|
|
49053
49139
|
return { glow: `${base}-glow`, grad: `${base}-grad`, arrow: `${base}-arrow` };
|
|
@@ -49202,7 +49288,7 @@ var AvlEmitListen = ({
|
|
|
49202
49288
|
color = "var(--color-primary)",
|
|
49203
49289
|
animated = false
|
|
49204
49290
|
}) => {
|
|
49205
|
-
const ids =
|
|
49291
|
+
const ids = React94__default.useMemo(() => {
|
|
49206
49292
|
avlElId += 1;
|
|
49207
49293
|
const base = `avl-el-${avlElId}`;
|
|
49208
49294
|
return { arrow: `${base}-arrow`, grad: `${base}-grad` };
|
|
@@ -49476,7 +49562,7 @@ function renderNode(node, color, glowId) {
|
|
|
49476
49562
|
const baseR = node.type === "operator" ? 20 : 16;
|
|
49477
49563
|
const r2 = Math.max(baseR, labelLen * 3.5 + 6);
|
|
49478
49564
|
const nc = nodeColor(node.type, color);
|
|
49479
|
-
return /* @__PURE__ */ jsxs(
|
|
49565
|
+
return /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
|
|
49480
49566
|
node.children.map((child, i) => {
|
|
49481
49567
|
const childR = Math.max(
|
|
49482
49568
|
child.type === "operator" ? 20 : 16,
|
|
@@ -49533,7 +49619,7 @@ var AvlExprTree = ({
|
|
|
49533
49619
|
className,
|
|
49534
49620
|
color = "var(--color-primary)"
|
|
49535
49621
|
}) => {
|
|
49536
|
-
const ids =
|
|
49622
|
+
const ids = React94__default.useMemo(() => {
|
|
49537
49623
|
avlEtId += 1;
|
|
49538
49624
|
return { glow: `avl-et-${avlEtId}-glow` };
|
|
49539
49625
|
}, []);
|
|
@@ -50368,7 +50454,7 @@ var SystemNode = ({ data }) => {
|
|
|
50368
50454
|
stateChain.length > 0 && /* @__PURE__ */ jsx("svg", { width: stateChain.length * 14 + 2, height: 10, viewBox: `0 0 ${stateChain.length * 14 + 2} 10`, children: stateChain.map((s, i) => {
|
|
50369
50455
|
const tc = transitionCounts[s.name] ?? 0;
|
|
50370
50456
|
const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
50371
|
-
return /* @__PURE__ */ jsxs(
|
|
50457
|
+
return /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
|
|
50372
50458
|
/* @__PURE__ */ jsx(AvlState, { x: i * 14 + 1, y: 1, width: 10, height: 8, name: "", role, isInitial: s.isInitial ?? void 0, isTerminal: s.isTerminal ?? void 0 }),
|
|
50373
50459
|
i < stateChain.length - 1 && /* @__PURE__ */ jsx("line", { x1: i * 14 + 12, y1: 5, x2: i * 14 + 15, y2: 5, stroke: "var(--color-border)", strokeWidth: 0.5 })
|
|
50374
50460
|
] }, s.name);
|
|
@@ -51455,7 +51541,7 @@ function resolveLambdaBindings(body, params, item, index) {
|
|
|
51455
51541
|
}
|
|
51456
51542
|
return substituted;
|
|
51457
51543
|
}
|
|
51458
|
-
if (body !== null && typeof body === "object" && !
|
|
51544
|
+
if (body !== null && typeof body === "object" && !React94__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
51459
51545
|
const out = {};
|
|
51460
51546
|
for (const [k, v] of Object.entries(body)) {
|
|
51461
51547
|
out[k] = recur(v);
|
|
@@ -51488,7 +51574,7 @@ function deferLambdaEntityExprs(value) {
|
|
|
51488
51574
|
}
|
|
51489
51575
|
return arr.map((v) => deferLambdaEntityExprs(v));
|
|
51490
51576
|
}
|
|
51491
|
-
if (value !== null && typeof value === "object" && !
|
|
51577
|
+
if (value !== null && typeof value === "object" && !React94__default.isValidElement(value) && !(value instanceof Date) && typeof value !== "function" && !isRenderBindingMarker(value)) {
|
|
51492
51578
|
const out = {};
|
|
51493
51579
|
for (const [k, v] of Object.entries(value)) {
|
|
51494
51580
|
out[k] = deferLambdaEntityExprs(v);
|
|
@@ -51502,7 +51588,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
51502
51588
|
const resolvedBody = deferLambdaEntityExprs(
|
|
51503
51589
|
resolveLambdaBindings(lambdaBody, params, item, index)
|
|
51504
51590
|
);
|
|
51505
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
51591
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React94__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
51506
51592
|
return null;
|
|
51507
51593
|
}
|
|
51508
51594
|
const record = resolvedBody;
|
|
@@ -51521,7 +51607,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
51521
51607
|
props: childProps,
|
|
51522
51608
|
priority: 0
|
|
51523
51609
|
};
|
|
51524
|
-
return
|
|
51610
|
+
return React94__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
51525
51611
|
};
|
|
51526
51612
|
}
|
|
51527
51613
|
function convertNode(node, callerKey) {
|
|
@@ -51541,7 +51627,7 @@ function convertNode(node, callerKey) {
|
|
|
51541
51627
|
});
|
|
51542
51628
|
return anyChanged ? mapped : node;
|
|
51543
51629
|
}
|
|
51544
|
-
if (typeof node === "object" && !
|
|
51630
|
+
if (typeof node === "object" && !React94__default.isValidElement(node) && !(node instanceof Date)) {
|
|
51545
51631
|
return convertObjectProps(node);
|
|
51546
51632
|
}
|
|
51547
51633
|
return node;
|
|
@@ -53464,8 +53550,8 @@ function CanvasDndProvider({
|
|
|
53464
53550
|
}) {
|
|
53465
53551
|
const eventBus = useEventBus();
|
|
53466
53552
|
const sensors = useAlmadarDndSensors(false);
|
|
53467
|
-
const [activePayload, setActivePayload] =
|
|
53468
|
-
const handleDragStart =
|
|
53553
|
+
const [activePayload, setActivePayload] = React94__default.useState(null);
|
|
53554
|
+
const handleDragStart = React94__default.useCallback((e) => {
|
|
53469
53555
|
const data = e.active.data.current;
|
|
53470
53556
|
const payload = data?.payload;
|
|
53471
53557
|
if (payload) {
|
|
@@ -53476,7 +53562,7 @@ function CanvasDndProvider({
|
|
|
53476
53562
|
log9.warn("dragStart:missing-payload", { id: e.active.id });
|
|
53477
53563
|
}
|
|
53478
53564
|
}, [eventBus]);
|
|
53479
|
-
const handleDragEnd =
|
|
53565
|
+
const handleDragEnd = React94__default.useCallback((e) => {
|
|
53480
53566
|
setActivePayload(null);
|
|
53481
53567
|
const activeData = e.active.data.current;
|
|
53482
53568
|
const payload = activeData?.payload;
|
|
@@ -53505,7 +53591,7 @@ function CanvasDndProvider({
|
|
|
53505
53591
|
const suppressed = onDrop ? onDrop(drop) === true : false;
|
|
53506
53592
|
if (!suppressed) defaultEmit(eventBus, drop);
|
|
53507
53593
|
}, [eventBus, onDrop]);
|
|
53508
|
-
const handleDragCancel =
|
|
53594
|
+
const handleDragCancel = React94__default.useCallback(() => {
|
|
53509
53595
|
setActivePayload(null);
|
|
53510
53596
|
log9.info("dragCancel");
|
|
53511
53597
|
}, []);
|
|
@@ -54263,7 +54349,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
54263
54349
|
}
|
|
54264
54350
|
);
|
|
54265
54351
|
};
|
|
54266
|
-
var OrbPreviewNode =
|
|
54352
|
+
var OrbPreviewNode = React94__default.memo(OrbPreviewNodeInner);
|
|
54267
54353
|
OrbPreviewNode.displayName = "OrbPreviewNode";
|
|
54268
54354
|
orbPreviewLog.debug("export-resolved", () => ({
|
|
54269
54355
|
type: typeof OrbPreviewNode,
|
|
@@ -54368,7 +54454,7 @@ var EventFlowEdgeInner = (props) => {
|
|
|
54368
54454
|
) })
|
|
54369
54455
|
] });
|
|
54370
54456
|
};
|
|
54371
|
-
var EventFlowEdge =
|
|
54457
|
+
var EventFlowEdge = React94__default.memo(EventFlowEdgeInner);
|
|
54372
54458
|
EventFlowEdge.displayName = "EventFlowEdge";
|
|
54373
54459
|
|
|
54374
54460
|
// components/avl/molecules/BehaviorComposeNode.tsx
|
|
@@ -54515,7 +54601,7 @@ var BehaviorComposeNodeInner = (props) => {
|
|
|
54515
54601
|
}
|
|
54516
54602
|
);
|
|
54517
54603
|
};
|
|
54518
|
-
var BehaviorComposeNode =
|
|
54604
|
+
var BehaviorComposeNode = React94__default.memo(BehaviorComposeNodeInner);
|
|
54519
54605
|
BehaviorComposeNode.displayName = "BehaviorComposeNode";
|
|
54520
54606
|
|
|
54521
54607
|
// components/avl/lib/avl-behavior-compose-converter.ts
|
|
@@ -55541,7 +55627,7 @@ var TraitCardNodeInner = (props) => {
|
|
|
55541
55627
|
}
|
|
55542
55628
|
);
|
|
55543
55629
|
};
|
|
55544
|
-
var TraitCardNode =
|
|
55630
|
+
var TraitCardNode = React94__default.memo(TraitCardNodeInner);
|
|
55545
55631
|
TraitCardNode.displayName = "TraitCardNode";
|
|
55546
55632
|
|
|
55547
55633
|
// components/avl/organisms/FlowCanvas.tsx
|
|
@@ -55622,7 +55708,7 @@ function FlowCanvasInner({
|
|
|
55622
55708
|
initialOrbital
|
|
55623
55709
|
);
|
|
55624
55710
|
const [expandedBehaviorAlias, setExpandedBehaviorAlias] = useState(void 0);
|
|
55625
|
-
const screenSizeUserOverrideRef =
|
|
55711
|
+
const screenSizeUserOverrideRef = React94__default.useRef(false);
|
|
55626
55712
|
const [screenSize, setScreenSize] = useState(
|
|
55627
55713
|
() => typeof window === "undefined" ? "laptop" : detectScreenSize(window.innerWidth)
|
|
55628
55714
|
);
|
|
@@ -56006,7 +56092,7 @@ var ZoomBreadcrumb = ({
|
|
|
56006
56092
|
if (eventName && band === "detail") {
|
|
56007
56093
|
segments.push({ icon: "\u26A1", label: eventName });
|
|
56008
56094
|
}
|
|
56009
|
-
return /* @__PURE__ */ jsx("div", { className: "absolute top-2 left-2 z-10 flex items-center gap-1 px-2 py-1 rounded-md bg-card/90 border border-border text-xs text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(
|
|
56095
|
+
return /* @__PURE__ */ jsx("div", { className: "absolute top-2 left-2 z-10 flex items-center gap-1 px-2 py-1 rounded-md bg-card/90 border border-border text-xs text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
|
|
56010
56096
|
i > 0 && /* @__PURE__ */ jsx("span", { className: "opacity-40", children: ">" }),
|
|
56011
56097
|
/* @__PURE__ */ jsx("span", { className: "opacity-60", children: seg.icon }),
|
|
56012
56098
|
/* @__PURE__ */ jsx("span", { children: seg.label })
|
|
@@ -56347,7 +56433,7 @@ var EventWireOverlay = ({
|
|
|
56347
56433
|
containerW,
|
|
56348
56434
|
containerH
|
|
56349
56435
|
}) => {
|
|
56350
|
-
const ids =
|
|
56436
|
+
const ids = React94__default.useMemo(() => {
|
|
56351
56437
|
avlOczWireId += 1;
|
|
56352
56438
|
return { arrow: `avl-ocz-wire-${avlOczWireId}-arrow` };
|
|
56353
56439
|
}, []);
|
|
@@ -56714,7 +56800,7 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
56714
56800
|
borderRadius: 6,
|
|
56715
56801
|
border: `1px solid ${color}`
|
|
56716
56802
|
},
|
|
56717
|
-
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(
|
|
56803
|
+
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
|
|
56718
56804
|
i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", style: { opacity: 0.5, color }, children: "/" }),
|
|
56719
56805
|
i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
|
|
56720
56806
|
Box,
|