@almadar/ui 5.138.0 → 5.139.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 +1297 -1224
- package/dist/avl/index.js +333 -260
- package/dist/components/index.cjs +1276 -1203
- package/dist/components/index.d.cts +9 -2
- package/dist/components/index.d.ts +9 -2
- package/dist/components/index.js +318 -245
- package/dist/lib/drawable/three/index.cjs +6 -0
- package/dist/lib/drawable/three/index.js +6 -0
- package/dist/providers/index.cjs +1180 -1107
- package/dist/providers/index.js +308 -235
- package/dist/runtime/index.cjs +1158 -1085
- package/dist/runtime/index.js +313 -240
- package/package.json +4 -4
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 React93 from 'react';
|
|
3
|
+
import React93__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 React93__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 = React93__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 React93__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 React93__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(React93__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 (React93__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 = React93__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] = React93.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] = React93.useReducer((x) => x + 1, 0);
|
|
5011
|
+
const canvasRef = React93.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
|
+
React93.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 (React93__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 = React93__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 = React93__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 = React93__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 = React93__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 = React93__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 = React93__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] = React93__default.useState(value);
|
|
6951
|
+
const pendingEchoRef = React93__default.useRef(/* @__PURE__ */ new Set());
|
|
6952
|
+
React93__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 = React93__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 = React93__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 = React93__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 = React93__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 = React93__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 = React93__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 = React93__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
7589
7589
|
CardHeader.displayName = "CardHeader";
|
|
7590
|
-
CardTitle =
|
|
7590
|
+
CardTitle = React93__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 = React93__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 = React93__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 = React93__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] = React93__default.useState(false);
|
|
7824
|
+
React93__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 React93__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 = React93__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 = React93__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] = React93__default.useState(value);
|
|
8227
|
+
React93__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 = React93.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] = React93.useState(
|
|
8421
8421
|
checked !== void 0 ? checked : defaultChecked
|
|
8422
8422
|
);
|
|
8423
|
-
|
|
8423
|
+
React93.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 = React93__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] = React93__default.useState(false);
|
|
8781
|
+
const timeoutRef = React93__default.useRef(null);
|
|
8782
|
+
const triggerRef = React93__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
|
+
React93__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 = React93__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 = React93__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 = React93__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 = React93__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 = React93__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 = React93__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 = React93__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] = React93.useState(false);
|
|
11182
11182
|
const actualPressed = pressed ?? isPressed;
|
|
11183
|
-
const handlePointerDown =
|
|
11183
|
+
const handlePointerDown = React93.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 = React93.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 = React93.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] = React93.useState(/* @__PURE__ */ new Set());
|
|
11462
|
+
const handlePress = React93.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 = React93.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 = React93.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 = React93.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 = React93.useRef(null);
|
|
12142
|
+
const imgCacheRef = React93.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
|
+
React93.useEffect(() => {
|
|
12159
12159
|
const canvas = canvasRef.current;
|
|
12160
12160
|
if (!canvas) return;
|
|
12161
12161
|
const ctx = canvas.getContext("2d");
|
|
@@ -12730,6 +12730,21 @@ var init_projector = __esm({
|
|
|
12730
12730
|
function isValidScenePos(pos) {
|
|
12731
12731
|
return Number.isFinite(pos?.x) && Number.isFinite(pos?.y);
|
|
12732
12732
|
}
|
|
12733
|
+
function spriteRect(projector, node, natural) {
|
|
12734
|
+
const tw = projector.tileWidth;
|
|
12735
|
+
const fallbackW = projector.worldPixelDirect ? natural?.w ?? 0 : tw;
|
|
12736
|
+
const fallbackH = projector.worldPixelDirect ? natural?.h ?? 0 : tw;
|
|
12737
|
+
const w = node.width !== void 0 ? node.width * tw : fallbackW;
|
|
12738
|
+
const h = node.height !== void 0 ? node.height * tw : fallbackH;
|
|
12739
|
+
const anchor = node.anchor ?? "top-left";
|
|
12740
|
+
const p = projector.anchorPoint(node.position, anchor);
|
|
12741
|
+
return {
|
|
12742
|
+
x: anchor === "top-left" ? p.x : p.x - w / 2,
|
|
12743
|
+
y: anchor === "ground" ? p.y - h : anchor === "center" ? p.y - h / 2 : p.y,
|
|
12744
|
+
w,
|
|
12745
|
+
h
|
|
12746
|
+
};
|
|
12747
|
+
}
|
|
12733
12748
|
var init_contract = __esm({
|
|
12734
12749
|
"lib/drawable/contract.ts"() {
|
|
12735
12750
|
}
|
|
@@ -12744,16 +12759,11 @@ function paintFallbackSquare(painter, node, dctx, reason) {
|
|
|
12744
12759
|
warnMissingOnce(reason, node);
|
|
12745
12760
|
const tw = dctx.projector.tileWidth;
|
|
12746
12761
|
const natural = dctx.projector.worldPixelDirect ? FALLBACK_WORLD_PX : tw;
|
|
12747
|
-
const
|
|
12748
|
-
const h = node.height !== void 0 ? node.height * tw : natural;
|
|
12749
|
-
const anchor = node.anchor ?? "top-left";
|
|
12750
|
-
const p = dctx.projector.anchorPoint(node.position, anchor);
|
|
12751
|
-
const dx = anchor === "top-left" ? p.x : p.x - w / 2;
|
|
12752
|
-
const dy = anchor === "ground" ? p.y - h : anchor === "center" ? p.y - h / 2 : p.y;
|
|
12762
|
+
const rect = spriteRect(dctx.projector, node, { w: natural, h: natural });
|
|
12753
12763
|
painter.save();
|
|
12754
12764
|
if (node.opacity !== void 0 && node.opacity !== 1) painter.setAlpha(node.opacity);
|
|
12755
|
-
painter.fillRect(
|
|
12756
|
-
painter.strokeRect(
|
|
12765
|
+
painter.fillRect(rect.x, rect.y, rect.w, rect.h, "#9b8f7f");
|
|
12766
|
+
painter.strokeRect(rect.x, rect.y, rect.w, rect.h, "#5e564b", Math.max(1, tw / 32));
|
|
12757
12767
|
painter.restore();
|
|
12758
12768
|
}
|
|
12759
12769
|
function DrawSprite(_props) {
|
|
@@ -12790,15 +12800,10 @@ var init_DrawSprite = __esm({
|
|
|
12790
12800
|
}
|
|
12791
12801
|
src = { x: r2.sx, y: r2.sy, w: r2.sw, h: r2.sh };
|
|
12792
12802
|
}
|
|
12793
|
-
const
|
|
12794
|
-
const
|
|
12795
|
-
const
|
|
12796
|
-
const
|
|
12797
|
-
const h = node.height !== void 0 ? node.height * tw : fallbackH;
|
|
12798
|
-
const anchor = node.anchor ?? "top-left";
|
|
12799
|
-
const p = dctx.projector.anchorPoint(node.position, anchor);
|
|
12800
|
-
const dx = anchor === "top-left" ? p.x : p.x - w / 2;
|
|
12801
|
-
const dy = anchor === "ground" ? p.y - h : anchor === "center" ? p.y - h / 2 : p.y;
|
|
12803
|
+
const rect = spriteRect(dctx.projector, node, src ? { w: src.w, h: src.h } : { w: tex.width, h: tex.height });
|
|
12804
|
+
const { w, h } = rect;
|
|
12805
|
+
const dx = rect.x;
|
|
12806
|
+
const dy = rect.y;
|
|
12802
12807
|
painter.save();
|
|
12803
12808
|
if (node.opacity !== void 0 && node.opacity !== 1) painter.setAlpha(node.opacity);
|
|
12804
12809
|
if (node.shadow) painter.setShadow(node.shadow);
|
|
@@ -12820,9 +12825,24 @@ var init_DrawSprite = __esm({
|
|
|
12820
12825
|
};
|
|
12821
12826
|
}
|
|
12822
12827
|
});
|
|
12823
|
-
|
|
12824
|
-
|
|
12825
|
-
|
|
12828
|
+
var DrawableRegistryContext;
|
|
12829
|
+
var init_registry = __esm({
|
|
12830
|
+
"lib/drawable/registry.ts"() {
|
|
12831
|
+
DrawableRegistryContext = createContext(null);
|
|
12832
|
+
}
|
|
12833
|
+
});
|
|
12834
|
+
function DrawShape(props) {
|
|
12835
|
+
const register = useContext(DrawableRegistryContext);
|
|
12836
|
+
if (register) {
|
|
12837
|
+
const { opacity, ...rest } = props;
|
|
12838
|
+
const node = {
|
|
12839
|
+
...rest,
|
|
12840
|
+
type: "draw-shape",
|
|
12841
|
+
...opacity !== void 0 && opacity > 0 ? { opacity } : {}
|
|
12842
|
+
};
|
|
12843
|
+
register(node);
|
|
12844
|
+
return /* @__PURE__ */ jsx("div", { "data-draw-shape-debug": "", style: { position: "absolute", width: 4, height: 4, background: "red", zIndex: 9999 } });
|
|
12845
|
+
}
|
|
12826
12846
|
return null;
|
|
12827
12847
|
}
|
|
12828
12848
|
var paintShape;
|
|
@@ -12830,6 +12850,7 @@ var init_DrawShape = __esm({
|
|
|
12830
12850
|
"components/game/atoms/DrawShape.tsx"() {
|
|
12831
12851
|
"use client";
|
|
12832
12852
|
init_contract();
|
|
12853
|
+
init_registry();
|
|
12833
12854
|
paintShape = (painter, node, dctx) => {
|
|
12834
12855
|
if (!isValidScenePos(node.position)) return;
|
|
12835
12856
|
painter.save();
|
|
@@ -13014,12 +13035,18 @@ function collectDrawnItems(nodes) {
|
|
|
13014
13035
|
for (const n of nodes) {
|
|
13015
13036
|
switch (n.type) {
|
|
13016
13037
|
case "draw-sprite":
|
|
13038
|
+
if (isValidScenePos(n.position)) out.push({ pos: n.position, id: n.id, anchor: n.anchor, width: n.width, height: n.height });
|
|
13039
|
+
break;
|
|
13017
13040
|
case "draw-shape":
|
|
13018
13041
|
case "draw-text":
|
|
13019
13042
|
case "draw-group":
|
|
13020
13043
|
if (isValidScenePos(n.position)) out.push({ pos: n.position, id: n.id });
|
|
13021
13044
|
break;
|
|
13022
13045
|
case "draw-sprite-layer":
|
|
13046
|
+
for (const it of n.items) {
|
|
13047
|
+
if (isValidScenePos(it.position)) out.push({ pos: it.position, id: it.id, anchor: it.anchor, width: it.width, height: it.height });
|
|
13048
|
+
}
|
|
13049
|
+
break;
|
|
13023
13050
|
case "draw-shape-layer":
|
|
13024
13051
|
case "draw-text-layer":
|
|
13025
13052
|
for (const it of n.items) {
|
|
@@ -13037,6 +13064,15 @@ function buildHitIndex(items) {
|
|
|
13037
13064
|
}
|
|
13038
13065
|
return m;
|
|
13039
13066
|
}
|
|
13067
|
+
function hitTestSprites(items, projector, point) {
|
|
13068
|
+
for (let i = items.length - 1; i >= 0; i--) {
|
|
13069
|
+
const it = items[i];
|
|
13070
|
+
if (it.id === void 0) continue;
|
|
13071
|
+
const r2 = spriteRect(projector, { position: it.pos, anchor: it.anchor, width: it.width, height: it.height });
|
|
13072
|
+
if (point.x >= r2.x && point.x <= r2.x + r2.w && point.y >= r2.y && point.y <= r2.y + r2.h) return it.id;
|
|
13073
|
+
}
|
|
13074
|
+
return void 0;
|
|
13075
|
+
}
|
|
13040
13076
|
var init_hitTest = __esm({
|
|
13041
13077
|
"lib/drawable/hitTest.ts"() {
|
|
13042
13078
|
init_contract();
|
|
@@ -13065,9 +13101,17 @@ function Canvas2D({
|
|
|
13065
13101
|
showMinimap = true,
|
|
13066
13102
|
followTarget,
|
|
13067
13103
|
cameraPos,
|
|
13068
|
-
bgColor
|
|
13104
|
+
bgColor,
|
|
13105
|
+
children
|
|
13069
13106
|
}) {
|
|
13070
13107
|
const instanceId = useMemo(() => Math.random().toString(36).slice(2, 8), []);
|
|
13108
|
+
const childDrawablesRef = useRef([]);
|
|
13109
|
+
childDrawablesRef.current = [];
|
|
13110
|
+
const registerChildDrawable = useCallback((node) => {
|
|
13111
|
+
childDrawablesRef.current.push(node);
|
|
13112
|
+
}, []);
|
|
13113
|
+
const hasJsxChildren = React93.Children.count(children) > 0;
|
|
13114
|
+
drawables && drawables.length > 0 ? drawables : childDrawablesRef.current;
|
|
13071
13115
|
function isDrawableLayer(node) {
|
|
13072
13116
|
return node.type === "draw-sprite-layer" || node.type === "draw-shape-layer" || node.type === "draw-text-layer";
|
|
13073
13117
|
}
|
|
@@ -13250,7 +13294,19 @@ function Canvas2D({
|
|
|
13250
13294
|
ctx.fillStyle = bgColor ?? BACKGROUND_FALLBACK_COLOR;
|
|
13251
13295
|
ctx.fillRect(0, 0, viewportSize.width, viewportSize.height);
|
|
13252
13296
|
}
|
|
13253
|
-
if (!drawables || drawables.length === 0)
|
|
13297
|
+
if (!drawables || drawables.length === 0) {
|
|
13298
|
+
const childDrawables = childDrawablesRef.current;
|
|
13299
|
+
if (childDrawables.length === 0) return;
|
|
13300
|
+
const painter0 = createWebPainter(ctx, bumpAtlas);
|
|
13301
|
+
painter0.save();
|
|
13302
|
+
painter0.translate(viewportSize.width / 2, viewportSize.height / 2);
|
|
13303
|
+
painter0.scale(cameraRef.current.zoom, cameraRef.current.zoom);
|
|
13304
|
+
painter0.translate(-viewportSize.width / 2, -viewportSize.height / 2);
|
|
13305
|
+
const dctx0 = { projector, time: 0, invalidate: bumpAtlas };
|
|
13306
|
+
for (const node of childDrawables) paintDrawable(painter0, node, dctx0);
|
|
13307
|
+
painter0.restore();
|
|
13308
|
+
return;
|
|
13309
|
+
}
|
|
13254
13310
|
const cam = cameraRef.current;
|
|
13255
13311
|
if (camera !== "follow" && dragDistance() === 0) {
|
|
13256
13312
|
const focus = cameraPos ?? defaultGridFocus;
|
|
@@ -13334,6 +13390,11 @@ function Canvas2D({
|
|
|
13334
13390
|
if (dragDistance() > 5) return;
|
|
13335
13391
|
if (!canvasRef.current || !tileClickEvent && !unitClickEvent) return;
|
|
13336
13392
|
const world = screenToWorld(e.clientX, e.clientY, canvasRef.current, viewportSize);
|
|
13393
|
+
const spriteHit = unitClickEvent ? hitTestSprites(drawnItems, projector, world) : void 0;
|
|
13394
|
+
if (spriteHit !== void 0 && unitClickEvent) {
|
|
13395
|
+
eventBus.emit(`UI:${unitClickEvent}`, { unitId: spriteHit });
|
|
13396
|
+
return;
|
|
13397
|
+
}
|
|
13337
13398
|
const adjustedX = world.x - scaledTileWidth / 2;
|
|
13338
13399
|
const adjustedY = squareGrid ? world.y - scaledTileWidth / 2 : world.y - scaledDiamondTopY - scaledFloorHeight / 2;
|
|
13339
13400
|
const isoPos = unproject(adjustedX, adjustedY);
|
|
@@ -13343,7 +13404,7 @@ function Canvas2D({
|
|
|
13343
13404
|
} else if (tileClickEvent) {
|
|
13344
13405
|
eventBus.emit(`UI:${tileClickEvent}`, { x: isoPos.x, y: isoPos.y });
|
|
13345
13406
|
}
|
|
13346
|
-
}, [enableCamera, handlePointerUp, dragDistance, screenToWorld, viewportSize, scaledTileWidth, squareGrid, scaledDiamondTopY, scaledFloorHeight, unproject, hitIndex, tileClickEvent, unitClickEvent, eventBus]);
|
|
13407
|
+
}, [enableCamera, handlePointerUp, dragDistance, screenToWorld, viewportSize, scaledTileWidth, squareGrid, scaledDiamondTopY, scaledFloorHeight, unproject, hitIndex, drawnItems, projector, tileClickEvent, unitClickEvent, eventBus]);
|
|
13347
13408
|
const handleCanvasPointerLeave = useCallback(() => {
|
|
13348
13409
|
handleMouseLeave();
|
|
13349
13410
|
if (tileLeaveEvent) eventBus.emit(`UI:${tileLeaveEvent}`, {});
|
|
@@ -13413,7 +13474,7 @@ function Canvas2D({
|
|
|
13413
13474
|
/* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-muted-foreground", children: t("canvas.loadingMessage") || "Loading\u2026" })
|
|
13414
13475
|
] }) });
|
|
13415
13476
|
}
|
|
13416
|
-
if (!drawables || drawables.length === 0) {
|
|
13477
|
+
if ((!drawables || drawables.length === 0) && !hasJsxChildren) {
|
|
13417
13478
|
return /* @__PURE__ */ jsx(
|
|
13418
13479
|
Box,
|
|
13419
13480
|
{
|
|
@@ -13427,7 +13488,7 @@ function Canvas2D({
|
|
|
13427
13488
|
}
|
|
13428
13489
|
);
|
|
13429
13490
|
}
|
|
13430
|
-
return /* @__PURE__ */ jsxs(
|
|
13491
|
+
return /* @__PURE__ */ jsx(DrawableRegistryContext.Provider, { value: registerChildDrawable, children: /* @__PURE__ */ jsxs(
|
|
13431
13492
|
Box,
|
|
13432
13493
|
{
|
|
13433
13494
|
ref: containerRef,
|
|
@@ -13488,10 +13549,19 @@ function Canvas2D({
|
|
|
13488
13549
|
mapWidth: miniMapWidth,
|
|
13489
13550
|
mapHeight: miniMapHeight
|
|
13490
13551
|
}
|
|
13491
|
-
) })
|
|
13552
|
+
) }),
|
|
13553
|
+
hasJsxChildren && /* @__PURE__ */ jsx("div", { "aria-hidden": "true", style: { position: "absolute", width: 0, height: 0, overflow: "hidden" }, children }),
|
|
13554
|
+
/* @__PURE__ */ jsxs("div", { "data-debug": "", style: { position: "absolute", top: 0, left: 0, background: "yellow", color: "black", zIndex: 9999, fontSize: 24, padding: 8 }, children: [
|
|
13555
|
+
"C=",
|
|
13556
|
+
React93.Children.count(children),
|
|
13557
|
+
" J=",
|
|
13558
|
+
String(hasJsxChildren),
|
|
13559
|
+
" D=",
|
|
13560
|
+
drawables?.length ?? -1
|
|
13561
|
+
] })
|
|
13492
13562
|
]
|
|
13493
13563
|
}
|
|
13494
|
-
);
|
|
13564
|
+
) });
|
|
13495
13565
|
}
|
|
13496
13566
|
var canvas2DLog;
|
|
13497
13567
|
var init_Canvas2D = __esm({
|
|
@@ -13513,6 +13583,7 @@ var init_Canvas2D = __esm({
|
|
|
13513
13583
|
init_webPainter2d();
|
|
13514
13584
|
init_projector();
|
|
13515
13585
|
init_paintDispatch();
|
|
13586
|
+
init_registry();
|
|
13516
13587
|
init_hitTest();
|
|
13517
13588
|
init_isometric();
|
|
13518
13589
|
canvas2DLog = createLogger("almadar:ui:game-canvas");
|
|
@@ -13554,7 +13625,8 @@ function Canvas({
|
|
|
13554
13625
|
tileLeaveEvent,
|
|
13555
13626
|
featureClickEvent,
|
|
13556
13627
|
keyMap,
|
|
13557
|
-
keyUpMap
|
|
13628
|
+
keyUpMap,
|
|
13629
|
+
children
|
|
13558
13630
|
}) {
|
|
13559
13631
|
canvasLog.debug("Canvas render", { mode, drawablesCount: drawables?.length, projection, camera: camera ? JSON.stringify(camera) : void 0 });
|
|
13560
13632
|
const zoom = camera?.zoom;
|
|
@@ -13607,7 +13679,8 @@ function Canvas({
|
|
|
13607
13679
|
tileHoverEvent,
|
|
13608
13680
|
tileLeaveEvent,
|
|
13609
13681
|
keyMap,
|
|
13610
|
-
keyUpMap
|
|
13682
|
+
keyUpMap,
|
|
13683
|
+
...children !== void 0 ? { children } : {}
|
|
13611
13684
|
}
|
|
13612
13685
|
);
|
|
13613
13686
|
}
|
|
@@ -13739,7 +13812,7 @@ function LinearView({
|
|
|
13739
13812
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
13740
13813
|
const isDone = i < currentIdx;
|
|
13741
13814
|
const isCurrent = i === currentIdx;
|
|
13742
|
-
return /* @__PURE__ */ jsxs(
|
|
13815
|
+
return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
|
|
13743
13816
|
i > 0 && /* @__PURE__ */ jsx(
|
|
13744
13817
|
Typography,
|
|
13745
13818
|
{
|
|
@@ -14274,7 +14347,7 @@ function SequenceBar({
|
|
|
14274
14347
|
else onSlotRemove?.(index);
|
|
14275
14348
|
}, [emit, slotRemoveEvent, onSlotRemove, playing]);
|
|
14276
14349
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
14277
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
14350
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
|
|
14278
14351
|
i > 0 && /* @__PURE__ */ jsx(
|
|
14279
14352
|
Typography,
|
|
14280
14353
|
{
|
|
@@ -14923,7 +14996,7 @@ var init_ErrorBoundary = __esm({
|
|
|
14923
14996
|
}
|
|
14924
14997
|
);
|
|
14925
14998
|
};
|
|
14926
|
-
ErrorBoundary = class extends
|
|
14999
|
+
ErrorBoundary = class extends React93__default.Component {
|
|
14927
15000
|
constructor(props) {
|
|
14928
15001
|
super(props);
|
|
14929
15002
|
__publicField(this, "reset", () => {
|
|
@@ -15192,7 +15265,7 @@ var init_Container = __esm({
|
|
|
15192
15265
|
as: Component = "div"
|
|
15193
15266
|
}) => {
|
|
15194
15267
|
const resolvedSize = maxWidth ?? size ?? "lg";
|
|
15195
|
-
return
|
|
15268
|
+
return React93__default.createElement(
|
|
15196
15269
|
Component,
|
|
15197
15270
|
{
|
|
15198
15271
|
className: cn(
|
|
@@ -17330,7 +17403,7 @@ var init_CodeBlock = __esm({
|
|
|
17330
17403
|
DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
|
|
17331
17404
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
17332
17405
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
17333
|
-
CodeBlock =
|
|
17406
|
+
CodeBlock = React93__default.memo(
|
|
17334
17407
|
({
|
|
17335
17408
|
code: rawCode,
|
|
17336
17409
|
language = "text",
|
|
@@ -17918,7 +17991,7 @@ var init_MarkdownContent = __esm({
|
|
|
17918
17991
|
init_Box();
|
|
17919
17992
|
init_CodeBlock();
|
|
17920
17993
|
init_cn();
|
|
17921
|
-
MarkdownContent =
|
|
17994
|
+
MarkdownContent = React93__default.memo(
|
|
17922
17995
|
({ content, direction = "ltr", className }) => {
|
|
17923
17996
|
const { t: _t } = useTranslate();
|
|
17924
17997
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -19245,7 +19318,7 @@ var init_StateMachineView = __esm({
|
|
|
19245
19318
|
style: { top: title ? 30 : 0 },
|
|
19246
19319
|
children: [
|
|
19247
19320
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
19248
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
19321
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React93__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
19249
19322
|
StateNode2,
|
|
19250
19323
|
{
|
|
19251
19324
|
state,
|
|
@@ -25067,8 +25140,8 @@ var init_Menu = __esm({
|
|
|
25067
25140
|
"bottom-end": "bottom-start"
|
|
25068
25141
|
};
|
|
25069
25142
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
25070
|
-
const triggerChild =
|
|
25071
|
-
const triggerElement =
|
|
25143
|
+
const triggerChild = React93__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
25144
|
+
const triggerElement = React93__default.cloneElement(
|
|
25072
25145
|
triggerChild,
|
|
25073
25146
|
{
|
|
25074
25147
|
ref: triggerRef,
|
|
@@ -25163,14 +25236,14 @@ function useDataDnd(args) {
|
|
|
25163
25236
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
25164
25237
|
const enabled = isZone || Boolean(dndRoot);
|
|
25165
25238
|
const eventBus = useEventBus();
|
|
25166
|
-
const parentRoot =
|
|
25239
|
+
const parentRoot = React93__default.useContext(RootCtx);
|
|
25167
25240
|
const isRoot = enabled && parentRoot === null;
|
|
25168
|
-
const zoneId =
|
|
25241
|
+
const zoneId = React93__default.useId();
|
|
25169
25242
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
25170
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
25171
|
-
const optimisticOrdersRef =
|
|
25243
|
+
const [optimisticOrders, setOptimisticOrders] = React93__default.useState(() => /* @__PURE__ */ new Map());
|
|
25244
|
+
const optimisticOrdersRef = React93__default.useRef(optimisticOrders);
|
|
25172
25245
|
optimisticOrdersRef.current = optimisticOrders;
|
|
25173
|
-
const clearOptimisticOrder =
|
|
25246
|
+
const clearOptimisticOrder = React93__default.useCallback((group) => {
|
|
25174
25247
|
setOptimisticOrders((prev) => {
|
|
25175
25248
|
if (!prev.has(group)) return prev;
|
|
25176
25249
|
const next = new Map(prev);
|
|
@@ -25195,7 +25268,7 @@ function useDataDnd(args) {
|
|
|
25195
25268
|
const raw = it[dndItemIdField];
|
|
25196
25269
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
25197
25270
|
}).join("|");
|
|
25198
|
-
const itemIds =
|
|
25271
|
+
const itemIds = React93__default.useMemo(
|
|
25199
25272
|
() => orderedItems.map((it, idx) => {
|
|
25200
25273
|
const raw = it[dndItemIdField];
|
|
25201
25274
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
@@ -25206,7 +25279,7 @@ function useDataDnd(args) {
|
|
|
25206
25279
|
const raw = it[dndItemIdField];
|
|
25207
25280
|
return raw != null ? String(raw) : `__${idx}`;
|
|
25208
25281
|
}).join("|");
|
|
25209
|
-
|
|
25282
|
+
React93__default.useEffect(() => {
|
|
25210
25283
|
const root = isRoot ? null : parentRoot;
|
|
25211
25284
|
if (root) {
|
|
25212
25285
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -25214,20 +25287,20 @@ function useDataDnd(args) {
|
|
|
25214
25287
|
clearOptimisticOrder(ownGroup);
|
|
25215
25288
|
}
|
|
25216
25289
|
}, [itemsContentSig, ownGroup]);
|
|
25217
|
-
const zonesRef =
|
|
25218
|
-
const registerZone =
|
|
25290
|
+
const zonesRef = React93__default.useRef(/* @__PURE__ */ new Map());
|
|
25291
|
+
const registerZone = React93__default.useCallback((zoneId2, meta2) => {
|
|
25219
25292
|
zonesRef.current.set(zoneId2, meta2);
|
|
25220
25293
|
}, []);
|
|
25221
|
-
const unregisterZone =
|
|
25294
|
+
const unregisterZone = React93__default.useCallback((zoneId2) => {
|
|
25222
25295
|
zonesRef.current.delete(zoneId2);
|
|
25223
25296
|
}, []);
|
|
25224
|
-
const [activeDrag, setActiveDrag] =
|
|
25225
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
25226
|
-
const meta =
|
|
25297
|
+
const [activeDrag, setActiveDrag] = React93__default.useState(null);
|
|
25298
|
+
const [overZoneGroup, setOverZoneGroup] = React93__default.useState(null);
|
|
25299
|
+
const meta = React93__default.useMemo(
|
|
25227
25300
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
25228
25301
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
25229
25302
|
);
|
|
25230
|
-
|
|
25303
|
+
React93__default.useEffect(() => {
|
|
25231
25304
|
const target = isRoot ? null : parentRoot;
|
|
25232
25305
|
if (!target) {
|
|
25233
25306
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -25246,7 +25319,7 @@ function useDataDnd(args) {
|
|
|
25246
25319
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
25247
25320
|
const sensors = useAlmadarDndSensors(true);
|
|
25248
25321
|
const collisionDetection = almadarDndCollisionDetection;
|
|
25249
|
-
const findZoneByItem =
|
|
25322
|
+
const findZoneByItem = React93__default.useCallback(
|
|
25250
25323
|
(id) => {
|
|
25251
25324
|
for (const z of zonesRef.current.values()) {
|
|
25252
25325
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -25255,7 +25328,7 @@ function useDataDnd(args) {
|
|
|
25255
25328
|
},
|
|
25256
25329
|
[]
|
|
25257
25330
|
);
|
|
25258
|
-
|
|
25331
|
+
React93__default.useCallback(
|
|
25259
25332
|
(group) => {
|
|
25260
25333
|
for (const z of zonesRef.current.values()) {
|
|
25261
25334
|
if (z.group === group) return z;
|
|
@@ -25264,7 +25337,7 @@ function useDataDnd(args) {
|
|
|
25264
25337
|
},
|
|
25265
25338
|
[]
|
|
25266
25339
|
);
|
|
25267
|
-
const handleDragEnd =
|
|
25340
|
+
const handleDragEnd = React93__default.useCallback(
|
|
25268
25341
|
(event) => {
|
|
25269
25342
|
const { active, over } = event;
|
|
25270
25343
|
const activeIdStr = String(active.id);
|
|
@@ -25355,8 +25428,8 @@ function useDataDnd(args) {
|
|
|
25355
25428
|
},
|
|
25356
25429
|
[eventBus]
|
|
25357
25430
|
);
|
|
25358
|
-
const sortableData =
|
|
25359
|
-
const SortableItem =
|
|
25431
|
+
const sortableData = React93__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
25432
|
+
const SortableItem = React93__default.useCallback(
|
|
25360
25433
|
({ id, children }) => {
|
|
25361
25434
|
const {
|
|
25362
25435
|
attributes,
|
|
@@ -25396,7 +25469,7 @@ function useDataDnd(args) {
|
|
|
25396
25469
|
id: droppableId,
|
|
25397
25470
|
data: sortableData
|
|
25398
25471
|
});
|
|
25399
|
-
const ctx =
|
|
25472
|
+
const ctx = React93__default.useContext(RootCtx);
|
|
25400
25473
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
25401
25474
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
25402
25475
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -25411,7 +25484,7 @@ function useDataDnd(args) {
|
|
|
25411
25484
|
showForeignPlaceholder,
|
|
25412
25485
|
ctxAvailable: ctx != null
|
|
25413
25486
|
});
|
|
25414
|
-
|
|
25487
|
+
React93__default.useEffect(() => {
|
|
25415
25488
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
25416
25489
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
25417
25490
|
return /* @__PURE__ */ jsx(
|
|
@@ -25425,11 +25498,11 @@ function useDataDnd(args) {
|
|
|
25425
25498
|
}
|
|
25426
25499
|
);
|
|
25427
25500
|
};
|
|
25428
|
-
const rootContextValue =
|
|
25501
|
+
const rootContextValue = React93__default.useMemo(
|
|
25429
25502
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
25430
25503
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
25431
25504
|
);
|
|
25432
|
-
const handleDragStart =
|
|
25505
|
+
const handleDragStart = React93__default.useCallback((event) => {
|
|
25433
25506
|
const sourceZone = findZoneByItem(event.active.id);
|
|
25434
25507
|
const rect = event.active.rect.current.initial;
|
|
25435
25508
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -25448,7 +25521,7 @@ function useDataDnd(args) {
|
|
|
25448
25521
|
isRoot
|
|
25449
25522
|
});
|
|
25450
25523
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
25451
|
-
const handleDragOver =
|
|
25524
|
+
const handleDragOver = React93__default.useCallback((event) => {
|
|
25452
25525
|
const { active, over } = event;
|
|
25453
25526
|
const overData = over?.data?.current;
|
|
25454
25527
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -25518,7 +25591,7 @@ function useDataDnd(args) {
|
|
|
25518
25591
|
return next;
|
|
25519
25592
|
});
|
|
25520
25593
|
}, []);
|
|
25521
|
-
const handleDragCancel =
|
|
25594
|
+
const handleDragCancel = React93__default.useCallback((event) => {
|
|
25522
25595
|
setActiveDrag(null);
|
|
25523
25596
|
setOverZoneGroup(null);
|
|
25524
25597
|
dndLog.warn("dragCancel", {
|
|
@@ -25526,12 +25599,12 @@ function useDataDnd(args) {
|
|
|
25526
25599
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
25527
25600
|
});
|
|
25528
25601
|
}, []);
|
|
25529
|
-
const handleDragEndWithCleanup =
|
|
25602
|
+
const handleDragEndWithCleanup = React93__default.useCallback((event) => {
|
|
25530
25603
|
handleDragEnd(event);
|
|
25531
25604
|
setActiveDrag(null);
|
|
25532
25605
|
setOverZoneGroup(null);
|
|
25533
25606
|
}, [handleDragEnd]);
|
|
25534
|
-
const wrapContainer =
|
|
25607
|
+
const wrapContainer = React93__default.useCallback(
|
|
25535
25608
|
(children) => {
|
|
25536
25609
|
if (!enabled) return children;
|
|
25537
25610
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -25585,7 +25658,7 @@ var init_useDataDnd = __esm({
|
|
|
25585
25658
|
init_useAlmadarDndCollision();
|
|
25586
25659
|
init_Box();
|
|
25587
25660
|
dndLog = createLogger("almadar:ui:dnd");
|
|
25588
|
-
RootCtx =
|
|
25661
|
+
RootCtx = React93__default.createContext(null);
|
|
25589
25662
|
}
|
|
25590
25663
|
});
|
|
25591
25664
|
function renderIconInput(icon, props) {
|
|
@@ -26127,7 +26200,7 @@ function DataList({
|
|
|
26127
26200
|
}) {
|
|
26128
26201
|
const eventBus = useEventBus();
|
|
26129
26202
|
const { t } = useTranslate();
|
|
26130
|
-
const [visibleCount, setVisibleCount] =
|
|
26203
|
+
const [visibleCount, setVisibleCount] = React93__default.useState(pageSize || Infinity);
|
|
26131
26204
|
const fieldDefs = fields ?? columns ?? [];
|
|
26132
26205
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
26133
26206
|
const dnd = useDataDnd({
|
|
@@ -26143,14 +26216,14 @@ function DataList({
|
|
|
26143
26216
|
dndRoot
|
|
26144
26217
|
});
|
|
26145
26218
|
const orderedData = dnd.orderedItems;
|
|
26146
|
-
const allData =
|
|
26219
|
+
const allData = React93__default.useMemo(
|
|
26147
26220
|
() => sortRows(orderedData, sortBy, sortDirection),
|
|
26148
26221
|
[orderedData, sortBy, sortDirection]
|
|
26149
26222
|
);
|
|
26150
26223
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
26151
26224
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
26152
26225
|
const hasRenderProp = typeof children === "function";
|
|
26153
|
-
|
|
26226
|
+
React93__default.useEffect(() => {
|
|
26154
26227
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
26155
26228
|
const childrenTypeOf = typeof children;
|
|
26156
26229
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -26265,7 +26338,7 @@ function DataList({
|
|
|
26265
26338
|
return v === void 0 || v === null || v === "" ? raw : String(v);
|
|
26266
26339
|
};
|
|
26267
26340
|
return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("py-2", className), children: [
|
|
26268
|
-
groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
26341
|
+
groups2.map((group, gi) => /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
|
|
26269
26342
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
26270
26343
|
group.items.map((itemData, index) => {
|
|
26271
26344
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -26464,7 +26537,7 @@ function DataList({
|
|
|
26464
26537
|
className
|
|
26465
26538
|
),
|
|
26466
26539
|
children: [
|
|
26467
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
26540
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
|
|
26468
26541
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
26469
26542
|
group.items.map(
|
|
26470
26543
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -26551,7 +26624,7 @@ var init_FormSection = __esm({
|
|
|
26551
26624
|
columns = 1,
|
|
26552
26625
|
className
|
|
26553
26626
|
}) => {
|
|
26554
|
-
const [collapsed, setCollapsed] =
|
|
26627
|
+
const [collapsed, setCollapsed] = React93__default.useState(defaultCollapsed);
|
|
26555
26628
|
const { t } = useTranslate();
|
|
26556
26629
|
const eventBus = useEventBus();
|
|
26557
26630
|
const gridClass = {
|
|
@@ -26559,7 +26632,7 @@ var init_FormSection = __esm({
|
|
|
26559
26632
|
2: "grid-cols-1 md:grid-cols-2",
|
|
26560
26633
|
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
26561
26634
|
}[columns];
|
|
26562
|
-
|
|
26635
|
+
React93__default.useCallback(() => {
|
|
26563
26636
|
if (collapsible) {
|
|
26564
26637
|
setCollapsed((prev) => !prev);
|
|
26565
26638
|
eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
|
|
@@ -27604,7 +27677,7 @@ var init_Flex = __esm({
|
|
|
27604
27677
|
flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
|
|
27605
27678
|
}
|
|
27606
27679
|
}
|
|
27607
|
-
return
|
|
27680
|
+
return React93__default.createElement(Component, {
|
|
27608
27681
|
className: cn(
|
|
27609
27682
|
inline ? "inline-flex" : "flex",
|
|
27610
27683
|
directionStyles[direction],
|
|
@@ -27723,7 +27796,7 @@ var init_Grid = __esm({
|
|
|
27723
27796
|
as: Component = "div"
|
|
27724
27797
|
}) => {
|
|
27725
27798
|
const mergedStyle = rows ? { gridTemplateRows: `repeat(${rows}, minmax(0, 1fr))`, ...style } : style;
|
|
27726
|
-
return
|
|
27799
|
+
return React93__default.createElement(
|
|
27727
27800
|
Component,
|
|
27728
27801
|
{
|
|
27729
27802
|
className: cn(
|
|
@@ -27955,9 +28028,9 @@ var init_Popover = __esm({
|
|
|
27955
28028
|
onMouseLeave: handleClose,
|
|
27956
28029
|
onPointerDown: tapTriggerProps.onPointerDown
|
|
27957
28030
|
};
|
|
27958
|
-
const childElement =
|
|
28031
|
+
const childElement = React93__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
27959
28032
|
const childPointerDown = childElement.props.onPointerDown;
|
|
27960
|
-
const triggerElement =
|
|
28033
|
+
const triggerElement = React93__default.cloneElement(
|
|
27961
28034
|
childElement,
|
|
27962
28035
|
{
|
|
27963
28036
|
ref: triggerRef,
|
|
@@ -28566,9 +28639,9 @@ var init_Tooltip = __esm({
|
|
|
28566
28639
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
28567
28640
|
};
|
|
28568
28641
|
}, []);
|
|
28569
|
-
const triggerElement =
|
|
28642
|
+
const triggerElement = React93__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
28570
28643
|
const childPointerDown = triggerElement.props.onPointerDown;
|
|
28571
|
-
const trigger =
|
|
28644
|
+
const trigger = React93__default.cloneElement(triggerElement, {
|
|
28572
28645
|
ref: triggerRef,
|
|
28573
28646
|
onMouseEnter: handleMouseEnter,
|
|
28574
28647
|
onMouseLeave: handleMouseLeave,
|
|
@@ -28658,7 +28731,7 @@ var init_WizardProgress = __esm({
|
|
|
28658
28731
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
28659
28732
|
const isActive = index === currentStep;
|
|
28660
28733
|
const isCompleted = index < currentStep;
|
|
28661
|
-
return /* @__PURE__ */ jsxs(
|
|
28734
|
+
return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
|
|
28662
28735
|
/* @__PURE__ */ jsx(
|
|
28663
28736
|
"button",
|
|
28664
28737
|
{
|
|
@@ -30293,7 +30366,7 @@ var init_MapView = __esm({
|
|
|
30293
30366
|
shadowSize: [41, 41]
|
|
30294
30367
|
});
|
|
30295
30368
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
30296
|
-
const { useEffect: useEffect63, useRef: useRef63, useCallback: useCallback95, useState: useState99 } =
|
|
30369
|
+
const { useEffect: useEffect63, useRef: useRef63, useCallback: useCallback95, useState: useState99 } = React93__default;
|
|
30297
30370
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
30298
30371
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
30299
30372
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
@@ -31211,8 +31284,8 @@ function TableView({
|
|
|
31211
31284
|
}) {
|
|
31212
31285
|
const eventBus = useEventBus();
|
|
31213
31286
|
const { t } = useTranslate();
|
|
31214
|
-
const [visibleCount, setVisibleCount] =
|
|
31215
|
-
const [localSelected, setLocalSelected] =
|
|
31287
|
+
const [visibleCount, setVisibleCount] = React93__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
31288
|
+
const [localSelected, setLocalSelected] = React93__default.useState(/* @__PURE__ */ new Set());
|
|
31216
31289
|
const colDefs = (Array.isArray(columns) ? columns : void 0) ?? (Array.isArray(fields) ? fields : void 0) ?? [];
|
|
31217
31290
|
const actionDefs = Array.isArray(itemActions) ? itemActions : [];
|
|
31218
31291
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
@@ -31234,7 +31307,7 @@ function TableView({
|
|
|
31234
31307
|
const hasRenderProp = typeof children === "function";
|
|
31235
31308
|
const idField = dndItemIdField ?? "id";
|
|
31236
31309
|
const isCoarsePointer = useMediaQuery("(pointer: coarse)");
|
|
31237
|
-
|
|
31310
|
+
React93__default.useEffect(() => {
|
|
31238
31311
|
tableViewLog.debug("render", {
|
|
31239
31312
|
rowCount: data.length,
|
|
31240
31313
|
colCount: colDefs.length,
|
|
@@ -31291,7 +31364,7 @@ function TableView({
|
|
|
31291
31364
|
};
|
|
31292
31365
|
eventBus.emit(`UI:${itemClickEvent}`, payload);
|
|
31293
31366
|
};
|
|
31294
|
-
const colFloors =
|
|
31367
|
+
const colFloors = React93__default.useMemo(
|
|
31295
31368
|
() => colDefs.map((col) => {
|
|
31296
31369
|
const longest = data.reduce((widest, row) => {
|
|
31297
31370
|
const cell = formatCell(asFieldValue(getNestedValue(row, col.field ?? col.key)), col.format);
|
|
@@ -31453,12 +31526,12 @@ function TableView({
|
|
|
31453
31526
|
]
|
|
31454
31527
|
}
|
|
31455
31528
|
);
|
|
31456
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
31529
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React93__default.Fragment, { children: rowInner }, id);
|
|
31457
31530
|
};
|
|
31458
31531
|
const items = Array.from(data);
|
|
31459
31532
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
31460
31533
|
let runningIndex = 0;
|
|
31461
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
31534
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
|
|
31462
31535
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
31463
31536
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
31464
31537
|
] }, gi)) });
|
|
@@ -32821,7 +32894,7 @@ var init_StepFlow = __esm({
|
|
|
32821
32894
|
className
|
|
32822
32895
|
}) => {
|
|
32823
32896
|
if (orientation === "vertical") {
|
|
32824
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
32897
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React93__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
32825
32898
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
32826
32899
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
32827
32900
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -32832,7 +32905,7 @@ var init_StepFlow = __esm({
|
|
|
32832
32905
|
] })
|
|
32833
32906
|
] }) }, index)) });
|
|
32834
32907
|
}
|
|
32835
|
-
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(
|
|
32908
|
+
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(React93__default.Fragment, { children: [
|
|
32836
32909
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
32837
32910
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
32838
32911
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -33822,7 +33895,7 @@ var init_LikertScale = __esm({
|
|
|
33822
33895
|
md: "text-base",
|
|
33823
33896
|
lg: "text-lg"
|
|
33824
33897
|
};
|
|
33825
|
-
LikertScale =
|
|
33898
|
+
LikertScale = React93__default.forwardRef(
|
|
33826
33899
|
({
|
|
33827
33900
|
question,
|
|
33828
33901
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -33834,7 +33907,7 @@ var init_LikertScale = __esm({
|
|
|
33834
33907
|
variant = "radios",
|
|
33835
33908
|
className
|
|
33836
33909
|
}, ref) => {
|
|
33837
|
-
const groupId =
|
|
33910
|
+
const groupId = React93__default.useId();
|
|
33838
33911
|
const eventBus = useEventBus();
|
|
33839
33912
|
const handleSelect = useCallback(
|
|
33840
33913
|
(next) => {
|
|
@@ -36123,7 +36196,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
36123
36196
|
"aria-label": t("aria.breadcrumb"),
|
|
36124
36197
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
36125
36198
|
const isLast = idx === items.length - 1;
|
|
36126
|
-
return /* @__PURE__ */ jsxs(
|
|
36199
|
+
return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
|
|
36127
36200
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
36128
36201
|
Icon,
|
|
36129
36202
|
{
|
|
@@ -36787,7 +36860,7 @@ var init_PageHeader = __esm({
|
|
|
36787
36860
|
info: "bg-info/10 text-info"
|
|
36788
36861
|
};
|
|
36789
36862
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
36790
|
-
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(
|
|
36863
|
+
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(React93__default.Fragment, { children: [
|
|
36791
36864
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
36792
36865
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
36793
36866
|
"a",
|
|
@@ -37145,7 +37218,7 @@ var init_Section = __esm({
|
|
|
37145
37218
|
as: Component = "section"
|
|
37146
37219
|
}) => {
|
|
37147
37220
|
const hasHeader = title || description || action;
|
|
37148
|
-
return
|
|
37221
|
+
return React93__default.createElement(
|
|
37149
37222
|
Component,
|
|
37150
37223
|
{
|
|
37151
37224
|
className: cn(
|
|
@@ -37519,7 +37592,7 @@ var init_WizardContainer = __esm({
|
|
|
37519
37592
|
const isCompleted = index < currentStep;
|
|
37520
37593
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
37521
37594
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
37522
|
-
return /* @__PURE__ */ jsxs(
|
|
37595
|
+
return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
|
|
37523
37596
|
/* @__PURE__ */ jsx(
|
|
37524
37597
|
Button,
|
|
37525
37598
|
{
|
|
@@ -39306,7 +39379,7 @@ var init_ImportPreviewTree = __esm({
|
|
|
39306
39379
|
const renderUnit = (unit, childrenByParent, depth) => {
|
|
39307
39380
|
const summary = fieldSummary(unit);
|
|
39308
39381
|
const children = childrenByParent.get(unit.ref) ?? [];
|
|
39309
|
-
return /* @__PURE__ */ jsxs(
|
|
39382
|
+
return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
|
|
39310
39383
|
/* @__PURE__ */ jsxs(
|
|
39311
39384
|
Box,
|
|
39312
39385
|
{
|
|
@@ -39403,7 +39476,7 @@ var init_ImportProgress = __esm({
|
|
|
39403
39476
|
PIPELINE.map((key, index) => {
|
|
39404
39477
|
const isComplete = index < currentIndex;
|
|
39405
39478
|
const isActive = index === currentIndex;
|
|
39406
|
-
return /* @__PURE__ */ jsxs(
|
|
39479
|
+
return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
|
|
39407
39480
|
index > 0 ? /* @__PURE__ */ jsx(Box, { className: "h-px w-4 bg-border" }) : null,
|
|
39408
39481
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1", "data-testid": `import-progress-step-${key}`, children: [
|
|
39409
39482
|
/* @__PURE__ */ jsx(
|
|
@@ -40516,7 +40589,7 @@ var init_DrawGroup = __esm({
|
|
|
40516
40589
|
}
|
|
40517
40590
|
});
|
|
40518
40591
|
function extractTitle(children) {
|
|
40519
|
-
if (!
|
|
40592
|
+
if (!React93__default.isValidElement(children)) return void 0;
|
|
40520
40593
|
const props = children.props;
|
|
40521
40594
|
if (typeof props.title === "string") {
|
|
40522
40595
|
return props.title;
|
|
@@ -40866,12 +40939,12 @@ var init_Form = __esm({
|
|
|
40866
40939
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
40867
40940
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
40868
40941
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
40869
|
-
const normalizedInitialData =
|
|
40942
|
+
const normalizedInitialData = React93__default.useMemo(() => {
|
|
40870
40943
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
40871
40944
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
40872
40945
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
40873
40946
|
}, [entity, initialData]);
|
|
40874
|
-
const entityDerivedFields =
|
|
40947
|
+
const entityDerivedFields = React93__default.useMemo(() => {
|
|
40875
40948
|
if (fields && fields.length > 0) return void 0;
|
|
40876
40949
|
if (!resolvedEntity) return void 0;
|
|
40877
40950
|
return resolvedEntity.fields.map(
|
|
@@ -40892,16 +40965,16 @@ var init_Form = __esm({
|
|
|
40892
40965
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
40893
40966
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
40894
40967
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
40895
|
-
const [formData, setFormData] =
|
|
40968
|
+
const [formData, setFormData] = React93__default.useState(
|
|
40896
40969
|
normalizedInitialData
|
|
40897
40970
|
);
|
|
40898
|
-
const [collapsedSections, setCollapsedSections] =
|
|
40971
|
+
const [collapsedSections, setCollapsedSections] = React93__default.useState(
|
|
40899
40972
|
/* @__PURE__ */ new Set()
|
|
40900
40973
|
);
|
|
40901
|
-
const [submitError, setSubmitError] =
|
|
40902
|
-
const formRef =
|
|
40974
|
+
const [submitError, setSubmitError] = React93__default.useState(null);
|
|
40975
|
+
const formRef = React93__default.useRef(null);
|
|
40903
40976
|
const formMode = props.mode;
|
|
40904
|
-
const mountedRef =
|
|
40977
|
+
const mountedRef = React93__default.useRef(false);
|
|
40905
40978
|
if (!mountedRef.current) {
|
|
40906
40979
|
mountedRef.current = true;
|
|
40907
40980
|
debug("forms", "mount", {
|
|
@@ -40914,7 +40987,7 @@ var init_Form = __esm({
|
|
|
40914
40987
|
});
|
|
40915
40988
|
}
|
|
40916
40989
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
40917
|
-
const evalContext =
|
|
40990
|
+
const evalContext = React93__default.useMemo(
|
|
40918
40991
|
() => ({
|
|
40919
40992
|
formValues: formData,
|
|
40920
40993
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -40923,7 +40996,7 @@ var init_Form = __esm({
|
|
|
40923
40996
|
}),
|
|
40924
40997
|
[formData, externalContext]
|
|
40925
40998
|
);
|
|
40926
|
-
|
|
40999
|
+
React93__default.useEffect(() => {
|
|
40927
41000
|
debug("forms", "initialData-sync", {
|
|
40928
41001
|
mode: formMode,
|
|
40929
41002
|
normalizedInitialData,
|
|
@@ -40934,7 +41007,7 @@ var init_Form = __esm({
|
|
|
40934
41007
|
setFormData(normalizedInitialData);
|
|
40935
41008
|
}
|
|
40936
41009
|
}, [normalizedInitialData]);
|
|
40937
|
-
const processCalculations =
|
|
41010
|
+
const processCalculations = React93__default.useCallback(
|
|
40938
41011
|
(changedFieldId, newFormData) => {
|
|
40939
41012
|
if (!hiddenCalculations.length) return;
|
|
40940
41013
|
const context = {
|
|
@@ -40959,7 +41032,7 @@ var init_Form = __esm({
|
|
|
40959
41032
|
},
|
|
40960
41033
|
[hiddenCalculations, externalContext, eventBus]
|
|
40961
41034
|
);
|
|
40962
|
-
const checkViolations =
|
|
41035
|
+
const checkViolations = React93__default.useCallback(
|
|
40963
41036
|
(changedFieldId, newFormData) => {
|
|
40964
41037
|
if (!violationTriggers.length) return;
|
|
40965
41038
|
const context = {
|
|
@@ -40997,7 +41070,7 @@ var init_Form = __esm({
|
|
|
40997
41070
|
processCalculations(name, newFormData);
|
|
40998
41071
|
checkViolations(name, newFormData);
|
|
40999
41072
|
};
|
|
41000
|
-
const isFieldVisible =
|
|
41073
|
+
const isFieldVisible = React93__default.useCallback(
|
|
41001
41074
|
(fieldName) => {
|
|
41002
41075
|
const condition = conditionalFields[fieldName];
|
|
41003
41076
|
if (!condition) return true;
|
|
@@ -41005,7 +41078,7 @@ var init_Form = __esm({
|
|
|
41005
41078
|
},
|
|
41006
41079
|
[conditionalFields, evalContext]
|
|
41007
41080
|
);
|
|
41008
|
-
const isSectionVisible =
|
|
41081
|
+
const isSectionVisible = React93__default.useCallback(
|
|
41009
41082
|
(section) => {
|
|
41010
41083
|
if (!section.condition) return true;
|
|
41011
41084
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -41081,7 +41154,7 @@ var init_Form = __esm({
|
|
|
41081
41154
|
eventBus.emit(`UI:${onCancel}`);
|
|
41082
41155
|
}
|
|
41083
41156
|
};
|
|
41084
|
-
const renderField =
|
|
41157
|
+
const renderField = React93__default.useCallback(
|
|
41085
41158
|
(field) => {
|
|
41086
41159
|
const fieldName = field.name || field.field;
|
|
41087
41160
|
if (!fieldName) return null;
|
|
@@ -41102,7 +41175,7 @@ var init_Form = __esm({
|
|
|
41102
41175
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
41103
41176
|
);
|
|
41104
41177
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
41105
|
-
const normalizedFields =
|
|
41178
|
+
const normalizedFields = React93__default.useMemo(() => {
|
|
41106
41179
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
41107
41180
|
return effectiveFields.map((field) => {
|
|
41108
41181
|
if (typeof field === "string") {
|
|
@@ -41126,7 +41199,7 @@ var init_Form = __esm({
|
|
|
41126
41199
|
return field;
|
|
41127
41200
|
});
|
|
41128
41201
|
}, [effectiveFields, resolvedEntity]);
|
|
41129
|
-
const schemaFields =
|
|
41202
|
+
const schemaFields = React93__default.useMemo(() => {
|
|
41130
41203
|
if (normalizedFields.length === 0) return null;
|
|
41131
41204
|
if (isDebugEnabled()) {
|
|
41132
41205
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -41136,7 +41209,7 @@ var init_Form = __esm({
|
|
|
41136
41209
|
}
|
|
41137
41210
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
41138
41211
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
41139
|
-
const sectionElements =
|
|
41212
|
+
const sectionElements = React93__default.useMemo(() => {
|
|
41140
41213
|
if (!sections || sections.length === 0) return null;
|
|
41141
41214
|
return sections.map((section) => {
|
|
41142
41215
|
if (!isSectionVisible(section)) {
|
|
@@ -41862,7 +41935,7 @@ var init_List = __esm({
|
|
|
41862
41935
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
41863
41936
|
return [];
|
|
41864
41937
|
}, [entity]);
|
|
41865
|
-
const getItemActions =
|
|
41938
|
+
const getItemActions = React93__default.useCallback(
|
|
41866
41939
|
(item) => {
|
|
41867
41940
|
if (!itemActions) return [];
|
|
41868
41941
|
if (typeof itemActions === "function") {
|
|
@@ -42343,7 +42416,7 @@ var init_MediaGallery = __esm({
|
|
|
42343
42416
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
42344
42417
|
);
|
|
42345
42418
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
42346
|
-
const items =
|
|
42419
|
+
const items = React93__default.useMemo(() => {
|
|
42347
42420
|
if (propItems && propItems.length > 0) return propItems;
|
|
42348
42421
|
if (entityData.length === 0) return [];
|
|
42349
42422
|
return entityData.map((record, idx) => {
|
|
@@ -42508,7 +42581,7 @@ var init_MediaGallery = __esm({
|
|
|
42508
42581
|
}
|
|
42509
42582
|
});
|
|
42510
42583
|
function extractTitle2(children) {
|
|
42511
|
-
if (!
|
|
42584
|
+
if (!React93__default.isValidElement(children)) return void 0;
|
|
42512
42585
|
const props = children.props;
|
|
42513
42586
|
if (typeof props.title === "string") {
|
|
42514
42587
|
return props.title;
|
|
@@ -42782,7 +42855,7 @@ var init_debugRegistry = __esm({
|
|
|
42782
42855
|
}
|
|
42783
42856
|
});
|
|
42784
42857
|
function useDebugData() {
|
|
42785
|
-
const [data, setData] =
|
|
42858
|
+
const [data, setData] = React93.useState(() => ({
|
|
42786
42859
|
traits: [],
|
|
42787
42860
|
ticks: [],
|
|
42788
42861
|
guards: [],
|
|
@@ -42796,7 +42869,7 @@ function useDebugData() {
|
|
|
42796
42869
|
},
|
|
42797
42870
|
lastUpdate: Date.now()
|
|
42798
42871
|
}));
|
|
42799
|
-
|
|
42872
|
+
React93.useEffect(() => {
|
|
42800
42873
|
const updateData = () => {
|
|
42801
42874
|
setData({
|
|
42802
42875
|
traits: getAllTraits(),
|
|
@@ -42905,12 +42978,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
42905
42978
|
return positions;
|
|
42906
42979
|
}
|
|
42907
42980
|
function WalkMinimap() {
|
|
42908
|
-
const [walkStep, setWalkStep] =
|
|
42909
|
-
const [traits2, setTraits] =
|
|
42910
|
-
const [coveredEdges, setCoveredEdges] =
|
|
42911
|
-
const [completedTraits, setCompletedTraits] =
|
|
42912
|
-
const prevTraitRef =
|
|
42913
|
-
|
|
42981
|
+
const [walkStep, setWalkStep] = React93.useState(null);
|
|
42982
|
+
const [traits2, setTraits] = React93.useState([]);
|
|
42983
|
+
const [coveredEdges, setCoveredEdges] = React93.useState([]);
|
|
42984
|
+
const [completedTraits, setCompletedTraits] = React93.useState(/* @__PURE__ */ new Set());
|
|
42985
|
+
const prevTraitRef = React93.useRef(null);
|
|
42986
|
+
React93.useEffect(() => {
|
|
42914
42987
|
const interval = setInterval(() => {
|
|
42915
42988
|
const w = window;
|
|
42916
42989
|
const step = w.__orbitalWalkStep;
|
|
@@ -43346,15 +43419,15 @@ var init_EntitiesTab = __esm({
|
|
|
43346
43419
|
});
|
|
43347
43420
|
function EventFlowTab({ events: events2 }) {
|
|
43348
43421
|
const { t } = useTranslate();
|
|
43349
|
-
const [filter, setFilter] =
|
|
43350
|
-
const containerRef =
|
|
43351
|
-
const [autoScroll, setAutoScroll] =
|
|
43352
|
-
|
|
43422
|
+
const [filter, setFilter] = React93.useState("all");
|
|
43423
|
+
const containerRef = React93.useRef(null);
|
|
43424
|
+
const [autoScroll, setAutoScroll] = React93.useState(true);
|
|
43425
|
+
React93.useEffect(() => {
|
|
43353
43426
|
if (autoScroll && containerRef.current) {
|
|
43354
43427
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
43355
43428
|
}
|
|
43356
43429
|
}, [events2.length, autoScroll]);
|
|
43357
|
-
const filteredEvents =
|
|
43430
|
+
const filteredEvents = React93.useMemo(() => {
|
|
43358
43431
|
if (filter === "all") return events2;
|
|
43359
43432
|
return events2.filter((e) => e.type === filter);
|
|
43360
43433
|
}, [events2, filter]);
|
|
@@ -43470,7 +43543,7 @@ var init_EventFlowTab = __esm({
|
|
|
43470
43543
|
});
|
|
43471
43544
|
function GuardsPanel({ guards }) {
|
|
43472
43545
|
const { t } = useTranslate();
|
|
43473
|
-
const [filter, setFilter] =
|
|
43546
|
+
const [filter, setFilter] = React93.useState("all");
|
|
43474
43547
|
if (guards.length === 0) {
|
|
43475
43548
|
return /* @__PURE__ */ jsx(
|
|
43476
43549
|
EmptyState,
|
|
@@ -43483,7 +43556,7 @@ function GuardsPanel({ guards }) {
|
|
|
43483
43556
|
}
|
|
43484
43557
|
const passedCount = guards.filter((g) => g.result).length;
|
|
43485
43558
|
const failedCount = guards.length - passedCount;
|
|
43486
|
-
const filteredGuards =
|
|
43559
|
+
const filteredGuards = React93.useMemo(() => {
|
|
43487
43560
|
if (filter === "all") return guards;
|
|
43488
43561
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
43489
43562
|
return guards.filter((g) => !g.result);
|
|
@@ -43646,10 +43719,10 @@ function EffectBadge({ effect }) {
|
|
|
43646
43719
|
}
|
|
43647
43720
|
function TransitionTimeline({ transitions }) {
|
|
43648
43721
|
const { t } = useTranslate();
|
|
43649
|
-
const containerRef =
|
|
43650
|
-
const [autoScroll, setAutoScroll] =
|
|
43651
|
-
const [expandedId, setExpandedId] =
|
|
43652
|
-
|
|
43722
|
+
const containerRef = React93.useRef(null);
|
|
43723
|
+
const [autoScroll, setAutoScroll] = React93.useState(true);
|
|
43724
|
+
const [expandedId, setExpandedId] = React93.useState(null);
|
|
43725
|
+
React93.useEffect(() => {
|
|
43653
43726
|
if (autoScroll && containerRef.current) {
|
|
43654
43727
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
43655
43728
|
}
|
|
@@ -43929,9 +44002,9 @@ function getAllEvents(traits2) {
|
|
|
43929
44002
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
43930
44003
|
const eventBus = useEventBus();
|
|
43931
44004
|
const { t } = useTranslate();
|
|
43932
|
-
const [log11, setLog] =
|
|
43933
|
-
const prevStatesRef =
|
|
43934
|
-
|
|
44005
|
+
const [log11, setLog] = React93.useState([]);
|
|
44006
|
+
const prevStatesRef = React93.useRef(/* @__PURE__ */ new Map());
|
|
44007
|
+
React93.useEffect(() => {
|
|
43935
44008
|
for (const trait of traits2) {
|
|
43936
44009
|
const prev = prevStatesRef.current.get(trait.id);
|
|
43937
44010
|
if (prev && prev !== trait.currentState) {
|
|
@@ -44100,10 +44173,10 @@ function VerifyModePanel({
|
|
|
44100
44173
|
localCount
|
|
44101
44174
|
}) {
|
|
44102
44175
|
const { t } = useTranslate();
|
|
44103
|
-
const [expanded, setExpanded] =
|
|
44104
|
-
const scrollRef =
|
|
44105
|
-
const prevCountRef =
|
|
44106
|
-
|
|
44176
|
+
const [expanded, setExpanded] = React93.useState(true);
|
|
44177
|
+
const scrollRef = React93.useRef(null);
|
|
44178
|
+
const prevCountRef = React93.useRef(0);
|
|
44179
|
+
React93.useEffect(() => {
|
|
44107
44180
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
44108
44181
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
44109
44182
|
}
|
|
@@ -44160,10 +44233,10 @@ function RuntimeDebugger({
|
|
|
44160
44233
|
schema
|
|
44161
44234
|
}) {
|
|
44162
44235
|
const { t } = useTranslate();
|
|
44163
|
-
const [isCollapsed, setIsCollapsed] =
|
|
44164
|
-
const [isVisible, setIsVisible] =
|
|
44236
|
+
const [isCollapsed, setIsCollapsed] = React93.useState(mode === "verify" ? true : defaultCollapsed);
|
|
44237
|
+
const [isVisible, setIsVisible] = React93.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
44165
44238
|
const debugData = useDebugData();
|
|
44166
|
-
|
|
44239
|
+
React93.useEffect(() => {
|
|
44167
44240
|
if (mode === "inline") return;
|
|
44168
44241
|
return onDebugToggle((enabled) => {
|
|
44169
44242
|
setIsVisible(enabled);
|
|
@@ -44172,7 +44245,7 @@ function RuntimeDebugger({
|
|
|
44172
44245
|
}
|
|
44173
44246
|
});
|
|
44174
44247
|
}, [mode]);
|
|
44175
|
-
|
|
44248
|
+
React93.useEffect(() => {
|
|
44176
44249
|
if (mode === "inline") return;
|
|
44177
44250
|
const handleKeyDown = (e) => {
|
|
44178
44251
|
if (e.key === "`" && isVisible) {
|
|
@@ -44692,7 +44765,7 @@ var init_StatCard = __esm({
|
|
|
44692
44765
|
const labelToUse = propLabel ?? propTitle;
|
|
44693
44766
|
const eventBus = useEventBus();
|
|
44694
44767
|
const { t } = useTranslate();
|
|
44695
|
-
const handleActionClick =
|
|
44768
|
+
const handleActionClick = React93__default.useCallback(() => {
|
|
44696
44769
|
if (action?.event) {
|
|
44697
44770
|
eventBus.emit(`UI:${action.event}`, {});
|
|
44698
44771
|
}
|
|
@@ -44703,7 +44776,7 @@ var init_StatCard = __esm({
|
|
|
44703
44776
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
44704
44777
|
const isLoading = externalLoading ?? false;
|
|
44705
44778
|
const error = externalError;
|
|
44706
|
-
const computeMetricValue =
|
|
44779
|
+
const computeMetricValue = React93__default.useCallback(
|
|
44707
44780
|
(metric, items) => {
|
|
44708
44781
|
if (metric.value !== void 0) {
|
|
44709
44782
|
return metric.value;
|
|
@@ -44742,7 +44815,7 @@ var init_StatCard = __esm({
|
|
|
44742
44815
|
},
|
|
44743
44816
|
[]
|
|
44744
44817
|
);
|
|
44745
|
-
const schemaStats =
|
|
44818
|
+
const schemaStats = React93__default.useMemo(() => {
|
|
44746
44819
|
if (!metrics || metrics.length === 0) return null;
|
|
44747
44820
|
return metrics.map((metric) => ({
|
|
44748
44821
|
label: metric.label,
|
|
@@ -44750,7 +44823,7 @@ var init_StatCard = __esm({
|
|
|
44750
44823
|
format: metric.format
|
|
44751
44824
|
}));
|
|
44752
44825
|
}, [metrics, data, computeMetricValue]);
|
|
44753
|
-
const calculatedTrend =
|
|
44826
|
+
const calculatedTrend = React93__default.useMemo(() => {
|
|
44754
44827
|
if (manualTrend !== void 0) return manualTrend;
|
|
44755
44828
|
if (previousValue === void 0 || currentValue === void 0)
|
|
44756
44829
|
return void 0;
|
|
@@ -45390,8 +45463,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
45390
45463
|
] });
|
|
45391
45464
|
};
|
|
45392
45465
|
InlineActivityStream = ({ activities, autoScroll = true, className }) => {
|
|
45393
|
-
const endRef =
|
|
45394
|
-
|
|
45466
|
+
const endRef = React93__default.useRef(null);
|
|
45467
|
+
React93__default.useEffect(() => {
|
|
45395
45468
|
if (!autoScroll) return;
|
|
45396
45469
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
45397
45470
|
}, [activities.length, autoScroll]);
|
|
@@ -45485,7 +45558,7 @@ var init_SubagentTracePanel = __esm({
|
|
|
45485
45558
|
};
|
|
45486
45559
|
SubagentRichCard = ({ subagent }) => {
|
|
45487
45560
|
const { t } = useTranslate();
|
|
45488
|
-
const activities =
|
|
45561
|
+
const activities = React93__default.useMemo(
|
|
45489
45562
|
() => subagentMessagesToActivities(subagent.messages),
|
|
45490
45563
|
[subagent.messages]
|
|
45491
45564
|
);
|
|
@@ -45562,8 +45635,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
45562
45635
|
] });
|
|
45563
45636
|
};
|
|
45564
45637
|
CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
|
|
45565
|
-
const endRef =
|
|
45566
|
-
|
|
45638
|
+
const endRef = React93__default.useRef(null);
|
|
45639
|
+
React93__default.useEffect(() => {
|
|
45567
45640
|
if (!autoScroll) return;
|
|
45568
45641
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
45569
45642
|
}, [messages.length, autoScroll]);
|
|
@@ -45998,7 +46071,7 @@ var init_Timeline = __esm({
|
|
|
45998
46071
|
}) => {
|
|
45999
46072
|
const { t } = useTranslate();
|
|
46000
46073
|
const entityData = entity ?? [];
|
|
46001
|
-
const items =
|
|
46074
|
+
const items = React93__default.useMemo(() => {
|
|
46002
46075
|
if (propItems) return propItems;
|
|
46003
46076
|
if (entityData.length === 0) return [];
|
|
46004
46077
|
return entityData.map((record, idx) => {
|
|
@@ -46100,7 +46173,7 @@ var init_Timeline = __esm({
|
|
|
46100
46173
|
}
|
|
46101
46174
|
});
|
|
46102
46175
|
function extractToastProps(children) {
|
|
46103
|
-
if (!
|
|
46176
|
+
if (!React93__default.isValidElement(children)) {
|
|
46104
46177
|
if (typeof children === "string") {
|
|
46105
46178
|
return { message: children };
|
|
46106
46179
|
}
|
|
@@ -46142,7 +46215,7 @@ var init_ToastSlot = __esm({
|
|
|
46142
46215
|
eventBus.emit(`${prefix}CLOSE`);
|
|
46143
46216
|
};
|
|
46144
46217
|
if (!isVisible) return null;
|
|
46145
|
-
const isCustomContent =
|
|
46218
|
+
const isCustomContent = React93__default.isValidElement(children) && !message;
|
|
46146
46219
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
46147
46220
|
Toast,
|
|
46148
46221
|
{
|
|
@@ -46715,7 +46788,7 @@ function SuspenseConfigProvider({
|
|
|
46715
46788
|
config,
|
|
46716
46789
|
children
|
|
46717
46790
|
}) {
|
|
46718
|
-
return
|
|
46791
|
+
return React93__default.createElement(
|
|
46719
46792
|
SuspenseConfigContext.Provider,
|
|
46720
46793
|
{ value: config },
|
|
46721
46794
|
children
|
|
@@ -46757,7 +46830,7 @@ function enrichFormFields(fields, entityDef) {
|
|
|
46757
46830
|
}
|
|
46758
46831
|
return { name: field, label: humanizeFieldName(field) };
|
|
46759
46832
|
}
|
|
46760
|
-
if (field && typeof field === "object" && !Array.isArray(field) && !
|
|
46833
|
+
if (field && typeof field === "object" && !Array.isArray(field) && !React93__default.isValidElement(field) && !(field instanceof Date)) {
|
|
46761
46834
|
const obj = field;
|
|
46762
46835
|
const fieldName = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
|
|
46763
46836
|
if (!fieldName) return field;
|
|
@@ -47229,7 +47302,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
47229
47302
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
47230
47303
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
47231
47304
|
}
|
|
47232
|
-
return /* @__PURE__ */ jsx(
|
|
47305
|
+
return /* @__PURE__ */ jsx(React93__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
47233
47306
|
}
|
|
47234
47307
|
if (!child || typeof child !== "object") return null;
|
|
47235
47308
|
const childId = `${parentId}-${index}`;
|
|
@@ -47286,14 +47359,14 @@ function isPatternConfig(value) {
|
|
|
47286
47359
|
if (value === null || value === void 0) return false;
|
|
47287
47360
|
if (typeof value !== "object") return false;
|
|
47288
47361
|
if (Array.isArray(value)) return false;
|
|
47289
|
-
if (
|
|
47362
|
+
if (React93__default.isValidElement(value)) return false;
|
|
47290
47363
|
if (value instanceof Date) return false;
|
|
47291
47364
|
if (typeof value === "function") return false;
|
|
47292
47365
|
const record = value;
|
|
47293
47366
|
return "type" in record && typeof record.type === "string" && getComponentForPattern$1(record.type) !== null;
|
|
47294
47367
|
}
|
|
47295
47368
|
function isPlainConfigObject(value) {
|
|
47296
|
-
if (
|
|
47369
|
+
if (React93__default.isValidElement(value)) return false;
|
|
47297
47370
|
if (value instanceof Date) return false;
|
|
47298
47371
|
const proto = Object.getPrototypeOf(value);
|
|
47299
47372
|
return proto === Object.prototype || proto === null;
|
|
@@ -47429,7 +47502,7 @@ function SlotContentRenderer({
|
|
|
47429
47502
|
for (const slotKey of CONTENT_NODE_SLOTS) {
|
|
47430
47503
|
const slotVal = restProps[slotKey];
|
|
47431
47504
|
if (slotVal === void 0 || slotVal === null) continue;
|
|
47432
|
-
if (
|
|
47505
|
+
if (React93__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
|
|
47433
47506
|
const typelessChildren = !Array.isArray(slotVal) && typeof slotVal === "object" && !("type" in slotVal) && Array.isArray(slotVal.children) ? slotVal.children : void 0;
|
|
47434
47507
|
if (typelessChildren !== void 0 || Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
|
|
47435
47508
|
nodeSlotOverrides[slotKey] = renderPatternChildren(
|
|
@@ -47483,7 +47556,7 @@ function SlotContentRenderer({
|
|
|
47483
47556
|
const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
|
|
47484
47557
|
if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
|
|
47485
47558
|
const sample = resolvedItems[0];
|
|
47486
|
-
if (sample && typeof sample === "object" && !Array.isArray(sample) && !
|
|
47559
|
+
if (sample && typeof sample === "object" && !Array.isArray(sample) && !React93__default.isValidElement(sample) && !(sample instanceof Date)) {
|
|
47487
47560
|
const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
|
|
47488
47561
|
finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
|
|
47489
47562
|
}
|
|
@@ -47850,7 +47923,7 @@ var AvlTransition = ({
|
|
|
47850
47923
|
opacity = 1,
|
|
47851
47924
|
className
|
|
47852
47925
|
}) => {
|
|
47853
|
-
const ids =
|
|
47926
|
+
const ids = React93__default.useMemo(() => {
|
|
47854
47927
|
avlTransitionId += 1;
|
|
47855
47928
|
return { arrow: `avl-tr-${avlTransitionId}-arrow` };
|
|
47856
47929
|
}, []);
|
|
@@ -48411,7 +48484,7 @@ var AvlStateMachine = ({
|
|
|
48411
48484
|
color = "var(--color-primary)",
|
|
48412
48485
|
animated = false
|
|
48413
48486
|
}) => {
|
|
48414
|
-
const ids =
|
|
48487
|
+
const ids = React93__default.useMemo(() => {
|
|
48415
48488
|
avlSmId += 1;
|
|
48416
48489
|
const base = `avl-sm-${avlSmId}`;
|
|
48417
48490
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -48610,7 +48683,7 @@ var AvlOrbitalUnit = ({
|
|
|
48610
48683
|
color = "var(--color-primary)",
|
|
48611
48684
|
animated = false
|
|
48612
48685
|
}) => {
|
|
48613
|
-
const ids =
|
|
48686
|
+
const ids = React93__default.useMemo(() => {
|
|
48614
48687
|
avlOuId += 1;
|
|
48615
48688
|
const base = `avl-ou-${avlOuId}`;
|
|
48616
48689
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -48706,7 +48779,7 @@ var AvlClosedCircuit = ({
|
|
|
48706
48779
|
color = "var(--color-primary)",
|
|
48707
48780
|
animated = false
|
|
48708
48781
|
}) => {
|
|
48709
|
-
const ids =
|
|
48782
|
+
const ids = React93__default.useMemo(() => {
|
|
48710
48783
|
avlCcId += 1;
|
|
48711
48784
|
const base = `avl-cc-${avlCcId}`;
|
|
48712
48785
|
return { glow: `${base}-glow`, grad: `${base}-grad`, arrow: `${base}-arrow` };
|
|
@@ -48861,7 +48934,7 @@ var AvlEmitListen = ({
|
|
|
48861
48934
|
color = "var(--color-primary)",
|
|
48862
48935
|
animated = false
|
|
48863
48936
|
}) => {
|
|
48864
|
-
const ids =
|
|
48937
|
+
const ids = React93__default.useMemo(() => {
|
|
48865
48938
|
avlElId += 1;
|
|
48866
48939
|
const base = `avl-el-${avlElId}`;
|
|
48867
48940
|
return { arrow: `${base}-arrow`, grad: `${base}-grad` };
|
|
@@ -49135,7 +49208,7 @@ function renderNode(node, color, glowId) {
|
|
|
49135
49208
|
const baseR = node.type === "operator" ? 20 : 16;
|
|
49136
49209
|
const r2 = Math.max(baseR, labelLen * 3.5 + 6);
|
|
49137
49210
|
const nc = nodeColor(node.type, color);
|
|
49138
|
-
return /* @__PURE__ */ jsxs(
|
|
49211
|
+
return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
|
|
49139
49212
|
node.children.map((child, i) => {
|
|
49140
49213
|
const childR = Math.max(
|
|
49141
49214
|
child.type === "operator" ? 20 : 16,
|
|
@@ -49192,7 +49265,7 @@ var AvlExprTree = ({
|
|
|
49192
49265
|
className,
|
|
49193
49266
|
color = "var(--color-primary)"
|
|
49194
49267
|
}) => {
|
|
49195
|
-
const ids =
|
|
49268
|
+
const ids = React93__default.useMemo(() => {
|
|
49196
49269
|
avlEtId += 1;
|
|
49197
49270
|
return { glow: `avl-et-${avlEtId}-glow` };
|
|
49198
49271
|
}, []);
|
|
@@ -50027,7 +50100,7 @@ var SystemNode = ({ data }) => {
|
|
|
50027
50100
|
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) => {
|
|
50028
50101
|
const tc = transitionCounts[s.name] ?? 0;
|
|
50029
50102
|
const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
50030
|
-
return /* @__PURE__ */ jsxs(
|
|
50103
|
+
return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
|
|
50031
50104
|
/* @__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 }),
|
|
50032
50105
|
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 })
|
|
50033
50106
|
] }, s.name);
|
|
@@ -51114,7 +51187,7 @@ function resolveLambdaBindings(body, params, item, index) {
|
|
|
51114
51187
|
}
|
|
51115
51188
|
return substituted;
|
|
51116
51189
|
}
|
|
51117
|
-
if (body !== null && typeof body === "object" && !
|
|
51190
|
+
if (body !== null && typeof body === "object" && !React93__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
51118
51191
|
const out = {};
|
|
51119
51192
|
for (const [k, v] of Object.entries(body)) {
|
|
51120
51193
|
out[k] = recur(v);
|
|
@@ -51147,7 +51220,7 @@ function deferLambdaEntityExprs(value) {
|
|
|
51147
51220
|
}
|
|
51148
51221
|
return arr.map((v) => deferLambdaEntityExprs(v));
|
|
51149
51222
|
}
|
|
51150
|
-
if (value !== null && typeof value === "object" && !
|
|
51223
|
+
if (value !== null && typeof value === "object" && !React93__default.isValidElement(value) && !(value instanceof Date) && typeof value !== "function" && !isRenderBindingMarker(value)) {
|
|
51151
51224
|
const out = {};
|
|
51152
51225
|
for (const [k, v] of Object.entries(value)) {
|
|
51153
51226
|
out[k] = deferLambdaEntityExprs(v);
|
|
@@ -51161,7 +51234,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
51161
51234
|
const resolvedBody = deferLambdaEntityExprs(
|
|
51162
51235
|
resolveLambdaBindings(lambdaBody, params, item, index)
|
|
51163
51236
|
);
|
|
51164
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
51237
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React93__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
51165
51238
|
return null;
|
|
51166
51239
|
}
|
|
51167
51240
|
const record = resolvedBody;
|
|
@@ -51180,7 +51253,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
51180
51253
|
props: childProps,
|
|
51181
51254
|
priority: 0
|
|
51182
51255
|
};
|
|
51183
|
-
return
|
|
51256
|
+
return React93__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
51184
51257
|
};
|
|
51185
51258
|
}
|
|
51186
51259
|
function convertNode(node, callerKey) {
|
|
@@ -51200,7 +51273,7 @@ function convertNode(node, callerKey) {
|
|
|
51200
51273
|
});
|
|
51201
51274
|
return anyChanged ? mapped : node;
|
|
51202
51275
|
}
|
|
51203
|
-
if (typeof node === "object" && !
|
|
51276
|
+
if (typeof node === "object" && !React93__default.isValidElement(node) && !(node instanceof Date)) {
|
|
51204
51277
|
return convertObjectProps(node);
|
|
51205
51278
|
}
|
|
51206
51279
|
return node;
|
|
@@ -53123,8 +53196,8 @@ function CanvasDndProvider({
|
|
|
53123
53196
|
}) {
|
|
53124
53197
|
const eventBus = useEventBus();
|
|
53125
53198
|
const sensors = useAlmadarDndSensors(false);
|
|
53126
|
-
const [activePayload, setActivePayload] =
|
|
53127
|
-
const handleDragStart =
|
|
53199
|
+
const [activePayload, setActivePayload] = React93__default.useState(null);
|
|
53200
|
+
const handleDragStart = React93__default.useCallback((e) => {
|
|
53128
53201
|
const data = e.active.data.current;
|
|
53129
53202
|
const payload = data?.payload;
|
|
53130
53203
|
if (payload) {
|
|
@@ -53135,7 +53208,7 @@ function CanvasDndProvider({
|
|
|
53135
53208
|
log9.warn("dragStart:missing-payload", { id: e.active.id });
|
|
53136
53209
|
}
|
|
53137
53210
|
}, [eventBus]);
|
|
53138
|
-
const handleDragEnd =
|
|
53211
|
+
const handleDragEnd = React93__default.useCallback((e) => {
|
|
53139
53212
|
setActivePayload(null);
|
|
53140
53213
|
const activeData = e.active.data.current;
|
|
53141
53214
|
const payload = activeData?.payload;
|
|
@@ -53164,7 +53237,7 @@ function CanvasDndProvider({
|
|
|
53164
53237
|
const suppressed = onDrop ? onDrop(drop) === true : false;
|
|
53165
53238
|
if (!suppressed) defaultEmit(eventBus, drop);
|
|
53166
53239
|
}, [eventBus, onDrop]);
|
|
53167
|
-
const handleDragCancel =
|
|
53240
|
+
const handleDragCancel = React93__default.useCallback(() => {
|
|
53168
53241
|
setActivePayload(null);
|
|
53169
53242
|
log9.info("dragCancel");
|
|
53170
53243
|
}, []);
|
|
@@ -53922,7 +53995,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
53922
53995
|
}
|
|
53923
53996
|
);
|
|
53924
53997
|
};
|
|
53925
|
-
var OrbPreviewNode =
|
|
53998
|
+
var OrbPreviewNode = React93__default.memo(OrbPreviewNodeInner);
|
|
53926
53999
|
OrbPreviewNode.displayName = "OrbPreviewNode";
|
|
53927
54000
|
orbPreviewLog.debug("export-resolved", () => ({
|
|
53928
54001
|
type: typeof OrbPreviewNode,
|
|
@@ -54027,7 +54100,7 @@ var EventFlowEdgeInner = (props) => {
|
|
|
54027
54100
|
) })
|
|
54028
54101
|
] });
|
|
54029
54102
|
};
|
|
54030
|
-
var EventFlowEdge =
|
|
54103
|
+
var EventFlowEdge = React93__default.memo(EventFlowEdgeInner);
|
|
54031
54104
|
EventFlowEdge.displayName = "EventFlowEdge";
|
|
54032
54105
|
|
|
54033
54106
|
// components/avl/molecules/BehaviorComposeNode.tsx
|
|
@@ -54174,7 +54247,7 @@ var BehaviorComposeNodeInner = (props) => {
|
|
|
54174
54247
|
}
|
|
54175
54248
|
);
|
|
54176
54249
|
};
|
|
54177
|
-
var BehaviorComposeNode =
|
|
54250
|
+
var BehaviorComposeNode = React93__default.memo(BehaviorComposeNodeInner);
|
|
54178
54251
|
BehaviorComposeNode.displayName = "BehaviorComposeNode";
|
|
54179
54252
|
|
|
54180
54253
|
// components/avl/lib/avl-behavior-compose-converter.ts
|
|
@@ -55200,7 +55273,7 @@ var TraitCardNodeInner = (props) => {
|
|
|
55200
55273
|
}
|
|
55201
55274
|
);
|
|
55202
55275
|
};
|
|
55203
|
-
var TraitCardNode =
|
|
55276
|
+
var TraitCardNode = React93__default.memo(TraitCardNodeInner);
|
|
55204
55277
|
TraitCardNode.displayName = "TraitCardNode";
|
|
55205
55278
|
|
|
55206
55279
|
// components/avl/organisms/FlowCanvas.tsx
|
|
@@ -55281,7 +55354,7 @@ function FlowCanvasInner({
|
|
|
55281
55354
|
initialOrbital
|
|
55282
55355
|
);
|
|
55283
55356
|
const [expandedBehaviorAlias, setExpandedBehaviorAlias] = useState(void 0);
|
|
55284
|
-
const screenSizeUserOverrideRef =
|
|
55357
|
+
const screenSizeUserOverrideRef = React93__default.useRef(false);
|
|
55285
55358
|
const [screenSize, setScreenSize] = useState(
|
|
55286
55359
|
() => typeof window === "undefined" ? "laptop" : detectScreenSize(window.innerWidth)
|
|
55287
55360
|
);
|
|
@@ -55665,7 +55738,7 @@ var ZoomBreadcrumb = ({
|
|
|
55665
55738
|
if (eventName && band === "detail") {
|
|
55666
55739
|
segments.push({ icon: "\u26A1", label: eventName });
|
|
55667
55740
|
}
|
|
55668
|
-
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(
|
|
55741
|
+
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(React93__default.Fragment, { children: [
|
|
55669
55742
|
i > 0 && /* @__PURE__ */ jsx("span", { className: "opacity-40", children: ">" }),
|
|
55670
55743
|
/* @__PURE__ */ jsx("span", { className: "opacity-60", children: seg.icon }),
|
|
55671
55744
|
/* @__PURE__ */ jsx("span", { children: seg.label })
|
|
@@ -56006,7 +56079,7 @@ var EventWireOverlay = ({
|
|
|
56006
56079
|
containerW,
|
|
56007
56080
|
containerH
|
|
56008
56081
|
}) => {
|
|
56009
|
-
const ids =
|
|
56082
|
+
const ids = React93__default.useMemo(() => {
|
|
56010
56083
|
avlOczWireId += 1;
|
|
56011
56084
|
return { arrow: `avl-ocz-wire-${avlOczWireId}-arrow` };
|
|
56012
56085
|
}, []);
|
|
@@ -56373,7 +56446,7 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
56373
56446
|
borderRadius: 6,
|
|
56374
56447
|
border: `1px solid ${color}`
|
|
56375
56448
|
},
|
|
56376
|
-
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(
|
|
56449
|
+
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
|
|
56377
56450
|
i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", style: { opacity: 0.5, color }, children: "/" }),
|
|
56378
56451
|
i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
|
|
56379
56452
|
Box,
|