@almadar/ui 5.67.0 → 5.69.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 +3138 -1529
- package/dist/avl/index.js +1868 -259
- 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 +7350 -6737
- package/dist/components/index.js +6339 -5737
- package/dist/providers/index.cjs +2947 -1338
- package/dist/providers/index.js +1844 -235
- package/dist/runtime/index.cjs +3003 -1394
- package/dist/runtime/index.js +1848 -239
- 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);
|
|
@@ -7088,6 +7088,14 @@ var init_ControlButton = __esm({
|
|
|
7088
7088
|
}
|
|
7089
7089
|
});
|
|
7090
7090
|
|
|
7091
|
+
// components/game/organisms/utils/spriteSheetConstants.ts
|
|
7092
|
+
var SHEET_COLUMNS;
|
|
7093
|
+
var init_spriteSheetConstants = __esm({
|
|
7094
|
+
"components/game/organisms/utils/spriteSheetConstants.ts"() {
|
|
7095
|
+
SHEET_COLUMNS = 8;
|
|
7096
|
+
}
|
|
7097
|
+
});
|
|
7098
|
+
|
|
7091
7099
|
// components/game/organisms/utils/spriteAnimation.ts
|
|
7092
7100
|
function inferDirection(dx, dy) {
|
|
7093
7101
|
if (dx === 0 && dy === 0) return "se";
|
|
@@ -7630,8 +7638,8 @@ function XPBar({
|
|
|
7630
7638
|
}) {
|
|
7631
7639
|
const sizes = sizeMap9[size];
|
|
7632
7640
|
const percentage = max > 0 ? Math.max(0, Math.min(100, current / max * 100)) : 0;
|
|
7633
|
-
const [fillWidth, setFillWidth] =
|
|
7634
|
-
|
|
7641
|
+
const [fillWidth, setFillWidth] = React86.useState(animated ? 0 : percentage);
|
|
7642
|
+
React86.useEffect(() => {
|
|
7635
7643
|
if (!animated) {
|
|
7636
7644
|
setFillWidth(percentage);
|
|
7637
7645
|
return;
|
|
@@ -8139,9 +8147,9 @@ function MiniMap({
|
|
|
8139
8147
|
viewportRect = DEFAULT_VIEWPORT,
|
|
8140
8148
|
className
|
|
8141
8149
|
}) {
|
|
8142
|
-
const canvasRef =
|
|
8143
|
-
const frameRef =
|
|
8144
|
-
|
|
8150
|
+
const canvasRef = React86.useRef(null);
|
|
8151
|
+
const frameRef = React86.useRef(0);
|
|
8152
|
+
React86.useEffect(() => {
|
|
8145
8153
|
const canvas = canvasRef.current;
|
|
8146
8154
|
if (!canvas) return;
|
|
8147
8155
|
const ctx = canvas.getContext("2d");
|
|
@@ -8330,7 +8338,7 @@ var init_ErrorBoundary = __esm({
|
|
|
8330
8338
|
}
|
|
8331
8339
|
);
|
|
8332
8340
|
};
|
|
8333
|
-
ErrorBoundary = class extends
|
|
8341
|
+
ErrorBoundary = class extends React86__default.Component {
|
|
8334
8342
|
constructor(props) {
|
|
8335
8343
|
super(props);
|
|
8336
8344
|
__publicField(this, "reset", () => {
|
|
@@ -9721,8 +9729,8 @@ function ActionButtons({
|
|
|
9721
9729
|
disabled
|
|
9722
9730
|
}) {
|
|
9723
9731
|
const eventBus = useEventBus();
|
|
9724
|
-
const [activeButtons, setActiveButtons] =
|
|
9725
|
-
const handlePress =
|
|
9732
|
+
const [activeButtons, setActiveButtons] = React86.useState(/* @__PURE__ */ new Set());
|
|
9733
|
+
const handlePress = React86.useCallback(
|
|
9726
9734
|
(id) => {
|
|
9727
9735
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
9728
9736
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -9730,7 +9738,7 @@ function ActionButtons({
|
|
|
9730
9738
|
},
|
|
9731
9739
|
[actionEvent, eventBus, onAction]
|
|
9732
9740
|
);
|
|
9733
|
-
const handleRelease =
|
|
9741
|
+
const handleRelease = React86.useCallback(
|
|
9734
9742
|
(id) => {
|
|
9735
9743
|
setActiveButtons((prev) => {
|
|
9736
9744
|
const next = new Set(prev);
|
|
@@ -11267,6 +11275,11 @@ function isoToScreen(tileX, tileY, scale, baseOffsetX, layout = "isometric") {
|
|
|
11267
11275
|
const screenY2 = tileY * (scaledFloorHeight * 0.75);
|
|
11268
11276
|
return { x: screenX2, y: screenY2 };
|
|
11269
11277
|
}
|
|
11278
|
+
if (layout === "flat") {
|
|
11279
|
+
const screenX2 = tileX * scaledTileWidth + baseOffsetX;
|
|
11280
|
+
const screenY2 = tileY * scaledFloorHeight;
|
|
11281
|
+
return { x: screenX2, y: screenY2 };
|
|
11282
|
+
}
|
|
11270
11283
|
const screenX = (tileX - tileY) * (scaledTileWidth / 2) + baseOffsetX;
|
|
11271
11284
|
const screenY = (tileX + tileY) * (scaledFloorHeight / 2);
|
|
11272
11285
|
return { x: screenX, y: screenY };
|
|
@@ -11279,6 +11292,11 @@ function screenToIso(screenX, screenY, scale, baseOffsetX, layout = "isometric")
|
|
|
11279
11292
|
const col = Math.round((screenX - (row & 1) * (scaledTileWidth / 2) - baseOffsetX) / scaledTileWidth);
|
|
11280
11293
|
return { x: col, y: row };
|
|
11281
11294
|
}
|
|
11295
|
+
if (layout === "flat") {
|
|
11296
|
+
const col = Math.round((screenX - baseOffsetX) / scaledTileWidth);
|
|
11297
|
+
const row = Math.round(screenY / scaledFloorHeight);
|
|
11298
|
+
return { x: col, y: row };
|
|
11299
|
+
}
|
|
11282
11300
|
const adjustedX = screenX - baseOffsetX;
|
|
11283
11301
|
const tileX = (adjustedX / (scaledTileWidth / 2) + screenY / (scaledFloorHeight / 2)) / 2;
|
|
11284
11302
|
const tileY = (screenY / (scaledFloorHeight / 2) - adjustedX / (scaledTileWidth / 2)) / 2;
|
|
@@ -11398,7 +11416,7 @@ function IsometricCanvas({
|
|
|
11398
11416
|
);
|
|
11399
11417
|
const sortedTiles = useMemo(() => {
|
|
11400
11418
|
const tiles = [...tilesProp];
|
|
11401
|
-
if (tileLayout === "hex") {
|
|
11419
|
+
if (tileLayout === "hex" || tileLayout === "flat") {
|
|
11402
11420
|
tiles.sort((a, b) => a.y !== b.y ? a.y - b.y : a.x - b.x);
|
|
11403
11421
|
} else {
|
|
11404
11422
|
tiles.sort((a, b) => {
|
|
@@ -11526,7 +11544,7 @@ function IsometricCanvas({
|
|
|
11526
11544
|
const minX = Math.min(...allScreenPos.map((p2) => p2.x));
|
|
11527
11545
|
const maxX = Math.max(...allScreenPos.map((p2) => p2.x + scaledTileWidth));
|
|
11528
11546
|
const minY = Math.min(...allScreenPos.map((p2) => p2.y));
|
|
11529
|
-
const tileBottomExtent = tileLayout === "hex" ? scaledTileWidth : scaledTileHeight;
|
|
11547
|
+
const tileBottomExtent = tileLayout === "hex" || tileLayout === "flat" ? scaledTileWidth : scaledTileHeight;
|
|
11530
11548
|
const maxY = Math.max(...allScreenPos.map((p2) => p2.y + tileBottomExtent));
|
|
11531
11549
|
const worldW = maxX - minX;
|
|
11532
11550
|
const worldH = maxY - minY;
|
|
@@ -11619,7 +11637,7 @@ function IsometricCanvas({
|
|
|
11619
11637
|
const drawW = scaledTileWidth;
|
|
11620
11638
|
const drawH = scaledTileWidth * (img.naturalHeight / img.naturalWidth);
|
|
11621
11639
|
const drawX = pos.x;
|
|
11622
|
-
const drawY = tileLayout === "hex" ? pos.y : pos.y + scaledTileHeight - drawH;
|
|
11640
|
+
const drawY = tileLayout === "hex" || tileLayout === "flat" ? pos.y : pos.y + scaledTileHeight - drawH;
|
|
11623
11641
|
ctx.drawImage(img, drawX, drawY, drawW, drawH);
|
|
11624
11642
|
}
|
|
11625
11643
|
} else {
|
|
@@ -11686,7 +11704,7 @@ function IsometricCanvas({
|
|
|
11686
11704
|
}
|
|
11687
11705
|
}
|
|
11688
11706
|
const sortedFeatures = [...features].sort((a, b) => {
|
|
11689
|
-
if (tileLayout === "hex") return a.y !== b.y ? a.y - b.y : a.x - b.x;
|
|
11707
|
+
if (tileLayout === "hex" || tileLayout === "flat") return a.y !== b.y ? a.y - b.y : a.x - b.x;
|
|
11690
11708
|
const depthA = a.x + a.y;
|
|
11691
11709
|
const depthB = b.x + b.y;
|
|
11692
11710
|
return depthA !== depthB ? depthA - depthB : a.y - b.y;
|
|
@@ -11727,7 +11745,7 @@ function IsometricCanvas({
|
|
|
11727
11745
|
}
|
|
11728
11746
|
const unitsWithPosition = units.filter((u) => !!u.position);
|
|
11729
11747
|
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;
|
|
11748
|
+
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
11749
|
const depthA = a.position.x + a.position.y;
|
|
11732
11750
|
const depthB = b.position.x + b.position.y;
|
|
11733
11751
|
return depthA !== depthB ? depthA - depthB : a.position.y - b.position.y;
|
|
@@ -11745,7 +11763,13 @@ function IsometricCanvas({
|
|
|
11745
11763
|
const img = unitSpriteUrl ? getImage(unitSpriteUrl) : null;
|
|
11746
11764
|
const unitDrawH = scaledFloorHeight * spriteHeightRatio * unitScale;
|
|
11747
11765
|
const maxUnitW = scaledTileWidth * spriteMaxWidthRatio * unitScale;
|
|
11748
|
-
const
|
|
11766
|
+
const SHEET_ROWS = 5;
|
|
11767
|
+
const sheetFrameW = img ? img.naturalWidth / SHEET_COLUMNS : 0;
|
|
11768
|
+
const sheetFrameH = img ? img.naturalHeight / SHEET_ROWS : 0;
|
|
11769
|
+
const imgIsSheet = img ? img.naturalWidth % SHEET_COLUMNS === 0 && img.naturalHeight % SHEET_ROWS === 0 && Math.abs(sheetFrameW - sheetFrameH) < 2 : false;
|
|
11770
|
+
const frameW = imgIsSheet ? sheetFrameW : img?.naturalWidth ?? 1;
|
|
11771
|
+
const frameH = imgIsSheet ? sheetFrameH : img?.naturalHeight ?? 1;
|
|
11772
|
+
const ar = frameW / (frameH || 1);
|
|
11749
11773
|
let drawH = unitDrawH;
|
|
11750
11774
|
let drawW = unitDrawH * ar;
|
|
11751
11775
|
if (drawW > maxUnitW) {
|
|
@@ -11759,7 +11783,11 @@ function IsometricCanvas({
|
|
|
11759
11783
|
ctx.save();
|
|
11760
11784
|
ctx.globalAlpha = 0.25;
|
|
11761
11785
|
if (img) {
|
|
11762
|
-
|
|
11786
|
+
if (imgIsSheet) {
|
|
11787
|
+
ctx.drawImage(img, 0, 0, sheetFrameW, sheetFrameH, ghostCenterX - drawW / 2, ghostGroundY - drawH, drawW, drawH);
|
|
11788
|
+
} else {
|
|
11789
|
+
ctx.drawImage(img, ghostCenterX - drawW / 2, ghostGroundY - drawH, drawW, drawH);
|
|
11790
|
+
}
|
|
11763
11791
|
} else {
|
|
11764
11792
|
const color = unit.team === "player" ? "#3b82f6" : unit.team === "enemy" ? "#ef4444" : "#6b7280";
|
|
11765
11793
|
ctx.beginPath();
|
|
@@ -11803,14 +11831,21 @@ function IsometricCanvas({
|
|
|
11803
11831
|
ctx.restore();
|
|
11804
11832
|
} else if (img) {
|
|
11805
11833
|
const spriteY = groundY - drawH - breatheOffset;
|
|
11834
|
+
const drawUnit = (x) => {
|
|
11835
|
+
if (imgIsSheet) {
|
|
11836
|
+
ctx.drawImage(img, 0, 0, sheetFrameW, sheetFrameH, x, spriteY, drawW, drawH);
|
|
11837
|
+
} else {
|
|
11838
|
+
ctx.drawImage(img, x, spriteY, drawW, drawH);
|
|
11839
|
+
}
|
|
11840
|
+
};
|
|
11806
11841
|
if (unit.team) {
|
|
11807
11842
|
ctx.save();
|
|
11808
11843
|
ctx.shadowColor = unit.team === "player" ? "rgba(0, 150, 255, 0.6)" : "rgba(255, 50, 50, 0.6)";
|
|
11809
11844
|
ctx.shadowBlur = 12 * scale;
|
|
11810
|
-
|
|
11845
|
+
drawUnit(centerX - drawW / 2);
|
|
11811
11846
|
ctx.restore();
|
|
11812
11847
|
} else {
|
|
11813
|
-
|
|
11848
|
+
drawUnit(centerX - drawW / 2);
|
|
11814
11849
|
}
|
|
11815
11850
|
} else {
|
|
11816
11851
|
const color = unit.team === "player" ? "#3b82f6" : unit.team === "enemy" ? "#ef4444" : "#6b7280";
|
|
@@ -12103,6 +12138,7 @@ var init_IsometricCanvas = __esm({
|
|
|
12103
12138
|
init_useUnitSpriteAtlas();
|
|
12104
12139
|
init_verificationRegistry();
|
|
12105
12140
|
init_isometric();
|
|
12141
|
+
init_spriteSheetConstants();
|
|
12106
12142
|
IsometricCanvas.displayName = "IsometricCanvas";
|
|
12107
12143
|
IsometricCanvas_default = IsometricCanvas;
|
|
12108
12144
|
}
|
|
@@ -13902,7 +13938,7 @@ var init_CodeBlock = __esm({
|
|
|
13902
13938
|
};
|
|
13903
13939
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
13904
13940
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
13905
|
-
CodeBlock =
|
|
13941
|
+
CodeBlock = React86__default.memo(
|
|
13906
13942
|
({
|
|
13907
13943
|
code: rawCode,
|
|
13908
13944
|
language = "text",
|
|
@@ -14489,7 +14525,7 @@ var init_MarkdownContent = __esm({
|
|
|
14489
14525
|
init_Box();
|
|
14490
14526
|
init_CodeBlock();
|
|
14491
14527
|
init_cn();
|
|
14492
|
-
MarkdownContent =
|
|
14528
|
+
MarkdownContent = React86__default.memo(
|
|
14493
14529
|
({ content, direction = "ltr", className }) => {
|
|
14494
14530
|
const { t: _t } = useTranslate();
|
|
14495
14531
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -14779,6 +14815,48 @@ var init_BloomQuizBlock = __esm({
|
|
|
14779
14815
|
BloomQuizBlock.displayName = "BloomQuizBlock";
|
|
14780
14816
|
}
|
|
14781
14817
|
});
|
|
14818
|
+
function BoardgameBoard({
|
|
14819
|
+
tiles,
|
|
14820
|
+
units,
|
|
14821
|
+
features,
|
|
14822
|
+
assetManifest,
|
|
14823
|
+
assetBaseUrl,
|
|
14824
|
+
scale = 0.45,
|
|
14825
|
+
showMinimap = false,
|
|
14826
|
+
enableCamera = true,
|
|
14827
|
+
tileClickEvent,
|
|
14828
|
+
unitClickEvent,
|
|
14829
|
+
isLoading,
|
|
14830
|
+
error,
|
|
14831
|
+
className
|
|
14832
|
+
}) {
|
|
14833
|
+
return /* @__PURE__ */ jsx("div", { className: cn("boardgame-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
14834
|
+
IsometricCanvas_default,
|
|
14835
|
+
{
|
|
14836
|
+
tileLayout: "flat",
|
|
14837
|
+
tiles,
|
|
14838
|
+
units,
|
|
14839
|
+
features,
|
|
14840
|
+
assetManifest,
|
|
14841
|
+
assetBaseUrl,
|
|
14842
|
+
scale,
|
|
14843
|
+
showMinimap,
|
|
14844
|
+
enableCamera,
|
|
14845
|
+
tileClickEvent,
|
|
14846
|
+
unitClickEvent,
|
|
14847
|
+
isLoading,
|
|
14848
|
+
error
|
|
14849
|
+
}
|
|
14850
|
+
) });
|
|
14851
|
+
}
|
|
14852
|
+
var init_BoardgameBoard = __esm({
|
|
14853
|
+
"components/game/organisms/BoardgameBoard.tsx"() {
|
|
14854
|
+
"use client";
|
|
14855
|
+
init_cn();
|
|
14856
|
+
init_IsometricCanvas();
|
|
14857
|
+
BoardgameBoard.displayName = "BoardgameBoard";
|
|
14858
|
+
}
|
|
14859
|
+
});
|
|
14782
14860
|
var MIN_DIAGRAM_WIDTH, ScaledDiagram;
|
|
14783
14861
|
var init_ScaledDiagram = __esm({
|
|
14784
14862
|
"components/core/molecules/ScaledDiagram.tsx"() {
|
|
@@ -15816,7 +15894,7 @@ var init_StateMachineView = __esm({
|
|
|
15816
15894
|
style: { top: title ? 30 : 0 },
|
|
15817
15895
|
children: [
|
|
15818
15896
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
15819
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
15897
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React86__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
15820
15898
|
StateNode,
|
|
15821
15899
|
{
|
|
15822
15900
|
state,
|
|
@@ -19771,7 +19849,7 @@ function CardHand({
|
|
|
19771
19849
|
className
|
|
19772
19850
|
}) {
|
|
19773
19851
|
const eventBus = useEventBus();
|
|
19774
|
-
const handleClick =
|
|
19852
|
+
const handleClick = React86.useCallback(
|
|
19775
19853
|
(card) => {
|
|
19776
19854
|
if (card.disabled) return;
|
|
19777
19855
|
onCardClick?.(card.id);
|
|
@@ -21917,6 +21995,215 @@ var init_ChartLegend = __esm({
|
|
|
21917
21995
|
ChartLegend.displayName = "ChartLegend";
|
|
21918
21996
|
}
|
|
21919
21997
|
});
|
|
21998
|
+
|
|
21999
|
+
// components/core/organisms/trace-edit-focus.ts
|
|
22000
|
+
function asString(v) {
|
|
22001
|
+
return typeof v === "string" ? v : void 0;
|
|
22002
|
+
}
|
|
22003
|
+
function asLevel(v) {
|
|
22004
|
+
if (typeof v === "string" && EDIT_FOCUS_LEVELS.has(v)) {
|
|
22005
|
+
return v;
|
|
22006
|
+
}
|
|
22007
|
+
return "node";
|
|
22008
|
+
}
|
|
22009
|
+
function isEventPayload(v) {
|
|
22010
|
+
return v !== null && v !== void 0 && typeof v === "object" && !Array.isArray(v) && !(v instanceof Date);
|
|
22011
|
+
}
|
|
22012
|
+
function parseEditFocus(value) {
|
|
22013
|
+
if (!isEventPayload(value)) return null;
|
|
22014
|
+
const payload = value;
|
|
22015
|
+
const orbital = asString(payload.orbital);
|
|
22016
|
+
if (orbital === void 0 || orbital.length === 0) return null;
|
|
22017
|
+
const focus = {
|
|
22018
|
+
level: asLevel(payload.level),
|
|
22019
|
+
orbital,
|
|
22020
|
+
label: asString(payload.label) ?? orbital
|
|
22021
|
+
};
|
|
22022
|
+
const trait = asString(payload.trait);
|
|
22023
|
+
if (trait !== void 0) focus.trait = trait;
|
|
22024
|
+
const transition = asString(payload.transition);
|
|
22025
|
+
if (transition !== void 0) focus.transition = transition;
|
|
22026
|
+
const state = asString(payload.state);
|
|
22027
|
+
if (state !== void 0) focus.state = state;
|
|
22028
|
+
const slot = asString(payload.slot);
|
|
22029
|
+
if (slot !== void 0) focus.slot = slot;
|
|
22030
|
+
const path = asString(payload.path);
|
|
22031
|
+
if (path !== void 0) focus.path = path;
|
|
22032
|
+
const patternType = asString(payload.patternType);
|
|
22033
|
+
if (patternType !== void 0) focus.patternType = patternType;
|
|
22034
|
+
const entity = asString(payload.entity);
|
|
22035
|
+
if (entity !== void 0) focus.entity = entity;
|
|
22036
|
+
const source = asString(payload.source);
|
|
22037
|
+
if (source !== void 0) focus.source = source;
|
|
22038
|
+
return focus;
|
|
22039
|
+
}
|
|
22040
|
+
var ELEMENT_SELECTED_EVENT, EDIT_FOCUS_LEVELS;
|
|
22041
|
+
var init_trace_edit_focus = __esm({
|
|
22042
|
+
"components/core/organisms/trace-edit-focus.ts"() {
|
|
22043
|
+
ELEMENT_SELECTED_EVENT = "UI:ELEMENT_SELECTED";
|
|
22044
|
+
EDIT_FOCUS_LEVELS = /* @__PURE__ */ new Set([
|
|
22045
|
+
"node",
|
|
22046
|
+
"slot",
|
|
22047
|
+
"field",
|
|
22048
|
+
"effect",
|
|
22049
|
+
"trait",
|
|
22050
|
+
"page",
|
|
22051
|
+
"orbital"
|
|
22052
|
+
]);
|
|
22053
|
+
}
|
|
22054
|
+
});
|
|
22055
|
+
function getJepaBadgeVariant(probability) {
|
|
22056
|
+
if (probability >= 0.9) return "success";
|
|
22057
|
+
if (probability >= 0.5) return "warning";
|
|
22058
|
+
return "danger";
|
|
22059
|
+
}
|
|
22060
|
+
function ChatBar({
|
|
22061
|
+
status = "idle",
|
|
22062
|
+
activeGate,
|
|
22063
|
+
jepaValidity,
|
|
22064
|
+
placeholder,
|
|
22065
|
+
context,
|
|
22066
|
+
className
|
|
22067
|
+
}) {
|
|
22068
|
+
const { t } = useTranslate();
|
|
22069
|
+
const eventBus = useEventBus();
|
|
22070
|
+
const [inputValue, setInputValue] = useState("");
|
|
22071
|
+
const [focus, setFocus] = useState(null);
|
|
22072
|
+
const clearFocus = useCallback(() => {
|
|
22073
|
+
setFocus(null);
|
|
22074
|
+
eventBus.emit(ELEMENT_SELECTED_EVENT, { focus: null });
|
|
22075
|
+
}, [eventBus]);
|
|
22076
|
+
const handleKeyDown = useCallback((e) => {
|
|
22077
|
+
if (e.key !== "Enter" || e.shiftKey) return;
|
|
22078
|
+
const trimmed = inputValue.trim();
|
|
22079
|
+
if (!trimmed) return;
|
|
22080
|
+
e.preventDefault();
|
|
22081
|
+
eventBus.emit("UI:CHAT_SEND", { message: trimmed });
|
|
22082
|
+
}, [inputValue, eventBus]);
|
|
22083
|
+
useEffect(() => {
|
|
22084
|
+
const unsubSend = eventBus.on("UI:CHAT_SEND", () => {
|
|
22085
|
+
setInputValue("");
|
|
22086
|
+
setFocus(null);
|
|
22087
|
+
});
|
|
22088
|
+
const unsubSelect = eventBus.on(ELEMENT_SELECTED_EVENT, (e) => {
|
|
22089
|
+
setFocus(parseEditFocus(e.payload?.focus));
|
|
22090
|
+
});
|
|
22091
|
+
return () => {
|
|
22092
|
+
unsubSend();
|
|
22093
|
+
unsubSelect();
|
|
22094
|
+
};
|
|
22095
|
+
}, [eventBus]);
|
|
22096
|
+
const trailingAction = status === "error" ? /* @__PURE__ */ jsxs(Button, { variant: "secondary", size: "sm", action: "RETRY_GENERATION", className: "rounded-none flex-shrink-0 h-auto", children: [
|
|
22097
|
+
/* @__PURE__ */ jsx(Icon, { name: "refresh-cw", size: "xs" }),
|
|
22098
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", children: t("openFile.retry") })
|
|
22099
|
+
] }) : status === "running" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22100
|
+
/* @__PURE__ */ jsx(
|
|
22101
|
+
Button,
|
|
22102
|
+
{
|
|
22103
|
+
variant: "ghost",
|
|
22104
|
+
size: "sm",
|
|
22105
|
+
action: "PAUSE",
|
|
22106
|
+
title: t("chatBar.pauseTheAgentYouCanEdit"),
|
|
22107
|
+
className: "rounded-none flex-shrink-0 h-auto",
|
|
22108
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "pause", size: "xs" })
|
|
22109
|
+
}
|
|
22110
|
+
),
|
|
22111
|
+
/* @__PURE__ */ jsx(
|
|
22112
|
+
Button,
|
|
22113
|
+
{
|
|
22114
|
+
variant: "ghost",
|
|
22115
|
+
size: "sm",
|
|
22116
|
+
action: "STOP",
|
|
22117
|
+
title: t("chatBar.cancelGeneration"),
|
|
22118
|
+
className: "rounded-none flex-shrink-0 h-auto border-l border-[var(--color-border)]",
|
|
22119
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "square", size: "xs" })
|
|
22120
|
+
}
|
|
22121
|
+
)
|
|
22122
|
+
] }) : status === "paused" ? /* @__PURE__ */ jsxs(
|
|
22123
|
+
Button,
|
|
22124
|
+
{
|
|
22125
|
+
variant: "primary",
|
|
22126
|
+
size: "sm",
|
|
22127
|
+
action: "RESUME",
|
|
22128
|
+
title: t("chatBar.resumeTheAgentYourCanvasEdits"),
|
|
22129
|
+
className: "rounded-none flex-shrink-0 h-auto",
|
|
22130
|
+
children: [
|
|
22131
|
+
/* @__PURE__ */ jsx(Icon, { name: "play", size: "xs" }),
|
|
22132
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", children: t("chatBar.resume") })
|
|
22133
|
+
]
|
|
22134
|
+
}
|
|
22135
|
+
) : /* @__PURE__ */ jsx(
|
|
22136
|
+
Button,
|
|
22137
|
+
{
|
|
22138
|
+
variant: "primary",
|
|
22139
|
+
size: "sm",
|
|
22140
|
+
action: "CHAT_SEND",
|
|
22141
|
+
actionPayload: { message: inputValue.trim() },
|
|
22142
|
+
disabled: !inputValue.trim(),
|
|
22143
|
+
"aria-label": t("chatBar.sendMessage"),
|
|
22144
|
+
className: "rounded-none flex-shrink-0 h-auto",
|
|
22145
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "send", size: "xs" })
|
|
22146
|
+
}
|
|
22147
|
+
);
|
|
22148
|
+
return /* @__PURE__ */ jsxs(Box, { className: `border-t border-[var(--color-border)] bg-[var(--color-card)] ${className ?? ""}`, children: [
|
|
22149
|
+
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: [
|
|
22150
|
+
/* @__PURE__ */ jsx(Icon, { name: "mouse-pointer-2", size: "xs" }),
|
|
22151
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-inherit truncate", children: [
|
|
22152
|
+
t("chatBar.editing"),
|
|
22153
|
+
": ",
|
|
22154
|
+
focus.label
|
|
22155
|
+
] }),
|
|
22156
|
+
/* @__PURE__ */ jsx(
|
|
22157
|
+
Box,
|
|
22158
|
+
{
|
|
22159
|
+
onClick: clearFocus,
|
|
22160
|
+
title: t("chatBar.clearSelection"),
|
|
22161
|
+
className: "cursor-pointer flex items-center ml-1 hover:opacity-70",
|
|
22162
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" })
|
|
22163
|
+
}
|
|
22164
|
+
)
|
|
22165
|
+
] }) }),
|
|
22166
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center px-4 py-2", children: [
|
|
22167
|
+
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 }) }),
|
|
22168
|
+
/* @__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: [
|
|
22169
|
+
/* @__PURE__ */ jsx(
|
|
22170
|
+
Textarea,
|
|
22171
|
+
{
|
|
22172
|
+
value: inputValue,
|
|
22173
|
+
placeholder: placeholder ?? t("chatBar.askTheAgentAnything"),
|
|
22174
|
+
onChange: (e) => setInputValue(e.target.value),
|
|
22175
|
+
onKeyDown: handleKeyDown,
|
|
22176
|
+
rows: 1,
|
|
22177
|
+
className: "flex-1 min-w-0 min-h-0 text-sm border-0 rounded-none shadow-none bg-transparent resize-none focus:ring-0"
|
|
22178
|
+
}
|
|
22179
|
+
),
|
|
22180
|
+
trailingAction
|
|
22181
|
+
] }),
|
|
22182
|
+
(activeGate || jepaValidity !== void 0) && /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center flex-shrink-0", children: [
|
|
22183
|
+
activeGate && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "whitespace-nowrap", children: activeGate }),
|
|
22184
|
+
jepaValidity !== void 0 && /* @__PURE__ */ jsx(Badge, { variant: getJepaBadgeVariant(jepaValidity), size: "sm", children: /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-inherit", children: [
|
|
22185
|
+
(jepaValidity * 100).toFixed(1),
|
|
22186
|
+
"%"
|
|
22187
|
+
] }) })
|
|
22188
|
+
] })
|
|
22189
|
+
] })
|
|
22190
|
+
] });
|
|
22191
|
+
}
|
|
22192
|
+
var init_ChatBar = __esm({
|
|
22193
|
+
"components/core/organisms/ChatBar.tsx"() {
|
|
22194
|
+
"use client";
|
|
22195
|
+
init_Box();
|
|
22196
|
+
init_Stack();
|
|
22197
|
+
init_Typography();
|
|
22198
|
+
init_Button();
|
|
22199
|
+
init_Badge();
|
|
22200
|
+
init_Icon();
|
|
22201
|
+
init_Textarea();
|
|
22202
|
+
init_useEventBus();
|
|
22203
|
+
init_trace_edit_focus();
|
|
22204
|
+
ChatBar.displayName = "ChatBar";
|
|
22205
|
+
}
|
|
22206
|
+
});
|
|
21920
22207
|
function resolveManifestUrl2(manifest, relative) {
|
|
21921
22208
|
if (relative == null) return void 0;
|
|
21922
22209
|
if (/^https?:\/\//.test(relative)) return relative;
|
|
@@ -23040,7 +23327,7 @@ function CraftingRecipe({
|
|
|
23040
23327
|
className
|
|
23041
23328
|
}) {
|
|
23042
23329
|
const eventBus = useEventBus();
|
|
23043
|
-
const handleCraft =
|
|
23330
|
+
const handleCraft = React86.useCallback(() => {
|
|
23044
23331
|
onCraft?.();
|
|
23045
23332
|
if (craftEvent) {
|
|
23046
23333
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -23057,7 +23344,7 @@ function CraftingRecipe({
|
|
|
23057
23344
|
children: [
|
|
23058
23345
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
23059
23346
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
23060
|
-
return /* @__PURE__ */ jsxs(
|
|
23347
|
+
return /* @__PURE__ */ jsxs(React86.Fragment, { children: [
|
|
23061
23348
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
23062
23349
|
ItemSlot,
|
|
23063
23350
|
{
|
|
@@ -23129,8 +23416,8 @@ function DPad({
|
|
|
23129
23416
|
}) {
|
|
23130
23417
|
const eventBus = useEventBus();
|
|
23131
23418
|
const sizes = sizeMap15[size];
|
|
23132
|
-
const [activeDirections, setActiveDirections] =
|
|
23133
|
-
const handlePress =
|
|
23419
|
+
const [activeDirections, setActiveDirections] = React86.useState(/* @__PURE__ */ new Set());
|
|
23420
|
+
const handlePress = React86.useCallback(
|
|
23134
23421
|
(direction) => {
|
|
23135
23422
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
23136
23423
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -23138,7 +23425,7 @@ function DPad({
|
|
|
23138
23425
|
},
|
|
23139
23426
|
[directionEvent, eventBus, onDirection]
|
|
23140
23427
|
);
|
|
23141
|
-
const handleRelease =
|
|
23428
|
+
const handleRelease = React86.useCallback(
|
|
23142
23429
|
(direction) => {
|
|
23143
23430
|
setActiveDirections((prev) => {
|
|
23144
23431
|
const next = new Set(prev);
|
|
@@ -24023,8 +24310,8 @@ var init_Menu = __esm({
|
|
|
24023
24310
|
"bottom-end": "bottom-start"
|
|
24024
24311
|
};
|
|
24025
24312
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
24026
|
-
const triggerChild =
|
|
24027
|
-
const triggerElement =
|
|
24313
|
+
const triggerChild = React86__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
24314
|
+
const triggerElement = React86__default.cloneElement(
|
|
24028
24315
|
triggerChild,
|
|
24029
24316
|
{
|
|
24030
24317
|
ref: triggerRef,
|
|
@@ -24119,14 +24406,14 @@ function useDataDnd(args) {
|
|
|
24119
24406
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
24120
24407
|
const enabled = isZone || Boolean(dndRoot);
|
|
24121
24408
|
const eventBus = useEventBus();
|
|
24122
|
-
const parentRoot =
|
|
24409
|
+
const parentRoot = React86__default.useContext(RootCtx);
|
|
24123
24410
|
const isRoot = enabled && parentRoot === null;
|
|
24124
|
-
const zoneId =
|
|
24411
|
+
const zoneId = React86__default.useId();
|
|
24125
24412
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
24126
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
24127
|
-
const optimisticOrdersRef =
|
|
24413
|
+
const [optimisticOrders, setOptimisticOrders] = React86__default.useState(() => /* @__PURE__ */ new Map());
|
|
24414
|
+
const optimisticOrdersRef = React86__default.useRef(optimisticOrders);
|
|
24128
24415
|
optimisticOrdersRef.current = optimisticOrders;
|
|
24129
|
-
const clearOptimisticOrder =
|
|
24416
|
+
const clearOptimisticOrder = React86__default.useCallback((group) => {
|
|
24130
24417
|
setOptimisticOrders((prev) => {
|
|
24131
24418
|
if (!prev.has(group)) return prev;
|
|
24132
24419
|
const next = new Map(prev);
|
|
@@ -24151,7 +24438,7 @@ function useDataDnd(args) {
|
|
|
24151
24438
|
const raw = it[dndItemIdField];
|
|
24152
24439
|
return String(raw ?? `__idx_${idx}`);
|
|
24153
24440
|
}).join("|");
|
|
24154
|
-
const itemIds =
|
|
24441
|
+
const itemIds = React86__default.useMemo(
|
|
24155
24442
|
() => orderedItems.map((it, idx) => {
|
|
24156
24443
|
const raw = it[dndItemIdField];
|
|
24157
24444
|
return raw ?? `__idx_${idx}`;
|
|
@@ -24159,7 +24446,7 @@ function useDataDnd(args) {
|
|
|
24159
24446
|
[itemIdsSignature]
|
|
24160
24447
|
);
|
|
24161
24448
|
const itemsContentSig = items.map((it, idx) => String(it[dndItemIdField] ?? `__${idx}`)).join("|");
|
|
24162
|
-
|
|
24449
|
+
React86__default.useEffect(() => {
|
|
24163
24450
|
const root = isRoot ? null : parentRoot;
|
|
24164
24451
|
if (root) {
|
|
24165
24452
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -24167,20 +24454,20 @@ function useDataDnd(args) {
|
|
|
24167
24454
|
clearOptimisticOrder(ownGroup);
|
|
24168
24455
|
}
|
|
24169
24456
|
}, [itemsContentSig, ownGroup]);
|
|
24170
|
-
const zonesRef =
|
|
24171
|
-
const registerZone =
|
|
24457
|
+
const zonesRef = React86__default.useRef(/* @__PURE__ */ new Map());
|
|
24458
|
+
const registerZone = React86__default.useCallback((zoneId2, meta2) => {
|
|
24172
24459
|
zonesRef.current.set(zoneId2, meta2);
|
|
24173
24460
|
}, []);
|
|
24174
|
-
const unregisterZone =
|
|
24461
|
+
const unregisterZone = React86__default.useCallback((zoneId2) => {
|
|
24175
24462
|
zonesRef.current.delete(zoneId2);
|
|
24176
24463
|
}, []);
|
|
24177
|
-
const [activeDrag, setActiveDrag] =
|
|
24178
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
24179
|
-
const meta =
|
|
24464
|
+
const [activeDrag, setActiveDrag] = React86__default.useState(null);
|
|
24465
|
+
const [overZoneGroup, setOverZoneGroup] = React86__default.useState(null);
|
|
24466
|
+
const meta = React86__default.useMemo(
|
|
24180
24467
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
24181
24468
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
24182
24469
|
);
|
|
24183
|
-
|
|
24470
|
+
React86__default.useEffect(() => {
|
|
24184
24471
|
const target = isRoot ? null : parentRoot;
|
|
24185
24472
|
if (!target) {
|
|
24186
24473
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -24199,7 +24486,7 @@ function useDataDnd(args) {
|
|
|
24199
24486
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
24200
24487
|
const sensors = useAlmadarDndSensors(true);
|
|
24201
24488
|
const collisionDetection = almadarDndCollisionDetection;
|
|
24202
|
-
const findZoneByItem =
|
|
24489
|
+
const findZoneByItem = React86__default.useCallback(
|
|
24203
24490
|
(id) => {
|
|
24204
24491
|
for (const z of zonesRef.current.values()) {
|
|
24205
24492
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -24208,7 +24495,7 @@ function useDataDnd(args) {
|
|
|
24208
24495
|
},
|
|
24209
24496
|
[]
|
|
24210
24497
|
);
|
|
24211
|
-
|
|
24498
|
+
React86__default.useCallback(
|
|
24212
24499
|
(group) => {
|
|
24213
24500
|
for (const z of zonesRef.current.values()) {
|
|
24214
24501
|
if (z.group === group) return z;
|
|
@@ -24217,7 +24504,7 @@ function useDataDnd(args) {
|
|
|
24217
24504
|
},
|
|
24218
24505
|
[]
|
|
24219
24506
|
);
|
|
24220
|
-
const handleDragEnd =
|
|
24507
|
+
const handleDragEnd = React86__default.useCallback(
|
|
24221
24508
|
(event) => {
|
|
24222
24509
|
const { active, over } = event;
|
|
24223
24510
|
const activeIdStr = String(active.id);
|
|
@@ -24308,8 +24595,8 @@ function useDataDnd(args) {
|
|
|
24308
24595
|
},
|
|
24309
24596
|
[eventBus]
|
|
24310
24597
|
);
|
|
24311
|
-
const sortableData =
|
|
24312
|
-
const SortableItem =
|
|
24598
|
+
const sortableData = React86__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
24599
|
+
const SortableItem = React86__default.useCallback(
|
|
24313
24600
|
({ id, children }) => {
|
|
24314
24601
|
const {
|
|
24315
24602
|
attributes,
|
|
@@ -24349,7 +24636,7 @@ function useDataDnd(args) {
|
|
|
24349
24636
|
id: droppableId,
|
|
24350
24637
|
data: sortableData
|
|
24351
24638
|
});
|
|
24352
|
-
const ctx =
|
|
24639
|
+
const ctx = React86__default.useContext(RootCtx);
|
|
24353
24640
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
24354
24641
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
24355
24642
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -24364,7 +24651,7 @@ function useDataDnd(args) {
|
|
|
24364
24651
|
showForeignPlaceholder,
|
|
24365
24652
|
ctxAvailable: ctx != null
|
|
24366
24653
|
});
|
|
24367
|
-
|
|
24654
|
+
React86__default.useEffect(() => {
|
|
24368
24655
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
24369
24656
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
24370
24657
|
return /* @__PURE__ */ jsx(
|
|
@@ -24378,11 +24665,11 @@ function useDataDnd(args) {
|
|
|
24378
24665
|
}
|
|
24379
24666
|
);
|
|
24380
24667
|
};
|
|
24381
|
-
const rootContextValue =
|
|
24668
|
+
const rootContextValue = React86__default.useMemo(
|
|
24382
24669
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
24383
24670
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
24384
24671
|
);
|
|
24385
|
-
const handleDragStart =
|
|
24672
|
+
const handleDragStart = React86__default.useCallback((event) => {
|
|
24386
24673
|
const sourceZone = findZoneByItem(event.active.id);
|
|
24387
24674
|
const rect = event.active.rect.current.initial;
|
|
24388
24675
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -24401,7 +24688,7 @@ function useDataDnd(args) {
|
|
|
24401
24688
|
isRoot
|
|
24402
24689
|
});
|
|
24403
24690
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
24404
|
-
const handleDragOver =
|
|
24691
|
+
const handleDragOver = React86__default.useCallback((event) => {
|
|
24405
24692
|
const { active, over } = event;
|
|
24406
24693
|
const overData = over?.data?.current;
|
|
24407
24694
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -24471,7 +24758,7 @@ function useDataDnd(args) {
|
|
|
24471
24758
|
return next;
|
|
24472
24759
|
});
|
|
24473
24760
|
}, []);
|
|
24474
|
-
const handleDragCancel =
|
|
24761
|
+
const handleDragCancel = React86__default.useCallback((event) => {
|
|
24475
24762
|
setActiveDrag(null);
|
|
24476
24763
|
setOverZoneGroup(null);
|
|
24477
24764
|
dndLog.warn("dragCancel", {
|
|
@@ -24479,12 +24766,12 @@ function useDataDnd(args) {
|
|
|
24479
24766
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
24480
24767
|
});
|
|
24481
24768
|
}, []);
|
|
24482
|
-
const handleDragEndWithCleanup =
|
|
24769
|
+
const handleDragEndWithCleanup = React86__default.useCallback((event) => {
|
|
24483
24770
|
handleDragEnd(event);
|
|
24484
24771
|
setActiveDrag(null);
|
|
24485
24772
|
setOverZoneGroup(null);
|
|
24486
24773
|
}, [handleDragEnd]);
|
|
24487
|
-
const wrapContainer =
|
|
24774
|
+
const wrapContainer = React86__default.useCallback(
|
|
24488
24775
|
(children) => {
|
|
24489
24776
|
if (!enabled) return children;
|
|
24490
24777
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -24538,7 +24825,7 @@ var init_useDataDnd = __esm({
|
|
|
24538
24825
|
init_useAlmadarDndCollision();
|
|
24539
24826
|
init_Box();
|
|
24540
24827
|
dndLog = createLogger("almadar:ui:dnd");
|
|
24541
|
-
RootCtx =
|
|
24828
|
+
RootCtx = React86__default.createContext(null);
|
|
24542
24829
|
}
|
|
24543
24830
|
});
|
|
24544
24831
|
function renderIconInput(icon, props) {
|
|
@@ -25064,7 +25351,7 @@ function DataList({
|
|
|
25064
25351
|
}) {
|
|
25065
25352
|
const eventBus = useEventBus();
|
|
25066
25353
|
const { t } = useTranslate();
|
|
25067
|
-
const [visibleCount, setVisibleCount] =
|
|
25354
|
+
const [visibleCount, setVisibleCount] = React86__default.useState(pageSize || Infinity);
|
|
25068
25355
|
const fieldDefs = fields ?? columns ?? [];
|
|
25069
25356
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
25070
25357
|
const dnd = useDataDnd({
|
|
@@ -25083,7 +25370,7 @@ function DataList({
|
|
|
25083
25370
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
25084
25371
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
25085
25372
|
const hasRenderProp = typeof children === "function";
|
|
25086
|
-
|
|
25373
|
+
React86__default.useEffect(() => {
|
|
25087
25374
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
25088
25375
|
const childrenTypeOf = typeof children;
|
|
25089
25376
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -25188,7 +25475,7 @@ function DataList({
|
|
|
25188
25475
|
const items2 = data.map((item) => item);
|
|
25189
25476
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
25190
25477
|
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(
|
|
25478
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
25192
25479
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
25193
25480
|
group.items.map((itemData, index) => {
|
|
25194
25481
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -25329,7 +25616,7 @@ function DataList({
|
|
|
25329
25616
|
className
|
|
25330
25617
|
),
|
|
25331
25618
|
children: [
|
|
25332
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
25619
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
25333
25620
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
25334
25621
|
group.items.map(
|
|
25335
25622
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -26245,7 +26532,7 @@ var init_Grid = __esm({
|
|
|
26245
26532
|
as: Component2 = "div"
|
|
26246
26533
|
}) => {
|
|
26247
26534
|
const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
|
|
26248
|
-
return
|
|
26535
|
+
return React86__default.createElement(
|
|
26249
26536
|
Component2,
|
|
26250
26537
|
{
|
|
26251
26538
|
className: cn(
|
|
@@ -26441,9 +26728,9 @@ var init_Popover = __esm({
|
|
|
26441
26728
|
onMouseLeave: handleClose,
|
|
26442
26729
|
onPointerDown: tapTriggerProps.onPointerDown
|
|
26443
26730
|
};
|
|
26444
|
-
const childElement =
|
|
26731
|
+
const childElement = React86__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
26445
26732
|
const childPointerDown = childElement.props.onPointerDown;
|
|
26446
|
-
const triggerElement =
|
|
26733
|
+
const triggerElement = React86__default.cloneElement(
|
|
26447
26734
|
childElement,
|
|
26448
26735
|
{
|
|
26449
26736
|
ref: triggerRef,
|
|
@@ -27045,9 +27332,9 @@ var init_Tooltip = __esm({
|
|
|
27045
27332
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
27046
27333
|
};
|
|
27047
27334
|
}, []);
|
|
27048
|
-
const triggerElement =
|
|
27335
|
+
const triggerElement = React86__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
27049
27336
|
const childPointerDown = triggerElement.props.onPointerDown;
|
|
27050
|
-
const trigger =
|
|
27337
|
+
const trigger = React86__default.cloneElement(triggerElement, {
|
|
27051
27338
|
ref: triggerRef,
|
|
27052
27339
|
onMouseEnter: handleMouseEnter,
|
|
27053
27340
|
onMouseLeave: handleMouseLeave,
|
|
@@ -27137,7 +27424,7 @@ var init_WizardProgress = __esm({
|
|
|
27137
27424
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
27138
27425
|
const isActive = index === currentStep;
|
|
27139
27426
|
const isCompleted = index < currentStep;
|
|
27140
|
-
return /* @__PURE__ */ jsxs(
|
|
27427
|
+
return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
27141
27428
|
/* @__PURE__ */ jsx(
|
|
27142
27429
|
"button",
|
|
27143
27430
|
{
|
|
@@ -28200,7 +28487,7 @@ function InventoryGrid({
|
|
|
28200
28487
|
const eventBus = useEventBus();
|
|
28201
28488
|
const slotCount = totalSlots ?? items.length;
|
|
28202
28489
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
28203
|
-
const handleSelect =
|
|
28490
|
+
const handleSelect = React86.useCallback(
|
|
28204
28491
|
(id) => {
|
|
28205
28492
|
onSelect?.(id);
|
|
28206
28493
|
if (selectEvent) {
|
|
@@ -28435,31 +28722,31 @@ function GameCanvas2D({
|
|
|
28435
28722
|
assetBaseUrl,
|
|
28436
28723
|
className
|
|
28437
28724
|
}) {
|
|
28438
|
-
const canvasRef =
|
|
28439
|
-
const rafRef =
|
|
28440
|
-
const frameRef =
|
|
28441
|
-
const lastTimeRef =
|
|
28442
|
-
const imageCache =
|
|
28725
|
+
const canvasRef = React86.useRef(null);
|
|
28726
|
+
const rafRef = React86.useRef(0);
|
|
28727
|
+
const frameRef = React86.useRef(0);
|
|
28728
|
+
const lastTimeRef = React86.useRef(0);
|
|
28729
|
+
const imageCache = React86.useRef(/* @__PURE__ */ new Map());
|
|
28443
28730
|
const emit = useEmitEvent();
|
|
28444
|
-
const onDrawRef =
|
|
28731
|
+
const onDrawRef = React86.useRef(onDraw);
|
|
28445
28732
|
onDrawRef.current = onDraw;
|
|
28446
|
-
const onTickRef =
|
|
28733
|
+
const onTickRef = React86.useRef(onTick);
|
|
28447
28734
|
onTickRef.current = onTick;
|
|
28448
|
-
const tickEventRef =
|
|
28735
|
+
const tickEventRef = React86.useRef(tickEvent);
|
|
28449
28736
|
tickEventRef.current = tickEvent;
|
|
28450
|
-
const drawEventRef =
|
|
28737
|
+
const drawEventRef = React86.useRef(drawEvent);
|
|
28451
28738
|
drawEventRef.current = drawEvent;
|
|
28452
|
-
const emitRef =
|
|
28739
|
+
const emitRef = React86.useRef(emit);
|
|
28453
28740
|
emitRef.current = emit;
|
|
28454
|
-
const assetBaseUrlRef =
|
|
28741
|
+
const assetBaseUrlRef = React86.useRef(assetBaseUrl);
|
|
28455
28742
|
assetBaseUrlRef.current = assetBaseUrl;
|
|
28456
|
-
const backgroundImageRef =
|
|
28743
|
+
const backgroundImageRef = React86.useRef(backgroundImage);
|
|
28457
28744
|
backgroundImageRef.current = backgroundImage;
|
|
28458
|
-
const widthRef =
|
|
28745
|
+
const widthRef = React86.useRef(width);
|
|
28459
28746
|
widthRef.current = width;
|
|
28460
|
-
const heightRef =
|
|
28747
|
+
const heightRef = React86.useRef(height);
|
|
28461
28748
|
heightRef.current = height;
|
|
28462
|
-
const loadImage =
|
|
28749
|
+
const loadImage = React86.useCallback((url) => {
|
|
28463
28750
|
const base = assetBaseUrlRef.current;
|
|
28464
28751
|
if (!url.startsWith("http") && !base) return null;
|
|
28465
28752
|
const fullUrl = url.startsWith("http") ? url : `${base}${url}`;
|
|
@@ -28473,7 +28760,7 @@ function GameCanvas2D({
|
|
|
28473
28760
|
}
|
|
28474
28761
|
return null;
|
|
28475
28762
|
}, []);
|
|
28476
|
-
|
|
28763
|
+
React86.useEffect(() => {
|
|
28477
28764
|
const canvas = canvasRef.current;
|
|
28478
28765
|
if (!canvas) return;
|
|
28479
28766
|
const ctx = canvas.getContext("2d");
|
|
@@ -28798,7 +29085,7 @@ function TurnPanel({
|
|
|
28798
29085
|
className
|
|
28799
29086
|
}) {
|
|
28800
29087
|
const eventBus = useEventBus();
|
|
28801
|
-
const handleAction =
|
|
29088
|
+
const handleAction = React86.useCallback(
|
|
28802
29089
|
(event) => {
|
|
28803
29090
|
if (event) {
|
|
28804
29091
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -28979,7 +29266,7 @@ function UnitCommandBar({
|
|
|
28979
29266
|
className
|
|
28980
29267
|
}) {
|
|
28981
29268
|
const eventBus = useEventBus();
|
|
28982
|
-
const handleCommand =
|
|
29269
|
+
const handleCommand = React86.useCallback(
|
|
28983
29270
|
(event) => {
|
|
28984
29271
|
if (event) {
|
|
28985
29272
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -29530,7 +29817,7 @@ function GameMenu({
|
|
|
29530
29817
|
} catch {
|
|
29531
29818
|
}
|
|
29532
29819
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
29533
|
-
const handleOptionClick =
|
|
29820
|
+
const handleOptionClick = React86.useCallback(
|
|
29534
29821
|
(option) => {
|
|
29535
29822
|
if (option.event && eventBus) {
|
|
29536
29823
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -29649,7 +29936,7 @@ function GameOverScreen({
|
|
|
29649
29936
|
} catch {
|
|
29650
29937
|
}
|
|
29651
29938
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
29652
|
-
const handleActionClick =
|
|
29939
|
+
const handleActionClick = React86.useCallback(
|
|
29653
29940
|
(action) => {
|
|
29654
29941
|
if (action.event && eventBus) {
|
|
29655
29942
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -30581,13 +30868,13 @@ var init_MapView = __esm({
|
|
|
30581
30868
|
shadowSize: [41, 41]
|
|
30582
30869
|
});
|
|
30583
30870
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
30584
|
-
const { useEffect:
|
|
30871
|
+
const { useEffect: useEffect83, useRef: useRef80, useCallback: useCallback126, useState: useState113 } = React86__default;
|
|
30585
30872
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
30586
30873
|
const { useEventBus: useEventBus3 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
30587
30874
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
30588
30875
|
const map = useMap();
|
|
30589
30876
|
const prevRef = useRef80({ centerLat, centerLng, zoom });
|
|
30590
|
-
|
|
30877
|
+
useEffect83(() => {
|
|
30591
30878
|
const prev = prevRef.current;
|
|
30592
30879
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
30593
30880
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -30598,7 +30885,7 @@ var init_MapView = __esm({
|
|
|
30598
30885
|
}
|
|
30599
30886
|
function MapClickHandler({ onMapClick }) {
|
|
30600
30887
|
const map = useMap();
|
|
30601
|
-
|
|
30888
|
+
useEffect83(() => {
|
|
30602
30889
|
if (!onMapClick) return;
|
|
30603
30890
|
const handler = (e) => {
|
|
30604
30891
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -30626,8 +30913,8 @@ var init_MapView = __esm({
|
|
|
30626
30913
|
showAttribution = true
|
|
30627
30914
|
}) {
|
|
30628
30915
|
const eventBus = useEventBus3();
|
|
30629
|
-
const [clickedPosition, setClickedPosition] =
|
|
30630
|
-
const handleMapClick =
|
|
30916
|
+
const [clickedPosition, setClickedPosition] = useState113(null);
|
|
30917
|
+
const handleMapClick = useCallback126((lat, lng) => {
|
|
30631
30918
|
if (showClickedPin) {
|
|
30632
30919
|
setClickedPosition({ lat, lng });
|
|
30633
30920
|
}
|
|
@@ -30636,7 +30923,7 @@ var init_MapView = __esm({
|
|
|
30636
30923
|
eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
|
|
30637
30924
|
}
|
|
30638
30925
|
}, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
|
|
30639
|
-
const handleMarkerClick =
|
|
30926
|
+
const handleMarkerClick = useCallback126((marker) => {
|
|
30640
30927
|
onMarkerClick?.(marker);
|
|
30641
30928
|
if (markerClickEvent) {
|
|
30642
30929
|
eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
|
|
@@ -31487,8 +31774,8 @@ function TableView({
|
|
|
31487
31774
|
}) {
|
|
31488
31775
|
const eventBus = useEventBus();
|
|
31489
31776
|
const { t } = useTranslate();
|
|
31490
|
-
const [visibleCount, setVisibleCount] =
|
|
31491
|
-
const [localSelected, setLocalSelected] =
|
|
31777
|
+
const [visibleCount, setVisibleCount] = React86__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
31778
|
+
const [localSelected, setLocalSelected] = React86__default.useState(/* @__PURE__ */ new Set());
|
|
31492
31779
|
const colDefs = columns ?? fields ?? [];
|
|
31493
31780
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
31494
31781
|
const dnd = useDataDnd({
|
|
@@ -31683,12 +31970,12 @@ function TableView({
|
|
|
31683
31970
|
]
|
|
31684
31971
|
}
|
|
31685
31972
|
);
|
|
31686
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
31973
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React86__default.Fragment, { children: rowInner }, id);
|
|
31687
31974
|
};
|
|
31688
31975
|
const items = data.map((row) => row);
|
|
31689
31976
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
31690
31977
|
let runningIndex = 0;
|
|
31691
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
31978
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
31692
31979
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
31693
31980
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
31694
31981
|
] }, gi)) });
|
|
@@ -33045,7 +33332,7 @@ var init_StepFlow = __esm({
|
|
|
33045
33332
|
className
|
|
33046
33333
|
}) => {
|
|
33047
33334
|
if (orientation === "vertical") {
|
|
33048
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
33335
|
+
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
33336
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
33050
33337
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
33051
33338
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -33056,7 +33343,7 @@ var init_StepFlow = __esm({
|
|
|
33056
33343
|
] })
|
|
33057
33344
|
] }) }, index)) });
|
|
33058
33345
|
}
|
|
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(
|
|
33346
|
+
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
33347
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
33061
33348
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
33062
33349
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -34041,7 +34328,7 @@ var init_LikertScale = __esm({
|
|
|
34041
34328
|
md: "text-base",
|
|
34042
34329
|
lg: "text-lg"
|
|
34043
34330
|
};
|
|
34044
|
-
LikertScale =
|
|
34331
|
+
LikertScale = React86__default.forwardRef(
|
|
34045
34332
|
({
|
|
34046
34333
|
question,
|
|
34047
34334
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -34053,7 +34340,7 @@ var init_LikertScale = __esm({
|
|
|
34053
34340
|
variant = "radios",
|
|
34054
34341
|
className
|
|
34055
34342
|
}, ref) => {
|
|
34056
|
-
const groupId =
|
|
34343
|
+
const groupId = React86__default.useId();
|
|
34057
34344
|
const eventBus = useEventBus();
|
|
34058
34345
|
const handleSelect = useCallback(
|
|
34059
34346
|
(next) => {
|
|
@@ -36335,7 +36622,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
36335
36622
|
"aria-label": t("aria.breadcrumb"),
|
|
36336
36623
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
36337
36624
|
const isLast = idx === items.length - 1;
|
|
36338
|
-
return /* @__PURE__ */ jsxs(
|
|
36625
|
+
return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
36339
36626
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
36340
36627
|
Icon,
|
|
36341
36628
|
{
|
|
@@ -37204,7 +37491,7 @@ var init_MiniStateMachine = __esm({
|
|
|
37204
37491
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
37205
37492
|
const tc = transitionCounts[s.name] ?? 0;
|
|
37206
37493
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
37207
|
-
return /* @__PURE__ */ jsxs(
|
|
37494
|
+
return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
37208
37495
|
/* @__PURE__ */ jsx(
|
|
37209
37496
|
AvlState,
|
|
37210
37497
|
{
|
|
@@ -37408,7 +37695,7 @@ var init_PageHeader = __esm({
|
|
|
37408
37695
|
info: "bg-info/10 text-info"
|
|
37409
37696
|
};
|
|
37410
37697
|
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(
|
|
37698
|
+
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
37699
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
37413
37700
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
37414
37701
|
"a",
|
|
@@ -38137,7 +38424,7 @@ var init_WizardContainer = __esm({
|
|
|
38137
38424
|
const isCompleted = index < currentStep;
|
|
38138
38425
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
38139
38426
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
38140
|
-
return /* @__PURE__ */ jsxs(
|
|
38427
|
+
return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
38141
38428
|
/* @__PURE__ */ jsx(
|
|
38142
38429
|
Button,
|
|
38143
38430
|
{
|
|
@@ -40697,7 +40984,7 @@ var init_DetailPanel = __esm({
|
|
|
40697
40984
|
}
|
|
40698
40985
|
});
|
|
40699
40986
|
function extractTitle(children) {
|
|
40700
|
-
if (!
|
|
40987
|
+
if (!React86__default.isValidElement(children)) return void 0;
|
|
40701
40988
|
const props = children.props;
|
|
40702
40989
|
if (typeof props.title === "string") {
|
|
40703
40990
|
return props.title;
|
|
@@ -40752,7 +41039,7 @@ function LinearView({
|
|
|
40752
41039
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
40753
41040
|
const isDone = i < currentIdx;
|
|
40754
41041
|
const isCurrent = i === currentIdx;
|
|
40755
|
-
return /* @__PURE__ */ jsxs(
|
|
41042
|
+
return /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
40756
41043
|
i > 0 && /* @__PURE__ */ jsx(
|
|
40757
41044
|
Typography,
|
|
40758
41045
|
{
|
|
@@ -41521,6 +41808,42 @@ var init_FeatureGridOrganism = __esm({
|
|
|
41521
41808
|
FeatureGridOrganism.displayName = "FeatureGridOrganism";
|
|
41522
41809
|
}
|
|
41523
41810
|
});
|
|
41811
|
+
function FishingBoard({
|
|
41812
|
+
backgroundImage,
|
|
41813
|
+
assetBaseUrl,
|
|
41814
|
+
scale = 1,
|
|
41815
|
+
showMinimap = false,
|
|
41816
|
+
enableCamera = true,
|
|
41817
|
+
width = 800,
|
|
41818
|
+
height = 600,
|
|
41819
|
+
isLoading,
|
|
41820
|
+
error,
|
|
41821
|
+
className
|
|
41822
|
+
}) {
|
|
41823
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("fishing-board relative w-full h-full", className), children: [
|
|
41824
|
+
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" }) }),
|
|
41825
|
+
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 }) }),
|
|
41826
|
+
/* @__PURE__ */ jsx(
|
|
41827
|
+
GameCanvas2D,
|
|
41828
|
+
{
|
|
41829
|
+
width,
|
|
41830
|
+
height,
|
|
41831
|
+
backgroundImage: backgroundImage ?? "",
|
|
41832
|
+
assetBaseUrl,
|
|
41833
|
+
fps: 60,
|
|
41834
|
+
className: "w-full h-full"
|
|
41835
|
+
}
|
|
41836
|
+
)
|
|
41837
|
+
] });
|
|
41838
|
+
}
|
|
41839
|
+
var init_FishingBoard = __esm({
|
|
41840
|
+
"components/game/organisms/FishingBoard.tsx"() {
|
|
41841
|
+
"use client";
|
|
41842
|
+
init_cn();
|
|
41843
|
+
init_GameCanvas2D();
|
|
41844
|
+
FishingBoard.displayName = "FishingBoard";
|
|
41845
|
+
}
|
|
41846
|
+
});
|
|
41524
41847
|
function toSharedContext2(formCtx) {
|
|
41525
41848
|
return createMinimalContext(
|
|
41526
41849
|
{
|
|
@@ -41702,12 +42025,12 @@ var init_Form = __esm({
|
|
|
41702
42025
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
41703
42026
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
41704
42027
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
41705
|
-
const normalizedInitialData =
|
|
42028
|
+
const normalizedInitialData = React86__default.useMemo(() => {
|
|
41706
42029
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
41707
42030
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
41708
42031
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
41709
42032
|
}, [entity, initialData]);
|
|
41710
|
-
const entityDerivedFields =
|
|
42033
|
+
const entityDerivedFields = React86__default.useMemo(() => {
|
|
41711
42034
|
if (fields && fields.length > 0) return void 0;
|
|
41712
42035
|
if (!resolvedEntity) return void 0;
|
|
41713
42036
|
return resolvedEntity.fields.map(
|
|
@@ -41727,16 +42050,16 @@ var init_Form = __esm({
|
|
|
41727
42050
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
41728
42051
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
41729
42052
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
41730
|
-
const [formData, setFormData] =
|
|
42053
|
+
const [formData, setFormData] = React86__default.useState(
|
|
41731
42054
|
normalizedInitialData
|
|
41732
42055
|
);
|
|
41733
|
-
const [collapsedSections, setCollapsedSections] =
|
|
42056
|
+
const [collapsedSections, setCollapsedSections] = React86__default.useState(
|
|
41734
42057
|
/* @__PURE__ */ new Set()
|
|
41735
42058
|
);
|
|
41736
|
-
const [submitError, setSubmitError] =
|
|
41737
|
-
const formRef =
|
|
42059
|
+
const [submitError, setSubmitError] = React86__default.useState(null);
|
|
42060
|
+
const formRef = React86__default.useRef(null);
|
|
41738
42061
|
const formMode = props.mode;
|
|
41739
|
-
const mountedRef =
|
|
42062
|
+
const mountedRef = React86__default.useRef(false);
|
|
41740
42063
|
if (!mountedRef.current) {
|
|
41741
42064
|
mountedRef.current = true;
|
|
41742
42065
|
debug("forms", "mount", {
|
|
@@ -41749,7 +42072,7 @@ var init_Form = __esm({
|
|
|
41749
42072
|
});
|
|
41750
42073
|
}
|
|
41751
42074
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
41752
|
-
const evalContext =
|
|
42075
|
+
const evalContext = React86__default.useMemo(
|
|
41753
42076
|
() => ({
|
|
41754
42077
|
formValues: formData,
|
|
41755
42078
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -41758,7 +42081,7 @@ var init_Form = __esm({
|
|
|
41758
42081
|
}),
|
|
41759
42082
|
[formData, externalContext]
|
|
41760
42083
|
);
|
|
41761
|
-
|
|
42084
|
+
React86__default.useEffect(() => {
|
|
41762
42085
|
debug("forms", "initialData-sync", {
|
|
41763
42086
|
mode: formMode,
|
|
41764
42087
|
normalizedInitialData,
|
|
@@ -41769,7 +42092,7 @@ var init_Form = __esm({
|
|
|
41769
42092
|
setFormData(normalizedInitialData);
|
|
41770
42093
|
}
|
|
41771
42094
|
}, [normalizedInitialData]);
|
|
41772
|
-
const processCalculations =
|
|
42095
|
+
const processCalculations = React86__default.useCallback(
|
|
41773
42096
|
(changedFieldId, newFormData) => {
|
|
41774
42097
|
if (!hiddenCalculations.length) return;
|
|
41775
42098
|
const context = {
|
|
@@ -41794,7 +42117,7 @@ var init_Form = __esm({
|
|
|
41794
42117
|
},
|
|
41795
42118
|
[hiddenCalculations, externalContext, eventBus]
|
|
41796
42119
|
);
|
|
41797
|
-
const checkViolations =
|
|
42120
|
+
const checkViolations = React86__default.useCallback(
|
|
41798
42121
|
(changedFieldId, newFormData) => {
|
|
41799
42122
|
if (!violationTriggers.length) return;
|
|
41800
42123
|
const context = {
|
|
@@ -41832,7 +42155,7 @@ var init_Form = __esm({
|
|
|
41832
42155
|
processCalculations(name, newFormData);
|
|
41833
42156
|
checkViolations(name, newFormData);
|
|
41834
42157
|
};
|
|
41835
|
-
const isFieldVisible =
|
|
42158
|
+
const isFieldVisible = React86__default.useCallback(
|
|
41836
42159
|
(fieldName) => {
|
|
41837
42160
|
const condition = conditionalFields[fieldName];
|
|
41838
42161
|
if (!condition) return true;
|
|
@@ -41840,7 +42163,7 @@ var init_Form = __esm({
|
|
|
41840
42163
|
},
|
|
41841
42164
|
[conditionalFields, evalContext]
|
|
41842
42165
|
);
|
|
41843
|
-
const isSectionVisible =
|
|
42166
|
+
const isSectionVisible = React86__default.useCallback(
|
|
41844
42167
|
(section) => {
|
|
41845
42168
|
if (!section.condition) return true;
|
|
41846
42169
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -41916,7 +42239,7 @@ var init_Form = __esm({
|
|
|
41916
42239
|
eventBus.emit(`UI:${onCancel}`);
|
|
41917
42240
|
}
|
|
41918
42241
|
};
|
|
41919
|
-
const renderField =
|
|
42242
|
+
const renderField = React86__default.useCallback(
|
|
41920
42243
|
(field) => {
|
|
41921
42244
|
const fieldName = field.name || field.field;
|
|
41922
42245
|
if (!fieldName) return null;
|
|
@@ -41937,7 +42260,7 @@ var init_Form = __esm({
|
|
|
41937
42260
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
41938
42261
|
);
|
|
41939
42262
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
41940
|
-
const normalizedFields =
|
|
42263
|
+
const normalizedFields = React86__default.useMemo(() => {
|
|
41941
42264
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
41942
42265
|
return effectiveFields.map((field) => {
|
|
41943
42266
|
if (typeof field === "string") {
|
|
@@ -41960,7 +42283,7 @@ var init_Form = __esm({
|
|
|
41960
42283
|
return field;
|
|
41961
42284
|
});
|
|
41962
42285
|
}, [effectiveFields, resolvedEntity]);
|
|
41963
|
-
const schemaFields =
|
|
42286
|
+
const schemaFields = React86__default.useMemo(() => {
|
|
41964
42287
|
if (normalizedFields.length === 0) return null;
|
|
41965
42288
|
if (isDebugEnabled()) {
|
|
41966
42289
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -41970,7 +42293,7 @@ var init_Form = __esm({
|
|
|
41970
42293
|
}
|
|
41971
42294
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
41972
42295
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
41973
|
-
const sectionElements =
|
|
42296
|
+
const sectionElements = React86__default.useMemo(() => {
|
|
41974
42297
|
if (!sections || sections.length === 0) return null;
|
|
41975
42298
|
return sections.map((section) => {
|
|
41976
42299
|
if (!isSectionVisible(section)) {
|
|
@@ -44234,10 +44557,10 @@ function getSlotContentRenderer2() {
|
|
|
44234
44557
|
}
|
|
44235
44558
|
function resolveDescriptor(value, idPrefix) {
|
|
44236
44559
|
if (value === null || value === void 0) return value;
|
|
44237
|
-
if (
|
|
44560
|
+
if (React86__default.isValidElement(value)) return value;
|
|
44238
44561
|
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
|
|
44239
44562
|
if (Array.isArray(value)) {
|
|
44240
|
-
return value.map((item, i) => /* @__PURE__ */ jsx(
|
|
44563
|
+
return value.map((item, i) => /* @__PURE__ */ jsx(React86__default.Fragment, { children: resolveDescriptor(item, `${idPrefix}-${i}`) }, i));
|
|
44241
44564
|
}
|
|
44242
44565
|
if (typeof value === "object") {
|
|
44243
44566
|
const rec = value;
|
|
@@ -44338,10 +44661,10 @@ function getSlotContentRenderer3() {
|
|
|
44338
44661
|
}
|
|
44339
44662
|
function resolveDescriptor2(value, idPrefix) {
|
|
44340
44663
|
if (value === null || value === void 0) return value;
|
|
44341
|
-
if (
|
|
44664
|
+
if (React86__default.isValidElement(value)) return value;
|
|
44342
44665
|
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
|
|
44343
44666
|
if (Array.isArray(value)) {
|
|
44344
|
-
return value.map((item, i) => /* @__PURE__ */ jsx(
|
|
44667
|
+
return value.map((item, i) => /* @__PURE__ */ jsx(React86__default.Fragment, { children: resolveDescriptor2(item, `${idPrefix}-${i}`) }, i));
|
|
44345
44668
|
}
|
|
44346
44669
|
if (typeof value === "object") {
|
|
44347
44670
|
const rec = value;
|
|
@@ -44674,6 +44997,39 @@ var init_HexStrategyBoard = __esm({
|
|
|
44674
44997
|
HexStrategyBoard.displayName = "HexStrategyBoard";
|
|
44675
44998
|
}
|
|
44676
44999
|
});
|
|
45000
|
+
function HolidayRunnerBoard({
|
|
45001
|
+
backgroundImage,
|
|
45002
|
+
assetBaseUrl,
|
|
45003
|
+
width = 800,
|
|
45004
|
+
height = 400,
|
|
45005
|
+
fps = 60,
|
|
45006
|
+
isLoading,
|
|
45007
|
+
error,
|
|
45008
|
+
className
|
|
45009
|
+
}) {
|
|
45010
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("holiday-runner-board relative w-full h-full", className), children: [
|
|
45011
|
+
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" }) }),
|
|
45012
|
+
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 }) }),
|
|
45013
|
+
/* @__PURE__ */ jsx(
|
|
45014
|
+
GameCanvas2D,
|
|
45015
|
+
{
|
|
45016
|
+
width,
|
|
45017
|
+
height,
|
|
45018
|
+
fps,
|
|
45019
|
+
backgroundImage: backgroundImage ?? "",
|
|
45020
|
+
assetBaseUrl
|
|
45021
|
+
}
|
|
45022
|
+
)
|
|
45023
|
+
] });
|
|
45024
|
+
}
|
|
45025
|
+
var init_HolidayRunnerBoard = __esm({
|
|
45026
|
+
"components/game/organisms/HolidayRunnerBoard.tsx"() {
|
|
45027
|
+
"use client";
|
|
45028
|
+
init_cn();
|
|
45029
|
+
init_GameCanvas2D();
|
|
45030
|
+
HolidayRunnerBoard.displayName = "HolidayRunnerBoard";
|
|
45031
|
+
}
|
|
45032
|
+
});
|
|
44677
45033
|
var LandingPageTemplate;
|
|
44678
45034
|
var init_LandingPageTemplate = __esm({
|
|
44679
45035
|
"components/marketing/templates/LandingPageTemplate.tsx"() {
|
|
@@ -45009,7 +45365,7 @@ var init_List = __esm({
|
|
|
45009
45365
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
45010
45366
|
return [];
|
|
45011
45367
|
}, [entity]);
|
|
45012
|
-
const getItemActions =
|
|
45368
|
+
const getItemActions = React86__default.useCallback(
|
|
45013
45369
|
(item) => {
|
|
45014
45370
|
if (!itemActions) return [];
|
|
45015
45371
|
if (typeof itemActions === "function") {
|
|
@@ -45428,6 +45784,48 @@ var init_MasterDetailLayout = __esm({
|
|
|
45428
45784
|
MasterDetailLayout.displayName = "MasterDetailLayout";
|
|
45429
45785
|
}
|
|
45430
45786
|
});
|
|
45787
|
+
function MatchPuzzleBoard({
|
|
45788
|
+
tiles,
|
|
45789
|
+
units,
|
|
45790
|
+
features,
|
|
45791
|
+
assetManifest,
|
|
45792
|
+
assetBaseUrl,
|
|
45793
|
+
scale = 0.45,
|
|
45794
|
+
showMinimap = false,
|
|
45795
|
+
enableCamera = false,
|
|
45796
|
+
tileClickEvent,
|
|
45797
|
+
unitClickEvent,
|
|
45798
|
+
isLoading,
|
|
45799
|
+
error,
|
|
45800
|
+
className
|
|
45801
|
+
}) {
|
|
45802
|
+
return /* @__PURE__ */ jsx("div", { className: cn("match-puzzle-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
45803
|
+
IsometricCanvas_default,
|
|
45804
|
+
{
|
|
45805
|
+
tileLayout: "flat",
|
|
45806
|
+
tiles,
|
|
45807
|
+
units,
|
|
45808
|
+
features,
|
|
45809
|
+
assetManifest,
|
|
45810
|
+
assetBaseUrl,
|
|
45811
|
+
scale,
|
|
45812
|
+
showMinimap,
|
|
45813
|
+
enableCamera,
|
|
45814
|
+
tileClickEvent,
|
|
45815
|
+
unitClickEvent,
|
|
45816
|
+
isLoading,
|
|
45817
|
+
error
|
|
45818
|
+
}
|
|
45819
|
+
) });
|
|
45820
|
+
}
|
|
45821
|
+
var init_MatchPuzzleBoard = __esm({
|
|
45822
|
+
"components/game/organisms/MatchPuzzleBoard.tsx"() {
|
|
45823
|
+
"use client";
|
|
45824
|
+
init_cn();
|
|
45825
|
+
init_IsometricCanvas();
|
|
45826
|
+
MatchPuzzleBoard.displayName = "MatchPuzzleBoard";
|
|
45827
|
+
}
|
|
45828
|
+
});
|
|
45431
45829
|
var COLUMN_CLASSES, ASPECT_CLASSES, MediaGallery;
|
|
45432
45830
|
var init_MediaGallery = __esm({
|
|
45433
45831
|
"components/core/organisms/MediaGallery.tsx"() {
|
|
@@ -45485,7 +45883,7 @@ var init_MediaGallery = __esm({
|
|
|
45485
45883
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
45486
45884
|
);
|
|
45487
45885
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
45488
|
-
const items =
|
|
45886
|
+
const items = React86__default.useMemo(() => {
|
|
45489
45887
|
if (propItems) return propItems;
|
|
45490
45888
|
if (entityData.length === 0) return [];
|
|
45491
45889
|
return entityData.map((record, idx) => ({
|
|
@@ -45645,8 +46043,50 @@ var init_MediaGallery = __esm({
|
|
|
45645
46043
|
MediaGallery.displayName = "MediaGallery";
|
|
45646
46044
|
}
|
|
45647
46045
|
});
|
|
46046
|
+
function MinigolfBoard({
|
|
46047
|
+
tiles,
|
|
46048
|
+
units,
|
|
46049
|
+
features,
|
|
46050
|
+
assetManifest,
|
|
46051
|
+
assetBaseUrl,
|
|
46052
|
+
scale = 0.45,
|
|
46053
|
+
showMinimap = true,
|
|
46054
|
+
enableCamera = true,
|
|
46055
|
+
tileClickEvent,
|
|
46056
|
+
unitClickEvent,
|
|
46057
|
+
isLoading,
|
|
46058
|
+
error,
|
|
46059
|
+
className
|
|
46060
|
+
}) {
|
|
46061
|
+
return /* @__PURE__ */ jsx("div", { className: cn("minigolf-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
46062
|
+
IsometricCanvas_default,
|
|
46063
|
+
{
|
|
46064
|
+
tileLayout: "isometric",
|
|
46065
|
+
tiles,
|
|
46066
|
+
units,
|
|
46067
|
+
features,
|
|
46068
|
+
assetManifest,
|
|
46069
|
+
assetBaseUrl,
|
|
46070
|
+
scale,
|
|
46071
|
+
showMinimap,
|
|
46072
|
+
enableCamera,
|
|
46073
|
+
tileClickEvent,
|
|
46074
|
+
unitClickEvent,
|
|
46075
|
+
isLoading,
|
|
46076
|
+
error
|
|
46077
|
+
}
|
|
46078
|
+
) });
|
|
46079
|
+
}
|
|
46080
|
+
var init_MinigolfBoard = __esm({
|
|
46081
|
+
"components/game/organisms/MinigolfBoard.tsx"() {
|
|
46082
|
+
"use client";
|
|
46083
|
+
init_cn();
|
|
46084
|
+
init_IsometricCanvas();
|
|
46085
|
+
MinigolfBoard.displayName = "MinigolfBoard";
|
|
46086
|
+
}
|
|
46087
|
+
});
|
|
45648
46088
|
function extractTitle2(children) {
|
|
45649
|
-
if (!
|
|
46089
|
+
if (!React86__default.isValidElement(children)) return void 0;
|
|
45650
46090
|
const props = children.props;
|
|
45651
46091
|
if (typeof props.title === "string") {
|
|
45652
46092
|
return props.title;
|
|
@@ -45862,6 +46302,87 @@ var init_NegotiatorBoard = __esm({
|
|
|
45862
46302
|
NegotiatorBoard.displayName = "NegotiatorBoard";
|
|
45863
46303
|
}
|
|
45864
46304
|
});
|
|
46305
|
+
function PinballBoard({
|
|
46306
|
+
tiles: _tiles,
|
|
46307
|
+
units: _units,
|
|
46308
|
+
features: _features,
|
|
46309
|
+
assetManifest: _assetManifest,
|
|
46310
|
+
assetBaseUrl,
|
|
46311
|
+
scale = 1,
|
|
46312
|
+
showMinimap: _showMinimap = false,
|
|
46313
|
+
enableCamera: _enableCamera = false,
|
|
46314
|
+
tileClickEvent: _tileClickEvent,
|
|
46315
|
+
unitClickEvent: _unitClickEvent,
|
|
46316
|
+
isLoading,
|
|
46317
|
+
error,
|
|
46318
|
+
className
|
|
46319
|
+
}) {
|
|
46320
|
+
if (isLoading) {
|
|
46321
|
+
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..." }) });
|
|
46322
|
+
}
|
|
46323
|
+
if (error) {
|
|
46324
|
+
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 }) });
|
|
46325
|
+
}
|
|
46326
|
+
return /* @__PURE__ */ jsx("div", { className: cn("pinball-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
46327
|
+
GameCanvas2D,
|
|
46328
|
+
{
|
|
46329
|
+
width: Math.round(400 * scale),
|
|
46330
|
+
height: Math.round(800 * scale),
|
|
46331
|
+
assetBaseUrl,
|
|
46332
|
+
fps: 60
|
|
46333
|
+
}
|
|
46334
|
+
) });
|
|
46335
|
+
}
|
|
46336
|
+
var init_PinballBoard = __esm({
|
|
46337
|
+
"components/game/organisms/PinballBoard.tsx"() {
|
|
46338
|
+
"use client";
|
|
46339
|
+
init_cn();
|
|
46340
|
+
init_GameCanvas2D();
|
|
46341
|
+
PinballBoard.displayName = "PinballBoard";
|
|
46342
|
+
}
|
|
46343
|
+
});
|
|
46344
|
+
function PirateBoard({
|
|
46345
|
+
tiles,
|
|
46346
|
+
units,
|
|
46347
|
+
features,
|
|
46348
|
+
assetManifest,
|
|
46349
|
+
assetBaseUrl,
|
|
46350
|
+
scale = 0.45,
|
|
46351
|
+
showMinimap = true,
|
|
46352
|
+
enableCamera = true,
|
|
46353
|
+
tileClickEvent,
|
|
46354
|
+
unitClickEvent,
|
|
46355
|
+
isLoading,
|
|
46356
|
+
error,
|
|
46357
|
+
className
|
|
46358
|
+
}) {
|
|
46359
|
+
return /* @__PURE__ */ jsx("div", { className: cn("pirate-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
46360
|
+
IsometricCanvas_default,
|
|
46361
|
+
{
|
|
46362
|
+
tileLayout: "flat",
|
|
46363
|
+
tiles,
|
|
46364
|
+
units,
|
|
46365
|
+
features,
|
|
46366
|
+
assetManifest,
|
|
46367
|
+
assetBaseUrl,
|
|
46368
|
+
scale,
|
|
46369
|
+
showMinimap,
|
|
46370
|
+
enableCamera,
|
|
46371
|
+
tileClickEvent,
|
|
46372
|
+
unitClickEvent,
|
|
46373
|
+
isLoading,
|
|
46374
|
+
error
|
|
46375
|
+
}
|
|
46376
|
+
) });
|
|
46377
|
+
}
|
|
46378
|
+
var init_PirateBoard = __esm({
|
|
46379
|
+
"components/game/organisms/PirateBoard.tsx"() {
|
|
46380
|
+
"use client";
|
|
46381
|
+
init_cn();
|
|
46382
|
+
init_IsometricCanvas();
|
|
46383
|
+
PirateBoard.displayName = "PirateBoard";
|
|
46384
|
+
}
|
|
46385
|
+
});
|
|
45865
46386
|
function resolveEntity(entity) {
|
|
45866
46387
|
if (!entity) return {};
|
|
45867
46388
|
if (Array.isArray(entity)) return entity[0] ?? {};
|
|
@@ -46222,6 +46743,37 @@ var init_PricingPageTemplate = __esm({
|
|
|
46222
46743
|
PricingPageTemplate.displayName = "PricingPageTemplate";
|
|
46223
46744
|
}
|
|
46224
46745
|
});
|
|
46746
|
+
function RacingBoard({
|
|
46747
|
+
backgroundImage,
|
|
46748
|
+
assetBaseUrl,
|
|
46749
|
+
width = 800,
|
|
46750
|
+
height = 600,
|
|
46751
|
+
fps = 60,
|
|
46752
|
+
tickEvent,
|
|
46753
|
+
drawEvent,
|
|
46754
|
+
className
|
|
46755
|
+
}) {
|
|
46756
|
+
return /* @__PURE__ */ jsx("div", { className: cn("racing-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
46757
|
+
GameCanvas2D,
|
|
46758
|
+
{
|
|
46759
|
+
backgroundImage,
|
|
46760
|
+
assetBaseUrl,
|
|
46761
|
+
width,
|
|
46762
|
+
height,
|
|
46763
|
+
fps,
|
|
46764
|
+
tickEvent: typeof tickEvent === "string" ? tickEvent : void 0,
|
|
46765
|
+
drawEvent: typeof drawEvent === "string" ? drawEvent : void 0
|
|
46766
|
+
}
|
|
46767
|
+
) });
|
|
46768
|
+
}
|
|
46769
|
+
var init_RacingBoard = __esm({
|
|
46770
|
+
"components/game/organisms/RacingBoard.tsx"() {
|
|
46771
|
+
"use client";
|
|
46772
|
+
init_cn();
|
|
46773
|
+
init_GameCanvas2D();
|
|
46774
|
+
RacingBoard.displayName = "RacingBoard";
|
|
46775
|
+
}
|
|
46776
|
+
});
|
|
46225
46777
|
function resolveManifestUrl3(manifest, relative) {
|
|
46226
46778
|
if (relative == null) return void 0;
|
|
46227
46779
|
if (/^https?:\/\//.test(relative)) return relative;
|
|
@@ -46697,7 +47249,7 @@ var init_debugRegistry = __esm({
|
|
|
46697
47249
|
}
|
|
46698
47250
|
});
|
|
46699
47251
|
function useDebugData() {
|
|
46700
|
-
const [data, setData] =
|
|
47252
|
+
const [data, setData] = React86.useState(() => ({
|
|
46701
47253
|
traits: [],
|
|
46702
47254
|
ticks: [],
|
|
46703
47255
|
guards: [],
|
|
@@ -46711,7 +47263,7 @@ function useDebugData() {
|
|
|
46711
47263
|
},
|
|
46712
47264
|
lastUpdate: Date.now()
|
|
46713
47265
|
}));
|
|
46714
|
-
|
|
47266
|
+
React86.useEffect(() => {
|
|
46715
47267
|
const updateData = () => {
|
|
46716
47268
|
setData({
|
|
46717
47269
|
traits: getAllTraits(),
|
|
@@ -46820,12 +47372,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
46820
47372
|
return positions;
|
|
46821
47373
|
}
|
|
46822
47374
|
function WalkMinimap() {
|
|
46823
|
-
const [walkStep, setWalkStep] =
|
|
46824
|
-
const [traits2, setTraits] =
|
|
46825
|
-
const [coveredEdges, setCoveredEdges] =
|
|
46826
|
-
const [completedTraits, setCompletedTraits] =
|
|
46827
|
-
const prevTraitRef =
|
|
46828
|
-
|
|
47375
|
+
const [walkStep, setWalkStep] = React86.useState(null);
|
|
47376
|
+
const [traits2, setTraits] = React86.useState([]);
|
|
47377
|
+
const [coveredEdges, setCoveredEdges] = React86.useState([]);
|
|
47378
|
+
const [completedTraits, setCompletedTraits] = React86.useState(/* @__PURE__ */ new Set());
|
|
47379
|
+
const prevTraitRef = React86.useRef(null);
|
|
47380
|
+
React86.useEffect(() => {
|
|
46829
47381
|
const interval = setInterval(() => {
|
|
46830
47382
|
const w = window;
|
|
46831
47383
|
const step = w.__orbitalWalkStep;
|
|
@@ -47261,15 +47813,15 @@ var init_EntitiesTab = __esm({
|
|
|
47261
47813
|
});
|
|
47262
47814
|
function EventFlowTab({ events: events2 }) {
|
|
47263
47815
|
const { t } = useTranslate();
|
|
47264
|
-
const [filter, setFilter] =
|
|
47265
|
-
const containerRef =
|
|
47266
|
-
const [autoScroll, setAutoScroll] =
|
|
47267
|
-
|
|
47816
|
+
const [filter, setFilter] = React86.useState("all");
|
|
47817
|
+
const containerRef = React86.useRef(null);
|
|
47818
|
+
const [autoScroll, setAutoScroll] = React86.useState(true);
|
|
47819
|
+
React86.useEffect(() => {
|
|
47268
47820
|
if (autoScroll && containerRef.current) {
|
|
47269
47821
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
47270
47822
|
}
|
|
47271
47823
|
}, [events2.length, autoScroll]);
|
|
47272
|
-
const filteredEvents =
|
|
47824
|
+
const filteredEvents = React86.useMemo(() => {
|
|
47273
47825
|
if (filter === "all") return events2;
|
|
47274
47826
|
return events2.filter((e) => e.type === filter);
|
|
47275
47827
|
}, [events2, filter]);
|
|
@@ -47385,7 +47937,7 @@ var init_EventFlowTab = __esm({
|
|
|
47385
47937
|
});
|
|
47386
47938
|
function GuardsPanel({ guards }) {
|
|
47387
47939
|
const { t } = useTranslate();
|
|
47388
|
-
const [filter, setFilter] =
|
|
47940
|
+
const [filter, setFilter] = React86.useState("all");
|
|
47389
47941
|
if (guards.length === 0) {
|
|
47390
47942
|
return /* @__PURE__ */ jsx(
|
|
47391
47943
|
EmptyState,
|
|
@@ -47398,7 +47950,7 @@ function GuardsPanel({ guards }) {
|
|
|
47398
47950
|
}
|
|
47399
47951
|
const passedCount = guards.filter((g) => g.result).length;
|
|
47400
47952
|
const failedCount = guards.length - passedCount;
|
|
47401
|
-
const filteredGuards =
|
|
47953
|
+
const filteredGuards = React86.useMemo(() => {
|
|
47402
47954
|
if (filter === "all") return guards;
|
|
47403
47955
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
47404
47956
|
return guards.filter((g) => !g.result);
|
|
@@ -47561,10 +48113,10 @@ function EffectBadge({ effect }) {
|
|
|
47561
48113
|
}
|
|
47562
48114
|
function TransitionTimeline({ transitions }) {
|
|
47563
48115
|
const { t } = useTranslate();
|
|
47564
|
-
const containerRef =
|
|
47565
|
-
const [autoScroll, setAutoScroll] =
|
|
47566
|
-
const [expandedId, setExpandedId] =
|
|
47567
|
-
|
|
48116
|
+
const containerRef = React86.useRef(null);
|
|
48117
|
+
const [autoScroll, setAutoScroll] = React86.useState(true);
|
|
48118
|
+
const [expandedId, setExpandedId] = React86.useState(null);
|
|
48119
|
+
React86.useEffect(() => {
|
|
47568
48120
|
if (autoScroll && containerRef.current) {
|
|
47569
48121
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
47570
48122
|
}
|
|
@@ -47844,9 +48396,9 @@ function getAllEvents(traits2) {
|
|
|
47844
48396
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
47845
48397
|
const eventBus = useEventBus();
|
|
47846
48398
|
const { t } = useTranslate();
|
|
47847
|
-
const [log13, setLog] =
|
|
47848
|
-
const prevStatesRef =
|
|
47849
|
-
|
|
48399
|
+
const [log13, setLog] = React86.useState([]);
|
|
48400
|
+
const prevStatesRef = React86.useRef(/* @__PURE__ */ new Map());
|
|
48401
|
+
React86.useEffect(() => {
|
|
47850
48402
|
for (const trait of traits2) {
|
|
47851
48403
|
const prev = prevStatesRef.current.get(trait.id);
|
|
47852
48404
|
if (prev && prev !== trait.currentState) {
|
|
@@ -48015,10 +48567,10 @@ function VerifyModePanel({
|
|
|
48015
48567
|
localCount
|
|
48016
48568
|
}) {
|
|
48017
48569
|
const { t } = useTranslate();
|
|
48018
|
-
const [expanded, setExpanded] =
|
|
48019
|
-
const scrollRef =
|
|
48020
|
-
const prevCountRef =
|
|
48021
|
-
|
|
48570
|
+
const [expanded, setExpanded] = React86.useState(true);
|
|
48571
|
+
const scrollRef = React86.useRef(null);
|
|
48572
|
+
const prevCountRef = React86.useRef(0);
|
|
48573
|
+
React86.useEffect(() => {
|
|
48022
48574
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
48023
48575
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
48024
48576
|
}
|
|
@@ -48075,10 +48627,10 @@ function RuntimeDebugger({
|
|
|
48075
48627
|
schema
|
|
48076
48628
|
}) {
|
|
48077
48629
|
const { t } = useTranslate();
|
|
48078
|
-
const [isCollapsed, setIsCollapsed] =
|
|
48079
|
-
const [isVisible, setIsVisible] =
|
|
48630
|
+
const [isCollapsed, setIsCollapsed] = React86.useState(mode === "verify" ? true : defaultCollapsed);
|
|
48631
|
+
const [isVisible, setIsVisible] = React86.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
48080
48632
|
const debugData = useDebugData();
|
|
48081
|
-
|
|
48633
|
+
React86.useEffect(() => {
|
|
48082
48634
|
if (mode === "inline") return;
|
|
48083
48635
|
return onDebugToggle((enabled) => {
|
|
48084
48636
|
setIsVisible(enabled);
|
|
@@ -48087,7 +48639,7 @@ function RuntimeDebugger({
|
|
|
48087
48639
|
}
|
|
48088
48640
|
});
|
|
48089
48641
|
}, [mode]);
|
|
48090
|
-
|
|
48642
|
+
React86.useEffect(() => {
|
|
48091
48643
|
if (mode === "inline") return;
|
|
48092
48644
|
const handleKeyDown = (e) => {
|
|
48093
48645
|
if (e.key === "`" && isVisible) {
|
|
@@ -48647,7 +49199,7 @@ function SequenceBar({
|
|
|
48647
49199
|
onSlotRemove(index);
|
|
48648
49200
|
}, [onSlotRemove, playing]);
|
|
48649
49201
|
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(
|
|
49202
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React86__default.Fragment, { children: [
|
|
48651
49203
|
i > 0 && /* @__PURE__ */ jsx(
|
|
48652
49204
|
Typography,
|
|
48653
49205
|
{
|
|
@@ -49408,6 +49960,123 @@ var init_SimulatorBoard = __esm({
|
|
|
49408
49960
|
SimulatorBoard.displayName = "SimulatorBoard";
|
|
49409
49961
|
}
|
|
49410
49962
|
});
|
|
49963
|
+
function SokobanBoard({
|
|
49964
|
+
tiles,
|
|
49965
|
+
units,
|
|
49966
|
+
features,
|
|
49967
|
+
assetManifest,
|
|
49968
|
+
assetBaseUrl,
|
|
49969
|
+
scale = 0.45,
|
|
49970
|
+
showMinimap = false,
|
|
49971
|
+
enableCamera = false,
|
|
49972
|
+
tileClickEvent,
|
|
49973
|
+
unitClickEvent,
|
|
49974
|
+
isLoading,
|
|
49975
|
+
error,
|
|
49976
|
+
className
|
|
49977
|
+
}) {
|
|
49978
|
+
return /* @__PURE__ */ jsx("div", { className: cn("sokoban-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
49979
|
+
IsometricCanvas_default,
|
|
49980
|
+
{
|
|
49981
|
+
tileLayout: "flat",
|
|
49982
|
+
tiles,
|
|
49983
|
+
units,
|
|
49984
|
+
features,
|
|
49985
|
+
assetManifest,
|
|
49986
|
+
assetBaseUrl,
|
|
49987
|
+
scale,
|
|
49988
|
+
showMinimap,
|
|
49989
|
+
enableCamera,
|
|
49990
|
+
tileClickEvent,
|
|
49991
|
+
unitClickEvent,
|
|
49992
|
+
isLoading,
|
|
49993
|
+
error
|
|
49994
|
+
}
|
|
49995
|
+
) });
|
|
49996
|
+
}
|
|
49997
|
+
var init_SokobanBoard = __esm({
|
|
49998
|
+
"components/game/organisms/SokobanBoard.tsx"() {
|
|
49999
|
+
"use client";
|
|
50000
|
+
init_cn();
|
|
50001
|
+
init_IsometricCanvas();
|
|
50002
|
+
SokobanBoard.displayName = "SokobanBoard";
|
|
50003
|
+
}
|
|
50004
|
+
});
|
|
50005
|
+
function SpaceShmupBoard({
|
|
50006
|
+
backgroundImage,
|
|
50007
|
+
assetBaseUrl,
|
|
50008
|
+
width = 800,
|
|
50009
|
+
height = 600,
|
|
50010
|
+
fps = 60,
|
|
50011
|
+
isLoading,
|
|
50012
|
+
error,
|
|
50013
|
+
className
|
|
50014
|
+
}) {
|
|
50015
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("space-shmup-board relative w-full h-full", className), children: [
|
|
50016
|
+
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" }) }),
|
|
50017
|
+
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 }) }),
|
|
50018
|
+
/* @__PURE__ */ jsx(
|
|
50019
|
+
GameCanvas2D,
|
|
50020
|
+
{
|
|
50021
|
+
backgroundImage,
|
|
50022
|
+
assetBaseUrl,
|
|
50023
|
+
width,
|
|
50024
|
+
height,
|
|
50025
|
+
fps
|
|
50026
|
+
}
|
|
50027
|
+
)
|
|
50028
|
+
] });
|
|
50029
|
+
}
|
|
50030
|
+
var init_SpaceShmupBoard = __esm({
|
|
50031
|
+
"components/game/organisms/SpaceShmupBoard.tsx"() {
|
|
50032
|
+
"use client";
|
|
50033
|
+
init_cn();
|
|
50034
|
+
init_GameCanvas2D();
|
|
50035
|
+
SpaceShmupBoard.displayName = "SpaceShmupBoard";
|
|
50036
|
+
}
|
|
50037
|
+
});
|
|
50038
|
+
function SpaceStationBoard({
|
|
50039
|
+
tiles,
|
|
50040
|
+
units,
|
|
50041
|
+
features,
|
|
50042
|
+
assetManifest,
|
|
50043
|
+
assetBaseUrl,
|
|
50044
|
+
scale = 0.45,
|
|
50045
|
+
showMinimap = true,
|
|
50046
|
+
enableCamera = true,
|
|
50047
|
+
tileClickEvent,
|
|
50048
|
+
unitClickEvent,
|
|
50049
|
+
isLoading,
|
|
50050
|
+
error,
|
|
50051
|
+
className
|
|
50052
|
+
}) {
|
|
50053
|
+
return /* @__PURE__ */ jsx("div", { className: cn("space-station-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
50054
|
+
IsometricCanvas_default,
|
|
50055
|
+
{
|
|
50056
|
+
tileLayout: "isometric",
|
|
50057
|
+
tiles,
|
|
50058
|
+
units,
|
|
50059
|
+
features,
|
|
50060
|
+
assetManifest,
|
|
50061
|
+
assetBaseUrl,
|
|
50062
|
+
scale,
|
|
50063
|
+
showMinimap,
|
|
50064
|
+
enableCamera,
|
|
50065
|
+
tileClickEvent,
|
|
50066
|
+
unitClickEvent,
|
|
50067
|
+
isLoading,
|
|
50068
|
+
error
|
|
50069
|
+
}
|
|
50070
|
+
) });
|
|
50071
|
+
}
|
|
50072
|
+
var init_SpaceStationBoard = __esm({
|
|
50073
|
+
"components/game/organisms/SpaceStationBoard.tsx"() {
|
|
50074
|
+
"use client";
|
|
50075
|
+
init_cn();
|
|
50076
|
+
init_IsometricCanvas();
|
|
50077
|
+
SpaceStationBoard.displayName = "SpaceStationBoard";
|
|
50078
|
+
}
|
|
50079
|
+
});
|
|
49411
50080
|
var SplitPane;
|
|
49412
50081
|
var init_SplitPane = __esm({
|
|
49413
50082
|
"components/core/organisms/layout/SplitPane.tsx"() {
|
|
@@ -49501,6 +50170,48 @@ var init_SplitPane = __esm({
|
|
|
49501
50170
|
SplitPane.displayName = "SplitPane";
|
|
49502
50171
|
}
|
|
49503
50172
|
});
|
|
50173
|
+
function SportsBoard({
|
|
50174
|
+
tiles,
|
|
50175
|
+
units,
|
|
50176
|
+
features,
|
|
50177
|
+
assetManifest,
|
|
50178
|
+
assetBaseUrl,
|
|
50179
|
+
scale = 0.45,
|
|
50180
|
+
showMinimap = false,
|
|
50181
|
+
enableCamera = true,
|
|
50182
|
+
tileClickEvent,
|
|
50183
|
+
unitClickEvent,
|
|
50184
|
+
isLoading,
|
|
50185
|
+
error,
|
|
50186
|
+
className
|
|
50187
|
+
}) {
|
|
50188
|
+
return /* @__PURE__ */ jsx("div", { className: cn("sports-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
50189
|
+
IsometricCanvas_default,
|
|
50190
|
+
{
|
|
50191
|
+
tileLayout: "flat",
|
|
50192
|
+
tiles,
|
|
50193
|
+
units,
|
|
50194
|
+
features,
|
|
50195
|
+
assetManifest,
|
|
50196
|
+
assetBaseUrl,
|
|
50197
|
+
scale,
|
|
50198
|
+
showMinimap,
|
|
50199
|
+
enableCamera,
|
|
50200
|
+
tileClickEvent,
|
|
50201
|
+
unitClickEvent,
|
|
50202
|
+
isLoading,
|
|
50203
|
+
error
|
|
50204
|
+
}
|
|
50205
|
+
) });
|
|
50206
|
+
}
|
|
50207
|
+
var init_SportsBoard = __esm({
|
|
50208
|
+
"components/game/organisms/SportsBoard.tsx"() {
|
|
50209
|
+
"use client";
|
|
50210
|
+
init_cn();
|
|
50211
|
+
init_IsometricCanvas();
|
|
50212
|
+
SportsBoard.displayName = "SportsBoard";
|
|
50213
|
+
}
|
|
50214
|
+
});
|
|
49504
50215
|
var StatCard;
|
|
49505
50216
|
var init_StatCard = __esm({
|
|
49506
50217
|
"components/core/organisms/StatCard.tsx"() {
|
|
@@ -49539,7 +50250,7 @@ var init_StatCard = __esm({
|
|
|
49539
50250
|
const labelToUse = propLabel ?? propTitle;
|
|
49540
50251
|
const eventBus = useEventBus();
|
|
49541
50252
|
const { t } = useTranslate();
|
|
49542
|
-
const handleActionClick =
|
|
50253
|
+
const handleActionClick = React86__default.useCallback(() => {
|
|
49543
50254
|
if (action?.event) {
|
|
49544
50255
|
eventBus.emit(`UI:${action.event}`, {});
|
|
49545
50256
|
}
|
|
@@ -49550,7 +50261,7 @@ var init_StatCard = __esm({
|
|
|
49550
50261
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
49551
50262
|
const isLoading = externalLoading ?? false;
|
|
49552
50263
|
const error = externalError;
|
|
49553
|
-
const computeMetricValue =
|
|
50264
|
+
const computeMetricValue = React86__default.useCallback(
|
|
49554
50265
|
(metric, items) => {
|
|
49555
50266
|
if (metric.value !== void 0) {
|
|
49556
50267
|
return metric.value;
|
|
@@ -49589,7 +50300,7 @@ var init_StatCard = __esm({
|
|
|
49589
50300
|
},
|
|
49590
50301
|
[]
|
|
49591
50302
|
);
|
|
49592
|
-
const schemaStats =
|
|
50303
|
+
const schemaStats = React86__default.useMemo(() => {
|
|
49593
50304
|
if (!metrics || metrics.length === 0) return null;
|
|
49594
50305
|
return metrics.map((metric) => ({
|
|
49595
50306
|
label: metric.label,
|
|
@@ -49597,7 +50308,7 @@ var init_StatCard = __esm({
|
|
|
49597
50308
|
format: metric.format
|
|
49598
50309
|
}));
|
|
49599
50310
|
}, [metrics, data, computeMetricValue]);
|
|
49600
|
-
const calculatedTrend =
|
|
50311
|
+
const calculatedTrend = React86__default.useMemo(() => {
|
|
49601
50312
|
if (manualTrend !== void 0) return manualTrend;
|
|
49602
50313
|
if (previousValue === void 0 || currentValue === void 0)
|
|
49603
50314
|
return void 0;
|
|
@@ -50346,6 +51057,832 @@ var init_StepFlowOrganism = __esm({
|
|
|
50346
51057
|
StepFlowOrganism.displayName = "StepFlowOrganism";
|
|
50347
51058
|
}
|
|
50348
51059
|
});
|
|
51060
|
+
|
|
51061
|
+
// components/core/molecules/markdown/index.ts
|
|
51062
|
+
var init_markdown = __esm({
|
|
51063
|
+
"components/core/molecules/markdown/index.ts"() {
|
|
51064
|
+
init_MarkdownContent();
|
|
51065
|
+
init_CodeBlock();
|
|
51066
|
+
}
|
|
51067
|
+
});
|
|
51068
|
+
function groupByOrbital(subagents) {
|
|
51069
|
+
const map = /* @__PURE__ */ new Map();
|
|
51070
|
+
for (const sub of subagents) {
|
|
51071
|
+
const key = sub.orbitalName ?? "(unattached)";
|
|
51072
|
+
const arr = map.get(key) ?? [];
|
|
51073
|
+
arr.push(sub);
|
|
51074
|
+
map.set(key, arr);
|
|
51075
|
+
}
|
|
51076
|
+
return map;
|
|
51077
|
+
}
|
|
51078
|
+
function statusIconName(status) {
|
|
51079
|
+
switch (status) {
|
|
51080
|
+
case "running":
|
|
51081
|
+
return "loader";
|
|
51082
|
+
case "complete":
|
|
51083
|
+
return "check";
|
|
51084
|
+
case "error":
|
|
51085
|
+
return "x";
|
|
51086
|
+
default:
|
|
51087
|
+
return "circle";
|
|
51088
|
+
}
|
|
51089
|
+
}
|
|
51090
|
+
function lastMessage(sub) {
|
|
51091
|
+
if (sub.messages.length === 0) return void 0;
|
|
51092
|
+
return sub.messages[sub.messages.length - 1].message;
|
|
51093
|
+
}
|
|
51094
|
+
function formatHHMMSS(ts) {
|
|
51095
|
+
const d = new Date(ts);
|
|
51096
|
+
const hh = String(d.getHours()).padStart(2, "0");
|
|
51097
|
+
const mm = String(d.getMinutes()).padStart(2, "0");
|
|
51098
|
+
const ss = String(d.getSeconds()).padStart(2, "0");
|
|
51099
|
+
return `${hh}:${mm}:${ss}`;
|
|
51100
|
+
}
|
|
51101
|
+
function compactJson(value) {
|
|
51102
|
+
if (value === void 0 || value === null) return "";
|
|
51103
|
+
if (typeof value === "string") return value;
|
|
51104
|
+
try {
|
|
51105
|
+
const json = JSON.stringify(value);
|
|
51106
|
+
if (json.length <= 240) return json;
|
|
51107
|
+
return json.slice(0, 239) + "\u2026";
|
|
51108
|
+
} catch {
|
|
51109
|
+
return String(value);
|
|
51110
|
+
}
|
|
51111
|
+
}
|
|
51112
|
+
function tryPrettyJson(s) {
|
|
51113
|
+
try {
|
|
51114
|
+
return JSON.stringify(JSON.parse(s), null, 2);
|
|
51115
|
+
} catch {
|
|
51116
|
+
return null;
|
|
51117
|
+
}
|
|
51118
|
+
}
|
|
51119
|
+
function summarizeArgs(args) {
|
|
51120
|
+
const keys = Object.keys(args);
|
|
51121
|
+
if (keys.length === 0) return "";
|
|
51122
|
+
return keys.slice(0, 3).join(", ") + (keys.length > 3 ? ", \u2026" : "");
|
|
51123
|
+
}
|
|
51124
|
+
function previewText(text, max = 120) {
|
|
51125
|
+
if (!text) return "";
|
|
51126
|
+
return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
|
|
51127
|
+
}
|
|
51128
|
+
function coordinatorToActivityItems(activities) {
|
|
51129
|
+
return activities.flatMap((a) => {
|
|
51130
|
+
switch (a.type) {
|
|
51131
|
+
case "tool_call":
|
|
51132
|
+
return [{
|
|
51133
|
+
type: "tool_call",
|
|
51134
|
+
tool: a.tool,
|
|
51135
|
+
args: a.args,
|
|
51136
|
+
timestamp: a.timestamp
|
|
51137
|
+
}];
|
|
51138
|
+
case "tool_result":
|
|
51139
|
+
return [{
|
|
51140
|
+
type: "tool_result",
|
|
51141
|
+
tool: a.tool,
|
|
51142
|
+
result: a.result,
|
|
51143
|
+
success: a.success,
|
|
51144
|
+
timestamp: a.timestamp
|
|
51145
|
+
}];
|
|
51146
|
+
case "message":
|
|
51147
|
+
return [{
|
|
51148
|
+
type: "message",
|
|
51149
|
+
role: a.role,
|
|
51150
|
+
content: a.content,
|
|
51151
|
+
timestamp: a.timestamp
|
|
51152
|
+
}];
|
|
51153
|
+
case "error":
|
|
51154
|
+
return [{
|
|
51155
|
+
type: "message",
|
|
51156
|
+
role: "system",
|
|
51157
|
+
content: `Error: ${a.message}`,
|
|
51158
|
+
timestamp: a.timestamp
|
|
51159
|
+
}];
|
|
51160
|
+
case "coordinator_decision":
|
|
51161
|
+
case "plan_committed":
|
|
51162
|
+
case "pending_question":
|
|
51163
|
+
case "clarification_question":
|
|
51164
|
+
return [];
|
|
51165
|
+
case "file_operation":
|
|
51166
|
+
return [{
|
|
51167
|
+
type: "file_operation",
|
|
51168
|
+
operation: a.operation,
|
|
51169
|
+
path: a.path,
|
|
51170
|
+
success: a.success,
|
|
51171
|
+
timestamp: a.timestamp
|
|
51172
|
+
}];
|
|
51173
|
+
case "schema_diff":
|
|
51174
|
+
return [{
|
|
51175
|
+
type: "schema_diff",
|
|
51176
|
+
filePath: a.filePath,
|
|
51177
|
+
hunks: a.hunks,
|
|
51178
|
+
timestamp: a.timestamp
|
|
51179
|
+
}];
|
|
51180
|
+
}
|
|
51181
|
+
});
|
|
51182
|
+
}
|
|
51183
|
+
function pluckCoordinatorState(activities) {
|
|
51184
|
+
let decision = null;
|
|
51185
|
+
let plan = null;
|
|
51186
|
+
const pendingQuestions = [];
|
|
51187
|
+
for (const a of activities) {
|
|
51188
|
+
if (a.type === "coordinator_decision") decision = a;
|
|
51189
|
+
else if (a.type === "plan_committed") plan = a;
|
|
51190
|
+
else if (a.type === "pending_question") pendingQuestions.push(a);
|
|
51191
|
+
}
|
|
51192
|
+
return { decision, plan, pendingQuestions };
|
|
51193
|
+
}
|
|
51194
|
+
function subagentMessagesToActivities(messages) {
|
|
51195
|
+
return messages.map((m) => {
|
|
51196
|
+
if (m.tool) {
|
|
51197
|
+
return {
|
|
51198
|
+
type: "tool_call",
|
|
51199
|
+
tool: m.tool,
|
|
51200
|
+
args: { preview: m.message },
|
|
51201
|
+
timestamp: m.timestamp
|
|
51202
|
+
};
|
|
51203
|
+
}
|
|
51204
|
+
return {
|
|
51205
|
+
type: "message",
|
|
51206
|
+
role: "system",
|
|
51207
|
+
content: m.message,
|
|
51208
|
+
timestamp: m.timestamp
|
|
51209
|
+
};
|
|
51210
|
+
});
|
|
51211
|
+
}
|
|
51212
|
+
function buildTimelineItems(messages, activities, subagents) {
|
|
51213
|
+
const items = [];
|
|
51214
|
+
if (messages) {
|
|
51215
|
+
messages.forEach((m, i) => items.push({ source: "message", data: m, index: i }));
|
|
51216
|
+
}
|
|
51217
|
+
if (activities) {
|
|
51218
|
+
activities.forEach((a) => items.push({ source: "activity", data: a }));
|
|
51219
|
+
}
|
|
51220
|
+
subagents.forEach((s) => items.push({ source: "subagent", data: s }));
|
|
51221
|
+
return items;
|
|
51222
|
+
}
|
|
51223
|
+
function timelineItemIcon(item) {
|
|
51224
|
+
switch (item.source) {
|
|
51225
|
+
case "message": {
|
|
51226
|
+
const m = item.data;
|
|
51227
|
+
if (m.role === "tool") return { name: "terminal", color: "text-[var(--color-primary)]" };
|
|
51228
|
+
if (m.reasoningContent) return { name: "sparkles", color: "text-[var(--color-primary)]" };
|
|
51229
|
+
if (m.role === "user") return { name: "user", color: "text-[var(--color-primary)]" };
|
|
51230
|
+
return { name: "message-square", color: "text-[var(--color-muted-foreground)]" };
|
|
51231
|
+
}
|
|
51232
|
+
case "activity": {
|
|
51233
|
+
const a = item.data;
|
|
51234
|
+
switch (a.type) {
|
|
51235
|
+
case "tool_call":
|
|
51236
|
+
return { name: "terminal", color: "text-[var(--color-primary)]" };
|
|
51237
|
+
case "tool_result":
|
|
51238
|
+
return { name: a.success !== false ? "check" : "x", color: a.success !== false ? "text-[var(--color-success)]" : "text-[var(--color-danger)]" };
|
|
51239
|
+
case "error":
|
|
51240
|
+
return { name: "alert-triangle", color: "text-[var(--color-danger)]" };
|
|
51241
|
+
case "file_operation":
|
|
51242
|
+
return { name: "file", color: "text-[var(--color-muted-foreground)]" };
|
|
51243
|
+
case "schema_diff":
|
|
51244
|
+
return { name: "git-commit", color: "text-[var(--color-muted-foreground)]" };
|
|
51245
|
+
default:
|
|
51246
|
+
return { name: "info", color: "text-[var(--color-muted-foreground)]" };
|
|
51247
|
+
}
|
|
51248
|
+
}
|
|
51249
|
+
case "subagent":
|
|
51250
|
+
return { name: "bot", color: "text-[var(--color-primary)]" };
|
|
51251
|
+
}
|
|
51252
|
+
}
|
|
51253
|
+
function timelineItemLabel(item) {
|
|
51254
|
+
switch (item.source) {
|
|
51255
|
+
case "message": {
|
|
51256
|
+
const m = item.data;
|
|
51257
|
+
if (m.role === "tool") return "tool";
|
|
51258
|
+
if (m.reasoningContent) return "thinking";
|
|
51259
|
+
return m.role;
|
|
51260
|
+
}
|
|
51261
|
+
case "activity":
|
|
51262
|
+
return item.data.type;
|
|
51263
|
+
case "subagent":
|
|
51264
|
+
return "subagent";
|
|
51265
|
+
}
|
|
51266
|
+
}
|
|
51267
|
+
function timelineItemPreview(item) {
|
|
51268
|
+
switch (item.source) {
|
|
51269
|
+
case "message": {
|
|
51270
|
+
const m = item.data;
|
|
51271
|
+
if (m.role === "tool") return `${m.toolName ?? "tool"} \u2192 ${m.toolCallId?.slice(0, 8) ?? ""}`;
|
|
51272
|
+
if (m.reasoningContent) return previewText(m.reasoningContent, 120);
|
|
51273
|
+
return previewText(m.content, 120);
|
|
51274
|
+
}
|
|
51275
|
+
case "activity": {
|
|
51276
|
+
const a = item.data;
|
|
51277
|
+
switch (a.type) {
|
|
51278
|
+
case "tool_call":
|
|
51279
|
+
return `${a.tool}(${summarizeArgs(a.args)})`;
|
|
51280
|
+
case "tool_result":
|
|
51281
|
+
return `${a.tool}: ${compactJson(a.result)}`;
|
|
51282
|
+
case "message":
|
|
51283
|
+
return previewText(a.content, 120);
|
|
51284
|
+
case "error":
|
|
51285
|
+
return previewText(a.message, 120);
|
|
51286
|
+
case "file_operation":
|
|
51287
|
+
return `${a.operation} ${a.path}`;
|
|
51288
|
+
case "schema_diff":
|
|
51289
|
+
return `diff ${a.filePath}`;
|
|
51290
|
+
default:
|
|
51291
|
+
return String(a.type);
|
|
51292
|
+
}
|
|
51293
|
+
}
|
|
51294
|
+
case "subagent":
|
|
51295
|
+
return `${item.data.name} \xB7 ${item.data.task}`;
|
|
51296
|
+
}
|
|
51297
|
+
}
|
|
51298
|
+
function timelineItemTimeLabel(item) {
|
|
51299
|
+
if (item.source === "activity") return formatHHMMSS(item.data.timestamp);
|
|
51300
|
+
if (item.source === "subagent") {
|
|
51301
|
+
const ts = item.data.messages[0]?.timestamp;
|
|
51302
|
+
return ts !== void 0 ? formatHHMMSS(ts) : void 0;
|
|
51303
|
+
}
|
|
51304
|
+
return void 0;
|
|
51305
|
+
}
|
|
51306
|
+
function TraceDetailContent({ item }) {
|
|
51307
|
+
const { t } = useTranslate();
|
|
51308
|
+
switch (item.source) {
|
|
51309
|
+
case "message": {
|
|
51310
|
+
const m = item.data;
|
|
51311
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51312
|
+
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "items-center", children: /* @__PURE__ */ jsx(Badge, { variant: roleBadgeVariant[m.role], className: "text-[10px] uppercase", children: m.role }) }),
|
|
51313
|
+
typeof m.reasoningContent === "string" && m.reasoningContent.length > 0 && /* @__PURE__ */ jsxs(Box, { children: [
|
|
51314
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "mb-1", children: t("subagentTrace.reasoning") }),
|
|
51315
|
+
/* @__PURE__ */ jsx(MarkdownContent, { content: m.reasoningContent })
|
|
51316
|
+
] }),
|
|
51317
|
+
m.content.length > 0 && /* @__PURE__ */ jsxs(Box, { children: [
|
|
51318
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "mb-1", children: t("subagentTrace.content") }),
|
|
51319
|
+
m.role === "tool" ? (() => {
|
|
51320
|
+
const pretty = tryPrettyJson(m.content);
|
|
51321
|
+
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 });
|
|
51322
|
+
})() : /* @__PURE__ */ jsx(MarkdownContent, { content: m.content })
|
|
51323
|
+
] }),
|
|
51324
|
+
Array.isArray(m.toolCalls) && m.toolCalls.length > 0 && /* @__PURE__ */ jsxs(Box, { children: [
|
|
51325
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "mb-1", children: t("subagentTrace.toolCalls") }),
|
|
51326
|
+
/* @__PURE__ */ jsx(
|
|
51327
|
+
Accordion,
|
|
51328
|
+
{
|
|
51329
|
+
multiple: true,
|
|
51330
|
+
items: m.toolCalls.map((tc, i) => ({
|
|
51331
|
+
id: `tc-detail-${i}`,
|
|
51332
|
+
title: `${tc.name}(${summarizeArgs(tc.args)})`,
|
|
51333
|
+
content: /* @__PURE__ */ jsx(CodeBlock, { code: JSON.stringify(tc.args, null, 2), language: "json", maxHeight: "24rem" })
|
|
51334
|
+
}))
|
|
51335
|
+
}
|
|
51336
|
+
)
|
|
51337
|
+
] })
|
|
51338
|
+
] });
|
|
51339
|
+
}
|
|
51340
|
+
case "activity": {
|
|
51341
|
+
const a = item.data;
|
|
51342
|
+
switch (a.type) {
|
|
51343
|
+
case "tool_call":
|
|
51344
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51345
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51346
|
+
/* @__PURE__ */ jsx(Badge, { variant: "default", className: "text-[10px]", children: "tool_call" }),
|
|
51347
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
51348
|
+
] }),
|
|
51349
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: a.tool }),
|
|
51350
|
+
/* @__PURE__ */ jsx(CodeBlock, { code: JSON.stringify(a.args, null, 2), language: "json", maxHeight: "60vh" })
|
|
51351
|
+
] });
|
|
51352
|
+
case "tool_result":
|
|
51353
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51354
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51355
|
+
/* @__PURE__ */ jsx(Badge, { variant: a.success !== false ? "default" : "warning", className: "text-[10px]", children: a.success !== false ? "success" : "fail" }),
|
|
51356
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
51357
|
+
] }),
|
|
51358
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: a.tool }),
|
|
51359
|
+
/* @__PURE__ */ jsx(CodeBlock, { code: JSON.stringify(a.result, null, 2), language: "json", maxHeight: "60vh" })
|
|
51360
|
+
] });
|
|
51361
|
+
case "message":
|
|
51362
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51363
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51364
|
+
/* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: a.role }),
|
|
51365
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
51366
|
+
] }),
|
|
51367
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "whitespace-pre-wrap", children: a.content })
|
|
51368
|
+
] });
|
|
51369
|
+
case "error":
|
|
51370
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51371
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51372
|
+
/* @__PURE__ */ jsx(Badge, { variant: "warning", className: "text-[10px]", children: "error" }),
|
|
51373
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
51374
|
+
] }),
|
|
51375
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "whitespace-pre-wrap text-[var(--color-danger)]", children: a.message })
|
|
51376
|
+
] });
|
|
51377
|
+
case "file_operation":
|
|
51378
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51379
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51380
|
+
/* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: "file" }),
|
|
51381
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
51382
|
+
] }),
|
|
51383
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "body2", children: [
|
|
51384
|
+
a.operation,
|
|
51385
|
+
" ",
|
|
51386
|
+
a.path
|
|
51387
|
+
] })
|
|
51388
|
+
] });
|
|
51389
|
+
case "schema_diff":
|
|
51390
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51391
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51392
|
+
/* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: "diff" }),
|
|
51393
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
51394
|
+
] }),
|
|
51395
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: a.filePath })
|
|
51396
|
+
] });
|
|
51397
|
+
default:
|
|
51398
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51399
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) }),
|
|
51400
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: String(a.type) })
|
|
51401
|
+
] });
|
|
51402
|
+
}
|
|
51403
|
+
}
|
|
51404
|
+
case "subagent": {
|
|
51405
|
+
const s = item.data;
|
|
51406
|
+
const activities = subagentMessagesToActivities(s.messages);
|
|
51407
|
+
const ts = s.messages[0]?.timestamp;
|
|
51408
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51409
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51410
|
+
/* @__PURE__ */ jsx(Badge, { variant: "default", className: "text-[10px]", children: s.role }),
|
|
51411
|
+
ts !== void 0 && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(ts) })
|
|
51412
|
+
] }),
|
|
51413
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", weight: "semibold", children: s.name }),
|
|
51414
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", color: "muted", children: s.task }),
|
|
51415
|
+
activities.length > 0 && /* @__PURE__ */ jsx(Box, { className: "border-t border-[var(--color-border)] pt-2", children: /* @__PURE__ */ jsx(InlineActivityStream, { activities, autoScroll: false }) })
|
|
51416
|
+
] });
|
|
51417
|
+
}
|
|
51418
|
+
}
|
|
51419
|
+
}
|
|
51420
|
+
var InlineActivityRow, InlineActivityStream, CoordinatorCard, SubagentRow, OrbitalGroup, SubagentRichCard, roleBadgeVariant, ChatMessageRow, CoordinatorConversation, SubagentTracePanel;
|
|
51421
|
+
var init_SubagentTracePanel = __esm({
|
|
51422
|
+
"components/core/organisms/SubagentTracePanel.tsx"() {
|
|
51423
|
+
"use client";
|
|
51424
|
+
init_Box();
|
|
51425
|
+
init_Stack();
|
|
51426
|
+
init_Typography();
|
|
51427
|
+
init_Badge();
|
|
51428
|
+
init_Icon();
|
|
51429
|
+
init_Button();
|
|
51430
|
+
init_Modal();
|
|
51431
|
+
init_Accordion();
|
|
51432
|
+
init_markdown();
|
|
51433
|
+
InlineActivityRow = ({ activity }) => {
|
|
51434
|
+
const time = formatHHMMSS(activity.timestamp);
|
|
51435
|
+
const baseRow = "items-start px-3 py-1 hover:bg-[var(--color-surface)]";
|
|
51436
|
+
if (activity.type === "tool_call") {
|
|
51437
|
+
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
|
|
51438
|
+
/* @__PURE__ */ jsx(Icon, { name: "terminal", size: "xs", className: "mt-0.5 flex-shrink-0 text-[var(--color-primary)]" }),
|
|
51439
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "flex-1 min-w-0 text-[11px] font-mono break-all whitespace-pre-wrap", children: [
|
|
51440
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", weight: "semibold", className: "text-[11px] font-mono", children: activity.tool }),
|
|
51441
|
+
activity.args !== void 0 && /* @__PURE__ */ jsxs(Typography, { as: "span", variant: "caption", color: "muted", className: "text-[11px] font-mono", children: [
|
|
51442
|
+
" ",
|
|
51443
|
+
compactJson(activity.args)
|
|
51444
|
+
] })
|
|
51445
|
+
] }),
|
|
51446
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
|
|
51447
|
+
] });
|
|
51448
|
+
}
|
|
51449
|
+
if (activity.type === "tool_result") {
|
|
51450
|
+
const success = activity.success !== false;
|
|
51451
|
+
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
|
|
51452
|
+
/* @__PURE__ */ jsx(
|
|
51453
|
+
Icon,
|
|
51454
|
+
{
|
|
51455
|
+
name: success ? "check" : "x",
|
|
51456
|
+
size: "xs",
|
|
51457
|
+
className: `mt-0.5 flex-shrink-0 ${success ? "text-[var(--color-success)]" : "text-[var(--color-danger)]"}`
|
|
51458
|
+
}
|
|
51459
|
+
),
|
|
51460
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "flex-1 min-w-0 text-[11px] font-mono break-all whitespace-pre-wrap", children: [
|
|
51461
|
+
/* @__PURE__ */ jsxs(Typography, { as: "span", variant: "caption", color: "muted", className: "text-[11px] font-mono", children: [
|
|
51462
|
+
activity.tool,
|
|
51463
|
+
":",
|
|
51464
|
+
" "
|
|
51465
|
+
] }),
|
|
51466
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "text-[11px] font-mono", children: compactJson(activity.result) })
|
|
51467
|
+
] }),
|
|
51468
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
|
|
51469
|
+
] });
|
|
51470
|
+
}
|
|
51471
|
+
if (activity.type === "message") {
|
|
51472
|
+
const role = activity.role;
|
|
51473
|
+
const iconName = role === "user" ? "user" : role === "system" ? "info" : "sparkles";
|
|
51474
|
+
const roleColor = role === "user" ? "text-[var(--color-primary)]" : role === "system" ? "text-[var(--color-muted-foreground)]" : "text-[var(--color-foreground)]";
|
|
51475
|
+
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
|
|
51476
|
+
/* @__PURE__ */ jsx(Icon, { name: iconName, size: "xs", className: `mt-0.5 flex-shrink-0 ${roleColor}` }),
|
|
51477
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "flex-1 min-w-0 text-[11px] whitespace-pre-wrap break-words", children: activity.content }),
|
|
51478
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
|
|
51479
|
+
] });
|
|
51480
|
+
}
|
|
51481
|
+
if (activity.type === "error") {
|
|
51482
|
+
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
|
|
51483
|
+
/* @__PURE__ */ jsx(Icon, { name: "alert-triangle", size: "xs", className: "mt-0.5 flex-shrink-0 text-[var(--color-danger)]" }),
|
|
51484
|
+
/* @__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 }),
|
|
51485
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
|
|
51486
|
+
] });
|
|
51487
|
+
}
|
|
51488
|
+
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
|
|
51489
|
+
/* @__PURE__ */ jsx(Icon, { name: "file", size: "xs", className: "mt-0.5 flex-shrink-0 text-[var(--color-muted-foreground)]" }),
|
|
51490
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", className: "flex-1 min-w-0 text-[11px] font-mono break-all", children: [
|
|
51491
|
+
"[",
|
|
51492
|
+
activity.type,
|
|
51493
|
+
"] ",
|
|
51494
|
+
compactJson(activity)
|
|
51495
|
+
] }),
|
|
51496
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
|
|
51497
|
+
] });
|
|
51498
|
+
};
|
|
51499
|
+
InlineActivityStream = ({ activities, autoScroll = true, className }) => {
|
|
51500
|
+
const endRef = React86__default.useRef(null);
|
|
51501
|
+
React86__default.useEffect(() => {
|
|
51502
|
+
if (!autoScroll) return;
|
|
51503
|
+
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
51504
|
+
}, [activities.length, autoScroll]);
|
|
51505
|
+
return /* @__PURE__ */ jsxs(Box, { className, children: [
|
|
51506
|
+
activities.map((a, i) => /* @__PURE__ */ jsx(InlineActivityRow, { activity: a }, `${a.timestamp}-${i}`)),
|
|
51507
|
+
/* @__PURE__ */ jsx(Box, { ref: endRef })
|
|
51508
|
+
] });
|
|
51509
|
+
};
|
|
51510
|
+
CoordinatorCard = ({ snapshot, className }) => {
|
|
51511
|
+
const { t } = useTranslate();
|
|
51512
|
+
const { decision, plan, pendingQuestions } = snapshot;
|
|
51513
|
+
if (!decision && !plan && pendingQuestions.length === 0) return null;
|
|
51514
|
+
return /* @__PURE__ */ jsxs(
|
|
51515
|
+
Box,
|
|
51516
|
+
{
|
|
51517
|
+
className: `px-3 py-2 border-b border-[var(--color-border)] bg-[var(--color-muted)]/30 ${className ?? ""}`,
|
|
51518
|
+
children: [
|
|
51519
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center mb-2", children: [
|
|
51520
|
+
/* @__PURE__ */ jsx(Icon, { name: "compass", size: "xs" }),
|
|
51521
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold text-[11px]", children: t("subagentTrace.coordinator") })
|
|
51522
|
+
] }),
|
|
51523
|
+
decision && /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "mb-2", children: [
|
|
51524
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51525
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] uppercase tracking-wide", children: t("subagentTrace.organism") }),
|
|
51526
|
+
/* @__PURE__ */ jsx(Badge, { variant: "default", className: "text-[10px]", children: decision.organism }),
|
|
51527
|
+
decision.priorOrganism && decision.priorOrganism !== decision.organism && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: t("subagentTrace.wasOrganism", { organism: decision.priorOrganism }) })
|
|
51528
|
+
] }),
|
|
51529
|
+
decision.reason && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[11px] mt-0.5", children: decision.reason })
|
|
51530
|
+
] }),
|
|
51531
|
+
plan && plan.orbitals.length > 0 && /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "mb-2", children: [
|
|
51532
|
+
/* @__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 }) }),
|
|
51533
|
+
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap", children: plan.orbitals.map((o) => /* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: o }, o)) })
|
|
51534
|
+
] }),
|
|
51535
|
+
pendingQuestions.length > 0 && /* @__PURE__ */ jsxs(VStack, { gap: "none", children: [
|
|
51536
|
+
/* @__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 }) }),
|
|
51537
|
+
pendingQuestions.map((q) => /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-start", children: [
|
|
51538
|
+
/* @__PURE__ */ jsx(Icon, { name: "help-circle", size: "xs", className: "mt-0.5 flex-shrink-0 text-[var(--color-warning)]" }),
|
|
51539
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-[11px] flex-1 min-w-0", children: [
|
|
51540
|
+
q.question,
|
|
51541
|
+
q.orbitalName && /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", className: "text-[10px] ml-1", children: [
|
|
51542
|
+
"(",
|
|
51543
|
+
q.orbitalName,
|
|
51544
|
+
")"
|
|
51545
|
+
] })
|
|
51546
|
+
] })
|
|
51547
|
+
] }, q.questionId))
|
|
51548
|
+
] })
|
|
51549
|
+
]
|
|
51550
|
+
}
|
|
51551
|
+
);
|
|
51552
|
+
};
|
|
51553
|
+
SubagentRow = ({ subagent }) => {
|
|
51554
|
+
const recent = lastMessage(subagent);
|
|
51555
|
+
return /* @__PURE__ */ jsxs(
|
|
51556
|
+
HStack,
|
|
51557
|
+
{
|
|
51558
|
+
gap: "sm",
|
|
51559
|
+
className: "items-start px-3 py-2 border-b border-[var(--color-border)]",
|
|
51560
|
+
children: [
|
|
51561
|
+
/* @__PURE__ */ jsx(Box, { className: "pt-0.5", children: /* @__PURE__ */ jsx(Icon, { name: statusIconName(subagent.status), size: "xs" }) }),
|
|
51562
|
+
/* @__PURE__ */ jsxs(VStack, { gap: "none", className: "flex-1 min-w-0", children: [
|
|
51563
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center", children: [
|
|
51564
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-medium truncate", children: subagent.name }),
|
|
51565
|
+
/* @__PURE__ */ jsx(Badge, { variant: "default", children: subagent.role })
|
|
51566
|
+
] }),
|
|
51567
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "truncate", children: recent ?? subagent.task })
|
|
51568
|
+
] })
|
|
51569
|
+
]
|
|
51570
|
+
}
|
|
51571
|
+
);
|
|
51572
|
+
};
|
|
51573
|
+
OrbitalGroup = ({ orbitalName, subagents }) => {
|
|
51574
|
+
const { t } = useTranslate();
|
|
51575
|
+
const runningCount = subagents.filter((s) => s.status === "running").length;
|
|
51576
|
+
const completeCount = subagents.filter((s) => s.status === "complete").length;
|
|
51577
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "border-b border-[var(--color-border)]", children: [
|
|
51578
|
+
/* @__PURE__ */ jsxs(
|
|
51579
|
+
HStack,
|
|
51580
|
+
{
|
|
51581
|
+
gap: "sm",
|
|
51582
|
+
className: "items-center px-3 py-2 bg-[var(--color-surface)] border-b border-[var(--color-border)]",
|
|
51583
|
+
children: [
|
|
51584
|
+
/* @__PURE__ */ jsx(Icon, { name: "circle", size: "xs" }),
|
|
51585
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold flex-1 truncate", children: orbitalName }),
|
|
51586
|
+
/* @__PURE__ */ jsx(Badge, { variant: "default", children: runningCount > 0 ? t("subagentTrace.countRunning", { count: runningCount }) : t("subagentTrace.countDone", { count: completeCount }) })
|
|
51587
|
+
]
|
|
51588
|
+
}
|
|
51589
|
+
),
|
|
51590
|
+
subagents.map((sub) => /* @__PURE__ */ jsx(SubagentRow, { subagent: sub }, sub.id))
|
|
51591
|
+
] });
|
|
51592
|
+
};
|
|
51593
|
+
SubagentRichCard = ({ subagent }) => {
|
|
51594
|
+
const { t } = useTranslate();
|
|
51595
|
+
const activities = React86__default.useMemo(
|
|
51596
|
+
() => subagentMessagesToActivities(subagent.messages),
|
|
51597
|
+
[subagent.messages]
|
|
51598
|
+
);
|
|
51599
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "border-b border-[var(--color-border)] p-3", children: [
|
|
51600
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center mb-2", children: [
|
|
51601
|
+
/* @__PURE__ */ jsx(
|
|
51602
|
+
Box,
|
|
51603
|
+
{
|
|
51604
|
+
style: {
|
|
51605
|
+
width: 8,
|
|
51606
|
+
height: 8,
|
|
51607
|
+
borderRadius: "50%",
|
|
51608
|
+
flexShrink: 0,
|
|
51609
|
+
backgroundColor: subagent.status === "complete" ? "var(--color-success)" : subagent.status === "error" ? "var(--color-error)" : "var(--color-primary)",
|
|
51610
|
+
...subagent.status === "running" ? { animation: "pulse 1.5s infinite" } : {}
|
|
51611
|
+
}
|
|
51612
|
+
}
|
|
51613
|
+
),
|
|
51614
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold flex-1 truncate", children: subagent.name }),
|
|
51615
|
+
/* @__PURE__ */ jsx(Badge, { variant: subagent.role === "deterministic" ? "default" : subagent.role === "llm" ? "info" : "warning", children: subagent.role }),
|
|
51616
|
+
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` })
|
|
51617
|
+
] }),
|
|
51618
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "mb-2", children: subagent.task }),
|
|
51619
|
+
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") })
|
|
51620
|
+
] });
|
|
51621
|
+
};
|
|
51622
|
+
roleBadgeVariant = {
|
|
51623
|
+
system: "neutral",
|
|
51624
|
+
user: "info",
|
|
51625
|
+
assistant: "default",
|
|
51626
|
+
tool: "warning"
|
|
51627
|
+
};
|
|
51628
|
+
ChatMessageRow = ({ message, index }) => {
|
|
51629
|
+
const { t } = useTranslate();
|
|
51630
|
+
const { role, content, toolCalls, reasoningContent, toolCallId, toolName } = message;
|
|
51631
|
+
if (role === "tool") {
|
|
51632
|
+
const pretty = tryPrettyJson(content);
|
|
51633
|
+
const title = `${toolName ?? "tool"} \u2192${toolCallId ? ` ${toolCallId.slice(0, 8)}` : ""}`;
|
|
51634
|
+
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 });
|
|
51635
|
+
const items = [{ id: `tool-${index}`, title, content: body }];
|
|
51636
|
+
return /* @__PURE__ */ jsx(Box, { className: "px-3 py-2 border-b border-[var(--color-border)]", children: /* @__PURE__ */ jsx(Accordion, { items }) });
|
|
51637
|
+
}
|
|
51638
|
+
const hasReasoning = typeof reasoningContent === "string" && reasoningContent.length > 0;
|
|
51639
|
+
const hasToolCalls = Array.isArray(toolCalls) && toolCalls.length > 0;
|
|
51640
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "px-3 py-2 border-b border-[var(--color-border)]", children: [
|
|
51641
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51642
|
+
/* @__PURE__ */ jsx(Badge, { variant: roleBadgeVariant[role], className: "text-[10px] uppercase", children: role }),
|
|
51643
|
+
hasReasoning && /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: [
|
|
51644
|
+
"\xB7 ",
|
|
51645
|
+
t("subagentTrace.thinking")
|
|
51646
|
+
] }),
|
|
51647
|
+
hasToolCalls && /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: [
|
|
51648
|
+
"\xB7 ",
|
|
51649
|
+
toolCalls.length === 1 ? t("subagentTrace.toolCallCount", { count: toolCalls.length }) : t("subagentTrace.toolCallCountPlural", { count: toolCalls.length })
|
|
51650
|
+
] })
|
|
51651
|
+
] }),
|
|
51652
|
+
hasReasoning && /* @__PURE__ */ jsx(Accordion, { items: [{
|
|
51653
|
+
id: `reasoning-${index}`,
|
|
51654
|
+
title: t("subagentTrace.reasoning"),
|
|
51655
|
+
content: /* @__PURE__ */ jsx(MarkdownContent, { content: reasoningContent })
|
|
51656
|
+
}] }),
|
|
51657
|
+
content.length > 0 && /* @__PURE__ */ jsx(MarkdownContent, { content }),
|
|
51658
|
+
hasToolCalls && /* @__PURE__ */ jsx(
|
|
51659
|
+
Accordion,
|
|
51660
|
+
{
|
|
51661
|
+
multiple: true,
|
|
51662
|
+
items: toolCalls.map((tc, i) => ({
|
|
51663
|
+
id: `tc-${index}-${i}`,
|
|
51664
|
+
title: `${tc.name}(${summarizeArgs(tc.args)})`,
|
|
51665
|
+
content: /* @__PURE__ */ jsx(CodeBlock, { code: JSON.stringify(tc.args, null, 2), language: "json", maxHeight: "24rem" })
|
|
51666
|
+
}))
|
|
51667
|
+
}
|
|
51668
|
+
)
|
|
51669
|
+
] });
|
|
51670
|
+
};
|
|
51671
|
+
CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
|
|
51672
|
+
const endRef = React86__default.useRef(null);
|
|
51673
|
+
React86__default.useEffect(() => {
|
|
51674
|
+
if (!autoScroll) return;
|
|
51675
|
+
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
51676
|
+
}, [messages.length, autoScroll]);
|
|
51677
|
+
return /* @__PURE__ */ jsxs(Box, { className, children: [
|
|
51678
|
+
messages.map((m, i) => /* @__PURE__ */ jsx(ChatMessageRow, { message: m, index: i }, `msg-${i}`)),
|
|
51679
|
+
/* @__PURE__ */ jsx(Box, { ref: endRef })
|
|
51680
|
+
] });
|
|
51681
|
+
};
|
|
51682
|
+
SubagentTracePanel = ({
|
|
51683
|
+
subagents,
|
|
51684
|
+
focusedOrbital,
|
|
51685
|
+
disclosureLevel,
|
|
51686
|
+
open,
|
|
51687
|
+
onClose,
|
|
51688
|
+
className,
|
|
51689
|
+
mode = "overlay",
|
|
51690
|
+
coordinatorActivities,
|
|
51691
|
+
coordinatorMessages
|
|
51692
|
+
}) => {
|
|
51693
|
+
const { t } = useTranslate();
|
|
51694
|
+
const [selectedItem, setSelectedItem] = useState(null);
|
|
51695
|
+
const densityLabel = (rich) => rich ? t("subagentTrace.densityRich") : t("subagentTrace.densityCompact");
|
|
51696
|
+
if (mode === "overlay" && !open) return null;
|
|
51697
|
+
const isTabMode = mode === "tab";
|
|
51698
|
+
const isRichMode = isTabMode || disclosureLevel >= 3;
|
|
51699
|
+
if (isTabMode) {
|
|
51700
|
+
const timelineItems = buildTimelineItems(coordinatorMessages, coordinatorActivities, subagents);
|
|
51701
|
+
const hasData = timelineItems.length > 0;
|
|
51702
|
+
return /* @__PURE__ */ jsxs(Box, { className: `h-full w-full bg-[var(--color-card)] overflow-hidden flex flex-col ${className ?? ""}`, children: [
|
|
51703
|
+
/* @__PURE__ */ jsxs(
|
|
51704
|
+
HStack,
|
|
51705
|
+
{
|
|
51706
|
+
gap: "sm",
|
|
51707
|
+
className: "items-center px-3 py-2 border-b border-[var(--color-border)]",
|
|
51708
|
+
children: [
|
|
51709
|
+
/* @__PURE__ */ jsx(Icon, { name: "activity", size: "sm" }),
|
|
51710
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold flex-1", children: t("subagentTrace.trace") }),
|
|
51711
|
+
onClose && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" }) })
|
|
51712
|
+
]
|
|
51713
|
+
}
|
|
51714
|
+
),
|
|
51715
|
+
!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") }) }),
|
|
51716
|
+
hasData && /* @__PURE__ */ jsx(Box, { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx(VStack, { gap: "none", children: timelineItems.map((item, i) => {
|
|
51717
|
+
const { name: iconName, color: iconColor } = timelineItemIcon(item);
|
|
51718
|
+
const isLast = i === timelineItems.length - 1;
|
|
51719
|
+
return /* @__PURE__ */ jsxs(
|
|
51720
|
+
Box,
|
|
51721
|
+
{
|
|
51722
|
+
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",
|
|
51723
|
+
onClick: () => setSelectedItem(item),
|
|
51724
|
+
children: [
|
|
51725
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex flex-col items-center mr-3 mt-0.5", style: { width: 20 }, children: [
|
|
51726
|
+
/* @__PURE__ */ jsx(
|
|
51727
|
+
Box,
|
|
51728
|
+
{
|
|
51729
|
+
className: "rounded-full flex-shrink-0",
|
|
51730
|
+
style: {
|
|
51731
|
+
width: 8,
|
|
51732
|
+
height: 8,
|
|
51733
|
+
backgroundColor: "var(--color-primary)"
|
|
51734
|
+
}
|
|
51735
|
+
}
|
|
51736
|
+
),
|
|
51737
|
+
!isLast && /* @__PURE__ */ jsx(
|
|
51738
|
+
Box,
|
|
51739
|
+
{
|
|
51740
|
+
className: "flex-1",
|
|
51741
|
+
style: {
|
|
51742
|
+
width: 2,
|
|
51743
|
+
backgroundColor: "var(--color-border)",
|
|
51744
|
+
marginTop: 4,
|
|
51745
|
+
minHeight: 24
|
|
51746
|
+
}
|
|
51747
|
+
}
|
|
51748
|
+
)
|
|
51749
|
+
] }),
|
|
51750
|
+
/* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "flex-1 min-w-0", children: [
|
|
51751
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51752
|
+
/* @__PURE__ */ jsx(Icon, { name: iconName, size: "xs", className: `flex-shrink-0 ${iconColor}` }),
|
|
51753
|
+
timelineItemTimeLabel(item) && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: timelineItemTimeLabel(item) }),
|
|
51754
|
+
/* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: timelineItemLabel(item) })
|
|
51755
|
+
] }),
|
|
51756
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-start", children: [
|
|
51757
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", color: "muted", className: "flex-1 min-w-0 line-clamp-2", children: timelineItemPreview(item) }),
|
|
51758
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", className: "flex-shrink-0 mt-0", onClick: (e) => {
|
|
51759
|
+
e.stopPropagation();
|
|
51760
|
+
setSelectedItem(item);
|
|
51761
|
+
}, children: /* @__PURE__ */ jsx(Icon, { name: "maximize-2", size: "xs" }) })
|
|
51762
|
+
] })
|
|
51763
|
+
] })
|
|
51764
|
+
]
|
|
51765
|
+
},
|
|
51766
|
+
`${item.source}-${i}`
|
|
51767
|
+
);
|
|
51768
|
+
}) }) }),
|
|
51769
|
+
/* @__PURE__ */ jsx(
|
|
51770
|
+
Modal,
|
|
51771
|
+
{
|
|
51772
|
+
isOpen: selectedItem !== null,
|
|
51773
|
+
onClose: () => setSelectedItem(null),
|
|
51774
|
+
title: selectedItem ? `${timelineItemLabel(selectedItem)}${timelineItemTimeLabel(selectedItem) ? ` \xB7 ${timelineItemTimeLabel(selectedItem)}` : ""}` : "",
|
|
51775
|
+
size: "lg",
|
|
51776
|
+
children: selectedItem && /* @__PURE__ */ jsx(TraceDetailContent, { item: selectedItem })
|
|
51777
|
+
}
|
|
51778
|
+
)
|
|
51779
|
+
] });
|
|
51780
|
+
}
|
|
51781
|
+
const filtered = focusedOrbital ? subagents.filter((s) => s.orbitalName === focusedOrbital) : subagents;
|
|
51782
|
+
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 ?? ""}`;
|
|
51783
|
+
const wrapperStyle = { zIndex: 20 };
|
|
51784
|
+
const hasCoordinatorData = coordinatorMessages && coordinatorMessages.length > 0 || coordinatorActivities && coordinatorActivities.length > 0;
|
|
51785
|
+
if (filtered.length === 0 && !hasCoordinatorData) {
|
|
51786
|
+
return /* @__PURE__ */ jsxs(Box, { className: wrapperClass, style: wrapperStyle, children: [
|
|
51787
|
+
/* @__PURE__ */ jsxs(
|
|
51788
|
+
HStack,
|
|
51789
|
+
{
|
|
51790
|
+
gap: "sm",
|
|
51791
|
+
className: "items-center px-3 py-2 border-b border-[var(--color-border)]",
|
|
51792
|
+
children: [
|
|
51793
|
+
/* @__PURE__ */ jsx(Icon, { name: "activity", size: "sm" }),
|
|
51794
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold flex-1", children: t("subagentTrace.subagents") }),
|
|
51795
|
+
onClose && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" }) })
|
|
51796
|
+
]
|
|
51797
|
+
}
|
|
51798
|
+
),
|
|
51799
|
+
/* @__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") }) })
|
|
51800
|
+
] });
|
|
51801
|
+
}
|
|
51802
|
+
if (focusedOrbital) {
|
|
51803
|
+
return /* @__PURE__ */ jsxs(Box, { className: wrapperClass, style: wrapperStyle, children: [
|
|
51804
|
+
/* @__PURE__ */ jsxs(
|
|
51805
|
+
HStack,
|
|
51806
|
+
{
|
|
51807
|
+
gap: "sm",
|
|
51808
|
+
className: "items-center px-3 py-2 border-b border-[var(--color-border)]",
|
|
51809
|
+
children: [
|
|
51810
|
+
/* @__PURE__ */ jsx(Icon, { name: "activity", size: "sm" }),
|
|
51811
|
+
/* @__PURE__ */ jsxs(VStack, { gap: "none", className: "flex-1 min-w-0", children: [
|
|
51812
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold truncate", children: focusedOrbital }),
|
|
51813
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", children: [
|
|
51814
|
+
filtered.length === 1 ? t("subagentTrace.subagentCount", { count: filtered.length }) : t("subagentTrace.subagentCountPlural", { count: filtered.length }),
|
|
51815
|
+
" \xB7 ",
|
|
51816
|
+
densityLabel(isRichMode)
|
|
51817
|
+
] })
|
|
51818
|
+
] }),
|
|
51819
|
+
onClose && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" }) })
|
|
51820
|
+
]
|
|
51821
|
+
}
|
|
51822
|
+
),
|
|
51823
|
+
/* @__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)) })
|
|
51824
|
+
] });
|
|
51825
|
+
}
|
|
51826
|
+
const grouped = groupByOrbital(filtered);
|
|
51827
|
+
const coordinatorSnapshot = pluckCoordinatorState(coordinatorActivities ?? []);
|
|
51828
|
+
return /* @__PURE__ */ jsxs(Box, { className: wrapperClass, style: wrapperStyle, children: [
|
|
51829
|
+
/* @__PURE__ */ jsxs(
|
|
51830
|
+
HStack,
|
|
51831
|
+
{
|
|
51832
|
+
gap: "sm",
|
|
51833
|
+
className: "items-center px-3 py-2 border-b border-[var(--color-border)]",
|
|
51834
|
+
children: [
|
|
51835
|
+
/* @__PURE__ */ jsx(Icon, { name: "activity", size: "sm" }),
|
|
51836
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "font-semibold flex-1", children: [
|
|
51837
|
+
t("subagentTrace.subagentsWithCount", { count: filtered.length }),
|
|
51838
|
+
" \xB7 ",
|
|
51839
|
+
densityLabel(isRichMode)
|
|
51840
|
+
] }),
|
|
51841
|
+
onClose && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" }) })
|
|
51842
|
+
]
|
|
51843
|
+
}
|
|
51844
|
+
),
|
|
51845
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex-1 overflow-y-auto", children: [
|
|
51846
|
+
!focusedOrbital && isRichMode && /* @__PURE__ */ jsx(CoordinatorCard, { snapshot: coordinatorSnapshot }),
|
|
51847
|
+
coordinatorMessages && coordinatorMessages.length > 0 ? /* @__PURE__ */ jsxs(Box, { className: "border-b border-[var(--color-border)]", children: [
|
|
51848
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center px-3 py-1.5 bg-[var(--color-card)] border-b border-[var(--color-border)]", children: [
|
|
51849
|
+
/* @__PURE__ */ jsx(Box, { style: { width: 6, height: 6, borderRadius: "50%", backgroundColor: "var(--color-primary)", flexShrink: 0 } }),
|
|
51850
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold text-[11px]", children: t("subagentTrace.coordinator") }),
|
|
51851
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: t("subagentTrace.messagesCount", { count: coordinatorMessages.length }) })
|
|
51852
|
+
] }),
|
|
51853
|
+
/* @__PURE__ */ jsx(Box, { className: "max-h-[36rem] overflow-y-auto", children: /* @__PURE__ */ jsx(CoordinatorConversation, { messages: coordinatorMessages, autoScroll: true }) })
|
|
51854
|
+
] }) : coordinatorActivities && coordinatorActivities.length > 0 && (() => {
|
|
51855
|
+
const filteredCoordinator = coordinatorActivities;
|
|
51856
|
+
if (filteredCoordinator.length === 0) return null;
|
|
51857
|
+
return /* @__PURE__ */ jsxs(Box, { className: "border-b border-[var(--color-border)]", children: [
|
|
51858
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center px-3 py-1.5 bg-[var(--color-card)] border-b border-[var(--color-border)]", children: [
|
|
51859
|
+
/* @__PURE__ */ jsx(Box, { style: { width: 6, height: 6, borderRadius: "50%", backgroundColor: "var(--color-primary)", flexShrink: 0 } }),
|
|
51860
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold text-[11px]", children: t("subagentTrace.coordinator") }),
|
|
51861
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: t("subagentTrace.eventsCount", { count: filteredCoordinator.length }) })
|
|
51862
|
+
] }),
|
|
51863
|
+
/* @__PURE__ */ jsx(Box, { className: "max-h-60 overflow-y-auto", children: /* @__PURE__ */ jsx(
|
|
51864
|
+
InlineActivityStream,
|
|
51865
|
+
{
|
|
51866
|
+
activities: coordinatorToActivityItems(filteredCoordinator),
|
|
51867
|
+
autoScroll: true
|
|
51868
|
+
}
|
|
51869
|
+
) })
|
|
51870
|
+
] });
|
|
51871
|
+
})(),
|
|
51872
|
+
isRichMode ? filtered.map((sub) => /* @__PURE__ */ jsx(SubagentRichCard, { subagent: sub }, sub.id)) : Array.from(grouped.entries()).map(([orbitalName, subs]) => /* @__PURE__ */ jsx(
|
|
51873
|
+
OrbitalGroup,
|
|
51874
|
+
{
|
|
51875
|
+
orbitalName,
|
|
51876
|
+
subagents: subs
|
|
51877
|
+
},
|
|
51878
|
+
orbitalName
|
|
51879
|
+
))
|
|
51880
|
+
] })
|
|
51881
|
+
] });
|
|
51882
|
+
};
|
|
51883
|
+
SubagentTracePanel.displayName = "SubagentTracePanel";
|
|
51884
|
+
}
|
|
51885
|
+
});
|
|
50349
51886
|
var TabbedContainer;
|
|
50350
51887
|
var init_TabbedContainer = __esm({
|
|
50351
51888
|
"components/core/organisms/layout/TabbedContainer.tsx"() {
|
|
@@ -50460,6 +51997,48 @@ var init_TabbedContainer = __esm({
|
|
|
50460
51997
|
TabbedContainer.displayName = "TabbedContainer";
|
|
50461
51998
|
}
|
|
50462
51999
|
});
|
|
52000
|
+
function TanksBoard({
|
|
52001
|
+
tiles,
|
|
52002
|
+
units,
|
|
52003
|
+
features,
|
|
52004
|
+
assetManifest,
|
|
52005
|
+
assetBaseUrl,
|
|
52006
|
+
scale = 0.45,
|
|
52007
|
+
showMinimap = true,
|
|
52008
|
+
enableCamera = true,
|
|
52009
|
+
tileClickEvent,
|
|
52010
|
+
unitClickEvent,
|
|
52011
|
+
isLoading,
|
|
52012
|
+
error,
|
|
52013
|
+
className
|
|
52014
|
+
}) {
|
|
52015
|
+
return /* @__PURE__ */ jsx("div", { className: cn("tanks-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
52016
|
+
IsometricCanvas_default,
|
|
52017
|
+
{
|
|
52018
|
+
tileLayout: "flat",
|
|
52019
|
+
tiles,
|
|
52020
|
+
units,
|
|
52021
|
+
features,
|
|
52022
|
+
assetManifest,
|
|
52023
|
+
assetBaseUrl,
|
|
52024
|
+
scale,
|
|
52025
|
+
showMinimap,
|
|
52026
|
+
enableCamera,
|
|
52027
|
+
tileClickEvent,
|
|
52028
|
+
unitClickEvent,
|
|
52029
|
+
isLoading,
|
|
52030
|
+
error
|
|
52031
|
+
}
|
|
52032
|
+
) });
|
|
52033
|
+
}
|
|
52034
|
+
var init_TanksBoard = __esm({
|
|
52035
|
+
"components/game/organisms/TanksBoard.tsx"() {
|
|
52036
|
+
"use client";
|
|
52037
|
+
init_cn();
|
|
52038
|
+
init_IsometricCanvas();
|
|
52039
|
+
TanksBoard.displayName = "TanksBoard";
|
|
52040
|
+
}
|
|
52041
|
+
});
|
|
50463
52042
|
var TeamOrganism;
|
|
50464
52043
|
var init_TeamOrganism = __esm({
|
|
50465
52044
|
"components/marketing/organisms/TeamOrganism.tsx"() {
|
|
@@ -50563,7 +52142,7 @@ var init_Timeline = __esm({
|
|
|
50563
52142
|
}) => {
|
|
50564
52143
|
const { t } = useTranslate();
|
|
50565
52144
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
50566
|
-
const items =
|
|
52145
|
+
const items = React86__default.useMemo(() => {
|
|
50567
52146
|
if (propItems) return propItems;
|
|
50568
52147
|
if (entityData.length === 0) return [];
|
|
50569
52148
|
return entityData.map((record, idx) => {
|
|
@@ -50670,7 +52249,7 @@ var init_Timeline = __esm({
|
|
|
50670
52249
|
}
|
|
50671
52250
|
});
|
|
50672
52251
|
function extractToastProps(children) {
|
|
50673
|
-
if (!
|
|
52252
|
+
if (!React86__default.isValidElement(children)) {
|
|
50674
52253
|
if (typeof children === "string") {
|
|
50675
52254
|
return { message: children };
|
|
50676
52255
|
}
|
|
@@ -50708,7 +52287,7 @@ var init_ToastSlot = __esm({
|
|
|
50708
52287
|
eventBus.emit("UI:CLOSE");
|
|
50709
52288
|
};
|
|
50710
52289
|
if (!isVisible) return null;
|
|
50711
|
-
const isCustomContent =
|
|
52290
|
+
const isCustomContent = React86__default.isValidElement(children) && !message;
|
|
50712
52291
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
50713
52292
|
Toast,
|
|
50714
52293
|
{
|
|
@@ -52324,7 +53903,7 @@ var init_WorldMapTemplate = __esm({
|
|
|
52324
53903
|
}
|
|
52325
53904
|
});
|
|
52326
53905
|
function lazyThree(name, loader) {
|
|
52327
|
-
const Lazy =
|
|
53906
|
+
const Lazy = React86__default.lazy(
|
|
52328
53907
|
() => loader().then((m) => {
|
|
52329
53908
|
const Resolved = m[name];
|
|
52330
53909
|
if (!Resolved) {
|
|
@@ -52336,13 +53915,13 @@ function lazyThree(name, loader) {
|
|
|
52336
53915
|
})
|
|
52337
53916
|
);
|
|
52338
53917
|
function ThreeWrapper(props) {
|
|
52339
|
-
return
|
|
53918
|
+
return React86__default.createElement(
|
|
52340
53919
|
ThreeBoundary,
|
|
52341
53920
|
{ name },
|
|
52342
|
-
|
|
52343
|
-
|
|
53921
|
+
React86__default.createElement(
|
|
53922
|
+
React86__default.Suspense,
|
|
52344
53923
|
{ fallback: null },
|
|
52345
|
-
|
|
53924
|
+
React86__default.createElement(Lazy, props)
|
|
52346
53925
|
)
|
|
52347
53926
|
);
|
|
52348
53927
|
}
|
|
@@ -52372,6 +53951,7 @@ var init_component_registry_generated = __esm({
|
|
|
52372
53951
|
init_BattleTemplate();
|
|
52373
53952
|
init_BehaviorView();
|
|
52374
53953
|
init_BloomQuizBlock();
|
|
53954
|
+
init_BoardgameBoard();
|
|
52375
53955
|
init_BookChapterView();
|
|
52376
53956
|
init_BookCoverPage();
|
|
52377
53957
|
init_BookNavBar();
|
|
@@ -52398,6 +53978,7 @@ var init_component_registry_generated = __esm({
|
|
|
52398
53978
|
init_Center();
|
|
52399
53979
|
init_Chart();
|
|
52400
53980
|
init_ChartLegend();
|
|
53981
|
+
init_ChatBar();
|
|
52401
53982
|
init_Checkbox();
|
|
52402
53983
|
init_ChoiceButton();
|
|
52403
53984
|
init_CityBuilderBoard();
|
|
@@ -52455,6 +54036,7 @@ var init_component_registry_generated = __esm({
|
|
|
52455
54036
|
init_FileTree();
|
|
52456
54037
|
init_FilterGroup();
|
|
52457
54038
|
init_FilterPill();
|
|
54039
|
+
init_FishingBoard();
|
|
52458
54040
|
init_Flex();
|
|
52459
54041
|
init_FlipCard();
|
|
52460
54042
|
init_FlipContainer();
|
|
@@ -52484,6 +54066,7 @@ var init_component_registry_generated = __esm({
|
|
|
52484
54066
|
init_HeroOrganism();
|
|
52485
54067
|
init_HeroSection();
|
|
52486
54068
|
init_HexStrategyBoard();
|
|
54069
|
+
init_HolidayRunnerBoard();
|
|
52487
54070
|
init_Icon();
|
|
52488
54071
|
init_InfiniteScrollSentinel();
|
|
52489
54072
|
init_Input();
|
|
@@ -52506,11 +54089,13 @@ var init_component_registry_generated = __esm({
|
|
|
52506
54089
|
init_MarketingFooter();
|
|
52507
54090
|
init_MasterDetail();
|
|
52508
54091
|
init_MasterDetailLayout();
|
|
54092
|
+
init_MatchPuzzleBoard();
|
|
52509
54093
|
init_MatrixQuestion();
|
|
52510
54094
|
init_MediaGallery();
|
|
52511
54095
|
init_Menu();
|
|
52512
54096
|
init_Meter();
|
|
52513
54097
|
init_MiniMap();
|
|
54098
|
+
init_MinigolfBoard();
|
|
52514
54099
|
init_Modal();
|
|
52515
54100
|
init_ModalSlot();
|
|
52516
54101
|
init_ModuleCard();
|
|
@@ -52523,6 +54108,8 @@ var init_component_registry_generated = __esm({
|
|
|
52523
54108
|
init_PageHeader();
|
|
52524
54109
|
init_Pagination();
|
|
52525
54110
|
init_PatternTile();
|
|
54111
|
+
init_PinballBoard();
|
|
54112
|
+
init_PirateBoard();
|
|
52526
54113
|
init_PlatformerBoard();
|
|
52527
54114
|
init_PlatformerCanvas();
|
|
52528
54115
|
init_PlatformerTemplate();
|
|
@@ -52540,6 +54127,7 @@ var init_component_registry_generated = __esm({
|
|
|
52540
54127
|
init_QrScanner();
|
|
52541
54128
|
init_QuestTracker();
|
|
52542
54129
|
init_QuizBlock();
|
|
54130
|
+
init_RacingBoard();
|
|
52543
54131
|
init_Radio();
|
|
52544
54132
|
init_RangeSlider();
|
|
52545
54133
|
init_ReflectionBlock();
|
|
@@ -52573,12 +54161,16 @@ var init_component_registry_generated = __esm({
|
|
|
52573
54161
|
init_SimulatorBoard();
|
|
52574
54162
|
init_Skeleton();
|
|
52575
54163
|
init_SocialProof();
|
|
54164
|
+
init_SokobanBoard();
|
|
52576
54165
|
init_SortableList();
|
|
54166
|
+
init_SpaceShmupBoard();
|
|
54167
|
+
init_SpaceStationBoard();
|
|
52577
54168
|
init_Sparkline();
|
|
52578
54169
|
init_Spinner();
|
|
52579
54170
|
init_Split();
|
|
52580
54171
|
init_SplitPane();
|
|
52581
54172
|
init_SplitSection();
|
|
54173
|
+
init_SportsBoard();
|
|
52582
54174
|
init_Sprite();
|
|
52583
54175
|
init_StarRating();
|
|
52584
54176
|
init_StatBadge();
|
|
@@ -52593,6 +54185,7 @@ var init_component_registry_generated = __esm({
|
|
|
52593
54185
|
init_StatusEffect();
|
|
52594
54186
|
init_StepFlow();
|
|
52595
54187
|
init_StepFlowOrganism();
|
|
54188
|
+
init_SubagentTracePanel();
|
|
52596
54189
|
init_SvgBranch();
|
|
52597
54190
|
init_SvgConnection();
|
|
52598
54191
|
init_SvgFlow();
|
|
@@ -52612,6 +54205,7 @@ var init_component_registry_generated = __esm({
|
|
|
52612
54205
|
init_Tabs();
|
|
52613
54206
|
init_TagCloud();
|
|
52614
54207
|
init_TagInput();
|
|
54208
|
+
init_TanksBoard();
|
|
52615
54209
|
init_TeamCard();
|
|
52616
54210
|
init_TeamOrganism();
|
|
52617
54211
|
init_TextHighlight();
|
|
@@ -52650,7 +54244,7 @@ var init_component_registry_generated = __esm({
|
|
|
52650
54244
|
init_WorldMapBoard();
|
|
52651
54245
|
init_WorldMapTemplate();
|
|
52652
54246
|
init_XPBar();
|
|
52653
|
-
ThreeBoundary = class extends
|
|
54247
|
+
ThreeBoundary = class extends React86__default.Component {
|
|
52654
54248
|
constructor() {
|
|
52655
54249
|
super(...arguments);
|
|
52656
54250
|
__publicField(this, "state", { failed: false });
|
|
@@ -52660,7 +54254,7 @@ var init_component_registry_generated = __esm({
|
|
|
52660
54254
|
}
|
|
52661
54255
|
render() {
|
|
52662
54256
|
if (this.state.failed) {
|
|
52663
|
-
return
|
|
54257
|
+
return React86__default.createElement(
|
|
52664
54258
|
"div",
|
|
52665
54259
|
{
|
|
52666
54260
|
"data-testid": "three-unavailable",
|
|
@@ -52699,6 +54293,7 @@ var init_component_registry_generated = __esm({
|
|
|
52699
54293
|
"BattleTemplate": BattleTemplate,
|
|
52700
54294
|
"BehaviorView": BehaviorView,
|
|
52701
54295
|
"BloomQuizBlock": BloomQuizBlock,
|
|
54296
|
+
"BoardgameBoard": BoardgameBoard,
|
|
52702
54297
|
"BookChapterView": BookChapterView,
|
|
52703
54298
|
"BookCoverPage": BookCoverPage,
|
|
52704
54299
|
"BookNavBar": BookNavBar,
|
|
@@ -52728,6 +54323,7 @@ var init_component_registry_generated = __esm({
|
|
|
52728
54323
|
"Center": Center,
|
|
52729
54324
|
"Chart": Chart,
|
|
52730
54325
|
"ChartLegend": ChartLegend,
|
|
54326
|
+
"ChatBar": ChatBar,
|
|
52731
54327
|
"Checkbox": Checkbox,
|
|
52732
54328
|
"ChoiceButton": ChoiceButton,
|
|
52733
54329
|
"CityBuilderBoard": CityBuilderBoard,
|
|
@@ -52788,6 +54384,7 @@ var init_component_registry_generated = __esm({
|
|
|
52788
54384
|
"FileTree": FileTree,
|
|
52789
54385
|
"FilterGroup": FilterGroup,
|
|
52790
54386
|
"FilterPill": FilterPill,
|
|
54387
|
+
"FishingBoard": FishingBoard,
|
|
52791
54388
|
"Flex": Flex,
|
|
52792
54389
|
"FlipCard": FlipCard,
|
|
52793
54390
|
"FlipContainer": FlipContainer,
|
|
@@ -52821,6 +54418,7 @@ var init_component_registry_generated = __esm({
|
|
|
52821
54418
|
"HeroOrganism": HeroOrganism,
|
|
52822
54419
|
"HeroSection": HeroSection,
|
|
52823
54420
|
"HexStrategyBoard": HexStrategyBoard,
|
|
54421
|
+
"HolidayRunnerBoard": HolidayRunnerBoard,
|
|
52824
54422
|
"Icon": Icon,
|
|
52825
54423
|
"InfiniteScrollSentinel": InfiniteScrollSentinel,
|
|
52826
54424
|
"Input": Input,
|
|
@@ -52845,11 +54443,13 @@ var init_component_registry_generated = __esm({
|
|
|
52845
54443
|
"MarketingFooter": MarketingFooter,
|
|
52846
54444
|
"MasterDetail": MasterDetail,
|
|
52847
54445
|
"MasterDetailLayout": MasterDetailLayout,
|
|
54446
|
+
"MatchPuzzleBoard": MatchPuzzleBoard,
|
|
52848
54447
|
"MatrixQuestion": MatrixQuestion,
|
|
52849
54448
|
"MediaGallery": MediaGallery,
|
|
52850
54449
|
"Menu": Menu,
|
|
52851
54450
|
"Meter": Meter,
|
|
52852
54451
|
"MiniMap": MiniMap,
|
|
54452
|
+
"MinigolfBoard": MinigolfBoard,
|
|
52853
54453
|
"Modal": Modal,
|
|
52854
54454
|
"ModalSlot": ModalSlot,
|
|
52855
54455
|
"ModuleCard": ModuleCard,
|
|
@@ -52862,6 +54462,8 @@ var init_component_registry_generated = __esm({
|
|
|
52862
54462
|
"PageHeader": PageHeader,
|
|
52863
54463
|
"Pagination": Pagination,
|
|
52864
54464
|
"PatternTile": PatternTile,
|
|
54465
|
+
"PinballBoard": PinballBoard,
|
|
54466
|
+
"PirateBoard": PirateBoard,
|
|
52865
54467
|
"PlatformerBoard": PlatformerBoard,
|
|
52866
54468
|
"PlatformerCanvas": PlatformerCanvas,
|
|
52867
54469
|
"PlatformerTemplate": PlatformerTemplate,
|
|
@@ -52879,6 +54481,7 @@ var init_component_registry_generated = __esm({
|
|
|
52879
54481
|
"QrScanner": QrScanner,
|
|
52880
54482
|
"QuestTracker": QuestTracker,
|
|
52881
54483
|
"QuizBlock": QuizBlock,
|
|
54484
|
+
"RacingBoard": RacingBoard,
|
|
52882
54485
|
"Radio": Radio,
|
|
52883
54486
|
"RangeSlider": RangeSlider,
|
|
52884
54487
|
"ReflectionBlock": ReflectionBlock,
|
|
@@ -52912,7 +54515,10 @@ var init_component_registry_generated = __esm({
|
|
|
52912
54515
|
"SimulatorBoard": SimulatorBoard,
|
|
52913
54516
|
"Skeleton": Skeleton,
|
|
52914
54517
|
"SocialProof": SocialProof,
|
|
54518
|
+
"SokobanBoard": SokobanBoard,
|
|
52915
54519
|
"SortableList": SortableList,
|
|
54520
|
+
"SpaceShmupBoard": SpaceShmupBoard,
|
|
54521
|
+
"SpaceStationBoard": SpaceStationBoard,
|
|
52916
54522
|
"Spacer": SpacerPattern,
|
|
52917
54523
|
"SpacerPattern": SpacerPattern,
|
|
52918
54524
|
"Sparkline": Sparkline,
|
|
@@ -52920,6 +54526,7 @@ var init_component_registry_generated = __esm({
|
|
|
52920
54526
|
"Split": Split,
|
|
52921
54527
|
"SplitPane": SplitPane,
|
|
52922
54528
|
"SplitSection": SplitSection,
|
|
54529
|
+
"SportsBoard": SportsBoard,
|
|
52923
54530
|
"Sprite": Sprite,
|
|
52924
54531
|
"Stack": Stack,
|
|
52925
54532
|
"StarRating": StarRating,
|
|
@@ -52935,6 +54542,7 @@ var init_component_registry_generated = __esm({
|
|
|
52935
54542
|
"StatusEffect": StatusEffect,
|
|
52936
54543
|
"StepFlow": StepFlow,
|
|
52937
54544
|
"StepFlowOrganism": StepFlowOrganism,
|
|
54545
|
+
"SubagentTracePanel": SubagentTracePanel,
|
|
52938
54546
|
"SvgBranch": SvgBranch,
|
|
52939
54547
|
"SvgConnection": SvgConnection,
|
|
52940
54548
|
"SvgFlow": SvgFlow,
|
|
@@ -52954,6 +54562,7 @@ var init_component_registry_generated = __esm({
|
|
|
52954
54562
|
"Tabs": Tabs,
|
|
52955
54563
|
"TagCloud": TagCloud,
|
|
52956
54564
|
"TagInput": TagInput,
|
|
54565
|
+
"TanksBoard": TanksBoard,
|
|
52957
54566
|
"TeamCard": TeamCard,
|
|
52958
54567
|
"TeamOrganism": TeamOrganism,
|
|
52959
54568
|
"TextHighlight": TextHighlight,
|
|
@@ -53011,7 +54620,7 @@ function SuspenseConfigProvider({
|
|
|
53011
54620
|
config,
|
|
53012
54621
|
children
|
|
53013
54622
|
}) {
|
|
53014
|
-
return
|
|
54623
|
+
return React86__default.createElement(
|
|
53015
54624
|
SuspenseConfigContext.Provider,
|
|
53016
54625
|
{ value: config },
|
|
53017
54626
|
children
|
|
@@ -53501,7 +55110,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
53501
55110
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
53502
55111
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
53503
55112
|
}
|
|
53504
|
-
return /* @__PURE__ */ jsx(
|
|
55113
|
+
return /* @__PURE__ */ jsx(React86__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
53505
55114
|
}
|
|
53506
55115
|
if (!child || typeof child !== "object") return null;
|
|
53507
55116
|
const childId = `${parentId}-${index}`;
|
|
@@ -53541,14 +55150,14 @@ function isPatternConfig(value) {
|
|
|
53541
55150
|
if (value === null || value === void 0) return false;
|
|
53542
55151
|
if (typeof value !== "object") return false;
|
|
53543
55152
|
if (Array.isArray(value)) return false;
|
|
53544
|
-
if (
|
|
55153
|
+
if (React86__default.isValidElement(value)) return false;
|
|
53545
55154
|
if (value instanceof Date) return false;
|
|
53546
55155
|
if (typeof value === "function") return false;
|
|
53547
55156
|
const record = value;
|
|
53548
55157
|
return "type" in record && typeof record.type === "string" && getComponentForPattern(record.type) !== null;
|
|
53549
55158
|
}
|
|
53550
55159
|
function isPlainConfigObject(value) {
|
|
53551
|
-
if (
|
|
55160
|
+
if (React86__default.isValidElement(value)) return false;
|
|
53552
55161
|
if (value instanceof Date) return false;
|
|
53553
55162
|
const proto = Object.getPrototypeOf(value);
|
|
53554
55163
|
return proto === Object.prototype || proto === null;
|
|
@@ -53674,7 +55283,7 @@ function SlotContentRenderer({
|
|
|
53674
55283
|
for (const slotKey of CONTENT_NODE_SLOTS) {
|
|
53675
55284
|
const slotVal = restProps[slotKey];
|
|
53676
55285
|
if (slotVal === void 0 || slotVal === null) continue;
|
|
53677
|
-
if (
|
|
55286
|
+
if (React86__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
|
|
53678
55287
|
if (Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
|
|
53679
55288
|
nodeSlotOverrides[slotKey] = renderPatternChildren(
|
|
53680
55289
|
slotVal,
|