@almadar/ui 5.79.2 → 5.80.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avl/index.cjs +1673 -1590
- package/dist/avl/index.css +3 -3
- package/dist/avl/index.js +464 -381
- package/dist/components/core/atoms/FlipContainer.d.ts +1 -1
- package/dist/components/core/molecules/Card.d.ts +1 -1
- package/dist/components/core/molecules/DataGrid.d.ts +1 -1
- package/dist/components/core/molecules/DataList.d.ts +1 -1
- package/dist/components/core/molecules/DocPagination.d.ts +1 -8
- package/dist/components/core/molecules/DocSearch.d.ts +1 -8
- package/dist/components/core/molecules/FlipCard.d.ts +1 -1
- package/dist/components/core/molecules/MapView.d.ts +1 -18
- package/dist/components/core/molecules/SortableList.d.ts +1 -1
- package/dist/components/core/molecules/TableView.d.ts +1 -1
- package/dist/components/core/molecules/WizardContainer.d.ts +7 -1
- package/dist/components/core/organisms/DataTable.d.ts +1 -1
- package/dist/components/core/organisms/DrawerSlot.d.ts +2 -0
- package/dist/components/core/organisms/ModalSlot.d.ts +2 -0
- package/dist/components/core/organisms/ToastSlot.d.ts +2 -0
- package/dist/components/core/organisms/debug/RuntimeDebugger.d.ts +1 -10
- package/dist/components/core/organisms/debug/tabs/EntitiesTab.d.ts +1 -2
- package/dist/components/core/organisms/debug/tabs/EventDispatcherTab.d.ts +1 -2
- package/dist/components/core/organisms/debug/tabs/EventFlowTab.d.ts +1 -6
- package/dist/components/core/organisms/debug/tabs/GuardsPanel.d.ts +1 -6
- package/dist/components/core/organisms/debug/tabs/ServerBridgeTab.d.ts +1 -12
- package/dist/components/core/organisms/debug/tabs/TicksTab.d.ts +1 -2
- package/dist/components/core/organisms/debug/tabs/TraitsTab.d.ts +1 -2
- package/dist/components/core/organisms/debug/tabs/TransitionTimeline.d.ts +1 -11
- package/dist/components/core/organisms/debug/tabs/VerificationTab.d.ts +1 -8
- package/dist/components/core/templates/CounterTemplate.d.ts +7 -0
- package/dist/components/game/2d/atoms/ActionButton.d.ts +4 -3
- package/dist/components/game/2d/atoms/ChoiceButton.d.ts +4 -3
- package/dist/components/game/2d/atoms/ComboCounter.d.ts +1 -2
- package/dist/components/game/2d/atoms/ControlButton.d.ts +1 -2
- package/dist/components/game/2d/atoms/DamageNumber.d.ts +1 -2
- package/dist/components/game/2d/atoms/DialogueBubble.d.ts +1 -2
- package/dist/components/game/2d/atoms/GameAudioToggle.d.ts +6 -1
- package/dist/components/game/2d/atoms/GameIcon.d.ts +1 -2
- package/dist/components/game/2d/atoms/HealthBar.d.ts +6 -2
- package/dist/components/game/2d/atoms/ItemSlot.d.ts +4 -3
- package/dist/components/game/2d/atoms/MiniMap.d.ts +6 -2
- package/dist/components/game/2d/atoms/ResourceCounter.d.ts +1 -2
- package/dist/components/game/2d/atoms/ScoreDisplay.d.ts +1 -2
- package/dist/components/game/2d/atoms/StatusEffect.d.ts +1 -2
- package/dist/components/game/2d/atoms/TimerDisplay.d.ts +4 -2
- package/dist/components/game/2d/atoms/TurnIndicator.d.ts +1 -2
- package/dist/components/game/2d/atoms/WaypointMarker.d.ts +1 -2
- package/dist/components/game/2d/molecules/ControlGrid.d.ts +3 -1
- package/dist/components/game/2d/molecules/GameHud.d.ts +1 -2
- package/dist/components/game/2d/molecules/GameMenu.d.ts +4 -8
- package/dist/components/game/2d/molecules/InventoryGrid.d.ts +1 -2
- package/dist/components/game/2d/molecules/ResourceBar.d.ts +1 -2
- package/dist/components/game/2d/molecules/StatBadge.d.ts +1 -2
- package/dist/components/game/2d/organisms/CityBuilderBoard.d.ts +2 -0
- package/dist/components/game/2d/organisms/PlatformerBoard.d.ts +3 -1
- package/dist/components/game/2d/organisms/RoguelikeBoard.d.ts +2 -0
- package/dist/components/game/2d/organisms/SequencerBoard.d.ts +5 -1
- package/dist/components/game/2d/organisms/SimulationControls.d.ts +25 -8
- package/dist/components/game/2d/organisms/TanksBoard.d.ts +4 -2
- package/dist/components/game/2d/organisms/TopDownShooterBoard.d.ts +2 -0
- package/dist/components/game/2d/organisms/TowerDefenseBoard.d.ts +2 -0
- package/dist/components/game/2d/organisms/TraitSlot.d.ts +5 -5
- package/dist/components/game/2d/templates/GameShell.d.ts +5 -0
- package/dist/components/game/2d/templates/GameTemplate.d.ts +3 -0
- package/dist/components/game/shared/lib/editorUtils.d.ts +8 -8
- package/dist/components/index.cjs +270 -155
- package/dist/components/index.css +3 -3
- package/dist/components/index.js +272 -157
- package/dist/hooks/useGitHub.d.ts +7 -7
- package/dist/marketing/index.cjs +2 -2
- package/dist/marketing/index.js +2 -2
- package/dist/providers/EventBusProvider.d.ts +1 -1
- package/dist/providers/SelectionProvider.d.ts +1 -1
- package/dist/providers/ServerBridge.d.ts +1 -1
- package/dist/providers/index.cjs +1536 -1453
- package/dist/providers/index.css +3 -3
- package/dist/providers/index.js +436 -353
- package/dist/runtime/index.cjs +1530 -1447
- package/dist/runtime/index.css +3 -3
- package/dist/runtime/index.js +440 -357
- package/package.json +1 -1
package/dist/avl/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
2
|
+
import * as React112 from 'react';
|
|
3
|
+
import React112__default, { createContext, useState, useMemo, useRef, useEffect, useContext, useCallback, Suspense, useLayoutEffect, Profiler, useReducer, useSyncExternalStore, lazy, useId } from 'react';
|
|
4
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';
|
|
@@ -11,7 +11,6 @@ import { Loader2, X, Code, FileText, WrapText, Check, Copy, Lightbulb, CheckCirc
|
|
|
11
11
|
import { createPortal } from 'react-dom';
|
|
12
12
|
import { UISlotProvider, useUISlots, useTheme } from '@almadar/ui/context';
|
|
13
13
|
import { evaluateGuard, evaluate, createMinimalContext } from '@almadar/evaluator';
|
|
14
|
-
import { getPatternDefinition, getComponentForPattern, isEntityAwarePattern } from '@almadar/patterns';
|
|
15
14
|
import { Link, Outlet, useLocation } from 'react-router-dom';
|
|
16
15
|
import SyntaxHighlighter from 'react-syntax-highlighter/dist/esm/prism-light.js';
|
|
17
16
|
import dark from 'react-syntax-highlighter/dist/esm/styles/prism/vsc-dark-plus.js';
|
|
@@ -40,6 +39,7 @@ import { FieldTypeSchema, isInlineTrait, isPageReference, isEntityCall, schemaTo
|
|
|
40
39
|
import { useDroppable, useDraggable, DndContext, DragOverlay, useSensors, useSensor, PointerSensor, KeyboardSensor, pointerWithin, rectIntersection, closestCorners } from '@dnd-kit/core';
|
|
41
40
|
import { sortableKeyboardCoordinates, useSortable, arrayMove, SortableContext, rectSortingStrategy, verticalListSortingStrategy } from '@dnd-kit/sortable';
|
|
42
41
|
import { CSS } from '@dnd-kit/utilities';
|
|
42
|
+
import { getPatternDefinition, getComponentForPattern as getComponentForPattern$1, isEntityAwarePattern } from '@almadar/patterns';
|
|
43
43
|
import { OrbitalServerRuntime } from '@almadar/runtime/OrbitalServerRuntime';
|
|
44
44
|
import { InMemoryPersistence, StateMachineManager, collectDeclaredConfigDefaults, createServerEffectHandlers, EffectExecutor, createContextFromBindings } from '@almadar/runtime';
|
|
45
45
|
|
|
@@ -584,7 +584,7 @@ var init_AvlFieldType = __esm({
|
|
|
584
584
|
}
|
|
585
585
|
});
|
|
586
586
|
|
|
587
|
-
// node_modules
|
|
587
|
+
// node_modules/clsx/dist/clsx.mjs
|
|
588
588
|
function r(e) {
|
|
589
589
|
var t, f3, n = "";
|
|
590
590
|
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
@@ -599,11 +599,11 @@ function clsx() {
|
|
|
599
599
|
return n;
|
|
600
600
|
}
|
|
601
601
|
var init_clsx = __esm({
|
|
602
|
-
"node_modules
|
|
602
|
+
"node_modules/clsx/dist/clsx.mjs"() {
|
|
603
603
|
}
|
|
604
604
|
});
|
|
605
605
|
|
|
606
|
-
// node_modules
|
|
606
|
+
// node_modules/tailwind-merge/dist/bundle-mjs.mjs
|
|
607
607
|
function twJoin() {
|
|
608
608
|
let index = 0;
|
|
609
609
|
let argument;
|
|
@@ -647,7 +647,7 @@ function createTailwindMerge(createConfigFirst, ...createConfigRest) {
|
|
|
647
647
|
}
|
|
648
648
|
var CLASS_PART_SEPARATOR, createClassGroupUtils, getGroupRecursive, arbitraryPropertyRegex, getGroupIdForArbitraryProperty, createClassMap, processClassesRecursively, getPart, isThemeGetter, getPrefixedClassGroupEntries, createLruCache, IMPORTANT_MODIFIER, createParseClassName, sortModifiers, createConfigUtils, SPLIT_CLASSES_REGEX, mergeClassList, toValue, fromTheme, arbitraryValueRegex, fractionRegex, stringLengths, tshirtUnitRegex, lengthUnitRegex, colorFunctionRegex, shadowRegex, imageRegex, isLength, isArbitraryLength, isNumber, isArbitraryNumber, isInteger, isPercent, isArbitraryValue, isTshirtSize, sizeLabels, isArbitrarySize, isArbitraryPosition, imageLabels, isArbitraryImage, isArbitraryShadow, isAny, getIsArbitraryValue, isLengthOnly, isNever, isShadow, isImage, getDefaultConfig, twMerge;
|
|
649
649
|
var init_bundle_mjs = __esm({
|
|
650
|
-
"node_modules
|
|
650
|
+
"node_modules/tailwind-merge/dist/bundle-mjs.mjs"() {
|
|
651
651
|
CLASS_PART_SEPARATOR = "-";
|
|
652
652
|
createClassGroupUtils = (config) => {
|
|
653
653
|
const classMap = createClassMap(config);
|
|
@@ -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 React112__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 = React112__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 React112__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 React112__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(React112__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 = React112__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
|
+
React112__default.Suspense,
|
|
4508
4508
|
{
|
|
4509
4509
|
fallback: /* @__PURE__ */ jsx(
|
|
4510
4510
|
"span",
|
|
@@ -5235,7 +5235,7 @@ var init_Icon = __esm({
|
|
|
5235
5235
|
const directIcon = typeof icon === "string" ? void 0 : icon;
|
|
5236
5236
|
const effectiveName = typeof icon === "string" ? icon : name;
|
|
5237
5237
|
const family = useIconFamily();
|
|
5238
|
-
const RenderedComponent =
|
|
5238
|
+
const RenderedComponent = React112__default.useMemo(() => {
|
|
5239
5239
|
if (directIcon) return null;
|
|
5240
5240
|
return effectiveName ? resolveIconForFamily(effectiveName, family) : null;
|
|
5241
5241
|
}, [directIcon, effectiveName, family]);
|
|
@@ -5297,7 +5297,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
5297
5297
|
const IconComp = value;
|
|
5298
5298
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
5299
5299
|
}
|
|
5300
|
-
if (
|
|
5300
|
+
if (React112__default.isValidElement(value)) {
|
|
5301
5301
|
return value;
|
|
5302
5302
|
}
|
|
5303
5303
|
if (typeof value === "object" && value !== null && isIconLike(value)) {
|
|
@@ -5373,7 +5373,7 @@ var init_Button = __esm({
|
|
|
5373
5373
|
md: "h-icon-default w-icon-default",
|
|
5374
5374
|
lg: "h-icon-default w-icon-default"
|
|
5375
5375
|
};
|
|
5376
|
-
Button =
|
|
5376
|
+
Button = React112__default.forwardRef(
|
|
5377
5377
|
({
|
|
5378
5378
|
className,
|
|
5379
5379
|
variant = "primary",
|
|
@@ -5439,7 +5439,7 @@ var Dialog;
|
|
|
5439
5439
|
var init_Dialog = __esm({
|
|
5440
5440
|
"components/core/atoms/Dialog.tsx"() {
|
|
5441
5441
|
init_cn();
|
|
5442
|
-
Dialog =
|
|
5442
|
+
Dialog = React112__default.forwardRef(
|
|
5443
5443
|
({
|
|
5444
5444
|
role = "dialog",
|
|
5445
5445
|
"aria-modal": ariaModal = true,
|
|
@@ -5934,7 +5934,7 @@ var init_Badge = __esm({
|
|
|
5934
5934
|
md: "px-2.5 py-1 text-sm",
|
|
5935
5935
|
lg: "px-3 py-1.5 text-base"
|
|
5936
5936
|
};
|
|
5937
|
-
Badge =
|
|
5937
|
+
Badge = React112__default.forwardRef(
|
|
5938
5938
|
({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
|
|
5939
5939
|
const iconSizes3 = {
|
|
5940
5940
|
sm: "h-icon-default w-icon-default",
|
|
@@ -6270,7 +6270,7 @@ var init_SvgFlow = __esm({
|
|
|
6270
6270
|
width = 100,
|
|
6271
6271
|
height = 100
|
|
6272
6272
|
}) => {
|
|
6273
|
-
const markerId =
|
|
6273
|
+
const markerId = React112__default.useMemo(() => {
|
|
6274
6274
|
flowIdCounter += 1;
|
|
6275
6275
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
6276
6276
|
}, []);
|
|
@@ -6863,7 +6863,7 @@ var init_SvgRing = __esm({
|
|
|
6863
6863
|
width = 100,
|
|
6864
6864
|
height = 100
|
|
6865
6865
|
}) => {
|
|
6866
|
-
const gradientId =
|
|
6866
|
+
const gradientId = React112__default.useMemo(() => {
|
|
6867
6867
|
ringIdCounter += 1;
|
|
6868
6868
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
6869
6869
|
}, []);
|
|
@@ -7044,7 +7044,7 @@ var init_Input = __esm({
|
|
|
7044
7044
|
init_cn();
|
|
7045
7045
|
init_Icon();
|
|
7046
7046
|
init_useEventBus();
|
|
7047
|
-
Input =
|
|
7047
|
+
Input = React112__default.forwardRef(
|
|
7048
7048
|
({
|
|
7049
7049
|
className,
|
|
7050
7050
|
inputType,
|
|
@@ -7204,7 +7204,7 @@ var Label;
|
|
|
7204
7204
|
var init_Label = __esm({
|
|
7205
7205
|
"components/core/atoms/Label.tsx"() {
|
|
7206
7206
|
init_cn();
|
|
7207
|
-
Label =
|
|
7207
|
+
Label = React112__default.forwardRef(
|
|
7208
7208
|
({ className, required, children, ...props }, ref) => {
|
|
7209
7209
|
return /* @__PURE__ */ jsxs(
|
|
7210
7210
|
"label",
|
|
@@ -7231,7 +7231,7 @@ var init_Textarea = __esm({
|
|
|
7231
7231
|
"components/core/atoms/Textarea.tsx"() {
|
|
7232
7232
|
init_cn();
|
|
7233
7233
|
init_useEventBus();
|
|
7234
|
-
Textarea =
|
|
7234
|
+
Textarea = React112__default.forwardRef(
|
|
7235
7235
|
({ className, error, onChange, ...props }, ref) => {
|
|
7236
7236
|
const eventBus = useEventBus();
|
|
7237
7237
|
const handleChange = (e) => {
|
|
@@ -7470,7 +7470,7 @@ var init_Select = __esm({
|
|
|
7470
7470
|
init_cn();
|
|
7471
7471
|
init_Icon();
|
|
7472
7472
|
init_useEventBus();
|
|
7473
|
-
Select =
|
|
7473
|
+
Select = React112__default.forwardRef(
|
|
7474
7474
|
(props, _ref) => {
|
|
7475
7475
|
const { multiple, searchable, clearable } = props;
|
|
7476
7476
|
if (multiple || searchable || clearable) {
|
|
@@ -7487,7 +7487,7 @@ var init_Checkbox = __esm({
|
|
|
7487
7487
|
"components/core/atoms/Checkbox.tsx"() {
|
|
7488
7488
|
init_cn();
|
|
7489
7489
|
init_useEventBus();
|
|
7490
|
-
Checkbox =
|
|
7490
|
+
Checkbox = React112__default.forwardRef(
|
|
7491
7491
|
({ className, label, id, onChange, ...props }, ref) => {
|
|
7492
7492
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
7493
7493
|
const eventBus = useEventBus();
|
|
@@ -7541,7 +7541,7 @@ var init_Spinner = __esm({
|
|
|
7541
7541
|
md: "h-6 w-6",
|
|
7542
7542
|
lg: "h-8 w-8"
|
|
7543
7543
|
};
|
|
7544
|
-
Spinner =
|
|
7544
|
+
Spinner = React112__default.forwardRef(
|
|
7545
7545
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
7546
7546
|
if (overlay) {
|
|
7547
7547
|
return /* @__PURE__ */ jsx(
|
|
@@ -7631,7 +7631,7 @@ var init_Card = __esm({
|
|
|
7631
7631
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
7632
7632
|
"tile-image-first": "p-0 overflow-hidden"
|
|
7633
7633
|
};
|
|
7634
|
-
Card =
|
|
7634
|
+
Card = React112__default.forwardRef(
|
|
7635
7635
|
({
|
|
7636
7636
|
className,
|
|
7637
7637
|
variant = "bordered",
|
|
@@ -7679,9 +7679,9 @@ var init_Card = __esm({
|
|
|
7679
7679
|
}
|
|
7680
7680
|
);
|
|
7681
7681
|
Card.displayName = "Card";
|
|
7682
|
-
CardHeader =
|
|
7682
|
+
CardHeader = React112__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
7683
7683
|
CardHeader.displayName = "CardHeader";
|
|
7684
|
-
CardTitle =
|
|
7684
|
+
CardTitle = React112__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7685
7685
|
"h3",
|
|
7686
7686
|
{
|
|
7687
7687
|
ref,
|
|
@@ -7694,11 +7694,11 @@ var init_Card = __esm({
|
|
|
7694
7694
|
}
|
|
7695
7695
|
));
|
|
7696
7696
|
CardTitle.displayName = "CardTitle";
|
|
7697
|
-
CardContent =
|
|
7697
|
+
CardContent = React112__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
7698
7698
|
CardContent.displayName = "CardContent";
|
|
7699
7699
|
CardBody = CardContent;
|
|
7700
7700
|
CardBody.displayName = "CardBody";
|
|
7701
|
-
CardFooter =
|
|
7701
|
+
CardFooter = React112__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7702
7702
|
"div",
|
|
7703
7703
|
{
|
|
7704
7704
|
ref,
|
|
@@ -7753,7 +7753,7 @@ var init_FilterPill = __esm({
|
|
|
7753
7753
|
md: "w-3.5 h-3.5",
|
|
7754
7754
|
lg: "w-4 h-4"
|
|
7755
7755
|
};
|
|
7756
|
-
FilterPill =
|
|
7756
|
+
FilterPill = React112__default.forwardRef(
|
|
7757
7757
|
({
|
|
7758
7758
|
className,
|
|
7759
7759
|
variant = "default",
|
|
@@ -7882,8 +7882,8 @@ var init_Avatar = __esm({
|
|
|
7882
7882
|
actionPayload
|
|
7883
7883
|
}) => {
|
|
7884
7884
|
const eventBus = useEventBus();
|
|
7885
|
-
const [imgFailed, setImgFailed] =
|
|
7886
|
-
|
|
7885
|
+
const [imgFailed, setImgFailed] = React112__default.useState(false);
|
|
7886
|
+
React112__default.useEffect(() => {
|
|
7887
7887
|
setImgFailed(false);
|
|
7888
7888
|
}, [src]);
|
|
7889
7889
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -7996,7 +7996,7 @@ var init_Center = __esm({
|
|
|
7996
7996
|
as: Component = "div"
|
|
7997
7997
|
}) => {
|
|
7998
7998
|
const mergedStyle = minHeight ? { minHeight, ...style } : style;
|
|
7999
|
-
return
|
|
7999
|
+
return React112__default.createElement(Component, {
|
|
8000
8000
|
className: cn(
|
|
8001
8001
|
inline ? "inline-flex" : "flex",
|
|
8002
8002
|
horizontal && "justify-center",
|
|
@@ -8264,7 +8264,7 @@ var init_Radio = __esm({
|
|
|
8264
8264
|
md: "w-2.5 h-2.5",
|
|
8265
8265
|
lg: "w-3 h-3"
|
|
8266
8266
|
};
|
|
8267
|
-
Radio =
|
|
8267
|
+
Radio = React112__default.forwardRef(
|
|
8268
8268
|
({
|
|
8269
8269
|
label,
|
|
8270
8270
|
helperText,
|
|
@@ -8281,12 +8281,12 @@ var init_Radio = __esm({
|
|
|
8281
8281
|
onChange,
|
|
8282
8282
|
...props
|
|
8283
8283
|
}, ref) => {
|
|
8284
|
-
const reactId =
|
|
8284
|
+
const reactId = React112__default.useId();
|
|
8285
8285
|
const baseId = id || `radio-${reactId}`;
|
|
8286
8286
|
const hasError = !!error;
|
|
8287
8287
|
const eventBus = useEventBus();
|
|
8288
|
-
const [selected, setSelected] =
|
|
8289
|
-
|
|
8288
|
+
const [selected, setSelected] = React112__default.useState(value);
|
|
8289
|
+
React112__default.useEffect(() => {
|
|
8290
8290
|
if (value !== void 0) setSelected(value);
|
|
8291
8291
|
}, [value]);
|
|
8292
8292
|
const pick = (next, e) => {
|
|
@@ -8468,7 +8468,7 @@ var init_Switch = __esm({
|
|
|
8468
8468
|
"components/core/atoms/Switch.tsx"() {
|
|
8469
8469
|
"use client";
|
|
8470
8470
|
init_cn();
|
|
8471
|
-
Switch =
|
|
8471
|
+
Switch = React112.forwardRef(
|
|
8472
8472
|
({
|
|
8473
8473
|
checked,
|
|
8474
8474
|
defaultChecked = false,
|
|
@@ -8479,10 +8479,10 @@ var init_Switch = __esm({
|
|
|
8479
8479
|
name,
|
|
8480
8480
|
className
|
|
8481
8481
|
}, ref) => {
|
|
8482
|
-
const [isChecked, setIsChecked] =
|
|
8482
|
+
const [isChecked, setIsChecked] = React112.useState(
|
|
8483
8483
|
checked !== void 0 ? checked : defaultChecked
|
|
8484
8484
|
);
|
|
8485
|
-
|
|
8485
|
+
React112.useEffect(() => {
|
|
8486
8486
|
if (checked !== void 0) {
|
|
8487
8487
|
setIsChecked(checked);
|
|
8488
8488
|
}
|
|
@@ -8760,7 +8760,7 @@ var Aside;
|
|
|
8760
8760
|
var init_Aside = __esm({
|
|
8761
8761
|
"components/core/atoms/Aside.tsx"() {
|
|
8762
8762
|
init_cn();
|
|
8763
|
-
Aside =
|
|
8763
|
+
Aside = React112__default.forwardRef(
|
|
8764
8764
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
8765
8765
|
);
|
|
8766
8766
|
Aside.displayName = "Aside";
|
|
@@ -8839,9 +8839,9 @@ var init_LawReferenceTooltip = __esm({
|
|
|
8839
8839
|
className
|
|
8840
8840
|
}) => {
|
|
8841
8841
|
const { t } = useTranslate();
|
|
8842
|
-
const [isVisible, setIsVisible] =
|
|
8843
|
-
const timeoutRef =
|
|
8844
|
-
const triggerRef =
|
|
8842
|
+
const [isVisible, setIsVisible] = React112__default.useState(false);
|
|
8843
|
+
const timeoutRef = React112__default.useRef(null);
|
|
8844
|
+
const triggerRef = React112__default.useRef(null);
|
|
8845
8845
|
const handleMouseEnter = () => {
|
|
8846
8846
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
8847
8847
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -8852,7 +8852,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
8852
8852
|
};
|
|
8853
8853
|
const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
|
|
8854
8854
|
const open = isVisible || revealed;
|
|
8855
|
-
|
|
8855
|
+
React112__default.useEffect(() => {
|
|
8856
8856
|
return () => {
|
|
8857
8857
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
8858
8858
|
};
|
|
@@ -9062,7 +9062,7 @@ var init_StatusDot = __esm({
|
|
|
9062
9062
|
md: "w-2.5 h-2.5",
|
|
9063
9063
|
lg: "w-3 h-3"
|
|
9064
9064
|
};
|
|
9065
|
-
StatusDot =
|
|
9065
|
+
StatusDot = React112__default.forwardRef(
|
|
9066
9066
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
9067
9067
|
return /* @__PURE__ */ jsx(
|
|
9068
9068
|
"span",
|
|
@@ -9116,7 +9116,7 @@ var init_TrendIndicator = __esm({
|
|
|
9116
9116
|
down: "trending-down",
|
|
9117
9117
|
flat: "arrow-right"
|
|
9118
9118
|
};
|
|
9119
|
-
TrendIndicator =
|
|
9119
|
+
TrendIndicator = React112__default.forwardRef(
|
|
9120
9120
|
({
|
|
9121
9121
|
className,
|
|
9122
9122
|
value,
|
|
@@ -9183,7 +9183,7 @@ var init_RangeSlider = __esm({
|
|
|
9183
9183
|
md: "w-4 h-4",
|
|
9184
9184
|
lg: "w-5 h-5"
|
|
9185
9185
|
};
|
|
9186
|
-
RangeSlider =
|
|
9186
|
+
RangeSlider = React112__default.forwardRef(
|
|
9187
9187
|
({
|
|
9188
9188
|
className,
|
|
9189
9189
|
min = 0,
|
|
@@ -9777,7 +9777,7 @@ var init_ContentSection = __esm({
|
|
|
9777
9777
|
md: "py-16",
|
|
9778
9778
|
lg: "py-24"
|
|
9779
9779
|
};
|
|
9780
|
-
ContentSection =
|
|
9780
|
+
ContentSection = React112__default.forwardRef(
|
|
9781
9781
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
9782
9782
|
return /* @__PURE__ */ jsx(
|
|
9783
9783
|
Box,
|
|
@@ -10311,7 +10311,7 @@ var init_AnimatedReveal = __esm({
|
|
|
10311
10311
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
10312
10312
|
"none": {}
|
|
10313
10313
|
};
|
|
10314
|
-
AnimatedReveal =
|
|
10314
|
+
AnimatedReveal = React112__default.forwardRef(
|
|
10315
10315
|
({
|
|
10316
10316
|
trigger = "scroll",
|
|
10317
10317
|
animation = "fade-up",
|
|
@@ -10471,7 +10471,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
10471
10471
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
10472
10472
|
"use client";
|
|
10473
10473
|
init_cn();
|
|
10474
|
-
AnimatedGraphic =
|
|
10474
|
+
AnimatedGraphic = React112__default.forwardRef(
|
|
10475
10475
|
({
|
|
10476
10476
|
src,
|
|
10477
10477
|
svgContent,
|
|
@@ -10494,7 +10494,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
10494
10494
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
10495
10495
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
10496
10496
|
const prevAnimateRef = useRef(animate);
|
|
10497
|
-
const setRef =
|
|
10497
|
+
const setRef = React112__default.useCallback(
|
|
10498
10498
|
(node) => {
|
|
10499
10499
|
containerRef.current = node;
|
|
10500
10500
|
if (typeof ref === "function") ref(node);
|
|
@@ -12126,7 +12126,7 @@ function GameCard({
|
|
|
12126
12126
|
className
|
|
12127
12127
|
}) {
|
|
12128
12128
|
const eventBus = useEventBus();
|
|
12129
|
-
const handleClick =
|
|
12129
|
+
const handleClick = React112.useCallback(() => {
|
|
12130
12130
|
if (disabled) return;
|
|
12131
12131
|
onClick?.(id);
|
|
12132
12132
|
if (clickEvent) eventBus.emit(`UI:${clickEvent}`, { cardId: id });
|
|
@@ -12212,7 +12212,9 @@ function HealthBar({
|
|
|
12212
12212
|
labelSuffix,
|
|
12213
12213
|
size = "md",
|
|
12214
12214
|
className,
|
|
12215
|
-
animated = true
|
|
12215
|
+
animated = true,
|
|
12216
|
+
frameAsset,
|
|
12217
|
+
fillAsset
|
|
12216
12218
|
}) {
|
|
12217
12219
|
const sizes = sizeMap[size];
|
|
12218
12220
|
const percentage = max > 0 ? Math.max(0, Math.min(100, current / max * 100)) : 0;
|
|
@@ -12231,20 +12233,25 @@ function HealthBar({
|
|
|
12231
12233
|
"div",
|
|
12232
12234
|
{
|
|
12233
12235
|
className: cn(
|
|
12234
|
-
"relative overflow-hidden rounded-full
|
|
12236
|
+
"relative overflow-hidden rounded-full",
|
|
12237
|
+
!frameAsset && "bg-muted",
|
|
12235
12238
|
sizes.bar,
|
|
12236
12239
|
"w-24",
|
|
12237
12240
|
className
|
|
12238
12241
|
),
|
|
12242
|
+
style: frameAsset ? { backgroundImage: `url(${frameAsset.url})`, backgroundSize: "100% 100%" } : void 0,
|
|
12239
12243
|
children: /* @__PURE__ */ jsx(
|
|
12240
12244
|
"div",
|
|
12241
12245
|
{
|
|
12242
12246
|
className: cn(
|
|
12243
12247
|
"absolute inset-y-0 left-0 rounded-full",
|
|
12244
|
-
percentage > 66 ? "bg-success" : percentage > 33 ? "bg-warning" : "bg-error",
|
|
12248
|
+
!fillAsset && (percentage > 66 ? "bg-success" : percentage > 33 ? "bg-warning" : "bg-error"),
|
|
12245
12249
|
animated && "transition-all duration-300"
|
|
12246
12250
|
),
|
|
12247
|
-
style: {
|
|
12251
|
+
style: {
|
|
12252
|
+
width: `${percentage}%`,
|
|
12253
|
+
...fillAsset ? { backgroundImage: `url(${fillAsset.url})`, backgroundSize: "auto 100%" } : {}
|
|
12254
|
+
}
|
|
12248
12255
|
}
|
|
12249
12256
|
)
|
|
12250
12257
|
}
|
|
@@ -12271,18 +12278,23 @@ function HealthBar({
|
|
|
12271
12278
|
"div",
|
|
12272
12279
|
{
|
|
12273
12280
|
className: cn(
|
|
12274
|
-
"relative w-full overflow-hidden rounded-full
|
|
12281
|
+
"relative w-full overflow-hidden rounded-full",
|
|
12282
|
+
!frameAsset && "bg-muted border border-muted",
|
|
12275
12283
|
sizes.bar
|
|
12276
12284
|
),
|
|
12285
|
+
style: frameAsset ? { backgroundImage: `url(${frameAsset.url})`, backgroundSize: "100% 100%" } : void 0,
|
|
12277
12286
|
children: /* @__PURE__ */ jsx(
|
|
12278
12287
|
"div",
|
|
12279
12288
|
{
|
|
12280
12289
|
className: cn(
|
|
12281
12290
|
"absolute inset-y-0 left-0 rounded-full",
|
|
12282
|
-
"bg-gradient-to-r from-accent to-info",
|
|
12291
|
+
!fillAsset && "bg-gradient-to-r from-accent to-info",
|
|
12283
12292
|
animated && "transition-all duration-500 ease-out"
|
|
12284
12293
|
),
|
|
12285
|
-
style: {
|
|
12294
|
+
style: {
|
|
12295
|
+
width: `${percentage}%`,
|
|
12296
|
+
...fillAsset ? { backgroundImage: `url(${fillAsset.url})`, backgroundSize: "auto 100%" } : {}
|
|
12297
|
+
}
|
|
12286
12298
|
}
|
|
12287
12299
|
)
|
|
12288
12300
|
}
|
|
@@ -12398,9 +12410,9 @@ function ControlButton({
|
|
|
12398
12410
|
className
|
|
12399
12411
|
}) {
|
|
12400
12412
|
const eventBus = useEventBus();
|
|
12401
|
-
const [isPressed, setIsPressed] =
|
|
12413
|
+
const [isPressed, setIsPressed] = React112.useState(false);
|
|
12402
12414
|
const actualPressed = pressed ?? isPressed;
|
|
12403
|
-
const handlePointerDown =
|
|
12415
|
+
const handlePointerDown = React112.useCallback(
|
|
12404
12416
|
(e) => {
|
|
12405
12417
|
e.preventDefault();
|
|
12406
12418
|
if (disabled) return;
|
|
@@ -12410,7 +12422,7 @@ function ControlButton({
|
|
|
12410
12422
|
},
|
|
12411
12423
|
[disabled, pressEvent, eventBus, onPress]
|
|
12412
12424
|
);
|
|
12413
|
-
const handlePointerUp =
|
|
12425
|
+
const handlePointerUp = React112.useCallback(
|
|
12414
12426
|
(e) => {
|
|
12415
12427
|
e.preventDefault();
|
|
12416
12428
|
if (disabled) return;
|
|
@@ -12420,7 +12432,7 @@ function ControlButton({
|
|
|
12420
12432
|
},
|
|
12421
12433
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
12422
12434
|
);
|
|
12423
|
-
const handlePointerLeave =
|
|
12435
|
+
const handlePointerLeave = React112.useCallback(
|
|
12424
12436
|
(e) => {
|
|
12425
12437
|
if (isPressed) {
|
|
12426
12438
|
setIsPressed(false);
|
|
@@ -12680,14 +12692,15 @@ function TimerDisplay({
|
|
|
12680
12692
|
format = "mm:ss",
|
|
12681
12693
|
size = "md",
|
|
12682
12694
|
className,
|
|
12683
|
-
lowThreshold
|
|
12695
|
+
lowThreshold,
|
|
12696
|
+
iconAsset
|
|
12684
12697
|
}) {
|
|
12685
12698
|
const isLow = lowThreshold != null && seconds <= lowThreshold && seconds > 0;
|
|
12686
|
-
return /* @__PURE__ */
|
|
12699
|
+
return /* @__PURE__ */ jsxs(
|
|
12687
12700
|
"div",
|
|
12688
12701
|
{
|
|
12689
12702
|
className: cn(
|
|
12690
|
-
"inline-flex items-center justify-center rounded-container",
|
|
12703
|
+
"inline-flex items-center gap-1 justify-center rounded-container",
|
|
12691
12704
|
"bg-card/80 border border-muted font-mono font-bold tabular-nums",
|
|
12692
12705
|
sizeMap4[size],
|
|
12693
12706
|
running && "border-success/50",
|
|
@@ -12695,7 +12708,10 @@ function TimerDisplay({
|
|
|
12695
12708
|
!isLow && "text-foreground",
|
|
12696
12709
|
className
|
|
12697
12710
|
),
|
|
12698
|
-
children:
|
|
12711
|
+
children: [
|
|
12712
|
+
iconAsset && /* @__PURE__ */ jsx("img", { src: iconAsset.url, alt: "", className: "w-4 h-4 object-contain flex-shrink-0" }),
|
|
12713
|
+
formatTime(seconds, format)
|
|
12714
|
+
]
|
|
12699
12715
|
}
|
|
12700
12716
|
);
|
|
12701
12717
|
}
|
|
@@ -12791,15 +12807,20 @@ function ItemSlot({
|
|
|
12791
12807
|
size = "md",
|
|
12792
12808
|
selected,
|
|
12793
12809
|
onClick,
|
|
12810
|
+
action,
|
|
12794
12811
|
className
|
|
12795
12812
|
}) {
|
|
12796
|
-
const
|
|
12813
|
+
const eventBus = useEventBus();
|
|
12814
|
+
const isClickable = onClick != null || action != null;
|
|
12797
12815
|
const px = assetSizeMap[size];
|
|
12798
12816
|
return /* @__PURE__ */ jsx(
|
|
12799
12817
|
"button",
|
|
12800
12818
|
{
|
|
12801
12819
|
type: "button",
|
|
12802
|
-
onClick
|
|
12820
|
+
onClick: () => {
|
|
12821
|
+
if (action) eventBus.emit(`UI:${action}`, {});
|
|
12822
|
+
onClick?.();
|
|
12823
|
+
},
|
|
12803
12824
|
disabled: !isClickable,
|
|
12804
12825
|
title: label,
|
|
12805
12826
|
className: cn(
|
|
@@ -12847,6 +12868,7 @@ var init_ItemSlot = __esm({
|
|
|
12847
12868
|
"use client";
|
|
12848
12869
|
init_cn();
|
|
12849
12870
|
init_Icon();
|
|
12871
|
+
init_useEventBus();
|
|
12850
12872
|
sizeMap6 = {
|
|
12851
12873
|
sm: "w-10 h-10 text-lg",
|
|
12852
12874
|
md: "w-14 h-14 text-2xl",
|
|
@@ -13315,14 +13337,19 @@ function ChoiceButton({
|
|
|
13315
13337
|
disabled = false,
|
|
13316
13338
|
selected = false,
|
|
13317
13339
|
onClick,
|
|
13340
|
+
action,
|
|
13318
13341
|
className
|
|
13319
13342
|
}) {
|
|
13343
|
+
const eventBus = useEventBus();
|
|
13320
13344
|
return /* @__PURE__ */ jsxs(
|
|
13321
13345
|
"button",
|
|
13322
13346
|
{
|
|
13323
13347
|
type: "button",
|
|
13324
13348
|
disabled,
|
|
13325
|
-
onClick
|
|
13349
|
+
onClick: (e) => {
|
|
13350
|
+
if (action) eventBus.emit(`UI:${action}`, {});
|
|
13351
|
+
onClick?.();
|
|
13352
|
+
},
|
|
13326
13353
|
className: cn(
|
|
13327
13354
|
"w-full text-left px-4 py-2.5 rounded-interactive border transition-all duration-150",
|
|
13328
13355
|
"flex items-center gap-2",
|
|
@@ -13370,6 +13397,7 @@ var init_ChoiceButton = __esm({
|
|
|
13370
13397
|
"components/game/2d/atoms/ChoiceButton.tsx"() {
|
|
13371
13398
|
init_cn();
|
|
13372
13399
|
init_Icon();
|
|
13400
|
+
init_useEventBus();
|
|
13373
13401
|
ChoiceButton.displayName = "ChoiceButton";
|
|
13374
13402
|
}
|
|
13375
13403
|
});
|
|
@@ -13383,8 +13411,10 @@ function ActionButton({
|
|
|
13383
13411
|
size = "md",
|
|
13384
13412
|
variant = "primary",
|
|
13385
13413
|
onClick,
|
|
13414
|
+
action,
|
|
13386
13415
|
className
|
|
13387
13416
|
}) {
|
|
13417
|
+
const eventBus = useEventBus();
|
|
13388
13418
|
const sizes = sizeMap12[size];
|
|
13389
13419
|
const onCooldown = cooldown > 0;
|
|
13390
13420
|
const isDisabled = disabled || onCooldown;
|
|
@@ -13394,7 +13424,10 @@ function ActionButton({
|
|
|
13394
13424
|
{
|
|
13395
13425
|
type: "button",
|
|
13396
13426
|
disabled: isDisabled,
|
|
13397
|
-
onClick
|
|
13427
|
+
onClick: (e) => {
|
|
13428
|
+
if (action) eventBus.emit(`UI:${action}`, {});
|
|
13429
|
+
onClick?.();
|
|
13430
|
+
},
|
|
13398
13431
|
className: cn(
|
|
13399
13432
|
"relative inline-flex items-center gap-1.5 rounded-interactive border font-medium overflow-hidden transition-colors duration-150",
|
|
13400
13433
|
sizes.button,
|
|
@@ -13451,6 +13484,7 @@ var init_ActionButton = __esm({
|
|
|
13451
13484
|
"components/game/2d/atoms/ActionButton.tsx"() {
|
|
13452
13485
|
init_cn();
|
|
13453
13486
|
init_Icon();
|
|
13487
|
+
init_useEventBus();
|
|
13454
13488
|
sizeMap12 = {
|
|
13455
13489
|
sm: { button: "h-button-sm px-3 text-xs", hotkey: "text-[9px] px-1", icon: "text-xs" },
|
|
13456
13490
|
md: { button: "h-button-md px-4 text-sm", hotkey: "text-xs px-1.5", icon: "text-sm" },
|
|
@@ -13477,10 +13511,27 @@ function MiniMap({
|
|
|
13477
13511
|
mapWidth = 100,
|
|
13478
13512
|
mapHeight = 100,
|
|
13479
13513
|
viewportRect = DEFAULT_VIEWPORT,
|
|
13480
|
-
className
|
|
13514
|
+
className,
|
|
13515
|
+
tileAssets,
|
|
13516
|
+
unitAssets
|
|
13481
13517
|
}) {
|
|
13482
|
-
const canvasRef =
|
|
13483
|
-
|
|
13518
|
+
const canvasRef = React112.useRef(null);
|
|
13519
|
+
const imgCacheRef = React112.useRef(/* @__PURE__ */ new Map());
|
|
13520
|
+
function loadImg(url) {
|
|
13521
|
+
const cached = imgCacheRef.current.get(url);
|
|
13522
|
+
if (cached) return cached.complete ? cached : null;
|
|
13523
|
+
const img = new Image();
|
|
13524
|
+
img.src = url;
|
|
13525
|
+
img.onload = () => {
|
|
13526
|
+
const canvas = canvasRef.current;
|
|
13527
|
+
if (!canvas) return;
|
|
13528
|
+
const ctx = canvas.getContext("2d");
|
|
13529
|
+
if (ctx) ctx.clearRect(0, 0, 0, 0);
|
|
13530
|
+
};
|
|
13531
|
+
imgCacheRef.current.set(url, img);
|
|
13532
|
+
return null;
|
|
13533
|
+
}
|
|
13534
|
+
React112.useEffect(() => {
|
|
13484
13535
|
const canvas = canvasRef.current;
|
|
13485
13536
|
if (!canvas) return;
|
|
13486
13537
|
const ctx = canvas.getContext("2d");
|
|
@@ -13491,20 +13542,31 @@ function MiniMap({
|
|
|
13491
13542
|
ctx.fillStyle = "#111";
|
|
13492
13543
|
ctx.fillRect(0, 0, width, height);
|
|
13493
13544
|
for (const tile of tiles) {
|
|
13494
|
-
|
|
13495
|
-
|
|
13496
|
-
|
|
13497
|
-
|
|
13498
|
-
|
|
13499
|
-
|
|
13500
|
-
)
|
|
13545
|
+
const tileAsset = tileAssets?.[tile.color] ?? tileAssets?.["default"];
|
|
13546
|
+
const tileImg = tileAsset ? loadImg(tileAsset.url) : null;
|
|
13547
|
+
const tx = Math.floor(tile.x * scaleX2);
|
|
13548
|
+
const ty = Math.floor(tile.y * scaleY2);
|
|
13549
|
+
const tw = Math.max(1, Math.ceil(scaleX2));
|
|
13550
|
+
const th = Math.max(1, Math.ceil(scaleY2));
|
|
13551
|
+
if (tileImg) {
|
|
13552
|
+
ctx.drawImage(tileImg, tx, ty, tw, th);
|
|
13553
|
+
} else {
|
|
13554
|
+
ctx.fillStyle = tile.color;
|
|
13555
|
+
ctx.fillRect(tx, ty, tw, th);
|
|
13556
|
+
}
|
|
13501
13557
|
}
|
|
13502
13558
|
for (const unit of units) {
|
|
13503
13559
|
if (unit.isPlayer) continue;
|
|
13504
|
-
|
|
13560
|
+
const unitAsset = unitAssets?.[unit.color] ?? unitAssets?.["default"];
|
|
13561
|
+
const unitImg = unitAsset ? loadImg(unitAsset.url) : null;
|
|
13505
13562
|
const ux = Math.floor(unit.x * scaleX2) - 1;
|
|
13506
13563
|
const uy = Math.floor(unit.y * scaleY2) - 1;
|
|
13507
|
-
|
|
13564
|
+
if (unitImg) {
|
|
13565
|
+
ctx.drawImage(unitImg, ux, uy, 5, 5);
|
|
13566
|
+
} else {
|
|
13567
|
+
ctx.fillStyle = unit.color;
|
|
13568
|
+
ctx.fillRect(ux, uy, 3, 3);
|
|
13569
|
+
}
|
|
13508
13570
|
}
|
|
13509
13571
|
if (viewportRect) {
|
|
13510
13572
|
ctx.strokeStyle = "#ffffff";
|
|
@@ -13516,7 +13578,7 @@ function MiniMap({
|
|
|
13516
13578
|
Math.floor(viewportRect.h * scaleY2)
|
|
13517
13579
|
);
|
|
13518
13580
|
}
|
|
13519
|
-
}, [tiles, units, width, height, mapWidth, mapHeight, viewportRect]);
|
|
13581
|
+
}, [tiles, units, width, height, mapWidth, mapHeight, viewportRect, tileAssets, unitAssets]);
|
|
13520
13582
|
const scaleX = width / mapWidth;
|
|
13521
13583
|
const scaleY = height / mapHeight;
|
|
13522
13584
|
const playerUnit = units.find((u) => u.isPlayer);
|
|
@@ -13625,13 +13687,14 @@ function ControlGrid({
|
|
|
13625
13687
|
actionEvent,
|
|
13626
13688
|
onDirection,
|
|
13627
13689
|
directionEvent,
|
|
13690
|
+
directionAssets,
|
|
13628
13691
|
size = "md",
|
|
13629
13692
|
disabled,
|
|
13630
13693
|
className
|
|
13631
13694
|
}) {
|
|
13632
13695
|
const eventBus = useEventBus();
|
|
13633
|
-
const [active, setActive] =
|
|
13634
|
-
const handlePress =
|
|
13696
|
+
const [active, setActive] = React112.useState(/* @__PURE__ */ new Set());
|
|
13697
|
+
const handlePress = React112.useCallback(
|
|
13635
13698
|
(id) => {
|
|
13636
13699
|
setActive((prev) => new Set(prev).add(id));
|
|
13637
13700
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -13643,7 +13706,7 @@ function ControlGrid({
|
|
|
13643
13706
|
},
|
|
13644
13707
|
[kind, actionEvent, directionEvent, eventBus, onAction, onDirection]
|
|
13645
13708
|
);
|
|
13646
|
-
const handleRelease =
|
|
13709
|
+
const handleRelease = React112.useCallback(
|
|
13647
13710
|
(id) => {
|
|
13648
13711
|
setActive((prev) => {
|
|
13649
13712
|
const next = new Set(prev);
|
|
@@ -13664,7 +13727,8 @@ function ControlGrid({
|
|
|
13664
13727
|
const dir = (d) => /* @__PURE__ */ jsx(
|
|
13665
13728
|
ControlButton,
|
|
13666
13729
|
{
|
|
13667
|
-
icon: arrowIcons[d],
|
|
13730
|
+
icon: directionAssets?.[d] ? void 0 : arrowIcons[d],
|
|
13731
|
+
assetUrl: directionAssets?.[d],
|
|
13668
13732
|
size: sizeKey[size],
|
|
13669
13733
|
variant: "secondary",
|
|
13670
13734
|
pressed: active.has(d),
|
|
@@ -13904,11 +13968,11 @@ function InventoryGrid({
|
|
|
13904
13968
|
const eventBus = useEventBus();
|
|
13905
13969
|
const slotCount = totalSlots ?? items.length;
|
|
13906
13970
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
13907
|
-
const handleSelect =
|
|
13971
|
+
const handleSelect = React112.useCallback(
|
|
13908
13972
|
(id) => {
|
|
13909
13973
|
onSelect?.(id);
|
|
13910
13974
|
if (selectEvent) {
|
|
13911
|
-
eventBus.emit(selectEvent
|
|
13975
|
+
eventBus.emit(`UI:${selectEvent}`, { id });
|
|
13912
13976
|
}
|
|
13913
13977
|
},
|
|
13914
13978
|
[onSelect, selectEvent, eventBus]
|
|
@@ -14113,27 +14177,21 @@ function GameMenu({
|
|
|
14113
14177
|
options,
|
|
14114
14178
|
menuItems,
|
|
14115
14179
|
onSelect,
|
|
14116
|
-
eventBus: eventBusProp,
|
|
14117
14180
|
background,
|
|
14118
|
-
logo
|
|
14181
|
+
logo,
|
|
14119
14182
|
className
|
|
14120
14183
|
}) {
|
|
14121
14184
|
const resolvedOptions = options ?? menuItems ?? DEFAULT_MENU_OPTIONS;
|
|
14122
|
-
|
|
14123
|
-
|
|
14124
|
-
eventBusFromHook = useEventBus();
|
|
14125
|
-
} catch {
|
|
14126
|
-
}
|
|
14127
|
-
const eventBus = eventBusProp || eventBusFromHook;
|
|
14128
|
-
const handleOptionClick = React114.useCallback(
|
|
14185
|
+
const eventBus = useEventBus();
|
|
14186
|
+
const handleOptionClick = React112.useCallback(
|
|
14129
14187
|
(option) => {
|
|
14130
|
-
if (option.event
|
|
14188
|
+
if (option.event) {
|
|
14131
14189
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
14132
14190
|
}
|
|
14133
14191
|
if (onSelect) {
|
|
14134
14192
|
onSelect(option);
|
|
14135
14193
|
}
|
|
14136
|
-
if (option.navigatesTo
|
|
14194
|
+
if (option.navigatesTo) {
|
|
14137
14195
|
eventBus.emit("UI:NAVIGATE", { url: option.navigatesTo, option });
|
|
14138
14196
|
}
|
|
14139
14197
|
},
|
|
@@ -14154,7 +14212,7 @@ function GameMenu({
|
|
|
14154
14212
|
logo && /* @__PURE__ */ jsx(
|
|
14155
14213
|
"img",
|
|
14156
14214
|
{
|
|
14157
|
-
src: logo,
|
|
14215
|
+
src: logo.url,
|
|
14158
14216
|
alt: title,
|
|
14159
14217
|
className: "h-24 w-auto mx-auto mb-6 drop-shadow-2xl"
|
|
14160
14218
|
}
|
|
@@ -15988,7 +16046,9 @@ var init_GameAudioProvider = __esm({
|
|
|
15988
16046
|
});
|
|
15989
16047
|
function GameAudioToggle({
|
|
15990
16048
|
size = "sm",
|
|
15991
|
-
className
|
|
16049
|
+
className,
|
|
16050
|
+
onAsset,
|
|
16051
|
+
offAsset
|
|
15992
16052
|
}) {
|
|
15993
16053
|
const ctx = useGameAudioContextOptional();
|
|
15994
16054
|
const [localMuted, setLocalMuted] = useState(false);
|
|
@@ -15997,6 +16057,7 @@ function GameAudioToggle({
|
|
|
15997
16057
|
const handleToggle = useCallback(() => {
|
|
15998
16058
|
setMuted(!muted);
|
|
15999
16059
|
}, [muted, setMuted]);
|
|
16060
|
+
const activeAsset = muted ? offAsset : onAsset;
|
|
16000
16061
|
return /* @__PURE__ */ jsx(
|
|
16001
16062
|
Button,
|
|
16002
16063
|
{
|
|
@@ -16005,7 +16066,7 @@ function GameAudioToggle({
|
|
|
16005
16066
|
onClick: handleToggle,
|
|
16006
16067
|
className: cn("text-lg leading-none px-2", className),
|
|
16007
16068
|
"aria-pressed": muted,
|
|
16008
|
-
children: muted ? "\u{1F507}" : "\u{1F50A}"
|
|
16069
|
+
children: activeAsset ? /* @__PURE__ */ jsx("img", { src: activeAsset.url, alt: muted ? "Muted" : "Sound on", className: "w-5 h-5 object-contain" }) : muted ? "\u{1F507}" : "\u{1F50A}"
|
|
16009
16070
|
}
|
|
16010
16071
|
);
|
|
16011
16072
|
}
|
|
@@ -17297,6 +17358,7 @@ function PlatformerBoard({
|
|
|
17297
17358
|
canvasHeight: _canvasHeight = 400,
|
|
17298
17359
|
playerSprite,
|
|
17299
17360
|
tileSprites,
|
|
17361
|
+
ui: _ui,
|
|
17300
17362
|
bgColor: _bgColor,
|
|
17301
17363
|
keyEvent = "KEY",
|
|
17302
17364
|
playAgainEvent = "PLAY_AGAIN",
|
|
@@ -19155,6 +19217,7 @@ function TanksBoard({
|
|
|
19155
19217
|
features,
|
|
19156
19218
|
assetManifest,
|
|
19157
19219
|
assetBaseUrl,
|
|
19220
|
+
ui: _ui,
|
|
19158
19221
|
scale = 0.45,
|
|
19159
19222
|
showMinimap = true,
|
|
19160
19223
|
enableCamera = true,
|
|
@@ -19682,7 +19745,7 @@ function LinearView({
|
|
|
19682
19745
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
19683
19746
|
const isDone = i < currentIdx;
|
|
19684
19747
|
const isCurrent = i === currentIdx;
|
|
19685
|
-
return /* @__PURE__ */ jsxs(
|
|
19748
|
+
return /* @__PURE__ */ jsxs(React112__default.Fragment, { children: [
|
|
19686
19749
|
i > 0 && /* @__PURE__ */ jsx(
|
|
19687
19750
|
Typography,
|
|
19688
19751
|
{
|
|
@@ -19903,7 +19966,7 @@ function TraitSlot({
|
|
|
19903
19966
|
size = "md",
|
|
19904
19967
|
showTooltip = true,
|
|
19905
19968
|
categoryColors,
|
|
19906
|
-
tooltipFrameUrl
|
|
19969
|
+
tooltipFrameUrl,
|
|
19907
19970
|
className,
|
|
19908
19971
|
feedback,
|
|
19909
19972
|
onItemDrop,
|
|
@@ -20033,7 +20096,7 @@ function TraitSlot({
|
|
|
20033
20096
|
as: "img",
|
|
20034
20097
|
className: "object-contain",
|
|
20035
20098
|
style: { width: config.icon, height: config.icon },
|
|
20036
|
-
...{ src: equippedItem.iconUrl, alt: equippedItem.name }
|
|
20099
|
+
...{ src: equippedItem.iconUrl.url, alt: equippedItem.name }
|
|
20037
20100
|
}
|
|
20038
20101
|
) : /* @__PURE__ */ jsx(Typography, { variant: "body1", className: "text-center leading-none", style: { fontSize: config.icon }, children: equippedItem.iconEmoji || "\u2726" }),
|
|
20039
20102
|
(onRemove || removeEvent) && /* @__PURE__ */ jsx(
|
|
@@ -20062,7 +20125,7 @@ function TraitSlot({
|
|
|
20062
20125
|
...getTooltipStyle(),
|
|
20063
20126
|
minWidth: 200,
|
|
20064
20127
|
...tooltipFrameUrl ? {
|
|
20065
|
-
borderImage: `url(${tooltipFrameUrl}) 60 fill / 15px / 0 stretch`,
|
|
20128
|
+
borderImage: `url(${tooltipFrameUrl.url}) 60 fill / 15px / 0 stretch`,
|
|
20066
20129
|
border: "none"
|
|
20067
20130
|
} : {}
|
|
20068
20131
|
},
|
|
@@ -20137,7 +20200,7 @@ function ActionTile({
|
|
|
20137
20200
|
draggable: !disabled,
|
|
20138
20201
|
onDragStart: handleDragStart,
|
|
20139
20202
|
children: [
|
|
20140
|
-
action.iconUrl ? /* @__PURE__ */ jsx("img", { src: action.iconUrl, alt: "", className: "w-8 h-8 object-contain" }) : /* @__PURE__ */ jsx(Typography, { variant: "body1", className: cn(config.icon, "leading-none"), children: action.iconEmoji || "\u2726" }),
|
|
20203
|
+
action.iconUrl ? /* @__PURE__ */ jsx("img", { src: action.iconUrl.url, alt: "", className: "w-8 h-8 object-contain" }) : /* @__PURE__ */ jsx(Typography, { variant: "body1", className: cn(config.icon, "leading-none"), children: action.iconEmoji || "\u2726" }),
|
|
20141
20204
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: cn(config.text, "text-foreground font-medium whitespace-nowrap"), children: action.name })
|
|
20142
20205
|
]
|
|
20143
20206
|
}
|
|
@@ -20210,7 +20273,7 @@ function SequenceBar({
|
|
|
20210
20273
|
onSlotRemove(index);
|
|
20211
20274
|
}, [onSlotRemove, playing]);
|
|
20212
20275
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
20213
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
20276
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React112__default.Fragment, { children: [
|
|
20214
20277
|
i > 0 && /* @__PURE__ */ jsx(
|
|
20215
20278
|
Typography,
|
|
20216
20279
|
{
|
|
@@ -20261,6 +20324,42 @@ function computeSlotFeedback(playerSeq, solutions) {
|
|
|
20261
20324
|
(id, i) => id !== void 0 && id === bestSolution[i] ? "correct" : "wrong"
|
|
20262
20325
|
);
|
|
20263
20326
|
}
|
|
20327
|
+
function isFieldRecord(v) {
|
|
20328
|
+
return typeof v === "object" && v !== null && !Array.isArray(v) && !(v instanceof Date);
|
|
20329
|
+
}
|
|
20330
|
+
function assetFromField(v) {
|
|
20331
|
+
if (!isFieldRecord(v)) return void 0;
|
|
20332
|
+
const url = typeof v.url === "string" ? v.url : void 0;
|
|
20333
|
+
const role = typeof v.role === "string" ? v.role : void 0;
|
|
20334
|
+
const category = typeof v.category === "string" ? v.category : "";
|
|
20335
|
+
if (!url || !role) return void 0;
|
|
20336
|
+
return {
|
|
20337
|
+
url,
|
|
20338
|
+
role,
|
|
20339
|
+
category,
|
|
20340
|
+
name: typeof v.name === "string" ? v.name : void 0,
|
|
20341
|
+
thumbnailUrl: typeof v.thumbnailUrl === "string" ? v.thumbnailUrl : void 0,
|
|
20342
|
+
style: typeof v.style === "string" ? v.style : void 0,
|
|
20343
|
+
variant: typeof v.variant === "string" ? v.variant : void 0,
|
|
20344
|
+
dimension: typeof v.dimension === "string" ? v.dimension : void 0,
|
|
20345
|
+
aspect: typeof v.aspect === "string" ? v.aspect : void 0
|
|
20346
|
+
};
|
|
20347
|
+
}
|
|
20348
|
+
function slotItemFromField(fv) {
|
|
20349
|
+
if (!isFieldRecord(fv)) return void 0;
|
|
20350
|
+
const id = typeof fv.id === "string" ? fv.id : void 0;
|
|
20351
|
+
const name = typeof fv.name === "string" ? fv.name : void 0;
|
|
20352
|
+
const category = typeof fv.category === "string" ? fv.category : void 0;
|
|
20353
|
+
if (!id || !name || !category) return void 0;
|
|
20354
|
+
return {
|
|
20355
|
+
id,
|
|
20356
|
+
name,
|
|
20357
|
+
category,
|
|
20358
|
+
description: typeof fv.description === "string" ? fv.description : void 0,
|
|
20359
|
+
iconEmoji: typeof fv.iconEmoji === "string" ? fv.iconEmoji : void 0,
|
|
20360
|
+
iconUrl: assetFromField(fv.iconUrl)
|
|
20361
|
+
};
|
|
20362
|
+
}
|
|
20264
20363
|
function SequencerBoard({
|
|
20265
20364
|
entity,
|
|
20266
20365
|
categoryColors,
|
|
@@ -20271,6 +20370,7 @@ function SequencerBoard({
|
|
|
20271
20370
|
removeEvent,
|
|
20272
20371
|
checkEvent,
|
|
20273
20372
|
playAgainEvent,
|
|
20373
|
+
stepEvent,
|
|
20274
20374
|
className
|
|
20275
20375
|
}) {
|
|
20276
20376
|
const { emit } = useEventBus();
|
|
@@ -20278,7 +20378,11 @@ function SequencerBoard({
|
|
|
20278
20378
|
const resolved = boardEntity(entity);
|
|
20279
20379
|
const maxSlots = num(resolved?.maxSlots) || 3;
|
|
20280
20380
|
const solutions = Array.isArray(resolved?.solutions) ? resolved.solutions : [];
|
|
20281
|
-
const availableActions = Array.isArray(resolved?.availableActions) ? resolved.availableActions : []
|
|
20381
|
+
const availableActions = (Array.isArray(resolved?.availableActions) ? resolved.availableActions : []).reduce((acc, fv) => {
|
|
20382
|
+
const item = slotItemFromField(fv);
|
|
20383
|
+
if (item) acc.push(item);
|
|
20384
|
+
return acc;
|
|
20385
|
+
}, []);
|
|
20282
20386
|
const allowDuplicates = resolved?.allowDuplicates !== false;
|
|
20283
20387
|
const entitySlots = Array.isArray(resolved?.slots) ? resolved.slots : [];
|
|
20284
20388
|
const entityResult = str(resolved?.result);
|
|
@@ -20336,7 +20440,7 @@ function SequencerBoard({
|
|
|
20336
20440
|
let step = 0;
|
|
20337
20441
|
const advance = () => {
|
|
20338
20442
|
step++;
|
|
20339
|
-
emit(
|
|
20443
|
+
if (stepEvent) emit(`UI:${stepEvent}`, { step });
|
|
20340
20444
|
if (step >= maxSlots) {
|
|
20341
20445
|
if (checkEvent) emit(`UI:${checkEvent}`, { sequence: playerIds });
|
|
20342
20446
|
const playerSeq = slots.map((s) => s?.id);
|
|
@@ -22561,35 +22665,7 @@ var init_SimulationCanvas = __esm({
|
|
|
22561
22665
|
SimulationCanvas.displayName = "SimulationCanvas";
|
|
22562
22666
|
}
|
|
22563
22667
|
});
|
|
22564
|
-
|
|
22565
|
-
if (_scr) return _scr;
|
|
22566
|
-
const mod = (init_UISlotRenderer(), __toCommonJS(UISlotRenderer_exports));
|
|
22567
|
-
_scr = mod.SlotContentRenderer;
|
|
22568
|
-
return _scr;
|
|
22569
|
-
}
|
|
22570
|
-
function resolveDescriptor(value, idPrefix) {
|
|
22571
|
-
if (value === null || value === void 0) return value;
|
|
22572
|
-
if (React114__default.isValidElement(value)) return value;
|
|
22573
|
-
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
|
|
22574
|
-
if (Array.isArray(value)) {
|
|
22575
|
-
return value.map((item, i) => /* @__PURE__ */ jsx(React114__default.Fragment, { children: resolveDescriptor(item, `${idPrefix}-${i}`) }, i));
|
|
22576
|
-
}
|
|
22577
|
-
if (typeof value === "object") {
|
|
22578
|
-
const rec = value;
|
|
22579
|
-
if (typeof rec.type === "string" && getComponentForPattern(rec.type) !== null) {
|
|
22580
|
-
const type = rec.type;
|
|
22581
|
-
const _id = typeof rec._id === "string" ? rec._id : void 0;
|
|
22582
|
-
const nestedProps = rec.props !== void 0 && typeof rec.props === "object" && !Array.isArray(rec.props) && rec.props !== null ? rec.props : void 0;
|
|
22583
|
-
const { type: _t, props: _p, _id: _d, ...flatRest } = rec;
|
|
22584
|
-
const resolvedProps = nestedProps !== void 0 ? nestedProps : flatRest;
|
|
22585
|
-
const content = { id: _id ?? idPrefix, pattern: type, props: resolvedProps, priority: 0 };
|
|
22586
|
-
const SCR = getSlotContentRenderer2();
|
|
22587
|
-
return /* @__PURE__ */ jsx(SCR, { content, onDismiss: () => void 0 });
|
|
22588
|
-
}
|
|
22589
|
-
}
|
|
22590
|
-
return null;
|
|
22591
|
-
}
|
|
22592
|
-
var _scr, GameTemplate;
|
|
22668
|
+
var GameTemplate;
|
|
22593
22669
|
var init_GameTemplate = __esm({
|
|
22594
22670
|
"components/game/2d/templates/GameTemplate.tsx"() {
|
|
22595
22671
|
init_cn();
|
|
@@ -22597,7 +22673,6 @@ var init_GameTemplate = __esm({
|
|
|
22597
22673
|
init_Stack();
|
|
22598
22674
|
init_Typography();
|
|
22599
22675
|
init_Button();
|
|
22600
|
-
_scr = null;
|
|
22601
22676
|
GameTemplate = ({
|
|
22602
22677
|
entity,
|
|
22603
22678
|
title = "Game",
|
|
@@ -22606,7 +22681,8 @@ var init_GameTemplate = __esm({
|
|
|
22606
22681
|
debugPanel,
|
|
22607
22682
|
showDebugPanel = false,
|
|
22608
22683
|
controls,
|
|
22609
|
-
className
|
|
22684
|
+
className,
|
|
22685
|
+
backgroundAsset
|
|
22610
22686
|
}) => {
|
|
22611
22687
|
return /* @__PURE__ */ jsxs(
|
|
22612
22688
|
Box,
|
|
@@ -22663,15 +22739,16 @@ var init_GameTemplate = __esm({
|
|
|
22663
22739
|
{
|
|
22664
22740
|
position: "relative",
|
|
22665
22741
|
fullWidth: true,
|
|
22666
|
-
className: "flex-1 bg-muted",
|
|
22742
|
+
className: backgroundAsset ? "flex-1" : "flex-1 bg-muted",
|
|
22743
|
+
style: backgroundAsset ? { backgroundImage: `url(${backgroundAsset.url})`, backgroundSize: "cover", backgroundPosition: "center" } : void 0,
|
|
22667
22744
|
children: [
|
|
22668
|
-
|
|
22745
|
+
children,
|
|
22669
22746
|
hud && /* @__PURE__ */ jsx(
|
|
22670
22747
|
Box,
|
|
22671
22748
|
{
|
|
22672
22749
|
position: "absolute",
|
|
22673
22750
|
className: "top-0 left-0 right-0 pointer-events-none",
|
|
22674
|
-
children: /* @__PURE__ */ jsx(Box, { padding: "md", className: "pointer-events-auto w-fit", children:
|
|
22751
|
+
children: /* @__PURE__ */ jsx(Box, { padding: "md", className: "pointer-events-auto w-fit", children: hud })
|
|
22675
22752
|
}
|
|
22676
22753
|
)
|
|
22677
22754
|
]
|
|
@@ -22696,7 +22773,7 @@ var init_GameTemplate = __esm({
|
|
|
22696
22773
|
children: /* @__PURE__ */ jsx(Typography, { variant: "h6", children: "Debug Panel" })
|
|
22697
22774
|
}
|
|
22698
22775
|
),
|
|
22699
|
-
/* @__PURE__ */ jsx(Box, { padding: "md", children:
|
|
22776
|
+
/* @__PURE__ */ jsx(Box, { padding: "md", children: debugPanel })
|
|
22700
22777
|
]
|
|
22701
22778
|
}
|
|
22702
22779
|
)
|
|
@@ -22707,59 +22784,21 @@ var init_GameTemplate = __esm({
|
|
|
22707
22784
|
GameTemplate.displayName = "GameTemplate";
|
|
22708
22785
|
}
|
|
22709
22786
|
});
|
|
22710
|
-
|
|
22711
|
-
if (Array.isArray(v) || React114__default.isValidElement(v)) return null;
|
|
22712
|
-
const o = v;
|
|
22713
|
-
if (typeof o.type !== "string") return null;
|
|
22714
|
-
const props = o.props !== void 0 && typeof o.props === "object" && !Array.isArray(o.props) && o.props !== null ? o.props : void 0;
|
|
22715
|
-
const _id = typeof o._id === "string" ? o._id : void 0;
|
|
22716
|
-
const sourceTrait = typeof o.sourceTrait === "string" ? o.sourceTrait : void 0;
|
|
22717
|
-
return { type: o.type, props, _id, sourceTrait };
|
|
22718
|
-
}
|
|
22719
|
-
function getSlotContentRenderer3() {
|
|
22720
|
-
if (_scr2) return _scr2;
|
|
22721
|
-
const mod = (init_UISlotRenderer(), __toCommonJS(UISlotRenderer_exports));
|
|
22722
|
-
_scr2 = mod.SlotContentRenderer;
|
|
22723
|
-
return _scr2;
|
|
22724
|
-
}
|
|
22725
|
-
function resolveDescriptor2(value, idPrefix) {
|
|
22726
|
-
if (value === null || value === void 0) return value;
|
|
22727
|
-
if (React114__default.isValidElement(value)) return value;
|
|
22728
|
-
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
|
|
22729
|
-
if (Array.isArray(value)) {
|
|
22730
|
-
return value.map((item, i) => /* @__PURE__ */ jsx(React114__default.Fragment, { children: resolveDescriptor2(item, `${idPrefix}-${i}`) }, i));
|
|
22731
|
-
}
|
|
22732
|
-
if (typeof value === "object" && value !== null) {
|
|
22733
|
-
const desc = asDescriptor(value);
|
|
22734
|
-
if (desc !== null && getComponentForPattern(desc.type) !== null) {
|
|
22735
|
-
const resolvedProps = desc.props ?? {};
|
|
22736
|
-
const content = {
|
|
22737
|
-
id: desc._id ?? idPrefix,
|
|
22738
|
-
pattern: desc.type,
|
|
22739
|
-
props: resolvedProps,
|
|
22740
|
-
priority: 0,
|
|
22741
|
-
...desc.sourceTrait !== void 0 && { sourceTrait: desc.sourceTrait }
|
|
22742
|
-
};
|
|
22743
|
-
const SCR = getSlotContentRenderer3();
|
|
22744
|
-
return /* @__PURE__ */ jsx(SCR, { content, onDismiss: () => void 0 }, content.id);
|
|
22745
|
-
}
|
|
22746
|
-
}
|
|
22747
|
-
return null;
|
|
22748
|
-
}
|
|
22749
|
-
var _scr2, GameShell;
|
|
22787
|
+
var GameShell;
|
|
22750
22788
|
var init_GameShell = __esm({
|
|
22751
22789
|
"components/game/2d/templates/GameShell.tsx"() {
|
|
22752
22790
|
init_cn();
|
|
22753
22791
|
init_Box();
|
|
22754
22792
|
init_Stack();
|
|
22755
22793
|
init_Typography();
|
|
22756
|
-
_scr2 = null;
|
|
22757
22794
|
GameShell = ({
|
|
22758
22795
|
appName = "Game",
|
|
22759
22796
|
hud,
|
|
22760
22797
|
className,
|
|
22761
22798
|
showTopBar = true,
|
|
22762
|
-
children
|
|
22799
|
+
children,
|
|
22800
|
+
backgroundAsset,
|
|
22801
|
+
hudBackgroundAsset
|
|
22763
22802
|
}) => {
|
|
22764
22803
|
return /* @__PURE__ */ jsxs(
|
|
22765
22804
|
Box,
|
|
@@ -22774,7 +22813,7 @@ var init_GameShell = __esm({
|
|
|
22774
22813
|
width: "100vw",
|
|
22775
22814
|
height: "100vh",
|
|
22776
22815
|
overflow: "hidden",
|
|
22777
|
-
background: "var(--color-background, #0a0a0f)",
|
|
22816
|
+
background: backgroundAsset ? `url(${backgroundAsset.url}) center/cover no-repeat` : "var(--color-background, #0a0a0f)",
|
|
22778
22817
|
color: "var(--color-text, #e0e0e0)"
|
|
22779
22818
|
},
|
|
22780
22819
|
children: [
|
|
@@ -22784,7 +22823,7 @@ var init_GameShell = __esm({
|
|
|
22784
22823
|
className: "game-shell__header",
|
|
22785
22824
|
style: {
|
|
22786
22825
|
flexShrink: 0,
|
|
22787
|
-
background: "var(--color-surface, #12121f)",
|
|
22826
|
+
background: hudBackgroundAsset ? `url(${hudBackgroundAsset.url}) center/cover no-repeat` : "var(--color-surface, #12121f)",
|
|
22788
22827
|
borderBottom: "1px solid var(--color-border, #2a2a3a)"
|
|
22789
22828
|
},
|
|
22790
22829
|
children: [
|
|
@@ -22807,7 +22846,7 @@ var init_GameShell = __esm({
|
|
|
22807
22846
|
)
|
|
22808
22847
|
}
|
|
22809
22848
|
),
|
|
22810
|
-
hud && /* @__PURE__ */ jsx(Box, { className: "game-shell__hud", style: { width: "100%" }, children:
|
|
22849
|
+
hud && /* @__PURE__ */ jsx(Box, { className: "game-shell__hud", style: { width: "100%" }, children: hud })
|
|
22811
22850
|
]
|
|
22812
22851
|
}
|
|
22813
22852
|
),
|
|
@@ -22820,7 +22859,7 @@ var init_GameShell = __esm({
|
|
|
22820
22859
|
overflow: "hidden",
|
|
22821
22860
|
position: "relative"
|
|
22822
22861
|
},
|
|
22823
|
-
children
|
|
22862
|
+
children
|
|
22824
22863
|
}
|
|
22825
22864
|
)
|
|
22826
22865
|
]
|
|
@@ -24027,7 +24066,7 @@ var init_ErrorBoundary = __esm({
|
|
|
24027
24066
|
}
|
|
24028
24067
|
);
|
|
24029
24068
|
};
|
|
24030
|
-
ErrorBoundary = class extends
|
|
24069
|
+
ErrorBoundary = class extends React112__default.Component {
|
|
24031
24070
|
constructor(props) {
|
|
24032
24071
|
super(props);
|
|
24033
24072
|
__publicField(this, "reset", () => {
|
|
@@ -24309,7 +24348,7 @@ var init_Container = __esm({
|
|
|
24309
24348
|
as: Component = "div"
|
|
24310
24349
|
}) => {
|
|
24311
24350
|
const resolvedSize = maxWidth ?? size ?? "lg";
|
|
24312
|
-
return
|
|
24351
|
+
return React112__default.createElement(
|
|
24313
24352
|
Component,
|
|
24314
24353
|
{
|
|
24315
24354
|
className: cn(
|
|
@@ -25664,9 +25703,9 @@ var init_BiologyCanvas = __esm({
|
|
|
25664
25703
|
}
|
|
25665
25704
|
});
|
|
25666
25705
|
|
|
25667
|
-
// node_modules
|
|
25706
|
+
// node_modules/katex/dist/katex.min.css
|
|
25668
25707
|
var init_katex_min = __esm({
|
|
25669
|
-
"node_modules
|
|
25708
|
+
"node_modules/katex/dist/katex.min.css"() {
|
|
25670
25709
|
}
|
|
25671
25710
|
});
|
|
25672
25711
|
var Tabs;
|
|
@@ -26106,7 +26145,7 @@ var init_CodeBlock = __esm({
|
|
|
26106
26145
|
DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
|
|
26107
26146
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
26108
26147
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
26109
|
-
CodeBlock =
|
|
26148
|
+
CodeBlock = React112__default.memo(
|
|
26110
26149
|
({
|
|
26111
26150
|
code: rawCode,
|
|
26112
26151
|
language = "text",
|
|
@@ -26693,7 +26732,7 @@ var init_MarkdownContent = __esm({
|
|
|
26693
26732
|
init_Box();
|
|
26694
26733
|
init_CodeBlock();
|
|
26695
26734
|
init_cn();
|
|
26696
|
-
MarkdownContent =
|
|
26735
|
+
MarkdownContent = React112__default.memo(
|
|
26697
26736
|
({ content, direction = "ltr", className }) => {
|
|
26698
26737
|
const { t: _t } = useTranslate();
|
|
26699
26738
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -28020,7 +28059,7 @@ var init_StateMachineView = __esm({
|
|
|
28020
28059
|
style: { top: title ? 30 : 0 },
|
|
28021
28060
|
children: [
|
|
28022
28061
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
28023
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
28062
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React112__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
28024
28063
|
StateNode2,
|
|
28025
28064
|
{
|
|
28026
28065
|
state,
|
|
@@ -32623,6 +32662,8 @@ function CounterMinimal({
|
|
|
32623
32662
|
size = "md",
|
|
32624
32663
|
onDecrement,
|
|
32625
32664
|
onIncrement,
|
|
32665
|
+
decrementEvent,
|
|
32666
|
+
incrementEvent,
|
|
32626
32667
|
className
|
|
32627
32668
|
}) {
|
|
32628
32669
|
const resolved = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
@@ -32633,6 +32674,7 @@ function CounterMinimal({
|
|
|
32633
32674
|
{
|
|
32634
32675
|
variant: "secondary",
|
|
32635
32676
|
size: sizeStyles8[size].button,
|
|
32677
|
+
action: decrementEvent,
|
|
32636
32678
|
onClick: onDecrement,
|
|
32637
32679
|
disabled: resolved.decrementDisabled,
|
|
32638
32680
|
icon: "minus",
|
|
@@ -32655,6 +32697,7 @@ function CounterMinimal({
|
|
|
32655
32697
|
{
|
|
32656
32698
|
variant: "secondary",
|
|
32657
32699
|
size: sizeStyles8[size].button,
|
|
32700
|
+
action: incrementEvent,
|
|
32658
32701
|
onClick: onIncrement,
|
|
32659
32702
|
disabled: resolved.incrementDisabled,
|
|
32660
32703
|
icon: "plus",
|
|
@@ -32671,6 +32714,9 @@ function CounterStandard({
|
|
|
32671
32714
|
onDecrement,
|
|
32672
32715
|
onIncrement,
|
|
32673
32716
|
onReset,
|
|
32717
|
+
decrementEvent,
|
|
32718
|
+
incrementEvent,
|
|
32719
|
+
resetEvent,
|
|
32674
32720
|
className
|
|
32675
32721
|
}) {
|
|
32676
32722
|
const resolved = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
@@ -32701,6 +32747,7 @@ function CounterStandard({
|
|
|
32701
32747
|
{
|
|
32702
32748
|
variant: "secondary",
|
|
32703
32749
|
size: sizeStyles8[size].button,
|
|
32750
|
+
action: decrementEvent,
|
|
32704
32751
|
onClick: onDecrement,
|
|
32705
32752
|
disabled: resolved.decrementDisabled,
|
|
32706
32753
|
icon: "minus"
|
|
@@ -32711,6 +32758,7 @@ function CounterStandard({
|
|
|
32711
32758
|
{
|
|
32712
32759
|
variant: "primary",
|
|
32713
32760
|
size: sizeStyles8[size].button,
|
|
32761
|
+
action: incrementEvent,
|
|
32714
32762
|
onClick: onIncrement,
|
|
32715
32763
|
disabled: resolved.incrementDisabled,
|
|
32716
32764
|
icon: "plus"
|
|
@@ -32722,6 +32770,7 @@ function CounterStandard({
|
|
|
32722
32770
|
{
|
|
32723
32771
|
variant: "ghost",
|
|
32724
32772
|
size: "sm",
|
|
32773
|
+
action: resetEvent,
|
|
32725
32774
|
onClick: onReset,
|
|
32726
32775
|
icon: "rotate-ccw",
|
|
32727
32776
|
children: "Reset"
|
|
@@ -32737,6 +32786,9 @@ function CounterFull({
|
|
|
32737
32786
|
onDecrement,
|
|
32738
32787
|
onIncrement,
|
|
32739
32788
|
onReset,
|
|
32789
|
+
decrementEvent,
|
|
32790
|
+
incrementEvent,
|
|
32791
|
+
resetEvent,
|
|
32740
32792
|
className
|
|
32741
32793
|
}) {
|
|
32742
32794
|
const resolved = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
@@ -32770,6 +32822,7 @@ function CounterFull({
|
|
|
32770
32822
|
{
|
|
32771
32823
|
variant: "secondary",
|
|
32772
32824
|
size: sizeStyles8[size].button,
|
|
32825
|
+
action: decrementEvent,
|
|
32773
32826
|
onClick: onDecrement,
|
|
32774
32827
|
disabled: resolved.decrementDisabled,
|
|
32775
32828
|
icon: "minus",
|
|
@@ -32781,6 +32834,7 @@ function CounterFull({
|
|
|
32781
32834
|
{
|
|
32782
32835
|
variant: "primary",
|
|
32783
32836
|
size: sizeStyles8[size].button,
|
|
32837
|
+
action: incrementEvent,
|
|
32784
32838
|
onClick: onIncrement,
|
|
32785
32839
|
disabled: resolved.incrementDisabled,
|
|
32786
32840
|
icon: "plus",
|
|
@@ -32793,6 +32847,7 @@ function CounterFull({
|
|
|
32793
32847
|
{
|
|
32794
32848
|
variant: "ghost",
|
|
32795
32849
|
size: "sm",
|
|
32850
|
+
action: resetEvent,
|
|
32796
32851
|
onClick: onReset,
|
|
32797
32852
|
icon: "rotate-ccw",
|
|
32798
32853
|
children: "Reset to 0"
|
|
@@ -33642,8 +33697,8 @@ var init_Menu = __esm({
|
|
|
33642
33697
|
"bottom-end": "bottom-start"
|
|
33643
33698
|
};
|
|
33644
33699
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
33645
|
-
const triggerChild =
|
|
33646
|
-
const triggerElement =
|
|
33700
|
+
const triggerChild = React112__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
33701
|
+
const triggerElement = React112__default.cloneElement(
|
|
33647
33702
|
triggerChild,
|
|
33648
33703
|
{
|
|
33649
33704
|
ref: triggerRef,
|
|
@@ -33738,14 +33793,14 @@ function useDataDnd(args) {
|
|
|
33738
33793
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
33739
33794
|
const enabled = isZone || Boolean(dndRoot);
|
|
33740
33795
|
const eventBus = useEventBus();
|
|
33741
|
-
const parentRoot =
|
|
33796
|
+
const parentRoot = React112__default.useContext(RootCtx);
|
|
33742
33797
|
const isRoot = enabled && parentRoot === null;
|
|
33743
|
-
const zoneId =
|
|
33798
|
+
const zoneId = React112__default.useId();
|
|
33744
33799
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
33745
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
33746
|
-
const optimisticOrdersRef =
|
|
33800
|
+
const [optimisticOrders, setOptimisticOrders] = React112__default.useState(() => /* @__PURE__ */ new Map());
|
|
33801
|
+
const optimisticOrdersRef = React112__default.useRef(optimisticOrders);
|
|
33747
33802
|
optimisticOrdersRef.current = optimisticOrders;
|
|
33748
|
-
const clearOptimisticOrder =
|
|
33803
|
+
const clearOptimisticOrder = React112__default.useCallback((group) => {
|
|
33749
33804
|
setOptimisticOrders((prev) => {
|
|
33750
33805
|
if (!prev.has(group)) return prev;
|
|
33751
33806
|
const next = new Map(prev);
|
|
@@ -33770,7 +33825,7 @@ function useDataDnd(args) {
|
|
|
33770
33825
|
const raw = it[dndItemIdField];
|
|
33771
33826
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
33772
33827
|
}).join("|");
|
|
33773
|
-
const itemIds =
|
|
33828
|
+
const itemIds = React112__default.useMemo(
|
|
33774
33829
|
() => orderedItems.map((it, idx) => {
|
|
33775
33830
|
const raw = it[dndItemIdField];
|
|
33776
33831
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
@@ -33781,7 +33836,7 @@ function useDataDnd(args) {
|
|
|
33781
33836
|
const raw = it[dndItemIdField];
|
|
33782
33837
|
return raw != null ? String(raw) : `__${idx}`;
|
|
33783
33838
|
}).join("|");
|
|
33784
|
-
|
|
33839
|
+
React112__default.useEffect(() => {
|
|
33785
33840
|
const root = isRoot ? null : parentRoot;
|
|
33786
33841
|
if (root) {
|
|
33787
33842
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -33789,20 +33844,20 @@ function useDataDnd(args) {
|
|
|
33789
33844
|
clearOptimisticOrder(ownGroup);
|
|
33790
33845
|
}
|
|
33791
33846
|
}, [itemsContentSig, ownGroup]);
|
|
33792
|
-
const zonesRef =
|
|
33793
|
-
const registerZone =
|
|
33847
|
+
const zonesRef = React112__default.useRef(/* @__PURE__ */ new Map());
|
|
33848
|
+
const registerZone = React112__default.useCallback((zoneId2, meta2) => {
|
|
33794
33849
|
zonesRef.current.set(zoneId2, meta2);
|
|
33795
33850
|
}, []);
|
|
33796
|
-
const unregisterZone =
|
|
33851
|
+
const unregisterZone = React112__default.useCallback((zoneId2) => {
|
|
33797
33852
|
zonesRef.current.delete(zoneId2);
|
|
33798
33853
|
}, []);
|
|
33799
|
-
const [activeDrag, setActiveDrag] =
|
|
33800
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
33801
|
-
const meta =
|
|
33854
|
+
const [activeDrag, setActiveDrag] = React112__default.useState(null);
|
|
33855
|
+
const [overZoneGroup, setOverZoneGroup] = React112__default.useState(null);
|
|
33856
|
+
const meta = React112__default.useMemo(
|
|
33802
33857
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
33803
33858
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
33804
33859
|
);
|
|
33805
|
-
|
|
33860
|
+
React112__default.useEffect(() => {
|
|
33806
33861
|
const target = isRoot ? null : parentRoot;
|
|
33807
33862
|
if (!target) {
|
|
33808
33863
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -33821,7 +33876,7 @@ function useDataDnd(args) {
|
|
|
33821
33876
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
33822
33877
|
const sensors = useAlmadarDndSensors(true);
|
|
33823
33878
|
const collisionDetection = almadarDndCollisionDetection;
|
|
33824
|
-
const findZoneByItem =
|
|
33879
|
+
const findZoneByItem = React112__default.useCallback(
|
|
33825
33880
|
(id) => {
|
|
33826
33881
|
for (const z of zonesRef.current.values()) {
|
|
33827
33882
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -33830,7 +33885,7 @@ function useDataDnd(args) {
|
|
|
33830
33885
|
},
|
|
33831
33886
|
[]
|
|
33832
33887
|
);
|
|
33833
|
-
|
|
33888
|
+
React112__default.useCallback(
|
|
33834
33889
|
(group) => {
|
|
33835
33890
|
for (const z of zonesRef.current.values()) {
|
|
33836
33891
|
if (z.group === group) return z;
|
|
@@ -33839,7 +33894,7 @@ function useDataDnd(args) {
|
|
|
33839
33894
|
},
|
|
33840
33895
|
[]
|
|
33841
33896
|
);
|
|
33842
|
-
const handleDragEnd =
|
|
33897
|
+
const handleDragEnd = React112__default.useCallback(
|
|
33843
33898
|
(event) => {
|
|
33844
33899
|
const { active, over } = event;
|
|
33845
33900
|
const activeIdStr = String(active.id);
|
|
@@ -33930,8 +33985,8 @@ function useDataDnd(args) {
|
|
|
33930
33985
|
},
|
|
33931
33986
|
[eventBus]
|
|
33932
33987
|
);
|
|
33933
|
-
const sortableData =
|
|
33934
|
-
const SortableItem =
|
|
33988
|
+
const sortableData = React112__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
33989
|
+
const SortableItem = React112__default.useCallback(
|
|
33935
33990
|
({ id, children }) => {
|
|
33936
33991
|
const {
|
|
33937
33992
|
attributes,
|
|
@@ -33971,7 +34026,7 @@ function useDataDnd(args) {
|
|
|
33971
34026
|
id: droppableId,
|
|
33972
34027
|
data: sortableData
|
|
33973
34028
|
});
|
|
33974
|
-
const ctx =
|
|
34029
|
+
const ctx = React112__default.useContext(RootCtx);
|
|
33975
34030
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
33976
34031
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
33977
34032
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -33986,7 +34041,7 @@ function useDataDnd(args) {
|
|
|
33986
34041
|
showForeignPlaceholder,
|
|
33987
34042
|
ctxAvailable: ctx != null
|
|
33988
34043
|
});
|
|
33989
|
-
|
|
34044
|
+
React112__default.useEffect(() => {
|
|
33990
34045
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
33991
34046
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
33992
34047
|
return /* @__PURE__ */ jsx(
|
|
@@ -34000,11 +34055,11 @@ function useDataDnd(args) {
|
|
|
34000
34055
|
}
|
|
34001
34056
|
);
|
|
34002
34057
|
};
|
|
34003
|
-
const rootContextValue =
|
|
34058
|
+
const rootContextValue = React112__default.useMemo(
|
|
34004
34059
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
34005
34060
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
34006
34061
|
);
|
|
34007
|
-
const handleDragStart =
|
|
34062
|
+
const handleDragStart = React112__default.useCallback((event) => {
|
|
34008
34063
|
const sourceZone = findZoneByItem(event.active.id);
|
|
34009
34064
|
const rect = event.active.rect.current.initial;
|
|
34010
34065
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -34023,7 +34078,7 @@ function useDataDnd(args) {
|
|
|
34023
34078
|
isRoot
|
|
34024
34079
|
});
|
|
34025
34080
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
34026
|
-
const handleDragOver =
|
|
34081
|
+
const handleDragOver = React112__default.useCallback((event) => {
|
|
34027
34082
|
const { active, over } = event;
|
|
34028
34083
|
const overData = over?.data?.current;
|
|
34029
34084
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -34093,7 +34148,7 @@ function useDataDnd(args) {
|
|
|
34093
34148
|
return next;
|
|
34094
34149
|
});
|
|
34095
34150
|
}, []);
|
|
34096
|
-
const handleDragCancel =
|
|
34151
|
+
const handleDragCancel = React112__default.useCallback((event) => {
|
|
34097
34152
|
setActiveDrag(null);
|
|
34098
34153
|
setOverZoneGroup(null);
|
|
34099
34154
|
dndLog.warn("dragCancel", {
|
|
@@ -34101,12 +34156,12 @@ function useDataDnd(args) {
|
|
|
34101
34156
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
34102
34157
|
});
|
|
34103
34158
|
}, []);
|
|
34104
|
-
const handleDragEndWithCleanup =
|
|
34159
|
+
const handleDragEndWithCleanup = React112__default.useCallback((event) => {
|
|
34105
34160
|
handleDragEnd(event);
|
|
34106
34161
|
setActiveDrag(null);
|
|
34107
34162
|
setOverZoneGroup(null);
|
|
34108
34163
|
}, [handleDragEnd]);
|
|
34109
|
-
const wrapContainer =
|
|
34164
|
+
const wrapContainer = React112__default.useCallback(
|
|
34110
34165
|
(children) => {
|
|
34111
34166
|
if (!enabled) return children;
|
|
34112
34167
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -34160,7 +34215,7 @@ var init_useDataDnd = __esm({
|
|
|
34160
34215
|
init_useAlmadarDndCollision();
|
|
34161
34216
|
init_Box();
|
|
34162
34217
|
dndLog = createLogger("almadar:ui:dnd");
|
|
34163
|
-
RootCtx =
|
|
34218
|
+
RootCtx = React112__default.createContext(null);
|
|
34164
34219
|
}
|
|
34165
34220
|
});
|
|
34166
34221
|
function renderIconInput(icon, props) {
|
|
@@ -34686,7 +34741,7 @@ function DataList({
|
|
|
34686
34741
|
}) {
|
|
34687
34742
|
const eventBus = useEventBus();
|
|
34688
34743
|
const { t } = useTranslate();
|
|
34689
|
-
const [visibleCount, setVisibleCount] =
|
|
34744
|
+
const [visibleCount, setVisibleCount] = React112__default.useState(pageSize || Infinity);
|
|
34690
34745
|
const fieldDefs = fields ?? columns ?? [];
|
|
34691
34746
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
34692
34747
|
const dnd = useDataDnd({
|
|
@@ -34705,7 +34760,7 @@ function DataList({
|
|
|
34705
34760
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
34706
34761
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
34707
34762
|
const hasRenderProp = typeof children === "function";
|
|
34708
|
-
|
|
34763
|
+
React112__default.useEffect(() => {
|
|
34709
34764
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
34710
34765
|
const childrenTypeOf = typeof children;
|
|
34711
34766
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -34809,7 +34864,7 @@ function DataList({
|
|
|
34809
34864
|
const items2 = [...data];
|
|
34810
34865
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
34811
34866
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
34812
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
34867
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React112__default.Fragment, { children: [
|
|
34813
34868
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
34814
34869
|
group.items.map((itemData, index) => {
|
|
34815
34870
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -34950,7 +35005,7 @@ function DataList({
|
|
|
34950
35005
|
className
|
|
34951
35006
|
),
|
|
34952
35007
|
children: [
|
|
34953
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
35008
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React112__default.Fragment, { children: [
|
|
34954
35009
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
34955
35010
|
group.items.map(
|
|
34956
35011
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -35035,7 +35090,7 @@ var init_FormSection = __esm({
|
|
|
35035
35090
|
columns = 1,
|
|
35036
35091
|
className
|
|
35037
35092
|
}) => {
|
|
35038
|
-
const [collapsed, setCollapsed] =
|
|
35093
|
+
const [collapsed, setCollapsed] = React112__default.useState(defaultCollapsed);
|
|
35039
35094
|
const { t } = useTranslate();
|
|
35040
35095
|
const eventBus = useEventBus();
|
|
35041
35096
|
const gridClass = {
|
|
@@ -35043,7 +35098,7 @@ var init_FormSection = __esm({
|
|
|
35043
35098
|
2: "grid-cols-1 md:grid-cols-2",
|
|
35044
35099
|
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
35045
35100
|
}[columns];
|
|
35046
|
-
|
|
35101
|
+
React112__default.useCallback(() => {
|
|
35047
35102
|
if (collapsible) {
|
|
35048
35103
|
setCollapsed((prev) => !prev);
|
|
35049
35104
|
eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
|
|
@@ -35993,7 +36048,7 @@ var init_Flex = __esm({
|
|
|
35993
36048
|
flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
|
|
35994
36049
|
}
|
|
35995
36050
|
}
|
|
35996
|
-
return
|
|
36051
|
+
return React112__default.createElement(Component, {
|
|
35997
36052
|
className: cn(
|
|
35998
36053
|
inline ? "inline-flex" : "flex",
|
|
35999
36054
|
directionStyles[direction],
|
|
@@ -36112,7 +36167,7 @@ var init_Grid = __esm({
|
|
|
36112
36167
|
as: Component = "div"
|
|
36113
36168
|
}) => {
|
|
36114
36169
|
const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
|
|
36115
|
-
return
|
|
36170
|
+
return React112__default.createElement(
|
|
36116
36171
|
Component,
|
|
36117
36172
|
{
|
|
36118
36173
|
className: cn(
|
|
@@ -36308,9 +36363,9 @@ var init_Popover = __esm({
|
|
|
36308
36363
|
onMouseLeave: handleClose,
|
|
36309
36364
|
onPointerDown: tapTriggerProps.onPointerDown
|
|
36310
36365
|
};
|
|
36311
|
-
const childElement =
|
|
36366
|
+
const childElement = React112__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
36312
36367
|
const childPointerDown = childElement.props.onPointerDown;
|
|
36313
|
-
const triggerElement =
|
|
36368
|
+
const triggerElement = React112__default.cloneElement(
|
|
36314
36369
|
childElement,
|
|
36315
36370
|
{
|
|
36316
36371
|
ref: triggerRef,
|
|
@@ -36912,9 +36967,9 @@ var init_Tooltip = __esm({
|
|
|
36912
36967
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
36913
36968
|
};
|
|
36914
36969
|
}, []);
|
|
36915
|
-
const triggerElement =
|
|
36970
|
+
const triggerElement = React112__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
36916
36971
|
const childPointerDown = triggerElement.props.onPointerDown;
|
|
36917
|
-
const trigger =
|
|
36972
|
+
const trigger = React112__default.cloneElement(triggerElement, {
|
|
36918
36973
|
ref: triggerRef,
|
|
36919
36974
|
onMouseEnter: handleMouseEnter,
|
|
36920
36975
|
onMouseLeave: handleMouseLeave,
|
|
@@ -37004,7 +37059,7 @@ var init_WizardProgress = __esm({
|
|
|
37004
37059
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
37005
37060
|
const isActive = index === currentStep;
|
|
37006
37061
|
const isCompleted = index < currentStep;
|
|
37007
|
-
return /* @__PURE__ */ jsxs(
|
|
37062
|
+
return /* @__PURE__ */ jsxs(React112__default.Fragment, { children: [
|
|
37008
37063
|
/* @__PURE__ */ jsx(
|
|
37009
37064
|
"button",
|
|
37010
37065
|
{
|
|
@@ -38564,7 +38619,7 @@ var init_MapView = __esm({
|
|
|
38564
38619
|
shadowSize: [41, 41]
|
|
38565
38620
|
});
|
|
38566
38621
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
38567
|
-
const { useEffect: useEffect79, useRef: useRef79, useCallback: useCallback118, useState: useState115 } =
|
|
38622
|
+
const { useEffect: useEffect79, useRef: useRef79, useCallback: useCallback118, useState: useState115 } = React112__default;
|
|
38568
38623
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
38569
38624
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
38570
38625
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
@@ -39479,8 +39534,8 @@ function TableView({
|
|
|
39479
39534
|
}) {
|
|
39480
39535
|
const eventBus = useEventBus();
|
|
39481
39536
|
const { t } = useTranslate();
|
|
39482
|
-
const [visibleCount, setVisibleCount] =
|
|
39483
|
-
const [localSelected, setLocalSelected] =
|
|
39537
|
+
const [visibleCount, setVisibleCount] = React112__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
39538
|
+
const [localSelected, setLocalSelected] = React112__default.useState(/* @__PURE__ */ new Set());
|
|
39484
39539
|
const colDefs = columns ?? fields ?? [];
|
|
39485
39540
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
39486
39541
|
const dnd = useDataDnd({
|
|
@@ -39675,12 +39730,12 @@ function TableView({
|
|
|
39675
39730
|
]
|
|
39676
39731
|
}
|
|
39677
39732
|
);
|
|
39678
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
39733
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React112__default.Fragment, { children: rowInner }, id);
|
|
39679
39734
|
};
|
|
39680
39735
|
const items = Array.from(data);
|
|
39681
39736
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
39682
39737
|
let runningIndex = 0;
|
|
39683
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
39738
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React112__default.Fragment, { children: [
|
|
39684
39739
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
39685
39740
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
39686
39741
|
] }, gi)) });
|
|
@@ -41037,7 +41092,7 @@ var init_StepFlow = __esm({
|
|
|
41037
41092
|
className
|
|
41038
41093
|
}) => {
|
|
41039
41094
|
if (orientation === "vertical") {
|
|
41040
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
41095
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React112__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
41041
41096
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
41042
41097
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
41043
41098
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -41048,7 +41103,7 @@ var init_StepFlow = __esm({
|
|
|
41048
41103
|
] })
|
|
41049
41104
|
] }) }, index)) });
|
|
41050
41105
|
}
|
|
41051
|
-
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(
|
|
41106
|
+
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(React112__default.Fragment, { children: [
|
|
41052
41107
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
41053
41108
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
41054
41109
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -42033,7 +42088,7 @@ var init_LikertScale = __esm({
|
|
|
42033
42088
|
md: "text-base",
|
|
42034
42089
|
lg: "text-lg"
|
|
42035
42090
|
};
|
|
42036
|
-
LikertScale =
|
|
42091
|
+
LikertScale = React112__default.forwardRef(
|
|
42037
42092
|
({
|
|
42038
42093
|
question,
|
|
42039
42094
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -42045,7 +42100,7 @@ var init_LikertScale = __esm({
|
|
|
42045
42100
|
variant = "radios",
|
|
42046
42101
|
className
|
|
42047
42102
|
}, ref) => {
|
|
42048
|
-
const groupId =
|
|
42103
|
+
const groupId = React112__default.useId();
|
|
42049
42104
|
const eventBus = useEventBus();
|
|
42050
42105
|
const handleSelect = useCallback(
|
|
42051
42106
|
(next) => {
|
|
@@ -44327,7 +44382,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
44327
44382
|
"aria-label": t("aria.breadcrumb"),
|
|
44328
44383
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
44329
44384
|
const isLast = idx === items.length - 1;
|
|
44330
|
-
return /* @__PURE__ */ jsxs(
|
|
44385
|
+
return /* @__PURE__ */ jsxs(React112__default.Fragment, { children: [
|
|
44331
44386
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
44332
44387
|
Icon,
|
|
44333
44388
|
{
|
|
@@ -44991,7 +45046,7 @@ var init_PageHeader = __esm({
|
|
|
44991
45046
|
info: "bg-info/10 text-info"
|
|
44992
45047
|
};
|
|
44993
45048
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
44994
|
-
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(
|
|
45049
|
+
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(React112__default.Fragment, { children: [
|
|
44995
45050
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
44996
45051
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
44997
45052
|
"a",
|
|
@@ -45349,7 +45404,7 @@ var init_Section = __esm({
|
|
|
45349
45404
|
as: Component = "section"
|
|
45350
45405
|
}) => {
|
|
45351
45406
|
const hasHeader = title || description || action;
|
|
45352
|
-
return
|
|
45407
|
+
return React112__default.createElement(
|
|
45353
45408
|
Component,
|
|
45354
45409
|
{
|
|
45355
45410
|
className: cn(
|
|
@@ -45651,6 +45706,7 @@ var init_WizardContainer = __esm({
|
|
|
45651
45706
|
init_Stack();
|
|
45652
45707
|
init_Icon();
|
|
45653
45708
|
init_cn();
|
|
45709
|
+
init_useEventBus();
|
|
45654
45710
|
WizardContainer = ({
|
|
45655
45711
|
steps,
|
|
45656
45712
|
currentStep: controlledStep,
|
|
@@ -45659,9 +45715,13 @@ var init_WizardContainer = __esm({
|
|
|
45659
45715
|
showProgress = true,
|
|
45660
45716
|
allowBack = true,
|
|
45661
45717
|
compact = false,
|
|
45662
|
-
className
|
|
45718
|
+
className,
|
|
45719
|
+
nextEvent,
|
|
45720
|
+
backEvent,
|
|
45721
|
+
completeEvent
|
|
45663
45722
|
}) => {
|
|
45664
45723
|
const { t } = useTranslate();
|
|
45724
|
+
const eventBus = useEventBus();
|
|
45665
45725
|
const [internalStep, setInternalStep] = useState(0);
|
|
45666
45726
|
const normalizedControlledStep = (() => {
|
|
45667
45727
|
if (controlledStep === void 0 || controlledStep === null)
|
|
@@ -45691,13 +45751,16 @@ var init_WizardContainer = __esm({
|
|
|
45691
45751
|
return;
|
|
45692
45752
|
}
|
|
45693
45753
|
if (isLastStep) {
|
|
45754
|
+
if (completeEvent) eventBus.emit(`UI:${completeEvent}`, { step: currentStep });
|
|
45694
45755
|
onComplete?.();
|
|
45695
45756
|
} else {
|
|
45757
|
+
if (nextEvent) eventBus.emit(`UI:${nextEvent}`, { step: currentStep + 1 });
|
|
45696
45758
|
goToStep(currentStep + 1);
|
|
45697
45759
|
}
|
|
45698
45760
|
};
|
|
45699
45761
|
const handleBack = () => {
|
|
45700
45762
|
if (!isFirstStep && allowBack) {
|
|
45763
|
+
if (backEvent) eventBus.emit(`UI:${backEvent}`, { step: currentStep - 1 });
|
|
45701
45764
|
goToStep(currentStep - 1);
|
|
45702
45765
|
}
|
|
45703
45766
|
};
|
|
@@ -45715,7 +45778,7 @@ var init_WizardContainer = __esm({
|
|
|
45715
45778
|
const isCompleted = index < currentStep;
|
|
45716
45779
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
45717
45780
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
45718
|
-
return /* @__PURE__ */ jsxs(
|
|
45781
|
+
return /* @__PURE__ */ jsxs(React112__default.Fragment, { children: [
|
|
45719
45782
|
/* @__PURE__ */ jsx(
|
|
45720
45783
|
Button,
|
|
45721
45784
|
{
|
|
@@ -48148,7 +48211,7 @@ var init_DetailPanel = __esm({
|
|
|
48148
48211
|
}
|
|
48149
48212
|
});
|
|
48150
48213
|
function extractTitle(children) {
|
|
48151
|
-
if (!
|
|
48214
|
+
if (!React112__default.isValidElement(children)) return void 0;
|
|
48152
48215
|
const props = children.props;
|
|
48153
48216
|
if (typeof props.title === "string") {
|
|
48154
48217
|
return props.title;
|
|
@@ -48166,14 +48229,18 @@ var init_DrawerSlot = __esm({
|
|
|
48166
48229
|
title: overrideTitle,
|
|
48167
48230
|
position = "right",
|
|
48168
48231
|
size = "md",
|
|
48169
|
-
className
|
|
48232
|
+
className,
|
|
48233
|
+
sourceTrait
|
|
48170
48234
|
}) => {
|
|
48171
48235
|
const eventBus = useEventBus();
|
|
48236
|
+
const schemaCtx = useEntitySchemaOptional();
|
|
48172
48237
|
const isOpen = Boolean(children);
|
|
48173
48238
|
const title = overrideTitle || extractTitle(children);
|
|
48174
48239
|
const handleClose = () => {
|
|
48175
|
-
|
|
48176
|
-
|
|
48240
|
+
const orbital = sourceTrait !== void 0 && schemaCtx !== null ? schemaCtx.orbitalsByTrait.get(sourceTrait) : void 0;
|
|
48241
|
+
const prefix = orbital !== void 0 && sourceTrait !== void 0 ? `UI:${orbital}.${sourceTrait}.` : "UI:";
|
|
48242
|
+
eventBus.emit(`${prefix}CLOSE`);
|
|
48243
|
+
eventBus.emit(`${prefix}CANCEL`);
|
|
48177
48244
|
};
|
|
48178
48245
|
if (!isOpen) return null;
|
|
48179
48246
|
return /* @__PURE__ */ jsx(
|
|
@@ -48494,12 +48561,12 @@ var init_Form = __esm({
|
|
|
48494
48561
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
48495
48562
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
48496
48563
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
48497
|
-
const normalizedInitialData =
|
|
48564
|
+
const normalizedInitialData = React112__default.useMemo(() => {
|
|
48498
48565
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
48499
48566
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
48500
48567
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
48501
48568
|
}, [entity, initialData]);
|
|
48502
|
-
const entityDerivedFields =
|
|
48569
|
+
const entityDerivedFields = React112__default.useMemo(() => {
|
|
48503
48570
|
if (fields && fields.length > 0) return void 0;
|
|
48504
48571
|
if (!resolvedEntity) return void 0;
|
|
48505
48572
|
return resolvedEntity.fields.map(
|
|
@@ -48520,16 +48587,16 @@ var init_Form = __esm({
|
|
|
48520
48587
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
48521
48588
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
48522
48589
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
48523
|
-
const [formData, setFormData] =
|
|
48590
|
+
const [formData, setFormData] = React112__default.useState(
|
|
48524
48591
|
normalizedInitialData
|
|
48525
48592
|
);
|
|
48526
|
-
const [collapsedSections, setCollapsedSections] =
|
|
48593
|
+
const [collapsedSections, setCollapsedSections] = React112__default.useState(
|
|
48527
48594
|
/* @__PURE__ */ new Set()
|
|
48528
48595
|
);
|
|
48529
|
-
const [submitError, setSubmitError] =
|
|
48530
|
-
const formRef =
|
|
48596
|
+
const [submitError, setSubmitError] = React112__default.useState(null);
|
|
48597
|
+
const formRef = React112__default.useRef(null);
|
|
48531
48598
|
const formMode = props.mode;
|
|
48532
|
-
const mountedRef =
|
|
48599
|
+
const mountedRef = React112__default.useRef(false);
|
|
48533
48600
|
if (!mountedRef.current) {
|
|
48534
48601
|
mountedRef.current = true;
|
|
48535
48602
|
debug("forms", "mount", {
|
|
@@ -48542,7 +48609,7 @@ var init_Form = __esm({
|
|
|
48542
48609
|
});
|
|
48543
48610
|
}
|
|
48544
48611
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
48545
|
-
const evalContext =
|
|
48612
|
+
const evalContext = React112__default.useMemo(
|
|
48546
48613
|
() => ({
|
|
48547
48614
|
formValues: formData,
|
|
48548
48615
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -48551,7 +48618,7 @@ var init_Form = __esm({
|
|
|
48551
48618
|
}),
|
|
48552
48619
|
[formData, externalContext]
|
|
48553
48620
|
);
|
|
48554
|
-
|
|
48621
|
+
React112__default.useEffect(() => {
|
|
48555
48622
|
debug("forms", "initialData-sync", {
|
|
48556
48623
|
mode: formMode,
|
|
48557
48624
|
normalizedInitialData,
|
|
@@ -48562,7 +48629,7 @@ var init_Form = __esm({
|
|
|
48562
48629
|
setFormData(normalizedInitialData);
|
|
48563
48630
|
}
|
|
48564
48631
|
}, [normalizedInitialData]);
|
|
48565
|
-
const processCalculations =
|
|
48632
|
+
const processCalculations = React112__default.useCallback(
|
|
48566
48633
|
(changedFieldId, newFormData) => {
|
|
48567
48634
|
if (!hiddenCalculations.length) return;
|
|
48568
48635
|
const context = {
|
|
@@ -48587,7 +48654,7 @@ var init_Form = __esm({
|
|
|
48587
48654
|
},
|
|
48588
48655
|
[hiddenCalculations, externalContext, eventBus]
|
|
48589
48656
|
);
|
|
48590
|
-
const checkViolations =
|
|
48657
|
+
const checkViolations = React112__default.useCallback(
|
|
48591
48658
|
(changedFieldId, newFormData) => {
|
|
48592
48659
|
if (!violationTriggers.length) return;
|
|
48593
48660
|
const context = {
|
|
@@ -48625,7 +48692,7 @@ var init_Form = __esm({
|
|
|
48625
48692
|
processCalculations(name, newFormData);
|
|
48626
48693
|
checkViolations(name, newFormData);
|
|
48627
48694
|
};
|
|
48628
|
-
const isFieldVisible =
|
|
48695
|
+
const isFieldVisible = React112__default.useCallback(
|
|
48629
48696
|
(fieldName) => {
|
|
48630
48697
|
const condition = conditionalFields[fieldName];
|
|
48631
48698
|
if (!condition) return true;
|
|
@@ -48633,7 +48700,7 @@ var init_Form = __esm({
|
|
|
48633
48700
|
},
|
|
48634
48701
|
[conditionalFields, evalContext]
|
|
48635
48702
|
);
|
|
48636
|
-
const isSectionVisible =
|
|
48703
|
+
const isSectionVisible = React112__default.useCallback(
|
|
48637
48704
|
(section) => {
|
|
48638
48705
|
if (!section.condition) return true;
|
|
48639
48706
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -48709,7 +48776,7 @@ var init_Form = __esm({
|
|
|
48709
48776
|
eventBus.emit(`UI:${onCancel}`);
|
|
48710
48777
|
}
|
|
48711
48778
|
};
|
|
48712
|
-
const renderField =
|
|
48779
|
+
const renderField = React112__default.useCallback(
|
|
48713
48780
|
(field) => {
|
|
48714
48781
|
const fieldName = field.name || field.field;
|
|
48715
48782
|
if (!fieldName) return null;
|
|
@@ -48730,7 +48797,7 @@ var init_Form = __esm({
|
|
|
48730
48797
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
48731
48798
|
);
|
|
48732
48799
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
48733
|
-
const normalizedFields =
|
|
48800
|
+
const normalizedFields = React112__default.useMemo(() => {
|
|
48734
48801
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
48735
48802
|
return effectiveFields.map((field) => {
|
|
48736
48803
|
if (typeof field === "string") {
|
|
@@ -48754,7 +48821,7 @@ var init_Form = __esm({
|
|
|
48754
48821
|
return field;
|
|
48755
48822
|
});
|
|
48756
48823
|
}, [effectiveFields, resolvedEntity]);
|
|
48757
|
-
const schemaFields =
|
|
48824
|
+
const schemaFields = React112__default.useMemo(() => {
|
|
48758
48825
|
if (normalizedFields.length === 0) return null;
|
|
48759
48826
|
if (isDebugEnabled()) {
|
|
48760
48827
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -48764,7 +48831,7 @@ var init_Form = __esm({
|
|
|
48764
48831
|
}
|
|
48765
48832
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
48766
48833
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
48767
|
-
const sectionElements =
|
|
48834
|
+
const sectionElements = React112__default.useMemo(() => {
|
|
48768
48835
|
if (!sections || sections.length === 0) return null;
|
|
48769
48836
|
return sections.map((section) => {
|
|
48770
48837
|
if (!isSectionVisible(section)) {
|
|
@@ -49489,7 +49556,7 @@ var init_List = __esm({
|
|
|
49489
49556
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
49490
49557
|
return [];
|
|
49491
49558
|
}, [entity]);
|
|
49492
|
-
const getItemActions =
|
|
49559
|
+
const getItemActions = React112__default.useCallback(
|
|
49493
49560
|
(item) => {
|
|
49494
49561
|
if (!itemActions) return [];
|
|
49495
49562
|
if (typeof itemActions === "function") {
|
|
@@ -49964,7 +50031,7 @@ var init_MediaGallery = __esm({
|
|
|
49964
50031
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
49965
50032
|
);
|
|
49966
50033
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
49967
|
-
const items =
|
|
50034
|
+
const items = React112__default.useMemo(() => {
|
|
49968
50035
|
if (propItems) return propItems;
|
|
49969
50036
|
if (entityData.length === 0) return [];
|
|
49970
50037
|
return entityData.map((record, idx) => {
|
|
@@ -50127,7 +50194,7 @@ var init_MediaGallery = __esm({
|
|
|
50127
50194
|
}
|
|
50128
50195
|
});
|
|
50129
50196
|
function extractTitle2(children) {
|
|
50130
|
-
if (!
|
|
50197
|
+
if (!React112__default.isValidElement(children)) return void 0;
|
|
50131
50198
|
const props = children.props;
|
|
50132
50199
|
if (typeof props.title === "string") {
|
|
50133
50200
|
return props.title;
|
|
@@ -50144,14 +50211,18 @@ var init_ModalSlot = __esm({
|
|
|
50144
50211
|
children,
|
|
50145
50212
|
title: overrideTitle,
|
|
50146
50213
|
size = "md",
|
|
50147
|
-
className
|
|
50214
|
+
className,
|
|
50215
|
+
sourceTrait
|
|
50148
50216
|
}) => {
|
|
50149
50217
|
const eventBus = useEventBus();
|
|
50218
|
+
const schemaCtx = useEntitySchemaOptional();
|
|
50150
50219
|
const isOpen = Boolean(children);
|
|
50151
50220
|
const title = overrideTitle || extractTitle2(children);
|
|
50152
50221
|
const handleClose = () => {
|
|
50153
|
-
|
|
50154
|
-
|
|
50222
|
+
const orbital = sourceTrait !== void 0 && schemaCtx !== null ? schemaCtx.orbitalsByTrait.get(sourceTrait) : void 0;
|
|
50223
|
+
const prefix = orbital !== void 0 && sourceTrait !== void 0 ? `UI:${orbital}.${sourceTrait}.` : "UI:";
|
|
50224
|
+
eventBus.emit(`${prefix}CLOSE`);
|
|
50225
|
+
eventBus.emit(`${prefix}CANCEL`);
|
|
50155
50226
|
};
|
|
50156
50227
|
if (!isOpen) return null;
|
|
50157
50228
|
return /* @__PURE__ */ jsx(
|
|
@@ -50397,7 +50468,7 @@ var init_debugRegistry = __esm({
|
|
|
50397
50468
|
}
|
|
50398
50469
|
});
|
|
50399
50470
|
function useDebugData() {
|
|
50400
|
-
const [data, setData] =
|
|
50471
|
+
const [data, setData] = React112.useState(() => ({
|
|
50401
50472
|
traits: [],
|
|
50402
50473
|
ticks: [],
|
|
50403
50474
|
guards: [],
|
|
@@ -50411,7 +50482,7 @@ function useDebugData() {
|
|
|
50411
50482
|
},
|
|
50412
50483
|
lastUpdate: Date.now()
|
|
50413
50484
|
}));
|
|
50414
|
-
|
|
50485
|
+
React112.useEffect(() => {
|
|
50415
50486
|
const updateData = () => {
|
|
50416
50487
|
setData({
|
|
50417
50488
|
traits: getAllTraits(),
|
|
@@ -50520,12 +50591,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
50520
50591
|
return positions;
|
|
50521
50592
|
}
|
|
50522
50593
|
function WalkMinimap() {
|
|
50523
|
-
const [walkStep, setWalkStep] =
|
|
50524
|
-
const [traits2, setTraits] =
|
|
50525
|
-
const [coveredEdges, setCoveredEdges] =
|
|
50526
|
-
const [completedTraits, setCompletedTraits] =
|
|
50527
|
-
const prevTraitRef =
|
|
50528
|
-
|
|
50594
|
+
const [walkStep, setWalkStep] = React112.useState(null);
|
|
50595
|
+
const [traits2, setTraits] = React112.useState([]);
|
|
50596
|
+
const [coveredEdges, setCoveredEdges] = React112.useState([]);
|
|
50597
|
+
const [completedTraits, setCompletedTraits] = React112.useState(/* @__PURE__ */ new Set());
|
|
50598
|
+
const prevTraitRef = React112.useRef(null);
|
|
50599
|
+
React112.useEffect(() => {
|
|
50529
50600
|
const interval = setInterval(() => {
|
|
50530
50601
|
const w = window;
|
|
50531
50602
|
const step = w.__orbitalWalkStep;
|
|
@@ -50961,15 +51032,15 @@ var init_EntitiesTab = __esm({
|
|
|
50961
51032
|
});
|
|
50962
51033
|
function EventFlowTab({ events: events2 }) {
|
|
50963
51034
|
const { t } = useTranslate();
|
|
50964
|
-
const [filter, setFilter] =
|
|
50965
|
-
const containerRef =
|
|
50966
|
-
const [autoScroll, setAutoScroll] =
|
|
50967
|
-
|
|
51035
|
+
const [filter, setFilter] = React112.useState("all");
|
|
51036
|
+
const containerRef = React112.useRef(null);
|
|
51037
|
+
const [autoScroll, setAutoScroll] = React112.useState(true);
|
|
51038
|
+
React112.useEffect(() => {
|
|
50968
51039
|
if (autoScroll && containerRef.current) {
|
|
50969
51040
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
50970
51041
|
}
|
|
50971
51042
|
}, [events2.length, autoScroll]);
|
|
50972
|
-
const filteredEvents =
|
|
51043
|
+
const filteredEvents = React112.useMemo(() => {
|
|
50973
51044
|
if (filter === "all") return events2;
|
|
50974
51045
|
return events2.filter((e) => e.type === filter);
|
|
50975
51046
|
}, [events2, filter]);
|
|
@@ -51085,7 +51156,7 @@ var init_EventFlowTab = __esm({
|
|
|
51085
51156
|
});
|
|
51086
51157
|
function GuardsPanel({ guards }) {
|
|
51087
51158
|
const { t } = useTranslate();
|
|
51088
|
-
const [filter, setFilter] =
|
|
51159
|
+
const [filter, setFilter] = React112.useState("all");
|
|
51089
51160
|
if (guards.length === 0) {
|
|
51090
51161
|
return /* @__PURE__ */ jsx(
|
|
51091
51162
|
EmptyState,
|
|
@@ -51098,7 +51169,7 @@ function GuardsPanel({ guards }) {
|
|
|
51098
51169
|
}
|
|
51099
51170
|
const passedCount = guards.filter((g) => g.result).length;
|
|
51100
51171
|
const failedCount = guards.length - passedCount;
|
|
51101
|
-
const filteredGuards =
|
|
51172
|
+
const filteredGuards = React112.useMemo(() => {
|
|
51102
51173
|
if (filter === "all") return guards;
|
|
51103
51174
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
51104
51175
|
return guards.filter((g) => !g.result);
|
|
@@ -51261,10 +51332,10 @@ function EffectBadge({ effect }) {
|
|
|
51261
51332
|
}
|
|
51262
51333
|
function TransitionTimeline({ transitions }) {
|
|
51263
51334
|
const { t } = useTranslate();
|
|
51264
|
-
const containerRef =
|
|
51265
|
-
const [autoScroll, setAutoScroll] =
|
|
51266
|
-
const [expandedId, setExpandedId] =
|
|
51267
|
-
|
|
51335
|
+
const containerRef = React112.useRef(null);
|
|
51336
|
+
const [autoScroll, setAutoScroll] = React112.useState(true);
|
|
51337
|
+
const [expandedId, setExpandedId] = React112.useState(null);
|
|
51338
|
+
React112.useEffect(() => {
|
|
51268
51339
|
if (autoScroll && containerRef.current) {
|
|
51269
51340
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
51270
51341
|
}
|
|
@@ -51544,9 +51615,9 @@ function getAllEvents(traits2) {
|
|
|
51544
51615
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
51545
51616
|
const eventBus = useEventBus();
|
|
51546
51617
|
const { t } = useTranslate();
|
|
51547
|
-
const [log11, setLog] =
|
|
51548
|
-
const prevStatesRef =
|
|
51549
|
-
|
|
51618
|
+
const [log11, setLog] = React112.useState([]);
|
|
51619
|
+
const prevStatesRef = React112.useRef(/* @__PURE__ */ new Map());
|
|
51620
|
+
React112.useEffect(() => {
|
|
51550
51621
|
for (const trait of traits2) {
|
|
51551
51622
|
const prev = prevStatesRef.current.get(trait.id);
|
|
51552
51623
|
if (prev && prev !== trait.currentState) {
|
|
@@ -51715,10 +51786,10 @@ function VerifyModePanel({
|
|
|
51715
51786
|
localCount
|
|
51716
51787
|
}) {
|
|
51717
51788
|
const { t } = useTranslate();
|
|
51718
|
-
const [expanded, setExpanded] =
|
|
51719
|
-
const scrollRef =
|
|
51720
|
-
const prevCountRef =
|
|
51721
|
-
|
|
51789
|
+
const [expanded, setExpanded] = React112.useState(true);
|
|
51790
|
+
const scrollRef = React112.useRef(null);
|
|
51791
|
+
const prevCountRef = React112.useRef(0);
|
|
51792
|
+
React112.useEffect(() => {
|
|
51722
51793
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
51723
51794
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
51724
51795
|
}
|
|
@@ -51775,10 +51846,10 @@ function RuntimeDebugger({
|
|
|
51775
51846
|
schema
|
|
51776
51847
|
}) {
|
|
51777
51848
|
const { t } = useTranslate();
|
|
51778
|
-
const [isCollapsed, setIsCollapsed] =
|
|
51779
|
-
const [isVisible, setIsVisible] =
|
|
51849
|
+
const [isCollapsed, setIsCollapsed] = React112.useState(mode === "verify" ? true : defaultCollapsed);
|
|
51850
|
+
const [isVisible, setIsVisible] = React112.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
51780
51851
|
const debugData = useDebugData();
|
|
51781
|
-
|
|
51852
|
+
React112.useEffect(() => {
|
|
51782
51853
|
if (mode === "inline") return;
|
|
51783
51854
|
return onDebugToggle((enabled) => {
|
|
51784
51855
|
setIsVisible(enabled);
|
|
@@ -51787,7 +51858,7 @@ function RuntimeDebugger({
|
|
|
51787
51858
|
}
|
|
51788
51859
|
});
|
|
51789
51860
|
}, [mode]);
|
|
51790
|
-
|
|
51861
|
+
React112.useEffect(() => {
|
|
51791
51862
|
if (mode === "inline") return;
|
|
51792
51863
|
const handleKeyDown = (e) => {
|
|
51793
51864
|
if (e.key === "`" && isVisible) {
|
|
@@ -52307,7 +52378,7 @@ var init_StatCard = __esm({
|
|
|
52307
52378
|
const labelToUse = propLabel ?? propTitle;
|
|
52308
52379
|
const eventBus = useEventBus();
|
|
52309
52380
|
const { t } = useTranslate();
|
|
52310
|
-
const handleActionClick =
|
|
52381
|
+
const handleActionClick = React112__default.useCallback(() => {
|
|
52311
52382
|
if (action?.event) {
|
|
52312
52383
|
eventBus.emit(`UI:${action.event}`, {});
|
|
52313
52384
|
}
|
|
@@ -52318,7 +52389,7 @@ var init_StatCard = __esm({
|
|
|
52318
52389
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
52319
52390
|
const isLoading = externalLoading ?? false;
|
|
52320
52391
|
const error = externalError;
|
|
52321
|
-
const computeMetricValue =
|
|
52392
|
+
const computeMetricValue = React112__default.useCallback(
|
|
52322
52393
|
(metric, items) => {
|
|
52323
52394
|
if (metric.value !== void 0) {
|
|
52324
52395
|
return metric.value;
|
|
@@ -52357,7 +52428,7 @@ var init_StatCard = __esm({
|
|
|
52357
52428
|
},
|
|
52358
52429
|
[]
|
|
52359
52430
|
);
|
|
52360
|
-
const schemaStats =
|
|
52431
|
+
const schemaStats = React112__default.useMemo(() => {
|
|
52361
52432
|
if (!metrics || metrics.length === 0) return null;
|
|
52362
52433
|
return metrics.map((metric) => ({
|
|
52363
52434
|
label: metric.label,
|
|
@@ -52365,7 +52436,7 @@ var init_StatCard = __esm({
|
|
|
52365
52436
|
format: metric.format
|
|
52366
52437
|
}));
|
|
52367
52438
|
}, [metrics, data, computeMetricValue]);
|
|
52368
|
-
const calculatedTrend =
|
|
52439
|
+
const calculatedTrend = React112__default.useMemo(() => {
|
|
52369
52440
|
if (manualTrend !== void 0) return manualTrend;
|
|
52370
52441
|
if (previousValue === void 0 || currentValue === void 0)
|
|
52371
52442
|
return void 0;
|
|
@@ -53005,8 +53076,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
53005
53076
|
] });
|
|
53006
53077
|
};
|
|
53007
53078
|
InlineActivityStream = ({ activities, autoScroll = true, className }) => {
|
|
53008
|
-
const endRef =
|
|
53009
|
-
|
|
53079
|
+
const endRef = React112__default.useRef(null);
|
|
53080
|
+
React112__default.useEffect(() => {
|
|
53010
53081
|
if (!autoScroll) return;
|
|
53011
53082
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
53012
53083
|
}, [activities.length, autoScroll]);
|
|
@@ -53100,7 +53171,7 @@ var init_SubagentTracePanel = __esm({
|
|
|
53100
53171
|
};
|
|
53101
53172
|
SubagentRichCard = ({ subagent }) => {
|
|
53102
53173
|
const { t } = useTranslate();
|
|
53103
|
-
const activities =
|
|
53174
|
+
const activities = React112__default.useMemo(
|
|
53104
53175
|
() => subagentMessagesToActivities(subagent.messages),
|
|
53105
53176
|
[subagent.messages]
|
|
53106
53177
|
);
|
|
@@ -53177,8 +53248,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
53177
53248
|
] });
|
|
53178
53249
|
};
|
|
53179
53250
|
CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
|
|
53180
|
-
const endRef =
|
|
53181
|
-
|
|
53251
|
+
const endRef = React112__default.useRef(null);
|
|
53252
|
+
React112__default.useEffect(() => {
|
|
53182
53253
|
if (!autoScroll) return;
|
|
53183
53254
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
53184
53255
|
}, [messages.length, autoScroll]);
|
|
@@ -53608,7 +53679,7 @@ var init_Timeline = __esm({
|
|
|
53608
53679
|
}) => {
|
|
53609
53680
|
const { t } = useTranslate();
|
|
53610
53681
|
const entityData = entity ?? [];
|
|
53611
|
-
const items =
|
|
53682
|
+
const items = React112__default.useMemo(() => {
|
|
53612
53683
|
if (propItems) return propItems;
|
|
53613
53684
|
if (entityData.length === 0) return [];
|
|
53614
53685
|
return entityData.map((record, idx) => {
|
|
@@ -53710,7 +53781,7 @@ var init_Timeline = __esm({
|
|
|
53710
53781
|
}
|
|
53711
53782
|
});
|
|
53712
53783
|
function extractToastProps(children) {
|
|
53713
|
-
if (!
|
|
53784
|
+
if (!React112__default.isValidElement(children)) {
|
|
53714
53785
|
if (typeof children === "string") {
|
|
53715
53786
|
return { message: children };
|
|
53716
53787
|
}
|
|
@@ -53735,20 +53806,24 @@ var init_ToastSlot = __esm({
|
|
|
53735
53806
|
variant: overrideVariant,
|
|
53736
53807
|
title: overrideTitle,
|
|
53737
53808
|
duration = 5e3,
|
|
53738
|
-
className
|
|
53809
|
+
className,
|
|
53810
|
+
sourceTrait
|
|
53739
53811
|
}) => {
|
|
53740
53812
|
const eventBus = useEventBus();
|
|
53813
|
+
const schemaCtx = useEntitySchemaOptional();
|
|
53741
53814
|
const isVisible = Boolean(children);
|
|
53742
53815
|
const extracted = extractToastProps(children);
|
|
53743
53816
|
const variant = overrideVariant || extracted.variant || "info";
|
|
53744
53817
|
const title = overrideTitle || extracted.title;
|
|
53745
53818
|
const message = extracted.message || (typeof children === "string" ? children : "");
|
|
53746
53819
|
const handleDismiss = () => {
|
|
53747
|
-
|
|
53748
|
-
|
|
53820
|
+
const orbital = sourceTrait !== void 0 && schemaCtx !== null ? schemaCtx.orbitalsByTrait.get(sourceTrait) : void 0;
|
|
53821
|
+
const prefix = orbital !== void 0 && sourceTrait !== void 0 ? `UI:${orbital}.${sourceTrait}.` : "UI:";
|
|
53822
|
+
eventBus.emit(`${prefix}DISMISS`);
|
|
53823
|
+
eventBus.emit(`${prefix}CLOSE`);
|
|
53749
53824
|
};
|
|
53750
53825
|
if (!isVisible) return null;
|
|
53751
|
-
const isCustomContent =
|
|
53826
|
+
const isCustomContent = React112__default.isValidElement(children) && !message;
|
|
53752
53827
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
53753
53828
|
Toast,
|
|
53754
53829
|
{
|
|
@@ -53765,7 +53840,7 @@ var init_ToastSlot = __esm({
|
|
|
53765
53840
|
}
|
|
53766
53841
|
});
|
|
53767
53842
|
function lazyThree(name, loader) {
|
|
53768
|
-
const Lazy =
|
|
53843
|
+
const Lazy = React112__default.lazy(
|
|
53769
53844
|
() => loader().then((m) => {
|
|
53770
53845
|
const Resolved = m[name];
|
|
53771
53846
|
if (!Resolved) {
|
|
@@ -53777,13 +53852,13 @@ function lazyThree(name, loader) {
|
|
|
53777
53852
|
})
|
|
53778
53853
|
);
|
|
53779
53854
|
function ThreeWrapper(props) {
|
|
53780
|
-
return
|
|
53855
|
+
return React112__default.createElement(
|
|
53781
53856
|
ThreeBoundary,
|
|
53782
53857
|
{ name },
|
|
53783
|
-
|
|
53784
|
-
|
|
53858
|
+
React112__default.createElement(
|
|
53859
|
+
React112__default.Suspense,
|
|
53785
53860
|
{ fallback: null },
|
|
53786
|
-
|
|
53861
|
+
React112__default.createElement(Lazy, props)
|
|
53787
53862
|
)
|
|
53788
53863
|
);
|
|
53789
53864
|
}
|
|
@@ -54095,7 +54170,7 @@ var init_component_registry_generated = __esm({
|
|
|
54095
54170
|
init_WizardProgress();
|
|
54096
54171
|
init_WorldMapBoard();
|
|
54097
54172
|
init_WorldMapTemplate();
|
|
54098
|
-
ThreeBoundary = class extends
|
|
54173
|
+
ThreeBoundary = class extends React112__default.Component {
|
|
54099
54174
|
constructor() {
|
|
54100
54175
|
super(...arguments);
|
|
54101
54176
|
__publicField(this, "state", { failed: false });
|
|
@@ -54105,7 +54180,7 @@ var init_component_registry_generated = __esm({
|
|
|
54105
54180
|
}
|
|
54106
54181
|
render() {
|
|
54107
54182
|
if (this.state.failed) {
|
|
54108
|
-
return
|
|
54183
|
+
return React112__default.createElement(
|
|
54109
54184
|
"div",
|
|
54110
54185
|
{
|
|
54111
54186
|
"data-testid": "three-unavailable",
|
|
@@ -54461,7 +54536,7 @@ function SuspenseConfigProvider({
|
|
|
54461
54536
|
config,
|
|
54462
54537
|
children
|
|
54463
54538
|
}) {
|
|
54464
|
-
return
|
|
54539
|
+
return React112__default.createElement(
|
|
54465
54540
|
SuspenseConfigContext.Provider,
|
|
54466
54541
|
{ value: config },
|
|
54467
54542
|
children
|
|
@@ -54472,8 +54547,8 @@ function getSlotFallback(slot, config) {
|
|
|
54472
54547
|
const variant = SLOT_SKELETON_MAP[slot] ?? "text";
|
|
54473
54548
|
return /* @__PURE__ */ jsx(Skeleton, { variant });
|
|
54474
54549
|
}
|
|
54475
|
-
function
|
|
54476
|
-
const mapping = getComponentForPattern(patternType);
|
|
54550
|
+
function getComponentForPattern(patternType) {
|
|
54551
|
+
const mapping = getComponentForPattern$1(patternType);
|
|
54477
54552
|
if (!mapping) {
|
|
54478
54553
|
return null;
|
|
54479
54554
|
}
|
|
@@ -54503,7 +54578,7 @@ function enrichFormFields(fields, entityDef) {
|
|
|
54503
54578
|
}
|
|
54504
54579
|
return { name: field, label: field.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (c) => c.toUpperCase()) };
|
|
54505
54580
|
}
|
|
54506
|
-
if (field && typeof field === "object" && !Array.isArray(field) && !
|
|
54581
|
+
if (field && typeof field === "object" && !Array.isArray(field) && !React112__default.isValidElement(field) && !(field instanceof Date)) {
|
|
54507
54582
|
const obj = field;
|
|
54508
54583
|
const fieldName = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
|
|
54509
54584
|
if (!fieldName) return field;
|
|
@@ -54681,6 +54756,7 @@ function UISlotComponent({
|
|
|
54681
54756
|
const { t } = useTranslate();
|
|
54682
54757
|
const suspenseConfig = useContext(SuspenseConfigContext);
|
|
54683
54758
|
const contained = useContext(SlotContainedContext);
|
|
54759
|
+
const schemaCtx = useEntitySchemaOptional();
|
|
54684
54760
|
const content = slots[slot];
|
|
54685
54761
|
if (children !== void 0) {
|
|
54686
54762
|
if (pattern === "clear") {
|
|
@@ -54726,8 +54802,11 @@ function UISlotComponent({
|
|
|
54726
54802
|
}
|
|
54727
54803
|
const handleDismiss = () => {
|
|
54728
54804
|
if (slot === "modal" || slot === "drawer") {
|
|
54729
|
-
|
|
54730
|
-
|
|
54805
|
+
const trait = content?.sourceTrait;
|
|
54806
|
+
const orbital = trait !== void 0 && schemaCtx !== null ? schemaCtx.orbitalsByTrait.get(trait) : void 0;
|
|
54807
|
+
const prefix = orbital !== void 0 && trait !== void 0 ? `UI:${orbital}.${trait}.` : "UI:";
|
|
54808
|
+
eventBus.emit(`${prefix}CLOSE`);
|
|
54809
|
+
eventBus.emit(`${prefix}CANCEL`);
|
|
54731
54810
|
}
|
|
54732
54811
|
clear(slot);
|
|
54733
54812
|
};
|
|
@@ -54781,6 +54860,7 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
54781
54860
|
const slotsBus = useUISlots();
|
|
54782
54861
|
const eventBus = useEventBus();
|
|
54783
54862
|
const { t } = useTranslate();
|
|
54863
|
+
const compiledPortalSchemaCtx = useEntitySchemaOptional();
|
|
54784
54864
|
useEffect(() => {
|
|
54785
54865
|
setPortalRoot(getOrCreatePortalRoot());
|
|
54786
54866
|
}, []);
|
|
@@ -54789,8 +54869,10 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
54789
54869
|
});
|
|
54790
54870
|
const handleDismiss = () => {
|
|
54791
54871
|
if (slot === "modal" || slot === "drawer") {
|
|
54792
|
-
|
|
54793
|
-
|
|
54872
|
+
const orbital = sourceTrait !== void 0 && compiledPortalSchemaCtx !== null ? compiledPortalSchemaCtx.orbitalsByTrait.get(sourceTrait) : void 0;
|
|
54873
|
+
const prefix = orbital !== void 0 && sourceTrait !== void 0 ? `UI:${orbital}.${sourceTrait}.` : "UI:";
|
|
54874
|
+
eventBus.emit(`${prefix}CLOSE`);
|
|
54875
|
+
eventBus.emit(`${prefix}CANCEL`);
|
|
54794
54876
|
}
|
|
54795
54877
|
slotsBus.clear(slot);
|
|
54796
54878
|
};
|
|
@@ -54949,7 +55031,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
54949
55031
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
54950
55032
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
54951
55033
|
}
|
|
54952
|
-
return /* @__PURE__ */ jsx(
|
|
55034
|
+
return /* @__PURE__ */ jsx(React112__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
54953
55035
|
}
|
|
54954
55036
|
if (!child || typeof child !== "object") return null;
|
|
54955
55037
|
const childId = `${parentId}-${index}`;
|
|
@@ -54989,14 +55071,14 @@ function isPatternConfig(value) {
|
|
|
54989
55071
|
if (value === null || value === void 0) return false;
|
|
54990
55072
|
if (typeof value !== "object") return false;
|
|
54991
55073
|
if (Array.isArray(value)) return false;
|
|
54992
|
-
if (
|
|
55074
|
+
if (React112__default.isValidElement(value)) return false;
|
|
54993
55075
|
if (value instanceof Date) return false;
|
|
54994
55076
|
if (typeof value === "function") return false;
|
|
54995
55077
|
const record = value;
|
|
54996
|
-
return "type" in record && typeof record.type === "string" && getComponentForPattern(record.type) !== null;
|
|
55078
|
+
return "type" in record && typeof record.type === "string" && getComponentForPattern$1(record.type) !== null;
|
|
54997
55079
|
}
|
|
54998
55080
|
function isPlainConfigObject(value) {
|
|
54999
|
-
if (
|
|
55081
|
+
if (React112__default.isValidElement(value)) return false;
|
|
55000
55082
|
if (value instanceof Date) return false;
|
|
55001
55083
|
const proto = Object.getPrototypeOf(value);
|
|
55002
55084
|
return proto === Object.prototype || proto === null;
|
|
@@ -55102,7 +55184,7 @@ function SlotContentRenderer({
|
|
|
55102
55184
|
}
|
|
55103
55185
|
}
|
|
55104
55186
|
const orbitalName = schemaCtx && content.sourceTrait !== void 0 ? schemaCtx.orbitalsByTrait.get(content.sourceTrait) : void 0;
|
|
55105
|
-
const PatternComponent =
|
|
55187
|
+
const PatternComponent = getComponentForPattern(content.pattern);
|
|
55106
55188
|
if (PatternComponent) {
|
|
55107
55189
|
const childrenConfig = content.props.children;
|
|
55108
55190
|
const isSingleChild = typeof childrenConfig === "string" || typeof childrenConfig === "object" && childrenConfig !== null && !Array.isArray(childrenConfig) && "type" in childrenConfig;
|
|
@@ -55122,7 +55204,7 @@ function SlotContentRenderer({
|
|
|
55122
55204
|
for (const slotKey of CONTENT_NODE_SLOTS) {
|
|
55123
55205
|
const slotVal = restProps[slotKey];
|
|
55124
55206
|
if (slotVal === void 0 || slotVal === null) continue;
|
|
55125
|
-
if (
|
|
55207
|
+
if (React112__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
|
|
55126
55208
|
if (Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
|
|
55127
55209
|
nodeSlotOverrides[slotKey] = renderPatternChildren(
|
|
55128
55210
|
slotVal,
|
|
@@ -55171,7 +55253,7 @@ function SlotContentRenderer({
|
|
|
55171
55253
|
const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
|
|
55172
55254
|
if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
|
|
55173
55255
|
const sample = resolvedItems[0];
|
|
55174
|
-
if (sample && typeof sample === "object" && !Array.isArray(sample) && !
|
|
55256
|
+
if (sample && typeof sample === "object" && !Array.isArray(sample) && !React112__default.isValidElement(sample) && !(sample instanceof Date)) {
|
|
55175
55257
|
const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
|
|
55176
55258
|
finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
|
|
55177
55259
|
}
|
|
@@ -55349,6 +55431,7 @@ var init_UISlotRenderer = __esm({
|
|
|
55349
55431
|
"custom",
|
|
55350
55432
|
"dashboard-layout",
|
|
55351
55433
|
"game-shell",
|
|
55434
|
+
"game-template",
|
|
55352
55435
|
"scaled-diagram",
|
|
55353
55436
|
"master-detail",
|
|
55354
55437
|
"form-field",
|
|
@@ -55533,7 +55616,7 @@ var AvlTransition = ({
|
|
|
55533
55616
|
opacity = 1,
|
|
55534
55617
|
className
|
|
55535
55618
|
}) => {
|
|
55536
|
-
const ids =
|
|
55619
|
+
const ids = React112__default.useMemo(() => {
|
|
55537
55620
|
avlTransitionId += 1;
|
|
55538
55621
|
return { arrow: `avl-tr-${avlTransitionId}-arrow` };
|
|
55539
55622
|
}, []);
|
|
@@ -56094,7 +56177,7 @@ var AvlStateMachine = ({
|
|
|
56094
56177
|
color = "var(--color-primary)",
|
|
56095
56178
|
animated = false
|
|
56096
56179
|
}) => {
|
|
56097
|
-
const ids =
|
|
56180
|
+
const ids = React112__default.useMemo(() => {
|
|
56098
56181
|
avlSmId += 1;
|
|
56099
56182
|
const base = `avl-sm-${avlSmId}`;
|
|
56100
56183
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -56293,7 +56376,7 @@ var AvlOrbitalUnit = ({
|
|
|
56293
56376
|
color = "var(--color-primary)",
|
|
56294
56377
|
animated = false
|
|
56295
56378
|
}) => {
|
|
56296
|
-
const ids =
|
|
56379
|
+
const ids = React112__default.useMemo(() => {
|
|
56297
56380
|
avlOuId += 1;
|
|
56298
56381
|
const base = `avl-ou-${avlOuId}`;
|
|
56299
56382
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -56389,7 +56472,7 @@ var AvlClosedCircuit = ({
|
|
|
56389
56472
|
color = "var(--color-primary)",
|
|
56390
56473
|
animated = false
|
|
56391
56474
|
}) => {
|
|
56392
|
-
const ids =
|
|
56475
|
+
const ids = React112__default.useMemo(() => {
|
|
56393
56476
|
avlCcId += 1;
|
|
56394
56477
|
const base = `avl-cc-${avlCcId}`;
|
|
56395
56478
|
return { glow: `${base}-glow`, grad: `${base}-grad`, arrow: `${base}-arrow` };
|
|
@@ -56544,7 +56627,7 @@ var AvlEmitListen = ({
|
|
|
56544
56627
|
color = "var(--color-primary)",
|
|
56545
56628
|
animated = false
|
|
56546
56629
|
}) => {
|
|
56547
|
-
const ids =
|
|
56630
|
+
const ids = React112__default.useMemo(() => {
|
|
56548
56631
|
avlElId += 1;
|
|
56549
56632
|
const base = `avl-el-${avlElId}`;
|
|
56550
56633
|
return { arrow: `${base}-arrow`, grad: `${base}-grad` };
|
|
@@ -56818,7 +56901,7 @@ function renderNode(node, color, glowId) {
|
|
|
56818
56901
|
const baseR = node.type === "operator" ? 20 : 16;
|
|
56819
56902
|
const r2 = Math.max(baseR, labelLen * 3.5 + 6);
|
|
56820
56903
|
const nc = nodeColor(node.type, color);
|
|
56821
|
-
return /* @__PURE__ */ jsxs(
|
|
56904
|
+
return /* @__PURE__ */ jsxs(React112__default.Fragment, { children: [
|
|
56822
56905
|
node.children.map((child, i) => {
|
|
56823
56906
|
const childR = Math.max(
|
|
56824
56907
|
child.type === "operator" ? 20 : 16,
|
|
@@ -56875,7 +56958,7 @@ var AvlExprTree = ({
|
|
|
56875
56958
|
className,
|
|
56876
56959
|
color = "var(--color-primary)"
|
|
56877
56960
|
}) => {
|
|
56878
|
-
const ids =
|
|
56961
|
+
const ids = React112__default.useMemo(() => {
|
|
56879
56962
|
avlEtId += 1;
|
|
56880
56963
|
return { glow: `avl-et-${avlEtId}-glow` };
|
|
56881
56964
|
}, []);
|
|
@@ -57710,7 +57793,7 @@ var SystemNode = ({ data }) => {
|
|
|
57710
57793
|
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) => {
|
|
57711
57794
|
const tc = transitionCounts[s.name] ?? 0;
|
|
57712
57795
|
const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
57713
|
-
return /* @__PURE__ */ jsxs(
|
|
57796
|
+
return /* @__PURE__ */ jsxs(React112__default.Fragment, { children: [
|
|
57714
57797
|
/* @__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 }),
|
|
57715
57798
|
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 })
|
|
57716
57799
|
] }, s.name);
|
|
@@ -58855,7 +58938,7 @@ function resolveLambdaBindings(body, params, item, index) {
|
|
|
58855
58938
|
if (Array.isArray(body)) {
|
|
58856
58939
|
return body.map((b) => recur(b));
|
|
58857
58940
|
}
|
|
58858
|
-
if (body !== null && typeof body === "object" && !
|
|
58941
|
+
if (body !== null && typeof body === "object" && !React112__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
58859
58942
|
const out = {};
|
|
58860
58943
|
for (const [k, v] of Object.entries(body)) {
|
|
58861
58944
|
out[k] = recur(v);
|
|
@@ -58865,7 +58948,7 @@ function resolveLambdaBindings(body, params, item, index) {
|
|
|
58865
58948
|
return body;
|
|
58866
58949
|
}
|
|
58867
58950
|
var _slotContentRenderer2 = null;
|
|
58868
|
-
function
|
|
58951
|
+
function getSlotContentRenderer2() {
|
|
58869
58952
|
if (_slotContentRenderer2) return _slotContentRenderer2;
|
|
58870
58953
|
const mod = (init_UISlotRenderer(), __toCommonJS(UISlotRenderer_exports));
|
|
58871
58954
|
_slotContentRenderer2 = mod.SlotContentRenderer;
|
|
@@ -58874,14 +58957,14 @@ function getSlotContentRenderer4() {
|
|
|
58874
58957
|
function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
58875
58958
|
return (item, index) => {
|
|
58876
58959
|
const resolvedBody = resolveLambdaBindings(lambdaBody, params, item, index);
|
|
58877
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
58960
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React112__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
58878
58961
|
return null;
|
|
58879
58962
|
}
|
|
58880
58963
|
const record = resolvedBody;
|
|
58881
58964
|
if (typeof record.type !== "string") {
|
|
58882
58965
|
return null;
|
|
58883
58966
|
}
|
|
58884
|
-
const SlotContentRenderer2 =
|
|
58967
|
+
const SlotContentRenderer2 = getSlotContentRenderer2();
|
|
58885
58968
|
const rawChildProps = {};
|
|
58886
58969
|
for (const [k, v] of Object.entries(record)) {
|
|
58887
58970
|
if (k !== "type") rawChildProps[k] = v;
|
|
@@ -58893,7 +58976,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
58893
58976
|
props: childProps,
|
|
58894
58977
|
priority: 0
|
|
58895
58978
|
};
|
|
58896
|
-
return
|
|
58979
|
+
return React112__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
58897
58980
|
};
|
|
58898
58981
|
}
|
|
58899
58982
|
function convertNode(node, callerKey) {
|
|
@@ -58912,7 +58995,7 @@ function convertNode(node, callerKey) {
|
|
|
58912
58995
|
});
|
|
58913
58996
|
return anyChanged ? mapped : node;
|
|
58914
58997
|
}
|
|
58915
|
-
if (typeof node === "object" && !
|
|
58998
|
+
if (typeof node === "object" && !React112__default.isValidElement(node) && !(node instanceof Date)) {
|
|
58916
58999
|
return convertObjectProps(node);
|
|
58917
59000
|
}
|
|
58918
59001
|
return node;
|
|
@@ -60575,8 +60658,8 @@ function CanvasDndProvider({
|
|
|
60575
60658
|
}) {
|
|
60576
60659
|
const eventBus = useEventBus();
|
|
60577
60660
|
const sensors = useAlmadarDndSensors(false);
|
|
60578
|
-
const [activePayload, setActivePayload] =
|
|
60579
|
-
const handleDragStart =
|
|
60661
|
+
const [activePayload, setActivePayload] = React112__default.useState(null);
|
|
60662
|
+
const handleDragStart = React112__default.useCallback((e) => {
|
|
60580
60663
|
const data = e.active.data.current;
|
|
60581
60664
|
const payload = data?.payload;
|
|
60582
60665
|
if (payload) {
|
|
@@ -60587,7 +60670,7 @@ function CanvasDndProvider({
|
|
|
60587
60670
|
log9.warn("dragStart:missing-payload", { id: e.active.id });
|
|
60588
60671
|
}
|
|
60589
60672
|
}, [eventBus]);
|
|
60590
|
-
const handleDragEnd =
|
|
60673
|
+
const handleDragEnd = React112__default.useCallback((e) => {
|
|
60591
60674
|
setActivePayload(null);
|
|
60592
60675
|
const activeData = e.active.data.current;
|
|
60593
60676
|
const payload = activeData?.payload;
|
|
@@ -60616,7 +60699,7 @@ function CanvasDndProvider({
|
|
|
60616
60699
|
const suppressed = onDrop ? onDrop(drop) === true : false;
|
|
60617
60700
|
if (!suppressed) defaultEmit(eventBus, drop);
|
|
60618
60701
|
}, [eventBus, onDrop]);
|
|
60619
|
-
const handleDragCancel =
|
|
60702
|
+
const handleDragCancel = React112__default.useCallback(() => {
|
|
60620
60703
|
setActivePayload(null);
|
|
60621
60704
|
log9.info("dragCancel");
|
|
60622
60705
|
}, []);
|
|
@@ -61374,7 +61457,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
61374
61457
|
}
|
|
61375
61458
|
);
|
|
61376
61459
|
};
|
|
61377
|
-
var OrbPreviewNode =
|
|
61460
|
+
var OrbPreviewNode = React112__default.memo(OrbPreviewNodeInner);
|
|
61378
61461
|
OrbPreviewNode.displayName = "OrbPreviewNode";
|
|
61379
61462
|
orbPreviewLog.debug("export-resolved", () => ({
|
|
61380
61463
|
type: typeof OrbPreviewNode,
|
|
@@ -61479,7 +61562,7 @@ var EventFlowEdgeInner = (props) => {
|
|
|
61479
61562
|
) })
|
|
61480
61563
|
] });
|
|
61481
61564
|
};
|
|
61482
|
-
var EventFlowEdge =
|
|
61565
|
+
var EventFlowEdge = React112__default.memo(EventFlowEdgeInner);
|
|
61483
61566
|
EventFlowEdge.displayName = "EventFlowEdge";
|
|
61484
61567
|
|
|
61485
61568
|
// components/avl/molecules/BehaviorComposeNode.tsx
|
|
@@ -61626,7 +61709,7 @@ var BehaviorComposeNodeInner = (props) => {
|
|
|
61626
61709
|
}
|
|
61627
61710
|
);
|
|
61628
61711
|
};
|
|
61629
|
-
var BehaviorComposeNode =
|
|
61712
|
+
var BehaviorComposeNode = React112__default.memo(BehaviorComposeNodeInner);
|
|
61630
61713
|
BehaviorComposeNode.displayName = "BehaviorComposeNode";
|
|
61631
61714
|
|
|
61632
61715
|
// components/avl/lib/avl-behavior-compose-converter.ts
|
|
@@ -62652,7 +62735,7 @@ var TraitCardNodeInner = (props) => {
|
|
|
62652
62735
|
}
|
|
62653
62736
|
);
|
|
62654
62737
|
};
|
|
62655
|
-
var TraitCardNode =
|
|
62738
|
+
var TraitCardNode = React112__default.memo(TraitCardNodeInner);
|
|
62656
62739
|
TraitCardNode.displayName = "TraitCardNode";
|
|
62657
62740
|
|
|
62658
62741
|
// components/avl/organisms/FlowCanvas.tsx
|
|
@@ -62725,7 +62808,7 @@ function FlowCanvasInner({
|
|
|
62725
62808
|
initialOrbital
|
|
62726
62809
|
);
|
|
62727
62810
|
const [expandedBehaviorAlias, setExpandedBehaviorAlias] = useState(void 0);
|
|
62728
|
-
const screenSizeUserOverrideRef =
|
|
62811
|
+
const screenSizeUserOverrideRef = React112__default.useRef(false);
|
|
62729
62812
|
const [screenSize, setScreenSize] = useState(
|
|
62730
62813
|
() => typeof window === "undefined" ? "laptop" : detectScreenSize(window.innerWidth)
|
|
62731
62814
|
);
|
|
@@ -63109,7 +63192,7 @@ var ZoomBreadcrumb = ({
|
|
|
63109
63192
|
if (eventName && band === "detail") {
|
|
63110
63193
|
segments.push({ icon: "\u26A1", label: eventName });
|
|
63111
63194
|
}
|
|
63112
|
-
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(
|
|
63195
|
+
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(React112__default.Fragment, { children: [
|
|
63113
63196
|
i > 0 && /* @__PURE__ */ jsx("span", { className: "opacity-40", children: ">" }),
|
|
63114
63197
|
/* @__PURE__ */ jsx("span", { className: "opacity-60", children: seg.icon }),
|
|
63115
63198
|
/* @__PURE__ */ jsx("span", { children: seg.label })
|
|
@@ -63450,7 +63533,7 @@ var EventWireOverlay = ({
|
|
|
63450
63533
|
containerW,
|
|
63451
63534
|
containerH
|
|
63452
63535
|
}) => {
|
|
63453
|
-
const ids =
|
|
63536
|
+
const ids = React112__default.useMemo(() => {
|
|
63454
63537
|
avlOczWireId += 1;
|
|
63455
63538
|
return { arrow: `avl-ocz-wire-${avlOczWireId}-arrow` };
|
|
63456
63539
|
}, []);
|
|
@@ -63817,7 +63900,7 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
63817
63900
|
borderRadius: 6,
|
|
63818
63901
|
border: `1px solid ${color}`
|
|
63819
63902
|
},
|
|
63820
|
-
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(
|
|
63903
|
+
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React112__default.Fragment, { children: [
|
|
63821
63904
|
i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", style: { opacity: 0.5, color }, children: "/" }),
|
|
63822
63905
|
i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
|
|
63823
63906
|
Box,
|