@almadar/ui 5.67.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 +3108 -1525
- package/dist/avl/index.js +1838 -255
- package/dist/components/game/molecules/IsometricCanvas.d.ts +1 -1
- 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 +7328 -6733
- package/dist/components/index.js +6309 -5725
- package/dist/providers/index.cjs +2917 -1334
- package/dist/providers/index.js +1814 -231
- package/dist/runtime/index.cjs +2973 -1390
- package/dist/runtime/index.js +1818 -235
- package/package.json +1 -1
package/dist/providers/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React86 from 'react';
|
|
2
|
+
import React86__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, useLayoutEffect, lazy, useId, useSyncExternalStore, forwardRef, useImperativeHandle, Component } from 'react';
|
|
3
3
|
import { EventBusContext, useTraitScope, TraitScopeProvider } from '@almadar/ui/providers';
|
|
4
4
|
import { createLogger, isLogLevelEnabled } from '@almadar/logger';
|
|
5
5
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -403,7 +403,7 @@ var init_Box = __esm({
|
|
|
403
403
|
fixed: "fixed",
|
|
404
404
|
sticky: "sticky"
|
|
405
405
|
};
|
|
406
|
-
Box =
|
|
406
|
+
Box = React86__default.forwardRef(
|
|
407
407
|
({
|
|
408
408
|
padding,
|
|
409
409
|
paddingX,
|
|
@@ -468,7 +468,7 @@ var init_Box = __esm({
|
|
|
468
468
|
onPointerDown?.(e);
|
|
469
469
|
}, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
|
|
470
470
|
const isClickable = action || onClick;
|
|
471
|
-
return
|
|
471
|
+
return React86__default.createElement(
|
|
472
472
|
Component2,
|
|
473
473
|
{
|
|
474
474
|
ref,
|
|
@@ -564,7 +564,7 @@ function loadLib(key, importer) {
|
|
|
564
564
|
return p2;
|
|
565
565
|
}
|
|
566
566
|
function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
|
|
567
|
-
const Lazy =
|
|
567
|
+
const Lazy = React86__default.lazy(async () => {
|
|
568
568
|
const lib = await loadLib(libKey, importer);
|
|
569
569
|
const Comp = pick(lib);
|
|
570
570
|
if (!Comp) {
|
|
@@ -574,7 +574,7 @@ function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
|
|
|
574
574
|
return { default: Comp };
|
|
575
575
|
});
|
|
576
576
|
const Wrapped = (props) => /* @__PURE__ */ jsx(
|
|
577
|
-
|
|
577
|
+
React86__default.Suspense,
|
|
578
578
|
{
|
|
579
579
|
fallback: /* @__PURE__ */ jsx(
|
|
580
580
|
"span",
|
|
@@ -1300,7 +1300,7 @@ var init_Icon = __esm({
|
|
|
1300
1300
|
const directIcon = typeof icon === "string" ? void 0 : icon;
|
|
1301
1301
|
const effectiveName = typeof icon === "string" ? icon : name;
|
|
1302
1302
|
const family = useIconFamily();
|
|
1303
|
-
const RenderedComponent =
|
|
1303
|
+
const RenderedComponent = React86__default.useMemo(() => {
|
|
1304
1304
|
if (directIcon) return null;
|
|
1305
1305
|
return effectiveName ? resolveIconForFamily(effectiveName, family) : null;
|
|
1306
1306
|
}, [directIcon, effectiveName, family]);
|
|
@@ -1359,7 +1359,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
1359
1359
|
const IconComp = value;
|
|
1360
1360
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
1361
1361
|
}
|
|
1362
|
-
if (
|
|
1362
|
+
if (React86__default.isValidElement(value)) {
|
|
1363
1363
|
return value;
|
|
1364
1364
|
}
|
|
1365
1365
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -1435,7 +1435,7 @@ var init_Button = __esm({
|
|
|
1435
1435
|
md: "h-icon-default w-icon-default",
|
|
1436
1436
|
lg: "h-icon-default w-icon-default"
|
|
1437
1437
|
};
|
|
1438
|
-
Button =
|
|
1438
|
+
Button = React86__default.forwardRef(
|
|
1439
1439
|
({
|
|
1440
1440
|
className,
|
|
1441
1441
|
variant = "primary",
|
|
@@ -1500,7 +1500,7 @@ var Dialog;
|
|
|
1500
1500
|
var init_Dialog = __esm({
|
|
1501
1501
|
"components/core/atoms/Dialog.tsx"() {
|
|
1502
1502
|
init_cn();
|
|
1503
|
-
Dialog =
|
|
1503
|
+
Dialog = React86__default.forwardRef(
|
|
1504
1504
|
({
|
|
1505
1505
|
role = "dialog",
|
|
1506
1506
|
"aria-modal": ariaModal = true,
|
|
@@ -2114,7 +2114,7 @@ var init_Badge = __esm({
|
|
|
2114
2114
|
md: "px-2.5 py-1 text-sm",
|
|
2115
2115
|
lg: "px-3 py-1.5 text-base"
|
|
2116
2116
|
};
|
|
2117
|
-
Badge =
|
|
2117
|
+
Badge = React86__default.forwardRef(
|
|
2118
2118
|
({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
|
|
2119
2119
|
const iconSizes3 = {
|
|
2120
2120
|
sm: "h-icon-default w-icon-default",
|
|
@@ -2450,7 +2450,7 @@ var init_SvgFlow = __esm({
|
|
|
2450
2450
|
width = 100,
|
|
2451
2451
|
height = 100
|
|
2452
2452
|
}) => {
|
|
2453
|
-
const markerId =
|
|
2453
|
+
const markerId = React86__default.useMemo(() => {
|
|
2454
2454
|
flowIdCounter += 1;
|
|
2455
2455
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
2456
2456
|
}, []);
|
|
@@ -3043,7 +3043,7 @@ var init_SvgRing = __esm({
|
|
|
3043
3043
|
width = 100,
|
|
3044
3044
|
height = 100
|
|
3045
3045
|
}) => {
|
|
3046
|
-
const gradientId =
|
|
3046
|
+
const gradientId = React86__default.useMemo(() => {
|
|
3047
3047
|
ringIdCounter += 1;
|
|
3048
3048
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
3049
3049
|
}, []);
|
|
@@ -3224,7 +3224,7 @@ var init_Input = __esm({
|
|
|
3224
3224
|
init_cn();
|
|
3225
3225
|
init_Icon();
|
|
3226
3226
|
init_useEventBus();
|
|
3227
|
-
Input =
|
|
3227
|
+
Input = React86__default.forwardRef(
|
|
3228
3228
|
({
|
|
3229
3229
|
className,
|
|
3230
3230
|
inputType,
|
|
@@ -3384,7 +3384,7 @@ var Label;
|
|
|
3384
3384
|
var init_Label = __esm({
|
|
3385
3385
|
"components/core/atoms/Label.tsx"() {
|
|
3386
3386
|
init_cn();
|
|
3387
|
-
Label =
|
|
3387
|
+
Label = React86__default.forwardRef(
|
|
3388
3388
|
({ className, required, children, ...props }, ref) => {
|
|
3389
3389
|
return /* @__PURE__ */ jsxs(
|
|
3390
3390
|
"label",
|
|
@@ -3411,7 +3411,7 @@ var init_Textarea = __esm({
|
|
|
3411
3411
|
"components/core/atoms/Textarea.tsx"() {
|
|
3412
3412
|
init_cn();
|
|
3413
3413
|
init_useEventBus();
|
|
3414
|
-
Textarea =
|
|
3414
|
+
Textarea = React86__default.forwardRef(
|
|
3415
3415
|
({ className, error, onChange, ...props }, ref) => {
|
|
3416
3416
|
const eventBus = useEventBus();
|
|
3417
3417
|
const handleChange = (e) => {
|
|
@@ -3650,7 +3650,7 @@ var init_Select = __esm({
|
|
|
3650
3650
|
init_cn();
|
|
3651
3651
|
init_Icon();
|
|
3652
3652
|
init_useEventBus();
|
|
3653
|
-
Select =
|
|
3653
|
+
Select = React86__default.forwardRef(
|
|
3654
3654
|
(props, _ref) => {
|
|
3655
3655
|
const { multiple, searchable, clearable } = props;
|
|
3656
3656
|
if (multiple || searchable || clearable) {
|
|
@@ -3667,7 +3667,7 @@ var init_Checkbox = __esm({
|
|
|
3667
3667
|
"components/core/atoms/Checkbox.tsx"() {
|
|
3668
3668
|
init_cn();
|
|
3669
3669
|
init_useEventBus();
|
|
3670
|
-
Checkbox =
|
|
3670
|
+
Checkbox = React86__default.forwardRef(
|
|
3671
3671
|
({ className, label, id, onChange, ...props }, ref) => {
|
|
3672
3672
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
3673
3673
|
const eventBus = useEventBus();
|
|
@@ -3721,7 +3721,7 @@ var init_Spinner = __esm({
|
|
|
3721
3721
|
md: "h-6 w-6",
|
|
3722
3722
|
lg: "h-8 w-8"
|
|
3723
3723
|
};
|
|
3724
|
-
Spinner =
|
|
3724
|
+
Spinner = React86__default.forwardRef(
|
|
3725
3725
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
3726
3726
|
if (overlay) {
|
|
3727
3727
|
return /* @__PURE__ */ jsx(
|
|
@@ -3811,7 +3811,7 @@ var init_Card = __esm({
|
|
|
3811
3811
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
3812
3812
|
"tile-image-first": "p-0 overflow-hidden"
|
|
3813
3813
|
};
|
|
3814
|
-
Card =
|
|
3814
|
+
Card = React86__default.forwardRef(
|
|
3815
3815
|
({
|
|
3816
3816
|
className,
|
|
3817
3817
|
variant = "bordered",
|
|
@@ -3859,9 +3859,9 @@ var init_Card = __esm({
|
|
|
3859
3859
|
}
|
|
3860
3860
|
);
|
|
3861
3861
|
Card.displayName = "Card";
|
|
3862
|
-
CardHeader =
|
|
3862
|
+
CardHeader = React86__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
3863
3863
|
CardHeader.displayName = "CardHeader";
|
|
3864
|
-
CardTitle =
|
|
3864
|
+
CardTitle = React86__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3865
3865
|
"h3",
|
|
3866
3866
|
{
|
|
3867
3867
|
ref,
|
|
@@ -3874,11 +3874,11 @@ var init_Card = __esm({
|
|
|
3874
3874
|
}
|
|
3875
3875
|
));
|
|
3876
3876
|
CardTitle.displayName = "CardTitle";
|
|
3877
|
-
CardContent =
|
|
3877
|
+
CardContent = React86__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
3878
3878
|
CardContent.displayName = "CardContent";
|
|
3879
3879
|
CardBody = CardContent;
|
|
3880
3880
|
CardBody.displayName = "CardBody";
|
|
3881
|
-
CardFooter =
|
|
3881
|
+
CardFooter = React86__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3882
3882
|
"div",
|
|
3883
3883
|
{
|
|
3884
3884
|
ref,
|
|
@@ -3933,7 +3933,7 @@ var init_FilterPill = __esm({
|
|
|
3933
3933
|
md: "w-3.5 h-3.5",
|
|
3934
3934
|
lg: "w-4 h-4"
|
|
3935
3935
|
};
|
|
3936
|
-
FilterPill =
|
|
3936
|
+
FilterPill = React86__default.forwardRef(
|
|
3937
3937
|
({
|
|
3938
3938
|
className,
|
|
3939
3939
|
variant = "default",
|
|
@@ -4062,8 +4062,8 @@ var init_Avatar = __esm({
|
|
|
4062
4062
|
actionPayload
|
|
4063
4063
|
}) => {
|
|
4064
4064
|
const eventBus = useEventBus();
|
|
4065
|
-
const [imgFailed, setImgFailed] =
|
|
4066
|
-
|
|
4065
|
+
const [imgFailed, setImgFailed] = React86__default.useState(false);
|
|
4066
|
+
React86__default.useEffect(() => {
|
|
4067
4067
|
setImgFailed(false);
|
|
4068
4068
|
}, [src]);
|
|
4069
4069
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -4448,7 +4448,7 @@ var init_Radio = __esm({
|
|
|
4448
4448
|
md: "w-2.5 h-2.5",
|
|
4449
4449
|
lg: "w-3 h-3"
|
|
4450
4450
|
};
|
|
4451
|
-
Radio =
|
|
4451
|
+
Radio = React86__default.forwardRef(
|
|
4452
4452
|
({
|
|
4453
4453
|
label,
|
|
4454
4454
|
helperText,
|
|
@@ -4465,12 +4465,12 @@ var init_Radio = __esm({
|
|
|
4465
4465
|
onChange,
|
|
4466
4466
|
...props
|
|
4467
4467
|
}, ref) => {
|
|
4468
|
-
const reactId =
|
|
4468
|
+
const reactId = React86__default.useId();
|
|
4469
4469
|
const baseId = id || `radio-${reactId}`;
|
|
4470
4470
|
const hasError = !!error;
|
|
4471
4471
|
const eventBus = useEventBus();
|
|
4472
|
-
const [selected, setSelected] =
|
|
4473
|
-
|
|
4472
|
+
const [selected, setSelected] = React86__default.useState(value);
|
|
4473
|
+
React86__default.useEffect(() => {
|
|
4474
4474
|
if (value !== void 0) setSelected(value);
|
|
4475
4475
|
}, [value]);
|
|
4476
4476
|
const pick = (next, e) => {
|
|
@@ -4652,7 +4652,7 @@ var init_Switch = __esm({
|
|
|
4652
4652
|
"components/core/atoms/Switch.tsx"() {
|
|
4653
4653
|
"use client";
|
|
4654
4654
|
init_cn();
|
|
4655
|
-
Switch =
|
|
4655
|
+
Switch = React86.forwardRef(
|
|
4656
4656
|
({
|
|
4657
4657
|
checked,
|
|
4658
4658
|
defaultChecked = false,
|
|
@@ -4663,10 +4663,10 @@ var init_Switch = __esm({
|
|
|
4663
4663
|
name,
|
|
4664
4664
|
className
|
|
4665
4665
|
}, ref) => {
|
|
4666
|
-
const [isChecked, setIsChecked] =
|
|
4666
|
+
const [isChecked, setIsChecked] = React86.useState(
|
|
4667
4667
|
checked !== void 0 ? checked : defaultChecked
|
|
4668
4668
|
);
|
|
4669
|
-
|
|
4669
|
+
React86.useEffect(() => {
|
|
4670
4670
|
if (checked !== void 0) {
|
|
4671
4671
|
setIsChecked(checked);
|
|
4672
4672
|
}
|
|
@@ -5026,7 +5026,7 @@ var Aside;
|
|
|
5026
5026
|
var init_Aside = __esm({
|
|
5027
5027
|
"components/core/atoms/Aside.tsx"() {
|
|
5028
5028
|
init_cn();
|
|
5029
|
-
Aside =
|
|
5029
|
+
Aside = React86__default.forwardRef(
|
|
5030
5030
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
5031
5031
|
);
|
|
5032
5032
|
Aside.displayName = "Aside";
|
|
@@ -5105,9 +5105,9 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5105
5105
|
className
|
|
5106
5106
|
}) => {
|
|
5107
5107
|
const { t } = useTranslate();
|
|
5108
|
-
const [isVisible, setIsVisible] =
|
|
5109
|
-
const timeoutRef =
|
|
5110
|
-
const triggerRef =
|
|
5108
|
+
const [isVisible, setIsVisible] = React86__default.useState(false);
|
|
5109
|
+
const timeoutRef = React86__default.useRef(null);
|
|
5110
|
+
const triggerRef = React86__default.useRef(null);
|
|
5111
5111
|
const handleMouseEnter = () => {
|
|
5112
5112
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5113
5113
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -5118,7 +5118,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5118
5118
|
};
|
|
5119
5119
|
const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
|
|
5120
5120
|
const open = isVisible || revealed;
|
|
5121
|
-
|
|
5121
|
+
React86__default.useEffect(() => {
|
|
5122
5122
|
return () => {
|
|
5123
5123
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5124
5124
|
};
|
|
@@ -5330,7 +5330,7 @@ var init_StatusDot = __esm({
|
|
|
5330
5330
|
md: "w-2.5 h-2.5",
|
|
5331
5331
|
lg: "w-3 h-3"
|
|
5332
5332
|
};
|
|
5333
|
-
StatusDot =
|
|
5333
|
+
StatusDot = React86__default.forwardRef(
|
|
5334
5334
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
5335
5335
|
return /* @__PURE__ */ jsx(
|
|
5336
5336
|
"span",
|
|
@@ -5384,7 +5384,7 @@ var init_TrendIndicator = __esm({
|
|
|
5384
5384
|
down: "trending-down",
|
|
5385
5385
|
flat: "arrow-right"
|
|
5386
5386
|
};
|
|
5387
|
-
TrendIndicator =
|
|
5387
|
+
TrendIndicator = React86__default.forwardRef(
|
|
5388
5388
|
({
|
|
5389
5389
|
className,
|
|
5390
5390
|
value,
|
|
@@ -5451,7 +5451,7 @@ var init_RangeSlider = __esm({
|
|
|
5451
5451
|
md: "w-4 h-4",
|
|
5452
5452
|
lg: "w-5 h-5"
|
|
5453
5453
|
};
|
|
5454
|
-
RangeSlider =
|
|
5454
|
+
RangeSlider = React86__default.forwardRef(
|
|
5455
5455
|
({
|
|
5456
5456
|
className,
|
|
5457
5457
|
min = 0,
|
|
@@ -5959,7 +5959,7 @@ var init_ContentSection = __esm({
|
|
|
5959
5959
|
md: "py-16",
|
|
5960
5960
|
lg: "py-24"
|
|
5961
5961
|
};
|
|
5962
|
-
ContentSection =
|
|
5962
|
+
ContentSection = React86__default.forwardRef(
|
|
5963
5963
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
5964
5964
|
return /* @__PURE__ */ jsx(
|
|
5965
5965
|
Box,
|
|
@@ -6493,7 +6493,7 @@ var init_AnimatedReveal = __esm({
|
|
|
6493
6493
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
6494
6494
|
"none": {}
|
|
6495
6495
|
};
|
|
6496
|
-
AnimatedReveal =
|
|
6496
|
+
AnimatedReveal = React86__default.forwardRef(
|
|
6497
6497
|
({
|
|
6498
6498
|
trigger = "scroll",
|
|
6499
6499
|
animation = "fade-up",
|
|
@@ -6653,7 +6653,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6653
6653
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
6654
6654
|
"use client";
|
|
6655
6655
|
init_cn();
|
|
6656
|
-
AnimatedGraphic =
|
|
6656
|
+
AnimatedGraphic = React86__default.forwardRef(
|
|
6657
6657
|
({
|
|
6658
6658
|
src,
|
|
6659
6659
|
svgContent,
|
|
@@ -6676,7 +6676,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6676
6676
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
6677
6677
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
6678
6678
|
const prevAnimateRef = useRef(animate);
|
|
6679
|
-
const setRef =
|
|
6679
|
+
const setRef = React86__default.useCallback(
|
|
6680
6680
|
(node) => {
|
|
6681
6681
|
containerRef.current = node;
|
|
6682
6682
|
if (typeof ref === "function") ref(node);
|
|
@@ -6902,9 +6902,9 @@ function ScoreDisplay({
|
|
|
6902
6902
|
...rest
|
|
6903
6903
|
}) {
|
|
6904
6904
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
|
|
6905
|
-
const [displayValue, setDisplayValue] =
|
|
6906
|
-
const [isAnimating, setIsAnimating] =
|
|
6907
|
-
|
|
6905
|
+
const [displayValue, setDisplayValue] = React86.useState(resolvedValue);
|
|
6906
|
+
const [isAnimating, setIsAnimating] = React86.useState(false);
|
|
6907
|
+
React86.useEffect(() => {
|
|
6908
6908
|
if (!animated || displayValue === resolvedValue) {
|
|
6909
6909
|
setDisplayValue(resolvedValue);
|
|
6910
6910
|
return;
|
|
@@ -6987,9 +6987,9 @@ function ControlButton({
|
|
|
6987
6987
|
className
|
|
6988
6988
|
}) {
|
|
6989
6989
|
const eventBus = useEventBus();
|
|
6990
|
-
const [isPressed, setIsPressed] =
|
|
6990
|
+
const [isPressed, setIsPressed] = React86.useState(false);
|
|
6991
6991
|
const actualPressed = pressed ?? isPressed;
|
|
6992
|
-
const handlePointerDown =
|
|
6992
|
+
const handlePointerDown = React86.useCallback(
|
|
6993
6993
|
(e) => {
|
|
6994
6994
|
e.preventDefault();
|
|
6995
6995
|
if (disabled) return;
|
|
@@ -6999,7 +6999,7 @@ function ControlButton({
|
|
|
6999
6999
|
},
|
|
7000
7000
|
[disabled, pressEvent, eventBus, onPress]
|
|
7001
7001
|
);
|
|
7002
|
-
const handlePointerUp =
|
|
7002
|
+
const handlePointerUp = React86.useCallback(
|
|
7003
7003
|
(e) => {
|
|
7004
7004
|
e.preventDefault();
|
|
7005
7005
|
if (disabled) return;
|
|
@@ -7009,7 +7009,7 @@ function ControlButton({
|
|
|
7009
7009
|
},
|
|
7010
7010
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
7011
7011
|
);
|
|
7012
|
-
const handlePointerLeave =
|
|
7012
|
+
const handlePointerLeave = React86.useCallback(
|
|
7013
7013
|
(e) => {
|
|
7014
7014
|
if (isPressed) {
|
|
7015
7015
|
setIsPressed(false);
|
|
@@ -7630,8 +7630,8 @@ function XPBar({
|
|
|
7630
7630
|
}) {
|
|
7631
7631
|
const sizes = sizeMap9[size];
|
|
7632
7632
|
const percentage = max > 0 ? Math.max(0, Math.min(100, current / max * 100)) : 0;
|
|
7633
|
-
const [fillWidth, setFillWidth] =
|
|
7634
|
-
|
|
7633
|
+
const [fillWidth, setFillWidth] = React86.useState(animated ? 0 : percentage);
|
|
7634
|
+
React86.useEffect(() => {
|
|
7635
7635
|
if (!animated) {
|
|
7636
7636
|
setFillWidth(percentage);
|
|
7637
7637
|
return;
|
|
@@ -8139,9 +8139,9 @@ function MiniMap({
|
|
|
8139
8139
|
viewportRect = DEFAULT_VIEWPORT,
|
|
8140
8140
|
className
|
|
8141
8141
|
}) {
|
|
8142
|
-
const canvasRef =
|
|
8143
|
-
const frameRef =
|
|
8144
|
-
|
|
8142
|
+
const canvasRef = React86.useRef(null);
|
|
8143
|
+
const frameRef = React86.useRef(0);
|
|
8144
|
+
React86.useEffect(() => {
|
|
8145
8145
|
const canvas = canvasRef.current;
|
|
8146
8146
|
if (!canvas) return;
|
|
8147
8147
|
const ctx = canvas.getContext("2d");
|
|
@@ -8330,7 +8330,7 @@ var init_ErrorBoundary = __esm({
|
|
|
8330
8330
|
}
|
|
8331
8331
|
);
|
|
8332
8332
|
};
|
|
8333
|
-
ErrorBoundary = class extends
|
|
8333
|
+
ErrorBoundary = class extends React86__default.Component {
|
|
8334
8334
|
constructor(props) {
|
|
8335
8335
|
super(props);
|
|
8336
8336
|
__publicField(this, "reset", () => {
|
|
@@ -9721,8 +9721,8 @@ function ActionButtons({
|
|
|
9721
9721
|
disabled
|
|
9722
9722
|
}) {
|
|
9723
9723
|
const eventBus = useEventBus();
|
|
9724
|
-
const [activeButtons, setActiveButtons] =
|
|
9725
|
-
const handlePress =
|
|
9724
|
+
const [activeButtons, setActiveButtons] = React86.useState(/* @__PURE__ */ new Set());
|
|
9725
|
+
const handlePress = React86.useCallback(
|
|
9726
9726
|
(id) => {
|
|
9727
9727
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
9728
9728
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -9730,7 +9730,7 @@ function ActionButtons({
|
|
|
9730
9730
|
},
|
|
9731
9731
|
[actionEvent, eventBus, onAction]
|
|
9732
9732
|
);
|
|
9733
|
-
const handleRelease =
|
|
9733
|
+
const handleRelease = React86.useCallback(
|
|
9734
9734
|
(id) => {
|
|
9735
9735
|
setActiveButtons((prev) => {
|
|
9736
9736
|
const next = new Set(prev);
|
|
@@ -11267,6 +11267,11 @@ function isoToScreen(tileX, tileY, scale, baseOffsetX, layout = "isometric") {
|
|
|
11267
11267
|
const screenY2 = tileY * (scaledFloorHeight * 0.75);
|
|
11268
11268
|
return { x: screenX2, y: screenY2 };
|
|
11269
11269
|
}
|
|
11270
|
+
if (layout === "flat") {
|
|
11271
|
+
const screenX2 = tileX * scaledTileWidth + baseOffsetX;
|
|
11272
|
+
const screenY2 = tileY * scaledFloorHeight;
|
|
11273
|
+
return { x: screenX2, y: screenY2 };
|
|
11274
|
+
}
|
|
11270
11275
|
const screenX = (tileX - tileY) * (scaledTileWidth / 2) + baseOffsetX;
|
|
11271
11276
|
const screenY = (tileX + tileY) * (scaledFloorHeight / 2);
|
|
11272
11277
|
return { x: screenX, y: screenY };
|
|
@@ -11279,6 +11284,11 @@ function screenToIso(screenX, screenY, scale, baseOffsetX, layout = "isometric")
|
|
|
11279
11284
|
const col = Math.round((screenX - (row & 1) * (scaledTileWidth / 2) - baseOffsetX) / scaledTileWidth);
|
|
11280
11285
|
return { x: col, y: row };
|
|
11281
11286
|
}
|
|
11287
|
+
if (layout === "flat") {
|
|
11288
|
+
const col = Math.round((screenX - baseOffsetX) / scaledTileWidth);
|
|
11289
|
+
const row = Math.round(screenY / scaledFloorHeight);
|
|
11290
|
+
return { x: col, y: row };
|
|
11291
|
+
}
|
|
11282
11292
|
const adjustedX = screenX - baseOffsetX;
|
|
11283
11293
|
const tileX = (adjustedX / (scaledTileWidth / 2) + screenY / (scaledFloorHeight / 2)) / 2;
|
|
11284
11294
|
const tileY = (screenY / (scaledFloorHeight / 2) - adjustedX / (scaledTileWidth / 2)) / 2;
|
|
@@ -11398,7 +11408,7 @@ function IsometricCanvas({
|
|
|
11398
11408
|
);
|
|
11399
11409
|
const sortedTiles = useMemo(() => {
|
|
11400
11410
|
const tiles = [...tilesProp];
|
|
11401
|
-
if (tileLayout === "hex") {
|
|
11411
|
+
if (tileLayout === "hex" || tileLayout === "flat") {
|
|
11402
11412
|
tiles.sort((a, b) => a.y !== b.y ? a.y - b.y : a.x - b.x);
|
|
11403
11413
|
} else {
|
|
11404
11414
|
tiles.sort((a, b) => {
|
|
@@ -11526,7 +11536,7 @@ function IsometricCanvas({
|
|
|
11526
11536
|
const minX = Math.min(...allScreenPos.map((p2) => p2.x));
|
|
11527
11537
|
const maxX = Math.max(...allScreenPos.map((p2) => p2.x + scaledTileWidth));
|
|
11528
11538
|
const minY = Math.min(...allScreenPos.map((p2) => p2.y));
|
|
11529
|
-
const tileBottomExtent = tileLayout === "hex" ? scaledTileWidth : scaledTileHeight;
|
|
11539
|
+
const tileBottomExtent = tileLayout === "hex" || tileLayout === "flat" ? scaledTileWidth : scaledTileHeight;
|
|
11530
11540
|
const maxY = Math.max(...allScreenPos.map((p2) => p2.y + tileBottomExtent));
|
|
11531
11541
|
const worldW = maxX - minX;
|
|
11532
11542
|
const worldH = maxY - minY;
|
|
@@ -11619,7 +11629,7 @@ function IsometricCanvas({
|
|
|
11619
11629
|
const drawW = scaledTileWidth;
|
|
11620
11630
|
const drawH = scaledTileWidth * (img.naturalHeight / img.naturalWidth);
|
|
11621
11631
|
const drawX = pos.x;
|
|
11622
|
-
const drawY = tileLayout === "hex" ? pos.y : pos.y + scaledTileHeight - drawH;
|
|
11632
|
+
const drawY = tileLayout === "hex" || tileLayout === "flat" ? pos.y : pos.y + scaledTileHeight - drawH;
|
|
11623
11633
|
ctx.drawImage(img, drawX, drawY, drawW, drawH);
|
|
11624
11634
|
}
|
|
11625
11635
|
} else {
|
|
@@ -11686,7 +11696,7 @@ function IsometricCanvas({
|
|
|
11686
11696
|
}
|
|
11687
11697
|
}
|
|
11688
11698
|
const sortedFeatures = [...features].sort((a, b) => {
|
|
11689
|
-
if (tileLayout === "hex") return a.y !== b.y ? a.y - b.y : a.x - b.x;
|
|
11699
|
+
if (tileLayout === "hex" || tileLayout === "flat") return a.y !== b.y ? a.y - b.y : a.x - b.x;
|
|
11690
11700
|
const depthA = a.x + a.y;
|
|
11691
11701
|
const depthB = b.x + b.y;
|
|
11692
11702
|
return depthA !== depthB ? depthA - depthB : a.y - b.y;
|
|
@@ -11727,7 +11737,7 @@ function IsometricCanvas({
|
|
|
11727
11737
|
}
|
|
11728
11738
|
const unitsWithPosition = units.filter((u) => !!u.position);
|
|
11729
11739
|
const sortedUnits = [...unitsWithPosition].sort((a, b) => {
|
|
11730
|
-
if (tileLayout === "hex") return a.position.y !== b.position.y ? a.position.y - b.position.y : a.position.x - b.position.x;
|
|
11740
|
+
if (tileLayout === "hex" || tileLayout === "flat") return a.position.y !== b.position.y ? a.position.y - b.position.y : a.position.x - b.position.x;
|
|
11731
11741
|
const depthA = a.position.x + a.position.y;
|
|
11732
11742
|
const depthB = b.position.x + b.position.y;
|
|
11733
11743
|
return depthA !== depthB ? depthA - depthB : a.position.y - b.position.y;
|
|
@@ -13902,7 +13912,7 @@ var init_CodeBlock = __esm({
|
|
|
13902
13912
|
};
|
|
13903
13913
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
13904
13914
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
13905
|
-
CodeBlock =
|
|
13915
|
+
CodeBlock = React86__default.memo(
|
|
13906
13916
|
({
|
|
13907
13917
|
code: rawCode,
|
|
13908
13918
|
language = "text",
|
|
@@ -14489,7 +14499,7 @@ var init_MarkdownContent = __esm({
|
|
|
14489
14499
|
init_Box();
|
|
14490
14500
|
init_CodeBlock();
|
|
14491
14501
|
init_cn();
|
|
14492
|
-
MarkdownContent =
|
|
14502
|
+
MarkdownContent = React86__default.memo(
|
|
14493
14503
|
({ content, direction = "ltr", className }) => {
|
|
14494
14504
|
const { t: _t } = useTranslate();
|
|
14495
14505
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -14779,6 +14789,48 @@ var init_BloomQuizBlock = __esm({
|
|
|
14779
14789
|
BloomQuizBlock.displayName = "BloomQuizBlock";
|
|
14780
14790
|
}
|
|
14781
14791
|
});
|
|
14792
|
+
function BoardgameBoard({
|
|
14793
|
+
tiles,
|
|
14794
|
+
units,
|
|
14795
|
+
features,
|
|
14796
|
+
assetManifest,
|
|
14797
|
+
assetBaseUrl,
|
|
14798
|
+
scale = 0.45,
|
|
14799
|
+
showMinimap = false,
|
|
14800
|
+
enableCamera = true,
|
|
14801
|
+
tileClickEvent,
|
|
14802
|
+
unitClickEvent,
|
|
14803
|
+
isLoading,
|
|
14804
|
+
error,
|
|
14805
|
+
className
|
|
14806
|
+
}) {
|
|
14807
|
+
return /* @__PURE__ */ jsx("div", { className: cn("boardgame-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
14808
|
+
IsometricCanvas_default,
|
|
14809
|
+
{
|
|
14810
|
+
tileLayout: "flat",
|
|
14811
|
+
tiles,
|
|
14812
|
+
units,
|
|
14813
|
+
features,
|
|
14814
|
+
assetManifest,
|
|
14815
|
+
assetBaseUrl,
|
|
14816
|
+
scale,
|
|
14817
|
+
showMinimap,
|
|
14818
|
+
enableCamera,
|
|
14819
|
+
tileClickEvent,
|
|
14820
|
+
unitClickEvent,
|
|
14821
|
+
isLoading,
|
|
14822
|
+
error
|
|
14823
|
+
}
|
|
14824
|
+
) });
|
|
14825
|
+
}
|
|
14826
|
+
var init_BoardgameBoard = __esm({
|
|
14827
|
+
"components/game/organisms/BoardgameBoard.tsx"() {
|
|
14828
|
+
"use client";
|
|
14829
|
+
init_cn();
|
|
14830
|
+
init_IsometricCanvas();
|
|
14831
|
+
BoardgameBoard.displayName = "BoardgameBoard";
|
|
14832
|
+
}
|
|
14833
|
+
});
|
|
14782
14834
|
var MIN_DIAGRAM_WIDTH, ScaledDiagram;
|
|
14783
14835
|
var init_ScaledDiagram = __esm({
|
|
14784
14836
|
"components/core/molecules/ScaledDiagram.tsx"() {
|
|
@@ -15816,7 +15868,7 @@ var init_StateMachineView = __esm({
|
|
|
15816
15868
|
style: { top: title ? 30 : 0 },
|
|
15817
15869
|
children: [
|
|
15818
15870
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
15819
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
15871
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React86__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
15820
15872
|
StateNode,
|
|
15821
15873
|
{
|
|
15822
15874
|
state,
|
|
@@ -19771,7 +19823,7 @@ function CardHand({
|
|
|
19771
19823
|
className
|
|
19772
19824
|
}) {
|
|
19773
19825
|
const eventBus = useEventBus();
|
|
19774
|
-
const handleClick =
|
|
19826
|
+
const handleClick = React86.useCallback(
|
|
19775
19827
|
(card) => {
|
|
19776
19828
|
if (card.disabled) return;
|
|
19777
19829
|
onCardClick?.(card.id);
|
|
@@ -21917,6 +21969,215 @@ var init_ChartLegend = __esm({
|
|
|
21917
21969
|
ChartLegend.displayName = "ChartLegend";
|
|
21918
21970
|
}
|
|
21919
21971
|
});
|
|
21972
|
+
|
|
21973
|
+
// components/core/organisms/trace-edit-focus.ts
|
|
21974
|
+
function asString(v) {
|
|
21975
|
+
return typeof v === "string" ? v : void 0;
|
|
21976
|
+
}
|
|
21977
|
+
function asLevel(v) {
|
|
21978
|
+
if (typeof v === "string" && EDIT_FOCUS_LEVELS.has(v)) {
|
|
21979
|
+
return v;
|
|
21980
|
+
}
|
|
21981
|
+
return "node";
|
|
21982
|
+
}
|
|
21983
|
+
function isEventPayload(v) {
|
|
21984
|
+
return v !== null && v !== void 0 && typeof v === "object" && !Array.isArray(v) && !(v instanceof Date);
|
|
21985
|
+
}
|
|
21986
|
+
function parseEditFocus(value) {
|
|
21987
|
+
if (!isEventPayload(value)) return null;
|
|
21988
|
+
const payload = value;
|
|
21989
|
+
const orbital = asString(payload.orbital);
|
|
21990
|
+
if (orbital === void 0 || orbital.length === 0) return null;
|
|
21991
|
+
const focus = {
|
|
21992
|
+
level: asLevel(payload.level),
|
|
21993
|
+
orbital,
|
|
21994
|
+
label: asString(payload.label) ?? orbital
|
|
21995
|
+
};
|
|
21996
|
+
const trait = asString(payload.trait);
|
|
21997
|
+
if (trait !== void 0) focus.trait = trait;
|
|
21998
|
+
const transition = asString(payload.transition);
|
|
21999
|
+
if (transition !== void 0) focus.transition = transition;
|
|
22000
|
+
const state = asString(payload.state);
|
|
22001
|
+
if (state !== void 0) focus.state = state;
|
|
22002
|
+
const slot = asString(payload.slot);
|
|
22003
|
+
if (slot !== void 0) focus.slot = slot;
|
|
22004
|
+
const path = asString(payload.path);
|
|
22005
|
+
if (path !== void 0) focus.path = path;
|
|
22006
|
+
const patternType = asString(payload.patternType);
|
|
22007
|
+
if (patternType !== void 0) focus.patternType = patternType;
|
|
22008
|
+
const entity = asString(payload.entity);
|
|
22009
|
+
if (entity !== void 0) focus.entity = entity;
|
|
22010
|
+
const source = asString(payload.source);
|
|
22011
|
+
if (source !== void 0) focus.source = source;
|
|
22012
|
+
return focus;
|
|
22013
|
+
}
|
|
22014
|
+
var ELEMENT_SELECTED_EVENT, EDIT_FOCUS_LEVELS;
|
|
22015
|
+
var init_trace_edit_focus = __esm({
|
|
22016
|
+
"components/core/organisms/trace-edit-focus.ts"() {
|
|
22017
|
+
ELEMENT_SELECTED_EVENT = "UI:ELEMENT_SELECTED";
|
|
22018
|
+
EDIT_FOCUS_LEVELS = /* @__PURE__ */ new Set([
|
|
22019
|
+
"node",
|
|
22020
|
+
"slot",
|
|
22021
|
+
"field",
|
|
22022
|
+
"effect",
|
|
22023
|
+
"trait",
|
|
22024
|
+
"page",
|
|
22025
|
+
"orbital"
|
|
22026
|
+
]);
|
|
22027
|
+
}
|
|
22028
|
+
});
|
|
22029
|
+
function getJepaBadgeVariant(probability) {
|
|
22030
|
+
if (probability >= 0.9) return "success";
|
|
22031
|
+
if (probability >= 0.5) return "warning";
|
|
22032
|
+
return "danger";
|
|
22033
|
+
}
|
|
22034
|
+
function ChatBar({
|
|
22035
|
+
status = "idle",
|
|
22036
|
+
activeGate,
|
|
22037
|
+
jepaValidity,
|
|
22038
|
+
placeholder,
|
|
22039
|
+
context,
|
|
22040
|
+
className
|
|
22041
|
+
}) {
|
|
22042
|
+
const { t } = useTranslate();
|
|
22043
|
+
const eventBus = useEventBus();
|
|
22044
|
+
const [inputValue, setInputValue] = useState("");
|
|
22045
|
+
const [focus, setFocus] = useState(null);
|
|
22046
|
+
const clearFocus = useCallback(() => {
|
|
22047
|
+
setFocus(null);
|
|
22048
|
+
eventBus.emit(ELEMENT_SELECTED_EVENT, { focus: null });
|
|
22049
|
+
}, [eventBus]);
|
|
22050
|
+
const handleKeyDown = useCallback((e) => {
|
|
22051
|
+
if (e.key !== "Enter" || e.shiftKey) return;
|
|
22052
|
+
const trimmed = inputValue.trim();
|
|
22053
|
+
if (!trimmed) return;
|
|
22054
|
+
e.preventDefault();
|
|
22055
|
+
eventBus.emit("UI:CHAT_SEND", { message: trimmed });
|
|
22056
|
+
}, [inputValue, eventBus]);
|
|
22057
|
+
useEffect(() => {
|
|
22058
|
+
const unsubSend = eventBus.on("UI:CHAT_SEND", () => {
|
|
22059
|
+
setInputValue("");
|
|
22060
|
+
setFocus(null);
|
|
22061
|
+
});
|
|
22062
|
+
const unsubSelect = eventBus.on(ELEMENT_SELECTED_EVENT, (e) => {
|
|
22063
|
+
setFocus(parseEditFocus(e.payload?.focus));
|
|
22064
|
+
});
|
|
22065
|
+
return () => {
|
|
22066
|
+
unsubSend();
|
|
22067
|
+
unsubSelect();
|
|
22068
|
+
};
|
|
22069
|
+
}, [eventBus]);
|
|
22070
|
+
const trailingAction = status === "error" ? /* @__PURE__ */ jsxs(Button, { variant: "secondary", size: "sm", action: "RETRY_GENERATION", className: "rounded-none flex-shrink-0 h-auto", children: [
|
|
22071
|
+
/* @__PURE__ */ jsx(Icon, { name: "refresh-cw", size: "xs" }),
|
|
22072
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", children: t("openFile.retry") })
|
|
22073
|
+
] }) : status === "running" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22074
|
+
/* @__PURE__ */ jsx(
|
|
22075
|
+
Button,
|
|
22076
|
+
{
|
|
22077
|
+
variant: "ghost",
|
|
22078
|
+
size: "sm",
|
|
22079
|
+
action: "PAUSE",
|
|
22080
|
+
title: t("chatBar.pauseTheAgentYouCanEdit"),
|
|
22081
|
+
className: "rounded-none flex-shrink-0 h-auto",
|
|
22082
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "pause", size: "xs" })
|
|
22083
|
+
}
|
|
22084
|
+
),
|
|
22085
|
+
/* @__PURE__ */ jsx(
|
|
22086
|
+
Button,
|
|
22087
|
+
{
|
|
22088
|
+
variant: "ghost",
|
|
22089
|
+
size: "sm",
|
|
22090
|
+
action: "STOP",
|
|
22091
|
+
title: t("chatBar.cancelGeneration"),
|
|
22092
|
+
className: "rounded-none flex-shrink-0 h-auto border-l border-[var(--color-border)]",
|
|
22093
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "square", size: "xs" })
|
|
22094
|
+
}
|
|
22095
|
+
)
|
|
22096
|
+
] }) : status === "paused" ? /* @__PURE__ */ jsxs(
|
|
22097
|
+
Button,
|
|
22098
|
+
{
|
|
22099
|
+
variant: "primary",
|
|
22100
|
+
size: "sm",
|
|
22101
|
+
action: "RESUME",
|
|
22102
|
+
title: t("chatBar.resumeTheAgentYourCanvasEdits"),
|
|
22103
|
+
className: "rounded-none flex-shrink-0 h-auto",
|
|
22104
|
+
children: [
|
|
22105
|
+
/* @__PURE__ */ jsx(Icon, { name: "play", size: "xs" }),
|
|
22106
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", children: t("chatBar.resume") })
|
|
22107
|
+
]
|
|
22108
|
+
}
|
|
22109
|
+
) : /* @__PURE__ */ jsx(
|
|
22110
|
+
Button,
|
|
22111
|
+
{
|
|
22112
|
+
variant: "primary",
|
|
22113
|
+
size: "sm",
|
|
22114
|
+
action: "CHAT_SEND",
|
|
22115
|
+
actionPayload: { message: inputValue.trim() },
|
|
22116
|
+
disabled: !inputValue.trim(),
|
|
22117
|
+
"aria-label": t("chatBar.sendMessage"),
|
|
22118
|
+
className: "rounded-none flex-shrink-0 h-auto",
|
|
22119
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "send", size: "xs" })
|
|
22120
|
+
}
|
|
22121
|
+
);
|
|
22122
|
+
return /* @__PURE__ */ jsxs(Box, { className: `border-t border-[var(--color-border)] bg-[var(--color-card)] ${className ?? ""}`, children: [
|
|
22123
|
+
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: [
|
|
22124
|
+
/* @__PURE__ */ jsx(Icon, { name: "mouse-pointer-2", size: "xs" }),
|
|
22125
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-inherit truncate", children: [
|
|
22126
|
+
t("chatBar.editing"),
|
|
22127
|
+
": ",
|
|
22128
|
+
focus.label
|
|
22129
|
+
] }),
|
|
22130
|
+
/* @__PURE__ */ jsx(
|
|
22131
|
+
Box,
|
|
22132
|
+
{
|
|
22133
|
+
onClick: clearFocus,
|
|
22134
|
+
title: t("chatBar.clearSelection"),
|
|
22135
|
+
className: "cursor-pointer flex items-center ml-1 hover:opacity-70",
|
|
22136
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" })
|
|
22137
|
+
}
|
|
22138
|
+
)
|
|
22139
|
+
] }) }),
|
|
22140
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center px-4 py-2", children: [
|
|
22141
|
+
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 }) }),
|
|
22142
|
+
/* @__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: [
|
|
22143
|
+
/* @__PURE__ */ jsx(
|
|
22144
|
+
Textarea,
|
|
22145
|
+
{
|
|
22146
|
+
value: inputValue,
|
|
22147
|
+
placeholder: placeholder ?? t("chatBar.askTheAgentAnything"),
|
|
22148
|
+
onChange: (e) => setInputValue(e.target.value),
|
|
22149
|
+
onKeyDown: handleKeyDown,
|
|
22150
|
+
rows: 1,
|
|
22151
|
+
className: "flex-1 min-w-0 min-h-0 text-sm border-0 rounded-none shadow-none bg-transparent resize-none focus:ring-0"
|
|
22152
|
+
}
|
|
22153
|
+
),
|
|
22154
|
+
trailingAction
|
|
22155
|
+
] }),
|
|
22156
|
+
(activeGate || jepaValidity !== void 0) && /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center flex-shrink-0", children: [
|
|
22157
|
+
activeGate && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "whitespace-nowrap", children: activeGate }),
|
|
22158
|
+
jepaValidity !== void 0 && /* @__PURE__ */ jsx(Badge, { variant: getJepaBadgeVariant(jepaValidity), size: "sm", children: /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-inherit", children: [
|
|
22159
|
+
(jepaValidity * 100).toFixed(1),
|
|
22160
|
+
"%"
|
|
22161
|
+
] }) })
|
|
22162
|
+
] })
|
|
22163
|
+
] })
|
|
22164
|
+
] });
|
|
22165
|
+
}
|
|
22166
|
+
var init_ChatBar = __esm({
|
|
22167
|
+
"components/core/organisms/ChatBar.tsx"() {
|
|
22168
|
+
"use client";
|
|
22169
|
+
init_Box();
|
|
22170
|
+
init_Stack();
|
|
22171
|
+
init_Typography();
|
|
22172
|
+
init_Button();
|
|
22173
|
+
init_Badge();
|
|
22174
|
+
init_Icon();
|
|
22175
|
+
init_Textarea();
|
|
22176
|
+
init_useEventBus();
|
|
22177
|
+
init_trace_edit_focus();
|
|
22178
|
+
ChatBar.displayName = "ChatBar";
|
|
22179
|
+
}
|
|
22180
|
+
});
|
|
21920
22181
|
function resolveManifestUrl2(manifest, relative) {
|
|
21921
22182
|
if (relative == null) return void 0;
|
|
21922
22183
|
if (/^https?:\/\//.test(relative)) return relative;
|
|
@@ -23040,7 +23301,7 @@ function CraftingRecipe({
|
|
|
23040
23301
|
className
|
|
23041
23302
|
}) {
|
|
23042
23303
|
const eventBus = useEventBus();
|
|
23043
|
-
const handleCraft =
|
|
23304
|
+
const handleCraft = React86.useCallback(() => {
|
|
23044
23305
|
onCraft?.();
|
|
23045
23306
|
if (craftEvent) {
|
|
23046
23307
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -23057,7 +23318,7 @@ function CraftingRecipe({
|
|
|
23057
23318
|
children: [
|
|
23058
23319
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
23059
23320
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
23060
|
-
return /* @__PURE__ */ jsxs(
|
|
23321
|
+
return /* @__PURE__ */ jsxs(React86.Fragment, { children: [
|
|
23061
23322
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
23062
23323
|
ItemSlot,
|
|
23063
23324
|
{
|
|
@@ -23129,8 +23390,8 @@ function DPad({
|
|
|
23129
23390
|
}) {
|
|
23130
23391
|
const eventBus = useEventBus();
|
|
23131
23392
|
const sizes = sizeMap15[size];
|
|
23132
|
-
const [activeDirections, setActiveDirections] =
|
|
23133
|
-
const handlePress =
|
|
23393
|
+
const [activeDirections, setActiveDirections] = React86.useState(/* @__PURE__ */ new Set());
|
|
23394
|
+
const handlePress = React86.useCallback(
|
|
23134
23395
|
(direction) => {
|
|
23135
23396
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
23136
23397
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -23138,7 +23399,7 @@ function DPad({
|
|
|
23138
23399
|
},
|
|
23139
23400
|
[directionEvent, eventBus, onDirection]
|
|
23140
23401
|
);
|
|
23141
|
-
const handleRelease =
|
|
23402
|
+
const handleRelease = React86.useCallback(
|
|
23142
23403
|
(direction) => {
|
|
23143
23404
|
setActiveDirections((prev) => {
|
|
23144
23405
|
const next = new Set(prev);
|
|
@@ -24023,8 +24284,8 @@ var init_Menu = __esm({
|
|
|
24023
24284
|
"bottom-end": "bottom-start"
|
|
24024
24285
|
};
|
|
24025
24286
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
24026
|
-
const triggerChild =
|
|
24027
|
-
const triggerElement =
|
|
24287
|
+
const triggerChild = React86__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
24288
|
+
const triggerElement = React86__default.cloneElement(
|
|
24028
24289
|
triggerChild,
|
|
24029
24290
|
{
|
|
24030
24291
|
ref: triggerRef,
|
|
@@ -24119,14 +24380,14 @@ function useDataDnd(args) {
|
|
|
24119
24380
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
24120
24381
|
const enabled = isZone || Boolean(dndRoot);
|
|
24121
24382
|
const eventBus = useEventBus();
|
|
24122
|
-
const parentRoot =
|
|
24383
|
+
const parentRoot = React86__default.useContext(RootCtx);
|
|
24123
24384
|
const isRoot = enabled && parentRoot === null;
|
|
24124
|
-
const zoneId =
|
|
24385
|
+
const zoneId = React86__default.useId();
|
|
24125
24386
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
24126
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
24127
|
-
const optimisticOrdersRef =
|
|
24387
|
+
const [optimisticOrders, setOptimisticOrders] = React86__default.useState(() => /* @__PURE__ */ new Map());
|
|
24388
|
+
const optimisticOrdersRef = React86__default.useRef(optimisticOrders);
|
|
24128
24389
|
optimisticOrdersRef.current = optimisticOrders;
|
|
24129
|
-
const clearOptimisticOrder =
|
|
24390
|
+
const clearOptimisticOrder = React86__default.useCallback((group) => {
|
|
24130
24391
|
setOptimisticOrders((prev) => {
|
|
24131
24392
|
if (!prev.has(group)) return prev;
|
|
24132
24393
|
const next = new Map(prev);
|
|
@@ -24151,7 +24412,7 @@ function useDataDnd(args) {
|
|
|
24151
24412
|
const raw = it[dndItemIdField];
|
|
24152
24413
|
return String(raw ?? `__idx_${idx}`);
|
|
24153
24414
|
}).join("|");
|
|
24154
|
-
const itemIds =
|
|
24415
|
+
const itemIds = React86__default.useMemo(
|
|
24155
24416
|
() => orderedItems.map((it, idx) => {
|
|
24156
24417
|
const raw = it[dndItemIdField];
|
|
24157
24418
|
return raw ?? `__idx_${idx}`;
|
|
@@ -24159,7 +24420,7 @@ function useDataDnd(args) {
|
|
|
24159
24420
|
[itemIdsSignature]
|
|
24160
24421
|
);
|
|
24161
24422
|
const itemsContentSig = items.map((it, idx) => String(it[dndItemIdField] ?? `__${idx}`)).join("|");
|
|
24162
|
-
|
|
24423
|
+
React86__default.useEffect(() => {
|
|
24163
24424
|
const root = isRoot ? null : parentRoot;
|
|
24164
24425
|
if (root) {
|
|
24165
24426
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -24167,20 +24428,20 @@ function useDataDnd(args) {
|
|
|
24167
24428
|
clearOptimisticOrder(ownGroup);
|
|
24168
24429
|
}
|
|
24169
24430
|
}, [itemsContentSig, ownGroup]);
|
|
24170
|
-
const zonesRef =
|
|
24171
|
-
const registerZone =
|
|
24431
|
+
const zonesRef = React86__default.useRef(/* @__PURE__ */ new Map());
|
|
24432
|
+
const registerZone = React86__default.useCallback((zoneId2, meta2) => {
|
|
24172
24433
|
zonesRef.current.set(zoneId2, meta2);
|
|
24173
24434
|
}, []);
|
|
24174
|
-
const unregisterZone =
|
|
24435
|
+
const unregisterZone = React86__default.useCallback((zoneId2) => {
|
|
24175
24436
|
zonesRef.current.delete(zoneId2);
|
|
24176
24437
|
}, []);
|
|
24177
|
-
const [activeDrag, setActiveDrag] =
|
|
24178
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
24179
|
-
const meta =
|
|
24438
|
+
const [activeDrag, setActiveDrag] = React86__default.useState(null);
|
|
24439
|
+
const [overZoneGroup, setOverZoneGroup] = React86__default.useState(null);
|
|
24440
|
+
const meta = React86__default.useMemo(
|
|
24180
24441
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
24181
24442
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
24182
24443
|
);
|
|
24183
|
-
|
|
24444
|
+
React86__default.useEffect(() => {
|
|
24184
24445
|
const target = isRoot ? null : parentRoot;
|
|
24185
24446
|
if (!target) {
|
|
24186
24447
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -24199,7 +24460,7 @@ function useDataDnd(args) {
|
|
|
24199
24460
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
24200
24461
|
const sensors = useAlmadarDndSensors(true);
|
|
24201
24462
|
const collisionDetection = almadarDndCollisionDetection;
|
|
24202
|
-
const findZoneByItem =
|
|
24463
|
+
const findZoneByItem = React86__default.useCallback(
|
|
24203
24464
|
(id) => {
|
|
24204
24465
|
for (const z of zonesRef.current.values()) {
|
|
24205
24466
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -24208,7 +24469,7 @@ function useDataDnd(args) {
|
|
|
24208
24469
|
},
|
|
24209
24470
|
[]
|
|
24210
24471
|
);
|
|
24211
|
-
|
|
24472
|
+
React86__default.useCallback(
|
|
24212
24473
|
(group) => {
|
|
24213
24474
|
for (const z of zonesRef.current.values()) {
|
|
24214
24475
|
if (z.group === group) return z;
|
|
@@ -24217,7 +24478,7 @@ function useDataDnd(args) {
|
|
|
24217
24478
|
},
|
|
24218
24479
|
[]
|
|
24219
24480
|
);
|
|
24220
|
-
const handleDragEnd =
|
|
24481
|
+
const handleDragEnd = React86__default.useCallback(
|
|
24221
24482
|
(event) => {
|
|
24222
24483
|
const { active, over } = event;
|
|
24223
24484
|
const activeIdStr = String(active.id);
|
|
@@ -24308,8 +24569,8 @@ function useDataDnd(args) {
|
|
|
24308
24569
|
},
|
|
24309
24570
|
[eventBus]
|
|
24310
24571
|
);
|
|
24311
|
-
const sortableData =
|
|
24312
|
-
const SortableItem =
|
|
24572
|
+
const sortableData = React86__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
24573
|
+
const SortableItem = React86__default.useCallback(
|
|
24313
24574
|
({ id, children }) => {
|
|
24314
24575
|
const {
|
|
24315
24576
|
attributes,
|
|
@@ -24349,7 +24610,7 @@ function useDataDnd(args) {
|
|
|
24349
24610
|
id: droppableId,
|
|
24350
24611
|
data: sortableData
|
|
24351
24612
|
});
|
|
24352
|
-
const ctx =
|
|
24613
|
+
const ctx = React86__default.useContext(RootCtx);
|
|
24353
24614
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
24354
24615
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
24355
24616
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -24364,7 +24625,7 @@ function useDataDnd(args) {
|
|
|
24364
24625
|
showForeignPlaceholder,
|
|
24365
24626
|
ctxAvailable: ctx != null
|
|
24366
24627
|
});
|
|
24367
|
-
|
|
24628
|
+
React86__default.useEffect(() => {
|
|
24368
24629
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
24369
24630
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
24370
24631
|
return /* @__PURE__ */ jsx(
|
|
@@ -24378,11 +24639,11 @@ function useDataDnd(args) {
|
|
|
24378
24639
|
}
|
|
24379
24640
|
);
|
|
24380
24641
|
};
|
|
24381
|
-
const rootContextValue =
|
|
24642
|
+
const rootContextValue = React86__default.useMemo(
|
|
24382
24643
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
24383
24644
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
24384
24645
|
);
|
|
24385
|
-
const handleDragStart =
|
|
24646
|
+
const handleDragStart = React86__default.useCallback((event) => {
|
|
24386
24647
|
const sourceZone = findZoneByItem(event.active.id);
|
|
24387
24648
|
const rect = event.active.rect.current.initial;
|
|
24388
24649
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -24401,7 +24662,7 @@ function useDataDnd(args) {
|
|
|
24401
24662
|
isRoot
|
|
24402
24663
|
});
|
|
24403
24664
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
24404
|
-
const handleDragOver =
|
|
24665
|
+
const handleDragOver = React86__default.useCallback((event) => {
|
|
24405
24666
|
const { active, over } = event;
|
|
24406
24667
|
const overData = over?.data?.current;
|
|
24407
24668
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -24471,7 +24732,7 @@ function useDataDnd(args) {
|
|
|
24471
24732
|
return next;
|
|
24472
24733
|
});
|
|
24473
24734
|
}, []);
|
|
24474
|
-
const handleDragCancel =
|
|
24735
|
+
const handleDragCancel = React86__default.useCallback((event) => {
|
|
24475
24736
|
setActiveDrag(null);
|
|
24476
24737
|
setOverZoneGroup(null);
|
|
24477
24738
|
dndLog.warn("dragCancel", {
|
|
@@ -24479,12 +24740,12 @@ function useDataDnd(args) {
|
|
|
24479
24740
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
24480
24741
|
});
|
|
24481
24742
|
}, []);
|
|
24482
|
-
const handleDragEndWithCleanup =
|
|
24743
|
+
const handleDragEndWithCleanup = React86__default.useCallback((event) => {
|
|
24483
24744
|
handleDragEnd(event);
|
|
24484
24745
|
setActiveDrag(null);
|
|
24485
24746
|
setOverZoneGroup(null);
|
|
24486
24747
|
}, [handleDragEnd]);
|
|
24487
|
-
const wrapContainer =
|
|
24748
|
+
const wrapContainer = React86__default.useCallback(
|
|
24488
24749
|
(children) => {
|
|
24489
24750
|
if (!enabled) return children;
|
|
24490
24751
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -24538,7 +24799,7 @@ var init_useDataDnd = __esm({
|
|
|
24538
24799
|
init_useAlmadarDndCollision();
|
|
24539
24800
|
init_Box();
|
|
24540
24801
|
dndLog = createLogger("almadar:ui:dnd");
|
|
24541
|
-
RootCtx =
|
|
24802
|
+
RootCtx = React86__default.createContext(null);
|
|
24542
24803
|
}
|
|
24543
24804
|
});
|
|
24544
24805
|
function renderIconInput(icon, props) {
|
|
@@ -25064,7 +25325,7 @@ function DataList({
|
|
|
25064
25325
|
}) {
|
|
25065
25326
|
const eventBus = useEventBus();
|
|
25066
25327
|
const { t } = useTranslate();
|
|
25067
|
-
const [visibleCount, setVisibleCount] =
|
|
25328
|
+
const [visibleCount, setVisibleCount] = React86__default.useState(pageSize || Infinity);
|
|
25068
25329
|
const fieldDefs = fields ?? columns ?? [];
|
|
25069
25330
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
25070
25331
|
const dnd = useDataDnd({
|
|
@@ -25083,7 +25344,7 @@ function DataList({
|
|
|
25083
25344
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
25084
25345
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
25085
25346
|
const hasRenderProp = typeof children === "function";
|
|
25086
|
-
|
|
25347
|
+
React86__default.useEffect(() => {
|
|
25087
25348
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
25088
25349
|
const childrenTypeOf = typeof children;
|
|
25089
25350
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -25188,7 +25449,7 @@ function DataList({
|
|
|
25188
25449
|
const items2 = data.map((item) => item);
|
|
25189
25450
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
25190
25451
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
25191
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
25452
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
25192
25453
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
25193
25454
|
group.items.map((itemData, index) => {
|
|
25194
25455
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -25329,7 +25590,7 @@ function DataList({
|
|
|
25329
25590
|
className
|
|
25330
25591
|
),
|
|
25331
25592
|
children: [
|
|
25332
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
25593
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
25333
25594
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
25334
25595
|
group.items.map(
|
|
25335
25596
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -26245,7 +26506,7 @@ var init_Grid = __esm({
|
|
|
26245
26506
|
as: Component2 = "div"
|
|
26246
26507
|
}) => {
|
|
26247
26508
|
const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
|
|
26248
|
-
return
|
|
26509
|
+
return React86__default.createElement(
|
|
26249
26510
|
Component2,
|
|
26250
26511
|
{
|
|
26251
26512
|
className: cn(
|
|
@@ -26441,9 +26702,9 @@ var init_Popover = __esm({
|
|
|
26441
26702
|
onMouseLeave: handleClose,
|
|
26442
26703
|
onPointerDown: tapTriggerProps.onPointerDown
|
|
26443
26704
|
};
|
|
26444
|
-
const childElement =
|
|
26705
|
+
const childElement = React86__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
26445
26706
|
const childPointerDown = childElement.props.onPointerDown;
|
|
26446
|
-
const triggerElement =
|
|
26707
|
+
const triggerElement = React86__default.cloneElement(
|
|
26447
26708
|
childElement,
|
|
26448
26709
|
{
|
|
26449
26710
|
ref: triggerRef,
|
|
@@ -27045,9 +27306,9 @@ var init_Tooltip = __esm({
|
|
|
27045
27306
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
27046
27307
|
};
|
|
27047
27308
|
}, []);
|
|
27048
|
-
const triggerElement =
|
|
27309
|
+
const triggerElement = React86__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
27049
27310
|
const childPointerDown = triggerElement.props.onPointerDown;
|
|
27050
|
-
const trigger =
|
|
27311
|
+
const trigger = React86__default.cloneElement(triggerElement, {
|
|
27051
27312
|
ref: triggerRef,
|
|
27052
27313
|
onMouseEnter: handleMouseEnter,
|
|
27053
27314
|
onMouseLeave: handleMouseLeave,
|
|
@@ -27137,7 +27398,7 @@ var init_WizardProgress = __esm({
|
|
|
27137
27398
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
27138
27399
|
const isActive = index === currentStep;
|
|
27139
27400
|
const isCompleted = index < currentStep;
|
|
27140
|
-
return /* @__PURE__ */ jsxs(
|
|
27401
|
+
return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
27141
27402
|
/* @__PURE__ */ jsx(
|
|
27142
27403
|
"button",
|
|
27143
27404
|
{
|
|
@@ -28200,7 +28461,7 @@ function InventoryGrid({
|
|
|
28200
28461
|
const eventBus = useEventBus();
|
|
28201
28462
|
const slotCount = totalSlots ?? items.length;
|
|
28202
28463
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
28203
|
-
const handleSelect =
|
|
28464
|
+
const handleSelect = React86.useCallback(
|
|
28204
28465
|
(id) => {
|
|
28205
28466
|
onSelect?.(id);
|
|
28206
28467
|
if (selectEvent) {
|
|
@@ -28435,31 +28696,31 @@ function GameCanvas2D({
|
|
|
28435
28696
|
assetBaseUrl,
|
|
28436
28697
|
className
|
|
28437
28698
|
}) {
|
|
28438
|
-
const canvasRef =
|
|
28439
|
-
const rafRef =
|
|
28440
|
-
const frameRef =
|
|
28441
|
-
const lastTimeRef =
|
|
28442
|
-
const imageCache =
|
|
28699
|
+
const canvasRef = React86.useRef(null);
|
|
28700
|
+
const rafRef = React86.useRef(0);
|
|
28701
|
+
const frameRef = React86.useRef(0);
|
|
28702
|
+
const lastTimeRef = React86.useRef(0);
|
|
28703
|
+
const imageCache = React86.useRef(/* @__PURE__ */ new Map());
|
|
28443
28704
|
const emit = useEmitEvent();
|
|
28444
|
-
const onDrawRef =
|
|
28705
|
+
const onDrawRef = React86.useRef(onDraw);
|
|
28445
28706
|
onDrawRef.current = onDraw;
|
|
28446
|
-
const onTickRef =
|
|
28707
|
+
const onTickRef = React86.useRef(onTick);
|
|
28447
28708
|
onTickRef.current = onTick;
|
|
28448
|
-
const tickEventRef =
|
|
28709
|
+
const tickEventRef = React86.useRef(tickEvent);
|
|
28449
28710
|
tickEventRef.current = tickEvent;
|
|
28450
|
-
const drawEventRef =
|
|
28711
|
+
const drawEventRef = React86.useRef(drawEvent);
|
|
28451
28712
|
drawEventRef.current = drawEvent;
|
|
28452
|
-
const emitRef =
|
|
28713
|
+
const emitRef = React86.useRef(emit);
|
|
28453
28714
|
emitRef.current = emit;
|
|
28454
|
-
const assetBaseUrlRef =
|
|
28715
|
+
const assetBaseUrlRef = React86.useRef(assetBaseUrl);
|
|
28455
28716
|
assetBaseUrlRef.current = assetBaseUrl;
|
|
28456
|
-
const backgroundImageRef =
|
|
28717
|
+
const backgroundImageRef = React86.useRef(backgroundImage);
|
|
28457
28718
|
backgroundImageRef.current = backgroundImage;
|
|
28458
|
-
const widthRef =
|
|
28719
|
+
const widthRef = React86.useRef(width);
|
|
28459
28720
|
widthRef.current = width;
|
|
28460
|
-
const heightRef =
|
|
28721
|
+
const heightRef = React86.useRef(height);
|
|
28461
28722
|
heightRef.current = height;
|
|
28462
|
-
const loadImage =
|
|
28723
|
+
const loadImage = React86.useCallback((url) => {
|
|
28463
28724
|
const base = assetBaseUrlRef.current;
|
|
28464
28725
|
if (!url.startsWith("http") && !base) return null;
|
|
28465
28726
|
const fullUrl = url.startsWith("http") ? url : `${base}${url}`;
|
|
@@ -28473,7 +28734,7 @@ function GameCanvas2D({
|
|
|
28473
28734
|
}
|
|
28474
28735
|
return null;
|
|
28475
28736
|
}, []);
|
|
28476
|
-
|
|
28737
|
+
React86.useEffect(() => {
|
|
28477
28738
|
const canvas = canvasRef.current;
|
|
28478
28739
|
if (!canvas) return;
|
|
28479
28740
|
const ctx = canvas.getContext("2d");
|
|
@@ -28798,7 +29059,7 @@ function TurnPanel({
|
|
|
28798
29059
|
className
|
|
28799
29060
|
}) {
|
|
28800
29061
|
const eventBus = useEventBus();
|
|
28801
|
-
const handleAction =
|
|
29062
|
+
const handleAction = React86.useCallback(
|
|
28802
29063
|
(event) => {
|
|
28803
29064
|
if (event) {
|
|
28804
29065
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -28979,7 +29240,7 @@ function UnitCommandBar({
|
|
|
28979
29240
|
className
|
|
28980
29241
|
}) {
|
|
28981
29242
|
const eventBus = useEventBus();
|
|
28982
|
-
const handleCommand =
|
|
29243
|
+
const handleCommand = React86.useCallback(
|
|
28983
29244
|
(event) => {
|
|
28984
29245
|
if (event) {
|
|
28985
29246
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -29530,7 +29791,7 @@ function GameMenu({
|
|
|
29530
29791
|
} catch {
|
|
29531
29792
|
}
|
|
29532
29793
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
29533
|
-
const handleOptionClick =
|
|
29794
|
+
const handleOptionClick = React86.useCallback(
|
|
29534
29795
|
(option) => {
|
|
29535
29796
|
if (option.event && eventBus) {
|
|
29536
29797
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -29649,7 +29910,7 @@ function GameOverScreen({
|
|
|
29649
29910
|
} catch {
|
|
29650
29911
|
}
|
|
29651
29912
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
29652
|
-
const handleActionClick =
|
|
29913
|
+
const handleActionClick = React86.useCallback(
|
|
29653
29914
|
(action) => {
|
|
29654
29915
|
if (action.event && eventBus) {
|
|
29655
29916
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -30581,13 +30842,13 @@ var init_MapView = __esm({
|
|
|
30581
30842
|
shadowSize: [41, 41]
|
|
30582
30843
|
});
|
|
30583
30844
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
30584
|
-
const { useEffect:
|
|
30845
|
+
const { useEffect: useEffect83, useRef: useRef80, useCallback: useCallback126, useState: useState113 } = React86__default;
|
|
30585
30846
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
30586
30847
|
const { useEventBus: useEventBus3 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
30587
30848
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
30588
30849
|
const map = useMap();
|
|
30589
30850
|
const prevRef = useRef80({ centerLat, centerLng, zoom });
|
|
30590
|
-
|
|
30851
|
+
useEffect83(() => {
|
|
30591
30852
|
const prev = prevRef.current;
|
|
30592
30853
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
30593
30854
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -30598,7 +30859,7 @@ var init_MapView = __esm({
|
|
|
30598
30859
|
}
|
|
30599
30860
|
function MapClickHandler({ onMapClick }) {
|
|
30600
30861
|
const map = useMap();
|
|
30601
|
-
|
|
30862
|
+
useEffect83(() => {
|
|
30602
30863
|
if (!onMapClick) return;
|
|
30603
30864
|
const handler = (e) => {
|
|
30604
30865
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -30626,8 +30887,8 @@ var init_MapView = __esm({
|
|
|
30626
30887
|
showAttribution = true
|
|
30627
30888
|
}) {
|
|
30628
30889
|
const eventBus = useEventBus3();
|
|
30629
|
-
const [clickedPosition, setClickedPosition] =
|
|
30630
|
-
const handleMapClick =
|
|
30890
|
+
const [clickedPosition, setClickedPosition] = useState113(null);
|
|
30891
|
+
const handleMapClick = useCallback126((lat, lng) => {
|
|
30631
30892
|
if (showClickedPin) {
|
|
30632
30893
|
setClickedPosition({ lat, lng });
|
|
30633
30894
|
}
|
|
@@ -30636,7 +30897,7 @@ var init_MapView = __esm({
|
|
|
30636
30897
|
eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
|
|
30637
30898
|
}
|
|
30638
30899
|
}, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
|
|
30639
|
-
const handleMarkerClick =
|
|
30900
|
+
const handleMarkerClick = useCallback126((marker) => {
|
|
30640
30901
|
onMarkerClick?.(marker);
|
|
30641
30902
|
if (markerClickEvent) {
|
|
30642
30903
|
eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
|
|
@@ -31487,8 +31748,8 @@ function TableView({
|
|
|
31487
31748
|
}) {
|
|
31488
31749
|
const eventBus = useEventBus();
|
|
31489
31750
|
const { t } = useTranslate();
|
|
31490
|
-
const [visibleCount, setVisibleCount] =
|
|
31491
|
-
const [localSelected, setLocalSelected] =
|
|
31751
|
+
const [visibleCount, setVisibleCount] = React86__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
31752
|
+
const [localSelected, setLocalSelected] = React86__default.useState(/* @__PURE__ */ new Set());
|
|
31492
31753
|
const colDefs = columns ?? fields ?? [];
|
|
31493
31754
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
31494
31755
|
const dnd = useDataDnd({
|
|
@@ -31683,12 +31944,12 @@ function TableView({
|
|
|
31683
31944
|
]
|
|
31684
31945
|
}
|
|
31685
31946
|
);
|
|
31686
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
31947
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React86__default.Fragment, { children: rowInner }, id);
|
|
31687
31948
|
};
|
|
31688
31949
|
const items = data.map((row) => row);
|
|
31689
31950
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
31690
31951
|
let runningIndex = 0;
|
|
31691
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
31952
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
31692
31953
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
31693
31954
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
31694
31955
|
] }, gi)) });
|
|
@@ -33045,7 +33306,7 @@ var init_StepFlow = __esm({
|
|
|
33045
33306
|
className
|
|
33046
33307
|
}) => {
|
|
33047
33308
|
if (orientation === "vertical") {
|
|
33048
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
33309
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React86__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
33049
33310
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
33050
33311
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
33051
33312
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -33056,7 +33317,7 @@ var init_StepFlow = __esm({
|
|
|
33056
33317
|
] })
|
|
33057
33318
|
] }) }, index)) });
|
|
33058
33319
|
}
|
|
33059
|
-
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(
|
|
33320
|
+
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(React86__default.Fragment, { children: [
|
|
33060
33321
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
33061
33322
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
33062
33323
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -34041,7 +34302,7 @@ var init_LikertScale = __esm({
|
|
|
34041
34302
|
md: "text-base",
|
|
34042
34303
|
lg: "text-lg"
|
|
34043
34304
|
};
|
|
34044
|
-
LikertScale =
|
|
34305
|
+
LikertScale = React86__default.forwardRef(
|
|
34045
34306
|
({
|
|
34046
34307
|
question,
|
|
34047
34308
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -34053,7 +34314,7 @@ var init_LikertScale = __esm({
|
|
|
34053
34314
|
variant = "radios",
|
|
34054
34315
|
className
|
|
34055
34316
|
}, ref) => {
|
|
34056
|
-
const groupId =
|
|
34317
|
+
const groupId = React86__default.useId();
|
|
34057
34318
|
const eventBus = useEventBus();
|
|
34058
34319
|
const handleSelect = useCallback(
|
|
34059
34320
|
(next) => {
|
|
@@ -36335,7 +36596,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
36335
36596
|
"aria-label": t("aria.breadcrumb"),
|
|
36336
36597
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
36337
36598
|
const isLast = idx === items.length - 1;
|
|
36338
|
-
return /* @__PURE__ */ jsxs(
|
|
36599
|
+
return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
36339
36600
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
36340
36601
|
Icon,
|
|
36341
36602
|
{
|
|
@@ -37204,7 +37465,7 @@ var init_MiniStateMachine = __esm({
|
|
|
37204
37465
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
37205
37466
|
const tc = transitionCounts[s.name] ?? 0;
|
|
37206
37467
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
37207
|
-
return /* @__PURE__ */ jsxs(
|
|
37468
|
+
return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
37208
37469
|
/* @__PURE__ */ jsx(
|
|
37209
37470
|
AvlState,
|
|
37210
37471
|
{
|
|
@@ -37408,7 +37669,7 @@ var init_PageHeader = __esm({
|
|
|
37408
37669
|
info: "bg-info/10 text-info"
|
|
37409
37670
|
};
|
|
37410
37671
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
37411
|
-
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(
|
|
37672
|
+
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(React86__default.Fragment, { children: [
|
|
37412
37673
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
37413
37674
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
37414
37675
|
"a",
|
|
@@ -38137,7 +38398,7 @@ var init_WizardContainer = __esm({
|
|
|
38137
38398
|
const isCompleted = index < currentStep;
|
|
38138
38399
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
38139
38400
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
38140
|
-
return /* @__PURE__ */ jsxs(
|
|
38401
|
+
return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
38141
38402
|
/* @__PURE__ */ jsx(
|
|
38142
38403
|
Button,
|
|
38143
38404
|
{
|
|
@@ -40697,7 +40958,7 @@ var init_DetailPanel = __esm({
|
|
|
40697
40958
|
}
|
|
40698
40959
|
});
|
|
40699
40960
|
function extractTitle(children) {
|
|
40700
|
-
if (!
|
|
40961
|
+
if (!React86__default.isValidElement(children)) return void 0;
|
|
40701
40962
|
const props = children.props;
|
|
40702
40963
|
if (typeof props.title === "string") {
|
|
40703
40964
|
return props.title;
|
|
@@ -40752,7 +41013,7 @@ function LinearView({
|
|
|
40752
41013
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
40753
41014
|
const isDone = i < currentIdx;
|
|
40754
41015
|
const isCurrent = i === currentIdx;
|
|
40755
|
-
return /* @__PURE__ */ jsxs(
|
|
41016
|
+
return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
40756
41017
|
i > 0 && /* @__PURE__ */ jsx(
|
|
40757
41018
|
Typography,
|
|
40758
41019
|
{
|
|
@@ -41521,6 +41782,42 @@ var init_FeatureGridOrganism = __esm({
|
|
|
41521
41782
|
FeatureGridOrganism.displayName = "FeatureGridOrganism";
|
|
41522
41783
|
}
|
|
41523
41784
|
});
|
|
41785
|
+
function FishingBoard({
|
|
41786
|
+
backgroundImage,
|
|
41787
|
+
assetBaseUrl,
|
|
41788
|
+
scale = 1,
|
|
41789
|
+
showMinimap = false,
|
|
41790
|
+
enableCamera = true,
|
|
41791
|
+
width = 800,
|
|
41792
|
+
height = 600,
|
|
41793
|
+
isLoading,
|
|
41794
|
+
error,
|
|
41795
|
+
className
|
|
41796
|
+
}) {
|
|
41797
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("fishing-board relative w-full h-full", className), children: [
|
|
41798
|
+
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" }) }),
|
|
41799
|
+
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 }) }),
|
|
41800
|
+
/* @__PURE__ */ jsx(
|
|
41801
|
+
GameCanvas2D,
|
|
41802
|
+
{
|
|
41803
|
+
width,
|
|
41804
|
+
height,
|
|
41805
|
+
backgroundImage: backgroundImage ?? "",
|
|
41806
|
+
assetBaseUrl,
|
|
41807
|
+
fps: 60,
|
|
41808
|
+
className: "w-full h-full"
|
|
41809
|
+
}
|
|
41810
|
+
)
|
|
41811
|
+
] });
|
|
41812
|
+
}
|
|
41813
|
+
var init_FishingBoard = __esm({
|
|
41814
|
+
"components/game/organisms/FishingBoard.tsx"() {
|
|
41815
|
+
"use client";
|
|
41816
|
+
init_cn();
|
|
41817
|
+
init_GameCanvas2D();
|
|
41818
|
+
FishingBoard.displayName = "FishingBoard";
|
|
41819
|
+
}
|
|
41820
|
+
});
|
|
41524
41821
|
function toSharedContext2(formCtx) {
|
|
41525
41822
|
return createMinimalContext(
|
|
41526
41823
|
{
|
|
@@ -41702,12 +41999,12 @@ var init_Form = __esm({
|
|
|
41702
41999
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
41703
42000
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
41704
42001
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
41705
|
-
const normalizedInitialData =
|
|
42002
|
+
const normalizedInitialData = React86__default.useMemo(() => {
|
|
41706
42003
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
41707
42004
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
41708
42005
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
41709
42006
|
}, [entity, initialData]);
|
|
41710
|
-
const entityDerivedFields =
|
|
42007
|
+
const entityDerivedFields = React86__default.useMemo(() => {
|
|
41711
42008
|
if (fields && fields.length > 0) return void 0;
|
|
41712
42009
|
if (!resolvedEntity) return void 0;
|
|
41713
42010
|
return resolvedEntity.fields.map(
|
|
@@ -41727,16 +42024,16 @@ var init_Form = __esm({
|
|
|
41727
42024
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
41728
42025
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
41729
42026
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
41730
|
-
const [formData, setFormData] =
|
|
42027
|
+
const [formData, setFormData] = React86__default.useState(
|
|
41731
42028
|
normalizedInitialData
|
|
41732
42029
|
);
|
|
41733
|
-
const [collapsedSections, setCollapsedSections] =
|
|
42030
|
+
const [collapsedSections, setCollapsedSections] = React86__default.useState(
|
|
41734
42031
|
/* @__PURE__ */ new Set()
|
|
41735
42032
|
);
|
|
41736
|
-
const [submitError, setSubmitError] =
|
|
41737
|
-
const formRef =
|
|
42033
|
+
const [submitError, setSubmitError] = React86__default.useState(null);
|
|
42034
|
+
const formRef = React86__default.useRef(null);
|
|
41738
42035
|
const formMode = props.mode;
|
|
41739
|
-
const mountedRef =
|
|
42036
|
+
const mountedRef = React86__default.useRef(false);
|
|
41740
42037
|
if (!mountedRef.current) {
|
|
41741
42038
|
mountedRef.current = true;
|
|
41742
42039
|
debug("forms", "mount", {
|
|
@@ -41749,7 +42046,7 @@ var init_Form = __esm({
|
|
|
41749
42046
|
});
|
|
41750
42047
|
}
|
|
41751
42048
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
41752
|
-
const evalContext =
|
|
42049
|
+
const evalContext = React86__default.useMemo(
|
|
41753
42050
|
() => ({
|
|
41754
42051
|
formValues: formData,
|
|
41755
42052
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -41758,7 +42055,7 @@ var init_Form = __esm({
|
|
|
41758
42055
|
}),
|
|
41759
42056
|
[formData, externalContext]
|
|
41760
42057
|
);
|
|
41761
|
-
|
|
42058
|
+
React86__default.useEffect(() => {
|
|
41762
42059
|
debug("forms", "initialData-sync", {
|
|
41763
42060
|
mode: formMode,
|
|
41764
42061
|
normalizedInitialData,
|
|
@@ -41769,7 +42066,7 @@ var init_Form = __esm({
|
|
|
41769
42066
|
setFormData(normalizedInitialData);
|
|
41770
42067
|
}
|
|
41771
42068
|
}, [normalizedInitialData]);
|
|
41772
|
-
const processCalculations =
|
|
42069
|
+
const processCalculations = React86__default.useCallback(
|
|
41773
42070
|
(changedFieldId, newFormData) => {
|
|
41774
42071
|
if (!hiddenCalculations.length) return;
|
|
41775
42072
|
const context = {
|
|
@@ -41794,7 +42091,7 @@ var init_Form = __esm({
|
|
|
41794
42091
|
},
|
|
41795
42092
|
[hiddenCalculations, externalContext, eventBus]
|
|
41796
42093
|
);
|
|
41797
|
-
const checkViolations =
|
|
42094
|
+
const checkViolations = React86__default.useCallback(
|
|
41798
42095
|
(changedFieldId, newFormData) => {
|
|
41799
42096
|
if (!violationTriggers.length) return;
|
|
41800
42097
|
const context = {
|
|
@@ -41832,7 +42129,7 @@ var init_Form = __esm({
|
|
|
41832
42129
|
processCalculations(name, newFormData);
|
|
41833
42130
|
checkViolations(name, newFormData);
|
|
41834
42131
|
};
|
|
41835
|
-
const isFieldVisible =
|
|
42132
|
+
const isFieldVisible = React86__default.useCallback(
|
|
41836
42133
|
(fieldName) => {
|
|
41837
42134
|
const condition = conditionalFields[fieldName];
|
|
41838
42135
|
if (!condition) return true;
|
|
@@ -41840,7 +42137,7 @@ var init_Form = __esm({
|
|
|
41840
42137
|
},
|
|
41841
42138
|
[conditionalFields, evalContext]
|
|
41842
42139
|
);
|
|
41843
|
-
const isSectionVisible =
|
|
42140
|
+
const isSectionVisible = React86__default.useCallback(
|
|
41844
42141
|
(section) => {
|
|
41845
42142
|
if (!section.condition) return true;
|
|
41846
42143
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -41916,7 +42213,7 @@ var init_Form = __esm({
|
|
|
41916
42213
|
eventBus.emit(`UI:${onCancel}`);
|
|
41917
42214
|
}
|
|
41918
42215
|
};
|
|
41919
|
-
const renderField =
|
|
42216
|
+
const renderField = React86__default.useCallback(
|
|
41920
42217
|
(field) => {
|
|
41921
42218
|
const fieldName = field.name || field.field;
|
|
41922
42219
|
if (!fieldName) return null;
|
|
@@ -41937,7 +42234,7 @@ var init_Form = __esm({
|
|
|
41937
42234
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
41938
42235
|
);
|
|
41939
42236
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
41940
|
-
const normalizedFields =
|
|
42237
|
+
const normalizedFields = React86__default.useMemo(() => {
|
|
41941
42238
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
41942
42239
|
return effectiveFields.map((field) => {
|
|
41943
42240
|
if (typeof field === "string") {
|
|
@@ -41960,7 +42257,7 @@ var init_Form = __esm({
|
|
|
41960
42257
|
return field;
|
|
41961
42258
|
});
|
|
41962
42259
|
}, [effectiveFields, resolvedEntity]);
|
|
41963
|
-
const schemaFields =
|
|
42260
|
+
const schemaFields = React86__default.useMemo(() => {
|
|
41964
42261
|
if (normalizedFields.length === 0) return null;
|
|
41965
42262
|
if (isDebugEnabled()) {
|
|
41966
42263
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -41970,7 +42267,7 @@ var init_Form = __esm({
|
|
|
41970
42267
|
}
|
|
41971
42268
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
41972
42269
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
41973
|
-
const sectionElements =
|
|
42270
|
+
const sectionElements = React86__default.useMemo(() => {
|
|
41974
42271
|
if (!sections || sections.length === 0) return null;
|
|
41975
42272
|
return sections.map((section) => {
|
|
41976
42273
|
if (!isSectionVisible(section)) {
|
|
@@ -44234,10 +44531,10 @@ function getSlotContentRenderer2() {
|
|
|
44234
44531
|
}
|
|
44235
44532
|
function resolveDescriptor(value, idPrefix) {
|
|
44236
44533
|
if (value === null || value === void 0) return value;
|
|
44237
|
-
if (
|
|
44534
|
+
if (React86__default.isValidElement(value)) return value;
|
|
44238
44535
|
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
|
|
44239
44536
|
if (Array.isArray(value)) {
|
|
44240
|
-
return value.map((item, i) => /* @__PURE__ */ jsx(
|
|
44537
|
+
return value.map((item, i) => /* @__PURE__ */ jsx(React86__default.Fragment, { children: resolveDescriptor(item, `${idPrefix}-${i}`) }, i));
|
|
44241
44538
|
}
|
|
44242
44539
|
if (typeof value === "object") {
|
|
44243
44540
|
const rec = value;
|
|
@@ -44338,10 +44635,10 @@ function getSlotContentRenderer3() {
|
|
|
44338
44635
|
}
|
|
44339
44636
|
function resolveDescriptor2(value, idPrefix) {
|
|
44340
44637
|
if (value === null || value === void 0) return value;
|
|
44341
|
-
if (
|
|
44638
|
+
if (React86__default.isValidElement(value)) return value;
|
|
44342
44639
|
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
|
|
44343
44640
|
if (Array.isArray(value)) {
|
|
44344
|
-
return value.map((item, i) => /* @__PURE__ */ jsx(
|
|
44641
|
+
return value.map((item, i) => /* @__PURE__ */ jsx(React86__default.Fragment, { children: resolveDescriptor2(item, `${idPrefix}-${i}`) }, i));
|
|
44345
44642
|
}
|
|
44346
44643
|
if (typeof value === "object") {
|
|
44347
44644
|
const rec = value;
|
|
@@ -44674,6 +44971,39 @@ var init_HexStrategyBoard = __esm({
|
|
|
44674
44971
|
HexStrategyBoard.displayName = "HexStrategyBoard";
|
|
44675
44972
|
}
|
|
44676
44973
|
});
|
|
44974
|
+
function HolidayRunnerBoard({
|
|
44975
|
+
backgroundImage,
|
|
44976
|
+
assetBaseUrl,
|
|
44977
|
+
width = 800,
|
|
44978
|
+
height = 400,
|
|
44979
|
+
fps = 60,
|
|
44980
|
+
isLoading,
|
|
44981
|
+
error,
|
|
44982
|
+
className
|
|
44983
|
+
}) {
|
|
44984
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("holiday-runner-board relative w-full h-full", className), children: [
|
|
44985
|
+
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" }) }),
|
|
44986
|
+
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 }) }),
|
|
44987
|
+
/* @__PURE__ */ jsx(
|
|
44988
|
+
GameCanvas2D,
|
|
44989
|
+
{
|
|
44990
|
+
width,
|
|
44991
|
+
height,
|
|
44992
|
+
fps,
|
|
44993
|
+
backgroundImage: backgroundImage ?? "",
|
|
44994
|
+
assetBaseUrl
|
|
44995
|
+
}
|
|
44996
|
+
)
|
|
44997
|
+
] });
|
|
44998
|
+
}
|
|
44999
|
+
var init_HolidayRunnerBoard = __esm({
|
|
45000
|
+
"components/game/organisms/HolidayRunnerBoard.tsx"() {
|
|
45001
|
+
"use client";
|
|
45002
|
+
init_cn();
|
|
45003
|
+
init_GameCanvas2D();
|
|
45004
|
+
HolidayRunnerBoard.displayName = "HolidayRunnerBoard";
|
|
45005
|
+
}
|
|
45006
|
+
});
|
|
44677
45007
|
var LandingPageTemplate;
|
|
44678
45008
|
var init_LandingPageTemplate = __esm({
|
|
44679
45009
|
"components/marketing/templates/LandingPageTemplate.tsx"() {
|
|
@@ -45009,7 +45339,7 @@ var init_List = __esm({
|
|
|
45009
45339
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
45010
45340
|
return [];
|
|
45011
45341
|
}, [entity]);
|
|
45012
|
-
const getItemActions =
|
|
45342
|
+
const getItemActions = React86__default.useCallback(
|
|
45013
45343
|
(item) => {
|
|
45014
45344
|
if (!itemActions) return [];
|
|
45015
45345
|
if (typeof itemActions === "function") {
|
|
@@ -45428,6 +45758,48 @@ var init_MasterDetailLayout = __esm({
|
|
|
45428
45758
|
MasterDetailLayout.displayName = "MasterDetailLayout";
|
|
45429
45759
|
}
|
|
45430
45760
|
});
|
|
45761
|
+
function MatchPuzzleBoard({
|
|
45762
|
+
tiles,
|
|
45763
|
+
units,
|
|
45764
|
+
features,
|
|
45765
|
+
assetManifest,
|
|
45766
|
+
assetBaseUrl,
|
|
45767
|
+
scale = 0.45,
|
|
45768
|
+
showMinimap = false,
|
|
45769
|
+
enableCamera = false,
|
|
45770
|
+
tileClickEvent,
|
|
45771
|
+
unitClickEvent,
|
|
45772
|
+
isLoading,
|
|
45773
|
+
error,
|
|
45774
|
+
className
|
|
45775
|
+
}) {
|
|
45776
|
+
return /* @__PURE__ */ jsx("div", { className: cn("match-puzzle-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
45777
|
+
IsometricCanvas_default,
|
|
45778
|
+
{
|
|
45779
|
+
tileLayout: "flat",
|
|
45780
|
+
tiles,
|
|
45781
|
+
units,
|
|
45782
|
+
features,
|
|
45783
|
+
assetManifest,
|
|
45784
|
+
assetBaseUrl,
|
|
45785
|
+
scale,
|
|
45786
|
+
showMinimap,
|
|
45787
|
+
enableCamera,
|
|
45788
|
+
tileClickEvent,
|
|
45789
|
+
unitClickEvent,
|
|
45790
|
+
isLoading,
|
|
45791
|
+
error
|
|
45792
|
+
}
|
|
45793
|
+
) });
|
|
45794
|
+
}
|
|
45795
|
+
var init_MatchPuzzleBoard = __esm({
|
|
45796
|
+
"components/game/organisms/MatchPuzzleBoard.tsx"() {
|
|
45797
|
+
"use client";
|
|
45798
|
+
init_cn();
|
|
45799
|
+
init_IsometricCanvas();
|
|
45800
|
+
MatchPuzzleBoard.displayName = "MatchPuzzleBoard";
|
|
45801
|
+
}
|
|
45802
|
+
});
|
|
45431
45803
|
var COLUMN_CLASSES, ASPECT_CLASSES, MediaGallery;
|
|
45432
45804
|
var init_MediaGallery = __esm({
|
|
45433
45805
|
"components/core/organisms/MediaGallery.tsx"() {
|
|
@@ -45485,7 +45857,7 @@ var init_MediaGallery = __esm({
|
|
|
45485
45857
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
45486
45858
|
);
|
|
45487
45859
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
45488
|
-
const items =
|
|
45860
|
+
const items = React86__default.useMemo(() => {
|
|
45489
45861
|
if (propItems) return propItems;
|
|
45490
45862
|
if (entityData.length === 0) return [];
|
|
45491
45863
|
return entityData.map((record, idx) => ({
|
|
@@ -45645,8 +46017,50 @@ var init_MediaGallery = __esm({
|
|
|
45645
46017
|
MediaGallery.displayName = "MediaGallery";
|
|
45646
46018
|
}
|
|
45647
46019
|
});
|
|
46020
|
+
function MinigolfBoard({
|
|
46021
|
+
tiles,
|
|
46022
|
+
units,
|
|
46023
|
+
features,
|
|
46024
|
+
assetManifest,
|
|
46025
|
+
assetBaseUrl,
|
|
46026
|
+
scale = 0.45,
|
|
46027
|
+
showMinimap = true,
|
|
46028
|
+
enableCamera = true,
|
|
46029
|
+
tileClickEvent,
|
|
46030
|
+
unitClickEvent,
|
|
46031
|
+
isLoading,
|
|
46032
|
+
error,
|
|
46033
|
+
className
|
|
46034
|
+
}) {
|
|
46035
|
+
return /* @__PURE__ */ jsx("div", { className: cn("minigolf-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
46036
|
+
IsometricCanvas_default,
|
|
46037
|
+
{
|
|
46038
|
+
tileLayout: "isometric",
|
|
46039
|
+
tiles,
|
|
46040
|
+
units,
|
|
46041
|
+
features,
|
|
46042
|
+
assetManifest,
|
|
46043
|
+
assetBaseUrl,
|
|
46044
|
+
scale,
|
|
46045
|
+
showMinimap,
|
|
46046
|
+
enableCamera,
|
|
46047
|
+
tileClickEvent,
|
|
46048
|
+
unitClickEvent,
|
|
46049
|
+
isLoading,
|
|
46050
|
+
error
|
|
46051
|
+
}
|
|
46052
|
+
) });
|
|
46053
|
+
}
|
|
46054
|
+
var init_MinigolfBoard = __esm({
|
|
46055
|
+
"components/game/organisms/MinigolfBoard.tsx"() {
|
|
46056
|
+
"use client";
|
|
46057
|
+
init_cn();
|
|
46058
|
+
init_IsometricCanvas();
|
|
46059
|
+
MinigolfBoard.displayName = "MinigolfBoard";
|
|
46060
|
+
}
|
|
46061
|
+
});
|
|
45648
46062
|
function extractTitle2(children) {
|
|
45649
|
-
if (!
|
|
46063
|
+
if (!React86__default.isValidElement(children)) return void 0;
|
|
45650
46064
|
const props = children.props;
|
|
45651
46065
|
if (typeof props.title === "string") {
|
|
45652
46066
|
return props.title;
|
|
@@ -45862,6 +46276,87 @@ var init_NegotiatorBoard = __esm({
|
|
|
45862
46276
|
NegotiatorBoard.displayName = "NegotiatorBoard";
|
|
45863
46277
|
}
|
|
45864
46278
|
});
|
|
46279
|
+
function PinballBoard({
|
|
46280
|
+
tiles: _tiles,
|
|
46281
|
+
units: _units,
|
|
46282
|
+
features: _features,
|
|
46283
|
+
assetManifest: _assetManifest,
|
|
46284
|
+
assetBaseUrl,
|
|
46285
|
+
scale = 1,
|
|
46286
|
+
showMinimap: _showMinimap = false,
|
|
46287
|
+
enableCamera: _enableCamera = false,
|
|
46288
|
+
tileClickEvent: _tileClickEvent,
|
|
46289
|
+
unitClickEvent: _unitClickEvent,
|
|
46290
|
+
isLoading,
|
|
46291
|
+
error,
|
|
46292
|
+
className
|
|
46293
|
+
}) {
|
|
46294
|
+
if (isLoading) {
|
|
46295
|
+
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..." }) });
|
|
46296
|
+
}
|
|
46297
|
+
if (error) {
|
|
46298
|
+
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 }) });
|
|
46299
|
+
}
|
|
46300
|
+
return /* @__PURE__ */ jsx("div", { className: cn("pinball-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
46301
|
+
GameCanvas2D,
|
|
46302
|
+
{
|
|
46303
|
+
width: Math.round(400 * scale),
|
|
46304
|
+
height: Math.round(800 * scale),
|
|
46305
|
+
assetBaseUrl,
|
|
46306
|
+
fps: 60
|
|
46307
|
+
}
|
|
46308
|
+
) });
|
|
46309
|
+
}
|
|
46310
|
+
var init_PinballBoard = __esm({
|
|
46311
|
+
"components/game/organisms/PinballBoard.tsx"() {
|
|
46312
|
+
"use client";
|
|
46313
|
+
init_cn();
|
|
46314
|
+
init_GameCanvas2D();
|
|
46315
|
+
PinballBoard.displayName = "PinballBoard";
|
|
46316
|
+
}
|
|
46317
|
+
});
|
|
46318
|
+
function PirateBoard({
|
|
46319
|
+
tiles,
|
|
46320
|
+
units,
|
|
46321
|
+
features,
|
|
46322
|
+
assetManifest,
|
|
46323
|
+
assetBaseUrl,
|
|
46324
|
+
scale = 0.45,
|
|
46325
|
+
showMinimap = true,
|
|
46326
|
+
enableCamera = true,
|
|
46327
|
+
tileClickEvent,
|
|
46328
|
+
unitClickEvent,
|
|
46329
|
+
isLoading,
|
|
46330
|
+
error,
|
|
46331
|
+
className
|
|
46332
|
+
}) {
|
|
46333
|
+
return /* @__PURE__ */ jsx("div", { className: cn("pirate-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
46334
|
+
IsometricCanvas_default,
|
|
46335
|
+
{
|
|
46336
|
+
tileLayout: "flat",
|
|
46337
|
+
tiles,
|
|
46338
|
+
units,
|
|
46339
|
+
features,
|
|
46340
|
+
assetManifest,
|
|
46341
|
+
assetBaseUrl,
|
|
46342
|
+
scale,
|
|
46343
|
+
showMinimap,
|
|
46344
|
+
enableCamera,
|
|
46345
|
+
tileClickEvent,
|
|
46346
|
+
unitClickEvent,
|
|
46347
|
+
isLoading,
|
|
46348
|
+
error
|
|
46349
|
+
}
|
|
46350
|
+
) });
|
|
46351
|
+
}
|
|
46352
|
+
var init_PirateBoard = __esm({
|
|
46353
|
+
"components/game/organisms/PirateBoard.tsx"() {
|
|
46354
|
+
"use client";
|
|
46355
|
+
init_cn();
|
|
46356
|
+
init_IsometricCanvas();
|
|
46357
|
+
PirateBoard.displayName = "PirateBoard";
|
|
46358
|
+
}
|
|
46359
|
+
});
|
|
45865
46360
|
function resolveEntity(entity) {
|
|
45866
46361
|
if (!entity) return {};
|
|
45867
46362
|
if (Array.isArray(entity)) return entity[0] ?? {};
|
|
@@ -46222,6 +46717,37 @@ var init_PricingPageTemplate = __esm({
|
|
|
46222
46717
|
PricingPageTemplate.displayName = "PricingPageTemplate";
|
|
46223
46718
|
}
|
|
46224
46719
|
});
|
|
46720
|
+
function RacingBoard({
|
|
46721
|
+
backgroundImage,
|
|
46722
|
+
assetBaseUrl,
|
|
46723
|
+
width = 800,
|
|
46724
|
+
height = 600,
|
|
46725
|
+
fps = 60,
|
|
46726
|
+
tickEvent,
|
|
46727
|
+
drawEvent,
|
|
46728
|
+
className
|
|
46729
|
+
}) {
|
|
46730
|
+
return /* @__PURE__ */ jsx("div", { className: cn("racing-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
46731
|
+
GameCanvas2D,
|
|
46732
|
+
{
|
|
46733
|
+
backgroundImage,
|
|
46734
|
+
assetBaseUrl,
|
|
46735
|
+
width,
|
|
46736
|
+
height,
|
|
46737
|
+
fps,
|
|
46738
|
+
tickEvent: typeof tickEvent === "string" ? tickEvent : void 0,
|
|
46739
|
+
drawEvent: typeof drawEvent === "string" ? drawEvent : void 0
|
|
46740
|
+
}
|
|
46741
|
+
) });
|
|
46742
|
+
}
|
|
46743
|
+
var init_RacingBoard = __esm({
|
|
46744
|
+
"components/game/organisms/RacingBoard.tsx"() {
|
|
46745
|
+
"use client";
|
|
46746
|
+
init_cn();
|
|
46747
|
+
init_GameCanvas2D();
|
|
46748
|
+
RacingBoard.displayName = "RacingBoard";
|
|
46749
|
+
}
|
|
46750
|
+
});
|
|
46225
46751
|
function resolveManifestUrl3(manifest, relative) {
|
|
46226
46752
|
if (relative == null) return void 0;
|
|
46227
46753
|
if (/^https?:\/\//.test(relative)) return relative;
|
|
@@ -46697,7 +47223,7 @@ var init_debugRegistry = __esm({
|
|
|
46697
47223
|
}
|
|
46698
47224
|
});
|
|
46699
47225
|
function useDebugData() {
|
|
46700
|
-
const [data, setData] =
|
|
47226
|
+
const [data, setData] = React86.useState(() => ({
|
|
46701
47227
|
traits: [],
|
|
46702
47228
|
ticks: [],
|
|
46703
47229
|
guards: [],
|
|
@@ -46711,7 +47237,7 @@ function useDebugData() {
|
|
|
46711
47237
|
},
|
|
46712
47238
|
lastUpdate: Date.now()
|
|
46713
47239
|
}));
|
|
46714
|
-
|
|
47240
|
+
React86.useEffect(() => {
|
|
46715
47241
|
const updateData = () => {
|
|
46716
47242
|
setData({
|
|
46717
47243
|
traits: getAllTraits(),
|
|
@@ -46820,12 +47346,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
46820
47346
|
return positions;
|
|
46821
47347
|
}
|
|
46822
47348
|
function WalkMinimap() {
|
|
46823
|
-
const [walkStep, setWalkStep] =
|
|
46824
|
-
const [traits2, setTraits] =
|
|
46825
|
-
const [coveredEdges, setCoveredEdges] =
|
|
46826
|
-
const [completedTraits, setCompletedTraits] =
|
|
46827
|
-
const prevTraitRef =
|
|
46828
|
-
|
|
47349
|
+
const [walkStep, setWalkStep] = React86.useState(null);
|
|
47350
|
+
const [traits2, setTraits] = React86.useState([]);
|
|
47351
|
+
const [coveredEdges, setCoveredEdges] = React86.useState([]);
|
|
47352
|
+
const [completedTraits, setCompletedTraits] = React86.useState(/* @__PURE__ */ new Set());
|
|
47353
|
+
const prevTraitRef = React86.useRef(null);
|
|
47354
|
+
React86.useEffect(() => {
|
|
46829
47355
|
const interval = setInterval(() => {
|
|
46830
47356
|
const w = window;
|
|
46831
47357
|
const step = w.__orbitalWalkStep;
|
|
@@ -47261,15 +47787,15 @@ var init_EntitiesTab = __esm({
|
|
|
47261
47787
|
});
|
|
47262
47788
|
function EventFlowTab({ events: events2 }) {
|
|
47263
47789
|
const { t } = useTranslate();
|
|
47264
|
-
const [filter, setFilter] =
|
|
47265
|
-
const containerRef =
|
|
47266
|
-
const [autoScroll, setAutoScroll] =
|
|
47267
|
-
|
|
47790
|
+
const [filter, setFilter] = React86.useState("all");
|
|
47791
|
+
const containerRef = React86.useRef(null);
|
|
47792
|
+
const [autoScroll, setAutoScroll] = React86.useState(true);
|
|
47793
|
+
React86.useEffect(() => {
|
|
47268
47794
|
if (autoScroll && containerRef.current) {
|
|
47269
47795
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
47270
47796
|
}
|
|
47271
47797
|
}, [events2.length, autoScroll]);
|
|
47272
|
-
const filteredEvents =
|
|
47798
|
+
const filteredEvents = React86.useMemo(() => {
|
|
47273
47799
|
if (filter === "all") return events2;
|
|
47274
47800
|
return events2.filter((e) => e.type === filter);
|
|
47275
47801
|
}, [events2, filter]);
|
|
@@ -47385,7 +47911,7 @@ var init_EventFlowTab = __esm({
|
|
|
47385
47911
|
});
|
|
47386
47912
|
function GuardsPanel({ guards }) {
|
|
47387
47913
|
const { t } = useTranslate();
|
|
47388
|
-
const [filter, setFilter] =
|
|
47914
|
+
const [filter, setFilter] = React86.useState("all");
|
|
47389
47915
|
if (guards.length === 0) {
|
|
47390
47916
|
return /* @__PURE__ */ jsx(
|
|
47391
47917
|
EmptyState,
|
|
@@ -47398,7 +47924,7 @@ function GuardsPanel({ guards }) {
|
|
|
47398
47924
|
}
|
|
47399
47925
|
const passedCount = guards.filter((g) => g.result).length;
|
|
47400
47926
|
const failedCount = guards.length - passedCount;
|
|
47401
|
-
const filteredGuards =
|
|
47927
|
+
const filteredGuards = React86.useMemo(() => {
|
|
47402
47928
|
if (filter === "all") return guards;
|
|
47403
47929
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
47404
47930
|
return guards.filter((g) => !g.result);
|
|
@@ -47561,10 +48087,10 @@ function EffectBadge({ effect }) {
|
|
|
47561
48087
|
}
|
|
47562
48088
|
function TransitionTimeline({ transitions }) {
|
|
47563
48089
|
const { t } = useTranslate();
|
|
47564
|
-
const containerRef =
|
|
47565
|
-
const [autoScroll, setAutoScroll] =
|
|
47566
|
-
const [expandedId, setExpandedId] =
|
|
47567
|
-
|
|
48090
|
+
const containerRef = React86.useRef(null);
|
|
48091
|
+
const [autoScroll, setAutoScroll] = React86.useState(true);
|
|
48092
|
+
const [expandedId, setExpandedId] = React86.useState(null);
|
|
48093
|
+
React86.useEffect(() => {
|
|
47568
48094
|
if (autoScroll && containerRef.current) {
|
|
47569
48095
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
47570
48096
|
}
|
|
@@ -47844,9 +48370,9 @@ function getAllEvents(traits2) {
|
|
|
47844
48370
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
47845
48371
|
const eventBus = useEventBus();
|
|
47846
48372
|
const { t } = useTranslate();
|
|
47847
|
-
const [log13, setLog] =
|
|
47848
|
-
const prevStatesRef =
|
|
47849
|
-
|
|
48373
|
+
const [log13, setLog] = React86.useState([]);
|
|
48374
|
+
const prevStatesRef = React86.useRef(/* @__PURE__ */ new Map());
|
|
48375
|
+
React86.useEffect(() => {
|
|
47850
48376
|
for (const trait of traits2) {
|
|
47851
48377
|
const prev = prevStatesRef.current.get(trait.id);
|
|
47852
48378
|
if (prev && prev !== trait.currentState) {
|
|
@@ -48015,10 +48541,10 @@ function VerifyModePanel({
|
|
|
48015
48541
|
localCount
|
|
48016
48542
|
}) {
|
|
48017
48543
|
const { t } = useTranslate();
|
|
48018
|
-
const [expanded, setExpanded] =
|
|
48019
|
-
const scrollRef =
|
|
48020
|
-
const prevCountRef =
|
|
48021
|
-
|
|
48544
|
+
const [expanded, setExpanded] = React86.useState(true);
|
|
48545
|
+
const scrollRef = React86.useRef(null);
|
|
48546
|
+
const prevCountRef = React86.useRef(0);
|
|
48547
|
+
React86.useEffect(() => {
|
|
48022
48548
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
48023
48549
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
48024
48550
|
}
|
|
@@ -48075,10 +48601,10 @@ function RuntimeDebugger({
|
|
|
48075
48601
|
schema
|
|
48076
48602
|
}) {
|
|
48077
48603
|
const { t } = useTranslate();
|
|
48078
|
-
const [isCollapsed, setIsCollapsed] =
|
|
48079
|
-
const [isVisible, setIsVisible] =
|
|
48604
|
+
const [isCollapsed, setIsCollapsed] = React86.useState(mode === "verify" ? true : defaultCollapsed);
|
|
48605
|
+
const [isVisible, setIsVisible] = React86.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
48080
48606
|
const debugData = useDebugData();
|
|
48081
|
-
|
|
48607
|
+
React86.useEffect(() => {
|
|
48082
48608
|
if (mode === "inline") return;
|
|
48083
48609
|
return onDebugToggle((enabled) => {
|
|
48084
48610
|
setIsVisible(enabled);
|
|
@@ -48087,7 +48613,7 @@ function RuntimeDebugger({
|
|
|
48087
48613
|
}
|
|
48088
48614
|
});
|
|
48089
48615
|
}, [mode]);
|
|
48090
|
-
|
|
48616
|
+
React86.useEffect(() => {
|
|
48091
48617
|
if (mode === "inline") return;
|
|
48092
48618
|
const handleKeyDown = (e) => {
|
|
48093
48619
|
if (e.key === "`" && isVisible) {
|
|
@@ -48647,7 +49173,7 @@ function SequenceBar({
|
|
|
48647
49173
|
onSlotRemove(index);
|
|
48648
49174
|
}, [onSlotRemove, playing]);
|
|
48649
49175
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
48650
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
49176
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
48651
49177
|
i > 0 && /* @__PURE__ */ jsx(
|
|
48652
49178
|
Typography,
|
|
48653
49179
|
{
|
|
@@ -49408,6 +49934,123 @@ var init_SimulatorBoard = __esm({
|
|
|
49408
49934
|
SimulatorBoard.displayName = "SimulatorBoard";
|
|
49409
49935
|
}
|
|
49410
49936
|
});
|
|
49937
|
+
function SokobanBoard({
|
|
49938
|
+
tiles,
|
|
49939
|
+
units,
|
|
49940
|
+
features,
|
|
49941
|
+
assetManifest,
|
|
49942
|
+
assetBaseUrl,
|
|
49943
|
+
scale = 0.45,
|
|
49944
|
+
showMinimap = false,
|
|
49945
|
+
enableCamera = false,
|
|
49946
|
+
tileClickEvent,
|
|
49947
|
+
unitClickEvent,
|
|
49948
|
+
isLoading,
|
|
49949
|
+
error,
|
|
49950
|
+
className
|
|
49951
|
+
}) {
|
|
49952
|
+
return /* @__PURE__ */ jsx("div", { className: cn("sokoban-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
49953
|
+
IsometricCanvas_default,
|
|
49954
|
+
{
|
|
49955
|
+
tileLayout: "flat",
|
|
49956
|
+
tiles,
|
|
49957
|
+
units,
|
|
49958
|
+
features,
|
|
49959
|
+
assetManifest,
|
|
49960
|
+
assetBaseUrl,
|
|
49961
|
+
scale,
|
|
49962
|
+
showMinimap,
|
|
49963
|
+
enableCamera,
|
|
49964
|
+
tileClickEvent,
|
|
49965
|
+
unitClickEvent,
|
|
49966
|
+
isLoading,
|
|
49967
|
+
error
|
|
49968
|
+
}
|
|
49969
|
+
) });
|
|
49970
|
+
}
|
|
49971
|
+
var init_SokobanBoard = __esm({
|
|
49972
|
+
"components/game/organisms/SokobanBoard.tsx"() {
|
|
49973
|
+
"use client";
|
|
49974
|
+
init_cn();
|
|
49975
|
+
init_IsometricCanvas();
|
|
49976
|
+
SokobanBoard.displayName = "SokobanBoard";
|
|
49977
|
+
}
|
|
49978
|
+
});
|
|
49979
|
+
function SpaceShmupBoard({
|
|
49980
|
+
backgroundImage,
|
|
49981
|
+
assetBaseUrl,
|
|
49982
|
+
width = 800,
|
|
49983
|
+
height = 600,
|
|
49984
|
+
fps = 60,
|
|
49985
|
+
isLoading,
|
|
49986
|
+
error,
|
|
49987
|
+
className
|
|
49988
|
+
}) {
|
|
49989
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("space-shmup-board relative w-full h-full", className), children: [
|
|
49990
|
+
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" }) }),
|
|
49991
|
+
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 }) }),
|
|
49992
|
+
/* @__PURE__ */ jsx(
|
|
49993
|
+
GameCanvas2D,
|
|
49994
|
+
{
|
|
49995
|
+
backgroundImage,
|
|
49996
|
+
assetBaseUrl,
|
|
49997
|
+
width,
|
|
49998
|
+
height,
|
|
49999
|
+
fps
|
|
50000
|
+
}
|
|
50001
|
+
)
|
|
50002
|
+
] });
|
|
50003
|
+
}
|
|
50004
|
+
var init_SpaceShmupBoard = __esm({
|
|
50005
|
+
"components/game/organisms/SpaceShmupBoard.tsx"() {
|
|
50006
|
+
"use client";
|
|
50007
|
+
init_cn();
|
|
50008
|
+
init_GameCanvas2D();
|
|
50009
|
+
SpaceShmupBoard.displayName = "SpaceShmupBoard";
|
|
50010
|
+
}
|
|
50011
|
+
});
|
|
50012
|
+
function SpaceStationBoard({
|
|
50013
|
+
tiles,
|
|
50014
|
+
units,
|
|
50015
|
+
features,
|
|
50016
|
+
assetManifest,
|
|
50017
|
+
assetBaseUrl,
|
|
50018
|
+
scale = 0.45,
|
|
50019
|
+
showMinimap = true,
|
|
50020
|
+
enableCamera = true,
|
|
50021
|
+
tileClickEvent,
|
|
50022
|
+
unitClickEvent,
|
|
50023
|
+
isLoading,
|
|
50024
|
+
error,
|
|
50025
|
+
className
|
|
50026
|
+
}) {
|
|
50027
|
+
return /* @__PURE__ */ jsx("div", { className: cn("space-station-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
50028
|
+
IsometricCanvas_default,
|
|
50029
|
+
{
|
|
50030
|
+
tileLayout: "isometric",
|
|
50031
|
+
tiles,
|
|
50032
|
+
units,
|
|
50033
|
+
features,
|
|
50034
|
+
assetManifest,
|
|
50035
|
+
assetBaseUrl,
|
|
50036
|
+
scale,
|
|
50037
|
+
showMinimap,
|
|
50038
|
+
enableCamera,
|
|
50039
|
+
tileClickEvent,
|
|
50040
|
+
unitClickEvent,
|
|
50041
|
+
isLoading,
|
|
50042
|
+
error
|
|
50043
|
+
}
|
|
50044
|
+
) });
|
|
50045
|
+
}
|
|
50046
|
+
var init_SpaceStationBoard = __esm({
|
|
50047
|
+
"components/game/organisms/SpaceStationBoard.tsx"() {
|
|
50048
|
+
"use client";
|
|
50049
|
+
init_cn();
|
|
50050
|
+
init_IsometricCanvas();
|
|
50051
|
+
SpaceStationBoard.displayName = "SpaceStationBoard";
|
|
50052
|
+
}
|
|
50053
|
+
});
|
|
49411
50054
|
var SplitPane;
|
|
49412
50055
|
var init_SplitPane = __esm({
|
|
49413
50056
|
"components/core/organisms/layout/SplitPane.tsx"() {
|
|
@@ -49501,6 +50144,48 @@ var init_SplitPane = __esm({
|
|
|
49501
50144
|
SplitPane.displayName = "SplitPane";
|
|
49502
50145
|
}
|
|
49503
50146
|
});
|
|
50147
|
+
function SportsBoard({
|
|
50148
|
+
tiles,
|
|
50149
|
+
units,
|
|
50150
|
+
features,
|
|
50151
|
+
assetManifest,
|
|
50152
|
+
assetBaseUrl,
|
|
50153
|
+
scale = 0.45,
|
|
50154
|
+
showMinimap = false,
|
|
50155
|
+
enableCamera = true,
|
|
50156
|
+
tileClickEvent,
|
|
50157
|
+
unitClickEvent,
|
|
50158
|
+
isLoading,
|
|
50159
|
+
error,
|
|
50160
|
+
className
|
|
50161
|
+
}) {
|
|
50162
|
+
return /* @__PURE__ */ jsx("div", { className: cn("sports-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
50163
|
+
IsometricCanvas_default,
|
|
50164
|
+
{
|
|
50165
|
+
tileLayout: "flat",
|
|
50166
|
+
tiles,
|
|
50167
|
+
units,
|
|
50168
|
+
features,
|
|
50169
|
+
assetManifest,
|
|
50170
|
+
assetBaseUrl,
|
|
50171
|
+
scale,
|
|
50172
|
+
showMinimap,
|
|
50173
|
+
enableCamera,
|
|
50174
|
+
tileClickEvent,
|
|
50175
|
+
unitClickEvent,
|
|
50176
|
+
isLoading,
|
|
50177
|
+
error
|
|
50178
|
+
}
|
|
50179
|
+
) });
|
|
50180
|
+
}
|
|
50181
|
+
var init_SportsBoard = __esm({
|
|
50182
|
+
"components/game/organisms/SportsBoard.tsx"() {
|
|
50183
|
+
"use client";
|
|
50184
|
+
init_cn();
|
|
50185
|
+
init_IsometricCanvas();
|
|
50186
|
+
SportsBoard.displayName = "SportsBoard";
|
|
50187
|
+
}
|
|
50188
|
+
});
|
|
49504
50189
|
var StatCard;
|
|
49505
50190
|
var init_StatCard = __esm({
|
|
49506
50191
|
"components/core/organisms/StatCard.tsx"() {
|
|
@@ -49539,7 +50224,7 @@ var init_StatCard = __esm({
|
|
|
49539
50224
|
const labelToUse = propLabel ?? propTitle;
|
|
49540
50225
|
const eventBus = useEventBus();
|
|
49541
50226
|
const { t } = useTranslate();
|
|
49542
|
-
const handleActionClick =
|
|
50227
|
+
const handleActionClick = React86__default.useCallback(() => {
|
|
49543
50228
|
if (action?.event) {
|
|
49544
50229
|
eventBus.emit(`UI:${action.event}`, {});
|
|
49545
50230
|
}
|
|
@@ -49550,7 +50235,7 @@ var init_StatCard = __esm({
|
|
|
49550
50235
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
49551
50236
|
const isLoading = externalLoading ?? false;
|
|
49552
50237
|
const error = externalError;
|
|
49553
|
-
const computeMetricValue =
|
|
50238
|
+
const computeMetricValue = React86__default.useCallback(
|
|
49554
50239
|
(metric, items) => {
|
|
49555
50240
|
if (metric.value !== void 0) {
|
|
49556
50241
|
return metric.value;
|
|
@@ -49589,7 +50274,7 @@ var init_StatCard = __esm({
|
|
|
49589
50274
|
},
|
|
49590
50275
|
[]
|
|
49591
50276
|
);
|
|
49592
|
-
const schemaStats =
|
|
50277
|
+
const schemaStats = React86__default.useMemo(() => {
|
|
49593
50278
|
if (!metrics || metrics.length === 0) return null;
|
|
49594
50279
|
return metrics.map((metric) => ({
|
|
49595
50280
|
label: metric.label,
|
|
@@ -49597,7 +50282,7 @@ var init_StatCard = __esm({
|
|
|
49597
50282
|
format: metric.format
|
|
49598
50283
|
}));
|
|
49599
50284
|
}, [metrics, data, computeMetricValue]);
|
|
49600
|
-
const calculatedTrend =
|
|
50285
|
+
const calculatedTrend = React86__default.useMemo(() => {
|
|
49601
50286
|
if (manualTrend !== void 0) return manualTrend;
|
|
49602
50287
|
if (previousValue === void 0 || currentValue === void 0)
|
|
49603
50288
|
return void 0;
|
|
@@ -50346,6 +51031,832 @@ var init_StepFlowOrganism = __esm({
|
|
|
50346
51031
|
StepFlowOrganism.displayName = "StepFlowOrganism";
|
|
50347
51032
|
}
|
|
50348
51033
|
});
|
|
51034
|
+
|
|
51035
|
+
// components/core/molecules/markdown/index.ts
|
|
51036
|
+
var init_markdown = __esm({
|
|
51037
|
+
"components/core/molecules/markdown/index.ts"() {
|
|
51038
|
+
init_MarkdownContent();
|
|
51039
|
+
init_CodeBlock();
|
|
51040
|
+
}
|
|
51041
|
+
});
|
|
51042
|
+
function groupByOrbital(subagents) {
|
|
51043
|
+
const map = /* @__PURE__ */ new Map();
|
|
51044
|
+
for (const sub of subagents) {
|
|
51045
|
+
const key = sub.orbitalName ?? "(unattached)";
|
|
51046
|
+
const arr = map.get(key) ?? [];
|
|
51047
|
+
arr.push(sub);
|
|
51048
|
+
map.set(key, arr);
|
|
51049
|
+
}
|
|
51050
|
+
return map;
|
|
51051
|
+
}
|
|
51052
|
+
function statusIconName(status) {
|
|
51053
|
+
switch (status) {
|
|
51054
|
+
case "running":
|
|
51055
|
+
return "loader";
|
|
51056
|
+
case "complete":
|
|
51057
|
+
return "check";
|
|
51058
|
+
case "error":
|
|
51059
|
+
return "x";
|
|
51060
|
+
default:
|
|
51061
|
+
return "circle";
|
|
51062
|
+
}
|
|
51063
|
+
}
|
|
51064
|
+
function lastMessage(sub) {
|
|
51065
|
+
if (sub.messages.length === 0) return void 0;
|
|
51066
|
+
return sub.messages[sub.messages.length - 1].message;
|
|
51067
|
+
}
|
|
51068
|
+
function formatHHMMSS(ts) {
|
|
51069
|
+
const d = new Date(ts);
|
|
51070
|
+
const hh = String(d.getHours()).padStart(2, "0");
|
|
51071
|
+
const mm = String(d.getMinutes()).padStart(2, "0");
|
|
51072
|
+
const ss = String(d.getSeconds()).padStart(2, "0");
|
|
51073
|
+
return `${hh}:${mm}:${ss}`;
|
|
51074
|
+
}
|
|
51075
|
+
function compactJson(value) {
|
|
51076
|
+
if (value === void 0 || value === null) return "";
|
|
51077
|
+
if (typeof value === "string") return value;
|
|
51078
|
+
try {
|
|
51079
|
+
const json = JSON.stringify(value);
|
|
51080
|
+
if (json.length <= 240) return json;
|
|
51081
|
+
return json.slice(0, 239) + "\u2026";
|
|
51082
|
+
} catch {
|
|
51083
|
+
return String(value);
|
|
51084
|
+
}
|
|
51085
|
+
}
|
|
51086
|
+
function tryPrettyJson(s) {
|
|
51087
|
+
try {
|
|
51088
|
+
return JSON.stringify(JSON.parse(s), null, 2);
|
|
51089
|
+
} catch {
|
|
51090
|
+
return null;
|
|
51091
|
+
}
|
|
51092
|
+
}
|
|
51093
|
+
function summarizeArgs(args) {
|
|
51094
|
+
const keys = Object.keys(args);
|
|
51095
|
+
if (keys.length === 0) return "";
|
|
51096
|
+
return keys.slice(0, 3).join(", ") + (keys.length > 3 ? ", \u2026" : "");
|
|
51097
|
+
}
|
|
51098
|
+
function previewText(text, max = 120) {
|
|
51099
|
+
if (!text) return "";
|
|
51100
|
+
return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
|
|
51101
|
+
}
|
|
51102
|
+
function coordinatorToActivityItems(activities) {
|
|
51103
|
+
return activities.flatMap((a) => {
|
|
51104
|
+
switch (a.type) {
|
|
51105
|
+
case "tool_call":
|
|
51106
|
+
return [{
|
|
51107
|
+
type: "tool_call",
|
|
51108
|
+
tool: a.tool,
|
|
51109
|
+
args: a.args,
|
|
51110
|
+
timestamp: a.timestamp
|
|
51111
|
+
}];
|
|
51112
|
+
case "tool_result":
|
|
51113
|
+
return [{
|
|
51114
|
+
type: "tool_result",
|
|
51115
|
+
tool: a.tool,
|
|
51116
|
+
result: a.result,
|
|
51117
|
+
success: a.success,
|
|
51118
|
+
timestamp: a.timestamp
|
|
51119
|
+
}];
|
|
51120
|
+
case "message":
|
|
51121
|
+
return [{
|
|
51122
|
+
type: "message",
|
|
51123
|
+
role: a.role,
|
|
51124
|
+
content: a.content,
|
|
51125
|
+
timestamp: a.timestamp
|
|
51126
|
+
}];
|
|
51127
|
+
case "error":
|
|
51128
|
+
return [{
|
|
51129
|
+
type: "message",
|
|
51130
|
+
role: "system",
|
|
51131
|
+
content: `Error: ${a.message}`,
|
|
51132
|
+
timestamp: a.timestamp
|
|
51133
|
+
}];
|
|
51134
|
+
case "coordinator_decision":
|
|
51135
|
+
case "plan_committed":
|
|
51136
|
+
case "pending_question":
|
|
51137
|
+
case "clarification_question":
|
|
51138
|
+
return [];
|
|
51139
|
+
case "file_operation":
|
|
51140
|
+
return [{
|
|
51141
|
+
type: "file_operation",
|
|
51142
|
+
operation: a.operation,
|
|
51143
|
+
path: a.path,
|
|
51144
|
+
success: a.success,
|
|
51145
|
+
timestamp: a.timestamp
|
|
51146
|
+
}];
|
|
51147
|
+
case "schema_diff":
|
|
51148
|
+
return [{
|
|
51149
|
+
type: "schema_diff",
|
|
51150
|
+
filePath: a.filePath,
|
|
51151
|
+
hunks: a.hunks,
|
|
51152
|
+
timestamp: a.timestamp
|
|
51153
|
+
}];
|
|
51154
|
+
}
|
|
51155
|
+
});
|
|
51156
|
+
}
|
|
51157
|
+
function pluckCoordinatorState(activities) {
|
|
51158
|
+
let decision = null;
|
|
51159
|
+
let plan = null;
|
|
51160
|
+
const pendingQuestions = [];
|
|
51161
|
+
for (const a of activities) {
|
|
51162
|
+
if (a.type === "coordinator_decision") decision = a;
|
|
51163
|
+
else if (a.type === "plan_committed") plan = a;
|
|
51164
|
+
else if (a.type === "pending_question") pendingQuestions.push(a);
|
|
51165
|
+
}
|
|
51166
|
+
return { decision, plan, pendingQuestions };
|
|
51167
|
+
}
|
|
51168
|
+
function subagentMessagesToActivities(messages) {
|
|
51169
|
+
return messages.map((m) => {
|
|
51170
|
+
if (m.tool) {
|
|
51171
|
+
return {
|
|
51172
|
+
type: "tool_call",
|
|
51173
|
+
tool: m.tool,
|
|
51174
|
+
args: { preview: m.message },
|
|
51175
|
+
timestamp: m.timestamp
|
|
51176
|
+
};
|
|
51177
|
+
}
|
|
51178
|
+
return {
|
|
51179
|
+
type: "message",
|
|
51180
|
+
role: "system",
|
|
51181
|
+
content: m.message,
|
|
51182
|
+
timestamp: m.timestamp
|
|
51183
|
+
};
|
|
51184
|
+
});
|
|
51185
|
+
}
|
|
51186
|
+
function buildTimelineItems(messages, activities, subagents) {
|
|
51187
|
+
const items = [];
|
|
51188
|
+
if (messages) {
|
|
51189
|
+
messages.forEach((m, i) => items.push({ source: "message", data: m, index: i }));
|
|
51190
|
+
}
|
|
51191
|
+
if (activities) {
|
|
51192
|
+
activities.forEach((a) => items.push({ source: "activity", data: a }));
|
|
51193
|
+
}
|
|
51194
|
+
subagents.forEach((s) => items.push({ source: "subagent", data: s }));
|
|
51195
|
+
return items;
|
|
51196
|
+
}
|
|
51197
|
+
function timelineItemIcon(item) {
|
|
51198
|
+
switch (item.source) {
|
|
51199
|
+
case "message": {
|
|
51200
|
+
const m = item.data;
|
|
51201
|
+
if (m.role === "tool") return { name: "terminal", color: "text-[var(--color-primary)]" };
|
|
51202
|
+
if (m.reasoningContent) return { name: "sparkles", color: "text-[var(--color-primary)]" };
|
|
51203
|
+
if (m.role === "user") return { name: "user", color: "text-[var(--color-primary)]" };
|
|
51204
|
+
return { name: "message-square", color: "text-[var(--color-muted-foreground)]" };
|
|
51205
|
+
}
|
|
51206
|
+
case "activity": {
|
|
51207
|
+
const a = item.data;
|
|
51208
|
+
switch (a.type) {
|
|
51209
|
+
case "tool_call":
|
|
51210
|
+
return { name: "terminal", color: "text-[var(--color-primary)]" };
|
|
51211
|
+
case "tool_result":
|
|
51212
|
+
return { name: a.success !== false ? "check" : "x", color: a.success !== false ? "text-[var(--color-success)]" : "text-[var(--color-danger)]" };
|
|
51213
|
+
case "error":
|
|
51214
|
+
return { name: "alert-triangle", color: "text-[var(--color-danger)]" };
|
|
51215
|
+
case "file_operation":
|
|
51216
|
+
return { name: "file", color: "text-[var(--color-muted-foreground)]" };
|
|
51217
|
+
case "schema_diff":
|
|
51218
|
+
return { name: "git-commit", color: "text-[var(--color-muted-foreground)]" };
|
|
51219
|
+
default:
|
|
51220
|
+
return { name: "info", color: "text-[var(--color-muted-foreground)]" };
|
|
51221
|
+
}
|
|
51222
|
+
}
|
|
51223
|
+
case "subagent":
|
|
51224
|
+
return { name: "bot", color: "text-[var(--color-primary)]" };
|
|
51225
|
+
}
|
|
51226
|
+
}
|
|
51227
|
+
function timelineItemLabel(item) {
|
|
51228
|
+
switch (item.source) {
|
|
51229
|
+
case "message": {
|
|
51230
|
+
const m = item.data;
|
|
51231
|
+
if (m.role === "tool") return "tool";
|
|
51232
|
+
if (m.reasoningContent) return "thinking";
|
|
51233
|
+
return m.role;
|
|
51234
|
+
}
|
|
51235
|
+
case "activity":
|
|
51236
|
+
return item.data.type;
|
|
51237
|
+
case "subagent":
|
|
51238
|
+
return "subagent";
|
|
51239
|
+
}
|
|
51240
|
+
}
|
|
51241
|
+
function timelineItemPreview(item) {
|
|
51242
|
+
switch (item.source) {
|
|
51243
|
+
case "message": {
|
|
51244
|
+
const m = item.data;
|
|
51245
|
+
if (m.role === "tool") return `${m.toolName ?? "tool"} \u2192 ${m.toolCallId?.slice(0, 8) ?? ""}`;
|
|
51246
|
+
if (m.reasoningContent) return previewText(m.reasoningContent, 120);
|
|
51247
|
+
return previewText(m.content, 120);
|
|
51248
|
+
}
|
|
51249
|
+
case "activity": {
|
|
51250
|
+
const a = item.data;
|
|
51251
|
+
switch (a.type) {
|
|
51252
|
+
case "tool_call":
|
|
51253
|
+
return `${a.tool}(${summarizeArgs(a.args)})`;
|
|
51254
|
+
case "tool_result":
|
|
51255
|
+
return `${a.tool}: ${compactJson(a.result)}`;
|
|
51256
|
+
case "message":
|
|
51257
|
+
return previewText(a.content, 120);
|
|
51258
|
+
case "error":
|
|
51259
|
+
return previewText(a.message, 120);
|
|
51260
|
+
case "file_operation":
|
|
51261
|
+
return `${a.operation} ${a.path}`;
|
|
51262
|
+
case "schema_diff":
|
|
51263
|
+
return `diff ${a.filePath}`;
|
|
51264
|
+
default:
|
|
51265
|
+
return String(a.type);
|
|
51266
|
+
}
|
|
51267
|
+
}
|
|
51268
|
+
case "subagent":
|
|
51269
|
+
return `${item.data.name} \xB7 ${item.data.task}`;
|
|
51270
|
+
}
|
|
51271
|
+
}
|
|
51272
|
+
function timelineItemTimeLabel(item) {
|
|
51273
|
+
if (item.source === "activity") return formatHHMMSS(item.data.timestamp);
|
|
51274
|
+
if (item.source === "subagent") {
|
|
51275
|
+
const ts = item.data.messages[0]?.timestamp;
|
|
51276
|
+
return ts !== void 0 ? formatHHMMSS(ts) : void 0;
|
|
51277
|
+
}
|
|
51278
|
+
return void 0;
|
|
51279
|
+
}
|
|
51280
|
+
function TraceDetailContent({ item }) {
|
|
51281
|
+
const { t } = useTranslate();
|
|
51282
|
+
switch (item.source) {
|
|
51283
|
+
case "message": {
|
|
51284
|
+
const m = item.data;
|
|
51285
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51286
|
+
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "items-center", children: /* @__PURE__ */ jsx(Badge, { variant: roleBadgeVariant[m.role], className: "text-[10px] uppercase", children: m.role }) }),
|
|
51287
|
+
typeof m.reasoningContent === "string" && m.reasoningContent.length > 0 && /* @__PURE__ */ jsxs(Box, { children: [
|
|
51288
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "mb-1", children: t("subagentTrace.reasoning") }),
|
|
51289
|
+
/* @__PURE__ */ jsx(MarkdownContent, { content: m.reasoningContent })
|
|
51290
|
+
] }),
|
|
51291
|
+
m.content.length > 0 && /* @__PURE__ */ jsxs(Box, { children: [
|
|
51292
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "mb-1", children: t("subagentTrace.content") }),
|
|
51293
|
+
m.role === "tool" ? (() => {
|
|
51294
|
+
const pretty = tryPrettyJson(m.content);
|
|
51295
|
+
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 });
|
|
51296
|
+
})() : /* @__PURE__ */ jsx(MarkdownContent, { content: m.content })
|
|
51297
|
+
] }),
|
|
51298
|
+
Array.isArray(m.toolCalls) && m.toolCalls.length > 0 && /* @__PURE__ */ jsxs(Box, { children: [
|
|
51299
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "mb-1", children: t("subagentTrace.toolCalls") }),
|
|
51300
|
+
/* @__PURE__ */ jsx(
|
|
51301
|
+
Accordion,
|
|
51302
|
+
{
|
|
51303
|
+
multiple: true,
|
|
51304
|
+
items: m.toolCalls.map((tc, i) => ({
|
|
51305
|
+
id: `tc-detail-${i}`,
|
|
51306
|
+
title: `${tc.name}(${summarizeArgs(tc.args)})`,
|
|
51307
|
+
content: /* @__PURE__ */ jsx(CodeBlock, { code: JSON.stringify(tc.args, null, 2), language: "json", maxHeight: "24rem" })
|
|
51308
|
+
}))
|
|
51309
|
+
}
|
|
51310
|
+
)
|
|
51311
|
+
] })
|
|
51312
|
+
] });
|
|
51313
|
+
}
|
|
51314
|
+
case "activity": {
|
|
51315
|
+
const a = item.data;
|
|
51316
|
+
switch (a.type) {
|
|
51317
|
+
case "tool_call":
|
|
51318
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51319
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51320
|
+
/* @__PURE__ */ jsx(Badge, { variant: "default", className: "text-[10px]", children: "tool_call" }),
|
|
51321
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
51322
|
+
] }),
|
|
51323
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: a.tool }),
|
|
51324
|
+
/* @__PURE__ */ jsx(CodeBlock, { code: JSON.stringify(a.args, null, 2), language: "json", maxHeight: "60vh" })
|
|
51325
|
+
] });
|
|
51326
|
+
case "tool_result":
|
|
51327
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51328
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51329
|
+
/* @__PURE__ */ jsx(Badge, { variant: a.success !== false ? "default" : "warning", className: "text-[10px]", children: a.success !== false ? "success" : "fail" }),
|
|
51330
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
51331
|
+
] }),
|
|
51332
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: a.tool }),
|
|
51333
|
+
/* @__PURE__ */ jsx(CodeBlock, { code: JSON.stringify(a.result, null, 2), language: "json", maxHeight: "60vh" })
|
|
51334
|
+
] });
|
|
51335
|
+
case "message":
|
|
51336
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51337
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51338
|
+
/* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: a.role }),
|
|
51339
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
51340
|
+
] }),
|
|
51341
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "whitespace-pre-wrap", children: a.content })
|
|
51342
|
+
] });
|
|
51343
|
+
case "error":
|
|
51344
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51345
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51346
|
+
/* @__PURE__ */ jsx(Badge, { variant: "warning", className: "text-[10px]", children: "error" }),
|
|
51347
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
51348
|
+
] }),
|
|
51349
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "whitespace-pre-wrap text-[var(--color-danger)]", children: a.message })
|
|
51350
|
+
] });
|
|
51351
|
+
case "file_operation":
|
|
51352
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51353
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51354
|
+
/* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: "file" }),
|
|
51355
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
51356
|
+
] }),
|
|
51357
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "body2", children: [
|
|
51358
|
+
a.operation,
|
|
51359
|
+
" ",
|
|
51360
|
+
a.path
|
|
51361
|
+
] })
|
|
51362
|
+
] });
|
|
51363
|
+
case "schema_diff":
|
|
51364
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51365
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51366
|
+
/* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: "diff" }),
|
|
51367
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
51368
|
+
] }),
|
|
51369
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: a.filePath })
|
|
51370
|
+
] });
|
|
51371
|
+
default:
|
|
51372
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51373
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) }),
|
|
51374
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: String(a.type) })
|
|
51375
|
+
] });
|
|
51376
|
+
}
|
|
51377
|
+
}
|
|
51378
|
+
case "subagent": {
|
|
51379
|
+
const s = item.data;
|
|
51380
|
+
const activities = subagentMessagesToActivities(s.messages);
|
|
51381
|
+
const ts = s.messages[0]?.timestamp;
|
|
51382
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51383
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51384
|
+
/* @__PURE__ */ jsx(Badge, { variant: "default", className: "text-[10px]", children: s.role }),
|
|
51385
|
+
ts !== void 0 && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(ts) })
|
|
51386
|
+
] }),
|
|
51387
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", weight: "semibold", children: s.name }),
|
|
51388
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", color: "muted", children: s.task }),
|
|
51389
|
+
activities.length > 0 && /* @__PURE__ */ jsx(Box, { className: "border-t border-[var(--color-border)] pt-2", children: /* @__PURE__ */ jsx(InlineActivityStream, { activities, autoScroll: false }) })
|
|
51390
|
+
] });
|
|
51391
|
+
}
|
|
51392
|
+
}
|
|
51393
|
+
}
|
|
51394
|
+
var InlineActivityRow, InlineActivityStream, CoordinatorCard, SubagentRow, OrbitalGroup, SubagentRichCard, roleBadgeVariant, ChatMessageRow, CoordinatorConversation, SubagentTracePanel;
|
|
51395
|
+
var init_SubagentTracePanel = __esm({
|
|
51396
|
+
"components/core/organisms/SubagentTracePanel.tsx"() {
|
|
51397
|
+
"use client";
|
|
51398
|
+
init_Box();
|
|
51399
|
+
init_Stack();
|
|
51400
|
+
init_Typography();
|
|
51401
|
+
init_Badge();
|
|
51402
|
+
init_Icon();
|
|
51403
|
+
init_Button();
|
|
51404
|
+
init_Modal();
|
|
51405
|
+
init_Accordion();
|
|
51406
|
+
init_markdown();
|
|
51407
|
+
InlineActivityRow = ({ activity }) => {
|
|
51408
|
+
const time = formatHHMMSS(activity.timestamp);
|
|
51409
|
+
const baseRow = "items-start px-3 py-1 hover:bg-[var(--color-surface)]";
|
|
51410
|
+
if (activity.type === "tool_call") {
|
|
51411
|
+
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
|
|
51412
|
+
/* @__PURE__ */ jsx(Icon, { name: "terminal", size: "xs", className: "mt-0.5 flex-shrink-0 text-[var(--color-primary)]" }),
|
|
51413
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "flex-1 min-w-0 text-[11px] font-mono break-all whitespace-pre-wrap", children: [
|
|
51414
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", weight: "semibold", className: "text-[11px] font-mono", children: activity.tool }),
|
|
51415
|
+
activity.args !== void 0 && /* @__PURE__ */ jsxs(Typography, { as: "span", variant: "caption", color: "muted", className: "text-[11px] font-mono", children: [
|
|
51416
|
+
" ",
|
|
51417
|
+
compactJson(activity.args)
|
|
51418
|
+
] })
|
|
51419
|
+
] }),
|
|
51420
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
|
|
51421
|
+
] });
|
|
51422
|
+
}
|
|
51423
|
+
if (activity.type === "tool_result") {
|
|
51424
|
+
const success = activity.success !== false;
|
|
51425
|
+
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
|
|
51426
|
+
/* @__PURE__ */ jsx(
|
|
51427
|
+
Icon,
|
|
51428
|
+
{
|
|
51429
|
+
name: success ? "check" : "x",
|
|
51430
|
+
size: "xs",
|
|
51431
|
+
className: `mt-0.5 flex-shrink-0 ${success ? "text-[var(--color-success)]" : "text-[var(--color-danger)]"}`
|
|
51432
|
+
}
|
|
51433
|
+
),
|
|
51434
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "flex-1 min-w-0 text-[11px] font-mono break-all whitespace-pre-wrap", children: [
|
|
51435
|
+
/* @__PURE__ */ jsxs(Typography, { as: "span", variant: "caption", color: "muted", className: "text-[11px] font-mono", children: [
|
|
51436
|
+
activity.tool,
|
|
51437
|
+
":",
|
|
51438
|
+
" "
|
|
51439
|
+
] }),
|
|
51440
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "text-[11px] font-mono", children: compactJson(activity.result) })
|
|
51441
|
+
] }),
|
|
51442
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
|
|
51443
|
+
] });
|
|
51444
|
+
}
|
|
51445
|
+
if (activity.type === "message") {
|
|
51446
|
+
const role = activity.role;
|
|
51447
|
+
const iconName = role === "user" ? "user" : role === "system" ? "info" : "sparkles";
|
|
51448
|
+
const roleColor = role === "user" ? "text-[var(--color-primary)]" : role === "system" ? "text-[var(--color-muted-foreground)]" : "text-[var(--color-foreground)]";
|
|
51449
|
+
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
|
|
51450
|
+
/* @__PURE__ */ jsx(Icon, { name: iconName, size: "xs", className: `mt-0.5 flex-shrink-0 ${roleColor}` }),
|
|
51451
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "flex-1 min-w-0 text-[11px] whitespace-pre-wrap break-words", children: activity.content }),
|
|
51452
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
|
|
51453
|
+
] });
|
|
51454
|
+
}
|
|
51455
|
+
if (activity.type === "error") {
|
|
51456
|
+
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
|
|
51457
|
+
/* @__PURE__ */ jsx(Icon, { name: "alert-triangle", size: "xs", className: "mt-0.5 flex-shrink-0 text-[var(--color-danger)]" }),
|
|
51458
|
+
/* @__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 }),
|
|
51459
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
|
|
51460
|
+
] });
|
|
51461
|
+
}
|
|
51462
|
+
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
|
|
51463
|
+
/* @__PURE__ */ jsx(Icon, { name: "file", size: "xs", className: "mt-0.5 flex-shrink-0 text-[var(--color-muted-foreground)]" }),
|
|
51464
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", className: "flex-1 min-w-0 text-[11px] font-mono break-all", children: [
|
|
51465
|
+
"[",
|
|
51466
|
+
activity.type,
|
|
51467
|
+
"] ",
|
|
51468
|
+
compactJson(activity)
|
|
51469
|
+
] }),
|
|
51470
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
|
|
51471
|
+
] });
|
|
51472
|
+
};
|
|
51473
|
+
InlineActivityStream = ({ activities, autoScroll = true, className }) => {
|
|
51474
|
+
const endRef = React86__default.useRef(null);
|
|
51475
|
+
React86__default.useEffect(() => {
|
|
51476
|
+
if (!autoScroll) return;
|
|
51477
|
+
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
51478
|
+
}, [activities.length, autoScroll]);
|
|
51479
|
+
return /* @__PURE__ */ jsxs(Box, { className, children: [
|
|
51480
|
+
activities.map((a, i) => /* @__PURE__ */ jsx(InlineActivityRow, { activity: a }, `${a.timestamp}-${i}`)),
|
|
51481
|
+
/* @__PURE__ */ jsx(Box, { ref: endRef })
|
|
51482
|
+
] });
|
|
51483
|
+
};
|
|
51484
|
+
CoordinatorCard = ({ snapshot, className }) => {
|
|
51485
|
+
const { t } = useTranslate();
|
|
51486
|
+
const { decision, plan, pendingQuestions } = snapshot;
|
|
51487
|
+
if (!decision && !plan && pendingQuestions.length === 0) return null;
|
|
51488
|
+
return /* @__PURE__ */ jsxs(
|
|
51489
|
+
Box,
|
|
51490
|
+
{
|
|
51491
|
+
className: `px-3 py-2 border-b border-[var(--color-border)] bg-[var(--color-muted)]/30 ${className ?? ""}`,
|
|
51492
|
+
children: [
|
|
51493
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center mb-2", children: [
|
|
51494
|
+
/* @__PURE__ */ jsx(Icon, { name: "compass", size: "xs" }),
|
|
51495
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold text-[11px]", children: t("subagentTrace.coordinator") })
|
|
51496
|
+
] }),
|
|
51497
|
+
decision && /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "mb-2", children: [
|
|
51498
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51499
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] uppercase tracking-wide", children: t("subagentTrace.organism") }),
|
|
51500
|
+
/* @__PURE__ */ jsx(Badge, { variant: "default", className: "text-[10px]", children: decision.organism }),
|
|
51501
|
+
decision.priorOrganism && decision.priorOrganism !== decision.organism && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: t("subagentTrace.wasOrganism", { organism: decision.priorOrganism }) })
|
|
51502
|
+
] }),
|
|
51503
|
+
decision.reason && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[11px] mt-0.5", children: decision.reason })
|
|
51504
|
+
] }),
|
|
51505
|
+
plan && plan.orbitals.length > 0 && /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "mb-2", children: [
|
|
51506
|
+
/* @__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 }) }),
|
|
51507
|
+
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap", children: plan.orbitals.map((o) => /* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: o }, o)) })
|
|
51508
|
+
] }),
|
|
51509
|
+
pendingQuestions.length > 0 && /* @__PURE__ */ jsxs(VStack, { gap: "none", children: [
|
|
51510
|
+
/* @__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 }) }),
|
|
51511
|
+
pendingQuestions.map((q) => /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-start", children: [
|
|
51512
|
+
/* @__PURE__ */ jsx(Icon, { name: "help-circle", size: "xs", className: "mt-0.5 flex-shrink-0 text-[var(--color-warning)]" }),
|
|
51513
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-[11px] flex-1 min-w-0", children: [
|
|
51514
|
+
q.question,
|
|
51515
|
+
q.orbitalName && /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", className: "text-[10px] ml-1", children: [
|
|
51516
|
+
"(",
|
|
51517
|
+
q.orbitalName,
|
|
51518
|
+
")"
|
|
51519
|
+
] })
|
|
51520
|
+
] })
|
|
51521
|
+
] }, q.questionId))
|
|
51522
|
+
] })
|
|
51523
|
+
]
|
|
51524
|
+
}
|
|
51525
|
+
);
|
|
51526
|
+
};
|
|
51527
|
+
SubagentRow = ({ subagent }) => {
|
|
51528
|
+
const recent = lastMessage(subagent);
|
|
51529
|
+
return /* @__PURE__ */ jsxs(
|
|
51530
|
+
HStack,
|
|
51531
|
+
{
|
|
51532
|
+
gap: "sm",
|
|
51533
|
+
className: "items-start px-3 py-2 border-b border-[var(--color-border)]",
|
|
51534
|
+
children: [
|
|
51535
|
+
/* @__PURE__ */ jsx(Box, { className: "pt-0.5", children: /* @__PURE__ */ jsx(Icon, { name: statusIconName(subagent.status), size: "xs" }) }),
|
|
51536
|
+
/* @__PURE__ */ jsxs(VStack, { gap: "none", className: "flex-1 min-w-0", children: [
|
|
51537
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center", children: [
|
|
51538
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-medium truncate", children: subagent.name }),
|
|
51539
|
+
/* @__PURE__ */ jsx(Badge, { variant: "default", children: subagent.role })
|
|
51540
|
+
] }),
|
|
51541
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "truncate", children: recent ?? subagent.task })
|
|
51542
|
+
] })
|
|
51543
|
+
]
|
|
51544
|
+
}
|
|
51545
|
+
);
|
|
51546
|
+
};
|
|
51547
|
+
OrbitalGroup = ({ orbitalName, subagents }) => {
|
|
51548
|
+
const { t } = useTranslate();
|
|
51549
|
+
const runningCount = subagents.filter((s) => s.status === "running").length;
|
|
51550
|
+
const completeCount = subagents.filter((s) => s.status === "complete").length;
|
|
51551
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "border-b border-[var(--color-border)]", children: [
|
|
51552
|
+
/* @__PURE__ */ jsxs(
|
|
51553
|
+
HStack,
|
|
51554
|
+
{
|
|
51555
|
+
gap: "sm",
|
|
51556
|
+
className: "items-center px-3 py-2 bg-[var(--color-surface)] border-b border-[var(--color-border)]",
|
|
51557
|
+
children: [
|
|
51558
|
+
/* @__PURE__ */ jsx(Icon, { name: "circle", size: "xs" }),
|
|
51559
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold flex-1 truncate", children: orbitalName }),
|
|
51560
|
+
/* @__PURE__ */ jsx(Badge, { variant: "default", children: runningCount > 0 ? t("subagentTrace.countRunning", { count: runningCount }) : t("subagentTrace.countDone", { count: completeCount }) })
|
|
51561
|
+
]
|
|
51562
|
+
}
|
|
51563
|
+
),
|
|
51564
|
+
subagents.map((sub) => /* @__PURE__ */ jsx(SubagentRow, { subagent: sub }, sub.id))
|
|
51565
|
+
] });
|
|
51566
|
+
};
|
|
51567
|
+
SubagentRichCard = ({ subagent }) => {
|
|
51568
|
+
const { t } = useTranslate();
|
|
51569
|
+
const activities = React86__default.useMemo(
|
|
51570
|
+
() => subagentMessagesToActivities(subagent.messages),
|
|
51571
|
+
[subagent.messages]
|
|
51572
|
+
);
|
|
51573
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "border-b border-[var(--color-border)] p-3", children: [
|
|
51574
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center mb-2", children: [
|
|
51575
|
+
/* @__PURE__ */ jsx(
|
|
51576
|
+
Box,
|
|
51577
|
+
{
|
|
51578
|
+
style: {
|
|
51579
|
+
width: 8,
|
|
51580
|
+
height: 8,
|
|
51581
|
+
borderRadius: "50%",
|
|
51582
|
+
flexShrink: 0,
|
|
51583
|
+
backgroundColor: subagent.status === "complete" ? "var(--color-success)" : subagent.status === "error" ? "var(--color-error)" : "var(--color-primary)",
|
|
51584
|
+
...subagent.status === "running" ? { animation: "pulse 1.5s infinite" } : {}
|
|
51585
|
+
}
|
|
51586
|
+
}
|
|
51587
|
+
),
|
|
51588
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold flex-1 truncate", children: subagent.name }),
|
|
51589
|
+
/* @__PURE__ */ jsx(Badge, { variant: subagent.role === "deterministic" ? "default" : subagent.role === "llm" ? "info" : "warning", children: subagent.role }),
|
|
51590
|
+
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` })
|
|
51591
|
+
] }),
|
|
51592
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "mb-2", children: subagent.task }),
|
|
51593
|
+
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") })
|
|
51594
|
+
] });
|
|
51595
|
+
};
|
|
51596
|
+
roleBadgeVariant = {
|
|
51597
|
+
system: "neutral",
|
|
51598
|
+
user: "info",
|
|
51599
|
+
assistant: "default",
|
|
51600
|
+
tool: "warning"
|
|
51601
|
+
};
|
|
51602
|
+
ChatMessageRow = ({ message, index }) => {
|
|
51603
|
+
const { t } = useTranslate();
|
|
51604
|
+
const { role, content, toolCalls, reasoningContent, toolCallId, toolName } = message;
|
|
51605
|
+
if (role === "tool") {
|
|
51606
|
+
const pretty = tryPrettyJson(content);
|
|
51607
|
+
const title = `${toolName ?? "tool"} \u2192${toolCallId ? ` ${toolCallId.slice(0, 8)}` : ""}`;
|
|
51608
|
+
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 });
|
|
51609
|
+
const items = [{ id: `tool-${index}`, title, content: body }];
|
|
51610
|
+
return /* @__PURE__ */ jsx(Box, { className: "px-3 py-2 border-b border-[var(--color-border)]", children: /* @__PURE__ */ jsx(Accordion, { items }) });
|
|
51611
|
+
}
|
|
51612
|
+
const hasReasoning = typeof reasoningContent === "string" && reasoningContent.length > 0;
|
|
51613
|
+
const hasToolCalls = Array.isArray(toolCalls) && toolCalls.length > 0;
|
|
51614
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "px-3 py-2 border-b border-[var(--color-border)]", children: [
|
|
51615
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51616
|
+
/* @__PURE__ */ jsx(Badge, { variant: roleBadgeVariant[role], className: "text-[10px] uppercase", children: role }),
|
|
51617
|
+
hasReasoning && /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: [
|
|
51618
|
+
"\xB7 ",
|
|
51619
|
+
t("subagentTrace.thinking")
|
|
51620
|
+
] }),
|
|
51621
|
+
hasToolCalls && /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: [
|
|
51622
|
+
"\xB7 ",
|
|
51623
|
+
toolCalls.length === 1 ? t("subagentTrace.toolCallCount", { count: toolCalls.length }) : t("subagentTrace.toolCallCountPlural", { count: toolCalls.length })
|
|
51624
|
+
] })
|
|
51625
|
+
] }),
|
|
51626
|
+
hasReasoning && /* @__PURE__ */ jsx(Accordion, { items: [{
|
|
51627
|
+
id: `reasoning-${index}`,
|
|
51628
|
+
title: t("subagentTrace.reasoning"),
|
|
51629
|
+
content: /* @__PURE__ */ jsx(MarkdownContent, { content: reasoningContent })
|
|
51630
|
+
}] }),
|
|
51631
|
+
content.length > 0 && /* @__PURE__ */ jsx(MarkdownContent, { content }),
|
|
51632
|
+
hasToolCalls && /* @__PURE__ */ jsx(
|
|
51633
|
+
Accordion,
|
|
51634
|
+
{
|
|
51635
|
+
multiple: true,
|
|
51636
|
+
items: toolCalls.map((tc, i) => ({
|
|
51637
|
+
id: `tc-${index}-${i}`,
|
|
51638
|
+
title: `${tc.name}(${summarizeArgs(tc.args)})`,
|
|
51639
|
+
content: /* @__PURE__ */ jsx(CodeBlock, { code: JSON.stringify(tc.args, null, 2), language: "json", maxHeight: "24rem" })
|
|
51640
|
+
}))
|
|
51641
|
+
}
|
|
51642
|
+
)
|
|
51643
|
+
] });
|
|
51644
|
+
};
|
|
51645
|
+
CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
|
|
51646
|
+
const endRef = React86__default.useRef(null);
|
|
51647
|
+
React86__default.useEffect(() => {
|
|
51648
|
+
if (!autoScroll) return;
|
|
51649
|
+
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
51650
|
+
}, [messages.length, autoScroll]);
|
|
51651
|
+
return /* @__PURE__ */ jsxs(Box, { className, children: [
|
|
51652
|
+
messages.map((m, i) => /* @__PURE__ */ jsx(ChatMessageRow, { message: m, index: i }, `msg-${i}`)),
|
|
51653
|
+
/* @__PURE__ */ jsx(Box, { ref: endRef })
|
|
51654
|
+
] });
|
|
51655
|
+
};
|
|
51656
|
+
SubagentTracePanel = ({
|
|
51657
|
+
subagents,
|
|
51658
|
+
focusedOrbital,
|
|
51659
|
+
disclosureLevel,
|
|
51660
|
+
open,
|
|
51661
|
+
onClose,
|
|
51662
|
+
className,
|
|
51663
|
+
mode = "overlay",
|
|
51664
|
+
coordinatorActivities,
|
|
51665
|
+
coordinatorMessages
|
|
51666
|
+
}) => {
|
|
51667
|
+
const { t } = useTranslate();
|
|
51668
|
+
const [selectedItem, setSelectedItem] = useState(null);
|
|
51669
|
+
const densityLabel = (rich) => rich ? t("subagentTrace.densityRich") : t("subagentTrace.densityCompact");
|
|
51670
|
+
if (mode === "overlay" && !open) return null;
|
|
51671
|
+
const isTabMode = mode === "tab";
|
|
51672
|
+
const isRichMode = isTabMode || disclosureLevel >= 3;
|
|
51673
|
+
if (isTabMode) {
|
|
51674
|
+
const timelineItems = buildTimelineItems(coordinatorMessages, coordinatorActivities, subagents);
|
|
51675
|
+
const hasData = timelineItems.length > 0;
|
|
51676
|
+
return /* @__PURE__ */ jsxs(Box, { className: `h-full w-full bg-[var(--color-card)] overflow-hidden flex flex-col ${className ?? ""}`, children: [
|
|
51677
|
+
/* @__PURE__ */ jsxs(
|
|
51678
|
+
HStack,
|
|
51679
|
+
{
|
|
51680
|
+
gap: "sm",
|
|
51681
|
+
className: "items-center px-3 py-2 border-b border-[var(--color-border)]",
|
|
51682
|
+
children: [
|
|
51683
|
+
/* @__PURE__ */ jsx(Icon, { name: "activity", size: "sm" }),
|
|
51684
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold flex-1", children: t("subagentTrace.trace") }),
|
|
51685
|
+
onClose && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" }) })
|
|
51686
|
+
]
|
|
51687
|
+
}
|
|
51688
|
+
),
|
|
51689
|
+
!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") }) }),
|
|
51690
|
+
hasData && /* @__PURE__ */ jsx(Box, { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx(VStack, { gap: "none", children: timelineItems.map((item, i) => {
|
|
51691
|
+
const { name: iconName, color: iconColor } = timelineItemIcon(item);
|
|
51692
|
+
const isLast = i === timelineItems.length - 1;
|
|
51693
|
+
return /* @__PURE__ */ jsxs(
|
|
51694
|
+
Box,
|
|
51695
|
+
{
|
|
51696
|
+
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",
|
|
51697
|
+
onClick: () => setSelectedItem(item),
|
|
51698
|
+
children: [
|
|
51699
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex flex-col items-center mr-3 mt-0.5", style: { width: 20 }, children: [
|
|
51700
|
+
/* @__PURE__ */ jsx(
|
|
51701
|
+
Box,
|
|
51702
|
+
{
|
|
51703
|
+
className: "rounded-full flex-shrink-0",
|
|
51704
|
+
style: {
|
|
51705
|
+
width: 8,
|
|
51706
|
+
height: 8,
|
|
51707
|
+
backgroundColor: "var(--color-primary)"
|
|
51708
|
+
}
|
|
51709
|
+
}
|
|
51710
|
+
),
|
|
51711
|
+
!isLast && /* @__PURE__ */ jsx(
|
|
51712
|
+
Box,
|
|
51713
|
+
{
|
|
51714
|
+
className: "flex-1",
|
|
51715
|
+
style: {
|
|
51716
|
+
width: 2,
|
|
51717
|
+
backgroundColor: "var(--color-border)",
|
|
51718
|
+
marginTop: 4,
|
|
51719
|
+
minHeight: 24
|
|
51720
|
+
}
|
|
51721
|
+
}
|
|
51722
|
+
)
|
|
51723
|
+
] }),
|
|
51724
|
+
/* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "flex-1 min-w-0", children: [
|
|
51725
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51726
|
+
/* @__PURE__ */ jsx(Icon, { name: iconName, size: "xs", className: `flex-shrink-0 ${iconColor}` }),
|
|
51727
|
+
timelineItemTimeLabel(item) && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: timelineItemTimeLabel(item) }),
|
|
51728
|
+
/* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: timelineItemLabel(item) })
|
|
51729
|
+
] }),
|
|
51730
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-start", children: [
|
|
51731
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", color: "muted", className: "flex-1 min-w-0 line-clamp-2", children: timelineItemPreview(item) }),
|
|
51732
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", className: "flex-shrink-0 mt-0", onClick: (e) => {
|
|
51733
|
+
e.stopPropagation();
|
|
51734
|
+
setSelectedItem(item);
|
|
51735
|
+
}, children: /* @__PURE__ */ jsx(Icon, { name: "maximize-2", size: "xs" }) })
|
|
51736
|
+
] })
|
|
51737
|
+
] })
|
|
51738
|
+
]
|
|
51739
|
+
},
|
|
51740
|
+
`${item.source}-${i}`
|
|
51741
|
+
);
|
|
51742
|
+
}) }) }),
|
|
51743
|
+
/* @__PURE__ */ jsx(
|
|
51744
|
+
Modal,
|
|
51745
|
+
{
|
|
51746
|
+
isOpen: selectedItem !== null,
|
|
51747
|
+
onClose: () => setSelectedItem(null),
|
|
51748
|
+
title: selectedItem ? `${timelineItemLabel(selectedItem)}${timelineItemTimeLabel(selectedItem) ? ` \xB7 ${timelineItemTimeLabel(selectedItem)}` : ""}` : "",
|
|
51749
|
+
size: "lg",
|
|
51750
|
+
children: selectedItem && /* @__PURE__ */ jsx(TraceDetailContent, { item: selectedItem })
|
|
51751
|
+
}
|
|
51752
|
+
)
|
|
51753
|
+
] });
|
|
51754
|
+
}
|
|
51755
|
+
const filtered = focusedOrbital ? subagents.filter((s) => s.orbitalName === focusedOrbital) : subagents;
|
|
51756
|
+
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 ?? ""}`;
|
|
51757
|
+
const wrapperStyle = { zIndex: 20 };
|
|
51758
|
+
const hasCoordinatorData = coordinatorMessages && coordinatorMessages.length > 0 || coordinatorActivities && coordinatorActivities.length > 0;
|
|
51759
|
+
if (filtered.length === 0 && !hasCoordinatorData) {
|
|
51760
|
+
return /* @__PURE__ */ jsxs(Box, { className: wrapperClass, style: wrapperStyle, children: [
|
|
51761
|
+
/* @__PURE__ */ jsxs(
|
|
51762
|
+
HStack,
|
|
51763
|
+
{
|
|
51764
|
+
gap: "sm",
|
|
51765
|
+
className: "items-center px-3 py-2 border-b border-[var(--color-border)]",
|
|
51766
|
+
children: [
|
|
51767
|
+
/* @__PURE__ */ jsx(Icon, { name: "activity", size: "sm" }),
|
|
51768
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold flex-1", children: t("subagentTrace.subagents") }),
|
|
51769
|
+
onClose && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" }) })
|
|
51770
|
+
]
|
|
51771
|
+
}
|
|
51772
|
+
),
|
|
51773
|
+
/* @__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") }) })
|
|
51774
|
+
] });
|
|
51775
|
+
}
|
|
51776
|
+
if (focusedOrbital) {
|
|
51777
|
+
return /* @__PURE__ */ jsxs(Box, { className: wrapperClass, style: wrapperStyle, children: [
|
|
51778
|
+
/* @__PURE__ */ jsxs(
|
|
51779
|
+
HStack,
|
|
51780
|
+
{
|
|
51781
|
+
gap: "sm",
|
|
51782
|
+
className: "items-center px-3 py-2 border-b border-[var(--color-border)]",
|
|
51783
|
+
children: [
|
|
51784
|
+
/* @__PURE__ */ jsx(Icon, { name: "activity", size: "sm" }),
|
|
51785
|
+
/* @__PURE__ */ jsxs(VStack, { gap: "none", className: "flex-1 min-w-0", children: [
|
|
51786
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold truncate", children: focusedOrbital }),
|
|
51787
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", children: [
|
|
51788
|
+
filtered.length === 1 ? t("subagentTrace.subagentCount", { count: filtered.length }) : t("subagentTrace.subagentCountPlural", { count: filtered.length }),
|
|
51789
|
+
" \xB7 ",
|
|
51790
|
+
densityLabel(isRichMode)
|
|
51791
|
+
] })
|
|
51792
|
+
] }),
|
|
51793
|
+
onClose && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" }) })
|
|
51794
|
+
]
|
|
51795
|
+
}
|
|
51796
|
+
),
|
|
51797
|
+
/* @__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)) })
|
|
51798
|
+
] });
|
|
51799
|
+
}
|
|
51800
|
+
const grouped = groupByOrbital(filtered);
|
|
51801
|
+
const coordinatorSnapshot = pluckCoordinatorState(coordinatorActivities ?? []);
|
|
51802
|
+
return /* @__PURE__ */ jsxs(Box, { className: wrapperClass, style: wrapperStyle, children: [
|
|
51803
|
+
/* @__PURE__ */ jsxs(
|
|
51804
|
+
HStack,
|
|
51805
|
+
{
|
|
51806
|
+
gap: "sm",
|
|
51807
|
+
className: "items-center px-3 py-2 border-b border-[var(--color-border)]",
|
|
51808
|
+
children: [
|
|
51809
|
+
/* @__PURE__ */ jsx(Icon, { name: "activity", size: "sm" }),
|
|
51810
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "font-semibold flex-1", children: [
|
|
51811
|
+
t("subagentTrace.subagentsWithCount", { count: filtered.length }),
|
|
51812
|
+
" \xB7 ",
|
|
51813
|
+
densityLabel(isRichMode)
|
|
51814
|
+
] }),
|
|
51815
|
+
onClose && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" }) })
|
|
51816
|
+
]
|
|
51817
|
+
}
|
|
51818
|
+
),
|
|
51819
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex-1 overflow-y-auto", children: [
|
|
51820
|
+
!focusedOrbital && isRichMode && /* @__PURE__ */ jsx(CoordinatorCard, { snapshot: coordinatorSnapshot }),
|
|
51821
|
+
coordinatorMessages && coordinatorMessages.length > 0 ? /* @__PURE__ */ jsxs(Box, { className: "border-b border-[var(--color-border)]", children: [
|
|
51822
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center px-3 py-1.5 bg-[var(--color-card)] border-b border-[var(--color-border)]", children: [
|
|
51823
|
+
/* @__PURE__ */ jsx(Box, { style: { width: 6, height: 6, borderRadius: "50%", backgroundColor: "var(--color-primary)", flexShrink: 0 } }),
|
|
51824
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold text-[11px]", children: t("subagentTrace.coordinator") }),
|
|
51825
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: t("subagentTrace.messagesCount", { count: coordinatorMessages.length }) })
|
|
51826
|
+
] }),
|
|
51827
|
+
/* @__PURE__ */ jsx(Box, { className: "max-h-[36rem] overflow-y-auto", children: /* @__PURE__ */ jsx(CoordinatorConversation, { messages: coordinatorMessages, autoScroll: true }) })
|
|
51828
|
+
] }) : coordinatorActivities && coordinatorActivities.length > 0 && (() => {
|
|
51829
|
+
const filteredCoordinator = coordinatorActivities;
|
|
51830
|
+
if (filteredCoordinator.length === 0) return null;
|
|
51831
|
+
return /* @__PURE__ */ jsxs(Box, { className: "border-b border-[var(--color-border)]", children: [
|
|
51832
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center px-3 py-1.5 bg-[var(--color-card)] border-b border-[var(--color-border)]", children: [
|
|
51833
|
+
/* @__PURE__ */ jsx(Box, { style: { width: 6, height: 6, borderRadius: "50%", backgroundColor: "var(--color-primary)", flexShrink: 0 } }),
|
|
51834
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold text-[11px]", children: t("subagentTrace.coordinator") }),
|
|
51835
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: t("subagentTrace.eventsCount", { count: filteredCoordinator.length }) })
|
|
51836
|
+
] }),
|
|
51837
|
+
/* @__PURE__ */ jsx(Box, { className: "max-h-60 overflow-y-auto", children: /* @__PURE__ */ jsx(
|
|
51838
|
+
InlineActivityStream,
|
|
51839
|
+
{
|
|
51840
|
+
activities: coordinatorToActivityItems(filteredCoordinator),
|
|
51841
|
+
autoScroll: true
|
|
51842
|
+
}
|
|
51843
|
+
) })
|
|
51844
|
+
] });
|
|
51845
|
+
})(),
|
|
51846
|
+
isRichMode ? filtered.map((sub) => /* @__PURE__ */ jsx(SubagentRichCard, { subagent: sub }, sub.id)) : Array.from(grouped.entries()).map(([orbitalName, subs]) => /* @__PURE__ */ jsx(
|
|
51847
|
+
OrbitalGroup,
|
|
51848
|
+
{
|
|
51849
|
+
orbitalName,
|
|
51850
|
+
subagents: subs
|
|
51851
|
+
},
|
|
51852
|
+
orbitalName
|
|
51853
|
+
))
|
|
51854
|
+
] })
|
|
51855
|
+
] });
|
|
51856
|
+
};
|
|
51857
|
+
SubagentTracePanel.displayName = "SubagentTracePanel";
|
|
51858
|
+
}
|
|
51859
|
+
});
|
|
50349
51860
|
var TabbedContainer;
|
|
50350
51861
|
var init_TabbedContainer = __esm({
|
|
50351
51862
|
"components/core/organisms/layout/TabbedContainer.tsx"() {
|
|
@@ -50460,6 +51971,48 @@ var init_TabbedContainer = __esm({
|
|
|
50460
51971
|
TabbedContainer.displayName = "TabbedContainer";
|
|
50461
51972
|
}
|
|
50462
51973
|
});
|
|
51974
|
+
function TanksBoard({
|
|
51975
|
+
tiles,
|
|
51976
|
+
units,
|
|
51977
|
+
features,
|
|
51978
|
+
assetManifest,
|
|
51979
|
+
assetBaseUrl,
|
|
51980
|
+
scale = 0.45,
|
|
51981
|
+
showMinimap = true,
|
|
51982
|
+
enableCamera = true,
|
|
51983
|
+
tileClickEvent,
|
|
51984
|
+
unitClickEvent,
|
|
51985
|
+
isLoading,
|
|
51986
|
+
error,
|
|
51987
|
+
className
|
|
51988
|
+
}) {
|
|
51989
|
+
return /* @__PURE__ */ jsx("div", { className: cn("tanks-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
51990
|
+
IsometricCanvas_default,
|
|
51991
|
+
{
|
|
51992
|
+
tileLayout: "flat",
|
|
51993
|
+
tiles,
|
|
51994
|
+
units,
|
|
51995
|
+
features,
|
|
51996
|
+
assetManifest,
|
|
51997
|
+
assetBaseUrl,
|
|
51998
|
+
scale,
|
|
51999
|
+
showMinimap,
|
|
52000
|
+
enableCamera,
|
|
52001
|
+
tileClickEvent,
|
|
52002
|
+
unitClickEvent,
|
|
52003
|
+
isLoading,
|
|
52004
|
+
error
|
|
52005
|
+
}
|
|
52006
|
+
) });
|
|
52007
|
+
}
|
|
52008
|
+
var init_TanksBoard = __esm({
|
|
52009
|
+
"components/game/organisms/TanksBoard.tsx"() {
|
|
52010
|
+
"use client";
|
|
52011
|
+
init_cn();
|
|
52012
|
+
init_IsometricCanvas();
|
|
52013
|
+
TanksBoard.displayName = "TanksBoard";
|
|
52014
|
+
}
|
|
52015
|
+
});
|
|
50463
52016
|
var TeamOrganism;
|
|
50464
52017
|
var init_TeamOrganism = __esm({
|
|
50465
52018
|
"components/marketing/organisms/TeamOrganism.tsx"() {
|
|
@@ -50563,7 +52116,7 @@ var init_Timeline = __esm({
|
|
|
50563
52116
|
}) => {
|
|
50564
52117
|
const { t } = useTranslate();
|
|
50565
52118
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
50566
|
-
const items =
|
|
52119
|
+
const items = React86__default.useMemo(() => {
|
|
50567
52120
|
if (propItems) return propItems;
|
|
50568
52121
|
if (entityData.length === 0) return [];
|
|
50569
52122
|
return entityData.map((record, idx) => {
|
|
@@ -50670,7 +52223,7 @@ var init_Timeline = __esm({
|
|
|
50670
52223
|
}
|
|
50671
52224
|
});
|
|
50672
52225
|
function extractToastProps(children) {
|
|
50673
|
-
if (!
|
|
52226
|
+
if (!React86__default.isValidElement(children)) {
|
|
50674
52227
|
if (typeof children === "string") {
|
|
50675
52228
|
return { message: children };
|
|
50676
52229
|
}
|
|
@@ -50708,7 +52261,7 @@ var init_ToastSlot = __esm({
|
|
|
50708
52261
|
eventBus.emit("UI:CLOSE");
|
|
50709
52262
|
};
|
|
50710
52263
|
if (!isVisible) return null;
|
|
50711
|
-
const isCustomContent =
|
|
52264
|
+
const isCustomContent = React86__default.isValidElement(children) && !message;
|
|
50712
52265
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
50713
52266
|
Toast,
|
|
50714
52267
|
{
|
|
@@ -52324,7 +53877,7 @@ var init_WorldMapTemplate = __esm({
|
|
|
52324
53877
|
}
|
|
52325
53878
|
});
|
|
52326
53879
|
function lazyThree(name, loader) {
|
|
52327
|
-
const Lazy =
|
|
53880
|
+
const Lazy = React86__default.lazy(
|
|
52328
53881
|
() => loader().then((m) => {
|
|
52329
53882
|
const Resolved = m[name];
|
|
52330
53883
|
if (!Resolved) {
|
|
@@ -52336,13 +53889,13 @@ function lazyThree(name, loader) {
|
|
|
52336
53889
|
})
|
|
52337
53890
|
);
|
|
52338
53891
|
function ThreeWrapper(props) {
|
|
52339
|
-
return
|
|
53892
|
+
return React86__default.createElement(
|
|
52340
53893
|
ThreeBoundary,
|
|
52341
53894
|
{ name },
|
|
52342
|
-
|
|
52343
|
-
|
|
53895
|
+
React86__default.createElement(
|
|
53896
|
+
React86__default.Suspense,
|
|
52344
53897
|
{ fallback: null },
|
|
52345
|
-
|
|
53898
|
+
React86__default.createElement(Lazy, props)
|
|
52346
53899
|
)
|
|
52347
53900
|
);
|
|
52348
53901
|
}
|
|
@@ -52372,6 +53925,7 @@ var init_component_registry_generated = __esm({
|
|
|
52372
53925
|
init_BattleTemplate();
|
|
52373
53926
|
init_BehaviorView();
|
|
52374
53927
|
init_BloomQuizBlock();
|
|
53928
|
+
init_BoardgameBoard();
|
|
52375
53929
|
init_BookChapterView();
|
|
52376
53930
|
init_BookCoverPage();
|
|
52377
53931
|
init_BookNavBar();
|
|
@@ -52398,6 +53952,7 @@ var init_component_registry_generated = __esm({
|
|
|
52398
53952
|
init_Center();
|
|
52399
53953
|
init_Chart();
|
|
52400
53954
|
init_ChartLegend();
|
|
53955
|
+
init_ChatBar();
|
|
52401
53956
|
init_Checkbox();
|
|
52402
53957
|
init_ChoiceButton();
|
|
52403
53958
|
init_CityBuilderBoard();
|
|
@@ -52455,6 +54010,7 @@ var init_component_registry_generated = __esm({
|
|
|
52455
54010
|
init_FileTree();
|
|
52456
54011
|
init_FilterGroup();
|
|
52457
54012
|
init_FilterPill();
|
|
54013
|
+
init_FishingBoard();
|
|
52458
54014
|
init_Flex();
|
|
52459
54015
|
init_FlipCard();
|
|
52460
54016
|
init_FlipContainer();
|
|
@@ -52484,6 +54040,7 @@ var init_component_registry_generated = __esm({
|
|
|
52484
54040
|
init_HeroOrganism();
|
|
52485
54041
|
init_HeroSection();
|
|
52486
54042
|
init_HexStrategyBoard();
|
|
54043
|
+
init_HolidayRunnerBoard();
|
|
52487
54044
|
init_Icon();
|
|
52488
54045
|
init_InfiniteScrollSentinel();
|
|
52489
54046
|
init_Input();
|
|
@@ -52506,11 +54063,13 @@ var init_component_registry_generated = __esm({
|
|
|
52506
54063
|
init_MarketingFooter();
|
|
52507
54064
|
init_MasterDetail();
|
|
52508
54065
|
init_MasterDetailLayout();
|
|
54066
|
+
init_MatchPuzzleBoard();
|
|
52509
54067
|
init_MatrixQuestion();
|
|
52510
54068
|
init_MediaGallery();
|
|
52511
54069
|
init_Menu();
|
|
52512
54070
|
init_Meter();
|
|
52513
54071
|
init_MiniMap();
|
|
54072
|
+
init_MinigolfBoard();
|
|
52514
54073
|
init_Modal();
|
|
52515
54074
|
init_ModalSlot();
|
|
52516
54075
|
init_ModuleCard();
|
|
@@ -52523,6 +54082,8 @@ var init_component_registry_generated = __esm({
|
|
|
52523
54082
|
init_PageHeader();
|
|
52524
54083
|
init_Pagination();
|
|
52525
54084
|
init_PatternTile();
|
|
54085
|
+
init_PinballBoard();
|
|
54086
|
+
init_PirateBoard();
|
|
52526
54087
|
init_PlatformerBoard();
|
|
52527
54088
|
init_PlatformerCanvas();
|
|
52528
54089
|
init_PlatformerTemplate();
|
|
@@ -52540,6 +54101,7 @@ var init_component_registry_generated = __esm({
|
|
|
52540
54101
|
init_QrScanner();
|
|
52541
54102
|
init_QuestTracker();
|
|
52542
54103
|
init_QuizBlock();
|
|
54104
|
+
init_RacingBoard();
|
|
52543
54105
|
init_Radio();
|
|
52544
54106
|
init_RangeSlider();
|
|
52545
54107
|
init_ReflectionBlock();
|
|
@@ -52573,12 +54135,16 @@ var init_component_registry_generated = __esm({
|
|
|
52573
54135
|
init_SimulatorBoard();
|
|
52574
54136
|
init_Skeleton();
|
|
52575
54137
|
init_SocialProof();
|
|
54138
|
+
init_SokobanBoard();
|
|
52576
54139
|
init_SortableList();
|
|
54140
|
+
init_SpaceShmupBoard();
|
|
54141
|
+
init_SpaceStationBoard();
|
|
52577
54142
|
init_Sparkline();
|
|
52578
54143
|
init_Spinner();
|
|
52579
54144
|
init_Split();
|
|
52580
54145
|
init_SplitPane();
|
|
52581
54146
|
init_SplitSection();
|
|
54147
|
+
init_SportsBoard();
|
|
52582
54148
|
init_Sprite();
|
|
52583
54149
|
init_StarRating();
|
|
52584
54150
|
init_StatBadge();
|
|
@@ -52593,6 +54159,7 @@ var init_component_registry_generated = __esm({
|
|
|
52593
54159
|
init_StatusEffect();
|
|
52594
54160
|
init_StepFlow();
|
|
52595
54161
|
init_StepFlowOrganism();
|
|
54162
|
+
init_SubagentTracePanel();
|
|
52596
54163
|
init_SvgBranch();
|
|
52597
54164
|
init_SvgConnection();
|
|
52598
54165
|
init_SvgFlow();
|
|
@@ -52612,6 +54179,7 @@ var init_component_registry_generated = __esm({
|
|
|
52612
54179
|
init_Tabs();
|
|
52613
54180
|
init_TagCloud();
|
|
52614
54181
|
init_TagInput();
|
|
54182
|
+
init_TanksBoard();
|
|
52615
54183
|
init_TeamCard();
|
|
52616
54184
|
init_TeamOrganism();
|
|
52617
54185
|
init_TextHighlight();
|
|
@@ -52650,7 +54218,7 @@ var init_component_registry_generated = __esm({
|
|
|
52650
54218
|
init_WorldMapBoard();
|
|
52651
54219
|
init_WorldMapTemplate();
|
|
52652
54220
|
init_XPBar();
|
|
52653
|
-
ThreeBoundary = class extends
|
|
54221
|
+
ThreeBoundary = class extends React86__default.Component {
|
|
52654
54222
|
constructor() {
|
|
52655
54223
|
super(...arguments);
|
|
52656
54224
|
__publicField(this, "state", { failed: false });
|
|
@@ -52660,7 +54228,7 @@ var init_component_registry_generated = __esm({
|
|
|
52660
54228
|
}
|
|
52661
54229
|
render() {
|
|
52662
54230
|
if (this.state.failed) {
|
|
52663
|
-
return
|
|
54231
|
+
return React86__default.createElement(
|
|
52664
54232
|
"div",
|
|
52665
54233
|
{
|
|
52666
54234
|
"data-testid": "three-unavailable",
|
|
@@ -52699,6 +54267,7 @@ var init_component_registry_generated = __esm({
|
|
|
52699
54267
|
"BattleTemplate": BattleTemplate,
|
|
52700
54268
|
"BehaviorView": BehaviorView,
|
|
52701
54269
|
"BloomQuizBlock": BloomQuizBlock,
|
|
54270
|
+
"BoardgameBoard": BoardgameBoard,
|
|
52702
54271
|
"BookChapterView": BookChapterView,
|
|
52703
54272
|
"BookCoverPage": BookCoverPage,
|
|
52704
54273
|
"BookNavBar": BookNavBar,
|
|
@@ -52728,6 +54297,7 @@ var init_component_registry_generated = __esm({
|
|
|
52728
54297
|
"Center": Center,
|
|
52729
54298
|
"Chart": Chart,
|
|
52730
54299
|
"ChartLegend": ChartLegend,
|
|
54300
|
+
"ChatBar": ChatBar,
|
|
52731
54301
|
"Checkbox": Checkbox,
|
|
52732
54302
|
"ChoiceButton": ChoiceButton,
|
|
52733
54303
|
"CityBuilderBoard": CityBuilderBoard,
|
|
@@ -52788,6 +54358,7 @@ var init_component_registry_generated = __esm({
|
|
|
52788
54358
|
"FileTree": FileTree,
|
|
52789
54359
|
"FilterGroup": FilterGroup,
|
|
52790
54360
|
"FilterPill": FilterPill,
|
|
54361
|
+
"FishingBoard": FishingBoard,
|
|
52791
54362
|
"Flex": Flex,
|
|
52792
54363
|
"FlipCard": FlipCard,
|
|
52793
54364
|
"FlipContainer": FlipContainer,
|
|
@@ -52821,6 +54392,7 @@ var init_component_registry_generated = __esm({
|
|
|
52821
54392
|
"HeroOrganism": HeroOrganism,
|
|
52822
54393
|
"HeroSection": HeroSection,
|
|
52823
54394
|
"HexStrategyBoard": HexStrategyBoard,
|
|
54395
|
+
"HolidayRunnerBoard": HolidayRunnerBoard,
|
|
52824
54396
|
"Icon": Icon,
|
|
52825
54397
|
"InfiniteScrollSentinel": InfiniteScrollSentinel,
|
|
52826
54398
|
"Input": Input,
|
|
@@ -52845,11 +54417,13 @@ var init_component_registry_generated = __esm({
|
|
|
52845
54417
|
"MarketingFooter": MarketingFooter,
|
|
52846
54418
|
"MasterDetail": MasterDetail,
|
|
52847
54419
|
"MasterDetailLayout": MasterDetailLayout,
|
|
54420
|
+
"MatchPuzzleBoard": MatchPuzzleBoard,
|
|
52848
54421
|
"MatrixQuestion": MatrixQuestion,
|
|
52849
54422
|
"MediaGallery": MediaGallery,
|
|
52850
54423
|
"Menu": Menu,
|
|
52851
54424
|
"Meter": Meter,
|
|
52852
54425
|
"MiniMap": MiniMap,
|
|
54426
|
+
"MinigolfBoard": MinigolfBoard,
|
|
52853
54427
|
"Modal": Modal,
|
|
52854
54428
|
"ModalSlot": ModalSlot,
|
|
52855
54429
|
"ModuleCard": ModuleCard,
|
|
@@ -52862,6 +54436,8 @@ var init_component_registry_generated = __esm({
|
|
|
52862
54436
|
"PageHeader": PageHeader,
|
|
52863
54437
|
"Pagination": Pagination,
|
|
52864
54438
|
"PatternTile": PatternTile,
|
|
54439
|
+
"PinballBoard": PinballBoard,
|
|
54440
|
+
"PirateBoard": PirateBoard,
|
|
52865
54441
|
"PlatformerBoard": PlatformerBoard,
|
|
52866
54442
|
"PlatformerCanvas": PlatformerCanvas,
|
|
52867
54443
|
"PlatformerTemplate": PlatformerTemplate,
|
|
@@ -52879,6 +54455,7 @@ var init_component_registry_generated = __esm({
|
|
|
52879
54455
|
"QrScanner": QrScanner,
|
|
52880
54456
|
"QuestTracker": QuestTracker,
|
|
52881
54457
|
"QuizBlock": QuizBlock,
|
|
54458
|
+
"RacingBoard": RacingBoard,
|
|
52882
54459
|
"Radio": Radio,
|
|
52883
54460
|
"RangeSlider": RangeSlider,
|
|
52884
54461
|
"ReflectionBlock": ReflectionBlock,
|
|
@@ -52912,7 +54489,10 @@ var init_component_registry_generated = __esm({
|
|
|
52912
54489
|
"SimulatorBoard": SimulatorBoard,
|
|
52913
54490
|
"Skeleton": Skeleton,
|
|
52914
54491
|
"SocialProof": SocialProof,
|
|
54492
|
+
"SokobanBoard": SokobanBoard,
|
|
52915
54493
|
"SortableList": SortableList,
|
|
54494
|
+
"SpaceShmupBoard": SpaceShmupBoard,
|
|
54495
|
+
"SpaceStationBoard": SpaceStationBoard,
|
|
52916
54496
|
"Spacer": SpacerPattern,
|
|
52917
54497
|
"SpacerPattern": SpacerPattern,
|
|
52918
54498
|
"Sparkline": Sparkline,
|
|
@@ -52920,6 +54500,7 @@ var init_component_registry_generated = __esm({
|
|
|
52920
54500
|
"Split": Split,
|
|
52921
54501
|
"SplitPane": SplitPane,
|
|
52922
54502
|
"SplitSection": SplitSection,
|
|
54503
|
+
"SportsBoard": SportsBoard,
|
|
52923
54504
|
"Sprite": Sprite,
|
|
52924
54505
|
"Stack": Stack,
|
|
52925
54506
|
"StarRating": StarRating,
|
|
@@ -52935,6 +54516,7 @@ var init_component_registry_generated = __esm({
|
|
|
52935
54516
|
"StatusEffect": StatusEffect,
|
|
52936
54517
|
"StepFlow": StepFlow,
|
|
52937
54518
|
"StepFlowOrganism": StepFlowOrganism,
|
|
54519
|
+
"SubagentTracePanel": SubagentTracePanel,
|
|
52938
54520
|
"SvgBranch": SvgBranch,
|
|
52939
54521
|
"SvgConnection": SvgConnection,
|
|
52940
54522
|
"SvgFlow": SvgFlow,
|
|
@@ -52954,6 +54536,7 @@ var init_component_registry_generated = __esm({
|
|
|
52954
54536
|
"Tabs": Tabs,
|
|
52955
54537
|
"TagCloud": TagCloud,
|
|
52956
54538
|
"TagInput": TagInput,
|
|
54539
|
+
"TanksBoard": TanksBoard,
|
|
52957
54540
|
"TeamCard": TeamCard,
|
|
52958
54541
|
"TeamOrganism": TeamOrganism,
|
|
52959
54542
|
"TextHighlight": TextHighlight,
|
|
@@ -53011,7 +54594,7 @@ function SuspenseConfigProvider({
|
|
|
53011
54594
|
config,
|
|
53012
54595
|
children
|
|
53013
54596
|
}) {
|
|
53014
|
-
return
|
|
54597
|
+
return React86__default.createElement(
|
|
53015
54598
|
SuspenseConfigContext.Provider,
|
|
53016
54599
|
{ value: config },
|
|
53017
54600
|
children
|
|
@@ -53501,7 +55084,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
53501
55084
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
53502
55085
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
53503
55086
|
}
|
|
53504
|
-
return /* @__PURE__ */ jsx(
|
|
55087
|
+
return /* @__PURE__ */ jsx(React86__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
53505
55088
|
}
|
|
53506
55089
|
if (!child || typeof child !== "object") return null;
|
|
53507
55090
|
const childId = `${parentId}-${index}`;
|
|
@@ -53541,14 +55124,14 @@ function isPatternConfig(value) {
|
|
|
53541
55124
|
if (value === null || value === void 0) return false;
|
|
53542
55125
|
if (typeof value !== "object") return false;
|
|
53543
55126
|
if (Array.isArray(value)) return false;
|
|
53544
|
-
if (
|
|
55127
|
+
if (React86__default.isValidElement(value)) return false;
|
|
53545
55128
|
if (value instanceof Date) return false;
|
|
53546
55129
|
if (typeof value === "function") return false;
|
|
53547
55130
|
const record = value;
|
|
53548
55131
|
return "type" in record && typeof record.type === "string" && getComponentForPattern(record.type) !== null;
|
|
53549
55132
|
}
|
|
53550
55133
|
function isPlainConfigObject(value) {
|
|
53551
|
-
if (
|
|
55134
|
+
if (React86__default.isValidElement(value)) return false;
|
|
53552
55135
|
if (value instanceof Date) return false;
|
|
53553
55136
|
const proto = Object.getPrototypeOf(value);
|
|
53554
55137
|
return proto === Object.prototype || proto === null;
|
|
@@ -53674,7 +55257,7 @@ function SlotContentRenderer({
|
|
|
53674
55257
|
for (const slotKey of CONTENT_NODE_SLOTS) {
|
|
53675
55258
|
const slotVal = restProps[slotKey];
|
|
53676
55259
|
if (slotVal === void 0 || slotVal === null) continue;
|
|
53677
|
-
if (
|
|
55260
|
+
if (React86__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
|
|
53678
55261
|
if (Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
|
|
53679
55262
|
nodeSlotOverrides[slotKey] = renderPatternChildren(
|
|
53680
55263
|
slotVal,
|