@almadar/ui 5.22.3 → 5.24.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 +1432 -1361
- package/dist/avl/index.js +366 -295
- package/dist/components/core/molecules/AssetPicker.d.ts +21 -0
- package/dist/components/core/molecules/CodeViewer.d.ts +3 -2
- package/dist/components/core/molecules/DocCodeBlock.d.ts +2 -1
- package/dist/components/core/molecules/GridPicker.d.ts +44 -0
- package/dist/components/core/molecules/IconPicker.d.ts +18 -0
- package/dist/components/core/molecules/PropertyInspector.d.ts +28 -0
- package/dist/components/core/molecules/RichBlockEditor.d.ts +7 -0
- package/dist/components/core/molecules/index.d.ts +5 -1
- package/dist/components/core/molecules/markdown/CodeBlock.d.ts +15 -1
- package/dist/components/core/molecules/markdown/index.d.ts +1 -1
- package/dist/components/index.cjs +1711 -1197
- package/dist/components/index.js +810 -296
- package/dist/docs/index.d.cts +20 -1
- package/dist/marketing/index.cjs +8 -5
- package/dist/marketing/index.js +8 -5
- package/dist/providers/index.cjs +1257 -1186
- package/dist/providers/index.js +342 -271
- package/dist/runtime/index.cjs +1297 -1226
- package/dist/runtime/index.js +346 -275
- package/package.json +2 -2
package/dist/avl/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
2
|
+
import * as React95 from 'react';
|
|
3
|
+
import React95__default, { createContext, useState, useMemo, useRef, useEffect, useContext, useCallback, Suspense, useLayoutEffect, Profiler, useReducer, useSyncExternalStore, lazy, useId } from 'react';
|
|
4
4
|
import { OrbitalProvider, EventBusContext, useTraitScope, VerificationProvider, TraitScopeProvider } from '@almadar/ui/providers';
|
|
5
5
|
import { createLogger, isLogLevelEnabled } from '@almadar/logger';
|
|
6
6
|
import ELK from 'elkjs/lib/elk.bundled.js';
|
|
@@ -3509,7 +3509,7 @@ var init_Box = __esm({
|
|
|
3509
3509
|
fixed: "fixed",
|
|
3510
3510
|
sticky: "sticky"
|
|
3511
3511
|
};
|
|
3512
|
-
Box =
|
|
3512
|
+
Box = React95__default.forwardRef(
|
|
3513
3513
|
({
|
|
3514
3514
|
padding,
|
|
3515
3515
|
paddingX,
|
|
@@ -3559,7 +3559,7 @@ var init_Box = __esm({
|
|
|
3559
3559
|
onMouseLeave?.(e);
|
|
3560
3560
|
}, [hoverEvent, eventBus, onMouseLeave]);
|
|
3561
3561
|
const isClickable = action || onClick;
|
|
3562
|
-
return
|
|
3562
|
+
return React95__default.createElement(
|
|
3563
3563
|
Component,
|
|
3564
3564
|
{
|
|
3565
3565
|
ref,
|
|
@@ -4149,7 +4149,7 @@ var init_MiniStateMachine = __esm({
|
|
|
4149
4149
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
4150
4150
|
const tc = transitionCounts[s.name] ?? 0;
|
|
4151
4151
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
4152
|
-
return /* @__PURE__ */ jsxs(
|
|
4152
|
+
return /* @__PURE__ */ jsxs(React95__default.Fragment, { children: [
|
|
4153
4153
|
/* @__PURE__ */ jsx(
|
|
4154
4154
|
AvlState,
|
|
4155
4155
|
{
|
|
@@ -5212,7 +5212,7 @@ var init_Icon = __esm({
|
|
|
5212
5212
|
const directIcon = typeof icon === "string" ? void 0 : icon;
|
|
5213
5213
|
const effectiveName = typeof icon === "string" ? icon : name;
|
|
5214
5214
|
const family = useIconFamily();
|
|
5215
|
-
const RenderedComponent =
|
|
5215
|
+
const RenderedComponent = React95__default.useMemo(() => {
|
|
5216
5216
|
if (directIcon) return null;
|
|
5217
5217
|
return effectiveName ? resolveIconForFamily(effectiveName, family) : null;
|
|
5218
5218
|
}, [directIcon, effectiveName, family]);
|
|
@@ -5270,7 +5270,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
5270
5270
|
const IconComp = value;
|
|
5271
5271
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
5272
5272
|
}
|
|
5273
|
-
if (
|
|
5273
|
+
if (React95__default.isValidElement(value)) {
|
|
5274
5274
|
return value;
|
|
5275
5275
|
}
|
|
5276
5276
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -5346,7 +5346,7 @@ var init_Button = __esm({
|
|
|
5346
5346
|
md: "h-icon-default w-icon-default",
|
|
5347
5347
|
lg: "h-icon-default w-icon-default"
|
|
5348
5348
|
};
|
|
5349
|
-
Button =
|
|
5349
|
+
Button = React95__default.forwardRef(
|
|
5350
5350
|
({
|
|
5351
5351
|
className,
|
|
5352
5352
|
variant = "primary",
|
|
@@ -5411,7 +5411,7 @@ var Dialog;
|
|
|
5411
5411
|
var init_Dialog = __esm({
|
|
5412
5412
|
"components/core/atoms/Dialog.tsx"() {
|
|
5413
5413
|
init_cn();
|
|
5414
|
-
Dialog =
|
|
5414
|
+
Dialog = React95__default.forwardRef(
|
|
5415
5415
|
({
|
|
5416
5416
|
role = "dialog",
|
|
5417
5417
|
"aria-modal": ariaModal = true,
|
|
@@ -5775,7 +5775,7 @@ var init_Drawer = __esm({
|
|
|
5775
5775
|
};
|
|
5776
5776
|
const widthClass = width in sizeWidths ? sizeWidths[width] : "";
|
|
5777
5777
|
const widthStyle = width in sizeWidths ? void 0 : { width };
|
|
5778
|
-
const
|
|
5778
|
+
const positionClasses = position === "right" ? "right-0 border-l" : "left-0 border-r";
|
|
5779
5779
|
const animationClasses2 = position === "right" ? "animate-slide-in-right" : "animate-slide-in-left";
|
|
5780
5780
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5781
5781
|
/* @__PURE__ */ jsx(
|
|
@@ -5796,7 +5796,7 @@ var init_Drawer = __esm({
|
|
|
5796
5796
|
className: cn(
|
|
5797
5797
|
"fixed top-0 bottom-0 z-50",
|
|
5798
5798
|
"flex flex-col max-h-screen",
|
|
5799
|
-
|
|
5799
|
+
positionClasses,
|
|
5800
5800
|
widthClass,
|
|
5801
5801
|
animationClasses2,
|
|
5802
5802
|
className
|
|
@@ -5914,7 +5914,7 @@ var init_Badge = __esm({
|
|
|
5914
5914
|
md: "px-2.5 py-1 text-sm",
|
|
5915
5915
|
lg: "px-3 py-1.5 text-base"
|
|
5916
5916
|
};
|
|
5917
|
-
Badge =
|
|
5917
|
+
Badge = React95__default.forwardRef(
|
|
5918
5918
|
({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
|
|
5919
5919
|
const iconSizes3 = {
|
|
5920
5920
|
sm: "h-icon-default w-icon-default",
|
|
@@ -6230,7 +6230,7 @@ var init_SvgFlow = __esm({
|
|
|
6230
6230
|
opacity = 1,
|
|
6231
6231
|
className
|
|
6232
6232
|
}) => {
|
|
6233
|
-
const markerId =
|
|
6233
|
+
const markerId = React95__default.useMemo(() => {
|
|
6234
6234
|
flowIdCounter += 1;
|
|
6235
6235
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
6236
6236
|
}, []);
|
|
@@ -6773,7 +6773,7 @@ var init_SvgRing = __esm({
|
|
|
6773
6773
|
className,
|
|
6774
6774
|
label
|
|
6775
6775
|
}) => {
|
|
6776
|
-
const gradientId =
|
|
6776
|
+
const gradientId = React95__default.useMemo(() => {
|
|
6777
6777
|
ringIdCounter += 1;
|
|
6778
6778
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
6779
6779
|
}, []);
|
|
@@ -6935,7 +6935,7 @@ var init_Input = __esm({
|
|
|
6935
6935
|
"components/core/atoms/Input.tsx"() {
|
|
6936
6936
|
init_cn();
|
|
6937
6937
|
init_Icon();
|
|
6938
|
-
Input =
|
|
6938
|
+
Input = React95__default.forwardRef(
|
|
6939
6939
|
({
|
|
6940
6940
|
className,
|
|
6941
6941
|
inputType,
|
|
@@ -7056,7 +7056,7 @@ var Label;
|
|
|
7056
7056
|
var init_Label = __esm({
|
|
7057
7057
|
"components/core/atoms/Label.tsx"() {
|
|
7058
7058
|
init_cn();
|
|
7059
|
-
Label =
|
|
7059
|
+
Label = React95__default.forwardRef(
|
|
7060
7060
|
({ className, required, children, ...props }, ref) => {
|
|
7061
7061
|
return /* @__PURE__ */ jsxs(
|
|
7062
7062
|
"label",
|
|
@@ -7082,7 +7082,7 @@ var Textarea;
|
|
|
7082
7082
|
var init_Textarea = __esm({
|
|
7083
7083
|
"components/core/atoms/Textarea.tsx"() {
|
|
7084
7084
|
init_cn();
|
|
7085
|
-
Textarea =
|
|
7085
|
+
Textarea = React95__default.forwardRef(
|
|
7086
7086
|
({ className, error, ...props }, ref) => {
|
|
7087
7087
|
return /* @__PURE__ */ jsx(
|
|
7088
7088
|
"textarea",
|
|
@@ -7112,7 +7112,7 @@ var init_Select = __esm({
|
|
|
7112
7112
|
"components/core/atoms/Select.tsx"() {
|
|
7113
7113
|
init_cn();
|
|
7114
7114
|
init_Icon();
|
|
7115
|
-
Select =
|
|
7115
|
+
Select = React95__default.forwardRef(
|
|
7116
7116
|
({ className, options, placeholder, error, ...props }, ref) => {
|
|
7117
7117
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
7118
7118
|
/* @__PURE__ */ jsxs(
|
|
@@ -7154,7 +7154,7 @@ var Checkbox;
|
|
|
7154
7154
|
var init_Checkbox = __esm({
|
|
7155
7155
|
"components/core/atoms/Checkbox.tsx"() {
|
|
7156
7156
|
init_cn();
|
|
7157
|
-
Checkbox =
|
|
7157
|
+
Checkbox = React95__default.forwardRef(
|
|
7158
7158
|
({ className, label, id, ...props }, ref) => {
|
|
7159
7159
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
7160
7160
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
@@ -7245,7 +7245,7 @@ var init_Card = __esm({
|
|
|
7245
7245
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
7246
7246
|
"tile-image-first": "p-0 overflow-hidden"
|
|
7247
7247
|
};
|
|
7248
|
-
Card =
|
|
7248
|
+
Card = React95__default.forwardRef(
|
|
7249
7249
|
({
|
|
7250
7250
|
className,
|
|
7251
7251
|
variant = "bordered",
|
|
@@ -7283,9 +7283,9 @@ var init_Card = __esm({
|
|
|
7283
7283
|
}
|
|
7284
7284
|
);
|
|
7285
7285
|
Card.displayName = "Card";
|
|
7286
|
-
CardHeader =
|
|
7286
|
+
CardHeader = React95__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
7287
7287
|
CardHeader.displayName = "CardHeader";
|
|
7288
|
-
CardTitle =
|
|
7288
|
+
CardTitle = React95__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7289
7289
|
"h3",
|
|
7290
7290
|
{
|
|
7291
7291
|
ref,
|
|
@@ -7298,11 +7298,11 @@ var init_Card = __esm({
|
|
|
7298
7298
|
}
|
|
7299
7299
|
));
|
|
7300
7300
|
CardTitle.displayName = "CardTitle";
|
|
7301
|
-
CardContent =
|
|
7301
|
+
CardContent = React95__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
7302
7302
|
CardContent.displayName = "CardContent";
|
|
7303
7303
|
CardBody = CardContent;
|
|
7304
7304
|
CardBody.displayName = "CardBody";
|
|
7305
|
-
CardFooter =
|
|
7305
|
+
CardFooter = React95__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7306
7306
|
"div",
|
|
7307
7307
|
{
|
|
7308
7308
|
ref,
|
|
@@ -7357,7 +7357,7 @@ var init_FilterPill = __esm({
|
|
|
7357
7357
|
md: "w-3.5 h-3.5",
|
|
7358
7358
|
lg: "w-4 h-4"
|
|
7359
7359
|
};
|
|
7360
|
-
FilterPill =
|
|
7360
|
+
FilterPill = React95__default.forwardRef(
|
|
7361
7361
|
({
|
|
7362
7362
|
className,
|
|
7363
7363
|
variant = "default",
|
|
@@ -7434,7 +7434,7 @@ var init_Spinner = __esm({
|
|
|
7434
7434
|
md: "h-6 w-6",
|
|
7435
7435
|
lg: "h-8 w-8"
|
|
7436
7436
|
};
|
|
7437
|
-
Spinner =
|
|
7437
|
+
Spinner = React95__default.forwardRef(
|
|
7438
7438
|
({ className, size = "md", ...props }, ref) => {
|
|
7439
7439
|
return /* @__PURE__ */ jsx(
|
|
7440
7440
|
"div",
|
|
@@ -7513,11 +7513,15 @@ var init_Avatar = __esm({
|
|
|
7513
7513
|
actionPayload
|
|
7514
7514
|
}) => {
|
|
7515
7515
|
const eventBus = useEventBus();
|
|
7516
|
+
const [imgFailed, setImgFailed] = React95__default.useState(false);
|
|
7517
|
+
React95__default.useEffect(() => {
|
|
7518
|
+
setImgFailed(false);
|
|
7519
|
+
}, [src]);
|
|
7516
7520
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
7517
7521
|
const IconComponent = typeof iconProp === "string" ? resolveIcon(iconProp) : iconProp;
|
|
7518
|
-
const hasImage = !!src;
|
|
7519
|
-
const hasInitials = !!initials;
|
|
7522
|
+
const hasImage = !!src && !imgFailed;
|
|
7520
7523
|
const hasIcon = !!IconComponent;
|
|
7524
|
+
const hasInitials = !!initials && !(hasIcon && !providedInitials);
|
|
7521
7525
|
const getInitialsBackground = () => "bg-primary text-primary-foreground";
|
|
7522
7526
|
const isClickable = action || onClick;
|
|
7523
7527
|
const handleClick = () => {
|
|
@@ -7547,9 +7551,8 @@ var init_Avatar = __esm({
|
|
|
7547
7551
|
src,
|
|
7548
7552
|
alt: alt || "Avatar",
|
|
7549
7553
|
className: "w-full h-full object-cover",
|
|
7550
|
-
onError: (
|
|
7551
|
-
|
|
7552
|
-
target.style.display = "none";
|
|
7554
|
+
onError: () => {
|
|
7555
|
+
setImgFailed(true);
|
|
7553
7556
|
}
|
|
7554
7557
|
}
|
|
7555
7558
|
) : hasInitials ? /* @__PURE__ */ jsx(
|
|
@@ -7896,7 +7899,7 @@ var init_Radio = __esm({
|
|
|
7896
7899
|
md: "w-2.5 h-2.5",
|
|
7897
7900
|
lg: "w-3 h-3"
|
|
7898
7901
|
};
|
|
7899
|
-
Radio =
|
|
7902
|
+
Radio = React95__default.forwardRef(
|
|
7900
7903
|
({
|
|
7901
7904
|
label,
|
|
7902
7905
|
helperText,
|
|
@@ -7913,12 +7916,12 @@ var init_Radio = __esm({
|
|
|
7913
7916
|
onChange,
|
|
7914
7917
|
...props
|
|
7915
7918
|
}, ref) => {
|
|
7916
|
-
const reactId =
|
|
7919
|
+
const reactId = React95__default.useId();
|
|
7917
7920
|
const baseId = id || `radio-${reactId}`;
|
|
7918
7921
|
const hasError = !!error;
|
|
7919
7922
|
const eventBus = useEventBus();
|
|
7920
|
-
const [selected, setSelected] =
|
|
7921
|
-
|
|
7923
|
+
const [selected, setSelected] = React95__default.useState(value);
|
|
7924
|
+
React95__default.useEffect(() => {
|
|
7922
7925
|
if (value !== void 0) setSelected(value);
|
|
7923
7926
|
}, [value]);
|
|
7924
7927
|
const pick = (next, e) => {
|
|
@@ -8100,7 +8103,7 @@ var init_Switch = __esm({
|
|
|
8100
8103
|
"components/core/atoms/Switch.tsx"() {
|
|
8101
8104
|
"use client";
|
|
8102
8105
|
init_cn();
|
|
8103
|
-
Switch =
|
|
8106
|
+
Switch = React95.forwardRef(
|
|
8104
8107
|
({
|
|
8105
8108
|
checked,
|
|
8106
8109
|
defaultChecked = false,
|
|
@@ -8111,10 +8114,10 @@ var init_Switch = __esm({
|
|
|
8111
8114
|
name,
|
|
8112
8115
|
className
|
|
8113
8116
|
}, ref) => {
|
|
8114
|
-
const [isChecked, setIsChecked] =
|
|
8117
|
+
const [isChecked, setIsChecked] = React95.useState(
|
|
8115
8118
|
checked !== void 0 ? checked : defaultChecked
|
|
8116
8119
|
);
|
|
8117
|
-
|
|
8120
|
+
React95.useEffect(() => {
|
|
8118
8121
|
if (checked !== void 0) {
|
|
8119
8122
|
setIsChecked(checked);
|
|
8120
8123
|
}
|
|
@@ -8559,7 +8562,7 @@ var Aside;
|
|
|
8559
8562
|
var init_Aside = __esm({
|
|
8560
8563
|
"components/core/atoms/Aside.tsx"() {
|
|
8561
8564
|
init_cn();
|
|
8562
|
-
Aside =
|
|
8565
|
+
Aside = React95__default.forwardRef(
|
|
8563
8566
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
8564
8567
|
);
|
|
8565
8568
|
Aside.displayName = "Aside";
|
|
@@ -8637,8 +8640,8 @@ var init_LawReferenceTooltip = __esm({
|
|
|
8637
8640
|
className
|
|
8638
8641
|
}) => {
|
|
8639
8642
|
const { t } = useTranslate();
|
|
8640
|
-
const [isVisible, setIsVisible] =
|
|
8641
|
-
const timeoutRef =
|
|
8643
|
+
const [isVisible, setIsVisible] = React95__default.useState(false);
|
|
8644
|
+
const timeoutRef = React95__default.useRef(null);
|
|
8642
8645
|
const handleMouseEnter = () => {
|
|
8643
8646
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
8644
8647
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -8647,7 +8650,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
8647
8650
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
8648
8651
|
setIsVisible(false);
|
|
8649
8652
|
};
|
|
8650
|
-
|
|
8653
|
+
React95__default.useEffect(() => {
|
|
8651
8654
|
return () => {
|
|
8652
8655
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
8653
8656
|
};
|
|
@@ -8857,7 +8860,7 @@ var init_StatusDot = __esm({
|
|
|
8857
8860
|
md: "w-2.5 h-2.5",
|
|
8858
8861
|
lg: "w-3 h-3"
|
|
8859
8862
|
};
|
|
8860
|
-
StatusDot =
|
|
8863
|
+
StatusDot = React95__default.forwardRef(
|
|
8861
8864
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
8862
8865
|
return /* @__PURE__ */ jsx(
|
|
8863
8866
|
"span",
|
|
@@ -8911,7 +8914,7 @@ var init_TrendIndicator = __esm({
|
|
|
8911
8914
|
down: "trending-down",
|
|
8912
8915
|
flat: "arrow-right"
|
|
8913
8916
|
};
|
|
8914
|
-
TrendIndicator =
|
|
8917
|
+
TrendIndicator = React95__default.forwardRef(
|
|
8915
8918
|
({
|
|
8916
8919
|
className,
|
|
8917
8920
|
value,
|
|
@@ -8978,7 +8981,7 @@ var init_RangeSlider = __esm({
|
|
|
8978
8981
|
md: "w-4 h-4",
|
|
8979
8982
|
lg: "w-5 h-5"
|
|
8980
8983
|
};
|
|
8981
|
-
RangeSlider =
|
|
8984
|
+
RangeSlider = React95__default.forwardRef(
|
|
8982
8985
|
({
|
|
8983
8986
|
className,
|
|
8984
8987
|
min = 0,
|
|
@@ -9486,7 +9489,7 @@ var init_ContentSection = __esm({
|
|
|
9486
9489
|
md: "py-16",
|
|
9487
9490
|
lg: "py-24"
|
|
9488
9491
|
};
|
|
9489
|
-
ContentSection =
|
|
9492
|
+
ContentSection = React95__default.forwardRef(
|
|
9490
9493
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
9491
9494
|
return /* @__PURE__ */ jsx(
|
|
9492
9495
|
Box,
|
|
@@ -10020,7 +10023,7 @@ var init_AnimatedReveal = __esm({
|
|
|
10020
10023
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
10021
10024
|
"none": {}
|
|
10022
10025
|
};
|
|
10023
|
-
AnimatedReveal =
|
|
10026
|
+
AnimatedReveal = React95__default.forwardRef(
|
|
10024
10027
|
({
|
|
10025
10028
|
trigger = "scroll",
|
|
10026
10029
|
animation = "fade-up",
|
|
@@ -10180,7 +10183,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
10180
10183
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
10181
10184
|
"use client";
|
|
10182
10185
|
init_cn();
|
|
10183
|
-
AnimatedGraphic =
|
|
10186
|
+
AnimatedGraphic = React95__default.forwardRef(
|
|
10184
10187
|
({
|
|
10185
10188
|
src,
|
|
10186
10189
|
svgContent,
|
|
@@ -10203,7 +10206,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
10203
10206
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
10204
10207
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
10205
10208
|
const prevAnimateRef = useRef(animate);
|
|
10206
|
-
const setRef =
|
|
10209
|
+
const setRef = React95__default.useCallback(
|
|
10207
10210
|
(node) => {
|
|
10208
10211
|
containerRef.current = node;
|
|
10209
10212
|
if (typeof ref === "function") ref(node);
|
|
@@ -10428,9 +10431,9 @@ function ScoreDisplay({
|
|
|
10428
10431
|
...rest
|
|
10429
10432
|
}) {
|
|
10430
10433
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
|
|
10431
|
-
const [displayValue, setDisplayValue] =
|
|
10432
|
-
const [isAnimating, setIsAnimating] =
|
|
10433
|
-
|
|
10434
|
+
const [displayValue, setDisplayValue] = React95.useState(resolvedValue);
|
|
10435
|
+
const [isAnimating, setIsAnimating] = React95.useState(false);
|
|
10436
|
+
React95.useEffect(() => {
|
|
10434
10437
|
if (!animated || displayValue === resolvedValue) {
|
|
10435
10438
|
setDisplayValue(resolvedValue);
|
|
10436
10439
|
return;
|
|
@@ -10500,9 +10503,9 @@ function ControlButton({
|
|
|
10500
10503
|
className
|
|
10501
10504
|
}) {
|
|
10502
10505
|
const eventBus = useEventBus();
|
|
10503
|
-
const [isPressed, setIsPressed] =
|
|
10506
|
+
const [isPressed, setIsPressed] = React95.useState(false);
|
|
10504
10507
|
const actualPressed = pressed ?? isPressed;
|
|
10505
|
-
const handlePointerDown =
|
|
10508
|
+
const handlePointerDown = React95.useCallback(
|
|
10506
10509
|
(e) => {
|
|
10507
10510
|
e.preventDefault();
|
|
10508
10511
|
if (disabled) return;
|
|
@@ -10512,7 +10515,7 @@ function ControlButton({
|
|
|
10512
10515
|
},
|
|
10513
10516
|
[disabled, pressEvent, eventBus, onPress]
|
|
10514
10517
|
);
|
|
10515
|
-
const handlePointerUp =
|
|
10518
|
+
const handlePointerUp = React95.useCallback(
|
|
10516
10519
|
(e) => {
|
|
10517
10520
|
e.preventDefault();
|
|
10518
10521
|
if (disabled) return;
|
|
@@ -10522,7 +10525,7 @@ function ControlButton({
|
|
|
10522
10525
|
},
|
|
10523
10526
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
10524
10527
|
);
|
|
10525
|
-
const handlePointerLeave =
|
|
10528
|
+
const handlePointerLeave = React95.useCallback(
|
|
10526
10529
|
(e) => {
|
|
10527
10530
|
if (isPressed) {
|
|
10528
10531
|
setIsPressed(false);
|
|
@@ -11011,13 +11014,22 @@ function XPBar({
|
|
|
11011
11014
|
}) {
|
|
11012
11015
|
const sizes = sizeMap9[size];
|
|
11013
11016
|
const percentage = max > 0 ? Math.max(0, Math.min(100, current / max * 100)) : 0;
|
|
11017
|
+
const [fillWidth, setFillWidth] = React95.useState(animated ? 0 : percentage);
|
|
11018
|
+
React95.useEffect(() => {
|
|
11019
|
+
if (!animated) {
|
|
11020
|
+
setFillWidth(percentage);
|
|
11021
|
+
return;
|
|
11022
|
+
}
|
|
11023
|
+
const frame = requestAnimationFrame(() => setFillWidth(percentage));
|
|
11024
|
+
return () => cancelAnimationFrame(frame);
|
|
11025
|
+
}, [animated, percentage]);
|
|
11014
11026
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-2", className), children: [
|
|
11015
11027
|
level != null && /* @__PURE__ */ jsxs(
|
|
11016
11028
|
"span",
|
|
11017
11029
|
{
|
|
11018
11030
|
className: cn(
|
|
11019
11031
|
"flex-shrink-0 rounded-interactive font-bold",
|
|
11020
|
-
"bg-accent text-foreground border border-accent",
|
|
11032
|
+
"bg-accent text-accent-foreground border border-accent",
|
|
11021
11033
|
sizes.badge
|
|
11022
11034
|
),
|
|
11023
11035
|
children: [
|
|
@@ -11042,7 +11054,7 @@ function XPBar({
|
|
|
11042
11054
|
"bg-gradient-to-r from-accent to-info",
|
|
11043
11055
|
animated && "transition-all duration-500 ease-out"
|
|
11044
11056
|
),
|
|
11045
|
-
style: { width: `${
|
|
11057
|
+
style: { width: `${fillWidth}%` }
|
|
11046
11058
|
}
|
|
11047
11059
|
)
|
|
11048
11060
|
}
|
|
@@ -11059,6 +11071,7 @@ function XPBar({
|
|
|
11059
11071
|
var sizeMap9;
|
|
11060
11072
|
var init_XPBar = __esm({
|
|
11061
11073
|
"components/game/atoms/XPBar.tsx"() {
|
|
11074
|
+
"use client";
|
|
11062
11075
|
init_cn();
|
|
11063
11076
|
sizeMap9 = {
|
|
11064
11077
|
sm: { bar: "h-2", text: "text-xs", badge: "text-xs px-1.5 py-0.5" },
|
|
@@ -11428,9 +11441,9 @@ function MiniMap({
|
|
|
11428
11441
|
viewportRect,
|
|
11429
11442
|
className
|
|
11430
11443
|
}) {
|
|
11431
|
-
const canvasRef =
|
|
11432
|
-
const frameRef =
|
|
11433
|
-
|
|
11444
|
+
const canvasRef = React95.useRef(null);
|
|
11445
|
+
const frameRef = React95.useRef(0);
|
|
11446
|
+
React95.useEffect(() => {
|
|
11434
11447
|
const canvas = canvasRef.current;
|
|
11435
11448
|
if (!canvas) return;
|
|
11436
11449
|
const ctx = canvas.getContext("2d");
|
|
@@ -11604,7 +11617,7 @@ var init_ErrorBoundary = __esm({
|
|
|
11604
11617
|
}
|
|
11605
11618
|
);
|
|
11606
11619
|
};
|
|
11607
|
-
ErrorBoundary = class extends
|
|
11620
|
+
ErrorBoundary = class extends React95__default.Component {
|
|
11608
11621
|
constructor(props) {
|
|
11609
11622
|
super(props);
|
|
11610
11623
|
__publicField(this, "reset", () => {
|
|
@@ -12604,18 +12617,42 @@ var init_Alert = __esm({
|
|
|
12604
12617
|
Alert.displayName = "Alert";
|
|
12605
12618
|
}
|
|
12606
12619
|
});
|
|
12607
|
-
|
|
12620
|
+
function computeTooltipStyle(position, triggerRect) {
|
|
12621
|
+
switch (position) {
|
|
12622
|
+
case "bottom":
|
|
12623
|
+
return {
|
|
12624
|
+
left: triggerRect.left + triggerRect.width / 2,
|
|
12625
|
+
top: triggerRect.bottom + TRIGGER_GAP,
|
|
12626
|
+
transform: "translateX(-50%)"
|
|
12627
|
+
};
|
|
12628
|
+
case "left":
|
|
12629
|
+
return {
|
|
12630
|
+
left: triggerRect.left - TRIGGER_GAP,
|
|
12631
|
+
top: triggerRect.top + triggerRect.height / 2,
|
|
12632
|
+
transform: "translate(-100%, -50%)"
|
|
12633
|
+
};
|
|
12634
|
+
case "right":
|
|
12635
|
+
return {
|
|
12636
|
+
left: triggerRect.right + TRIGGER_GAP,
|
|
12637
|
+
top: triggerRect.top + triggerRect.height / 2,
|
|
12638
|
+
transform: "translateY(-50%)"
|
|
12639
|
+
};
|
|
12640
|
+
case "top":
|
|
12641
|
+
default:
|
|
12642
|
+
return {
|
|
12643
|
+
left: triggerRect.left + triggerRect.width / 2,
|
|
12644
|
+
top: triggerRect.top - TRIGGER_GAP,
|
|
12645
|
+
transform: "translate(-50%, -100%)"
|
|
12646
|
+
};
|
|
12647
|
+
}
|
|
12648
|
+
}
|
|
12649
|
+
var TRIGGER_GAP, arrowClasses, Tooltip;
|
|
12608
12650
|
var init_Tooltip = __esm({
|
|
12609
12651
|
"components/core/molecules/Tooltip.tsx"() {
|
|
12610
12652
|
"use client";
|
|
12611
12653
|
init_Typography();
|
|
12612
12654
|
init_cn();
|
|
12613
|
-
|
|
12614
|
-
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
12615
|
-
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
12616
|
-
left: "right-full top-1/2 -translate-y-1/2 mr-2",
|
|
12617
|
-
right: "left-full top-1/2 -translate-y-1/2 ml-2"
|
|
12618
|
-
};
|
|
12655
|
+
TRIGGER_GAP = 8;
|
|
12619
12656
|
arrowClasses = {
|
|
12620
12657
|
top: "top-full left-1/2 -translate-x-1/2 border-t-primary border-l-transparent border-r-transparent border-b-transparent",
|
|
12621
12658
|
bottom: "bottom-full left-1/2 -translate-x-1/2 border-b-primary border-l-transparent border-r-transparent border-t-transparent",
|
|
@@ -12670,8 +12707,8 @@ var init_Tooltip = __esm({
|
|
|
12670
12707
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
12671
12708
|
};
|
|
12672
12709
|
}, []);
|
|
12673
|
-
const triggerElement =
|
|
12674
|
-
const trigger =
|
|
12710
|
+
const triggerElement = React95__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
12711
|
+
const trigger = React95__default.cloneElement(triggerElement, {
|
|
12675
12712
|
ref: triggerRef,
|
|
12676
12713
|
onMouseEnter: handleMouseEnter,
|
|
12677
12714
|
onMouseLeave: handleMouseLeave,
|
|
@@ -12689,14 +12726,9 @@ var init_Tooltip = __esm({
|
|
|
12689
12726
|
"text-sm pointer-events-none",
|
|
12690
12727
|
"break-words whitespace-normal",
|
|
12691
12728
|
"h-auto min-h-fit",
|
|
12692
|
-
positionClasses[position],
|
|
12693
12729
|
className
|
|
12694
12730
|
),
|
|
12695
|
-
style:
|
|
12696
|
-
left: position === "left" || position === "right" ? triggerRect.left + (position === "left" ? 0 : triggerRect.width) : triggerRect.left + triggerRect.width / 2,
|
|
12697
|
-
top: position === "top" || position === "bottom" ? triggerRect.top + (position === "top" ? 0 : triggerRect.height) : triggerRect.top + triggerRect.height / 2,
|
|
12698
|
-
transform: position === "top" || position === "bottom" ? "translateX(-50%)" : position === "left" || position === "right" ? "translateY(-50%)" : "none"
|
|
12699
|
-
},
|
|
12731
|
+
style: computeTooltipStyle(position, triggerRect),
|
|
12700
12732
|
role: "tooltip",
|
|
12701
12733
|
children: [
|
|
12702
12734
|
/* @__PURE__ */ jsx("div", { className: "w-full break-words whitespace-normal h-auto", children: typeof content === "string" ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-primary-foreground break-words whitespace-normal", children: content }) : /* @__PURE__ */ jsx("div", { className: "break-words whitespace-normal", children: content }) }),
|
|
@@ -12723,8 +12755,9 @@ var init_Tooltip = __esm({
|
|
|
12723
12755
|
function computePopoverStyle(position, triggerRect, popoverWidth) {
|
|
12724
12756
|
if (position === "left" || position === "right") {
|
|
12725
12757
|
return {
|
|
12726
|
-
left:
|
|
12727
|
-
top: triggerRect.top + triggerRect.height / 2
|
|
12758
|
+
left: position === "left" ? triggerRect.left - popoverWidth - TRIGGER_GAP2 : triggerRect.right + TRIGGER_GAP2,
|
|
12759
|
+
top: triggerRect.top + triggerRect.height / 2,
|
|
12760
|
+
transform: "translateY(-50%)"
|
|
12728
12761
|
};
|
|
12729
12762
|
}
|
|
12730
12763
|
const viewportWidth = typeof window !== "undefined" ? window.innerWidth : 1024;
|
|
@@ -12736,21 +12769,16 @@ function computePopoverStyle(position, triggerRect, popoverWidth) {
|
|
|
12736
12769
|
);
|
|
12737
12770
|
return {
|
|
12738
12771
|
left: clamped,
|
|
12739
|
-
top:
|
|
12772
|
+
top: position === "top" ? triggerRect.top - TRIGGER_GAP2 : triggerRect.bottom + TRIGGER_GAP2,
|
|
12773
|
+
transform: position === "top" ? "translateY(-100%)" : void 0
|
|
12740
12774
|
};
|
|
12741
12775
|
}
|
|
12742
|
-
var
|
|
12776
|
+
var arrowClasses2, VIEWPORT_EDGE_PADDING, TRIGGER_GAP2, Popover;
|
|
12743
12777
|
var init_Popover = __esm({
|
|
12744
12778
|
"components/core/molecules/Popover.tsx"() {
|
|
12745
12779
|
"use client";
|
|
12746
12780
|
init_Typography();
|
|
12747
12781
|
init_cn();
|
|
12748
|
-
positionClasses2 = {
|
|
12749
|
-
top: "mb-2",
|
|
12750
|
-
bottom: "mt-2",
|
|
12751
|
-
left: "mr-2 -translate-y-1/2",
|
|
12752
|
-
right: "ml-2 -translate-y-1/2"
|
|
12753
|
-
};
|
|
12754
12782
|
arrowClasses2 = {
|
|
12755
12783
|
top: "top-full left-1/2 -translate-x-1/2 border-t-white border-l-transparent border-r-transparent border-b-transparent",
|
|
12756
12784
|
bottom: "bottom-full left-1/2 -translate-x-1/2 border-b-white border-l-transparent border-r-transparent border-t-transparent",
|
|
@@ -12758,6 +12786,7 @@ var init_Popover = __esm({
|
|
|
12758
12786
|
right: "right-full top-1/2 -translate-y-1/2 border-r-white border-t-transparent border-b-transparent border-l-transparent"
|
|
12759
12787
|
};
|
|
12760
12788
|
VIEWPORT_EDGE_PADDING = 8;
|
|
12789
|
+
TRIGGER_GAP2 = 8;
|
|
12761
12790
|
Popover = ({
|
|
12762
12791
|
content,
|
|
12763
12792
|
children,
|
|
@@ -12826,8 +12855,8 @@ var init_Popover = __esm({
|
|
|
12826
12855
|
onMouseEnter: handleOpen,
|
|
12827
12856
|
onMouseLeave: handleClose
|
|
12828
12857
|
};
|
|
12829
|
-
const childElement =
|
|
12830
|
-
const triggerElement =
|
|
12858
|
+
const childElement = React95__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
12859
|
+
const triggerElement = React95__default.cloneElement(
|
|
12831
12860
|
childElement,
|
|
12832
12861
|
{
|
|
12833
12862
|
ref: triggerRef,
|
|
@@ -12841,7 +12870,6 @@ var init_Popover = __esm({
|
|
|
12841
12870
|
className: cn(
|
|
12842
12871
|
"fixed z-50 p-4",
|
|
12843
12872
|
"bg-card border-2 border-border shadow-elevation-popover",
|
|
12844
|
-
positionClasses2[position],
|
|
12845
12873
|
className
|
|
12846
12874
|
),
|
|
12847
12875
|
style: computePopoverStyle(position, triggerRect, popoverWidth),
|
|
@@ -12931,7 +12959,7 @@ var init_Menu = __esm({
|
|
|
12931
12959
|
document.addEventListener("mousedown", handleClickOutside);
|
|
12932
12960
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
12933
12961
|
}, [isOpen]);
|
|
12934
|
-
const
|
|
12962
|
+
const positionClasses = {
|
|
12935
12963
|
"top-left": "bottom-full left-0 mb-2",
|
|
12936
12964
|
"top-right": "bottom-full right-0 mb-2",
|
|
12937
12965
|
"bottom-left": "top-full left-0 mt-2",
|
|
@@ -12954,8 +12982,8 @@ var init_Menu = __esm({
|
|
|
12954
12982
|
};
|
|
12955
12983
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
12956
12984
|
const subMenuSideClass = direction === "rtl" ? "right-full mr-2" : "left-full ml-2";
|
|
12957
|
-
const triggerChild =
|
|
12958
|
-
const triggerElement =
|
|
12985
|
+
const triggerChild = React95__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
12986
|
+
const triggerElement = React95__default.cloneElement(
|
|
12959
12987
|
triggerChild,
|
|
12960
12988
|
{
|
|
12961
12989
|
ref: triggerRef,
|
|
@@ -13039,7 +13067,7 @@ var init_Menu = __esm({
|
|
|
13039
13067
|
className: cn(
|
|
13040
13068
|
"absolute z-50",
|
|
13041
13069
|
menuContainerStyles,
|
|
13042
|
-
|
|
13070
|
+
positionClasses[effectivePosition],
|
|
13043
13071
|
className
|
|
13044
13072
|
),
|
|
13045
13073
|
style: {
|
|
@@ -13215,7 +13243,7 @@ var init_FloatingActionButton = __esm({
|
|
|
13215
13243
|
document.addEventListener("mousedown", handleClickOutside);
|
|
13216
13244
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
13217
13245
|
}, [isExpanded, actions]);
|
|
13218
|
-
const
|
|
13246
|
+
const positionClasses = {
|
|
13219
13247
|
"bottom-right": "bottom-6 right-6",
|
|
13220
13248
|
"bottom-left": "bottom-6 left-6",
|
|
13221
13249
|
"bottom-center": "bottom-6 left-1/2 -translate-x-1/2",
|
|
@@ -13224,7 +13252,7 @@ var init_FloatingActionButton = __esm({
|
|
|
13224
13252
|
"top-center": "top-6 left-1/2 -translate-x-1/2"
|
|
13225
13253
|
};
|
|
13226
13254
|
if (resolvedAction && (!actions || actions.length === 0)) {
|
|
13227
|
-
return /* @__PURE__ */ jsx(Box, { className: cn("fixed z-50",
|
|
13255
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("fixed z-50", positionClasses[position], className), children: /* @__PURE__ */ jsx(
|
|
13228
13256
|
Button,
|
|
13229
13257
|
{
|
|
13230
13258
|
variant: resolvedAction.variant || "primary",
|
|
@@ -13252,7 +13280,7 @@ var init_FloatingActionButton = __esm({
|
|
|
13252
13280
|
ref: fabRef,
|
|
13253
13281
|
className: cn(
|
|
13254
13282
|
"fixed z-50 flex flex-col items-end gap-3",
|
|
13255
|
-
|
|
13283
|
+
positionClasses[position],
|
|
13256
13284
|
position.includes("left") && "items-start",
|
|
13257
13285
|
className
|
|
13258
13286
|
),
|
|
@@ -13362,13 +13390,13 @@ var init_MapView = __esm({
|
|
|
13362
13390
|
shadowSize: [41, 41]
|
|
13363
13391
|
});
|
|
13364
13392
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
13365
|
-
const { useEffect:
|
|
13393
|
+
const { useEffect: useEffect76, useRef: useRef68, useCallback: useCallback120, useState: useState112 } = React95__default;
|
|
13366
13394
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
13367
13395
|
const { useEventBus: useEventBus3 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
13368
13396
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
13369
13397
|
const map = useMap();
|
|
13370
13398
|
const prevRef = useRef68({ centerLat, centerLng, zoom });
|
|
13371
|
-
|
|
13399
|
+
useEffect76(() => {
|
|
13372
13400
|
const prev = prevRef.current;
|
|
13373
13401
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
13374
13402
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -13379,7 +13407,7 @@ var init_MapView = __esm({
|
|
|
13379
13407
|
}
|
|
13380
13408
|
function MapClickHandler({ onMapClick }) {
|
|
13381
13409
|
const map = useMap();
|
|
13382
|
-
|
|
13410
|
+
useEffect76(() => {
|
|
13383
13411
|
if (!onMapClick) return;
|
|
13384
13412
|
const handler = (e) => {
|
|
13385
13413
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -13407,7 +13435,7 @@ var init_MapView = __esm({
|
|
|
13407
13435
|
showAttribution = true
|
|
13408
13436
|
}) {
|
|
13409
13437
|
const eventBus = useEventBus3();
|
|
13410
|
-
const [clickedPosition, setClickedPosition] =
|
|
13438
|
+
const [clickedPosition, setClickedPosition] = useState112(null);
|
|
13411
13439
|
const handleMapClick = useCallback120((lat, lng) => {
|
|
13412
13440
|
if (showClickedPin) {
|
|
13413
13441
|
setClickedPosition({ lat, lng });
|
|
@@ -13426,7 +13454,7 @@ var init_MapView = __esm({
|
|
|
13426
13454
|
return /* @__PURE__ */ jsx(
|
|
13427
13455
|
Box,
|
|
13428
13456
|
{
|
|
13429
|
-
className: cn("relative w-full overflow-hidden rounded-lg", className),
|
|
13457
|
+
className: cn("relative isolate w-full overflow-hidden rounded-lg", className),
|
|
13430
13458
|
style: { height },
|
|
13431
13459
|
"data-testid": "map-view",
|
|
13432
13460
|
children: /* @__PURE__ */ jsxs(
|
|
@@ -13608,7 +13636,7 @@ function InputPattern({
|
|
|
13608
13636
|
fieldName
|
|
13609
13637
|
}) {
|
|
13610
13638
|
const { emit } = useEventBus();
|
|
13611
|
-
const [localValue, setLocalValue] =
|
|
13639
|
+
const [localValue, setLocalValue] = React95__default.useState(value);
|
|
13612
13640
|
const handleChange = (e) => {
|
|
13613
13641
|
setLocalValue(e.target.value);
|
|
13614
13642
|
if (onChange) {
|
|
@@ -13646,7 +13674,7 @@ function TextareaPattern({
|
|
|
13646
13674
|
fieldName
|
|
13647
13675
|
}) {
|
|
13648
13676
|
const { emit } = useEventBus();
|
|
13649
|
-
const [localValue, setLocalValue] =
|
|
13677
|
+
const [localValue, setLocalValue] = React95__default.useState(value);
|
|
13650
13678
|
const handleChange = (e) => {
|
|
13651
13679
|
setLocalValue(e.target.value);
|
|
13652
13680
|
if (onChange) {
|
|
@@ -13678,7 +13706,7 @@ function SelectPattern({
|
|
|
13678
13706
|
fieldName
|
|
13679
13707
|
}) {
|
|
13680
13708
|
const { emit } = useEventBus();
|
|
13681
|
-
const [localValue, setLocalValue] =
|
|
13709
|
+
const [localValue, setLocalValue] = React95__default.useState(value);
|
|
13682
13710
|
const handleChange = (e) => {
|
|
13683
13711
|
setLocalValue(e.target.value);
|
|
13684
13712
|
if (onChange) {
|
|
@@ -13707,7 +13735,7 @@ function CheckboxPattern({
|
|
|
13707
13735
|
className
|
|
13708
13736
|
}) {
|
|
13709
13737
|
const { emit } = useEventBus();
|
|
13710
|
-
const [localChecked, setLocalChecked] =
|
|
13738
|
+
const [localChecked, setLocalChecked] = React95__default.useState(checked);
|
|
13711
13739
|
const handleChange = (e) => {
|
|
13712
13740
|
setLocalChecked(e.target.checked);
|
|
13713
13741
|
if (onChange) {
|
|
@@ -13938,8 +13966,8 @@ function ActionButtons({
|
|
|
13938
13966
|
disabled
|
|
13939
13967
|
}) {
|
|
13940
13968
|
const eventBus = useEventBus();
|
|
13941
|
-
const [activeButtons, setActiveButtons] =
|
|
13942
|
-
const handlePress =
|
|
13969
|
+
const [activeButtons, setActiveButtons] = React95.useState(/* @__PURE__ */ new Set());
|
|
13970
|
+
const handlePress = React95.useCallback(
|
|
13943
13971
|
(id) => {
|
|
13944
13972
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
13945
13973
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -13947,7 +13975,7 @@ function ActionButtons({
|
|
|
13947
13975
|
},
|
|
13948
13976
|
[actionEvent, eventBus, onAction]
|
|
13949
13977
|
);
|
|
13950
|
-
const handleRelease =
|
|
13978
|
+
const handleRelease = React95.useCallback(
|
|
13951
13979
|
(id) => {
|
|
13952
13980
|
setActiveButtons((prev) => {
|
|
13953
13981
|
const next = new Set(prev);
|
|
@@ -16145,7 +16173,10 @@ function computeFoldRegions(code) {
|
|
|
16145
16173
|
}
|
|
16146
16174
|
return regions.sort((a, b) => a.start - b.start);
|
|
16147
16175
|
}
|
|
16148
|
-
|
|
16176
|
+
function toCodeLanguage(value) {
|
|
16177
|
+
return value && CODE_LANGUAGE_SET.has(value) ? value : "text";
|
|
16178
|
+
}
|
|
16179
|
+
var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log6, CODE_LANGUAGES, CODE_LANGUAGE_SET, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, CodeBlock;
|
|
16149
16180
|
var init_CodeBlock = __esm({
|
|
16150
16181
|
"components/core/molecules/markdown/CodeBlock.tsx"() {
|
|
16151
16182
|
init_Box();
|
|
@@ -16223,9 +16254,40 @@ var init_CodeBlock = __esm({
|
|
|
16223
16254
|
};
|
|
16224
16255
|
loloStyle = { ...dark, ...loloStyleOverrides };
|
|
16225
16256
|
log6 = createLogger("almadar:ui:markdown-code");
|
|
16257
|
+
CODE_LANGUAGES = [
|
|
16258
|
+
"text",
|
|
16259
|
+
"json",
|
|
16260
|
+
"javascript",
|
|
16261
|
+
"js",
|
|
16262
|
+
"typescript",
|
|
16263
|
+
"ts",
|
|
16264
|
+
"jsx",
|
|
16265
|
+
"tsx",
|
|
16266
|
+
"css",
|
|
16267
|
+
"markdown",
|
|
16268
|
+
"md",
|
|
16269
|
+
"bash",
|
|
16270
|
+
"shell",
|
|
16271
|
+
"sh",
|
|
16272
|
+
"yaml",
|
|
16273
|
+
"yml",
|
|
16274
|
+
"rust",
|
|
16275
|
+
"python",
|
|
16276
|
+
"py",
|
|
16277
|
+
"sql",
|
|
16278
|
+
"diff",
|
|
16279
|
+
"toml",
|
|
16280
|
+
"go",
|
|
16281
|
+
"graphql",
|
|
16282
|
+
"html",
|
|
16283
|
+
"xml",
|
|
16284
|
+
"orb",
|
|
16285
|
+
"lolo"
|
|
16286
|
+
];
|
|
16287
|
+
CODE_LANGUAGE_SET = new Set(CODE_LANGUAGES);
|
|
16226
16288
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
16227
16289
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
16228
|
-
CodeBlock =
|
|
16290
|
+
CodeBlock = React95__default.memo(
|
|
16229
16291
|
({
|
|
16230
16292
|
code: rawCode,
|
|
16231
16293
|
language = "text",
|
|
@@ -16662,7 +16724,7 @@ var init_MarkdownContent = __esm({
|
|
|
16662
16724
|
init_Box();
|
|
16663
16725
|
init_CodeBlock();
|
|
16664
16726
|
init_cn();
|
|
16665
|
-
MarkdownContent =
|
|
16727
|
+
MarkdownContent = React95__default.memo(
|
|
16666
16728
|
({ content, direction, className }) => {
|
|
16667
16729
|
const { t: _t } = useTranslate();
|
|
16668
16730
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -16712,7 +16774,7 @@ var init_MarkdownContent = __esm({
|
|
|
16712
16774
|
CodeBlock,
|
|
16713
16775
|
{
|
|
16714
16776
|
code,
|
|
16715
|
-
language: match[1],
|
|
16777
|
+
language: toCodeLanguage(match[1]),
|
|
16716
16778
|
maxHeight: "60vh"
|
|
16717
16779
|
}
|
|
16718
16780
|
);
|
|
@@ -17758,7 +17820,7 @@ var init_StateMachineView = __esm({
|
|
|
17758
17820
|
style: { top: title ? 30 : 0 },
|
|
17759
17821
|
children: [
|
|
17760
17822
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
17761
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
17823
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React95__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
17762
17824
|
StateNode,
|
|
17763
17825
|
{
|
|
17764
17826
|
state,
|
|
@@ -18571,7 +18633,7 @@ var init_ContentRenderer = __esm({
|
|
|
18571
18633
|
CodeBlock,
|
|
18572
18634
|
{
|
|
18573
18635
|
code: segment.content,
|
|
18574
|
-
language: segment.language
|
|
18636
|
+
language: toCodeLanguage(segment.language)
|
|
18575
18637
|
},
|
|
18576
18638
|
key
|
|
18577
18639
|
);
|
|
@@ -18596,7 +18658,7 @@ var init_ContentRenderer = __esm({
|
|
|
18596
18658
|
CodeBlock,
|
|
18597
18659
|
{
|
|
18598
18660
|
code: segment.content,
|
|
18599
|
-
language: segment.language
|
|
18661
|
+
language: toCodeLanguage(segment.language)
|
|
18600
18662
|
}
|
|
18601
18663
|
),
|
|
18602
18664
|
/* @__PURE__ */ jsx(ScaledDiagram, { children: /* @__PURE__ */ jsx(
|
|
@@ -19363,7 +19425,7 @@ var init_Grid = __esm({
|
|
|
19363
19425
|
as: Component = "div"
|
|
19364
19426
|
}) => {
|
|
19365
19427
|
const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
|
|
19366
|
-
return
|
|
19428
|
+
return React95__default.createElement(
|
|
19367
19429
|
Component,
|
|
19368
19430
|
{
|
|
19369
19431
|
className: cn(
|
|
@@ -24723,7 +24785,7 @@ function CraftingRecipe({
|
|
|
24723
24785
|
className
|
|
24724
24786
|
}) {
|
|
24725
24787
|
const eventBus = useEventBus();
|
|
24726
|
-
const handleCraft =
|
|
24788
|
+
const handleCraft = React95.useCallback(() => {
|
|
24727
24789
|
onCraft?.();
|
|
24728
24790
|
if (craftEvent) {
|
|
24729
24791
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -24740,7 +24802,7 @@ function CraftingRecipe({
|
|
|
24740
24802
|
children: [
|
|
24741
24803
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
24742
24804
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
24743
|
-
return /* @__PURE__ */ jsxs(
|
|
24805
|
+
return /* @__PURE__ */ jsxs(React95.Fragment, { children: [
|
|
24744
24806
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
24745
24807
|
ItemSlot,
|
|
24746
24808
|
{
|
|
@@ -24803,8 +24865,8 @@ function DPad({
|
|
|
24803
24865
|
}) {
|
|
24804
24866
|
const eventBus = useEventBus();
|
|
24805
24867
|
const sizes = sizeMap15[size];
|
|
24806
|
-
const [activeDirections, setActiveDirections] =
|
|
24807
|
-
const handlePress =
|
|
24868
|
+
const [activeDirections, setActiveDirections] = React95.useState(/* @__PURE__ */ new Set());
|
|
24869
|
+
const handlePress = React95.useCallback(
|
|
24808
24870
|
(direction) => {
|
|
24809
24871
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
24810
24872
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -24812,7 +24874,7 @@ function DPad({
|
|
|
24812
24874
|
},
|
|
24813
24875
|
[directionEvent, eventBus, onDirection]
|
|
24814
24876
|
);
|
|
24815
|
-
const handleRelease =
|
|
24877
|
+
const handleRelease = React95.useCallback(
|
|
24816
24878
|
(direction) => {
|
|
24817
24879
|
setActiveDirections((prev) => {
|
|
24818
24880
|
const next = new Set(prev);
|
|
@@ -25498,14 +25560,14 @@ function useDataDnd(args) {
|
|
|
25498
25560
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
25499
25561
|
const enabled = isZone || Boolean(dndRoot);
|
|
25500
25562
|
const eventBus = useEventBus();
|
|
25501
|
-
const parentRoot =
|
|
25563
|
+
const parentRoot = React95__default.useContext(RootCtx);
|
|
25502
25564
|
const isRoot = enabled && parentRoot === null;
|
|
25503
|
-
const zoneId =
|
|
25565
|
+
const zoneId = React95__default.useId();
|
|
25504
25566
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
25505
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
25506
|
-
const optimisticOrdersRef =
|
|
25567
|
+
const [optimisticOrders, setOptimisticOrders] = React95__default.useState(() => /* @__PURE__ */ new Map());
|
|
25568
|
+
const optimisticOrdersRef = React95__default.useRef(optimisticOrders);
|
|
25507
25569
|
optimisticOrdersRef.current = optimisticOrders;
|
|
25508
|
-
const clearOptimisticOrder =
|
|
25570
|
+
const clearOptimisticOrder = React95__default.useCallback((group) => {
|
|
25509
25571
|
setOptimisticOrders((prev) => {
|
|
25510
25572
|
if (!prev.has(group)) return prev;
|
|
25511
25573
|
const next = new Map(prev);
|
|
@@ -25530,7 +25592,7 @@ function useDataDnd(args) {
|
|
|
25530
25592
|
const raw = it[dndItemIdField];
|
|
25531
25593
|
return String(raw ?? `__idx_${idx}`);
|
|
25532
25594
|
}).join("|");
|
|
25533
|
-
const itemIds =
|
|
25595
|
+
const itemIds = React95__default.useMemo(
|
|
25534
25596
|
() => orderedItems.map((it, idx) => {
|
|
25535
25597
|
const raw = it[dndItemIdField];
|
|
25536
25598
|
return raw ?? `__idx_${idx}`;
|
|
@@ -25538,7 +25600,7 @@ function useDataDnd(args) {
|
|
|
25538
25600
|
[itemIdsSignature]
|
|
25539
25601
|
);
|
|
25540
25602
|
const itemsContentSig = items.map((it, idx) => String(it[dndItemIdField] ?? `__${idx}`)).join("|");
|
|
25541
|
-
|
|
25603
|
+
React95__default.useEffect(() => {
|
|
25542
25604
|
const root = isRoot ? null : parentRoot;
|
|
25543
25605
|
if (root) {
|
|
25544
25606
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -25546,20 +25608,20 @@ function useDataDnd(args) {
|
|
|
25546
25608
|
clearOptimisticOrder(ownGroup);
|
|
25547
25609
|
}
|
|
25548
25610
|
}, [itemsContentSig, ownGroup]);
|
|
25549
|
-
const zonesRef =
|
|
25550
|
-
const registerZone =
|
|
25611
|
+
const zonesRef = React95__default.useRef(/* @__PURE__ */ new Map());
|
|
25612
|
+
const registerZone = React95__default.useCallback((zoneId2, meta2) => {
|
|
25551
25613
|
zonesRef.current.set(zoneId2, meta2);
|
|
25552
25614
|
}, []);
|
|
25553
|
-
const unregisterZone =
|
|
25615
|
+
const unregisterZone = React95__default.useCallback((zoneId2) => {
|
|
25554
25616
|
zonesRef.current.delete(zoneId2);
|
|
25555
25617
|
}, []);
|
|
25556
|
-
const [activeDrag, setActiveDrag] =
|
|
25557
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
25558
|
-
const meta =
|
|
25618
|
+
const [activeDrag, setActiveDrag] = React95__default.useState(null);
|
|
25619
|
+
const [overZoneGroup, setOverZoneGroup] = React95__default.useState(null);
|
|
25620
|
+
const meta = React95__default.useMemo(
|
|
25559
25621
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
25560
25622
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
25561
25623
|
);
|
|
25562
|
-
|
|
25624
|
+
React95__default.useEffect(() => {
|
|
25563
25625
|
const target = isRoot ? null : parentRoot;
|
|
25564
25626
|
if (!target) {
|
|
25565
25627
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -25578,7 +25640,7 @@ function useDataDnd(args) {
|
|
|
25578
25640
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
25579
25641
|
const sensors = useAlmadarDndSensors(true);
|
|
25580
25642
|
const collisionDetection = almadarDndCollisionDetection;
|
|
25581
|
-
const findZoneByItem =
|
|
25643
|
+
const findZoneByItem = React95__default.useCallback(
|
|
25582
25644
|
(id) => {
|
|
25583
25645
|
for (const z of zonesRef.current.values()) {
|
|
25584
25646
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -25587,7 +25649,7 @@ function useDataDnd(args) {
|
|
|
25587
25649
|
},
|
|
25588
25650
|
[]
|
|
25589
25651
|
);
|
|
25590
|
-
|
|
25652
|
+
React95__default.useCallback(
|
|
25591
25653
|
(group) => {
|
|
25592
25654
|
for (const z of zonesRef.current.values()) {
|
|
25593
25655
|
if (z.group === group) return z;
|
|
@@ -25596,7 +25658,7 @@ function useDataDnd(args) {
|
|
|
25596
25658
|
},
|
|
25597
25659
|
[]
|
|
25598
25660
|
);
|
|
25599
|
-
const handleDragEnd =
|
|
25661
|
+
const handleDragEnd = React95__default.useCallback(
|
|
25600
25662
|
(event) => {
|
|
25601
25663
|
const { active, over } = event;
|
|
25602
25664
|
const activeIdStr = String(active.id);
|
|
@@ -25687,8 +25749,8 @@ function useDataDnd(args) {
|
|
|
25687
25749
|
},
|
|
25688
25750
|
[eventBus]
|
|
25689
25751
|
);
|
|
25690
|
-
const sortableData =
|
|
25691
|
-
const SortableItem =
|
|
25752
|
+
const sortableData = React95__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
25753
|
+
const SortableItem = React95__default.useCallback(
|
|
25692
25754
|
({ id, children }) => {
|
|
25693
25755
|
const {
|
|
25694
25756
|
attributes,
|
|
@@ -25728,7 +25790,7 @@ function useDataDnd(args) {
|
|
|
25728
25790
|
id: droppableId,
|
|
25729
25791
|
data: sortableData
|
|
25730
25792
|
});
|
|
25731
|
-
const ctx =
|
|
25793
|
+
const ctx = React95__default.useContext(RootCtx);
|
|
25732
25794
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
25733
25795
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
25734
25796
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -25743,7 +25805,7 @@ function useDataDnd(args) {
|
|
|
25743
25805
|
showForeignPlaceholder,
|
|
25744
25806
|
ctxAvailable: ctx != null
|
|
25745
25807
|
});
|
|
25746
|
-
|
|
25808
|
+
React95__default.useEffect(() => {
|
|
25747
25809
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
25748
25810
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
25749
25811
|
return /* @__PURE__ */ jsx(
|
|
@@ -25757,11 +25819,11 @@ function useDataDnd(args) {
|
|
|
25757
25819
|
}
|
|
25758
25820
|
);
|
|
25759
25821
|
};
|
|
25760
|
-
const rootContextValue =
|
|
25822
|
+
const rootContextValue = React95__default.useMemo(
|
|
25761
25823
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
25762
25824
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
25763
25825
|
);
|
|
25764
|
-
const handleDragStart =
|
|
25826
|
+
const handleDragStart = React95__default.useCallback((event) => {
|
|
25765
25827
|
const sourceZone = findZoneByItem(event.active.id);
|
|
25766
25828
|
const rect = event.active.rect.current.initial;
|
|
25767
25829
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -25780,7 +25842,7 @@ function useDataDnd(args) {
|
|
|
25780
25842
|
isRoot
|
|
25781
25843
|
});
|
|
25782
25844
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
25783
|
-
const handleDragOver =
|
|
25845
|
+
const handleDragOver = React95__default.useCallback((event) => {
|
|
25784
25846
|
const { active, over } = event;
|
|
25785
25847
|
const overData = over?.data?.current;
|
|
25786
25848
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -25850,7 +25912,7 @@ function useDataDnd(args) {
|
|
|
25850
25912
|
return next;
|
|
25851
25913
|
});
|
|
25852
25914
|
}, []);
|
|
25853
|
-
const handleDragCancel =
|
|
25915
|
+
const handleDragCancel = React95__default.useCallback((event) => {
|
|
25854
25916
|
setActiveDrag(null);
|
|
25855
25917
|
setOverZoneGroup(null);
|
|
25856
25918
|
dndLog.warn("dragCancel", {
|
|
@@ -25858,12 +25920,12 @@ function useDataDnd(args) {
|
|
|
25858
25920
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
25859
25921
|
});
|
|
25860
25922
|
}, []);
|
|
25861
|
-
const handleDragEndWithCleanup =
|
|
25923
|
+
const handleDragEndWithCleanup = React95__default.useCallback((event) => {
|
|
25862
25924
|
handleDragEnd(event);
|
|
25863
25925
|
setActiveDrag(null);
|
|
25864
25926
|
setOverZoneGroup(null);
|
|
25865
25927
|
}, [handleDragEnd]);
|
|
25866
|
-
const wrapContainer =
|
|
25928
|
+
const wrapContainer = React95__default.useCallback(
|
|
25867
25929
|
(children) => {
|
|
25868
25930
|
if (!enabled) return children;
|
|
25869
25931
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -25917,7 +25979,7 @@ var init_useDataDnd = __esm({
|
|
|
25917
25979
|
init_useAlmadarDndCollision();
|
|
25918
25980
|
init_Box();
|
|
25919
25981
|
dndLog = createLogger("almadar:ui:dnd");
|
|
25920
|
-
RootCtx =
|
|
25982
|
+
RootCtx = React95__default.createContext(null);
|
|
25921
25983
|
}
|
|
25922
25984
|
});
|
|
25923
25985
|
function fieldLabel2(key) {
|
|
@@ -26437,7 +26499,7 @@ function DataList({
|
|
|
26437
26499
|
}) {
|
|
26438
26500
|
const eventBus = useEventBus();
|
|
26439
26501
|
const { t } = useTranslate();
|
|
26440
|
-
const [visibleCount, setVisibleCount] =
|
|
26502
|
+
const [visibleCount, setVisibleCount] = React95__default.useState(pageSize || Infinity);
|
|
26441
26503
|
const fieldDefs = fields ?? columns ?? [];
|
|
26442
26504
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
26443
26505
|
const dnd = useDataDnd({
|
|
@@ -26456,7 +26518,7 @@ function DataList({
|
|
|
26456
26518
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
26457
26519
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
26458
26520
|
const hasRenderProp = typeof children === "function";
|
|
26459
|
-
|
|
26521
|
+
React95__default.useEffect(() => {
|
|
26460
26522
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
26461
26523
|
const childrenTypeOf = typeof children;
|
|
26462
26524
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -26561,7 +26623,7 @@ function DataList({
|
|
|
26561
26623
|
const items2 = data.map((item) => item);
|
|
26562
26624
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
26563
26625
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
26564
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
26626
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React95__default.Fragment, { children: [
|
|
26565
26627
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
26566
26628
|
group.items.map((itemData, index) => {
|
|
26567
26629
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -26709,7 +26771,7 @@ function DataList({
|
|
|
26709
26771
|
className
|
|
26710
26772
|
),
|
|
26711
26773
|
children: [
|
|
26712
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
26774
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React95__default.Fragment, { children: [
|
|
26713
26775
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
26714
26776
|
group.items.map(
|
|
26715
26777
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -28083,7 +28145,7 @@ var init_WizardProgress = __esm({
|
|
|
28083
28145
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
28084
28146
|
const isActive = index === currentStep;
|
|
28085
28147
|
const isCompleted = index < currentStep;
|
|
28086
|
-
return /* @__PURE__ */ jsxs(
|
|
28148
|
+
return /* @__PURE__ */ jsxs(React95__default.Fragment, { children: [
|
|
28087
28149
|
/* @__PURE__ */ jsx(
|
|
28088
28150
|
"button",
|
|
28089
28151
|
{
|
|
@@ -28600,7 +28662,7 @@ var init_FormSectionHeader = __esm({
|
|
|
28600
28662
|
Box,
|
|
28601
28663
|
{
|
|
28602
28664
|
className: cn(
|
|
28603
|
-
"px-4 py-3 bg-muted rounded-t-lg",
|
|
28665
|
+
"px-4 py-3 bg-muted rounded-t-lg border-b-2 border-border border-l-4 border-l-primary",
|
|
28604
28666
|
isClickable && "cursor-pointer hover:bg-[var(--color-surface-hover)] transition-colors",
|
|
28605
28667
|
className
|
|
28606
28668
|
),
|
|
@@ -28612,7 +28674,7 @@ var init_FormSectionHeader = __esm({
|
|
|
28612
28674
|
{
|
|
28613
28675
|
name: icon,
|
|
28614
28676
|
size: "md",
|
|
28615
|
-
className: "text-
|
|
28677
|
+
className: "text-primary"
|
|
28616
28678
|
}
|
|
28617
28679
|
),
|
|
28618
28680
|
statusIcon && /* @__PURE__ */ jsx(
|
|
@@ -28623,8 +28685,8 @@ var init_FormSectionHeader = __esm({
|
|
|
28623
28685
|
className: hasErrors ? "text-error" : "text-success"
|
|
28624
28686
|
}
|
|
28625
28687
|
),
|
|
28626
|
-
/* @__PURE__ */ jsxs(Box, { children: [
|
|
28627
|
-
/* @__PURE__ */ jsx(Typography, { variant: "
|
|
28688
|
+
/* @__PURE__ */ jsxs(Box, { className: "space-y-0.5", children: [
|
|
28689
|
+
/* @__PURE__ */ jsx(Typography, { variant: "subheading", weight: "semibold", children: title }),
|
|
28628
28690
|
subtitle && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: subtitle })
|
|
28629
28691
|
] })
|
|
28630
28692
|
] }),
|
|
@@ -29138,7 +29200,7 @@ function InventoryGrid({
|
|
|
29138
29200
|
const eventBus = useEventBus();
|
|
29139
29201
|
const slotCount = totalSlots ?? items.length;
|
|
29140
29202
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
29141
|
-
const handleSelect =
|
|
29203
|
+
const handleSelect = React95.useCallback(
|
|
29142
29204
|
(id) => {
|
|
29143
29205
|
onSelect?.(id);
|
|
29144
29206
|
if (selectEvent) {
|
|
@@ -29355,31 +29417,31 @@ function GameCanvas2D({
|
|
|
29355
29417
|
assetBaseUrl = "",
|
|
29356
29418
|
className
|
|
29357
29419
|
}) {
|
|
29358
|
-
const canvasRef =
|
|
29359
|
-
const rafRef =
|
|
29360
|
-
const frameRef =
|
|
29361
|
-
const lastTimeRef =
|
|
29362
|
-
const imageCache =
|
|
29420
|
+
const canvasRef = React95.useRef(null);
|
|
29421
|
+
const rafRef = React95.useRef(0);
|
|
29422
|
+
const frameRef = React95.useRef(0);
|
|
29423
|
+
const lastTimeRef = React95.useRef(0);
|
|
29424
|
+
const imageCache = React95.useRef(/* @__PURE__ */ new Map());
|
|
29363
29425
|
const emit = useEmitEvent();
|
|
29364
|
-
const onDrawRef =
|
|
29426
|
+
const onDrawRef = React95.useRef(onDraw);
|
|
29365
29427
|
onDrawRef.current = onDraw;
|
|
29366
|
-
const onTickRef =
|
|
29428
|
+
const onTickRef = React95.useRef(onTick);
|
|
29367
29429
|
onTickRef.current = onTick;
|
|
29368
|
-
const tickEventRef =
|
|
29430
|
+
const tickEventRef = React95.useRef(tickEvent);
|
|
29369
29431
|
tickEventRef.current = tickEvent;
|
|
29370
|
-
const drawEventRef =
|
|
29432
|
+
const drawEventRef = React95.useRef(drawEvent);
|
|
29371
29433
|
drawEventRef.current = drawEvent;
|
|
29372
|
-
const emitRef =
|
|
29434
|
+
const emitRef = React95.useRef(emit);
|
|
29373
29435
|
emitRef.current = emit;
|
|
29374
|
-
const assetBaseUrlRef =
|
|
29436
|
+
const assetBaseUrlRef = React95.useRef(assetBaseUrl);
|
|
29375
29437
|
assetBaseUrlRef.current = assetBaseUrl;
|
|
29376
|
-
const backgroundImageRef =
|
|
29438
|
+
const backgroundImageRef = React95.useRef(backgroundImage);
|
|
29377
29439
|
backgroundImageRef.current = backgroundImage;
|
|
29378
|
-
const widthRef =
|
|
29440
|
+
const widthRef = React95.useRef(width);
|
|
29379
29441
|
widthRef.current = width;
|
|
29380
|
-
const heightRef =
|
|
29442
|
+
const heightRef = React95.useRef(height);
|
|
29381
29443
|
heightRef.current = height;
|
|
29382
|
-
const loadImage =
|
|
29444
|
+
const loadImage = React95.useCallback((url) => {
|
|
29383
29445
|
const fullUrl = url.startsWith("http") ? url : `${assetBaseUrlRef.current}${url}`;
|
|
29384
29446
|
const cached = imageCache.current.get(fullUrl);
|
|
29385
29447
|
if (cached?.complete && cached.naturalWidth > 0) return cached;
|
|
@@ -29391,7 +29453,7 @@ function GameCanvas2D({
|
|
|
29391
29453
|
}
|
|
29392
29454
|
return null;
|
|
29393
29455
|
}, []);
|
|
29394
|
-
|
|
29456
|
+
React95.useEffect(() => {
|
|
29395
29457
|
const canvas = canvasRef.current;
|
|
29396
29458
|
if (!canvas) return;
|
|
29397
29459
|
const ctx = canvas.getContext("2d");
|
|
@@ -29694,7 +29756,7 @@ function TurnPanel({
|
|
|
29694
29756
|
className
|
|
29695
29757
|
}) {
|
|
29696
29758
|
const eventBus = useEventBus();
|
|
29697
|
-
const handleAction =
|
|
29759
|
+
const handleAction = React95.useCallback(
|
|
29698
29760
|
(event) => {
|
|
29699
29761
|
if (event) {
|
|
29700
29762
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -29840,7 +29902,7 @@ function UnitCommandBar({
|
|
|
29840
29902
|
className
|
|
29841
29903
|
}) {
|
|
29842
29904
|
const eventBus = useEventBus();
|
|
29843
|
-
const handleCommand =
|
|
29905
|
+
const handleCommand = React95.useCallback(
|
|
29844
29906
|
(event) => {
|
|
29845
29907
|
if (event) {
|
|
29846
29908
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -30325,7 +30387,7 @@ function GameMenu({
|
|
|
30325
30387
|
} catch {
|
|
30326
30388
|
}
|
|
30327
30389
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
30328
|
-
const handleOptionClick =
|
|
30390
|
+
const handleOptionClick = React95.useCallback(
|
|
30329
30391
|
(option) => {
|
|
30330
30392
|
if (option.event && eventBus) {
|
|
30331
30393
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -30439,7 +30501,7 @@ function GameOverScreen({
|
|
|
30439
30501
|
} catch {
|
|
30440
30502
|
}
|
|
30441
30503
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
30442
|
-
const handleActionClick =
|
|
30504
|
+
const handleActionClick = React95.useCallback(
|
|
30443
30505
|
(action) => {
|
|
30444
30506
|
if (action.event && eventBus) {
|
|
30445
30507
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -31433,7 +31495,7 @@ var init_StarRating = __esm({
|
|
|
31433
31495
|
name: "star",
|
|
31434
31496
|
className: cn(
|
|
31435
31497
|
styles.star,
|
|
31436
|
-
"text-muted",
|
|
31498
|
+
"text-muted-foreground",
|
|
31437
31499
|
"transition-colors duration-100"
|
|
31438
31500
|
),
|
|
31439
31501
|
strokeWidth: 1.5
|
|
@@ -31916,8 +31978,8 @@ function TableView({
|
|
|
31916
31978
|
}) {
|
|
31917
31979
|
const eventBus = useEventBus();
|
|
31918
31980
|
const { t } = useTranslate();
|
|
31919
|
-
const [visibleCount, setVisibleCount] =
|
|
31920
|
-
const [localSelected, setLocalSelected] =
|
|
31981
|
+
const [visibleCount, setVisibleCount] = React95__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
31982
|
+
const [localSelected, setLocalSelected] = React95__default.useState(/* @__PURE__ */ new Set());
|
|
31921
31983
|
const colDefs = columns ?? fields ?? [];
|
|
31922
31984
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
31923
31985
|
const dnd = useDataDnd({
|
|
@@ -32112,12 +32174,12 @@ function TableView({
|
|
|
32112
32174
|
]
|
|
32113
32175
|
}
|
|
32114
32176
|
);
|
|
32115
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
32177
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React95__default.Fragment, { children: rowInner }, id);
|
|
32116
32178
|
};
|
|
32117
32179
|
const items = data.map((row) => row);
|
|
32118
32180
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
32119
32181
|
let runningIndex = 0;
|
|
32120
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
32182
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React95__default.Fragment, { children: [
|
|
32121
32183
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
32122
32184
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
32123
32185
|
] }, gi)) });
|
|
@@ -33469,7 +33531,7 @@ var init_StepFlow = __esm({
|
|
|
33469
33531
|
className
|
|
33470
33532
|
}) => {
|
|
33471
33533
|
if (orientation === "vertical") {
|
|
33472
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
33534
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React95__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
33473
33535
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
33474
33536
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
33475
33537
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -33480,7 +33542,7 @@ var init_StepFlow = __esm({
|
|
|
33480
33542
|
] })
|
|
33481
33543
|
] }) }, index)) });
|
|
33482
33544
|
}
|
|
33483
|
-
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(
|
|
33545
|
+
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(React95__default.Fragment, { children: [
|
|
33484
33546
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
33485
33547
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
33486
33548
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -34456,7 +34518,7 @@ var init_LikertScale = __esm({
|
|
|
34456
34518
|
md: "text-base",
|
|
34457
34519
|
lg: "text-lg"
|
|
34458
34520
|
};
|
|
34459
|
-
LikertScale =
|
|
34521
|
+
LikertScale = React95__default.forwardRef(
|
|
34460
34522
|
({
|
|
34461
34523
|
question,
|
|
34462
34524
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -34468,7 +34530,7 @@ var init_LikertScale = __esm({
|
|
|
34468
34530
|
variant = "radios",
|
|
34469
34531
|
className
|
|
34470
34532
|
}, ref) => {
|
|
34471
|
-
const groupId =
|
|
34533
|
+
const groupId = React95__default.useId();
|
|
34472
34534
|
const eventBus = useEventBus();
|
|
34473
34535
|
const handleSelect = useCallback(
|
|
34474
34536
|
(next) => {
|
|
@@ -35613,6 +35675,7 @@ function Editable({
|
|
|
35613
35675
|
function BlockRow({
|
|
35614
35676
|
block,
|
|
35615
35677
|
readOnly,
|
|
35678
|
+
showAffordances,
|
|
35616
35679
|
placeholder,
|
|
35617
35680
|
onUpdate,
|
|
35618
35681
|
onDelete,
|
|
@@ -35831,7 +35894,7 @@ function BlockRow({
|
|
|
35831
35894
|
onValueChange: (next) => setChildContent(child.id, next)
|
|
35832
35895
|
}
|
|
35833
35896
|
),
|
|
35834
|
-
!readOnly && /* @__PURE__ */ jsx(
|
|
35897
|
+
!readOnly && showAffordances && /* @__PURE__ */ jsx(
|
|
35835
35898
|
Button,
|
|
35836
35899
|
{
|
|
35837
35900
|
type: "button",
|
|
@@ -35846,7 +35909,7 @@ function BlockRow({
|
|
|
35846
35909
|
}
|
|
35847
35910
|
)
|
|
35848
35911
|
] }, child.id)),
|
|
35849
|
-
!readOnly && /* @__PURE__ */ jsx(Box, { as: "li", className: "list-none pl-0", children: /* @__PURE__ */ jsxs(
|
|
35912
|
+
!readOnly && showAffordances && /* @__PURE__ */ jsx(Box, { as: "li", className: "list-none pl-0", children: /* @__PURE__ */ jsxs(
|
|
35850
35913
|
Button,
|
|
35851
35914
|
{
|
|
35852
35915
|
type: "button",
|
|
@@ -35893,7 +35956,7 @@ function BlockRow({
|
|
|
35893
35956
|
"data-block-id": block.id,
|
|
35894
35957
|
"data-block-type": block.type,
|
|
35895
35958
|
children: [
|
|
35896
|
-
!readOnly && /* @__PURE__ */ jsxs(Box, { className: "flex w-12 shrink-0 items-center gap-0.5 pt-1", children: [
|
|
35959
|
+
!readOnly && showAffordances && /* @__PURE__ */ jsxs(Box, { className: "flex w-12 shrink-0 items-center gap-0.5 pt-1", children: [
|
|
35897
35960
|
/* @__PURE__ */ jsx(
|
|
35898
35961
|
Button,
|
|
35899
35962
|
{
|
|
@@ -35992,6 +36055,7 @@ var init_RichBlockEditor = __esm({
|
|
|
35992
36055
|
changeEvent,
|
|
35993
36056
|
readOnly = false,
|
|
35994
36057
|
placeholder,
|
|
36058
|
+
enableBlocks = false,
|
|
35995
36059
|
showToolbar = true,
|
|
35996
36060
|
className
|
|
35997
36061
|
}) => {
|
|
@@ -36063,7 +36127,7 @@ var init_RichBlockEditor = __esm({
|
|
|
36063
36127
|
padding: "none",
|
|
36064
36128
|
className: cn("flex flex-col", className),
|
|
36065
36129
|
children: [
|
|
36066
|
-
showToolbar && !readOnly && /* @__PURE__ */ jsx(
|
|
36130
|
+
enableBlocks && showToolbar && !readOnly && /* @__PURE__ */ jsx(
|
|
36067
36131
|
Box,
|
|
36068
36132
|
{
|
|
36069
36133
|
role: "toolbar",
|
|
@@ -36099,6 +36163,7 @@ var init_RichBlockEditor = __esm({
|
|
|
36099
36163
|
{
|
|
36100
36164
|
block,
|
|
36101
36165
|
readOnly,
|
|
36166
|
+
showAffordances: enableBlocks,
|
|
36102
36167
|
placeholder,
|
|
36103
36168
|
onUpdate: (updater) => handleUpdate(block.id, updater),
|
|
36104
36169
|
onDelete: () => handleDelete(block.id),
|
|
@@ -36773,7 +36838,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
36773
36838
|
"aria-label": t("aria.breadcrumb"),
|
|
36774
36839
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
36775
36840
|
const isLast = idx === items.length - 1;
|
|
36776
|
-
return /* @__PURE__ */ jsxs(
|
|
36841
|
+
return /* @__PURE__ */ jsxs(React95__default.Fragment, { children: [
|
|
36777
36842
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
36778
36843
|
Icon,
|
|
36779
36844
|
{
|
|
@@ -37532,7 +37597,7 @@ var init_PageHeader = __esm({
|
|
|
37532
37597
|
info: "bg-info/10 text-info"
|
|
37533
37598
|
};
|
|
37534
37599
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
37535
|
-
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(
|
|
37600
|
+
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(React95__default.Fragment, { children: [
|
|
37536
37601
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
37537
37602
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
37538
37603
|
"a",
|
|
@@ -38269,7 +38334,7 @@ var init_WizardContainer = __esm({
|
|
|
38269
38334
|
const isCompleted = index < currentStep;
|
|
38270
38335
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
38271
38336
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
38272
|
-
return /* @__PURE__ */ jsxs(
|
|
38337
|
+
return /* @__PURE__ */ jsxs(React95__default.Fragment, { children: [
|
|
38273
38338
|
/* @__PURE__ */ jsx(
|
|
38274
38339
|
Button,
|
|
38275
38340
|
{
|
|
@@ -40554,7 +40619,7 @@ var init_DetailPanel = __esm({
|
|
|
40554
40619
|
}
|
|
40555
40620
|
});
|
|
40556
40621
|
function extractTitle(children) {
|
|
40557
|
-
if (!
|
|
40622
|
+
if (!React95__default.isValidElement(children)) return void 0;
|
|
40558
40623
|
const props = children.props;
|
|
40559
40624
|
if (typeof props.title === "string") {
|
|
40560
40625
|
return props.title;
|
|
@@ -40609,7 +40674,7 @@ function LinearView({
|
|
|
40609
40674
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
40610
40675
|
const isDone = i < currentIdx;
|
|
40611
40676
|
const isCurrent = i === currentIdx;
|
|
40612
|
-
return /* @__PURE__ */ jsxs(
|
|
40677
|
+
return /* @__PURE__ */ jsxs(React95__default.Fragment, { children: [
|
|
40613
40678
|
i > 0 && /* @__PURE__ */ jsx(
|
|
40614
40679
|
Typography,
|
|
40615
40680
|
{
|
|
@@ -41567,12 +41632,12 @@ var init_Form = __esm({
|
|
|
41567
41632
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
41568
41633
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
41569
41634
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
41570
|
-
const normalizedInitialData =
|
|
41635
|
+
const normalizedInitialData = React95__default.useMemo(() => {
|
|
41571
41636
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
41572
41637
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
41573
41638
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
41574
41639
|
}, [entity, initialData]);
|
|
41575
|
-
const entityDerivedFields =
|
|
41640
|
+
const entityDerivedFields = React95__default.useMemo(() => {
|
|
41576
41641
|
if (fields && fields.length > 0) return void 0;
|
|
41577
41642
|
if (!resolvedEntity) return void 0;
|
|
41578
41643
|
return resolvedEntity.fields.map(
|
|
@@ -41592,16 +41657,16 @@ var init_Form = __esm({
|
|
|
41592
41657
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
41593
41658
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
41594
41659
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
41595
|
-
const [formData, setFormData] =
|
|
41660
|
+
const [formData, setFormData] = React95__default.useState(
|
|
41596
41661
|
normalizedInitialData
|
|
41597
41662
|
);
|
|
41598
|
-
const [collapsedSections, setCollapsedSections] =
|
|
41663
|
+
const [collapsedSections, setCollapsedSections] = React95__default.useState(
|
|
41599
41664
|
/* @__PURE__ */ new Set()
|
|
41600
41665
|
);
|
|
41601
|
-
const [submitError, setSubmitError] =
|
|
41602
|
-
const formRef =
|
|
41666
|
+
const [submitError, setSubmitError] = React95__default.useState(null);
|
|
41667
|
+
const formRef = React95__default.useRef(null);
|
|
41603
41668
|
const formMode = props.mode;
|
|
41604
|
-
const mountedRef =
|
|
41669
|
+
const mountedRef = React95__default.useRef(false);
|
|
41605
41670
|
if (!mountedRef.current) {
|
|
41606
41671
|
mountedRef.current = true;
|
|
41607
41672
|
debug("forms", "mount", {
|
|
@@ -41614,7 +41679,7 @@ var init_Form = __esm({
|
|
|
41614
41679
|
});
|
|
41615
41680
|
}
|
|
41616
41681
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
41617
|
-
const evalContext =
|
|
41682
|
+
const evalContext = React95__default.useMemo(
|
|
41618
41683
|
() => ({
|
|
41619
41684
|
formValues: formData,
|
|
41620
41685
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -41623,7 +41688,7 @@ var init_Form = __esm({
|
|
|
41623
41688
|
}),
|
|
41624
41689
|
[formData, externalContext]
|
|
41625
41690
|
);
|
|
41626
|
-
|
|
41691
|
+
React95__default.useEffect(() => {
|
|
41627
41692
|
debug("forms", "initialData-sync", {
|
|
41628
41693
|
mode: formMode,
|
|
41629
41694
|
normalizedInitialData,
|
|
@@ -41634,7 +41699,7 @@ var init_Form = __esm({
|
|
|
41634
41699
|
setFormData(normalizedInitialData);
|
|
41635
41700
|
}
|
|
41636
41701
|
}, [normalizedInitialData]);
|
|
41637
|
-
const processCalculations =
|
|
41702
|
+
const processCalculations = React95__default.useCallback(
|
|
41638
41703
|
(changedFieldId, newFormData) => {
|
|
41639
41704
|
if (!hiddenCalculations.length) return;
|
|
41640
41705
|
const context = {
|
|
@@ -41659,7 +41724,7 @@ var init_Form = __esm({
|
|
|
41659
41724
|
},
|
|
41660
41725
|
[hiddenCalculations, externalContext, eventBus]
|
|
41661
41726
|
);
|
|
41662
|
-
const checkViolations =
|
|
41727
|
+
const checkViolations = React95__default.useCallback(
|
|
41663
41728
|
(changedFieldId, newFormData) => {
|
|
41664
41729
|
if (!violationTriggers.length) return;
|
|
41665
41730
|
const context = {
|
|
@@ -41697,7 +41762,7 @@ var init_Form = __esm({
|
|
|
41697
41762
|
processCalculations(name, newFormData);
|
|
41698
41763
|
checkViolations(name, newFormData);
|
|
41699
41764
|
};
|
|
41700
|
-
const isFieldVisible =
|
|
41765
|
+
const isFieldVisible = React95__default.useCallback(
|
|
41701
41766
|
(fieldName) => {
|
|
41702
41767
|
const condition = conditionalFields[fieldName];
|
|
41703
41768
|
if (!condition) return true;
|
|
@@ -41705,7 +41770,7 @@ var init_Form = __esm({
|
|
|
41705
41770
|
},
|
|
41706
41771
|
[conditionalFields, evalContext]
|
|
41707
41772
|
);
|
|
41708
|
-
const isSectionVisible =
|
|
41773
|
+
const isSectionVisible = React95__default.useCallback(
|
|
41709
41774
|
(section) => {
|
|
41710
41775
|
if (!section.condition) return true;
|
|
41711
41776
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -41781,7 +41846,7 @@ var init_Form = __esm({
|
|
|
41781
41846
|
eventBus.emit(`UI:${onCancel}`);
|
|
41782
41847
|
}
|
|
41783
41848
|
};
|
|
41784
|
-
const renderField =
|
|
41849
|
+
const renderField = React95__default.useCallback(
|
|
41785
41850
|
(field) => {
|
|
41786
41851
|
const fieldName = field.name || field.field;
|
|
41787
41852
|
if (!fieldName) return null;
|
|
@@ -41802,7 +41867,7 @@ var init_Form = __esm({
|
|
|
41802
41867
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
41803
41868
|
);
|
|
41804
41869
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
41805
|
-
const normalizedFields =
|
|
41870
|
+
const normalizedFields = React95__default.useMemo(() => {
|
|
41806
41871
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
41807
41872
|
return effectiveFields.map((field) => {
|
|
41808
41873
|
if (typeof field === "string") {
|
|
@@ -41825,7 +41890,7 @@ var init_Form = __esm({
|
|
|
41825
41890
|
return field;
|
|
41826
41891
|
});
|
|
41827
41892
|
}, [effectiveFields, resolvedEntity]);
|
|
41828
|
-
const schemaFields =
|
|
41893
|
+
const schemaFields = React95__default.useMemo(() => {
|
|
41829
41894
|
if (normalizedFields.length === 0) return null;
|
|
41830
41895
|
if (isDebugEnabled()) {
|
|
41831
41896
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -41835,7 +41900,7 @@ var init_Form = __esm({
|
|
|
41835
41900
|
}
|
|
41836
41901
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
41837
41902
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
41838
|
-
const sectionElements =
|
|
41903
|
+
const sectionElements = React95__default.useMemo(() => {
|
|
41839
41904
|
if (!sections || sections.length === 0) return null;
|
|
41840
41905
|
return sections.map((section) => {
|
|
41841
41906
|
if (!isSectionVisible(section)) {
|
|
@@ -43110,7 +43175,7 @@ var init_List = __esm({
|
|
|
43110
43175
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
43111
43176
|
return [];
|
|
43112
43177
|
}, [entity]);
|
|
43113
|
-
const getItemActions =
|
|
43178
|
+
const getItemActions = React95__default.useCallback(
|
|
43114
43179
|
(item) => {
|
|
43115
43180
|
if (!itemActions) return [];
|
|
43116
43181
|
if (typeof itemActions === "function") {
|
|
@@ -43586,7 +43651,7 @@ var init_MediaGallery = __esm({
|
|
|
43586
43651
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
43587
43652
|
);
|
|
43588
43653
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
43589
|
-
const items =
|
|
43654
|
+
const items = React95__default.useMemo(() => {
|
|
43590
43655
|
if (propItems) return propItems;
|
|
43591
43656
|
if (entityData.length === 0) return [];
|
|
43592
43657
|
return entityData.map((record, idx) => ({
|
|
@@ -43747,7 +43812,7 @@ var init_MediaGallery = __esm({
|
|
|
43747
43812
|
}
|
|
43748
43813
|
});
|
|
43749
43814
|
function extractTitle2(children) {
|
|
43750
|
-
if (!
|
|
43815
|
+
if (!React95__default.isValidElement(children)) return void 0;
|
|
43751
43816
|
const props = children.props;
|
|
43752
43817
|
if (typeof props.title === "string") {
|
|
43753
43818
|
return props.title;
|
|
@@ -44178,7 +44243,7 @@ var init_debugRegistry = __esm({
|
|
|
44178
44243
|
}
|
|
44179
44244
|
});
|
|
44180
44245
|
function useDebugData() {
|
|
44181
|
-
const [data, setData] =
|
|
44246
|
+
const [data, setData] = React95.useState(() => ({
|
|
44182
44247
|
traits: [],
|
|
44183
44248
|
ticks: [],
|
|
44184
44249
|
guards: [],
|
|
@@ -44192,7 +44257,7 @@ function useDebugData() {
|
|
|
44192
44257
|
},
|
|
44193
44258
|
lastUpdate: Date.now()
|
|
44194
44259
|
}));
|
|
44195
|
-
|
|
44260
|
+
React95.useEffect(() => {
|
|
44196
44261
|
const updateData = () => {
|
|
44197
44262
|
setData({
|
|
44198
44263
|
traits: getAllTraits(),
|
|
@@ -44301,12 +44366,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
44301
44366
|
return positions;
|
|
44302
44367
|
}
|
|
44303
44368
|
function WalkMinimap() {
|
|
44304
|
-
const [walkStep, setWalkStep] =
|
|
44305
|
-
const [traits2, setTraits] =
|
|
44306
|
-
const [coveredEdges, setCoveredEdges] =
|
|
44307
|
-
const [completedTraits, setCompletedTraits] =
|
|
44308
|
-
const prevTraitRef =
|
|
44309
|
-
|
|
44369
|
+
const [walkStep, setWalkStep] = React95.useState(null);
|
|
44370
|
+
const [traits2, setTraits] = React95.useState([]);
|
|
44371
|
+
const [coveredEdges, setCoveredEdges] = React95.useState([]);
|
|
44372
|
+
const [completedTraits, setCompletedTraits] = React95.useState(/* @__PURE__ */ new Set());
|
|
44373
|
+
const prevTraitRef = React95.useRef(null);
|
|
44374
|
+
React95.useEffect(() => {
|
|
44310
44375
|
const interval = setInterval(() => {
|
|
44311
44376
|
const w = window;
|
|
44312
44377
|
const step = w.__orbitalWalkStep;
|
|
@@ -44742,15 +44807,15 @@ var init_EntitiesTab = __esm({
|
|
|
44742
44807
|
});
|
|
44743
44808
|
function EventFlowTab({ events: events2 }) {
|
|
44744
44809
|
const { t } = useTranslate();
|
|
44745
|
-
const [filter, setFilter] =
|
|
44746
|
-
const containerRef =
|
|
44747
|
-
const [autoScroll, setAutoScroll] =
|
|
44748
|
-
|
|
44810
|
+
const [filter, setFilter] = React95.useState("all");
|
|
44811
|
+
const containerRef = React95.useRef(null);
|
|
44812
|
+
const [autoScroll, setAutoScroll] = React95.useState(true);
|
|
44813
|
+
React95.useEffect(() => {
|
|
44749
44814
|
if (autoScroll && containerRef.current) {
|
|
44750
44815
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
44751
44816
|
}
|
|
44752
44817
|
}, [events2.length, autoScroll]);
|
|
44753
|
-
const filteredEvents =
|
|
44818
|
+
const filteredEvents = React95.useMemo(() => {
|
|
44754
44819
|
if (filter === "all") return events2;
|
|
44755
44820
|
return events2.filter((e) => e.type === filter);
|
|
44756
44821
|
}, [events2, filter]);
|
|
@@ -44866,7 +44931,7 @@ var init_EventFlowTab = __esm({
|
|
|
44866
44931
|
});
|
|
44867
44932
|
function GuardsPanel({ guards }) {
|
|
44868
44933
|
const { t } = useTranslate();
|
|
44869
|
-
const [filter, setFilter] =
|
|
44934
|
+
const [filter, setFilter] = React95.useState("all");
|
|
44870
44935
|
if (guards.length === 0) {
|
|
44871
44936
|
return /* @__PURE__ */ jsx(
|
|
44872
44937
|
EmptyState,
|
|
@@ -44879,7 +44944,7 @@ function GuardsPanel({ guards }) {
|
|
|
44879
44944
|
}
|
|
44880
44945
|
const passedCount = guards.filter((g) => g.result).length;
|
|
44881
44946
|
const failedCount = guards.length - passedCount;
|
|
44882
|
-
const filteredGuards =
|
|
44947
|
+
const filteredGuards = React95.useMemo(() => {
|
|
44883
44948
|
if (filter === "all") return guards;
|
|
44884
44949
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
44885
44950
|
return guards.filter((g) => !g.result);
|
|
@@ -45042,10 +45107,10 @@ function EffectBadge({ effect }) {
|
|
|
45042
45107
|
}
|
|
45043
45108
|
function TransitionTimeline({ transitions }) {
|
|
45044
45109
|
const { t } = useTranslate();
|
|
45045
|
-
const containerRef =
|
|
45046
|
-
const [autoScroll, setAutoScroll] =
|
|
45047
|
-
const [expandedId, setExpandedId] =
|
|
45048
|
-
|
|
45110
|
+
const containerRef = React95.useRef(null);
|
|
45111
|
+
const [autoScroll, setAutoScroll] = React95.useState(true);
|
|
45112
|
+
const [expandedId, setExpandedId] = React95.useState(null);
|
|
45113
|
+
React95.useEffect(() => {
|
|
45049
45114
|
if (autoScroll && containerRef.current) {
|
|
45050
45115
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
45051
45116
|
}
|
|
@@ -45325,9 +45390,9 @@ function getAllEvents(traits2) {
|
|
|
45325
45390
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
45326
45391
|
const eventBus = useEventBus();
|
|
45327
45392
|
const { t } = useTranslate();
|
|
45328
|
-
const [log13, setLog] =
|
|
45329
|
-
const prevStatesRef =
|
|
45330
|
-
|
|
45393
|
+
const [log13, setLog] = React95.useState([]);
|
|
45394
|
+
const prevStatesRef = React95.useRef(/* @__PURE__ */ new Map());
|
|
45395
|
+
React95.useEffect(() => {
|
|
45331
45396
|
for (const trait of traits2) {
|
|
45332
45397
|
const prev = prevStatesRef.current.get(trait.id);
|
|
45333
45398
|
if (prev && prev !== trait.currentState) {
|
|
@@ -45496,10 +45561,10 @@ function VerifyModePanel({
|
|
|
45496
45561
|
localCount
|
|
45497
45562
|
}) {
|
|
45498
45563
|
const { t } = useTranslate();
|
|
45499
|
-
const [expanded, setExpanded] =
|
|
45500
|
-
const scrollRef =
|
|
45501
|
-
const prevCountRef =
|
|
45502
|
-
|
|
45564
|
+
const [expanded, setExpanded] = React95.useState(true);
|
|
45565
|
+
const scrollRef = React95.useRef(null);
|
|
45566
|
+
const prevCountRef = React95.useRef(0);
|
|
45567
|
+
React95.useEffect(() => {
|
|
45503
45568
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
45504
45569
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
45505
45570
|
}
|
|
@@ -45556,10 +45621,10 @@ function RuntimeDebugger({
|
|
|
45556
45621
|
schema
|
|
45557
45622
|
}) {
|
|
45558
45623
|
const { t } = useTranslate();
|
|
45559
|
-
const [isCollapsed, setIsCollapsed] =
|
|
45560
|
-
const [isVisible, setIsVisible] =
|
|
45624
|
+
const [isCollapsed, setIsCollapsed] = React95.useState(mode === "verify" ? true : defaultCollapsed);
|
|
45625
|
+
const [isVisible, setIsVisible] = React95.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
45561
45626
|
const debugData = useDebugData();
|
|
45562
|
-
|
|
45627
|
+
React95.useEffect(() => {
|
|
45563
45628
|
if (mode === "inline") return;
|
|
45564
45629
|
return onDebugToggle((enabled) => {
|
|
45565
45630
|
setIsVisible(enabled);
|
|
@@ -45568,7 +45633,7 @@ function RuntimeDebugger({
|
|
|
45568
45633
|
}
|
|
45569
45634
|
});
|
|
45570
45635
|
}, [mode]);
|
|
45571
|
-
|
|
45636
|
+
React95.useEffect(() => {
|
|
45572
45637
|
if (mode === "inline") return;
|
|
45573
45638
|
const handleKeyDown = (e) => {
|
|
45574
45639
|
if (e.key === "`" && isVisible) {
|
|
@@ -45583,7 +45648,7 @@ function RuntimeDebugger({
|
|
|
45583
45648
|
if (!isVisible) {
|
|
45584
45649
|
return null;
|
|
45585
45650
|
}
|
|
45586
|
-
const
|
|
45651
|
+
const positionClasses = {
|
|
45587
45652
|
"bottom-right": "bottom-4 right-4",
|
|
45588
45653
|
"bottom-left": "bottom-4 left-4",
|
|
45589
45654
|
"top-right": "top-4 right-4",
|
|
@@ -45712,7 +45777,7 @@ function RuntimeDebugger({
|
|
|
45712
45777
|
className: cn(
|
|
45713
45778
|
"runtime-debugger",
|
|
45714
45779
|
"fixed",
|
|
45715
|
-
|
|
45780
|
+
positionClasses[position],
|
|
45716
45781
|
isCollapsed ? "runtime-debugger--collapsed" : "runtime-debugger--expanded",
|
|
45717
45782
|
className
|
|
45718
45783
|
),
|
|
@@ -46017,7 +46082,7 @@ function SequenceBar({
|
|
|
46017
46082
|
onSlotRemove(index);
|
|
46018
46083
|
}, [onSlotRemove, playing]);
|
|
46019
46084
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
46020
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
46085
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React95__default.Fragment, { children: [
|
|
46021
46086
|
i > 0 && /* @__PURE__ */ jsx(
|
|
46022
46087
|
Typography,
|
|
46023
46088
|
{
|
|
@@ -46996,7 +47061,7 @@ var init_StatCard = __esm({
|
|
|
46996
47061
|
const labelToUse = propLabel ?? propTitle;
|
|
46997
47062
|
const eventBus = useEventBus();
|
|
46998
47063
|
const { t } = useTranslate();
|
|
46999
|
-
const handleActionClick =
|
|
47064
|
+
const handleActionClick = React95__default.useCallback(() => {
|
|
47000
47065
|
if (action?.event) {
|
|
47001
47066
|
eventBus.emit(`UI:${action.event}`, {});
|
|
47002
47067
|
}
|
|
@@ -47007,7 +47072,7 @@ var init_StatCard = __esm({
|
|
|
47007
47072
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
47008
47073
|
const isLoading = externalLoading ?? false;
|
|
47009
47074
|
const error = externalError;
|
|
47010
|
-
const computeMetricValue =
|
|
47075
|
+
const computeMetricValue = React95__default.useCallback(
|
|
47011
47076
|
(metric, items) => {
|
|
47012
47077
|
if (metric.value !== void 0) {
|
|
47013
47078
|
return metric.value;
|
|
@@ -47046,7 +47111,7 @@ var init_StatCard = __esm({
|
|
|
47046
47111
|
},
|
|
47047
47112
|
[]
|
|
47048
47113
|
);
|
|
47049
|
-
const schemaStats =
|
|
47114
|
+
const schemaStats = React95__default.useMemo(() => {
|
|
47050
47115
|
if (!metrics || metrics.length === 0) return null;
|
|
47051
47116
|
return metrics.map((metric) => ({
|
|
47052
47117
|
label: metric.label,
|
|
@@ -47054,7 +47119,7 @@ var init_StatCard = __esm({
|
|
|
47054
47119
|
format: metric.format
|
|
47055
47120
|
}));
|
|
47056
47121
|
}, [metrics, data, computeMetricValue]);
|
|
47057
|
-
const calculatedTrend =
|
|
47122
|
+
const calculatedTrend = React95__default.useMemo(() => {
|
|
47058
47123
|
if (manualTrend !== void 0) return manualTrend;
|
|
47059
47124
|
if (previousValue === void 0 || currentValue === void 0)
|
|
47060
47125
|
return void 0;
|
|
@@ -47988,7 +48053,7 @@ var init_Timeline = __esm({
|
|
|
47988
48053
|
}) => {
|
|
47989
48054
|
const { t } = useTranslate();
|
|
47990
48055
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
47991
|
-
const items =
|
|
48056
|
+
const items = React95__default.useMemo(() => {
|
|
47992
48057
|
if (propItems) return propItems;
|
|
47993
48058
|
if (entityData.length === 0) return [];
|
|
47994
48059
|
return entityData.map((record, idx) => {
|
|
@@ -48095,7 +48160,7 @@ var init_Timeline = __esm({
|
|
|
48095
48160
|
}
|
|
48096
48161
|
});
|
|
48097
48162
|
function extractToastProps(children) {
|
|
48098
|
-
if (!
|
|
48163
|
+
if (!React95__default.isValidElement(children)) {
|
|
48099
48164
|
if (typeof children === "string") {
|
|
48100
48165
|
return { message: children };
|
|
48101
48166
|
}
|
|
@@ -48133,7 +48198,7 @@ var init_ToastSlot = __esm({
|
|
|
48133
48198
|
eventBus.emit("UI:CLOSE");
|
|
48134
48199
|
};
|
|
48135
48200
|
if (!isVisible) return null;
|
|
48136
|
-
const isCustomContent =
|
|
48201
|
+
const isCustomContent = React95__default.isValidElement(children) && !message;
|
|
48137
48202
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
48138
48203
|
Toast,
|
|
48139
48204
|
{
|
|
@@ -48643,12 +48708,12 @@ var init_WorldMapTemplate = __esm({
|
|
|
48643
48708
|
}
|
|
48644
48709
|
});
|
|
48645
48710
|
function lazyThree(name, loader) {
|
|
48646
|
-
const Lazy =
|
|
48711
|
+
const Lazy = React95__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
48647
48712
|
function ThreeWrapper(props) {
|
|
48648
|
-
return
|
|
48649
|
-
|
|
48713
|
+
return React95__default.createElement(
|
|
48714
|
+
React95__default.Suspense,
|
|
48650
48715
|
{ fallback: null },
|
|
48651
|
-
|
|
48716
|
+
React95__default.createElement(Lazy, props)
|
|
48652
48717
|
);
|
|
48653
48718
|
}
|
|
48654
48719
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -49264,7 +49329,7 @@ function SuspenseConfigProvider({
|
|
|
49264
49329
|
config,
|
|
49265
49330
|
children
|
|
49266
49331
|
}) {
|
|
49267
|
-
return
|
|
49332
|
+
return React95__default.createElement(
|
|
49268
49333
|
SuspenseConfigContext.Provider,
|
|
49269
49334
|
{ value: config },
|
|
49270
49335
|
children
|
|
@@ -49339,6 +49404,9 @@ function renderContainedPortal(t, slot, content, onDismiss) {
|
|
|
49339
49404
|
const slotId = `slot-${slot}`;
|
|
49340
49405
|
switch (slot) {
|
|
49341
49406
|
case "modal":
|
|
49407
|
+
if (SELF_OVERLAY_PATTERNS.has(content.pattern)) {
|
|
49408
|
+
return /* @__PURE__ */ jsx(Box, { id: slotId, className: "contents", children: slotContent });
|
|
49409
|
+
}
|
|
49342
49410
|
return /* @__PURE__ */ jsx(
|
|
49343
49411
|
Box,
|
|
49344
49412
|
{
|
|
@@ -49600,8 +49668,8 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
49600
49668
|
const slotId = `slot-${slot}`;
|
|
49601
49669
|
let wrapper;
|
|
49602
49670
|
switch (slot) {
|
|
49603
|
-
case "modal":
|
|
49604
|
-
|
|
49671
|
+
case "modal": {
|
|
49672
|
+
const innerContent = /* @__PURE__ */ jsx(
|
|
49605
49673
|
Box,
|
|
49606
49674
|
{
|
|
49607
49675
|
id: slotId,
|
|
@@ -49610,8 +49678,10 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
49610
49678
|
"data-source-trait": sourceTrait,
|
|
49611
49679
|
children
|
|
49612
49680
|
}
|
|
49613
|
-
)
|
|
49681
|
+
);
|
|
49682
|
+
wrapper = pattern !== void 0 && SELF_OVERLAY_PATTERNS.has(pattern) ? innerContent : /* @__PURE__ */ jsx(Modal, { isOpen: true, onClose: handleDismiss, showCloseButton: true, size: "lg", children: innerContent });
|
|
49614
49683
|
break;
|
|
49684
|
+
}
|
|
49615
49685
|
case "drawer":
|
|
49616
49686
|
wrapper = /* @__PURE__ */ jsx(Drawer, { isOpen: true, onClose: handleDismiss, position: "right", children: /* @__PURE__ */ jsx(
|
|
49617
49687
|
Box,
|
|
@@ -49669,7 +49739,7 @@ function SlotPortal({
|
|
|
49669
49739
|
let wrapper;
|
|
49670
49740
|
switch (slot) {
|
|
49671
49741
|
case "modal":
|
|
49672
|
-
wrapper = /* @__PURE__ */ jsx(
|
|
49742
|
+
wrapper = SELF_OVERLAY_PATTERNS.has(content.pattern) ? /* @__PURE__ */ jsx(Box, { id: slotId, children: slotContent }) : /* @__PURE__ */ jsx(
|
|
49673
49743
|
Modal,
|
|
49674
49744
|
{
|
|
49675
49745
|
isOpen: true,
|
|
@@ -49749,7 +49819,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
49749
49819
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
49750
49820
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
49751
49821
|
}
|
|
49752
|
-
return /* @__PURE__ */ jsx(
|
|
49822
|
+
return /* @__PURE__ */ jsx(React95__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
49753
49823
|
}
|
|
49754
49824
|
if (!child || typeof child !== "object") return null;
|
|
49755
49825
|
const childId = `${parentId}-${index}`;
|
|
@@ -49789,14 +49859,14 @@ function isPatternConfig(value) {
|
|
|
49789
49859
|
if (value === null || value === void 0) return false;
|
|
49790
49860
|
if (typeof value !== "object") return false;
|
|
49791
49861
|
if (Array.isArray(value)) return false;
|
|
49792
|
-
if (
|
|
49862
|
+
if (React95__default.isValidElement(value)) return false;
|
|
49793
49863
|
if (value instanceof Date) return false;
|
|
49794
49864
|
if (typeof value === "function") return false;
|
|
49795
49865
|
const record = value;
|
|
49796
49866
|
return "type" in record && typeof record.type === "string";
|
|
49797
49867
|
}
|
|
49798
49868
|
function isPlainConfigObject(value) {
|
|
49799
|
-
if (
|
|
49869
|
+
if (React95__default.isValidElement(value)) return false;
|
|
49800
49870
|
if (value instanceof Date) return false;
|
|
49801
49871
|
const proto = Object.getPrototypeOf(value);
|
|
49802
49872
|
return proto === Object.prototype || proto === null;
|
|
@@ -50049,7 +50119,7 @@ function UISlotRenderer({
|
|
|
50049
50119
|
}
|
|
50050
50120
|
return wrapped;
|
|
50051
50121
|
}
|
|
50052
|
-
var scopeWrapLog, TRAIT_BINDING_RE, SuspenseConfigContext, SlotContainedContext, SLOT_SKELETON_MAP, FORM_PATTERNS, PATTERNS_WITH_CHILDREN;
|
|
50122
|
+
var scopeWrapLog, TRAIT_BINDING_RE, SuspenseConfigContext, SlotContainedContext, SLOT_SKELETON_MAP, FORM_PATTERNS, SELF_OVERLAY_PATTERNS, PATTERNS_WITH_CHILDREN;
|
|
50053
50123
|
var init_UISlotRenderer = __esm({
|
|
50054
50124
|
"components/core/organisms/UISlotRenderer.tsx"() {
|
|
50055
50125
|
"use client";
|
|
@@ -50085,6 +50155,7 @@ var init_UISlotRenderer = __esm({
|
|
|
50085
50155
|
"inline-edit-form",
|
|
50086
50156
|
"wizard-step"
|
|
50087
50157
|
]);
|
|
50158
|
+
SELF_OVERLAY_PATTERNS = /* @__PURE__ */ new Set(["modal", "confirm-dialog"]);
|
|
50088
50159
|
PATTERNS_WITH_CHILDREN = /* @__PURE__ */ new Set([
|
|
50089
50160
|
"stack",
|
|
50090
50161
|
"vstack",
|
|
@@ -50284,7 +50355,7 @@ var AvlTransition = ({
|
|
|
50284
50355
|
opacity = 1,
|
|
50285
50356
|
className
|
|
50286
50357
|
}) => {
|
|
50287
|
-
const ids =
|
|
50358
|
+
const ids = React95__default.useMemo(() => {
|
|
50288
50359
|
avlTransitionId += 1;
|
|
50289
50360
|
return { arrow: `avl-tr-${avlTransitionId}-arrow` };
|
|
50290
50361
|
}, []);
|
|
@@ -50845,7 +50916,7 @@ var AvlStateMachine = ({
|
|
|
50845
50916
|
color = "var(--color-primary)",
|
|
50846
50917
|
animated = false
|
|
50847
50918
|
}) => {
|
|
50848
|
-
const ids =
|
|
50919
|
+
const ids = React95__default.useMemo(() => {
|
|
50849
50920
|
avlSmId += 1;
|
|
50850
50921
|
const base = `avl-sm-${avlSmId}`;
|
|
50851
50922
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -51044,7 +51115,7 @@ var AvlOrbitalUnit = ({
|
|
|
51044
51115
|
color = "var(--color-primary)",
|
|
51045
51116
|
animated = false
|
|
51046
51117
|
}) => {
|
|
51047
|
-
const ids =
|
|
51118
|
+
const ids = React95__default.useMemo(() => {
|
|
51048
51119
|
avlOuId += 1;
|
|
51049
51120
|
const base = `avl-ou-${avlOuId}`;
|
|
51050
51121
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -51140,7 +51211,7 @@ var AvlClosedCircuit = ({
|
|
|
51140
51211
|
color = "var(--color-primary)",
|
|
51141
51212
|
animated = false
|
|
51142
51213
|
}) => {
|
|
51143
|
-
const ids =
|
|
51214
|
+
const ids = React95__default.useMemo(() => {
|
|
51144
51215
|
avlCcId += 1;
|
|
51145
51216
|
const base = `avl-cc-${avlCcId}`;
|
|
51146
51217
|
return { glow: `${base}-glow`, grad: `${base}-grad`, arrow: `${base}-arrow` };
|
|
@@ -51295,7 +51366,7 @@ var AvlEmitListen = ({
|
|
|
51295
51366
|
color = "var(--color-primary)",
|
|
51296
51367
|
animated = false
|
|
51297
51368
|
}) => {
|
|
51298
|
-
const ids =
|
|
51369
|
+
const ids = React95__default.useMemo(() => {
|
|
51299
51370
|
avlElId += 1;
|
|
51300
51371
|
const base = `avl-el-${avlElId}`;
|
|
51301
51372
|
return { arrow: `${base}-arrow`, grad: `${base}-grad` };
|
|
@@ -51569,7 +51640,7 @@ function renderNode(node, color, glowId) {
|
|
|
51569
51640
|
const baseR = node.type === "operator" ? 20 : 16;
|
|
51570
51641
|
const r2 = Math.max(baseR, labelLen * 3.5 + 6);
|
|
51571
51642
|
const nc = nodeColor(node.type, color);
|
|
51572
|
-
return /* @__PURE__ */ jsxs(
|
|
51643
|
+
return /* @__PURE__ */ jsxs(React95__default.Fragment, { children: [
|
|
51573
51644
|
node.children.map((child, i) => {
|
|
51574
51645
|
const childR = Math.max(
|
|
51575
51646
|
child.type === "operator" ? 20 : 16,
|
|
@@ -51626,7 +51697,7 @@ var AvlExprTree = ({
|
|
|
51626
51697
|
className,
|
|
51627
51698
|
color = "var(--color-primary)"
|
|
51628
51699
|
}) => {
|
|
51629
|
-
const ids =
|
|
51700
|
+
const ids = React95__default.useMemo(() => {
|
|
51630
51701
|
avlEtId += 1;
|
|
51631
51702
|
return { glow: `avl-et-${avlEtId}-glow` };
|
|
51632
51703
|
}, []);
|
|
@@ -52450,7 +52521,7 @@ var SystemNode = ({ data }) => {
|
|
|
52450
52521
|
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) => {
|
|
52451
52522
|
const tc = transitionCounts[s.name] ?? 0;
|
|
52452
52523
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
52453
|
-
return /* @__PURE__ */ jsxs(
|
|
52524
|
+
return /* @__PURE__ */ jsxs(React95__default.Fragment, { children: [
|
|
52454
52525
|
/* @__PURE__ */ jsx(AvlState, { x: i * 14 + 1, y: 1, width: 10, height: 8, name: "", role, isInitial: s.isInitial, isTerminal: s.isTerminal }),
|
|
52455
52526
|
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 })
|
|
52456
52527
|
] }, s.name);
|
|
@@ -53602,7 +53673,7 @@ function resolveLambdaBindings(body, params, item, index) {
|
|
|
53602
53673
|
if (Array.isArray(body)) {
|
|
53603
53674
|
return body.map((b) => recur(b));
|
|
53604
53675
|
}
|
|
53605
|
-
if (body !== null && typeof body === "object" && !
|
|
53676
|
+
if (body !== null && typeof body === "object" && !React95__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
53606
53677
|
const out = {};
|
|
53607
53678
|
for (const [k, v] of Object.entries(body)) {
|
|
53608
53679
|
out[k] = recur(v);
|
|
@@ -53621,7 +53692,7 @@ function getSlotContentRenderer2() {
|
|
|
53621
53692
|
function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
53622
53693
|
return (item, index) => {
|
|
53623
53694
|
const resolvedBody = resolveLambdaBindings(lambdaBody, params, item, index);
|
|
53624
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
53695
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React95__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
53625
53696
|
return null;
|
|
53626
53697
|
}
|
|
53627
53698
|
const record = resolvedBody;
|
|
@@ -53640,7 +53711,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
53640
53711
|
props: childProps,
|
|
53641
53712
|
priority: 0
|
|
53642
53713
|
};
|
|
53643
|
-
return
|
|
53714
|
+
return React95__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
53644
53715
|
};
|
|
53645
53716
|
}
|
|
53646
53717
|
function convertNode(node, callerKey) {
|
|
@@ -53659,7 +53730,7 @@ function convertNode(node, callerKey) {
|
|
|
53659
53730
|
});
|
|
53660
53731
|
return anyChanged ? mapped : node;
|
|
53661
53732
|
}
|
|
53662
|
-
if (typeof node === "object" && !
|
|
53733
|
+
if (typeof node === "object" && !React95__default.isValidElement(node) && !(node instanceof Date)) {
|
|
53663
53734
|
return convertObjectProps(node);
|
|
53664
53735
|
}
|
|
53665
53736
|
return node;
|
|
@@ -55672,8 +55743,8 @@ function CanvasDndProvider({
|
|
|
55672
55743
|
}) {
|
|
55673
55744
|
const eventBus = useEventBus();
|
|
55674
55745
|
const sensors = useAlmadarDndSensors(false);
|
|
55675
|
-
const [activePayload, setActivePayload] =
|
|
55676
|
-
const handleDragStart =
|
|
55746
|
+
const [activePayload, setActivePayload] = React95__default.useState(null);
|
|
55747
|
+
const handleDragStart = React95__default.useCallback((e) => {
|
|
55677
55748
|
const data = e.active.data.current;
|
|
55678
55749
|
const payload = data?.payload;
|
|
55679
55750
|
if (payload) {
|
|
@@ -55684,7 +55755,7 @@ function CanvasDndProvider({
|
|
|
55684
55755
|
log11.warn("dragStart:missing-payload", { id: e.active.id });
|
|
55685
55756
|
}
|
|
55686
55757
|
}, [eventBus]);
|
|
55687
|
-
const handleDragEnd =
|
|
55758
|
+
const handleDragEnd = React95__default.useCallback((e) => {
|
|
55688
55759
|
setActivePayload(null);
|
|
55689
55760
|
const activeData = e.active.data.current;
|
|
55690
55761
|
const payload = activeData?.payload;
|
|
@@ -55713,7 +55784,7 @@ function CanvasDndProvider({
|
|
|
55713
55784
|
const suppressed = onDrop ? onDrop(drop) === true : false;
|
|
55714
55785
|
if (!suppressed) defaultEmit(eventBus, drop);
|
|
55715
55786
|
}, [eventBus, onDrop]);
|
|
55716
|
-
const handleDragCancel =
|
|
55787
|
+
const handleDragCancel = React95__default.useCallback(() => {
|
|
55717
55788
|
setActivePayload(null);
|
|
55718
55789
|
log11.info("dragCancel");
|
|
55719
55790
|
}, []);
|
|
@@ -56467,7 +56538,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
56467
56538
|
}
|
|
56468
56539
|
);
|
|
56469
56540
|
};
|
|
56470
|
-
var OrbPreviewNode =
|
|
56541
|
+
var OrbPreviewNode = React95__default.memo(OrbPreviewNodeInner);
|
|
56471
56542
|
OrbPreviewNode.displayName = "OrbPreviewNode";
|
|
56472
56543
|
orbPreviewLog.debug("export-resolved", () => ({
|
|
56473
56544
|
type: typeof OrbPreviewNode,
|
|
@@ -56572,7 +56643,7 @@ var EventFlowEdgeInner = (props) => {
|
|
|
56572
56643
|
) })
|
|
56573
56644
|
] });
|
|
56574
56645
|
};
|
|
56575
|
-
var EventFlowEdge =
|
|
56646
|
+
var EventFlowEdge = React95__default.memo(EventFlowEdgeInner);
|
|
56576
56647
|
EventFlowEdge.displayName = "EventFlowEdge";
|
|
56577
56648
|
|
|
56578
56649
|
// components/avl/molecules/BehaviorComposeNode.tsx
|
|
@@ -56719,7 +56790,7 @@ var BehaviorComposeNodeInner = (props) => {
|
|
|
56719
56790
|
}
|
|
56720
56791
|
);
|
|
56721
56792
|
};
|
|
56722
|
-
var BehaviorComposeNode =
|
|
56793
|
+
var BehaviorComposeNode = React95__default.memo(BehaviorComposeNodeInner);
|
|
56723
56794
|
BehaviorComposeNode.displayName = "BehaviorComposeNode";
|
|
56724
56795
|
|
|
56725
56796
|
// components/avl/molecules/avl-behavior-compose-converter.ts
|
|
@@ -57731,7 +57802,7 @@ var TraitCardNodeInner = (props) => {
|
|
|
57731
57802
|
}
|
|
57732
57803
|
);
|
|
57733
57804
|
};
|
|
57734
|
-
var TraitCardNode =
|
|
57805
|
+
var TraitCardNode = React95__default.memo(TraitCardNodeInner);
|
|
57735
57806
|
TraitCardNode.displayName = "TraitCardNode";
|
|
57736
57807
|
|
|
57737
57808
|
// components/avl/organisms/FlowCanvas.tsx
|
|
@@ -57804,7 +57875,7 @@ function FlowCanvasInner({
|
|
|
57804
57875
|
initialOrbital
|
|
57805
57876
|
);
|
|
57806
57877
|
const [expandedBehaviorAlias, setExpandedBehaviorAlias] = useState(void 0);
|
|
57807
|
-
const screenSizeUserOverrideRef =
|
|
57878
|
+
const screenSizeUserOverrideRef = React95__default.useRef(false);
|
|
57808
57879
|
const [screenSize, setScreenSize] = useState(
|
|
57809
57880
|
() => typeof window === "undefined" ? "laptop" : detectScreenSize(window.innerWidth)
|
|
57810
57881
|
);
|
|
@@ -58188,7 +58259,7 @@ var ZoomBreadcrumb = ({
|
|
|
58188
58259
|
if (eventName && band === "detail") {
|
|
58189
58260
|
segments.push({ icon: "\u26A1", label: eventName });
|
|
58190
58261
|
}
|
|
58191
|
-
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(
|
|
58262
|
+
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(React95__default.Fragment, { children: [
|
|
58192
58263
|
i > 0 && /* @__PURE__ */ jsx("span", { className: "opacity-40", children: ">" }),
|
|
58193
58264
|
/* @__PURE__ */ jsx("span", { className: "opacity-60", children: seg.icon }),
|
|
58194
58265
|
/* @__PURE__ */ jsx("span", { children: seg.label })
|
|
@@ -58529,7 +58600,7 @@ var EventWireOverlay = ({
|
|
|
58529
58600
|
containerW,
|
|
58530
58601
|
containerH
|
|
58531
58602
|
}) => {
|
|
58532
|
-
const ids =
|
|
58603
|
+
const ids = React95__default.useMemo(() => {
|
|
58533
58604
|
avlOczWireId += 1;
|
|
58534
58605
|
return { arrow: `avl-ocz-wire-${avlOczWireId}-arrow` };
|
|
58535
58606
|
}, []);
|
|
@@ -58896,7 +58967,7 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
58896
58967
|
borderRadius: 6,
|
|
58897
58968
|
border: `1px solid ${color}`
|
|
58898
58969
|
},
|
|
58899
|
-
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(
|
|
58970
|
+
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React95__default.Fragment, { children: [
|
|
58900
58971
|
i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", style: { opacity: 0.5, color }, children: "/" }),
|
|
58901
58972
|
i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
|
|
58902
58973
|
Box,
|