@almadar/ui 5.76.1 → 5.76.4
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 +1817 -1431
- package/dist/avl/index.js +618 -232
- package/dist/components/game/3d/index.cjs +7047 -0
- package/dist/components/game/3d/index.css +503 -0
- package/dist/components/game/3d/index.d.ts +13 -0
- package/dist/components/game/3d/index.js +6971 -0
- package/dist/components/game/3d/patterns.d.ts +20 -0
- package/dist/components/index.cjs +166 -49
- package/dist/components/index.js +166 -40
- package/dist/context/index.cjs +690 -47
- package/dist/context/index.js +682 -2
- package/dist/providers/index.cjs +2196 -1305
- package/dist/providers/index.d.ts +5 -3
- package/dist/providers/index.js +1117 -212
- package/dist/runtime/index.cjs +1678 -1292
- package/dist/runtime/index.js +598 -212
- package/package.json +1 -1
package/dist/avl/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import { getAllPages, OrbitalProvider, EventBusContext, useTraitScope, ServerBridgeProvider, VerificationProvider, EntitySchemaProvider, OrbitalThemeProvider, useServerBridge, useEntitySchema, useEntitySchemaOptional, TraitScopeProvider, useCurrentPagePath
|
|
2
|
+
import * as React114 from 'react';
|
|
3
|
+
import React114__default, { createContext, useState, useMemo, useRef, useEffect, useContext, useCallback, Suspense, useLayoutEffect, Profiler, useReducer, useSyncExternalStore, lazy, useId } from 'react';
|
|
4
|
+
import { getAllPages, OrbitalProvider, EventBusContext, useTraitScope, ServerBridgeProvider, VerificationProvider, EntitySchemaProvider, OrbitalThemeProvider, useServerBridge, useEntitySchema, useEntitySchemaOptional, TraitScopeProvider, useCurrentPagePath } from '@almadar/ui/providers';
|
|
5
5
|
import { createLogger, isLogLevelEnabled } from '@almadar/logger';
|
|
6
6
|
import ELK from 'elkjs/lib/elk.bundled.js';
|
|
7
7
|
import { MarkerType, useReactFlow, Handle, Position, getBezierPath, EdgeLabelRenderer, useNodeId, ReactFlowProvider, BaseEdge, useNodesState, useEdgesState, ReactFlow, Controls, Background, BackgroundVariant } from '@xyflow/react';
|
|
@@ -3174,7 +3174,7 @@ var init_Typography = __esm({
|
|
|
3174
3174
|
}) => {
|
|
3175
3175
|
const variant = variantProp ?? (level ? `h${level}` : "body1");
|
|
3176
3176
|
const Component = as || defaultElements[variant];
|
|
3177
|
-
return
|
|
3177
|
+
return React114__default.createElement(
|
|
3178
3178
|
Component,
|
|
3179
3179
|
{
|
|
3180
3180
|
id,
|
|
@@ -3511,7 +3511,7 @@ var init_Box = __esm({
|
|
|
3511
3511
|
fixed: "fixed",
|
|
3512
3512
|
sticky: "sticky"
|
|
3513
3513
|
};
|
|
3514
|
-
Box =
|
|
3514
|
+
Box = React114__default.forwardRef(
|
|
3515
3515
|
({
|
|
3516
3516
|
padding,
|
|
3517
3517
|
paddingX,
|
|
@@ -3576,7 +3576,7 @@ var init_Box = __esm({
|
|
|
3576
3576
|
onPointerDown?.(e);
|
|
3577
3577
|
}, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
|
|
3578
3578
|
const isClickable = action || onClick;
|
|
3579
|
-
return
|
|
3579
|
+
return React114__default.createElement(
|
|
3580
3580
|
Component,
|
|
3581
3581
|
{
|
|
3582
3582
|
ref,
|
|
@@ -3672,7 +3672,7 @@ var init_Stack = __esm({
|
|
|
3672
3672
|
};
|
|
3673
3673
|
const isHorizontal = direction === "horizontal";
|
|
3674
3674
|
const directionClass = responsive && isHorizontal ? reverse ? "flex-col-reverse md:flex-row-reverse" : "flex-col md:flex-row" : isHorizontal ? reverse ? "flex-row-reverse" : "flex-row" : reverse ? "flex-col-reverse" : "flex-col";
|
|
3675
|
-
return
|
|
3675
|
+
return React114__default.createElement(
|
|
3676
3676
|
Component,
|
|
3677
3677
|
{
|
|
3678
3678
|
className: cn(
|
|
@@ -4164,7 +4164,7 @@ var init_MiniStateMachine = __esm({
|
|
|
4164
4164
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
4165
4165
|
const tc = transitionCounts[s.name] ?? 0;
|
|
4166
4166
|
const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
4167
|
-
return /* @__PURE__ */ jsxs(
|
|
4167
|
+
return /* @__PURE__ */ jsxs(React114__default.Fragment, { children: [
|
|
4168
4168
|
/* @__PURE__ */ jsx(
|
|
4169
4169
|
AvlState,
|
|
4170
4170
|
{
|
|
@@ -4494,7 +4494,7 @@ function loadLib(key, importer) {
|
|
|
4494
4494
|
return p2;
|
|
4495
4495
|
}
|
|
4496
4496
|
function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
|
|
4497
|
-
const Lazy =
|
|
4497
|
+
const Lazy = React114__default.lazy(async () => {
|
|
4498
4498
|
const lib = await loadLib(libKey, importer);
|
|
4499
4499
|
const Comp = pick(lib);
|
|
4500
4500
|
if (!Comp) {
|
|
@@ -4504,7 +4504,7 @@ function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
|
|
|
4504
4504
|
return { default: Comp };
|
|
4505
4505
|
});
|
|
4506
4506
|
const Wrapped = (props) => /* @__PURE__ */ jsx(
|
|
4507
|
-
|
|
4507
|
+
React114__default.Suspense,
|
|
4508
4508
|
{
|
|
4509
4509
|
fallback: /* @__PURE__ */ jsx(
|
|
4510
4510
|
"span",
|
|
@@ -5231,7 +5231,7 @@ var init_Icon = __esm({
|
|
|
5231
5231
|
const directIcon = typeof icon === "string" ? void 0 : icon;
|
|
5232
5232
|
const effectiveName = typeof icon === "string" ? icon : name;
|
|
5233
5233
|
const family = useIconFamily();
|
|
5234
|
-
const RenderedComponent =
|
|
5234
|
+
const RenderedComponent = React114__default.useMemo(() => {
|
|
5235
5235
|
if (directIcon) return null;
|
|
5236
5236
|
return effectiveName ? resolveIconForFamily(effectiveName, family) : null;
|
|
5237
5237
|
}, [directIcon, effectiveName, family]);
|
|
@@ -5293,7 +5293,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
5293
5293
|
const IconComp = value;
|
|
5294
5294
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
5295
5295
|
}
|
|
5296
|
-
if (
|
|
5296
|
+
if (React114__default.isValidElement(value)) {
|
|
5297
5297
|
return value;
|
|
5298
5298
|
}
|
|
5299
5299
|
if (typeof value === "object" && value !== null && isIconLike(value)) {
|
|
@@ -5369,7 +5369,7 @@ var init_Button = __esm({
|
|
|
5369
5369
|
md: "h-icon-default w-icon-default",
|
|
5370
5370
|
lg: "h-icon-default w-icon-default"
|
|
5371
5371
|
};
|
|
5372
|
-
Button =
|
|
5372
|
+
Button = React114__default.forwardRef(
|
|
5373
5373
|
({
|
|
5374
5374
|
className,
|
|
5375
5375
|
variant = "primary",
|
|
@@ -5435,7 +5435,7 @@ var Dialog;
|
|
|
5435
5435
|
var init_Dialog = __esm({
|
|
5436
5436
|
"components/core/atoms/Dialog.tsx"() {
|
|
5437
5437
|
init_cn();
|
|
5438
|
-
Dialog =
|
|
5438
|
+
Dialog = React114__default.forwardRef(
|
|
5439
5439
|
({
|
|
5440
5440
|
role = "dialog",
|
|
5441
5441
|
"aria-modal": ariaModal = true,
|
|
@@ -5930,7 +5930,7 @@ var init_Badge = __esm({
|
|
|
5930
5930
|
md: "px-2.5 py-1 text-sm",
|
|
5931
5931
|
lg: "px-3 py-1.5 text-base"
|
|
5932
5932
|
};
|
|
5933
|
-
Badge =
|
|
5933
|
+
Badge = React114__default.forwardRef(
|
|
5934
5934
|
({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
|
|
5935
5935
|
const iconSizes3 = {
|
|
5936
5936
|
sm: "h-icon-default w-icon-default",
|
|
@@ -6266,7 +6266,7 @@ var init_SvgFlow = __esm({
|
|
|
6266
6266
|
width = 100,
|
|
6267
6267
|
height = 100
|
|
6268
6268
|
}) => {
|
|
6269
|
-
const markerId =
|
|
6269
|
+
const markerId = React114__default.useMemo(() => {
|
|
6270
6270
|
flowIdCounter += 1;
|
|
6271
6271
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
6272
6272
|
}, []);
|
|
@@ -6859,7 +6859,7 @@ var init_SvgRing = __esm({
|
|
|
6859
6859
|
width = 100,
|
|
6860
6860
|
height = 100
|
|
6861
6861
|
}) => {
|
|
6862
|
-
const gradientId =
|
|
6862
|
+
const gradientId = React114__default.useMemo(() => {
|
|
6863
6863
|
ringIdCounter += 1;
|
|
6864
6864
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
6865
6865
|
}, []);
|
|
@@ -7040,7 +7040,7 @@ var init_Input = __esm({
|
|
|
7040
7040
|
init_cn();
|
|
7041
7041
|
init_Icon();
|
|
7042
7042
|
init_useEventBus();
|
|
7043
|
-
Input =
|
|
7043
|
+
Input = React114__default.forwardRef(
|
|
7044
7044
|
({
|
|
7045
7045
|
className,
|
|
7046
7046
|
inputType,
|
|
@@ -7200,7 +7200,7 @@ var Label;
|
|
|
7200
7200
|
var init_Label = __esm({
|
|
7201
7201
|
"components/core/atoms/Label.tsx"() {
|
|
7202
7202
|
init_cn();
|
|
7203
|
-
Label =
|
|
7203
|
+
Label = React114__default.forwardRef(
|
|
7204
7204
|
({ className, required, children, ...props }, ref) => {
|
|
7205
7205
|
return /* @__PURE__ */ jsxs(
|
|
7206
7206
|
"label",
|
|
@@ -7227,7 +7227,7 @@ var init_Textarea = __esm({
|
|
|
7227
7227
|
"components/core/atoms/Textarea.tsx"() {
|
|
7228
7228
|
init_cn();
|
|
7229
7229
|
init_useEventBus();
|
|
7230
|
-
Textarea =
|
|
7230
|
+
Textarea = React114__default.forwardRef(
|
|
7231
7231
|
({ className, error, onChange, ...props }, ref) => {
|
|
7232
7232
|
const eventBus = useEventBus();
|
|
7233
7233
|
const handleChange = (e) => {
|
|
@@ -7466,7 +7466,7 @@ var init_Select = __esm({
|
|
|
7466
7466
|
init_cn();
|
|
7467
7467
|
init_Icon();
|
|
7468
7468
|
init_useEventBus();
|
|
7469
|
-
Select =
|
|
7469
|
+
Select = React114__default.forwardRef(
|
|
7470
7470
|
(props, _ref) => {
|
|
7471
7471
|
const { multiple, searchable, clearable } = props;
|
|
7472
7472
|
if (multiple || searchable || clearable) {
|
|
@@ -7483,7 +7483,7 @@ var init_Checkbox = __esm({
|
|
|
7483
7483
|
"components/core/atoms/Checkbox.tsx"() {
|
|
7484
7484
|
init_cn();
|
|
7485
7485
|
init_useEventBus();
|
|
7486
|
-
Checkbox =
|
|
7486
|
+
Checkbox = React114__default.forwardRef(
|
|
7487
7487
|
({ className, label, id, onChange, ...props }, ref) => {
|
|
7488
7488
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
7489
7489
|
const eventBus = useEventBus();
|
|
@@ -7537,7 +7537,7 @@ var init_Spinner = __esm({
|
|
|
7537
7537
|
md: "h-6 w-6",
|
|
7538
7538
|
lg: "h-8 w-8"
|
|
7539
7539
|
};
|
|
7540
|
-
Spinner =
|
|
7540
|
+
Spinner = React114__default.forwardRef(
|
|
7541
7541
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
7542
7542
|
if (overlay) {
|
|
7543
7543
|
return /* @__PURE__ */ jsx(
|
|
@@ -7627,7 +7627,7 @@ var init_Card = __esm({
|
|
|
7627
7627
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
7628
7628
|
"tile-image-first": "p-0 overflow-hidden"
|
|
7629
7629
|
};
|
|
7630
|
-
Card =
|
|
7630
|
+
Card = React114__default.forwardRef(
|
|
7631
7631
|
({
|
|
7632
7632
|
className,
|
|
7633
7633
|
variant = "bordered",
|
|
@@ -7675,9 +7675,9 @@ var init_Card = __esm({
|
|
|
7675
7675
|
}
|
|
7676
7676
|
);
|
|
7677
7677
|
Card.displayName = "Card";
|
|
7678
|
-
CardHeader =
|
|
7678
|
+
CardHeader = React114__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
7679
7679
|
CardHeader.displayName = "CardHeader";
|
|
7680
|
-
CardTitle =
|
|
7680
|
+
CardTitle = React114__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7681
7681
|
"h3",
|
|
7682
7682
|
{
|
|
7683
7683
|
ref,
|
|
@@ -7690,11 +7690,11 @@ var init_Card = __esm({
|
|
|
7690
7690
|
}
|
|
7691
7691
|
));
|
|
7692
7692
|
CardTitle.displayName = "CardTitle";
|
|
7693
|
-
CardContent =
|
|
7693
|
+
CardContent = React114__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
7694
7694
|
CardContent.displayName = "CardContent";
|
|
7695
7695
|
CardBody = CardContent;
|
|
7696
7696
|
CardBody.displayName = "CardBody";
|
|
7697
|
-
CardFooter =
|
|
7697
|
+
CardFooter = React114__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7698
7698
|
"div",
|
|
7699
7699
|
{
|
|
7700
7700
|
ref,
|
|
@@ -7749,7 +7749,7 @@ var init_FilterPill = __esm({
|
|
|
7749
7749
|
md: "w-3.5 h-3.5",
|
|
7750
7750
|
lg: "w-4 h-4"
|
|
7751
7751
|
};
|
|
7752
|
-
FilterPill =
|
|
7752
|
+
FilterPill = React114__default.forwardRef(
|
|
7753
7753
|
({
|
|
7754
7754
|
className,
|
|
7755
7755
|
variant = "default",
|
|
@@ -7878,8 +7878,8 @@ var init_Avatar = __esm({
|
|
|
7878
7878
|
actionPayload
|
|
7879
7879
|
}) => {
|
|
7880
7880
|
const eventBus = useEventBus();
|
|
7881
|
-
const [imgFailed, setImgFailed] =
|
|
7882
|
-
|
|
7881
|
+
const [imgFailed, setImgFailed] = React114__default.useState(false);
|
|
7882
|
+
React114__default.useEffect(() => {
|
|
7883
7883
|
setImgFailed(false);
|
|
7884
7884
|
}, [src]);
|
|
7885
7885
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -7992,7 +7992,7 @@ var init_Center = __esm({
|
|
|
7992
7992
|
as: Component = "div"
|
|
7993
7993
|
}) => {
|
|
7994
7994
|
const mergedStyle = minHeight ? { minHeight, ...style } : style;
|
|
7995
|
-
return
|
|
7995
|
+
return React114__default.createElement(Component, {
|
|
7996
7996
|
className: cn(
|
|
7997
7997
|
inline ? "inline-flex" : "flex",
|
|
7998
7998
|
horizontal && "justify-center",
|
|
@@ -8260,7 +8260,7 @@ var init_Radio = __esm({
|
|
|
8260
8260
|
md: "w-2.5 h-2.5",
|
|
8261
8261
|
lg: "w-3 h-3"
|
|
8262
8262
|
};
|
|
8263
|
-
Radio =
|
|
8263
|
+
Radio = React114__default.forwardRef(
|
|
8264
8264
|
({
|
|
8265
8265
|
label,
|
|
8266
8266
|
helperText,
|
|
@@ -8277,12 +8277,12 @@ var init_Radio = __esm({
|
|
|
8277
8277
|
onChange,
|
|
8278
8278
|
...props
|
|
8279
8279
|
}, ref) => {
|
|
8280
|
-
const reactId =
|
|
8280
|
+
const reactId = React114__default.useId();
|
|
8281
8281
|
const baseId = id || `radio-${reactId}`;
|
|
8282
8282
|
const hasError = !!error;
|
|
8283
8283
|
const eventBus = useEventBus();
|
|
8284
|
-
const [selected, setSelected] =
|
|
8285
|
-
|
|
8284
|
+
const [selected, setSelected] = React114__default.useState(value);
|
|
8285
|
+
React114__default.useEffect(() => {
|
|
8286
8286
|
if (value !== void 0) setSelected(value);
|
|
8287
8287
|
}, [value]);
|
|
8288
8288
|
const pick = (next, e) => {
|
|
@@ -8464,7 +8464,7 @@ var init_Switch = __esm({
|
|
|
8464
8464
|
"components/core/atoms/Switch.tsx"() {
|
|
8465
8465
|
"use client";
|
|
8466
8466
|
init_cn();
|
|
8467
|
-
Switch =
|
|
8467
|
+
Switch = React114.forwardRef(
|
|
8468
8468
|
({
|
|
8469
8469
|
checked,
|
|
8470
8470
|
defaultChecked = false,
|
|
@@ -8475,10 +8475,10 @@ var init_Switch = __esm({
|
|
|
8475
8475
|
name,
|
|
8476
8476
|
className
|
|
8477
8477
|
}, ref) => {
|
|
8478
|
-
const [isChecked, setIsChecked] =
|
|
8478
|
+
const [isChecked, setIsChecked] = React114.useState(
|
|
8479
8479
|
checked !== void 0 ? checked : defaultChecked
|
|
8480
8480
|
);
|
|
8481
|
-
|
|
8481
|
+
React114.useEffect(() => {
|
|
8482
8482
|
if (checked !== void 0) {
|
|
8483
8483
|
setIsChecked(checked);
|
|
8484
8484
|
}
|
|
@@ -8752,7 +8752,7 @@ var Aside;
|
|
|
8752
8752
|
var init_Aside = __esm({
|
|
8753
8753
|
"components/core/atoms/Aside.tsx"() {
|
|
8754
8754
|
init_cn();
|
|
8755
|
-
Aside =
|
|
8755
|
+
Aside = React114__default.forwardRef(
|
|
8756
8756
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
8757
8757
|
);
|
|
8758
8758
|
Aside.displayName = "Aside";
|
|
@@ -8831,9 +8831,9 @@ var init_LawReferenceTooltip = __esm({
|
|
|
8831
8831
|
className
|
|
8832
8832
|
}) => {
|
|
8833
8833
|
const { t } = useTranslate();
|
|
8834
|
-
const [isVisible, setIsVisible] =
|
|
8835
|
-
const timeoutRef =
|
|
8836
|
-
const triggerRef =
|
|
8834
|
+
const [isVisible, setIsVisible] = React114__default.useState(false);
|
|
8835
|
+
const timeoutRef = React114__default.useRef(null);
|
|
8836
|
+
const triggerRef = React114__default.useRef(null);
|
|
8837
8837
|
const handleMouseEnter = () => {
|
|
8838
8838
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
8839
8839
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -8844,7 +8844,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
8844
8844
|
};
|
|
8845
8845
|
const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
|
|
8846
8846
|
const open = isVisible || revealed;
|
|
8847
|
-
|
|
8847
|
+
React114__default.useEffect(() => {
|
|
8848
8848
|
return () => {
|
|
8849
8849
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
8850
8850
|
};
|
|
@@ -9054,7 +9054,7 @@ var init_StatusDot = __esm({
|
|
|
9054
9054
|
md: "w-2.5 h-2.5",
|
|
9055
9055
|
lg: "w-3 h-3"
|
|
9056
9056
|
};
|
|
9057
|
-
StatusDot =
|
|
9057
|
+
StatusDot = React114__default.forwardRef(
|
|
9058
9058
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
9059
9059
|
return /* @__PURE__ */ jsx(
|
|
9060
9060
|
"span",
|
|
@@ -9108,7 +9108,7 @@ var init_TrendIndicator = __esm({
|
|
|
9108
9108
|
down: "trending-down",
|
|
9109
9109
|
flat: "arrow-right"
|
|
9110
9110
|
};
|
|
9111
|
-
TrendIndicator =
|
|
9111
|
+
TrendIndicator = React114__default.forwardRef(
|
|
9112
9112
|
({
|
|
9113
9113
|
className,
|
|
9114
9114
|
value,
|
|
@@ -9175,7 +9175,7 @@ var init_RangeSlider = __esm({
|
|
|
9175
9175
|
md: "w-4 h-4",
|
|
9176
9176
|
lg: "w-5 h-5"
|
|
9177
9177
|
};
|
|
9178
|
-
RangeSlider =
|
|
9178
|
+
RangeSlider = React114__default.forwardRef(
|
|
9179
9179
|
({
|
|
9180
9180
|
className,
|
|
9181
9181
|
min = 0,
|
|
@@ -9681,7 +9681,7 @@ var init_ContentSection = __esm({
|
|
|
9681
9681
|
md: "py-16",
|
|
9682
9682
|
lg: "py-24"
|
|
9683
9683
|
};
|
|
9684
|
-
ContentSection =
|
|
9684
|
+
ContentSection = React114__default.forwardRef(
|
|
9685
9685
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
9686
9686
|
return /* @__PURE__ */ jsx(
|
|
9687
9687
|
Box,
|
|
@@ -10215,7 +10215,7 @@ var init_AnimatedReveal = __esm({
|
|
|
10215
10215
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
10216
10216
|
"none": {}
|
|
10217
10217
|
};
|
|
10218
|
-
AnimatedReveal =
|
|
10218
|
+
AnimatedReveal = React114__default.forwardRef(
|
|
10219
10219
|
({
|
|
10220
10220
|
trigger = "scroll",
|
|
10221
10221
|
animation = "fade-up",
|
|
@@ -10375,7 +10375,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
10375
10375
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
10376
10376
|
"use client";
|
|
10377
10377
|
init_cn();
|
|
10378
|
-
AnimatedGraphic =
|
|
10378
|
+
AnimatedGraphic = React114__default.forwardRef(
|
|
10379
10379
|
({
|
|
10380
10380
|
src,
|
|
10381
10381
|
svgContent,
|
|
@@ -10398,7 +10398,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
10398
10398
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
10399
10399
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
10400
10400
|
const prevAnimateRef = useRef(animate);
|
|
10401
|
-
const setRef =
|
|
10401
|
+
const setRef = React114__default.useCallback(
|
|
10402
10402
|
(node) => {
|
|
10403
10403
|
containerRef.current = node;
|
|
10404
10404
|
if (typeof ref === "function") ref(node);
|
|
@@ -12030,7 +12030,7 @@ function GameCard({
|
|
|
12030
12030
|
className
|
|
12031
12031
|
}) {
|
|
12032
12032
|
const eventBus = useEventBus();
|
|
12033
|
-
const handleClick =
|
|
12033
|
+
const handleClick = React114.useCallback(() => {
|
|
12034
12034
|
if (disabled) return;
|
|
12035
12035
|
onClick?.(id);
|
|
12036
12036
|
if (clickEvent) eventBus.emit(`UI:${clickEvent}`, { cardId: id });
|
|
@@ -12302,9 +12302,9 @@ function ControlButton({
|
|
|
12302
12302
|
className
|
|
12303
12303
|
}) {
|
|
12304
12304
|
const eventBus = useEventBus();
|
|
12305
|
-
const [isPressed, setIsPressed] =
|
|
12305
|
+
const [isPressed, setIsPressed] = React114.useState(false);
|
|
12306
12306
|
const actualPressed = pressed ?? isPressed;
|
|
12307
|
-
const handlePointerDown =
|
|
12307
|
+
const handlePointerDown = React114.useCallback(
|
|
12308
12308
|
(e) => {
|
|
12309
12309
|
e.preventDefault();
|
|
12310
12310
|
if (disabled) return;
|
|
@@ -12314,7 +12314,7 @@ function ControlButton({
|
|
|
12314
12314
|
},
|
|
12315
12315
|
[disabled, pressEvent, eventBus, onPress]
|
|
12316
12316
|
);
|
|
12317
|
-
const handlePointerUp =
|
|
12317
|
+
const handlePointerUp = React114.useCallback(
|
|
12318
12318
|
(e) => {
|
|
12319
12319
|
e.preventDefault();
|
|
12320
12320
|
if (disabled) return;
|
|
@@ -12324,7 +12324,7 @@ function ControlButton({
|
|
|
12324
12324
|
},
|
|
12325
12325
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
12326
12326
|
);
|
|
12327
|
-
const handlePointerLeave =
|
|
12327
|
+
const handlePointerLeave = React114.useCallback(
|
|
12328
12328
|
(e) => {
|
|
12329
12329
|
if (isPressed) {
|
|
12330
12330
|
setIsPressed(false);
|
|
@@ -13383,8 +13383,8 @@ function MiniMap({
|
|
|
13383
13383
|
viewportRect = DEFAULT_VIEWPORT,
|
|
13384
13384
|
className
|
|
13385
13385
|
}) {
|
|
13386
|
-
const canvasRef =
|
|
13387
|
-
|
|
13386
|
+
const canvasRef = React114.useRef(null);
|
|
13387
|
+
React114.useEffect(() => {
|
|
13388
13388
|
const canvas = canvasRef.current;
|
|
13389
13389
|
if (!canvas) return;
|
|
13390
13390
|
const ctx = canvas.getContext("2d");
|
|
@@ -13534,8 +13534,8 @@ function ControlGrid({
|
|
|
13534
13534
|
className
|
|
13535
13535
|
}) {
|
|
13536
13536
|
const eventBus = useEventBus();
|
|
13537
|
-
const [active, setActive] =
|
|
13538
|
-
const handlePress =
|
|
13537
|
+
const [active, setActive] = React114.useState(/* @__PURE__ */ new Set());
|
|
13538
|
+
const handlePress = React114.useCallback(
|
|
13539
13539
|
(id) => {
|
|
13540
13540
|
setActive((prev) => new Set(prev).add(id));
|
|
13541
13541
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -13547,7 +13547,7 @@ function ControlGrid({
|
|
|
13547
13547
|
},
|
|
13548
13548
|
[kind, actionEvent, directionEvent, eventBus, onAction, onDirection]
|
|
13549
13549
|
);
|
|
13550
|
-
const handleRelease =
|
|
13550
|
+
const handleRelease = React114.useCallback(
|
|
13551
13551
|
(id) => {
|
|
13552
13552
|
setActive((prev) => {
|
|
13553
13553
|
const next = new Set(prev);
|
|
@@ -13808,7 +13808,7 @@ function InventoryGrid({
|
|
|
13808
13808
|
const eventBus = useEventBus();
|
|
13809
13809
|
const slotCount = totalSlots ?? items.length;
|
|
13810
13810
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
13811
|
-
const handleSelect =
|
|
13811
|
+
const handleSelect = React114.useCallback(
|
|
13812
13812
|
(id) => {
|
|
13813
13813
|
onSelect?.(id);
|
|
13814
13814
|
if (selectEvent) {
|
|
@@ -14011,7 +14011,7 @@ function GameMenu({
|
|
|
14011
14011
|
} catch {
|
|
14012
14012
|
}
|
|
14013
14013
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
14014
|
-
const handleOptionClick =
|
|
14014
|
+
const handleOptionClick = React114.useCallback(
|
|
14015
14015
|
(option) => {
|
|
14016
14016
|
if (option.event && eventBus) {
|
|
14017
14017
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -15854,6 +15854,329 @@ var init_useCanvasEffects = __esm({
|
|
|
15854
15854
|
"use client";
|
|
15855
15855
|
}
|
|
15856
15856
|
});
|
|
15857
|
+
function pickPath(entry) {
|
|
15858
|
+
if (Array.isArray(entry.path)) {
|
|
15859
|
+
return entry.path[Math.floor(Math.random() * entry.path.length)];
|
|
15860
|
+
}
|
|
15861
|
+
return entry.path;
|
|
15862
|
+
}
|
|
15863
|
+
function useGameAudio({
|
|
15864
|
+
manifest,
|
|
15865
|
+
baseUrl = "",
|
|
15866
|
+
initialMuted = false,
|
|
15867
|
+
initialVolume = 1
|
|
15868
|
+
}) {
|
|
15869
|
+
const [muted, setMutedState] = useState(initialMuted);
|
|
15870
|
+
const [masterVolume, setMasterVolumeState] = useState(initialVolume);
|
|
15871
|
+
const mutedRef = useRef(muted);
|
|
15872
|
+
const volumeRef = useRef(masterVolume);
|
|
15873
|
+
const manifestRef = useRef(manifest);
|
|
15874
|
+
mutedRef.current = muted;
|
|
15875
|
+
volumeRef.current = masterVolume;
|
|
15876
|
+
manifestRef.current = manifest;
|
|
15877
|
+
const poolsRef = useRef(/* @__PURE__ */ new Map());
|
|
15878
|
+
const getOrCreateElement = useCallback((key) => {
|
|
15879
|
+
const entry = manifestRef.current[key];
|
|
15880
|
+
if (!entry) return null;
|
|
15881
|
+
let pool = poolsRef.current.get(key);
|
|
15882
|
+
if (!pool) {
|
|
15883
|
+
pool = [];
|
|
15884
|
+
poolsRef.current.set(key, pool);
|
|
15885
|
+
}
|
|
15886
|
+
const maxSize = entry.poolSize ?? 1;
|
|
15887
|
+
for (const audio of pool) {
|
|
15888
|
+
if (audio.paused && (audio.ended || audio.currentTime === 0)) {
|
|
15889
|
+
return audio;
|
|
15890
|
+
}
|
|
15891
|
+
}
|
|
15892
|
+
if (pool.length < maxSize) {
|
|
15893
|
+
const src = baseUrl + pickPath(entry);
|
|
15894
|
+
const audio = new Audio(src);
|
|
15895
|
+
audio.loop = entry.loop ?? false;
|
|
15896
|
+
pool.push(audio);
|
|
15897
|
+
return audio;
|
|
15898
|
+
}
|
|
15899
|
+
if (!entry.loop) {
|
|
15900
|
+
let oldest = pool[0];
|
|
15901
|
+
for (const audio of pool) {
|
|
15902
|
+
if (audio.currentTime > oldest.currentTime) {
|
|
15903
|
+
oldest = audio;
|
|
15904
|
+
}
|
|
15905
|
+
}
|
|
15906
|
+
oldest.pause();
|
|
15907
|
+
oldest.currentTime = 0;
|
|
15908
|
+
return oldest;
|
|
15909
|
+
}
|
|
15910
|
+
return null;
|
|
15911
|
+
}, [baseUrl]);
|
|
15912
|
+
const play = useCallback((key) => {
|
|
15913
|
+
if (mutedRef.current) return;
|
|
15914
|
+
const entry = manifestRef.current[key];
|
|
15915
|
+
if (!entry) return;
|
|
15916
|
+
const audio = getOrCreateElement(key);
|
|
15917
|
+
if (!audio) return;
|
|
15918
|
+
audio.volume = Math.min(1, (entry.volume ?? 1) * volumeRef.current);
|
|
15919
|
+
if (!entry.loop) {
|
|
15920
|
+
audio.currentTime = 0;
|
|
15921
|
+
}
|
|
15922
|
+
const promise = audio.play();
|
|
15923
|
+
if (promise) {
|
|
15924
|
+
promise.catch(() => {
|
|
15925
|
+
});
|
|
15926
|
+
}
|
|
15927
|
+
}, [getOrCreateElement]);
|
|
15928
|
+
const stop = useCallback((key) => {
|
|
15929
|
+
const pool = poolsRef.current.get(key);
|
|
15930
|
+
if (!pool) return;
|
|
15931
|
+
for (const audio of pool) {
|
|
15932
|
+
audio.pause();
|
|
15933
|
+
audio.currentTime = 0;
|
|
15934
|
+
}
|
|
15935
|
+
}, []);
|
|
15936
|
+
const currentMusicKeyRef = useRef(null);
|
|
15937
|
+
const currentMusicElRef = useRef(null);
|
|
15938
|
+
const musicFadeRef = useRef(null);
|
|
15939
|
+
const pendingMusicKeyRef = useRef(null);
|
|
15940
|
+
const clearMusicFade = useCallback(() => {
|
|
15941
|
+
if (musicFadeRef.current) {
|
|
15942
|
+
clearInterval(musicFadeRef.current);
|
|
15943
|
+
musicFadeRef.current = null;
|
|
15944
|
+
}
|
|
15945
|
+
}, []);
|
|
15946
|
+
const playMusic = useCallback((key) => {
|
|
15947
|
+
if (key === currentMusicKeyRef.current) return;
|
|
15948
|
+
pendingMusicKeyRef.current = key;
|
|
15949
|
+
const entry = manifestRef.current[key];
|
|
15950
|
+
if (!entry) return;
|
|
15951
|
+
const fadeDurationMs = entry.crossfadeDurationMs ?? 1500;
|
|
15952
|
+
const stepMs = 50;
|
|
15953
|
+
const totalSteps = Math.max(1, fadeDurationMs / stepMs);
|
|
15954
|
+
const targetVolume = Math.min(1, (entry.volume ?? 1) * volumeRef.current);
|
|
15955
|
+
clearMusicFade();
|
|
15956
|
+
const src = baseUrl + (Array.isArray(entry.path) ? entry.path[0] : entry.path);
|
|
15957
|
+
const incoming = new Audio(src);
|
|
15958
|
+
incoming.loop = true;
|
|
15959
|
+
incoming.volume = 0;
|
|
15960
|
+
const outgoing = currentMusicElRef.current;
|
|
15961
|
+
const outgoingStartVol = outgoing?.volume ?? 0;
|
|
15962
|
+
currentMusicKeyRef.current = key;
|
|
15963
|
+
currentMusicElRef.current = incoming;
|
|
15964
|
+
if (!mutedRef.current) {
|
|
15965
|
+
incoming.play().catch(() => {
|
|
15966
|
+
currentMusicKeyRef.current = null;
|
|
15967
|
+
currentMusicElRef.current = outgoing;
|
|
15968
|
+
});
|
|
15969
|
+
}
|
|
15970
|
+
let step = 0;
|
|
15971
|
+
musicFadeRef.current = setInterval(() => {
|
|
15972
|
+
step++;
|
|
15973
|
+
const progress = Math.min(step / totalSteps, 1);
|
|
15974
|
+
incoming.volume = Math.min(1, targetVolume * progress);
|
|
15975
|
+
if (outgoing) {
|
|
15976
|
+
outgoing.volume = Math.max(0, outgoingStartVol * (1 - progress));
|
|
15977
|
+
}
|
|
15978
|
+
if (progress >= 1) {
|
|
15979
|
+
clearMusicFade();
|
|
15980
|
+
if (outgoing) {
|
|
15981
|
+
outgoing.pause();
|
|
15982
|
+
outgoing.src = "";
|
|
15983
|
+
}
|
|
15984
|
+
}
|
|
15985
|
+
}, stepMs);
|
|
15986
|
+
}, [baseUrl, clearMusicFade]);
|
|
15987
|
+
const stopMusic = useCallback((fadeDurationMs = 1e3) => {
|
|
15988
|
+
const outgoing = currentMusicElRef.current;
|
|
15989
|
+
if (!outgoing) return;
|
|
15990
|
+
currentMusicKeyRef.current = null;
|
|
15991
|
+
currentMusicElRef.current = null;
|
|
15992
|
+
pendingMusicKeyRef.current = null;
|
|
15993
|
+
clearMusicFade();
|
|
15994
|
+
const startVolume = outgoing.volume;
|
|
15995
|
+
const stepMs = 50;
|
|
15996
|
+
const totalSteps = Math.max(1, fadeDurationMs / stepMs);
|
|
15997
|
+
let step = 0;
|
|
15998
|
+
musicFadeRef.current = setInterval(() => {
|
|
15999
|
+
step++;
|
|
16000
|
+
const progress = step / totalSteps;
|
|
16001
|
+
outgoing.volume = Math.max(0, startVolume * (1 - progress));
|
|
16002
|
+
if (progress >= 1) {
|
|
16003
|
+
clearMusicFade();
|
|
16004
|
+
outgoing.pause();
|
|
16005
|
+
outgoing.src = "";
|
|
16006
|
+
}
|
|
16007
|
+
}, stepMs);
|
|
16008
|
+
}, [clearMusicFade]);
|
|
16009
|
+
const stopAll = useCallback(() => {
|
|
16010
|
+
for (const pool of poolsRef.current.values()) {
|
|
16011
|
+
for (const audio of pool) {
|
|
16012
|
+
audio.pause();
|
|
16013
|
+
audio.currentTime = 0;
|
|
16014
|
+
}
|
|
16015
|
+
}
|
|
16016
|
+
stopMusic(0);
|
|
16017
|
+
}, [stopMusic]);
|
|
16018
|
+
const setMuted = useCallback((value) => {
|
|
16019
|
+
setMutedState(value);
|
|
16020
|
+
if (value) {
|
|
16021
|
+
for (const [key, pool] of poolsRef.current.entries()) {
|
|
16022
|
+
if (manifestRef.current[key]?.loop) {
|
|
16023
|
+
for (const audio of pool) {
|
|
16024
|
+
if (!audio.paused) audio.pause();
|
|
16025
|
+
}
|
|
16026
|
+
}
|
|
16027
|
+
}
|
|
16028
|
+
currentMusicElRef.current?.pause();
|
|
16029
|
+
} else {
|
|
16030
|
+
for (const [key, pool] of poolsRef.current.entries()) {
|
|
16031
|
+
const entry = manifestRef.current[key];
|
|
16032
|
+
if (entry?.loop && entry?.autostart) {
|
|
16033
|
+
for (const audio of pool) {
|
|
16034
|
+
if (audio.paused) audio.play().catch(() => {
|
|
16035
|
+
});
|
|
16036
|
+
}
|
|
16037
|
+
}
|
|
16038
|
+
}
|
|
16039
|
+
const musicEl = currentMusicElRef.current;
|
|
16040
|
+
if (musicEl) {
|
|
16041
|
+
musicEl.play().catch(() => {
|
|
16042
|
+
});
|
|
16043
|
+
}
|
|
16044
|
+
}
|
|
16045
|
+
}, []);
|
|
16046
|
+
const setMasterVolume = useCallback((volume) => {
|
|
16047
|
+
const clamped = Math.max(0, Math.min(1, volume));
|
|
16048
|
+
setMasterVolumeState(clamped);
|
|
16049
|
+
for (const [key, pool] of poolsRef.current.entries()) {
|
|
16050
|
+
const entryVol = manifestRef.current[key]?.volume ?? 1;
|
|
16051
|
+
for (const audio of pool) {
|
|
16052
|
+
audio.volume = Math.min(1, entryVol * clamped);
|
|
16053
|
+
}
|
|
16054
|
+
}
|
|
16055
|
+
if (!musicFadeRef.current && currentMusicElRef.current) {
|
|
16056
|
+
const key = currentMusicKeyRef.current;
|
|
16057
|
+
const entryVol = key ? manifestRef.current[key]?.volume ?? 1 : 1;
|
|
16058
|
+
currentMusicElRef.current.volume = Math.min(1, entryVol * clamped);
|
|
16059
|
+
}
|
|
16060
|
+
}, []);
|
|
16061
|
+
const unlockedRef = useRef(false);
|
|
16062
|
+
useEffect(() => {
|
|
16063
|
+
const autoKeys = Object.keys(manifest).filter((k) => manifest[k].autostart);
|
|
16064
|
+
const hasPendingMusic = () => pendingMusicKeyRef.current !== null;
|
|
16065
|
+
const hasAutoStart = autoKeys.length > 0;
|
|
16066
|
+
if (!hasAutoStart && !hasPendingMusic()) return;
|
|
16067
|
+
const unlock = () => {
|
|
16068
|
+
if (unlockedRef.current) return;
|
|
16069
|
+
unlockedRef.current = true;
|
|
16070
|
+
if (!mutedRef.current) {
|
|
16071
|
+
for (const key of autoKeys) {
|
|
16072
|
+
play(key);
|
|
16073
|
+
}
|
|
16074
|
+
const pending = pendingMusicKeyRef.current;
|
|
16075
|
+
if (pending && pending !== currentMusicKeyRef.current) {
|
|
16076
|
+
playMusic(pending);
|
|
16077
|
+
}
|
|
16078
|
+
}
|
|
16079
|
+
};
|
|
16080
|
+
document.addEventListener("click", unlock, { once: true });
|
|
16081
|
+
document.addEventListener("keydown", unlock, { once: true });
|
|
16082
|
+
document.addEventListener("touchstart", unlock, { once: true });
|
|
16083
|
+
return () => {
|
|
16084
|
+
document.removeEventListener("click", unlock);
|
|
16085
|
+
document.removeEventListener("keydown", unlock);
|
|
16086
|
+
document.removeEventListener("touchstart", unlock);
|
|
16087
|
+
};
|
|
16088
|
+
}, [manifest, play, playMusic]);
|
|
16089
|
+
useEffect(() => {
|
|
16090
|
+
return () => {
|
|
16091
|
+
clearMusicFade();
|
|
16092
|
+
for (const pool of poolsRef.current.values()) {
|
|
16093
|
+
for (const audio of pool) {
|
|
16094
|
+
audio.pause();
|
|
16095
|
+
audio.src = "";
|
|
16096
|
+
}
|
|
16097
|
+
}
|
|
16098
|
+
poolsRef.current.clear();
|
|
16099
|
+
if (currentMusicElRef.current) {
|
|
16100
|
+
currentMusicElRef.current.pause();
|
|
16101
|
+
currentMusicElRef.current.src = "";
|
|
16102
|
+
currentMusicElRef.current = null;
|
|
16103
|
+
}
|
|
16104
|
+
};
|
|
16105
|
+
}, [clearMusicFade]);
|
|
16106
|
+
return {
|
|
16107
|
+
play,
|
|
16108
|
+
stop,
|
|
16109
|
+
stopAll,
|
|
16110
|
+
playMusic,
|
|
16111
|
+
stopMusic,
|
|
16112
|
+
muted,
|
|
16113
|
+
setMuted,
|
|
16114
|
+
masterVolume,
|
|
16115
|
+
setMasterVolume
|
|
16116
|
+
};
|
|
16117
|
+
}
|
|
16118
|
+
var init_useGameAudio = __esm({
|
|
16119
|
+
"components/game/shared/hooks/useGameAudio.ts"() {
|
|
16120
|
+
"use client";
|
|
16121
|
+
useGameAudio.displayName = "useGameAudio";
|
|
16122
|
+
}
|
|
16123
|
+
});
|
|
16124
|
+
function useGameAudioContextOptional() {
|
|
16125
|
+
return useContext(GameAudioContext);
|
|
16126
|
+
}
|
|
16127
|
+
function GameAudioProvider({
|
|
16128
|
+
manifest,
|
|
16129
|
+
baseUrl = "",
|
|
16130
|
+
children,
|
|
16131
|
+
initialMuted = false
|
|
16132
|
+
}) {
|
|
16133
|
+
const eventBus = useEventBus();
|
|
16134
|
+
const { play, stop, stopAll, playMusic, stopMusic, muted, setMuted, masterVolume, setMasterVolume } = useGameAudio({ manifest, baseUrl, initialMuted });
|
|
16135
|
+
useEffect(() => {
|
|
16136
|
+
const unsubPlay = eventBus.on("UI:PLAY_SOUND", (event) => {
|
|
16137
|
+
const key = event.payload?.key;
|
|
16138
|
+
if (key) play(key);
|
|
16139
|
+
});
|
|
16140
|
+
const unsubStop = eventBus.on("UI:STOP_SOUND", (event) => {
|
|
16141
|
+
const key = event.payload?.key;
|
|
16142
|
+
if (key) {
|
|
16143
|
+
stop(key);
|
|
16144
|
+
} else {
|
|
16145
|
+
stopAll();
|
|
16146
|
+
}
|
|
16147
|
+
});
|
|
16148
|
+
const unsubChangeMusic = eventBus.on("UI:CHANGE_MUSIC", (event) => {
|
|
16149
|
+
const key = event.payload?.key;
|
|
16150
|
+
if (key) {
|
|
16151
|
+
playMusic(key);
|
|
16152
|
+
} else {
|
|
16153
|
+
stopMusic();
|
|
16154
|
+
}
|
|
16155
|
+
});
|
|
16156
|
+
const unsubStopMusic = eventBus.on("UI:STOP_MUSIC", () => {
|
|
16157
|
+
stopMusic();
|
|
16158
|
+
});
|
|
16159
|
+
return () => {
|
|
16160
|
+
unsubPlay();
|
|
16161
|
+
unsubStop();
|
|
16162
|
+
unsubChangeMusic();
|
|
16163
|
+
unsubStopMusic();
|
|
16164
|
+
};
|
|
16165
|
+
}, [eventBus, play, stop, stopAll, playMusic, stopMusic]);
|
|
16166
|
+
const value = { muted, setMuted, masterVolume, setMasterVolume, play, playMusic, stopMusic };
|
|
16167
|
+
return /* @__PURE__ */ jsx(GameAudioContext.Provider, { value, children });
|
|
16168
|
+
}
|
|
16169
|
+
var GameAudioContext;
|
|
16170
|
+
var init_GameAudioProvider = __esm({
|
|
16171
|
+
"components/game/shared/providers/GameAudioProvider.tsx"() {
|
|
16172
|
+
"use client";
|
|
16173
|
+
init_useEventBus();
|
|
16174
|
+
init_useGameAudio();
|
|
16175
|
+
GameAudioContext = createContext(null);
|
|
16176
|
+
GameAudioContext.displayName = "GameAudioContext";
|
|
16177
|
+
GameAudioProvider.displayName = "GameAudioProvider";
|
|
16178
|
+
}
|
|
16179
|
+
});
|
|
15857
16180
|
function GameAudioToggle({
|
|
15858
16181
|
size = "sm",
|
|
15859
16182
|
className
|
|
@@ -15882,6 +16205,7 @@ var init_GameAudioToggle = __esm({
|
|
|
15882
16205
|
"use client";
|
|
15883
16206
|
init_atoms();
|
|
15884
16207
|
init_cn();
|
|
16208
|
+
init_GameAudioProvider();
|
|
15885
16209
|
GameAudioToggle.displayName = "GameAudioToggle";
|
|
15886
16210
|
}
|
|
15887
16211
|
});
|
|
@@ -19549,7 +19873,7 @@ function LinearView({
|
|
|
19549
19873
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
19550
19874
|
const isDone = i < currentIdx;
|
|
19551
19875
|
const isCurrent = i === currentIdx;
|
|
19552
|
-
return /* @__PURE__ */ jsxs(
|
|
19876
|
+
return /* @__PURE__ */ jsxs(React114__default.Fragment, { children: [
|
|
19553
19877
|
i > 0 && /* @__PURE__ */ jsx(
|
|
19554
19878
|
Typography,
|
|
19555
19879
|
{
|
|
@@ -20077,7 +20401,7 @@ function SequenceBar({
|
|
|
20077
20401
|
onSlotRemove(index);
|
|
20078
20402
|
}, [onSlotRemove, playing]);
|
|
20079
20403
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
20080
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
20404
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React114__default.Fragment, { children: [
|
|
20081
20405
|
i > 0 && /* @__PURE__ */ jsx(
|
|
20082
20406
|
Typography,
|
|
20083
20407
|
{
|
|
@@ -22504,10 +22828,10 @@ function getSlotContentRenderer2() {
|
|
|
22504
22828
|
}
|
|
22505
22829
|
function resolveDescriptor(value, idPrefix) {
|
|
22506
22830
|
if (value === null || value === void 0) return value;
|
|
22507
|
-
if (
|
|
22831
|
+
if (React114__default.isValidElement(value)) return value;
|
|
22508
22832
|
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
|
|
22509
22833
|
if (Array.isArray(value)) {
|
|
22510
|
-
return value.map((item, i) => /* @__PURE__ */ jsx(
|
|
22834
|
+
return value.map((item, i) => /* @__PURE__ */ jsx(React114__default.Fragment, { children: resolveDescriptor(item, `${idPrefix}-${i}`) }, i));
|
|
22511
22835
|
}
|
|
22512
22836
|
if (typeof value === "object") {
|
|
22513
22837
|
const rec = value;
|
|
@@ -22643,7 +22967,7 @@ var init_GameTemplate = __esm({
|
|
|
22643
22967
|
}
|
|
22644
22968
|
});
|
|
22645
22969
|
function asDescriptor(v) {
|
|
22646
|
-
if (Array.isArray(v) ||
|
|
22970
|
+
if (Array.isArray(v) || React114__default.isValidElement(v)) return null;
|
|
22647
22971
|
const o = v;
|
|
22648
22972
|
if (typeof o.type !== "string") return null;
|
|
22649
22973
|
const props = o.props !== void 0 && typeof o.props === "object" && !Array.isArray(o.props) && o.props !== null ? o.props : void 0;
|
|
@@ -22658,10 +22982,10 @@ function getSlotContentRenderer3() {
|
|
|
22658
22982
|
}
|
|
22659
22983
|
function resolveDescriptor2(value, idPrefix) {
|
|
22660
22984
|
if (value === null || value === void 0) return value;
|
|
22661
|
-
if (
|
|
22985
|
+
if (React114__default.isValidElement(value)) return value;
|
|
22662
22986
|
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
|
|
22663
22987
|
if (Array.isArray(value)) {
|
|
22664
|
-
return value.map((item, i) => /* @__PURE__ */ jsx(
|
|
22988
|
+
return value.map((item, i) => /* @__PURE__ */ jsx(React114__default.Fragment, { children: resolveDescriptor2(item, `${idPrefix}-${i}`) }, i));
|
|
22665
22989
|
}
|
|
22666
22990
|
if (typeof value === "object" && value !== null) {
|
|
22667
22991
|
const desc = asDescriptor(value);
|
|
@@ -23545,6 +23869,8 @@ var init_CardBattlerTemplate = __esm({
|
|
|
23545
23869
|
CardBattlerTemplate.displayName = "CardBattlerTemplate";
|
|
23546
23870
|
}
|
|
23547
23871
|
});
|
|
23872
|
+
|
|
23873
|
+
// components/game/2d/molecules/index.ts
|
|
23548
23874
|
var init_molecules = __esm({
|
|
23549
23875
|
"components/game/2d/molecules/index.ts"() {
|
|
23550
23876
|
init_shared();
|
|
@@ -23639,7 +23965,7 @@ var init_ErrorBoundary = __esm({
|
|
|
23639
23965
|
}
|
|
23640
23966
|
);
|
|
23641
23967
|
};
|
|
23642
|
-
ErrorBoundary = class extends
|
|
23968
|
+
ErrorBoundary = class extends React114__default.Component {
|
|
23643
23969
|
constructor(props) {
|
|
23644
23970
|
super(props);
|
|
23645
23971
|
__publicField(this, "reset", () => {
|
|
@@ -23921,7 +24247,7 @@ var init_Container = __esm({
|
|
|
23921
24247
|
as: Component = "div"
|
|
23922
24248
|
}) => {
|
|
23923
24249
|
const resolvedSize = maxWidth ?? size ?? "lg";
|
|
23924
|
-
return
|
|
24250
|
+
return React114__default.createElement(
|
|
23925
24251
|
Component,
|
|
23926
24252
|
{
|
|
23927
24253
|
className: cn(
|
|
@@ -25702,7 +26028,7 @@ var init_CodeBlock = __esm({
|
|
|
25702
26028
|
};
|
|
25703
26029
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
25704
26030
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
25705
|
-
CodeBlock =
|
|
26031
|
+
CodeBlock = React114__default.memo(
|
|
25706
26032
|
({
|
|
25707
26033
|
code: rawCode,
|
|
25708
26034
|
language = "text",
|
|
@@ -26289,7 +26615,7 @@ var init_MarkdownContent = __esm({
|
|
|
26289
26615
|
init_Box();
|
|
26290
26616
|
init_CodeBlock();
|
|
26291
26617
|
init_cn();
|
|
26292
|
-
MarkdownContent =
|
|
26618
|
+
MarkdownContent = React114__default.memo(
|
|
26293
26619
|
({ content, direction = "ltr", className }) => {
|
|
26294
26620
|
const { t: _t } = useTranslate();
|
|
26295
26621
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -27616,7 +27942,7 @@ var init_StateMachineView = __esm({
|
|
|
27616
27942
|
style: { top: title ? 30 : 0 },
|
|
27617
27943
|
children: [
|
|
27618
27944
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
27619
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
27945
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React114__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
27620
27946
|
StateNode2,
|
|
27621
27947
|
{
|
|
27622
27948
|
state,
|
|
@@ -33245,8 +33571,8 @@ var init_Menu = __esm({
|
|
|
33245
33571
|
"bottom-end": "bottom-start"
|
|
33246
33572
|
};
|
|
33247
33573
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
33248
|
-
const triggerChild =
|
|
33249
|
-
const triggerElement =
|
|
33574
|
+
const triggerChild = React114__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
33575
|
+
const triggerElement = React114__default.cloneElement(
|
|
33250
33576
|
triggerChild,
|
|
33251
33577
|
{
|
|
33252
33578
|
ref: triggerRef,
|
|
@@ -33341,14 +33667,14 @@ function useDataDnd(args) {
|
|
|
33341
33667
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
33342
33668
|
const enabled = isZone || Boolean(dndRoot);
|
|
33343
33669
|
const eventBus = useEventBus();
|
|
33344
|
-
const parentRoot =
|
|
33670
|
+
const parentRoot = React114__default.useContext(RootCtx);
|
|
33345
33671
|
const isRoot = enabled && parentRoot === null;
|
|
33346
|
-
const zoneId =
|
|
33672
|
+
const zoneId = React114__default.useId();
|
|
33347
33673
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
33348
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
33349
|
-
const optimisticOrdersRef =
|
|
33674
|
+
const [optimisticOrders, setOptimisticOrders] = React114__default.useState(() => /* @__PURE__ */ new Map());
|
|
33675
|
+
const optimisticOrdersRef = React114__default.useRef(optimisticOrders);
|
|
33350
33676
|
optimisticOrdersRef.current = optimisticOrders;
|
|
33351
|
-
const clearOptimisticOrder =
|
|
33677
|
+
const clearOptimisticOrder = React114__default.useCallback((group) => {
|
|
33352
33678
|
setOptimisticOrders((prev) => {
|
|
33353
33679
|
if (!prev.has(group)) return prev;
|
|
33354
33680
|
const next = new Map(prev);
|
|
@@ -33373,7 +33699,7 @@ function useDataDnd(args) {
|
|
|
33373
33699
|
const raw = it[dndItemIdField];
|
|
33374
33700
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
33375
33701
|
}).join("|");
|
|
33376
|
-
const itemIds =
|
|
33702
|
+
const itemIds = React114__default.useMemo(
|
|
33377
33703
|
() => orderedItems.map((it, idx) => {
|
|
33378
33704
|
const raw = it[dndItemIdField];
|
|
33379
33705
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
@@ -33384,7 +33710,7 @@ function useDataDnd(args) {
|
|
|
33384
33710
|
const raw = it[dndItemIdField];
|
|
33385
33711
|
return raw != null ? String(raw) : `__${idx}`;
|
|
33386
33712
|
}).join("|");
|
|
33387
|
-
|
|
33713
|
+
React114__default.useEffect(() => {
|
|
33388
33714
|
const root = isRoot ? null : parentRoot;
|
|
33389
33715
|
if (root) {
|
|
33390
33716
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -33392,20 +33718,20 @@ function useDataDnd(args) {
|
|
|
33392
33718
|
clearOptimisticOrder(ownGroup);
|
|
33393
33719
|
}
|
|
33394
33720
|
}, [itemsContentSig, ownGroup]);
|
|
33395
|
-
const zonesRef =
|
|
33396
|
-
const registerZone =
|
|
33721
|
+
const zonesRef = React114__default.useRef(/* @__PURE__ */ new Map());
|
|
33722
|
+
const registerZone = React114__default.useCallback((zoneId2, meta2) => {
|
|
33397
33723
|
zonesRef.current.set(zoneId2, meta2);
|
|
33398
33724
|
}, []);
|
|
33399
|
-
const unregisterZone =
|
|
33725
|
+
const unregisterZone = React114__default.useCallback((zoneId2) => {
|
|
33400
33726
|
zonesRef.current.delete(zoneId2);
|
|
33401
33727
|
}, []);
|
|
33402
|
-
const [activeDrag, setActiveDrag] =
|
|
33403
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
33404
|
-
const meta =
|
|
33728
|
+
const [activeDrag, setActiveDrag] = React114__default.useState(null);
|
|
33729
|
+
const [overZoneGroup, setOverZoneGroup] = React114__default.useState(null);
|
|
33730
|
+
const meta = React114__default.useMemo(
|
|
33405
33731
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
33406
33732
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
33407
33733
|
);
|
|
33408
|
-
|
|
33734
|
+
React114__default.useEffect(() => {
|
|
33409
33735
|
const target = isRoot ? null : parentRoot;
|
|
33410
33736
|
if (!target) {
|
|
33411
33737
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -33424,7 +33750,7 @@ function useDataDnd(args) {
|
|
|
33424
33750
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
33425
33751
|
const sensors = useAlmadarDndSensors(true);
|
|
33426
33752
|
const collisionDetection = almadarDndCollisionDetection;
|
|
33427
|
-
const findZoneByItem =
|
|
33753
|
+
const findZoneByItem = React114__default.useCallback(
|
|
33428
33754
|
(id) => {
|
|
33429
33755
|
for (const z of zonesRef.current.values()) {
|
|
33430
33756
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -33433,7 +33759,7 @@ function useDataDnd(args) {
|
|
|
33433
33759
|
},
|
|
33434
33760
|
[]
|
|
33435
33761
|
);
|
|
33436
|
-
|
|
33762
|
+
React114__default.useCallback(
|
|
33437
33763
|
(group) => {
|
|
33438
33764
|
for (const z of zonesRef.current.values()) {
|
|
33439
33765
|
if (z.group === group) return z;
|
|
@@ -33442,7 +33768,7 @@ function useDataDnd(args) {
|
|
|
33442
33768
|
},
|
|
33443
33769
|
[]
|
|
33444
33770
|
);
|
|
33445
|
-
const handleDragEnd =
|
|
33771
|
+
const handleDragEnd = React114__default.useCallback(
|
|
33446
33772
|
(event) => {
|
|
33447
33773
|
const { active, over } = event;
|
|
33448
33774
|
const activeIdStr = String(active.id);
|
|
@@ -33533,8 +33859,8 @@ function useDataDnd(args) {
|
|
|
33533
33859
|
},
|
|
33534
33860
|
[eventBus]
|
|
33535
33861
|
);
|
|
33536
|
-
const sortableData =
|
|
33537
|
-
const SortableItem =
|
|
33862
|
+
const sortableData = React114__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
33863
|
+
const SortableItem = React114__default.useCallback(
|
|
33538
33864
|
({ id, children }) => {
|
|
33539
33865
|
const {
|
|
33540
33866
|
attributes,
|
|
@@ -33574,7 +33900,7 @@ function useDataDnd(args) {
|
|
|
33574
33900
|
id: droppableId,
|
|
33575
33901
|
data: sortableData
|
|
33576
33902
|
});
|
|
33577
|
-
const ctx =
|
|
33903
|
+
const ctx = React114__default.useContext(RootCtx);
|
|
33578
33904
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
33579
33905
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
33580
33906
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -33589,7 +33915,7 @@ function useDataDnd(args) {
|
|
|
33589
33915
|
showForeignPlaceholder,
|
|
33590
33916
|
ctxAvailable: ctx != null
|
|
33591
33917
|
});
|
|
33592
|
-
|
|
33918
|
+
React114__default.useEffect(() => {
|
|
33593
33919
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
33594
33920
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
33595
33921
|
return /* @__PURE__ */ jsx(
|
|
@@ -33603,11 +33929,11 @@ function useDataDnd(args) {
|
|
|
33603
33929
|
}
|
|
33604
33930
|
);
|
|
33605
33931
|
};
|
|
33606
|
-
const rootContextValue =
|
|
33932
|
+
const rootContextValue = React114__default.useMemo(
|
|
33607
33933
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
33608
33934
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
33609
33935
|
);
|
|
33610
|
-
const handleDragStart =
|
|
33936
|
+
const handleDragStart = React114__default.useCallback((event) => {
|
|
33611
33937
|
const sourceZone = findZoneByItem(event.active.id);
|
|
33612
33938
|
const rect = event.active.rect.current.initial;
|
|
33613
33939
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -33626,7 +33952,7 @@ function useDataDnd(args) {
|
|
|
33626
33952
|
isRoot
|
|
33627
33953
|
});
|
|
33628
33954
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
33629
|
-
const handleDragOver =
|
|
33955
|
+
const handleDragOver = React114__default.useCallback((event) => {
|
|
33630
33956
|
const { active, over } = event;
|
|
33631
33957
|
const overData = over?.data?.current;
|
|
33632
33958
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -33696,7 +34022,7 @@ function useDataDnd(args) {
|
|
|
33696
34022
|
return next;
|
|
33697
34023
|
});
|
|
33698
34024
|
}, []);
|
|
33699
|
-
const handleDragCancel =
|
|
34025
|
+
const handleDragCancel = React114__default.useCallback((event) => {
|
|
33700
34026
|
setActiveDrag(null);
|
|
33701
34027
|
setOverZoneGroup(null);
|
|
33702
34028
|
dndLog.warn("dragCancel", {
|
|
@@ -33704,12 +34030,12 @@ function useDataDnd(args) {
|
|
|
33704
34030
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
33705
34031
|
});
|
|
33706
34032
|
}, []);
|
|
33707
|
-
const handleDragEndWithCleanup =
|
|
34033
|
+
const handleDragEndWithCleanup = React114__default.useCallback((event) => {
|
|
33708
34034
|
handleDragEnd(event);
|
|
33709
34035
|
setActiveDrag(null);
|
|
33710
34036
|
setOverZoneGroup(null);
|
|
33711
34037
|
}, [handleDragEnd]);
|
|
33712
|
-
const wrapContainer =
|
|
34038
|
+
const wrapContainer = React114__default.useCallback(
|
|
33713
34039
|
(children) => {
|
|
33714
34040
|
if (!enabled) return children;
|
|
33715
34041
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -33763,7 +34089,7 @@ var init_useDataDnd = __esm({
|
|
|
33763
34089
|
init_useAlmadarDndCollision();
|
|
33764
34090
|
init_Box();
|
|
33765
34091
|
dndLog = createLogger("almadar:ui:dnd");
|
|
33766
|
-
RootCtx =
|
|
34092
|
+
RootCtx = React114__default.createContext(null);
|
|
33767
34093
|
}
|
|
33768
34094
|
});
|
|
33769
34095
|
function renderIconInput(icon, props) {
|
|
@@ -34289,7 +34615,7 @@ function DataList({
|
|
|
34289
34615
|
}) {
|
|
34290
34616
|
const eventBus = useEventBus();
|
|
34291
34617
|
const { t } = useTranslate();
|
|
34292
|
-
const [visibleCount, setVisibleCount] =
|
|
34618
|
+
const [visibleCount, setVisibleCount] = React114__default.useState(pageSize || Infinity);
|
|
34293
34619
|
const fieldDefs = fields ?? columns ?? [];
|
|
34294
34620
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
34295
34621
|
const dnd = useDataDnd({
|
|
@@ -34308,7 +34634,7 @@ function DataList({
|
|
|
34308
34634
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
34309
34635
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
34310
34636
|
const hasRenderProp = typeof children === "function";
|
|
34311
|
-
|
|
34637
|
+
React114__default.useEffect(() => {
|
|
34312
34638
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
34313
34639
|
const childrenTypeOf = typeof children;
|
|
34314
34640
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -34412,7 +34738,7 @@ function DataList({
|
|
|
34412
34738
|
const items2 = [...data];
|
|
34413
34739
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
34414
34740
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
34415
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
34741
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React114__default.Fragment, { children: [
|
|
34416
34742
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
34417
34743
|
group.items.map((itemData, index) => {
|
|
34418
34744
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -34553,7 +34879,7 @@ function DataList({
|
|
|
34553
34879
|
className
|
|
34554
34880
|
),
|
|
34555
34881
|
children: [
|
|
34556
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
34882
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React114__default.Fragment, { children: [
|
|
34557
34883
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
34558
34884
|
group.items.map(
|
|
34559
34885
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -35346,7 +35672,7 @@ var init_Flex = __esm({
|
|
|
35346
35672
|
flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
|
|
35347
35673
|
}
|
|
35348
35674
|
}
|
|
35349
|
-
return
|
|
35675
|
+
return React114__default.createElement(Component, {
|
|
35350
35676
|
className: cn(
|
|
35351
35677
|
inline ? "inline-flex" : "flex",
|
|
35352
35678
|
directionStyles[direction],
|
|
@@ -35465,7 +35791,7 @@ var init_Grid = __esm({
|
|
|
35465
35791
|
as: Component = "div"
|
|
35466
35792
|
}) => {
|
|
35467
35793
|
const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
|
|
35468
|
-
return
|
|
35794
|
+
return React114__default.createElement(
|
|
35469
35795
|
Component,
|
|
35470
35796
|
{
|
|
35471
35797
|
className: cn(
|
|
@@ -35661,9 +35987,9 @@ var init_Popover = __esm({
|
|
|
35661
35987
|
onMouseLeave: handleClose,
|
|
35662
35988
|
onPointerDown: tapTriggerProps.onPointerDown
|
|
35663
35989
|
};
|
|
35664
|
-
const childElement =
|
|
35990
|
+
const childElement = React114__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
35665
35991
|
const childPointerDown = childElement.props.onPointerDown;
|
|
35666
|
-
const triggerElement =
|
|
35992
|
+
const triggerElement = React114__default.cloneElement(
|
|
35667
35993
|
childElement,
|
|
35668
35994
|
{
|
|
35669
35995
|
ref: triggerRef,
|
|
@@ -36265,9 +36591,9 @@ var init_Tooltip = __esm({
|
|
|
36265
36591
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
36266
36592
|
};
|
|
36267
36593
|
}, []);
|
|
36268
|
-
const triggerElement =
|
|
36594
|
+
const triggerElement = React114__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
36269
36595
|
const childPointerDown = triggerElement.props.onPointerDown;
|
|
36270
|
-
const trigger =
|
|
36596
|
+
const trigger = React114__default.cloneElement(triggerElement, {
|
|
36271
36597
|
ref: triggerRef,
|
|
36272
36598
|
onMouseEnter: handleMouseEnter,
|
|
36273
36599
|
onMouseLeave: handleMouseLeave,
|
|
@@ -36357,7 +36683,7 @@ var init_WizardProgress = __esm({
|
|
|
36357
36683
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
36358
36684
|
const isActive = index === currentStep;
|
|
36359
36685
|
const isCompleted = index < currentStep;
|
|
36360
|
-
return /* @__PURE__ */ jsxs(
|
|
36686
|
+
return /* @__PURE__ */ jsxs(React114__default.Fragment, { children: [
|
|
36361
36687
|
/* @__PURE__ */ jsx(
|
|
36362
36688
|
"button",
|
|
36363
36689
|
{
|
|
@@ -37689,13 +38015,13 @@ var init_MapView = __esm({
|
|
|
37689
38015
|
shadowSize: [41, 41]
|
|
37690
38016
|
});
|
|
37691
38017
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
37692
|
-
const { useEffect:
|
|
38018
|
+
const { useEffect: useEffect78, useRef: useRef78, useCallback: useCallback118, useState: useState115 } = React114__default;
|
|
37693
38019
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
37694
38020
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
37695
38021
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
37696
38022
|
const map = useMap();
|
|
37697
|
-
const prevRef =
|
|
37698
|
-
|
|
38023
|
+
const prevRef = useRef78({ centerLat, centerLng, zoom });
|
|
38024
|
+
useEffect78(() => {
|
|
37699
38025
|
const prev = prevRef.current;
|
|
37700
38026
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
37701
38027
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -37706,7 +38032,7 @@ var init_MapView = __esm({
|
|
|
37706
38032
|
}
|
|
37707
38033
|
function MapClickHandler({ onMapClick }) {
|
|
37708
38034
|
const map = useMap();
|
|
37709
|
-
|
|
38035
|
+
useEffect78(() => {
|
|
37710
38036
|
if (!onMapClick) return;
|
|
37711
38037
|
const handler = (e) => {
|
|
37712
38038
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -37734,8 +38060,8 @@ var init_MapView = __esm({
|
|
|
37734
38060
|
showAttribution = true
|
|
37735
38061
|
}) {
|
|
37736
38062
|
const eventBus = useEventBus2();
|
|
37737
|
-
const [clickedPosition, setClickedPosition] =
|
|
37738
|
-
const handleMapClick =
|
|
38063
|
+
const [clickedPosition, setClickedPosition] = useState115(null);
|
|
38064
|
+
const handleMapClick = useCallback118((lat, lng) => {
|
|
37739
38065
|
if (showClickedPin) {
|
|
37740
38066
|
setClickedPosition({ lat, lng });
|
|
37741
38067
|
}
|
|
@@ -37744,7 +38070,7 @@ var init_MapView = __esm({
|
|
|
37744
38070
|
eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
|
|
37745
38071
|
}
|
|
37746
38072
|
}, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
|
|
37747
|
-
const handleMarkerClick =
|
|
38073
|
+
const handleMarkerClick = useCallback118((marker) => {
|
|
37748
38074
|
onMarkerClick?.(marker);
|
|
37749
38075
|
if (markerClickEvent) {
|
|
37750
38076
|
eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
|
|
@@ -38604,8 +38930,8 @@ function TableView({
|
|
|
38604
38930
|
}) {
|
|
38605
38931
|
const eventBus = useEventBus();
|
|
38606
38932
|
const { t } = useTranslate();
|
|
38607
|
-
const [visibleCount, setVisibleCount] =
|
|
38608
|
-
const [localSelected, setLocalSelected] =
|
|
38933
|
+
const [visibleCount, setVisibleCount] = React114__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
38934
|
+
const [localSelected, setLocalSelected] = React114__default.useState(/* @__PURE__ */ new Set());
|
|
38609
38935
|
const colDefs = columns ?? fields ?? [];
|
|
38610
38936
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
38611
38937
|
const dnd = useDataDnd({
|
|
@@ -38800,12 +39126,12 @@ function TableView({
|
|
|
38800
39126
|
]
|
|
38801
39127
|
}
|
|
38802
39128
|
);
|
|
38803
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
39129
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React114__default.Fragment, { children: rowInner }, id);
|
|
38804
39130
|
};
|
|
38805
39131
|
const items = Array.from(data);
|
|
38806
39132
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
38807
39133
|
let runningIndex = 0;
|
|
38808
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
39134
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React114__default.Fragment, { children: [
|
|
38809
39135
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
38810
39136
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
38811
39137
|
] }, gi)) });
|
|
@@ -40162,7 +40488,7 @@ var init_StepFlow = __esm({
|
|
|
40162
40488
|
className
|
|
40163
40489
|
}) => {
|
|
40164
40490
|
if (orientation === "vertical") {
|
|
40165
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
40491
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React114__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
40166
40492
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
40167
40493
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
40168
40494
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -40173,7 +40499,7 @@ var init_StepFlow = __esm({
|
|
|
40173
40499
|
] })
|
|
40174
40500
|
] }) }, index)) });
|
|
40175
40501
|
}
|
|
40176
|
-
return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(
|
|
40502
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(React114__default.Fragment, { children: [
|
|
40177
40503
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
40178
40504
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
40179
40505
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -41158,7 +41484,7 @@ var init_LikertScale = __esm({
|
|
|
41158
41484
|
md: "text-base",
|
|
41159
41485
|
lg: "text-lg"
|
|
41160
41486
|
};
|
|
41161
|
-
LikertScale =
|
|
41487
|
+
LikertScale = React114__default.forwardRef(
|
|
41162
41488
|
({
|
|
41163
41489
|
question,
|
|
41164
41490
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -41170,7 +41496,7 @@ var init_LikertScale = __esm({
|
|
|
41170
41496
|
variant = "radios",
|
|
41171
41497
|
className
|
|
41172
41498
|
}, ref) => {
|
|
41173
|
-
const groupId =
|
|
41499
|
+
const groupId = React114__default.useId();
|
|
41174
41500
|
const eventBus = useEventBus();
|
|
41175
41501
|
const handleSelect = useCallback(
|
|
41176
41502
|
(next) => {
|
|
@@ -43452,7 +43778,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
43452
43778
|
"aria-label": t("aria.breadcrumb"),
|
|
43453
43779
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
43454
43780
|
const isLast = idx === items.length - 1;
|
|
43455
|
-
return /* @__PURE__ */ jsxs(
|
|
43781
|
+
return /* @__PURE__ */ jsxs(React114__default.Fragment, { children: [
|
|
43456
43782
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
43457
43783
|
Icon,
|
|
43458
43784
|
{
|
|
@@ -44116,7 +44442,7 @@ var init_PageHeader = __esm({
|
|
|
44116
44442
|
info: "bg-info/10 text-info"
|
|
44117
44443
|
};
|
|
44118
44444
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
44119
|
-
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Box, { as: "nav", className: "mb-4", children: /* @__PURE__ */ jsx(Box, { as: "ol", className: "flex items-center gap-2 text-sm", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs(
|
|
44445
|
+
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Box, { as: "nav", className: "mb-4", children: /* @__PURE__ */ jsx(Box, { as: "ol", className: "flex items-center gap-2 text-sm", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs(React114__default.Fragment, { children: [
|
|
44120
44446
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
44121
44447
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
44122
44448
|
"a",
|
|
@@ -44474,7 +44800,7 @@ var init_Section = __esm({
|
|
|
44474
44800
|
as: Component = "section"
|
|
44475
44801
|
}) => {
|
|
44476
44802
|
const hasHeader = title || description || action;
|
|
44477
|
-
return
|
|
44803
|
+
return React114__default.createElement(
|
|
44478
44804
|
Component,
|
|
44479
44805
|
{
|
|
44480
44806
|
className: cn(
|
|
@@ -44840,7 +45166,7 @@ var init_WizardContainer = __esm({
|
|
|
44840
45166
|
const isCompleted = index < currentStep;
|
|
44841
45167
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
44842
45168
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
44843
|
-
return /* @__PURE__ */ jsxs(
|
|
45169
|
+
return /* @__PURE__ */ jsxs(React114__default.Fragment, { children: [
|
|
44844
45170
|
/* @__PURE__ */ jsx(
|
|
44845
45171
|
Button,
|
|
44846
45172
|
{
|
|
@@ -47273,7 +47599,7 @@ var init_DetailPanel = __esm({
|
|
|
47273
47599
|
}
|
|
47274
47600
|
});
|
|
47275
47601
|
function extractTitle(children) {
|
|
47276
|
-
if (!
|
|
47602
|
+
if (!React114__default.isValidElement(children)) return void 0;
|
|
47277
47603
|
const props = children.props;
|
|
47278
47604
|
if (typeof props.title === "string") {
|
|
47279
47605
|
return props.title;
|
|
@@ -47619,12 +47945,12 @@ var init_Form = __esm({
|
|
|
47619
47945
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
47620
47946
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
47621
47947
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
47622
|
-
const normalizedInitialData =
|
|
47948
|
+
const normalizedInitialData = React114__default.useMemo(() => {
|
|
47623
47949
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
47624
47950
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
47625
47951
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
47626
47952
|
}, [entity, initialData]);
|
|
47627
|
-
const entityDerivedFields =
|
|
47953
|
+
const entityDerivedFields = React114__default.useMemo(() => {
|
|
47628
47954
|
if (fields && fields.length > 0) return void 0;
|
|
47629
47955
|
if (!resolvedEntity) return void 0;
|
|
47630
47956
|
return resolvedEntity.fields.map(
|
|
@@ -47645,16 +47971,16 @@ var init_Form = __esm({
|
|
|
47645
47971
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
47646
47972
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
47647
47973
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
47648
|
-
const [formData, setFormData] =
|
|
47974
|
+
const [formData, setFormData] = React114__default.useState(
|
|
47649
47975
|
normalizedInitialData
|
|
47650
47976
|
);
|
|
47651
|
-
const [collapsedSections, setCollapsedSections] =
|
|
47977
|
+
const [collapsedSections, setCollapsedSections] = React114__default.useState(
|
|
47652
47978
|
/* @__PURE__ */ new Set()
|
|
47653
47979
|
);
|
|
47654
|
-
const [submitError, setSubmitError] =
|
|
47655
|
-
const formRef =
|
|
47980
|
+
const [submitError, setSubmitError] = React114__default.useState(null);
|
|
47981
|
+
const formRef = React114__default.useRef(null);
|
|
47656
47982
|
const formMode = props.mode;
|
|
47657
|
-
const mountedRef =
|
|
47983
|
+
const mountedRef = React114__default.useRef(false);
|
|
47658
47984
|
if (!mountedRef.current) {
|
|
47659
47985
|
mountedRef.current = true;
|
|
47660
47986
|
debug("forms", "mount", {
|
|
@@ -47667,7 +47993,7 @@ var init_Form = __esm({
|
|
|
47667
47993
|
});
|
|
47668
47994
|
}
|
|
47669
47995
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
47670
|
-
const evalContext =
|
|
47996
|
+
const evalContext = React114__default.useMemo(
|
|
47671
47997
|
() => ({
|
|
47672
47998
|
formValues: formData,
|
|
47673
47999
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -47676,7 +48002,7 @@ var init_Form = __esm({
|
|
|
47676
48002
|
}),
|
|
47677
48003
|
[formData, externalContext]
|
|
47678
48004
|
);
|
|
47679
|
-
|
|
48005
|
+
React114__default.useEffect(() => {
|
|
47680
48006
|
debug("forms", "initialData-sync", {
|
|
47681
48007
|
mode: formMode,
|
|
47682
48008
|
normalizedInitialData,
|
|
@@ -47687,7 +48013,7 @@ var init_Form = __esm({
|
|
|
47687
48013
|
setFormData(normalizedInitialData);
|
|
47688
48014
|
}
|
|
47689
48015
|
}, [normalizedInitialData]);
|
|
47690
|
-
const processCalculations =
|
|
48016
|
+
const processCalculations = React114__default.useCallback(
|
|
47691
48017
|
(changedFieldId, newFormData) => {
|
|
47692
48018
|
if (!hiddenCalculations.length) return;
|
|
47693
48019
|
const context = {
|
|
@@ -47712,7 +48038,7 @@ var init_Form = __esm({
|
|
|
47712
48038
|
},
|
|
47713
48039
|
[hiddenCalculations, externalContext, eventBus]
|
|
47714
48040
|
);
|
|
47715
|
-
const checkViolations =
|
|
48041
|
+
const checkViolations = React114__default.useCallback(
|
|
47716
48042
|
(changedFieldId, newFormData) => {
|
|
47717
48043
|
if (!violationTriggers.length) return;
|
|
47718
48044
|
const context = {
|
|
@@ -47750,7 +48076,7 @@ var init_Form = __esm({
|
|
|
47750
48076
|
processCalculations(name, newFormData);
|
|
47751
48077
|
checkViolations(name, newFormData);
|
|
47752
48078
|
};
|
|
47753
|
-
const isFieldVisible =
|
|
48079
|
+
const isFieldVisible = React114__default.useCallback(
|
|
47754
48080
|
(fieldName) => {
|
|
47755
48081
|
const condition = conditionalFields[fieldName];
|
|
47756
48082
|
if (!condition) return true;
|
|
@@ -47758,7 +48084,7 @@ var init_Form = __esm({
|
|
|
47758
48084
|
},
|
|
47759
48085
|
[conditionalFields, evalContext]
|
|
47760
48086
|
);
|
|
47761
|
-
const isSectionVisible =
|
|
48087
|
+
const isSectionVisible = React114__default.useCallback(
|
|
47762
48088
|
(section) => {
|
|
47763
48089
|
if (!section.condition) return true;
|
|
47764
48090
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -47834,7 +48160,7 @@ var init_Form = __esm({
|
|
|
47834
48160
|
eventBus.emit(`UI:${onCancel}`);
|
|
47835
48161
|
}
|
|
47836
48162
|
};
|
|
47837
|
-
const renderField =
|
|
48163
|
+
const renderField = React114__default.useCallback(
|
|
47838
48164
|
(field) => {
|
|
47839
48165
|
const fieldName = field.name || field.field;
|
|
47840
48166
|
if (!fieldName) return null;
|
|
@@ -47855,7 +48181,7 @@ var init_Form = __esm({
|
|
|
47855
48181
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
47856
48182
|
);
|
|
47857
48183
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
47858
|
-
const normalizedFields =
|
|
48184
|
+
const normalizedFields = React114__default.useMemo(() => {
|
|
47859
48185
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
47860
48186
|
return effectiveFields.map((field) => {
|
|
47861
48187
|
if (typeof field === "string") {
|
|
@@ -47879,7 +48205,7 @@ var init_Form = __esm({
|
|
|
47879
48205
|
return field;
|
|
47880
48206
|
});
|
|
47881
48207
|
}, [effectiveFields, resolvedEntity]);
|
|
47882
|
-
const schemaFields =
|
|
48208
|
+
const schemaFields = React114__default.useMemo(() => {
|
|
47883
48209
|
if (normalizedFields.length === 0) return null;
|
|
47884
48210
|
if (isDebugEnabled()) {
|
|
47885
48211
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -47889,7 +48215,7 @@ var init_Form = __esm({
|
|
|
47889
48215
|
}
|
|
47890
48216
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
47891
48217
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
47892
|
-
const sectionElements =
|
|
48218
|
+
const sectionElements = React114__default.useMemo(() => {
|
|
47893
48219
|
if (!sections || sections.length === 0) return null;
|
|
47894
48220
|
return sections.map((section) => {
|
|
47895
48221
|
if (!isSectionVisible(section)) {
|
|
@@ -48614,7 +48940,7 @@ var init_List = __esm({
|
|
|
48614
48940
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
48615
48941
|
return [];
|
|
48616
48942
|
}, [entity]);
|
|
48617
|
-
const getItemActions =
|
|
48943
|
+
const getItemActions = React114__default.useCallback(
|
|
48618
48944
|
(item) => {
|
|
48619
48945
|
if (!itemActions) return [];
|
|
48620
48946
|
if (typeof itemActions === "function") {
|
|
@@ -49089,7 +49415,7 @@ var init_MediaGallery = __esm({
|
|
|
49089
49415
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
49090
49416
|
);
|
|
49091
49417
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
49092
|
-
const items =
|
|
49418
|
+
const items = React114__default.useMemo(() => {
|
|
49093
49419
|
if (propItems) return propItems;
|
|
49094
49420
|
if (entityData.length === 0) return [];
|
|
49095
49421
|
return entityData.map((record, idx) => {
|
|
@@ -49252,7 +49578,7 @@ var init_MediaGallery = __esm({
|
|
|
49252
49578
|
}
|
|
49253
49579
|
});
|
|
49254
49580
|
function extractTitle2(children) {
|
|
49255
|
-
if (!
|
|
49581
|
+
if (!React114__default.isValidElement(children)) return void 0;
|
|
49256
49582
|
const props = children.props;
|
|
49257
49583
|
if (typeof props.title === "string") {
|
|
49258
49584
|
return props.title;
|
|
@@ -49522,7 +49848,7 @@ var init_debugRegistry = __esm({
|
|
|
49522
49848
|
}
|
|
49523
49849
|
});
|
|
49524
49850
|
function useDebugData() {
|
|
49525
|
-
const [data, setData] =
|
|
49851
|
+
const [data, setData] = React114.useState(() => ({
|
|
49526
49852
|
traits: [],
|
|
49527
49853
|
ticks: [],
|
|
49528
49854
|
guards: [],
|
|
@@ -49536,7 +49862,7 @@ function useDebugData() {
|
|
|
49536
49862
|
},
|
|
49537
49863
|
lastUpdate: Date.now()
|
|
49538
49864
|
}));
|
|
49539
|
-
|
|
49865
|
+
React114.useEffect(() => {
|
|
49540
49866
|
const updateData = () => {
|
|
49541
49867
|
setData({
|
|
49542
49868
|
traits: getAllTraits(),
|
|
@@ -49645,12 +49971,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
49645
49971
|
return positions;
|
|
49646
49972
|
}
|
|
49647
49973
|
function WalkMinimap() {
|
|
49648
|
-
const [walkStep, setWalkStep] =
|
|
49649
|
-
const [traits2, setTraits] =
|
|
49650
|
-
const [coveredEdges, setCoveredEdges] =
|
|
49651
|
-
const [completedTraits, setCompletedTraits] =
|
|
49652
|
-
const prevTraitRef =
|
|
49653
|
-
|
|
49974
|
+
const [walkStep, setWalkStep] = React114.useState(null);
|
|
49975
|
+
const [traits2, setTraits] = React114.useState([]);
|
|
49976
|
+
const [coveredEdges, setCoveredEdges] = React114.useState([]);
|
|
49977
|
+
const [completedTraits, setCompletedTraits] = React114.useState(/* @__PURE__ */ new Set());
|
|
49978
|
+
const prevTraitRef = React114.useRef(null);
|
|
49979
|
+
React114.useEffect(() => {
|
|
49654
49980
|
const interval = setInterval(() => {
|
|
49655
49981
|
const w = window;
|
|
49656
49982
|
const step = w.__orbitalWalkStep;
|
|
@@ -50086,15 +50412,15 @@ var init_EntitiesTab = __esm({
|
|
|
50086
50412
|
});
|
|
50087
50413
|
function EventFlowTab({ events: events2 }) {
|
|
50088
50414
|
const { t } = useTranslate();
|
|
50089
|
-
const [filter, setFilter] =
|
|
50090
|
-
const containerRef =
|
|
50091
|
-
const [autoScroll, setAutoScroll] =
|
|
50092
|
-
|
|
50415
|
+
const [filter, setFilter] = React114.useState("all");
|
|
50416
|
+
const containerRef = React114.useRef(null);
|
|
50417
|
+
const [autoScroll, setAutoScroll] = React114.useState(true);
|
|
50418
|
+
React114.useEffect(() => {
|
|
50093
50419
|
if (autoScroll && containerRef.current) {
|
|
50094
50420
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
50095
50421
|
}
|
|
50096
50422
|
}, [events2.length, autoScroll]);
|
|
50097
|
-
const filteredEvents =
|
|
50423
|
+
const filteredEvents = React114.useMemo(() => {
|
|
50098
50424
|
if (filter === "all") return events2;
|
|
50099
50425
|
return events2.filter((e) => e.type === filter);
|
|
50100
50426
|
}, [events2, filter]);
|
|
@@ -50210,7 +50536,7 @@ var init_EventFlowTab = __esm({
|
|
|
50210
50536
|
});
|
|
50211
50537
|
function GuardsPanel({ guards }) {
|
|
50212
50538
|
const { t } = useTranslate();
|
|
50213
|
-
const [filter, setFilter] =
|
|
50539
|
+
const [filter, setFilter] = React114.useState("all");
|
|
50214
50540
|
if (guards.length === 0) {
|
|
50215
50541
|
return /* @__PURE__ */ jsx(
|
|
50216
50542
|
EmptyState,
|
|
@@ -50223,7 +50549,7 @@ function GuardsPanel({ guards }) {
|
|
|
50223
50549
|
}
|
|
50224
50550
|
const passedCount = guards.filter((g) => g.result).length;
|
|
50225
50551
|
const failedCount = guards.length - passedCount;
|
|
50226
|
-
const filteredGuards =
|
|
50552
|
+
const filteredGuards = React114.useMemo(() => {
|
|
50227
50553
|
if (filter === "all") return guards;
|
|
50228
50554
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
50229
50555
|
return guards.filter((g) => !g.result);
|
|
@@ -50386,10 +50712,10 @@ function EffectBadge({ effect }) {
|
|
|
50386
50712
|
}
|
|
50387
50713
|
function TransitionTimeline({ transitions }) {
|
|
50388
50714
|
const { t } = useTranslate();
|
|
50389
|
-
const containerRef =
|
|
50390
|
-
const [autoScroll, setAutoScroll] =
|
|
50391
|
-
const [expandedId, setExpandedId] =
|
|
50392
|
-
|
|
50715
|
+
const containerRef = React114.useRef(null);
|
|
50716
|
+
const [autoScroll, setAutoScroll] = React114.useState(true);
|
|
50717
|
+
const [expandedId, setExpandedId] = React114.useState(null);
|
|
50718
|
+
React114.useEffect(() => {
|
|
50393
50719
|
if (autoScroll && containerRef.current) {
|
|
50394
50720
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
50395
50721
|
}
|
|
@@ -50669,9 +50995,9 @@ function getAllEvents(traits2) {
|
|
|
50669
50995
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
50670
50996
|
const eventBus = useEventBus();
|
|
50671
50997
|
const { t } = useTranslate();
|
|
50672
|
-
const [log11, setLog] =
|
|
50673
|
-
const prevStatesRef =
|
|
50674
|
-
|
|
50998
|
+
const [log11, setLog] = React114.useState([]);
|
|
50999
|
+
const prevStatesRef = React114.useRef(/* @__PURE__ */ new Map());
|
|
51000
|
+
React114.useEffect(() => {
|
|
50675
51001
|
for (const trait of traits2) {
|
|
50676
51002
|
const prev = prevStatesRef.current.get(trait.id);
|
|
50677
51003
|
if (prev && prev !== trait.currentState) {
|
|
@@ -50840,10 +51166,10 @@ function VerifyModePanel({
|
|
|
50840
51166
|
localCount
|
|
50841
51167
|
}) {
|
|
50842
51168
|
const { t } = useTranslate();
|
|
50843
|
-
const [expanded, setExpanded] =
|
|
50844
|
-
const scrollRef =
|
|
50845
|
-
const prevCountRef =
|
|
50846
|
-
|
|
51169
|
+
const [expanded, setExpanded] = React114.useState(true);
|
|
51170
|
+
const scrollRef = React114.useRef(null);
|
|
51171
|
+
const prevCountRef = React114.useRef(0);
|
|
51172
|
+
React114.useEffect(() => {
|
|
50847
51173
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
50848
51174
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
50849
51175
|
}
|
|
@@ -50900,10 +51226,10 @@ function RuntimeDebugger({
|
|
|
50900
51226
|
schema
|
|
50901
51227
|
}) {
|
|
50902
51228
|
const { t } = useTranslate();
|
|
50903
|
-
const [isCollapsed, setIsCollapsed] =
|
|
50904
|
-
const [isVisible, setIsVisible] =
|
|
51229
|
+
const [isCollapsed, setIsCollapsed] = React114.useState(mode === "verify" ? true : defaultCollapsed);
|
|
51230
|
+
const [isVisible, setIsVisible] = React114.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
50905
51231
|
const debugData = useDebugData();
|
|
50906
|
-
|
|
51232
|
+
React114.useEffect(() => {
|
|
50907
51233
|
if (mode === "inline") return;
|
|
50908
51234
|
return onDebugToggle((enabled) => {
|
|
50909
51235
|
setIsVisible(enabled);
|
|
@@ -50912,7 +51238,7 @@ function RuntimeDebugger({
|
|
|
50912
51238
|
}
|
|
50913
51239
|
});
|
|
50914
51240
|
}, [mode]);
|
|
50915
|
-
|
|
51241
|
+
React114.useEffect(() => {
|
|
50916
51242
|
if (mode === "inline") return;
|
|
50917
51243
|
const handleKeyDown = (e) => {
|
|
50918
51244
|
if (e.key === "`" && isVisible) {
|
|
@@ -51432,7 +51758,7 @@ var init_StatCard = __esm({
|
|
|
51432
51758
|
const labelToUse = propLabel ?? propTitle;
|
|
51433
51759
|
const eventBus = useEventBus();
|
|
51434
51760
|
const { t } = useTranslate();
|
|
51435
|
-
const handleActionClick =
|
|
51761
|
+
const handleActionClick = React114__default.useCallback(() => {
|
|
51436
51762
|
if (action?.event) {
|
|
51437
51763
|
eventBus.emit(`UI:${action.event}`, {});
|
|
51438
51764
|
}
|
|
@@ -51443,7 +51769,7 @@ var init_StatCard = __esm({
|
|
|
51443
51769
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
51444
51770
|
const isLoading = externalLoading ?? false;
|
|
51445
51771
|
const error = externalError;
|
|
51446
|
-
const computeMetricValue =
|
|
51772
|
+
const computeMetricValue = React114__default.useCallback(
|
|
51447
51773
|
(metric, items) => {
|
|
51448
51774
|
if (metric.value !== void 0) {
|
|
51449
51775
|
return metric.value;
|
|
@@ -51482,7 +51808,7 @@ var init_StatCard = __esm({
|
|
|
51482
51808
|
},
|
|
51483
51809
|
[]
|
|
51484
51810
|
);
|
|
51485
|
-
const schemaStats =
|
|
51811
|
+
const schemaStats = React114__default.useMemo(() => {
|
|
51486
51812
|
if (!metrics || metrics.length === 0) return null;
|
|
51487
51813
|
return metrics.map((metric) => ({
|
|
51488
51814
|
label: metric.label,
|
|
@@ -51490,7 +51816,7 @@ var init_StatCard = __esm({
|
|
|
51490
51816
|
format: metric.format
|
|
51491
51817
|
}));
|
|
51492
51818
|
}, [metrics, data, computeMetricValue]);
|
|
51493
|
-
const calculatedTrend =
|
|
51819
|
+
const calculatedTrend = React114__default.useMemo(() => {
|
|
51494
51820
|
if (manualTrend !== void 0) return manualTrend;
|
|
51495
51821
|
if (previousValue === void 0 || currentValue === void 0)
|
|
51496
51822
|
return void 0;
|
|
@@ -52130,8 +52456,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
52130
52456
|
] });
|
|
52131
52457
|
};
|
|
52132
52458
|
InlineActivityStream = ({ activities, autoScroll = true, className }) => {
|
|
52133
|
-
const endRef =
|
|
52134
|
-
|
|
52459
|
+
const endRef = React114__default.useRef(null);
|
|
52460
|
+
React114__default.useEffect(() => {
|
|
52135
52461
|
if (!autoScroll) return;
|
|
52136
52462
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
52137
52463
|
}, [activities.length, autoScroll]);
|
|
@@ -52225,7 +52551,7 @@ var init_SubagentTracePanel = __esm({
|
|
|
52225
52551
|
};
|
|
52226
52552
|
SubagentRichCard = ({ subagent }) => {
|
|
52227
52553
|
const { t } = useTranslate();
|
|
52228
|
-
const activities =
|
|
52554
|
+
const activities = React114__default.useMemo(
|
|
52229
52555
|
() => subagentMessagesToActivities(subagent.messages),
|
|
52230
52556
|
[subagent.messages]
|
|
52231
52557
|
);
|
|
@@ -52302,8 +52628,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
52302
52628
|
] });
|
|
52303
52629
|
};
|
|
52304
52630
|
CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
|
|
52305
|
-
const endRef =
|
|
52306
|
-
|
|
52631
|
+
const endRef = React114__default.useRef(null);
|
|
52632
|
+
React114__default.useEffect(() => {
|
|
52307
52633
|
if (!autoScroll) return;
|
|
52308
52634
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
52309
52635
|
}, [messages.length, autoScroll]);
|
|
@@ -52733,7 +53059,7 @@ var init_Timeline = __esm({
|
|
|
52733
53059
|
}) => {
|
|
52734
53060
|
const { t } = useTranslate();
|
|
52735
53061
|
const entityData = entity ?? [];
|
|
52736
|
-
const items =
|
|
53062
|
+
const items = React114__default.useMemo(() => {
|
|
52737
53063
|
if (propItems) return propItems;
|
|
52738
53064
|
if (entityData.length === 0) return [];
|
|
52739
53065
|
return entityData.map((record, idx) => {
|
|
@@ -52835,7 +53161,7 @@ var init_Timeline = __esm({
|
|
|
52835
53161
|
}
|
|
52836
53162
|
});
|
|
52837
53163
|
function extractToastProps(children) {
|
|
52838
|
-
if (!
|
|
53164
|
+
if (!React114__default.isValidElement(children)) {
|
|
52839
53165
|
if (typeof children === "string") {
|
|
52840
53166
|
return { message: children };
|
|
52841
53167
|
}
|
|
@@ -52873,7 +53199,7 @@ var init_ToastSlot = __esm({
|
|
|
52873
53199
|
eventBus.emit("UI:CLOSE");
|
|
52874
53200
|
};
|
|
52875
53201
|
if (!isVisible) return null;
|
|
52876
|
-
const isCustomContent =
|
|
53202
|
+
const isCustomContent = React114__default.isValidElement(children) && !message;
|
|
52877
53203
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
52878
53204
|
Toast,
|
|
52879
53205
|
{
|
|
@@ -52889,9 +53215,33 @@ var init_ToastSlot = __esm({
|
|
|
52889
53215
|
ToastSlot.displayName = "ToastSlot";
|
|
52890
53216
|
}
|
|
52891
53217
|
});
|
|
52892
|
-
|
|
52893
|
-
|
|
52894
|
-
|
|
53218
|
+
function lazyThree(name, loader) {
|
|
53219
|
+
const Lazy = React114__default.lazy(
|
|
53220
|
+
() => loader().then((m) => {
|
|
53221
|
+
const Resolved = m[name];
|
|
53222
|
+
if (!Resolved) {
|
|
53223
|
+
throw new Error(
|
|
53224
|
+
`[@almadar/ui] 3D component "${name}" was not found in the three subpath bundle.`
|
|
53225
|
+
);
|
|
53226
|
+
}
|
|
53227
|
+
return { default: Resolved };
|
|
53228
|
+
})
|
|
53229
|
+
);
|
|
53230
|
+
function ThreeWrapper(props) {
|
|
53231
|
+
return React114__default.createElement(
|
|
53232
|
+
ThreeBoundary,
|
|
53233
|
+
{ name },
|
|
53234
|
+
React114__default.createElement(
|
|
53235
|
+
React114__default.Suspense,
|
|
53236
|
+
{ fallback: null },
|
|
53237
|
+
React114__default.createElement(Lazy, props)
|
|
53238
|
+
)
|
|
53239
|
+
);
|
|
53240
|
+
}
|
|
53241
|
+
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
53242
|
+
return ThreeWrapper;
|
|
53243
|
+
}
|
|
53244
|
+
var ThreeBoundary, GameBoard3D, GameCanvas3D, GameCanvas3DBattleTemplate, GameCanvas3DCastleTemplate, GameCanvas3DWorldMapTemplate, COMPONENT_REGISTRY;
|
|
52895
53245
|
var init_component_registry_generated = __esm({
|
|
52896
53246
|
"components/core/organisms/component-registry.generated.ts"() {
|
|
52897
53247
|
init_AboutPageTemplate();
|
|
@@ -53002,9 +53352,11 @@ var init_component_registry_generated = __esm({
|
|
|
53002
53352
|
init_Form();
|
|
53003
53353
|
init_FormField();
|
|
53004
53354
|
init_FormSectionHeader();
|
|
53355
|
+
init_GameAudioProvider();
|
|
53005
53356
|
init_GameAudioToggle();
|
|
53006
53357
|
init_GameCard();
|
|
53007
53358
|
init_GameHud();
|
|
53359
|
+
init_GameIcon();
|
|
53008
53360
|
init_GameMenu();
|
|
53009
53361
|
init_GameShell();
|
|
53010
53362
|
init_GameTemplate();
|
|
@@ -53189,6 +53541,33 @@ var init_component_registry_generated = __esm({
|
|
|
53189
53541
|
init_WizardProgress();
|
|
53190
53542
|
init_WorldMapBoard();
|
|
53191
53543
|
init_WorldMapTemplate();
|
|
53544
|
+
ThreeBoundary = class extends React114__default.Component {
|
|
53545
|
+
constructor() {
|
|
53546
|
+
super(...arguments);
|
|
53547
|
+
__publicField(this, "state", { failed: false });
|
|
53548
|
+
}
|
|
53549
|
+
static getDerivedStateFromError() {
|
|
53550
|
+
return { failed: true };
|
|
53551
|
+
}
|
|
53552
|
+
render() {
|
|
53553
|
+
if (this.state.failed) {
|
|
53554
|
+
return React114__default.createElement(
|
|
53555
|
+
"div",
|
|
53556
|
+
{
|
|
53557
|
+
"data-testid": "three-unavailable",
|
|
53558
|
+
style: { padding: 16, fontSize: 13, lineHeight: 1.5, opacity: 0.7 }
|
|
53559
|
+
},
|
|
53560
|
+
`3D pattern "${this.props.name}" requires three.js. Install the optional peers three + @react-three/fiber + @react-three/drei (matching the host React major) to render it.`
|
|
53561
|
+
);
|
|
53562
|
+
}
|
|
53563
|
+
return this.props.children;
|
|
53564
|
+
}
|
|
53565
|
+
};
|
|
53566
|
+
GameBoard3D = lazyThree("GameBoard3D", () => import('@almadar/ui/components/molecules/game/three'));
|
|
53567
|
+
GameCanvas3D = lazyThree("GameCanvas3D", () => import('@almadar/ui/components/molecules/game/three'));
|
|
53568
|
+
GameCanvas3DBattleTemplate = lazyThree("GameCanvas3DBattleTemplate", () => import('@almadar/ui/components/molecules/game/three'));
|
|
53569
|
+
GameCanvas3DCastleTemplate = lazyThree("GameCanvas3DCastleTemplate", () => import('@almadar/ui/components/molecules/game/three'));
|
|
53570
|
+
GameCanvas3DWorldMapTemplate = lazyThree("GameCanvas3DWorldMapTemplate", () => import('@almadar/ui/components/molecules/game/three'));
|
|
53192
53571
|
COMPONENT_REGISTRY = {
|
|
53193
53572
|
"AboutPageTemplate": AboutPageTemplate,
|
|
53194
53573
|
"Accordion": Accordion,
|
|
@@ -53304,9 +53683,16 @@ var init_component_registry_generated = __esm({
|
|
|
53304
53683
|
"Form": Form,
|
|
53305
53684
|
"FormField": FormField,
|
|
53306
53685
|
"FormSectionHeader": FormSectionHeader,
|
|
53686
|
+
"GameAudioProvider": GameAudioProvider,
|
|
53307
53687
|
"GameAudioToggle": GameAudioToggle,
|
|
53688
|
+
"GameBoard3D": GameBoard3D,
|
|
53689
|
+
"GameCanvas3D": GameCanvas3D,
|
|
53690
|
+
"GameCanvas3DBattleTemplate": GameCanvas3DBattleTemplate,
|
|
53691
|
+
"GameCanvas3DCastleTemplate": GameCanvas3DCastleTemplate,
|
|
53692
|
+
"GameCanvas3DWorldMapTemplate": GameCanvas3DWorldMapTemplate,
|
|
53308
53693
|
"GameCard": GameCard,
|
|
53309
53694
|
"GameHud": GameHud,
|
|
53695
|
+
"GameIcon": GameIcon,
|
|
53310
53696
|
"GameMenu": GameMenu,
|
|
53311
53697
|
"GameShell": GameShell,
|
|
53312
53698
|
"GameTemplate": GameTemplate,
|
|
@@ -53515,7 +53901,7 @@ function SuspenseConfigProvider({
|
|
|
53515
53901
|
config,
|
|
53516
53902
|
children
|
|
53517
53903
|
}) {
|
|
53518
|
-
return
|
|
53904
|
+
return React114__default.createElement(
|
|
53519
53905
|
SuspenseConfigContext.Provider,
|
|
53520
53906
|
{ value: config },
|
|
53521
53907
|
children
|
|
@@ -53557,7 +53943,7 @@ function enrichFormFields(fields, entityDef) {
|
|
|
53557
53943
|
}
|
|
53558
53944
|
return { name: field, label: field.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (c) => c.toUpperCase()) };
|
|
53559
53945
|
}
|
|
53560
|
-
if (field && typeof field === "object" && !Array.isArray(field) && !
|
|
53946
|
+
if (field && typeof field === "object" && !Array.isArray(field) && !React114__default.isValidElement(field) && !(field instanceof Date)) {
|
|
53561
53947
|
const obj = field;
|
|
53562
53948
|
const fieldName = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
|
|
53563
53949
|
if (!fieldName) return field;
|
|
@@ -54003,7 +54389,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
54003
54389
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
54004
54390
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
54005
54391
|
}
|
|
54006
|
-
return /* @__PURE__ */ jsx(
|
|
54392
|
+
return /* @__PURE__ */ jsx(React114__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
54007
54393
|
}
|
|
54008
54394
|
if (!child || typeof child !== "object") return null;
|
|
54009
54395
|
const childId = `${parentId}-${index}`;
|
|
@@ -54043,14 +54429,14 @@ function isPatternConfig(value) {
|
|
|
54043
54429
|
if (value === null || value === void 0) return false;
|
|
54044
54430
|
if (typeof value !== "object") return false;
|
|
54045
54431
|
if (Array.isArray(value)) return false;
|
|
54046
|
-
if (
|
|
54432
|
+
if (React114__default.isValidElement(value)) return false;
|
|
54047
54433
|
if (value instanceof Date) return false;
|
|
54048
54434
|
if (typeof value === "function") return false;
|
|
54049
54435
|
const record = value;
|
|
54050
54436
|
return "type" in record && typeof record.type === "string" && getComponentForPattern(record.type) !== null;
|
|
54051
54437
|
}
|
|
54052
54438
|
function isPlainConfigObject(value) {
|
|
54053
|
-
if (
|
|
54439
|
+
if (React114__default.isValidElement(value)) return false;
|
|
54054
54440
|
if (value instanceof Date) return false;
|
|
54055
54441
|
const proto = Object.getPrototypeOf(value);
|
|
54056
54442
|
return proto === Object.prototype || proto === null;
|
|
@@ -54176,7 +54562,7 @@ function SlotContentRenderer({
|
|
|
54176
54562
|
for (const slotKey of CONTENT_NODE_SLOTS) {
|
|
54177
54563
|
const slotVal = restProps[slotKey];
|
|
54178
54564
|
if (slotVal === void 0 || slotVal === null) continue;
|
|
54179
|
-
if (
|
|
54565
|
+
if (React114__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
|
|
54180
54566
|
if (Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
|
|
54181
54567
|
nodeSlotOverrides[slotKey] = renderPatternChildren(
|
|
54182
54568
|
slotVal,
|
|
@@ -54225,7 +54611,7 @@ function SlotContentRenderer({
|
|
|
54225
54611
|
const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
|
|
54226
54612
|
if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
|
|
54227
54613
|
const sample = resolvedItems[0];
|
|
54228
|
-
if (sample && typeof sample === "object" && !Array.isArray(sample) && !
|
|
54614
|
+
if (sample && typeof sample === "object" && !Array.isArray(sample) && !React114__default.isValidElement(sample) && !(sample instanceof Date)) {
|
|
54229
54615
|
const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
|
|
54230
54616
|
finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
|
|
54231
54617
|
}
|
|
@@ -54587,7 +54973,7 @@ var AvlTransition = ({
|
|
|
54587
54973
|
opacity = 1,
|
|
54588
54974
|
className
|
|
54589
54975
|
}) => {
|
|
54590
|
-
const ids =
|
|
54976
|
+
const ids = React114__default.useMemo(() => {
|
|
54591
54977
|
avlTransitionId += 1;
|
|
54592
54978
|
return { arrow: `avl-tr-${avlTransitionId}-arrow` };
|
|
54593
54979
|
}, []);
|
|
@@ -55148,7 +55534,7 @@ var AvlStateMachine = ({
|
|
|
55148
55534
|
color = "var(--color-primary)",
|
|
55149
55535
|
animated = false
|
|
55150
55536
|
}) => {
|
|
55151
|
-
const ids =
|
|
55537
|
+
const ids = React114__default.useMemo(() => {
|
|
55152
55538
|
avlSmId += 1;
|
|
55153
55539
|
const base = `avl-sm-${avlSmId}`;
|
|
55154
55540
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -55347,7 +55733,7 @@ var AvlOrbitalUnit = ({
|
|
|
55347
55733
|
color = "var(--color-primary)",
|
|
55348
55734
|
animated = false
|
|
55349
55735
|
}) => {
|
|
55350
|
-
const ids =
|
|
55736
|
+
const ids = React114__default.useMemo(() => {
|
|
55351
55737
|
avlOuId += 1;
|
|
55352
55738
|
const base = `avl-ou-${avlOuId}`;
|
|
55353
55739
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -55443,7 +55829,7 @@ var AvlClosedCircuit = ({
|
|
|
55443
55829
|
color = "var(--color-primary)",
|
|
55444
55830
|
animated = false
|
|
55445
55831
|
}) => {
|
|
55446
|
-
const ids =
|
|
55832
|
+
const ids = React114__default.useMemo(() => {
|
|
55447
55833
|
avlCcId += 1;
|
|
55448
55834
|
const base = `avl-cc-${avlCcId}`;
|
|
55449
55835
|
return { glow: `${base}-glow`, grad: `${base}-grad`, arrow: `${base}-arrow` };
|
|
@@ -55598,7 +55984,7 @@ var AvlEmitListen = ({
|
|
|
55598
55984
|
color = "var(--color-primary)",
|
|
55599
55985
|
animated = false
|
|
55600
55986
|
}) => {
|
|
55601
|
-
const ids =
|
|
55987
|
+
const ids = React114__default.useMemo(() => {
|
|
55602
55988
|
avlElId += 1;
|
|
55603
55989
|
const base = `avl-el-${avlElId}`;
|
|
55604
55990
|
return { arrow: `${base}-arrow`, grad: `${base}-grad` };
|
|
@@ -55872,7 +56258,7 @@ function renderNode(node, color, glowId) {
|
|
|
55872
56258
|
const baseR = node.type === "operator" ? 20 : 16;
|
|
55873
56259
|
const r2 = Math.max(baseR, labelLen * 3.5 + 6);
|
|
55874
56260
|
const nc = nodeColor(node.type, color);
|
|
55875
|
-
return /* @__PURE__ */ jsxs(
|
|
56261
|
+
return /* @__PURE__ */ jsxs(React114__default.Fragment, { children: [
|
|
55876
56262
|
node.children.map((child, i) => {
|
|
55877
56263
|
const childR = Math.max(
|
|
55878
56264
|
child.type === "operator" ? 20 : 16,
|
|
@@ -55929,7 +56315,7 @@ var AvlExprTree = ({
|
|
|
55929
56315
|
className,
|
|
55930
56316
|
color = "var(--color-primary)"
|
|
55931
56317
|
}) => {
|
|
55932
|
-
const ids =
|
|
56318
|
+
const ids = React114__default.useMemo(() => {
|
|
55933
56319
|
avlEtId += 1;
|
|
55934
56320
|
return { glow: `avl-et-${avlEtId}-glow` };
|
|
55935
56321
|
}, []);
|
|
@@ -56764,7 +57150,7 @@ var SystemNode = ({ data }) => {
|
|
|
56764
57150
|
stateChain.length > 0 && /* @__PURE__ */ jsx("svg", { width: stateChain.length * 14 + 2, height: 10, viewBox: `0 0 ${stateChain.length * 14 + 2} 10`, children: stateChain.map((s, i) => {
|
|
56765
57151
|
const tc = transitionCounts[s.name] ?? 0;
|
|
56766
57152
|
const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
56767
|
-
return /* @__PURE__ */ jsxs(
|
|
57153
|
+
return /* @__PURE__ */ jsxs(React114__default.Fragment, { children: [
|
|
56768
57154
|
/* @__PURE__ */ jsx(AvlState, { x: i * 14 + 1, y: 1, width: 10, height: 8, name: "", role, isInitial: s.isInitial ?? void 0, isTerminal: s.isTerminal ?? void 0 }),
|
|
56769
57155
|
i < stateChain.length - 1 && /* @__PURE__ */ jsx("line", { x1: i * 14 + 12, y1: 5, x2: i * 14 + 15, y2: 5, stroke: "var(--color-border)", strokeWidth: 0.5 })
|
|
56770
57156
|
] }, s.name);
|
|
@@ -57909,7 +58295,7 @@ function resolveLambdaBindings(body, params, item, index) {
|
|
|
57909
58295
|
if (Array.isArray(body)) {
|
|
57910
58296
|
return body.map((b) => recur(b));
|
|
57911
58297
|
}
|
|
57912
|
-
if (body !== null && typeof body === "object" && !
|
|
58298
|
+
if (body !== null && typeof body === "object" && !React114__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
57913
58299
|
const out = {};
|
|
57914
58300
|
for (const [k, v] of Object.entries(body)) {
|
|
57915
58301
|
out[k] = recur(v);
|
|
@@ -57928,7 +58314,7 @@ function getSlotContentRenderer4() {
|
|
|
57928
58314
|
function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
57929
58315
|
return (item, index) => {
|
|
57930
58316
|
const resolvedBody = resolveLambdaBindings(lambdaBody, params, item, index);
|
|
57931
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
58317
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React114__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
57932
58318
|
return null;
|
|
57933
58319
|
}
|
|
57934
58320
|
const record = resolvedBody;
|
|
@@ -57947,7 +58333,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
57947
58333
|
props: childProps,
|
|
57948
58334
|
priority: 0
|
|
57949
58335
|
};
|
|
57950
|
-
return
|
|
58336
|
+
return React114__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
57951
58337
|
};
|
|
57952
58338
|
}
|
|
57953
58339
|
function convertNode(node, callerKey) {
|
|
@@ -57966,7 +58352,7 @@ function convertNode(node, callerKey) {
|
|
|
57966
58352
|
});
|
|
57967
58353
|
return anyChanged ? mapped : node;
|
|
57968
58354
|
}
|
|
57969
|
-
if (typeof node === "object" && !
|
|
58355
|
+
if (typeof node === "object" && !React114__default.isValidElement(node) && !(node instanceof Date)) {
|
|
57970
58356
|
return convertObjectProps(node);
|
|
57971
58357
|
}
|
|
57972
58358
|
return node;
|
|
@@ -59629,8 +60015,8 @@ function CanvasDndProvider({
|
|
|
59629
60015
|
}) {
|
|
59630
60016
|
const eventBus = useEventBus();
|
|
59631
60017
|
const sensors = useAlmadarDndSensors(false);
|
|
59632
|
-
const [activePayload, setActivePayload] =
|
|
59633
|
-
const handleDragStart =
|
|
60018
|
+
const [activePayload, setActivePayload] = React114__default.useState(null);
|
|
60019
|
+
const handleDragStart = React114__default.useCallback((e) => {
|
|
59634
60020
|
const data = e.active.data.current;
|
|
59635
60021
|
const payload = data?.payload;
|
|
59636
60022
|
if (payload) {
|
|
@@ -59641,7 +60027,7 @@ function CanvasDndProvider({
|
|
|
59641
60027
|
log9.warn("dragStart:missing-payload", { id: e.active.id });
|
|
59642
60028
|
}
|
|
59643
60029
|
}, [eventBus]);
|
|
59644
|
-
const handleDragEnd =
|
|
60030
|
+
const handleDragEnd = React114__default.useCallback((e) => {
|
|
59645
60031
|
setActivePayload(null);
|
|
59646
60032
|
const activeData = e.active.data.current;
|
|
59647
60033
|
const payload = activeData?.payload;
|
|
@@ -59670,7 +60056,7 @@ function CanvasDndProvider({
|
|
|
59670
60056
|
const suppressed = onDrop ? onDrop(drop) === true : false;
|
|
59671
60057
|
if (!suppressed) defaultEmit(eventBus, drop);
|
|
59672
60058
|
}, [eventBus, onDrop]);
|
|
59673
|
-
const handleDragCancel =
|
|
60059
|
+
const handleDragCancel = React114__default.useCallback(() => {
|
|
59674
60060
|
setActivePayload(null);
|
|
59675
60061
|
log9.info("dragCancel");
|
|
59676
60062
|
}, []);
|
|
@@ -60428,7 +60814,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
60428
60814
|
}
|
|
60429
60815
|
);
|
|
60430
60816
|
};
|
|
60431
|
-
var OrbPreviewNode =
|
|
60817
|
+
var OrbPreviewNode = React114__default.memo(OrbPreviewNodeInner);
|
|
60432
60818
|
OrbPreviewNode.displayName = "OrbPreviewNode";
|
|
60433
60819
|
orbPreviewLog.debug("export-resolved", () => ({
|
|
60434
60820
|
type: typeof OrbPreviewNode,
|
|
@@ -60533,7 +60919,7 @@ var EventFlowEdgeInner = (props) => {
|
|
|
60533
60919
|
) })
|
|
60534
60920
|
] });
|
|
60535
60921
|
};
|
|
60536
|
-
var EventFlowEdge =
|
|
60922
|
+
var EventFlowEdge = React114__default.memo(EventFlowEdgeInner);
|
|
60537
60923
|
EventFlowEdge.displayName = "EventFlowEdge";
|
|
60538
60924
|
|
|
60539
60925
|
// components/avl/molecules/BehaviorComposeNode.tsx
|
|
@@ -60680,7 +61066,7 @@ var BehaviorComposeNodeInner = (props) => {
|
|
|
60680
61066
|
}
|
|
60681
61067
|
);
|
|
60682
61068
|
};
|
|
60683
|
-
var BehaviorComposeNode =
|
|
61069
|
+
var BehaviorComposeNode = React114__default.memo(BehaviorComposeNodeInner);
|
|
60684
61070
|
BehaviorComposeNode.displayName = "BehaviorComposeNode";
|
|
60685
61071
|
|
|
60686
61072
|
// components/avl/lib/avl-behavior-compose-converter.ts
|
|
@@ -61706,7 +62092,7 @@ var TraitCardNodeInner = (props) => {
|
|
|
61706
62092
|
}
|
|
61707
62093
|
);
|
|
61708
62094
|
};
|
|
61709
|
-
var TraitCardNode =
|
|
62095
|
+
var TraitCardNode = React114__default.memo(TraitCardNodeInner);
|
|
61710
62096
|
TraitCardNode.displayName = "TraitCardNode";
|
|
61711
62097
|
|
|
61712
62098
|
// components/avl/organisms/FlowCanvas.tsx
|
|
@@ -61779,7 +62165,7 @@ function FlowCanvasInner({
|
|
|
61779
62165
|
initialOrbital
|
|
61780
62166
|
);
|
|
61781
62167
|
const [expandedBehaviorAlias, setExpandedBehaviorAlias] = useState(void 0);
|
|
61782
|
-
const screenSizeUserOverrideRef =
|
|
62168
|
+
const screenSizeUserOverrideRef = React114__default.useRef(false);
|
|
61783
62169
|
const [screenSize, setScreenSize] = useState(
|
|
61784
62170
|
() => typeof window === "undefined" ? "laptop" : detectScreenSize(window.innerWidth)
|
|
61785
62171
|
);
|
|
@@ -62163,7 +62549,7 @@ var ZoomBreadcrumb = ({
|
|
|
62163
62549
|
if (eventName && band === "detail") {
|
|
62164
62550
|
segments.push({ icon: "\u26A1", label: eventName });
|
|
62165
62551
|
}
|
|
62166
|
-
return /* @__PURE__ */ jsx("div", { className: "absolute top-2 left-2 z-10 flex items-center gap-1 px-2 py-1 rounded-md bg-card/90 border border-border text-xs text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(
|
|
62552
|
+
return /* @__PURE__ */ jsx("div", { className: "absolute top-2 left-2 z-10 flex items-center gap-1 px-2 py-1 rounded-md bg-card/90 border border-border text-xs text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(React114__default.Fragment, { children: [
|
|
62167
62553
|
i > 0 && /* @__PURE__ */ jsx("span", { className: "opacity-40", children: ">" }),
|
|
62168
62554
|
/* @__PURE__ */ jsx("span", { className: "opacity-60", children: seg.icon }),
|
|
62169
62555
|
/* @__PURE__ */ jsx("span", { children: seg.label })
|
|
@@ -62504,7 +62890,7 @@ var EventWireOverlay = ({
|
|
|
62504
62890
|
containerW,
|
|
62505
62891
|
containerH
|
|
62506
62892
|
}) => {
|
|
62507
|
-
const ids =
|
|
62893
|
+
const ids = React114__default.useMemo(() => {
|
|
62508
62894
|
avlOczWireId += 1;
|
|
62509
62895
|
return { arrow: `avl-ocz-wire-${avlOczWireId}-arrow` };
|
|
62510
62896
|
}, []);
|
|
@@ -62871,7 +63257,7 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
62871
63257
|
borderRadius: 6,
|
|
62872
63258
|
border: `1px solid ${color}`
|
|
62873
63259
|
},
|
|
62874
|
-
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(
|
|
63260
|
+
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React114__default.Fragment, { children: [
|
|
62875
63261
|
i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", style: { opacity: 0.5, color }, children: "/" }),
|
|
62876
63262
|
i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
|
|
62877
63263
|
Box,
|