@almadar/ui 5.76.0 → 5.76.2
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 +1449 -1428
- package/dist/avl/index.js +250 -229
- package/dist/components/index.cjs +103 -46
- package/dist/components/index.js +103 -37
- package/dist/context/index.cjs +690 -47
- package/dist/context/index.js +682 -2
- package/dist/providers/index.cjs +2175 -1255
- package/dist/providers/index.d.ts +8 -0
- package/dist/providers/index.js +1087 -208
- package/dist/runtime/index.cjs +1310 -1289
- package/dist/runtime/index.js +230 -209
- package/package.json +1 -1
package/dist/avl/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import { getAllPages, OrbitalProvider, EventBusContext, useTraitScope, ServerBridgeProvider, VerificationProvider, EntitySchemaProvider, OrbitalThemeProvider, useServerBridge, useEntitySchema, useEntitySchemaOptional, TraitScopeProvider, useCurrentPagePath
|
|
2
|
+
import * as React114 from 'react';
|
|
3
|
+
import React114__default, { createContext, useState, useMemo, useRef, useEffect, useContext, useCallback, Suspense, useLayoutEffect, Profiler, useReducer, useSyncExternalStore, lazy, useId } from 'react';
|
|
4
|
+
import { getAllPages, OrbitalProvider, EventBusContext, useTraitScope, ServerBridgeProvider, VerificationProvider, EntitySchemaProvider, OrbitalThemeProvider, useServerBridge, useEntitySchema, useEntitySchemaOptional, TraitScopeProvider, useCurrentPagePath } from '@almadar/ui/providers';
|
|
5
5
|
import { createLogger, isLogLevelEnabled } from '@almadar/logger';
|
|
6
6
|
import ELK from 'elkjs/lib/elk.bundled.js';
|
|
7
7
|
import { MarkerType, useReactFlow, Handle, Position, getBezierPath, EdgeLabelRenderer, useNodeId, ReactFlowProvider, BaseEdge, useNodesState, useEdgesState, ReactFlow, Controls, Background, BackgroundVariant } from '@xyflow/react';
|
|
@@ -3174,7 +3174,7 @@ var init_Typography = __esm({
|
|
|
3174
3174
|
}) => {
|
|
3175
3175
|
const variant = variantProp ?? (level ? `h${level}` : "body1");
|
|
3176
3176
|
const Component = as || defaultElements[variant];
|
|
3177
|
-
return
|
|
3177
|
+
return React114__default.createElement(
|
|
3178
3178
|
Component,
|
|
3179
3179
|
{
|
|
3180
3180
|
id,
|
|
@@ -3511,7 +3511,7 @@ var init_Box = __esm({
|
|
|
3511
3511
|
fixed: "fixed",
|
|
3512
3512
|
sticky: "sticky"
|
|
3513
3513
|
};
|
|
3514
|
-
Box =
|
|
3514
|
+
Box = React114__default.forwardRef(
|
|
3515
3515
|
({
|
|
3516
3516
|
padding,
|
|
3517
3517
|
paddingX,
|
|
@@ -3576,7 +3576,7 @@ var init_Box = __esm({
|
|
|
3576
3576
|
onPointerDown?.(e);
|
|
3577
3577
|
}, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
|
|
3578
3578
|
const isClickable = action || onClick;
|
|
3579
|
-
return
|
|
3579
|
+
return React114__default.createElement(
|
|
3580
3580
|
Component,
|
|
3581
3581
|
{
|
|
3582
3582
|
ref,
|
|
@@ -3672,7 +3672,7 @@ var init_Stack = __esm({
|
|
|
3672
3672
|
};
|
|
3673
3673
|
const isHorizontal = direction === "horizontal";
|
|
3674
3674
|
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";
|
|
3675
|
-
return
|
|
3675
|
+
return React114__default.createElement(
|
|
3676
3676
|
Component,
|
|
3677
3677
|
{
|
|
3678
3678
|
className: cn(
|
|
@@ -4164,7 +4164,7 @@ var init_MiniStateMachine = __esm({
|
|
|
4164
4164
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
4165
4165
|
const tc = transitionCounts[s.name] ?? 0;
|
|
4166
4166
|
const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
4167
|
-
return /* @__PURE__ */ jsxs(
|
|
4167
|
+
return /* @__PURE__ */ jsxs(React114__default.Fragment, { children: [
|
|
4168
4168
|
/* @__PURE__ */ jsx(
|
|
4169
4169
|
AvlState,
|
|
4170
4170
|
{
|
|
@@ -4494,7 +4494,7 @@ function loadLib(key, importer) {
|
|
|
4494
4494
|
return p2;
|
|
4495
4495
|
}
|
|
4496
4496
|
function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
|
|
4497
|
-
const Lazy =
|
|
4497
|
+
const Lazy = React114__default.lazy(async () => {
|
|
4498
4498
|
const lib = await loadLib(libKey, importer);
|
|
4499
4499
|
const Comp = pick(lib);
|
|
4500
4500
|
if (!Comp) {
|
|
@@ -4504,7 +4504,7 @@ function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
|
|
|
4504
4504
|
return { default: Comp };
|
|
4505
4505
|
});
|
|
4506
4506
|
const Wrapped = (props) => /* @__PURE__ */ jsx(
|
|
4507
|
-
|
|
4507
|
+
React114__default.Suspense,
|
|
4508
4508
|
{
|
|
4509
4509
|
fallback: /* @__PURE__ */ jsx(
|
|
4510
4510
|
"span",
|
|
@@ -5231,7 +5231,7 @@ var init_Icon = __esm({
|
|
|
5231
5231
|
const directIcon = typeof icon === "string" ? void 0 : icon;
|
|
5232
5232
|
const effectiveName = typeof icon === "string" ? icon : name;
|
|
5233
5233
|
const family = useIconFamily();
|
|
5234
|
-
const RenderedComponent =
|
|
5234
|
+
const RenderedComponent = React114__default.useMemo(() => {
|
|
5235
5235
|
if (directIcon) return null;
|
|
5236
5236
|
return effectiveName ? resolveIconForFamily(effectiveName, family) : null;
|
|
5237
5237
|
}, [directIcon, effectiveName, family]);
|
|
@@ -5293,7 +5293,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
5293
5293
|
const IconComp = value;
|
|
5294
5294
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
5295
5295
|
}
|
|
5296
|
-
if (
|
|
5296
|
+
if (React114__default.isValidElement(value)) {
|
|
5297
5297
|
return value;
|
|
5298
5298
|
}
|
|
5299
5299
|
if (typeof value === "object" && value !== null && isIconLike(value)) {
|
|
@@ -5369,7 +5369,7 @@ var init_Button = __esm({
|
|
|
5369
5369
|
md: "h-icon-default w-icon-default",
|
|
5370
5370
|
lg: "h-icon-default w-icon-default"
|
|
5371
5371
|
};
|
|
5372
|
-
Button =
|
|
5372
|
+
Button = React114__default.forwardRef(
|
|
5373
5373
|
({
|
|
5374
5374
|
className,
|
|
5375
5375
|
variant = "primary",
|
|
@@ -5435,7 +5435,7 @@ var Dialog;
|
|
|
5435
5435
|
var init_Dialog = __esm({
|
|
5436
5436
|
"components/core/atoms/Dialog.tsx"() {
|
|
5437
5437
|
init_cn();
|
|
5438
|
-
Dialog =
|
|
5438
|
+
Dialog = React114__default.forwardRef(
|
|
5439
5439
|
({
|
|
5440
5440
|
role = "dialog",
|
|
5441
5441
|
"aria-modal": ariaModal = true,
|
|
@@ -5930,7 +5930,7 @@ var init_Badge = __esm({
|
|
|
5930
5930
|
md: "px-2.5 py-1 text-sm",
|
|
5931
5931
|
lg: "px-3 py-1.5 text-base"
|
|
5932
5932
|
};
|
|
5933
|
-
Badge =
|
|
5933
|
+
Badge = React114__default.forwardRef(
|
|
5934
5934
|
({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
|
|
5935
5935
|
const iconSizes3 = {
|
|
5936
5936
|
sm: "h-icon-default w-icon-default",
|
|
@@ -6266,7 +6266,7 @@ var init_SvgFlow = __esm({
|
|
|
6266
6266
|
width = 100,
|
|
6267
6267
|
height = 100
|
|
6268
6268
|
}) => {
|
|
6269
|
-
const markerId =
|
|
6269
|
+
const markerId = React114__default.useMemo(() => {
|
|
6270
6270
|
flowIdCounter += 1;
|
|
6271
6271
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
6272
6272
|
}, []);
|
|
@@ -6859,7 +6859,7 @@ var init_SvgRing = __esm({
|
|
|
6859
6859
|
width = 100,
|
|
6860
6860
|
height = 100
|
|
6861
6861
|
}) => {
|
|
6862
|
-
const gradientId =
|
|
6862
|
+
const gradientId = React114__default.useMemo(() => {
|
|
6863
6863
|
ringIdCounter += 1;
|
|
6864
6864
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
6865
6865
|
}, []);
|
|
@@ -7040,7 +7040,7 @@ var init_Input = __esm({
|
|
|
7040
7040
|
init_cn();
|
|
7041
7041
|
init_Icon();
|
|
7042
7042
|
init_useEventBus();
|
|
7043
|
-
Input =
|
|
7043
|
+
Input = React114__default.forwardRef(
|
|
7044
7044
|
({
|
|
7045
7045
|
className,
|
|
7046
7046
|
inputType,
|
|
@@ -7200,7 +7200,7 @@ var Label;
|
|
|
7200
7200
|
var init_Label = __esm({
|
|
7201
7201
|
"components/core/atoms/Label.tsx"() {
|
|
7202
7202
|
init_cn();
|
|
7203
|
-
Label =
|
|
7203
|
+
Label = React114__default.forwardRef(
|
|
7204
7204
|
({ className, required, children, ...props }, ref) => {
|
|
7205
7205
|
return /* @__PURE__ */ jsxs(
|
|
7206
7206
|
"label",
|
|
@@ -7227,7 +7227,7 @@ var init_Textarea = __esm({
|
|
|
7227
7227
|
"components/core/atoms/Textarea.tsx"() {
|
|
7228
7228
|
init_cn();
|
|
7229
7229
|
init_useEventBus();
|
|
7230
|
-
Textarea =
|
|
7230
|
+
Textarea = React114__default.forwardRef(
|
|
7231
7231
|
({ className, error, onChange, ...props }, ref) => {
|
|
7232
7232
|
const eventBus = useEventBus();
|
|
7233
7233
|
const handleChange = (e) => {
|
|
@@ -7466,7 +7466,7 @@ var init_Select = __esm({
|
|
|
7466
7466
|
init_cn();
|
|
7467
7467
|
init_Icon();
|
|
7468
7468
|
init_useEventBus();
|
|
7469
|
-
Select =
|
|
7469
|
+
Select = React114__default.forwardRef(
|
|
7470
7470
|
(props, _ref) => {
|
|
7471
7471
|
const { multiple, searchable, clearable } = props;
|
|
7472
7472
|
if (multiple || searchable || clearable) {
|
|
@@ -7483,7 +7483,7 @@ var init_Checkbox = __esm({
|
|
|
7483
7483
|
"components/core/atoms/Checkbox.tsx"() {
|
|
7484
7484
|
init_cn();
|
|
7485
7485
|
init_useEventBus();
|
|
7486
|
-
Checkbox =
|
|
7486
|
+
Checkbox = React114__default.forwardRef(
|
|
7487
7487
|
({ className, label, id, onChange, ...props }, ref) => {
|
|
7488
7488
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
7489
7489
|
const eventBus = useEventBus();
|
|
@@ -7537,7 +7537,7 @@ var init_Spinner = __esm({
|
|
|
7537
7537
|
md: "h-6 w-6",
|
|
7538
7538
|
lg: "h-8 w-8"
|
|
7539
7539
|
};
|
|
7540
|
-
Spinner =
|
|
7540
|
+
Spinner = React114__default.forwardRef(
|
|
7541
7541
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
7542
7542
|
if (overlay) {
|
|
7543
7543
|
return /* @__PURE__ */ jsx(
|
|
@@ -7627,7 +7627,7 @@ var init_Card = __esm({
|
|
|
7627
7627
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
7628
7628
|
"tile-image-first": "p-0 overflow-hidden"
|
|
7629
7629
|
};
|
|
7630
|
-
Card =
|
|
7630
|
+
Card = React114__default.forwardRef(
|
|
7631
7631
|
({
|
|
7632
7632
|
className,
|
|
7633
7633
|
variant = "bordered",
|
|
@@ -7675,9 +7675,9 @@ var init_Card = __esm({
|
|
|
7675
7675
|
}
|
|
7676
7676
|
);
|
|
7677
7677
|
Card.displayName = "Card";
|
|
7678
|
-
CardHeader =
|
|
7678
|
+
CardHeader = React114__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
7679
7679
|
CardHeader.displayName = "CardHeader";
|
|
7680
|
-
CardTitle =
|
|
7680
|
+
CardTitle = React114__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7681
7681
|
"h3",
|
|
7682
7682
|
{
|
|
7683
7683
|
ref,
|
|
@@ -7690,11 +7690,11 @@ var init_Card = __esm({
|
|
|
7690
7690
|
}
|
|
7691
7691
|
));
|
|
7692
7692
|
CardTitle.displayName = "CardTitle";
|
|
7693
|
-
CardContent =
|
|
7693
|
+
CardContent = React114__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
7694
7694
|
CardContent.displayName = "CardContent";
|
|
7695
7695
|
CardBody = CardContent;
|
|
7696
7696
|
CardBody.displayName = "CardBody";
|
|
7697
|
-
CardFooter =
|
|
7697
|
+
CardFooter = React114__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7698
7698
|
"div",
|
|
7699
7699
|
{
|
|
7700
7700
|
ref,
|
|
@@ -7749,7 +7749,7 @@ var init_FilterPill = __esm({
|
|
|
7749
7749
|
md: "w-3.5 h-3.5",
|
|
7750
7750
|
lg: "w-4 h-4"
|
|
7751
7751
|
};
|
|
7752
|
-
FilterPill =
|
|
7752
|
+
FilterPill = React114__default.forwardRef(
|
|
7753
7753
|
({
|
|
7754
7754
|
className,
|
|
7755
7755
|
variant = "default",
|
|
@@ -7878,8 +7878,8 @@ var init_Avatar = __esm({
|
|
|
7878
7878
|
actionPayload
|
|
7879
7879
|
}) => {
|
|
7880
7880
|
const eventBus = useEventBus();
|
|
7881
|
-
const [imgFailed, setImgFailed] =
|
|
7882
|
-
|
|
7881
|
+
const [imgFailed, setImgFailed] = React114__default.useState(false);
|
|
7882
|
+
React114__default.useEffect(() => {
|
|
7883
7883
|
setImgFailed(false);
|
|
7884
7884
|
}, [src]);
|
|
7885
7885
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -7992,7 +7992,7 @@ var init_Center = __esm({
|
|
|
7992
7992
|
as: Component = "div"
|
|
7993
7993
|
}) => {
|
|
7994
7994
|
const mergedStyle = minHeight ? { minHeight, ...style } : style;
|
|
7995
|
-
return
|
|
7995
|
+
return React114__default.createElement(Component, {
|
|
7996
7996
|
className: cn(
|
|
7997
7997
|
inline ? "inline-flex" : "flex",
|
|
7998
7998
|
horizontal && "justify-center",
|
|
@@ -8260,7 +8260,7 @@ var init_Radio = __esm({
|
|
|
8260
8260
|
md: "w-2.5 h-2.5",
|
|
8261
8261
|
lg: "w-3 h-3"
|
|
8262
8262
|
};
|
|
8263
|
-
Radio =
|
|
8263
|
+
Radio = React114__default.forwardRef(
|
|
8264
8264
|
({
|
|
8265
8265
|
label,
|
|
8266
8266
|
helperText,
|
|
@@ -8277,12 +8277,12 @@ var init_Radio = __esm({
|
|
|
8277
8277
|
onChange,
|
|
8278
8278
|
...props
|
|
8279
8279
|
}, ref) => {
|
|
8280
|
-
const reactId =
|
|
8280
|
+
const reactId = React114__default.useId();
|
|
8281
8281
|
const baseId = id || `radio-${reactId}`;
|
|
8282
8282
|
const hasError = !!error;
|
|
8283
8283
|
const eventBus = useEventBus();
|
|
8284
|
-
const [selected, setSelected] =
|
|
8285
|
-
|
|
8284
|
+
const [selected, setSelected] = React114__default.useState(value);
|
|
8285
|
+
React114__default.useEffect(() => {
|
|
8286
8286
|
if (value !== void 0) setSelected(value);
|
|
8287
8287
|
}, [value]);
|
|
8288
8288
|
const pick = (next, e) => {
|
|
@@ -8464,7 +8464,7 @@ var init_Switch = __esm({
|
|
|
8464
8464
|
"components/core/atoms/Switch.tsx"() {
|
|
8465
8465
|
"use client";
|
|
8466
8466
|
init_cn();
|
|
8467
|
-
Switch =
|
|
8467
|
+
Switch = React114.forwardRef(
|
|
8468
8468
|
({
|
|
8469
8469
|
checked,
|
|
8470
8470
|
defaultChecked = false,
|
|
@@ -8475,10 +8475,10 @@ var init_Switch = __esm({
|
|
|
8475
8475
|
name,
|
|
8476
8476
|
className
|
|
8477
8477
|
}, ref) => {
|
|
8478
|
-
const [isChecked, setIsChecked] =
|
|
8478
|
+
const [isChecked, setIsChecked] = React114.useState(
|
|
8479
8479
|
checked !== void 0 ? checked : defaultChecked
|
|
8480
8480
|
);
|
|
8481
|
-
|
|
8481
|
+
React114.useEffect(() => {
|
|
8482
8482
|
if (checked !== void 0) {
|
|
8483
8483
|
setIsChecked(checked);
|
|
8484
8484
|
}
|
|
@@ -8752,7 +8752,7 @@ var Aside;
|
|
|
8752
8752
|
var init_Aside = __esm({
|
|
8753
8753
|
"components/core/atoms/Aside.tsx"() {
|
|
8754
8754
|
init_cn();
|
|
8755
|
-
Aside =
|
|
8755
|
+
Aside = React114__default.forwardRef(
|
|
8756
8756
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
8757
8757
|
);
|
|
8758
8758
|
Aside.displayName = "Aside";
|
|
@@ -8831,9 +8831,9 @@ var init_LawReferenceTooltip = __esm({
|
|
|
8831
8831
|
className
|
|
8832
8832
|
}) => {
|
|
8833
8833
|
const { t } = useTranslate();
|
|
8834
|
-
const [isVisible, setIsVisible] =
|
|
8835
|
-
const timeoutRef =
|
|
8836
|
-
const triggerRef =
|
|
8834
|
+
const [isVisible, setIsVisible] = React114__default.useState(false);
|
|
8835
|
+
const timeoutRef = React114__default.useRef(null);
|
|
8836
|
+
const triggerRef = React114__default.useRef(null);
|
|
8837
8837
|
const handleMouseEnter = () => {
|
|
8838
8838
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
8839
8839
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -8844,7 +8844,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
8844
8844
|
};
|
|
8845
8845
|
const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
|
|
8846
8846
|
const open = isVisible || revealed;
|
|
8847
|
-
|
|
8847
|
+
React114__default.useEffect(() => {
|
|
8848
8848
|
return () => {
|
|
8849
8849
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
8850
8850
|
};
|
|
@@ -9054,7 +9054,7 @@ var init_StatusDot = __esm({
|
|
|
9054
9054
|
md: "w-2.5 h-2.5",
|
|
9055
9055
|
lg: "w-3 h-3"
|
|
9056
9056
|
};
|
|
9057
|
-
StatusDot =
|
|
9057
|
+
StatusDot = React114__default.forwardRef(
|
|
9058
9058
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
9059
9059
|
return /* @__PURE__ */ jsx(
|
|
9060
9060
|
"span",
|
|
@@ -9108,7 +9108,7 @@ var init_TrendIndicator = __esm({
|
|
|
9108
9108
|
down: "trending-down",
|
|
9109
9109
|
flat: "arrow-right"
|
|
9110
9110
|
};
|
|
9111
|
-
TrendIndicator =
|
|
9111
|
+
TrendIndicator = React114__default.forwardRef(
|
|
9112
9112
|
({
|
|
9113
9113
|
className,
|
|
9114
9114
|
value,
|
|
@@ -9175,7 +9175,7 @@ var init_RangeSlider = __esm({
|
|
|
9175
9175
|
md: "w-4 h-4",
|
|
9176
9176
|
lg: "w-5 h-5"
|
|
9177
9177
|
};
|
|
9178
|
-
RangeSlider =
|
|
9178
|
+
RangeSlider = React114__default.forwardRef(
|
|
9179
9179
|
({
|
|
9180
9180
|
className,
|
|
9181
9181
|
min = 0,
|
|
@@ -9681,7 +9681,7 @@ var init_ContentSection = __esm({
|
|
|
9681
9681
|
md: "py-16",
|
|
9682
9682
|
lg: "py-24"
|
|
9683
9683
|
};
|
|
9684
|
-
ContentSection =
|
|
9684
|
+
ContentSection = React114__default.forwardRef(
|
|
9685
9685
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
9686
9686
|
return /* @__PURE__ */ jsx(
|
|
9687
9687
|
Box,
|
|
@@ -10215,7 +10215,7 @@ var init_AnimatedReveal = __esm({
|
|
|
10215
10215
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
10216
10216
|
"none": {}
|
|
10217
10217
|
};
|
|
10218
|
-
AnimatedReveal =
|
|
10218
|
+
AnimatedReveal = React114__default.forwardRef(
|
|
10219
10219
|
({
|
|
10220
10220
|
trigger = "scroll",
|
|
10221
10221
|
animation = "fade-up",
|
|
@@ -10375,7 +10375,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
10375
10375
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
10376
10376
|
"use client";
|
|
10377
10377
|
init_cn();
|
|
10378
|
-
AnimatedGraphic =
|
|
10378
|
+
AnimatedGraphic = React114__default.forwardRef(
|
|
10379
10379
|
({
|
|
10380
10380
|
src,
|
|
10381
10381
|
svgContent,
|
|
@@ -10398,7 +10398,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
10398
10398
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
10399
10399
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
10400
10400
|
const prevAnimateRef = useRef(animate);
|
|
10401
|
-
const setRef =
|
|
10401
|
+
const setRef = React114__default.useCallback(
|
|
10402
10402
|
(node) => {
|
|
10403
10403
|
containerRef.current = node;
|
|
10404
10404
|
if (typeof ref === "function") ref(node);
|
|
@@ -12030,7 +12030,7 @@ function GameCard({
|
|
|
12030
12030
|
className
|
|
12031
12031
|
}) {
|
|
12032
12032
|
const eventBus = useEventBus();
|
|
12033
|
-
const handleClick =
|
|
12033
|
+
const handleClick = React114.useCallback(() => {
|
|
12034
12034
|
if (disabled) return;
|
|
12035
12035
|
onClick?.(id);
|
|
12036
12036
|
if (clickEvent) eventBus.emit(`UI:${clickEvent}`, { cardId: id });
|
|
@@ -12302,9 +12302,9 @@ function ControlButton({
|
|
|
12302
12302
|
className
|
|
12303
12303
|
}) {
|
|
12304
12304
|
const eventBus = useEventBus();
|
|
12305
|
-
const [isPressed, setIsPressed] =
|
|
12305
|
+
const [isPressed, setIsPressed] = React114.useState(false);
|
|
12306
12306
|
const actualPressed = pressed ?? isPressed;
|
|
12307
|
-
const handlePointerDown =
|
|
12307
|
+
const handlePointerDown = React114.useCallback(
|
|
12308
12308
|
(e) => {
|
|
12309
12309
|
e.preventDefault();
|
|
12310
12310
|
if (disabled) return;
|
|
@@ -12314,7 +12314,7 @@ function ControlButton({
|
|
|
12314
12314
|
},
|
|
12315
12315
|
[disabled, pressEvent, eventBus, onPress]
|
|
12316
12316
|
);
|
|
12317
|
-
const handlePointerUp =
|
|
12317
|
+
const handlePointerUp = React114.useCallback(
|
|
12318
12318
|
(e) => {
|
|
12319
12319
|
e.preventDefault();
|
|
12320
12320
|
if (disabled) return;
|
|
@@ -12324,7 +12324,7 @@ function ControlButton({
|
|
|
12324
12324
|
},
|
|
12325
12325
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
12326
12326
|
);
|
|
12327
|
-
const handlePointerLeave =
|
|
12327
|
+
const handlePointerLeave = React114.useCallback(
|
|
12328
12328
|
(e) => {
|
|
12329
12329
|
if (isPressed) {
|
|
12330
12330
|
setIsPressed(false);
|
|
@@ -13383,8 +13383,8 @@ function MiniMap({
|
|
|
13383
13383
|
viewportRect = DEFAULT_VIEWPORT,
|
|
13384
13384
|
className
|
|
13385
13385
|
}) {
|
|
13386
|
-
const canvasRef =
|
|
13387
|
-
|
|
13386
|
+
const canvasRef = React114.useRef(null);
|
|
13387
|
+
React114.useEffect(() => {
|
|
13388
13388
|
const canvas = canvasRef.current;
|
|
13389
13389
|
if (!canvas) return;
|
|
13390
13390
|
const ctx = canvas.getContext("2d");
|
|
@@ -13534,8 +13534,8 @@ function ControlGrid({
|
|
|
13534
13534
|
className
|
|
13535
13535
|
}) {
|
|
13536
13536
|
const eventBus = useEventBus();
|
|
13537
|
-
const [active, setActive] =
|
|
13538
|
-
const handlePress =
|
|
13537
|
+
const [active, setActive] = React114.useState(/* @__PURE__ */ new Set());
|
|
13538
|
+
const handlePress = React114.useCallback(
|
|
13539
13539
|
(id) => {
|
|
13540
13540
|
setActive((prev) => new Set(prev).add(id));
|
|
13541
13541
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -13547,7 +13547,7 @@ function ControlGrid({
|
|
|
13547
13547
|
},
|
|
13548
13548
|
[kind, actionEvent, directionEvent, eventBus, onAction, onDirection]
|
|
13549
13549
|
);
|
|
13550
|
-
const handleRelease =
|
|
13550
|
+
const handleRelease = React114.useCallback(
|
|
13551
13551
|
(id) => {
|
|
13552
13552
|
setActive((prev) => {
|
|
13553
13553
|
const next = new Set(prev);
|
|
@@ -13808,7 +13808,7 @@ function InventoryGrid({
|
|
|
13808
13808
|
const eventBus = useEventBus();
|
|
13809
13809
|
const slotCount = totalSlots ?? items.length;
|
|
13810
13810
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
13811
|
-
const handleSelect =
|
|
13811
|
+
const handleSelect = React114.useCallback(
|
|
13812
13812
|
(id) => {
|
|
13813
13813
|
onSelect?.(id);
|
|
13814
13814
|
if (selectEvent) {
|
|
@@ -14011,7 +14011,7 @@ function GameMenu({
|
|
|
14011
14011
|
} catch {
|
|
14012
14012
|
}
|
|
14013
14013
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
14014
|
-
const handleOptionClick =
|
|
14014
|
+
const handleOptionClick = React114.useCallback(
|
|
14015
14015
|
(option) => {
|
|
14016
14016
|
if (option.event && eventBus) {
|
|
14017
14017
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -15854,6 +15854,24 @@ var init_useCanvasEffects = __esm({
|
|
|
15854
15854
|
"use client";
|
|
15855
15855
|
}
|
|
15856
15856
|
});
|
|
15857
|
+
var init_useGameAudio = __esm({
|
|
15858
|
+
"components/game/shared/hooks/useGameAudio.ts"() {
|
|
15859
|
+
"use client";
|
|
15860
|
+
}
|
|
15861
|
+
});
|
|
15862
|
+
function useGameAudioContextOptional() {
|
|
15863
|
+
return useContext(GameAudioContext);
|
|
15864
|
+
}
|
|
15865
|
+
var GameAudioContext;
|
|
15866
|
+
var init_GameAudioProvider = __esm({
|
|
15867
|
+
"components/game/shared/providers/GameAudioProvider.tsx"() {
|
|
15868
|
+
"use client";
|
|
15869
|
+
init_useEventBus();
|
|
15870
|
+
init_useGameAudio();
|
|
15871
|
+
GameAudioContext = createContext(null);
|
|
15872
|
+
GameAudioContext.displayName = "GameAudioContext";
|
|
15873
|
+
}
|
|
15874
|
+
});
|
|
15857
15875
|
function GameAudioToggle({
|
|
15858
15876
|
size = "sm",
|
|
15859
15877
|
className
|
|
@@ -15882,6 +15900,7 @@ var init_GameAudioToggle = __esm({
|
|
|
15882
15900
|
"use client";
|
|
15883
15901
|
init_atoms();
|
|
15884
15902
|
init_cn();
|
|
15903
|
+
init_GameAudioProvider();
|
|
15885
15904
|
GameAudioToggle.displayName = "GameAudioToggle";
|
|
15886
15905
|
}
|
|
15887
15906
|
});
|
|
@@ -19549,7 +19568,7 @@ function LinearView({
|
|
|
19549
19568
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
19550
19569
|
const isDone = i < currentIdx;
|
|
19551
19570
|
const isCurrent = i === currentIdx;
|
|
19552
|
-
return /* @__PURE__ */ jsxs(
|
|
19571
|
+
return /* @__PURE__ */ jsxs(React114__default.Fragment, { children: [
|
|
19553
19572
|
i > 0 && /* @__PURE__ */ jsx(
|
|
19554
19573
|
Typography,
|
|
19555
19574
|
{
|
|
@@ -20077,7 +20096,7 @@ function SequenceBar({
|
|
|
20077
20096
|
onSlotRemove(index);
|
|
20078
20097
|
}, [onSlotRemove, playing]);
|
|
20079
20098
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
20080
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
20099
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React114__default.Fragment, { children: [
|
|
20081
20100
|
i > 0 && /* @__PURE__ */ jsx(
|
|
20082
20101
|
Typography,
|
|
20083
20102
|
{
|
|
@@ -22504,10 +22523,10 @@ function getSlotContentRenderer2() {
|
|
|
22504
22523
|
}
|
|
22505
22524
|
function resolveDescriptor(value, idPrefix) {
|
|
22506
22525
|
if (value === null || value === void 0) return value;
|
|
22507
|
-
if (
|
|
22526
|
+
if (React114__default.isValidElement(value)) return value;
|
|
22508
22527
|
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
|
|
22509
22528
|
if (Array.isArray(value)) {
|
|
22510
|
-
return value.map((item, i) => /* @__PURE__ */ jsx(
|
|
22529
|
+
return value.map((item, i) => /* @__PURE__ */ jsx(React114__default.Fragment, { children: resolveDescriptor(item, `${idPrefix}-${i}`) }, i));
|
|
22511
22530
|
}
|
|
22512
22531
|
if (typeof value === "object") {
|
|
22513
22532
|
const rec = value;
|
|
@@ -22643,7 +22662,7 @@ var init_GameTemplate = __esm({
|
|
|
22643
22662
|
}
|
|
22644
22663
|
});
|
|
22645
22664
|
function asDescriptor(v) {
|
|
22646
|
-
if (Array.isArray(v) ||
|
|
22665
|
+
if (Array.isArray(v) || React114__default.isValidElement(v)) return null;
|
|
22647
22666
|
const o = v;
|
|
22648
22667
|
if (typeof o.type !== "string") return null;
|
|
22649
22668
|
const props = o.props !== void 0 && typeof o.props === "object" && !Array.isArray(o.props) && o.props !== null ? o.props : void 0;
|
|
@@ -22658,10 +22677,10 @@ function getSlotContentRenderer3() {
|
|
|
22658
22677
|
}
|
|
22659
22678
|
function resolveDescriptor2(value, idPrefix) {
|
|
22660
22679
|
if (value === null || value === void 0) return value;
|
|
22661
|
-
if (
|
|
22680
|
+
if (React114__default.isValidElement(value)) return value;
|
|
22662
22681
|
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
|
|
22663
22682
|
if (Array.isArray(value)) {
|
|
22664
|
-
return value.map((item, i) => /* @__PURE__ */ jsx(
|
|
22683
|
+
return value.map((item, i) => /* @__PURE__ */ jsx(React114__default.Fragment, { children: resolveDescriptor2(item, `${idPrefix}-${i}`) }, i));
|
|
22665
22684
|
}
|
|
22666
22685
|
if (typeof value === "object" && value !== null) {
|
|
22667
22686
|
const desc = asDescriptor(value);
|
|
@@ -23545,6 +23564,8 @@ var init_CardBattlerTemplate = __esm({
|
|
|
23545
23564
|
CardBattlerTemplate.displayName = "CardBattlerTemplate";
|
|
23546
23565
|
}
|
|
23547
23566
|
});
|
|
23567
|
+
|
|
23568
|
+
// components/game/2d/molecules/index.ts
|
|
23548
23569
|
var init_molecules = __esm({
|
|
23549
23570
|
"components/game/2d/molecules/index.ts"() {
|
|
23550
23571
|
init_shared();
|
|
@@ -23639,7 +23660,7 @@ var init_ErrorBoundary = __esm({
|
|
|
23639
23660
|
}
|
|
23640
23661
|
);
|
|
23641
23662
|
};
|
|
23642
|
-
ErrorBoundary = class extends
|
|
23663
|
+
ErrorBoundary = class extends React114__default.Component {
|
|
23643
23664
|
constructor(props) {
|
|
23644
23665
|
super(props);
|
|
23645
23666
|
__publicField(this, "reset", () => {
|
|
@@ -23921,7 +23942,7 @@ var init_Container = __esm({
|
|
|
23921
23942
|
as: Component = "div"
|
|
23922
23943
|
}) => {
|
|
23923
23944
|
const resolvedSize = maxWidth ?? size ?? "lg";
|
|
23924
|
-
return
|
|
23945
|
+
return React114__default.createElement(
|
|
23925
23946
|
Component,
|
|
23926
23947
|
{
|
|
23927
23948
|
className: cn(
|
|
@@ -25702,7 +25723,7 @@ var init_CodeBlock = __esm({
|
|
|
25702
25723
|
};
|
|
25703
25724
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
25704
25725
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
25705
|
-
CodeBlock =
|
|
25726
|
+
CodeBlock = React114__default.memo(
|
|
25706
25727
|
({
|
|
25707
25728
|
code: rawCode,
|
|
25708
25729
|
language = "text",
|
|
@@ -26289,7 +26310,7 @@ var init_MarkdownContent = __esm({
|
|
|
26289
26310
|
init_Box();
|
|
26290
26311
|
init_CodeBlock();
|
|
26291
26312
|
init_cn();
|
|
26292
|
-
MarkdownContent =
|
|
26313
|
+
MarkdownContent = React114__default.memo(
|
|
26293
26314
|
({ content, direction = "ltr", className }) => {
|
|
26294
26315
|
const { t: _t } = useTranslate();
|
|
26295
26316
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -27616,7 +27637,7 @@ var init_StateMachineView = __esm({
|
|
|
27616
27637
|
style: { top: title ? 30 : 0 },
|
|
27617
27638
|
children: [
|
|
27618
27639
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
27619
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
27640
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React114__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
27620
27641
|
StateNode2,
|
|
27621
27642
|
{
|
|
27622
27643
|
state,
|
|
@@ -33245,8 +33266,8 @@ var init_Menu = __esm({
|
|
|
33245
33266
|
"bottom-end": "bottom-start"
|
|
33246
33267
|
};
|
|
33247
33268
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
33248
|
-
const triggerChild =
|
|
33249
|
-
const triggerElement =
|
|
33269
|
+
const triggerChild = React114__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
33270
|
+
const triggerElement = React114__default.cloneElement(
|
|
33250
33271
|
triggerChild,
|
|
33251
33272
|
{
|
|
33252
33273
|
ref: triggerRef,
|
|
@@ -33341,14 +33362,14 @@ function useDataDnd(args) {
|
|
|
33341
33362
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
33342
33363
|
const enabled = isZone || Boolean(dndRoot);
|
|
33343
33364
|
const eventBus = useEventBus();
|
|
33344
|
-
const parentRoot =
|
|
33365
|
+
const parentRoot = React114__default.useContext(RootCtx);
|
|
33345
33366
|
const isRoot = enabled && parentRoot === null;
|
|
33346
|
-
const zoneId =
|
|
33367
|
+
const zoneId = React114__default.useId();
|
|
33347
33368
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
33348
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
33349
|
-
const optimisticOrdersRef =
|
|
33369
|
+
const [optimisticOrders, setOptimisticOrders] = React114__default.useState(() => /* @__PURE__ */ new Map());
|
|
33370
|
+
const optimisticOrdersRef = React114__default.useRef(optimisticOrders);
|
|
33350
33371
|
optimisticOrdersRef.current = optimisticOrders;
|
|
33351
|
-
const clearOptimisticOrder =
|
|
33372
|
+
const clearOptimisticOrder = React114__default.useCallback((group) => {
|
|
33352
33373
|
setOptimisticOrders((prev) => {
|
|
33353
33374
|
if (!prev.has(group)) return prev;
|
|
33354
33375
|
const next = new Map(prev);
|
|
@@ -33373,7 +33394,7 @@ function useDataDnd(args) {
|
|
|
33373
33394
|
const raw = it[dndItemIdField];
|
|
33374
33395
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
33375
33396
|
}).join("|");
|
|
33376
|
-
const itemIds =
|
|
33397
|
+
const itemIds = React114__default.useMemo(
|
|
33377
33398
|
() => orderedItems.map((it, idx) => {
|
|
33378
33399
|
const raw = it[dndItemIdField];
|
|
33379
33400
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
@@ -33384,7 +33405,7 @@ function useDataDnd(args) {
|
|
|
33384
33405
|
const raw = it[dndItemIdField];
|
|
33385
33406
|
return raw != null ? String(raw) : `__${idx}`;
|
|
33386
33407
|
}).join("|");
|
|
33387
|
-
|
|
33408
|
+
React114__default.useEffect(() => {
|
|
33388
33409
|
const root = isRoot ? null : parentRoot;
|
|
33389
33410
|
if (root) {
|
|
33390
33411
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -33392,20 +33413,20 @@ function useDataDnd(args) {
|
|
|
33392
33413
|
clearOptimisticOrder(ownGroup);
|
|
33393
33414
|
}
|
|
33394
33415
|
}, [itemsContentSig, ownGroup]);
|
|
33395
|
-
const zonesRef =
|
|
33396
|
-
const registerZone =
|
|
33416
|
+
const zonesRef = React114__default.useRef(/* @__PURE__ */ new Map());
|
|
33417
|
+
const registerZone = React114__default.useCallback((zoneId2, meta2) => {
|
|
33397
33418
|
zonesRef.current.set(zoneId2, meta2);
|
|
33398
33419
|
}, []);
|
|
33399
|
-
const unregisterZone =
|
|
33420
|
+
const unregisterZone = React114__default.useCallback((zoneId2) => {
|
|
33400
33421
|
zonesRef.current.delete(zoneId2);
|
|
33401
33422
|
}, []);
|
|
33402
|
-
const [activeDrag, setActiveDrag] =
|
|
33403
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
33404
|
-
const meta =
|
|
33423
|
+
const [activeDrag, setActiveDrag] = React114__default.useState(null);
|
|
33424
|
+
const [overZoneGroup, setOverZoneGroup] = React114__default.useState(null);
|
|
33425
|
+
const meta = React114__default.useMemo(
|
|
33405
33426
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
33406
33427
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
33407
33428
|
);
|
|
33408
|
-
|
|
33429
|
+
React114__default.useEffect(() => {
|
|
33409
33430
|
const target = isRoot ? null : parentRoot;
|
|
33410
33431
|
if (!target) {
|
|
33411
33432
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -33424,7 +33445,7 @@ function useDataDnd(args) {
|
|
|
33424
33445
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
33425
33446
|
const sensors = useAlmadarDndSensors(true);
|
|
33426
33447
|
const collisionDetection = almadarDndCollisionDetection;
|
|
33427
|
-
const findZoneByItem =
|
|
33448
|
+
const findZoneByItem = React114__default.useCallback(
|
|
33428
33449
|
(id) => {
|
|
33429
33450
|
for (const z of zonesRef.current.values()) {
|
|
33430
33451
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -33433,7 +33454,7 @@ function useDataDnd(args) {
|
|
|
33433
33454
|
},
|
|
33434
33455
|
[]
|
|
33435
33456
|
);
|
|
33436
|
-
|
|
33457
|
+
React114__default.useCallback(
|
|
33437
33458
|
(group) => {
|
|
33438
33459
|
for (const z of zonesRef.current.values()) {
|
|
33439
33460
|
if (z.group === group) return z;
|
|
@@ -33442,7 +33463,7 @@ function useDataDnd(args) {
|
|
|
33442
33463
|
},
|
|
33443
33464
|
[]
|
|
33444
33465
|
);
|
|
33445
|
-
const handleDragEnd =
|
|
33466
|
+
const handleDragEnd = React114__default.useCallback(
|
|
33446
33467
|
(event) => {
|
|
33447
33468
|
const { active, over } = event;
|
|
33448
33469
|
const activeIdStr = String(active.id);
|
|
@@ -33533,8 +33554,8 @@ function useDataDnd(args) {
|
|
|
33533
33554
|
},
|
|
33534
33555
|
[eventBus]
|
|
33535
33556
|
);
|
|
33536
|
-
const sortableData =
|
|
33537
|
-
const SortableItem =
|
|
33557
|
+
const sortableData = React114__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
33558
|
+
const SortableItem = React114__default.useCallback(
|
|
33538
33559
|
({ id, children }) => {
|
|
33539
33560
|
const {
|
|
33540
33561
|
attributes,
|
|
@@ -33574,7 +33595,7 @@ function useDataDnd(args) {
|
|
|
33574
33595
|
id: droppableId,
|
|
33575
33596
|
data: sortableData
|
|
33576
33597
|
});
|
|
33577
|
-
const ctx =
|
|
33598
|
+
const ctx = React114__default.useContext(RootCtx);
|
|
33578
33599
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
33579
33600
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
33580
33601
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -33589,7 +33610,7 @@ function useDataDnd(args) {
|
|
|
33589
33610
|
showForeignPlaceholder,
|
|
33590
33611
|
ctxAvailable: ctx != null
|
|
33591
33612
|
});
|
|
33592
|
-
|
|
33613
|
+
React114__default.useEffect(() => {
|
|
33593
33614
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
33594
33615
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
33595
33616
|
return /* @__PURE__ */ jsx(
|
|
@@ -33603,11 +33624,11 @@ function useDataDnd(args) {
|
|
|
33603
33624
|
}
|
|
33604
33625
|
);
|
|
33605
33626
|
};
|
|
33606
|
-
const rootContextValue =
|
|
33627
|
+
const rootContextValue = React114__default.useMemo(
|
|
33607
33628
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
33608
33629
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
33609
33630
|
);
|
|
33610
|
-
const handleDragStart =
|
|
33631
|
+
const handleDragStart = React114__default.useCallback((event) => {
|
|
33611
33632
|
const sourceZone = findZoneByItem(event.active.id);
|
|
33612
33633
|
const rect = event.active.rect.current.initial;
|
|
33613
33634
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -33626,7 +33647,7 @@ function useDataDnd(args) {
|
|
|
33626
33647
|
isRoot
|
|
33627
33648
|
});
|
|
33628
33649
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
33629
|
-
const handleDragOver =
|
|
33650
|
+
const handleDragOver = React114__default.useCallback((event) => {
|
|
33630
33651
|
const { active, over } = event;
|
|
33631
33652
|
const overData = over?.data?.current;
|
|
33632
33653
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -33696,7 +33717,7 @@ function useDataDnd(args) {
|
|
|
33696
33717
|
return next;
|
|
33697
33718
|
});
|
|
33698
33719
|
}, []);
|
|
33699
|
-
const handleDragCancel =
|
|
33720
|
+
const handleDragCancel = React114__default.useCallback((event) => {
|
|
33700
33721
|
setActiveDrag(null);
|
|
33701
33722
|
setOverZoneGroup(null);
|
|
33702
33723
|
dndLog.warn("dragCancel", {
|
|
@@ -33704,12 +33725,12 @@ function useDataDnd(args) {
|
|
|
33704
33725
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
33705
33726
|
});
|
|
33706
33727
|
}, []);
|
|
33707
|
-
const handleDragEndWithCleanup =
|
|
33728
|
+
const handleDragEndWithCleanup = React114__default.useCallback((event) => {
|
|
33708
33729
|
handleDragEnd(event);
|
|
33709
33730
|
setActiveDrag(null);
|
|
33710
33731
|
setOverZoneGroup(null);
|
|
33711
33732
|
}, [handleDragEnd]);
|
|
33712
|
-
const wrapContainer =
|
|
33733
|
+
const wrapContainer = React114__default.useCallback(
|
|
33713
33734
|
(children) => {
|
|
33714
33735
|
if (!enabled) return children;
|
|
33715
33736
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -33763,7 +33784,7 @@ var init_useDataDnd = __esm({
|
|
|
33763
33784
|
init_useAlmadarDndCollision();
|
|
33764
33785
|
init_Box();
|
|
33765
33786
|
dndLog = createLogger("almadar:ui:dnd");
|
|
33766
|
-
RootCtx =
|
|
33787
|
+
RootCtx = React114__default.createContext(null);
|
|
33767
33788
|
}
|
|
33768
33789
|
});
|
|
33769
33790
|
function renderIconInput(icon, props) {
|
|
@@ -34289,7 +34310,7 @@ function DataList({
|
|
|
34289
34310
|
}) {
|
|
34290
34311
|
const eventBus = useEventBus();
|
|
34291
34312
|
const { t } = useTranslate();
|
|
34292
|
-
const [visibleCount, setVisibleCount] =
|
|
34313
|
+
const [visibleCount, setVisibleCount] = React114__default.useState(pageSize || Infinity);
|
|
34293
34314
|
const fieldDefs = fields ?? columns ?? [];
|
|
34294
34315
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
34295
34316
|
const dnd = useDataDnd({
|
|
@@ -34308,7 +34329,7 @@ function DataList({
|
|
|
34308
34329
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
34309
34330
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
34310
34331
|
const hasRenderProp = typeof children === "function";
|
|
34311
|
-
|
|
34332
|
+
React114__default.useEffect(() => {
|
|
34312
34333
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
34313
34334
|
const childrenTypeOf = typeof children;
|
|
34314
34335
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -34412,7 +34433,7 @@ function DataList({
|
|
|
34412
34433
|
const items2 = [...data];
|
|
34413
34434
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
34414
34435
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
34415
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
34436
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React114__default.Fragment, { children: [
|
|
34416
34437
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
34417
34438
|
group.items.map((itemData, index) => {
|
|
34418
34439
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -34553,7 +34574,7 @@ function DataList({
|
|
|
34553
34574
|
className
|
|
34554
34575
|
),
|
|
34555
34576
|
children: [
|
|
34556
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
34577
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React114__default.Fragment, { children: [
|
|
34557
34578
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
34558
34579
|
group.items.map(
|
|
34559
34580
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -35346,7 +35367,7 @@ var init_Flex = __esm({
|
|
|
35346
35367
|
flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
|
|
35347
35368
|
}
|
|
35348
35369
|
}
|
|
35349
|
-
return
|
|
35370
|
+
return React114__default.createElement(Component, {
|
|
35350
35371
|
className: cn(
|
|
35351
35372
|
inline ? "inline-flex" : "flex",
|
|
35352
35373
|
directionStyles[direction],
|
|
@@ -35465,7 +35486,7 @@ var init_Grid = __esm({
|
|
|
35465
35486
|
as: Component = "div"
|
|
35466
35487
|
}) => {
|
|
35467
35488
|
const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
|
|
35468
|
-
return
|
|
35489
|
+
return React114__default.createElement(
|
|
35469
35490
|
Component,
|
|
35470
35491
|
{
|
|
35471
35492
|
className: cn(
|
|
@@ -35661,9 +35682,9 @@ var init_Popover = __esm({
|
|
|
35661
35682
|
onMouseLeave: handleClose,
|
|
35662
35683
|
onPointerDown: tapTriggerProps.onPointerDown
|
|
35663
35684
|
};
|
|
35664
|
-
const childElement =
|
|
35685
|
+
const childElement = React114__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
35665
35686
|
const childPointerDown = childElement.props.onPointerDown;
|
|
35666
|
-
const triggerElement =
|
|
35687
|
+
const triggerElement = React114__default.cloneElement(
|
|
35667
35688
|
childElement,
|
|
35668
35689
|
{
|
|
35669
35690
|
ref: triggerRef,
|
|
@@ -36265,9 +36286,9 @@ var init_Tooltip = __esm({
|
|
|
36265
36286
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
36266
36287
|
};
|
|
36267
36288
|
}, []);
|
|
36268
|
-
const triggerElement =
|
|
36289
|
+
const triggerElement = React114__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
36269
36290
|
const childPointerDown = triggerElement.props.onPointerDown;
|
|
36270
|
-
const trigger =
|
|
36291
|
+
const trigger = React114__default.cloneElement(triggerElement, {
|
|
36271
36292
|
ref: triggerRef,
|
|
36272
36293
|
onMouseEnter: handleMouseEnter,
|
|
36273
36294
|
onMouseLeave: handleMouseLeave,
|
|
@@ -36357,7 +36378,7 @@ var init_WizardProgress = __esm({
|
|
|
36357
36378
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
36358
36379
|
const isActive = index === currentStep;
|
|
36359
36380
|
const isCompleted = index < currentStep;
|
|
36360
|
-
return /* @__PURE__ */ jsxs(
|
|
36381
|
+
return /* @__PURE__ */ jsxs(React114__default.Fragment, { children: [
|
|
36361
36382
|
/* @__PURE__ */ jsx(
|
|
36362
36383
|
"button",
|
|
36363
36384
|
{
|
|
@@ -37689,13 +37710,13 @@ var init_MapView = __esm({
|
|
|
37689
37710
|
shadowSize: [41, 41]
|
|
37690
37711
|
});
|
|
37691
37712
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
37692
|
-
const { useEffect:
|
|
37713
|
+
const { useEffect: useEffect78, useRef: useRef78, useCallback: useCallback118, useState: useState115 } = React114__default;
|
|
37693
37714
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
37694
37715
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
37695
37716
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
37696
37717
|
const map = useMap();
|
|
37697
|
-
const prevRef =
|
|
37698
|
-
|
|
37718
|
+
const prevRef = useRef78({ centerLat, centerLng, zoom });
|
|
37719
|
+
useEffect78(() => {
|
|
37699
37720
|
const prev = prevRef.current;
|
|
37700
37721
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
37701
37722
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -37706,7 +37727,7 @@ var init_MapView = __esm({
|
|
|
37706
37727
|
}
|
|
37707
37728
|
function MapClickHandler({ onMapClick }) {
|
|
37708
37729
|
const map = useMap();
|
|
37709
|
-
|
|
37730
|
+
useEffect78(() => {
|
|
37710
37731
|
if (!onMapClick) return;
|
|
37711
37732
|
const handler = (e) => {
|
|
37712
37733
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -37734,8 +37755,8 @@ var init_MapView = __esm({
|
|
|
37734
37755
|
showAttribution = true
|
|
37735
37756
|
}) {
|
|
37736
37757
|
const eventBus = useEventBus2();
|
|
37737
|
-
const [clickedPosition, setClickedPosition] =
|
|
37738
|
-
const handleMapClick =
|
|
37758
|
+
const [clickedPosition, setClickedPosition] = useState115(null);
|
|
37759
|
+
const handleMapClick = useCallback118((lat, lng) => {
|
|
37739
37760
|
if (showClickedPin) {
|
|
37740
37761
|
setClickedPosition({ lat, lng });
|
|
37741
37762
|
}
|
|
@@ -37744,7 +37765,7 @@ var init_MapView = __esm({
|
|
|
37744
37765
|
eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
|
|
37745
37766
|
}
|
|
37746
37767
|
}, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
|
|
37747
|
-
const handleMarkerClick =
|
|
37768
|
+
const handleMarkerClick = useCallback118((marker) => {
|
|
37748
37769
|
onMarkerClick?.(marker);
|
|
37749
37770
|
if (markerClickEvent) {
|
|
37750
37771
|
eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
|
|
@@ -38604,8 +38625,8 @@ function TableView({
|
|
|
38604
38625
|
}) {
|
|
38605
38626
|
const eventBus = useEventBus();
|
|
38606
38627
|
const { t } = useTranslate();
|
|
38607
|
-
const [visibleCount, setVisibleCount] =
|
|
38608
|
-
const [localSelected, setLocalSelected] =
|
|
38628
|
+
const [visibleCount, setVisibleCount] = React114__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
38629
|
+
const [localSelected, setLocalSelected] = React114__default.useState(/* @__PURE__ */ new Set());
|
|
38609
38630
|
const colDefs = columns ?? fields ?? [];
|
|
38610
38631
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
38611
38632
|
const dnd = useDataDnd({
|
|
@@ -38800,12 +38821,12 @@ function TableView({
|
|
|
38800
38821
|
]
|
|
38801
38822
|
}
|
|
38802
38823
|
);
|
|
38803
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
38824
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React114__default.Fragment, { children: rowInner }, id);
|
|
38804
38825
|
};
|
|
38805
38826
|
const items = Array.from(data);
|
|
38806
38827
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
38807
38828
|
let runningIndex = 0;
|
|
38808
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
38829
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React114__default.Fragment, { children: [
|
|
38809
38830
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
38810
38831
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
38811
38832
|
] }, gi)) });
|
|
@@ -40162,7 +40183,7 @@ var init_StepFlow = __esm({
|
|
|
40162
40183
|
className
|
|
40163
40184
|
}) => {
|
|
40164
40185
|
if (orientation === "vertical") {
|
|
40165
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
40186
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React114__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
40166
40187
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
40167
40188
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
40168
40189
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -40173,7 +40194,7 @@ var init_StepFlow = __esm({
|
|
|
40173
40194
|
] })
|
|
40174
40195
|
] }) }, index)) });
|
|
40175
40196
|
}
|
|
40176
|
-
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(
|
|
40197
|
+
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(React114__default.Fragment, { children: [
|
|
40177
40198
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
40178
40199
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
40179
40200
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -41158,7 +41179,7 @@ var init_LikertScale = __esm({
|
|
|
41158
41179
|
md: "text-base",
|
|
41159
41180
|
lg: "text-lg"
|
|
41160
41181
|
};
|
|
41161
|
-
LikertScale =
|
|
41182
|
+
LikertScale = React114__default.forwardRef(
|
|
41162
41183
|
({
|
|
41163
41184
|
question,
|
|
41164
41185
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -41170,7 +41191,7 @@ var init_LikertScale = __esm({
|
|
|
41170
41191
|
variant = "radios",
|
|
41171
41192
|
className
|
|
41172
41193
|
}, ref) => {
|
|
41173
|
-
const groupId =
|
|
41194
|
+
const groupId = React114__default.useId();
|
|
41174
41195
|
const eventBus = useEventBus();
|
|
41175
41196
|
const handleSelect = useCallback(
|
|
41176
41197
|
(next) => {
|
|
@@ -43452,7 +43473,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
43452
43473
|
"aria-label": t("aria.breadcrumb"),
|
|
43453
43474
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
43454
43475
|
const isLast = idx === items.length - 1;
|
|
43455
|
-
return /* @__PURE__ */ jsxs(
|
|
43476
|
+
return /* @__PURE__ */ jsxs(React114__default.Fragment, { children: [
|
|
43456
43477
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
43457
43478
|
Icon,
|
|
43458
43479
|
{
|
|
@@ -44116,7 +44137,7 @@ var init_PageHeader = __esm({
|
|
|
44116
44137
|
info: "bg-info/10 text-info"
|
|
44117
44138
|
};
|
|
44118
44139
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
44119
|
-
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(
|
|
44140
|
+
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(React114__default.Fragment, { children: [
|
|
44120
44141
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
44121
44142
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
44122
44143
|
"a",
|
|
@@ -44474,7 +44495,7 @@ var init_Section = __esm({
|
|
|
44474
44495
|
as: Component = "section"
|
|
44475
44496
|
}) => {
|
|
44476
44497
|
const hasHeader = title || description || action;
|
|
44477
|
-
return
|
|
44498
|
+
return React114__default.createElement(
|
|
44478
44499
|
Component,
|
|
44479
44500
|
{
|
|
44480
44501
|
className: cn(
|
|
@@ -44840,7 +44861,7 @@ var init_WizardContainer = __esm({
|
|
|
44840
44861
|
const isCompleted = index < currentStep;
|
|
44841
44862
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
44842
44863
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
44843
|
-
return /* @__PURE__ */ jsxs(
|
|
44864
|
+
return /* @__PURE__ */ jsxs(React114__default.Fragment, { children: [
|
|
44844
44865
|
/* @__PURE__ */ jsx(
|
|
44845
44866
|
Button,
|
|
44846
44867
|
{
|
|
@@ -47273,7 +47294,7 @@ var init_DetailPanel = __esm({
|
|
|
47273
47294
|
}
|
|
47274
47295
|
});
|
|
47275
47296
|
function extractTitle(children) {
|
|
47276
|
-
if (!
|
|
47297
|
+
if (!React114__default.isValidElement(children)) return void 0;
|
|
47277
47298
|
const props = children.props;
|
|
47278
47299
|
if (typeof props.title === "string") {
|
|
47279
47300
|
return props.title;
|
|
@@ -47619,12 +47640,12 @@ var init_Form = __esm({
|
|
|
47619
47640
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
47620
47641
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
47621
47642
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
47622
|
-
const normalizedInitialData =
|
|
47643
|
+
const normalizedInitialData = React114__default.useMemo(() => {
|
|
47623
47644
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
47624
47645
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
47625
47646
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
47626
47647
|
}, [entity, initialData]);
|
|
47627
|
-
const entityDerivedFields =
|
|
47648
|
+
const entityDerivedFields = React114__default.useMemo(() => {
|
|
47628
47649
|
if (fields && fields.length > 0) return void 0;
|
|
47629
47650
|
if (!resolvedEntity) return void 0;
|
|
47630
47651
|
return resolvedEntity.fields.map(
|
|
@@ -47645,16 +47666,16 @@ var init_Form = __esm({
|
|
|
47645
47666
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
47646
47667
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
47647
47668
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
47648
|
-
const [formData, setFormData] =
|
|
47669
|
+
const [formData, setFormData] = React114__default.useState(
|
|
47649
47670
|
normalizedInitialData
|
|
47650
47671
|
);
|
|
47651
|
-
const [collapsedSections, setCollapsedSections] =
|
|
47672
|
+
const [collapsedSections, setCollapsedSections] = React114__default.useState(
|
|
47652
47673
|
/* @__PURE__ */ new Set()
|
|
47653
47674
|
);
|
|
47654
|
-
const [submitError, setSubmitError] =
|
|
47655
|
-
const formRef =
|
|
47675
|
+
const [submitError, setSubmitError] = React114__default.useState(null);
|
|
47676
|
+
const formRef = React114__default.useRef(null);
|
|
47656
47677
|
const formMode = props.mode;
|
|
47657
|
-
const mountedRef =
|
|
47678
|
+
const mountedRef = React114__default.useRef(false);
|
|
47658
47679
|
if (!mountedRef.current) {
|
|
47659
47680
|
mountedRef.current = true;
|
|
47660
47681
|
debug("forms", "mount", {
|
|
@@ -47667,7 +47688,7 @@ var init_Form = __esm({
|
|
|
47667
47688
|
});
|
|
47668
47689
|
}
|
|
47669
47690
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
47670
|
-
const evalContext =
|
|
47691
|
+
const evalContext = React114__default.useMemo(
|
|
47671
47692
|
() => ({
|
|
47672
47693
|
formValues: formData,
|
|
47673
47694
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -47676,7 +47697,7 @@ var init_Form = __esm({
|
|
|
47676
47697
|
}),
|
|
47677
47698
|
[formData, externalContext]
|
|
47678
47699
|
);
|
|
47679
|
-
|
|
47700
|
+
React114__default.useEffect(() => {
|
|
47680
47701
|
debug("forms", "initialData-sync", {
|
|
47681
47702
|
mode: formMode,
|
|
47682
47703
|
normalizedInitialData,
|
|
@@ -47687,7 +47708,7 @@ var init_Form = __esm({
|
|
|
47687
47708
|
setFormData(normalizedInitialData);
|
|
47688
47709
|
}
|
|
47689
47710
|
}, [normalizedInitialData]);
|
|
47690
|
-
const processCalculations =
|
|
47711
|
+
const processCalculations = React114__default.useCallback(
|
|
47691
47712
|
(changedFieldId, newFormData) => {
|
|
47692
47713
|
if (!hiddenCalculations.length) return;
|
|
47693
47714
|
const context = {
|
|
@@ -47712,7 +47733,7 @@ var init_Form = __esm({
|
|
|
47712
47733
|
},
|
|
47713
47734
|
[hiddenCalculations, externalContext, eventBus]
|
|
47714
47735
|
);
|
|
47715
|
-
const checkViolations =
|
|
47736
|
+
const checkViolations = React114__default.useCallback(
|
|
47716
47737
|
(changedFieldId, newFormData) => {
|
|
47717
47738
|
if (!violationTriggers.length) return;
|
|
47718
47739
|
const context = {
|
|
@@ -47750,7 +47771,7 @@ var init_Form = __esm({
|
|
|
47750
47771
|
processCalculations(name, newFormData);
|
|
47751
47772
|
checkViolations(name, newFormData);
|
|
47752
47773
|
};
|
|
47753
|
-
const isFieldVisible =
|
|
47774
|
+
const isFieldVisible = React114__default.useCallback(
|
|
47754
47775
|
(fieldName) => {
|
|
47755
47776
|
const condition = conditionalFields[fieldName];
|
|
47756
47777
|
if (!condition) return true;
|
|
@@ -47758,7 +47779,7 @@ var init_Form = __esm({
|
|
|
47758
47779
|
},
|
|
47759
47780
|
[conditionalFields, evalContext]
|
|
47760
47781
|
);
|
|
47761
|
-
const isSectionVisible =
|
|
47782
|
+
const isSectionVisible = React114__default.useCallback(
|
|
47762
47783
|
(section) => {
|
|
47763
47784
|
if (!section.condition) return true;
|
|
47764
47785
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -47834,7 +47855,7 @@ var init_Form = __esm({
|
|
|
47834
47855
|
eventBus.emit(`UI:${onCancel}`);
|
|
47835
47856
|
}
|
|
47836
47857
|
};
|
|
47837
|
-
const renderField =
|
|
47858
|
+
const renderField = React114__default.useCallback(
|
|
47838
47859
|
(field) => {
|
|
47839
47860
|
const fieldName = field.name || field.field;
|
|
47840
47861
|
if (!fieldName) return null;
|
|
@@ -47855,7 +47876,7 @@ var init_Form = __esm({
|
|
|
47855
47876
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
47856
47877
|
);
|
|
47857
47878
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
47858
|
-
const normalizedFields =
|
|
47879
|
+
const normalizedFields = React114__default.useMemo(() => {
|
|
47859
47880
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
47860
47881
|
return effectiveFields.map((field) => {
|
|
47861
47882
|
if (typeof field === "string") {
|
|
@@ -47879,7 +47900,7 @@ var init_Form = __esm({
|
|
|
47879
47900
|
return field;
|
|
47880
47901
|
});
|
|
47881
47902
|
}, [effectiveFields, resolvedEntity]);
|
|
47882
|
-
const schemaFields =
|
|
47903
|
+
const schemaFields = React114__default.useMemo(() => {
|
|
47883
47904
|
if (normalizedFields.length === 0) return null;
|
|
47884
47905
|
if (isDebugEnabled()) {
|
|
47885
47906
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -47889,7 +47910,7 @@ var init_Form = __esm({
|
|
|
47889
47910
|
}
|
|
47890
47911
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
47891
47912
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
47892
|
-
const sectionElements =
|
|
47913
|
+
const sectionElements = React114__default.useMemo(() => {
|
|
47893
47914
|
if (!sections || sections.length === 0) return null;
|
|
47894
47915
|
return sections.map((section) => {
|
|
47895
47916
|
if (!isSectionVisible(section)) {
|
|
@@ -48614,7 +48635,7 @@ var init_List = __esm({
|
|
|
48614
48635
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
48615
48636
|
return [];
|
|
48616
48637
|
}, [entity]);
|
|
48617
|
-
const getItemActions =
|
|
48638
|
+
const getItemActions = React114__default.useCallback(
|
|
48618
48639
|
(item) => {
|
|
48619
48640
|
if (!itemActions) return [];
|
|
48620
48641
|
if (typeof itemActions === "function") {
|
|
@@ -49089,7 +49110,7 @@ var init_MediaGallery = __esm({
|
|
|
49089
49110
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
49090
49111
|
);
|
|
49091
49112
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
49092
|
-
const items =
|
|
49113
|
+
const items = React114__default.useMemo(() => {
|
|
49093
49114
|
if (propItems) return propItems;
|
|
49094
49115
|
if (entityData.length === 0) return [];
|
|
49095
49116
|
return entityData.map((record, idx) => {
|
|
@@ -49252,7 +49273,7 @@ var init_MediaGallery = __esm({
|
|
|
49252
49273
|
}
|
|
49253
49274
|
});
|
|
49254
49275
|
function extractTitle2(children) {
|
|
49255
|
-
if (!
|
|
49276
|
+
if (!React114__default.isValidElement(children)) return void 0;
|
|
49256
49277
|
const props = children.props;
|
|
49257
49278
|
if (typeof props.title === "string") {
|
|
49258
49279
|
return props.title;
|
|
@@ -49522,7 +49543,7 @@ var init_debugRegistry = __esm({
|
|
|
49522
49543
|
}
|
|
49523
49544
|
});
|
|
49524
49545
|
function useDebugData() {
|
|
49525
|
-
const [data, setData] =
|
|
49546
|
+
const [data, setData] = React114.useState(() => ({
|
|
49526
49547
|
traits: [],
|
|
49527
49548
|
ticks: [],
|
|
49528
49549
|
guards: [],
|
|
@@ -49536,7 +49557,7 @@ function useDebugData() {
|
|
|
49536
49557
|
},
|
|
49537
49558
|
lastUpdate: Date.now()
|
|
49538
49559
|
}));
|
|
49539
|
-
|
|
49560
|
+
React114.useEffect(() => {
|
|
49540
49561
|
const updateData = () => {
|
|
49541
49562
|
setData({
|
|
49542
49563
|
traits: getAllTraits(),
|
|
@@ -49645,12 +49666,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
49645
49666
|
return positions;
|
|
49646
49667
|
}
|
|
49647
49668
|
function WalkMinimap() {
|
|
49648
|
-
const [walkStep, setWalkStep] =
|
|
49649
|
-
const [traits2, setTraits] =
|
|
49650
|
-
const [coveredEdges, setCoveredEdges] =
|
|
49651
|
-
const [completedTraits, setCompletedTraits] =
|
|
49652
|
-
const prevTraitRef =
|
|
49653
|
-
|
|
49669
|
+
const [walkStep, setWalkStep] = React114.useState(null);
|
|
49670
|
+
const [traits2, setTraits] = React114.useState([]);
|
|
49671
|
+
const [coveredEdges, setCoveredEdges] = React114.useState([]);
|
|
49672
|
+
const [completedTraits, setCompletedTraits] = React114.useState(/* @__PURE__ */ new Set());
|
|
49673
|
+
const prevTraitRef = React114.useRef(null);
|
|
49674
|
+
React114.useEffect(() => {
|
|
49654
49675
|
const interval = setInterval(() => {
|
|
49655
49676
|
const w = window;
|
|
49656
49677
|
const step = w.__orbitalWalkStep;
|
|
@@ -50086,15 +50107,15 @@ var init_EntitiesTab = __esm({
|
|
|
50086
50107
|
});
|
|
50087
50108
|
function EventFlowTab({ events: events2 }) {
|
|
50088
50109
|
const { t } = useTranslate();
|
|
50089
|
-
const [filter, setFilter] =
|
|
50090
|
-
const containerRef =
|
|
50091
|
-
const [autoScroll, setAutoScroll] =
|
|
50092
|
-
|
|
50110
|
+
const [filter, setFilter] = React114.useState("all");
|
|
50111
|
+
const containerRef = React114.useRef(null);
|
|
50112
|
+
const [autoScroll, setAutoScroll] = React114.useState(true);
|
|
50113
|
+
React114.useEffect(() => {
|
|
50093
50114
|
if (autoScroll && containerRef.current) {
|
|
50094
50115
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
50095
50116
|
}
|
|
50096
50117
|
}, [events2.length, autoScroll]);
|
|
50097
|
-
const filteredEvents =
|
|
50118
|
+
const filteredEvents = React114.useMemo(() => {
|
|
50098
50119
|
if (filter === "all") return events2;
|
|
50099
50120
|
return events2.filter((e) => e.type === filter);
|
|
50100
50121
|
}, [events2, filter]);
|
|
@@ -50210,7 +50231,7 @@ var init_EventFlowTab = __esm({
|
|
|
50210
50231
|
});
|
|
50211
50232
|
function GuardsPanel({ guards }) {
|
|
50212
50233
|
const { t } = useTranslate();
|
|
50213
|
-
const [filter, setFilter] =
|
|
50234
|
+
const [filter, setFilter] = React114.useState("all");
|
|
50214
50235
|
if (guards.length === 0) {
|
|
50215
50236
|
return /* @__PURE__ */ jsx(
|
|
50216
50237
|
EmptyState,
|
|
@@ -50223,7 +50244,7 @@ function GuardsPanel({ guards }) {
|
|
|
50223
50244
|
}
|
|
50224
50245
|
const passedCount = guards.filter((g) => g.result).length;
|
|
50225
50246
|
const failedCount = guards.length - passedCount;
|
|
50226
|
-
const filteredGuards =
|
|
50247
|
+
const filteredGuards = React114.useMemo(() => {
|
|
50227
50248
|
if (filter === "all") return guards;
|
|
50228
50249
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
50229
50250
|
return guards.filter((g) => !g.result);
|
|
@@ -50386,10 +50407,10 @@ function EffectBadge({ effect }) {
|
|
|
50386
50407
|
}
|
|
50387
50408
|
function TransitionTimeline({ transitions }) {
|
|
50388
50409
|
const { t } = useTranslate();
|
|
50389
|
-
const containerRef =
|
|
50390
|
-
const [autoScroll, setAutoScroll] =
|
|
50391
|
-
const [expandedId, setExpandedId] =
|
|
50392
|
-
|
|
50410
|
+
const containerRef = React114.useRef(null);
|
|
50411
|
+
const [autoScroll, setAutoScroll] = React114.useState(true);
|
|
50412
|
+
const [expandedId, setExpandedId] = React114.useState(null);
|
|
50413
|
+
React114.useEffect(() => {
|
|
50393
50414
|
if (autoScroll && containerRef.current) {
|
|
50394
50415
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
50395
50416
|
}
|
|
@@ -50669,9 +50690,9 @@ function getAllEvents(traits2) {
|
|
|
50669
50690
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
50670
50691
|
const eventBus = useEventBus();
|
|
50671
50692
|
const { t } = useTranslate();
|
|
50672
|
-
const [log11, setLog] =
|
|
50673
|
-
const prevStatesRef =
|
|
50674
|
-
|
|
50693
|
+
const [log11, setLog] = React114.useState([]);
|
|
50694
|
+
const prevStatesRef = React114.useRef(/* @__PURE__ */ new Map());
|
|
50695
|
+
React114.useEffect(() => {
|
|
50675
50696
|
for (const trait of traits2) {
|
|
50676
50697
|
const prev = prevStatesRef.current.get(trait.id);
|
|
50677
50698
|
if (prev && prev !== trait.currentState) {
|
|
@@ -50840,10 +50861,10 @@ function VerifyModePanel({
|
|
|
50840
50861
|
localCount
|
|
50841
50862
|
}) {
|
|
50842
50863
|
const { t } = useTranslate();
|
|
50843
|
-
const [expanded, setExpanded] =
|
|
50844
|
-
const scrollRef =
|
|
50845
|
-
const prevCountRef =
|
|
50846
|
-
|
|
50864
|
+
const [expanded, setExpanded] = React114.useState(true);
|
|
50865
|
+
const scrollRef = React114.useRef(null);
|
|
50866
|
+
const prevCountRef = React114.useRef(0);
|
|
50867
|
+
React114.useEffect(() => {
|
|
50847
50868
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
50848
50869
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
50849
50870
|
}
|
|
@@ -50900,10 +50921,10 @@ function RuntimeDebugger({
|
|
|
50900
50921
|
schema
|
|
50901
50922
|
}) {
|
|
50902
50923
|
const { t } = useTranslate();
|
|
50903
|
-
const [isCollapsed, setIsCollapsed] =
|
|
50904
|
-
const [isVisible, setIsVisible] =
|
|
50924
|
+
const [isCollapsed, setIsCollapsed] = React114.useState(mode === "verify" ? true : defaultCollapsed);
|
|
50925
|
+
const [isVisible, setIsVisible] = React114.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
50905
50926
|
const debugData = useDebugData();
|
|
50906
|
-
|
|
50927
|
+
React114.useEffect(() => {
|
|
50907
50928
|
if (mode === "inline") return;
|
|
50908
50929
|
return onDebugToggle((enabled) => {
|
|
50909
50930
|
setIsVisible(enabled);
|
|
@@ -50912,7 +50933,7 @@ function RuntimeDebugger({
|
|
|
50912
50933
|
}
|
|
50913
50934
|
});
|
|
50914
50935
|
}, [mode]);
|
|
50915
|
-
|
|
50936
|
+
React114.useEffect(() => {
|
|
50916
50937
|
if (mode === "inline") return;
|
|
50917
50938
|
const handleKeyDown = (e) => {
|
|
50918
50939
|
if (e.key === "`" && isVisible) {
|
|
@@ -51432,7 +51453,7 @@ var init_StatCard = __esm({
|
|
|
51432
51453
|
const labelToUse = propLabel ?? propTitle;
|
|
51433
51454
|
const eventBus = useEventBus();
|
|
51434
51455
|
const { t } = useTranslate();
|
|
51435
|
-
const handleActionClick =
|
|
51456
|
+
const handleActionClick = React114__default.useCallback(() => {
|
|
51436
51457
|
if (action?.event) {
|
|
51437
51458
|
eventBus.emit(`UI:${action.event}`, {});
|
|
51438
51459
|
}
|
|
@@ -51443,7 +51464,7 @@ var init_StatCard = __esm({
|
|
|
51443
51464
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
51444
51465
|
const isLoading = externalLoading ?? false;
|
|
51445
51466
|
const error = externalError;
|
|
51446
|
-
const computeMetricValue =
|
|
51467
|
+
const computeMetricValue = React114__default.useCallback(
|
|
51447
51468
|
(metric, items) => {
|
|
51448
51469
|
if (metric.value !== void 0) {
|
|
51449
51470
|
return metric.value;
|
|
@@ -51482,7 +51503,7 @@ var init_StatCard = __esm({
|
|
|
51482
51503
|
},
|
|
51483
51504
|
[]
|
|
51484
51505
|
);
|
|
51485
|
-
const schemaStats =
|
|
51506
|
+
const schemaStats = React114__default.useMemo(() => {
|
|
51486
51507
|
if (!metrics || metrics.length === 0) return null;
|
|
51487
51508
|
return metrics.map((metric) => ({
|
|
51488
51509
|
label: metric.label,
|
|
@@ -51490,7 +51511,7 @@ var init_StatCard = __esm({
|
|
|
51490
51511
|
format: metric.format
|
|
51491
51512
|
}));
|
|
51492
51513
|
}, [metrics, data, computeMetricValue]);
|
|
51493
|
-
const calculatedTrend =
|
|
51514
|
+
const calculatedTrend = React114__default.useMemo(() => {
|
|
51494
51515
|
if (manualTrend !== void 0) return manualTrend;
|
|
51495
51516
|
if (previousValue === void 0 || currentValue === void 0)
|
|
51496
51517
|
return void 0;
|
|
@@ -52130,8 +52151,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
52130
52151
|
] });
|
|
52131
52152
|
};
|
|
52132
52153
|
InlineActivityStream = ({ activities, autoScroll = true, className }) => {
|
|
52133
|
-
const endRef =
|
|
52134
|
-
|
|
52154
|
+
const endRef = React114__default.useRef(null);
|
|
52155
|
+
React114__default.useEffect(() => {
|
|
52135
52156
|
if (!autoScroll) return;
|
|
52136
52157
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
52137
52158
|
}, [activities.length, autoScroll]);
|
|
@@ -52225,7 +52246,7 @@ var init_SubagentTracePanel = __esm({
|
|
|
52225
52246
|
};
|
|
52226
52247
|
SubagentRichCard = ({ subagent }) => {
|
|
52227
52248
|
const { t } = useTranslate();
|
|
52228
|
-
const activities =
|
|
52249
|
+
const activities = React114__default.useMemo(
|
|
52229
52250
|
() => subagentMessagesToActivities(subagent.messages),
|
|
52230
52251
|
[subagent.messages]
|
|
52231
52252
|
);
|
|
@@ -52302,8 +52323,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
52302
52323
|
] });
|
|
52303
52324
|
};
|
|
52304
52325
|
CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
|
|
52305
|
-
const endRef =
|
|
52306
|
-
|
|
52326
|
+
const endRef = React114__default.useRef(null);
|
|
52327
|
+
React114__default.useEffect(() => {
|
|
52307
52328
|
if (!autoScroll) return;
|
|
52308
52329
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
52309
52330
|
}, [messages.length, autoScroll]);
|
|
@@ -52733,7 +52754,7 @@ var init_Timeline = __esm({
|
|
|
52733
52754
|
}) => {
|
|
52734
52755
|
const { t } = useTranslate();
|
|
52735
52756
|
const entityData = entity ?? [];
|
|
52736
|
-
const items =
|
|
52757
|
+
const items = React114__default.useMemo(() => {
|
|
52737
52758
|
if (propItems) return propItems;
|
|
52738
52759
|
if (entityData.length === 0) return [];
|
|
52739
52760
|
return entityData.map((record, idx) => {
|
|
@@ -52835,7 +52856,7 @@ var init_Timeline = __esm({
|
|
|
52835
52856
|
}
|
|
52836
52857
|
});
|
|
52837
52858
|
function extractToastProps(children) {
|
|
52838
|
-
if (!
|
|
52859
|
+
if (!React114__default.isValidElement(children)) {
|
|
52839
52860
|
if (typeof children === "string") {
|
|
52840
52861
|
return { message: children };
|
|
52841
52862
|
}
|
|
@@ -52873,7 +52894,7 @@ var init_ToastSlot = __esm({
|
|
|
52873
52894
|
eventBus.emit("UI:CLOSE");
|
|
52874
52895
|
};
|
|
52875
52896
|
if (!isVisible) return null;
|
|
52876
|
-
const isCustomContent =
|
|
52897
|
+
const isCustomContent = React114__default.isValidElement(children) && !message;
|
|
52877
52898
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
52878
52899
|
Toast,
|
|
52879
52900
|
{
|
|
@@ -53515,7 +53536,7 @@ function SuspenseConfigProvider({
|
|
|
53515
53536
|
config,
|
|
53516
53537
|
children
|
|
53517
53538
|
}) {
|
|
53518
|
-
return
|
|
53539
|
+
return React114__default.createElement(
|
|
53519
53540
|
SuspenseConfigContext.Provider,
|
|
53520
53541
|
{ value: config },
|
|
53521
53542
|
children
|
|
@@ -53557,7 +53578,7 @@ function enrichFormFields(fields, entityDef) {
|
|
|
53557
53578
|
}
|
|
53558
53579
|
return { name: field, label: field.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (c) => c.toUpperCase()) };
|
|
53559
53580
|
}
|
|
53560
|
-
if (field && typeof field === "object" && !Array.isArray(field) && !
|
|
53581
|
+
if (field && typeof field === "object" && !Array.isArray(field) && !React114__default.isValidElement(field) && !(field instanceof Date)) {
|
|
53561
53582
|
const obj = field;
|
|
53562
53583
|
const fieldName = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
|
|
53563
53584
|
if (!fieldName) return field;
|
|
@@ -54003,7 +54024,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
54003
54024
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
54004
54025
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
54005
54026
|
}
|
|
54006
|
-
return /* @__PURE__ */ jsx(
|
|
54027
|
+
return /* @__PURE__ */ jsx(React114__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
54007
54028
|
}
|
|
54008
54029
|
if (!child || typeof child !== "object") return null;
|
|
54009
54030
|
const childId = `${parentId}-${index}`;
|
|
@@ -54043,14 +54064,14 @@ function isPatternConfig(value) {
|
|
|
54043
54064
|
if (value === null || value === void 0) return false;
|
|
54044
54065
|
if (typeof value !== "object") return false;
|
|
54045
54066
|
if (Array.isArray(value)) return false;
|
|
54046
|
-
if (
|
|
54067
|
+
if (React114__default.isValidElement(value)) return false;
|
|
54047
54068
|
if (value instanceof Date) return false;
|
|
54048
54069
|
if (typeof value === "function") return false;
|
|
54049
54070
|
const record = value;
|
|
54050
54071
|
return "type" in record && typeof record.type === "string" && getComponentForPattern(record.type) !== null;
|
|
54051
54072
|
}
|
|
54052
54073
|
function isPlainConfigObject(value) {
|
|
54053
|
-
if (
|
|
54074
|
+
if (React114__default.isValidElement(value)) return false;
|
|
54054
54075
|
if (value instanceof Date) return false;
|
|
54055
54076
|
const proto = Object.getPrototypeOf(value);
|
|
54056
54077
|
return proto === Object.prototype || proto === null;
|
|
@@ -54176,7 +54197,7 @@ function SlotContentRenderer({
|
|
|
54176
54197
|
for (const slotKey of CONTENT_NODE_SLOTS) {
|
|
54177
54198
|
const slotVal = restProps[slotKey];
|
|
54178
54199
|
if (slotVal === void 0 || slotVal === null) continue;
|
|
54179
|
-
if (
|
|
54200
|
+
if (React114__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
|
|
54180
54201
|
if (Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
|
|
54181
54202
|
nodeSlotOverrides[slotKey] = renderPatternChildren(
|
|
54182
54203
|
slotVal,
|
|
@@ -54225,7 +54246,7 @@ function SlotContentRenderer({
|
|
|
54225
54246
|
const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
|
|
54226
54247
|
if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
|
|
54227
54248
|
const sample = resolvedItems[0];
|
|
54228
|
-
if (sample && typeof sample === "object" && !Array.isArray(sample) && !
|
|
54249
|
+
if (sample && typeof sample === "object" && !Array.isArray(sample) && !React114__default.isValidElement(sample) && !(sample instanceof Date)) {
|
|
54229
54250
|
const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
|
|
54230
54251
|
finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
|
|
54231
54252
|
}
|
|
@@ -54587,7 +54608,7 @@ var AvlTransition = ({
|
|
|
54587
54608
|
opacity = 1,
|
|
54588
54609
|
className
|
|
54589
54610
|
}) => {
|
|
54590
|
-
const ids =
|
|
54611
|
+
const ids = React114__default.useMemo(() => {
|
|
54591
54612
|
avlTransitionId += 1;
|
|
54592
54613
|
return { arrow: `avl-tr-${avlTransitionId}-arrow` };
|
|
54593
54614
|
}, []);
|
|
@@ -55148,7 +55169,7 @@ var AvlStateMachine = ({
|
|
|
55148
55169
|
color = "var(--color-primary)",
|
|
55149
55170
|
animated = false
|
|
55150
55171
|
}) => {
|
|
55151
|
-
const ids =
|
|
55172
|
+
const ids = React114__default.useMemo(() => {
|
|
55152
55173
|
avlSmId += 1;
|
|
55153
55174
|
const base = `avl-sm-${avlSmId}`;
|
|
55154
55175
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -55347,7 +55368,7 @@ var AvlOrbitalUnit = ({
|
|
|
55347
55368
|
color = "var(--color-primary)",
|
|
55348
55369
|
animated = false
|
|
55349
55370
|
}) => {
|
|
55350
|
-
const ids =
|
|
55371
|
+
const ids = React114__default.useMemo(() => {
|
|
55351
55372
|
avlOuId += 1;
|
|
55352
55373
|
const base = `avl-ou-${avlOuId}`;
|
|
55353
55374
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -55443,7 +55464,7 @@ var AvlClosedCircuit = ({
|
|
|
55443
55464
|
color = "var(--color-primary)",
|
|
55444
55465
|
animated = false
|
|
55445
55466
|
}) => {
|
|
55446
|
-
const ids =
|
|
55467
|
+
const ids = React114__default.useMemo(() => {
|
|
55447
55468
|
avlCcId += 1;
|
|
55448
55469
|
const base = `avl-cc-${avlCcId}`;
|
|
55449
55470
|
return { glow: `${base}-glow`, grad: `${base}-grad`, arrow: `${base}-arrow` };
|
|
@@ -55598,7 +55619,7 @@ var AvlEmitListen = ({
|
|
|
55598
55619
|
color = "var(--color-primary)",
|
|
55599
55620
|
animated = false
|
|
55600
55621
|
}) => {
|
|
55601
|
-
const ids =
|
|
55622
|
+
const ids = React114__default.useMemo(() => {
|
|
55602
55623
|
avlElId += 1;
|
|
55603
55624
|
const base = `avl-el-${avlElId}`;
|
|
55604
55625
|
return { arrow: `${base}-arrow`, grad: `${base}-grad` };
|
|
@@ -55872,7 +55893,7 @@ function renderNode(node, color, glowId) {
|
|
|
55872
55893
|
const baseR = node.type === "operator" ? 20 : 16;
|
|
55873
55894
|
const r2 = Math.max(baseR, labelLen * 3.5 + 6);
|
|
55874
55895
|
const nc = nodeColor(node.type, color);
|
|
55875
|
-
return /* @__PURE__ */ jsxs(
|
|
55896
|
+
return /* @__PURE__ */ jsxs(React114__default.Fragment, { children: [
|
|
55876
55897
|
node.children.map((child, i) => {
|
|
55877
55898
|
const childR = Math.max(
|
|
55878
55899
|
child.type === "operator" ? 20 : 16,
|
|
@@ -55929,7 +55950,7 @@ var AvlExprTree = ({
|
|
|
55929
55950
|
className,
|
|
55930
55951
|
color = "var(--color-primary)"
|
|
55931
55952
|
}) => {
|
|
55932
|
-
const ids =
|
|
55953
|
+
const ids = React114__default.useMemo(() => {
|
|
55933
55954
|
avlEtId += 1;
|
|
55934
55955
|
return { glow: `avl-et-${avlEtId}-glow` };
|
|
55935
55956
|
}, []);
|
|
@@ -56764,7 +56785,7 @@ var SystemNode = ({ data }) => {
|
|
|
56764
56785
|
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) => {
|
|
56765
56786
|
const tc = transitionCounts[s.name] ?? 0;
|
|
56766
56787
|
const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
56767
|
-
return /* @__PURE__ */ jsxs(
|
|
56788
|
+
return /* @__PURE__ */ jsxs(React114__default.Fragment, { children: [
|
|
56768
56789
|
/* @__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 }),
|
|
56769
56790
|
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 })
|
|
56770
56791
|
] }, s.name);
|
|
@@ -57909,7 +57930,7 @@ function resolveLambdaBindings(body, params, item, index) {
|
|
|
57909
57930
|
if (Array.isArray(body)) {
|
|
57910
57931
|
return body.map((b) => recur(b));
|
|
57911
57932
|
}
|
|
57912
|
-
if (body !== null && typeof body === "object" && !
|
|
57933
|
+
if (body !== null && typeof body === "object" && !React114__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
57913
57934
|
const out = {};
|
|
57914
57935
|
for (const [k, v] of Object.entries(body)) {
|
|
57915
57936
|
out[k] = recur(v);
|
|
@@ -57928,7 +57949,7 @@ function getSlotContentRenderer4() {
|
|
|
57928
57949
|
function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
57929
57950
|
return (item, index) => {
|
|
57930
57951
|
const resolvedBody = resolveLambdaBindings(lambdaBody, params, item, index);
|
|
57931
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
57952
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React114__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
57932
57953
|
return null;
|
|
57933
57954
|
}
|
|
57934
57955
|
const record = resolvedBody;
|
|
@@ -57947,7 +57968,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
57947
57968
|
props: childProps,
|
|
57948
57969
|
priority: 0
|
|
57949
57970
|
};
|
|
57950
|
-
return
|
|
57971
|
+
return React114__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
57951
57972
|
};
|
|
57952
57973
|
}
|
|
57953
57974
|
function convertNode(node, callerKey) {
|
|
@@ -57966,7 +57987,7 @@ function convertNode(node, callerKey) {
|
|
|
57966
57987
|
});
|
|
57967
57988
|
return anyChanged ? mapped : node;
|
|
57968
57989
|
}
|
|
57969
|
-
if (typeof node === "object" && !
|
|
57990
|
+
if (typeof node === "object" && !React114__default.isValidElement(node) && !(node instanceof Date)) {
|
|
57970
57991
|
return convertObjectProps(node);
|
|
57971
57992
|
}
|
|
57972
57993
|
return node;
|
|
@@ -59629,8 +59650,8 @@ function CanvasDndProvider({
|
|
|
59629
59650
|
}) {
|
|
59630
59651
|
const eventBus = useEventBus();
|
|
59631
59652
|
const sensors = useAlmadarDndSensors(false);
|
|
59632
|
-
const [activePayload, setActivePayload] =
|
|
59633
|
-
const handleDragStart =
|
|
59653
|
+
const [activePayload, setActivePayload] = React114__default.useState(null);
|
|
59654
|
+
const handleDragStart = React114__default.useCallback((e) => {
|
|
59634
59655
|
const data = e.active.data.current;
|
|
59635
59656
|
const payload = data?.payload;
|
|
59636
59657
|
if (payload) {
|
|
@@ -59641,7 +59662,7 @@ function CanvasDndProvider({
|
|
|
59641
59662
|
log9.warn("dragStart:missing-payload", { id: e.active.id });
|
|
59642
59663
|
}
|
|
59643
59664
|
}, [eventBus]);
|
|
59644
|
-
const handleDragEnd =
|
|
59665
|
+
const handleDragEnd = React114__default.useCallback((e) => {
|
|
59645
59666
|
setActivePayload(null);
|
|
59646
59667
|
const activeData = e.active.data.current;
|
|
59647
59668
|
const payload = activeData?.payload;
|
|
@@ -59670,7 +59691,7 @@ function CanvasDndProvider({
|
|
|
59670
59691
|
const suppressed = onDrop ? onDrop(drop) === true : false;
|
|
59671
59692
|
if (!suppressed) defaultEmit(eventBus, drop);
|
|
59672
59693
|
}, [eventBus, onDrop]);
|
|
59673
|
-
const handleDragCancel =
|
|
59694
|
+
const handleDragCancel = React114__default.useCallback(() => {
|
|
59674
59695
|
setActivePayload(null);
|
|
59675
59696
|
log9.info("dragCancel");
|
|
59676
59697
|
}, []);
|
|
@@ -60428,7 +60449,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
60428
60449
|
}
|
|
60429
60450
|
);
|
|
60430
60451
|
};
|
|
60431
|
-
var OrbPreviewNode =
|
|
60452
|
+
var OrbPreviewNode = React114__default.memo(OrbPreviewNodeInner);
|
|
60432
60453
|
OrbPreviewNode.displayName = "OrbPreviewNode";
|
|
60433
60454
|
orbPreviewLog.debug("export-resolved", () => ({
|
|
60434
60455
|
type: typeof OrbPreviewNode,
|
|
@@ -60533,7 +60554,7 @@ var EventFlowEdgeInner = (props) => {
|
|
|
60533
60554
|
) })
|
|
60534
60555
|
] });
|
|
60535
60556
|
};
|
|
60536
|
-
var EventFlowEdge =
|
|
60557
|
+
var EventFlowEdge = React114__default.memo(EventFlowEdgeInner);
|
|
60537
60558
|
EventFlowEdge.displayName = "EventFlowEdge";
|
|
60538
60559
|
|
|
60539
60560
|
// components/avl/molecules/BehaviorComposeNode.tsx
|
|
@@ -60680,7 +60701,7 @@ var BehaviorComposeNodeInner = (props) => {
|
|
|
60680
60701
|
}
|
|
60681
60702
|
);
|
|
60682
60703
|
};
|
|
60683
|
-
var BehaviorComposeNode =
|
|
60704
|
+
var BehaviorComposeNode = React114__default.memo(BehaviorComposeNodeInner);
|
|
60684
60705
|
BehaviorComposeNode.displayName = "BehaviorComposeNode";
|
|
60685
60706
|
|
|
60686
60707
|
// components/avl/lib/avl-behavior-compose-converter.ts
|
|
@@ -61706,7 +61727,7 @@ var TraitCardNodeInner = (props) => {
|
|
|
61706
61727
|
}
|
|
61707
61728
|
);
|
|
61708
61729
|
};
|
|
61709
|
-
var TraitCardNode =
|
|
61730
|
+
var TraitCardNode = React114__default.memo(TraitCardNodeInner);
|
|
61710
61731
|
TraitCardNode.displayName = "TraitCardNode";
|
|
61711
61732
|
|
|
61712
61733
|
// components/avl/organisms/FlowCanvas.tsx
|
|
@@ -61779,7 +61800,7 @@ function FlowCanvasInner({
|
|
|
61779
61800
|
initialOrbital
|
|
61780
61801
|
);
|
|
61781
61802
|
const [expandedBehaviorAlias, setExpandedBehaviorAlias] = useState(void 0);
|
|
61782
|
-
const screenSizeUserOverrideRef =
|
|
61803
|
+
const screenSizeUserOverrideRef = React114__default.useRef(false);
|
|
61783
61804
|
const [screenSize, setScreenSize] = useState(
|
|
61784
61805
|
() => typeof window === "undefined" ? "laptop" : detectScreenSize(window.innerWidth)
|
|
61785
61806
|
);
|
|
@@ -62163,7 +62184,7 @@ var ZoomBreadcrumb = ({
|
|
|
62163
62184
|
if (eventName && band === "detail") {
|
|
62164
62185
|
segments.push({ icon: "\u26A1", label: eventName });
|
|
62165
62186
|
}
|
|
62166
|
-
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(
|
|
62187
|
+
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(React114__default.Fragment, { children: [
|
|
62167
62188
|
i > 0 && /* @__PURE__ */ jsx("span", { className: "opacity-40", children: ">" }),
|
|
62168
62189
|
/* @__PURE__ */ jsx("span", { className: "opacity-60", children: seg.icon }),
|
|
62169
62190
|
/* @__PURE__ */ jsx("span", { children: seg.label })
|
|
@@ -62504,7 +62525,7 @@ var EventWireOverlay = ({
|
|
|
62504
62525
|
containerW,
|
|
62505
62526
|
containerH
|
|
62506
62527
|
}) => {
|
|
62507
|
-
const ids =
|
|
62528
|
+
const ids = React114__default.useMemo(() => {
|
|
62508
62529
|
avlOczWireId += 1;
|
|
62509
62530
|
return { arrow: `avl-ocz-wire-${avlOczWireId}-arrow` };
|
|
62510
62531
|
}, []);
|
|
@@ -62871,7 +62892,7 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
62871
62892
|
borderRadius: 6,
|
|
62872
62893
|
border: `1px solid ${color}`
|
|
62873
62894
|
},
|
|
62874
|
-
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(
|
|
62895
|
+
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React114__default.Fragment, { children: [
|
|
62875
62896
|
i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", style: { opacity: 0.5, color }, children: "/" }),
|
|
62876
62897
|
i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
|
|
62877
62898
|
Box,
|