@almadar/ui 5.65.0 → 5.68.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 +3259 -1568
- package/dist/avl/index.d.cts +10 -2
- package/dist/avl/index.d.ts +1 -0
- package/dist/avl/index.js +1992 -302
- package/dist/components/avl/derive-edit-focus.d.ts +8 -0
- package/dist/components/core/organisms/ChatBar.d.ts +31 -0
- package/dist/components/core/organisms/SubagentTracePanel.d.ts +50 -0
- package/dist/components/core/organisms/index.d.ts +3 -0
- package/dist/components/core/organisms/trace-edit-focus.d.ts +14 -0
- package/dist/components/game/atoms/ChoiceButton.d.ts +7 -1
- package/dist/components/game/molecules/HealthPanel.d.ts +3 -0
- package/dist/components/game/molecules/IsometricCanvas.d.ts +1 -1
- package/dist/components/game/molecules/PowerupSlots.d.ts +3 -0
- package/dist/components/game/molecules/TurnPanel.d.ts +3 -0
- package/dist/components/game/molecules/three/index.cjs +6 -6
- package/dist/components/game/molecules/three/index.js +6 -6
- package/dist/components/game/organisms/BoardgameBoard.d.ts +37 -0
- package/dist/components/game/organisms/FishingBoard.d.ts +33 -0
- package/dist/components/game/organisms/HolidayRunnerBoard.d.ts +35 -0
- package/dist/components/game/organisms/MatchPuzzleBoard.d.ts +37 -0
- package/dist/components/game/organisms/MinigolfBoard.d.ts +37 -0
- package/dist/components/game/organisms/PinballBoard.d.ts +35 -0
- package/dist/components/game/organisms/PirateBoard.d.ts +37 -0
- package/dist/components/game/organisms/RacingBoard.d.ts +29 -0
- package/dist/components/game/organisms/SokobanBoard.d.ts +37 -0
- package/dist/components/game/organisms/SpaceShmupBoard.d.ts +20 -0
- package/dist/components/game/organisms/SpaceStationBoard.d.ts +37 -0
- package/dist/components/game/organisms/SportsBoard.d.ts +37 -0
- package/dist/components/game/organisms/TanksBoard.d.ts +37 -0
- package/dist/components/game/organisms/index.d.ts +13 -0
- package/dist/components/game/organisms/utils/isometric.d.ts +10 -1
- package/dist/components/index.cjs +3096 -1377
- package/dist/components/index.js +1970 -266
- package/dist/hooks/index.cjs +94 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +95 -2
- package/dist/hooks/useAgentTrace.d.ts +85 -0
- package/dist/providers/index.cjs +3037 -1351
- package/dist/providers/index.js +1937 -251
- package/dist/runtime/index.cjs +3095 -1409
- package/dist/runtime/index.js +1943 -257
- package/package.json +2 -2
package/dist/runtime/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React85 from 'react';
|
|
2
|
+
import React85__default, { createContext, useMemo, useContext, useRef, useEffect, useCallback, Suspense, useState, useSyncExternalStore, useLayoutEffect, lazy, useId, forwardRef, useImperativeHandle, Component } from 'react';
|
|
3
3
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
@@ -48,7 +48,7 @@ import { GLTFLoader as GLTFLoader$1 } from 'three/examples/jsm/loaders/GLTFLoade
|
|
|
48
48
|
import { clone } from 'three/examples/jsm/utils/SkeletonUtils';
|
|
49
49
|
import { Canvas, useLoader, useFrame, useThree } from '@react-three/fiber';
|
|
50
50
|
import { Billboard, Grid as Grid$1, OrbitControls } from '@react-three/drei';
|
|
51
|
-
import { getPatternDefinition, getComponentForPattern
|
|
51
|
+
import { getPatternDefinition, getComponentForPattern } from '@almadar/patterns';
|
|
52
52
|
import { StateMachineManager, collectDeclaredConfigDefaults, createServerEffectHandlers, EffectExecutor, createContextFromBindings, InMemoryPersistence } from '@almadar/runtime';
|
|
53
53
|
import { OrbitalServerRuntime } from '@almadar/runtime/OrbitalServerRuntime';
|
|
54
54
|
|
|
@@ -445,7 +445,7 @@ var init_Box = __esm({
|
|
|
445
445
|
fixed: "fixed",
|
|
446
446
|
sticky: "sticky"
|
|
447
447
|
};
|
|
448
|
-
Box =
|
|
448
|
+
Box = React85__default.forwardRef(
|
|
449
449
|
({
|
|
450
450
|
padding,
|
|
451
451
|
paddingX,
|
|
@@ -510,7 +510,7 @@ var init_Box = __esm({
|
|
|
510
510
|
onPointerDown?.(e);
|
|
511
511
|
}, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
|
|
512
512
|
const isClickable = action || onClick;
|
|
513
|
-
return
|
|
513
|
+
return React85__default.createElement(
|
|
514
514
|
Component2,
|
|
515
515
|
{
|
|
516
516
|
ref,
|
|
@@ -606,7 +606,7 @@ function loadLib(key, importer) {
|
|
|
606
606
|
return p2;
|
|
607
607
|
}
|
|
608
608
|
function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
|
|
609
|
-
const Lazy =
|
|
609
|
+
const Lazy = React85__default.lazy(async () => {
|
|
610
610
|
const lib = await loadLib(libKey, importer);
|
|
611
611
|
const Comp = pick(lib);
|
|
612
612
|
if (!Comp) {
|
|
@@ -616,7 +616,7 @@ function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
|
|
|
616
616
|
return { default: Comp };
|
|
617
617
|
});
|
|
618
618
|
const Wrapped = (props) => /* @__PURE__ */ jsx(
|
|
619
|
-
|
|
619
|
+
React85__default.Suspense,
|
|
620
620
|
{
|
|
621
621
|
fallback: /* @__PURE__ */ jsx(
|
|
622
622
|
"span",
|
|
@@ -1342,7 +1342,7 @@ var init_Icon = __esm({
|
|
|
1342
1342
|
const directIcon = typeof icon === "string" ? void 0 : icon;
|
|
1343
1343
|
const effectiveName = typeof icon === "string" ? icon : name;
|
|
1344
1344
|
const family = useIconFamily();
|
|
1345
|
-
const RenderedComponent =
|
|
1345
|
+
const RenderedComponent = React85__default.useMemo(() => {
|
|
1346
1346
|
if (directIcon) return null;
|
|
1347
1347
|
return effectiveName ? resolveIconForFamily(effectiveName, family) : null;
|
|
1348
1348
|
}, [directIcon, effectiveName, family]);
|
|
@@ -1401,7 +1401,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
1401
1401
|
const IconComp = value;
|
|
1402
1402
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
1403
1403
|
}
|
|
1404
|
-
if (
|
|
1404
|
+
if (React85__default.isValidElement(value)) {
|
|
1405
1405
|
return value;
|
|
1406
1406
|
}
|
|
1407
1407
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -1477,7 +1477,7 @@ var init_Button = __esm({
|
|
|
1477
1477
|
md: "h-icon-default w-icon-default",
|
|
1478
1478
|
lg: "h-icon-default w-icon-default"
|
|
1479
1479
|
};
|
|
1480
|
-
Button =
|
|
1480
|
+
Button = React85__default.forwardRef(
|
|
1481
1481
|
({
|
|
1482
1482
|
className,
|
|
1483
1483
|
variant = "primary",
|
|
@@ -1542,7 +1542,7 @@ var Dialog;
|
|
|
1542
1542
|
var init_Dialog = __esm({
|
|
1543
1543
|
"components/core/atoms/Dialog.tsx"() {
|
|
1544
1544
|
init_cn();
|
|
1545
|
-
Dialog =
|
|
1545
|
+
Dialog = React85__default.forwardRef(
|
|
1546
1546
|
({
|
|
1547
1547
|
role = "dialog",
|
|
1548
1548
|
"aria-modal": ariaModal = true,
|
|
@@ -2156,7 +2156,7 @@ var init_Badge = __esm({
|
|
|
2156
2156
|
md: "px-2.5 py-1 text-sm",
|
|
2157
2157
|
lg: "px-3 py-1.5 text-base"
|
|
2158
2158
|
};
|
|
2159
|
-
Badge =
|
|
2159
|
+
Badge = React85__default.forwardRef(
|
|
2160
2160
|
({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
|
|
2161
2161
|
const iconSizes3 = {
|
|
2162
2162
|
sm: "h-icon-default w-icon-default",
|
|
@@ -2492,7 +2492,7 @@ var init_SvgFlow = __esm({
|
|
|
2492
2492
|
width = 100,
|
|
2493
2493
|
height = 100
|
|
2494
2494
|
}) => {
|
|
2495
|
-
const markerId =
|
|
2495
|
+
const markerId = React85__default.useMemo(() => {
|
|
2496
2496
|
flowIdCounter += 1;
|
|
2497
2497
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
2498
2498
|
}, []);
|
|
@@ -3085,7 +3085,7 @@ var init_SvgRing = __esm({
|
|
|
3085
3085
|
width = 100,
|
|
3086
3086
|
height = 100
|
|
3087
3087
|
}) => {
|
|
3088
|
-
const gradientId =
|
|
3088
|
+
const gradientId = React85__default.useMemo(() => {
|
|
3089
3089
|
ringIdCounter += 1;
|
|
3090
3090
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
3091
3091
|
}, []);
|
|
@@ -3266,7 +3266,7 @@ var init_Input = __esm({
|
|
|
3266
3266
|
init_cn();
|
|
3267
3267
|
init_Icon();
|
|
3268
3268
|
init_useEventBus();
|
|
3269
|
-
Input =
|
|
3269
|
+
Input = React85__default.forwardRef(
|
|
3270
3270
|
({
|
|
3271
3271
|
className,
|
|
3272
3272
|
inputType,
|
|
@@ -3426,7 +3426,7 @@ var Label;
|
|
|
3426
3426
|
var init_Label = __esm({
|
|
3427
3427
|
"components/core/atoms/Label.tsx"() {
|
|
3428
3428
|
init_cn();
|
|
3429
|
-
Label =
|
|
3429
|
+
Label = React85__default.forwardRef(
|
|
3430
3430
|
({ className, required, children, ...props }, ref) => {
|
|
3431
3431
|
return /* @__PURE__ */ jsxs(
|
|
3432
3432
|
"label",
|
|
@@ -3453,7 +3453,7 @@ var init_Textarea = __esm({
|
|
|
3453
3453
|
"components/core/atoms/Textarea.tsx"() {
|
|
3454
3454
|
init_cn();
|
|
3455
3455
|
init_useEventBus();
|
|
3456
|
-
Textarea =
|
|
3456
|
+
Textarea = React85__default.forwardRef(
|
|
3457
3457
|
({ className, error, onChange, ...props }, ref) => {
|
|
3458
3458
|
const eventBus = useEventBus();
|
|
3459
3459
|
const handleChange = (e) => {
|
|
@@ -3692,7 +3692,7 @@ var init_Select = __esm({
|
|
|
3692
3692
|
init_cn();
|
|
3693
3693
|
init_Icon();
|
|
3694
3694
|
init_useEventBus();
|
|
3695
|
-
Select =
|
|
3695
|
+
Select = React85__default.forwardRef(
|
|
3696
3696
|
(props, _ref) => {
|
|
3697
3697
|
const { multiple, searchable, clearable } = props;
|
|
3698
3698
|
if (multiple || searchable || clearable) {
|
|
@@ -3709,7 +3709,7 @@ var init_Checkbox = __esm({
|
|
|
3709
3709
|
"components/core/atoms/Checkbox.tsx"() {
|
|
3710
3710
|
init_cn();
|
|
3711
3711
|
init_useEventBus();
|
|
3712
|
-
Checkbox =
|
|
3712
|
+
Checkbox = React85__default.forwardRef(
|
|
3713
3713
|
({ className, label, id, onChange, ...props }, ref) => {
|
|
3714
3714
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
3715
3715
|
const eventBus = useEventBus();
|
|
@@ -3763,7 +3763,7 @@ var init_Spinner = __esm({
|
|
|
3763
3763
|
md: "h-6 w-6",
|
|
3764
3764
|
lg: "h-8 w-8"
|
|
3765
3765
|
};
|
|
3766
|
-
Spinner =
|
|
3766
|
+
Spinner = React85__default.forwardRef(
|
|
3767
3767
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
3768
3768
|
if (overlay) {
|
|
3769
3769
|
return /* @__PURE__ */ jsx(
|
|
@@ -3853,7 +3853,7 @@ var init_Card = __esm({
|
|
|
3853
3853
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
3854
3854
|
"tile-image-first": "p-0 overflow-hidden"
|
|
3855
3855
|
};
|
|
3856
|
-
Card =
|
|
3856
|
+
Card = React85__default.forwardRef(
|
|
3857
3857
|
({
|
|
3858
3858
|
className,
|
|
3859
3859
|
variant = "bordered",
|
|
@@ -3901,9 +3901,9 @@ var init_Card = __esm({
|
|
|
3901
3901
|
}
|
|
3902
3902
|
);
|
|
3903
3903
|
Card.displayName = "Card";
|
|
3904
|
-
CardHeader =
|
|
3904
|
+
CardHeader = React85__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
3905
3905
|
CardHeader.displayName = "CardHeader";
|
|
3906
|
-
CardTitle =
|
|
3906
|
+
CardTitle = React85__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3907
3907
|
"h3",
|
|
3908
3908
|
{
|
|
3909
3909
|
ref,
|
|
@@ -3916,11 +3916,11 @@ var init_Card = __esm({
|
|
|
3916
3916
|
}
|
|
3917
3917
|
));
|
|
3918
3918
|
CardTitle.displayName = "CardTitle";
|
|
3919
|
-
CardContent =
|
|
3919
|
+
CardContent = React85__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
3920
3920
|
CardContent.displayName = "CardContent";
|
|
3921
3921
|
CardBody = CardContent;
|
|
3922
3922
|
CardBody.displayName = "CardBody";
|
|
3923
|
-
CardFooter =
|
|
3923
|
+
CardFooter = React85__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3924
3924
|
"div",
|
|
3925
3925
|
{
|
|
3926
3926
|
ref,
|
|
@@ -3975,7 +3975,7 @@ var init_FilterPill = __esm({
|
|
|
3975
3975
|
md: "w-3.5 h-3.5",
|
|
3976
3976
|
lg: "w-4 h-4"
|
|
3977
3977
|
};
|
|
3978
|
-
FilterPill =
|
|
3978
|
+
FilterPill = React85__default.forwardRef(
|
|
3979
3979
|
({
|
|
3980
3980
|
className,
|
|
3981
3981
|
variant = "default",
|
|
@@ -4104,8 +4104,8 @@ var init_Avatar = __esm({
|
|
|
4104
4104
|
actionPayload
|
|
4105
4105
|
}) => {
|
|
4106
4106
|
const eventBus = useEventBus();
|
|
4107
|
-
const [imgFailed, setImgFailed] =
|
|
4108
|
-
|
|
4107
|
+
const [imgFailed, setImgFailed] = React85__default.useState(false);
|
|
4108
|
+
React85__default.useEffect(() => {
|
|
4109
4109
|
setImgFailed(false);
|
|
4110
4110
|
}, [src]);
|
|
4111
4111
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -4490,7 +4490,7 @@ var init_Radio = __esm({
|
|
|
4490
4490
|
md: "w-2.5 h-2.5",
|
|
4491
4491
|
lg: "w-3 h-3"
|
|
4492
4492
|
};
|
|
4493
|
-
Radio =
|
|
4493
|
+
Radio = React85__default.forwardRef(
|
|
4494
4494
|
({
|
|
4495
4495
|
label,
|
|
4496
4496
|
helperText,
|
|
@@ -4507,12 +4507,12 @@ var init_Radio = __esm({
|
|
|
4507
4507
|
onChange,
|
|
4508
4508
|
...props
|
|
4509
4509
|
}, ref) => {
|
|
4510
|
-
const reactId =
|
|
4510
|
+
const reactId = React85__default.useId();
|
|
4511
4511
|
const baseId = id || `radio-${reactId}`;
|
|
4512
4512
|
const hasError = !!error;
|
|
4513
4513
|
const eventBus = useEventBus();
|
|
4514
|
-
const [selected, setSelected] =
|
|
4515
|
-
|
|
4514
|
+
const [selected, setSelected] = React85__default.useState(value);
|
|
4515
|
+
React85__default.useEffect(() => {
|
|
4516
4516
|
if (value !== void 0) setSelected(value);
|
|
4517
4517
|
}, [value]);
|
|
4518
4518
|
const pick = (next, e) => {
|
|
@@ -4694,7 +4694,7 @@ var init_Switch = __esm({
|
|
|
4694
4694
|
"components/core/atoms/Switch.tsx"() {
|
|
4695
4695
|
"use client";
|
|
4696
4696
|
init_cn();
|
|
4697
|
-
Switch =
|
|
4697
|
+
Switch = React85.forwardRef(
|
|
4698
4698
|
({
|
|
4699
4699
|
checked,
|
|
4700
4700
|
defaultChecked = false,
|
|
@@ -4705,10 +4705,10 @@ var init_Switch = __esm({
|
|
|
4705
4705
|
name,
|
|
4706
4706
|
className
|
|
4707
4707
|
}, ref) => {
|
|
4708
|
-
const [isChecked, setIsChecked] =
|
|
4708
|
+
const [isChecked, setIsChecked] = React85.useState(
|
|
4709
4709
|
checked !== void 0 ? checked : defaultChecked
|
|
4710
4710
|
);
|
|
4711
|
-
|
|
4711
|
+
React85.useEffect(() => {
|
|
4712
4712
|
if (checked !== void 0) {
|
|
4713
4713
|
setIsChecked(checked);
|
|
4714
4714
|
}
|
|
@@ -5068,7 +5068,7 @@ var Aside;
|
|
|
5068
5068
|
var init_Aside = __esm({
|
|
5069
5069
|
"components/core/atoms/Aside.tsx"() {
|
|
5070
5070
|
init_cn();
|
|
5071
|
-
Aside =
|
|
5071
|
+
Aside = React85__default.forwardRef(
|
|
5072
5072
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
5073
5073
|
);
|
|
5074
5074
|
Aside.displayName = "Aside";
|
|
@@ -5147,9 +5147,9 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5147
5147
|
className
|
|
5148
5148
|
}) => {
|
|
5149
5149
|
const { t } = useTranslate();
|
|
5150
|
-
const [isVisible, setIsVisible] =
|
|
5151
|
-
const timeoutRef =
|
|
5152
|
-
const triggerRef =
|
|
5150
|
+
const [isVisible, setIsVisible] = React85__default.useState(false);
|
|
5151
|
+
const timeoutRef = React85__default.useRef(null);
|
|
5152
|
+
const triggerRef = React85__default.useRef(null);
|
|
5153
5153
|
const handleMouseEnter = () => {
|
|
5154
5154
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5155
5155
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -5160,7 +5160,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5160
5160
|
};
|
|
5161
5161
|
const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
|
|
5162
5162
|
const open = isVisible || revealed;
|
|
5163
|
-
|
|
5163
|
+
React85__default.useEffect(() => {
|
|
5164
5164
|
return () => {
|
|
5165
5165
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5166
5166
|
};
|
|
@@ -5372,7 +5372,7 @@ var init_StatusDot = __esm({
|
|
|
5372
5372
|
md: "w-2.5 h-2.5",
|
|
5373
5373
|
lg: "w-3 h-3"
|
|
5374
5374
|
};
|
|
5375
|
-
StatusDot =
|
|
5375
|
+
StatusDot = React85__default.forwardRef(
|
|
5376
5376
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
5377
5377
|
return /* @__PURE__ */ jsx(
|
|
5378
5378
|
"span",
|
|
@@ -5426,7 +5426,7 @@ var init_TrendIndicator = __esm({
|
|
|
5426
5426
|
down: "trending-down",
|
|
5427
5427
|
flat: "arrow-right"
|
|
5428
5428
|
};
|
|
5429
|
-
TrendIndicator =
|
|
5429
|
+
TrendIndicator = React85__default.forwardRef(
|
|
5430
5430
|
({
|
|
5431
5431
|
className,
|
|
5432
5432
|
value,
|
|
@@ -5493,7 +5493,7 @@ var init_RangeSlider = __esm({
|
|
|
5493
5493
|
md: "w-4 h-4",
|
|
5494
5494
|
lg: "w-5 h-5"
|
|
5495
5495
|
};
|
|
5496
|
-
RangeSlider =
|
|
5496
|
+
RangeSlider = React85__default.forwardRef(
|
|
5497
5497
|
({
|
|
5498
5498
|
className,
|
|
5499
5499
|
min = 0,
|
|
@@ -6001,7 +6001,7 @@ var init_ContentSection = __esm({
|
|
|
6001
6001
|
md: "py-16",
|
|
6002
6002
|
lg: "py-24"
|
|
6003
6003
|
};
|
|
6004
|
-
ContentSection =
|
|
6004
|
+
ContentSection = React85__default.forwardRef(
|
|
6005
6005
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
6006
6006
|
return /* @__PURE__ */ jsx(
|
|
6007
6007
|
Box,
|
|
@@ -6535,7 +6535,7 @@ var init_AnimatedReveal = __esm({
|
|
|
6535
6535
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
6536
6536
|
"none": {}
|
|
6537
6537
|
};
|
|
6538
|
-
AnimatedReveal =
|
|
6538
|
+
AnimatedReveal = React85__default.forwardRef(
|
|
6539
6539
|
({
|
|
6540
6540
|
trigger = "scroll",
|
|
6541
6541
|
animation = "fade-up",
|
|
@@ -6695,7 +6695,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6695
6695
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
6696
6696
|
"use client";
|
|
6697
6697
|
init_cn();
|
|
6698
|
-
AnimatedGraphic =
|
|
6698
|
+
AnimatedGraphic = React85__default.forwardRef(
|
|
6699
6699
|
({
|
|
6700
6700
|
src,
|
|
6701
6701
|
svgContent,
|
|
@@ -6718,7 +6718,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6718
6718
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
6719
6719
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
6720
6720
|
const prevAnimateRef = useRef(animate);
|
|
6721
|
-
const setRef =
|
|
6721
|
+
const setRef = React85__default.useCallback(
|
|
6722
6722
|
(node) => {
|
|
6723
6723
|
containerRef.current = node;
|
|
6724
6724
|
if (typeof ref === "function") ref(node);
|
|
@@ -6944,9 +6944,9 @@ function ScoreDisplay({
|
|
|
6944
6944
|
...rest
|
|
6945
6945
|
}) {
|
|
6946
6946
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
|
|
6947
|
-
const [displayValue, setDisplayValue] =
|
|
6948
|
-
const [isAnimating, setIsAnimating] =
|
|
6949
|
-
|
|
6947
|
+
const [displayValue, setDisplayValue] = React85.useState(resolvedValue);
|
|
6948
|
+
const [isAnimating, setIsAnimating] = React85.useState(false);
|
|
6949
|
+
React85.useEffect(() => {
|
|
6950
6950
|
if (!animated || displayValue === resolvedValue) {
|
|
6951
6951
|
setDisplayValue(resolvedValue);
|
|
6952
6952
|
return;
|
|
@@ -7029,9 +7029,9 @@ function ControlButton({
|
|
|
7029
7029
|
className
|
|
7030
7030
|
}) {
|
|
7031
7031
|
const eventBus = useEventBus();
|
|
7032
|
-
const [isPressed, setIsPressed] =
|
|
7032
|
+
const [isPressed, setIsPressed] = React85.useState(false);
|
|
7033
7033
|
const actualPressed = pressed ?? isPressed;
|
|
7034
|
-
const handlePointerDown =
|
|
7034
|
+
const handlePointerDown = React85.useCallback(
|
|
7035
7035
|
(e) => {
|
|
7036
7036
|
e.preventDefault();
|
|
7037
7037
|
if (disabled) return;
|
|
@@ -7041,7 +7041,7 @@ function ControlButton({
|
|
|
7041
7041
|
},
|
|
7042
7042
|
[disabled, pressEvent, eventBus, onPress]
|
|
7043
7043
|
);
|
|
7044
|
-
const handlePointerUp =
|
|
7044
|
+
const handlePointerUp = React85.useCallback(
|
|
7045
7045
|
(e) => {
|
|
7046
7046
|
e.preventDefault();
|
|
7047
7047
|
if (disabled) return;
|
|
@@ -7051,7 +7051,7 @@ function ControlButton({
|
|
|
7051
7051
|
},
|
|
7052
7052
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
7053
7053
|
);
|
|
7054
|
-
const handlePointerLeave =
|
|
7054
|
+
const handlePointerLeave = React85.useCallback(
|
|
7055
7055
|
(e) => {
|
|
7056
7056
|
if (isPressed) {
|
|
7057
7057
|
setIsPressed(false);
|
|
@@ -7672,8 +7672,8 @@ function XPBar({
|
|
|
7672
7672
|
}) {
|
|
7673
7673
|
const sizes = sizeMap9[size];
|
|
7674
7674
|
const percentage = max > 0 ? Math.max(0, Math.min(100, current / max * 100)) : 0;
|
|
7675
|
-
const [fillWidth, setFillWidth] =
|
|
7676
|
-
|
|
7675
|
+
const [fillWidth, setFillWidth] = React85.useState(animated ? 0 : percentage);
|
|
7676
|
+
React85.useEffect(() => {
|
|
7677
7677
|
if (!animated) {
|
|
7678
7678
|
setFillWidth(percentage);
|
|
7679
7679
|
return;
|
|
@@ -8016,6 +8016,8 @@ var init_DialogueBubble = __esm({
|
|
|
8016
8016
|
function ChoiceButton({
|
|
8017
8017
|
text = "Charge forward into the fray",
|
|
8018
8018
|
index,
|
|
8019
|
+
assetUrl,
|
|
8020
|
+
icon,
|
|
8019
8021
|
disabled = false,
|
|
8020
8022
|
selected = false,
|
|
8021
8023
|
onClick,
|
|
@@ -8048,6 +8050,23 @@ function ChoiceButton({
|
|
|
8048
8050
|
]
|
|
8049
8051
|
}
|
|
8050
8052
|
),
|
|
8053
|
+
assetUrl ? /* @__PURE__ */ jsx(
|
|
8054
|
+
"img",
|
|
8055
|
+
{
|
|
8056
|
+
src: assetUrl,
|
|
8057
|
+
alt: "",
|
|
8058
|
+
width: 16,
|
|
8059
|
+
height: 16,
|
|
8060
|
+
style: { imageRendering: "pixelated", objectFit: "contain" },
|
|
8061
|
+
className: "flex-shrink-0"
|
|
8062
|
+
}
|
|
8063
|
+
) : icon ? /* @__PURE__ */ jsx("span", { className: "flex-shrink-0 text-sm", children: typeof icon === "string" ? (() => {
|
|
8064
|
+
const I = resolveIcon(icon);
|
|
8065
|
+
return I ? /* @__PURE__ */ jsx(I, { className: "w-4 h-4" }) : null;
|
|
8066
|
+
})() : /* @__PURE__ */ (() => {
|
|
8067
|
+
const I = icon;
|
|
8068
|
+
return /* @__PURE__ */ jsx(I, { className: "w-4 h-4" });
|
|
8069
|
+
})() }) : null,
|
|
8051
8070
|
/* @__PURE__ */ jsx("span", { className: "text-sm leading-snug", children: text })
|
|
8052
8071
|
]
|
|
8053
8072
|
}
|
|
@@ -8056,6 +8075,7 @@ function ChoiceButton({
|
|
|
8056
8075
|
var init_ChoiceButton = __esm({
|
|
8057
8076
|
"components/game/atoms/ChoiceButton.tsx"() {
|
|
8058
8077
|
init_cn();
|
|
8078
|
+
init_Icon();
|
|
8059
8079
|
ChoiceButton.displayName = "ChoiceButton";
|
|
8060
8080
|
}
|
|
8061
8081
|
});
|
|
@@ -8161,9 +8181,9 @@ function MiniMap({
|
|
|
8161
8181
|
viewportRect = DEFAULT_VIEWPORT,
|
|
8162
8182
|
className
|
|
8163
8183
|
}) {
|
|
8164
|
-
const canvasRef =
|
|
8165
|
-
const frameRef =
|
|
8166
|
-
|
|
8184
|
+
const canvasRef = React85.useRef(null);
|
|
8185
|
+
const frameRef = React85.useRef(0);
|
|
8186
|
+
React85.useEffect(() => {
|
|
8167
8187
|
const canvas = canvasRef.current;
|
|
8168
8188
|
if (!canvas) return;
|
|
8169
8189
|
const ctx = canvas.getContext("2d");
|
|
@@ -8352,7 +8372,7 @@ var init_ErrorBoundary = __esm({
|
|
|
8352
8372
|
}
|
|
8353
8373
|
);
|
|
8354
8374
|
};
|
|
8355
|
-
ErrorBoundary = class extends
|
|
8375
|
+
ErrorBoundary = class extends React85__default.Component {
|
|
8356
8376
|
constructor(props) {
|
|
8357
8377
|
super(props);
|
|
8358
8378
|
__publicField(this, "reset", () => {
|
|
@@ -9387,8 +9407,8 @@ function ActionButtons({
|
|
|
9387
9407
|
disabled
|
|
9388
9408
|
}) {
|
|
9389
9409
|
const eventBus = useEventBus();
|
|
9390
|
-
const [activeButtons, setActiveButtons] =
|
|
9391
|
-
const handlePress =
|
|
9410
|
+
const [activeButtons, setActiveButtons] = React85.useState(/* @__PURE__ */ new Set());
|
|
9411
|
+
const handlePress = React85.useCallback(
|
|
9392
9412
|
(id) => {
|
|
9393
9413
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
9394
9414
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -9396,7 +9416,7 @@ function ActionButtons({
|
|
|
9396
9416
|
},
|
|
9397
9417
|
[actionEvent, eventBus, onAction]
|
|
9398
9418
|
);
|
|
9399
|
-
const handleRelease =
|
|
9419
|
+
const handleRelease = React85.useCallback(
|
|
9400
9420
|
(id) => {
|
|
9401
9421
|
setActiveButtons((prev) => {
|
|
9402
9422
|
const next = new Set(prev);
|
|
@@ -10945,6 +10965,11 @@ function isoToScreen(tileX, tileY, scale, baseOffsetX, layout = "isometric") {
|
|
|
10945
10965
|
const screenY2 = tileY * (scaledFloorHeight * 0.75);
|
|
10946
10966
|
return { x: screenX2, y: screenY2 };
|
|
10947
10967
|
}
|
|
10968
|
+
if (layout === "flat") {
|
|
10969
|
+
const screenX2 = tileX * scaledTileWidth + baseOffsetX;
|
|
10970
|
+
const screenY2 = tileY * scaledFloorHeight;
|
|
10971
|
+
return { x: screenX2, y: screenY2 };
|
|
10972
|
+
}
|
|
10948
10973
|
const screenX = (tileX - tileY) * (scaledTileWidth / 2) + baseOffsetX;
|
|
10949
10974
|
const screenY = (tileX + tileY) * (scaledFloorHeight / 2);
|
|
10950
10975
|
return { x: screenX, y: screenY };
|
|
@@ -10957,6 +10982,11 @@ function screenToIso(screenX, screenY, scale, baseOffsetX, layout = "isometric")
|
|
|
10957
10982
|
const col = Math.round((screenX - (row & 1) * (scaledTileWidth / 2) - baseOffsetX) / scaledTileWidth);
|
|
10958
10983
|
return { x: col, y: row };
|
|
10959
10984
|
}
|
|
10985
|
+
if (layout === "flat") {
|
|
10986
|
+
const col = Math.round((screenX - baseOffsetX) / scaledTileWidth);
|
|
10987
|
+
const row = Math.round(screenY / scaledFloorHeight);
|
|
10988
|
+
return { x: col, y: row };
|
|
10989
|
+
}
|
|
10960
10990
|
const adjustedX = screenX - baseOffsetX;
|
|
10961
10991
|
const tileX = (adjustedX / (scaledTileWidth / 2) + screenY / (scaledFloorHeight / 2)) / 2;
|
|
10962
10992
|
const tileY = (screenY / (scaledFloorHeight / 2) - adjustedX / (scaledTileWidth / 2)) / 2;
|
|
@@ -11076,7 +11106,7 @@ function IsometricCanvas({
|
|
|
11076
11106
|
);
|
|
11077
11107
|
const sortedTiles = useMemo(() => {
|
|
11078
11108
|
const tiles = [...tilesProp];
|
|
11079
|
-
if (tileLayout === "hex") {
|
|
11109
|
+
if (tileLayout === "hex" || tileLayout === "flat") {
|
|
11080
11110
|
tiles.sort((a, b) => a.y !== b.y ? a.y - b.y : a.x - b.x);
|
|
11081
11111
|
} else {
|
|
11082
11112
|
tiles.sort((a, b) => {
|
|
@@ -11204,7 +11234,8 @@ function IsometricCanvas({
|
|
|
11204
11234
|
const minX = Math.min(...allScreenPos.map((p2) => p2.x));
|
|
11205
11235
|
const maxX = Math.max(...allScreenPos.map((p2) => p2.x + scaledTileWidth));
|
|
11206
11236
|
const minY = Math.min(...allScreenPos.map((p2) => p2.y));
|
|
11207
|
-
const
|
|
11237
|
+
const tileBottomExtent = tileLayout === "hex" || tileLayout === "flat" ? scaledTileWidth : scaledTileHeight;
|
|
11238
|
+
const maxY = Math.max(...allScreenPos.map((p2) => p2.y + tileBottomExtent));
|
|
11208
11239
|
const worldW = maxX - minX;
|
|
11209
11240
|
const worldH = maxY - minY;
|
|
11210
11241
|
const scaleM = Math.min(mW / worldW, mH / worldH) * 0.9;
|
|
@@ -11296,7 +11327,7 @@ function IsometricCanvas({
|
|
|
11296
11327
|
const drawW = scaledTileWidth;
|
|
11297
11328
|
const drawH = scaledTileWidth * (img.naturalHeight / img.naturalWidth);
|
|
11298
11329
|
const drawX = pos.x;
|
|
11299
|
-
const drawY = pos.y + scaledTileHeight - drawH;
|
|
11330
|
+
const drawY = tileLayout === "hex" || tileLayout === "flat" ? pos.y : pos.y + scaledTileHeight - drawH;
|
|
11300
11331
|
ctx.drawImage(img, drawX, drawY, drawW, drawH);
|
|
11301
11332
|
}
|
|
11302
11333
|
} else {
|
|
@@ -11363,7 +11394,7 @@ function IsometricCanvas({
|
|
|
11363
11394
|
}
|
|
11364
11395
|
}
|
|
11365
11396
|
const sortedFeatures = [...features].sort((a, b) => {
|
|
11366
|
-
if (tileLayout === "hex") return a.y !== b.y ? a.y - b.y : a.x - b.x;
|
|
11397
|
+
if (tileLayout === "hex" || tileLayout === "flat") return a.y !== b.y ? a.y - b.y : a.x - b.x;
|
|
11367
11398
|
const depthA = a.x + a.y;
|
|
11368
11399
|
const depthB = b.x + b.y;
|
|
11369
11400
|
return depthA !== depthB ? depthA - depthB : a.y - b.y;
|
|
@@ -11404,7 +11435,7 @@ function IsometricCanvas({
|
|
|
11404
11435
|
}
|
|
11405
11436
|
const unitsWithPosition = units.filter((u) => !!u.position);
|
|
11406
11437
|
const sortedUnits = [...unitsWithPosition].sort((a, b) => {
|
|
11407
|
-
if (tileLayout === "hex") return a.position.y !== b.position.y ? a.position.y - b.position.y : a.position.x - b.position.x;
|
|
11438
|
+
if (tileLayout === "hex" || tileLayout === "flat") return a.position.y !== b.position.y ? a.position.y - b.position.y : a.position.x - b.position.x;
|
|
11408
11439
|
const depthA = a.position.x + a.position.y;
|
|
11409
11440
|
const depthB = b.position.x + b.position.y;
|
|
11410
11441
|
return depthA !== depthB ? depthA - depthB : a.position.y - b.position.y;
|
|
@@ -13579,7 +13610,7 @@ var init_CodeBlock = __esm({
|
|
|
13579
13610
|
};
|
|
13580
13611
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
13581
13612
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
13582
|
-
CodeBlock =
|
|
13613
|
+
CodeBlock = React85__default.memo(
|
|
13583
13614
|
({
|
|
13584
13615
|
code: rawCode,
|
|
13585
13616
|
language = "text",
|
|
@@ -14166,7 +14197,7 @@ var init_MarkdownContent = __esm({
|
|
|
14166
14197
|
init_Box();
|
|
14167
14198
|
init_CodeBlock();
|
|
14168
14199
|
init_cn();
|
|
14169
|
-
MarkdownContent =
|
|
14200
|
+
MarkdownContent = React85__default.memo(
|
|
14170
14201
|
({ content, direction = "ltr", className }) => {
|
|
14171
14202
|
const { t: _t } = useTranslate();
|
|
14172
14203
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -14456,6 +14487,48 @@ var init_BloomQuizBlock = __esm({
|
|
|
14456
14487
|
BloomQuizBlock.displayName = "BloomQuizBlock";
|
|
14457
14488
|
}
|
|
14458
14489
|
});
|
|
14490
|
+
function BoardgameBoard({
|
|
14491
|
+
tiles,
|
|
14492
|
+
units,
|
|
14493
|
+
features,
|
|
14494
|
+
assetManifest,
|
|
14495
|
+
assetBaseUrl,
|
|
14496
|
+
scale = 0.45,
|
|
14497
|
+
showMinimap = false,
|
|
14498
|
+
enableCamera = true,
|
|
14499
|
+
tileClickEvent,
|
|
14500
|
+
unitClickEvent,
|
|
14501
|
+
isLoading,
|
|
14502
|
+
error,
|
|
14503
|
+
className
|
|
14504
|
+
}) {
|
|
14505
|
+
return /* @__PURE__ */ jsx("div", { className: cn("boardgame-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
14506
|
+
IsometricCanvas_default,
|
|
14507
|
+
{
|
|
14508
|
+
tileLayout: "flat",
|
|
14509
|
+
tiles,
|
|
14510
|
+
units,
|
|
14511
|
+
features,
|
|
14512
|
+
assetManifest,
|
|
14513
|
+
assetBaseUrl,
|
|
14514
|
+
scale,
|
|
14515
|
+
showMinimap,
|
|
14516
|
+
enableCamera,
|
|
14517
|
+
tileClickEvent,
|
|
14518
|
+
unitClickEvent,
|
|
14519
|
+
isLoading,
|
|
14520
|
+
error
|
|
14521
|
+
}
|
|
14522
|
+
) });
|
|
14523
|
+
}
|
|
14524
|
+
var init_BoardgameBoard = __esm({
|
|
14525
|
+
"components/game/organisms/BoardgameBoard.tsx"() {
|
|
14526
|
+
"use client";
|
|
14527
|
+
init_cn();
|
|
14528
|
+
init_IsometricCanvas();
|
|
14529
|
+
BoardgameBoard.displayName = "BoardgameBoard";
|
|
14530
|
+
}
|
|
14531
|
+
});
|
|
14459
14532
|
var MIN_DIAGRAM_WIDTH, ScaledDiagram;
|
|
14460
14533
|
var init_ScaledDiagram = __esm({
|
|
14461
14534
|
"components/core/molecules/ScaledDiagram.tsx"() {
|
|
@@ -15493,7 +15566,7 @@ var init_StateMachineView = __esm({
|
|
|
15493
15566
|
style: { top: title ? 30 : 0 },
|
|
15494
15567
|
children: [
|
|
15495
15568
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
15496
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
15569
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React85__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
15497
15570
|
StateNode,
|
|
15498
15571
|
{
|
|
15499
15572
|
state,
|
|
@@ -19448,7 +19521,7 @@ function CardHand({
|
|
|
19448
19521
|
className
|
|
19449
19522
|
}) {
|
|
19450
19523
|
const eventBus = useEventBus();
|
|
19451
|
-
const handleClick =
|
|
19524
|
+
const handleClick = React85.useCallback(
|
|
19452
19525
|
(card) => {
|
|
19453
19526
|
if (card.disabled) return;
|
|
19454
19527
|
onCardClick?.(card.id);
|
|
@@ -21594,6 +21667,215 @@ var init_ChartLegend = __esm({
|
|
|
21594
21667
|
ChartLegend.displayName = "ChartLegend";
|
|
21595
21668
|
}
|
|
21596
21669
|
});
|
|
21670
|
+
|
|
21671
|
+
// components/core/organisms/trace-edit-focus.ts
|
|
21672
|
+
function asString(v) {
|
|
21673
|
+
return typeof v === "string" ? v : void 0;
|
|
21674
|
+
}
|
|
21675
|
+
function asLevel(v) {
|
|
21676
|
+
if (typeof v === "string" && EDIT_FOCUS_LEVELS.has(v)) {
|
|
21677
|
+
return v;
|
|
21678
|
+
}
|
|
21679
|
+
return "node";
|
|
21680
|
+
}
|
|
21681
|
+
function isEventPayload(v) {
|
|
21682
|
+
return v !== null && v !== void 0 && typeof v === "object" && !Array.isArray(v) && !(v instanceof Date);
|
|
21683
|
+
}
|
|
21684
|
+
function parseEditFocus(value) {
|
|
21685
|
+
if (!isEventPayload(value)) return null;
|
|
21686
|
+
const payload = value;
|
|
21687
|
+
const orbital = asString(payload.orbital);
|
|
21688
|
+
if (orbital === void 0 || orbital.length === 0) return null;
|
|
21689
|
+
const focus = {
|
|
21690
|
+
level: asLevel(payload.level),
|
|
21691
|
+
orbital,
|
|
21692
|
+
label: asString(payload.label) ?? orbital
|
|
21693
|
+
};
|
|
21694
|
+
const trait = asString(payload.trait);
|
|
21695
|
+
if (trait !== void 0) focus.trait = trait;
|
|
21696
|
+
const transition = asString(payload.transition);
|
|
21697
|
+
if (transition !== void 0) focus.transition = transition;
|
|
21698
|
+
const state = asString(payload.state);
|
|
21699
|
+
if (state !== void 0) focus.state = state;
|
|
21700
|
+
const slot = asString(payload.slot);
|
|
21701
|
+
if (slot !== void 0) focus.slot = slot;
|
|
21702
|
+
const path = asString(payload.path);
|
|
21703
|
+
if (path !== void 0) focus.path = path;
|
|
21704
|
+
const patternType = asString(payload.patternType);
|
|
21705
|
+
if (patternType !== void 0) focus.patternType = patternType;
|
|
21706
|
+
const entity = asString(payload.entity);
|
|
21707
|
+
if (entity !== void 0) focus.entity = entity;
|
|
21708
|
+
const source = asString(payload.source);
|
|
21709
|
+
if (source !== void 0) focus.source = source;
|
|
21710
|
+
return focus;
|
|
21711
|
+
}
|
|
21712
|
+
var ELEMENT_SELECTED_EVENT, EDIT_FOCUS_LEVELS;
|
|
21713
|
+
var init_trace_edit_focus = __esm({
|
|
21714
|
+
"components/core/organisms/trace-edit-focus.ts"() {
|
|
21715
|
+
ELEMENT_SELECTED_EVENT = "UI:ELEMENT_SELECTED";
|
|
21716
|
+
EDIT_FOCUS_LEVELS = /* @__PURE__ */ new Set([
|
|
21717
|
+
"node",
|
|
21718
|
+
"slot",
|
|
21719
|
+
"field",
|
|
21720
|
+
"effect",
|
|
21721
|
+
"trait",
|
|
21722
|
+
"page",
|
|
21723
|
+
"orbital"
|
|
21724
|
+
]);
|
|
21725
|
+
}
|
|
21726
|
+
});
|
|
21727
|
+
function getJepaBadgeVariant(probability) {
|
|
21728
|
+
if (probability >= 0.9) return "success";
|
|
21729
|
+
if (probability >= 0.5) return "warning";
|
|
21730
|
+
return "danger";
|
|
21731
|
+
}
|
|
21732
|
+
function ChatBar({
|
|
21733
|
+
status = "idle",
|
|
21734
|
+
activeGate,
|
|
21735
|
+
jepaValidity,
|
|
21736
|
+
placeholder,
|
|
21737
|
+
context,
|
|
21738
|
+
className
|
|
21739
|
+
}) {
|
|
21740
|
+
const { t } = useTranslate();
|
|
21741
|
+
const eventBus = useEventBus();
|
|
21742
|
+
const [inputValue, setInputValue] = useState("");
|
|
21743
|
+
const [focus, setFocus] = useState(null);
|
|
21744
|
+
const clearFocus = useCallback(() => {
|
|
21745
|
+
setFocus(null);
|
|
21746
|
+
eventBus.emit(ELEMENT_SELECTED_EVENT, { focus: null });
|
|
21747
|
+
}, [eventBus]);
|
|
21748
|
+
const handleKeyDown = useCallback((e) => {
|
|
21749
|
+
if (e.key !== "Enter" || e.shiftKey) return;
|
|
21750
|
+
const trimmed = inputValue.trim();
|
|
21751
|
+
if (!trimmed) return;
|
|
21752
|
+
e.preventDefault();
|
|
21753
|
+
eventBus.emit("UI:CHAT_SEND", { message: trimmed });
|
|
21754
|
+
}, [inputValue, eventBus]);
|
|
21755
|
+
useEffect(() => {
|
|
21756
|
+
const unsubSend = eventBus.on("UI:CHAT_SEND", () => {
|
|
21757
|
+
setInputValue("");
|
|
21758
|
+
setFocus(null);
|
|
21759
|
+
});
|
|
21760
|
+
const unsubSelect = eventBus.on(ELEMENT_SELECTED_EVENT, (e) => {
|
|
21761
|
+
setFocus(parseEditFocus(e.payload?.focus));
|
|
21762
|
+
});
|
|
21763
|
+
return () => {
|
|
21764
|
+
unsubSend();
|
|
21765
|
+
unsubSelect();
|
|
21766
|
+
};
|
|
21767
|
+
}, [eventBus]);
|
|
21768
|
+
const trailingAction = status === "error" ? /* @__PURE__ */ jsxs(Button, { variant: "secondary", size: "sm", action: "RETRY_GENERATION", className: "rounded-none flex-shrink-0 h-auto", children: [
|
|
21769
|
+
/* @__PURE__ */ jsx(Icon, { name: "refresh-cw", size: "xs" }),
|
|
21770
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", children: t("openFile.retry") })
|
|
21771
|
+
] }) : status === "running" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
21772
|
+
/* @__PURE__ */ jsx(
|
|
21773
|
+
Button,
|
|
21774
|
+
{
|
|
21775
|
+
variant: "ghost",
|
|
21776
|
+
size: "sm",
|
|
21777
|
+
action: "PAUSE",
|
|
21778
|
+
title: t("chatBar.pauseTheAgentYouCanEdit"),
|
|
21779
|
+
className: "rounded-none flex-shrink-0 h-auto",
|
|
21780
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "pause", size: "xs" })
|
|
21781
|
+
}
|
|
21782
|
+
),
|
|
21783
|
+
/* @__PURE__ */ jsx(
|
|
21784
|
+
Button,
|
|
21785
|
+
{
|
|
21786
|
+
variant: "ghost",
|
|
21787
|
+
size: "sm",
|
|
21788
|
+
action: "STOP",
|
|
21789
|
+
title: t("chatBar.cancelGeneration"),
|
|
21790
|
+
className: "rounded-none flex-shrink-0 h-auto border-l border-[var(--color-border)]",
|
|
21791
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "square", size: "xs" })
|
|
21792
|
+
}
|
|
21793
|
+
)
|
|
21794
|
+
] }) : status === "paused" ? /* @__PURE__ */ jsxs(
|
|
21795
|
+
Button,
|
|
21796
|
+
{
|
|
21797
|
+
variant: "primary",
|
|
21798
|
+
size: "sm",
|
|
21799
|
+
action: "RESUME",
|
|
21800
|
+
title: t("chatBar.resumeTheAgentYourCanvasEdits"),
|
|
21801
|
+
className: "rounded-none flex-shrink-0 h-auto",
|
|
21802
|
+
children: [
|
|
21803
|
+
/* @__PURE__ */ jsx(Icon, { name: "play", size: "xs" }),
|
|
21804
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", children: t("chatBar.resume") })
|
|
21805
|
+
]
|
|
21806
|
+
}
|
|
21807
|
+
) : /* @__PURE__ */ jsx(
|
|
21808
|
+
Button,
|
|
21809
|
+
{
|
|
21810
|
+
variant: "primary",
|
|
21811
|
+
size: "sm",
|
|
21812
|
+
action: "CHAT_SEND",
|
|
21813
|
+
actionPayload: { message: inputValue.trim() },
|
|
21814
|
+
disabled: !inputValue.trim(),
|
|
21815
|
+
"aria-label": t("chatBar.sendMessage"),
|
|
21816
|
+
className: "rounded-none flex-shrink-0 h-auto",
|
|
21817
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "send", size: "xs" })
|
|
21818
|
+
}
|
|
21819
|
+
);
|
|
21820
|
+
return /* @__PURE__ */ jsxs(Box, { className: `border-t border-[var(--color-border)] bg-[var(--color-card)] ${className ?? ""}`, children: [
|
|
21821
|
+
focus && /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "items-center px-4 pt-2", children: /* @__PURE__ */ jsxs(Badge, { variant: "secondary", size: "sm", className: "flex items-center gap-1 max-w-full", children: [
|
|
21822
|
+
/* @__PURE__ */ jsx(Icon, { name: "mouse-pointer-2", size: "xs" }),
|
|
21823
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-inherit truncate", children: [
|
|
21824
|
+
t("chatBar.editing"),
|
|
21825
|
+
": ",
|
|
21826
|
+
focus.label
|
|
21827
|
+
] }),
|
|
21828
|
+
/* @__PURE__ */ jsx(
|
|
21829
|
+
Box,
|
|
21830
|
+
{
|
|
21831
|
+
onClick: clearFocus,
|
|
21832
|
+
title: t("chatBar.clearSelection"),
|
|
21833
|
+
className: "cursor-pointer flex items-center ml-1 hover:opacity-70",
|
|
21834
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" })
|
|
21835
|
+
}
|
|
21836
|
+
)
|
|
21837
|
+
] }) }),
|
|
21838
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center px-4 py-2", children: [
|
|
21839
|
+
context && /* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", className: "whitespace-nowrap flex-shrink-0", children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-inherit", children: context }) }),
|
|
21840
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex-1 min-w-0 flex items-stretch rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-background)] focus-within:border-[var(--color-primary)] overflow-hidden", children: [
|
|
21841
|
+
/* @__PURE__ */ jsx(
|
|
21842
|
+
Textarea,
|
|
21843
|
+
{
|
|
21844
|
+
value: inputValue,
|
|
21845
|
+
placeholder: placeholder ?? t("chatBar.askTheAgentAnything"),
|
|
21846
|
+
onChange: (e) => setInputValue(e.target.value),
|
|
21847
|
+
onKeyDown: handleKeyDown,
|
|
21848
|
+
rows: 1,
|
|
21849
|
+
className: "flex-1 min-w-0 min-h-0 text-sm border-0 rounded-none shadow-none bg-transparent resize-none focus:ring-0"
|
|
21850
|
+
}
|
|
21851
|
+
),
|
|
21852
|
+
trailingAction
|
|
21853
|
+
] }),
|
|
21854
|
+
(activeGate || jepaValidity !== void 0) && /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center flex-shrink-0", children: [
|
|
21855
|
+
activeGate && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "whitespace-nowrap", children: activeGate }),
|
|
21856
|
+
jepaValidity !== void 0 && /* @__PURE__ */ jsx(Badge, { variant: getJepaBadgeVariant(jepaValidity), size: "sm", children: /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-inherit", children: [
|
|
21857
|
+
(jepaValidity * 100).toFixed(1),
|
|
21858
|
+
"%"
|
|
21859
|
+
] }) })
|
|
21860
|
+
] })
|
|
21861
|
+
] })
|
|
21862
|
+
] });
|
|
21863
|
+
}
|
|
21864
|
+
var init_ChatBar = __esm({
|
|
21865
|
+
"components/core/organisms/ChatBar.tsx"() {
|
|
21866
|
+
"use client";
|
|
21867
|
+
init_Box();
|
|
21868
|
+
init_Stack();
|
|
21869
|
+
init_Typography();
|
|
21870
|
+
init_Button();
|
|
21871
|
+
init_Badge();
|
|
21872
|
+
init_Icon();
|
|
21873
|
+
init_Textarea();
|
|
21874
|
+
init_useEventBus();
|
|
21875
|
+
init_trace_edit_focus();
|
|
21876
|
+
ChatBar.displayName = "ChatBar";
|
|
21877
|
+
}
|
|
21878
|
+
});
|
|
21597
21879
|
function resolveManifestUrl2(manifest, relative) {
|
|
21598
21880
|
if (relative == null) return void 0;
|
|
21599
21881
|
if (/^https?:\/\//.test(relative)) return relative;
|
|
@@ -22717,7 +22999,7 @@ function CraftingRecipe({
|
|
|
22717
22999
|
className
|
|
22718
23000
|
}) {
|
|
22719
23001
|
const eventBus = useEventBus();
|
|
22720
|
-
const handleCraft =
|
|
23002
|
+
const handleCraft = React85.useCallback(() => {
|
|
22721
23003
|
onCraft?.();
|
|
22722
23004
|
if (craftEvent) {
|
|
22723
23005
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -22734,7 +23016,7 @@ function CraftingRecipe({
|
|
|
22734
23016
|
children: [
|
|
22735
23017
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
22736
23018
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
22737
|
-
return /* @__PURE__ */ jsxs(
|
|
23019
|
+
return /* @__PURE__ */ jsxs(React85.Fragment, { children: [
|
|
22738
23020
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
22739
23021
|
ItemSlot,
|
|
22740
23022
|
{
|
|
@@ -22806,8 +23088,8 @@ function DPad({
|
|
|
22806
23088
|
}) {
|
|
22807
23089
|
const eventBus = useEventBus();
|
|
22808
23090
|
const sizes = sizeMap15[size];
|
|
22809
|
-
const [activeDirections, setActiveDirections] =
|
|
22810
|
-
const handlePress =
|
|
23091
|
+
const [activeDirections, setActiveDirections] = React85.useState(/* @__PURE__ */ new Set());
|
|
23092
|
+
const handlePress = React85.useCallback(
|
|
22811
23093
|
(direction) => {
|
|
22812
23094
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
22813
23095
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -22815,7 +23097,7 @@ function DPad({
|
|
|
22815
23097
|
},
|
|
22816
23098
|
[directionEvent, eventBus, onDirection]
|
|
22817
23099
|
);
|
|
22818
|
-
const handleRelease =
|
|
23100
|
+
const handleRelease = React85.useCallback(
|
|
22819
23101
|
(direction) => {
|
|
22820
23102
|
setActiveDirections((prev) => {
|
|
22821
23103
|
const next = new Set(prev);
|
|
@@ -23700,8 +23982,8 @@ var init_Menu = __esm({
|
|
|
23700
23982
|
"bottom-end": "bottom-start"
|
|
23701
23983
|
};
|
|
23702
23984
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
23703
|
-
const triggerChild =
|
|
23704
|
-
const triggerElement =
|
|
23985
|
+
const triggerChild = React85__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
23986
|
+
const triggerElement = React85__default.cloneElement(
|
|
23705
23987
|
triggerChild,
|
|
23706
23988
|
{
|
|
23707
23989
|
ref: triggerRef,
|
|
@@ -23796,14 +24078,14 @@ function useDataDnd(args) {
|
|
|
23796
24078
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
23797
24079
|
const enabled = isZone || Boolean(dndRoot);
|
|
23798
24080
|
const eventBus = useEventBus();
|
|
23799
|
-
const parentRoot =
|
|
24081
|
+
const parentRoot = React85__default.useContext(RootCtx);
|
|
23800
24082
|
const isRoot = enabled && parentRoot === null;
|
|
23801
|
-
const zoneId =
|
|
24083
|
+
const zoneId = React85__default.useId();
|
|
23802
24084
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
23803
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
23804
|
-
const optimisticOrdersRef =
|
|
24085
|
+
const [optimisticOrders, setOptimisticOrders] = React85__default.useState(() => /* @__PURE__ */ new Map());
|
|
24086
|
+
const optimisticOrdersRef = React85__default.useRef(optimisticOrders);
|
|
23805
24087
|
optimisticOrdersRef.current = optimisticOrders;
|
|
23806
|
-
const clearOptimisticOrder =
|
|
24088
|
+
const clearOptimisticOrder = React85__default.useCallback((group) => {
|
|
23807
24089
|
setOptimisticOrders((prev) => {
|
|
23808
24090
|
if (!prev.has(group)) return prev;
|
|
23809
24091
|
const next = new Map(prev);
|
|
@@ -23828,7 +24110,7 @@ function useDataDnd(args) {
|
|
|
23828
24110
|
const raw = it[dndItemIdField];
|
|
23829
24111
|
return String(raw ?? `__idx_${idx}`);
|
|
23830
24112
|
}).join("|");
|
|
23831
|
-
const itemIds =
|
|
24113
|
+
const itemIds = React85__default.useMemo(
|
|
23832
24114
|
() => orderedItems.map((it, idx) => {
|
|
23833
24115
|
const raw = it[dndItemIdField];
|
|
23834
24116
|
return raw ?? `__idx_${idx}`;
|
|
@@ -23836,7 +24118,7 @@ function useDataDnd(args) {
|
|
|
23836
24118
|
[itemIdsSignature]
|
|
23837
24119
|
);
|
|
23838
24120
|
const itemsContentSig = items.map((it, idx) => String(it[dndItemIdField] ?? `__${idx}`)).join("|");
|
|
23839
|
-
|
|
24121
|
+
React85__default.useEffect(() => {
|
|
23840
24122
|
const root = isRoot ? null : parentRoot;
|
|
23841
24123
|
if (root) {
|
|
23842
24124
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -23844,20 +24126,20 @@ function useDataDnd(args) {
|
|
|
23844
24126
|
clearOptimisticOrder(ownGroup);
|
|
23845
24127
|
}
|
|
23846
24128
|
}, [itemsContentSig, ownGroup]);
|
|
23847
|
-
const zonesRef =
|
|
23848
|
-
const registerZone =
|
|
24129
|
+
const zonesRef = React85__default.useRef(/* @__PURE__ */ new Map());
|
|
24130
|
+
const registerZone = React85__default.useCallback((zoneId2, meta2) => {
|
|
23849
24131
|
zonesRef.current.set(zoneId2, meta2);
|
|
23850
24132
|
}, []);
|
|
23851
|
-
const unregisterZone =
|
|
24133
|
+
const unregisterZone = React85__default.useCallback((zoneId2) => {
|
|
23852
24134
|
zonesRef.current.delete(zoneId2);
|
|
23853
24135
|
}, []);
|
|
23854
|
-
const [activeDrag, setActiveDrag] =
|
|
23855
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
23856
|
-
const meta =
|
|
24136
|
+
const [activeDrag, setActiveDrag] = React85__default.useState(null);
|
|
24137
|
+
const [overZoneGroup, setOverZoneGroup] = React85__default.useState(null);
|
|
24138
|
+
const meta = React85__default.useMemo(
|
|
23857
24139
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
23858
24140
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
23859
24141
|
);
|
|
23860
|
-
|
|
24142
|
+
React85__default.useEffect(() => {
|
|
23861
24143
|
const target = isRoot ? null : parentRoot;
|
|
23862
24144
|
if (!target) {
|
|
23863
24145
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -23876,7 +24158,7 @@ function useDataDnd(args) {
|
|
|
23876
24158
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
23877
24159
|
const sensors = useAlmadarDndSensors(true);
|
|
23878
24160
|
const collisionDetection = almadarDndCollisionDetection;
|
|
23879
|
-
const findZoneByItem =
|
|
24161
|
+
const findZoneByItem = React85__default.useCallback(
|
|
23880
24162
|
(id) => {
|
|
23881
24163
|
for (const z of zonesRef.current.values()) {
|
|
23882
24164
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -23885,7 +24167,7 @@ function useDataDnd(args) {
|
|
|
23885
24167
|
},
|
|
23886
24168
|
[]
|
|
23887
24169
|
);
|
|
23888
|
-
|
|
24170
|
+
React85__default.useCallback(
|
|
23889
24171
|
(group) => {
|
|
23890
24172
|
for (const z of zonesRef.current.values()) {
|
|
23891
24173
|
if (z.group === group) return z;
|
|
@@ -23894,7 +24176,7 @@ function useDataDnd(args) {
|
|
|
23894
24176
|
},
|
|
23895
24177
|
[]
|
|
23896
24178
|
);
|
|
23897
|
-
const handleDragEnd =
|
|
24179
|
+
const handleDragEnd = React85__default.useCallback(
|
|
23898
24180
|
(event) => {
|
|
23899
24181
|
const { active, over } = event;
|
|
23900
24182
|
const activeIdStr = String(active.id);
|
|
@@ -23985,8 +24267,8 @@ function useDataDnd(args) {
|
|
|
23985
24267
|
},
|
|
23986
24268
|
[eventBus]
|
|
23987
24269
|
);
|
|
23988
|
-
const sortableData =
|
|
23989
|
-
const SortableItem =
|
|
24270
|
+
const sortableData = React85__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
24271
|
+
const SortableItem = React85__default.useCallback(
|
|
23990
24272
|
({ id, children }) => {
|
|
23991
24273
|
const {
|
|
23992
24274
|
attributes,
|
|
@@ -24026,7 +24308,7 @@ function useDataDnd(args) {
|
|
|
24026
24308
|
id: droppableId,
|
|
24027
24309
|
data: sortableData
|
|
24028
24310
|
});
|
|
24029
|
-
const ctx =
|
|
24311
|
+
const ctx = React85__default.useContext(RootCtx);
|
|
24030
24312
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
24031
24313
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
24032
24314
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -24041,7 +24323,7 @@ function useDataDnd(args) {
|
|
|
24041
24323
|
showForeignPlaceholder,
|
|
24042
24324
|
ctxAvailable: ctx != null
|
|
24043
24325
|
});
|
|
24044
|
-
|
|
24326
|
+
React85__default.useEffect(() => {
|
|
24045
24327
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
24046
24328
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
24047
24329
|
return /* @__PURE__ */ jsx(
|
|
@@ -24055,11 +24337,11 @@ function useDataDnd(args) {
|
|
|
24055
24337
|
}
|
|
24056
24338
|
);
|
|
24057
24339
|
};
|
|
24058
|
-
const rootContextValue =
|
|
24340
|
+
const rootContextValue = React85__default.useMemo(
|
|
24059
24341
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
24060
24342
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
24061
24343
|
);
|
|
24062
|
-
const handleDragStart =
|
|
24344
|
+
const handleDragStart = React85__default.useCallback((event) => {
|
|
24063
24345
|
const sourceZone = findZoneByItem(event.active.id);
|
|
24064
24346
|
const rect = event.active.rect.current.initial;
|
|
24065
24347
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -24078,7 +24360,7 @@ function useDataDnd(args) {
|
|
|
24078
24360
|
isRoot
|
|
24079
24361
|
});
|
|
24080
24362
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
24081
|
-
const handleDragOver =
|
|
24363
|
+
const handleDragOver = React85__default.useCallback((event) => {
|
|
24082
24364
|
const { active, over } = event;
|
|
24083
24365
|
const overData = over?.data?.current;
|
|
24084
24366
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -24148,7 +24430,7 @@ function useDataDnd(args) {
|
|
|
24148
24430
|
return next;
|
|
24149
24431
|
});
|
|
24150
24432
|
}, []);
|
|
24151
|
-
const handleDragCancel =
|
|
24433
|
+
const handleDragCancel = React85__default.useCallback((event) => {
|
|
24152
24434
|
setActiveDrag(null);
|
|
24153
24435
|
setOverZoneGroup(null);
|
|
24154
24436
|
dndLog.warn("dragCancel", {
|
|
@@ -24156,12 +24438,12 @@ function useDataDnd(args) {
|
|
|
24156
24438
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
24157
24439
|
});
|
|
24158
24440
|
}, []);
|
|
24159
|
-
const handleDragEndWithCleanup =
|
|
24441
|
+
const handleDragEndWithCleanup = React85__default.useCallback((event) => {
|
|
24160
24442
|
handleDragEnd(event);
|
|
24161
24443
|
setActiveDrag(null);
|
|
24162
24444
|
setOverZoneGroup(null);
|
|
24163
24445
|
}, [handleDragEnd]);
|
|
24164
|
-
const wrapContainer =
|
|
24446
|
+
const wrapContainer = React85__default.useCallback(
|
|
24165
24447
|
(children) => {
|
|
24166
24448
|
if (!enabled) return children;
|
|
24167
24449
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -24215,7 +24497,7 @@ var init_useDataDnd = __esm({
|
|
|
24215
24497
|
init_useAlmadarDndCollision();
|
|
24216
24498
|
init_Box();
|
|
24217
24499
|
dndLog = createLogger("almadar:ui:dnd");
|
|
24218
|
-
RootCtx =
|
|
24500
|
+
RootCtx = React85__default.createContext(null);
|
|
24219
24501
|
}
|
|
24220
24502
|
});
|
|
24221
24503
|
function renderIconInput(icon, props) {
|
|
@@ -24741,7 +25023,7 @@ function DataList({
|
|
|
24741
25023
|
}) {
|
|
24742
25024
|
const eventBus = useEventBus();
|
|
24743
25025
|
const { t } = useTranslate();
|
|
24744
|
-
const [visibleCount, setVisibleCount] =
|
|
25026
|
+
const [visibleCount, setVisibleCount] = React85__default.useState(pageSize || Infinity);
|
|
24745
25027
|
const fieldDefs = fields ?? columns ?? [];
|
|
24746
25028
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
24747
25029
|
const dnd = useDataDnd({
|
|
@@ -24760,7 +25042,7 @@ function DataList({
|
|
|
24760
25042
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
24761
25043
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
24762
25044
|
const hasRenderProp = typeof children === "function";
|
|
24763
|
-
|
|
25045
|
+
React85__default.useEffect(() => {
|
|
24764
25046
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
24765
25047
|
const childrenTypeOf = typeof children;
|
|
24766
25048
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -24865,7 +25147,7 @@ function DataList({
|
|
|
24865
25147
|
const items2 = data.map((item) => item);
|
|
24866
25148
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
24867
25149
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
24868
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
25150
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
24869
25151
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
24870
25152
|
group.items.map((itemData, index) => {
|
|
24871
25153
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -25006,7 +25288,7 @@ function DataList({
|
|
|
25006
25288
|
className
|
|
25007
25289
|
),
|
|
25008
25290
|
children: [
|
|
25009
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
25291
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
25010
25292
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
25011
25293
|
group.items.map(
|
|
25012
25294
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -25922,7 +26204,7 @@ var init_Grid = __esm({
|
|
|
25922
26204
|
as: Component2 = "div"
|
|
25923
26205
|
}) => {
|
|
25924
26206
|
const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
|
|
25925
|
-
return
|
|
26207
|
+
return React85__default.createElement(
|
|
25926
26208
|
Component2,
|
|
25927
26209
|
{
|
|
25928
26210
|
className: cn(
|
|
@@ -26118,9 +26400,9 @@ var init_Popover = __esm({
|
|
|
26118
26400
|
onMouseLeave: handleClose,
|
|
26119
26401
|
onPointerDown: tapTriggerProps.onPointerDown
|
|
26120
26402
|
};
|
|
26121
|
-
const childElement =
|
|
26403
|
+
const childElement = React85__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
26122
26404
|
const childPointerDown = childElement.props.onPointerDown;
|
|
26123
|
-
const triggerElement =
|
|
26405
|
+
const triggerElement = React85__default.cloneElement(
|
|
26124
26406
|
childElement,
|
|
26125
26407
|
{
|
|
26126
26408
|
ref: triggerRef,
|
|
@@ -26722,9 +27004,9 @@ var init_Tooltip = __esm({
|
|
|
26722
27004
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
26723
27005
|
};
|
|
26724
27006
|
}, []);
|
|
26725
|
-
const triggerElement =
|
|
27007
|
+
const triggerElement = React85__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
26726
27008
|
const childPointerDown = triggerElement.props.onPointerDown;
|
|
26727
|
-
const trigger =
|
|
27009
|
+
const trigger = React85__default.cloneElement(triggerElement, {
|
|
26728
27010
|
ref: triggerRef,
|
|
26729
27011
|
onMouseEnter: handleMouseEnter,
|
|
26730
27012
|
onMouseLeave: handleMouseLeave,
|
|
@@ -26814,7 +27096,7 @@ var init_WizardProgress = __esm({
|
|
|
26814
27096
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
26815
27097
|
const isActive = index === currentStep;
|
|
26816
27098
|
const isCompleted = index < currentStep;
|
|
26817
|
-
return /* @__PURE__ */ jsxs(
|
|
27099
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
26818
27100
|
/* @__PURE__ */ jsx(
|
|
26819
27101
|
"button",
|
|
26820
27102
|
{
|
|
@@ -27877,7 +28159,7 @@ function InventoryGrid({
|
|
|
27877
28159
|
const eventBus = useEventBus();
|
|
27878
28160
|
const slotCount = totalSlots ?? items.length;
|
|
27879
28161
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
27880
|
-
const handleSelect =
|
|
28162
|
+
const handleSelect = React85.useCallback(
|
|
27881
28163
|
(id) => {
|
|
27882
28164
|
onSelect?.(id);
|
|
27883
28165
|
if (selectEvent) {
|
|
@@ -28048,6 +28330,7 @@ function PowerupSlots({
|
|
|
28048
28330
|
/* @__PURE__ */ jsx(
|
|
28049
28331
|
ItemSlot,
|
|
28050
28332
|
{
|
|
28333
|
+
assetUrl: powerup.assetUrl,
|
|
28051
28334
|
icon: powerup.icon,
|
|
28052
28335
|
label: powerup.label,
|
|
28053
28336
|
rarity: "uncommon",
|
|
@@ -28111,31 +28394,31 @@ function GameCanvas2D({
|
|
|
28111
28394
|
assetBaseUrl,
|
|
28112
28395
|
className
|
|
28113
28396
|
}) {
|
|
28114
|
-
const canvasRef =
|
|
28115
|
-
const rafRef =
|
|
28116
|
-
const frameRef =
|
|
28117
|
-
const lastTimeRef =
|
|
28118
|
-
const imageCache =
|
|
28397
|
+
const canvasRef = React85.useRef(null);
|
|
28398
|
+
const rafRef = React85.useRef(0);
|
|
28399
|
+
const frameRef = React85.useRef(0);
|
|
28400
|
+
const lastTimeRef = React85.useRef(0);
|
|
28401
|
+
const imageCache = React85.useRef(/* @__PURE__ */ new Map());
|
|
28119
28402
|
const emit = useEmitEvent();
|
|
28120
|
-
const onDrawRef =
|
|
28403
|
+
const onDrawRef = React85.useRef(onDraw);
|
|
28121
28404
|
onDrawRef.current = onDraw;
|
|
28122
|
-
const onTickRef =
|
|
28405
|
+
const onTickRef = React85.useRef(onTick);
|
|
28123
28406
|
onTickRef.current = onTick;
|
|
28124
|
-
const tickEventRef =
|
|
28407
|
+
const tickEventRef = React85.useRef(tickEvent);
|
|
28125
28408
|
tickEventRef.current = tickEvent;
|
|
28126
|
-
const drawEventRef =
|
|
28409
|
+
const drawEventRef = React85.useRef(drawEvent);
|
|
28127
28410
|
drawEventRef.current = drawEvent;
|
|
28128
|
-
const emitRef =
|
|
28411
|
+
const emitRef = React85.useRef(emit);
|
|
28129
28412
|
emitRef.current = emit;
|
|
28130
|
-
const assetBaseUrlRef =
|
|
28413
|
+
const assetBaseUrlRef = React85.useRef(assetBaseUrl);
|
|
28131
28414
|
assetBaseUrlRef.current = assetBaseUrl;
|
|
28132
|
-
const backgroundImageRef =
|
|
28415
|
+
const backgroundImageRef = React85.useRef(backgroundImage);
|
|
28133
28416
|
backgroundImageRef.current = backgroundImage;
|
|
28134
|
-
const widthRef =
|
|
28417
|
+
const widthRef = React85.useRef(width);
|
|
28135
28418
|
widthRef.current = width;
|
|
28136
|
-
const heightRef =
|
|
28419
|
+
const heightRef = React85.useRef(height);
|
|
28137
28420
|
heightRef.current = height;
|
|
28138
|
-
const loadImage =
|
|
28421
|
+
const loadImage = React85.useCallback((url) => {
|
|
28139
28422
|
const base = assetBaseUrlRef.current;
|
|
28140
28423
|
if (!url.startsWith("http") && !base) return null;
|
|
28141
28424
|
const fullUrl = url.startsWith("http") ? url : `${base}${url}`;
|
|
@@ -28149,7 +28432,7 @@ function GameCanvas2D({
|
|
|
28149
28432
|
}
|
|
28150
28433
|
return null;
|
|
28151
28434
|
}, []);
|
|
28152
|
-
|
|
28435
|
+
React85.useEffect(() => {
|
|
28153
28436
|
const canvas = canvasRef.current;
|
|
28154
28437
|
if (!canvas) return;
|
|
28155
28438
|
const ctx = canvas.getContext("2d");
|
|
@@ -28297,13 +28580,26 @@ function HealthPanel({
|
|
|
28297
28580
|
)
|
|
28298
28581
|
}
|
|
28299
28582
|
),
|
|
28300
|
-
effects && effects.length > 0 && /* @__PURE__ */ jsx(Box, { className: "flex items-center gap-1 flex-wrap", children: effects.map((effect, i) => /* @__PURE__ */
|
|
28583
|
+
effects && effects.length > 0 && /* @__PURE__ */ jsx(Box, { className: "flex items-center gap-1 flex-wrap", children: effects.map((effect, i) => /* @__PURE__ */ jsxs(
|
|
28301
28584
|
Badge,
|
|
28302
28585
|
{
|
|
28303
28586
|
variant: effectVariantMap[effect.variant ?? "neutral"],
|
|
28304
28587
|
size: "sm",
|
|
28305
|
-
icon: effect.icon,
|
|
28306
|
-
children:
|
|
28588
|
+
icon: effect.assetUrl ? void 0 : effect.icon,
|
|
28589
|
+
children: [
|
|
28590
|
+
effect.assetUrl && /* @__PURE__ */ jsx(
|
|
28591
|
+
"img",
|
|
28592
|
+
{
|
|
28593
|
+
src: effect.assetUrl,
|
|
28594
|
+
alt: "",
|
|
28595
|
+
width: 12,
|
|
28596
|
+
height: 12,
|
|
28597
|
+
style: { imageRendering: "pixelated", objectFit: "contain" },
|
|
28598
|
+
className: "flex-shrink-0 inline-block"
|
|
28599
|
+
}
|
|
28600
|
+
),
|
|
28601
|
+
effect.label
|
|
28602
|
+
]
|
|
28307
28603
|
},
|
|
28308
28604
|
i
|
|
28309
28605
|
)) })
|
|
@@ -28461,7 +28757,7 @@ function TurnPanel({
|
|
|
28461
28757
|
className
|
|
28462
28758
|
}) {
|
|
28463
28759
|
const eventBus = useEventBus();
|
|
28464
|
-
const handleAction =
|
|
28760
|
+
const handleAction = React85.useCallback(
|
|
28465
28761
|
(event) => {
|
|
28466
28762
|
if (event) {
|
|
28467
28763
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -28486,15 +28782,28 @@ function TurnPanel({
|
|
|
28486
28782
|
activeTeam
|
|
28487
28783
|
}
|
|
28488
28784
|
),
|
|
28489
|
-
actions && actions.length > 0 && /* @__PURE__ */ jsx(Box, { className: "flex items-center gap-1.5 ml-auto", children: actions.map((action, i) => /* @__PURE__ */
|
|
28785
|
+
actions && actions.length > 0 && /* @__PURE__ */ jsx(Box, { className: "flex items-center gap-1.5 ml-auto", children: actions.map((action, i) => /* @__PURE__ */ jsxs(
|
|
28490
28786
|
Button,
|
|
28491
28787
|
{
|
|
28492
28788
|
variant: "ghost",
|
|
28493
28789
|
size: "sm",
|
|
28494
28790
|
disabled: action.disabled,
|
|
28495
|
-
leftIcon: action.icon,
|
|
28791
|
+
leftIcon: action.assetUrl ? void 0 : action.icon,
|
|
28496
28792
|
onClick: () => handleAction(action.event),
|
|
28497
|
-
children:
|
|
28793
|
+
children: [
|
|
28794
|
+
action.assetUrl && /* @__PURE__ */ jsx(
|
|
28795
|
+
"img",
|
|
28796
|
+
{
|
|
28797
|
+
src: action.assetUrl,
|
|
28798
|
+
alt: "",
|
|
28799
|
+
width: 14,
|
|
28800
|
+
height: 14,
|
|
28801
|
+
style: { imageRendering: "pixelated", objectFit: "contain" },
|
|
28802
|
+
className: "flex-shrink-0"
|
|
28803
|
+
}
|
|
28804
|
+
),
|
|
28805
|
+
action.label
|
|
28806
|
+
]
|
|
28498
28807
|
},
|
|
28499
28808
|
i
|
|
28500
28809
|
)) })
|
|
@@ -28629,7 +28938,7 @@ function UnitCommandBar({
|
|
|
28629
28938
|
className
|
|
28630
28939
|
}) {
|
|
28631
28940
|
const eventBus = useEventBus();
|
|
28632
|
-
const handleCommand =
|
|
28941
|
+
const handleCommand = React85.useCallback(
|
|
28633
28942
|
(event) => {
|
|
28634
28943
|
if (event) {
|
|
28635
28944
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -29180,7 +29489,7 @@ function GameMenu({
|
|
|
29180
29489
|
} catch {
|
|
29181
29490
|
}
|
|
29182
29491
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
29183
|
-
const handleOptionClick =
|
|
29492
|
+
const handleOptionClick = React85.useCallback(
|
|
29184
29493
|
(option) => {
|
|
29185
29494
|
if (option.event && eventBus) {
|
|
29186
29495
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -29299,7 +29608,7 @@ function GameOverScreen({
|
|
|
29299
29608
|
} catch {
|
|
29300
29609
|
}
|
|
29301
29610
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
29302
|
-
const handleActionClick =
|
|
29611
|
+
const handleActionClick = React85.useCallback(
|
|
29303
29612
|
(action) => {
|
|
29304
29613
|
if (action.event && eventBus) {
|
|
29305
29614
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -30231,13 +30540,13 @@ var init_MapView = __esm({
|
|
|
30231
30540
|
shadowSize: [41, 41]
|
|
30232
30541
|
});
|
|
30233
30542
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
30234
|
-
const { useEffect:
|
|
30543
|
+
const { useEffect: useEffect85, useRef: useRef80, useCallback: useCallback127, useState: useState117 } = React85__default;
|
|
30235
30544
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
30236
30545
|
const { useEventBus: useEventBus4 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
30237
30546
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
30238
30547
|
const map = useMap();
|
|
30239
30548
|
const prevRef = useRef80({ centerLat, centerLng, zoom });
|
|
30240
|
-
|
|
30549
|
+
useEffect85(() => {
|
|
30241
30550
|
const prev = prevRef.current;
|
|
30242
30551
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
30243
30552
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -30248,7 +30557,7 @@ var init_MapView = __esm({
|
|
|
30248
30557
|
}
|
|
30249
30558
|
function MapClickHandler({ onMapClick }) {
|
|
30250
30559
|
const map = useMap();
|
|
30251
|
-
|
|
30560
|
+
useEffect85(() => {
|
|
30252
30561
|
if (!onMapClick) return;
|
|
30253
30562
|
const handler = (e) => {
|
|
30254
30563
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -30276,8 +30585,8 @@ var init_MapView = __esm({
|
|
|
30276
30585
|
showAttribution = true
|
|
30277
30586
|
}) {
|
|
30278
30587
|
const eventBus = useEventBus4();
|
|
30279
|
-
const [clickedPosition, setClickedPosition] =
|
|
30280
|
-
const handleMapClick =
|
|
30588
|
+
const [clickedPosition, setClickedPosition] = useState117(null);
|
|
30589
|
+
const handleMapClick = useCallback127((lat, lng) => {
|
|
30281
30590
|
if (showClickedPin) {
|
|
30282
30591
|
setClickedPosition({ lat, lng });
|
|
30283
30592
|
}
|
|
@@ -30286,7 +30595,7 @@ var init_MapView = __esm({
|
|
|
30286
30595
|
eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
|
|
30287
30596
|
}
|
|
30288
30597
|
}, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
|
|
30289
|
-
const handleMarkerClick =
|
|
30598
|
+
const handleMarkerClick = useCallback127((marker) => {
|
|
30290
30599
|
onMarkerClick?.(marker);
|
|
30291
30600
|
if (markerClickEvent) {
|
|
30292
30601
|
eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
|
|
@@ -31137,8 +31446,8 @@ function TableView({
|
|
|
31137
31446
|
}) {
|
|
31138
31447
|
const eventBus = useEventBus();
|
|
31139
31448
|
const { t } = useTranslate();
|
|
31140
|
-
const [visibleCount, setVisibleCount] =
|
|
31141
|
-
const [localSelected, setLocalSelected] =
|
|
31449
|
+
const [visibleCount, setVisibleCount] = React85__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
31450
|
+
const [localSelected, setLocalSelected] = React85__default.useState(/* @__PURE__ */ new Set());
|
|
31142
31451
|
const colDefs = columns ?? fields ?? [];
|
|
31143
31452
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
31144
31453
|
const dnd = useDataDnd({
|
|
@@ -31333,12 +31642,12 @@ function TableView({
|
|
|
31333
31642
|
]
|
|
31334
31643
|
}
|
|
31335
31644
|
);
|
|
31336
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
31645
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React85__default.Fragment, { children: rowInner }, id);
|
|
31337
31646
|
};
|
|
31338
31647
|
const items = data.map((row) => row);
|
|
31339
31648
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
31340
31649
|
let runningIndex = 0;
|
|
31341
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
31650
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
31342
31651
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
31343
31652
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
31344
31653
|
] }, gi)) });
|
|
@@ -32695,7 +33004,7 @@ var init_StepFlow = __esm({
|
|
|
32695
33004
|
className
|
|
32696
33005
|
}) => {
|
|
32697
33006
|
if (orientation === "vertical") {
|
|
32698
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
33007
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React85__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
32699
33008
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
32700
33009
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
32701
33010
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -32706,7 +33015,7 @@ var init_StepFlow = __esm({
|
|
|
32706
33015
|
] })
|
|
32707
33016
|
] }) }, index)) });
|
|
32708
33017
|
}
|
|
32709
|
-
return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(
|
|
33018
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
32710
33019
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
32711
33020
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
32712
33021
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -33691,7 +34000,7 @@ var init_LikertScale = __esm({
|
|
|
33691
34000
|
md: "text-base",
|
|
33692
34001
|
lg: "text-lg"
|
|
33693
34002
|
};
|
|
33694
|
-
LikertScale =
|
|
34003
|
+
LikertScale = React85__default.forwardRef(
|
|
33695
34004
|
({
|
|
33696
34005
|
question,
|
|
33697
34006
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -33703,7 +34012,7 @@ var init_LikertScale = __esm({
|
|
|
33703
34012
|
variant = "radios",
|
|
33704
34013
|
className
|
|
33705
34014
|
}, ref) => {
|
|
33706
|
-
const groupId =
|
|
34015
|
+
const groupId = React85__default.useId();
|
|
33707
34016
|
const eventBus = useEventBus();
|
|
33708
34017
|
const handleSelect = useCallback(
|
|
33709
34018
|
(next) => {
|
|
@@ -35985,7 +36294,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
35985
36294
|
"aria-label": t("aria.breadcrumb"),
|
|
35986
36295
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
35987
36296
|
const isLast = idx === items.length - 1;
|
|
35988
|
-
return /* @__PURE__ */ jsxs(
|
|
36297
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
35989
36298
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
35990
36299
|
Icon,
|
|
35991
36300
|
{
|
|
@@ -36854,7 +37163,7 @@ var init_MiniStateMachine = __esm({
|
|
|
36854
37163
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
36855
37164
|
const tc = transitionCounts[s.name] ?? 0;
|
|
36856
37165
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
36857
|
-
return /* @__PURE__ */ jsxs(
|
|
37166
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
36858
37167
|
/* @__PURE__ */ jsx(
|
|
36859
37168
|
AvlState,
|
|
36860
37169
|
{
|
|
@@ -37058,7 +37367,7 @@ var init_PageHeader = __esm({
|
|
|
37058
37367
|
info: "bg-info/10 text-info"
|
|
37059
37368
|
};
|
|
37060
37369
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
37061
|
-
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(
|
|
37370
|
+
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(React85__default.Fragment, { children: [
|
|
37062
37371
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
37063
37372
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
37064
37373
|
"a",
|
|
@@ -37787,7 +38096,7 @@ var init_WizardContainer = __esm({
|
|
|
37787
38096
|
const isCompleted = index < currentStep;
|
|
37788
38097
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
37789
38098
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
37790
|
-
return /* @__PURE__ */ jsxs(
|
|
38099
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
37791
38100
|
/* @__PURE__ */ jsx(
|
|
37792
38101
|
Button,
|
|
37793
38102
|
{
|
|
@@ -40347,7 +40656,7 @@ var init_DetailPanel = __esm({
|
|
|
40347
40656
|
}
|
|
40348
40657
|
});
|
|
40349
40658
|
function extractTitle(children) {
|
|
40350
|
-
if (!
|
|
40659
|
+
if (!React85__default.isValidElement(children)) return void 0;
|
|
40351
40660
|
const props = children.props;
|
|
40352
40661
|
if (typeof props.title === "string") {
|
|
40353
40662
|
return props.title;
|
|
@@ -40402,7 +40711,7 @@ function LinearView({
|
|
|
40402
40711
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
40403
40712
|
const isDone = i < currentIdx;
|
|
40404
40713
|
const isCurrent = i === currentIdx;
|
|
40405
|
-
return /* @__PURE__ */ jsxs(
|
|
40714
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
40406
40715
|
i > 0 && /* @__PURE__ */ jsx(
|
|
40407
40716
|
Typography,
|
|
40408
40717
|
{
|
|
@@ -41171,6 +41480,42 @@ var init_FeatureGridOrganism = __esm({
|
|
|
41171
41480
|
FeatureGridOrganism.displayName = "FeatureGridOrganism";
|
|
41172
41481
|
}
|
|
41173
41482
|
});
|
|
41483
|
+
function FishingBoard({
|
|
41484
|
+
backgroundImage,
|
|
41485
|
+
assetBaseUrl,
|
|
41486
|
+
scale = 1,
|
|
41487
|
+
showMinimap = false,
|
|
41488
|
+
enableCamera = true,
|
|
41489
|
+
width = 800,
|
|
41490
|
+
height = 600,
|
|
41491
|
+
isLoading,
|
|
41492
|
+
error,
|
|
41493
|
+
className
|
|
41494
|
+
}) {
|
|
41495
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("fishing-board relative w-full h-full", className), children: [
|
|
41496
|
+
isLoading && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/40 z-10", children: /* @__PURE__ */ jsx("span", { className: "text-white text-sm", children: "Loading\u2026" }) }),
|
|
41497
|
+
error && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/40 z-10", children: /* @__PURE__ */ jsx("span", { className: "text-red-400 text-sm", children: error.message }) }),
|
|
41498
|
+
/* @__PURE__ */ jsx(
|
|
41499
|
+
GameCanvas2D,
|
|
41500
|
+
{
|
|
41501
|
+
width,
|
|
41502
|
+
height,
|
|
41503
|
+
backgroundImage: backgroundImage ?? "",
|
|
41504
|
+
assetBaseUrl,
|
|
41505
|
+
fps: 60,
|
|
41506
|
+
className: "w-full h-full"
|
|
41507
|
+
}
|
|
41508
|
+
)
|
|
41509
|
+
] });
|
|
41510
|
+
}
|
|
41511
|
+
var init_FishingBoard = __esm({
|
|
41512
|
+
"components/game/organisms/FishingBoard.tsx"() {
|
|
41513
|
+
"use client";
|
|
41514
|
+
init_cn();
|
|
41515
|
+
init_GameCanvas2D();
|
|
41516
|
+
FishingBoard.displayName = "FishingBoard";
|
|
41517
|
+
}
|
|
41518
|
+
});
|
|
41174
41519
|
function toSharedContext2(formCtx) {
|
|
41175
41520
|
return createMinimalContext(
|
|
41176
41521
|
{
|
|
@@ -41352,12 +41697,12 @@ var init_Form = __esm({
|
|
|
41352
41697
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
41353
41698
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
41354
41699
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
41355
|
-
const normalizedInitialData =
|
|
41700
|
+
const normalizedInitialData = React85__default.useMemo(() => {
|
|
41356
41701
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
41357
41702
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
41358
41703
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
41359
41704
|
}, [entity, initialData]);
|
|
41360
|
-
const entityDerivedFields =
|
|
41705
|
+
const entityDerivedFields = React85__default.useMemo(() => {
|
|
41361
41706
|
if (fields && fields.length > 0) return void 0;
|
|
41362
41707
|
if (!resolvedEntity) return void 0;
|
|
41363
41708
|
return resolvedEntity.fields.map(
|
|
@@ -41377,16 +41722,16 @@ var init_Form = __esm({
|
|
|
41377
41722
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
41378
41723
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
41379
41724
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
41380
|
-
const [formData, setFormData] =
|
|
41725
|
+
const [formData, setFormData] = React85__default.useState(
|
|
41381
41726
|
normalizedInitialData
|
|
41382
41727
|
);
|
|
41383
|
-
const [collapsedSections, setCollapsedSections] =
|
|
41728
|
+
const [collapsedSections, setCollapsedSections] = React85__default.useState(
|
|
41384
41729
|
/* @__PURE__ */ new Set()
|
|
41385
41730
|
);
|
|
41386
|
-
const [submitError, setSubmitError] =
|
|
41387
|
-
const formRef =
|
|
41731
|
+
const [submitError, setSubmitError] = React85__default.useState(null);
|
|
41732
|
+
const formRef = React85__default.useRef(null);
|
|
41388
41733
|
const formMode = props.mode;
|
|
41389
|
-
const mountedRef =
|
|
41734
|
+
const mountedRef = React85__default.useRef(false);
|
|
41390
41735
|
if (!mountedRef.current) {
|
|
41391
41736
|
mountedRef.current = true;
|
|
41392
41737
|
debug("forms", "mount", {
|
|
@@ -41399,7 +41744,7 @@ var init_Form = __esm({
|
|
|
41399
41744
|
});
|
|
41400
41745
|
}
|
|
41401
41746
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
41402
|
-
const evalContext =
|
|
41747
|
+
const evalContext = React85__default.useMemo(
|
|
41403
41748
|
() => ({
|
|
41404
41749
|
formValues: formData,
|
|
41405
41750
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -41408,7 +41753,7 @@ var init_Form = __esm({
|
|
|
41408
41753
|
}),
|
|
41409
41754
|
[formData, externalContext]
|
|
41410
41755
|
);
|
|
41411
|
-
|
|
41756
|
+
React85__default.useEffect(() => {
|
|
41412
41757
|
debug("forms", "initialData-sync", {
|
|
41413
41758
|
mode: formMode,
|
|
41414
41759
|
normalizedInitialData,
|
|
@@ -41419,7 +41764,7 @@ var init_Form = __esm({
|
|
|
41419
41764
|
setFormData(normalizedInitialData);
|
|
41420
41765
|
}
|
|
41421
41766
|
}, [normalizedInitialData]);
|
|
41422
|
-
const processCalculations =
|
|
41767
|
+
const processCalculations = React85__default.useCallback(
|
|
41423
41768
|
(changedFieldId, newFormData) => {
|
|
41424
41769
|
if (!hiddenCalculations.length) return;
|
|
41425
41770
|
const context = {
|
|
@@ -41444,7 +41789,7 @@ var init_Form = __esm({
|
|
|
41444
41789
|
},
|
|
41445
41790
|
[hiddenCalculations, externalContext, eventBus]
|
|
41446
41791
|
);
|
|
41447
|
-
const checkViolations =
|
|
41792
|
+
const checkViolations = React85__default.useCallback(
|
|
41448
41793
|
(changedFieldId, newFormData) => {
|
|
41449
41794
|
if (!violationTriggers.length) return;
|
|
41450
41795
|
const context = {
|
|
@@ -41482,7 +41827,7 @@ var init_Form = __esm({
|
|
|
41482
41827
|
processCalculations(name, newFormData);
|
|
41483
41828
|
checkViolations(name, newFormData);
|
|
41484
41829
|
};
|
|
41485
|
-
const isFieldVisible =
|
|
41830
|
+
const isFieldVisible = React85__default.useCallback(
|
|
41486
41831
|
(fieldName) => {
|
|
41487
41832
|
const condition = conditionalFields[fieldName];
|
|
41488
41833
|
if (!condition) return true;
|
|
@@ -41490,7 +41835,7 @@ var init_Form = __esm({
|
|
|
41490
41835
|
},
|
|
41491
41836
|
[conditionalFields, evalContext]
|
|
41492
41837
|
);
|
|
41493
|
-
const isSectionVisible =
|
|
41838
|
+
const isSectionVisible = React85__default.useCallback(
|
|
41494
41839
|
(section) => {
|
|
41495
41840
|
if (!section.condition) return true;
|
|
41496
41841
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -41566,7 +41911,7 @@ var init_Form = __esm({
|
|
|
41566
41911
|
eventBus.emit(`UI:${onCancel}`);
|
|
41567
41912
|
}
|
|
41568
41913
|
};
|
|
41569
|
-
const renderField =
|
|
41914
|
+
const renderField = React85__default.useCallback(
|
|
41570
41915
|
(field) => {
|
|
41571
41916
|
const fieldName = field.name || field.field;
|
|
41572
41917
|
if (!fieldName) return null;
|
|
@@ -41587,7 +41932,7 @@ var init_Form = __esm({
|
|
|
41587
41932
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
41588
41933
|
);
|
|
41589
41934
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
41590
|
-
const normalizedFields =
|
|
41935
|
+
const normalizedFields = React85__default.useMemo(() => {
|
|
41591
41936
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
41592
41937
|
return effectiveFields.map((field) => {
|
|
41593
41938
|
if (typeof field === "string") {
|
|
@@ -41610,7 +41955,7 @@ var init_Form = __esm({
|
|
|
41610
41955
|
return field;
|
|
41611
41956
|
});
|
|
41612
41957
|
}, [effectiveFields, resolvedEntity]);
|
|
41613
|
-
const schemaFields =
|
|
41958
|
+
const schemaFields = React85__default.useMemo(() => {
|
|
41614
41959
|
if (normalizedFields.length === 0) return null;
|
|
41615
41960
|
if (isDebugEnabled()) {
|
|
41616
41961
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -41620,7 +41965,7 @@ var init_Form = __esm({
|
|
|
41620
41965
|
}
|
|
41621
41966
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
41622
41967
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
41623
|
-
const sectionElements =
|
|
41968
|
+
const sectionElements = React85__default.useMemo(() => {
|
|
41624
41969
|
if (!sections || sections.length === 0) return null;
|
|
41625
41970
|
return sections.map((section) => {
|
|
41626
41971
|
if (!isSectionVisible(section)) {
|
|
@@ -43410,9 +43755,9 @@ var init_GameCanvas3D2 = __esm({
|
|
|
43410
43755
|
const color = unit.faction === "player" ? 4491519 : unit.faction === "enemy" ? 16729156 : 16777028;
|
|
43411
43756
|
const hasAtlas = unitAtlasUrl(unit) !== null;
|
|
43412
43757
|
const initialFrame = hasAtlas ? resolveUnitFrame(unit.id) : null;
|
|
43413
|
-
const modelScale = UNIT_BASE_MODEL_SCALE * unitScale;
|
|
43414
|
-
const billboardHeight = UNIT_BASE_BILLBOARD_HEIGHT * unitScale;
|
|
43415
|
-
const primitiveRadius = UNIT_BASE_PRIMITIVE_RADIUS * unitScale;
|
|
43758
|
+
const modelScale = UNIT_BASE_MODEL_SCALE * unitScale * gridConfig.cellSize;
|
|
43759
|
+
const billboardHeight = UNIT_BASE_BILLBOARD_HEIGHT * unitScale * gridConfig.cellSize;
|
|
43760
|
+
const primitiveRadius = UNIT_BASE_PRIMITIVE_RADIUS * unitScale * gridConfig.cellSize;
|
|
43416
43761
|
return /* @__PURE__ */ jsxs(
|
|
43417
43762
|
"group",
|
|
43418
43763
|
{
|
|
@@ -43459,7 +43804,7 @@ var init_GameCanvas3D2 = __esm({
|
|
|
43459
43804
|
/* @__PURE__ */ jsx("meshStandardMaterial", { color })
|
|
43460
43805
|
] })
|
|
43461
43806
|
] }),
|
|
43462
|
-
unit.health !== void 0 && unit.maxHealth !== void 0 && /* @__PURE__ */ jsxs("group", { position: [0,
|
|
43807
|
+
unit.health !== void 0 && unit.maxHealth !== void 0 && /* @__PURE__ */ jsxs("group", { position: [0, billboardHeight, 0], children: [
|
|
43463
43808
|
/* @__PURE__ */ jsxs("mesh", { position: [-0.25, 0, 0], children: [
|
|
43464
43809
|
/* @__PURE__ */ jsx("planeGeometry", { args: [0.5, 0.05] }),
|
|
43465
43810
|
/* @__PURE__ */ jsx("meshBasicMaterial", { color: 3355443 })
|
|
@@ -43488,7 +43833,7 @@ var init_GameCanvas3D2 = __esm({
|
|
|
43488
43833
|
}
|
|
43489
43834
|
);
|
|
43490
43835
|
},
|
|
43491
|
-
[selectedUnitId, handleUnitClick, resolveUnitFrame, unitScale]
|
|
43836
|
+
[selectedUnitId, handleUnitClick, resolveUnitFrame, unitScale, gridConfig]
|
|
43492
43837
|
);
|
|
43493
43838
|
const DefaultFeatureRenderer = useCallback(
|
|
43494
43839
|
({
|
|
@@ -43576,7 +43921,7 @@ var init_GameCanvas3D2 = __esm({
|
|
|
43576
43921
|
{
|
|
43577
43922
|
ref: containerRef,
|
|
43578
43923
|
className: cn("game-canvas-3d relative w-full overflow-hidden", className),
|
|
43579
|
-
style: {
|
|
43924
|
+
style: { flex: "1 1 0", minHeight: "400px" },
|
|
43580
43925
|
"data-orientation": orientation,
|
|
43581
43926
|
"data-camera-mode": cameraMode,
|
|
43582
43927
|
"data-overlay": overlay,
|
|
@@ -43876,13 +44221,39 @@ var init_GameBoard3D = __esm({
|
|
|
43876
44221
|
GameBoard3D.displayName = "GameBoard3D";
|
|
43877
44222
|
}
|
|
43878
44223
|
});
|
|
43879
|
-
|
|
44224
|
+
function getSlotContentRenderer2() {
|
|
44225
|
+
if (_scr) return _scr;
|
|
44226
|
+
const mod = (init_UISlotRenderer(), __toCommonJS(UISlotRenderer_exports));
|
|
44227
|
+
_scr = mod.SlotContentRenderer;
|
|
44228
|
+
return _scr;
|
|
44229
|
+
}
|
|
44230
|
+
function resolveDescriptor(value, idPrefix) {
|
|
44231
|
+
if (value === null || value === void 0) return value;
|
|
44232
|
+
if (React85__default.isValidElement(value)) return value;
|
|
44233
|
+
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
|
|
44234
|
+
if (Array.isArray(value)) {
|
|
44235
|
+
return value.map((item, i) => /* @__PURE__ */ jsx(React85__default.Fragment, { children: resolveDescriptor(item, `${idPrefix}-${i}`) }, i));
|
|
44236
|
+
}
|
|
44237
|
+
if (typeof value === "object") {
|
|
44238
|
+
const rec = value;
|
|
44239
|
+
if (typeof rec.type === "string" && getComponentForPattern(rec.type) !== null) {
|
|
44240
|
+
const { type, props: nestedProps, _id, ...flatProps } = rec;
|
|
44241
|
+
const resolvedProps = nestedProps !== void 0 ? nestedProps : flatProps;
|
|
44242
|
+
const content = { id: _id ?? idPrefix, pattern: type, props: resolvedProps, priority: 0 };
|
|
44243
|
+
const SCR = getSlotContentRenderer2();
|
|
44244
|
+
return /* @__PURE__ */ jsx(SCR, { content, onDismiss: () => void 0 });
|
|
44245
|
+
}
|
|
44246
|
+
}
|
|
44247
|
+
return null;
|
|
44248
|
+
}
|
|
44249
|
+
var _scr, GameShell;
|
|
43880
44250
|
var init_GameShell = __esm({
|
|
43881
44251
|
"components/game/templates/GameShell.tsx"() {
|
|
43882
44252
|
init_cn();
|
|
43883
44253
|
init_Box();
|
|
43884
44254
|
init_Stack();
|
|
43885
44255
|
init_Typography();
|
|
44256
|
+
_scr = null;
|
|
43886
44257
|
GameShell = ({
|
|
43887
44258
|
appName = "Game",
|
|
43888
44259
|
hud,
|
|
@@ -43931,7 +44302,7 @@ var init_GameShell = __esm({
|
|
|
43931
44302
|
children: appName
|
|
43932
44303
|
}
|
|
43933
44304
|
),
|
|
43934
|
-
hud && /* @__PURE__ */ jsx(Box, { className: "game-shell__hud", children: hud })
|
|
44305
|
+
hud && /* @__PURE__ */ jsx(Box, { className: "game-shell__hud", children: resolveDescriptor(hud, "gs-hud") })
|
|
43935
44306
|
]
|
|
43936
44307
|
}
|
|
43937
44308
|
),
|
|
@@ -43944,7 +44315,7 @@ var init_GameShell = __esm({
|
|
|
43944
44315
|
overflow: "hidden",
|
|
43945
44316
|
position: "relative"
|
|
43946
44317
|
},
|
|
43947
|
-
children
|
|
44318
|
+
children: resolveDescriptor(children, "gs-children")
|
|
43948
44319
|
}
|
|
43949
44320
|
)
|
|
43950
44321
|
]
|
|
@@ -43954,7 +44325,32 @@ var init_GameShell = __esm({
|
|
|
43954
44325
|
GameShell.displayName = "GameShell";
|
|
43955
44326
|
}
|
|
43956
44327
|
});
|
|
43957
|
-
|
|
44328
|
+
function getSlotContentRenderer3() {
|
|
44329
|
+
if (_scr2) return _scr2;
|
|
44330
|
+
const mod = (init_UISlotRenderer(), __toCommonJS(UISlotRenderer_exports));
|
|
44331
|
+
_scr2 = mod.SlotContentRenderer;
|
|
44332
|
+
return _scr2;
|
|
44333
|
+
}
|
|
44334
|
+
function resolveDescriptor2(value, idPrefix) {
|
|
44335
|
+
if (value === null || value === void 0) return value;
|
|
44336
|
+
if (React85__default.isValidElement(value)) return value;
|
|
44337
|
+
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
|
|
44338
|
+
if (Array.isArray(value)) {
|
|
44339
|
+
return value.map((item, i) => /* @__PURE__ */ jsx(React85__default.Fragment, { children: resolveDescriptor2(item, `${idPrefix}-${i}`) }, i));
|
|
44340
|
+
}
|
|
44341
|
+
if (typeof value === "object") {
|
|
44342
|
+
const rec = value;
|
|
44343
|
+
if (typeof rec.type === "string" && getComponentForPattern(rec.type) !== null) {
|
|
44344
|
+
const { type, props: nestedProps, _id, ...flatProps } = rec;
|
|
44345
|
+
const resolvedProps = nestedProps !== void 0 ? nestedProps : flatProps;
|
|
44346
|
+
const content = { id: _id ?? idPrefix, pattern: type, props: resolvedProps, priority: 0 };
|
|
44347
|
+
const SCR = getSlotContentRenderer3();
|
|
44348
|
+
return /* @__PURE__ */ jsx(SCR, { content, onDismiss: () => void 0 });
|
|
44349
|
+
}
|
|
44350
|
+
}
|
|
44351
|
+
return null;
|
|
44352
|
+
}
|
|
44353
|
+
var _scr2, GameTemplate;
|
|
43958
44354
|
var init_GameTemplate = __esm({
|
|
43959
44355
|
"components/game/templates/GameTemplate.tsx"() {
|
|
43960
44356
|
init_cn();
|
|
@@ -43962,6 +44358,7 @@ var init_GameTemplate = __esm({
|
|
|
43962
44358
|
init_Stack();
|
|
43963
44359
|
init_Typography();
|
|
43964
44360
|
init_Button();
|
|
44361
|
+
_scr2 = null;
|
|
43965
44362
|
GameTemplate = ({
|
|
43966
44363
|
entity,
|
|
43967
44364
|
title = "Game",
|
|
@@ -44029,13 +44426,13 @@ var init_GameTemplate = __esm({
|
|
|
44029
44426
|
fullWidth: true,
|
|
44030
44427
|
className: "flex-1 bg-muted",
|
|
44031
44428
|
children: [
|
|
44032
|
-
children,
|
|
44429
|
+
resolveDescriptor2(children, "gt-children"),
|
|
44033
44430
|
hud && /* @__PURE__ */ jsx(
|
|
44034
44431
|
Box,
|
|
44035
44432
|
{
|
|
44036
44433
|
position: "absolute",
|
|
44037
44434
|
className: "top-0 left-0 right-0 pointer-events-none",
|
|
44038
|
-
children: /* @__PURE__ */ jsx(Box, { padding: "md", className: "pointer-events-auto w-fit", children: hud })
|
|
44435
|
+
children: /* @__PURE__ */ jsx(Box, { padding: "md", className: "pointer-events-auto w-fit", children: resolveDescriptor2(hud, "gt-hud") })
|
|
44039
44436
|
}
|
|
44040
44437
|
)
|
|
44041
44438
|
]
|
|
@@ -44060,7 +44457,7 @@ var init_GameTemplate = __esm({
|
|
|
44060
44457
|
children: /* @__PURE__ */ jsx(Typography, { variant: "h6", children: "Debug Panel" })
|
|
44061
44458
|
}
|
|
44062
44459
|
),
|
|
44063
|
-
/* @__PURE__ */ jsx(Box, { padding: "md", children: debugPanel })
|
|
44460
|
+
/* @__PURE__ */ jsx(Box, { padding: "md", children: resolveDescriptor2(debugPanel, "gt-debug") })
|
|
44064
44461
|
]
|
|
44065
44462
|
}
|
|
44066
44463
|
)
|
|
@@ -44272,6 +44669,39 @@ var init_HexStrategyBoard = __esm({
|
|
|
44272
44669
|
HexStrategyBoard.displayName = "HexStrategyBoard";
|
|
44273
44670
|
}
|
|
44274
44671
|
});
|
|
44672
|
+
function HolidayRunnerBoard({
|
|
44673
|
+
backgroundImage,
|
|
44674
|
+
assetBaseUrl,
|
|
44675
|
+
width = 800,
|
|
44676
|
+
height = 400,
|
|
44677
|
+
fps = 60,
|
|
44678
|
+
isLoading,
|
|
44679
|
+
error,
|
|
44680
|
+
className
|
|
44681
|
+
}) {
|
|
44682
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("holiday-runner-board relative w-full h-full", className), children: [
|
|
44683
|
+
isLoading && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/40 z-10", children: /* @__PURE__ */ jsx("span", { className: "text-white text-sm", children: "Loading\u2026" }) }),
|
|
44684
|
+
error && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/60 z-10", children: /* @__PURE__ */ jsx("span", { className: "text-red-400 text-sm", children: error.message }) }),
|
|
44685
|
+
/* @__PURE__ */ jsx(
|
|
44686
|
+
GameCanvas2D,
|
|
44687
|
+
{
|
|
44688
|
+
width,
|
|
44689
|
+
height,
|
|
44690
|
+
fps,
|
|
44691
|
+
backgroundImage: backgroundImage ?? "",
|
|
44692
|
+
assetBaseUrl
|
|
44693
|
+
}
|
|
44694
|
+
)
|
|
44695
|
+
] });
|
|
44696
|
+
}
|
|
44697
|
+
var init_HolidayRunnerBoard = __esm({
|
|
44698
|
+
"components/game/organisms/HolidayRunnerBoard.tsx"() {
|
|
44699
|
+
"use client";
|
|
44700
|
+
init_cn();
|
|
44701
|
+
init_GameCanvas2D();
|
|
44702
|
+
HolidayRunnerBoard.displayName = "HolidayRunnerBoard";
|
|
44703
|
+
}
|
|
44704
|
+
});
|
|
44275
44705
|
var LandingPageTemplate;
|
|
44276
44706
|
var init_LandingPageTemplate = __esm({
|
|
44277
44707
|
"components/marketing/templates/LandingPageTemplate.tsx"() {
|
|
@@ -44607,7 +45037,7 @@ var init_List = __esm({
|
|
|
44607
45037
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
44608
45038
|
return [];
|
|
44609
45039
|
}, [entity]);
|
|
44610
|
-
const getItemActions =
|
|
45040
|
+
const getItemActions = React85__default.useCallback(
|
|
44611
45041
|
(item) => {
|
|
44612
45042
|
if (!itemActions) return [];
|
|
44613
45043
|
if (typeof itemActions === "function") {
|
|
@@ -45026,6 +45456,48 @@ var init_MasterDetailLayout = __esm({
|
|
|
45026
45456
|
MasterDetailLayout.displayName = "MasterDetailLayout";
|
|
45027
45457
|
}
|
|
45028
45458
|
});
|
|
45459
|
+
function MatchPuzzleBoard({
|
|
45460
|
+
tiles,
|
|
45461
|
+
units,
|
|
45462
|
+
features,
|
|
45463
|
+
assetManifest,
|
|
45464
|
+
assetBaseUrl,
|
|
45465
|
+
scale = 0.45,
|
|
45466
|
+
showMinimap = false,
|
|
45467
|
+
enableCamera = false,
|
|
45468
|
+
tileClickEvent,
|
|
45469
|
+
unitClickEvent,
|
|
45470
|
+
isLoading,
|
|
45471
|
+
error,
|
|
45472
|
+
className
|
|
45473
|
+
}) {
|
|
45474
|
+
return /* @__PURE__ */ jsx("div", { className: cn("match-puzzle-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
45475
|
+
IsometricCanvas_default,
|
|
45476
|
+
{
|
|
45477
|
+
tileLayout: "flat",
|
|
45478
|
+
tiles,
|
|
45479
|
+
units,
|
|
45480
|
+
features,
|
|
45481
|
+
assetManifest,
|
|
45482
|
+
assetBaseUrl,
|
|
45483
|
+
scale,
|
|
45484
|
+
showMinimap,
|
|
45485
|
+
enableCamera,
|
|
45486
|
+
tileClickEvent,
|
|
45487
|
+
unitClickEvent,
|
|
45488
|
+
isLoading,
|
|
45489
|
+
error
|
|
45490
|
+
}
|
|
45491
|
+
) });
|
|
45492
|
+
}
|
|
45493
|
+
var init_MatchPuzzleBoard = __esm({
|
|
45494
|
+
"components/game/organisms/MatchPuzzleBoard.tsx"() {
|
|
45495
|
+
"use client";
|
|
45496
|
+
init_cn();
|
|
45497
|
+
init_IsometricCanvas();
|
|
45498
|
+
MatchPuzzleBoard.displayName = "MatchPuzzleBoard";
|
|
45499
|
+
}
|
|
45500
|
+
});
|
|
45029
45501
|
var COLUMN_CLASSES, ASPECT_CLASSES, MediaGallery;
|
|
45030
45502
|
var init_MediaGallery = __esm({
|
|
45031
45503
|
"components/core/organisms/MediaGallery.tsx"() {
|
|
@@ -45083,7 +45555,7 @@ var init_MediaGallery = __esm({
|
|
|
45083
45555
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
45084
45556
|
);
|
|
45085
45557
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
45086
|
-
const items =
|
|
45558
|
+
const items = React85__default.useMemo(() => {
|
|
45087
45559
|
if (propItems) return propItems;
|
|
45088
45560
|
if (entityData.length === 0) return [];
|
|
45089
45561
|
return entityData.map((record, idx) => ({
|
|
@@ -45243,8 +45715,50 @@ var init_MediaGallery = __esm({
|
|
|
45243
45715
|
MediaGallery.displayName = "MediaGallery";
|
|
45244
45716
|
}
|
|
45245
45717
|
});
|
|
45718
|
+
function MinigolfBoard({
|
|
45719
|
+
tiles,
|
|
45720
|
+
units,
|
|
45721
|
+
features,
|
|
45722
|
+
assetManifest,
|
|
45723
|
+
assetBaseUrl,
|
|
45724
|
+
scale = 0.45,
|
|
45725
|
+
showMinimap = true,
|
|
45726
|
+
enableCamera = true,
|
|
45727
|
+
tileClickEvent,
|
|
45728
|
+
unitClickEvent,
|
|
45729
|
+
isLoading,
|
|
45730
|
+
error,
|
|
45731
|
+
className
|
|
45732
|
+
}) {
|
|
45733
|
+
return /* @__PURE__ */ jsx("div", { className: cn("minigolf-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
45734
|
+
IsometricCanvas_default,
|
|
45735
|
+
{
|
|
45736
|
+
tileLayout: "isometric",
|
|
45737
|
+
tiles,
|
|
45738
|
+
units,
|
|
45739
|
+
features,
|
|
45740
|
+
assetManifest,
|
|
45741
|
+
assetBaseUrl,
|
|
45742
|
+
scale,
|
|
45743
|
+
showMinimap,
|
|
45744
|
+
enableCamera,
|
|
45745
|
+
tileClickEvent,
|
|
45746
|
+
unitClickEvent,
|
|
45747
|
+
isLoading,
|
|
45748
|
+
error
|
|
45749
|
+
}
|
|
45750
|
+
) });
|
|
45751
|
+
}
|
|
45752
|
+
var init_MinigolfBoard = __esm({
|
|
45753
|
+
"components/game/organisms/MinigolfBoard.tsx"() {
|
|
45754
|
+
"use client";
|
|
45755
|
+
init_cn();
|
|
45756
|
+
init_IsometricCanvas();
|
|
45757
|
+
MinigolfBoard.displayName = "MinigolfBoard";
|
|
45758
|
+
}
|
|
45759
|
+
});
|
|
45246
45760
|
function extractTitle2(children) {
|
|
45247
|
-
if (!
|
|
45761
|
+
if (!React85__default.isValidElement(children)) return void 0;
|
|
45248
45762
|
const props = children.props;
|
|
45249
45763
|
if (typeof props.title === "string") {
|
|
45250
45764
|
return props.title;
|
|
@@ -45460,6 +45974,87 @@ var init_NegotiatorBoard = __esm({
|
|
|
45460
45974
|
NegotiatorBoard.displayName = "NegotiatorBoard";
|
|
45461
45975
|
}
|
|
45462
45976
|
});
|
|
45977
|
+
function PinballBoard({
|
|
45978
|
+
tiles: _tiles,
|
|
45979
|
+
units: _units,
|
|
45980
|
+
features: _features,
|
|
45981
|
+
assetManifest: _assetManifest,
|
|
45982
|
+
assetBaseUrl,
|
|
45983
|
+
scale = 1,
|
|
45984
|
+
showMinimap: _showMinimap = false,
|
|
45985
|
+
enableCamera: _enableCamera = false,
|
|
45986
|
+
tileClickEvent: _tileClickEvent,
|
|
45987
|
+
unitClickEvent: _unitClickEvent,
|
|
45988
|
+
isLoading,
|
|
45989
|
+
error,
|
|
45990
|
+
className
|
|
45991
|
+
}) {
|
|
45992
|
+
if (isLoading) {
|
|
45993
|
+
return /* @__PURE__ */ jsx("div", { className: cn("pinball-board relative w-full h-full flex items-center justify-center", className), children: /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: "Loading..." }) });
|
|
45994
|
+
}
|
|
45995
|
+
if (error) {
|
|
45996
|
+
return /* @__PURE__ */ jsx("div", { className: cn("pinball-board relative w-full h-full flex items-center justify-center", className), children: /* @__PURE__ */ jsx("span", { className: "text-sm text-destructive", children: error.message }) });
|
|
45997
|
+
}
|
|
45998
|
+
return /* @__PURE__ */ jsx("div", { className: cn("pinball-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
45999
|
+
GameCanvas2D,
|
|
46000
|
+
{
|
|
46001
|
+
width: Math.round(400 * scale),
|
|
46002
|
+
height: Math.round(800 * scale),
|
|
46003
|
+
assetBaseUrl,
|
|
46004
|
+
fps: 60
|
|
46005
|
+
}
|
|
46006
|
+
) });
|
|
46007
|
+
}
|
|
46008
|
+
var init_PinballBoard = __esm({
|
|
46009
|
+
"components/game/organisms/PinballBoard.tsx"() {
|
|
46010
|
+
"use client";
|
|
46011
|
+
init_cn();
|
|
46012
|
+
init_GameCanvas2D();
|
|
46013
|
+
PinballBoard.displayName = "PinballBoard";
|
|
46014
|
+
}
|
|
46015
|
+
});
|
|
46016
|
+
function PirateBoard({
|
|
46017
|
+
tiles,
|
|
46018
|
+
units,
|
|
46019
|
+
features,
|
|
46020
|
+
assetManifest,
|
|
46021
|
+
assetBaseUrl,
|
|
46022
|
+
scale = 0.45,
|
|
46023
|
+
showMinimap = true,
|
|
46024
|
+
enableCamera = true,
|
|
46025
|
+
tileClickEvent,
|
|
46026
|
+
unitClickEvent,
|
|
46027
|
+
isLoading,
|
|
46028
|
+
error,
|
|
46029
|
+
className
|
|
46030
|
+
}) {
|
|
46031
|
+
return /* @__PURE__ */ jsx("div", { className: cn("pirate-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
46032
|
+
IsometricCanvas_default,
|
|
46033
|
+
{
|
|
46034
|
+
tileLayout: "flat",
|
|
46035
|
+
tiles,
|
|
46036
|
+
units,
|
|
46037
|
+
features,
|
|
46038
|
+
assetManifest,
|
|
46039
|
+
assetBaseUrl,
|
|
46040
|
+
scale,
|
|
46041
|
+
showMinimap,
|
|
46042
|
+
enableCamera,
|
|
46043
|
+
tileClickEvent,
|
|
46044
|
+
unitClickEvent,
|
|
46045
|
+
isLoading,
|
|
46046
|
+
error
|
|
46047
|
+
}
|
|
46048
|
+
) });
|
|
46049
|
+
}
|
|
46050
|
+
var init_PirateBoard = __esm({
|
|
46051
|
+
"components/game/organisms/PirateBoard.tsx"() {
|
|
46052
|
+
"use client";
|
|
46053
|
+
init_cn();
|
|
46054
|
+
init_IsometricCanvas();
|
|
46055
|
+
PirateBoard.displayName = "PirateBoard";
|
|
46056
|
+
}
|
|
46057
|
+
});
|
|
45463
46058
|
function resolveEntity(entity) {
|
|
45464
46059
|
if (!entity) return {};
|
|
45465
46060
|
if (Array.isArray(entity)) return entity[0] ?? {};
|
|
@@ -45820,6 +46415,37 @@ var init_PricingPageTemplate = __esm({
|
|
|
45820
46415
|
PricingPageTemplate.displayName = "PricingPageTemplate";
|
|
45821
46416
|
}
|
|
45822
46417
|
});
|
|
46418
|
+
function RacingBoard({
|
|
46419
|
+
backgroundImage,
|
|
46420
|
+
assetBaseUrl,
|
|
46421
|
+
width = 800,
|
|
46422
|
+
height = 600,
|
|
46423
|
+
fps = 60,
|
|
46424
|
+
tickEvent,
|
|
46425
|
+
drawEvent,
|
|
46426
|
+
className
|
|
46427
|
+
}) {
|
|
46428
|
+
return /* @__PURE__ */ jsx("div", { className: cn("racing-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
46429
|
+
GameCanvas2D,
|
|
46430
|
+
{
|
|
46431
|
+
backgroundImage,
|
|
46432
|
+
assetBaseUrl,
|
|
46433
|
+
width,
|
|
46434
|
+
height,
|
|
46435
|
+
fps,
|
|
46436
|
+
tickEvent: typeof tickEvent === "string" ? tickEvent : void 0,
|
|
46437
|
+
drawEvent: typeof drawEvent === "string" ? drawEvent : void 0
|
|
46438
|
+
}
|
|
46439
|
+
) });
|
|
46440
|
+
}
|
|
46441
|
+
var init_RacingBoard = __esm({
|
|
46442
|
+
"components/game/organisms/RacingBoard.tsx"() {
|
|
46443
|
+
"use client";
|
|
46444
|
+
init_cn();
|
|
46445
|
+
init_GameCanvas2D();
|
|
46446
|
+
RacingBoard.displayName = "RacingBoard";
|
|
46447
|
+
}
|
|
46448
|
+
});
|
|
45823
46449
|
function resolveManifestUrl3(manifest, relative) {
|
|
45824
46450
|
if (relative == null) return void 0;
|
|
45825
46451
|
if (/^https?:\/\//.test(relative)) return relative;
|
|
@@ -46314,7 +46940,7 @@ var init_debugRegistry = __esm({
|
|
|
46314
46940
|
}
|
|
46315
46941
|
});
|
|
46316
46942
|
function useDebugData() {
|
|
46317
|
-
const [data, setData] =
|
|
46943
|
+
const [data, setData] = React85.useState(() => ({
|
|
46318
46944
|
traits: [],
|
|
46319
46945
|
ticks: [],
|
|
46320
46946
|
guards: [],
|
|
@@ -46328,7 +46954,7 @@ function useDebugData() {
|
|
|
46328
46954
|
},
|
|
46329
46955
|
lastUpdate: Date.now()
|
|
46330
46956
|
}));
|
|
46331
|
-
|
|
46957
|
+
React85.useEffect(() => {
|
|
46332
46958
|
const updateData = () => {
|
|
46333
46959
|
setData({
|
|
46334
46960
|
traits: getAllTraits(),
|
|
@@ -46437,12 +47063,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
46437
47063
|
return positions;
|
|
46438
47064
|
}
|
|
46439
47065
|
function WalkMinimap() {
|
|
46440
|
-
const [walkStep, setWalkStep] =
|
|
46441
|
-
const [traits2, setTraits] =
|
|
46442
|
-
const [coveredEdges, setCoveredEdges] =
|
|
46443
|
-
const [completedTraits, setCompletedTraits] =
|
|
46444
|
-
const prevTraitRef =
|
|
46445
|
-
|
|
47066
|
+
const [walkStep, setWalkStep] = React85.useState(null);
|
|
47067
|
+
const [traits2, setTraits] = React85.useState([]);
|
|
47068
|
+
const [coveredEdges, setCoveredEdges] = React85.useState([]);
|
|
47069
|
+
const [completedTraits, setCompletedTraits] = React85.useState(/* @__PURE__ */ new Set());
|
|
47070
|
+
const prevTraitRef = React85.useRef(null);
|
|
47071
|
+
React85.useEffect(() => {
|
|
46446
47072
|
const interval = setInterval(() => {
|
|
46447
47073
|
const w = window;
|
|
46448
47074
|
const step = w.__orbitalWalkStep;
|
|
@@ -46878,15 +47504,15 @@ var init_EntitiesTab = __esm({
|
|
|
46878
47504
|
});
|
|
46879
47505
|
function EventFlowTab({ events: events2 }) {
|
|
46880
47506
|
const { t } = useTranslate();
|
|
46881
|
-
const [filter, setFilter] =
|
|
46882
|
-
const containerRef =
|
|
46883
|
-
const [autoScroll, setAutoScroll] =
|
|
46884
|
-
|
|
47507
|
+
const [filter, setFilter] = React85.useState("all");
|
|
47508
|
+
const containerRef = React85.useRef(null);
|
|
47509
|
+
const [autoScroll, setAutoScroll] = React85.useState(true);
|
|
47510
|
+
React85.useEffect(() => {
|
|
46885
47511
|
if (autoScroll && containerRef.current) {
|
|
46886
47512
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
46887
47513
|
}
|
|
46888
47514
|
}, [events2.length, autoScroll]);
|
|
46889
|
-
const filteredEvents =
|
|
47515
|
+
const filteredEvents = React85.useMemo(() => {
|
|
46890
47516
|
if (filter === "all") return events2;
|
|
46891
47517
|
return events2.filter((e) => e.type === filter);
|
|
46892
47518
|
}, [events2, filter]);
|
|
@@ -47002,7 +47628,7 @@ var init_EventFlowTab = __esm({
|
|
|
47002
47628
|
});
|
|
47003
47629
|
function GuardsPanel({ guards }) {
|
|
47004
47630
|
const { t } = useTranslate();
|
|
47005
|
-
const [filter, setFilter] =
|
|
47631
|
+
const [filter, setFilter] = React85.useState("all");
|
|
47006
47632
|
if (guards.length === 0) {
|
|
47007
47633
|
return /* @__PURE__ */ jsx(
|
|
47008
47634
|
EmptyState,
|
|
@@ -47015,7 +47641,7 @@ function GuardsPanel({ guards }) {
|
|
|
47015
47641
|
}
|
|
47016
47642
|
const passedCount = guards.filter((g) => g.result).length;
|
|
47017
47643
|
const failedCount = guards.length - passedCount;
|
|
47018
|
-
const filteredGuards =
|
|
47644
|
+
const filteredGuards = React85.useMemo(() => {
|
|
47019
47645
|
if (filter === "all") return guards;
|
|
47020
47646
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
47021
47647
|
return guards.filter((g) => !g.result);
|
|
@@ -47178,10 +47804,10 @@ function EffectBadge({ effect }) {
|
|
|
47178
47804
|
}
|
|
47179
47805
|
function TransitionTimeline({ transitions }) {
|
|
47180
47806
|
const { t } = useTranslate();
|
|
47181
|
-
const containerRef =
|
|
47182
|
-
const [autoScroll, setAutoScroll] =
|
|
47183
|
-
const [expandedId, setExpandedId] =
|
|
47184
|
-
|
|
47807
|
+
const containerRef = React85.useRef(null);
|
|
47808
|
+
const [autoScroll, setAutoScroll] = React85.useState(true);
|
|
47809
|
+
const [expandedId, setExpandedId] = React85.useState(null);
|
|
47810
|
+
React85.useEffect(() => {
|
|
47185
47811
|
if (autoScroll && containerRef.current) {
|
|
47186
47812
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
47187
47813
|
}
|
|
@@ -47461,9 +48087,9 @@ function getAllEvents(traits2) {
|
|
|
47461
48087
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
47462
48088
|
const eventBus = useEventBus();
|
|
47463
48089
|
const { t } = useTranslate();
|
|
47464
|
-
const [log14, setLog] =
|
|
47465
|
-
const prevStatesRef =
|
|
47466
|
-
|
|
48090
|
+
const [log14, setLog] = React85.useState([]);
|
|
48091
|
+
const prevStatesRef = React85.useRef(/* @__PURE__ */ new Map());
|
|
48092
|
+
React85.useEffect(() => {
|
|
47467
48093
|
for (const trait of traits2) {
|
|
47468
48094
|
const prev = prevStatesRef.current.get(trait.id);
|
|
47469
48095
|
if (prev && prev !== trait.currentState) {
|
|
@@ -47632,10 +48258,10 @@ function VerifyModePanel({
|
|
|
47632
48258
|
localCount
|
|
47633
48259
|
}) {
|
|
47634
48260
|
const { t } = useTranslate();
|
|
47635
|
-
const [expanded, setExpanded] =
|
|
47636
|
-
const scrollRef =
|
|
47637
|
-
const prevCountRef =
|
|
47638
|
-
|
|
48261
|
+
const [expanded, setExpanded] = React85.useState(true);
|
|
48262
|
+
const scrollRef = React85.useRef(null);
|
|
48263
|
+
const prevCountRef = React85.useRef(0);
|
|
48264
|
+
React85.useEffect(() => {
|
|
47639
48265
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
47640
48266
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
47641
48267
|
}
|
|
@@ -47692,10 +48318,10 @@ function RuntimeDebugger({
|
|
|
47692
48318
|
schema
|
|
47693
48319
|
}) {
|
|
47694
48320
|
const { t } = useTranslate();
|
|
47695
|
-
const [isCollapsed, setIsCollapsed] =
|
|
47696
|
-
const [isVisible, setIsVisible] =
|
|
48321
|
+
const [isCollapsed, setIsCollapsed] = React85.useState(mode === "verify" ? true : defaultCollapsed);
|
|
48322
|
+
const [isVisible, setIsVisible] = React85.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
47697
48323
|
const debugData = useDebugData();
|
|
47698
|
-
|
|
48324
|
+
React85.useEffect(() => {
|
|
47699
48325
|
if (mode === "inline") return;
|
|
47700
48326
|
return onDebugToggle((enabled) => {
|
|
47701
48327
|
setIsVisible(enabled);
|
|
@@ -47704,7 +48330,7 @@ function RuntimeDebugger({
|
|
|
47704
48330
|
}
|
|
47705
48331
|
});
|
|
47706
48332
|
}, [mode]);
|
|
47707
|
-
|
|
48333
|
+
React85.useEffect(() => {
|
|
47708
48334
|
if (mode === "inline") return;
|
|
47709
48335
|
const handleKeyDown = (e) => {
|
|
47710
48336
|
if (e.key === "`" && isVisible) {
|
|
@@ -48264,7 +48890,7 @@ function SequenceBar({
|
|
|
48264
48890
|
onSlotRemove(index);
|
|
48265
48891
|
}, [onSlotRemove, playing]);
|
|
48266
48892
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
48267
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
48893
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
48268
48894
|
i > 0 && /* @__PURE__ */ jsx(
|
|
48269
48895
|
Typography,
|
|
48270
48896
|
{
|
|
@@ -49025,6 +49651,123 @@ var init_SimulatorBoard = __esm({
|
|
|
49025
49651
|
SimulatorBoard.displayName = "SimulatorBoard";
|
|
49026
49652
|
}
|
|
49027
49653
|
});
|
|
49654
|
+
function SokobanBoard({
|
|
49655
|
+
tiles,
|
|
49656
|
+
units,
|
|
49657
|
+
features,
|
|
49658
|
+
assetManifest,
|
|
49659
|
+
assetBaseUrl,
|
|
49660
|
+
scale = 0.45,
|
|
49661
|
+
showMinimap = false,
|
|
49662
|
+
enableCamera = false,
|
|
49663
|
+
tileClickEvent,
|
|
49664
|
+
unitClickEvent,
|
|
49665
|
+
isLoading,
|
|
49666
|
+
error,
|
|
49667
|
+
className
|
|
49668
|
+
}) {
|
|
49669
|
+
return /* @__PURE__ */ jsx("div", { className: cn("sokoban-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
49670
|
+
IsometricCanvas_default,
|
|
49671
|
+
{
|
|
49672
|
+
tileLayout: "flat",
|
|
49673
|
+
tiles,
|
|
49674
|
+
units,
|
|
49675
|
+
features,
|
|
49676
|
+
assetManifest,
|
|
49677
|
+
assetBaseUrl,
|
|
49678
|
+
scale,
|
|
49679
|
+
showMinimap,
|
|
49680
|
+
enableCamera,
|
|
49681
|
+
tileClickEvent,
|
|
49682
|
+
unitClickEvent,
|
|
49683
|
+
isLoading,
|
|
49684
|
+
error
|
|
49685
|
+
}
|
|
49686
|
+
) });
|
|
49687
|
+
}
|
|
49688
|
+
var init_SokobanBoard = __esm({
|
|
49689
|
+
"components/game/organisms/SokobanBoard.tsx"() {
|
|
49690
|
+
"use client";
|
|
49691
|
+
init_cn();
|
|
49692
|
+
init_IsometricCanvas();
|
|
49693
|
+
SokobanBoard.displayName = "SokobanBoard";
|
|
49694
|
+
}
|
|
49695
|
+
});
|
|
49696
|
+
function SpaceShmupBoard({
|
|
49697
|
+
backgroundImage,
|
|
49698
|
+
assetBaseUrl,
|
|
49699
|
+
width = 800,
|
|
49700
|
+
height = 600,
|
|
49701
|
+
fps = 60,
|
|
49702
|
+
isLoading,
|
|
49703
|
+
error,
|
|
49704
|
+
className
|
|
49705
|
+
}) {
|
|
49706
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("space-shmup-board relative w-full h-full", className), children: [
|
|
49707
|
+
isLoading && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/60 z-10", children: /* @__PURE__ */ jsx("span", { className: "text-white text-sm", children: "Loading\u2026" }) }),
|
|
49708
|
+
error && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-red-900/60 z-10", children: /* @__PURE__ */ jsx("span", { className: "text-white text-sm", children: error.message }) }),
|
|
49709
|
+
/* @__PURE__ */ jsx(
|
|
49710
|
+
GameCanvas2D,
|
|
49711
|
+
{
|
|
49712
|
+
backgroundImage,
|
|
49713
|
+
assetBaseUrl,
|
|
49714
|
+
width,
|
|
49715
|
+
height,
|
|
49716
|
+
fps
|
|
49717
|
+
}
|
|
49718
|
+
)
|
|
49719
|
+
] });
|
|
49720
|
+
}
|
|
49721
|
+
var init_SpaceShmupBoard = __esm({
|
|
49722
|
+
"components/game/organisms/SpaceShmupBoard.tsx"() {
|
|
49723
|
+
"use client";
|
|
49724
|
+
init_cn();
|
|
49725
|
+
init_GameCanvas2D();
|
|
49726
|
+
SpaceShmupBoard.displayName = "SpaceShmupBoard";
|
|
49727
|
+
}
|
|
49728
|
+
});
|
|
49729
|
+
function SpaceStationBoard({
|
|
49730
|
+
tiles,
|
|
49731
|
+
units,
|
|
49732
|
+
features,
|
|
49733
|
+
assetManifest,
|
|
49734
|
+
assetBaseUrl,
|
|
49735
|
+
scale = 0.45,
|
|
49736
|
+
showMinimap = true,
|
|
49737
|
+
enableCamera = true,
|
|
49738
|
+
tileClickEvent,
|
|
49739
|
+
unitClickEvent,
|
|
49740
|
+
isLoading,
|
|
49741
|
+
error,
|
|
49742
|
+
className
|
|
49743
|
+
}) {
|
|
49744
|
+
return /* @__PURE__ */ jsx("div", { className: cn("space-station-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
49745
|
+
IsometricCanvas_default,
|
|
49746
|
+
{
|
|
49747
|
+
tileLayout: "isometric",
|
|
49748
|
+
tiles,
|
|
49749
|
+
units,
|
|
49750
|
+
features,
|
|
49751
|
+
assetManifest,
|
|
49752
|
+
assetBaseUrl,
|
|
49753
|
+
scale,
|
|
49754
|
+
showMinimap,
|
|
49755
|
+
enableCamera,
|
|
49756
|
+
tileClickEvent,
|
|
49757
|
+
unitClickEvent,
|
|
49758
|
+
isLoading,
|
|
49759
|
+
error
|
|
49760
|
+
}
|
|
49761
|
+
) });
|
|
49762
|
+
}
|
|
49763
|
+
var init_SpaceStationBoard = __esm({
|
|
49764
|
+
"components/game/organisms/SpaceStationBoard.tsx"() {
|
|
49765
|
+
"use client";
|
|
49766
|
+
init_cn();
|
|
49767
|
+
init_IsometricCanvas();
|
|
49768
|
+
SpaceStationBoard.displayName = "SpaceStationBoard";
|
|
49769
|
+
}
|
|
49770
|
+
});
|
|
49028
49771
|
var SplitPane;
|
|
49029
49772
|
var init_SplitPane = __esm({
|
|
49030
49773
|
"components/core/organisms/layout/SplitPane.tsx"() {
|
|
@@ -49118,6 +49861,48 @@ var init_SplitPane = __esm({
|
|
|
49118
49861
|
SplitPane.displayName = "SplitPane";
|
|
49119
49862
|
}
|
|
49120
49863
|
});
|
|
49864
|
+
function SportsBoard({
|
|
49865
|
+
tiles,
|
|
49866
|
+
units,
|
|
49867
|
+
features,
|
|
49868
|
+
assetManifest,
|
|
49869
|
+
assetBaseUrl,
|
|
49870
|
+
scale = 0.45,
|
|
49871
|
+
showMinimap = false,
|
|
49872
|
+
enableCamera = true,
|
|
49873
|
+
tileClickEvent,
|
|
49874
|
+
unitClickEvent,
|
|
49875
|
+
isLoading,
|
|
49876
|
+
error,
|
|
49877
|
+
className
|
|
49878
|
+
}) {
|
|
49879
|
+
return /* @__PURE__ */ jsx("div", { className: cn("sports-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
49880
|
+
IsometricCanvas_default,
|
|
49881
|
+
{
|
|
49882
|
+
tileLayout: "flat",
|
|
49883
|
+
tiles,
|
|
49884
|
+
units,
|
|
49885
|
+
features,
|
|
49886
|
+
assetManifest,
|
|
49887
|
+
assetBaseUrl,
|
|
49888
|
+
scale,
|
|
49889
|
+
showMinimap,
|
|
49890
|
+
enableCamera,
|
|
49891
|
+
tileClickEvent,
|
|
49892
|
+
unitClickEvent,
|
|
49893
|
+
isLoading,
|
|
49894
|
+
error
|
|
49895
|
+
}
|
|
49896
|
+
) });
|
|
49897
|
+
}
|
|
49898
|
+
var init_SportsBoard = __esm({
|
|
49899
|
+
"components/game/organisms/SportsBoard.tsx"() {
|
|
49900
|
+
"use client";
|
|
49901
|
+
init_cn();
|
|
49902
|
+
init_IsometricCanvas();
|
|
49903
|
+
SportsBoard.displayName = "SportsBoard";
|
|
49904
|
+
}
|
|
49905
|
+
});
|
|
49121
49906
|
var StatCard;
|
|
49122
49907
|
var init_StatCard = __esm({
|
|
49123
49908
|
"components/core/organisms/StatCard.tsx"() {
|
|
@@ -49156,7 +49941,7 @@ var init_StatCard = __esm({
|
|
|
49156
49941
|
const labelToUse = propLabel ?? propTitle;
|
|
49157
49942
|
const eventBus = useEventBus();
|
|
49158
49943
|
const { t } = useTranslate();
|
|
49159
|
-
const handleActionClick =
|
|
49944
|
+
const handleActionClick = React85__default.useCallback(() => {
|
|
49160
49945
|
if (action?.event) {
|
|
49161
49946
|
eventBus.emit(`UI:${action.event}`, {});
|
|
49162
49947
|
}
|
|
@@ -49167,7 +49952,7 @@ var init_StatCard = __esm({
|
|
|
49167
49952
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
49168
49953
|
const isLoading = externalLoading ?? false;
|
|
49169
49954
|
const error = externalError;
|
|
49170
|
-
const computeMetricValue =
|
|
49955
|
+
const computeMetricValue = React85__default.useCallback(
|
|
49171
49956
|
(metric, items) => {
|
|
49172
49957
|
if (metric.value !== void 0) {
|
|
49173
49958
|
return metric.value;
|
|
@@ -49206,7 +49991,7 @@ var init_StatCard = __esm({
|
|
|
49206
49991
|
},
|
|
49207
49992
|
[]
|
|
49208
49993
|
);
|
|
49209
|
-
const schemaStats =
|
|
49994
|
+
const schemaStats = React85__default.useMemo(() => {
|
|
49210
49995
|
if (!metrics || metrics.length === 0) return null;
|
|
49211
49996
|
return metrics.map((metric) => ({
|
|
49212
49997
|
label: metric.label,
|
|
@@ -49214,7 +49999,7 @@ var init_StatCard = __esm({
|
|
|
49214
49999
|
format: metric.format
|
|
49215
50000
|
}));
|
|
49216
50001
|
}, [metrics, data, computeMetricValue]);
|
|
49217
|
-
const calculatedTrend =
|
|
50002
|
+
const calculatedTrend = React85__default.useMemo(() => {
|
|
49218
50003
|
if (manualTrend !== void 0) return manualTrend;
|
|
49219
50004
|
if (previousValue === void 0 || currentValue === void 0)
|
|
49220
50005
|
return void 0;
|
|
@@ -49963,6 +50748,832 @@ var init_StepFlowOrganism = __esm({
|
|
|
49963
50748
|
StepFlowOrganism.displayName = "StepFlowOrganism";
|
|
49964
50749
|
}
|
|
49965
50750
|
});
|
|
50751
|
+
|
|
50752
|
+
// components/core/molecules/markdown/index.ts
|
|
50753
|
+
var init_markdown = __esm({
|
|
50754
|
+
"components/core/molecules/markdown/index.ts"() {
|
|
50755
|
+
init_MarkdownContent();
|
|
50756
|
+
init_CodeBlock();
|
|
50757
|
+
}
|
|
50758
|
+
});
|
|
50759
|
+
function groupByOrbital(subagents) {
|
|
50760
|
+
const map = /* @__PURE__ */ new Map();
|
|
50761
|
+
for (const sub of subagents) {
|
|
50762
|
+
const key = sub.orbitalName ?? "(unattached)";
|
|
50763
|
+
const arr = map.get(key) ?? [];
|
|
50764
|
+
arr.push(sub);
|
|
50765
|
+
map.set(key, arr);
|
|
50766
|
+
}
|
|
50767
|
+
return map;
|
|
50768
|
+
}
|
|
50769
|
+
function statusIconName(status) {
|
|
50770
|
+
switch (status) {
|
|
50771
|
+
case "running":
|
|
50772
|
+
return "loader";
|
|
50773
|
+
case "complete":
|
|
50774
|
+
return "check";
|
|
50775
|
+
case "error":
|
|
50776
|
+
return "x";
|
|
50777
|
+
default:
|
|
50778
|
+
return "circle";
|
|
50779
|
+
}
|
|
50780
|
+
}
|
|
50781
|
+
function lastMessage(sub) {
|
|
50782
|
+
if (sub.messages.length === 0) return void 0;
|
|
50783
|
+
return sub.messages[sub.messages.length - 1].message;
|
|
50784
|
+
}
|
|
50785
|
+
function formatHHMMSS(ts) {
|
|
50786
|
+
const d = new Date(ts);
|
|
50787
|
+
const hh = String(d.getHours()).padStart(2, "0");
|
|
50788
|
+
const mm = String(d.getMinutes()).padStart(2, "0");
|
|
50789
|
+
const ss = String(d.getSeconds()).padStart(2, "0");
|
|
50790
|
+
return `${hh}:${mm}:${ss}`;
|
|
50791
|
+
}
|
|
50792
|
+
function compactJson(value) {
|
|
50793
|
+
if (value === void 0 || value === null) return "";
|
|
50794
|
+
if (typeof value === "string") return value;
|
|
50795
|
+
try {
|
|
50796
|
+
const json = JSON.stringify(value);
|
|
50797
|
+
if (json.length <= 240) return json;
|
|
50798
|
+
return json.slice(0, 239) + "\u2026";
|
|
50799
|
+
} catch {
|
|
50800
|
+
return String(value);
|
|
50801
|
+
}
|
|
50802
|
+
}
|
|
50803
|
+
function tryPrettyJson(s) {
|
|
50804
|
+
try {
|
|
50805
|
+
return JSON.stringify(JSON.parse(s), null, 2);
|
|
50806
|
+
} catch {
|
|
50807
|
+
return null;
|
|
50808
|
+
}
|
|
50809
|
+
}
|
|
50810
|
+
function summarizeArgs(args) {
|
|
50811
|
+
const keys = Object.keys(args);
|
|
50812
|
+
if (keys.length === 0) return "";
|
|
50813
|
+
return keys.slice(0, 3).join(", ") + (keys.length > 3 ? ", \u2026" : "");
|
|
50814
|
+
}
|
|
50815
|
+
function previewText(text, max = 120) {
|
|
50816
|
+
if (!text) return "";
|
|
50817
|
+
return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
|
|
50818
|
+
}
|
|
50819
|
+
function coordinatorToActivityItems(activities) {
|
|
50820
|
+
return activities.flatMap((a) => {
|
|
50821
|
+
switch (a.type) {
|
|
50822
|
+
case "tool_call":
|
|
50823
|
+
return [{
|
|
50824
|
+
type: "tool_call",
|
|
50825
|
+
tool: a.tool,
|
|
50826
|
+
args: a.args,
|
|
50827
|
+
timestamp: a.timestamp
|
|
50828
|
+
}];
|
|
50829
|
+
case "tool_result":
|
|
50830
|
+
return [{
|
|
50831
|
+
type: "tool_result",
|
|
50832
|
+
tool: a.tool,
|
|
50833
|
+
result: a.result,
|
|
50834
|
+
success: a.success,
|
|
50835
|
+
timestamp: a.timestamp
|
|
50836
|
+
}];
|
|
50837
|
+
case "message":
|
|
50838
|
+
return [{
|
|
50839
|
+
type: "message",
|
|
50840
|
+
role: a.role,
|
|
50841
|
+
content: a.content,
|
|
50842
|
+
timestamp: a.timestamp
|
|
50843
|
+
}];
|
|
50844
|
+
case "error":
|
|
50845
|
+
return [{
|
|
50846
|
+
type: "message",
|
|
50847
|
+
role: "system",
|
|
50848
|
+
content: `Error: ${a.message}`,
|
|
50849
|
+
timestamp: a.timestamp
|
|
50850
|
+
}];
|
|
50851
|
+
case "coordinator_decision":
|
|
50852
|
+
case "plan_committed":
|
|
50853
|
+
case "pending_question":
|
|
50854
|
+
case "clarification_question":
|
|
50855
|
+
return [];
|
|
50856
|
+
case "file_operation":
|
|
50857
|
+
return [{
|
|
50858
|
+
type: "file_operation",
|
|
50859
|
+
operation: a.operation,
|
|
50860
|
+
path: a.path,
|
|
50861
|
+
success: a.success,
|
|
50862
|
+
timestamp: a.timestamp
|
|
50863
|
+
}];
|
|
50864
|
+
case "schema_diff":
|
|
50865
|
+
return [{
|
|
50866
|
+
type: "schema_diff",
|
|
50867
|
+
filePath: a.filePath,
|
|
50868
|
+
hunks: a.hunks,
|
|
50869
|
+
timestamp: a.timestamp
|
|
50870
|
+
}];
|
|
50871
|
+
}
|
|
50872
|
+
});
|
|
50873
|
+
}
|
|
50874
|
+
function pluckCoordinatorState(activities) {
|
|
50875
|
+
let decision = null;
|
|
50876
|
+
let plan = null;
|
|
50877
|
+
const pendingQuestions = [];
|
|
50878
|
+
for (const a of activities) {
|
|
50879
|
+
if (a.type === "coordinator_decision") decision = a;
|
|
50880
|
+
else if (a.type === "plan_committed") plan = a;
|
|
50881
|
+
else if (a.type === "pending_question") pendingQuestions.push(a);
|
|
50882
|
+
}
|
|
50883
|
+
return { decision, plan, pendingQuestions };
|
|
50884
|
+
}
|
|
50885
|
+
function subagentMessagesToActivities(messages) {
|
|
50886
|
+
return messages.map((m) => {
|
|
50887
|
+
if (m.tool) {
|
|
50888
|
+
return {
|
|
50889
|
+
type: "tool_call",
|
|
50890
|
+
tool: m.tool,
|
|
50891
|
+
args: { preview: m.message },
|
|
50892
|
+
timestamp: m.timestamp
|
|
50893
|
+
};
|
|
50894
|
+
}
|
|
50895
|
+
return {
|
|
50896
|
+
type: "message",
|
|
50897
|
+
role: "system",
|
|
50898
|
+
content: m.message,
|
|
50899
|
+
timestamp: m.timestamp
|
|
50900
|
+
};
|
|
50901
|
+
});
|
|
50902
|
+
}
|
|
50903
|
+
function buildTimelineItems(messages, activities, subagents) {
|
|
50904
|
+
const items = [];
|
|
50905
|
+
if (messages) {
|
|
50906
|
+
messages.forEach((m, i) => items.push({ source: "message", data: m, index: i }));
|
|
50907
|
+
}
|
|
50908
|
+
if (activities) {
|
|
50909
|
+
activities.forEach((a) => items.push({ source: "activity", data: a }));
|
|
50910
|
+
}
|
|
50911
|
+
subagents.forEach((s) => items.push({ source: "subagent", data: s }));
|
|
50912
|
+
return items;
|
|
50913
|
+
}
|
|
50914
|
+
function timelineItemIcon(item) {
|
|
50915
|
+
switch (item.source) {
|
|
50916
|
+
case "message": {
|
|
50917
|
+
const m = item.data;
|
|
50918
|
+
if (m.role === "tool") return { name: "terminal", color: "text-[var(--color-primary)]" };
|
|
50919
|
+
if (m.reasoningContent) return { name: "sparkles", color: "text-[var(--color-primary)]" };
|
|
50920
|
+
if (m.role === "user") return { name: "user", color: "text-[var(--color-primary)]" };
|
|
50921
|
+
return { name: "message-square", color: "text-[var(--color-muted-foreground)]" };
|
|
50922
|
+
}
|
|
50923
|
+
case "activity": {
|
|
50924
|
+
const a = item.data;
|
|
50925
|
+
switch (a.type) {
|
|
50926
|
+
case "tool_call":
|
|
50927
|
+
return { name: "terminal", color: "text-[var(--color-primary)]" };
|
|
50928
|
+
case "tool_result":
|
|
50929
|
+
return { name: a.success !== false ? "check" : "x", color: a.success !== false ? "text-[var(--color-success)]" : "text-[var(--color-danger)]" };
|
|
50930
|
+
case "error":
|
|
50931
|
+
return { name: "alert-triangle", color: "text-[var(--color-danger)]" };
|
|
50932
|
+
case "file_operation":
|
|
50933
|
+
return { name: "file", color: "text-[var(--color-muted-foreground)]" };
|
|
50934
|
+
case "schema_diff":
|
|
50935
|
+
return { name: "git-commit", color: "text-[var(--color-muted-foreground)]" };
|
|
50936
|
+
default:
|
|
50937
|
+
return { name: "info", color: "text-[var(--color-muted-foreground)]" };
|
|
50938
|
+
}
|
|
50939
|
+
}
|
|
50940
|
+
case "subagent":
|
|
50941
|
+
return { name: "bot", color: "text-[var(--color-primary)]" };
|
|
50942
|
+
}
|
|
50943
|
+
}
|
|
50944
|
+
function timelineItemLabel(item) {
|
|
50945
|
+
switch (item.source) {
|
|
50946
|
+
case "message": {
|
|
50947
|
+
const m = item.data;
|
|
50948
|
+
if (m.role === "tool") return "tool";
|
|
50949
|
+
if (m.reasoningContent) return "thinking";
|
|
50950
|
+
return m.role;
|
|
50951
|
+
}
|
|
50952
|
+
case "activity":
|
|
50953
|
+
return item.data.type;
|
|
50954
|
+
case "subagent":
|
|
50955
|
+
return "subagent";
|
|
50956
|
+
}
|
|
50957
|
+
}
|
|
50958
|
+
function timelineItemPreview(item) {
|
|
50959
|
+
switch (item.source) {
|
|
50960
|
+
case "message": {
|
|
50961
|
+
const m = item.data;
|
|
50962
|
+
if (m.role === "tool") return `${m.toolName ?? "tool"} \u2192 ${m.toolCallId?.slice(0, 8) ?? ""}`;
|
|
50963
|
+
if (m.reasoningContent) return previewText(m.reasoningContent, 120);
|
|
50964
|
+
return previewText(m.content, 120);
|
|
50965
|
+
}
|
|
50966
|
+
case "activity": {
|
|
50967
|
+
const a = item.data;
|
|
50968
|
+
switch (a.type) {
|
|
50969
|
+
case "tool_call":
|
|
50970
|
+
return `${a.tool}(${summarizeArgs(a.args)})`;
|
|
50971
|
+
case "tool_result":
|
|
50972
|
+
return `${a.tool}: ${compactJson(a.result)}`;
|
|
50973
|
+
case "message":
|
|
50974
|
+
return previewText(a.content, 120);
|
|
50975
|
+
case "error":
|
|
50976
|
+
return previewText(a.message, 120);
|
|
50977
|
+
case "file_operation":
|
|
50978
|
+
return `${a.operation} ${a.path}`;
|
|
50979
|
+
case "schema_diff":
|
|
50980
|
+
return `diff ${a.filePath}`;
|
|
50981
|
+
default:
|
|
50982
|
+
return String(a.type);
|
|
50983
|
+
}
|
|
50984
|
+
}
|
|
50985
|
+
case "subagent":
|
|
50986
|
+
return `${item.data.name} \xB7 ${item.data.task}`;
|
|
50987
|
+
}
|
|
50988
|
+
}
|
|
50989
|
+
function timelineItemTimeLabel(item) {
|
|
50990
|
+
if (item.source === "activity") return formatHHMMSS(item.data.timestamp);
|
|
50991
|
+
if (item.source === "subagent") {
|
|
50992
|
+
const ts = item.data.messages[0]?.timestamp;
|
|
50993
|
+
return ts !== void 0 ? formatHHMMSS(ts) : void 0;
|
|
50994
|
+
}
|
|
50995
|
+
return void 0;
|
|
50996
|
+
}
|
|
50997
|
+
function TraceDetailContent({ item }) {
|
|
50998
|
+
const { t } = useTranslate();
|
|
50999
|
+
switch (item.source) {
|
|
51000
|
+
case "message": {
|
|
51001
|
+
const m = item.data;
|
|
51002
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51003
|
+
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "items-center", children: /* @__PURE__ */ jsx(Badge, { variant: roleBadgeVariant[m.role], className: "text-[10px] uppercase", children: m.role }) }),
|
|
51004
|
+
typeof m.reasoningContent === "string" && m.reasoningContent.length > 0 && /* @__PURE__ */ jsxs(Box, { children: [
|
|
51005
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "mb-1", children: t("subagentTrace.reasoning") }),
|
|
51006
|
+
/* @__PURE__ */ jsx(MarkdownContent, { content: m.reasoningContent })
|
|
51007
|
+
] }),
|
|
51008
|
+
m.content.length > 0 && /* @__PURE__ */ jsxs(Box, { children: [
|
|
51009
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "mb-1", children: t("subagentTrace.content") }),
|
|
51010
|
+
m.role === "tool" ? (() => {
|
|
51011
|
+
const pretty = tryPrettyJson(m.content);
|
|
51012
|
+
return pretty !== null ? /* @__PURE__ */ jsx(CodeBlock, { code: pretty, language: "json", maxHeight: "24rem" }) : /* @__PURE__ */ jsx(Typography, { variant: "body", className: "whitespace-pre-wrap font-mono text-[11px]", children: m.content });
|
|
51013
|
+
})() : /* @__PURE__ */ jsx(MarkdownContent, { content: m.content })
|
|
51014
|
+
] }),
|
|
51015
|
+
Array.isArray(m.toolCalls) && m.toolCalls.length > 0 && /* @__PURE__ */ jsxs(Box, { children: [
|
|
51016
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "mb-1", children: t("subagentTrace.toolCalls") }),
|
|
51017
|
+
/* @__PURE__ */ jsx(
|
|
51018
|
+
Accordion,
|
|
51019
|
+
{
|
|
51020
|
+
multiple: true,
|
|
51021
|
+
items: m.toolCalls.map((tc, i) => ({
|
|
51022
|
+
id: `tc-detail-${i}`,
|
|
51023
|
+
title: `${tc.name}(${summarizeArgs(tc.args)})`,
|
|
51024
|
+
content: /* @__PURE__ */ jsx(CodeBlock, { code: JSON.stringify(tc.args, null, 2), language: "json", maxHeight: "24rem" })
|
|
51025
|
+
}))
|
|
51026
|
+
}
|
|
51027
|
+
)
|
|
51028
|
+
] })
|
|
51029
|
+
] });
|
|
51030
|
+
}
|
|
51031
|
+
case "activity": {
|
|
51032
|
+
const a = item.data;
|
|
51033
|
+
switch (a.type) {
|
|
51034
|
+
case "tool_call":
|
|
51035
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51036
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51037
|
+
/* @__PURE__ */ jsx(Badge, { variant: "default", className: "text-[10px]", children: "tool_call" }),
|
|
51038
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
51039
|
+
] }),
|
|
51040
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: a.tool }),
|
|
51041
|
+
/* @__PURE__ */ jsx(CodeBlock, { code: JSON.stringify(a.args, null, 2), language: "json", maxHeight: "60vh" })
|
|
51042
|
+
] });
|
|
51043
|
+
case "tool_result":
|
|
51044
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51045
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51046
|
+
/* @__PURE__ */ jsx(Badge, { variant: a.success !== false ? "default" : "warning", className: "text-[10px]", children: a.success !== false ? "success" : "fail" }),
|
|
51047
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
51048
|
+
] }),
|
|
51049
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: a.tool }),
|
|
51050
|
+
/* @__PURE__ */ jsx(CodeBlock, { code: JSON.stringify(a.result, null, 2), language: "json", maxHeight: "60vh" })
|
|
51051
|
+
] });
|
|
51052
|
+
case "message":
|
|
51053
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51054
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51055
|
+
/* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: a.role }),
|
|
51056
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
51057
|
+
] }),
|
|
51058
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "whitespace-pre-wrap", children: a.content })
|
|
51059
|
+
] });
|
|
51060
|
+
case "error":
|
|
51061
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51062
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51063
|
+
/* @__PURE__ */ jsx(Badge, { variant: "warning", className: "text-[10px]", children: "error" }),
|
|
51064
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
51065
|
+
] }),
|
|
51066
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "whitespace-pre-wrap text-[var(--color-danger)]", children: a.message })
|
|
51067
|
+
] });
|
|
51068
|
+
case "file_operation":
|
|
51069
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51070
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51071
|
+
/* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: "file" }),
|
|
51072
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
51073
|
+
] }),
|
|
51074
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "body2", children: [
|
|
51075
|
+
a.operation,
|
|
51076
|
+
" ",
|
|
51077
|
+
a.path
|
|
51078
|
+
] })
|
|
51079
|
+
] });
|
|
51080
|
+
case "schema_diff":
|
|
51081
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51082
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51083
|
+
/* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: "diff" }),
|
|
51084
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
51085
|
+
] }),
|
|
51086
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: a.filePath })
|
|
51087
|
+
] });
|
|
51088
|
+
default:
|
|
51089
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51090
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) }),
|
|
51091
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: String(a.type) })
|
|
51092
|
+
] });
|
|
51093
|
+
}
|
|
51094
|
+
}
|
|
51095
|
+
case "subagent": {
|
|
51096
|
+
const s = item.data;
|
|
51097
|
+
const activities = subagentMessagesToActivities(s.messages);
|
|
51098
|
+
const ts = s.messages[0]?.timestamp;
|
|
51099
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51100
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51101
|
+
/* @__PURE__ */ jsx(Badge, { variant: "default", className: "text-[10px]", children: s.role }),
|
|
51102
|
+
ts !== void 0 && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(ts) })
|
|
51103
|
+
] }),
|
|
51104
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", weight: "semibold", children: s.name }),
|
|
51105
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", color: "muted", children: s.task }),
|
|
51106
|
+
activities.length > 0 && /* @__PURE__ */ jsx(Box, { className: "border-t border-[var(--color-border)] pt-2", children: /* @__PURE__ */ jsx(InlineActivityStream, { activities, autoScroll: false }) })
|
|
51107
|
+
] });
|
|
51108
|
+
}
|
|
51109
|
+
}
|
|
51110
|
+
}
|
|
51111
|
+
var InlineActivityRow, InlineActivityStream, CoordinatorCard, SubagentRow, OrbitalGroup, SubagentRichCard, roleBadgeVariant, ChatMessageRow, CoordinatorConversation, SubagentTracePanel;
|
|
51112
|
+
var init_SubagentTracePanel = __esm({
|
|
51113
|
+
"components/core/organisms/SubagentTracePanel.tsx"() {
|
|
51114
|
+
"use client";
|
|
51115
|
+
init_Box();
|
|
51116
|
+
init_Stack();
|
|
51117
|
+
init_Typography();
|
|
51118
|
+
init_Badge();
|
|
51119
|
+
init_Icon();
|
|
51120
|
+
init_Button();
|
|
51121
|
+
init_Modal();
|
|
51122
|
+
init_Accordion();
|
|
51123
|
+
init_markdown();
|
|
51124
|
+
InlineActivityRow = ({ activity }) => {
|
|
51125
|
+
const time = formatHHMMSS(activity.timestamp);
|
|
51126
|
+
const baseRow = "items-start px-3 py-1 hover:bg-[var(--color-surface)]";
|
|
51127
|
+
if (activity.type === "tool_call") {
|
|
51128
|
+
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
|
|
51129
|
+
/* @__PURE__ */ jsx(Icon, { name: "terminal", size: "xs", className: "mt-0.5 flex-shrink-0 text-[var(--color-primary)]" }),
|
|
51130
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "flex-1 min-w-0 text-[11px] font-mono break-all whitespace-pre-wrap", children: [
|
|
51131
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", weight: "semibold", className: "text-[11px] font-mono", children: activity.tool }),
|
|
51132
|
+
activity.args !== void 0 && /* @__PURE__ */ jsxs(Typography, { as: "span", variant: "caption", color: "muted", className: "text-[11px] font-mono", children: [
|
|
51133
|
+
" ",
|
|
51134
|
+
compactJson(activity.args)
|
|
51135
|
+
] })
|
|
51136
|
+
] }),
|
|
51137
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
|
|
51138
|
+
] });
|
|
51139
|
+
}
|
|
51140
|
+
if (activity.type === "tool_result") {
|
|
51141
|
+
const success = activity.success !== false;
|
|
51142
|
+
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
|
|
51143
|
+
/* @__PURE__ */ jsx(
|
|
51144
|
+
Icon,
|
|
51145
|
+
{
|
|
51146
|
+
name: success ? "check" : "x",
|
|
51147
|
+
size: "xs",
|
|
51148
|
+
className: `mt-0.5 flex-shrink-0 ${success ? "text-[var(--color-success)]" : "text-[var(--color-danger)]"}`
|
|
51149
|
+
}
|
|
51150
|
+
),
|
|
51151
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "flex-1 min-w-0 text-[11px] font-mono break-all whitespace-pre-wrap", children: [
|
|
51152
|
+
/* @__PURE__ */ jsxs(Typography, { as: "span", variant: "caption", color: "muted", className: "text-[11px] font-mono", children: [
|
|
51153
|
+
activity.tool,
|
|
51154
|
+
":",
|
|
51155
|
+
" "
|
|
51156
|
+
] }),
|
|
51157
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "text-[11px] font-mono", children: compactJson(activity.result) })
|
|
51158
|
+
] }),
|
|
51159
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
|
|
51160
|
+
] });
|
|
51161
|
+
}
|
|
51162
|
+
if (activity.type === "message") {
|
|
51163
|
+
const role = activity.role;
|
|
51164
|
+
const iconName = role === "user" ? "user" : role === "system" ? "info" : "sparkles";
|
|
51165
|
+
const roleColor = role === "user" ? "text-[var(--color-primary)]" : role === "system" ? "text-[var(--color-muted-foreground)]" : "text-[var(--color-foreground)]";
|
|
51166
|
+
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
|
|
51167
|
+
/* @__PURE__ */ jsx(Icon, { name: iconName, size: "xs", className: `mt-0.5 flex-shrink-0 ${roleColor}` }),
|
|
51168
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "flex-1 min-w-0 text-[11px] whitespace-pre-wrap break-words", children: activity.content }),
|
|
51169
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
|
|
51170
|
+
] });
|
|
51171
|
+
}
|
|
51172
|
+
if (activity.type === "error") {
|
|
51173
|
+
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
|
|
51174
|
+
/* @__PURE__ */ jsx(Icon, { name: "alert-triangle", size: "xs", className: "mt-0.5 flex-shrink-0 text-[var(--color-danger)]" }),
|
|
51175
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "flex-1 min-w-0 text-[11px] text-[var(--color-danger)] whitespace-pre-wrap break-words", children: activity.message }),
|
|
51176
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
|
|
51177
|
+
] });
|
|
51178
|
+
}
|
|
51179
|
+
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
|
|
51180
|
+
/* @__PURE__ */ jsx(Icon, { name: "file", size: "xs", className: "mt-0.5 flex-shrink-0 text-[var(--color-muted-foreground)]" }),
|
|
51181
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", className: "flex-1 min-w-0 text-[11px] font-mono break-all", children: [
|
|
51182
|
+
"[",
|
|
51183
|
+
activity.type,
|
|
51184
|
+
"] ",
|
|
51185
|
+
compactJson(activity)
|
|
51186
|
+
] }),
|
|
51187
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
|
|
51188
|
+
] });
|
|
51189
|
+
};
|
|
51190
|
+
InlineActivityStream = ({ activities, autoScroll = true, className }) => {
|
|
51191
|
+
const endRef = React85__default.useRef(null);
|
|
51192
|
+
React85__default.useEffect(() => {
|
|
51193
|
+
if (!autoScroll) return;
|
|
51194
|
+
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
51195
|
+
}, [activities.length, autoScroll]);
|
|
51196
|
+
return /* @__PURE__ */ jsxs(Box, { className, children: [
|
|
51197
|
+
activities.map((a, i) => /* @__PURE__ */ jsx(InlineActivityRow, { activity: a }, `${a.timestamp}-${i}`)),
|
|
51198
|
+
/* @__PURE__ */ jsx(Box, { ref: endRef })
|
|
51199
|
+
] });
|
|
51200
|
+
};
|
|
51201
|
+
CoordinatorCard = ({ snapshot, className }) => {
|
|
51202
|
+
const { t } = useTranslate();
|
|
51203
|
+
const { decision, plan, pendingQuestions } = snapshot;
|
|
51204
|
+
if (!decision && !plan && pendingQuestions.length === 0) return null;
|
|
51205
|
+
return /* @__PURE__ */ jsxs(
|
|
51206
|
+
Box,
|
|
51207
|
+
{
|
|
51208
|
+
className: `px-3 py-2 border-b border-[var(--color-border)] bg-[var(--color-muted)]/30 ${className ?? ""}`,
|
|
51209
|
+
children: [
|
|
51210
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center mb-2", children: [
|
|
51211
|
+
/* @__PURE__ */ jsx(Icon, { name: "compass", size: "xs" }),
|
|
51212
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold text-[11px]", children: t("subagentTrace.coordinator") })
|
|
51213
|
+
] }),
|
|
51214
|
+
decision && /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "mb-2", children: [
|
|
51215
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51216
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] uppercase tracking-wide", children: t("subagentTrace.organism") }),
|
|
51217
|
+
/* @__PURE__ */ jsx(Badge, { variant: "default", className: "text-[10px]", children: decision.organism }),
|
|
51218
|
+
decision.priorOrganism && decision.priorOrganism !== decision.organism && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: t("subagentTrace.wasOrganism", { organism: decision.priorOrganism }) })
|
|
51219
|
+
] }),
|
|
51220
|
+
decision.reason && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[11px] mt-0.5", children: decision.reason })
|
|
51221
|
+
] }),
|
|
51222
|
+
plan && plan.orbitals.length > 0 && /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "mb-2", children: [
|
|
51223
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] uppercase tracking-wide mb-0.5", children: plan.orbitals.length === 1 ? t("subagentTrace.planOrbital", { count: plan.orbitals.length }) : t("subagentTrace.planOrbitals", { count: plan.orbitals.length }) }),
|
|
51224
|
+
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap", children: plan.orbitals.map((o) => /* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: o }, o)) })
|
|
51225
|
+
] }),
|
|
51226
|
+
pendingQuestions.length > 0 && /* @__PURE__ */ jsxs(VStack, { gap: "none", children: [
|
|
51227
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] uppercase tracking-wide mb-0.5", children: pendingQuestions.length === 1 ? t("subagentTrace.pendingQuestion", { count: pendingQuestions.length }) : t("subagentTrace.pendingQuestions", { count: pendingQuestions.length }) }),
|
|
51228
|
+
pendingQuestions.map((q) => /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-start", children: [
|
|
51229
|
+
/* @__PURE__ */ jsx(Icon, { name: "help-circle", size: "xs", className: "mt-0.5 flex-shrink-0 text-[var(--color-warning)]" }),
|
|
51230
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-[11px] flex-1 min-w-0", children: [
|
|
51231
|
+
q.question,
|
|
51232
|
+
q.orbitalName && /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", className: "text-[10px] ml-1", children: [
|
|
51233
|
+
"(",
|
|
51234
|
+
q.orbitalName,
|
|
51235
|
+
")"
|
|
51236
|
+
] })
|
|
51237
|
+
] })
|
|
51238
|
+
] }, q.questionId))
|
|
51239
|
+
] })
|
|
51240
|
+
]
|
|
51241
|
+
}
|
|
51242
|
+
);
|
|
51243
|
+
};
|
|
51244
|
+
SubagentRow = ({ subagent }) => {
|
|
51245
|
+
const recent = lastMessage(subagent);
|
|
51246
|
+
return /* @__PURE__ */ jsxs(
|
|
51247
|
+
HStack,
|
|
51248
|
+
{
|
|
51249
|
+
gap: "sm",
|
|
51250
|
+
className: "items-start px-3 py-2 border-b border-[var(--color-border)]",
|
|
51251
|
+
children: [
|
|
51252
|
+
/* @__PURE__ */ jsx(Box, { className: "pt-0.5", children: /* @__PURE__ */ jsx(Icon, { name: statusIconName(subagent.status), size: "xs" }) }),
|
|
51253
|
+
/* @__PURE__ */ jsxs(VStack, { gap: "none", className: "flex-1 min-w-0", children: [
|
|
51254
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center", children: [
|
|
51255
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-medium truncate", children: subagent.name }),
|
|
51256
|
+
/* @__PURE__ */ jsx(Badge, { variant: "default", children: subagent.role })
|
|
51257
|
+
] }),
|
|
51258
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "truncate", children: recent ?? subagent.task })
|
|
51259
|
+
] })
|
|
51260
|
+
]
|
|
51261
|
+
}
|
|
51262
|
+
);
|
|
51263
|
+
};
|
|
51264
|
+
OrbitalGroup = ({ orbitalName, subagents }) => {
|
|
51265
|
+
const { t } = useTranslate();
|
|
51266
|
+
const runningCount = subagents.filter((s) => s.status === "running").length;
|
|
51267
|
+
const completeCount = subagents.filter((s) => s.status === "complete").length;
|
|
51268
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "border-b border-[var(--color-border)]", children: [
|
|
51269
|
+
/* @__PURE__ */ jsxs(
|
|
51270
|
+
HStack,
|
|
51271
|
+
{
|
|
51272
|
+
gap: "sm",
|
|
51273
|
+
className: "items-center px-3 py-2 bg-[var(--color-surface)] border-b border-[var(--color-border)]",
|
|
51274
|
+
children: [
|
|
51275
|
+
/* @__PURE__ */ jsx(Icon, { name: "circle", size: "xs" }),
|
|
51276
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold flex-1 truncate", children: orbitalName }),
|
|
51277
|
+
/* @__PURE__ */ jsx(Badge, { variant: "default", children: runningCount > 0 ? t("subagentTrace.countRunning", { count: runningCount }) : t("subagentTrace.countDone", { count: completeCount }) })
|
|
51278
|
+
]
|
|
51279
|
+
}
|
|
51280
|
+
),
|
|
51281
|
+
subagents.map((sub) => /* @__PURE__ */ jsx(SubagentRow, { subagent: sub }, sub.id))
|
|
51282
|
+
] });
|
|
51283
|
+
};
|
|
51284
|
+
SubagentRichCard = ({ subagent }) => {
|
|
51285
|
+
const { t } = useTranslate();
|
|
51286
|
+
const activities = React85__default.useMemo(
|
|
51287
|
+
() => subagentMessagesToActivities(subagent.messages),
|
|
51288
|
+
[subagent.messages]
|
|
51289
|
+
);
|
|
51290
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "border-b border-[var(--color-border)] p-3", children: [
|
|
51291
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center mb-2", children: [
|
|
51292
|
+
/* @__PURE__ */ jsx(
|
|
51293
|
+
Box,
|
|
51294
|
+
{
|
|
51295
|
+
style: {
|
|
51296
|
+
width: 8,
|
|
51297
|
+
height: 8,
|
|
51298
|
+
borderRadius: "50%",
|
|
51299
|
+
flexShrink: 0,
|
|
51300
|
+
backgroundColor: subagent.status === "complete" ? "var(--color-success)" : subagent.status === "error" ? "var(--color-error)" : "var(--color-primary)",
|
|
51301
|
+
...subagent.status === "running" ? { animation: "pulse 1.5s infinite" } : {}
|
|
51302
|
+
}
|
|
51303
|
+
}
|
|
51304
|
+
),
|
|
51305
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold flex-1 truncate", children: subagent.name }),
|
|
51306
|
+
/* @__PURE__ */ jsx(Badge, { variant: subagent.role === "deterministic" ? "default" : subagent.role === "llm" ? "info" : "warning", children: subagent.role }),
|
|
51307
|
+
subagent.durationMs !== void 0 && subagent.durationMs > 0 && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: subagent.durationMs < 1e3 ? `${subagent.durationMs}ms` : `${(subagent.durationMs / 1e3).toFixed(1)}s` })
|
|
51308
|
+
] }),
|
|
51309
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "mb-2", children: subagent.task }),
|
|
51310
|
+
activities.length > 0 ? /* @__PURE__ */ jsx(Box, { className: "max-h-64 overflow-y-auto border-t border-[var(--color-border)]", children: /* @__PURE__ */ jsx(InlineActivityStream, { activities, autoScroll: true }) }) : /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "italic text-[10px]", children: subagent.status === "complete" ? t("subagentTrace.noConversationLog") : t("subagentTrace.waitingForProcessData") })
|
|
51311
|
+
] });
|
|
51312
|
+
};
|
|
51313
|
+
roleBadgeVariant = {
|
|
51314
|
+
system: "neutral",
|
|
51315
|
+
user: "info",
|
|
51316
|
+
assistant: "default",
|
|
51317
|
+
tool: "warning"
|
|
51318
|
+
};
|
|
51319
|
+
ChatMessageRow = ({ message, index }) => {
|
|
51320
|
+
const { t } = useTranslate();
|
|
51321
|
+
const { role, content, toolCalls, reasoningContent, toolCallId, toolName } = message;
|
|
51322
|
+
if (role === "tool") {
|
|
51323
|
+
const pretty = tryPrettyJson(content);
|
|
51324
|
+
const title = `${toolName ?? "tool"} \u2192${toolCallId ? ` ${toolCallId.slice(0, 8)}` : ""}`;
|
|
51325
|
+
const body = pretty !== null ? /* @__PURE__ */ jsx(CodeBlock, { code: pretty, language: "json", maxHeight: "24rem" }) : /* @__PURE__ */ jsx(Typography, { variant: "body", className: "whitespace-pre-wrap font-mono text-[11px]", children: content });
|
|
51326
|
+
const items = [{ id: `tool-${index}`, title, content: body }];
|
|
51327
|
+
return /* @__PURE__ */ jsx(Box, { className: "px-3 py-2 border-b border-[var(--color-border)]", children: /* @__PURE__ */ jsx(Accordion, { items }) });
|
|
51328
|
+
}
|
|
51329
|
+
const hasReasoning = typeof reasoningContent === "string" && reasoningContent.length > 0;
|
|
51330
|
+
const hasToolCalls = Array.isArray(toolCalls) && toolCalls.length > 0;
|
|
51331
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "px-3 py-2 border-b border-[var(--color-border)]", children: [
|
|
51332
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51333
|
+
/* @__PURE__ */ jsx(Badge, { variant: roleBadgeVariant[role], className: "text-[10px] uppercase", children: role }),
|
|
51334
|
+
hasReasoning && /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: [
|
|
51335
|
+
"\xB7 ",
|
|
51336
|
+
t("subagentTrace.thinking")
|
|
51337
|
+
] }),
|
|
51338
|
+
hasToolCalls && /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: [
|
|
51339
|
+
"\xB7 ",
|
|
51340
|
+
toolCalls.length === 1 ? t("subagentTrace.toolCallCount", { count: toolCalls.length }) : t("subagentTrace.toolCallCountPlural", { count: toolCalls.length })
|
|
51341
|
+
] })
|
|
51342
|
+
] }),
|
|
51343
|
+
hasReasoning && /* @__PURE__ */ jsx(Accordion, { items: [{
|
|
51344
|
+
id: `reasoning-${index}`,
|
|
51345
|
+
title: t("subagentTrace.reasoning"),
|
|
51346
|
+
content: /* @__PURE__ */ jsx(MarkdownContent, { content: reasoningContent })
|
|
51347
|
+
}] }),
|
|
51348
|
+
content.length > 0 && /* @__PURE__ */ jsx(MarkdownContent, { content }),
|
|
51349
|
+
hasToolCalls && /* @__PURE__ */ jsx(
|
|
51350
|
+
Accordion,
|
|
51351
|
+
{
|
|
51352
|
+
multiple: true,
|
|
51353
|
+
items: toolCalls.map((tc, i) => ({
|
|
51354
|
+
id: `tc-${index}-${i}`,
|
|
51355
|
+
title: `${tc.name}(${summarizeArgs(tc.args)})`,
|
|
51356
|
+
content: /* @__PURE__ */ jsx(CodeBlock, { code: JSON.stringify(tc.args, null, 2), language: "json", maxHeight: "24rem" })
|
|
51357
|
+
}))
|
|
51358
|
+
}
|
|
51359
|
+
)
|
|
51360
|
+
] });
|
|
51361
|
+
};
|
|
51362
|
+
CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
|
|
51363
|
+
const endRef = React85__default.useRef(null);
|
|
51364
|
+
React85__default.useEffect(() => {
|
|
51365
|
+
if (!autoScroll) return;
|
|
51366
|
+
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
51367
|
+
}, [messages.length, autoScroll]);
|
|
51368
|
+
return /* @__PURE__ */ jsxs(Box, { className, children: [
|
|
51369
|
+
messages.map((m, i) => /* @__PURE__ */ jsx(ChatMessageRow, { message: m, index: i }, `msg-${i}`)),
|
|
51370
|
+
/* @__PURE__ */ jsx(Box, { ref: endRef })
|
|
51371
|
+
] });
|
|
51372
|
+
};
|
|
51373
|
+
SubagentTracePanel = ({
|
|
51374
|
+
subagents,
|
|
51375
|
+
focusedOrbital,
|
|
51376
|
+
disclosureLevel,
|
|
51377
|
+
open,
|
|
51378
|
+
onClose,
|
|
51379
|
+
className,
|
|
51380
|
+
mode = "overlay",
|
|
51381
|
+
coordinatorActivities,
|
|
51382
|
+
coordinatorMessages
|
|
51383
|
+
}) => {
|
|
51384
|
+
const { t } = useTranslate();
|
|
51385
|
+
const [selectedItem, setSelectedItem] = useState(null);
|
|
51386
|
+
const densityLabel = (rich) => rich ? t("subagentTrace.densityRich") : t("subagentTrace.densityCompact");
|
|
51387
|
+
if (mode === "overlay" && !open) return null;
|
|
51388
|
+
const isTabMode = mode === "tab";
|
|
51389
|
+
const isRichMode = isTabMode || disclosureLevel >= 3;
|
|
51390
|
+
if (isTabMode) {
|
|
51391
|
+
const timelineItems = buildTimelineItems(coordinatorMessages, coordinatorActivities, subagents);
|
|
51392
|
+
const hasData = timelineItems.length > 0;
|
|
51393
|
+
return /* @__PURE__ */ jsxs(Box, { className: `h-full w-full bg-[var(--color-card)] overflow-hidden flex flex-col ${className ?? ""}`, children: [
|
|
51394
|
+
/* @__PURE__ */ jsxs(
|
|
51395
|
+
HStack,
|
|
51396
|
+
{
|
|
51397
|
+
gap: "sm",
|
|
51398
|
+
className: "items-center px-3 py-2 border-b border-[var(--color-border)]",
|
|
51399
|
+
children: [
|
|
51400
|
+
/* @__PURE__ */ jsx(Icon, { name: "activity", size: "sm" }),
|
|
51401
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold flex-1", children: t("subagentTrace.trace") }),
|
|
51402
|
+
onClose && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" }) })
|
|
51403
|
+
]
|
|
51404
|
+
}
|
|
51405
|
+
),
|
|
51406
|
+
!hasData && /* @__PURE__ */ jsx(Box, { className: "flex-1 flex items-center justify-center px-4", children: /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "muted", className: "text-center", children: t("subagentTrace.noAgentActivity") }) }),
|
|
51407
|
+
hasData && /* @__PURE__ */ jsx(Box, { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx(VStack, { gap: "none", children: timelineItems.map((item, i) => {
|
|
51408
|
+
const { name: iconName, color: iconColor } = timelineItemIcon(item);
|
|
51409
|
+
const isLast = i === timelineItems.length - 1;
|
|
51410
|
+
return /* @__PURE__ */ jsxs(
|
|
51411
|
+
Box,
|
|
51412
|
+
{
|
|
51413
|
+
className: "flex items-start px-3 py-2 border-b border-[var(--color-border)] hover:bg-[var(--color-muted)]/30 transition-colors duration-fast cursor-pointer",
|
|
51414
|
+
onClick: () => setSelectedItem(item),
|
|
51415
|
+
children: [
|
|
51416
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex flex-col items-center mr-3 mt-0.5", style: { width: 20 }, children: [
|
|
51417
|
+
/* @__PURE__ */ jsx(
|
|
51418
|
+
Box,
|
|
51419
|
+
{
|
|
51420
|
+
className: "rounded-full flex-shrink-0",
|
|
51421
|
+
style: {
|
|
51422
|
+
width: 8,
|
|
51423
|
+
height: 8,
|
|
51424
|
+
backgroundColor: "var(--color-primary)"
|
|
51425
|
+
}
|
|
51426
|
+
}
|
|
51427
|
+
),
|
|
51428
|
+
!isLast && /* @__PURE__ */ jsx(
|
|
51429
|
+
Box,
|
|
51430
|
+
{
|
|
51431
|
+
className: "flex-1",
|
|
51432
|
+
style: {
|
|
51433
|
+
width: 2,
|
|
51434
|
+
backgroundColor: "var(--color-border)",
|
|
51435
|
+
marginTop: 4,
|
|
51436
|
+
minHeight: 24
|
|
51437
|
+
}
|
|
51438
|
+
}
|
|
51439
|
+
)
|
|
51440
|
+
] }),
|
|
51441
|
+
/* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "flex-1 min-w-0", children: [
|
|
51442
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51443
|
+
/* @__PURE__ */ jsx(Icon, { name: iconName, size: "xs", className: `flex-shrink-0 ${iconColor}` }),
|
|
51444
|
+
timelineItemTimeLabel(item) && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: timelineItemTimeLabel(item) }),
|
|
51445
|
+
/* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: timelineItemLabel(item) })
|
|
51446
|
+
] }),
|
|
51447
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-start", children: [
|
|
51448
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", color: "muted", className: "flex-1 min-w-0 line-clamp-2", children: timelineItemPreview(item) }),
|
|
51449
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", className: "flex-shrink-0 mt-0", onClick: (e) => {
|
|
51450
|
+
e.stopPropagation();
|
|
51451
|
+
setSelectedItem(item);
|
|
51452
|
+
}, children: /* @__PURE__ */ jsx(Icon, { name: "maximize-2", size: "xs" }) })
|
|
51453
|
+
] })
|
|
51454
|
+
] })
|
|
51455
|
+
]
|
|
51456
|
+
},
|
|
51457
|
+
`${item.source}-${i}`
|
|
51458
|
+
);
|
|
51459
|
+
}) }) }),
|
|
51460
|
+
/* @__PURE__ */ jsx(
|
|
51461
|
+
Modal,
|
|
51462
|
+
{
|
|
51463
|
+
isOpen: selectedItem !== null,
|
|
51464
|
+
onClose: () => setSelectedItem(null),
|
|
51465
|
+
title: selectedItem ? `${timelineItemLabel(selectedItem)}${timelineItemTimeLabel(selectedItem) ? ` \xB7 ${timelineItemTimeLabel(selectedItem)}` : ""}` : "",
|
|
51466
|
+
size: "lg",
|
|
51467
|
+
children: selectedItem && /* @__PURE__ */ jsx(TraceDetailContent, { item: selectedItem })
|
|
51468
|
+
}
|
|
51469
|
+
)
|
|
51470
|
+
] });
|
|
51471
|
+
}
|
|
51472
|
+
const filtered = focusedOrbital ? subagents.filter((s) => s.orbitalName === focusedOrbital) : subagents;
|
|
51473
|
+
const wrapperClass = isRichMode ? `absolute inset-x-3 bottom-3 sm:inset-x-auto sm:top-3 sm:right-3 sm:bottom-3 w-full sm:w-[28rem] max-w-[calc(100vw-1.5rem)] max-h-[60vh] sm:max-h-none bg-[var(--color-card)] border border-[var(--color-border)] rounded-md shadow-lg overflow-hidden flex flex-col ${className ?? ""}` : `absolute inset-x-3 bottom-3 sm:inset-x-auto sm:top-3 sm:right-3 sm:bottom-3 w-full sm:w-80 max-w-[calc(100vw-1.5rem)] max-h-[60vh] sm:max-h-none bg-[var(--color-card)] border border-[var(--color-border)] rounded-md shadow-lg overflow-hidden flex flex-col ${className ?? ""}`;
|
|
51474
|
+
const wrapperStyle = { zIndex: 20 };
|
|
51475
|
+
const hasCoordinatorData = coordinatorMessages && coordinatorMessages.length > 0 || coordinatorActivities && coordinatorActivities.length > 0;
|
|
51476
|
+
if (filtered.length === 0 && !hasCoordinatorData) {
|
|
51477
|
+
return /* @__PURE__ */ jsxs(Box, { className: wrapperClass, style: wrapperStyle, children: [
|
|
51478
|
+
/* @__PURE__ */ jsxs(
|
|
51479
|
+
HStack,
|
|
51480
|
+
{
|
|
51481
|
+
gap: "sm",
|
|
51482
|
+
className: "items-center px-3 py-2 border-b border-[var(--color-border)]",
|
|
51483
|
+
children: [
|
|
51484
|
+
/* @__PURE__ */ jsx(Icon, { name: "activity", size: "sm" }),
|
|
51485
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold flex-1", children: t("subagentTrace.subagents") }),
|
|
51486
|
+
onClose && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" }) })
|
|
51487
|
+
]
|
|
51488
|
+
}
|
|
51489
|
+
),
|
|
51490
|
+
/* @__PURE__ */ jsx(Box, { className: "flex-1 flex items-center justify-center px-4", children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-center", children: focusedOrbital ? t("subagentTrace.noSubagentsForOrbital", { orbital: focusedOrbital }) : t("subagentTrace.noSubagentsActive") }) })
|
|
51491
|
+
] });
|
|
51492
|
+
}
|
|
51493
|
+
if (focusedOrbital) {
|
|
51494
|
+
return /* @__PURE__ */ jsxs(Box, { className: wrapperClass, style: wrapperStyle, children: [
|
|
51495
|
+
/* @__PURE__ */ jsxs(
|
|
51496
|
+
HStack,
|
|
51497
|
+
{
|
|
51498
|
+
gap: "sm",
|
|
51499
|
+
className: "items-center px-3 py-2 border-b border-[var(--color-border)]",
|
|
51500
|
+
children: [
|
|
51501
|
+
/* @__PURE__ */ jsx(Icon, { name: "activity", size: "sm" }),
|
|
51502
|
+
/* @__PURE__ */ jsxs(VStack, { gap: "none", className: "flex-1 min-w-0", children: [
|
|
51503
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold truncate", children: focusedOrbital }),
|
|
51504
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", children: [
|
|
51505
|
+
filtered.length === 1 ? t("subagentTrace.subagentCount", { count: filtered.length }) : t("subagentTrace.subagentCountPlural", { count: filtered.length }),
|
|
51506
|
+
" \xB7 ",
|
|
51507
|
+
densityLabel(isRichMode)
|
|
51508
|
+
] })
|
|
51509
|
+
] }),
|
|
51510
|
+
onClose && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" }) })
|
|
51511
|
+
]
|
|
51512
|
+
}
|
|
51513
|
+
),
|
|
51514
|
+
/* @__PURE__ */ jsx(Box, { className: "flex-1 overflow-y-auto", children: filtered.map((sub) => isRichMode ? /* @__PURE__ */ jsx(SubagentRichCard, { subagent: sub }, sub.id) : /* @__PURE__ */ jsx(SubagentRow, { subagent: sub }, sub.id)) })
|
|
51515
|
+
] });
|
|
51516
|
+
}
|
|
51517
|
+
const grouped = groupByOrbital(filtered);
|
|
51518
|
+
const coordinatorSnapshot = pluckCoordinatorState(coordinatorActivities ?? []);
|
|
51519
|
+
return /* @__PURE__ */ jsxs(Box, { className: wrapperClass, style: wrapperStyle, children: [
|
|
51520
|
+
/* @__PURE__ */ jsxs(
|
|
51521
|
+
HStack,
|
|
51522
|
+
{
|
|
51523
|
+
gap: "sm",
|
|
51524
|
+
className: "items-center px-3 py-2 border-b border-[var(--color-border)]",
|
|
51525
|
+
children: [
|
|
51526
|
+
/* @__PURE__ */ jsx(Icon, { name: "activity", size: "sm" }),
|
|
51527
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "font-semibold flex-1", children: [
|
|
51528
|
+
t("subagentTrace.subagentsWithCount", { count: filtered.length }),
|
|
51529
|
+
" \xB7 ",
|
|
51530
|
+
densityLabel(isRichMode)
|
|
51531
|
+
] }),
|
|
51532
|
+
onClose && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" }) })
|
|
51533
|
+
]
|
|
51534
|
+
}
|
|
51535
|
+
),
|
|
51536
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex-1 overflow-y-auto", children: [
|
|
51537
|
+
!focusedOrbital && isRichMode && /* @__PURE__ */ jsx(CoordinatorCard, { snapshot: coordinatorSnapshot }),
|
|
51538
|
+
coordinatorMessages && coordinatorMessages.length > 0 ? /* @__PURE__ */ jsxs(Box, { className: "border-b border-[var(--color-border)]", children: [
|
|
51539
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center px-3 py-1.5 bg-[var(--color-card)] border-b border-[var(--color-border)]", children: [
|
|
51540
|
+
/* @__PURE__ */ jsx(Box, { style: { width: 6, height: 6, borderRadius: "50%", backgroundColor: "var(--color-primary)", flexShrink: 0 } }),
|
|
51541
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold text-[11px]", children: t("subagentTrace.coordinator") }),
|
|
51542
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: t("subagentTrace.messagesCount", { count: coordinatorMessages.length }) })
|
|
51543
|
+
] }),
|
|
51544
|
+
/* @__PURE__ */ jsx(Box, { className: "max-h-[36rem] overflow-y-auto", children: /* @__PURE__ */ jsx(CoordinatorConversation, { messages: coordinatorMessages, autoScroll: true }) })
|
|
51545
|
+
] }) : coordinatorActivities && coordinatorActivities.length > 0 && (() => {
|
|
51546
|
+
const filteredCoordinator = coordinatorActivities;
|
|
51547
|
+
if (filteredCoordinator.length === 0) return null;
|
|
51548
|
+
return /* @__PURE__ */ jsxs(Box, { className: "border-b border-[var(--color-border)]", children: [
|
|
51549
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center px-3 py-1.5 bg-[var(--color-card)] border-b border-[var(--color-border)]", children: [
|
|
51550
|
+
/* @__PURE__ */ jsx(Box, { style: { width: 6, height: 6, borderRadius: "50%", backgroundColor: "var(--color-primary)", flexShrink: 0 } }),
|
|
51551
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold text-[11px]", children: t("subagentTrace.coordinator") }),
|
|
51552
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: t("subagentTrace.eventsCount", { count: filteredCoordinator.length }) })
|
|
51553
|
+
] }),
|
|
51554
|
+
/* @__PURE__ */ jsx(Box, { className: "max-h-60 overflow-y-auto", children: /* @__PURE__ */ jsx(
|
|
51555
|
+
InlineActivityStream,
|
|
51556
|
+
{
|
|
51557
|
+
activities: coordinatorToActivityItems(filteredCoordinator),
|
|
51558
|
+
autoScroll: true
|
|
51559
|
+
}
|
|
51560
|
+
) })
|
|
51561
|
+
] });
|
|
51562
|
+
})(),
|
|
51563
|
+
isRichMode ? filtered.map((sub) => /* @__PURE__ */ jsx(SubagentRichCard, { subagent: sub }, sub.id)) : Array.from(grouped.entries()).map(([orbitalName, subs]) => /* @__PURE__ */ jsx(
|
|
51564
|
+
OrbitalGroup,
|
|
51565
|
+
{
|
|
51566
|
+
orbitalName,
|
|
51567
|
+
subagents: subs
|
|
51568
|
+
},
|
|
51569
|
+
orbitalName
|
|
51570
|
+
))
|
|
51571
|
+
] })
|
|
51572
|
+
] });
|
|
51573
|
+
};
|
|
51574
|
+
SubagentTracePanel.displayName = "SubagentTracePanel";
|
|
51575
|
+
}
|
|
51576
|
+
});
|
|
49966
51577
|
var TabbedContainer;
|
|
49967
51578
|
var init_TabbedContainer = __esm({
|
|
49968
51579
|
"components/core/organisms/layout/TabbedContainer.tsx"() {
|
|
@@ -50077,6 +51688,48 @@ var init_TabbedContainer = __esm({
|
|
|
50077
51688
|
TabbedContainer.displayName = "TabbedContainer";
|
|
50078
51689
|
}
|
|
50079
51690
|
});
|
|
51691
|
+
function TanksBoard({
|
|
51692
|
+
tiles,
|
|
51693
|
+
units,
|
|
51694
|
+
features,
|
|
51695
|
+
assetManifest,
|
|
51696
|
+
assetBaseUrl,
|
|
51697
|
+
scale = 0.45,
|
|
51698
|
+
showMinimap = true,
|
|
51699
|
+
enableCamera = true,
|
|
51700
|
+
tileClickEvent,
|
|
51701
|
+
unitClickEvent,
|
|
51702
|
+
isLoading,
|
|
51703
|
+
error,
|
|
51704
|
+
className
|
|
51705
|
+
}) {
|
|
51706
|
+
return /* @__PURE__ */ jsx("div", { className: cn("tanks-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
51707
|
+
IsometricCanvas_default,
|
|
51708
|
+
{
|
|
51709
|
+
tileLayout: "flat",
|
|
51710
|
+
tiles,
|
|
51711
|
+
units,
|
|
51712
|
+
features,
|
|
51713
|
+
assetManifest,
|
|
51714
|
+
assetBaseUrl,
|
|
51715
|
+
scale,
|
|
51716
|
+
showMinimap,
|
|
51717
|
+
enableCamera,
|
|
51718
|
+
tileClickEvent,
|
|
51719
|
+
unitClickEvent,
|
|
51720
|
+
isLoading,
|
|
51721
|
+
error
|
|
51722
|
+
}
|
|
51723
|
+
) });
|
|
51724
|
+
}
|
|
51725
|
+
var init_TanksBoard = __esm({
|
|
51726
|
+
"components/game/organisms/TanksBoard.tsx"() {
|
|
51727
|
+
"use client";
|
|
51728
|
+
init_cn();
|
|
51729
|
+
init_IsometricCanvas();
|
|
51730
|
+
TanksBoard.displayName = "TanksBoard";
|
|
51731
|
+
}
|
|
51732
|
+
});
|
|
50080
51733
|
var TeamOrganism;
|
|
50081
51734
|
var init_TeamOrganism = __esm({
|
|
50082
51735
|
"components/marketing/organisms/TeamOrganism.tsx"() {
|
|
@@ -50180,7 +51833,7 @@ var init_Timeline = __esm({
|
|
|
50180
51833
|
}) => {
|
|
50181
51834
|
const { t } = useTranslate();
|
|
50182
51835
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
50183
|
-
const items =
|
|
51836
|
+
const items = React85__default.useMemo(() => {
|
|
50184
51837
|
if (propItems) return propItems;
|
|
50185
51838
|
if (entityData.length === 0) return [];
|
|
50186
51839
|
return entityData.map((record, idx) => {
|
|
@@ -50287,7 +51940,7 @@ var init_Timeline = __esm({
|
|
|
50287
51940
|
}
|
|
50288
51941
|
});
|
|
50289
51942
|
function extractToastProps(children) {
|
|
50290
|
-
if (!
|
|
51943
|
+
if (!React85__default.isValidElement(children)) {
|
|
50291
51944
|
if (typeof children === "string") {
|
|
50292
51945
|
return { message: children };
|
|
50293
51946
|
}
|
|
@@ -50325,7 +51978,7 @@ var init_ToastSlot = __esm({
|
|
|
50325
51978
|
eventBus.emit("UI:CLOSE");
|
|
50326
51979
|
};
|
|
50327
51980
|
if (!isVisible) return null;
|
|
50328
|
-
const isCustomContent =
|
|
51981
|
+
const isCustomContent = React85__default.isValidElement(children) && !message;
|
|
50329
51982
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
50330
51983
|
Toast,
|
|
50331
51984
|
{
|
|
@@ -51941,7 +53594,7 @@ var init_WorldMapTemplate = __esm({
|
|
|
51941
53594
|
}
|
|
51942
53595
|
});
|
|
51943
53596
|
function lazyThree(name, loader) {
|
|
51944
|
-
const Lazy =
|
|
53597
|
+
const Lazy = React85__default.lazy(
|
|
51945
53598
|
() => loader().then((m) => {
|
|
51946
53599
|
const Resolved = m[name];
|
|
51947
53600
|
if (!Resolved) {
|
|
@@ -51953,13 +53606,13 @@ function lazyThree(name, loader) {
|
|
|
51953
53606
|
})
|
|
51954
53607
|
);
|
|
51955
53608
|
function ThreeWrapper(props) {
|
|
51956
|
-
return
|
|
53609
|
+
return React85__default.createElement(
|
|
51957
53610
|
ThreeBoundary,
|
|
51958
53611
|
{ name },
|
|
51959
|
-
|
|
51960
|
-
|
|
53612
|
+
React85__default.createElement(
|
|
53613
|
+
React85__default.Suspense,
|
|
51961
53614
|
{ fallback: null },
|
|
51962
|
-
|
|
53615
|
+
React85__default.createElement(Lazy, props)
|
|
51963
53616
|
)
|
|
51964
53617
|
);
|
|
51965
53618
|
}
|
|
@@ -51989,6 +53642,7 @@ var init_component_registry_generated = __esm({
|
|
|
51989
53642
|
init_BattleTemplate();
|
|
51990
53643
|
init_BehaviorView();
|
|
51991
53644
|
init_BloomQuizBlock();
|
|
53645
|
+
init_BoardgameBoard();
|
|
51992
53646
|
init_BookChapterView();
|
|
51993
53647
|
init_BookCoverPage();
|
|
51994
53648
|
init_BookNavBar();
|
|
@@ -52015,6 +53669,7 @@ var init_component_registry_generated = __esm({
|
|
|
52015
53669
|
init_Center();
|
|
52016
53670
|
init_Chart();
|
|
52017
53671
|
init_ChartLegend();
|
|
53672
|
+
init_ChatBar();
|
|
52018
53673
|
init_Checkbox();
|
|
52019
53674
|
init_ChoiceButton();
|
|
52020
53675
|
init_CityBuilderBoard();
|
|
@@ -52072,6 +53727,7 @@ var init_component_registry_generated = __esm({
|
|
|
52072
53727
|
init_FileTree();
|
|
52073
53728
|
init_FilterGroup();
|
|
52074
53729
|
init_FilterPill();
|
|
53730
|
+
init_FishingBoard();
|
|
52075
53731
|
init_Flex();
|
|
52076
53732
|
init_FlipCard();
|
|
52077
53733
|
init_FlipContainer();
|
|
@@ -52101,6 +53757,7 @@ var init_component_registry_generated = __esm({
|
|
|
52101
53757
|
init_HeroOrganism();
|
|
52102
53758
|
init_HeroSection();
|
|
52103
53759
|
init_HexStrategyBoard();
|
|
53760
|
+
init_HolidayRunnerBoard();
|
|
52104
53761
|
init_Icon();
|
|
52105
53762
|
init_InfiniteScrollSentinel();
|
|
52106
53763
|
init_Input();
|
|
@@ -52123,11 +53780,13 @@ var init_component_registry_generated = __esm({
|
|
|
52123
53780
|
init_MarketingFooter();
|
|
52124
53781
|
init_MasterDetail();
|
|
52125
53782
|
init_MasterDetailLayout();
|
|
53783
|
+
init_MatchPuzzleBoard();
|
|
52126
53784
|
init_MatrixQuestion();
|
|
52127
53785
|
init_MediaGallery();
|
|
52128
53786
|
init_Menu();
|
|
52129
53787
|
init_Meter();
|
|
52130
53788
|
init_MiniMap();
|
|
53789
|
+
init_MinigolfBoard();
|
|
52131
53790
|
init_Modal();
|
|
52132
53791
|
init_ModalSlot();
|
|
52133
53792
|
init_ModuleCard();
|
|
@@ -52140,6 +53799,8 @@ var init_component_registry_generated = __esm({
|
|
|
52140
53799
|
init_PageHeader();
|
|
52141
53800
|
init_Pagination();
|
|
52142
53801
|
init_PatternTile();
|
|
53802
|
+
init_PinballBoard();
|
|
53803
|
+
init_PirateBoard();
|
|
52143
53804
|
init_PlatformerBoard();
|
|
52144
53805
|
init_PlatformerCanvas();
|
|
52145
53806
|
init_PlatformerTemplate();
|
|
@@ -52157,6 +53818,7 @@ var init_component_registry_generated = __esm({
|
|
|
52157
53818
|
init_QrScanner();
|
|
52158
53819
|
init_QuestTracker();
|
|
52159
53820
|
init_QuizBlock();
|
|
53821
|
+
init_RacingBoard();
|
|
52160
53822
|
init_Radio();
|
|
52161
53823
|
init_RangeSlider();
|
|
52162
53824
|
init_ReflectionBlock();
|
|
@@ -52190,12 +53852,16 @@ var init_component_registry_generated = __esm({
|
|
|
52190
53852
|
init_SimulatorBoard();
|
|
52191
53853
|
init_Skeleton();
|
|
52192
53854
|
init_SocialProof();
|
|
53855
|
+
init_SokobanBoard();
|
|
52193
53856
|
init_SortableList();
|
|
53857
|
+
init_SpaceShmupBoard();
|
|
53858
|
+
init_SpaceStationBoard();
|
|
52194
53859
|
init_Sparkline();
|
|
52195
53860
|
init_Spinner();
|
|
52196
53861
|
init_Split();
|
|
52197
53862
|
init_SplitPane();
|
|
52198
53863
|
init_SplitSection();
|
|
53864
|
+
init_SportsBoard();
|
|
52199
53865
|
init_Sprite();
|
|
52200
53866
|
init_StarRating();
|
|
52201
53867
|
init_StatBadge();
|
|
@@ -52210,6 +53876,7 @@ var init_component_registry_generated = __esm({
|
|
|
52210
53876
|
init_StatusEffect();
|
|
52211
53877
|
init_StepFlow();
|
|
52212
53878
|
init_StepFlowOrganism();
|
|
53879
|
+
init_SubagentTracePanel();
|
|
52213
53880
|
init_SvgBranch();
|
|
52214
53881
|
init_SvgConnection();
|
|
52215
53882
|
init_SvgFlow();
|
|
@@ -52229,6 +53896,7 @@ var init_component_registry_generated = __esm({
|
|
|
52229
53896
|
init_Tabs();
|
|
52230
53897
|
init_TagCloud();
|
|
52231
53898
|
init_TagInput();
|
|
53899
|
+
init_TanksBoard();
|
|
52232
53900
|
init_TeamCard();
|
|
52233
53901
|
init_TeamOrganism();
|
|
52234
53902
|
init_TextHighlight();
|
|
@@ -52267,7 +53935,7 @@ var init_component_registry_generated = __esm({
|
|
|
52267
53935
|
init_WorldMapBoard();
|
|
52268
53936
|
init_WorldMapTemplate();
|
|
52269
53937
|
init_XPBar();
|
|
52270
|
-
ThreeBoundary = class extends
|
|
53938
|
+
ThreeBoundary = class extends React85__default.Component {
|
|
52271
53939
|
constructor() {
|
|
52272
53940
|
super(...arguments);
|
|
52273
53941
|
__publicField(this, "state", { failed: false });
|
|
@@ -52277,7 +53945,7 @@ var init_component_registry_generated = __esm({
|
|
|
52277
53945
|
}
|
|
52278
53946
|
render() {
|
|
52279
53947
|
if (this.state.failed) {
|
|
52280
|
-
return
|
|
53948
|
+
return React85__default.createElement(
|
|
52281
53949
|
"div",
|
|
52282
53950
|
{
|
|
52283
53951
|
"data-testid": "three-unavailable",
|
|
@@ -52316,6 +53984,7 @@ var init_component_registry_generated = __esm({
|
|
|
52316
53984
|
"BattleTemplate": BattleTemplate,
|
|
52317
53985
|
"BehaviorView": BehaviorView,
|
|
52318
53986
|
"BloomQuizBlock": BloomQuizBlock,
|
|
53987
|
+
"BoardgameBoard": BoardgameBoard,
|
|
52319
53988
|
"BookChapterView": BookChapterView,
|
|
52320
53989
|
"BookCoverPage": BookCoverPage,
|
|
52321
53990
|
"BookNavBar": BookNavBar,
|
|
@@ -52345,6 +54014,7 @@ var init_component_registry_generated = __esm({
|
|
|
52345
54014
|
"Center": Center,
|
|
52346
54015
|
"Chart": Chart,
|
|
52347
54016
|
"ChartLegend": ChartLegend,
|
|
54017
|
+
"ChatBar": ChatBar,
|
|
52348
54018
|
"Checkbox": Checkbox,
|
|
52349
54019
|
"ChoiceButton": ChoiceButton,
|
|
52350
54020
|
"CityBuilderBoard": CityBuilderBoard,
|
|
@@ -52405,6 +54075,7 @@ var init_component_registry_generated = __esm({
|
|
|
52405
54075
|
"FileTree": FileTree,
|
|
52406
54076
|
"FilterGroup": FilterGroup,
|
|
52407
54077
|
"FilterPill": FilterPill,
|
|
54078
|
+
"FishingBoard": FishingBoard,
|
|
52408
54079
|
"Flex": Flex,
|
|
52409
54080
|
"FlipCard": FlipCard,
|
|
52410
54081
|
"FlipContainer": FlipContainer,
|
|
@@ -52438,6 +54109,7 @@ var init_component_registry_generated = __esm({
|
|
|
52438
54109
|
"HeroOrganism": HeroOrganism,
|
|
52439
54110
|
"HeroSection": HeroSection,
|
|
52440
54111
|
"HexStrategyBoard": HexStrategyBoard,
|
|
54112
|
+
"HolidayRunnerBoard": HolidayRunnerBoard,
|
|
52441
54113
|
"Icon": Icon,
|
|
52442
54114
|
"InfiniteScrollSentinel": InfiniteScrollSentinel,
|
|
52443
54115
|
"Input": Input,
|
|
@@ -52462,11 +54134,13 @@ var init_component_registry_generated = __esm({
|
|
|
52462
54134
|
"MarketingFooter": MarketingFooter,
|
|
52463
54135
|
"MasterDetail": MasterDetail,
|
|
52464
54136
|
"MasterDetailLayout": MasterDetailLayout,
|
|
54137
|
+
"MatchPuzzleBoard": MatchPuzzleBoard,
|
|
52465
54138
|
"MatrixQuestion": MatrixQuestion,
|
|
52466
54139
|
"MediaGallery": MediaGallery,
|
|
52467
54140
|
"Menu": Menu,
|
|
52468
54141
|
"Meter": Meter,
|
|
52469
54142
|
"MiniMap": MiniMap,
|
|
54143
|
+
"MinigolfBoard": MinigolfBoard,
|
|
52470
54144
|
"Modal": Modal,
|
|
52471
54145
|
"ModalSlot": ModalSlot,
|
|
52472
54146
|
"ModuleCard": ModuleCard,
|
|
@@ -52479,6 +54153,8 @@ var init_component_registry_generated = __esm({
|
|
|
52479
54153
|
"PageHeader": PageHeader,
|
|
52480
54154
|
"Pagination": Pagination,
|
|
52481
54155
|
"PatternTile": PatternTile,
|
|
54156
|
+
"PinballBoard": PinballBoard,
|
|
54157
|
+
"PirateBoard": PirateBoard,
|
|
52482
54158
|
"PlatformerBoard": PlatformerBoard,
|
|
52483
54159
|
"PlatformerCanvas": PlatformerCanvas,
|
|
52484
54160
|
"PlatformerTemplate": PlatformerTemplate,
|
|
@@ -52496,6 +54172,7 @@ var init_component_registry_generated = __esm({
|
|
|
52496
54172
|
"QrScanner": QrScanner,
|
|
52497
54173
|
"QuestTracker": QuestTracker,
|
|
52498
54174
|
"QuizBlock": QuizBlock,
|
|
54175
|
+
"RacingBoard": RacingBoard,
|
|
52499
54176
|
"Radio": Radio,
|
|
52500
54177
|
"RangeSlider": RangeSlider,
|
|
52501
54178
|
"ReflectionBlock": ReflectionBlock,
|
|
@@ -52529,7 +54206,10 @@ var init_component_registry_generated = __esm({
|
|
|
52529
54206
|
"SimulatorBoard": SimulatorBoard,
|
|
52530
54207
|
"Skeleton": Skeleton,
|
|
52531
54208
|
"SocialProof": SocialProof,
|
|
54209
|
+
"SokobanBoard": SokobanBoard,
|
|
52532
54210
|
"SortableList": SortableList,
|
|
54211
|
+
"SpaceShmupBoard": SpaceShmupBoard,
|
|
54212
|
+
"SpaceStationBoard": SpaceStationBoard,
|
|
52533
54213
|
"Spacer": SpacerPattern,
|
|
52534
54214
|
"SpacerPattern": SpacerPattern,
|
|
52535
54215
|
"Sparkline": Sparkline,
|
|
@@ -52537,6 +54217,7 @@ var init_component_registry_generated = __esm({
|
|
|
52537
54217
|
"Split": Split,
|
|
52538
54218
|
"SplitPane": SplitPane,
|
|
52539
54219
|
"SplitSection": SplitSection,
|
|
54220
|
+
"SportsBoard": SportsBoard,
|
|
52540
54221
|
"Sprite": Sprite,
|
|
52541
54222
|
"Stack": Stack,
|
|
52542
54223
|
"StarRating": StarRating,
|
|
@@ -52552,6 +54233,7 @@ var init_component_registry_generated = __esm({
|
|
|
52552
54233
|
"StatusEffect": StatusEffect,
|
|
52553
54234
|
"StepFlow": StepFlow,
|
|
52554
54235
|
"StepFlowOrganism": StepFlowOrganism,
|
|
54236
|
+
"SubagentTracePanel": SubagentTracePanel,
|
|
52555
54237
|
"SvgBranch": SvgBranch,
|
|
52556
54238
|
"SvgConnection": SvgConnection,
|
|
52557
54239
|
"SvgFlow": SvgFlow,
|
|
@@ -52571,6 +54253,7 @@ var init_component_registry_generated = __esm({
|
|
|
52571
54253
|
"Tabs": Tabs,
|
|
52572
54254
|
"TagCloud": TagCloud,
|
|
52573
54255
|
"TagInput": TagInput,
|
|
54256
|
+
"TanksBoard": TanksBoard,
|
|
52574
54257
|
"TeamCard": TeamCard,
|
|
52575
54258
|
"TeamOrganism": TeamOrganism,
|
|
52576
54259
|
"TextHighlight": TextHighlight,
|
|
@@ -52628,7 +54311,7 @@ function SuspenseConfigProvider({
|
|
|
52628
54311
|
config,
|
|
52629
54312
|
children
|
|
52630
54313
|
}) {
|
|
52631
|
-
return
|
|
54314
|
+
return React85__default.createElement(
|
|
52632
54315
|
SuspenseConfigContext.Provider,
|
|
52633
54316
|
{ value: config },
|
|
52634
54317
|
children
|
|
@@ -52639,8 +54322,8 @@ function getSlotFallback(slot, config) {
|
|
|
52639
54322
|
const variant = SLOT_SKELETON_MAP[slot] ?? "text";
|
|
52640
54323
|
return /* @__PURE__ */ jsx(Skeleton, { variant });
|
|
52641
54324
|
}
|
|
52642
|
-
function
|
|
52643
|
-
const mapping = getComponentForPattern
|
|
54325
|
+
function getComponentForPattern3(patternType) {
|
|
54326
|
+
const mapping = getComponentForPattern(patternType);
|
|
52644
54327
|
if (!mapping) {
|
|
52645
54328
|
return null;
|
|
52646
54329
|
}
|
|
@@ -53118,7 +54801,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
53118
54801
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
53119
54802
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
53120
54803
|
}
|
|
53121
|
-
return /* @__PURE__ */ jsx(
|
|
54804
|
+
return /* @__PURE__ */ jsx(React85__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
53122
54805
|
}
|
|
53123
54806
|
if (!child || typeof child !== "object") return null;
|
|
53124
54807
|
const childId = `${parentId}-${index}`;
|
|
@@ -53158,14 +54841,14 @@ function isPatternConfig(value) {
|
|
|
53158
54841
|
if (value === null || value === void 0) return false;
|
|
53159
54842
|
if (typeof value !== "object") return false;
|
|
53160
54843
|
if (Array.isArray(value)) return false;
|
|
53161
|
-
if (
|
|
54844
|
+
if (React85__default.isValidElement(value)) return false;
|
|
53162
54845
|
if (value instanceof Date) return false;
|
|
53163
54846
|
if (typeof value === "function") return false;
|
|
53164
54847
|
const record = value;
|
|
53165
|
-
return "type" in record && typeof record.type === "string" && getComponentForPattern
|
|
54848
|
+
return "type" in record && typeof record.type === "string" && getComponentForPattern(record.type) !== null;
|
|
53166
54849
|
}
|
|
53167
54850
|
function isPlainConfigObject(value) {
|
|
53168
|
-
if (
|
|
54851
|
+
if (React85__default.isValidElement(value)) return false;
|
|
53169
54852
|
if (value instanceof Date) return false;
|
|
53170
54853
|
const proto = Object.getPrototypeOf(value);
|
|
53171
54854
|
return proto === Object.prototype || proto === null;
|
|
@@ -53270,7 +54953,8 @@ function SlotContentRenderer({
|
|
|
53270
54953
|
entityDef = schemaCtx.entities.get(linkedEntity);
|
|
53271
54954
|
}
|
|
53272
54955
|
}
|
|
53273
|
-
const
|
|
54956
|
+
const orbitalName = schemaCtx && content.sourceTrait !== void 0 ? schemaCtx.orbitalsByTrait.get(content.sourceTrait) : void 0;
|
|
54957
|
+
const PatternComponent = getComponentForPattern3(content.pattern);
|
|
53274
54958
|
if (PatternComponent) {
|
|
53275
54959
|
const childrenConfig = content.props.children;
|
|
53276
54960
|
const isSingleChild = typeof childrenConfig === "string" || typeof childrenConfig === "object" && childrenConfig !== null && !Array.isArray(childrenConfig) && "type" in childrenConfig;
|
|
@@ -53290,7 +54974,7 @@ function SlotContentRenderer({
|
|
|
53290
54974
|
for (const slotKey of CONTENT_NODE_SLOTS) {
|
|
53291
54975
|
const slotVal = restProps[slotKey];
|
|
53292
54976
|
if (slotVal === void 0 || slotVal === null) continue;
|
|
53293
|
-
if (
|
|
54977
|
+
if (React85__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
|
|
53294
54978
|
if (Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
|
|
53295
54979
|
nodeSlotOverrides[slotKey] = renderPatternChildren(
|
|
53296
54980
|
slotVal,
|
|
@@ -53368,6 +55052,7 @@ function SlotContentRenderer({
|
|
|
53368
55052
|
"data-orb-entity": content.entity,
|
|
53369
55053
|
"data-orb-path": myPath,
|
|
53370
55054
|
"data-orb-pattern": content.pattern,
|
|
55055
|
+
"data-orb-orbital": orbitalName,
|
|
53371
55056
|
children: renderedChildren !== void 0 ? /* @__PURE__ */ jsx(PatternComponent, { ...finalProps, children: renderedChildren }) : /* @__PURE__ */ jsx(PatternComponent, { ...finalProps })
|
|
53372
55057
|
}
|
|
53373
55058
|
);
|
|
@@ -53387,6 +55072,7 @@ function SlotContentRenderer({
|
|
|
53387
55072
|
"data-orb-entity": content.entity,
|
|
53388
55073
|
"data-orb-path": patternPath ?? "root",
|
|
53389
55074
|
"data-orb-pattern": content.pattern,
|
|
55075
|
+
"data-orb-orbital": orbitalName,
|
|
53390
55076
|
children: content.props.children ?? /* @__PURE__ */ jsxs(Box, { className: "p-4 text-sm text-muted-foreground border border-dashed border-border rounded", children: [
|
|
53391
55077
|
"Unknown pattern: ",
|
|
53392
55078
|
content.pattern,
|
|
@@ -53626,7 +55312,7 @@ function resolveLambdaBindings(body, params, item, index) {
|
|
|
53626
55312
|
if (Array.isArray(body)) {
|
|
53627
55313
|
return body.map((b) => recur(b));
|
|
53628
55314
|
}
|
|
53629
|
-
if (body !== null && typeof body === "object" && !
|
|
55315
|
+
if (body !== null && typeof body === "object" && !React85__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
53630
55316
|
const out = {};
|
|
53631
55317
|
for (const [k, v] of Object.entries(body)) {
|
|
53632
55318
|
out[k] = recur(v);
|
|
@@ -53636,7 +55322,7 @@ function resolveLambdaBindings(body, params, item, index) {
|
|
|
53636
55322
|
return body;
|
|
53637
55323
|
}
|
|
53638
55324
|
var _slotContentRenderer2 = null;
|
|
53639
|
-
function
|
|
55325
|
+
function getSlotContentRenderer4() {
|
|
53640
55326
|
if (_slotContentRenderer2) return _slotContentRenderer2;
|
|
53641
55327
|
const mod = (init_UISlotRenderer(), __toCommonJS(UISlotRenderer_exports));
|
|
53642
55328
|
_slotContentRenderer2 = mod.SlotContentRenderer;
|
|
@@ -53645,14 +55331,14 @@ function getSlotContentRenderer2() {
|
|
|
53645
55331
|
function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
53646
55332
|
return (item, index) => {
|
|
53647
55333
|
const resolvedBody = resolveLambdaBindings(lambdaBody, params, item, index);
|
|
53648
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
55334
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React85__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
53649
55335
|
return null;
|
|
53650
55336
|
}
|
|
53651
55337
|
const record = resolvedBody;
|
|
53652
55338
|
if (typeof record.type !== "string") {
|
|
53653
55339
|
return null;
|
|
53654
55340
|
}
|
|
53655
|
-
const SlotContentRenderer2 =
|
|
55341
|
+
const SlotContentRenderer2 = getSlotContentRenderer4();
|
|
53656
55342
|
const rawChildProps = {};
|
|
53657
55343
|
for (const [k, v] of Object.entries(record)) {
|
|
53658
55344
|
if (k !== "type") rawChildProps[k] = v;
|
|
@@ -53664,7 +55350,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
53664
55350
|
props: childProps,
|
|
53665
55351
|
priority: 0
|
|
53666
55352
|
};
|
|
53667
|
-
return
|
|
55353
|
+
return React85__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
53668
55354
|
};
|
|
53669
55355
|
}
|
|
53670
55356
|
function convertNode(node, callerKey) {
|
|
@@ -53683,7 +55369,7 @@ function convertNode(node, callerKey) {
|
|
|
53683
55369
|
});
|
|
53684
55370
|
return anyChanged ? mapped : node;
|
|
53685
55371
|
}
|
|
53686
|
-
if (typeof node === "object" && !
|
|
55372
|
+
if (typeof node === "object" && !React85__default.isValidElement(node) && !(node instanceof Date)) {
|
|
53687
55373
|
return convertObjectProps(node);
|
|
53688
55374
|
}
|
|
53689
55375
|
return node;
|