@almadar/ui 5.141.0 → 5.142.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 +1236 -1213
- package/dist/avl/index.js +263 -240
- package/dist/{avl-schema-parser-B8Onmfsu.d.cts → avl-schema-parser-DAs12kxP.d.ts} +229 -2
- package/dist/{avl-schema-parser-B8Onmfsu.d.ts → avl-schema-parser-wOkfbwAh.d.cts} +229 -2
- package/dist/components/index.cjs +1220 -1197
- package/dist/components/index.d.cts +10 -3
- package/dist/components/index.d.ts +10 -3
- package/dist/components/index.js +254 -231
- package/dist/lib/drawable/three/index.cjs +187 -22
- package/dist/lib/drawable/three/index.d.cts +14 -173
- package/dist/lib/drawable/three/index.d.ts +14 -173
- package/dist/lib/drawable/three/index.js +188 -23
- package/dist/providers/index.cjs +1119 -1096
- package/dist/providers/index.js +238 -215
- package/dist/runtime/index.cjs +1097 -1074
- package/dist/runtime/index.js +243 -220
- package/package.json +3 -3
package/dist/runtime/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React85 from 'react';
|
|
2
|
+
import React85__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useSyncExternalStore, useLayoutEffect, lazy, useId } from 'react';
|
|
3
3
|
import { EventBusContext, useTraitScopeChain, useEntitySchemaOptional, useEntityBindingSnapshot, useTraitScope, useEntitySchema, getAllPages, matchPathAmong, OrbitalProvider, TraitScopeProvider, ServerBridgeProvider, useCurrentPagePath, useGameAudioContextOptional, VerificationProvider, EntitySchemaProvider, OrbitalThemeProvider, useServerBridge, EntityBindingContext } from '@almadar/ui/providers';
|
|
4
4
|
export { EntitySchemaProvider, ServerBridgeProvider, TraitContext, TraitProvider, useEntitySchema, useEntitySchemaOptional, useServerBridge, useTrait, useTraitContext } from '@almadar/ui/providers';
|
|
5
5
|
import { createLogger, setNamespaceLevel, isLogLevelEnabled } from '@almadar/logger';
|
|
@@ -825,7 +825,7 @@ function resolveMarkerExpression(expression, entity, config, state) {
|
|
|
825
825
|
function isPlainObject(value) {
|
|
826
826
|
if (value === null || value === void 0 || typeof value !== "object") return false;
|
|
827
827
|
if (Array.isArray(value)) return false;
|
|
828
|
-
if (
|
|
828
|
+
if (React85__default.isValidElement(value)) return false;
|
|
829
829
|
if (value instanceof Date) return false;
|
|
830
830
|
if (typeof value === "function") return false;
|
|
831
831
|
return true;
|
|
@@ -998,7 +998,7 @@ var init_Box = __esm({
|
|
|
998
998
|
fixed: "fixed",
|
|
999
999
|
sticky: "sticky"
|
|
1000
1000
|
};
|
|
1001
|
-
Box =
|
|
1001
|
+
Box = React85__default.forwardRef(
|
|
1002
1002
|
({
|
|
1003
1003
|
padding,
|
|
1004
1004
|
paddingX,
|
|
@@ -1063,7 +1063,7 @@ var init_Box = __esm({
|
|
|
1063
1063
|
onPointerDown?.(e);
|
|
1064
1064
|
}, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
|
|
1065
1065
|
const isClickable = action || onClick;
|
|
1066
|
-
return
|
|
1066
|
+
return React85__default.createElement(
|
|
1067
1067
|
Component,
|
|
1068
1068
|
{
|
|
1069
1069
|
ref,
|
|
@@ -1280,7 +1280,7 @@ var init_Icon = __esm({
|
|
|
1280
1280
|
const effectiveName = typeof icon === "string" && icon !== "" ? icon : name;
|
|
1281
1281
|
const effectiveStrokeWidth = strokeWidth != null && strokeWidth > 0 ? strokeWidth : void 0;
|
|
1282
1282
|
const family = useIconFamily();
|
|
1283
|
-
const RenderedComponent =
|
|
1283
|
+
const RenderedComponent = React85__default.useMemo(() => {
|
|
1284
1284
|
if (directIcon) return null;
|
|
1285
1285
|
return effectiveName ? resolveIconForFamily(effectiveName) : null;
|
|
1286
1286
|
}, [directIcon, effectiveName, family]);
|
|
@@ -1404,7 +1404,7 @@ var init_atlasSlice = __esm({
|
|
|
1404
1404
|
}
|
|
1405
1405
|
});
|
|
1406
1406
|
function useAtlasSliceDataUrl(asset) {
|
|
1407
|
-
const [, bump] =
|
|
1407
|
+
const [, bump] = React85.useReducer((x) => x + 1, 0);
|
|
1408
1408
|
if (!isAtlasAsset(asset)) return void 0;
|
|
1409
1409
|
const key = `${asset.atlas}#${asset.sprite}`;
|
|
1410
1410
|
const cached = sliceDataUrlCache.get(key);
|
|
@@ -1467,13 +1467,13 @@ function AtlasImage({
|
|
|
1467
1467
|
style,
|
|
1468
1468
|
"aria-hidden": ariaHidden
|
|
1469
1469
|
}) {
|
|
1470
|
-
const [, bump] =
|
|
1471
|
-
const canvasRef =
|
|
1470
|
+
const [, bump] = React85.useReducer((x) => x + 1, 0);
|
|
1471
|
+
const canvasRef = React85.useRef(null);
|
|
1472
1472
|
const sliced = isAtlasAsset(asset);
|
|
1473
1473
|
const atlas = sliced ? getAtlas(asset.atlas, bump) : void 0;
|
|
1474
1474
|
const img = sliced && asset?.url ? getSheetImage(asset.url, bump) : null;
|
|
1475
1475
|
const rect = sliced && atlas ? subRectFor(atlas, asset.sprite) : null;
|
|
1476
|
-
|
|
1476
|
+
React85.useEffect(() => {
|
|
1477
1477
|
const canvas = canvasRef.current;
|
|
1478
1478
|
if (!canvas || !img || !rect) return;
|
|
1479
1479
|
canvas.width = rect.sw;
|
|
@@ -1549,7 +1549,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
1549
1549
|
const IconComp = value;
|
|
1550
1550
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
1551
1551
|
}
|
|
1552
|
-
if (
|
|
1552
|
+
if (React85__default.isValidElement(value)) {
|
|
1553
1553
|
return value;
|
|
1554
1554
|
}
|
|
1555
1555
|
if (typeof value === "object" && value !== null && isIconLike(value)) {
|
|
@@ -1626,7 +1626,7 @@ var init_Button = __esm({
|
|
|
1626
1626
|
md: "h-icon-default w-icon-default",
|
|
1627
1627
|
lg: "h-icon-default w-icon-default"
|
|
1628
1628
|
};
|
|
1629
|
-
Button =
|
|
1629
|
+
Button = React85__default.forwardRef(
|
|
1630
1630
|
({
|
|
1631
1631
|
className,
|
|
1632
1632
|
variant = "primary",
|
|
@@ -1696,7 +1696,7 @@ var Dialog;
|
|
|
1696
1696
|
var init_Dialog = __esm({
|
|
1697
1697
|
"components/core/atoms/Dialog.tsx"() {
|
|
1698
1698
|
init_cn();
|
|
1699
|
-
Dialog =
|
|
1699
|
+
Dialog = React85__default.forwardRef(
|
|
1700
1700
|
({
|
|
1701
1701
|
role = "dialog",
|
|
1702
1702
|
"aria-modal": ariaModal = true,
|
|
@@ -1907,7 +1907,7 @@ var init_Typography = __esm({
|
|
|
1907
1907
|
if (format !== void 0 && format !== "none" && (typeof body === "string" || typeof body === "number" || body instanceof Date)) {
|
|
1908
1908
|
body = formatValue(body, format);
|
|
1909
1909
|
}
|
|
1910
|
-
return
|
|
1910
|
+
return React85__default.createElement(
|
|
1911
1911
|
Component,
|
|
1912
1912
|
{
|
|
1913
1913
|
id,
|
|
@@ -2470,7 +2470,7 @@ var init_Badge = __esm({
|
|
|
2470
2470
|
md: "px-2.5 py-1 text-sm",
|
|
2471
2471
|
lg: "px-3 py-1.5 text-base"
|
|
2472
2472
|
};
|
|
2473
|
-
Badge =
|
|
2473
|
+
Badge = React85__default.forwardRef(
|
|
2474
2474
|
({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, ...props }, ref) => {
|
|
2475
2475
|
const iconSizes3 = {
|
|
2476
2476
|
sm: "h-icon-default w-icon-default",
|
|
@@ -2820,7 +2820,7 @@ var init_SvgFlow = __esm({
|
|
|
2820
2820
|
width = 100,
|
|
2821
2821
|
height = 100
|
|
2822
2822
|
}) => {
|
|
2823
|
-
const markerId =
|
|
2823
|
+
const markerId = React85__default.useMemo(() => {
|
|
2824
2824
|
flowIdCounter += 1;
|
|
2825
2825
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
2826
2826
|
}, []);
|
|
@@ -3413,7 +3413,7 @@ var init_SvgRing = __esm({
|
|
|
3413
3413
|
width = 100,
|
|
3414
3414
|
height = 100
|
|
3415
3415
|
}) => {
|
|
3416
|
-
const gradientId =
|
|
3416
|
+
const gradientId = React85__default.useMemo(() => {
|
|
3417
3417
|
ringIdCounter += 1;
|
|
3418
3418
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
3419
3419
|
}, []);
|
|
@@ -3594,7 +3594,7 @@ var init_Input = __esm({
|
|
|
3594
3594
|
init_cn();
|
|
3595
3595
|
init_Icon();
|
|
3596
3596
|
init_useEventBus();
|
|
3597
|
-
Input =
|
|
3597
|
+
Input = React85__default.forwardRef(
|
|
3598
3598
|
({
|
|
3599
3599
|
className,
|
|
3600
3600
|
inputType,
|
|
@@ -3618,9 +3618,9 @@ var init_Input = __esm({
|
|
|
3618
3618
|
const eventBus = useEventBus();
|
|
3619
3619
|
const type = inputType || htmlType || "text";
|
|
3620
3620
|
const isDeclarative = typeof onChange === "string";
|
|
3621
|
-
const [localValue, setLocalValue] =
|
|
3622
|
-
const pendingEchoRef =
|
|
3623
|
-
|
|
3621
|
+
const [localValue, setLocalValue] = React85__default.useState(value);
|
|
3622
|
+
const pendingEchoRef = React85__default.useRef(/* @__PURE__ */ new Set());
|
|
3623
|
+
React85__default.useEffect(() => {
|
|
3624
3624
|
if (!isDeclarative) return;
|
|
3625
3625
|
const incoming = value == null ? "" : String(value);
|
|
3626
3626
|
if (pendingEchoRef.current.has(incoming)) {
|
|
@@ -3780,7 +3780,7 @@ var Label;
|
|
|
3780
3780
|
var init_Label = __esm({
|
|
3781
3781
|
"components/core/atoms/Label.tsx"() {
|
|
3782
3782
|
init_cn();
|
|
3783
|
-
Label =
|
|
3783
|
+
Label = React85__default.forwardRef(
|
|
3784
3784
|
({ className, required, children, ...props }, ref) => {
|
|
3785
3785
|
return /* @__PURE__ */ jsxs(
|
|
3786
3786
|
"label",
|
|
@@ -3807,7 +3807,7 @@ var init_Textarea = __esm({
|
|
|
3807
3807
|
"components/core/atoms/Textarea.tsx"() {
|
|
3808
3808
|
init_cn();
|
|
3809
3809
|
init_useEventBus();
|
|
3810
|
-
Textarea =
|
|
3810
|
+
Textarea = React85__default.forwardRef(
|
|
3811
3811
|
({ className, error, onChange, ...props }, ref) => {
|
|
3812
3812
|
const eventBus = useEventBus();
|
|
3813
3813
|
const handleChange = (e) => {
|
|
@@ -4046,7 +4046,7 @@ var init_Select = __esm({
|
|
|
4046
4046
|
init_cn();
|
|
4047
4047
|
init_Icon();
|
|
4048
4048
|
init_useEventBus();
|
|
4049
|
-
Select =
|
|
4049
|
+
Select = React85__default.forwardRef(
|
|
4050
4050
|
(props, _ref) => {
|
|
4051
4051
|
const { multiple, searchable, clearable } = props;
|
|
4052
4052
|
if (multiple || searchable || clearable) {
|
|
@@ -4063,7 +4063,7 @@ var init_Checkbox = __esm({
|
|
|
4063
4063
|
"components/core/atoms/Checkbox.tsx"() {
|
|
4064
4064
|
init_cn();
|
|
4065
4065
|
init_useEventBus();
|
|
4066
|
-
Checkbox =
|
|
4066
|
+
Checkbox = React85__default.forwardRef(
|
|
4067
4067
|
({ className, label, id, onChange, ...props }, ref) => {
|
|
4068
4068
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
4069
4069
|
const eventBus = useEventBus();
|
|
@@ -4117,7 +4117,7 @@ var init_Spinner = __esm({
|
|
|
4117
4117
|
md: "h-6 w-6",
|
|
4118
4118
|
lg: "h-8 w-8"
|
|
4119
4119
|
};
|
|
4120
|
-
Spinner =
|
|
4120
|
+
Spinner = React85__default.forwardRef(
|
|
4121
4121
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
4122
4122
|
if (overlay) {
|
|
4123
4123
|
return /* @__PURE__ */ jsx(
|
|
@@ -4207,7 +4207,7 @@ var init_Card = __esm({
|
|
|
4207
4207
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
4208
4208
|
"tile-image-first": "p-0 overflow-hidden"
|
|
4209
4209
|
};
|
|
4210
|
-
Card =
|
|
4210
|
+
Card = React85__default.forwardRef(
|
|
4211
4211
|
({
|
|
4212
4212
|
className,
|
|
4213
4213
|
variant = "bordered",
|
|
@@ -4256,9 +4256,9 @@ var init_Card = __esm({
|
|
|
4256
4256
|
}
|
|
4257
4257
|
);
|
|
4258
4258
|
Card.displayName = "Card";
|
|
4259
|
-
CardHeader =
|
|
4259
|
+
CardHeader = React85__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
4260
4260
|
CardHeader.displayName = "CardHeader";
|
|
4261
|
-
CardTitle =
|
|
4261
|
+
CardTitle = React85__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4262
4262
|
"h3",
|
|
4263
4263
|
{
|
|
4264
4264
|
ref,
|
|
@@ -4271,11 +4271,11 @@ var init_Card = __esm({
|
|
|
4271
4271
|
}
|
|
4272
4272
|
));
|
|
4273
4273
|
CardTitle.displayName = "CardTitle";
|
|
4274
|
-
CardContent =
|
|
4274
|
+
CardContent = React85__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
4275
4275
|
CardContent.displayName = "CardContent";
|
|
4276
4276
|
CardBody = CardContent;
|
|
4277
4277
|
CardBody.displayName = "CardBody";
|
|
4278
|
-
CardFooter =
|
|
4278
|
+
CardFooter = React85__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4279
4279
|
"div",
|
|
4280
4280
|
{
|
|
4281
4281
|
ref,
|
|
@@ -4362,7 +4362,7 @@ var init_FilterPill = __esm({
|
|
|
4362
4362
|
md: "w-3.5 h-3.5",
|
|
4363
4363
|
lg: "w-4 h-4"
|
|
4364
4364
|
};
|
|
4365
|
-
FilterPill =
|
|
4365
|
+
FilterPill = React85__default.forwardRef(
|
|
4366
4366
|
({
|
|
4367
4367
|
className,
|
|
4368
4368
|
variant = "default",
|
|
@@ -4491,8 +4491,8 @@ var init_Avatar = __esm({
|
|
|
4491
4491
|
actionPayload
|
|
4492
4492
|
}) => {
|
|
4493
4493
|
const eventBus = useEventBus();
|
|
4494
|
-
const [imgFailed, setImgFailed] =
|
|
4495
|
-
|
|
4494
|
+
const [imgFailed, setImgFailed] = React85__default.useState(false);
|
|
4495
|
+
React85__default.useEffect(() => {
|
|
4496
4496
|
setImgFailed(false);
|
|
4497
4497
|
}, [src]);
|
|
4498
4498
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -4605,7 +4605,7 @@ var init_Center = __esm({
|
|
|
4605
4605
|
as: Component = "div"
|
|
4606
4606
|
}) => {
|
|
4607
4607
|
const mergedStyle = minHeight ? { minHeight, ...style } : style;
|
|
4608
|
-
return
|
|
4608
|
+
return React85__default.createElement(Component, {
|
|
4609
4609
|
className: cn(
|
|
4610
4610
|
inline ? "inline-flex" : "flex",
|
|
4611
4611
|
horizontal && "justify-center",
|
|
@@ -4873,7 +4873,7 @@ var init_Radio = __esm({
|
|
|
4873
4873
|
md: "w-2.5 h-2.5",
|
|
4874
4874
|
lg: "w-3 h-3"
|
|
4875
4875
|
};
|
|
4876
|
-
Radio =
|
|
4876
|
+
Radio = React85__default.forwardRef(
|
|
4877
4877
|
({
|
|
4878
4878
|
label,
|
|
4879
4879
|
helperText,
|
|
@@ -4890,12 +4890,12 @@ var init_Radio = __esm({
|
|
|
4890
4890
|
onChange,
|
|
4891
4891
|
...props
|
|
4892
4892
|
}, ref) => {
|
|
4893
|
-
const reactId =
|
|
4893
|
+
const reactId = React85__default.useId();
|
|
4894
4894
|
const baseId = id || `radio-${reactId}`;
|
|
4895
4895
|
const hasError = !!error;
|
|
4896
4896
|
const eventBus = useEventBus();
|
|
4897
|
-
const [selected, setSelected] =
|
|
4898
|
-
|
|
4897
|
+
const [selected, setSelected] = React85__default.useState(value);
|
|
4898
|
+
React85__default.useEffect(() => {
|
|
4899
4899
|
if (value !== void 0) setSelected(value);
|
|
4900
4900
|
}, [value]);
|
|
4901
4901
|
const pick = (next, e) => {
|
|
@@ -5077,7 +5077,7 @@ var init_Switch = __esm({
|
|
|
5077
5077
|
"components/core/atoms/Switch.tsx"() {
|
|
5078
5078
|
"use client";
|
|
5079
5079
|
init_cn();
|
|
5080
|
-
Switch =
|
|
5080
|
+
Switch = React85.forwardRef(
|
|
5081
5081
|
({
|
|
5082
5082
|
checked,
|
|
5083
5083
|
defaultChecked = false,
|
|
@@ -5088,10 +5088,10 @@ var init_Switch = __esm({
|
|
|
5088
5088
|
name,
|
|
5089
5089
|
className
|
|
5090
5090
|
}, ref) => {
|
|
5091
|
-
const [isChecked, setIsChecked] =
|
|
5091
|
+
const [isChecked, setIsChecked] = React85.useState(
|
|
5092
5092
|
checked !== void 0 ? checked : defaultChecked
|
|
5093
5093
|
);
|
|
5094
|
-
|
|
5094
|
+
React85.useEffect(() => {
|
|
5095
5095
|
if (checked !== void 0) {
|
|
5096
5096
|
setIsChecked(checked);
|
|
5097
5097
|
}
|
|
@@ -5254,7 +5254,7 @@ var init_Stack = __esm({
|
|
|
5254
5254
|
};
|
|
5255
5255
|
const isHorizontal = direction === "horizontal";
|
|
5256
5256
|
const directionClass = responsive && isHorizontal ? reverse ? "flex-col-reverse md:flex-row-reverse" : "flex-col md:flex-row" : isHorizontal ? reverse ? "flex-row-reverse" : "flex-row" : reverse ? "flex-col-reverse" : "flex-col";
|
|
5257
|
-
return
|
|
5257
|
+
return React85__default.createElement(
|
|
5258
5258
|
Component,
|
|
5259
5259
|
{
|
|
5260
5260
|
className: cn(
|
|
@@ -5454,7 +5454,7 @@ var Aside;
|
|
|
5454
5454
|
var init_Aside = __esm({
|
|
5455
5455
|
"components/core/atoms/Aside.tsx"() {
|
|
5456
5456
|
init_cn();
|
|
5457
|
-
Aside =
|
|
5457
|
+
Aside = React85__default.forwardRef(
|
|
5458
5458
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
5459
5459
|
);
|
|
5460
5460
|
Aside.displayName = "Aside";
|
|
@@ -5533,9 +5533,9 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5533
5533
|
className
|
|
5534
5534
|
}) => {
|
|
5535
5535
|
const { t } = useTranslate();
|
|
5536
|
-
const [isVisible, setIsVisible] =
|
|
5537
|
-
const timeoutRef =
|
|
5538
|
-
const triggerRef =
|
|
5536
|
+
const [isVisible, setIsVisible] = React85__default.useState(false);
|
|
5537
|
+
const timeoutRef = React85__default.useRef(null);
|
|
5538
|
+
const triggerRef = React85__default.useRef(null);
|
|
5539
5539
|
const handleMouseEnter = () => {
|
|
5540
5540
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5541
5541
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -5546,7 +5546,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5546
5546
|
};
|
|
5547
5547
|
const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
|
|
5548
5548
|
const open = isVisible || revealed;
|
|
5549
|
-
|
|
5549
|
+
React85__default.useEffect(() => {
|
|
5550
5550
|
return () => {
|
|
5551
5551
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5552
5552
|
};
|
|
@@ -5756,7 +5756,7 @@ var init_StatusDot = __esm({
|
|
|
5756
5756
|
md: "w-2.5 h-2.5",
|
|
5757
5757
|
lg: "w-3 h-3"
|
|
5758
5758
|
};
|
|
5759
|
-
StatusDot =
|
|
5759
|
+
StatusDot = React85__default.forwardRef(
|
|
5760
5760
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
5761
5761
|
return /* @__PURE__ */ jsx(
|
|
5762
5762
|
"span",
|
|
@@ -5810,7 +5810,7 @@ var init_TrendIndicator = __esm({
|
|
|
5810
5810
|
down: "trending-down",
|
|
5811
5811
|
flat: "arrow-right"
|
|
5812
5812
|
};
|
|
5813
|
-
TrendIndicator =
|
|
5813
|
+
TrendIndicator = React85__default.forwardRef(
|
|
5814
5814
|
({
|
|
5815
5815
|
className,
|
|
5816
5816
|
value,
|
|
@@ -5879,7 +5879,7 @@ var init_RangeSlider = __esm({
|
|
|
5879
5879
|
md: "w-4 h-4",
|
|
5880
5880
|
lg: "w-5 h-5"
|
|
5881
5881
|
};
|
|
5882
|
-
RangeSlider =
|
|
5882
|
+
RangeSlider = React85__default.forwardRef(
|
|
5883
5883
|
({
|
|
5884
5884
|
className,
|
|
5885
5885
|
min = 0,
|
|
@@ -6455,7 +6455,7 @@ var init_ContentSection = __esm({
|
|
|
6455
6455
|
md: "py-16",
|
|
6456
6456
|
lg: "py-24"
|
|
6457
6457
|
};
|
|
6458
|
-
ContentSection =
|
|
6458
|
+
ContentSection = React85__default.forwardRef(
|
|
6459
6459
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
6460
6460
|
return /* @__PURE__ */ jsx(
|
|
6461
6461
|
Box,
|
|
@@ -6989,7 +6989,7 @@ var init_AnimatedReveal = __esm({
|
|
|
6989
6989
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
6990
6990
|
"none": {}
|
|
6991
6991
|
};
|
|
6992
|
-
AnimatedReveal =
|
|
6992
|
+
AnimatedReveal = React85__default.forwardRef(
|
|
6993
6993
|
({
|
|
6994
6994
|
trigger = "scroll",
|
|
6995
6995
|
animation = "fade-up",
|
|
@@ -7149,7 +7149,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
7149
7149
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
7150
7150
|
"use client";
|
|
7151
7151
|
init_cn();
|
|
7152
|
-
AnimatedGraphic =
|
|
7152
|
+
AnimatedGraphic = React85__default.forwardRef(
|
|
7153
7153
|
({
|
|
7154
7154
|
src,
|
|
7155
7155
|
svgContent,
|
|
@@ -7172,7 +7172,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
7172
7172
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
7173
7173
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
7174
7174
|
const prevAnimateRef = useRef(animate);
|
|
7175
|
-
const setRef =
|
|
7175
|
+
const setRef = React85__default.useCallback(
|
|
7176
7176
|
(node) => {
|
|
7177
7177
|
containerRef.current = node;
|
|
7178
7178
|
if (typeof ref === "function") ref(node);
|
|
@@ -7899,9 +7899,9 @@ function ControlButton({
|
|
|
7899
7899
|
className
|
|
7900
7900
|
}) {
|
|
7901
7901
|
const eventBus = useEventBus();
|
|
7902
|
-
const [isPressed, setIsPressed] =
|
|
7902
|
+
const [isPressed, setIsPressed] = React85.useState(false);
|
|
7903
7903
|
const actualPressed = pressed ?? isPressed;
|
|
7904
|
-
const handlePointerDown =
|
|
7904
|
+
const handlePointerDown = React85.useCallback(
|
|
7905
7905
|
(e) => {
|
|
7906
7906
|
e.preventDefault();
|
|
7907
7907
|
if (disabled) return;
|
|
@@ -7911,7 +7911,7 @@ function ControlButton({
|
|
|
7911
7911
|
},
|
|
7912
7912
|
[disabled, pressEvent, eventBus, onPress]
|
|
7913
7913
|
);
|
|
7914
|
-
const handlePointerUp =
|
|
7914
|
+
const handlePointerUp = React85.useCallback(
|
|
7915
7915
|
(e) => {
|
|
7916
7916
|
e.preventDefault();
|
|
7917
7917
|
if (disabled) return;
|
|
@@ -7921,7 +7921,7 @@ function ControlButton({
|
|
|
7921
7921
|
},
|
|
7922
7922
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
7923
7923
|
);
|
|
7924
|
-
const handlePointerLeave =
|
|
7924
|
+
const handlePointerLeave = React85.useCallback(
|
|
7925
7925
|
(e) => {
|
|
7926
7926
|
if (isPressed) {
|
|
7927
7927
|
setIsPressed(false);
|
|
@@ -8179,8 +8179,8 @@ function ControlGrid({
|
|
|
8179
8179
|
className
|
|
8180
8180
|
}) {
|
|
8181
8181
|
const eventBus = useEventBus();
|
|
8182
|
-
const [active, setActive] =
|
|
8183
|
-
const handlePress =
|
|
8182
|
+
const [active, setActive] = React85.useState(/* @__PURE__ */ new Set());
|
|
8183
|
+
const handlePress = React85.useCallback(
|
|
8184
8184
|
(id) => {
|
|
8185
8185
|
setActive((prev) => new Set(prev).add(id));
|
|
8186
8186
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -8194,7 +8194,7 @@ function ControlGrid({
|
|
|
8194
8194
|
},
|
|
8195
8195
|
[kind, actionEvent, directionEvent, directionEvents, eventBus, onAction, onDirection]
|
|
8196
8196
|
);
|
|
8197
|
-
const handleRelease =
|
|
8197
|
+
const handleRelease = React85.useCallback(
|
|
8198
8198
|
(id) => {
|
|
8199
8199
|
setActive((prev) => {
|
|
8200
8200
|
const next = new Set(prev);
|
|
@@ -8552,7 +8552,7 @@ function GameMenu({
|
|
|
8552
8552
|
}) {
|
|
8553
8553
|
const resolvedOptions = (options?.length ? options : void 0) ?? (menuItems?.length ? menuItems : void 0) ?? DEFAULT_MENU_OPTIONS;
|
|
8554
8554
|
const eventBus = useEventBus();
|
|
8555
|
-
const handleOptionClick =
|
|
8555
|
+
const handleOptionClick = React85.useCallback(
|
|
8556
8556
|
(option) => {
|
|
8557
8557
|
if (option.event) {
|
|
8558
8558
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -8788,7 +8788,7 @@ function StateGraph({
|
|
|
8788
8788
|
}) {
|
|
8789
8789
|
const eventBus = useEventBus();
|
|
8790
8790
|
const nodes = states ?? [];
|
|
8791
|
-
const positions =
|
|
8791
|
+
const positions = React85.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
|
|
8792
8792
|
return /* @__PURE__ */ jsxs(
|
|
8793
8793
|
Box,
|
|
8794
8794
|
{
|
|
@@ -8859,8 +8859,8 @@ function MiniMap({
|
|
|
8859
8859
|
tileAssets,
|
|
8860
8860
|
unitAssets
|
|
8861
8861
|
}) {
|
|
8862
|
-
const canvasRef =
|
|
8863
|
-
const imgCacheRef =
|
|
8862
|
+
const canvasRef = React85.useRef(null);
|
|
8863
|
+
const imgCacheRef = React85.useRef(/* @__PURE__ */ new Map());
|
|
8864
8864
|
function loadImg(url) {
|
|
8865
8865
|
const cached = imgCacheRef.current.get(url);
|
|
8866
8866
|
if (cached) return cached.complete ? cached : null;
|
|
@@ -8876,7 +8876,7 @@ function MiniMap({
|
|
|
8876
8876
|
imgCacheRef.current.set(url, img);
|
|
8877
8877
|
return null;
|
|
8878
8878
|
}
|
|
8879
|
-
|
|
8879
|
+
React85.useEffect(() => {
|
|
8880
8880
|
const canvas = canvasRef.current;
|
|
8881
8881
|
if (!canvas) return;
|
|
8882
8882
|
const ctx = canvas.getContext("2d");
|
|
@@ -9950,7 +9950,7 @@ function Canvas2D({
|
|
|
9950
9950
|
const registerChildDrawable = useCallback((node) => {
|
|
9951
9951
|
childDrawablesRef.current.push(node);
|
|
9952
9952
|
}, []);
|
|
9953
|
-
const hasJsxChildren =
|
|
9953
|
+
const hasJsxChildren = React85.Children.count(children) > 0;
|
|
9954
9954
|
function isDrawableLayer(node) {
|
|
9955
9955
|
return node.type === "draw-sprite-layer" || node.type === "draw-shape-layer" || node.type === "draw-text-layer";
|
|
9956
9956
|
}
|
|
@@ -10479,6 +10479,8 @@ function Canvas({
|
|
|
10479
10479
|
showCoordinates,
|
|
10480
10480
|
showTileInfo,
|
|
10481
10481
|
fogOfWar,
|
|
10482
|
+
lighting,
|
|
10483
|
+
post,
|
|
10482
10484
|
tileClickEvent,
|
|
10483
10485
|
unitClickEvent,
|
|
10484
10486
|
tileHoverEvent,
|
|
@@ -10490,10 +10492,25 @@ function Canvas({
|
|
|
10490
10492
|
}) {
|
|
10491
10493
|
canvasLog.debug("Canvas render", { mode, drawablesCount: drawables?.length, projection, camera: camera ? JSON.stringify(camera) : void 0 });
|
|
10492
10494
|
const zoom = camera?.zoom;
|
|
10495
|
+
const childDrawablesRef = useRef([]);
|
|
10496
|
+
if (mode === "3d") childDrawablesRef.current = [];
|
|
10497
|
+
const registerChildDrawable = useCallback((node) => {
|
|
10498
|
+
childDrawablesRef.current.push(node);
|
|
10499
|
+
}, []);
|
|
10500
|
+
const [childDrawables, setChildDrawables] = useState([]);
|
|
10501
|
+
useEffect(() => {
|
|
10502
|
+
if (mode !== "3d") return;
|
|
10503
|
+
const next = childDrawablesRef.current;
|
|
10504
|
+
canvasLog.debug("children:adopt", { registered: next.length, adopted: childDrawables.length });
|
|
10505
|
+
if (next.length === 0 && React85.Children.count(children) > 0) return;
|
|
10506
|
+
setChildDrawables(
|
|
10507
|
+
(prev) => prev.length === next.length && JSON.stringify(prev) === JSON.stringify(next) ? prev : [...next]
|
|
10508
|
+
);
|
|
10509
|
+
});
|
|
10493
10510
|
if (mode === "3d") {
|
|
10494
10511
|
const props3d = {
|
|
10495
10512
|
className,
|
|
10496
|
-
drawables,
|
|
10513
|
+
drawables: [...drawables ?? [], ...childDrawables],
|
|
10497
10514
|
isLoading,
|
|
10498
10515
|
cameraMode: to3DCameraMode(camera?.mode),
|
|
10499
10516
|
...zoom !== void 0 ? { scale: zoom } : {},
|
|
@@ -10509,6 +10526,8 @@ function Canvas({
|
|
|
10509
10526
|
showCoordinates,
|
|
10510
10527
|
showTileInfo,
|
|
10511
10528
|
fogOfWar,
|
|
10529
|
+
lighting,
|
|
10530
|
+
post,
|
|
10512
10531
|
tileClickEvent,
|
|
10513
10532
|
unitClickEvent,
|
|
10514
10533
|
tileHoverEvent,
|
|
@@ -10517,7 +10536,10 @@ function Canvas({
|
|
|
10517
10536
|
keyMap,
|
|
10518
10537
|
keyUpMap
|
|
10519
10538
|
};
|
|
10520
|
-
return /* @__PURE__ */
|
|
10539
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10540
|
+
/* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(Canvas3DHost, { ...props3d }) }),
|
|
10541
|
+
React85.Children.count(children) > 0 && /* @__PURE__ */ jsx(DrawableRegistryContext.Provider, { value: registerChildDrawable, children: /* @__PURE__ */ jsx("div", { "aria-hidden": "true", style: { position: "absolute", width: 0, height: 0, overflow: "hidden" }, children }) })
|
|
10542
|
+
] });
|
|
10521
10543
|
}
|
|
10522
10544
|
return /* @__PURE__ */ jsx(
|
|
10523
10545
|
Canvas2D,
|
|
@@ -10549,6 +10571,7 @@ var Canvas3DHost, canvasLog;
|
|
|
10549
10571
|
var init_Canvas = __esm({
|
|
10550
10572
|
"components/game/molecules/Canvas.tsx"() {
|
|
10551
10573
|
"use client";
|
|
10574
|
+
init_registry();
|
|
10552
10575
|
init_Canvas2D();
|
|
10553
10576
|
Canvas3DHost = lazy(
|
|
10554
10577
|
() => import('@almadar/ui/components/molecules/game/three').then((m) => ({ default: m.Canvas3DHost }))
|
|
@@ -10673,7 +10696,7 @@ function LinearView({
|
|
|
10673
10696
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
10674
10697
|
const isDone = i < currentIdx;
|
|
10675
10698
|
const isCurrent = i === currentIdx;
|
|
10676
|
-
return /* @__PURE__ */ jsxs(
|
|
10699
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
10677
10700
|
i > 0 && /* @__PURE__ */ jsx(
|
|
10678
10701
|
Typography,
|
|
10679
10702
|
{
|
|
@@ -11208,7 +11231,7 @@ function SequenceBar({
|
|
|
11208
11231
|
else onSlotRemove?.(index);
|
|
11209
11232
|
}, [emit, slotRemoveEvent, onSlotRemove, playing]);
|
|
11210
11233
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
11211
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
11234
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
11212
11235
|
i > 0 && /* @__PURE__ */ jsx(
|
|
11213
11236
|
Typography,
|
|
11214
11237
|
{
|
|
@@ -11857,7 +11880,7 @@ var init_ErrorBoundary = __esm({
|
|
|
11857
11880
|
}
|
|
11858
11881
|
);
|
|
11859
11882
|
};
|
|
11860
|
-
ErrorBoundary = class extends
|
|
11883
|
+
ErrorBoundary = class extends React85__default.Component {
|
|
11861
11884
|
constructor(props) {
|
|
11862
11885
|
super(props);
|
|
11863
11886
|
__publicField(this, "reset", () => {
|
|
@@ -12126,7 +12149,7 @@ var init_Container = __esm({
|
|
|
12126
12149
|
as: Component = "div"
|
|
12127
12150
|
}) => {
|
|
12128
12151
|
const resolvedSize = maxWidth ?? size ?? "lg";
|
|
12129
|
-
return
|
|
12152
|
+
return React85__default.createElement(
|
|
12130
12153
|
Component,
|
|
12131
12154
|
{
|
|
12132
12155
|
className: cn(
|
|
@@ -15091,7 +15114,7 @@ var init_CodeBlock = __esm({
|
|
|
15091
15114
|
DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
|
|
15092
15115
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
15093
15116
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
15094
|
-
CodeBlock =
|
|
15117
|
+
CodeBlock = React85__default.memo(
|
|
15095
15118
|
({
|
|
15096
15119
|
code: rawCode,
|
|
15097
15120
|
language = "text",
|
|
@@ -15679,7 +15702,7 @@ var init_MarkdownContent = __esm({
|
|
|
15679
15702
|
init_Box();
|
|
15680
15703
|
init_CodeBlock();
|
|
15681
15704
|
init_cn();
|
|
15682
|
-
MarkdownContent =
|
|
15705
|
+
MarkdownContent = React85__default.memo(
|
|
15683
15706
|
({ content, direction = "ltr", className }) => {
|
|
15684
15707
|
const { t: _t } = useTranslate();
|
|
15685
15708
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -16956,7 +16979,7 @@ var init_StateMachineView = __esm({
|
|
|
16956
16979
|
style: { top: title ? 30 : 0 },
|
|
16957
16980
|
children: [
|
|
16958
16981
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
16959
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
16982
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React85__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
16960
16983
|
StateNode2,
|
|
16961
16984
|
{
|
|
16962
16985
|
state,
|
|
@@ -22697,8 +22720,8 @@ var init_Menu = __esm({
|
|
|
22697
22720
|
"bottom-end": "bottom-start"
|
|
22698
22721
|
};
|
|
22699
22722
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
22700
|
-
const triggerChild =
|
|
22701
|
-
const triggerElement =
|
|
22723
|
+
const triggerChild = React85__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
22724
|
+
const triggerElement = React85__default.cloneElement(
|
|
22702
22725
|
triggerChild,
|
|
22703
22726
|
{
|
|
22704
22727
|
ref: triggerRef,
|
|
@@ -22793,14 +22816,14 @@ function useDataDnd(args) {
|
|
|
22793
22816
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
22794
22817
|
const enabled = isZone || Boolean(dndRoot);
|
|
22795
22818
|
const eventBus = useEventBus();
|
|
22796
|
-
const parentRoot =
|
|
22819
|
+
const parentRoot = React85__default.useContext(RootCtx);
|
|
22797
22820
|
const isRoot = enabled && parentRoot === null;
|
|
22798
|
-
const zoneId =
|
|
22821
|
+
const zoneId = React85__default.useId();
|
|
22799
22822
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
22800
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
22801
|
-
const optimisticOrdersRef =
|
|
22823
|
+
const [optimisticOrders, setOptimisticOrders] = React85__default.useState(() => /* @__PURE__ */ new Map());
|
|
22824
|
+
const optimisticOrdersRef = React85__default.useRef(optimisticOrders);
|
|
22802
22825
|
optimisticOrdersRef.current = optimisticOrders;
|
|
22803
|
-
const clearOptimisticOrder =
|
|
22826
|
+
const clearOptimisticOrder = React85__default.useCallback((group) => {
|
|
22804
22827
|
setOptimisticOrders((prev) => {
|
|
22805
22828
|
if (!prev.has(group)) return prev;
|
|
22806
22829
|
const next = new Map(prev);
|
|
@@ -22825,7 +22848,7 @@ function useDataDnd(args) {
|
|
|
22825
22848
|
const raw = it[dndItemIdField];
|
|
22826
22849
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
22827
22850
|
}).join("|");
|
|
22828
|
-
const itemIds =
|
|
22851
|
+
const itemIds = React85__default.useMemo(
|
|
22829
22852
|
() => orderedItems.map((it, idx) => {
|
|
22830
22853
|
const raw = it[dndItemIdField];
|
|
22831
22854
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
@@ -22836,7 +22859,7 @@ function useDataDnd(args) {
|
|
|
22836
22859
|
const raw = it[dndItemIdField];
|
|
22837
22860
|
return raw != null ? String(raw) : `__${idx}`;
|
|
22838
22861
|
}).join("|");
|
|
22839
|
-
|
|
22862
|
+
React85__default.useEffect(() => {
|
|
22840
22863
|
const root = isRoot ? null : parentRoot;
|
|
22841
22864
|
if (root) {
|
|
22842
22865
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -22844,20 +22867,20 @@ function useDataDnd(args) {
|
|
|
22844
22867
|
clearOptimisticOrder(ownGroup);
|
|
22845
22868
|
}
|
|
22846
22869
|
}, [itemsContentSig, ownGroup]);
|
|
22847
|
-
const zonesRef =
|
|
22848
|
-
const registerZone =
|
|
22870
|
+
const zonesRef = React85__default.useRef(/* @__PURE__ */ new Map());
|
|
22871
|
+
const registerZone = React85__default.useCallback((zoneId2, meta2) => {
|
|
22849
22872
|
zonesRef.current.set(zoneId2, meta2);
|
|
22850
22873
|
}, []);
|
|
22851
|
-
const unregisterZone =
|
|
22874
|
+
const unregisterZone = React85__default.useCallback((zoneId2) => {
|
|
22852
22875
|
zonesRef.current.delete(zoneId2);
|
|
22853
22876
|
}, []);
|
|
22854
|
-
const [activeDrag, setActiveDrag] =
|
|
22855
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
22856
|
-
const meta =
|
|
22877
|
+
const [activeDrag, setActiveDrag] = React85__default.useState(null);
|
|
22878
|
+
const [overZoneGroup, setOverZoneGroup] = React85__default.useState(null);
|
|
22879
|
+
const meta = React85__default.useMemo(
|
|
22857
22880
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
22858
22881
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
22859
22882
|
);
|
|
22860
|
-
|
|
22883
|
+
React85__default.useEffect(() => {
|
|
22861
22884
|
const target = isRoot ? null : parentRoot;
|
|
22862
22885
|
if (!target) {
|
|
22863
22886
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -22876,7 +22899,7 @@ function useDataDnd(args) {
|
|
|
22876
22899
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
22877
22900
|
const sensors = useAlmadarDndSensors(true);
|
|
22878
22901
|
const collisionDetection = almadarDndCollisionDetection;
|
|
22879
|
-
const findZoneByItem =
|
|
22902
|
+
const findZoneByItem = React85__default.useCallback(
|
|
22880
22903
|
(id) => {
|
|
22881
22904
|
for (const z of zonesRef.current.values()) {
|
|
22882
22905
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -22885,7 +22908,7 @@ function useDataDnd(args) {
|
|
|
22885
22908
|
},
|
|
22886
22909
|
[]
|
|
22887
22910
|
);
|
|
22888
|
-
|
|
22911
|
+
React85__default.useCallback(
|
|
22889
22912
|
(group) => {
|
|
22890
22913
|
for (const z of zonesRef.current.values()) {
|
|
22891
22914
|
if (z.group === group) return z;
|
|
@@ -22894,7 +22917,7 @@ function useDataDnd(args) {
|
|
|
22894
22917
|
},
|
|
22895
22918
|
[]
|
|
22896
22919
|
);
|
|
22897
|
-
const handleDragEnd =
|
|
22920
|
+
const handleDragEnd = React85__default.useCallback(
|
|
22898
22921
|
(event) => {
|
|
22899
22922
|
const { active, over } = event;
|
|
22900
22923
|
const activeIdStr = String(active.id);
|
|
@@ -22985,8 +23008,8 @@ function useDataDnd(args) {
|
|
|
22985
23008
|
},
|
|
22986
23009
|
[eventBus]
|
|
22987
23010
|
);
|
|
22988
|
-
const sortableData =
|
|
22989
|
-
const SortableItem =
|
|
23011
|
+
const sortableData = React85__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
23012
|
+
const SortableItem = React85__default.useCallback(
|
|
22990
23013
|
({ id, children }) => {
|
|
22991
23014
|
const {
|
|
22992
23015
|
attributes,
|
|
@@ -23026,7 +23049,7 @@ function useDataDnd(args) {
|
|
|
23026
23049
|
id: droppableId,
|
|
23027
23050
|
data: sortableData
|
|
23028
23051
|
});
|
|
23029
|
-
const ctx =
|
|
23052
|
+
const ctx = React85__default.useContext(RootCtx);
|
|
23030
23053
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
23031
23054
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
23032
23055
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -23041,7 +23064,7 @@ function useDataDnd(args) {
|
|
|
23041
23064
|
showForeignPlaceholder,
|
|
23042
23065
|
ctxAvailable: ctx != null
|
|
23043
23066
|
});
|
|
23044
|
-
|
|
23067
|
+
React85__default.useEffect(() => {
|
|
23045
23068
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
23046
23069
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
23047
23070
|
return /* @__PURE__ */ jsx(
|
|
@@ -23055,11 +23078,11 @@ function useDataDnd(args) {
|
|
|
23055
23078
|
}
|
|
23056
23079
|
);
|
|
23057
23080
|
};
|
|
23058
|
-
const rootContextValue =
|
|
23081
|
+
const rootContextValue = React85__default.useMemo(
|
|
23059
23082
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
23060
23083
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
23061
23084
|
);
|
|
23062
|
-
const handleDragStart =
|
|
23085
|
+
const handleDragStart = React85__default.useCallback((event) => {
|
|
23063
23086
|
const sourceZone = findZoneByItem(event.active.id);
|
|
23064
23087
|
const rect = event.active.rect.current.initial;
|
|
23065
23088
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -23078,7 +23101,7 @@ function useDataDnd(args) {
|
|
|
23078
23101
|
isRoot
|
|
23079
23102
|
});
|
|
23080
23103
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
23081
|
-
const handleDragOver =
|
|
23104
|
+
const handleDragOver = React85__default.useCallback((event) => {
|
|
23082
23105
|
const { active, over } = event;
|
|
23083
23106
|
const overData = over?.data?.current;
|
|
23084
23107
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -23148,7 +23171,7 @@ function useDataDnd(args) {
|
|
|
23148
23171
|
return next;
|
|
23149
23172
|
});
|
|
23150
23173
|
}, []);
|
|
23151
|
-
const handleDragCancel =
|
|
23174
|
+
const handleDragCancel = React85__default.useCallback((event) => {
|
|
23152
23175
|
setActiveDrag(null);
|
|
23153
23176
|
setOverZoneGroup(null);
|
|
23154
23177
|
dndLog.warn("dragCancel", {
|
|
@@ -23156,12 +23179,12 @@ function useDataDnd(args) {
|
|
|
23156
23179
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
23157
23180
|
});
|
|
23158
23181
|
}, []);
|
|
23159
|
-
const handleDragEndWithCleanup =
|
|
23182
|
+
const handleDragEndWithCleanup = React85__default.useCallback((event) => {
|
|
23160
23183
|
handleDragEnd(event);
|
|
23161
23184
|
setActiveDrag(null);
|
|
23162
23185
|
setOverZoneGroup(null);
|
|
23163
23186
|
}, [handleDragEnd]);
|
|
23164
|
-
const wrapContainer =
|
|
23187
|
+
const wrapContainer = React85__default.useCallback(
|
|
23165
23188
|
(children) => {
|
|
23166
23189
|
if (!enabled) return children;
|
|
23167
23190
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -23215,7 +23238,7 @@ var init_useDataDnd = __esm({
|
|
|
23215
23238
|
init_useAlmadarDndCollision();
|
|
23216
23239
|
init_Box();
|
|
23217
23240
|
dndLog = createLogger("almadar:ui:dnd");
|
|
23218
|
-
RootCtx =
|
|
23241
|
+
RootCtx = React85__default.createContext(null);
|
|
23219
23242
|
}
|
|
23220
23243
|
});
|
|
23221
23244
|
function renderIconInput(icon, props) {
|
|
@@ -23757,7 +23780,7 @@ function DataList({
|
|
|
23757
23780
|
}) {
|
|
23758
23781
|
const eventBus = useEventBus();
|
|
23759
23782
|
const { t } = useTranslate();
|
|
23760
|
-
const [visibleCount, setVisibleCount] =
|
|
23783
|
+
const [visibleCount, setVisibleCount] = React85__default.useState(pageSize || Infinity);
|
|
23761
23784
|
const fieldDefs = fields ?? columns ?? [];
|
|
23762
23785
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
23763
23786
|
const dnd = useDataDnd({
|
|
@@ -23773,14 +23796,14 @@ function DataList({
|
|
|
23773
23796
|
dndRoot
|
|
23774
23797
|
});
|
|
23775
23798
|
const orderedData = dnd.orderedItems;
|
|
23776
|
-
const allData =
|
|
23799
|
+
const allData = React85__default.useMemo(
|
|
23777
23800
|
() => sortRows(orderedData, sortBy, sortDirection),
|
|
23778
23801
|
[orderedData, sortBy, sortDirection]
|
|
23779
23802
|
);
|
|
23780
23803
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
23781
23804
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
23782
23805
|
const hasRenderProp = typeof children === "function";
|
|
23783
|
-
|
|
23806
|
+
React85__default.useEffect(() => {
|
|
23784
23807
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
23785
23808
|
const childrenTypeOf = typeof children;
|
|
23786
23809
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -23895,7 +23918,7 @@ function DataList({
|
|
|
23895
23918
|
return v === void 0 || v === null || v === "" ? raw : String(v);
|
|
23896
23919
|
};
|
|
23897
23920
|
return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("py-2", className), children: [
|
|
23898
|
-
groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
23921
|
+
groups2.map((group, gi) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
23899
23922
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
23900
23923
|
group.items.map((itemData, index) => {
|
|
23901
23924
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -24094,7 +24117,7 @@ function DataList({
|
|
|
24094
24117
|
className
|
|
24095
24118
|
),
|
|
24096
24119
|
children: [
|
|
24097
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
24120
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
24098
24121
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
24099
24122
|
group.items.map(
|
|
24100
24123
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -24181,7 +24204,7 @@ var init_FormSection = __esm({
|
|
|
24181
24204
|
columns = 1,
|
|
24182
24205
|
className
|
|
24183
24206
|
}) => {
|
|
24184
|
-
const [collapsed, setCollapsed] =
|
|
24207
|
+
const [collapsed, setCollapsed] = React85__default.useState(defaultCollapsed);
|
|
24185
24208
|
const { t } = useTranslate();
|
|
24186
24209
|
const eventBus = useEventBus();
|
|
24187
24210
|
const gridClass = {
|
|
@@ -24189,7 +24212,7 @@ var init_FormSection = __esm({
|
|
|
24189
24212
|
2: "grid-cols-1 md:grid-cols-2",
|
|
24190
24213
|
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
24191
24214
|
}[columns];
|
|
24192
|
-
|
|
24215
|
+
React85__default.useCallback(() => {
|
|
24193
24216
|
if (collapsible) {
|
|
24194
24217
|
setCollapsed((prev) => !prev);
|
|
24195
24218
|
eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
|
|
@@ -25170,7 +25193,7 @@ var init_Flex = __esm({
|
|
|
25170
25193
|
flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
|
|
25171
25194
|
}
|
|
25172
25195
|
}
|
|
25173
|
-
return
|
|
25196
|
+
return React85__default.createElement(Component, {
|
|
25174
25197
|
className: cn(
|
|
25175
25198
|
inline ? "inline-flex" : "flex",
|
|
25176
25199
|
directionStyles[direction],
|
|
@@ -25289,7 +25312,7 @@ var init_Grid = __esm({
|
|
|
25289
25312
|
as: Component = "div"
|
|
25290
25313
|
}) => {
|
|
25291
25314
|
const mergedStyle = rows ? { gridTemplateRows: `repeat(${rows}, minmax(0, 1fr))`, ...style } : style;
|
|
25292
|
-
return
|
|
25315
|
+
return React85__default.createElement(
|
|
25293
25316
|
Component,
|
|
25294
25317
|
{
|
|
25295
25318
|
className: cn(
|
|
@@ -25521,9 +25544,9 @@ var init_Popover = __esm({
|
|
|
25521
25544
|
onMouseLeave: handleClose,
|
|
25522
25545
|
onPointerDown: tapTriggerProps.onPointerDown
|
|
25523
25546
|
};
|
|
25524
|
-
const childElement =
|
|
25547
|
+
const childElement = React85__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
25525
25548
|
const childPointerDown = childElement.props.onPointerDown;
|
|
25526
|
-
const triggerElement =
|
|
25549
|
+
const triggerElement = React85__default.cloneElement(
|
|
25527
25550
|
childElement,
|
|
25528
25551
|
{
|
|
25529
25552
|
ref: triggerRef,
|
|
@@ -26132,9 +26155,9 @@ var init_Tooltip = __esm({
|
|
|
26132
26155
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
26133
26156
|
};
|
|
26134
26157
|
}, []);
|
|
26135
|
-
const triggerElement =
|
|
26158
|
+
const triggerElement = React85__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
26136
26159
|
const childPointerDown = triggerElement.props.onPointerDown;
|
|
26137
|
-
const trigger =
|
|
26160
|
+
const trigger = React85__default.cloneElement(triggerElement, {
|
|
26138
26161
|
ref: triggerRef,
|
|
26139
26162
|
onMouseEnter: handleMouseEnter,
|
|
26140
26163
|
onMouseLeave: handleMouseLeave,
|
|
@@ -26224,7 +26247,7 @@ var init_WizardProgress = __esm({
|
|
|
26224
26247
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
26225
26248
|
const isActive = index === currentStep;
|
|
26226
26249
|
const isCompleted = index < currentStep;
|
|
26227
|
-
return /* @__PURE__ */ jsxs(
|
|
26250
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
26228
26251
|
/* @__PURE__ */ jsx(
|
|
26229
26252
|
"button",
|
|
26230
26253
|
{
|
|
@@ -27859,13 +27882,13 @@ var init_MapView = __esm({
|
|
|
27859
27882
|
shadowSize: [41, 41]
|
|
27860
27883
|
});
|
|
27861
27884
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
27862
|
-
const { useEffect:
|
|
27885
|
+
const { useEffect: useEffect60, useRef: useRef62, useCallback: useCallback90, useState: useState92 } = React85__default;
|
|
27863
27886
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
27864
27887
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
27865
27888
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
27866
27889
|
const map = useMap();
|
|
27867
|
-
const prevRef =
|
|
27868
|
-
|
|
27890
|
+
const prevRef = useRef62({ centerLat, centerLng, zoom });
|
|
27891
|
+
useEffect60(() => {
|
|
27869
27892
|
const prev = prevRef.current;
|
|
27870
27893
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
27871
27894
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -27876,7 +27899,7 @@ var init_MapView = __esm({
|
|
|
27876
27899
|
}
|
|
27877
27900
|
function MapClickHandler({ onMapClick }) {
|
|
27878
27901
|
const map = useMap();
|
|
27879
|
-
|
|
27902
|
+
useEffect60(() => {
|
|
27880
27903
|
if (!onMapClick) return;
|
|
27881
27904
|
const handler = (e) => {
|
|
27882
27905
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -27904,8 +27927,8 @@ var init_MapView = __esm({
|
|
|
27904
27927
|
showAttribution = true
|
|
27905
27928
|
}) {
|
|
27906
27929
|
const eventBus = useEventBus2();
|
|
27907
|
-
const [clickedPosition, setClickedPosition] =
|
|
27908
|
-
const handleMapClick =
|
|
27930
|
+
const [clickedPosition, setClickedPosition] = useState92(null);
|
|
27931
|
+
const handleMapClick = useCallback90((lat, lng) => {
|
|
27909
27932
|
if (showClickedPin) {
|
|
27910
27933
|
setClickedPosition({ lat, lng });
|
|
27911
27934
|
}
|
|
@@ -27914,7 +27937,7 @@ var init_MapView = __esm({
|
|
|
27914
27937
|
eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
|
|
27915
27938
|
}
|
|
27916
27939
|
}, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
|
|
27917
|
-
const handleMarkerClick =
|
|
27940
|
+
const handleMarkerClick = useCallback90((marker) => {
|
|
27918
27941
|
onMarkerClick?.(marker);
|
|
27919
27942
|
if (markerClickEvent) {
|
|
27920
27943
|
eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
|
|
@@ -28757,8 +28780,8 @@ function TableView({
|
|
|
28757
28780
|
}) {
|
|
28758
28781
|
const eventBus = useEventBus();
|
|
28759
28782
|
const { t } = useTranslate();
|
|
28760
|
-
const [visibleCount, setVisibleCount] =
|
|
28761
|
-
const [localSelected, setLocalSelected] =
|
|
28783
|
+
const [visibleCount, setVisibleCount] = React85__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
28784
|
+
const [localSelected, setLocalSelected] = React85__default.useState(/* @__PURE__ */ new Set());
|
|
28762
28785
|
const colDefs = (Array.isArray(columns) ? columns : void 0) ?? (Array.isArray(fields) ? fields : void 0) ?? [];
|
|
28763
28786
|
const actionDefs = Array.isArray(itemActions) ? itemActions : [];
|
|
28764
28787
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
@@ -28780,7 +28803,7 @@ function TableView({
|
|
|
28780
28803
|
const hasRenderProp = typeof children === "function";
|
|
28781
28804
|
const idField = dndItemIdField ?? "id";
|
|
28782
28805
|
const isCoarsePointer = useMediaQuery("(pointer: coarse)");
|
|
28783
|
-
|
|
28806
|
+
React85__default.useEffect(() => {
|
|
28784
28807
|
tableViewLog.debug("render", {
|
|
28785
28808
|
rowCount: data.length,
|
|
28786
28809
|
colCount: colDefs.length,
|
|
@@ -28837,7 +28860,7 @@ function TableView({
|
|
|
28837
28860
|
};
|
|
28838
28861
|
eventBus.emit(`UI:${itemClickEvent}`, payload);
|
|
28839
28862
|
};
|
|
28840
|
-
const colFloors =
|
|
28863
|
+
const colFloors = React85__default.useMemo(
|
|
28841
28864
|
() => colDefs.map((col) => {
|
|
28842
28865
|
const longest = data.reduce((widest, row) => {
|
|
28843
28866
|
const cell = formatCell(asFieldValue(getNestedValue(row, col.field ?? col.key)), col.format);
|
|
@@ -28999,12 +29022,12 @@ function TableView({
|
|
|
28999
29022
|
]
|
|
29000
29023
|
}
|
|
29001
29024
|
);
|
|
29002
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
29025
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React85__default.Fragment, { children: rowInner }, id);
|
|
29003
29026
|
};
|
|
29004
29027
|
const items = Array.from(data);
|
|
29005
29028
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
29006
29029
|
let runningIndex = 0;
|
|
29007
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
29030
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
29008
29031
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
29009
29032
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
29010
29033
|
] }, gi)) });
|
|
@@ -30229,7 +30252,7 @@ var init_StepFlow = __esm({
|
|
|
30229
30252
|
className
|
|
30230
30253
|
}) => {
|
|
30231
30254
|
if (orientation === "vertical") {
|
|
30232
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
30255
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React85__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
30233
30256
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
30234
30257
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
30235
30258
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -30240,7 +30263,7 @@ var init_StepFlow = __esm({
|
|
|
30240
30263
|
] })
|
|
30241
30264
|
] }) }, index)) });
|
|
30242
30265
|
}
|
|
30243
|
-
return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(
|
|
30266
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
30244
30267
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
30245
30268
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
30246
30269
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -31230,7 +31253,7 @@ var init_LikertScale = __esm({
|
|
|
31230
31253
|
md: "text-base",
|
|
31231
31254
|
lg: "text-lg"
|
|
31232
31255
|
};
|
|
31233
|
-
LikertScale =
|
|
31256
|
+
LikertScale = React85__default.forwardRef(
|
|
31234
31257
|
({
|
|
31235
31258
|
question,
|
|
31236
31259
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -31242,7 +31265,7 @@ var init_LikertScale = __esm({
|
|
|
31242
31265
|
variant = "radios",
|
|
31243
31266
|
className
|
|
31244
31267
|
}, ref) => {
|
|
31245
|
-
const groupId =
|
|
31268
|
+
const groupId = React85__default.useId();
|
|
31246
31269
|
const eventBus = useEventBus();
|
|
31247
31270
|
const handleSelect = useCallback(
|
|
31248
31271
|
(next) => {
|
|
@@ -33531,7 +33554,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
33531
33554
|
"aria-label": t("aria.breadcrumb"),
|
|
33532
33555
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
33533
33556
|
const isLast = idx === items.length - 1;
|
|
33534
|
-
return /* @__PURE__ */ jsxs(
|
|
33557
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
33535
33558
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
33536
33559
|
Icon,
|
|
33537
33560
|
{
|
|
@@ -34400,7 +34423,7 @@ var init_MiniStateMachine = __esm({
|
|
|
34400
34423
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
34401
34424
|
const tc = transitionCounts[s.name] ?? 0;
|
|
34402
34425
|
const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
34403
|
-
return /* @__PURE__ */ jsxs(
|
|
34426
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
34404
34427
|
/* @__PURE__ */ jsx(
|
|
34405
34428
|
AvlState,
|
|
34406
34429
|
{
|
|
@@ -34604,7 +34627,7 @@ var init_PageHeader = __esm({
|
|
|
34604
34627
|
info: "bg-info/10 text-info"
|
|
34605
34628
|
};
|
|
34606
34629
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
34607
|
-
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Box, { as: "nav", className: "mb-4", children: /* @__PURE__ */ jsx(Box, { as: "ol", className: "flex items-center gap-2 text-sm", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs(
|
|
34630
|
+
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Box, { as: "nav", className: "mb-4", children: /* @__PURE__ */ jsx(Box, { as: "ol", className: "flex items-center gap-2 text-sm", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
34608
34631
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
34609
34632
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
34610
34633
|
"a",
|
|
@@ -34962,7 +34985,7 @@ var init_Section = __esm({
|
|
|
34962
34985
|
as: Component = "section"
|
|
34963
34986
|
}) => {
|
|
34964
34987
|
const hasHeader = title || description || action;
|
|
34965
|
-
return
|
|
34988
|
+
return React85__default.createElement(
|
|
34966
34989
|
Component,
|
|
34967
34990
|
{
|
|
34968
34991
|
className: cn(
|
|
@@ -35336,7 +35359,7 @@ var init_WizardContainer = __esm({
|
|
|
35336
35359
|
const isCompleted = index < currentStep;
|
|
35337
35360
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
35338
35361
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
35339
|
-
return /* @__PURE__ */ jsxs(
|
|
35362
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
35340
35363
|
/* @__PURE__ */ jsx(
|
|
35341
35364
|
Button,
|
|
35342
35365
|
{
|
|
@@ -37123,7 +37146,7 @@ var init_ImportPreviewTree = __esm({
|
|
|
37123
37146
|
const renderUnit = (unit, childrenByParent, depth) => {
|
|
37124
37147
|
const summary = fieldSummary(unit);
|
|
37125
37148
|
const children = childrenByParent.get(unit.ref) ?? [];
|
|
37126
|
-
return /* @__PURE__ */ jsxs(
|
|
37149
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
37127
37150
|
/* @__PURE__ */ jsxs(
|
|
37128
37151
|
Box,
|
|
37129
37152
|
{
|
|
@@ -37220,7 +37243,7 @@ var init_ImportProgress = __esm({
|
|
|
37220
37243
|
PIPELINE.map((key, index) => {
|
|
37221
37244
|
const isComplete = index < currentIndex;
|
|
37222
37245
|
const isActive = index === currentIndex;
|
|
37223
|
-
return /* @__PURE__ */ jsxs(
|
|
37246
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
37224
37247
|
index > 0 ? /* @__PURE__ */ jsx(Box, { className: "h-px w-4 bg-border" }) : null,
|
|
37225
37248
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1", "data-testid": `import-progress-step-${key}`, children: [
|
|
37226
37249
|
/* @__PURE__ */ jsx(
|
|
@@ -38345,7 +38368,7 @@ var init_DrawMesh = __esm({
|
|
|
38345
38368
|
}
|
|
38346
38369
|
});
|
|
38347
38370
|
function extractTitle(children) {
|
|
38348
|
-
if (!
|
|
38371
|
+
if (!React85__default.isValidElement(children)) return void 0;
|
|
38349
38372
|
const props = children.props;
|
|
38350
38373
|
if (typeof props.title === "string") {
|
|
38351
38374
|
return props.title;
|
|
@@ -38695,12 +38718,12 @@ var init_Form = __esm({
|
|
|
38695
38718
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
38696
38719
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
38697
38720
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
38698
|
-
const normalizedInitialData =
|
|
38721
|
+
const normalizedInitialData = React85__default.useMemo(() => {
|
|
38699
38722
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
38700
38723
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
38701
38724
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
38702
38725
|
}, [entity, initialData]);
|
|
38703
|
-
const entityDerivedFields =
|
|
38726
|
+
const entityDerivedFields = React85__default.useMemo(() => {
|
|
38704
38727
|
if (fields && fields.length > 0) return void 0;
|
|
38705
38728
|
if (!resolvedEntity) return void 0;
|
|
38706
38729
|
return resolvedEntity.fields.map(
|
|
@@ -38721,16 +38744,16 @@ var init_Form = __esm({
|
|
|
38721
38744
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
38722
38745
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
38723
38746
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
38724
|
-
const [formData, setFormData] =
|
|
38747
|
+
const [formData, setFormData] = React85__default.useState(
|
|
38725
38748
|
normalizedInitialData
|
|
38726
38749
|
);
|
|
38727
|
-
const [collapsedSections, setCollapsedSections] =
|
|
38750
|
+
const [collapsedSections, setCollapsedSections] = React85__default.useState(
|
|
38728
38751
|
/* @__PURE__ */ new Set()
|
|
38729
38752
|
);
|
|
38730
|
-
const [submitError, setSubmitError] =
|
|
38731
|
-
const formRef =
|
|
38753
|
+
const [submitError, setSubmitError] = React85__default.useState(null);
|
|
38754
|
+
const formRef = React85__default.useRef(null);
|
|
38732
38755
|
const formMode = props.mode;
|
|
38733
|
-
const mountedRef =
|
|
38756
|
+
const mountedRef = React85__default.useRef(false);
|
|
38734
38757
|
if (!mountedRef.current) {
|
|
38735
38758
|
mountedRef.current = true;
|
|
38736
38759
|
debug("forms", "mount", {
|
|
@@ -38743,7 +38766,7 @@ var init_Form = __esm({
|
|
|
38743
38766
|
});
|
|
38744
38767
|
}
|
|
38745
38768
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
38746
|
-
const evalContext =
|
|
38769
|
+
const evalContext = React85__default.useMemo(
|
|
38747
38770
|
() => ({
|
|
38748
38771
|
formValues: formData,
|
|
38749
38772
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -38752,7 +38775,7 @@ var init_Form = __esm({
|
|
|
38752
38775
|
}),
|
|
38753
38776
|
[formData, externalContext]
|
|
38754
38777
|
);
|
|
38755
|
-
|
|
38778
|
+
React85__default.useEffect(() => {
|
|
38756
38779
|
debug("forms", "initialData-sync", {
|
|
38757
38780
|
mode: formMode,
|
|
38758
38781
|
normalizedInitialData,
|
|
@@ -38763,7 +38786,7 @@ var init_Form = __esm({
|
|
|
38763
38786
|
setFormData(normalizedInitialData);
|
|
38764
38787
|
}
|
|
38765
38788
|
}, [normalizedInitialData]);
|
|
38766
|
-
const processCalculations =
|
|
38789
|
+
const processCalculations = React85__default.useCallback(
|
|
38767
38790
|
(changedFieldId, newFormData) => {
|
|
38768
38791
|
if (!hiddenCalculations.length) return;
|
|
38769
38792
|
const context = {
|
|
@@ -38788,7 +38811,7 @@ var init_Form = __esm({
|
|
|
38788
38811
|
},
|
|
38789
38812
|
[hiddenCalculations, externalContext, eventBus]
|
|
38790
38813
|
);
|
|
38791
|
-
const checkViolations =
|
|
38814
|
+
const checkViolations = React85__default.useCallback(
|
|
38792
38815
|
(changedFieldId, newFormData) => {
|
|
38793
38816
|
if (!violationTriggers.length) return;
|
|
38794
38817
|
const context = {
|
|
@@ -38826,7 +38849,7 @@ var init_Form = __esm({
|
|
|
38826
38849
|
processCalculations(name, newFormData);
|
|
38827
38850
|
checkViolations(name, newFormData);
|
|
38828
38851
|
};
|
|
38829
|
-
const isFieldVisible =
|
|
38852
|
+
const isFieldVisible = React85__default.useCallback(
|
|
38830
38853
|
(fieldName) => {
|
|
38831
38854
|
const condition = conditionalFields[fieldName];
|
|
38832
38855
|
if (!condition) return true;
|
|
@@ -38834,7 +38857,7 @@ var init_Form = __esm({
|
|
|
38834
38857
|
},
|
|
38835
38858
|
[conditionalFields, evalContext]
|
|
38836
38859
|
);
|
|
38837
|
-
const isSectionVisible =
|
|
38860
|
+
const isSectionVisible = React85__default.useCallback(
|
|
38838
38861
|
(section) => {
|
|
38839
38862
|
if (!section.condition) return true;
|
|
38840
38863
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -38910,7 +38933,7 @@ var init_Form = __esm({
|
|
|
38910
38933
|
eventBus.emit(`UI:${onCancel}`);
|
|
38911
38934
|
}
|
|
38912
38935
|
};
|
|
38913
|
-
const renderField =
|
|
38936
|
+
const renderField = React85__default.useCallback(
|
|
38914
38937
|
(field) => {
|
|
38915
38938
|
const fieldName = field.name || field.field;
|
|
38916
38939
|
if (!fieldName) return null;
|
|
@@ -38931,7 +38954,7 @@ var init_Form = __esm({
|
|
|
38931
38954
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
38932
38955
|
);
|
|
38933
38956
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
38934
|
-
const normalizedFields =
|
|
38957
|
+
const normalizedFields = React85__default.useMemo(() => {
|
|
38935
38958
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
38936
38959
|
return effectiveFields.map((field) => {
|
|
38937
38960
|
if (typeof field === "string") {
|
|
@@ -38955,7 +38978,7 @@ var init_Form = __esm({
|
|
|
38955
38978
|
return field;
|
|
38956
38979
|
});
|
|
38957
38980
|
}, [effectiveFields, resolvedEntity]);
|
|
38958
|
-
const schemaFields =
|
|
38981
|
+
const schemaFields = React85__default.useMemo(() => {
|
|
38959
38982
|
if (normalizedFields.length === 0) return null;
|
|
38960
38983
|
if (isDebugEnabled()) {
|
|
38961
38984
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -38965,7 +38988,7 @@ var init_Form = __esm({
|
|
|
38965
38988
|
}
|
|
38966
38989
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
38967
38990
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
38968
|
-
const sectionElements =
|
|
38991
|
+
const sectionElements = React85__default.useMemo(() => {
|
|
38969
38992
|
if (!sections || sections.length === 0) return null;
|
|
38970
38993
|
return sections.map((section) => {
|
|
38971
38994
|
if (!isSectionVisible(section)) {
|
|
@@ -39691,7 +39714,7 @@ var init_List = __esm({
|
|
|
39691
39714
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
39692
39715
|
return [];
|
|
39693
39716
|
}, [entity]);
|
|
39694
|
-
const getItemActions =
|
|
39717
|
+
const getItemActions = React85__default.useCallback(
|
|
39695
39718
|
(item) => {
|
|
39696
39719
|
if (!itemActions) return [];
|
|
39697
39720
|
if (typeof itemActions === "function") {
|
|
@@ -40172,7 +40195,7 @@ var init_MediaGallery = __esm({
|
|
|
40172
40195
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
40173
40196
|
);
|
|
40174
40197
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
40175
|
-
const items =
|
|
40198
|
+
const items = React85__default.useMemo(() => {
|
|
40176
40199
|
if (propItems && propItems.length > 0) return propItems;
|
|
40177
40200
|
if (entityData.length === 0) return [];
|
|
40178
40201
|
return entityData.map((record, idx) => {
|
|
@@ -40337,7 +40360,7 @@ var init_MediaGallery = __esm({
|
|
|
40337
40360
|
}
|
|
40338
40361
|
});
|
|
40339
40362
|
function extractTitle2(children) {
|
|
40340
|
-
if (!
|
|
40363
|
+
if (!React85__default.isValidElement(children)) return void 0;
|
|
40341
40364
|
const props = children.props;
|
|
40342
40365
|
if (typeof props.title === "string") {
|
|
40343
40366
|
return props.title;
|
|
@@ -40611,7 +40634,7 @@ var init_debugRegistry = __esm({
|
|
|
40611
40634
|
}
|
|
40612
40635
|
});
|
|
40613
40636
|
function useDebugData() {
|
|
40614
|
-
const [data, setData] =
|
|
40637
|
+
const [data, setData] = React85.useState(() => ({
|
|
40615
40638
|
traits: [],
|
|
40616
40639
|
ticks: [],
|
|
40617
40640
|
guards: [],
|
|
@@ -40625,7 +40648,7 @@ function useDebugData() {
|
|
|
40625
40648
|
},
|
|
40626
40649
|
lastUpdate: Date.now()
|
|
40627
40650
|
}));
|
|
40628
|
-
|
|
40651
|
+
React85.useEffect(() => {
|
|
40629
40652
|
const updateData = () => {
|
|
40630
40653
|
setData({
|
|
40631
40654
|
traits: getAllTraits(),
|
|
@@ -40734,12 +40757,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
40734
40757
|
return positions;
|
|
40735
40758
|
}
|
|
40736
40759
|
function WalkMinimap() {
|
|
40737
|
-
const [walkStep, setWalkStep] =
|
|
40738
|
-
const [traits2, setTraits] =
|
|
40739
|
-
const [coveredEdges, setCoveredEdges] =
|
|
40740
|
-
const [completedTraits, setCompletedTraits] =
|
|
40741
|
-
const prevTraitRef =
|
|
40742
|
-
|
|
40760
|
+
const [walkStep, setWalkStep] = React85.useState(null);
|
|
40761
|
+
const [traits2, setTraits] = React85.useState([]);
|
|
40762
|
+
const [coveredEdges, setCoveredEdges] = React85.useState([]);
|
|
40763
|
+
const [completedTraits, setCompletedTraits] = React85.useState(/* @__PURE__ */ new Set());
|
|
40764
|
+
const prevTraitRef = React85.useRef(null);
|
|
40765
|
+
React85.useEffect(() => {
|
|
40743
40766
|
const interval = setInterval(() => {
|
|
40744
40767
|
const w = window;
|
|
40745
40768
|
const step = w.__orbitalWalkStep;
|
|
@@ -41175,15 +41198,15 @@ var init_EntitiesTab = __esm({
|
|
|
41175
41198
|
});
|
|
41176
41199
|
function EventFlowTab({ events: events2 }) {
|
|
41177
41200
|
const { t } = useTranslate();
|
|
41178
|
-
const [filter, setFilter] =
|
|
41179
|
-
const containerRef =
|
|
41180
|
-
const [autoScroll, setAutoScroll] =
|
|
41181
|
-
|
|
41201
|
+
const [filter, setFilter] = React85.useState("all");
|
|
41202
|
+
const containerRef = React85.useRef(null);
|
|
41203
|
+
const [autoScroll, setAutoScroll] = React85.useState(true);
|
|
41204
|
+
React85.useEffect(() => {
|
|
41182
41205
|
if (autoScroll && containerRef.current) {
|
|
41183
41206
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
41184
41207
|
}
|
|
41185
41208
|
}, [events2.length, autoScroll]);
|
|
41186
|
-
const filteredEvents =
|
|
41209
|
+
const filteredEvents = React85.useMemo(() => {
|
|
41187
41210
|
if (filter === "all") return events2;
|
|
41188
41211
|
return events2.filter((e) => e.type === filter);
|
|
41189
41212
|
}, [events2, filter]);
|
|
@@ -41299,7 +41322,7 @@ var init_EventFlowTab = __esm({
|
|
|
41299
41322
|
});
|
|
41300
41323
|
function GuardsPanel({ guards }) {
|
|
41301
41324
|
const { t } = useTranslate();
|
|
41302
|
-
const [filter, setFilter] =
|
|
41325
|
+
const [filter, setFilter] = React85.useState("all");
|
|
41303
41326
|
if (guards.length === 0) {
|
|
41304
41327
|
return /* @__PURE__ */ jsx(
|
|
41305
41328
|
EmptyState,
|
|
@@ -41312,7 +41335,7 @@ function GuardsPanel({ guards }) {
|
|
|
41312
41335
|
}
|
|
41313
41336
|
const passedCount = guards.filter((g) => g.result).length;
|
|
41314
41337
|
const failedCount = guards.length - passedCount;
|
|
41315
|
-
const filteredGuards =
|
|
41338
|
+
const filteredGuards = React85.useMemo(() => {
|
|
41316
41339
|
if (filter === "all") return guards;
|
|
41317
41340
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
41318
41341
|
return guards.filter((g) => !g.result);
|
|
@@ -41475,10 +41498,10 @@ function EffectBadge({ effect }) {
|
|
|
41475
41498
|
}
|
|
41476
41499
|
function TransitionTimeline({ transitions }) {
|
|
41477
41500
|
const { t } = useTranslate();
|
|
41478
|
-
const containerRef =
|
|
41479
|
-
const [autoScroll, setAutoScroll] =
|
|
41480
|
-
const [expandedId, setExpandedId] =
|
|
41481
|
-
|
|
41501
|
+
const containerRef = React85.useRef(null);
|
|
41502
|
+
const [autoScroll, setAutoScroll] = React85.useState(true);
|
|
41503
|
+
const [expandedId, setExpandedId] = React85.useState(null);
|
|
41504
|
+
React85.useEffect(() => {
|
|
41482
41505
|
if (autoScroll && containerRef.current) {
|
|
41483
41506
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
41484
41507
|
}
|
|
@@ -41758,9 +41781,9 @@ function getAllEvents(traits2) {
|
|
|
41758
41781
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
41759
41782
|
const eventBus = useEventBus();
|
|
41760
41783
|
const { t } = useTranslate();
|
|
41761
|
-
const [log9, setLog] =
|
|
41762
|
-
const prevStatesRef =
|
|
41763
|
-
|
|
41784
|
+
const [log9, setLog] = React85.useState([]);
|
|
41785
|
+
const prevStatesRef = React85.useRef(/* @__PURE__ */ new Map());
|
|
41786
|
+
React85.useEffect(() => {
|
|
41764
41787
|
for (const trait of traits2) {
|
|
41765
41788
|
const prev = prevStatesRef.current.get(trait.id);
|
|
41766
41789
|
if (prev && prev !== trait.currentState) {
|
|
@@ -41929,10 +41952,10 @@ function VerifyModePanel({
|
|
|
41929
41952
|
localCount
|
|
41930
41953
|
}) {
|
|
41931
41954
|
const { t } = useTranslate();
|
|
41932
|
-
const [expanded, setExpanded] =
|
|
41933
|
-
const scrollRef =
|
|
41934
|
-
const prevCountRef =
|
|
41935
|
-
|
|
41955
|
+
const [expanded, setExpanded] = React85.useState(true);
|
|
41956
|
+
const scrollRef = React85.useRef(null);
|
|
41957
|
+
const prevCountRef = React85.useRef(0);
|
|
41958
|
+
React85.useEffect(() => {
|
|
41936
41959
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
41937
41960
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
41938
41961
|
}
|
|
@@ -41989,10 +42012,10 @@ function RuntimeDebugger({
|
|
|
41989
42012
|
schema
|
|
41990
42013
|
}) {
|
|
41991
42014
|
const { t } = useTranslate();
|
|
41992
|
-
const [isCollapsed, setIsCollapsed] =
|
|
41993
|
-
const [isVisible, setIsVisible] =
|
|
42015
|
+
const [isCollapsed, setIsCollapsed] = React85.useState(mode === "verify" ? true : defaultCollapsed);
|
|
42016
|
+
const [isVisible, setIsVisible] = React85.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
41994
42017
|
const debugData = useDebugData();
|
|
41995
|
-
|
|
42018
|
+
React85.useEffect(() => {
|
|
41996
42019
|
if (mode === "inline") return;
|
|
41997
42020
|
return onDebugToggle((enabled) => {
|
|
41998
42021
|
setIsVisible(enabled);
|
|
@@ -42001,7 +42024,7 @@ function RuntimeDebugger({
|
|
|
42001
42024
|
}
|
|
42002
42025
|
});
|
|
42003
42026
|
}, [mode]);
|
|
42004
|
-
|
|
42027
|
+
React85.useEffect(() => {
|
|
42005
42028
|
if (mode === "inline") return;
|
|
42006
42029
|
const handleKeyDown = (e) => {
|
|
42007
42030
|
if (e.key === "`" && isVisible) {
|
|
@@ -42521,7 +42544,7 @@ var init_StatCard = __esm({
|
|
|
42521
42544
|
const labelToUse = propLabel ?? propTitle;
|
|
42522
42545
|
const eventBus = useEventBus();
|
|
42523
42546
|
const { t } = useTranslate();
|
|
42524
|
-
const handleActionClick =
|
|
42547
|
+
const handleActionClick = React85__default.useCallback(() => {
|
|
42525
42548
|
if (action?.event) {
|
|
42526
42549
|
eventBus.emit(`UI:${action.event}`, {});
|
|
42527
42550
|
}
|
|
@@ -42532,7 +42555,7 @@ var init_StatCard = __esm({
|
|
|
42532
42555
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
42533
42556
|
const isLoading = externalLoading ?? false;
|
|
42534
42557
|
const error = externalError;
|
|
42535
|
-
const computeMetricValue =
|
|
42558
|
+
const computeMetricValue = React85__default.useCallback(
|
|
42536
42559
|
(metric, items) => {
|
|
42537
42560
|
if (metric.value !== void 0) {
|
|
42538
42561
|
return metric.value;
|
|
@@ -42571,7 +42594,7 @@ var init_StatCard = __esm({
|
|
|
42571
42594
|
},
|
|
42572
42595
|
[]
|
|
42573
42596
|
);
|
|
42574
|
-
const schemaStats =
|
|
42597
|
+
const schemaStats = React85__default.useMemo(() => {
|
|
42575
42598
|
if (!metrics || metrics.length === 0) return null;
|
|
42576
42599
|
return metrics.map((metric) => ({
|
|
42577
42600
|
label: metric.label,
|
|
@@ -42579,7 +42602,7 @@ var init_StatCard = __esm({
|
|
|
42579
42602
|
format: metric.format
|
|
42580
42603
|
}));
|
|
42581
42604
|
}, [metrics, data, computeMetricValue]);
|
|
42582
|
-
const calculatedTrend =
|
|
42605
|
+
const calculatedTrend = React85__default.useMemo(() => {
|
|
42583
42606
|
if (manualTrend !== void 0) return manualTrend;
|
|
42584
42607
|
if (previousValue === void 0 || currentValue === void 0)
|
|
42585
42608
|
return void 0;
|
|
@@ -43219,8 +43242,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
43219
43242
|
] });
|
|
43220
43243
|
};
|
|
43221
43244
|
InlineActivityStream = ({ activities, autoScroll = true, className }) => {
|
|
43222
|
-
const endRef =
|
|
43223
|
-
|
|
43245
|
+
const endRef = React85__default.useRef(null);
|
|
43246
|
+
React85__default.useEffect(() => {
|
|
43224
43247
|
if (!autoScroll) return;
|
|
43225
43248
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
43226
43249
|
}, [activities.length, autoScroll]);
|
|
@@ -43314,7 +43337,7 @@ var init_SubagentTracePanel = __esm({
|
|
|
43314
43337
|
};
|
|
43315
43338
|
SubagentRichCard = ({ subagent }) => {
|
|
43316
43339
|
const { t } = useTranslate();
|
|
43317
|
-
const activities =
|
|
43340
|
+
const activities = React85__default.useMemo(
|
|
43318
43341
|
() => subagentMessagesToActivities(subagent.messages),
|
|
43319
43342
|
[subagent.messages]
|
|
43320
43343
|
);
|
|
@@ -43391,8 +43414,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
43391
43414
|
] });
|
|
43392
43415
|
};
|
|
43393
43416
|
CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
|
|
43394
|
-
const endRef =
|
|
43395
|
-
|
|
43417
|
+
const endRef = React85__default.useRef(null);
|
|
43418
|
+
React85__default.useEffect(() => {
|
|
43396
43419
|
if (!autoScroll) return;
|
|
43397
43420
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
43398
43421
|
}, [messages.length, autoScroll]);
|
|
@@ -43827,7 +43850,7 @@ var init_Timeline = __esm({
|
|
|
43827
43850
|
}) => {
|
|
43828
43851
|
const { t } = useTranslate();
|
|
43829
43852
|
const entityData = entity ?? [];
|
|
43830
|
-
const items =
|
|
43853
|
+
const items = React85__default.useMemo(() => {
|
|
43831
43854
|
if (propItems) return propItems;
|
|
43832
43855
|
if (entityData.length === 0) return [];
|
|
43833
43856
|
return entityData.map((record, idx) => {
|
|
@@ -43929,7 +43952,7 @@ var init_Timeline = __esm({
|
|
|
43929
43952
|
}
|
|
43930
43953
|
});
|
|
43931
43954
|
function extractToastProps(children) {
|
|
43932
|
-
if (!
|
|
43955
|
+
if (!React85__default.isValidElement(children)) {
|
|
43933
43956
|
if (typeof children === "string") {
|
|
43934
43957
|
return { message: children };
|
|
43935
43958
|
}
|
|
@@ -43971,7 +43994,7 @@ var init_ToastSlot = __esm({
|
|
|
43971
43994
|
eventBus.emit(`${prefix}CLOSE`);
|
|
43972
43995
|
};
|
|
43973
43996
|
if (!isVisible) return null;
|
|
43974
|
-
const isCustomContent =
|
|
43997
|
+
const isCustomContent = React85__default.isValidElement(children) && !message;
|
|
43975
43998
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
43976
43999
|
Toast,
|
|
43977
44000
|
{
|
|
@@ -44546,7 +44569,7 @@ function SuspenseConfigProvider({
|
|
|
44546
44569
|
config,
|
|
44547
44570
|
children
|
|
44548
44571
|
}) {
|
|
44549
|
-
return
|
|
44572
|
+
return React85__default.createElement(
|
|
44550
44573
|
SuspenseConfigContext.Provider,
|
|
44551
44574
|
{ value: config },
|
|
44552
44575
|
children
|
|
@@ -44588,7 +44611,7 @@ function enrichFormFields(fields, entityDef) {
|
|
|
44588
44611
|
}
|
|
44589
44612
|
return { name: field, label: humanizeFieldName(field) };
|
|
44590
44613
|
}
|
|
44591
|
-
if (field && typeof field === "object" && !Array.isArray(field) && !
|
|
44614
|
+
if (field && typeof field === "object" && !Array.isArray(field) && !React85__default.isValidElement(field) && !(field instanceof Date)) {
|
|
44592
44615
|
const obj = field;
|
|
44593
44616
|
const fieldName = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
|
|
44594
44617
|
if (!fieldName) return field;
|
|
@@ -45060,7 +45083,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
45060
45083
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
45061
45084
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
45062
45085
|
}
|
|
45063
|
-
return /* @__PURE__ */ jsx(
|
|
45086
|
+
return /* @__PURE__ */ jsx(React85__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
45064
45087
|
}
|
|
45065
45088
|
if (!child || typeof child !== "object") return null;
|
|
45066
45089
|
const childId = `${parentId}-${index}`;
|
|
@@ -45117,14 +45140,14 @@ function isPatternConfig(value) {
|
|
|
45117
45140
|
if (value === null || value === void 0) return false;
|
|
45118
45141
|
if (typeof value !== "object") return false;
|
|
45119
45142
|
if (Array.isArray(value)) return false;
|
|
45120
|
-
if (
|
|
45143
|
+
if (React85__default.isValidElement(value)) return false;
|
|
45121
45144
|
if (value instanceof Date) return false;
|
|
45122
45145
|
if (typeof value === "function") return false;
|
|
45123
45146
|
const record = value;
|
|
45124
45147
|
return "type" in record && typeof record.type === "string" && getComponentForPattern$1(record.type) !== null;
|
|
45125
45148
|
}
|
|
45126
45149
|
function isPlainConfigObject(value) {
|
|
45127
|
-
if (
|
|
45150
|
+
if (React85__default.isValidElement(value)) return false;
|
|
45128
45151
|
if (value instanceof Date) return false;
|
|
45129
45152
|
const proto = Object.getPrototypeOf(value);
|
|
45130
45153
|
return proto === Object.prototype || proto === null;
|
|
@@ -45265,7 +45288,7 @@ function SlotContentRenderer({
|
|
|
45265
45288
|
for (const slotKey of CONTENT_NODE_SLOTS) {
|
|
45266
45289
|
const slotVal = restProps[slotKey];
|
|
45267
45290
|
if (slotVal === void 0 || slotVal === null) continue;
|
|
45268
|
-
if (
|
|
45291
|
+
if (React85__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
|
|
45269
45292
|
const typelessChildren = !Array.isArray(slotVal) && typeof slotVal === "object" && !("type" in slotVal) && Array.isArray(slotVal.children) ? slotVal.children : void 0;
|
|
45270
45293
|
if (typelessChildren !== void 0 || Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
|
|
45271
45294
|
nodeSlotOverrides[slotKey] = renderPatternChildren(
|
|
@@ -45319,7 +45342,7 @@ function SlotContentRenderer({
|
|
|
45319
45342
|
const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
|
|
45320
45343
|
if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
|
|
45321
45344
|
const sample = resolvedItems[0];
|
|
45322
|
-
if (sample && typeof sample === "object" && !Array.isArray(sample) && !
|
|
45345
|
+
if (sample && typeof sample === "object" && !Array.isArray(sample) && !React85__default.isValidElement(sample) && !(sample instanceof Date)) {
|
|
45323
45346
|
const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
|
|
45324
45347
|
finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
|
|
45325
45348
|
}
|
|
@@ -45697,7 +45720,7 @@ function resolveLambdaBindings(body, params, item, index) {
|
|
|
45697
45720
|
}
|
|
45698
45721
|
return substituted;
|
|
45699
45722
|
}
|
|
45700
|
-
if (body !== null && typeof body === "object" && !
|
|
45723
|
+
if (body !== null && typeof body === "object" && !React85__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
45701
45724
|
const out = {};
|
|
45702
45725
|
for (const [k, v] of Object.entries(body)) {
|
|
45703
45726
|
out[k] = recur(v);
|
|
@@ -45730,7 +45753,7 @@ function deferLambdaEntityExprs(value) {
|
|
|
45730
45753
|
}
|
|
45731
45754
|
return arr.map((v) => deferLambdaEntityExprs(v));
|
|
45732
45755
|
}
|
|
45733
|
-
if (value !== null && typeof value === "object" && !
|
|
45756
|
+
if (value !== null && typeof value === "object" && !React85__default.isValidElement(value) && !(value instanceof Date) && typeof value !== "function" && !isRenderBindingMarker(value)) {
|
|
45734
45757
|
const out = {};
|
|
45735
45758
|
for (const [k, v] of Object.entries(value)) {
|
|
45736
45759
|
out[k] = deferLambdaEntityExprs(v);
|
|
@@ -45744,7 +45767,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
45744
45767
|
const resolvedBody = deferLambdaEntityExprs(
|
|
45745
45768
|
resolveLambdaBindings(lambdaBody, params, item, index)
|
|
45746
45769
|
);
|
|
45747
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
45770
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React85__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
45748
45771
|
return null;
|
|
45749
45772
|
}
|
|
45750
45773
|
const record = resolvedBody;
|
|
@@ -45763,7 +45786,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
45763
45786
|
props: childProps,
|
|
45764
45787
|
priority: 0
|
|
45765
45788
|
};
|
|
45766
|
-
return
|
|
45789
|
+
return React85__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
45767
45790
|
};
|
|
45768
45791
|
}
|
|
45769
45792
|
function convertNode(node, callerKey) {
|
|
@@ -45783,7 +45806,7 @@ function convertNode(node, callerKey) {
|
|
|
45783
45806
|
});
|
|
45784
45807
|
return anyChanged ? mapped : node;
|
|
45785
45808
|
}
|
|
45786
|
-
if (typeof node === "object" && !
|
|
45809
|
+
if (typeof node === "object" && !React85__default.isValidElement(node) && !(node instanceof Date)) {
|
|
45787
45810
|
return convertObjectProps(node);
|
|
45788
45811
|
}
|
|
45789
45812
|
return node;
|