@almadar/ui 2.43.0 → 2.45.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 +1613 -1317
- package/dist/avl/index.d.cts +4 -0
- package/dist/avl/index.js +594 -298
- package/dist/components/index.cjs +402 -115
- package/dist/components/index.js +402 -115
- package/dist/components/organisms/avl/FlowCanvas.d.ts +4 -0
- package/dist/components/organisms/debug/WalkMinimap.d.ts +17 -0
- package/dist/providers/index.cjs +165 -164
- package/dist/providers/index.js +41 -40
- package/dist/runtime/EntitySchemaContext.d.ts +5 -0
- package/dist/runtime/index.cjs +402 -115
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/index.js +402 -116
- package/package.json +1 -1
package/dist/avl/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { OrbitControls, Grid as Grid$1, Stars, Sparkles, Html, RoundedBox } from '@react-three/drei';
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
3
|
+
import * as React125 from 'react';
|
|
4
|
+
import React125__default, { createContext, useState, useRef, useCallback, useEffect, useMemo, useLayoutEffect, lazy, useContext, Suspense, useSyncExternalStore, useId, forwardRef, useImperativeHandle, useReducer, Component } from 'react';
|
|
5
5
|
import { useThree, useFrame, Canvas } from '@react-three/fiber';
|
|
6
6
|
import * as THREE6 from 'three';
|
|
7
7
|
import { MathUtils, Vector3, Quaternion, QuadraticBezierCurve3 } from 'three';
|
|
@@ -3155,7 +3155,7 @@ var init_Box = __esm({
|
|
|
3155
3155
|
fixed: "fixed",
|
|
3156
3156
|
sticky: "sticky"
|
|
3157
3157
|
};
|
|
3158
|
-
Box =
|
|
3158
|
+
Box = React125__default.forwardRef(
|
|
3159
3159
|
({
|
|
3160
3160
|
padding,
|
|
3161
3161
|
paddingX,
|
|
@@ -5495,7 +5495,7 @@ function UnitRenderer({
|
|
|
5495
5495
|
onAnimationStateChange,
|
|
5496
5496
|
animationSpeed = 1
|
|
5497
5497
|
}) {
|
|
5498
|
-
const handleUnitClick =
|
|
5498
|
+
const handleUnitClick = React125__default.useCallback(
|
|
5499
5499
|
(unit) => {
|
|
5500
5500
|
onUnitClick?.(unit);
|
|
5501
5501
|
},
|
|
@@ -8689,7 +8689,7 @@ var init_Avl3DViewer = __esm({
|
|
|
8689
8689
|
const handleTraitClick = useCallback((name) => {
|
|
8690
8690
|
dispatch({ type: "ZOOM_INTO_TRAIT", trait: name, targetPosition: { x: 0, y: 0 } });
|
|
8691
8691
|
}, []);
|
|
8692
|
-
const [highlightedTrait, setHighlightedTrait] =
|
|
8692
|
+
const [highlightedTrait, setHighlightedTrait] = React125__default.useState(null);
|
|
8693
8693
|
const handleTransitionClick = useCallback((index) => {
|
|
8694
8694
|
dispatch({ type: "ZOOM_INTO_TRANSITION", transitionIndex: index, targetPosition: { x: 0, y: 0 } });
|
|
8695
8695
|
}, []);
|
|
@@ -8776,7 +8776,7 @@ var init_Avl3DViewer = __esm({
|
|
|
8776
8776
|
gap: "xs",
|
|
8777
8777
|
align: "center",
|
|
8778
8778
|
className: "absolute top-2 left-2 z-10 bg-surface/80 backdrop-blur rounded-md px-3 py-1.5",
|
|
8779
|
-
children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(
|
|
8779
|
+
children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React125__default.Fragment, { children: [
|
|
8780
8780
|
i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", className: "mx-1", children: "/" }),
|
|
8781
8781
|
i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
|
|
8782
8782
|
Box,
|
|
@@ -9527,7 +9527,7 @@ var AvlTransition = ({
|
|
|
9527
9527
|
opacity = 1,
|
|
9528
9528
|
className
|
|
9529
9529
|
}) => {
|
|
9530
|
-
const ids =
|
|
9530
|
+
const ids = React125__default.useMemo(() => {
|
|
9531
9531
|
avlTransitionId += 1;
|
|
9532
9532
|
return { arrow: `avl-tr-${avlTransitionId}-arrow` };
|
|
9533
9533
|
}, []);
|
|
@@ -10292,7 +10292,7 @@ var AvlStateMachine = ({
|
|
|
10292
10292
|
color = "var(--color-primary)",
|
|
10293
10293
|
animated = false
|
|
10294
10294
|
}) => {
|
|
10295
|
-
const ids =
|
|
10295
|
+
const ids = React125__default.useMemo(() => {
|
|
10296
10296
|
avlSmId += 1;
|
|
10297
10297
|
const base = `avl-sm-${avlSmId}`;
|
|
10298
10298
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -10487,7 +10487,7 @@ var AvlOrbitalUnit = ({
|
|
|
10487
10487
|
color = "var(--color-primary)",
|
|
10488
10488
|
animated = false
|
|
10489
10489
|
}) => {
|
|
10490
|
-
const ids =
|
|
10490
|
+
const ids = React125__default.useMemo(() => {
|
|
10491
10491
|
avlOuId += 1;
|
|
10492
10492
|
const base = `avl-ou-${avlOuId}`;
|
|
10493
10493
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -10579,7 +10579,7 @@ var AvlClosedCircuit = ({
|
|
|
10579
10579
|
color = "var(--color-primary)",
|
|
10580
10580
|
animated = false
|
|
10581
10581
|
}) => {
|
|
10582
|
-
const ids =
|
|
10582
|
+
const ids = React125__default.useMemo(() => {
|
|
10583
10583
|
avlCcId += 1;
|
|
10584
10584
|
const base = `avl-cc-${avlCcId}`;
|
|
10585
10585
|
return { glow: `${base}-glow`, grad: `${base}-grad`, arrow: `${base}-arrow` };
|
|
@@ -10732,7 +10732,7 @@ var AvlEmitListen = ({
|
|
|
10732
10732
|
color = "var(--color-primary)",
|
|
10733
10733
|
animated = false
|
|
10734
10734
|
}) => {
|
|
10735
|
-
const ids =
|
|
10735
|
+
const ids = React125__default.useMemo(() => {
|
|
10736
10736
|
avlElId += 1;
|
|
10737
10737
|
const base = `avl-el-${avlElId}`;
|
|
10738
10738
|
return { arrow: `${base}-arrow`, grad: `${base}-grad` };
|
|
@@ -11005,7 +11005,7 @@ function renderNode(node, color, glowId) {
|
|
|
11005
11005
|
const baseR = node.type === "operator" ? 20 : 16;
|
|
11006
11006
|
const r2 = Math.max(baseR, labelLen * 3.5 + 6);
|
|
11007
11007
|
const nc = nodeColor(node.type, color);
|
|
11008
|
-
return /* @__PURE__ */ jsxs(
|
|
11008
|
+
return /* @__PURE__ */ jsxs(React125__default.Fragment, { children: [
|
|
11009
11009
|
node.children.map((child, i) => {
|
|
11010
11010
|
const childR = Math.max(
|
|
11011
11011
|
child.type === "operator" ? 20 : 16,
|
|
@@ -11062,7 +11062,7 @@ var AvlExprTree = ({
|
|
|
11062
11062
|
className,
|
|
11063
11063
|
color = "var(--color-primary)"
|
|
11064
11064
|
}) => {
|
|
11065
|
-
const ids =
|
|
11065
|
+
const ids = React125__default.useMemo(() => {
|
|
11066
11066
|
avlEtId += 1;
|
|
11067
11067
|
return { glow: `avl-et-${avlEtId}-glow` };
|
|
11068
11068
|
}, []);
|
|
@@ -12036,7 +12036,7 @@ var SystemNode = ({ data }) => {
|
|
|
12036
12036
|
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) => {
|
|
12037
12037
|
const tc = transitionCounts[s.name] ?? 0;
|
|
12038
12038
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
12039
|
-
return /* @__PURE__ */ jsxs(
|
|
12039
|
+
return /* @__PURE__ */ jsxs(React125__default.Fragment, { children: [
|
|
12040
12040
|
/* @__PURE__ */ jsx(AvlState, { x: i * 14 + 1, y: 1, width: 10, height: 8, name: "", role, isInitial: s.isInitial, isTerminal: s.isTerminal }),
|
|
12041
12041
|
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 })
|
|
12042
12042
|
] }, s.name);
|
|
@@ -12076,7 +12076,7 @@ var MiniStateMachine = ({ data, className }) => {
|
|
|
12076
12076
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
12077
12077
|
const tc = transitionCounts[s.name] ?? 0;
|
|
12078
12078
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
12079
|
-
return /* @__PURE__ */ jsxs(
|
|
12079
|
+
return /* @__PURE__ */ jsxs(React125__default.Fragment, { children: [
|
|
12080
12080
|
/* @__PURE__ */ jsx(
|
|
12081
12081
|
AvlState,
|
|
12082
12082
|
{
|
|
@@ -13374,7 +13374,7 @@ function subscribeToStore(listener) {
|
|
|
13374
13374
|
function useEntityRef(entityType) {
|
|
13375
13375
|
const versionRef = useRef(0);
|
|
13376
13376
|
const dataRef = useRef([]);
|
|
13377
|
-
const getSnapshotStable =
|
|
13377
|
+
const getSnapshotStable = React125__default.useCallback(() => {
|
|
13378
13378
|
const currentVersion = getVersion(entityType);
|
|
13379
13379
|
if (currentVersion !== versionRef.current) {
|
|
13380
13380
|
versionRef.current = currentVersion;
|
|
@@ -13482,6 +13482,36 @@ function SelectionProvider({
|
|
|
13482
13482
|
};
|
|
13483
13483
|
return /* @__PURE__ */ jsx(SelectionContext.Provider, { value: contextValue2, children });
|
|
13484
13484
|
}
|
|
13485
|
+
var EntitySchemaContext = createContext(null);
|
|
13486
|
+
function EntitySchemaProvider({
|
|
13487
|
+
entities,
|
|
13488
|
+
children
|
|
13489
|
+
}) {
|
|
13490
|
+
const entitiesMap = useMemo(() => {
|
|
13491
|
+
const map = /* @__PURE__ */ new Map();
|
|
13492
|
+
for (const entity of entities) {
|
|
13493
|
+
map.set(entity.name, entity);
|
|
13494
|
+
}
|
|
13495
|
+
return map;
|
|
13496
|
+
}, [entities]);
|
|
13497
|
+
const contextValue2 = useMemo(
|
|
13498
|
+
() => ({
|
|
13499
|
+
entities: entitiesMap
|
|
13500
|
+
}),
|
|
13501
|
+
[entitiesMap]
|
|
13502
|
+
);
|
|
13503
|
+
return /* @__PURE__ */ jsx(EntitySchemaContext.Provider, { value: contextValue2, children });
|
|
13504
|
+
}
|
|
13505
|
+
function useEntitySchema() {
|
|
13506
|
+
const context = useContext(EntitySchemaContext);
|
|
13507
|
+
if (!context) {
|
|
13508
|
+
throw new Error("useEntitySchema must be used within an EntitySchemaProvider");
|
|
13509
|
+
}
|
|
13510
|
+
return context;
|
|
13511
|
+
}
|
|
13512
|
+
function useEntitySchemaOptional() {
|
|
13513
|
+
return useContext(EntitySchemaContext);
|
|
13514
|
+
}
|
|
13485
13515
|
var DEFAULT_SLOTS = {
|
|
13486
13516
|
main: null,
|
|
13487
13517
|
sidebar: null,
|
|
@@ -14211,7 +14241,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
14211
14241
|
const IconComp = value;
|
|
14212
14242
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
14213
14243
|
}
|
|
14214
|
-
if (
|
|
14244
|
+
if (React125__default.isValidElement(value)) {
|
|
14215
14245
|
return value;
|
|
14216
14246
|
}
|
|
14217
14247
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -14220,7 +14250,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
14220
14250
|
}
|
|
14221
14251
|
return value;
|
|
14222
14252
|
}
|
|
14223
|
-
var Button =
|
|
14253
|
+
var Button = React125__default.forwardRef(
|
|
14224
14254
|
({
|
|
14225
14255
|
className,
|
|
14226
14256
|
variant = "primary",
|
|
@@ -14319,7 +14349,7 @@ var sizeStyles3 = {
|
|
|
14319
14349
|
md: "px-2.5 py-1 text-sm",
|
|
14320
14350
|
lg: "px-3 py-1.5 text-base"
|
|
14321
14351
|
};
|
|
14322
|
-
var Badge =
|
|
14352
|
+
var Badge = React125__default.forwardRef(
|
|
14323
14353
|
({ className, variant = "default", size = "sm", amount, label, icon, children, ...props }, ref) => {
|
|
14324
14354
|
const iconSizes2 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
|
|
14325
14355
|
const resolvedIcon = typeof icon === "string" ? (() => {
|
|
@@ -14460,7 +14490,7 @@ init_cn();
|
|
|
14460
14490
|
|
|
14461
14491
|
// components/atoms/Input.tsx
|
|
14462
14492
|
init_cn();
|
|
14463
|
-
var Input =
|
|
14493
|
+
var Input = React125__default.forwardRef(
|
|
14464
14494
|
({
|
|
14465
14495
|
className,
|
|
14466
14496
|
inputType,
|
|
@@ -14575,7 +14605,7 @@ Input.displayName = "Input";
|
|
|
14575
14605
|
|
|
14576
14606
|
// components/atoms/Label.tsx
|
|
14577
14607
|
init_cn();
|
|
14578
|
-
var Label =
|
|
14608
|
+
var Label = React125__default.forwardRef(
|
|
14579
14609
|
({ className, required, children, ...props }, ref) => {
|
|
14580
14610
|
return /* @__PURE__ */ jsxs(
|
|
14581
14611
|
"label",
|
|
@@ -14598,7 +14628,7 @@ Label.displayName = "Label";
|
|
|
14598
14628
|
|
|
14599
14629
|
// components/atoms/Textarea.tsx
|
|
14600
14630
|
init_cn();
|
|
14601
|
-
var Textarea =
|
|
14631
|
+
var Textarea = React125__default.forwardRef(
|
|
14602
14632
|
({ className, error, ...props }, ref) => {
|
|
14603
14633
|
return /* @__PURE__ */ jsx(
|
|
14604
14634
|
"textarea",
|
|
@@ -14624,7 +14654,7 @@ Textarea.displayName = "Textarea";
|
|
|
14624
14654
|
|
|
14625
14655
|
// components/atoms/Select.tsx
|
|
14626
14656
|
init_cn();
|
|
14627
|
-
var Select =
|
|
14657
|
+
var Select = React125__default.forwardRef(
|
|
14628
14658
|
({ className, options, placeholder, error, ...props }, ref) => {
|
|
14629
14659
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
14630
14660
|
/* @__PURE__ */ jsxs(
|
|
@@ -14663,7 +14693,7 @@ Select.displayName = "Select";
|
|
|
14663
14693
|
|
|
14664
14694
|
// components/atoms/Checkbox.tsx
|
|
14665
14695
|
init_cn();
|
|
14666
|
-
var Checkbox =
|
|
14696
|
+
var Checkbox = React125__default.forwardRef(
|
|
14667
14697
|
({ className, label, id, ...props }, ref) => {
|
|
14668
14698
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
14669
14699
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
@@ -14742,7 +14772,7 @@ var shadowStyles2 = {
|
|
|
14742
14772
|
md: "shadow",
|
|
14743
14773
|
lg: "shadow-lg"
|
|
14744
14774
|
};
|
|
14745
|
-
var Card =
|
|
14775
|
+
var Card = React125__default.forwardRef(
|
|
14746
14776
|
({
|
|
14747
14777
|
className,
|
|
14748
14778
|
variant = "bordered",
|
|
@@ -14778,9 +14808,9 @@ var Card = React124__default.forwardRef(
|
|
|
14778
14808
|
}
|
|
14779
14809
|
);
|
|
14780
14810
|
Card.displayName = "Card";
|
|
14781
|
-
var CardHeader =
|
|
14811
|
+
var CardHeader = React125__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
14782
14812
|
CardHeader.displayName = "CardHeader";
|
|
14783
|
-
var CardTitle =
|
|
14813
|
+
var CardTitle = React125__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
14784
14814
|
"h3",
|
|
14785
14815
|
{
|
|
14786
14816
|
ref,
|
|
@@ -14793,11 +14823,11 @@ var CardTitle = React124__default.forwardRef(({ className, ...props }, ref) => /
|
|
|
14793
14823
|
}
|
|
14794
14824
|
));
|
|
14795
14825
|
CardTitle.displayName = "CardTitle";
|
|
14796
|
-
var CardContent =
|
|
14826
|
+
var CardContent = React125__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
14797
14827
|
CardContent.displayName = "CardContent";
|
|
14798
14828
|
var CardBody = CardContent;
|
|
14799
14829
|
CardBody.displayName = "CardBody";
|
|
14800
|
-
var CardFooter =
|
|
14830
|
+
var CardFooter = React125__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
14801
14831
|
"div",
|
|
14802
14832
|
{
|
|
14803
14833
|
ref,
|
|
@@ -14815,7 +14845,7 @@ var sizeStyles4 = {
|
|
|
14815
14845
|
md: "h-6 w-6",
|
|
14816
14846
|
lg: "h-8 w-8"
|
|
14817
14847
|
};
|
|
14818
|
-
var Spinner =
|
|
14848
|
+
var Spinner = React125__default.forwardRef(
|
|
14819
14849
|
({ className, size = "md", ...props }, ref) => {
|
|
14820
14850
|
return /* @__PURE__ */ jsx(
|
|
14821
14851
|
"div",
|
|
@@ -15250,7 +15280,7 @@ ProgressBar.displayName = "ProgressBar";
|
|
|
15250
15280
|
|
|
15251
15281
|
// components/atoms/Radio.tsx
|
|
15252
15282
|
init_cn();
|
|
15253
|
-
var Radio =
|
|
15283
|
+
var Radio = React125__default.forwardRef(
|
|
15254
15284
|
({
|
|
15255
15285
|
label,
|
|
15256
15286
|
helperText,
|
|
@@ -15357,7 +15387,7 @@ Radio.displayName = "Radio";
|
|
|
15357
15387
|
|
|
15358
15388
|
// components/atoms/Switch.tsx
|
|
15359
15389
|
init_cn();
|
|
15360
|
-
var Switch =
|
|
15390
|
+
var Switch = React125.forwardRef(
|
|
15361
15391
|
({
|
|
15362
15392
|
checked,
|
|
15363
15393
|
defaultChecked = false,
|
|
@@ -15368,10 +15398,10 @@ var Switch = React124.forwardRef(
|
|
|
15368
15398
|
name,
|
|
15369
15399
|
className
|
|
15370
15400
|
}, ref) => {
|
|
15371
|
-
const [isChecked, setIsChecked] =
|
|
15401
|
+
const [isChecked, setIsChecked] = React125.useState(
|
|
15372
15402
|
checked !== void 0 ? checked : defaultChecked
|
|
15373
15403
|
);
|
|
15374
|
-
|
|
15404
|
+
React125.useEffect(() => {
|
|
15375
15405
|
if (checked !== void 0) {
|
|
15376
15406
|
setIsChecked(checked);
|
|
15377
15407
|
}
|
|
@@ -15687,8 +15717,8 @@ var LawReferenceTooltip = ({
|
|
|
15687
15717
|
position = "top",
|
|
15688
15718
|
className
|
|
15689
15719
|
}) => {
|
|
15690
|
-
const [isVisible, setIsVisible] =
|
|
15691
|
-
const timeoutRef =
|
|
15720
|
+
const [isVisible, setIsVisible] = React125__default.useState(false);
|
|
15721
|
+
const timeoutRef = React125__default.useRef(null);
|
|
15692
15722
|
const handleMouseEnter = () => {
|
|
15693
15723
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
15694
15724
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -15697,7 +15727,7 @@ var LawReferenceTooltip = ({
|
|
|
15697
15727
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
15698
15728
|
setIsVisible(false);
|
|
15699
15729
|
};
|
|
15700
|
-
|
|
15730
|
+
React125__default.useEffect(() => {
|
|
15701
15731
|
return () => {
|
|
15702
15732
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
15703
15733
|
};
|
|
@@ -15897,7 +15927,7 @@ var sizeStyles5 = {
|
|
|
15897
15927
|
md: "w-2.5 h-2.5",
|
|
15898
15928
|
lg: "w-3 h-3"
|
|
15899
15929
|
};
|
|
15900
|
-
var StatusDot =
|
|
15930
|
+
var StatusDot = React125__default.forwardRef(
|
|
15901
15931
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
15902
15932
|
return /* @__PURE__ */ jsx(
|
|
15903
15933
|
"span",
|
|
@@ -15947,7 +15977,7 @@ var iconMap2 = {
|
|
|
15947
15977
|
down: TrendingDown,
|
|
15948
15978
|
flat: ArrowRight
|
|
15949
15979
|
};
|
|
15950
|
-
var TrendIndicator =
|
|
15980
|
+
var TrendIndicator = React125__default.forwardRef(
|
|
15951
15981
|
({
|
|
15952
15982
|
className,
|
|
15953
15983
|
value,
|
|
@@ -16010,7 +16040,7 @@ var thumbSizes = {
|
|
|
16010
16040
|
md: "w-4 h-4",
|
|
16011
16041
|
lg: "w-5 h-5"
|
|
16012
16042
|
};
|
|
16013
|
-
var RangeSlider =
|
|
16043
|
+
var RangeSlider = React125__default.forwardRef(
|
|
16014
16044
|
({
|
|
16015
16045
|
className,
|
|
16016
16046
|
min = 0,
|
|
@@ -16524,7 +16554,7 @@ var paddingClasses = {
|
|
|
16524
16554
|
md: "py-16",
|
|
16525
16555
|
lg: "py-24"
|
|
16526
16556
|
};
|
|
16527
|
-
var ContentSection =
|
|
16557
|
+
var ContentSection = React125__default.forwardRef(
|
|
16528
16558
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
16529
16559
|
return /* @__PURE__ */ jsx(
|
|
16530
16560
|
Box,
|
|
@@ -16566,7 +16596,7 @@ var animatedStyles = {
|
|
|
16566
16596
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
16567
16597
|
"none": {}
|
|
16568
16598
|
};
|
|
16569
|
-
var AnimatedReveal =
|
|
16599
|
+
var AnimatedReveal = React125__default.forwardRef(
|
|
16570
16600
|
({
|
|
16571
16601
|
trigger = "scroll",
|
|
16572
16602
|
animation = "fade-up",
|
|
@@ -16722,7 +16752,7 @@ function applyMorphAnimation(container, animate, duration, delay, easing) {
|
|
|
16722
16752
|
el.style.opacity = animate ? "1" : "0";
|
|
16723
16753
|
});
|
|
16724
16754
|
}
|
|
16725
|
-
var AnimatedGraphic =
|
|
16755
|
+
var AnimatedGraphic = React125__default.forwardRef(
|
|
16726
16756
|
({
|
|
16727
16757
|
src,
|
|
16728
16758
|
svgContent,
|
|
@@ -16745,7 +16775,7 @@ var AnimatedGraphic = React124__default.forwardRef(
|
|
|
16745
16775
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
16746
16776
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
16747
16777
|
const prevAnimateRef = useRef(animate);
|
|
16748
|
-
const setRef =
|
|
16778
|
+
const setRef = React125__default.useCallback(
|
|
16749
16779
|
(node) => {
|
|
16750
16780
|
containerRef.current = node;
|
|
16751
16781
|
if (typeof ref === "function") ref(node);
|
|
@@ -16922,9 +16952,9 @@ function ScoreDisplay({
|
|
|
16922
16952
|
...rest
|
|
16923
16953
|
}) {
|
|
16924
16954
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
|
|
16925
|
-
const [displayValue, setDisplayValue] =
|
|
16926
|
-
const [isAnimating, setIsAnimating] =
|
|
16927
|
-
|
|
16955
|
+
const [displayValue, setDisplayValue] = React125.useState(resolvedValue);
|
|
16956
|
+
const [isAnimating, setIsAnimating] = React125.useState(false);
|
|
16957
|
+
React125.useEffect(() => {
|
|
16928
16958
|
if (!animated || displayValue === resolvedValue) {
|
|
16929
16959
|
setDisplayValue(resolvedValue);
|
|
16930
16960
|
return;
|
|
@@ -16982,9 +17012,9 @@ var shapeMap = {
|
|
|
16982
17012
|
square: "rounded-md"
|
|
16983
17013
|
};
|
|
16984
17014
|
var variantMap = {
|
|
16985
|
-
primary: "bg-blue-600 text-
|
|
16986
|
-
secondary: "bg-
|
|
16987
|
-
ghost: "bg-transparent text-
|
|
17015
|
+
primary: "bg-blue-600 text-[var(--color-foreground)] border-blue-400 hover:bg-blue-500",
|
|
17016
|
+
secondary: "bg-[var(--color-surface,#374151)] text-[var(--color-foreground)] border-gray-500 hover:bg-gray-600",
|
|
17017
|
+
ghost: "bg-transparent text-[var(--color-foreground)] border-white/30 hover:bg-white/10"
|
|
16988
17018
|
};
|
|
16989
17019
|
function ControlButton({
|
|
16990
17020
|
label,
|
|
@@ -17001,9 +17031,9 @@ function ControlButton({
|
|
|
17001
17031
|
className
|
|
17002
17032
|
}) {
|
|
17003
17033
|
const eventBus = useEventBus();
|
|
17004
|
-
const [isPressed, setIsPressed] =
|
|
17034
|
+
const [isPressed, setIsPressed] = React125.useState(false);
|
|
17005
17035
|
const actualPressed = pressed ?? isPressed;
|
|
17006
|
-
const handlePointerDown =
|
|
17036
|
+
const handlePointerDown = React125.useCallback(
|
|
17007
17037
|
(e) => {
|
|
17008
17038
|
e.preventDefault();
|
|
17009
17039
|
if (disabled) return;
|
|
@@ -17013,7 +17043,7 @@ function ControlButton({
|
|
|
17013
17043
|
},
|
|
17014
17044
|
[disabled, pressEvent, eventBus, onPress]
|
|
17015
17045
|
);
|
|
17016
|
-
const handlePointerUp =
|
|
17046
|
+
const handlePointerUp = React125.useCallback(
|
|
17017
17047
|
(e) => {
|
|
17018
17048
|
e.preventDefault();
|
|
17019
17049
|
if (disabled) return;
|
|
@@ -17023,7 +17053,7 @@ function ControlButton({
|
|
|
17023
17053
|
},
|
|
17024
17054
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
17025
17055
|
);
|
|
17026
|
-
const handlePointerLeave =
|
|
17056
|
+
const handlePointerLeave = React125.useCallback(
|
|
17027
17057
|
(e) => {
|
|
17028
17058
|
if (isPressed) {
|
|
17029
17059
|
setIsPressed(false);
|
|
@@ -17223,11 +17253,11 @@ function TimerDisplay({
|
|
|
17223
17253
|
{
|
|
17224
17254
|
className: cn(
|
|
17225
17255
|
"inline-flex items-center justify-center rounded-lg",
|
|
17226
|
-
"bg-
|
|
17256
|
+
"bg-[var(--color-card)]/80 border border-gray-600 font-mono font-bold tabular-nums",
|
|
17227
17257
|
sizeMap4[size],
|
|
17228
17258
|
running && "border-green-500/50",
|
|
17229
17259
|
isLow && "text-red-400 border-red-500/50 animate-pulse",
|
|
17230
|
-
!isLow && "text-
|
|
17260
|
+
!isLow && "text-[var(--color-foreground)]",
|
|
17231
17261
|
className
|
|
17232
17262
|
),
|
|
17233
17263
|
children: formatTime(seconds, format)
|
|
@@ -17258,7 +17288,7 @@ function ResourceCounter({
|
|
|
17258
17288
|
{
|
|
17259
17289
|
className: cn(
|
|
17260
17290
|
"inline-flex items-center rounded-md",
|
|
17261
|
-
"bg-
|
|
17291
|
+
"bg-[var(--color-card)]/80 border border-gray-600 font-medium text-[var(--color-foreground)]",
|
|
17262
17292
|
sizes.wrapper,
|
|
17263
17293
|
className
|
|
17264
17294
|
),
|
|
@@ -17320,9 +17350,9 @@ function ItemSlot({
|
|
|
17320
17350
|
title: label,
|
|
17321
17351
|
className: cn(
|
|
17322
17352
|
"relative flex items-center justify-center rounded-lg border-2",
|
|
17323
|
-
"bg-
|
|
17353
|
+
"bg-[var(--color-card)]/80 transition-all duration-150",
|
|
17324
17354
|
sizeMap6[size],
|
|
17325
|
-
empty ? "border-gray-700 bg-
|
|
17355
|
+
empty ? "border-gray-700 bg-[var(--color-card)]/50" : rarityBorderMap[rarity],
|
|
17326
17356
|
!empty && rarityGlowMap[rarity],
|
|
17327
17357
|
selected && "ring-2 ring-white ring-offset-1 ring-offset-gray-900",
|
|
17328
17358
|
isClickable && !empty && "hover:brightness-125 cursor-pointer",
|
|
@@ -17338,7 +17368,7 @@ function ItemSlot({
|
|
|
17338
17368
|
className: cn(
|
|
17339
17369
|
"absolute -bottom-1 -right-1 flex items-center justify-center",
|
|
17340
17370
|
"min-w-[18px] h-[18px] rounded-full px-1",
|
|
17341
|
-
"bg-
|
|
17371
|
+
"bg-[var(--color-surface,#374151)] border border-gray-500 text-[10px] font-bold text-[var(--color-foreground)]"
|
|
17342
17372
|
),
|
|
17343
17373
|
children: quantity
|
|
17344
17374
|
}
|
|
@@ -17370,7 +17400,7 @@ function TurnIndicator({
|
|
|
17370
17400
|
{
|
|
17371
17401
|
className: cn(
|
|
17372
17402
|
"inline-flex items-center rounded-lg",
|
|
17373
|
-
"bg-
|
|
17403
|
+
"bg-[var(--color-card)]/80 border border-gray-600 font-medium text-[var(--color-foreground)]",
|
|
17374
17404
|
sizes.wrapper,
|
|
17375
17405
|
className
|
|
17376
17406
|
),
|
|
@@ -17409,7 +17439,7 @@ function getComboIntensity(combo) {
|
|
|
17409
17439
|
if (combo >= 10) return "text-red-400 animate-pulse";
|
|
17410
17440
|
if (combo >= 7) return "text-orange-400";
|
|
17411
17441
|
if (combo >= 4) return "text-yellow-400";
|
|
17412
|
-
return "text-
|
|
17442
|
+
return "text-[var(--color-foreground)]";
|
|
17413
17443
|
}
|
|
17414
17444
|
function getComboScale(combo) {
|
|
17415
17445
|
if (combo >= 10) return "scale-110";
|
|
@@ -17430,7 +17460,7 @@ function ComboCounter({
|
|
|
17430
17460
|
{
|
|
17431
17461
|
className: cn(
|
|
17432
17462
|
"inline-flex flex-col items-center justify-center",
|
|
17433
|
-
"rounded-xl bg-
|
|
17463
|
+
"rounded-xl bg-[var(--color-card)]/80 border border-gray-600 px-3 py-1.5",
|
|
17434
17464
|
"transition-transform duration-200",
|
|
17435
17465
|
getComboScale(combo),
|
|
17436
17466
|
className
|
|
@@ -17640,7 +17670,7 @@ function StatusEffect({
|
|
|
17640
17670
|
"span",
|
|
17641
17671
|
{
|
|
17642
17672
|
className: cn(
|
|
17643
|
-
"absolute flex items-center justify-center rounded-full bg-
|
|
17673
|
+
"absolute flex items-center justify-center rounded-full bg-[var(--color-card)] text-[var(--color-foreground)] font-bold leading-none",
|
|
17644
17674
|
sizes.badge
|
|
17645
17675
|
),
|
|
17646
17676
|
children: stacks
|
|
@@ -17725,7 +17755,7 @@ function DialogueBubble({
|
|
|
17725
17755
|
) }),
|
|
17726
17756
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1 min-w-0", children: [
|
|
17727
17757
|
speaker && /* @__PURE__ */ jsx("span", { className: "text-sm font-bold text-yellow-400", children: speaker }),
|
|
17728
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm text-
|
|
17758
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm text-[var(--color-foreground)] leading-relaxed", children: text })
|
|
17729
17759
|
] })
|
|
17730
17760
|
]
|
|
17731
17761
|
}
|
|
@@ -17752,7 +17782,7 @@ function ChoiceButton({
|
|
|
17752
17782
|
className: cn(
|
|
17753
17783
|
"w-full text-left px-4 py-2.5 rounded-md border transition-all duration-150",
|
|
17754
17784
|
"flex items-center gap-2",
|
|
17755
|
-
selected ? "bg-yellow-500/20 border-yellow-400 text-yellow-300" : "bg-white/5 border-white/10 text-
|
|
17785
|
+
selected ? "bg-yellow-500/20 border-yellow-400 text-yellow-300" : "bg-white/5 border-white/10 text-[var(--color-foreground)] hover:bg-white/10 hover:border-white/30",
|
|
17756
17786
|
disabled && "opacity-40 cursor-not-allowed hover:bg-white/5 hover:border-white/10",
|
|
17757
17787
|
className
|
|
17758
17788
|
),
|
|
@@ -17811,7 +17841,7 @@ function ActionButton({
|
|
|
17811
17841
|
disabled: isDisabled,
|
|
17812
17842
|
onClick,
|
|
17813
17843
|
className: cn(
|
|
17814
|
-
"relative inline-flex items-center gap-1.5 rounded-md border font-medium text-
|
|
17844
|
+
"relative inline-flex items-center gap-1.5 rounded-md border font-medium text-[var(--color-foreground)] overflow-hidden transition-colors duration-150",
|
|
17815
17845
|
sizes.button,
|
|
17816
17846
|
variantStyles7[variant],
|
|
17817
17847
|
isDisabled && "opacity-60 cursor-not-allowed",
|
|
@@ -17859,9 +17889,9 @@ function MiniMap({
|
|
|
17859
17889
|
viewportRect,
|
|
17860
17890
|
className
|
|
17861
17891
|
}) {
|
|
17862
|
-
const canvasRef =
|
|
17863
|
-
const frameRef =
|
|
17864
|
-
|
|
17892
|
+
const canvasRef = React125.useRef(null);
|
|
17893
|
+
const frameRef = React125.useRef(0);
|
|
17894
|
+
React125.useEffect(() => {
|
|
17865
17895
|
const canvas = canvasRef.current;
|
|
17866
17896
|
if (!canvas) return;
|
|
17867
17897
|
const ctx = canvas.getContext("2d");
|
|
@@ -18097,7 +18127,7 @@ var ErrorState = ({
|
|
|
18097
18127
|
);
|
|
18098
18128
|
};
|
|
18099
18129
|
ErrorState.displayName = "ErrorState";
|
|
18100
|
-
var ErrorBoundary = class extends
|
|
18130
|
+
var ErrorBoundary = class extends React125__default.Component {
|
|
18101
18131
|
constructor(props) {
|
|
18102
18132
|
super(props);
|
|
18103
18133
|
__publicField(this, "reset", () => {
|
|
@@ -18500,8 +18530,8 @@ var Tooltip = ({
|
|
|
18500
18530
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
18501
18531
|
};
|
|
18502
18532
|
}, []);
|
|
18503
|
-
const triggerElement =
|
|
18504
|
-
const trigger =
|
|
18533
|
+
const triggerElement = React125__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
18534
|
+
const trigger = React125__default.cloneElement(triggerElement, {
|
|
18505
18535
|
ref: triggerRef,
|
|
18506
18536
|
onMouseEnter: handleMouseEnter,
|
|
18507
18537
|
onMouseLeave: handleMouseLeave,
|
|
@@ -18618,8 +18648,8 @@ var Popover = ({
|
|
|
18618
18648
|
onMouseEnter: handleOpen,
|
|
18619
18649
|
onMouseLeave: handleClose
|
|
18620
18650
|
};
|
|
18621
|
-
const childElement =
|
|
18622
|
-
const triggerElement =
|
|
18651
|
+
const childElement = React125__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
18652
|
+
const triggerElement = React125__default.cloneElement(
|
|
18623
18653
|
childElement,
|
|
18624
18654
|
{
|
|
18625
18655
|
ref: triggerRef,
|
|
@@ -18726,8 +18756,8 @@ var Menu = ({
|
|
|
18726
18756
|
"bottom-start": "top-full left-0 mt-2",
|
|
18727
18757
|
"bottom-end": "top-full right-0 mt-2"
|
|
18728
18758
|
};
|
|
18729
|
-
const triggerChild =
|
|
18730
|
-
const triggerElement =
|
|
18759
|
+
const triggerChild = React125__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx("span", { children: trigger });
|
|
18760
|
+
const triggerElement = React125__default.cloneElement(
|
|
18731
18761
|
triggerChild,
|
|
18732
18762
|
{
|
|
18733
18763
|
ref: triggerRef,
|
|
@@ -19447,7 +19477,7 @@ function InputPattern({
|
|
|
19447
19477
|
className
|
|
19448
19478
|
}) {
|
|
19449
19479
|
const { emit } = useEventBus();
|
|
19450
|
-
const [localValue, setLocalValue] =
|
|
19480
|
+
const [localValue, setLocalValue] = React125__default.useState(value);
|
|
19451
19481
|
const handleChange = (e) => {
|
|
19452
19482
|
setLocalValue(e.target.value);
|
|
19453
19483
|
if (onChange) {
|
|
@@ -19484,7 +19514,7 @@ function TextareaPattern({
|
|
|
19484
19514
|
className
|
|
19485
19515
|
}) {
|
|
19486
19516
|
const { emit } = useEventBus();
|
|
19487
|
-
const [localValue, setLocalValue] =
|
|
19517
|
+
const [localValue, setLocalValue] = React125__default.useState(value);
|
|
19488
19518
|
const handleChange = (e) => {
|
|
19489
19519
|
setLocalValue(e.target.value);
|
|
19490
19520
|
if (onChange) {
|
|
@@ -19515,7 +19545,7 @@ function SelectPattern({
|
|
|
19515
19545
|
className
|
|
19516
19546
|
}) {
|
|
19517
19547
|
const { emit } = useEventBus();
|
|
19518
|
-
const [localValue, setLocalValue] =
|
|
19548
|
+
const [localValue, setLocalValue] = React125__default.useState(value);
|
|
19519
19549
|
const handleChange = (e) => {
|
|
19520
19550
|
setLocalValue(e.target.value);
|
|
19521
19551
|
if (onChange) {
|
|
@@ -19544,7 +19574,7 @@ function CheckboxPattern({
|
|
|
19544
19574
|
className
|
|
19545
19575
|
}) {
|
|
19546
19576
|
const { emit } = useEventBus();
|
|
19547
|
-
const [localChecked, setLocalChecked] =
|
|
19577
|
+
const [localChecked, setLocalChecked] = React125__default.useState(checked);
|
|
19548
19578
|
const handleChange = (e) => {
|
|
19549
19579
|
setLocalChecked(e.target.checked);
|
|
19550
19580
|
if (onChange) {
|
|
@@ -19749,8 +19779,8 @@ function ActionButtons({
|
|
|
19749
19779
|
disabled
|
|
19750
19780
|
}) {
|
|
19751
19781
|
const eventBus = useEventBus();
|
|
19752
|
-
const [activeButtons, setActiveButtons] =
|
|
19753
|
-
const handlePress =
|
|
19782
|
+
const [activeButtons, setActiveButtons] = React125.useState(/* @__PURE__ */ new Set());
|
|
19783
|
+
const handlePress = React125.useCallback(
|
|
19754
19784
|
(id) => {
|
|
19755
19785
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
19756
19786
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -19758,7 +19788,7 @@ function ActionButtons({
|
|
|
19758
19788
|
},
|
|
19759
19789
|
[actionEvent, eventBus, onAction]
|
|
19760
19790
|
);
|
|
19761
|
-
const handleRelease =
|
|
19791
|
+
const handleRelease = React125.useCallback(
|
|
19762
19792
|
(id) => {
|
|
19763
19793
|
setActiveButtons((prev) => {
|
|
19764
19794
|
const next = new Set(prev);
|
|
@@ -19955,11 +19985,11 @@ var AuthLayout = ({
|
|
|
19955
19985
|
children: [
|
|
19956
19986
|
/* @__PURE__ */ jsx(Box, { className: "absolute inset-0 bg-gradient-to-br from-primary-600/90 to-primary-800/90" }),
|
|
19957
19987
|
/* @__PURE__ */ jsx(Box, { className: "relative z-10", children: /* @__PURE__ */ jsxs(Link, { to: "/", className: "flex items-center gap-3", children: [
|
|
19958
|
-
logo || /* @__PURE__ */ jsx(Box, { className: "w-10 h-10 bg-
|
|
19988
|
+
logo || /* @__PURE__ */ jsx(Box, { className: "w-10 h-10 bg-[var(--color-card)]/20 rounded-xl flex items-center justify-center backdrop-blur", children: /* @__PURE__ */ jsx(
|
|
19959
19989
|
Typography,
|
|
19960
19990
|
{
|
|
19961
19991
|
variant: "body1",
|
|
19962
|
-
className: "text-
|
|
19992
|
+
className: "text-[var(--color-foreground)] font-bold text-lg",
|
|
19963
19993
|
children: appName.charAt(0).toUpperCase()
|
|
19964
19994
|
}
|
|
19965
19995
|
) }),
|
|
@@ -19967,7 +19997,7 @@ var AuthLayout = ({
|
|
|
19967
19997
|
Typography,
|
|
19968
19998
|
{
|
|
19969
19999
|
variant: "body1",
|
|
19970
|
-
className: "text-2xl font-bold text-
|
|
20000
|
+
className: "text-2xl font-bold text-[var(--color-foreground)]",
|
|
19971
20001
|
children: appName
|
|
19972
20002
|
}
|
|
19973
20003
|
)
|
|
@@ -19977,7 +20007,7 @@ var AuthLayout = ({
|
|
|
19977
20007
|
Typography,
|
|
19978
20008
|
{
|
|
19979
20009
|
variant: "h1",
|
|
19980
|
-
className: "text-4xl font-bold text-
|
|
20010
|
+
className: "text-4xl font-bold text-[var(--color-foreground)] leading-tight",
|
|
19981
20011
|
children: [
|
|
19982
20012
|
"Welcome to ",
|
|
19983
20013
|
appName
|
|
@@ -19988,27 +20018,27 @@ var AuthLayout = ({
|
|
|
19988
20018
|
Typography,
|
|
19989
20019
|
{
|
|
19990
20020
|
variant: "body1",
|
|
19991
|
-
className: "text-lg text-
|
|
20021
|
+
className: "text-lg text-[var(--color-foreground)]/80 max-w-md",
|
|
19992
20022
|
children: "Sign in to access your dashboard and manage your account."
|
|
19993
20023
|
}
|
|
19994
20024
|
),
|
|
19995
|
-
/* @__PURE__ */ jsxs(Box, { className: "mt-12 p-6 bg-
|
|
20025
|
+
/* @__PURE__ */ jsxs(Box, { className: "mt-12 p-6 bg-[var(--color-card)]/10 rounded-xl backdrop-blur", children: [
|
|
19996
20026
|
/* @__PURE__ */ jsx(
|
|
19997
20027
|
Typography,
|
|
19998
20028
|
{
|
|
19999
20029
|
variant: "body1",
|
|
20000
|
-
className: "text-
|
|
20030
|
+
className: "text-[var(--color-foreground)]/90 italic",
|
|
20001
20031
|
children: '"This platform has transformed how we work. Highly recommended!"'
|
|
20002
20032
|
}
|
|
20003
20033
|
),
|
|
20004
20034
|
/* @__PURE__ */ jsxs(HStack, { className: "mt-4", gap: "sm", align: "center", children: [
|
|
20005
|
-
/* @__PURE__ */ jsx(Box, { className: "w-10 h-10 bg-
|
|
20035
|
+
/* @__PURE__ */ jsx(Box, { className: "w-10 h-10 bg-[var(--color-card)]/20 rounded-full" }),
|
|
20006
20036
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", children: [
|
|
20007
20037
|
/* @__PURE__ */ jsx(
|
|
20008
20038
|
Typography,
|
|
20009
20039
|
{
|
|
20010
20040
|
variant: "body1",
|
|
20011
|
-
className: "text-
|
|
20041
|
+
className: "text-[var(--color-foreground)] font-medium",
|
|
20012
20042
|
children: "Jane Doe"
|
|
20013
20043
|
}
|
|
20014
20044
|
),
|
|
@@ -20016,7 +20046,7 @@ var AuthLayout = ({
|
|
|
20016
20046
|
Typography,
|
|
20017
20047
|
{
|
|
20018
20048
|
variant: "body1",
|
|
20019
|
-
className: "text-
|
|
20049
|
+
className: "text-[var(--color-foreground)]/60 text-sm",
|
|
20020
20050
|
children: "CEO, Example Co."
|
|
20021
20051
|
}
|
|
20022
20052
|
)
|
|
@@ -20024,8 +20054,8 @@ var AuthLayout = ({
|
|
|
20024
20054
|
] })
|
|
20025
20055
|
] })
|
|
20026
20056
|
] }) }),
|
|
20027
|
-
/* @__PURE__ */ jsx(Box, { className: "absolute -bottom-32 -right-32 w-96 h-96 bg-
|
|
20028
|
-
/* @__PURE__ */ jsx(Box, { className: "absolute -top-16 -right-16 w-64 h-64 bg-
|
|
20057
|
+
/* @__PURE__ */ jsx(Box, { className: "absolute -bottom-32 -right-32 w-96 h-96 bg-[var(--color-card)]/5 rounded-full" }),
|
|
20058
|
+
/* @__PURE__ */ jsx(Box, { className: "absolute -top-16 -right-16 w-64 h-64 bg-[var(--color-card)]/5 rounded-full" })
|
|
20029
20059
|
]
|
|
20030
20060
|
}
|
|
20031
20061
|
),
|
|
@@ -20042,7 +20072,7 @@ var AuthLayout = ({
|
|
|
20042
20072
|
Typography,
|
|
20043
20073
|
{
|
|
20044
20074
|
variant: "body1",
|
|
20045
|
-
className: "text-
|
|
20075
|
+
className: "text-[var(--color-foreground)] font-bold text-xl",
|
|
20046
20076
|
children: appName.charAt(0).toUpperCase()
|
|
20047
20077
|
}
|
|
20048
20078
|
) }),
|
|
@@ -21148,7 +21178,7 @@ function IsometricCanvas({
|
|
|
21148
21178
|
className: cn("relative w-full overflow-hidden rounded-lg", className),
|
|
21149
21179
|
style: { height: viewportSize.height },
|
|
21150
21180
|
"data-testid": "game-canvas-empty",
|
|
21151
|
-
children: /* @__PURE__ */ jsx(Box, { className: "flex items-center justify-center h-full bg-
|
|
21181
|
+
children: /* @__PURE__ */ jsx(Box, { className: "flex items-center justify-center h-full bg-[var(--color-card)] rounded-lg", children: /* @__PURE__ */ jsxs(Stack, { direction: "vertical", gap: "md", align: "center", children: [
|
|
21152
21182
|
/* @__PURE__ */ jsx(Icon, { name: "map", size: "xl" }),
|
|
21153
21183
|
/* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-slate-400", children: t("canvas.emptyMessage") || "No map data loaded" })
|
|
21154
21184
|
] }) })
|
|
@@ -21680,7 +21710,7 @@ ScaledDiagram.displayName = "ScaledDiagram";
|
|
|
21680
21710
|
init_Stack();
|
|
21681
21711
|
init_Box();
|
|
21682
21712
|
init_cn();
|
|
21683
|
-
var MarkdownContent =
|
|
21713
|
+
var MarkdownContent = React125__default.memo(
|
|
21684
21714
|
({ content, direction, className }) => {
|
|
21685
21715
|
const { t: _t } = useTranslate();
|
|
21686
21716
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -21746,7 +21776,7 @@ var MarkdownContent = React124__default.memo(
|
|
|
21746
21776
|
"th",
|
|
21747
21777
|
{
|
|
21748
21778
|
...props,
|
|
21749
|
-
className: "border border-gray-300 dark:border-gray-600 bg-
|
|
21779
|
+
className: "border border-gray-300 dark:border-gray-600 bg-[var(--color-muted)] px-4 py-2 text-left font-semibold",
|
|
21750
21780
|
children
|
|
21751
21781
|
}
|
|
21752
21782
|
);
|
|
@@ -21868,7 +21898,7 @@ function computeFoldRegions(code) {
|
|
|
21868
21898
|
}
|
|
21869
21899
|
var LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
21870
21900
|
var HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
21871
|
-
var CodeBlock =
|
|
21901
|
+
var CodeBlock = React125__default.memo(
|
|
21872
21902
|
({
|
|
21873
21903
|
code: rawCode,
|
|
21874
21904
|
language = "text",
|
|
@@ -22029,7 +22059,7 @@ var CodeBlock = React124__default.memo(
|
|
|
22029
22059
|
{
|
|
22030
22060
|
justify: "between",
|
|
22031
22061
|
align: "center",
|
|
22032
|
-
className: "px-3 py-2 bg-
|
|
22062
|
+
className: "px-3 py-2 bg-[var(--color-card)] rounded-t-lg border-b border-gray-700",
|
|
22033
22063
|
children: [
|
|
22034
22064
|
showLanguageBadge && /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", children: language }),
|
|
22035
22065
|
showCopyButton && /* @__PURE__ */ jsx(
|
|
@@ -22987,7 +23017,7 @@ var StateMachineView = ({
|
|
|
22987
23017
|
style: { top: title ? 30 : 0 },
|
|
22988
23018
|
children: [
|
|
22989
23019
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
22990
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
23020
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React125__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
22991
23021
|
StateNode,
|
|
22992
23022
|
{
|
|
22993
23023
|
state,
|
|
@@ -28513,7 +28543,7 @@ function CraftingRecipe({
|
|
|
28513
28543
|
className
|
|
28514
28544
|
}) {
|
|
28515
28545
|
const eventBus = useEventBus();
|
|
28516
|
-
const handleCraft =
|
|
28546
|
+
const handleCraft = React125.useCallback(() => {
|
|
28517
28547
|
onCraft?.();
|
|
28518
28548
|
if (craftEvent) {
|
|
28519
28549
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -28530,7 +28560,7 @@ function CraftingRecipe({
|
|
|
28530
28560
|
children: [
|
|
28531
28561
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
28532
28562
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
28533
|
-
return /* @__PURE__ */ jsxs(
|
|
28563
|
+
return /* @__PURE__ */ jsxs(React125.Fragment, { children: [
|
|
28534
28564
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
28535
28565
|
ItemSlot,
|
|
28536
28566
|
{
|
|
@@ -28819,8 +28849,8 @@ function DPad({
|
|
|
28819
28849
|
}) {
|
|
28820
28850
|
const eventBus = useEventBus();
|
|
28821
28851
|
const sizes = sizeMap15[size];
|
|
28822
|
-
const [activeDirections, setActiveDirections] =
|
|
28823
|
-
const handlePress =
|
|
28852
|
+
const [activeDirections, setActiveDirections] = React125.useState(/* @__PURE__ */ new Set());
|
|
28853
|
+
const handlePress = React125.useCallback(
|
|
28824
28854
|
(direction) => {
|
|
28825
28855
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
28826
28856
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -28828,7 +28858,7 @@ function DPad({
|
|
|
28828
28858
|
},
|
|
28829
28859
|
[directionEvent, eventBus, onDirection]
|
|
28830
28860
|
);
|
|
28831
|
-
const handleRelease =
|
|
28861
|
+
const handleRelease = React125.useCallback(
|
|
28832
28862
|
(direction) => {
|
|
28833
28863
|
setActiveDirections((prev) => {
|
|
28834
28864
|
const next = new Set(prev);
|
|
@@ -29639,7 +29669,7 @@ var DataList = ({
|
|
|
29639
29669
|
}) => {
|
|
29640
29670
|
const eventBus = useEventBus();
|
|
29641
29671
|
const { t } = useTranslate();
|
|
29642
|
-
const [visibleCount, setVisibleCount] =
|
|
29672
|
+
const [visibleCount, setVisibleCount] = React125__default.useState(pageSize || Infinity);
|
|
29643
29673
|
const fields = fieldsProp ?? columnsProp ?? [];
|
|
29644
29674
|
const allData = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
29645
29675
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
@@ -29676,7 +29706,7 @@ var DataList = ({
|
|
|
29676
29706
|
const items2 = data.map((item) => item);
|
|
29677
29707
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
29678
29708
|
const contentField = titleField?.name ?? fields[0]?.name ?? "";
|
|
29679
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
29709
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React125__default.Fragment, { children: [
|
|
29680
29710
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
29681
29711
|
group.items.map((itemData, index) => {
|
|
29682
29712
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -29879,7 +29909,7 @@ var DataList = ({
|
|
|
29879
29909
|
className
|
|
29880
29910
|
),
|
|
29881
29911
|
children: [
|
|
29882
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
29912
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React125__default.Fragment, { children: [
|
|
29883
29913
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
29884
29914
|
group.items.map(
|
|
29885
29915
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -30946,7 +30976,7 @@ var WizardProgress = ({
|
|
|
30946
30976
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: steps.map((step, index) => {
|
|
30947
30977
|
const isActive = index === currentStep;
|
|
30948
30978
|
const isCompleted = index < currentStep;
|
|
30949
|
-
return /* @__PURE__ */ jsxs(
|
|
30979
|
+
return /* @__PURE__ */ jsxs(React125__default.Fragment, { children: [
|
|
30950
30980
|
/* @__PURE__ */ jsx(
|
|
30951
30981
|
"button",
|
|
30952
30982
|
{
|
|
@@ -31722,7 +31752,7 @@ var sizeMap17 = {
|
|
|
31722
31752
|
lg: "text-base px-4 py-2"
|
|
31723
31753
|
};
|
|
31724
31754
|
var variantMap2 = {
|
|
31725
|
-
default: "bg-
|
|
31755
|
+
default: "bg-[var(--color-card)]/80 border-gray-700",
|
|
31726
31756
|
primary: "bg-blue-900/80 border-blue-700",
|
|
31727
31757
|
success: "bg-green-900/80 border-green-700",
|
|
31728
31758
|
warning: "bg-yellow-900/80 border-yellow-700",
|
|
@@ -31783,7 +31813,7 @@ function StatBadge({
|
|
|
31783
31813
|
animated: true
|
|
31784
31814
|
}
|
|
31785
31815
|
),
|
|
31786
|
-
format === "text" && /* @__PURE__ */ jsx("span", { className: "font-bold text-
|
|
31816
|
+
format === "text" && /* @__PURE__ */ jsx("span", { className: "font-bold text-[var(--color-foreground)]", children: value })
|
|
31787
31817
|
]
|
|
31788
31818
|
}
|
|
31789
31819
|
);
|
|
@@ -31816,7 +31846,7 @@ function InventoryGrid({
|
|
|
31816
31846
|
const eventBus = useEventBus();
|
|
31817
31847
|
const slotCount = totalSlots ?? items.length;
|
|
31818
31848
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
31819
|
-
const handleSelect =
|
|
31849
|
+
const handleSelect = React125.useCallback(
|
|
31820
31850
|
(id) => {
|
|
31821
31851
|
onSelect?.(id);
|
|
31822
31852
|
if (selectEvent) {
|
|
@@ -32005,15 +32035,15 @@ function GameCanvas2D({
|
|
|
32005
32035
|
fps = 60,
|
|
32006
32036
|
className
|
|
32007
32037
|
}) {
|
|
32008
|
-
const canvasRef =
|
|
32009
|
-
const rafRef =
|
|
32010
|
-
const frameRef =
|
|
32011
|
-
const lastTimeRef =
|
|
32012
|
-
const onDrawRef =
|
|
32038
|
+
const canvasRef = React125.useRef(null);
|
|
32039
|
+
const rafRef = React125.useRef(0);
|
|
32040
|
+
const frameRef = React125.useRef(0);
|
|
32041
|
+
const lastTimeRef = React125.useRef(0);
|
|
32042
|
+
const onDrawRef = React125.useRef(onDraw);
|
|
32013
32043
|
onDrawRef.current = onDraw;
|
|
32014
|
-
const onTickRef =
|
|
32044
|
+
const onTickRef = React125.useRef(onTick);
|
|
32015
32045
|
onTickRef.current = onTick;
|
|
32016
|
-
|
|
32046
|
+
React125.useEffect(() => {
|
|
32017
32047
|
const canvas = canvasRef.current;
|
|
32018
32048
|
if (!canvas) return;
|
|
32019
32049
|
const ctx = canvas.getContext("2d");
|
|
@@ -32082,7 +32112,7 @@ function HealthPanel({
|
|
|
32082
32112
|
Box,
|
|
32083
32113
|
{
|
|
32084
32114
|
className: cn(
|
|
32085
|
-
"rounded-lg bg-
|
|
32115
|
+
"rounded-lg bg-[var(--color-card)]/90 border border-gray-700 backdrop-blur-sm",
|
|
32086
32116
|
sizes.padding,
|
|
32087
32117
|
className
|
|
32088
32118
|
),
|
|
@@ -32188,7 +32218,7 @@ function ScoreBoard({
|
|
|
32188
32218
|
Card,
|
|
32189
32219
|
{
|
|
32190
32220
|
className: cn(
|
|
32191
|
-
"bg-
|
|
32221
|
+
"bg-[var(--color-card)]/90 border-gray-700 backdrop-blur-sm",
|
|
32192
32222
|
className
|
|
32193
32223
|
),
|
|
32194
32224
|
children: /* @__PURE__ */ jsx(CardContent, { className: "p-3", children: /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-3 flex-wrap", children: [
|
|
@@ -32284,7 +32314,7 @@ function TurnPanel({
|
|
|
32284
32314
|
className
|
|
32285
32315
|
}) {
|
|
32286
32316
|
const eventBus = useEventBus();
|
|
32287
|
-
const handleAction =
|
|
32317
|
+
const handleAction = React125.useCallback(
|
|
32288
32318
|
(event) => {
|
|
32289
32319
|
if (event) {
|
|
32290
32320
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -32296,7 +32326,7 @@ function TurnPanel({
|
|
|
32296
32326
|
Box,
|
|
32297
32327
|
{
|
|
32298
32328
|
className: cn(
|
|
32299
|
-
"flex items-center gap-3 rounded-lg bg-
|
|
32329
|
+
"flex items-center gap-3 rounded-lg bg-[var(--color-card)]/90 border border-gray-700 backdrop-blur-sm px-3 py-2",
|
|
32300
32330
|
className
|
|
32301
32331
|
),
|
|
32302
32332
|
children: [
|
|
@@ -32348,7 +32378,7 @@ function EnemyPlate({
|
|
|
32348
32378
|
Box,
|
|
32349
32379
|
{
|
|
32350
32380
|
className: cn(
|
|
32351
|
-
"inline-flex flex-col gap-1 rounded-lg bg-
|
|
32381
|
+
"inline-flex flex-col gap-1 rounded-lg bg-[var(--color-card)]/90 border border-gray-700 backdrop-blur-sm px-3 py-1.5",
|
|
32352
32382
|
"min-w-[120px]",
|
|
32353
32383
|
className
|
|
32354
32384
|
),
|
|
@@ -32359,7 +32389,7 @@ function EnemyPlate({
|
|
|
32359
32389
|
{
|
|
32360
32390
|
variant: "caption",
|
|
32361
32391
|
weight: "bold",
|
|
32362
|
-
className: "text-
|
|
32392
|
+
className: "text-[var(--color-foreground)] truncate",
|
|
32363
32393
|
children: name
|
|
32364
32394
|
}
|
|
32365
32395
|
),
|
|
@@ -32420,7 +32450,7 @@ function UnitCommandBar({
|
|
|
32420
32450
|
className
|
|
32421
32451
|
}) {
|
|
32422
32452
|
const eventBus = useEventBus();
|
|
32423
|
-
const handleCommand =
|
|
32453
|
+
const handleCommand = React125.useCallback(
|
|
32424
32454
|
(event) => {
|
|
32425
32455
|
if (event) {
|
|
32426
32456
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -32432,7 +32462,7 @@ function UnitCommandBar({
|
|
|
32432
32462
|
Box,
|
|
32433
32463
|
{
|
|
32434
32464
|
className: cn(
|
|
32435
|
-
"flex items-center gap-1.5 rounded-lg bg-
|
|
32465
|
+
"flex items-center gap-1.5 rounded-lg bg-[var(--color-card)]/90 border border-gray-700 backdrop-blur-sm px-2 py-1.5",
|
|
32436
32466
|
className
|
|
32437
32467
|
),
|
|
32438
32468
|
children: commands.map((command, i) => /* @__PURE__ */ jsxs(Box, { className: "flex flex-col items-center gap-0.5", children: [
|
|
@@ -32666,7 +32696,7 @@ function DialogueBox({
|
|
|
32666
32696
|
tabIndex: 0,
|
|
32667
32697
|
role: "dialog",
|
|
32668
32698
|
"aria-label": "Dialogue",
|
|
32669
|
-
children: /* @__PURE__ */ jsx("div", { className: "mx-4 my-4 bg-
|
|
32699
|
+
children: /* @__PURE__ */ jsx("div", { className: "mx-4 my-4 bg-[var(--color-card)] bg-opacity-95 border-2 border-gray-600 rounded-lg overflow-hidden", children: /* @__PURE__ */ jsxs("div", { className: "flex", children: [
|
|
32670
32700
|
dialogue.portrait && /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 p-4 border-r border-gray-700", children: /* @__PURE__ */ jsx(
|
|
32671
32701
|
"img",
|
|
32672
32702
|
{
|
|
@@ -32678,7 +32708,7 @@ function DialogueBox({
|
|
|
32678
32708
|
) }),
|
|
32679
32709
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 p-4", children: [
|
|
32680
32710
|
/* @__PURE__ */ jsx("div", { className: "text-yellow-400 font-bold mb-2", children: dialogue.speaker }),
|
|
32681
|
-
/* @__PURE__ */ jsxs("div", { className: "text-
|
|
32711
|
+
/* @__PURE__ */ jsxs("div", { className: "text-[var(--color-foreground)] text-lg leading-relaxed min-h-[60px]", children: [
|
|
32682
32712
|
displayedText,
|
|
32683
32713
|
isTyping && /* @__PURE__ */ jsx("span", { className: "animate-pulse", children: "\u258C" })
|
|
32684
32714
|
] }),
|
|
@@ -32688,8 +32718,8 @@ function DialogueBox({
|
|
|
32688
32718
|
type: "button",
|
|
32689
32719
|
className: cn(
|
|
32690
32720
|
"block w-full text-left px-4 py-2 rounded transition-colors",
|
|
32691
|
-
"hover:bg-
|
|
32692
|
-
selectedChoice === index ? "bg-
|
|
32721
|
+
"hover:bg-[var(--color-surface,#374151)] focus:outline-none focus:ring-2 focus:ring-yellow-400",
|
|
32722
|
+
selectedChoice === index ? "bg-[var(--color-surface,#374151)] text-yellow-400" : "bg-[var(--color-card)] text-[var(--color-foreground)]"
|
|
32693
32723
|
),
|
|
32694
32724
|
onClick: (e) => {
|
|
32695
32725
|
e.stopPropagation();
|
|
@@ -32806,7 +32836,7 @@ function InventoryPanel({
|
|
|
32806
32836
|
/* @__PURE__ */ jsx(
|
|
32807
32837
|
"div",
|
|
32808
32838
|
{
|
|
32809
|
-
className: "grid gap-1 bg-
|
|
32839
|
+
className: "grid gap-1 bg-[var(--color-card)] p-2 rounded-lg border border-gray-700",
|
|
32810
32840
|
style: {
|
|
32811
32841
|
gridTemplateColumns: `repeat(${safeColumns}, ${slotSize}px)`,
|
|
32812
32842
|
gridTemplateRows: `repeat(${rows}, ${slotSize}px)`
|
|
@@ -32817,9 +32847,9 @@ function InventoryPanel({
|
|
|
32817
32847
|
type: "button",
|
|
32818
32848
|
className: cn(
|
|
32819
32849
|
"relative flex items-center justify-center",
|
|
32820
|
-
"bg-
|
|
32821
|
-
"hover:bg-
|
|
32822
|
-
selectedSlot === index ? "border-yellow-400 bg-
|
|
32850
|
+
"bg-[var(--color-card)] border rounded transition-colors",
|
|
32851
|
+
"hover:bg-[var(--color-surface,#374151)] focus:outline-none focus:ring-2 focus:ring-blue-500",
|
|
32852
|
+
selectedSlot === index ? "border-yellow-400 bg-[var(--color-surface,#374151)]" : "border-gray-600"
|
|
32823
32853
|
),
|
|
32824
32854
|
style: { width: slotSize, height: slotSize },
|
|
32825
32855
|
onClick: () => handleSlotClick(index),
|
|
@@ -32849,14 +32879,14 @@ function InventoryPanel({
|
|
|
32849
32879
|
showTooltips && hoveredItem && /* @__PURE__ */ jsxs(
|
|
32850
32880
|
"div",
|
|
32851
32881
|
{
|
|
32852
|
-
className: "fixed z-50 bg-
|
|
32882
|
+
className: "fixed z-50 bg-[var(--color-card)] border border-gray-600 rounded-lg p-2 shadow-lg pointer-events-none",
|
|
32853
32883
|
style: {
|
|
32854
32884
|
left: tooltipPosition.x,
|
|
32855
32885
|
top: tooltipPosition.y,
|
|
32856
32886
|
maxWidth: 200
|
|
32857
32887
|
},
|
|
32858
32888
|
children: [
|
|
32859
|
-
/* @__PURE__ */ jsx("div", { className: "font-semibold text-
|
|
32889
|
+
/* @__PURE__ */ jsx("div", { className: "font-semibold text-[var(--color-foreground)]", children: hoveredItem.name || hoveredItem.type }),
|
|
32860
32890
|
hoveredItem.description && /* @__PURE__ */ jsx("div", { className: "text-sm text-gray-400 mt-1", children: hoveredItem.description }),
|
|
32861
32891
|
/* @__PURE__ */ jsxs("div", { className: "text-xs text-gray-500 mt-1", children: [
|
|
32862
32892
|
"Quantity: ",
|
|
@@ -32872,9 +32902,9 @@ function InventoryPanel({
|
|
|
32872
32902
|
init_cn();
|
|
32873
32903
|
init_useEventBus();
|
|
32874
32904
|
var variantMap3 = {
|
|
32875
|
-
primary: "bg-
|
|
32876
|
-
secondary: "bg-
|
|
32877
|
-
ghost: "bg-transparent hover:bg-white/10 text-
|
|
32905
|
+
primary: "bg-[var(--color-primary)] hover:bg-blue-500 text-[var(--color-primary-foreground)] border-blue-400 shadow-lg shadow-blue-500/25",
|
|
32906
|
+
secondary: "bg-[var(--color-surface,#374151)] hover:bg-gray-600 text-[var(--color-foreground)] border-gray-500",
|
|
32907
|
+
ghost: "bg-transparent hover:bg-white/10 text-[var(--color-foreground)] border-white/20"
|
|
32878
32908
|
};
|
|
32879
32909
|
function GameMenu({
|
|
32880
32910
|
title,
|
|
@@ -32894,7 +32924,7 @@ function GameMenu({
|
|
|
32894
32924
|
} catch {
|
|
32895
32925
|
}
|
|
32896
32926
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
32897
|
-
const handleOptionClick =
|
|
32927
|
+
const handleOptionClick = React125.useCallback(
|
|
32898
32928
|
(option) => {
|
|
32899
32929
|
if (option.event && eventBus) {
|
|
32900
32930
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -32931,7 +32961,7 @@ function GameMenu({
|
|
|
32931
32961
|
/* @__PURE__ */ jsx(
|
|
32932
32962
|
"h1",
|
|
32933
32963
|
{
|
|
32934
|
-
className: "text-5xl md:text-7xl font-bold text-
|
|
32964
|
+
className: "text-5xl md:text-7xl font-bold text-[var(--color-foreground)] tracking-tight",
|
|
32935
32965
|
style: {
|
|
32936
32966
|
textShadow: "0 4px 12px rgba(0,0,0,0.5)"
|
|
32937
32967
|
},
|
|
@@ -32991,9 +33021,9 @@ var variantColors = {
|
|
|
32991
33021
|
}
|
|
32992
33022
|
};
|
|
32993
33023
|
var buttonVariants = {
|
|
32994
|
-
primary: "bg-
|
|
32995
|
-
secondary: "bg-
|
|
32996
|
-
ghost: "bg-transparent hover:bg-white/10 text-
|
|
33024
|
+
primary: "bg-[var(--color-primary)] hover:bg-blue-500 text-[var(--color-primary-foreground)] border-blue-400",
|
|
33025
|
+
secondary: "bg-[var(--color-surface,#374151)] hover:bg-gray-600 text-[var(--color-foreground)] border-gray-500",
|
|
33026
|
+
ghost: "bg-transparent hover:bg-white/10 text-[var(--color-foreground)] border-white/20"
|
|
32997
33027
|
};
|
|
32998
33028
|
function formatTime3(ms) {
|
|
32999
33029
|
const seconds = Math.floor(ms / 1e3);
|
|
@@ -33021,7 +33051,7 @@ function GameOverScreen({
|
|
|
33021
33051
|
} catch {
|
|
33022
33052
|
}
|
|
33023
33053
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
33024
|
-
const handleActionClick =
|
|
33054
|
+
const handleActionClick = React125.useCallback(
|
|
33025
33055
|
(action) => {
|
|
33026
33056
|
if (action.event && eventBus) {
|
|
33027
33057
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -33074,7 +33104,7 @@ function GameOverScreen({
|
|
|
33074
33104
|
}
|
|
33075
33105
|
return /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
33076
33106
|
/* @__PURE__ */ jsx("div", { className: "text-gray-400 text-sm mb-1", children: stat.label }),
|
|
33077
|
-
/* @__PURE__ */ jsxs("div", { className: "text-
|
|
33107
|
+
/* @__PURE__ */ jsxs("div", { className: "text-[var(--color-foreground)] text-2xl font-bold flex items-center justify-center gap-2", children: [
|
|
33078
33108
|
stat.icon && /* @__PURE__ */ jsx("span", { children: stat.icon }),
|
|
33079
33109
|
/* @__PURE__ */ jsx("span", { className: "tabular-nums", children: displayValue })
|
|
33080
33110
|
] })
|
|
@@ -34269,7 +34299,7 @@ var Lightbox = ({
|
|
|
34269
34299
|
className: cn(
|
|
34270
34300
|
"absolute top-4 right-4 z-10",
|
|
34271
34301
|
"p-2 rounded-full",
|
|
34272
|
-
"text-
|
|
34302
|
+
"text-[var(--color-foreground)] bg-[var(--color-card)]",
|
|
34273
34303
|
"hover:bg-opacity-70 transition-opacity",
|
|
34274
34304
|
"focus:outline-none focus:ring-2 focus:ring-white"
|
|
34275
34305
|
),
|
|
@@ -34288,7 +34318,7 @@ var Lightbox = ({
|
|
|
34288
34318
|
className: cn(
|
|
34289
34319
|
"absolute left-4 z-10",
|
|
34290
34320
|
"p-2 rounded-full",
|
|
34291
|
-
"text-
|
|
34321
|
+
"text-[var(--color-foreground)] bg-[var(--color-card)]",
|
|
34292
34322
|
"hover:bg-opacity-70 transition-opacity",
|
|
34293
34323
|
"focus:outline-none focus:ring-2 focus:ring-white"
|
|
34294
34324
|
),
|
|
@@ -34325,7 +34355,7 @@ var Lightbox = ({
|
|
|
34325
34355
|
className: cn(
|
|
34326
34356
|
"absolute right-4 z-10",
|
|
34327
34357
|
"p-2 rounded-full",
|
|
34328
|
-
"text-
|
|
34358
|
+
"text-[var(--color-foreground)] bg-[var(--color-card)]",
|
|
34329
34359
|
"hover:bg-opacity-70 transition-opacity",
|
|
34330
34360
|
"focus:outline-none focus:ring-2 focus:ring-white"
|
|
34331
34361
|
),
|
|
@@ -34334,12 +34364,12 @@ var Lightbox = ({
|
|
|
34334
34364
|
}
|
|
34335
34365
|
),
|
|
34336
34366
|
/* @__PURE__ */ jsxs("div", { className: "absolute bottom-4 left-0 right-0 text-center", children: [
|
|
34337
|
-
showCounter && safeImages.length > 1 && /* @__PURE__ */ jsxs("div", { className: "text-
|
|
34367
|
+
showCounter && safeImages.length > 1 && /* @__PURE__ */ jsxs("div", { className: "text-[var(--color-foreground)] text-sm mb-1", children: [
|
|
34338
34368
|
index + 1,
|
|
34339
34369
|
" of ",
|
|
34340
34370
|
safeImages.length
|
|
34341
34371
|
] }),
|
|
34342
|
-
currentImage?.caption && /* @__PURE__ */ jsx("div", { className: "text-
|
|
34372
|
+
currentImage?.caption && /* @__PURE__ */ jsx("div", { className: "text-[var(--color-foreground)] text-sm opacity-80 px-8", children: currentImage.caption })
|
|
34343
34373
|
] })
|
|
34344
34374
|
]
|
|
34345
34375
|
}
|
|
@@ -36426,7 +36456,7 @@ var DocumentViewer = ({
|
|
|
36426
36456
|
DocumentViewer.displayName = "DocumentViewer";
|
|
36427
36457
|
init_useEventBus();
|
|
36428
36458
|
function extractTitle(children) {
|
|
36429
|
-
if (!
|
|
36459
|
+
if (!React125__default.isValidElement(children)) return void 0;
|
|
36430
36460
|
const props = children.props;
|
|
36431
36461
|
if (typeof props.title === "string") {
|
|
36432
36462
|
return props.title;
|
|
@@ -36486,7 +36516,7 @@ function LinearView({
|
|
|
36486
36516
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
36487
36517
|
const isDone = i < currentIdx;
|
|
36488
36518
|
const isCurrent = i === currentIdx;
|
|
36489
|
-
return /* @__PURE__ */ jsxs(
|
|
36519
|
+
return /* @__PURE__ */ jsxs(React125__default.Fragment, { children: [
|
|
36490
36520
|
i > 0 && /* @__PURE__ */ jsx(
|
|
36491
36521
|
Typography,
|
|
36492
36522
|
{
|
|
@@ -37162,7 +37192,7 @@ var Form = ({
|
|
|
37162
37192
|
const normalizedInitialData = initialData ?? {};
|
|
37163
37193
|
const resolvedEntity = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
37164
37194
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
37165
|
-
const entityDerivedFields =
|
|
37195
|
+
const entityDerivedFields = React125__default.useMemo(() => {
|
|
37166
37196
|
if (fields && fields.length > 0) return void 0;
|
|
37167
37197
|
if (!resolvedEntity) return void 0;
|
|
37168
37198
|
return resolvedEntity.fields.map(
|
|
@@ -37181,14 +37211,14 @@ var Form = ({
|
|
|
37181
37211
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
37182
37212
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
37183
37213
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
37184
|
-
const [formData, setFormData] =
|
|
37214
|
+
const [formData, setFormData] = React125__default.useState(
|
|
37185
37215
|
normalizedInitialData
|
|
37186
37216
|
);
|
|
37187
|
-
const [collapsedSections, setCollapsedSections] =
|
|
37217
|
+
const [collapsedSections, setCollapsedSections] = React125__default.useState(
|
|
37188
37218
|
/* @__PURE__ */ new Set()
|
|
37189
37219
|
);
|
|
37190
37220
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
37191
|
-
const evalContext =
|
|
37221
|
+
const evalContext = React125__default.useMemo(
|
|
37192
37222
|
() => ({
|
|
37193
37223
|
formValues: formData,
|
|
37194
37224
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -37197,13 +37227,13 @@ var Form = ({
|
|
|
37197
37227
|
}),
|
|
37198
37228
|
[formData, externalContext]
|
|
37199
37229
|
);
|
|
37200
|
-
|
|
37230
|
+
React125__default.useEffect(() => {
|
|
37201
37231
|
const data = initialData;
|
|
37202
37232
|
if (data && Object.keys(data).length > 0) {
|
|
37203
37233
|
setFormData(data);
|
|
37204
37234
|
}
|
|
37205
37235
|
}, [initialData]);
|
|
37206
|
-
const processCalculations =
|
|
37236
|
+
const processCalculations = React125__default.useCallback(
|
|
37207
37237
|
(changedFieldId, newFormData) => {
|
|
37208
37238
|
if (!hiddenCalculations.length) return;
|
|
37209
37239
|
const context = {
|
|
@@ -37228,7 +37258,7 @@ var Form = ({
|
|
|
37228
37258
|
},
|
|
37229
37259
|
[hiddenCalculations, externalContext, eventBus]
|
|
37230
37260
|
);
|
|
37231
|
-
const checkViolations =
|
|
37261
|
+
const checkViolations = React125__default.useCallback(
|
|
37232
37262
|
(changedFieldId, newFormData) => {
|
|
37233
37263
|
if (!violationTriggers.length) return;
|
|
37234
37264
|
const context = {
|
|
@@ -37265,7 +37295,7 @@ var Form = ({
|
|
|
37265
37295
|
processCalculations(name, newFormData);
|
|
37266
37296
|
checkViolations(name, newFormData);
|
|
37267
37297
|
};
|
|
37268
|
-
const isFieldVisible =
|
|
37298
|
+
const isFieldVisible = React125__default.useCallback(
|
|
37269
37299
|
(fieldName) => {
|
|
37270
37300
|
const condition = conditionalFields[fieldName];
|
|
37271
37301
|
if (!condition) return true;
|
|
@@ -37273,7 +37303,7 @@ var Form = ({
|
|
|
37273
37303
|
},
|
|
37274
37304
|
[conditionalFields, evalContext]
|
|
37275
37305
|
);
|
|
37276
|
-
const isSectionVisible =
|
|
37306
|
+
const isSectionVisible = React125__default.useCallback(
|
|
37277
37307
|
(section) => {
|
|
37278
37308
|
if (!section.condition) return true;
|
|
37279
37309
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -37305,7 +37335,7 @@ var Form = ({
|
|
|
37305
37335
|
eventBus.emit(`UI:${onCancel}`);
|
|
37306
37336
|
}
|
|
37307
37337
|
};
|
|
37308
|
-
const renderField =
|
|
37338
|
+
const renderField = React125__default.useCallback(
|
|
37309
37339
|
(field) => {
|
|
37310
37340
|
const fieldName = field.name || field.field;
|
|
37311
37341
|
if (!fieldName) return null;
|
|
@@ -37326,7 +37356,7 @@ var Form = ({
|
|
|
37326
37356
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
37327
37357
|
);
|
|
37328
37358
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
37329
|
-
const normalizedFields =
|
|
37359
|
+
const normalizedFields = React125__default.useMemo(() => {
|
|
37330
37360
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
37331
37361
|
return effectiveFields.map((field) => {
|
|
37332
37362
|
if (typeof field === "string") {
|
|
@@ -37348,7 +37378,7 @@ var Form = ({
|
|
|
37348
37378
|
return field;
|
|
37349
37379
|
});
|
|
37350
37380
|
}, [effectiveFields, resolvedEntity]);
|
|
37351
|
-
const schemaFields =
|
|
37381
|
+
const schemaFields = React125__default.useMemo(() => {
|
|
37352
37382
|
if (normalizedFields.length === 0) return null;
|
|
37353
37383
|
if (isDebugEnabled()) {
|
|
37354
37384
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -37358,7 +37388,7 @@ var Form = ({
|
|
|
37358
37388
|
}
|
|
37359
37389
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
37360
37390
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
37361
|
-
const sectionElements =
|
|
37391
|
+
const sectionElements = React125__default.useMemo(() => {
|
|
37362
37392
|
if (!sections || sections.length === 0) return null;
|
|
37363
37393
|
return sections.map((section) => {
|
|
37364
37394
|
if (!isSectionVisible(section)) {
|
|
@@ -38796,7 +38826,7 @@ var List2 = ({
|
|
|
38796
38826
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
38797
38827
|
return [];
|
|
38798
38828
|
}, [entity]);
|
|
38799
|
-
const getItemActions =
|
|
38829
|
+
const getItemActions = React125__default.useCallback(
|
|
38800
38830
|
(item) => {
|
|
38801
38831
|
if (!itemActions) return [];
|
|
38802
38832
|
if (typeof itemActions === "function") {
|
|
@@ -39231,7 +39261,7 @@ var MediaGallery = ({
|
|
|
39231
39261
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
39232
39262
|
);
|
|
39233
39263
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
39234
|
-
const items =
|
|
39264
|
+
const items = React125__default.useMemo(() => {
|
|
39235
39265
|
if (propItems) return propItems;
|
|
39236
39266
|
if (entityData.length === 0) return [];
|
|
39237
39267
|
return entityData.map((record, idx) => ({
|
|
@@ -39394,7 +39424,7 @@ var MediaGallery = ({
|
|
|
39394
39424
|
MediaGallery.displayName = "MediaGallery";
|
|
39395
39425
|
init_useEventBus();
|
|
39396
39426
|
function extractTitle2(children) {
|
|
39397
|
-
if (!
|
|
39427
|
+
if (!React125__default.isValidElement(children)) return void 0;
|
|
39398
39428
|
const props = children.props;
|
|
39399
39429
|
if (typeof props.title === "string") {
|
|
39400
39430
|
return props.title;
|
|
@@ -40080,7 +40110,7 @@ var PageHeader = ({
|
|
|
40080
40110
|
info: "bg-info/10 text-info"
|
|
40081
40111
|
};
|
|
40082
40112
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
40083
|
-
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(
|
|
40113
|
+
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(React125__default.Fragment, { children: [
|
|
40084
40114
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
40085
40115
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
40086
40116
|
"a",
|
|
@@ -40239,7 +40269,7 @@ function subscribeToDebugEvents(listener) {
|
|
|
40239
40269
|
|
|
40240
40270
|
// components/organisms/debug/hooks/useDebugData.ts
|
|
40241
40271
|
function useDebugData() {
|
|
40242
|
-
const [data, setData] =
|
|
40272
|
+
const [data, setData] = React125.useState(() => ({
|
|
40243
40273
|
traits: [],
|
|
40244
40274
|
ticks: [],
|
|
40245
40275
|
guards: [],
|
|
@@ -40253,7 +40283,7 @@ function useDebugData() {
|
|
|
40253
40283
|
},
|
|
40254
40284
|
lastUpdate: Date.now()
|
|
40255
40285
|
}));
|
|
40256
|
-
|
|
40286
|
+
React125.useEffect(() => {
|
|
40257
40287
|
const updateData = () => {
|
|
40258
40288
|
setData({
|
|
40259
40289
|
traits: getAllTraits(),
|
|
@@ -40310,6 +40340,259 @@ function onDebugToggle(listener) {
|
|
|
40310
40340
|
// components/organisms/debug/RuntimeDebugger.tsx
|
|
40311
40341
|
init_Typography();
|
|
40312
40342
|
|
|
40343
|
+
// components/organisms/debug/WalkMinimap.tsx
|
|
40344
|
+
init_Box();
|
|
40345
|
+
init_Stack();
|
|
40346
|
+
init_Typography();
|
|
40347
|
+
function layoutGraph(states, transitions, initialState, width, height) {
|
|
40348
|
+
if (states.length === 0) return [];
|
|
40349
|
+
const layers = /* @__PURE__ */ new Map();
|
|
40350
|
+
const queue = [initialState];
|
|
40351
|
+
layers.set(initialState, 0);
|
|
40352
|
+
while (queue.length > 0) {
|
|
40353
|
+
const current = queue.shift();
|
|
40354
|
+
const layer = layers.get(current);
|
|
40355
|
+
for (const tr of transitions) {
|
|
40356
|
+
if (tr.from === current && !layers.has(tr.to)) {
|
|
40357
|
+
layers.set(tr.to, layer + 1);
|
|
40358
|
+
queue.push(tr.to);
|
|
40359
|
+
}
|
|
40360
|
+
}
|
|
40361
|
+
}
|
|
40362
|
+
for (const s of states) {
|
|
40363
|
+
if (!layers.has(s)) layers.set(s, layers.size > 0 ? Math.max(...layers.values()) + 1 : 0);
|
|
40364
|
+
}
|
|
40365
|
+
const layerGroups = /* @__PURE__ */ new Map();
|
|
40366
|
+
for (const [state, layer] of layers) {
|
|
40367
|
+
const group = layerGroups.get(layer) ?? [];
|
|
40368
|
+
group.push(state);
|
|
40369
|
+
layerGroups.set(layer, group);
|
|
40370
|
+
}
|
|
40371
|
+
const maxLayer = Math.max(...layerGroups.keys(), 0);
|
|
40372
|
+
const padX = 24;
|
|
40373
|
+
const padY = 20;
|
|
40374
|
+
const usableW = width - padX * 2;
|
|
40375
|
+
const usableH = height - padY * 2;
|
|
40376
|
+
const positions = [];
|
|
40377
|
+
for (const [layer, group] of layerGroups) {
|
|
40378
|
+
const y = maxLayer === 0 ? usableH / 2 + padY : padY + layer / maxLayer * usableH;
|
|
40379
|
+
for (let i = 0; i < group.length; i++) {
|
|
40380
|
+
const x = group.length === 1 ? width / 2 : padX + i / (group.length - 1) * usableW;
|
|
40381
|
+
positions.push({ x, y, state: group[i] });
|
|
40382
|
+
}
|
|
40383
|
+
}
|
|
40384
|
+
return positions;
|
|
40385
|
+
}
|
|
40386
|
+
function WalkMinimap() {
|
|
40387
|
+
const [walkStep, setWalkStep] = React125.useState(null);
|
|
40388
|
+
const [traits2, setTraits] = React125.useState([]);
|
|
40389
|
+
const [coveredEdges, setCoveredEdges] = React125.useState([]);
|
|
40390
|
+
const [completedTraits, setCompletedTraits] = React125.useState(/* @__PURE__ */ new Set());
|
|
40391
|
+
const prevTraitRef = React125.useRef(null);
|
|
40392
|
+
React125.useEffect(() => {
|
|
40393
|
+
const interval = setInterval(() => {
|
|
40394
|
+
const w = window;
|
|
40395
|
+
const step = w.__orbitalWalkStep;
|
|
40396
|
+
const traitConfigs = w.__orbitalWalkTraits;
|
|
40397
|
+
const edges = w.__orbitalCoveredEdges;
|
|
40398
|
+
if (step) setWalkStep(step);
|
|
40399
|
+
if (traitConfigs) setTraits(traitConfigs);
|
|
40400
|
+
if (edges) setCoveredEdges(edges);
|
|
40401
|
+
if (step && prevTraitRef.current && prevTraitRef.current !== step.traitName) {
|
|
40402
|
+
setCompletedTraits((prev) => new Set(prev).add(prevTraitRef.current));
|
|
40403
|
+
}
|
|
40404
|
+
if (step) prevTraitRef.current = step.traitName;
|
|
40405
|
+
}, 250);
|
|
40406
|
+
return () => clearInterval(interval);
|
|
40407
|
+
}, []);
|
|
40408
|
+
if (!walkStep || traits2.length === 0) return null;
|
|
40409
|
+
const activeTrait = traits2.find((t) => t.name === walkStep.traitName);
|
|
40410
|
+
const engineCount = coveredEdges.filter((e) => e.phase === "engine").length;
|
|
40411
|
+
const domCount = coveredEdges.filter((e) => e.phase === "dom").length;
|
|
40412
|
+
const totalTransitions = traits2.reduce((sum, t) => sum + t.transitions.length, 0);
|
|
40413
|
+
const activeEdgeKeys = new Set(
|
|
40414
|
+
coveredEdges.filter((e) => e.trait === walkStep.traitName).map((e) => `${e.from}+${e.event}->${e.to}`)
|
|
40415
|
+
);
|
|
40416
|
+
const activeEdgePhases = new Map(
|
|
40417
|
+
coveredEdges.filter((e) => e.trait === walkStep.traitName).map((e) => [`${e.from}+${e.event}->${e.to}`, e.phase])
|
|
40418
|
+
);
|
|
40419
|
+
const currentEdgeKey = `${walkStep.from}+${walkStep.event}->${walkStep.to}`;
|
|
40420
|
+
const graphW = 260;
|
|
40421
|
+
const graphH = 120;
|
|
40422
|
+
const nodeR = 10;
|
|
40423
|
+
const positions = activeTrait ? layoutGraph(activeTrait.states, activeTrait.transitions, activeTrait.initialState, graphW, graphH) : [];
|
|
40424
|
+
const posMap = new Map(positions.map((p2) => [p2.state, p2]));
|
|
40425
|
+
const visitedStates = new Set(
|
|
40426
|
+
coveredEdges.filter((e) => e.trait === walkStep.traitName).flatMap((e) => [e.from, e.to])
|
|
40427
|
+
);
|
|
40428
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "w-64 flex-shrink-0 border-l border-border bg-[var(--color-card)] overflow-hidden", children: [
|
|
40429
|
+
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1.5 border-b border-border overflow-x-auto", children: /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-nowrap", children: traits2.map((t) => {
|
|
40430
|
+
const isDone = completedTraits.has(t.name);
|
|
40431
|
+
const isActive = t.name === walkStep.traitName;
|
|
40432
|
+
const variant = isDone ? "success" : isActive ? "info" : "neutral";
|
|
40433
|
+
const shortName = t.name.replace(/^[A-Z][a-z]+/, "");
|
|
40434
|
+
return /* @__PURE__ */ jsxs(
|
|
40435
|
+
Badge,
|
|
40436
|
+
{
|
|
40437
|
+
variant,
|
|
40438
|
+
size: "sm",
|
|
40439
|
+
className: `flex-shrink-0 text-[9px] ${isActive ? "ring-1 ring-cyan-400" : ""}`,
|
|
40440
|
+
children: [
|
|
40441
|
+
isDone ? "\u2713" : isActive ? "\u25CF" : "\u25CB",
|
|
40442
|
+
" ",
|
|
40443
|
+
shortName || t.name
|
|
40444
|
+
]
|
|
40445
|
+
},
|
|
40446
|
+
t.name
|
|
40447
|
+
);
|
|
40448
|
+
}) }) }),
|
|
40449
|
+
/* @__PURE__ */ jsx(Box, { className: "flex-1 flex items-center justify-center px-1 py-1", children: activeTrait && /* @__PURE__ */ jsxs("svg", { width: graphW, height: graphH, viewBox: `0 0 ${graphW} ${graphH}`, children: [
|
|
40450
|
+
/* @__PURE__ */ jsxs("defs", { children: [
|
|
40451
|
+
/* @__PURE__ */ jsx("marker", { id: "mm-arrow", markerWidth: "6", markerHeight: "4", refX: "6", refY: "2", orient: "auto", children: /* @__PURE__ */ jsx("path", { d: "M0,0 L6,2 L0,4", fill: "#888" }) }),
|
|
40452
|
+
/* @__PURE__ */ jsx("marker", { id: "mm-arrow-green", markerWidth: "6", markerHeight: "4", refX: "6", refY: "2", orient: "auto", children: /* @__PURE__ */ jsx("path", { d: "M0,0 L6,2 L0,4", fill: "#22c55e" }) }),
|
|
40453
|
+
/* @__PURE__ */ jsx("marker", { id: "mm-arrow-cyan", markerWidth: "6", markerHeight: "4", refX: "6", refY: "2", orient: "auto", children: /* @__PURE__ */ jsx("path", { d: "M0,0 L6,2 L0,4", fill: "#06b6d4" }) }),
|
|
40454
|
+
/* @__PURE__ */ jsx("marker", { id: "mm-arrow-yellow", markerWidth: "6", markerHeight: "4", refX: "6", refY: "2", orient: "auto", children: /* @__PURE__ */ jsx("path", { d: "M0,0 L6,2 L0,4", fill: "#eab308" }) })
|
|
40455
|
+
] }),
|
|
40456
|
+
activeTrait.transitions.map((tr, i) => {
|
|
40457
|
+
const fromPos = posMap.get(tr.from);
|
|
40458
|
+
const toPos = posMap.get(tr.to);
|
|
40459
|
+
if (!fromPos || !toPos) return null;
|
|
40460
|
+
const key = `${tr.from}+${tr.event}->${tr.to}`;
|
|
40461
|
+
const isCurrent = key === currentEdgeKey && !walkStep.isRepositioning;
|
|
40462
|
+
const isCovered = activeEdgeKeys.has(key);
|
|
40463
|
+
const phase = activeEdgePhases.get(key);
|
|
40464
|
+
let stroke = "#555";
|
|
40465
|
+
let markerEnd = "url(#mm-arrow)";
|
|
40466
|
+
let strokeWidth = 1;
|
|
40467
|
+
let opacity = 0.4;
|
|
40468
|
+
if (isCurrent) {
|
|
40469
|
+
stroke = "#eab308";
|
|
40470
|
+
markerEnd = "url(#mm-arrow-yellow)";
|
|
40471
|
+
strokeWidth = 2.5;
|
|
40472
|
+
opacity = 1;
|
|
40473
|
+
} else if (isCovered && phase === "dom") {
|
|
40474
|
+
stroke = "#06b6d4";
|
|
40475
|
+
markerEnd = "url(#mm-arrow-cyan)";
|
|
40476
|
+
strokeWidth = 1.5;
|
|
40477
|
+
opacity = 0.9;
|
|
40478
|
+
} else if (isCovered) {
|
|
40479
|
+
stroke = "#22c55e";
|
|
40480
|
+
markerEnd = "url(#mm-arrow-green)";
|
|
40481
|
+
strokeWidth = 1.5;
|
|
40482
|
+
opacity = 0.9;
|
|
40483
|
+
}
|
|
40484
|
+
if (tr.from === tr.to) {
|
|
40485
|
+
const cx = fromPos.x;
|
|
40486
|
+
const cy = fromPos.y - nodeR - 8;
|
|
40487
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
40488
|
+
/* @__PURE__ */ jsx(
|
|
40489
|
+
"path",
|
|
40490
|
+
{
|
|
40491
|
+
d: `M${cx - 5},${fromPos.y - nodeR} C${cx - 18},${cy - 14} ${cx + 18},${cy - 14} ${cx + 5},${fromPos.y - nodeR}`,
|
|
40492
|
+
fill: "none",
|
|
40493
|
+
stroke,
|
|
40494
|
+
strokeWidth,
|
|
40495
|
+
opacity,
|
|
40496
|
+
markerEnd
|
|
40497
|
+
}
|
|
40498
|
+
),
|
|
40499
|
+
/* @__PURE__ */ jsx("text", { x: cx, y: cy - 12, textAnchor: "middle", fontSize: "7", fill: stroke, opacity, children: tr.event.length > 10 ? tr.event.slice(0, 8) + ".." : tr.event })
|
|
40500
|
+
] }, `e-${i}`);
|
|
40501
|
+
}
|
|
40502
|
+
const dx = toPos.x - fromPos.x;
|
|
40503
|
+
const dy = toPos.y - fromPos.y;
|
|
40504
|
+
const len = Math.sqrt(dx * dx + dy * dy) || 1;
|
|
40505
|
+
const nx = -dy / len;
|
|
40506
|
+
const ny = dx / len;
|
|
40507
|
+
const hasReverse = activeTrait.transitions.some(
|
|
40508
|
+
(t2) => t2.from === tr.to && t2.to === tr.from
|
|
40509
|
+
);
|
|
40510
|
+
const offset = hasReverse ? 4 : 0;
|
|
40511
|
+
const x1 = fromPos.x + dx / len * nodeR + nx * offset;
|
|
40512
|
+
const y1 = fromPos.y + dy / len * nodeR + ny * offset;
|
|
40513
|
+
const x2 = toPos.x - dx / len * (nodeR + 6) + nx * offset;
|
|
40514
|
+
const y2 = toPos.y - dy / len * (nodeR + 6) + ny * offset;
|
|
40515
|
+
const mx = (x1 + x2) / 2 + nx * 8;
|
|
40516
|
+
const my = (y1 + y2) / 2 + ny * 8;
|
|
40517
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
40518
|
+
/* @__PURE__ */ jsx(
|
|
40519
|
+
"line",
|
|
40520
|
+
{
|
|
40521
|
+
x1,
|
|
40522
|
+
y1,
|
|
40523
|
+
x2,
|
|
40524
|
+
y2,
|
|
40525
|
+
stroke,
|
|
40526
|
+
strokeWidth,
|
|
40527
|
+
opacity,
|
|
40528
|
+
markerEnd,
|
|
40529
|
+
children: isCurrent && /* @__PURE__ */ jsx("animate", { attributeName: "opacity", values: "1;0.4;1", dur: "0.8s", repeatCount: "indefinite" })
|
|
40530
|
+
}
|
|
40531
|
+
),
|
|
40532
|
+
/* @__PURE__ */ jsx("text", { x: mx, y: my, textAnchor: "middle", fontSize: "7", fill: stroke, opacity: Math.min(opacity + 0.2, 1), children: tr.event.length > 12 ? tr.event.slice(0, 10) + ".." : tr.event })
|
|
40533
|
+
] }, `e-${i}`);
|
|
40534
|
+
}),
|
|
40535
|
+
positions.map((pos) => {
|
|
40536
|
+
const isCurrentState = pos.state === walkStep.from || pos.state === walkStep.to;
|
|
40537
|
+
const isVisited = visitedStates.has(pos.state);
|
|
40538
|
+
const isInitial = pos.state === activeTrait.initialState;
|
|
40539
|
+
let fill = "#333";
|
|
40540
|
+
let strokeColor = "#555";
|
|
40541
|
+
let sw = 1;
|
|
40542
|
+
if (isCurrentState) {
|
|
40543
|
+
fill = "#1e40af";
|
|
40544
|
+
strokeColor = "#3b82f6";
|
|
40545
|
+
sw = 2;
|
|
40546
|
+
} else if (isVisited) {
|
|
40547
|
+
fill = "#166534";
|
|
40548
|
+
strokeColor = "#22c55e";
|
|
40549
|
+
sw = 1.5;
|
|
40550
|
+
}
|
|
40551
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
40552
|
+
isInitial && /* @__PURE__ */ jsx("circle", { cx: pos.x, cy: pos.y, r: nodeR + 3, fill: "none", stroke: "#3b82f6", strokeWidth: 1, opacity: 0.4 }),
|
|
40553
|
+
/* @__PURE__ */ jsx(
|
|
40554
|
+
"circle",
|
|
40555
|
+
{
|
|
40556
|
+
cx: pos.x,
|
|
40557
|
+
cy: pos.y,
|
|
40558
|
+
r: nodeR,
|
|
40559
|
+
fill,
|
|
40560
|
+
stroke: strokeColor,
|
|
40561
|
+
strokeWidth: sw,
|
|
40562
|
+
children: isCurrentState && /* @__PURE__ */ jsx("animate", { attributeName: "r", values: `${nodeR};${nodeR + 2};${nodeR}`, dur: "1s", repeatCount: "indefinite" })
|
|
40563
|
+
}
|
|
40564
|
+
),
|
|
40565
|
+
/* @__PURE__ */ jsx(
|
|
40566
|
+
"text",
|
|
40567
|
+
{
|
|
40568
|
+
x: pos.x,
|
|
40569
|
+
y: pos.y + nodeR + 10,
|
|
40570
|
+
textAnchor: "middle",
|
|
40571
|
+
fontSize: "8",
|
|
40572
|
+
fill: "#aaa",
|
|
40573
|
+
children: pos.state.length > 10 ? pos.state.slice(0, 8) + ".." : pos.state
|
|
40574
|
+
}
|
|
40575
|
+
)
|
|
40576
|
+
] }, pos.state);
|
|
40577
|
+
})
|
|
40578
|
+
] }) }),
|
|
40579
|
+
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1 border-t border-border", children: /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center justify-between", children: [
|
|
40580
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-[10px] font-mono text-green-500", children: [
|
|
40581
|
+
"Engine: ",
|
|
40582
|
+
engineCount,
|
|
40583
|
+
"/",
|
|
40584
|
+
totalTransitions
|
|
40585
|
+
] }),
|
|
40586
|
+
domCount > 0 && /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-[10px] font-mono text-cyan-500", children: [
|
|
40587
|
+
"DOM: ",
|
|
40588
|
+
domCount
|
|
40589
|
+
] }),
|
|
40590
|
+
/* @__PURE__ */ jsx(Badge, { variant: walkStep.phase === "engine" ? "info" : "warning", size: "sm", className: "text-[9px]", children: walkStep.phase === "engine" ? "Engine" : "DOM" })
|
|
40591
|
+
] }) })
|
|
40592
|
+
] });
|
|
40593
|
+
}
|
|
40594
|
+
WalkMinimap.displayName = "WalkMinimap";
|
|
40595
|
+
|
|
40313
40596
|
// components/organisms/debug/tabs/TraitsTab.tsx
|
|
40314
40597
|
init_Typography();
|
|
40315
40598
|
init_Stack();
|
|
@@ -40538,15 +40821,15 @@ var TYPE_BADGES = {
|
|
|
40538
40821
|
state: { variant: "danger", icon: "\u{1F4CA}" }
|
|
40539
40822
|
};
|
|
40540
40823
|
function EventFlowTab({ events: events2 }) {
|
|
40541
|
-
const [filter, setFilter] =
|
|
40542
|
-
const containerRef =
|
|
40543
|
-
const [autoScroll, setAutoScroll] =
|
|
40544
|
-
|
|
40824
|
+
const [filter, setFilter] = React125.useState("all");
|
|
40825
|
+
const containerRef = React125.useRef(null);
|
|
40826
|
+
const [autoScroll, setAutoScroll] = React125.useState(true);
|
|
40827
|
+
React125.useEffect(() => {
|
|
40545
40828
|
if (autoScroll && containerRef.current) {
|
|
40546
40829
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
40547
40830
|
}
|
|
40548
40831
|
}, [events2.length, autoScroll]);
|
|
40549
|
-
const filteredEvents =
|
|
40832
|
+
const filteredEvents = React125.useMemo(() => {
|
|
40550
40833
|
if (filter === "all") return events2;
|
|
40551
40834
|
return events2.filter((e) => e.type === filter);
|
|
40552
40835
|
}, [events2, filter]);
|
|
@@ -40647,7 +40930,7 @@ EventFlowTab.displayName = "EventFlowTab";
|
|
|
40647
40930
|
init_Typography();
|
|
40648
40931
|
init_Stack();
|
|
40649
40932
|
function GuardsPanel({ guards }) {
|
|
40650
|
-
const [filter, setFilter] =
|
|
40933
|
+
const [filter, setFilter] = React125.useState("all");
|
|
40651
40934
|
if (guards.length === 0) {
|
|
40652
40935
|
return /* @__PURE__ */ jsx(
|
|
40653
40936
|
EmptyState,
|
|
@@ -40660,7 +40943,7 @@ function GuardsPanel({ guards }) {
|
|
|
40660
40943
|
}
|
|
40661
40944
|
const passedCount = guards.filter((g) => g.result).length;
|
|
40662
40945
|
const failedCount = guards.length - passedCount;
|
|
40663
|
-
const filteredGuards =
|
|
40946
|
+
const filteredGuards = React125.useMemo(() => {
|
|
40664
40947
|
if (filter === "all") return guards;
|
|
40665
40948
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
40666
40949
|
return guards.filter((g) => !g.result);
|
|
@@ -40809,10 +41092,10 @@ function EffectBadge({ effect }) {
|
|
|
40809
41092
|
] });
|
|
40810
41093
|
}
|
|
40811
41094
|
function TransitionTimeline({ transitions }) {
|
|
40812
|
-
const containerRef =
|
|
40813
|
-
const [autoScroll, setAutoScroll] =
|
|
40814
|
-
const [expandedId, setExpandedId] =
|
|
40815
|
-
|
|
41095
|
+
const containerRef = React125.useRef(null);
|
|
41096
|
+
const [autoScroll, setAutoScroll] = React125.useState(true);
|
|
41097
|
+
const [expandedId, setExpandedId] = React125.useState(null);
|
|
41098
|
+
React125.useEffect(() => {
|
|
40816
41099
|
if (autoScroll && containerRef.current) {
|
|
40817
41100
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
40818
41101
|
}
|
|
@@ -41080,9 +41363,9 @@ function getAllEvents(traits2) {
|
|
|
41080
41363
|
}
|
|
41081
41364
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
41082
41365
|
const eventBus = useEventBus();
|
|
41083
|
-
const [log, setLog] =
|
|
41084
|
-
const prevStatesRef =
|
|
41085
|
-
|
|
41366
|
+
const [log, setLog] = React125.useState([]);
|
|
41367
|
+
const prevStatesRef = React125.useRef(/* @__PURE__ */ new Map());
|
|
41368
|
+
React125.useEffect(() => {
|
|
41086
41369
|
for (const trait of traits2) {
|
|
41087
41370
|
const prev = prevStatesRef.current.get(trait.id);
|
|
41088
41371
|
if (prev && prev !== trait.currentState) {
|
|
@@ -41159,25 +41442,25 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
41159
41442
|
EventDispatcherTab.displayName = "EventDispatcherTab";
|
|
41160
41443
|
function ServerResponseRow({ sr }) {
|
|
41161
41444
|
const entityEntries = Object.entries(sr.dataEntities);
|
|
41162
|
-
return /* @__PURE__ */ jsxs("div", { className: "ml-4 pl-2 border-l border-purple-
|
|
41445
|
+
return /* @__PURE__ */ jsxs("div", { className: "ml-4 pl-2 border-l border-purple-500/30 py-0.5 text-[10px] font-mono", children: [
|
|
41163
41446
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
41164
|
-
/* @__PURE__ */ jsxs("span", { className: sr.success ? "text-green-400" : "text-red-400", children: [
|
|
41447
|
+
/* @__PURE__ */ jsxs("span", { className: sr.success ? "text-green-600 dark:text-green-400" : "text-red-600 dark:text-red-400", children: [
|
|
41165
41448
|
sr.success ? "\u2713" : "\u2717",
|
|
41166
41449
|
" server"
|
|
41167
41450
|
] }),
|
|
41168
|
-
/* @__PURE__ */ jsx("span", { className: "text-purple-300", children: sr.orbitalName }),
|
|
41169
|
-
sr.clientEffects > 0 && /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-purple-
|
|
41451
|
+
/* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-300", children: sr.orbitalName }),
|
|
41452
|
+
sr.clientEffects > 0 && /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-purple-500/15 text-purple-600 dark:text-purple-300", children: [
|
|
41170
41453
|
sr.clientEffects,
|
|
41171
41454
|
" clientEffect",
|
|
41172
41455
|
sr.clientEffects !== 1 ? "s" : ""
|
|
41173
41456
|
] }),
|
|
41174
|
-
sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-blue-
|
|
41457
|
+
sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-blue-500/15 text-blue-300", children: [
|
|
41175
41458
|
"emit: ",
|
|
41176
41459
|
sr.emittedEvents.join(", ")
|
|
41177
41460
|
] }),
|
|
41178
|
-
sr.error && /* @__PURE__ */ jsx("span", { className: "px-1 rounded bg-red-
|
|
41461
|
+
sr.error && /* @__PURE__ */ jsx("span", { className: "px-1 rounded bg-red-500/15 text-red-600 dark:text-red-400 truncate max-w-[300px]", children: sr.error })
|
|
41179
41462
|
] }),
|
|
41180
|
-
entityEntries.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1 mt-0.5", children: entityEntries.map(([name, count]) => /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-
|
|
41463
|
+
entityEntries.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1 mt-0.5", children: entityEntries.map(([name, count]) => /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-[var(--color-card)] text-foreground", children: [
|
|
41181
41464
|
name,
|
|
41182
41465
|
": ",
|
|
41183
41466
|
count,
|
|
@@ -41190,24 +41473,24 @@ function TransitionRow({ trace }) {
|
|
|
41190
41473
|
const isServerEntry = !!trace.serverResponse && trace.traitName.startsWith("server:");
|
|
41191
41474
|
const hasFailedEffects = trace.effects.some((e) => e.status === "failed");
|
|
41192
41475
|
if (isServerEntry && trace.serverResponse) {
|
|
41193
|
-
return /* @__PURE__ */ jsxs("div", { className: "py-0.5 border-b border-
|
|
41476
|
+
return /* @__PURE__ */ jsxs("div", { className: "py-0.5 border-b border-border last:border-0", children: [
|
|
41194
41477
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
|
|
41195
41478
|
/* @__PURE__ */ jsx("span", { className: "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0 bg-purple-500" }),
|
|
41196
41479
|
/* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", className: "flex-shrink-0", children: trace.event }),
|
|
41197
|
-
/* @__PURE__ */ jsx("span", { className: "text-purple-400 flex-shrink-0", children: "server response" })
|
|
41480
|
+
/* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-400 flex-shrink-0", children: "server response" })
|
|
41198
41481
|
] }),
|
|
41199
41482
|
/* @__PURE__ */ jsx(ServerResponseRow, { sr: trace.serverResponse })
|
|
41200
41483
|
] });
|
|
41201
41484
|
}
|
|
41202
|
-
return /* @__PURE__ */ jsxs("div", { className: "py-0.5 border-b border-
|
|
41485
|
+
return /* @__PURE__ */ jsxs("div", { className: "py-0.5 border-b border-border last:border-0", children: [
|
|
41203
41486
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
|
|
41204
41487
|
/* @__PURE__ */ jsx("span", { className: cn(
|
|
41205
41488
|
"mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0",
|
|
41206
41489
|
hasFailedEffects ? "bg-red-500" : "bg-green-500"
|
|
41207
41490
|
) }),
|
|
41208
41491
|
/* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", className: "flex-shrink-0", children: trace.event }),
|
|
41209
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
41210
|
-
/* @__PURE__ */ jsxs("span", { className: "text-
|
|
41492
|
+
/* @__PURE__ */ jsx("span", { className: "text-foreground flex-shrink-0", children: trace.traitName }),
|
|
41493
|
+
/* @__PURE__ */ jsxs("span", { className: "text-foreground/70 flex-shrink-0", children: [
|
|
41211
41494
|
trace.from,
|
|
41212
41495
|
" ",
|
|
41213
41496
|
"\u2192",
|
|
@@ -41217,12 +41500,12 @@ function TransitionRow({ trace }) {
|
|
|
41217
41500
|
] }),
|
|
41218
41501
|
trace.effects.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1 ml-6 mt-0.5", children: trace.effects.map((eff, i) => /* @__PURE__ */ jsxs("span", { className: cn(
|
|
41219
41502
|
"px-1 rounded text-[10px]",
|
|
41220
|
-
eff.status === "executed" ? "bg-green-
|
|
41503
|
+
eff.status === "executed" ? "bg-green-500/15 text-green-600 dark:text-green-400" : eff.status === "failed" ? "bg-red-500/15 text-red-600 dark:text-red-400" : "bg-yellow-500/15 text-yellow-600 dark:text-yellow-400"
|
|
41221
41504
|
), children: [
|
|
41222
41505
|
eff.status === "executed" ? "\u2713" : eff.status === "failed" ? "\u2717" : "-",
|
|
41223
41506
|
" ",
|
|
41224
41507
|
eff.type,
|
|
41225
|
-
eff.args.length > 0 && /* @__PURE__ */ jsx("span", { className: "text-
|
|
41508
|
+
eff.args.length > 0 && /* @__PURE__ */ jsx("span", { className: "text-foreground/50 ml-0.5", children: JSON.stringify(eff.args).slice(0, 40) })
|
|
41226
41509
|
] }, i)) }),
|
|
41227
41510
|
trace.serverResponse && /* @__PURE__ */ jsx(ServerResponseRow, { sr: trace.serverResponse })
|
|
41228
41511
|
] });
|
|
@@ -41235,18 +41518,9 @@ function VerifyModePanel({
|
|
|
41235
41518
|
serverCount,
|
|
41236
41519
|
localCount
|
|
41237
41520
|
}) {
|
|
41238
|
-
const scrollRef =
|
|
41239
|
-
const prevCountRef =
|
|
41240
|
-
|
|
41241
|
-
React124.useEffect(() => {
|
|
41242
|
-
const interval = setInterval(() => {
|
|
41243
|
-
const w = window;
|
|
41244
|
-
const step = w.__orbitalWalkStep;
|
|
41245
|
-
if (step) setWalkStep(step);
|
|
41246
|
-
}, 300);
|
|
41247
|
-
return () => clearInterval(interval);
|
|
41248
|
-
}, []);
|
|
41249
|
-
React124.useEffect(() => {
|
|
41521
|
+
const scrollRef = React125.useRef(null);
|
|
41522
|
+
const prevCountRef = React125.useRef(0);
|
|
41523
|
+
React125.useEffect(() => {
|
|
41250
41524
|
if (transitions.length > prevCountRef.current && scrollRef.current) {
|
|
41251
41525
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
41252
41526
|
}
|
|
@@ -41258,49 +41532,28 @@ function VerifyModePanel({
|
|
|
41258
41532
|
{
|
|
41259
41533
|
className: cn(
|
|
41260
41534
|
"runtime-debugger runtime-debugger--verify",
|
|
41261
|
-
"flex flex-col bg-
|
|
41535
|
+
"flex flex-col bg-[var(--color-card)] text-[var(--color-foreground)] border-t-2 border-cyan-500",
|
|
41262
41536
|
hudBottom ? "" : "fixed bottom-0 left-0 right-0",
|
|
41263
41537
|
className
|
|
41264
41538
|
),
|
|
41265
41539
|
"data-testid": "debugger-verify",
|
|
41266
41540
|
style: { height: "25vh", zIndex: hudBottom ? void 0 : 40 },
|
|
41267
41541
|
children: [
|
|
41268
|
-
/* @__PURE__ */ jsxs("div", { className: "px-3 py-1.5 flex items-center gap-3 text-xs font-mono border-b border-
|
|
41542
|
+
/* @__PURE__ */ jsxs("div", { className: "px-3 py-1.5 flex items-center gap-3 text-xs font-mono border-b border-border flex-shrink-0", children: [
|
|
41269
41543
|
/* @__PURE__ */ jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ? `${failedChecks} fail` : "OK" }),
|
|
41270
|
-
/* @__PURE__ */ jsxs("span", { className: "text-
|
|
41544
|
+
/* @__PURE__ */ jsxs("span", { className: "text-foreground/70", children: [
|
|
41271
41545
|
localCount,
|
|
41272
41546
|
" local"
|
|
41273
41547
|
] }),
|
|
41274
|
-
/* @__PURE__ */ jsxs("span", { className: "text-purple-400", children: [
|
|
41548
|
+
/* @__PURE__ */ jsxs("span", { className: "text-purple-600 dark:text-purple-400", children: [
|
|
41275
41549
|
serverCount,
|
|
41276
41550
|
" server"
|
|
41277
41551
|
] }),
|
|
41278
|
-
traitStates && /* @__PURE__ */ jsx("span", { className: "text-cyan-400 truncate max-w-[400px]", children: traitStates })
|
|
41552
|
+
traitStates && /* @__PURE__ */ jsx("span", { className: "text-cyan-600 dark:text-cyan-400 truncate max-w-[400px]", children: traitStates })
|
|
41279
41553
|
] }),
|
|
41280
41554
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 flex overflow-hidden", children: [
|
|
41281
|
-
/* @__PURE__ */ jsx("div", { ref: scrollRef, className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx("div", { className: "px-2 py-1", children: transitions.length === 0 ? /* @__PURE__ */ jsx("div", { className: "text-
|
|
41282
|
-
|
|
41283
|
-
/* @__PURE__ */ jsxs("div", { className: "text-cyan-400 font-bold mb-1", children: [
|
|
41284
|
-
"Walk Step ",
|
|
41285
|
-
walkStep.stepIndex,
|
|
41286
|
-
"/",
|
|
41287
|
-
walkStep.stepTotal
|
|
41288
|
-
] }),
|
|
41289
|
-
/* @__PURE__ */ jsx("div", { className: "text-gray-300 mb-1", children: walkStep.traitName }),
|
|
41290
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 mb-1", children: [
|
|
41291
|
-
/* @__PURE__ */ jsx("span", { className: "text-yellow-300", children: walkStep.from }),
|
|
41292
|
-
/* @__PURE__ */ jsx("span", { className: "text-gray-500", children: "--" }),
|
|
41293
|
-
/* @__PURE__ */ jsx("span", { className: "text-green-300", children: walkStep.event }),
|
|
41294
|
-
/* @__PURE__ */ jsx("span", { className: "text-gray-500", children: "-->" }),
|
|
41295
|
-
/* @__PURE__ */ jsx("span", { className: "text-yellow-300", children: walkStep.to })
|
|
41296
|
-
] }),
|
|
41297
|
-
walkStep.guardCase && /* @__PURE__ */ jsxs("div", { className: walkStep.guardCase === "pass" ? "text-green-400" : "text-red-400", children: [
|
|
41298
|
-
"guard: ",
|
|
41299
|
-
walkStep.guardCase
|
|
41300
|
-
] }),
|
|
41301
|
-
walkStep.isRepositioning && /* @__PURE__ */ jsx("div", { className: "text-gray-500 italic", children: "repositioning" }),
|
|
41302
|
-
/* @__PURE__ */ jsx("div", { className: walkStep.accepted ? "text-green-400 mt-1" : "text-red-400 mt-1", children: walkStep.accepted ? "\u2713 accepted" : "\u2717 rejected" })
|
|
41303
|
-
] })
|
|
41555
|
+
/* @__PURE__ */ jsx("div", { ref: scrollRef, className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx("div", { className: "px-2 py-1", children: transitions.length === 0 ? /* @__PURE__ */ jsx("div", { className: "text-foreground/50 text-xs font-mono py-2 text-center", children: "Waiting for transitions..." }) : /* @__PURE__ */ jsx("div", { className: "space-y-0.5", children: transitions.map((trace) => /* @__PURE__ */ jsx(TransitionRow, { trace }, trace.id)) }) }) }),
|
|
41556
|
+
/* @__PURE__ */ jsx(WalkMinimap, {})
|
|
41304
41557
|
] })
|
|
41305
41558
|
]
|
|
41306
41559
|
}
|
|
@@ -41315,10 +41568,10 @@ function RuntimeDebugger({
|
|
|
41315
41568
|
defaultTab,
|
|
41316
41569
|
schema
|
|
41317
41570
|
}) {
|
|
41318
|
-
const [isCollapsed, setIsCollapsed] =
|
|
41319
|
-
const [isVisible, setIsVisible] =
|
|
41571
|
+
const [isCollapsed, setIsCollapsed] = React125.useState(mode === "verify" ? true : defaultCollapsed);
|
|
41572
|
+
const [isVisible, setIsVisible] = React125.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
41320
41573
|
const debugData = useDebugData();
|
|
41321
|
-
|
|
41574
|
+
React125.useEffect(() => {
|
|
41322
41575
|
if (mode === "inline") return;
|
|
41323
41576
|
return onDebugToggle((enabled) => {
|
|
41324
41577
|
setIsVisible(enabled);
|
|
@@ -41327,7 +41580,7 @@ function RuntimeDebugger({
|
|
|
41327
41580
|
}
|
|
41328
41581
|
});
|
|
41329
41582
|
}, [mode]);
|
|
41330
|
-
|
|
41583
|
+
React125.useEffect(() => {
|
|
41331
41584
|
if (mode === "inline") return;
|
|
41332
41585
|
const handleKeyDown = (e) => {
|
|
41333
41586
|
if (e.key === "`" && isVisible) {
|
|
@@ -41525,7 +41778,7 @@ function RuntimeDebugger({
|
|
|
41525
41778
|
className: "runtime-debugger__tabs"
|
|
41526
41779
|
}
|
|
41527
41780
|
) }),
|
|
41528
|
-
/* @__PURE__ */ jsx("div", { className: "runtime-debugger__footer", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-
|
|
41781
|
+
/* @__PURE__ */ jsx("div", { className: "runtime-debugger__footer", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-foreground/50", children: "Press ` to toggle | window.__orbitalVerification for automation" }) })
|
|
41529
41782
|
] })
|
|
41530
41783
|
}
|
|
41531
41784
|
);
|
|
@@ -41845,7 +42098,7 @@ function SequenceBar({
|
|
|
41845
42098
|
onSlotRemove(index);
|
|
41846
42099
|
}, [onSlotRemove, playing]);
|
|
41847
42100
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
41848
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
42101
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React125__default.Fragment, { children: [
|
|
41849
42102
|
i > 0 && /* @__PURE__ */ jsx(
|
|
41850
42103
|
Typography,
|
|
41851
42104
|
{
|
|
@@ -43114,7 +43367,7 @@ var StatCard = ({
|
|
|
43114
43367
|
const labelToUse = propLabel ?? propTitle;
|
|
43115
43368
|
const eventBus = useEventBus();
|
|
43116
43369
|
const { t } = useTranslate();
|
|
43117
|
-
const handleActionClick =
|
|
43370
|
+
const handleActionClick = React125__default.useCallback(() => {
|
|
43118
43371
|
if (action?.event) {
|
|
43119
43372
|
eventBus.emit(`UI:${action.event}`, {});
|
|
43120
43373
|
}
|
|
@@ -43125,7 +43378,7 @@ var StatCard = ({
|
|
|
43125
43378
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
43126
43379
|
const isLoading = externalLoading ?? false;
|
|
43127
43380
|
const error = externalError;
|
|
43128
|
-
const computeMetricValue =
|
|
43381
|
+
const computeMetricValue = React125__default.useCallback(
|
|
43129
43382
|
(metric, items) => {
|
|
43130
43383
|
if (metric.value !== void 0) {
|
|
43131
43384
|
return metric.value;
|
|
@@ -43164,7 +43417,7 @@ var StatCard = ({
|
|
|
43164
43417
|
},
|
|
43165
43418
|
[]
|
|
43166
43419
|
);
|
|
43167
|
-
const schemaStats =
|
|
43420
|
+
const schemaStats = React125__default.useMemo(() => {
|
|
43168
43421
|
if (!metrics || metrics.length === 0) return null;
|
|
43169
43422
|
return metrics.map((metric) => ({
|
|
43170
43423
|
label: metric.label,
|
|
@@ -43172,7 +43425,7 @@ var StatCard = ({
|
|
|
43172
43425
|
format: metric.format
|
|
43173
43426
|
}));
|
|
43174
43427
|
}, [metrics, data, computeMetricValue]);
|
|
43175
|
-
const calculatedTrend =
|
|
43428
|
+
const calculatedTrend = React125__default.useMemo(() => {
|
|
43176
43429
|
if (manualTrend !== void 0) return manualTrend;
|
|
43177
43430
|
if (previousValue === void 0 || currentValue === void 0)
|
|
43178
43431
|
return void 0;
|
|
@@ -44107,7 +44360,7 @@ var Timeline = ({
|
|
|
44107
44360
|
}) => {
|
|
44108
44361
|
const { t } = useTranslate();
|
|
44109
44362
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
44110
|
-
const items =
|
|
44363
|
+
const items = React125__default.useMemo(() => {
|
|
44111
44364
|
if (propItems) return propItems;
|
|
44112
44365
|
if (entityData.length === 0) return [];
|
|
44113
44366
|
return entityData.map((record, idx) => {
|
|
@@ -44211,7 +44464,7 @@ Timeline.displayName = "Timeline";
|
|
|
44211
44464
|
init_Box();
|
|
44212
44465
|
init_useEventBus();
|
|
44213
44466
|
function extractToastProps(children) {
|
|
44214
|
-
if (!
|
|
44467
|
+
if (!React125__default.isValidElement(children)) {
|
|
44215
44468
|
if (typeof children === "string") {
|
|
44216
44469
|
return { message: children };
|
|
44217
44470
|
}
|
|
@@ -44242,7 +44495,7 @@ var ToastSlot = ({
|
|
|
44242
44495
|
eventBus.emit("UI:CLOSE");
|
|
44243
44496
|
};
|
|
44244
44497
|
if (!isVisible) return null;
|
|
44245
|
-
const isCustomContent =
|
|
44498
|
+
const isCustomContent = React125__default.isValidElement(children) && !message;
|
|
44246
44499
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
44247
44500
|
Toast,
|
|
44248
44501
|
{
|
|
@@ -44496,7 +44749,7 @@ var WizardContainer = ({
|
|
|
44496
44749
|
const isCompleted = index < currentStep;
|
|
44497
44750
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
44498
44751
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
44499
|
-
return /* @__PURE__ */ jsxs(
|
|
44752
|
+
return /* @__PURE__ */ jsxs(React125__default.Fragment, { children: [
|
|
44500
44753
|
/* @__PURE__ */ jsx(
|
|
44501
44754
|
Button,
|
|
44502
44755
|
{
|
|
@@ -44867,12 +45120,12 @@ WorldMapTemplate.displayName = "WorldMapTemplate";
|
|
|
44867
45120
|
|
|
44868
45121
|
// components/organisms/component-registry.generated.ts
|
|
44869
45122
|
function lazyThree(name, loader) {
|
|
44870
|
-
const Lazy =
|
|
45123
|
+
const Lazy = React125__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
44871
45124
|
function ThreeWrapper(props) {
|
|
44872
|
-
return
|
|
44873
|
-
|
|
45125
|
+
return React125__default.createElement(
|
|
45126
|
+
React125__default.Suspense,
|
|
44874
45127
|
{ fallback: null },
|
|
44875
|
-
|
|
45128
|
+
React125__default.createElement(Lazy, props)
|
|
44876
45129
|
);
|
|
44877
45130
|
}
|
|
44878
45131
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -45160,7 +45413,7 @@ function SuspenseConfigProvider({
|
|
|
45160
45413
|
config,
|
|
45161
45414
|
children
|
|
45162
45415
|
}) {
|
|
45163
|
-
return
|
|
45416
|
+
return React125__default.createElement(
|
|
45164
45417
|
SuspenseConfigContext.Provider,
|
|
45165
45418
|
{ value: config },
|
|
45166
45419
|
children
|
|
@@ -45187,6 +45440,62 @@ function getComponentForPattern(patternType) {
|
|
|
45187
45440
|
if (!name) return null;
|
|
45188
45441
|
return COMPONENT_REGISTRY[name] ?? null;
|
|
45189
45442
|
}
|
|
45443
|
+
var FORM_PATTERNS = /* @__PURE__ */ new Set([
|
|
45444
|
+
"form",
|
|
45445
|
+
"form-section",
|
|
45446
|
+
"inline-edit-form",
|
|
45447
|
+
"wizard-step"
|
|
45448
|
+
]);
|
|
45449
|
+
function enrichFormFields(fields, entityDef) {
|
|
45450
|
+
const fieldMap = new Map(entityDef.fields.map((f3) => [f3.name, f3]));
|
|
45451
|
+
return fields.map((field) => {
|
|
45452
|
+
if (typeof field === "string") {
|
|
45453
|
+
const entityField = fieldMap.get(field);
|
|
45454
|
+
if (entityField) {
|
|
45455
|
+
const enriched = {
|
|
45456
|
+
name: field,
|
|
45457
|
+
label: field.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (c) => c.toUpperCase()),
|
|
45458
|
+
type: entityField.type,
|
|
45459
|
+
required: entityField.required
|
|
45460
|
+
};
|
|
45461
|
+
if (entityField.values && entityField.values.length > 0) {
|
|
45462
|
+
enriched.values = entityField.values;
|
|
45463
|
+
} else if (entityField.enumValues && entityField.enumValues.length > 0) {
|
|
45464
|
+
enriched.values = entityField.enumValues;
|
|
45465
|
+
}
|
|
45466
|
+
if (entityField.relation) {
|
|
45467
|
+
enriched.relation = entityField.relation;
|
|
45468
|
+
}
|
|
45469
|
+
return enriched;
|
|
45470
|
+
}
|
|
45471
|
+
return { name: field, label: field.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (c) => c.toUpperCase()) };
|
|
45472
|
+
}
|
|
45473
|
+
if (field && typeof field === "object" && !Array.isArray(field)) {
|
|
45474
|
+
const obj = field;
|
|
45475
|
+
const fieldName = obj.name ?? obj.field;
|
|
45476
|
+
if (!fieldName) return field;
|
|
45477
|
+
if (obj.type || obj.inputType) return field;
|
|
45478
|
+
const entityField = fieldMap.get(fieldName);
|
|
45479
|
+
if (!entityField) return field;
|
|
45480
|
+
const enriched = { ...obj, type: entityField.type };
|
|
45481
|
+
if (entityField.required && !("required" in obj)) {
|
|
45482
|
+
enriched.required = true;
|
|
45483
|
+
}
|
|
45484
|
+
if (!obj.values && !obj.options) {
|
|
45485
|
+
if (entityField.values && entityField.values.length > 0) {
|
|
45486
|
+
enriched.values = entityField.values;
|
|
45487
|
+
} else if (entityField.enumValues && entityField.enumValues.length > 0) {
|
|
45488
|
+
enriched.values = entityField.enumValues;
|
|
45489
|
+
}
|
|
45490
|
+
}
|
|
45491
|
+
if (!obj.relation && entityField.relation) {
|
|
45492
|
+
enriched.relation = entityField.relation;
|
|
45493
|
+
}
|
|
45494
|
+
return enriched;
|
|
45495
|
+
}
|
|
45496
|
+
return field;
|
|
45497
|
+
});
|
|
45498
|
+
}
|
|
45190
45499
|
var PATTERNS_WITH_CHILDREN = /* @__PURE__ */ new Set([
|
|
45191
45500
|
"stack",
|
|
45192
45501
|
"vstack",
|
|
@@ -45620,6 +45929,8 @@ function SlotContentRenderer({
|
|
|
45620
45929
|
const entityProp = content.props.entity;
|
|
45621
45930
|
const entityType = typeof entityProp === "string" ? entityProp : "";
|
|
45622
45931
|
const storeData = useEntityRef(entityType);
|
|
45932
|
+
const schemaCtx = useEntitySchemaOptional();
|
|
45933
|
+
const entityDef = entityType && schemaCtx ? schemaCtx.entities.get(entityType) : void 0;
|
|
45623
45934
|
const PatternComponent = getComponentForPattern(content.pattern);
|
|
45624
45935
|
if (PatternComponent) {
|
|
45625
45936
|
const childrenConfig = content.props.children;
|
|
@@ -45641,6 +45952,13 @@ function SlotContentRenderer({
|
|
|
45641
45952
|
} else {
|
|
45642
45953
|
finalProps = renderedProps;
|
|
45643
45954
|
}
|
|
45955
|
+
const isFormPattern = FORM_PATTERNS.has(content.pattern) || content.pattern.includes("form");
|
|
45956
|
+
if (isFormPattern && entityDef && Array.isArray(finalProps.fields)) {
|
|
45957
|
+
finalProps.fields = enrichFormFields(finalProps.fields, entityDef);
|
|
45958
|
+
if (finalProps.mode === "edit" && !finalProps.initialData && storeData.length > 0) {
|
|
45959
|
+
finalProps.initialData = storeData[0];
|
|
45960
|
+
}
|
|
45961
|
+
}
|
|
45644
45962
|
const acceptsChildren = PATTERNS_WITH_CHILDREN.has(content.pattern);
|
|
45645
45963
|
return /* @__PURE__ */ jsx(
|
|
45646
45964
|
Box,
|
|
@@ -46047,33 +46365,6 @@ function createClientEffectHandlers(options) {
|
|
|
46047
46365
|
})
|
|
46048
46366
|
};
|
|
46049
46367
|
}
|
|
46050
|
-
var EntitySchemaContext = createContext(null);
|
|
46051
|
-
function EntitySchemaProvider({
|
|
46052
|
-
entities,
|
|
46053
|
-
children
|
|
46054
|
-
}) {
|
|
46055
|
-
const entitiesMap = useMemo(() => {
|
|
46056
|
-
const map = /* @__PURE__ */ new Map();
|
|
46057
|
-
for (const entity of entities) {
|
|
46058
|
-
map.set(entity.name, entity);
|
|
46059
|
-
}
|
|
46060
|
-
return map;
|
|
46061
|
-
}, [entities]);
|
|
46062
|
-
const contextValue2 = useMemo(
|
|
46063
|
-
() => ({
|
|
46064
|
-
entities: entitiesMap
|
|
46065
|
-
}),
|
|
46066
|
-
[entitiesMap]
|
|
46067
|
-
);
|
|
46068
|
-
return /* @__PURE__ */ jsx(EntitySchemaContext.Provider, { value: contextValue2, children });
|
|
46069
|
-
}
|
|
46070
|
-
function useEntitySchema() {
|
|
46071
|
-
const context = useContext(EntitySchemaContext);
|
|
46072
|
-
if (!context) {
|
|
46073
|
-
throw new Error("useEntitySchema must be used within an EntitySchemaProvider");
|
|
46074
|
-
}
|
|
46075
|
-
return context;
|
|
46076
|
-
}
|
|
46077
46368
|
|
|
46078
46369
|
// runtime/useTraitStateMachine.ts
|
|
46079
46370
|
function toTraitDefinition(binding) {
|
|
@@ -47078,10 +47369,11 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
47078
47369
|
});
|
|
47079
47370
|
}, [eventBus]);
|
|
47080
47371
|
const handlePreviewDragOver = useCallback((e) => {
|
|
47081
|
-
if (!
|
|
47372
|
+
if (!e.dataTransfer.types.includes(ALMADAR_DND_MIME)) return;
|
|
47082
47373
|
e.preventDefault();
|
|
47083
47374
|
e.stopPropagation();
|
|
47084
47375
|
e.dataTransfer.dropEffect = "copy";
|
|
47376
|
+
if (!dragActive) setDragActive(true);
|
|
47085
47377
|
let el = e.target;
|
|
47086
47378
|
while (el && el.dataset.acceptsChildren !== "true") {
|
|
47087
47379
|
el = el.parentElement;
|
|
@@ -47171,7 +47463,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
47171
47463
|
}
|
|
47172
47464
|
);
|
|
47173
47465
|
};
|
|
47174
|
-
var OrbPreviewNode =
|
|
47466
|
+
var OrbPreviewNode = React125__default.memo(OrbPreviewNodeInner);
|
|
47175
47467
|
OrbPreviewNode.displayName = "OrbPreviewNode";
|
|
47176
47468
|
var EventFlowEdgeInner = (props) => {
|
|
47177
47469
|
const {
|
|
@@ -47248,7 +47540,7 @@ var EventFlowEdgeInner = (props) => {
|
|
|
47248
47540
|
) })
|
|
47249
47541
|
] });
|
|
47250
47542
|
};
|
|
47251
|
-
var EventFlowEdge =
|
|
47543
|
+
var EventFlowEdge = React125__default.memo(EventFlowEdgeInner);
|
|
47252
47544
|
EventFlowEdge.displayName = "EventFlowEdge";
|
|
47253
47545
|
|
|
47254
47546
|
// components/molecules/avl/index.ts
|
|
@@ -47728,6 +48020,8 @@ function FlowCanvasInner({
|
|
|
47728
48020
|
onNodeClick,
|
|
47729
48021
|
onLevelChange,
|
|
47730
48022
|
initialOrbital,
|
|
48023
|
+
initialLevel,
|
|
48024
|
+
initialSelectedNode,
|
|
47731
48025
|
editable,
|
|
47732
48026
|
onSchemaChange,
|
|
47733
48027
|
onPatternDelete,
|
|
@@ -47737,12 +48031,14 @@ function FlowCanvasInner({
|
|
|
47737
48031
|
if (typeof schemaProp === "string") return JSON.parse(schemaProp);
|
|
47738
48032
|
return schemaProp;
|
|
47739
48033
|
}, [schemaProp]);
|
|
47740
|
-
const [level, setLevel] = useState(
|
|
48034
|
+
const [level, setLevel] = useState(
|
|
48035
|
+
initialLevel ?? (initialOrbital ? "expanded" : "overview")
|
|
48036
|
+
);
|
|
47741
48037
|
const [expandedOrbital, setExpandedOrbital] = useState(
|
|
47742
48038
|
initialOrbital
|
|
47743
48039
|
);
|
|
47744
48040
|
const [screenSize, setScreenSize] = useState("tablet");
|
|
47745
|
-
const [selectedNode, setSelectedNode] = useState(null);
|
|
48041
|
+
const [selectedNode, setSelectedNode] = useState(initialSelectedNode ?? null);
|
|
47746
48042
|
const [selectedPattern, setSelectedPattern] = useState(null);
|
|
47747
48043
|
const patternSelectionValue = useMemo(() => ({
|
|
47748
48044
|
selected: selectedPattern,
|
|
@@ -48007,7 +48303,7 @@ var ZoomBreadcrumb = ({
|
|
|
48007
48303
|
if (eventName && band === "detail") {
|
|
48008
48304
|
segments.push({ icon: "\u26A1", label: eventName });
|
|
48009
48305
|
}
|
|
48010
|
-
return /* @__PURE__ */ jsx("div", { className: "absolute top-2 left-2 z-10 flex items-center gap-1 px-2 py-1 rounded-md bg-
|
|
48306
|
+
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-[11px] text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(React125__default.Fragment, { children: [
|
|
48011
48307
|
i > 0 && /* @__PURE__ */ jsx("span", { className: "opacity-40", children: ">" }),
|
|
48012
48308
|
/* @__PURE__ */ jsx("span", { className: "opacity-60", children: seg.icon }),
|
|
48013
48309
|
/* @__PURE__ */ jsx("span", { children: seg.label })
|
|
@@ -48059,11 +48355,11 @@ var ZoomLegend = ({ band }) => {
|
|
|
48059
48355
|
"button",
|
|
48060
48356
|
{
|
|
48061
48357
|
onClick: () => setCollapsed(!collapsed),
|
|
48062
|
-
className: "px-2 py-1 text-[10px] rounded-md bg-
|
|
48358
|
+
className: "px-2 py-1 text-[10px] rounded-md bg-card/90 border border-border text-muted-foreground backdrop-blur-sm cursor-pointer hover:bg-card",
|
|
48063
48359
|
children: collapsed ? "Legend" : "Hide"
|
|
48064
48360
|
}
|
|
48065
48361
|
),
|
|
48066
|
-
!collapsed && /* @__PURE__ */ jsx("div", { className: "mt-1 px-2 py-1.5 rounded-md bg-
|
|
48362
|
+
!collapsed && /* @__PURE__ */ jsx("div", { className: "mt-1 px-2 py-1.5 rounded-md bg-card/95 border border-border backdrop-blur-sm space-y-0.5", children: items.map((item, i) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 text-[10px] text-muted-foreground", children: [
|
|
48067
48363
|
/* @__PURE__ */ jsx("span", { className: "opacity-70 w-6 text-center", children: item.icon }),
|
|
48068
48364
|
/* @__PURE__ */ jsx("span", { children: item.label })
|
|
48069
48365
|
] }, i)) })
|