@almadar/ui 5.67.0 → 5.68.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avl/index.cjs +3108 -1525
- package/dist/avl/index.js +1838 -255
- package/dist/components/game/molecules/IsometricCanvas.d.ts +1 -1
- package/dist/components/game/organisms/BoardgameBoard.d.ts +37 -0
- package/dist/components/game/organisms/FishingBoard.d.ts +33 -0
- package/dist/components/game/organisms/HolidayRunnerBoard.d.ts +35 -0
- package/dist/components/game/organisms/MatchPuzzleBoard.d.ts +37 -0
- package/dist/components/game/organisms/MinigolfBoard.d.ts +37 -0
- package/dist/components/game/organisms/PinballBoard.d.ts +35 -0
- package/dist/components/game/organisms/PirateBoard.d.ts +37 -0
- package/dist/components/game/organisms/RacingBoard.d.ts +29 -0
- package/dist/components/game/organisms/SokobanBoard.d.ts +37 -0
- package/dist/components/game/organisms/SpaceShmupBoard.d.ts +20 -0
- package/dist/components/game/organisms/SpaceStationBoard.d.ts +37 -0
- package/dist/components/game/organisms/SportsBoard.d.ts +37 -0
- package/dist/components/game/organisms/TanksBoard.d.ts +37 -0
- package/dist/components/game/organisms/index.d.ts +13 -0
- package/dist/components/game/organisms/utils/isometric.d.ts +10 -1
- package/dist/components/index.cjs +7328 -6733
- package/dist/components/index.js +6309 -5725
- package/dist/providers/index.cjs +2917 -1334
- package/dist/providers/index.js +1814 -231
- package/dist/runtime/index.cjs +2973 -1390
- package/dist/runtime/index.js +1818 -235
- package/package.json +1 -1
package/dist/runtime/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React85 from 'react';
|
|
2
|
+
import React85__default, { createContext, useMemo, useContext, useRef, useEffect, useCallback, Suspense, useState, useSyncExternalStore, useLayoutEffect, lazy, useId, forwardRef, useImperativeHandle, Component } from 'react';
|
|
3
3
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
@@ -445,7 +445,7 @@ var init_Box = __esm({
|
|
|
445
445
|
fixed: "fixed",
|
|
446
446
|
sticky: "sticky"
|
|
447
447
|
};
|
|
448
|
-
Box =
|
|
448
|
+
Box = React85__default.forwardRef(
|
|
449
449
|
({
|
|
450
450
|
padding,
|
|
451
451
|
paddingX,
|
|
@@ -510,7 +510,7 @@ var init_Box = __esm({
|
|
|
510
510
|
onPointerDown?.(e);
|
|
511
511
|
}, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
|
|
512
512
|
const isClickable = action || onClick;
|
|
513
|
-
return
|
|
513
|
+
return React85__default.createElement(
|
|
514
514
|
Component2,
|
|
515
515
|
{
|
|
516
516
|
ref,
|
|
@@ -606,7 +606,7 @@ function loadLib(key, importer) {
|
|
|
606
606
|
return p2;
|
|
607
607
|
}
|
|
608
608
|
function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
|
|
609
|
-
const Lazy =
|
|
609
|
+
const Lazy = React85__default.lazy(async () => {
|
|
610
610
|
const lib = await loadLib(libKey, importer);
|
|
611
611
|
const Comp = pick(lib);
|
|
612
612
|
if (!Comp) {
|
|
@@ -616,7 +616,7 @@ function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
|
|
|
616
616
|
return { default: Comp };
|
|
617
617
|
});
|
|
618
618
|
const Wrapped = (props) => /* @__PURE__ */ jsx(
|
|
619
|
-
|
|
619
|
+
React85__default.Suspense,
|
|
620
620
|
{
|
|
621
621
|
fallback: /* @__PURE__ */ jsx(
|
|
622
622
|
"span",
|
|
@@ -1342,7 +1342,7 @@ var init_Icon = __esm({
|
|
|
1342
1342
|
const directIcon = typeof icon === "string" ? void 0 : icon;
|
|
1343
1343
|
const effectiveName = typeof icon === "string" ? icon : name;
|
|
1344
1344
|
const family = useIconFamily();
|
|
1345
|
-
const RenderedComponent =
|
|
1345
|
+
const RenderedComponent = React85__default.useMemo(() => {
|
|
1346
1346
|
if (directIcon) return null;
|
|
1347
1347
|
return effectiveName ? resolveIconForFamily(effectiveName, family) : null;
|
|
1348
1348
|
}, [directIcon, effectiveName, family]);
|
|
@@ -1401,7 +1401,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
1401
1401
|
const IconComp = value;
|
|
1402
1402
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
1403
1403
|
}
|
|
1404
|
-
if (
|
|
1404
|
+
if (React85__default.isValidElement(value)) {
|
|
1405
1405
|
return value;
|
|
1406
1406
|
}
|
|
1407
1407
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -1477,7 +1477,7 @@ var init_Button = __esm({
|
|
|
1477
1477
|
md: "h-icon-default w-icon-default",
|
|
1478
1478
|
lg: "h-icon-default w-icon-default"
|
|
1479
1479
|
};
|
|
1480
|
-
Button =
|
|
1480
|
+
Button = React85__default.forwardRef(
|
|
1481
1481
|
({
|
|
1482
1482
|
className,
|
|
1483
1483
|
variant = "primary",
|
|
@@ -1542,7 +1542,7 @@ var Dialog;
|
|
|
1542
1542
|
var init_Dialog = __esm({
|
|
1543
1543
|
"components/core/atoms/Dialog.tsx"() {
|
|
1544
1544
|
init_cn();
|
|
1545
|
-
Dialog =
|
|
1545
|
+
Dialog = React85__default.forwardRef(
|
|
1546
1546
|
({
|
|
1547
1547
|
role = "dialog",
|
|
1548
1548
|
"aria-modal": ariaModal = true,
|
|
@@ -2156,7 +2156,7 @@ var init_Badge = __esm({
|
|
|
2156
2156
|
md: "px-2.5 py-1 text-sm",
|
|
2157
2157
|
lg: "px-3 py-1.5 text-base"
|
|
2158
2158
|
};
|
|
2159
|
-
Badge =
|
|
2159
|
+
Badge = React85__default.forwardRef(
|
|
2160
2160
|
({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
|
|
2161
2161
|
const iconSizes3 = {
|
|
2162
2162
|
sm: "h-icon-default w-icon-default",
|
|
@@ -2492,7 +2492,7 @@ var init_SvgFlow = __esm({
|
|
|
2492
2492
|
width = 100,
|
|
2493
2493
|
height = 100
|
|
2494
2494
|
}) => {
|
|
2495
|
-
const markerId =
|
|
2495
|
+
const markerId = React85__default.useMemo(() => {
|
|
2496
2496
|
flowIdCounter += 1;
|
|
2497
2497
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
2498
2498
|
}, []);
|
|
@@ -3085,7 +3085,7 @@ var init_SvgRing = __esm({
|
|
|
3085
3085
|
width = 100,
|
|
3086
3086
|
height = 100
|
|
3087
3087
|
}) => {
|
|
3088
|
-
const gradientId =
|
|
3088
|
+
const gradientId = React85__default.useMemo(() => {
|
|
3089
3089
|
ringIdCounter += 1;
|
|
3090
3090
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
3091
3091
|
}, []);
|
|
@@ -3266,7 +3266,7 @@ var init_Input = __esm({
|
|
|
3266
3266
|
init_cn();
|
|
3267
3267
|
init_Icon();
|
|
3268
3268
|
init_useEventBus();
|
|
3269
|
-
Input =
|
|
3269
|
+
Input = React85__default.forwardRef(
|
|
3270
3270
|
({
|
|
3271
3271
|
className,
|
|
3272
3272
|
inputType,
|
|
@@ -3426,7 +3426,7 @@ var Label;
|
|
|
3426
3426
|
var init_Label = __esm({
|
|
3427
3427
|
"components/core/atoms/Label.tsx"() {
|
|
3428
3428
|
init_cn();
|
|
3429
|
-
Label =
|
|
3429
|
+
Label = React85__default.forwardRef(
|
|
3430
3430
|
({ className, required, children, ...props }, ref) => {
|
|
3431
3431
|
return /* @__PURE__ */ jsxs(
|
|
3432
3432
|
"label",
|
|
@@ -3453,7 +3453,7 @@ var init_Textarea = __esm({
|
|
|
3453
3453
|
"components/core/atoms/Textarea.tsx"() {
|
|
3454
3454
|
init_cn();
|
|
3455
3455
|
init_useEventBus();
|
|
3456
|
-
Textarea =
|
|
3456
|
+
Textarea = React85__default.forwardRef(
|
|
3457
3457
|
({ className, error, onChange, ...props }, ref) => {
|
|
3458
3458
|
const eventBus = useEventBus();
|
|
3459
3459
|
const handleChange = (e) => {
|
|
@@ -3692,7 +3692,7 @@ var init_Select = __esm({
|
|
|
3692
3692
|
init_cn();
|
|
3693
3693
|
init_Icon();
|
|
3694
3694
|
init_useEventBus();
|
|
3695
|
-
Select =
|
|
3695
|
+
Select = React85__default.forwardRef(
|
|
3696
3696
|
(props, _ref) => {
|
|
3697
3697
|
const { multiple, searchable, clearable } = props;
|
|
3698
3698
|
if (multiple || searchable || clearable) {
|
|
@@ -3709,7 +3709,7 @@ var init_Checkbox = __esm({
|
|
|
3709
3709
|
"components/core/atoms/Checkbox.tsx"() {
|
|
3710
3710
|
init_cn();
|
|
3711
3711
|
init_useEventBus();
|
|
3712
|
-
Checkbox =
|
|
3712
|
+
Checkbox = React85__default.forwardRef(
|
|
3713
3713
|
({ className, label, id, onChange, ...props }, ref) => {
|
|
3714
3714
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
3715
3715
|
const eventBus = useEventBus();
|
|
@@ -3763,7 +3763,7 @@ var init_Spinner = __esm({
|
|
|
3763
3763
|
md: "h-6 w-6",
|
|
3764
3764
|
lg: "h-8 w-8"
|
|
3765
3765
|
};
|
|
3766
|
-
Spinner =
|
|
3766
|
+
Spinner = React85__default.forwardRef(
|
|
3767
3767
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
3768
3768
|
if (overlay) {
|
|
3769
3769
|
return /* @__PURE__ */ jsx(
|
|
@@ -3853,7 +3853,7 @@ var init_Card = __esm({
|
|
|
3853
3853
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
3854
3854
|
"tile-image-first": "p-0 overflow-hidden"
|
|
3855
3855
|
};
|
|
3856
|
-
Card =
|
|
3856
|
+
Card = React85__default.forwardRef(
|
|
3857
3857
|
({
|
|
3858
3858
|
className,
|
|
3859
3859
|
variant = "bordered",
|
|
@@ -3901,9 +3901,9 @@ var init_Card = __esm({
|
|
|
3901
3901
|
}
|
|
3902
3902
|
);
|
|
3903
3903
|
Card.displayName = "Card";
|
|
3904
|
-
CardHeader =
|
|
3904
|
+
CardHeader = React85__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
3905
3905
|
CardHeader.displayName = "CardHeader";
|
|
3906
|
-
CardTitle =
|
|
3906
|
+
CardTitle = React85__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3907
3907
|
"h3",
|
|
3908
3908
|
{
|
|
3909
3909
|
ref,
|
|
@@ -3916,11 +3916,11 @@ var init_Card = __esm({
|
|
|
3916
3916
|
}
|
|
3917
3917
|
));
|
|
3918
3918
|
CardTitle.displayName = "CardTitle";
|
|
3919
|
-
CardContent =
|
|
3919
|
+
CardContent = React85__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
3920
3920
|
CardContent.displayName = "CardContent";
|
|
3921
3921
|
CardBody = CardContent;
|
|
3922
3922
|
CardBody.displayName = "CardBody";
|
|
3923
|
-
CardFooter =
|
|
3923
|
+
CardFooter = React85__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3924
3924
|
"div",
|
|
3925
3925
|
{
|
|
3926
3926
|
ref,
|
|
@@ -3975,7 +3975,7 @@ var init_FilterPill = __esm({
|
|
|
3975
3975
|
md: "w-3.5 h-3.5",
|
|
3976
3976
|
lg: "w-4 h-4"
|
|
3977
3977
|
};
|
|
3978
|
-
FilterPill =
|
|
3978
|
+
FilterPill = React85__default.forwardRef(
|
|
3979
3979
|
({
|
|
3980
3980
|
className,
|
|
3981
3981
|
variant = "default",
|
|
@@ -4104,8 +4104,8 @@ var init_Avatar = __esm({
|
|
|
4104
4104
|
actionPayload
|
|
4105
4105
|
}) => {
|
|
4106
4106
|
const eventBus = useEventBus();
|
|
4107
|
-
const [imgFailed, setImgFailed] =
|
|
4108
|
-
|
|
4107
|
+
const [imgFailed, setImgFailed] = React85__default.useState(false);
|
|
4108
|
+
React85__default.useEffect(() => {
|
|
4109
4109
|
setImgFailed(false);
|
|
4110
4110
|
}, [src]);
|
|
4111
4111
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -4490,7 +4490,7 @@ var init_Radio = __esm({
|
|
|
4490
4490
|
md: "w-2.5 h-2.5",
|
|
4491
4491
|
lg: "w-3 h-3"
|
|
4492
4492
|
};
|
|
4493
|
-
Radio =
|
|
4493
|
+
Radio = React85__default.forwardRef(
|
|
4494
4494
|
({
|
|
4495
4495
|
label,
|
|
4496
4496
|
helperText,
|
|
@@ -4507,12 +4507,12 @@ var init_Radio = __esm({
|
|
|
4507
4507
|
onChange,
|
|
4508
4508
|
...props
|
|
4509
4509
|
}, ref) => {
|
|
4510
|
-
const reactId =
|
|
4510
|
+
const reactId = React85__default.useId();
|
|
4511
4511
|
const baseId = id || `radio-${reactId}`;
|
|
4512
4512
|
const hasError = !!error;
|
|
4513
4513
|
const eventBus = useEventBus();
|
|
4514
|
-
const [selected, setSelected] =
|
|
4515
|
-
|
|
4514
|
+
const [selected, setSelected] = React85__default.useState(value);
|
|
4515
|
+
React85__default.useEffect(() => {
|
|
4516
4516
|
if (value !== void 0) setSelected(value);
|
|
4517
4517
|
}, [value]);
|
|
4518
4518
|
const pick = (next, e) => {
|
|
@@ -4694,7 +4694,7 @@ var init_Switch = __esm({
|
|
|
4694
4694
|
"components/core/atoms/Switch.tsx"() {
|
|
4695
4695
|
"use client";
|
|
4696
4696
|
init_cn();
|
|
4697
|
-
Switch =
|
|
4697
|
+
Switch = React85.forwardRef(
|
|
4698
4698
|
({
|
|
4699
4699
|
checked,
|
|
4700
4700
|
defaultChecked = false,
|
|
@@ -4705,10 +4705,10 @@ var init_Switch = __esm({
|
|
|
4705
4705
|
name,
|
|
4706
4706
|
className
|
|
4707
4707
|
}, ref) => {
|
|
4708
|
-
const [isChecked, setIsChecked] =
|
|
4708
|
+
const [isChecked, setIsChecked] = React85.useState(
|
|
4709
4709
|
checked !== void 0 ? checked : defaultChecked
|
|
4710
4710
|
);
|
|
4711
|
-
|
|
4711
|
+
React85.useEffect(() => {
|
|
4712
4712
|
if (checked !== void 0) {
|
|
4713
4713
|
setIsChecked(checked);
|
|
4714
4714
|
}
|
|
@@ -5068,7 +5068,7 @@ var Aside;
|
|
|
5068
5068
|
var init_Aside = __esm({
|
|
5069
5069
|
"components/core/atoms/Aside.tsx"() {
|
|
5070
5070
|
init_cn();
|
|
5071
|
-
Aside =
|
|
5071
|
+
Aside = React85__default.forwardRef(
|
|
5072
5072
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
5073
5073
|
);
|
|
5074
5074
|
Aside.displayName = "Aside";
|
|
@@ -5147,9 +5147,9 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5147
5147
|
className
|
|
5148
5148
|
}) => {
|
|
5149
5149
|
const { t } = useTranslate();
|
|
5150
|
-
const [isVisible, setIsVisible] =
|
|
5151
|
-
const timeoutRef =
|
|
5152
|
-
const triggerRef =
|
|
5150
|
+
const [isVisible, setIsVisible] = React85__default.useState(false);
|
|
5151
|
+
const timeoutRef = React85__default.useRef(null);
|
|
5152
|
+
const triggerRef = React85__default.useRef(null);
|
|
5153
5153
|
const handleMouseEnter = () => {
|
|
5154
5154
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5155
5155
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -5160,7 +5160,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5160
5160
|
};
|
|
5161
5161
|
const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
|
|
5162
5162
|
const open = isVisible || revealed;
|
|
5163
|
-
|
|
5163
|
+
React85__default.useEffect(() => {
|
|
5164
5164
|
return () => {
|
|
5165
5165
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
5166
5166
|
};
|
|
@@ -5372,7 +5372,7 @@ var init_StatusDot = __esm({
|
|
|
5372
5372
|
md: "w-2.5 h-2.5",
|
|
5373
5373
|
lg: "w-3 h-3"
|
|
5374
5374
|
};
|
|
5375
|
-
StatusDot =
|
|
5375
|
+
StatusDot = React85__default.forwardRef(
|
|
5376
5376
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
5377
5377
|
return /* @__PURE__ */ jsx(
|
|
5378
5378
|
"span",
|
|
@@ -5426,7 +5426,7 @@ var init_TrendIndicator = __esm({
|
|
|
5426
5426
|
down: "trending-down",
|
|
5427
5427
|
flat: "arrow-right"
|
|
5428
5428
|
};
|
|
5429
|
-
TrendIndicator =
|
|
5429
|
+
TrendIndicator = React85__default.forwardRef(
|
|
5430
5430
|
({
|
|
5431
5431
|
className,
|
|
5432
5432
|
value,
|
|
@@ -5493,7 +5493,7 @@ var init_RangeSlider = __esm({
|
|
|
5493
5493
|
md: "w-4 h-4",
|
|
5494
5494
|
lg: "w-5 h-5"
|
|
5495
5495
|
};
|
|
5496
|
-
RangeSlider =
|
|
5496
|
+
RangeSlider = React85__default.forwardRef(
|
|
5497
5497
|
({
|
|
5498
5498
|
className,
|
|
5499
5499
|
min = 0,
|
|
@@ -6001,7 +6001,7 @@ var init_ContentSection = __esm({
|
|
|
6001
6001
|
md: "py-16",
|
|
6002
6002
|
lg: "py-24"
|
|
6003
6003
|
};
|
|
6004
|
-
ContentSection =
|
|
6004
|
+
ContentSection = React85__default.forwardRef(
|
|
6005
6005
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
6006
6006
|
return /* @__PURE__ */ jsx(
|
|
6007
6007
|
Box,
|
|
@@ -6535,7 +6535,7 @@ var init_AnimatedReveal = __esm({
|
|
|
6535
6535
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
6536
6536
|
"none": {}
|
|
6537
6537
|
};
|
|
6538
|
-
AnimatedReveal =
|
|
6538
|
+
AnimatedReveal = React85__default.forwardRef(
|
|
6539
6539
|
({
|
|
6540
6540
|
trigger = "scroll",
|
|
6541
6541
|
animation = "fade-up",
|
|
@@ -6695,7 +6695,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6695
6695
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
6696
6696
|
"use client";
|
|
6697
6697
|
init_cn();
|
|
6698
|
-
AnimatedGraphic =
|
|
6698
|
+
AnimatedGraphic = React85__default.forwardRef(
|
|
6699
6699
|
({
|
|
6700
6700
|
src,
|
|
6701
6701
|
svgContent,
|
|
@@ -6718,7 +6718,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6718
6718
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
6719
6719
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
6720
6720
|
const prevAnimateRef = useRef(animate);
|
|
6721
|
-
const setRef =
|
|
6721
|
+
const setRef = React85__default.useCallback(
|
|
6722
6722
|
(node) => {
|
|
6723
6723
|
containerRef.current = node;
|
|
6724
6724
|
if (typeof ref === "function") ref(node);
|
|
@@ -6944,9 +6944,9 @@ function ScoreDisplay({
|
|
|
6944
6944
|
...rest
|
|
6945
6945
|
}) {
|
|
6946
6946
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
|
|
6947
|
-
const [displayValue, setDisplayValue] =
|
|
6948
|
-
const [isAnimating, setIsAnimating] =
|
|
6949
|
-
|
|
6947
|
+
const [displayValue, setDisplayValue] = React85.useState(resolvedValue);
|
|
6948
|
+
const [isAnimating, setIsAnimating] = React85.useState(false);
|
|
6949
|
+
React85.useEffect(() => {
|
|
6950
6950
|
if (!animated || displayValue === resolvedValue) {
|
|
6951
6951
|
setDisplayValue(resolvedValue);
|
|
6952
6952
|
return;
|
|
@@ -7029,9 +7029,9 @@ function ControlButton({
|
|
|
7029
7029
|
className
|
|
7030
7030
|
}) {
|
|
7031
7031
|
const eventBus = useEventBus();
|
|
7032
|
-
const [isPressed, setIsPressed] =
|
|
7032
|
+
const [isPressed, setIsPressed] = React85.useState(false);
|
|
7033
7033
|
const actualPressed = pressed ?? isPressed;
|
|
7034
|
-
const handlePointerDown =
|
|
7034
|
+
const handlePointerDown = React85.useCallback(
|
|
7035
7035
|
(e) => {
|
|
7036
7036
|
e.preventDefault();
|
|
7037
7037
|
if (disabled) return;
|
|
@@ -7041,7 +7041,7 @@ function ControlButton({
|
|
|
7041
7041
|
},
|
|
7042
7042
|
[disabled, pressEvent, eventBus, onPress]
|
|
7043
7043
|
);
|
|
7044
|
-
const handlePointerUp =
|
|
7044
|
+
const handlePointerUp = React85.useCallback(
|
|
7045
7045
|
(e) => {
|
|
7046
7046
|
e.preventDefault();
|
|
7047
7047
|
if (disabled) return;
|
|
@@ -7051,7 +7051,7 @@ function ControlButton({
|
|
|
7051
7051
|
},
|
|
7052
7052
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
7053
7053
|
);
|
|
7054
|
-
const handlePointerLeave =
|
|
7054
|
+
const handlePointerLeave = React85.useCallback(
|
|
7055
7055
|
(e) => {
|
|
7056
7056
|
if (isPressed) {
|
|
7057
7057
|
setIsPressed(false);
|
|
@@ -7672,8 +7672,8 @@ function XPBar({
|
|
|
7672
7672
|
}) {
|
|
7673
7673
|
const sizes = sizeMap9[size];
|
|
7674
7674
|
const percentage = max > 0 ? Math.max(0, Math.min(100, current / max * 100)) : 0;
|
|
7675
|
-
const [fillWidth, setFillWidth] =
|
|
7676
|
-
|
|
7675
|
+
const [fillWidth, setFillWidth] = React85.useState(animated ? 0 : percentage);
|
|
7676
|
+
React85.useEffect(() => {
|
|
7677
7677
|
if (!animated) {
|
|
7678
7678
|
setFillWidth(percentage);
|
|
7679
7679
|
return;
|
|
@@ -8181,9 +8181,9 @@ function MiniMap({
|
|
|
8181
8181
|
viewportRect = DEFAULT_VIEWPORT,
|
|
8182
8182
|
className
|
|
8183
8183
|
}) {
|
|
8184
|
-
const canvasRef =
|
|
8185
|
-
const frameRef =
|
|
8186
|
-
|
|
8184
|
+
const canvasRef = React85.useRef(null);
|
|
8185
|
+
const frameRef = React85.useRef(0);
|
|
8186
|
+
React85.useEffect(() => {
|
|
8187
8187
|
const canvas = canvasRef.current;
|
|
8188
8188
|
if (!canvas) return;
|
|
8189
8189
|
const ctx = canvas.getContext("2d");
|
|
@@ -8372,7 +8372,7 @@ var init_ErrorBoundary = __esm({
|
|
|
8372
8372
|
}
|
|
8373
8373
|
);
|
|
8374
8374
|
};
|
|
8375
|
-
ErrorBoundary = class extends
|
|
8375
|
+
ErrorBoundary = class extends React85__default.Component {
|
|
8376
8376
|
constructor(props) {
|
|
8377
8377
|
super(props);
|
|
8378
8378
|
__publicField(this, "reset", () => {
|
|
@@ -9407,8 +9407,8 @@ function ActionButtons({
|
|
|
9407
9407
|
disabled
|
|
9408
9408
|
}) {
|
|
9409
9409
|
const eventBus = useEventBus();
|
|
9410
|
-
const [activeButtons, setActiveButtons] =
|
|
9411
|
-
const handlePress =
|
|
9410
|
+
const [activeButtons, setActiveButtons] = React85.useState(/* @__PURE__ */ new Set());
|
|
9411
|
+
const handlePress = React85.useCallback(
|
|
9412
9412
|
(id) => {
|
|
9413
9413
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
9414
9414
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -9416,7 +9416,7 @@ function ActionButtons({
|
|
|
9416
9416
|
},
|
|
9417
9417
|
[actionEvent, eventBus, onAction]
|
|
9418
9418
|
);
|
|
9419
|
-
const handleRelease =
|
|
9419
|
+
const handleRelease = React85.useCallback(
|
|
9420
9420
|
(id) => {
|
|
9421
9421
|
setActiveButtons((prev) => {
|
|
9422
9422
|
const next = new Set(prev);
|
|
@@ -10965,6 +10965,11 @@ function isoToScreen(tileX, tileY, scale, baseOffsetX, layout = "isometric") {
|
|
|
10965
10965
|
const screenY2 = tileY * (scaledFloorHeight * 0.75);
|
|
10966
10966
|
return { x: screenX2, y: screenY2 };
|
|
10967
10967
|
}
|
|
10968
|
+
if (layout === "flat") {
|
|
10969
|
+
const screenX2 = tileX * scaledTileWidth + baseOffsetX;
|
|
10970
|
+
const screenY2 = tileY * scaledFloorHeight;
|
|
10971
|
+
return { x: screenX2, y: screenY2 };
|
|
10972
|
+
}
|
|
10968
10973
|
const screenX = (tileX - tileY) * (scaledTileWidth / 2) + baseOffsetX;
|
|
10969
10974
|
const screenY = (tileX + tileY) * (scaledFloorHeight / 2);
|
|
10970
10975
|
return { x: screenX, y: screenY };
|
|
@@ -10977,6 +10982,11 @@ function screenToIso(screenX, screenY, scale, baseOffsetX, layout = "isometric")
|
|
|
10977
10982
|
const col = Math.round((screenX - (row & 1) * (scaledTileWidth / 2) - baseOffsetX) / scaledTileWidth);
|
|
10978
10983
|
return { x: col, y: row };
|
|
10979
10984
|
}
|
|
10985
|
+
if (layout === "flat") {
|
|
10986
|
+
const col = Math.round((screenX - baseOffsetX) / scaledTileWidth);
|
|
10987
|
+
const row = Math.round(screenY / scaledFloorHeight);
|
|
10988
|
+
return { x: col, y: row };
|
|
10989
|
+
}
|
|
10980
10990
|
const adjustedX = screenX - baseOffsetX;
|
|
10981
10991
|
const tileX = (adjustedX / (scaledTileWidth / 2) + screenY / (scaledFloorHeight / 2)) / 2;
|
|
10982
10992
|
const tileY = (screenY / (scaledFloorHeight / 2) - adjustedX / (scaledTileWidth / 2)) / 2;
|
|
@@ -11096,7 +11106,7 @@ function IsometricCanvas({
|
|
|
11096
11106
|
);
|
|
11097
11107
|
const sortedTiles = useMemo(() => {
|
|
11098
11108
|
const tiles = [...tilesProp];
|
|
11099
|
-
if (tileLayout === "hex") {
|
|
11109
|
+
if (tileLayout === "hex" || tileLayout === "flat") {
|
|
11100
11110
|
tiles.sort((a, b) => a.y !== b.y ? a.y - b.y : a.x - b.x);
|
|
11101
11111
|
} else {
|
|
11102
11112
|
tiles.sort((a, b) => {
|
|
@@ -11224,7 +11234,7 @@ function IsometricCanvas({
|
|
|
11224
11234
|
const minX = Math.min(...allScreenPos.map((p2) => p2.x));
|
|
11225
11235
|
const maxX = Math.max(...allScreenPos.map((p2) => p2.x + scaledTileWidth));
|
|
11226
11236
|
const minY = Math.min(...allScreenPos.map((p2) => p2.y));
|
|
11227
|
-
const tileBottomExtent = tileLayout === "hex" ? scaledTileWidth : scaledTileHeight;
|
|
11237
|
+
const tileBottomExtent = tileLayout === "hex" || tileLayout === "flat" ? scaledTileWidth : scaledTileHeight;
|
|
11228
11238
|
const maxY = Math.max(...allScreenPos.map((p2) => p2.y + tileBottomExtent));
|
|
11229
11239
|
const worldW = maxX - minX;
|
|
11230
11240
|
const worldH = maxY - minY;
|
|
@@ -11317,7 +11327,7 @@ function IsometricCanvas({
|
|
|
11317
11327
|
const drawW = scaledTileWidth;
|
|
11318
11328
|
const drawH = scaledTileWidth * (img.naturalHeight / img.naturalWidth);
|
|
11319
11329
|
const drawX = pos.x;
|
|
11320
|
-
const drawY = tileLayout === "hex" ? pos.y : pos.y + scaledTileHeight - drawH;
|
|
11330
|
+
const drawY = tileLayout === "hex" || tileLayout === "flat" ? pos.y : pos.y + scaledTileHeight - drawH;
|
|
11321
11331
|
ctx.drawImage(img, drawX, drawY, drawW, drawH);
|
|
11322
11332
|
}
|
|
11323
11333
|
} else {
|
|
@@ -11384,7 +11394,7 @@ function IsometricCanvas({
|
|
|
11384
11394
|
}
|
|
11385
11395
|
}
|
|
11386
11396
|
const sortedFeatures = [...features].sort((a, b) => {
|
|
11387
|
-
if (tileLayout === "hex") return a.y !== b.y ? a.y - b.y : a.x - b.x;
|
|
11397
|
+
if (tileLayout === "hex" || tileLayout === "flat") return a.y !== b.y ? a.y - b.y : a.x - b.x;
|
|
11388
11398
|
const depthA = a.x + a.y;
|
|
11389
11399
|
const depthB = b.x + b.y;
|
|
11390
11400
|
return depthA !== depthB ? depthA - depthB : a.y - b.y;
|
|
@@ -11425,7 +11435,7 @@ function IsometricCanvas({
|
|
|
11425
11435
|
}
|
|
11426
11436
|
const unitsWithPosition = units.filter((u) => !!u.position);
|
|
11427
11437
|
const sortedUnits = [...unitsWithPosition].sort((a, b) => {
|
|
11428
|
-
if (tileLayout === "hex") return a.position.y !== b.position.y ? a.position.y - b.position.y : a.position.x - b.position.x;
|
|
11438
|
+
if (tileLayout === "hex" || tileLayout === "flat") return a.position.y !== b.position.y ? a.position.y - b.position.y : a.position.x - b.position.x;
|
|
11429
11439
|
const depthA = a.position.x + a.position.y;
|
|
11430
11440
|
const depthB = b.position.x + b.position.y;
|
|
11431
11441
|
return depthA !== depthB ? depthA - depthB : a.position.y - b.position.y;
|
|
@@ -13600,7 +13610,7 @@ var init_CodeBlock = __esm({
|
|
|
13600
13610
|
};
|
|
13601
13611
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
13602
13612
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
13603
|
-
CodeBlock =
|
|
13613
|
+
CodeBlock = React85__default.memo(
|
|
13604
13614
|
({
|
|
13605
13615
|
code: rawCode,
|
|
13606
13616
|
language = "text",
|
|
@@ -14187,7 +14197,7 @@ var init_MarkdownContent = __esm({
|
|
|
14187
14197
|
init_Box();
|
|
14188
14198
|
init_CodeBlock();
|
|
14189
14199
|
init_cn();
|
|
14190
|
-
MarkdownContent =
|
|
14200
|
+
MarkdownContent = React85__default.memo(
|
|
14191
14201
|
({ content, direction = "ltr", className }) => {
|
|
14192
14202
|
const { t: _t } = useTranslate();
|
|
14193
14203
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -14477,6 +14487,48 @@ var init_BloomQuizBlock = __esm({
|
|
|
14477
14487
|
BloomQuizBlock.displayName = "BloomQuizBlock";
|
|
14478
14488
|
}
|
|
14479
14489
|
});
|
|
14490
|
+
function BoardgameBoard({
|
|
14491
|
+
tiles,
|
|
14492
|
+
units,
|
|
14493
|
+
features,
|
|
14494
|
+
assetManifest,
|
|
14495
|
+
assetBaseUrl,
|
|
14496
|
+
scale = 0.45,
|
|
14497
|
+
showMinimap = false,
|
|
14498
|
+
enableCamera = true,
|
|
14499
|
+
tileClickEvent,
|
|
14500
|
+
unitClickEvent,
|
|
14501
|
+
isLoading,
|
|
14502
|
+
error,
|
|
14503
|
+
className
|
|
14504
|
+
}) {
|
|
14505
|
+
return /* @__PURE__ */ jsx("div", { className: cn("boardgame-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
14506
|
+
IsometricCanvas_default,
|
|
14507
|
+
{
|
|
14508
|
+
tileLayout: "flat",
|
|
14509
|
+
tiles,
|
|
14510
|
+
units,
|
|
14511
|
+
features,
|
|
14512
|
+
assetManifest,
|
|
14513
|
+
assetBaseUrl,
|
|
14514
|
+
scale,
|
|
14515
|
+
showMinimap,
|
|
14516
|
+
enableCamera,
|
|
14517
|
+
tileClickEvent,
|
|
14518
|
+
unitClickEvent,
|
|
14519
|
+
isLoading,
|
|
14520
|
+
error
|
|
14521
|
+
}
|
|
14522
|
+
) });
|
|
14523
|
+
}
|
|
14524
|
+
var init_BoardgameBoard = __esm({
|
|
14525
|
+
"components/game/organisms/BoardgameBoard.tsx"() {
|
|
14526
|
+
"use client";
|
|
14527
|
+
init_cn();
|
|
14528
|
+
init_IsometricCanvas();
|
|
14529
|
+
BoardgameBoard.displayName = "BoardgameBoard";
|
|
14530
|
+
}
|
|
14531
|
+
});
|
|
14480
14532
|
var MIN_DIAGRAM_WIDTH, ScaledDiagram;
|
|
14481
14533
|
var init_ScaledDiagram = __esm({
|
|
14482
14534
|
"components/core/molecules/ScaledDiagram.tsx"() {
|
|
@@ -15514,7 +15566,7 @@ var init_StateMachineView = __esm({
|
|
|
15514
15566
|
style: { top: title ? 30 : 0 },
|
|
15515
15567
|
children: [
|
|
15516
15568
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
15517
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
15569
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React85__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
15518
15570
|
StateNode,
|
|
15519
15571
|
{
|
|
15520
15572
|
state,
|
|
@@ -19469,7 +19521,7 @@ function CardHand({
|
|
|
19469
19521
|
className
|
|
19470
19522
|
}) {
|
|
19471
19523
|
const eventBus = useEventBus();
|
|
19472
|
-
const handleClick =
|
|
19524
|
+
const handleClick = React85.useCallback(
|
|
19473
19525
|
(card) => {
|
|
19474
19526
|
if (card.disabled) return;
|
|
19475
19527
|
onCardClick?.(card.id);
|
|
@@ -21615,6 +21667,215 @@ var init_ChartLegend = __esm({
|
|
|
21615
21667
|
ChartLegend.displayName = "ChartLegend";
|
|
21616
21668
|
}
|
|
21617
21669
|
});
|
|
21670
|
+
|
|
21671
|
+
// components/core/organisms/trace-edit-focus.ts
|
|
21672
|
+
function asString(v) {
|
|
21673
|
+
return typeof v === "string" ? v : void 0;
|
|
21674
|
+
}
|
|
21675
|
+
function asLevel(v) {
|
|
21676
|
+
if (typeof v === "string" && EDIT_FOCUS_LEVELS.has(v)) {
|
|
21677
|
+
return v;
|
|
21678
|
+
}
|
|
21679
|
+
return "node";
|
|
21680
|
+
}
|
|
21681
|
+
function isEventPayload(v) {
|
|
21682
|
+
return v !== null && v !== void 0 && typeof v === "object" && !Array.isArray(v) && !(v instanceof Date);
|
|
21683
|
+
}
|
|
21684
|
+
function parseEditFocus(value) {
|
|
21685
|
+
if (!isEventPayload(value)) return null;
|
|
21686
|
+
const payload = value;
|
|
21687
|
+
const orbital = asString(payload.orbital);
|
|
21688
|
+
if (orbital === void 0 || orbital.length === 0) return null;
|
|
21689
|
+
const focus = {
|
|
21690
|
+
level: asLevel(payload.level),
|
|
21691
|
+
orbital,
|
|
21692
|
+
label: asString(payload.label) ?? orbital
|
|
21693
|
+
};
|
|
21694
|
+
const trait = asString(payload.trait);
|
|
21695
|
+
if (trait !== void 0) focus.trait = trait;
|
|
21696
|
+
const transition = asString(payload.transition);
|
|
21697
|
+
if (transition !== void 0) focus.transition = transition;
|
|
21698
|
+
const state = asString(payload.state);
|
|
21699
|
+
if (state !== void 0) focus.state = state;
|
|
21700
|
+
const slot = asString(payload.slot);
|
|
21701
|
+
if (slot !== void 0) focus.slot = slot;
|
|
21702
|
+
const path = asString(payload.path);
|
|
21703
|
+
if (path !== void 0) focus.path = path;
|
|
21704
|
+
const patternType = asString(payload.patternType);
|
|
21705
|
+
if (patternType !== void 0) focus.patternType = patternType;
|
|
21706
|
+
const entity = asString(payload.entity);
|
|
21707
|
+
if (entity !== void 0) focus.entity = entity;
|
|
21708
|
+
const source = asString(payload.source);
|
|
21709
|
+
if (source !== void 0) focus.source = source;
|
|
21710
|
+
return focus;
|
|
21711
|
+
}
|
|
21712
|
+
var ELEMENT_SELECTED_EVENT, EDIT_FOCUS_LEVELS;
|
|
21713
|
+
var init_trace_edit_focus = __esm({
|
|
21714
|
+
"components/core/organisms/trace-edit-focus.ts"() {
|
|
21715
|
+
ELEMENT_SELECTED_EVENT = "UI:ELEMENT_SELECTED";
|
|
21716
|
+
EDIT_FOCUS_LEVELS = /* @__PURE__ */ new Set([
|
|
21717
|
+
"node",
|
|
21718
|
+
"slot",
|
|
21719
|
+
"field",
|
|
21720
|
+
"effect",
|
|
21721
|
+
"trait",
|
|
21722
|
+
"page",
|
|
21723
|
+
"orbital"
|
|
21724
|
+
]);
|
|
21725
|
+
}
|
|
21726
|
+
});
|
|
21727
|
+
function getJepaBadgeVariant(probability) {
|
|
21728
|
+
if (probability >= 0.9) return "success";
|
|
21729
|
+
if (probability >= 0.5) return "warning";
|
|
21730
|
+
return "danger";
|
|
21731
|
+
}
|
|
21732
|
+
function ChatBar({
|
|
21733
|
+
status = "idle",
|
|
21734
|
+
activeGate,
|
|
21735
|
+
jepaValidity,
|
|
21736
|
+
placeholder,
|
|
21737
|
+
context,
|
|
21738
|
+
className
|
|
21739
|
+
}) {
|
|
21740
|
+
const { t } = useTranslate();
|
|
21741
|
+
const eventBus = useEventBus();
|
|
21742
|
+
const [inputValue, setInputValue] = useState("");
|
|
21743
|
+
const [focus, setFocus] = useState(null);
|
|
21744
|
+
const clearFocus = useCallback(() => {
|
|
21745
|
+
setFocus(null);
|
|
21746
|
+
eventBus.emit(ELEMENT_SELECTED_EVENT, { focus: null });
|
|
21747
|
+
}, [eventBus]);
|
|
21748
|
+
const handleKeyDown = useCallback((e) => {
|
|
21749
|
+
if (e.key !== "Enter" || e.shiftKey) return;
|
|
21750
|
+
const trimmed = inputValue.trim();
|
|
21751
|
+
if (!trimmed) return;
|
|
21752
|
+
e.preventDefault();
|
|
21753
|
+
eventBus.emit("UI:CHAT_SEND", { message: trimmed });
|
|
21754
|
+
}, [inputValue, eventBus]);
|
|
21755
|
+
useEffect(() => {
|
|
21756
|
+
const unsubSend = eventBus.on("UI:CHAT_SEND", () => {
|
|
21757
|
+
setInputValue("");
|
|
21758
|
+
setFocus(null);
|
|
21759
|
+
});
|
|
21760
|
+
const unsubSelect = eventBus.on(ELEMENT_SELECTED_EVENT, (e) => {
|
|
21761
|
+
setFocus(parseEditFocus(e.payload?.focus));
|
|
21762
|
+
});
|
|
21763
|
+
return () => {
|
|
21764
|
+
unsubSend();
|
|
21765
|
+
unsubSelect();
|
|
21766
|
+
};
|
|
21767
|
+
}, [eventBus]);
|
|
21768
|
+
const trailingAction = status === "error" ? /* @__PURE__ */ jsxs(Button, { variant: "secondary", size: "sm", action: "RETRY_GENERATION", className: "rounded-none flex-shrink-0 h-auto", children: [
|
|
21769
|
+
/* @__PURE__ */ jsx(Icon, { name: "refresh-cw", size: "xs" }),
|
|
21770
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", children: t("openFile.retry") })
|
|
21771
|
+
] }) : status === "running" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
21772
|
+
/* @__PURE__ */ jsx(
|
|
21773
|
+
Button,
|
|
21774
|
+
{
|
|
21775
|
+
variant: "ghost",
|
|
21776
|
+
size: "sm",
|
|
21777
|
+
action: "PAUSE",
|
|
21778
|
+
title: t("chatBar.pauseTheAgentYouCanEdit"),
|
|
21779
|
+
className: "rounded-none flex-shrink-0 h-auto",
|
|
21780
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "pause", size: "xs" })
|
|
21781
|
+
}
|
|
21782
|
+
),
|
|
21783
|
+
/* @__PURE__ */ jsx(
|
|
21784
|
+
Button,
|
|
21785
|
+
{
|
|
21786
|
+
variant: "ghost",
|
|
21787
|
+
size: "sm",
|
|
21788
|
+
action: "STOP",
|
|
21789
|
+
title: t("chatBar.cancelGeneration"),
|
|
21790
|
+
className: "rounded-none flex-shrink-0 h-auto border-l border-[var(--color-border)]",
|
|
21791
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "square", size: "xs" })
|
|
21792
|
+
}
|
|
21793
|
+
)
|
|
21794
|
+
] }) : status === "paused" ? /* @__PURE__ */ jsxs(
|
|
21795
|
+
Button,
|
|
21796
|
+
{
|
|
21797
|
+
variant: "primary",
|
|
21798
|
+
size: "sm",
|
|
21799
|
+
action: "RESUME",
|
|
21800
|
+
title: t("chatBar.resumeTheAgentYourCanvasEdits"),
|
|
21801
|
+
className: "rounded-none flex-shrink-0 h-auto",
|
|
21802
|
+
children: [
|
|
21803
|
+
/* @__PURE__ */ jsx(Icon, { name: "play", size: "xs" }),
|
|
21804
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", children: t("chatBar.resume") })
|
|
21805
|
+
]
|
|
21806
|
+
}
|
|
21807
|
+
) : /* @__PURE__ */ jsx(
|
|
21808
|
+
Button,
|
|
21809
|
+
{
|
|
21810
|
+
variant: "primary",
|
|
21811
|
+
size: "sm",
|
|
21812
|
+
action: "CHAT_SEND",
|
|
21813
|
+
actionPayload: { message: inputValue.trim() },
|
|
21814
|
+
disabled: !inputValue.trim(),
|
|
21815
|
+
"aria-label": t("chatBar.sendMessage"),
|
|
21816
|
+
className: "rounded-none flex-shrink-0 h-auto",
|
|
21817
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "send", size: "xs" })
|
|
21818
|
+
}
|
|
21819
|
+
);
|
|
21820
|
+
return /* @__PURE__ */ jsxs(Box, { className: `border-t border-[var(--color-border)] bg-[var(--color-card)] ${className ?? ""}`, children: [
|
|
21821
|
+
focus && /* @__PURE__ */ jsx(HStack, { gap: "xs", className: "items-center px-4 pt-2", children: /* @__PURE__ */ jsxs(Badge, { variant: "secondary", size: "sm", className: "flex items-center gap-1 max-w-full", children: [
|
|
21822
|
+
/* @__PURE__ */ jsx(Icon, { name: "mouse-pointer-2", size: "xs" }),
|
|
21823
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-inherit truncate", children: [
|
|
21824
|
+
t("chatBar.editing"),
|
|
21825
|
+
": ",
|
|
21826
|
+
focus.label
|
|
21827
|
+
] }),
|
|
21828
|
+
/* @__PURE__ */ jsx(
|
|
21829
|
+
Box,
|
|
21830
|
+
{
|
|
21831
|
+
onClick: clearFocus,
|
|
21832
|
+
title: t("chatBar.clearSelection"),
|
|
21833
|
+
className: "cursor-pointer flex items-center ml-1 hover:opacity-70",
|
|
21834
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" })
|
|
21835
|
+
}
|
|
21836
|
+
)
|
|
21837
|
+
] }) }),
|
|
21838
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center px-4 py-2", children: [
|
|
21839
|
+
context && /* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", className: "whitespace-nowrap flex-shrink-0", children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-inherit", children: context }) }),
|
|
21840
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex-1 min-w-0 flex items-stretch rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-background)] focus-within:border-[var(--color-primary)] overflow-hidden", children: [
|
|
21841
|
+
/* @__PURE__ */ jsx(
|
|
21842
|
+
Textarea,
|
|
21843
|
+
{
|
|
21844
|
+
value: inputValue,
|
|
21845
|
+
placeholder: placeholder ?? t("chatBar.askTheAgentAnything"),
|
|
21846
|
+
onChange: (e) => setInputValue(e.target.value),
|
|
21847
|
+
onKeyDown: handleKeyDown,
|
|
21848
|
+
rows: 1,
|
|
21849
|
+
className: "flex-1 min-w-0 min-h-0 text-sm border-0 rounded-none shadow-none bg-transparent resize-none focus:ring-0"
|
|
21850
|
+
}
|
|
21851
|
+
),
|
|
21852
|
+
trailingAction
|
|
21853
|
+
] }),
|
|
21854
|
+
(activeGate || jepaValidity !== void 0) && /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center flex-shrink-0", children: [
|
|
21855
|
+
activeGate && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "whitespace-nowrap", children: activeGate }),
|
|
21856
|
+
jepaValidity !== void 0 && /* @__PURE__ */ jsx(Badge, { variant: getJepaBadgeVariant(jepaValidity), size: "sm", children: /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-inherit", children: [
|
|
21857
|
+
(jepaValidity * 100).toFixed(1),
|
|
21858
|
+
"%"
|
|
21859
|
+
] }) })
|
|
21860
|
+
] })
|
|
21861
|
+
] })
|
|
21862
|
+
] });
|
|
21863
|
+
}
|
|
21864
|
+
var init_ChatBar = __esm({
|
|
21865
|
+
"components/core/organisms/ChatBar.tsx"() {
|
|
21866
|
+
"use client";
|
|
21867
|
+
init_Box();
|
|
21868
|
+
init_Stack();
|
|
21869
|
+
init_Typography();
|
|
21870
|
+
init_Button();
|
|
21871
|
+
init_Badge();
|
|
21872
|
+
init_Icon();
|
|
21873
|
+
init_Textarea();
|
|
21874
|
+
init_useEventBus();
|
|
21875
|
+
init_trace_edit_focus();
|
|
21876
|
+
ChatBar.displayName = "ChatBar";
|
|
21877
|
+
}
|
|
21878
|
+
});
|
|
21618
21879
|
function resolveManifestUrl2(manifest, relative) {
|
|
21619
21880
|
if (relative == null) return void 0;
|
|
21620
21881
|
if (/^https?:\/\//.test(relative)) return relative;
|
|
@@ -22738,7 +22999,7 @@ function CraftingRecipe({
|
|
|
22738
22999
|
className
|
|
22739
23000
|
}) {
|
|
22740
23001
|
const eventBus = useEventBus();
|
|
22741
|
-
const handleCraft =
|
|
23002
|
+
const handleCraft = React85.useCallback(() => {
|
|
22742
23003
|
onCraft?.();
|
|
22743
23004
|
if (craftEvent) {
|
|
22744
23005
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -22755,7 +23016,7 @@ function CraftingRecipe({
|
|
|
22755
23016
|
children: [
|
|
22756
23017
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
22757
23018
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
22758
|
-
return /* @__PURE__ */ jsxs(
|
|
23019
|
+
return /* @__PURE__ */ jsxs(React85.Fragment, { children: [
|
|
22759
23020
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
22760
23021
|
ItemSlot,
|
|
22761
23022
|
{
|
|
@@ -22827,8 +23088,8 @@ function DPad({
|
|
|
22827
23088
|
}) {
|
|
22828
23089
|
const eventBus = useEventBus();
|
|
22829
23090
|
const sizes = sizeMap15[size];
|
|
22830
|
-
const [activeDirections, setActiveDirections] =
|
|
22831
|
-
const handlePress =
|
|
23091
|
+
const [activeDirections, setActiveDirections] = React85.useState(/* @__PURE__ */ new Set());
|
|
23092
|
+
const handlePress = React85.useCallback(
|
|
22832
23093
|
(direction) => {
|
|
22833
23094
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
22834
23095
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -22836,7 +23097,7 @@ function DPad({
|
|
|
22836
23097
|
},
|
|
22837
23098
|
[directionEvent, eventBus, onDirection]
|
|
22838
23099
|
);
|
|
22839
|
-
const handleRelease =
|
|
23100
|
+
const handleRelease = React85.useCallback(
|
|
22840
23101
|
(direction) => {
|
|
22841
23102
|
setActiveDirections((prev) => {
|
|
22842
23103
|
const next = new Set(prev);
|
|
@@ -23721,8 +23982,8 @@ var init_Menu = __esm({
|
|
|
23721
23982
|
"bottom-end": "bottom-start"
|
|
23722
23983
|
};
|
|
23723
23984
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
23724
|
-
const triggerChild =
|
|
23725
|
-
const triggerElement =
|
|
23985
|
+
const triggerChild = React85__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
23986
|
+
const triggerElement = React85__default.cloneElement(
|
|
23726
23987
|
triggerChild,
|
|
23727
23988
|
{
|
|
23728
23989
|
ref: triggerRef,
|
|
@@ -23817,14 +24078,14 @@ function useDataDnd(args) {
|
|
|
23817
24078
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
23818
24079
|
const enabled = isZone || Boolean(dndRoot);
|
|
23819
24080
|
const eventBus = useEventBus();
|
|
23820
|
-
const parentRoot =
|
|
24081
|
+
const parentRoot = React85__default.useContext(RootCtx);
|
|
23821
24082
|
const isRoot = enabled && parentRoot === null;
|
|
23822
|
-
const zoneId =
|
|
24083
|
+
const zoneId = React85__default.useId();
|
|
23823
24084
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
23824
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
23825
|
-
const optimisticOrdersRef =
|
|
24085
|
+
const [optimisticOrders, setOptimisticOrders] = React85__default.useState(() => /* @__PURE__ */ new Map());
|
|
24086
|
+
const optimisticOrdersRef = React85__default.useRef(optimisticOrders);
|
|
23826
24087
|
optimisticOrdersRef.current = optimisticOrders;
|
|
23827
|
-
const clearOptimisticOrder =
|
|
24088
|
+
const clearOptimisticOrder = React85__default.useCallback((group) => {
|
|
23828
24089
|
setOptimisticOrders((prev) => {
|
|
23829
24090
|
if (!prev.has(group)) return prev;
|
|
23830
24091
|
const next = new Map(prev);
|
|
@@ -23849,7 +24110,7 @@ function useDataDnd(args) {
|
|
|
23849
24110
|
const raw = it[dndItemIdField];
|
|
23850
24111
|
return String(raw ?? `__idx_${idx}`);
|
|
23851
24112
|
}).join("|");
|
|
23852
|
-
const itemIds =
|
|
24113
|
+
const itemIds = React85__default.useMemo(
|
|
23853
24114
|
() => orderedItems.map((it, idx) => {
|
|
23854
24115
|
const raw = it[dndItemIdField];
|
|
23855
24116
|
return raw ?? `__idx_${idx}`;
|
|
@@ -23857,7 +24118,7 @@ function useDataDnd(args) {
|
|
|
23857
24118
|
[itemIdsSignature]
|
|
23858
24119
|
);
|
|
23859
24120
|
const itemsContentSig = items.map((it, idx) => String(it[dndItemIdField] ?? `__${idx}`)).join("|");
|
|
23860
|
-
|
|
24121
|
+
React85__default.useEffect(() => {
|
|
23861
24122
|
const root = isRoot ? null : parentRoot;
|
|
23862
24123
|
if (root) {
|
|
23863
24124
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -23865,20 +24126,20 @@ function useDataDnd(args) {
|
|
|
23865
24126
|
clearOptimisticOrder(ownGroup);
|
|
23866
24127
|
}
|
|
23867
24128
|
}, [itemsContentSig, ownGroup]);
|
|
23868
|
-
const zonesRef =
|
|
23869
|
-
const registerZone =
|
|
24129
|
+
const zonesRef = React85__default.useRef(/* @__PURE__ */ new Map());
|
|
24130
|
+
const registerZone = React85__default.useCallback((zoneId2, meta2) => {
|
|
23870
24131
|
zonesRef.current.set(zoneId2, meta2);
|
|
23871
24132
|
}, []);
|
|
23872
|
-
const unregisterZone =
|
|
24133
|
+
const unregisterZone = React85__default.useCallback((zoneId2) => {
|
|
23873
24134
|
zonesRef.current.delete(zoneId2);
|
|
23874
24135
|
}, []);
|
|
23875
|
-
const [activeDrag, setActiveDrag] =
|
|
23876
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
23877
|
-
const meta =
|
|
24136
|
+
const [activeDrag, setActiveDrag] = React85__default.useState(null);
|
|
24137
|
+
const [overZoneGroup, setOverZoneGroup] = React85__default.useState(null);
|
|
24138
|
+
const meta = React85__default.useMemo(
|
|
23878
24139
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
23879
24140
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
23880
24141
|
);
|
|
23881
|
-
|
|
24142
|
+
React85__default.useEffect(() => {
|
|
23882
24143
|
const target = isRoot ? null : parentRoot;
|
|
23883
24144
|
if (!target) {
|
|
23884
24145
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -23897,7 +24158,7 @@ function useDataDnd(args) {
|
|
|
23897
24158
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
23898
24159
|
const sensors = useAlmadarDndSensors(true);
|
|
23899
24160
|
const collisionDetection = almadarDndCollisionDetection;
|
|
23900
|
-
const findZoneByItem =
|
|
24161
|
+
const findZoneByItem = React85__default.useCallback(
|
|
23901
24162
|
(id) => {
|
|
23902
24163
|
for (const z of zonesRef.current.values()) {
|
|
23903
24164
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -23906,7 +24167,7 @@ function useDataDnd(args) {
|
|
|
23906
24167
|
},
|
|
23907
24168
|
[]
|
|
23908
24169
|
);
|
|
23909
|
-
|
|
24170
|
+
React85__default.useCallback(
|
|
23910
24171
|
(group) => {
|
|
23911
24172
|
for (const z of zonesRef.current.values()) {
|
|
23912
24173
|
if (z.group === group) return z;
|
|
@@ -23915,7 +24176,7 @@ function useDataDnd(args) {
|
|
|
23915
24176
|
},
|
|
23916
24177
|
[]
|
|
23917
24178
|
);
|
|
23918
|
-
const handleDragEnd =
|
|
24179
|
+
const handleDragEnd = React85__default.useCallback(
|
|
23919
24180
|
(event) => {
|
|
23920
24181
|
const { active, over } = event;
|
|
23921
24182
|
const activeIdStr = String(active.id);
|
|
@@ -24006,8 +24267,8 @@ function useDataDnd(args) {
|
|
|
24006
24267
|
},
|
|
24007
24268
|
[eventBus]
|
|
24008
24269
|
);
|
|
24009
|
-
const sortableData =
|
|
24010
|
-
const SortableItem =
|
|
24270
|
+
const sortableData = React85__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
24271
|
+
const SortableItem = React85__default.useCallback(
|
|
24011
24272
|
({ id, children }) => {
|
|
24012
24273
|
const {
|
|
24013
24274
|
attributes,
|
|
@@ -24047,7 +24308,7 @@ function useDataDnd(args) {
|
|
|
24047
24308
|
id: droppableId,
|
|
24048
24309
|
data: sortableData
|
|
24049
24310
|
});
|
|
24050
|
-
const ctx =
|
|
24311
|
+
const ctx = React85__default.useContext(RootCtx);
|
|
24051
24312
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
24052
24313
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
24053
24314
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -24062,7 +24323,7 @@ function useDataDnd(args) {
|
|
|
24062
24323
|
showForeignPlaceholder,
|
|
24063
24324
|
ctxAvailable: ctx != null
|
|
24064
24325
|
});
|
|
24065
|
-
|
|
24326
|
+
React85__default.useEffect(() => {
|
|
24066
24327
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
24067
24328
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
24068
24329
|
return /* @__PURE__ */ jsx(
|
|
@@ -24076,11 +24337,11 @@ function useDataDnd(args) {
|
|
|
24076
24337
|
}
|
|
24077
24338
|
);
|
|
24078
24339
|
};
|
|
24079
|
-
const rootContextValue =
|
|
24340
|
+
const rootContextValue = React85__default.useMemo(
|
|
24080
24341
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
24081
24342
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
24082
24343
|
);
|
|
24083
|
-
const handleDragStart =
|
|
24344
|
+
const handleDragStart = React85__default.useCallback((event) => {
|
|
24084
24345
|
const sourceZone = findZoneByItem(event.active.id);
|
|
24085
24346
|
const rect = event.active.rect.current.initial;
|
|
24086
24347
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -24099,7 +24360,7 @@ function useDataDnd(args) {
|
|
|
24099
24360
|
isRoot
|
|
24100
24361
|
});
|
|
24101
24362
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
24102
|
-
const handleDragOver =
|
|
24363
|
+
const handleDragOver = React85__default.useCallback((event) => {
|
|
24103
24364
|
const { active, over } = event;
|
|
24104
24365
|
const overData = over?.data?.current;
|
|
24105
24366
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -24169,7 +24430,7 @@ function useDataDnd(args) {
|
|
|
24169
24430
|
return next;
|
|
24170
24431
|
});
|
|
24171
24432
|
}, []);
|
|
24172
|
-
const handleDragCancel =
|
|
24433
|
+
const handleDragCancel = React85__default.useCallback((event) => {
|
|
24173
24434
|
setActiveDrag(null);
|
|
24174
24435
|
setOverZoneGroup(null);
|
|
24175
24436
|
dndLog.warn("dragCancel", {
|
|
@@ -24177,12 +24438,12 @@ function useDataDnd(args) {
|
|
|
24177
24438
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
24178
24439
|
});
|
|
24179
24440
|
}, []);
|
|
24180
|
-
const handleDragEndWithCleanup =
|
|
24441
|
+
const handleDragEndWithCleanup = React85__default.useCallback((event) => {
|
|
24181
24442
|
handleDragEnd(event);
|
|
24182
24443
|
setActiveDrag(null);
|
|
24183
24444
|
setOverZoneGroup(null);
|
|
24184
24445
|
}, [handleDragEnd]);
|
|
24185
|
-
const wrapContainer =
|
|
24446
|
+
const wrapContainer = React85__default.useCallback(
|
|
24186
24447
|
(children) => {
|
|
24187
24448
|
if (!enabled) return children;
|
|
24188
24449
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -24236,7 +24497,7 @@ var init_useDataDnd = __esm({
|
|
|
24236
24497
|
init_useAlmadarDndCollision();
|
|
24237
24498
|
init_Box();
|
|
24238
24499
|
dndLog = createLogger("almadar:ui:dnd");
|
|
24239
|
-
RootCtx =
|
|
24500
|
+
RootCtx = React85__default.createContext(null);
|
|
24240
24501
|
}
|
|
24241
24502
|
});
|
|
24242
24503
|
function renderIconInput(icon, props) {
|
|
@@ -24762,7 +25023,7 @@ function DataList({
|
|
|
24762
25023
|
}) {
|
|
24763
25024
|
const eventBus = useEventBus();
|
|
24764
25025
|
const { t } = useTranslate();
|
|
24765
|
-
const [visibleCount, setVisibleCount] =
|
|
25026
|
+
const [visibleCount, setVisibleCount] = React85__default.useState(pageSize || Infinity);
|
|
24766
25027
|
const fieldDefs = fields ?? columns ?? [];
|
|
24767
25028
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
24768
25029
|
const dnd = useDataDnd({
|
|
@@ -24781,7 +25042,7 @@ function DataList({
|
|
|
24781
25042
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
24782
25043
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
24783
25044
|
const hasRenderProp = typeof children === "function";
|
|
24784
|
-
|
|
25045
|
+
React85__default.useEffect(() => {
|
|
24785
25046
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
24786
25047
|
const childrenTypeOf = typeof children;
|
|
24787
25048
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -24886,7 +25147,7 @@ function DataList({
|
|
|
24886
25147
|
const items2 = data.map((item) => item);
|
|
24887
25148
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
24888
25149
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
24889
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
25150
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
24890
25151
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
24891
25152
|
group.items.map((itemData, index) => {
|
|
24892
25153
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -25027,7 +25288,7 @@ function DataList({
|
|
|
25027
25288
|
className
|
|
25028
25289
|
),
|
|
25029
25290
|
children: [
|
|
25030
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
25291
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
25031
25292
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
25032
25293
|
group.items.map(
|
|
25033
25294
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -25943,7 +26204,7 @@ var init_Grid = __esm({
|
|
|
25943
26204
|
as: Component2 = "div"
|
|
25944
26205
|
}) => {
|
|
25945
26206
|
const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
|
|
25946
|
-
return
|
|
26207
|
+
return React85__default.createElement(
|
|
25947
26208
|
Component2,
|
|
25948
26209
|
{
|
|
25949
26210
|
className: cn(
|
|
@@ -26139,9 +26400,9 @@ var init_Popover = __esm({
|
|
|
26139
26400
|
onMouseLeave: handleClose,
|
|
26140
26401
|
onPointerDown: tapTriggerProps.onPointerDown
|
|
26141
26402
|
};
|
|
26142
|
-
const childElement =
|
|
26403
|
+
const childElement = React85__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
26143
26404
|
const childPointerDown = childElement.props.onPointerDown;
|
|
26144
|
-
const triggerElement =
|
|
26405
|
+
const triggerElement = React85__default.cloneElement(
|
|
26145
26406
|
childElement,
|
|
26146
26407
|
{
|
|
26147
26408
|
ref: triggerRef,
|
|
@@ -26743,9 +27004,9 @@ var init_Tooltip = __esm({
|
|
|
26743
27004
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
26744
27005
|
};
|
|
26745
27006
|
}, []);
|
|
26746
|
-
const triggerElement =
|
|
27007
|
+
const triggerElement = React85__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
26747
27008
|
const childPointerDown = triggerElement.props.onPointerDown;
|
|
26748
|
-
const trigger =
|
|
27009
|
+
const trigger = React85__default.cloneElement(triggerElement, {
|
|
26749
27010
|
ref: triggerRef,
|
|
26750
27011
|
onMouseEnter: handleMouseEnter,
|
|
26751
27012
|
onMouseLeave: handleMouseLeave,
|
|
@@ -26835,7 +27096,7 @@ var init_WizardProgress = __esm({
|
|
|
26835
27096
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
26836
27097
|
const isActive = index === currentStep;
|
|
26837
27098
|
const isCompleted = index < currentStep;
|
|
26838
|
-
return /* @__PURE__ */ jsxs(
|
|
27099
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
26839
27100
|
/* @__PURE__ */ jsx(
|
|
26840
27101
|
"button",
|
|
26841
27102
|
{
|
|
@@ -27898,7 +28159,7 @@ function InventoryGrid({
|
|
|
27898
28159
|
const eventBus = useEventBus();
|
|
27899
28160
|
const slotCount = totalSlots ?? items.length;
|
|
27900
28161
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
27901
|
-
const handleSelect =
|
|
28162
|
+
const handleSelect = React85.useCallback(
|
|
27902
28163
|
(id) => {
|
|
27903
28164
|
onSelect?.(id);
|
|
27904
28165
|
if (selectEvent) {
|
|
@@ -28133,31 +28394,31 @@ function GameCanvas2D({
|
|
|
28133
28394
|
assetBaseUrl,
|
|
28134
28395
|
className
|
|
28135
28396
|
}) {
|
|
28136
|
-
const canvasRef =
|
|
28137
|
-
const rafRef =
|
|
28138
|
-
const frameRef =
|
|
28139
|
-
const lastTimeRef =
|
|
28140
|
-
const imageCache =
|
|
28397
|
+
const canvasRef = React85.useRef(null);
|
|
28398
|
+
const rafRef = React85.useRef(0);
|
|
28399
|
+
const frameRef = React85.useRef(0);
|
|
28400
|
+
const lastTimeRef = React85.useRef(0);
|
|
28401
|
+
const imageCache = React85.useRef(/* @__PURE__ */ new Map());
|
|
28141
28402
|
const emit = useEmitEvent();
|
|
28142
|
-
const onDrawRef =
|
|
28403
|
+
const onDrawRef = React85.useRef(onDraw);
|
|
28143
28404
|
onDrawRef.current = onDraw;
|
|
28144
|
-
const onTickRef =
|
|
28405
|
+
const onTickRef = React85.useRef(onTick);
|
|
28145
28406
|
onTickRef.current = onTick;
|
|
28146
|
-
const tickEventRef =
|
|
28407
|
+
const tickEventRef = React85.useRef(tickEvent);
|
|
28147
28408
|
tickEventRef.current = tickEvent;
|
|
28148
|
-
const drawEventRef =
|
|
28409
|
+
const drawEventRef = React85.useRef(drawEvent);
|
|
28149
28410
|
drawEventRef.current = drawEvent;
|
|
28150
|
-
const emitRef =
|
|
28411
|
+
const emitRef = React85.useRef(emit);
|
|
28151
28412
|
emitRef.current = emit;
|
|
28152
|
-
const assetBaseUrlRef =
|
|
28413
|
+
const assetBaseUrlRef = React85.useRef(assetBaseUrl);
|
|
28153
28414
|
assetBaseUrlRef.current = assetBaseUrl;
|
|
28154
|
-
const backgroundImageRef =
|
|
28415
|
+
const backgroundImageRef = React85.useRef(backgroundImage);
|
|
28155
28416
|
backgroundImageRef.current = backgroundImage;
|
|
28156
|
-
const widthRef =
|
|
28417
|
+
const widthRef = React85.useRef(width);
|
|
28157
28418
|
widthRef.current = width;
|
|
28158
|
-
const heightRef =
|
|
28419
|
+
const heightRef = React85.useRef(height);
|
|
28159
28420
|
heightRef.current = height;
|
|
28160
|
-
const loadImage =
|
|
28421
|
+
const loadImage = React85.useCallback((url) => {
|
|
28161
28422
|
const base = assetBaseUrlRef.current;
|
|
28162
28423
|
if (!url.startsWith("http") && !base) return null;
|
|
28163
28424
|
const fullUrl = url.startsWith("http") ? url : `${base}${url}`;
|
|
@@ -28171,7 +28432,7 @@ function GameCanvas2D({
|
|
|
28171
28432
|
}
|
|
28172
28433
|
return null;
|
|
28173
28434
|
}, []);
|
|
28174
|
-
|
|
28435
|
+
React85.useEffect(() => {
|
|
28175
28436
|
const canvas = canvasRef.current;
|
|
28176
28437
|
if (!canvas) return;
|
|
28177
28438
|
const ctx = canvas.getContext("2d");
|
|
@@ -28496,7 +28757,7 @@ function TurnPanel({
|
|
|
28496
28757
|
className
|
|
28497
28758
|
}) {
|
|
28498
28759
|
const eventBus = useEventBus();
|
|
28499
|
-
const handleAction =
|
|
28760
|
+
const handleAction = React85.useCallback(
|
|
28500
28761
|
(event) => {
|
|
28501
28762
|
if (event) {
|
|
28502
28763
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -28677,7 +28938,7 @@ function UnitCommandBar({
|
|
|
28677
28938
|
className
|
|
28678
28939
|
}) {
|
|
28679
28940
|
const eventBus = useEventBus();
|
|
28680
|
-
const handleCommand =
|
|
28941
|
+
const handleCommand = React85.useCallback(
|
|
28681
28942
|
(event) => {
|
|
28682
28943
|
if (event) {
|
|
28683
28944
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -29228,7 +29489,7 @@ function GameMenu({
|
|
|
29228
29489
|
} catch {
|
|
29229
29490
|
}
|
|
29230
29491
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
29231
|
-
const handleOptionClick =
|
|
29492
|
+
const handleOptionClick = React85.useCallback(
|
|
29232
29493
|
(option) => {
|
|
29233
29494
|
if (option.event && eventBus) {
|
|
29234
29495
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -29347,7 +29608,7 @@ function GameOverScreen({
|
|
|
29347
29608
|
} catch {
|
|
29348
29609
|
}
|
|
29349
29610
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
29350
|
-
const handleActionClick =
|
|
29611
|
+
const handleActionClick = React85.useCallback(
|
|
29351
29612
|
(action) => {
|
|
29352
29613
|
if (action.event && eventBus) {
|
|
29353
29614
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -30279,13 +30540,13 @@ var init_MapView = __esm({
|
|
|
30279
30540
|
shadowSize: [41, 41]
|
|
30280
30541
|
});
|
|
30281
30542
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
30282
|
-
const { useEffect:
|
|
30543
|
+
const { useEffect: useEffect85, useRef: useRef80, useCallback: useCallback127, useState: useState117 } = React85__default;
|
|
30283
30544
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
30284
30545
|
const { useEventBus: useEventBus4 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
30285
30546
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
30286
30547
|
const map = useMap();
|
|
30287
30548
|
const prevRef = useRef80({ centerLat, centerLng, zoom });
|
|
30288
|
-
|
|
30549
|
+
useEffect85(() => {
|
|
30289
30550
|
const prev = prevRef.current;
|
|
30290
30551
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
30291
30552
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -30296,7 +30557,7 @@ var init_MapView = __esm({
|
|
|
30296
30557
|
}
|
|
30297
30558
|
function MapClickHandler({ onMapClick }) {
|
|
30298
30559
|
const map = useMap();
|
|
30299
|
-
|
|
30560
|
+
useEffect85(() => {
|
|
30300
30561
|
if (!onMapClick) return;
|
|
30301
30562
|
const handler = (e) => {
|
|
30302
30563
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -30324,8 +30585,8 @@ var init_MapView = __esm({
|
|
|
30324
30585
|
showAttribution = true
|
|
30325
30586
|
}) {
|
|
30326
30587
|
const eventBus = useEventBus4();
|
|
30327
|
-
const [clickedPosition, setClickedPosition] =
|
|
30328
|
-
const handleMapClick =
|
|
30588
|
+
const [clickedPosition, setClickedPosition] = useState117(null);
|
|
30589
|
+
const handleMapClick = useCallback127((lat, lng) => {
|
|
30329
30590
|
if (showClickedPin) {
|
|
30330
30591
|
setClickedPosition({ lat, lng });
|
|
30331
30592
|
}
|
|
@@ -30334,7 +30595,7 @@ var init_MapView = __esm({
|
|
|
30334
30595
|
eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
|
|
30335
30596
|
}
|
|
30336
30597
|
}, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
|
|
30337
|
-
const handleMarkerClick =
|
|
30598
|
+
const handleMarkerClick = useCallback127((marker) => {
|
|
30338
30599
|
onMarkerClick?.(marker);
|
|
30339
30600
|
if (markerClickEvent) {
|
|
30340
30601
|
eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
|
|
@@ -31185,8 +31446,8 @@ function TableView({
|
|
|
31185
31446
|
}) {
|
|
31186
31447
|
const eventBus = useEventBus();
|
|
31187
31448
|
const { t } = useTranslate();
|
|
31188
|
-
const [visibleCount, setVisibleCount] =
|
|
31189
|
-
const [localSelected, setLocalSelected] =
|
|
31449
|
+
const [visibleCount, setVisibleCount] = React85__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
31450
|
+
const [localSelected, setLocalSelected] = React85__default.useState(/* @__PURE__ */ new Set());
|
|
31190
31451
|
const colDefs = columns ?? fields ?? [];
|
|
31191
31452
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
31192
31453
|
const dnd = useDataDnd({
|
|
@@ -31381,12 +31642,12 @@ function TableView({
|
|
|
31381
31642
|
]
|
|
31382
31643
|
}
|
|
31383
31644
|
);
|
|
31384
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
31645
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React85__default.Fragment, { children: rowInner }, id);
|
|
31385
31646
|
};
|
|
31386
31647
|
const items = data.map((row) => row);
|
|
31387
31648
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
31388
31649
|
let runningIndex = 0;
|
|
31389
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
31650
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
31390
31651
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
31391
31652
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
31392
31653
|
] }, gi)) });
|
|
@@ -32743,7 +33004,7 @@ var init_StepFlow = __esm({
|
|
|
32743
33004
|
className
|
|
32744
33005
|
}) => {
|
|
32745
33006
|
if (orientation === "vertical") {
|
|
32746
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
33007
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React85__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
32747
33008
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
32748
33009
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
32749
33010
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -32754,7 +33015,7 @@ var init_StepFlow = __esm({
|
|
|
32754
33015
|
] })
|
|
32755
33016
|
] }) }, index)) });
|
|
32756
33017
|
}
|
|
32757
|
-
return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(
|
|
33018
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
32758
33019
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
32759
33020
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
32760
33021
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -33739,7 +34000,7 @@ var init_LikertScale = __esm({
|
|
|
33739
34000
|
md: "text-base",
|
|
33740
34001
|
lg: "text-lg"
|
|
33741
34002
|
};
|
|
33742
|
-
LikertScale =
|
|
34003
|
+
LikertScale = React85__default.forwardRef(
|
|
33743
34004
|
({
|
|
33744
34005
|
question,
|
|
33745
34006
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -33751,7 +34012,7 @@ var init_LikertScale = __esm({
|
|
|
33751
34012
|
variant = "radios",
|
|
33752
34013
|
className
|
|
33753
34014
|
}, ref) => {
|
|
33754
|
-
const groupId =
|
|
34015
|
+
const groupId = React85__default.useId();
|
|
33755
34016
|
const eventBus = useEventBus();
|
|
33756
34017
|
const handleSelect = useCallback(
|
|
33757
34018
|
(next) => {
|
|
@@ -36033,7 +36294,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
36033
36294
|
"aria-label": t("aria.breadcrumb"),
|
|
36034
36295
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
36035
36296
|
const isLast = idx === items.length - 1;
|
|
36036
|
-
return /* @__PURE__ */ jsxs(
|
|
36297
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
36037
36298
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
36038
36299
|
Icon,
|
|
36039
36300
|
{
|
|
@@ -36902,7 +37163,7 @@ var init_MiniStateMachine = __esm({
|
|
|
36902
37163
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
36903
37164
|
const tc = transitionCounts[s.name] ?? 0;
|
|
36904
37165
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
36905
|
-
return /* @__PURE__ */ jsxs(
|
|
37166
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
36906
37167
|
/* @__PURE__ */ jsx(
|
|
36907
37168
|
AvlState,
|
|
36908
37169
|
{
|
|
@@ -37106,7 +37367,7 @@ var init_PageHeader = __esm({
|
|
|
37106
37367
|
info: "bg-info/10 text-info"
|
|
37107
37368
|
};
|
|
37108
37369
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
37109
|
-
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Box, { as: "nav", className: "mb-4", children: /* @__PURE__ */ jsx(Box, { as: "ol", className: "flex items-center gap-2 text-sm", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs(
|
|
37370
|
+
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Box, { as: "nav", className: "mb-4", children: /* @__PURE__ */ jsx(Box, { as: "ol", className: "flex items-center gap-2 text-sm", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
37110
37371
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
37111
37372
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
37112
37373
|
"a",
|
|
@@ -37835,7 +38096,7 @@ var init_WizardContainer = __esm({
|
|
|
37835
38096
|
const isCompleted = index < currentStep;
|
|
37836
38097
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
37837
38098
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
37838
|
-
return /* @__PURE__ */ jsxs(
|
|
38099
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
37839
38100
|
/* @__PURE__ */ jsx(
|
|
37840
38101
|
Button,
|
|
37841
38102
|
{
|
|
@@ -40395,7 +40656,7 @@ var init_DetailPanel = __esm({
|
|
|
40395
40656
|
}
|
|
40396
40657
|
});
|
|
40397
40658
|
function extractTitle(children) {
|
|
40398
|
-
if (!
|
|
40659
|
+
if (!React85__default.isValidElement(children)) return void 0;
|
|
40399
40660
|
const props = children.props;
|
|
40400
40661
|
if (typeof props.title === "string") {
|
|
40401
40662
|
return props.title;
|
|
@@ -40450,7 +40711,7 @@ function LinearView({
|
|
|
40450
40711
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
40451
40712
|
const isDone = i < currentIdx;
|
|
40452
40713
|
const isCurrent = i === currentIdx;
|
|
40453
|
-
return /* @__PURE__ */ jsxs(
|
|
40714
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
40454
40715
|
i > 0 && /* @__PURE__ */ jsx(
|
|
40455
40716
|
Typography,
|
|
40456
40717
|
{
|
|
@@ -41219,6 +41480,42 @@ var init_FeatureGridOrganism = __esm({
|
|
|
41219
41480
|
FeatureGridOrganism.displayName = "FeatureGridOrganism";
|
|
41220
41481
|
}
|
|
41221
41482
|
});
|
|
41483
|
+
function FishingBoard({
|
|
41484
|
+
backgroundImage,
|
|
41485
|
+
assetBaseUrl,
|
|
41486
|
+
scale = 1,
|
|
41487
|
+
showMinimap = false,
|
|
41488
|
+
enableCamera = true,
|
|
41489
|
+
width = 800,
|
|
41490
|
+
height = 600,
|
|
41491
|
+
isLoading,
|
|
41492
|
+
error,
|
|
41493
|
+
className
|
|
41494
|
+
}) {
|
|
41495
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("fishing-board relative w-full h-full", className), children: [
|
|
41496
|
+
isLoading && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/40 z-10", children: /* @__PURE__ */ jsx("span", { className: "text-white text-sm", children: "Loading\u2026" }) }),
|
|
41497
|
+
error && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/40 z-10", children: /* @__PURE__ */ jsx("span", { className: "text-red-400 text-sm", children: error.message }) }),
|
|
41498
|
+
/* @__PURE__ */ jsx(
|
|
41499
|
+
GameCanvas2D,
|
|
41500
|
+
{
|
|
41501
|
+
width,
|
|
41502
|
+
height,
|
|
41503
|
+
backgroundImage: backgroundImage ?? "",
|
|
41504
|
+
assetBaseUrl,
|
|
41505
|
+
fps: 60,
|
|
41506
|
+
className: "w-full h-full"
|
|
41507
|
+
}
|
|
41508
|
+
)
|
|
41509
|
+
] });
|
|
41510
|
+
}
|
|
41511
|
+
var init_FishingBoard = __esm({
|
|
41512
|
+
"components/game/organisms/FishingBoard.tsx"() {
|
|
41513
|
+
"use client";
|
|
41514
|
+
init_cn();
|
|
41515
|
+
init_GameCanvas2D();
|
|
41516
|
+
FishingBoard.displayName = "FishingBoard";
|
|
41517
|
+
}
|
|
41518
|
+
});
|
|
41222
41519
|
function toSharedContext2(formCtx) {
|
|
41223
41520
|
return createMinimalContext(
|
|
41224
41521
|
{
|
|
@@ -41400,12 +41697,12 @@ var init_Form = __esm({
|
|
|
41400
41697
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
41401
41698
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
41402
41699
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
41403
|
-
const normalizedInitialData =
|
|
41700
|
+
const normalizedInitialData = React85__default.useMemo(() => {
|
|
41404
41701
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
41405
41702
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
41406
41703
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
41407
41704
|
}, [entity, initialData]);
|
|
41408
|
-
const entityDerivedFields =
|
|
41705
|
+
const entityDerivedFields = React85__default.useMemo(() => {
|
|
41409
41706
|
if (fields && fields.length > 0) return void 0;
|
|
41410
41707
|
if (!resolvedEntity) return void 0;
|
|
41411
41708
|
return resolvedEntity.fields.map(
|
|
@@ -41425,16 +41722,16 @@ var init_Form = __esm({
|
|
|
41425
41722
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
41426
41723
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
41427
41724
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
41428
|
-
const [formData, setFormData] =
|
|
41725
|
+
const [formData, setFormData] = React85__default.useState(
|
|
41429
41726
|
normalizedInitialData
|
|
41430
41727
|
);
|
|
41431
|
-
const [collapsedSections, setCollapsedSections] =
|
|
41728
|
+
const [collapsedSections, setCollapsedSections] = React85__default.useState(
|
|
41432
41729
|
/* @__PURE__ */ new Set()
|
|
41433
41730
|
);
|
|
41434
|
-
const [submitError, setSubmitError] =
|
|
41435
|
-
const formRef =
|
|
41731
|
+
const [submitError, setSubmitError] = React85__default.useState(null);
|
|
41732
|
+
const formRef = React85__default.useRef(null);
|
|
41436
41733
|
const formMode = props.mode;
|
|
41437
|
-
const mountedRef =
|
|
41734
|
+
const mountedRef = React85__default.useRef(false);
|
|
41438
41735
|
if (!mountedRef.current) {
|
|
41439
41736
|
mountedRef.current = true;
|
|
41440
41737
|
debug("forms", "mount", {
|
|
@@ -41447,7 +41744,7 @@ var init_Form = __esm({
|
|
|
41447
41744
|
});
|
|
41448
41745
|
}
|
|
41449
41746
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
41450
|
-
const evalContext =
|
|
41747
|
+
const evalContext = React85__default.useMemo(
|
|
41451
41748
|
() => ({
|
|
41452
41749
|
formValues: formData,
|
|
41453
41750
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -41456,7 +41753,7 @@ var init_Form = __esm({
|
|
|
41456
41753
|
}),
|
|
41457
41754
|
[formData, externalContext]
|
|
41458
41755
|
);
|
|
41459
|
-
|
|
41756
|
+
React85__default.useEffect(() => {
|
|
41460
41757
|
debug("forms", "initialData-sync", {
|
|
41461
41758
|
mode: formMode,
|
|
41462
41759
|
normalizedInitialData,
|
|
@@ -41467,7 +41764,7 @@ var init_Form = __esm({
|
|
|
41467
41764
|
setFormData(normalizedInitialData);
|
|
41468
41765
|
}
|
|
41469
41766
|
}, [normalizedInitialData]);
|
|
41470
|
-
const processCalculations =
|
|
41767
|
+
const processCalculations = React85__default.useCallback(
|
|
41471
41768
|
(changedFieldId, newFormData) => {
|
|
41472
41769
|
if (!hiddenCalculations.length) return;
|
|
41473
41770
|
const context = {
|
|
@@ -41492,7 +41789,7 @@ var init_Form = __esm({
|
|
|
41492
41789
|
},
|
|
41493
41790
|
[hiddenCalculations, externalContext, eventBus]
|
|
41494
41791
|
);
|
|
41495
|
-
const checkViolations =
|
|
41792
|
+
const checkViolations = React85__default.useCallback(
|
|
41496
41793
|
(changedFieldId, newFormData) => {
|
|
41497
41794
|
if (!violationTriggers.length) return;
|
|
41498
41795
|
const context = {
|
|
@@ -41530,7 +41827,7 @@ var init_Form = __esm({
|
|
|
41530
41827
|
processCalculations(name, newFormData);
|
|
41531
41828
|
checkViolations(name, newFormData);
|
|
41532
41829
|
};
|
|
41533
|
-
const isFieldVisible =
|
|
41830
|
+
const isFieldVisible = React85__default.useCallback(
|
|
41534
41831
|
(fieldName) => {
|
|
41535
41832
|
const condition = conditionalFields[fieldName];
|
|
41536
41833
|
if (!condition) return true;
|
|
@@ -41538,7 +41835,7 @@ var init_Form = __esm({
|
|
|
41538
41835
|
},
|
|
41539
41836
|
[conditionalFields, evalContext]
|
|
41540
41837
|
);
|
|
41541
|
-
const isSectionVisible =
|
|
41838
|
+
const isSectionVisible = React85__default.useCallback(
|
|
41542
41839
|
(section) => {
|
|
41543
41840
|
if (!section.condition) return true;
|
|
41544
41841
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -41614,7 +41911,7 @@ var init_Form = __esm({
|
|
|
41614
41911
|
eventBus.emit(`UI:${onCancel}`);
|
|
41615
41912
|
}
|
|
41616
41913
|
};
|
|
41617
|
-
const renderField =
|
|
41914
|
+
const renderField = React85__default.useCallback(
|
|
41618
41915
|
(field) => {
|
|
41619
41916
|
const fieldName = field.name || field.field;
|
|
41620
41917
|
if (!fieldName) return null;
|
|
@@ -41635,7 +41932,7 @@ var init_Form = __esm({
|
|
|
41635
41932
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
41636
41933
|
);
|
|
41637
41934
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
41638
|
-
const normalizedFields =
|
|
41935
|
+
const normalizedFields = React85__default.useMemo(() => {
|
|
41639
41936
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
41640
41937
|
return effectiveFields.map((field) => {
|
|
41641
41938
|
if (typeof field === "string") {
|
|
@@ -41658,7 +41955,7 @@ var init_Form = __esm({
|
|
|
41658
41955
|
return field;
|
|
41659
41956
|
});
|
|
41660
41957
|
}, [effectiveFields, resolvedEntity]);
|
|
41661
|
-
const schemaFields =
|
|
41958
|
+
const schemaFields = React85__default.useMemo(() => {
|
|
41662
41959
|
if (normalizedFields.length === 0) return null;
|
|
41663
41960
|
if (isDebugEnabled()) {
|
|
41664
41961
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -41668,7 +41965,7 @@ var init_Form = __esm({
|
|
|
41668
41965
|
}
|
|
41669
41966
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
41670
41967
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
41671
|
-
const sectionElements =
|
|
41968
|
+
const sectionElements = React85__default.useMemo(() => {
|
|
41672
41969
|
if (!sections || sections.length === 0) return null;
|
|
41673
41970
|
return sections.map((section) => {
|
|
41674
41971
|
if (!isSectionVisible(section)) {
|
|
@@ -43932,10 +44229,10 @@ function getSlotContentRenderer2() {
|
|
|
43932
44229
|
}
|
|
43933
44230
|
function resolveDescriptor(value, idPrefix) {
|
|
43934
44231
|
if (value === null || value === void 0) return value;
|
|
43935
|
-
if (
|
|
44232
|
+
if (React85__default.isValidElement(value)) return value;
|
|
43936
44233
|
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
|
|
43937
44234
|
if (Array.isArray(value)) {
|
|
43938
|
-
return value.map((item, i) => /* @__PURE__ */ jsx(
|
|
44235
|
+
return value.map((item, i) => /* @__PURE__ */ jsx(React85__default.Fragment, { children: resolveDescriptor(item, `${idPrefix}-${i}`) }, i));
|
|
43939
44236
|
}
|
|
43940
44237
|
if (typeof value === "object") {
|
|
43941
44238
|
const rec = value;
|
|
@@ -44036,10 +44333,10 @@ function getSlotContentRenderer3() {
|
|
|
44036
44333
|
}
|
|
44037
44334
|
function resolveDescriptor2(value, idPrefix) {
|
|
44038
44335
|
if (value === null || value === void 0) return value;
|
|
44039
|
-
if (
|
|
44336
|
+
if (React85__default.isValidElement(value)) return value;
|
|
44040
44337
|
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
|
|
44041
44338
|
if (Array.isArray(value)) {
|
|
44042
|
-
return value.map((item, i) => /* @__PURE__ */ jsx(
|
|
44339
|
+
return value.map((item, i) => /* @__PURE__ */ jsx(React85__default.Fragment, { children: resolveDescriptor2(item, `${idPrefix}-${i}`) }, i));
|
|
44043
44340
|
}
|
|
44044
44341
|
if (typeof value === "object") {
|
|
44045
44342
|
const rec = value;
|
|
@@ -44372,6 +44669,39 @@ var init_HexStrategyBoard = __esm({
|
|
|
44372
44669
|
HexStrategyBoard.displayName = "HexStrategyBoard";
|
|
44373
44670
|
}
|
|
44374
44671
|
});
|
|
44672
|
+
function HolidayRunnerBoard({
|
|
44673
|
+
backgroundImage,
|
|
44674
|
+
assetBaseUrl,
|
|
44675
|
+
width = 800,
|
|
44676
|
+
height = 400,
|
|
44677
|
+
fps = 60,
|
|
44678
|
+
isLoading,
|
|
44679
|
+
error,
|
|
44680
|
+
className
|
|
44681
|
+
}) {
|
|
44682
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("holiday-runner-board relative w-full h-full", className), children: [
|
|
44683
|
+
isLoading && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/40 z-10", children: /* @__PURE__ */ jsx("span", { className: "text-white text-sm", children: "Loading\u2026" }) }),
|
|
44684
|
+
error && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/60 z-10", children: /* @__PURE__ */ jsx("span", { className: "text-red-400 text-sm", children: error.message }) }),
|
|
44685
|
+
/* @__PURE__ */ jsx(
|
|
44686
|
+
GameCanvas2D,
|
|
44687
|
+
{
|
|
44688
|
+
width,
|
|
44689
|
+
height,
|
|
44690
|
+
fps,
|
|
44691
|
+
backgroundImage: backgroundImage ?? "",
|
|
44692
|
+
assetBaseUrl
|
|
44693
|
+
}
|
|
44694
|
+
)
|
|
44695
|
+
] });
|
|
44696
|
+
}
|
|
44697
|
+
var init_HolidayRunnerBoard = __esm({
|
|
44698
|
+
"components/game/organisms/HolidayRunnerBoard.tsx"() {
|
|
44699
|
+
"use client";
|
|
44700
|
+
init_cn();
|
|
44701
|
+
init_GameCanvas2D();
|
|
44702
|
+
HolidayRunnerBoard.displayName = "HolidayRunnerBoard";
|
|
44703
|
+
}
|
|
44704
|
+
});
|
|
44375
44705
|
var LandingPageTemplate;
|
|
44376
44706
|
var init_LandingPageTemplate = __esm({
|
|
44377
44707
|
"components/marketing/templates/LandingPageTemplate.tsx"() {
|
|
@@ -44707,7 +45037,7 @@ var init_List = __esm({
|
|
|
44707
45037
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
44708
45038
|
return [];
|
|
44709
45039
|
}, [entity]);
|
|
44710
|
-
const getItemActions =
|
|
45040
|
+
const getItemActions = React85__default.useCallback(
|
|
44711
45041
|
(item) => {
|
|
44712
45042
|
if (!itemActions) return [];
|
|
44713
45043
|
if (typeof itemActions === "function") {
|
|
@@ -45126,6 +45456,48 @@ var init_MasterDetailLayout = __esm({
|
|
|
45126
45456
|
MasterDetailLayout.displayName = "MasterDetailLayout";
|
|
45127
45457
|
}
|
|
45128
45458
|
});
|
|
45459
|
+
function MatchPuzzleBoard({
|
|
45460
|
+
tiles,
|
|
45461
|
+
units,
|
|
45462
|
+
features,
|
|
45463
|
+
assetManifest,
|
|
45464
|
+
assetBaseUrl,
|
|
45465
|
+
scale = 0.45,
|
|
45466
|
+
showMinimap = false,
|
|
45467
|
+
enableCamera = false,
|
|
45468
|
+
tileClickEvent,
|
|
45469
|
+
unitClickEvent,
|
|
45470
|
+
isLoading,
|
|
45471
|
+
error,
|
|
45472
|
+
className
|
|
45473
|
+
}) {
|
|
45474
|
+
return /* @__PURE__ */ jsx("div", { className: cn("match-puzzle-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
45475
|
+
IsometricCanvas_default,
|
|
45476
|
+
{
|
|
45477
|
+
tileLayout: "flat",
|
|
45478
|
+
tiles,
|
|
45479
|
+
units,
|
|
45480
|
+
features,
|
|
45481
|
+
assetManifest,
|
|
45482
|
+
assetBaseUrl,
|
|
45483
|
+
scale,
|
|
45484
|
+
showMinimap,
|
|
45485
|
+
enableCamera,
|
|
45486
|
+
tileClickEvent,
|
|
45487
|
+
unitClickEvent,
|
|
45488
|
+
isLoading,
|
|
45489
|
+
error
|
|
45490
|
+
}
|
|
45491
|
+
) });
|
|
45492
|
+
}
|
|
45493
|
+
var init_MatchPuzzleBoard = __esm({
|
|
45494
|
+
"components/game/organisms/MatchPuzzleBoard.tsx"() {
|
|
45495
|
+
"use client";
|
|
45496
|
+
init_cn();
|
|
45497
|
+
init_IsometricCanvas();
|
|
45498
|
+
MatchPuzzleBoard.displayName = "MatchPuzzleBoard";
|
|
45499
|
+
}
|
|
45500
|
+
});
|
|
45129
45501
|
var COLUMN_CLASSES, ASPECT_CLASSES, MediaGallery;
|
|
45130
45502
|
var init_MediaGallery = __esm({
|
|
45131
45503
|
"components/core/organisms/MediaGallery.tsx"() {
|
|
@@ -45183,7 +45555,7 @@ var init_MediaGallery = __esm({
|
|
|
45183
45555
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
45184
45556
|
);
|
|
45185
45557
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
45186
|
-
const items =
|
|
45558
|
+
const items = React85__default.useMemo(() => {
|
|
45187
45559
|
if (propItems) return propItems;
|
|
45188
45560
|
if (entityData.length === 0) return [];
|
|
45189
45561
|
return entityData.map((record, idx) => ({
|
|
@@ -45343,8 +45715,50 @@ var init_MediaGallery = __esm({
|
|
|
45343
45715
|
MediaGallery.displayName = "MediaGallery";
|
|
45344
45716
|
}
|
|
45345
45717
|
});
|
|
45718
|
+
function MinigolfBoard({
|
|
45719
|
+
tiles,
|
|
45720
|
+
units,
|
|
45721
|
+
features,
|
|
45722
|
+
assetManifest,
|
|
45723
|
+
assetBaseUrl,
|
|
45724
|
+
scale = 0.45,
|
|
45725
|
+
showMinimap = true,
|
|
45726
|
+
enableCamera = true,
|
|
45727
|
+
tileClickEvent,
|
|
45728
|
+
unitClickEvent,
|
|
45729
|
+
isLoading,
|
|
45730
|
+
error,
|
|
45731
|
+
className
|
|
45732
|
+
}) {
|
|
45733
|
+
return /* @__PURE__ */ jsx("div", { className: cn("minigolf-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
45734
|
+
IsometricCanvas_default,
|
|
45735
|
+
{
|
|
45736
|
+
tileLayout: "isometric",
|
|
45737
|
+
tiles,
|
|
45738
|
+
units,
|
|
45739
|
+
features,
|
|
45740
|
+
assetManifest,
|
|
45741
|
+
assetBaseUrl,
|
|
45742
|
+
scale,
|
|
45743
|
+
showMinimap,
|
|
45744
|
+
enableCamera,
|
|
45745
|
+
tileClickEvent,
|
|
45746
|
+
unitClickEvent,
|
|
45747
|
+
isLoading,
|
|
45748
|
+
error
|
|
45749
|
+
}
|
|
45750
|
+
) });
|
|
45751
|
+
}
|
|
45752
|
+
var init_MinigolfBoard = __esm({
|
|
45753
|
+
"components/game/organisms/MinigolfBoard.tsx"() {
|
|
45754
|
+
"use client";
|
|
45755
|
+
init_cn();
|
|
45756
|
+
init_IsometricCanvas();
|
|
45757
|
+
MinigolfBoard.displayName = "MinigolfBoard";
|
|
45758
|
+
}
|
|
45759
|
+
});
|
|
45346
45760
|
function extractTitle2(children) {
|
|
45347
|
-
if (!
|
|
45761
|
+
if (!React85__default.isValidElement(children)) return void 0;
|
|
45348
45762
|
const props = children.props;
|
|
45349
45763
|
if (typeof props.title === "string") {
|
|
45350
45764
|
return props.title;
|
|
@@ -45560,6 +45974,87 @@ var init_NegotiatorBoard = __esm({
|
|
|
45560
45974
|
NegotiatorBoard.displayName = "NegotiatorBoard";
|
|
45561
45975
|
}
|
|
45562
45976
|
});
|
|
45977
|
+
function PinballBoard({
|
|
45978
|
+
tiles: _tiles,
|
|
45979
|
+
units: _units,
|
|
45980
|
+
features: _features,
|
|
45981
|
+
assetManifest: _assetManifest,
|
|
45982
|
+
assetBaseUrl,
|
|
45983
|
+
scale = 1,
|
|
45984
|
+
showMinimap: _showMinimap = false,
|
|
45985
|
+
enableCamera: _enableCamera = false,
|
|
45986
|
+
tileClickEvent: _tileClickEvent,
|
|
45987
|
+
unitClickEvent: _unitClickEvent,
|
|
45988
|
+
isLoading,
|
|
45989
|
+
error,
|
|
45990
|
+
className
|
|
45991
|
+
}) {
|
|
45992
|
+
if (isLoading) {
|
|
45993
|
+
return /* @__PURE__ */ jsx("div", { className: cn("pinball-board relative w-full h-full flex items-center justify-center", className), children: /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: "Loading..." }) });
|
|
45994
|
+
}
|
|
45995
|
+
if (error) {
|
|
45996
|
+
return /* @__PURE__ */ jsx("div", { className: cn("pinball-board relative w-full h-full flex items-center justify-center", className), children: /* @__PURE__ */ jsx("span", { className: "text-sm text-destructive", children: error.message }) });
|
|
45997
|
+
}
|
|
45998
|
+
return /* @__PURE__ */ jsx("div", { className: cn("pinball-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
45999
|
+
GameCanvas2D,
|
|
46000
|
+
{
|
|
46001
|
+
width: Math.round(400 * scale),
|
|
46002
|
+
height: Math.round(800 * scale),
|
|
46003
|
+
assetBaseUrl,
|
|
46004
|
+
fps: 60
|
|
46005
|
+
}
|
|
46006
|
+
) });
|
|
46007
|
+
}
|
|
46008
|
+
var init_PinballBoard = __esm({
|
|
46009
|
+
"components/game/organisms/PinballBoard.tsx"() {
|
|
46010
|
+
"use client";
|
|
46011
|
+
init_cn();
|
|
46012
|
+
init_GameCanvas2D();
|
|
46013
|
+
PinballBoard.displayName = "PinballBoard";
|
|
46014
|
+
}
|
|
46015
|
+
});
|
|
46016
|
+
function PirateBoard({
|
|
46017
|
+
tiles,
|
|
46018
|
+
units,
|
|
46019
|
+
features,
|
|
46020
|
+
assetManifest,
|
|
46021
|
+
assetBaseUrl,
|
|
46022
|
+
scale = 0.45,
|
|
46023
|
+
showMinimap = true,
|
|
46024
|
+
enableCamera = true,
|
|
46025
|
+
tileClickEvent,
|
|
46026
|
+
unitClickEvent,
|
|
46027
|
+
isLoading,
|
|
46028
|
+
error,
|
|
46029
|
+
className
|
|
46030
|
+
}) {
|
|
46031
|
+
return /* @__PURE__ */ jsx("div", { className: cn("pirate-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
46032
|
+
IsometricCanvas_default,
|
|
46033
|
+
{
|
|
46034
|
+
tileLayout: "flat",
|
|
46035
|
+
tiles,
|
|
46036
|
+
units,
|
|
46037
|
+
features,
|
|
46038
|
+
assetManifest,
|
|
46039
|
+
assetBaseUrl,
|
|
46040
|
+
scale,
|
|
46041
|
+
showMinimap,
|
|
46042
|
+
enableCamera,
|
|
46043
|
+
tileClickEvent,
|
|
46044
|
+
unitClickEvent,
|
|
46045
|
+
isLoading,
|
|
46046
|
+
error
|
|
46047
|
+
}
|
|
46048
|
+
) });
|
|
46049
|
+
}
|
|
46050
|
+
var init_PirateBoard = __esm({
|
|
46051
|
+
"components/game/organisms/PirateBoard.tsx"() {
|
|
46052
|
+
"use client";
|
|
46053
|
+
init_cn();
|
|
46054
|
+
init_IsometricCanvas();
|
|
46055
|
+
PirateBoard.displayName = "PirateBoard";
|
|
46056
|
+
}
|
|
46057
|
+
});
|
|
45563
46058
|
function resolveEntity(entity) {
|
|
45564
46059
|
if (!entity) return {};
|
|
45565
46060
|
if (Array.isArray(entity)) return entity[0] ?? {};
|
|
@@ -45920,6 +46415,37 @@ var init_PricingPageTemplate = __esm({
|
|
|
45920
46415
|
PricingPageTemplate.displayName = "PricingPageTemplate";
|
|
45921
46416
|
}
|
|
45922
46417
|
});
|
|
46418
|
+
function RacingBoard({
|
|
46419
|
+
backgroundImage,
|
|
46420
|
+
assetBaseUrl,
|
|
46421
|
+
width = 800,
|
|
46422
|
+
height = 600,
|
|
46423
|
+
fps = 60,
|
|
46424
|
+
tickEvent,
|
|
46425
|
+
drawEvent,
|
|
46426
|
+
className
|
|
46427
|
+
}) {
|
|
46428
|
+
return /* @__PURE__ */ jsx("div", { className: cn("racing-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
46429
|
+
GameCanvas2D,
|
|
46430
|
+
{
|
|
46431
|
+
backgroundImage,
|
|
46432
|
+
assetBaseUrl,
|
|
46433
|
+
width,
|
|
46434
|
+
height,
|
|
46435
|
+
fps,
|
|
46436
|
+
tickEvent: typeof tickEvent === "string" ? tickEvent : void 0,
|
|
46437
|
+
drawEvent: typeof drawEvent === "string" ? drawEvent : void 0
|
|
46438
|
+
}
|
|
46439
|
+
) });
|
|
46440
|
+
}
|
|
46441
|
+
var init_RacingBoard = __esm({
|
|
46442
|
+
"components/game/organisms/RacingBoard.tsx"() {
|
|
46443
|
+
"use client";
|
|
46444
|
+
init_cn();
|
|
46445
|
+
init_GameCanvas2D();
|
|
46446
|
+
RacingBoard.displayName = "RacingBoard";
|
|
46447
|
+
}
|
|
46448
|
+
});
|
|
45923
46449
|
function resolveManifestUrl3(manifest, relative) {
|
|
45924
46450
|
if (relative == null) return void 0;
|
|
45925
46451
|
if (/^https?:\/\//.test(relative)) return relative;
|
|
@@ -46414,7 +46940,7 @@ var init_debugRegistry = __esm({
|
|
|
46414
46940
|
}
|
|
46415
46941
|
});
|
|
46416
46942
|
function useDebugData() {
|
|
46417
|
-
const [data, setData] =
|
|
46943
|
+
const [data, setData] = React85.useState(() => ({
|
|
46418
46944
|
traits: [],
|
|
46419
46945
|
ticks: [],
|
|
46420
46946
|
guards: [],
|
|
@@ -46428,7 +46954,7 @@ function useDebugData() {
|
|
|
46428
46954
|
},
|
|
46429
46955
|
lastUpdate: Date.now()
|
|
46430
46956
|
}));
|
|
46431
|
-
|
|
46957
|
+
React85.useEffect(() => {
|
|
46432
46958
|
const updateData = () => {
|
|
46433
46959
|
setData({
|
|
46434
46960
|
traits: getAllTraits(),
|
|
@@ -46537,12 +47063,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
46537
47063
|
return positions;
|
|
46538
47064
|
}
|
|
46539
47065
|
function WalkMinimap() {
|
|
46540
|
-
const [walkStep, setWalkStep] =
|
|
46541
|
-
const [traits2, setTraits] =
|
|
46542
|
-
const [coveredEdges, setCoveredEdges] =
|
|
46543
|
-
const [completedTraits, setCompletedTraits] =
|
|
46544
|
-
const prevTraitRef =
|
|
46545
|
-
|
|
47066
|
+
const [walkStep, setWalkStep] = React85.useState(null);
|
|
47067
|
+
const [traits2, setTraits] = React85.useState([]);
|
|
47068
|
+
const [coveredEdges, setCoveredEdges] = React85.useState([]);
|
|
47069
|
+
const [completedTraits, setCompletedTraits] = React85.useState(/* @__PURE__ */ new Set());
|
|
47070
|
+
const prevTraitRef = React85.useRef(null);
|
|
47071
|
+
React85.useEffect(() => {
|
|
46546
47072
|
const interval = setInterval(() => {
|
|
46547
47073
|
const w = window;
|
|
46548
47074
|
const step = w.__orbitalWalkStep;
|
|
@@ -46978,15 +47504,15 @@ var init_EntitiesTab = __esm({
|
|
|
46978
47504
|
});
|
|
46979
47505
|
function EventFlowTab({ events: events2 }) {
|
|
46980
47506
|
const { t } = useTranslate();
|
|
46981
|
-
const [filter, setFilter] =
|
|
46982
|
-
const containerRef =
|
|
46983
|
-
const [autoScroll, setAutoScroll] =
|
|
46984
|
-
|
|
47507
|
+
const [filter, setFilter] = React85.useState("all");
|
|
47508
|
+
const containerRef = React85.useRef(null);
|
|
47509
|
+
const [autoScroll, setAutoScroll] = React85.useState(true);
|
|
47510
|
+
React85.useEffect(() => {
|
|
46985
47511
|
if (autoScroll && containerRef.current) {
|
|
46986
47512
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
46987
47513
|
}
|
|
46988
47514
|
}, [events2.length, autoScroll]);
|
|
46989
|
-
const filteredEvents =
|
|
47515
|
+
const filteredEvents = React85.useMemo(() => {
|
|
46990
47516
|
if (filter === "all") return events2;
|
|
46991
47517
|
return events2.filter((e) => e.type === filter);
|
|
46992
47518
|
}, [events2, filter]);
|
|
@@ -47102,7 +47628,7 @@ var init_EventFlowTab = __esm({
|
|
|
47102
47628
|
});
|
|
47103
47629
|
function GuardsPanel({ guards }) {
|
|
47104
47630
|
const { t } = useTranslate();
|
|
47105
|
-
const [filter, setFilter] =
|
|
47631
|
+
const [filter, setFilter] = React85.useState("all");
|
|
47106
47632
|
if (guards.length === 0) {
|
|
47107
47633
|
return /* @__PURE__ */ jsx(
|
|
47108
47634
|
EmptyState,
|
|
@@ -47115,7 +47641,7 @@ function GuardsPanel({ guards }) {
|
|
|
47115
47641
|
}
|
|
47116
47642
|
const passedCount = guards.filter((g) => g.result).length;
|
|
47117
47643
|
const failedCount = guards.length - passedCount;
|
|
47118
|
-
const filteredGuards =
|
|
47644
|
+
const filteredGuards = React85.useMemo(() => {
|
|
47119
47645
|
if (filter === "all") return guards;
|
|
47120
47646
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
47121
47647
|
return guards.filter((g) => !g.result);
|
|
@@ -47278,10 +47804,10 @@ function EffectBadge({ effect }) {
|
|
|
47278
47804
|
}
|
|
47279
47805
|
function TransitionTimeline({ transitions }) {
|
|
47280
47806
|
const { t } = useTranslate();
|
|
47281
|
-
const containerRef =
|
|
47282
|
-
const [autoScroll, setAutoScroll] =
|
|
47283
|
-
const [expandedId, setExpandedId] =
|
|
47284
|
-
|
|
47807
|
+
const containerRef = React85.useRef(null);
|
|
47808
|
+
const [autoScroll, setAutoScroll] = React85.useState(true);
|
|
47809
|
+
const [expandedId, setExpandedId] = React85.useState(null);
|
|
47810
|
+
React85.useEffect(() => {
|
|
47285
47811
|
if (autoScroll && containerRef.current) {
|
|
47286
47812
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
47287
47813
|
}
|
|
@@ -47561,9 +48087,9 @@ function getAllEvents(traits2) {
|
|
|
47561
48087
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
47562
48088
|
const eventBus = useEventBus();
|
|
47563
48089
|
const { t } = useTranslate();
|
|
47564
|
-
const [log14, setLog] =
|
|
47565
|
-
const prevStatesRef =
|
|
47566
|
-
|
|
48090
|
+
const [log14, setLog] = React85.useState([]);
|
|
48091
|
+
const prevStatesRef = React85.useRef(/* @__PURE__ */ new Map());
|
|
48092
|
+
React85.useEffect(() => {
|
|
47567
48093
|
for (const trait of traits2) {
|
|
47568
48094
|
const prev = prevStatesRef.current.get(trait.id);
|
|
47569
48095
|
if (prev && prev !== trait.currentState) {
|
|
@@ -47732,10 +48258,10 @@ function VerifyModePanel({
|
|
|
47732
48258
|
localCount
|
|
47733
48259
|
}) {
|
|
47734
48260
|
const { t } = useTranslate();
|
|
47735
|
-
const [expanded, setExpanded] =
|
|
47736
|
-
const scrollRef =
|
|
47737
|
-
const prevCountRef =
|
|
47738
|
-
|
|
48261
|
+
const [expanded, setExpanded] = React85.useState(true);
|
|
48262
|
+
const scrollRef = React85.useRef(null);
|
|
48263
|
+
const prevCountRef = React85.useRef(0);
|
|
48264
|
+
React85.useEffect(() => {
|
|
47739
48265
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
47740
48266
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
47741
48267
|
}
|
|
@@ -47792,10 +48318,10 @@ function RuntimeDebugger({
|
|
|
47792
48318
|
schema
|
|
47793
48319
|
}) {
|
|
47794
48320
|
const { t } = useTranslate();
|
|
47795
|
-
const [isCollapsed, setIsCollapsed] =
|
|
47796
|
-
const [isVisible, setIsVisible] =
|
|
48321
|
+
const [isCollapsed, setIsCollapsed] = React85.useState(mode === "verify" ? true : defaultCollapsed);
|
|
48322
|
+
const [isVisible, setIsVisible] = React85.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
47797
48323
|
const debugData = useDebugData();
|
|
47798
|
-
|
|
48324
|
+
React85.useEffect(() => {
|
|
47799
48325
|
if (mode === "inline") return;
|
|
47800
48326
|
return onDebugToggle((enabled) => {
|
|
47801
48327
|
setIsVisible(enabled);
|
|
@@ -47804,7 +48330,7 @@ function RuntimeDebugger({
|
|
|
47804
48330
|
}
|
|
47805
48331
|
});
|
|
47806
48332
|
}, [mode]);
|
|
47807
|
-
|
|
48333
|
+
React85.useEffect(() => {
|
|
47808
48334
|
if (mode === "inline") return;
|
|
47809
48335
|
const handleKeyDown = (e) => {
|
|
47810
48336
|
if (e.key === "`" && isVisible) {
|
|
@@ -48364,7 +48890,7 @@ function SequenceBar({
|
|
|
48364
48890
|
onSlotRemove(index);
|
|
48365
48891
|
}, [onSlotRemove, playing]);
|
|
48366
48892
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
48367
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
48893
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
48368
48894
|
i > 0 && /* @__PURE__ */ jsx(
|
|
48369
48895
|
Typography,
|
|
48370
48896
|
{
|
|
@@ -49125,6 +49651,123 @@ var init_SimulatorBoard = __esm({
|
|
|
49125
49651
|
SimulatorBoard.displayName = "SimulatorBoard";
|
|
49126
49652
|
}
|
|
49127
49653
|
});
|
|
49654
|
+
function SokobanBoard({
|
|
49655
|
+
tiles,
|
|
49656
|
+
units,
|
|
49657
|
+
features,
|
|
49658
|
+
assetManifest,
|
|
49659
|
+
assetBaseUrl,
|
|
49660
|
+
scale = 0.45,
|
|
49661
|
+
showMinimap = false,
|
|
49662
|
+
enableCamera = false,
|
|
49663
|
+
tileClickEvent,
|
|
49664
|
+
unitClickEvent,
|
|
49665
|
+
isLoading,
|
|
49666
|
+
error,
|
|
49667
|
+
className
|
|
49668
|
+
}) {
|
|
49669
|
+
return /* @__PURE__ */ jsx("div", { className: cn("sokoban-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
49670
|
+
IsometricCanvas_default,
|
|
49671
|
+
{
|
|
49672
|
+
tileLayout: "flat",
|
|
49673
|
+
tiles,
|
|
49674
|
+
units,
|
|
49675
|
+
features,
|
|
49676
|
+
assetManifest,
|
|
49677
|
+
assetBaseUrl,
|
|
49678
|
+
scale,
|
|
49679
|
+
showMinimap,
|
|
49680
|
+
enableCamera,
|
|
49681
|
+
tileClickEvent,
|
|
49682
|
+
unitClickEvent,
|
|
49683
|
+
isLoading,
|
|
49684
|
+
error
|
|
49685
|
+
}
|
|
49686
|
+
) });
|
|
49687
|
+
}
|
|
49688
|
+
var init_SokobanBoard = __esm({
|
|
49689
|
+
"components/game/organisms/SokobanBoard.tsx"() {
|
|
49690
|
+
"use client";
|
|
49691
|
+
init_cn();
|
|
49692
|
+
init_IsometricCanvas();
|
|
49693
|
+
SokobanBoard.displayName = "SokobanBoard";
|
|
49694
|
+
}
|
|
49695
|
+
});
|
|
49696
|
+
function SpaceShmupBoard({
|
|
49697
|
+
backgroundImage,
|
|
49698
|
+
assetBaseUrl,
|
|
49699
|
+
width = 800,
|
|
49700
|
+
height = 600,
|
|
49701
|
+
fps = 60,
|
|
49702
|
+
isLoading,
|
|
49703
|
+
error,
|
|
49704
|
+
className
|
|
49705
|
+
}) {
|
|
49706
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("space-shmup-board relative w-full h-full", className), children: [
|
|
49707
|
+
isLoading && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/60 z-10", children: /* @__PURE__ */ jsx("span", { className: "text-white text-sm", children: "Loading\u2026" }) }),
|
|
49708
|
+
error && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-red-900/60 z-10", children: /* @__PURE__ */ jsx("span", { className: "text-white text-sm", children: error.message }) }),
|
|
49709
|
+
/* @__PURE__ */ jsx(
|
|
49710
|
+
GameCanvas2D,
|
|
49711
|
+
{
|
|
49712
|
+
backgroundImage,
|
|
49713
|
+
assetBaseUrl,
|
|
49714
|
+
width,
|
|
49715
|
+
height,
|
|
49716
|
+
fps
|
|
49717
|
+
}
|
|
49718
|
+
)
|
|
49719
|
+
] });
|
|
49720
|
+
}
|
|
49721
|
+
var init_SpaceShmupBoard = __esm({
|
|
49722
|
+
"components/game/organisms/SpaceShmupBoard.tsx"() {
|
|
49723
|
+
"use client";
|
|
49724
|
+
init_cn();
|
|
49725
|
+
init_GameCanvas2D();
|
|
49726
|
+
SpaceShmupBoard.displayName = "SpaceShmupBoard";
|
|
49727
|
+
}
|
|
49728
|
+
});
|
|
49729
|
+
function SpaceStationBoard({
|
|
49730
|
+
tiles,
|
|
49731
|
+
units,
|
|
49732
|
+
features,
|
|
49733
|
+
assetManifest,
|
|
49734
|
+
assetBaseUrl,
|
|
49735
|
+
scale = 0.45,
|
|
49736
|
+
showMinimap = true,
|
|
49737
|
+
enableCamera = true,
|
|
49738
|
+
tileClickEvent,
|
|
49739
|
+
unitClickEvent,
|
|
49740
|
+
isLoading,
|
|
49741
|
+
error,
|
|
49742
|
+
className
|
|
49743
|
+
}) {
|
|
49744
|
+
return /* @__PURE__ */ jsx("div", { className: cn("space-station-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
49745
|
+
IsometricCanvas_default,
|
|
49746
|
+
{
|
|
49747
|
+
tileLayout: "isometric",
|
|
49748
|
+
tiles,
|
|
49749
|
+
units,
|
|
49750
|
+
features,
|
|
49751
|
+
assetManifest,
|
|
49752
|
+
assetBaseUrl,
|
|
49753
|
+
scale,
|
|
49754
|
+
showMinimap,
|
|
49755
|
+
enableCamera,
|
|
49756
|
+
tileClickEvent,
|
|
49757
|
+
unitClickEvent,
|
|
49758
|
+
isLoading,
|
|
49759
|
+
error
|
|
49760
|
+
}
|
|
49761
|
+
) });
|
|
49762
|
+
}
|
|
49763
|
+
var init_SpaceStationBoard = __esm({
|
|
49764
|
+
"components/game/organisms/SpaceStationBoard.tsx"() {
|
|
49765
|
+
"use client";
|
|
49766
|
+
init_cn();
|
|
49767
|
+
init_IsometricCanvas();
|
|
49768
|
+
SpaceStationBoard.displayName = "SpaceStationBoard";
|
|
49769
|
+
}
|
|
49770
|
+
});
|
|
49128
49771
|
var SplitPane;
|
|
49129
49772
|
var init_SplitPane = __esm({
|
|
49130
49773
|
"components/core/organisms/layout/SplitPane.tsx"() {
|
|
@@ -49218,6 +49861,48 @@ var init_SplitPane = __esm({
|
|
|
49218
49861
|
SplitPane.displayName = "SplitPane";
|
|
49219
49862
|
}
|
|
49220
49863
|
});
|
|
49864
|
+
function SportsBoard({
|
|
49865
|
+
tiles,
|
|
49866
|
+
units,
|
|
49867
|
+
features,
|
|
49868
|
+
assetManifest,
|
|
49869
|
+
assetBaseUrl,
|
|
49870
|
+
scale = 0.45,
|
|
49871
|
+
showMinimap = false,
|
|
49872
|
+
enableCamera = true,
|
|
49873
|
+
tileClickEvent,
|
|
49874
|
+
unitClickEvent,
|
|
49875
|
+
isLoading,
|
|
49876
|
+
error,
|
|
49877
|
+
className
|
|
49878
|
+
}) {
|
|
49879
|
+
return /* @__PURE__ */ jsx("div", { className: cn("sports-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
49880
|
+
IsometricCanvas_default,
|
|
49881
|
+
{
|
|
49882
|
+
tileLayout: "flat",
|
|
49883
|
+
tiles,
|
|
49884
|
+
units,
|
|
49885
|
+
features,
|
|
49886
|
+
assetManifest,
|
|
49887
|
+
assetBaseUrl,
|
|
49888
|
+
scale,
|
|
49889
|
+
showMinimap,
|
|
49890
|
+
enableCamera,
|
|
49891
|
+
tileClickEvent,
|
|
49892
|
+
unitClickEvent,
|
|
49893
|
+
isLoading,
|
|
49894
|
+
error
|
|
49895
|
+
}
|
|
49896
|
+
) });
|
|
49897
|
+
}
|
|
49898
|
+
var init_SportsBoard = __esm({
|
|
49899
|
+
"components/game/organisms/SportsBoard.tsx"() {
|
|
49900
|
+
"use client";
|
|
49901
|
+
init_cn();
|
|
49902
|
+
init_IsometricCanvas();
|
|
49903
|
+
SportsBoard.displayName = "SportsBoard";
|
|
49904
|
+
}
|
|
49905
|
+
});
|
|
49221
49906
|
var StatCard;
|
|
49222
49907
|
var init_StatCard = __esm({
|
|
49223
49908
|
"components/core/organisms/StatCard.tsx"() {
|
|
@@ -49256,7 +49941,7 @@ var init_StatCard = __esm({
|
|
|
49256
49941
|
const labelToUse = propLabel ?? propTitle;
|
|
49257
49942
|
const eventBus = useEventBus();
|
|
49258
49943
|
const { t } = useTranslate();
|
|
49259
|
-
const handleActionClick =
|
|
49944
|
+
const handleActionClick = React85__default.useCallback(() => {
|
|
49260
49945
|
if (action?.event) {
|
|
49261
49946
|
eventBus.emit(`UI:${action.event}`, {});
|
|
49262
49947
|
}
|
|
@@ -49267,7 +49952,7 @@ var init_StatCard = __esm({
|
|
|
49267
49952
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
49268
49953
|
const isLoading = externalLoading ?? false;
|
|
49269
49954
|
const error = externalError;
|
|
49270
|
-
const computeMetricValue =
|
|
49955
|
+
const computeMetricValue = React85__default.useCallback(
|
|
49271
49956
|
(metric, items) => {
|
|
49272
49957
|
if (metric.value !== void 0) {
|
|
49273
49958
|
return metric.value;
|
|
@@ -49306,7 +49991,7 @@ var init_StatCard = __esm({
|
|
|
49306
49991
|
},
|
|
49307
49992
|
[]
|
|
49308
49993
|
);
|
|
49309
|
-
const schemaStats =
|
|
49994
|
+
const schemaStats = React85__default.useMemo(() => {
|
|
49310
49995
|
if (!metrics || metrics.length === 0) return null;
|
|
49311
49996
|
return metrics.map((metric) => ({
|
|
49312
49997
|
label: metric.label,
|
|
@@ -49314,7 +49999,7 @@ var init_StatCard = __esm({
|
|
|
49314
49999
|
format: metric.format
|
|
49315
50000
|
}));
|
|
49316
50001
|
}, [metrics, data, computeMetricValue]);
|
|
49317
|
-
const calculatedTrend =
|
|
50002
|
+
const calculatedTrend = React85__default.useMemo(() => {
|
|
49318
50003
|
if (manualTrend !== void 0) return manualTrend;
|
|
49319
50004
|
if (previousValue === void 0 || currentValue === void 0)
|
|
49320
50005
|
return void 0;
|
|
@@ -50063,6 +50748,832 @@ var init_StepFlowOrganism = __esm({
|
|
|
50063
50748
|
StepFlowOrganism.displayName = "StepFlowOrganism";
|
|
50064
50749
|
}
|
|
50065
50750
|
});
|
|
50751
|
+
|
|
50752
|
+
// components/core/molecules/markdown/index.ts
|
|
50753
|
+
var init_markdown = __esm({
|
|
50754
|
+
"components/core/molecules/markdown/index.ts"() {
|
|
50755
|
+
init_MarkdownContent();
|
|
50756
|
+
init_CodeBlock();
|
|
50757
|
+
}
|
|
50758
|
+
});
|
|
50759
|
+
function groupByOrbital(subagents) {
|
|
50760
|
+
const map = /* @__PURE__ */ new Map();
|
|
50761
|
+
for (const sub of subagents) {
|
|
50762
|
+
const key = sub.orbitalName ?? "(unattached)";
|
|
50763
|
+
const arr = map.get(key) ?? [];
|
|
50764
|
+
arr.push(sub);
|
|
50765
|
+
map.set(key, arr);
|
|
50766
|
+
}
|
|
50767
|
+
return map;
|
|
50768
|
+
}
|
|
50769
|
+
function statusIconName(status) {
|
|
50770
|
+
switch (status) {
|
|
50771
|
+
case "running":
|
|
50772
|
+
return "loader";
|
|
50773
|
+
case "complete":
|
|
50774
|
+
return "check";
|
|
50775
|
+
case "error":
|
|
50776
|
+
return "x";
|
|
50777
|
+
default:
|
|
50778
|
+
return "circle";
|
|
50779
|
+
}
|
|
50780
|
+
}
|
|
50781
|
+
function lastMessage(sub) {
|
|
50782
|
+
if (sub.messages.length === 0) return void 0;
|
|
50783
|
+
return sub.messages[sub.messages.length - 1].message;
|
|
50784
|
+
}
|
|
50785
|
+
function formatHHMMSS(ts) {
|
|
50786
|
+
const d = new Date(ts);
|
|
50787
|
+
const hh = String(d.getHours()).padStart(2, "0");
|
|
50788
|
+
const mm = String(d.getMinutes()).padStart(2, "0");
|
|
50789
|
+
const ss = String(d.getSeconds()).padStart(2, "0");
|
|
50790
|
+
return `${hh}:${mm}:${ss}`;
|
|
50791
|
+
}
|
|
50792
|
+
function compactJson(value) {
|
|
50793
|
+
if (value === void 0 || value === null) return "";
|
|
50794
|
+
if (typeof value === "string") return value;
|
|
50795
|
+
try {
|
|
50796
|
+
const json = JSON.stringify(value);
|
|
50797
|
+
if (json.length <= 240) return json;
|
|
50798
|
+
return json.slice(0, 239) + "\u2026";
|
|
50799
|
+
} catch {
|
|
50800
|
+
return String(value);
|
|
50801
|
+
}
|
|
50802
|
+
}
|
|
50803
|
+
function tryPrettyJson(s) {
|
|
50804
|
+
try {
|
|
50805
|
+
return JSON.stringify(JSON.parse(s), null, 2);
|
|
50806
|
+
} catch {
|
|
50807
|
+
return null;
|
|
50808
|
+
}
|
|
50809
|
+
}
|
|
50810
|
+
function summarizeArgs(args) {
|
|
50811
|
+
const keys = Object.keys(args);
|
|
50812
|
+
if (keys.length === 0) return "";
|
|
50813
|
+
return keys.slice(0, 3).join(", ") + (keys.length > 3 ? ", \u2026" : "");
|
|
50814
|
+
}
|
|
50815
|
+
function previewText(text, max = 120) {
|
|
50816
|
+
if (!text) return "";
|
|
50817
|
+
return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
|
|
50818
|
+
}
|
|
50819
|
+
function coordinatorToActivityItems(activities) {
|
|
50820
|
+
return activities.flatMap((a) => {
|
|
50821
|
+
switch (a.type) {
|
|
50822
|
+
case "tool_call":
|
|
50823
|
+
return [{
|
|
50824
|
+
type: "tool_call",
|
|
50825
|
+
tool: a.tool,
|
|
50826
|
+
args: a.args,
|
|
50827
|
+
timestamp: a.timestamp
|
|
50828
|
+
}];
|
|
50829
|
+
case "tool_result":
|
|
50830
|
+
return [{
|
|
50831
|
+
type: "tool_result",
|
|
50832
|
+
tool: a.tool,
|
|
50833
|
+
result: a.result,
|
|
50834
|
+
success: a.success,
|
|
50835
|
+
timestamp: a.timestamp
|
|
50836
|
+
}];
|
|
50837
|
+
case "message":
|
|
50838
|
+
return [{
|
|
50839
|
+
type: "message",
|
|
50840
|
+
role: a.role,
|
|
50841
|
+
content: a.content,
|
|
50842
|
+
timestamp: a.timestamp
|
|
50843
|
+
}];
|
|
50844
|
+
case "error":
|
|
50845
|
+
return [{
|
|
50846
|
+
type: "message",
|
|
50847
|
+
role: "system",
|
|
50848
|
+
content: `Error: ${a.message}`,
|
|
50849
|
+
timestamp: a.timestamp
|
|
50850
|
+
}];
|
|
50851
|
+
case "coordinator_decision":
|
|
50852
|
+
case "plan_committed":
|
|
50853
|
+
case "pending_question":
|
|
50854
|
+
case "clarification_question":
|
|
50855
|
+
return [];
|
|
50856
|
+
case "file_operation":
|
|
50857
|
+
return [{
|
|
50858
|
+
type: "file_operation",
|
|
50859
|
+
operation: a.operation,
|
|
50860
|
+
path: a.path,
|
|
50861
|
+
success: a.success,
|
|
50862
|
+
timestamp: a.timestamp
|
|
50863
|
+
}];
|
|
50864
|
+
case "schema_diff":
|
|
50865
|
+
return [{
|
|
50866
|
+
type: "schema_diff",
|
|
50867
|
+
filePath: a.filePath,
|
|
50868
|
+
hunks: a.hunks,
|
|
50869
|
+
timestamp: a.timestamp
|
|
50870
|
+
}];
|
|
50871
|
+
}
|
|
50872
|
+
});
|
|
50873
|
+
}
|
|
50874
|
+
function pluckCoordinatorState(activities) {
|
|
50875
|
+
let decision = null;
|
|
50876
|
+
let plan = null;
|
|
50877
|
+
const pendingQuestions = [];
|
|
50878
|
+
for (const a of activities) {
|
|
50879
|
+
if (a.type === "coordinator_decision") decision = a;
|
|
50880
|
+
else if (a.type === "plan_committed") plan = a;
|
|
50881
|
+
else if (a.type === "pending_question") pendingQuestions.push(a);
|
|
50882
|
+
}
|
|
50883
|
+
return { decision, plan, pendingQuestions };
|
|
50884
|
+
}
|
|
50885
|
+
function subagentMessagesToActivities(messages) {
|
|
50886
|
+
return messages.map((m) => {
|
|
50887
|
+
if (m.tool) {
|
|
50888
|
+
return {
|
|
50889
|
+
type: "tool_call",
|
|
50890
|
+
tool: m.tool,
|
|
50891
|
+
args: { preview: m.message },
|
|
50892
|
+
timestamp: m.timestamp
|
|
50893
|
+
};
|
|
50894
|
+
}
|
|
50895
|
+
return {
|
|
50896
|
+
type: "message",
|
|
50897
|
+
role: "system",
|
|
50898
|
+
content: m.message,
|
|
50899
|
+
timestamp: m.timestamp
|
|
50900
|
+
};
|
|
50901
|
+
});
|
|
50902
|
+
}
|
|
50903
|
+
function buildTimelineItems(messages, activities, subagents) {
|
|
50904
|
+
const items = [];
|
|
50905
|
+
if (messages) {
|
|
50906
|
+
messages.forEach((m, i) => items.push({ source: "message", data: m, index: i }));
|
|
50907
|
+
}
|
|
50908
|
+
if (activities) {
|
|
50909
|
+
activities.forEach((a) => items.push({ source: "activity", data: a }));
|
|
50910
|
+
}
|
|
50911
|
+
subagents.forEach((s) => items.push({ source: "subagent", data: s }));
|
|
50912
|
+
return items;
|
|
50913
|
+
}
|
|
50914
|
+
function timelineItemIcon(item) {
|
|
50915
|
+
switch (item.source) {
|
|
50916
|
+
case "message": {
|
|
50917
|
+
const m = item.data;
|
|
50918
|
+
if (m.role === "tool") return { name: "terminal", color: "text-[var(--color-primary)]" };
|
|
50919
|
+
if (m.reasoningContent) return { name: "sparkles", color: "text-[var(--color-primary)]" };
|
|
50920
|
+
if (m.role === "user") return { name: "user", color: "text-[var(--color-primary)]" };
|
|
50921
|
+
return { name: "message-square", color: "text-[var(--color-muted-foreground)]" };
|
|
50922
|
+
}
|
|
50923
|
+
case "activity": {
|
|
50924
|
+
const a = item.data;
|
|
50925
|
+
switch (a.type) {
|
|
50926
|
+
case "tool_call":
|
|
50927
|
+
return { name: "terminal", color: "text-[var(--color-primary)]" };
|
|
50928
|
+
case "tool_result":
|
|
50929
|
+
return { name: a.success !== false ? "check" : "x", color: a.success !== false ? "text-[var(--color-success)]" : "text-[var(--color-danger)]" };
|
|
50930
|
+
case "error":
|
|
50931
|
+
return { name: "alert-triangle", color: "text-[var(--color-danger)]" };
|
|
50932
|
+
case "file_operation":
|
|
50933
|
+
return { name: "file", color: "text-[var(--color-muted-foreground)]" };
|
|
50934
|
+
case "schema_diff":
|
|
50935
|
+
return { name: "git-commit", color: "text-[var(--color-muted-foreground)]" };
|
|
50936
|
+
default:
|
|
50937
|
+
return { name: "info", color: "text-[var(--color-muted-foreground)]" };
|
|
50938
|
+
}
|
|
50939
|
+
}
|
|
50940
|
+
case "subagent":
|
|
50941
|
+
return { name: "bot", color: "text-[var(--color-primary)]" };
|
|
50942
|
+
}
|
|
50943
|
+
}
|
|
50944
|
+
function timelineItemLabel(item) {
|
|
50945
|
+
switch (item.source) {
|
|
50946
|
+
case "message": {
|
|
50947
|
+
const m = item.data;
|
|
50948
|
+
if (m.role === "tool") return "tool";
|
|
50949
|
+
if (m.reasoningContent) return "thinking";
|
|
50950
|
+
return m.role;
|
|
50951
|
+
}
|
|
50952
|
+
case "activity":
|
|
50953
|
+
return item.data.type;
|
|
50954
|
+
case "subagent":
|
|
50955
|
+
return "subagent";
|
|
50956
|
+
}
|
|
50957
|
+
}
|
|
50958
|
+
function timelineItemPreview(item) {
|
|
50959
|
+
switch (item.source) {
|
|
50960
|
+
case "message": {
|
|
50961
|
+
const m = item.data;
|
|
50962
|
+
if (m.role === "tool") return `${m.toolName ?? "tool"} \u2192 ${m.toolCallId?.slice(0, 8) ?? ""}`;
|
|
50963
|
+
if (m.reasoningContent) return previewText(m.reasoningContent, 120);
|
|
50964
|
+
return previewText(m.content, 120);
|
|
50965
|
+
}
|
|
50966
|
+
case "activity": {
|
|
50967
|
+
const a = item.data;
|
|
50968
|
+
switch (a.type) {
|
|
50969
|
+
case "tool_call":
|
|
50970
|
+
return `${a.tool}(${summarizeArgs(a.args)})`;
|
|
50971
|
+
case "tool_result":
|
|
50972
|
+
return `${a.tool}: ${compactJson(a.result)}`;
|
|
50973
|
+
case "message":
|
|
50974
|
+
return previewText(a.content, 120);
|
|
50975
|
+
case "error":
|
|
50976
|
+
return previewText(a.message, 120);
|
|
50977
|
+
case "file_operation":
|
|
50978
|
+
return `${a.operation} ${a.path}`;
|
|
50979
|
+
case "schema_diff":
|
|
50980
|
+
return `diff ${a.filePath}`;
|
|
50981
|
+
default:
|
|
50982
|
+
return String(a.type);
|
|
50983
|
+
}
|
|
50984
|
+
}
|
|
50985
|
+
case "subagent":
|
|
50986
|
+
return `${item.data.name} \xB7 ${item.data.task}`;
|
|
50987
|
+
}
|
|
50988
|
+
}
|
|
50989
|
+
function timelineItemTimeLabel(item) {
|
|
50990
|
+
if (item.source === "activity") return formatHHMMSS(item.data.timestamp);
|
|
50991
|
+
if (item.source === "subagent") {
|
|
50992
|
+
const ts = item.data.messages[0]?.timestamp;
|
|
50993
|
+
return ts !== void 0 ? formatHHMMSS(ts) : void 0;
|
|
50994
|
+
}
|
|
50995
|
+
return void 0;
|
|
50996
|
+
}
|
|
50997
|
+
function TraceDetailContent({ item }) {
|
|
50998
|
+
const { t } = useTranslate();
|
|
50999
|
+
switch (item.source) {
|
|
51000
|
+
case "message": {
|
|
51001
|
+
const m = item.data;
|
|
51002
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51003
|
+
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "items-center", children: /* @__PURE__ */ jsx(Badge, { variant: roleBadgeVariant[m.role], className: "text-[10px] uppercase", children: m.role }) }),
|
|
51004
|
+
typeof m.reasoningContent === "string" && m.reasoningContent.length > 0 && /* @__PURE__ */ jsxs(Box, { children: [
|
|
51005
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "mb-1", children: t("subagentTrace.reasoning") }),
|
|
51006
|
+
/* @__PURE__ */ jsx(MarkdownContent, { content: m.reasoningContent })
|
|
51007
|
+
] }),
|
|
51008
|
+
m.content.length > 0 && /* @__PURE__ */ jsxs(Box, { children: [
|
|
51009
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "mb-1", children: t("subagentTrace.content") }),
|
|
51010
|
+
m.role === "tool" ? (() => {
|
|
51011
|
+
const pretty = tryPrettyJson(m.content);
|
|
51012
|
+
return pretty !== null ? /* @__PURE__ */ jsx(CodeBlock, { code: pretty, language: "json", maxHeight: "24rem" }) : /* @__PURE__ */ jsx(Typography, { variant: "body", className: "whitespace-pre-wrap font-mono text-[11px]", children: m.content });
|
|
51013
|
+
})() : /* @__PURE__ */ jsx(MarkdownContent, { content: m.content })
|
|
51014
|
+
] }),
|
|
51015
|
+
Array.isArray(m.toolCalls) && m.toolCalls.length > 0 && /* @__PURE__ */ jsxs(Box, { children: [
|
|
51016
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "mb-1", children: t("subagentTrace.toolCalls") }),
|
|
51017
|
+
/* @__PURE__ */ jsx(
|
|
51018
|
+
Accordion,
|
|
51019
|
+
{
|
|
51020
|
+
multiple: true,
|
|
51021
|
+
items: m.toolCalls.map((tc, i) => ({
|
|
51022
|
+
id: `tc-detail-${i}`,
|
|
51023
|
+
title: `${tc.name}(${summarizeArgs(tc.args)})`,
|
|
51024
|
+
content: /* @__PURE__ */ jsx(CodeBlock, { code: JSON.stringify(tc.args, null, 2), language: "json", maxHeight: "24rem" })
|
|
51025
|
+
}))
|
|
51026
|
+
}
|
|
51027
|
+
)
|
|
51028
|
+
] })
|
|
51029
|
+
] });
|
|
51030
|
+
}
|
|
51031
|
+
case "activity": {
|
|
51032
|
+
const a = item.data;
|
|
51033
|
+
switch (a.type) {
|
|
51034
|
+
case "tool_call":
|
|
51035
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51036
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51037
|
+
/* @__PURE__ */ jsx(Badge, { variant: "default", className: "text-[10px]", children: "tool_call" }),
|
|
51038
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
51039
|
+
] }),
|
|
51040
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: a.tool }),
|
|
51041
|
+
/* @__PURE__ */ jsx(CodeBlock, { code: JSON.stringify(a.args, null, 2), language: "json", maxHeight: "60vh" })
|
|
51042
|
+
] });
|
|
51043
|
+
case "tool_result":
|
|
51044
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51045
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51046
|
+
/* @__PURE__ */ jsx(Badge, { variant: a.success !== false ? "default" : "warning", className: "text-[10px]", children: a.success !== false ? "success" : "fail" }),
|
|
51047
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
51048
|
+
] }),
|
|
51049
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: a.tool }),
|
|
51050
|
+
/* @__PURE__ */ jsx(CodeBlock, { code: JSON.stringify(a.result, null, 2), language: "json", maxHeight: "60vh" })
|
|
51051
|
+
] });
|
|
51052
|
+
case "message":
|
|
51053
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51054
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51055
|
+
/* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: a.role }),
|
|
51056
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
51057
|
+
] }),
|
|
51058
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "whitespace-pre-wrap", children: a.content })
|
|
51059
|
+
] });
|
|
51060
|
+
case "error":
|
|
51061
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51062
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51063
|
+
/* @__PURE__ */ jsx(Badge, { variant: "warning", className: "text-[10px]", children: "error" }),
|
|
51064
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
51065
|
+
] }),
|
|
51066
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "whitespace-pre-wrap text-[var(--color-danger)]", children: a.message })
|
|
51067
|
+
] });
|
|
51068
|
+
case "file_operation":
|
|
51069
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51070
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51071
|
+
/* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: "file" }),
|
|
51072
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
51073
|
+
] }),
|
|
51074
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "body2", children: [
|
|
51075
|
+
a.operation,
|
|
51076
|
+
" ",
|
|
51077
|
+
a.path
|
|
51078
|
+
] })
|
|
51079
|
+
] });
|
|
51080
|
+
case "schema_diff":
|
|
51081
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51082
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51083
|
+
/* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: "diff" }),
|
|
51084
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
51085
|
+
] }),
|
|
51086
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: a.filePath })
|
|
51087
|
+
] });
|
|
51088
|
+
default:
|
|
51089
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51090
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) }),
|
|
51091
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: String(a.type) })
|
|
51092
|
+
] });
|
|
51093
|
+
}
|
|
51094
|
+
}
|
|
51095
|
+
case "subagent": {
|
|
51096
|
+
const s = item.data;
|
|
51097
|
+
const activities = subagentMessagesToActivities(s.messages);
|
|
51098
|
+
const ts = s.messages[0]?.timestamp;
|
|
51099
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51100
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51101
|
+
/* @__PURE__ */ jsx(Badge, { variant: "default", className: "text-[10px]", children: s.role }),
|
|
51102
|
+
ts !== void 0 && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(ts) })
|
|
51103
|
+
] }),
|
|
51104
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", weight: "semibold", children: s.name }),
|
|
51105
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", color: "muted", children: s.task }),
|
|
51106
|
+
activities.length > 0 && /* @__PURE__ */ jsx(Box, { className: "border-t border-[var(--color-border)] pt-2", children: /* @__PURE__ */ jsx(InlineActivityStream, { activities, autoScroll: false }) })
|
|
51107
|
+
] });
|
|
51108
|
+
}
|
|
51109
|
+
}
|
|
51110
|
+
}
|
|
51111
|
+
var InlineActivityRow, InlineActivityStream, CoordinatorCard, SubagentRow, OrbitalGroup, SubagentRichCard, roleBadgeVariant, ChatMessageRow, CoordinatorConversation, SubagentTracePanel;
|
|
51112
|
+
var init_SubagentTracePanel = __esm({
|
|
51113
|
+
"components/core/organisms/SubagentTracePanel.tsx"() {
|
|
51114
|
+
"use client";
|
|
51115
|
+
init_Box();
|
|
51116
|
+
init_Stack();
|
|
51117
|
+
init_Typography();
|
|
51118
|
+
init_Badge();
|
|
51119
|
+
init_Icon();
|
|
51120
|
+
init_Button();
|
|
51121
|
+
init_Modal();
|
|
51122
|
+
init_Accordion();
|
|
51123
|
+
init_markdown();
|
|
51124
|
+
InlineActivityRow = ({ activity }) => {
|
|
51125
|
+
const time = formatHHMMSS(activity.timestamp);
|
|
51126
|
+
const baseRow = "items-start px-3 py-1 hover:bg-[var(--color-surface)]";
|
|
51127
|
+
if (activity.type === "tool_call") {
|
|
51128
|
+
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
|
|
51129
|
+
/* @__PURE__ */ jsx(Icon, { name: "terminal", size: "xs", className: "mt-0.5 flex-shrink-0 text-[var(--color-primary)]" }),
|
|
51130
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "flex-1 min-w-0 text-[11px] font-mono break-all whitespace-pre-wrap", children: [
|
|
51131
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", weight: "semibold", className: "text-[11px] font-mono", children: activity.tool }),
|
|
51132
|
+
activity.args !== void 0 && /* @__PURE__ */ jsxs(Typography, { as: "span", variant: "caption", color: "muted", className: "text-[11px] font-mono", children: [
|
|
51133
|
+
" ",
|
|
51134
|
+
compactJson(activity.args)
|
|
51135
|
+
] })
|
|
51136
|
+
] }),
|
|
51137
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
|
|
51138
|
+
] });
|
|
51139
|
+
}
|
|
51140
|
+
if (activity.type === "tool_result") {
|
|
51141
|
+
const success = activity.success !== false;
|
|
51142
|
+
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
|
|
51143
|
+
/* @__PURE__ */ jsx(
|
|
51144
|
+
Icon,
|
|
51145
|
+
{
|
|
51146
|
+
name: success ? "check" : "x",
|
|
51147
|
+
size: "xs",
|
|
51148
|
+
className: `mt-0.5 flex-shrink-0 ${success ? "text-[var(--color-success)]" : "text-[var(--color-danger)]"}`
|
|
51149
|
+
}
|
|
51150
|
+
),
|
|
51151
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "flex-1 min-w-0 text-[11px] font-mono break-all whitespace-pre-wrap", children: [
|
|
51152
|
+
/* @__PURE__ */ jsxs(Typography, { as: "span", variant: "caption", color: "muted", className: "text-[11px] font-mono", children: [
|
|
51153
|
+
activity.tool,
|
|
51154
|
+
":",
|
|
51155
|
+
" "
|
|
51156
|
+
] }),
|
|
51157
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "text-[11px] font-mono", children: compactJson(activity.result) })
|
|
51158
|
+
] }),
|
|
51159
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
|
|
51160
|
+
] });
|
|
51161
|
+
}
|
|
51162
|
+
if (activity.type === "message") {
|
|
51163
|
+
const role = activity.role;
|
|
51164
|
+
const iconName = role === "user" ? "user" : role === "system" ? "info" : "sparkles";
|
|
51165
|
+
const roleColor = role === "user" ? "text-[var(--color-primary)]" : role === "system" ? "text-[var(--color-muted-foreground)]" : "text-[var(--color-foreground)]";
|
|
51166
|
+
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
|
|
51167
|
+
/* @__PURE__ */ jsx(Icon, { name: iconName, size: "xs", className: `mt-0.5 flex-shrink-0 ${roleColor}` }),
|
|
51168
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "flex-1 min-w-0 text-[11px] whitespace-pre-wrap break-words", children: activity.content }),
|
|
51169
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
|
|
51170
|
+
] });
|
|
51171
|
+
}
|
|
51172
|
+
if (activity.type === "error") {
|
|
51173
|
+
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
|
|
51174
|
+
/* @__PURE__ */ jsx(Icon, { name: "alert-triangle", size: "xs", className: "mt-0.5 flex-shrink-0 text-[var(--color-danger)]" }),
|
|
51175
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "flex-1 min-w-0 text-[11px] text-[var(--color-danger)] whitespace-pre-wrap break-words", children: activity.message }),
|
|
51176
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
|
|
51177
|
+
] });
|
|
51178
|
+
}
|
|
51179
|
+
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
|
|
51180
|
+
/* @__PURE__ */ jsx(Icon, { name: "file", size: "xs", className: "mt-0.5 flex-shrink-0 text-[var(--color-muted-foreground)]" }),
|
|
51181
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", className: "flex-1 min-w-0 text-[11px] font-mono break-all", children: [
|
|
51182
|
+
"[",
|
|
51183
|
+
activity.type,
|
|
51184
|
+
"] ",
|
|
51185
|
+
compactJson(activity)
|
|
51186
|
+
] }),
|
|
51187
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
|
|
51188
|
+
] });
|
|
51189
|
+
};
|
|
51190
|
+
InlineActivityStream = ({ activities, autoScroll = true, className }) => {
|
|
51191
|
+
const endRef = React85__default.useRef(null);
|
|
51192
|
+
React85__default.useEffect(() => {
|
|
51193
|
+
if (!autoScroll) return;
|
|
51194
|
+
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
51195
|
+
}, [activities.length, autoScroll]);
|
|
51196
|
+
return /* @__PURE__ */ jsxs(Box, { className, children: [
|
|
51197
|
+
activities.map((a, i) => /* @__PURE__ */ jsx(InlineActivityRow, { activity: a }, `${a.timestamp}-${i}`)),
|
|
51198
|
+
/* @__PURE__ */ jsx(Box, { ref: endRef })
|
|
51199
|
+
] });
|
|
51200
|
+
};
|
|
51201
|
+
CoordinatorCard = ({ snapshot, className }) => {
|
|
51202
|
+
const { t } = useTranslate();
|
|
51203
|
+
const { decision, plan, pendingQuestions } = snapshot;
|
|
51204
|
+
if (!decision && !plan && pendingQuestions.length === 0) return null;
|
|
51205
|
+
return /* @__PURE__ */ jsxs(
|
|
51206
|
+
Box,
|
|
51207
|
+
{
|
|
51208
|
+
className: `px-3 py-2 border-b border-[var(--color-border)] bg-[var(--color-muted)]/30 ${className ?? ""}`,
|
|
51209
|
+
children: [
|
|
51210
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center mb-2", children: [
|
|
51211
|
+
/* @__PURE__ */ jsx(Icon, { name: "compass", size: "xs" }),
|
|
51212
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold text-[11px]", children: t("subagentTrace.coordinator") })
|
|
51213
|
+
] }),
|
|
51214
|
+
decision && /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "mb-2", children: [
|
|
51215
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51216
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] uppercase tracking-wide", children: t("subagentTrace.organism") }),
|
|
51217
|
+
/* @__PURE__ */ jsx(Badge, { variant: "default", className: "text-[10px]", children: decision.organism }),
|
|
51218
|
+
decision.priorOrganism && decision.priorOrganism !== decision.organism && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: t("subagentTrace.wasOrganism", { organism: decision.priorOrganism }) })
|
|
51219
|
+
] }),
|
|
51220
|
+
decision.reason && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[11px] mt-0.5", children: decision.reason })
|
|
51221
|
+
] }),
|
|
51222
|
+
plan && plan.orbitals.length > 0 && /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "mb-2", children: [
|
|
51223
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] uppercase tracking-wide mb-0.5", children: plan.orbitals.length === 1 ? t("subagentTrace.planOrbital", { count: plan.orbitals.length }) : t("subagentTrace.planOrbitals", { count: plan.orbitals.length }) }),
|
|
51224
|
+
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap", children: plan.orbitals.map((o) => /* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: o }, o)) })
|
|
51225
|
+
] }),
|
|
51226
|
+
pendingQuestions.length > 0 && /* @__PURE__ */ jsxs(VStack, { gap: "none", children: [
|
|
51227
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] uppercase tracking-wide mb-0.5", children: pendingQuestions.length === 1 ? t("subagentTrace.pendingQuestion", { count: pendingQuestions.length }) : t("subagentTrace.pendingQuestions", { count: pendingQuestions.length }) }),
|
|
51228
|
+
pendingQuestions.map((q) => /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-start", children: [
|
|
51229
|
+
/* @__PURE__ */ jsx(Icon, { name: "help-circle", size: "xs", className: "mt-0.5 flex-shrink-0 text-[var(--color-warning)]" }),
|
|
51230
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-[11px] flex-1 min-w-0", children: [
|
|
51231
|
+
q.question,
|
|
51232
|
+
q.orbitalName && /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", className: "text-[10px] ml-1", children: [
|
|
51233
|
+
"(",
|
|
51234
|
+
q.orbitalName,
|
|
51235
|
+
")"
|
|
51236
|
+
] })
|
|
51237
|
+
] })
|
|
51238
|
+
] }, q.questionId))
|
|
51239
|
+
] })
|
|
51240
|
+
]
|
|
51241
|
+
}
|
|
51242
|
+
);
|
|
51243
|
+
};
|
|
51244
|
+
SubagentRow = ({ subagent }) => {
|
|
51245
|
+
const recent = lastMessage(subagent);
|
|
51246
|
+
return /* @__PURE__ */ jsxs(
|
|
51247
|
+
HStack,
|
|
51248
|
+
{
|
|
51249
|
+
gap: "sm",
|
|
51250
|
+
className: "items-start px-3 py-2 border-b border-[var(--color-border)]",
|
|
51251
|
+
children: [
|
|
51252
|
+
/* @__PURE__ */ jsx(Box, { className: "pt-0.5", children: /* @__PURE__ */ jsx(Icon, { name: statusIconName(subagent.status), size: "xs" }) }),
|
|
51253
|
+
/* @__PURE__ */ jsxs(VStack, { gap: "none", className: "flex-1 min-w-0", children: [
|
|
51254
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center", children: [
|
|
51255
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-medium truncate", children: subagent.name }),
|
|
51256
|
+
/* @__PURE__ */ jsx(Badge, { variant: "default", children: subagent.role })
|
|
51257
|
+
] }),
|
|
51258
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "truncate", children: recent ?? subagent.task })
|
|
51259
|
+
] })
|
|
51260
|
+
]
|
|
51261
|
+
}
|
|
51262
|
+
);
|
|
51263
|
+
};
|
|
51264
|
+
OrbitalGroup = ({ orbitalName, subagents }) => {
|
|
51265
|
+
const { t } = useTranslate();
|
|
51266
|
+
const runningCount = subagents.filter((s) => s.status === "running").length;
|
|
51267
|
+
const completeCount = subagents.filter((s) => s.status === "complete").length;
|
|
51268
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "border-b border-[var(--color-border)]", children: [
|
|
51269
|
+
/* @__PURE__ */ jsxs(
|
|
51270
|
+
HStack,
|
|
51271
|
+
{
|
|
51272
|
+
gap: "sm",
|
|
51273
|
+
className: "items-center px-3 py-2 bg-[var(--color-surface)] border-b border-[var(--color-border)]",
|
|
51274
|
+
children: [
|
|
51275
|
+
/* @__PURE__ */ jsx(Icon, { name: "circle", size: "xs" }),
|
|
51276
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold flex-1 truncate", children: orbitalName }),
|
|
51277
|
+
/* @__PURE__ */ jsx(Badge, { variant: "default", children: runningCount > 0 ? t("subagentTrace.countRunning", { count: runningCount }) : t("subagentTrace.countDone", { count: completeCount }) })
|
|
51278
|
+
]
|
|
51279
|
+
}
|
|
51280
|
+
),
|
|
51281
|
+
subagents.map((sub) => /* @__PURE__ */ jsx(SubagentRow, { subagent: sub }, sub.id))
|
|
51282
|
+
] });
|
|
51283
|
+
};
|
|
51284
|
+
SubagentRichCard = ({ subagent }) => {
|
|
51285
|
+
const { t } = useTranslate();
|
|
51286
|
+
const activities = React85__default.useMemo(
|
|
51287
|
+
() => subagentMessagesToActivities(subagent.messages),
|
|
51288
|
+
[subagent.messages]
|
|
51289
|
+
);
|
|
51290
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "border-b border-[var(--color-border)] p-3", children: [
|
|
51291
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center mb-2", children: [
|
|
51292
|
+
/* @__PURE__ */ jsx(
|
|
51293
|
+
Box,
|
|
51294
|
+
{
|
|
51295
|
+
style: {
|
|
51296
|
+
width: 8,
|
|
51297
|
+
height: 8,
|
|
51298
|
+
borderRadius: "50%",
|
|
51299
|
+
flexShrink: 0,
|
|
51300
|
+
backgroundColor: subagent.status === "complete" ? "var(--color-success)" : subagent.status === "error" ? "var(--color-error)" : "var(--color-primary)",
|
|
51301
|
+
...subagent.status === "running" ? { animation: "pulse 1.5s infinite" } : {}
|
|
51302
|
+
}
|
|
51303
|
+
}
|
|
51304
|
+
),
|
|
51305
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold flex-1 truncate", children: subagent.name }),
|
|
51306
|
+
/* @__PURE__ */ jsx(Badge, { variant: subagent.role === "deterministic" ? "default" : subagent.role === "llm" ? "info" : "warning", children: subagent.role }),
|
|
51307
|
+
subagent.durationMs !== void 0 && subagent.durationMs > 0 && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: subagent.durationMs < 1e3 ? `${subagent.durationMs}ms` : `${(subagent.durationMs / 1e3).toFixed(1)}s` })
|
|
51308
|
+
] }),
|
|
51309
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "mb-2", children: subagent.task }),
|
|
51310
|
+
activities.length > 0 ? /* @__PURE__ */ jsx(Box, { className: "max-h-64 overflow-y-auto border-t border-[var(--color-border)]", children: /* @__PURE__ */ jsx(InlineActivityStream, { activities, autoScroll: true }) }) : /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "italic text-[10px]", children: subagent.status === "complete" ? t("subagentTrace.noConversationLog") : t("subagentTrace.waitingForProcessData") })
|
|
51311
|
+
] });
|
|
51312
|
+
};
|
|
51313
|
+
roleBadgeVariant = {
|
|
51314
|
+
system: "neutral",
|
|
51315
|
+
user: "info",
|
|
51316
|
+
assistant: "default",
|
|
51317
|
+
tool: "warning"
|
|
51318
|
+
};
|
|
51319
|
+
ChatMessageRow = ({ message, index }) => {
|
|
51320
|
+
const { t } = useTranslate();
|
|
51321
|
+
const { role, content, toolCalls, reasoningContent, toolCallId, toolName } = message;
|
|
51322
|
+
if (role === "tool") {
|
|
51323
|
+
const pretty = tryPrettyJson(content);
|
|
51324
|
+
const title = `${toolName ?? "tool"} \u2192${toolCallId ? ` ${toolCallId.slice(0, 8)}` : ""}`;
|
|
51325
|
+
const body = pretty !== null ? /* @__PURE__ */ jsx(CodeBlock, { code: pretty, language: "json", maxHeight: "24rem" }) : /* @__PURE__ */ jsx(Typography, { variant: "body", className: "whitespace-pre-wrap font-mono text-[11px]", children: content });
|
|
51326
|
+
const items = [{ id: `tool-${index}`, title, content: body }];
|
|
51327
|
+
return /* @__PURE__ */ jsx(Box, { className: "px-3 py-2 border-b border-[var(--color-border)]", children: /* @__PURE__ */ jsx(Accordion, { items }) });
|
|
51328
|
+
}
|
|
51329
|
+
const hasReasoning = typeof reasoningContent === "string" && reasoningContent.length > 0;
|
|
51330
|
+
const hasToolCalls = Array.isArray(toolCalls) && toolCalls.length > 0;
|
|
51331
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "px-3 py-2 border-b border-[var(--color-border)]", children: [
|
|
51332
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51333
|
+
/* @__PURE__ */ jsx(Badge, { variant: roleBadgeVariant[role], className: "text-[10px] uppercase", children: role }),
|
|
51334
|
+
hasReasoning && /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: [
|
|
51335
|
+
"\xB7 ",
|
|
51336
|
+
t("subagentTrace.thinking")
|
|
51337
|
+
] }),
|
|
51338
|
+
hasToolCalls && /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: [
|
|
51339
|
+
"\xB7 ",
|
|
51340
|
+
toolCalls.length === 1 ? t("subagentTrace.toolCallCount", { count: toolCalls.length }) : t("subagentTrace.toolCallCountPlural", { count: toolCalls.length })
|
|
51341
|
+
] })
|
|
51342
|
+
] }),
|
|
51343
|
+
hasReasoning && /* @__PURE__ */ jsx(Accordion, { items: [{
|
|
51344
|
+
id: `reasoning-${index}`,
|
|
51345
|
+
title: t("subagentTrace.reasoning"),
|
|
51346
|
+
content: /* @__PURE__ */ jsx(MarkdownContent, { content: reasoningContent })
|
|
51347
|
+
}] }),
|
|
51348
|
+
content.length > 0 && /* @__PURE__ */ jsx(MarkdownContent, { content }),
|
|
51349
|
+
hasToolCalls && /* @__PURE__ */ jsx(
|
|
51350
|
+
Accordion,
|
|
51351
|
+
{
|
|
51352
|
+
multiple: true,
|
|
51353
|
+
items: toolCalls.map((tc, i) => ({
|
|
51354
|
+
id: `tc-${index}-${i}`,
|
|
51355
|
+
title: `${tc.name}(${summarizeArgs(tc.args)})`,
|
|
51356
|
+
content: /* @__PURE__ */ jsx(CodeBlock, { code: JSON.stringify(tc.args, null, 2), language: "json", maxHeight: "24rem" })
|
|
51357
|
+
}))
|
|
51358
|
+
}
|
|
51359
|
+
)
|
|
51360
|
+
] });
|
|
51361
|
+
};
|
|
51362
|
+
CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
|
|
51363
|
+
const endRef = React85__default.useRef(null);
|
|
51364
|
+
React85__default.useEffect(() => {
|
|
51365
|
+
if (!autoScroll) return;
|
|
51366
|
+
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
51367
|
+
}, [messages.length, autoScroll]);
|
|
51368
|
+
return /* @__PURE__ */ jsxs(Box, { className, children: [
|
|
51369
|
+
messages.map((m, i) => /* @__PURE__ */ jsx(ChatMessageRow, { message: m, index: i }, `msg-${i}`)),
|
|
51370
|
+
/* @__PURE__ */ jsx(Box, { ref: endRef })
|
|
51371
|
+
] });
|
|
51372
|
+
};
|
|
51373
|
+
SubagentTracePanel = ({
|
|
51374
|
+
subagents,
|
|
51375
|
+
focusedOrbital,
|
|
51376
|
+
disclosureLevel,
|
|
51377
|
+
open,
|
|
51378
|
+
onClose,
|
|
51379
|
+
className,
|
|
51380
|
+
mode = "overlay",
|
|
51381
|
+
coordinatorActivities,
|
|
51382
|
+
coordinatorMessages
|
|
51383
|
+
}) => {
|
|
51384
|
+
const { t } = useTranslate();
|
|
51385
|
+
const [selectedItem, setSelectedItem] = useState(null);
|
|
51386
|
+
const densityLabel = (rich) => rich ? t("subagentTrace.densityRich") : t("subagentTrace.densityCompact");
|
|
51387
|
+
if (mode === "overlay" && !open) return null;
|
|
51388
|
+
const isTabMode = mode === "tab";
|
|
51389
|
+
const isRichMode = isTabMode || disclosureLevel >= 3;
|
|
51390
|
+
if (isTabMode) {
|
|
51391
|
+
const timelineItems = buildTimelineItems(coordinatorMessages, coordinatorActivities, subagents);
|
|
51392
|
+
const hasData = timelineItems.length > 0;
|
|
51393
|
+
return /* @__PURE__ */ jsxs(Box, { className: `h-full w-full bg-[var(--color-card)] overflow-hidden flex flex-col ${className ?? ""}`, children: [
|
|
51394
|
+
/* @__PURE__ */ jsxs(
|
|
51395
|
+
HStack,
|
|
51396
|
+
{
|
|
51397
|
+
gap: "sm",
|
|
51398
|
+
className: "items-center px-3 py-2 border-b border-[var(--color-border)]",
|
|
51399
|
+
children: [
|
|
51400
|
+
/* @__PURE__ */ jsx(Icon, { name: "activity", size: "sm" }),
|
|
51401
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold flex-1", children: t("subagentTrace.trace") }),
|
|
51402
|
+
onClose && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" }) })
|
|
51403
|
+
]
|
|
51404
|
+
}
|
|
51405
|
+
),
|
|
51406
|
+
!hasData && /* @__PURE__ */ jsx(Box, { className: "flex-1 flex items-center justify-center px-4", children: /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "muted", className: "text-center", children: t("subagentTrace.noAgentActivity") }) }),
|
|
51407
|
+
hasData && /* @__PURE__ */ jsx(Box, { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx(VStack, { gap: "none", children: timelineItems.map((item, i) => {
|
|
51408
|
+
const { name: iconName, color: iconColor } = timelineItemIcon(item);
|
|
51409
|
+
const isLast = i === timelineItems.length - 1;
|
|
51410
|
+
return /* @__PURE__ */ jsxs(
|
|
51411
|
+
Box,
|
|
51412
|
+
{
|
|
51413
|
+
className: "flex items-start px-3 py-2 border-b border-[var(--color-border)] hover:bg-[var(--color-muted)]/30 transition-colors duration-fast cursor-pointer",
|
|
51414
|
+
onClick: () => setSelectedItem(item),
|
|
51415
|
+
children: [
|
|
51416
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex flex-col items-center mr-3 mt-0.5", style: { width: 20 }, children: [
|
|
51417
|
+
/* @__PURE__ */ jsx(
|
|
51418
|
+
Box,
|
|
51419
|
+
{
|
|
51420
|
+
className: "rounded-full flex-shrink-0",
|
|
51421
|
+
style: {
|
|
51422
|
+
width: 8,
|
|
51423
|
+
height: 8,
|
|
51424
|
+
backgroundColor: "var(--color-primary)"
|
|
51425
|
+
}
|
|
51426
|
+
}
|
|
51427
|
+
),
|
|
51428
|
+
!isLast && /* @__PURE__ */ jsx(
|
|
51429
|
+
Box,
|
|
51430
|
+
{
|
|
51431
|
+
className: "flex-1",
|
|
51432
|
+
style: {
|
|
51433
|
+
width: 2,
|
|
51434
|
+
backgroundColor: "var(--color-border)",
|
|
51435
|
+
marginTop: 4,
|
|
51436
|
+
minHeight: 24
|
|
51437
|
+
}
|
|
51438
|
+
}
|
|
51439
|
+
)
|
|
51440
|
+
] }),
|
|
51441
|
+
/* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "flex-1 min-w-0", children: [
|
|
51442
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51443
|
+
/* @__PURE__ */ jsx(Icon, { name: iconName, size: "xs", className: `flex-shrink-0 ${iconColor}` }),
|
|
51444
|
+
timelineItemTimeLabel(item) && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: timelineItemTimeLabel(item) }),
|
|
51445
|
+
/* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: timelineItemLabel(item) })
|
|
51446
|
+
] }),
|
|
51447
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-start", children: [
|
|
51448
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", color: "muted", className: "flex-1 min-w-0 line-clamp-2", children: timelineItemPreview(item) }),
|
|
51449
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", className: "flex-shrink-0 mt-0", onClick: (e) => {
|
|
51450
|
+
e.stopPropagation();
|
|
51451
|
+
setSelectedItem(item);
|
|
51452
|
+
}, children: /* @__PURE__ */ jsx(Icon, { name: "maximize-2", size: "xs" }) })
|
|
51453
|
+
] })
|
|
51454
|
+
] })
|
|
51455
|
+
]
|
|
51456
|
+
},
|
|
51457
|
+
`${item.source}-${i}`
|
|
51458
|
+
);
|
|
51459
|
+
}) }) }),
|
|
51460
|
+
/* @__PURE__ */ jsx(
|
|
51461
|
+
Modal,
|
|
51462
|
+
{
|
|
51463
|
+
isOpen: selectedItem !== null,
|
|
51464
|
+
onClose: () => setSelectedItem(null),
|
|
51465
|
+
title: selectedItem ? `${timelineItemLabel(selectedItem)}${timelineItemTimeLabel(selectedItem) ? ` \xB7 ${timelineItemTimeLabel(selectedItem)}` : ""}` : "",
|
|
51466
|
+
size: "lg",
|
|
51467
|
+
children: selectedItem && /* @__PURE__ */ jsx(TraceDetailContent, { item: selectedItem })
|
|
51468
|
+
}
|
|
51469
|
+
)
|
|
51470
|
+
] });
|
|
51471
|
+
}
|
|
51472
|
+
const filtered = focusedOrbital ? subagents.filter((s) => s.orbitalName === focusedOrbital) : subagents;
|
|
51473
|
+
const wrapperClass = isRichMode ? `absolute inset-x-3 bottom-3 sm:inset-x-auto sm:top-3 sm:right-3 sm:bottom-3 w-full sm:w-[28rem] max-w-[calc(100vw-1.5rem)] max-h-[60vh] sm:max-h-none bg-[var(--color-card)] border border-[var(--color-border)] rounded-md shadow-lg overflow-hidden flex flex-col ${className ?? ""}` : `absolute inset-x-3 bottom-3 sm:inset-x-auto sm:top-3 sm:right-3 sm:bottom-3 w-full sm:w-80 max-w-[calc(100vw-1.5rem)] max-h-[60vh] sm:max-h-none bg-[var(--color-card)] border border-[var(--color-border)] rounded-md shadow-lg overflow-hidden flex flex-col ${className ?? ""}`;
|
|
51474
|
+
const wrapperStyle = { zIndex: 20 };
|
|
51475
|
+
const hasCoordinatorData = coordinatorMessages && coordinatorMessages.length > 0 || coordinatorActivities && coordinatorActivities.length > 0;
|
|
51476
|
+
if (filtered.length === 0 && !hasCoordinatorData) {
|
|
51477
|
+
return /* @__PURE__ */ jsxs(Box, { className: wrapperClass, style: wrapperStyle, children: [
|
|
51478
|
+
/* @__PURE__ */ jsxs(
|
|
51479
|
+
HStack,
|
|
51480
|
+
{
|
|
51481
|
+
gap: "sm",
|
|
51482
|
+
className: "items-center px-3 py-2 border-b border-[var(--color-border)]",
|
|
51483
|
+
children: [
|
|
51484
|
+
/* @__PURE__ */ jsx(Icon, { name: "activity", size: "sm" }),
|
|
51485
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold flex-1", children: t("subagentTrace.subagents") }),
|
|
51486
|
+
onClose && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" }) })
|
|
51487
|
+
]
|
|
51488
|
+
}
|
|
51489
|
+
),
|
|
51490
|
+
/* @__PURE__ */ jsx(Box, { className: "flex-1 flex items-center justify-center px-4", children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-center", children: focusedOrbital ? t("subagentTrace.noSubagentsForOrbital", { orbital: focusedOrbital }) : t("subagentTrace.noSubagentsActive") }) })
|
|
51491
|
+
] });
|
|
51492
|
+
}
|
|
51493
|
+
if (focusedOrbital) {
|
|
51494
|
+
return /* @__PURE__ */ jsxs(Box, { className: wrapperClass, style: wrapperStyle, children: [
|
|
51495
|
+
/* @__PURE__ */ jsxs(
|
|
51496
|
+
HStack,
|
|
51497
|
+
{
|
|
51498
|
+
gap: "sm",
|
|
51499
|
+
className: "items-center px-3 py-2 border-b border-[var(--color-border)]",
|
|
51500
|
+
children: [
|
|
51501
|
+
/* @__PURE__ */ jsx(Icon, { name: "activity", size: "sm" }),
|
|
51502
|
+
/* @__PURE__ */ jsxs(VStack, { gap: "none", className: "flex-1 min-w-0", children: [
|
|
51503
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold truncate", children: focusedOrbital }),
|
|
51504
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", children: [
|
|
51505
|
+
filtered.length === 1 ? t("subagentTrace.subagentCount", { count: filtered.length }) : t("subagentTrace.subagentCountPlural", { count: filtered.length }),
|
|
51506
|
+
" \xB7 ",
|
|
51507
|
+
densityLabel(isRichMode)
|
|
51508
|
+
] })
|
|
51509
|
+
] }),
|
|
51510
|
+
onClose && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" }) })
|
|
51511
|
+
]
|
|
51512
|
+
}
|
|
51513
|
+
),
|
|
51514
|
+
/* @__PURE__ */ jsx(Box, { className: "flex-1 overflow-y-auto", children: filtered.map((sub) => isRichMode ? /* @__PURE__ */ jsx(SubagentRichCard, { subagent: sub }, sub.id) : /* @__PURE__ */ jsx(SubagentRow, { subagent: sub }, sub.id)) })
|
|
51515
|
+
] });
|
|
51516
|
+
}
|
|
51517
|
+
const grouped = groupByOrbital(filtered);
|
|
51518
|
+
const coordinatorSnapshot = pluckCoordinatorState(coordinatorActivities ?? []);
|
|
51519
|
+
return /* @__PURE__ */ jsxs(Box, { className: wrapperClass, style: wrapperStyle, children: [
|
|
51520
|
+
/* @__PURE__ */ jsxs(
|
|
51521
|
+
HStack,
|
|
51522
|
+
{
|
|
51523
|
+
gap: "sm",
|
|
51524
|
+
className: "items-center px-3 py-2 border-b border-[var(--color-border)]",
|
|
51525
|
+
children: [
|
|
51526
|
+
/* @__PURE__ */ jsx(Icon, { name: "activity", size: "sm" }),
|
|
51527
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "font-semibold flex-1", children: [
|
|
51528
|
+
t("subagentTrace.subagentsWithCount", { count: filtered.length }),
|
|
51529
|
+
" \xB7 ",
|
|
51530
|
+
densityLabel(isRichMode)
|
|
51531
|
+
] }),
|
|
51532
|
+
onClose && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" }) })
|
|
51533
|
+
]
|
|
51534
|
+
}
|
|
51535
|
+
),
|
|
51536
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex-1 overflow-y-auto", children: [
|
|
51537
|
+
!focusedOrbital && isRichMode && /* @__PURE__ */ jsx(CoordinatorCard, { snapshot: coordinatorSnapshot }),
|
|
51538
|
+
coordinatorMessages && coordinatorMessages.length > 0 ? /* @__PURE__ */ jsxs(Box, { className: "border-b border-[var(--color-border)]", children: [
|
|
51539
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center px-3 py-1.5 bg-[var(--color-card)] border-b border-[var(--color-border)]", children: [
|
|
51540
|
+
/* @__PURE__ */ jsx(Box, { style: { width: 6, height: 6, borderRadius: "50%", backgroundColor: "var(--color-primary)", flexShrink: 0 } }),
|
|
51541
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold text-[11px]", children: t("subagentTrace.coordinator") }),
|
|
51542
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: t("subagentTrace.messagesCount", { count: coordinatorMessages.length }) })
|
|
51543
|
+
] }),
|
|
51544
|
+
/* @__PURE__ */ jsx(Box, { className: "max-h-[36rem] overflow-y-auto", children: /* @__PURE__ */ jsx(CoordinatorConversation, { messages: coordinatorMessages, autoScroll: true }) })
|
|
51545
|
+
] }) : coordinatorActivities && coordinatorActivities.length > 0 && (() => {
|
|
51546
|
+
const filteredCoordinator = coordinatorActivities;
|
|
51547
|
+
if (filteredCoordinator.length === 0) return null;
|
|
51548
|
+
return /* @__PURE__ */ jsxs(Box, { className: "border-b border-[var(--color-border)]", children: [
|
|
51549
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center px-3 py-1.5 bg-[var(--color-card)] border-b border-[var(--color-border)]", children: [
|
|
51550
|
+
/* @__PURE__ */ jsx(Box, { style: { width: 6, height: 6, borderRadius: "50%", backgroundColor: "var(--color-primary)", flexShrink: 0 } }),
|
|
51551
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold text-[11px]", children: t("subagentTrace.coordinator") }),
|
|
51552
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: t("subagentTrace.eventsCount", { count: filteredCoordinator.length }) })
|
|
51553
|
+
] }),
|
|
51554
|
+
/* @__PURE__ */ jsx(Box, { className: "max-h-60 overflow-y-auto", children: /* @__PURE__ */ jsx(
|
|
51555
|
+
InlineActivityStream,
|
|
51556
|
+
{
|
|
51557
|
+
activities: coordinatorToActivityItems(filteredCoordinator),
|
|
51558
|
+
autoScroll: true
|
|
51559
|
+
}
|
|
51560
|
+
) })
|
|
51561
|
+
] });
|
|
51562
|
+
})(),
|
|
51563
|
+
isRichMode ? filtered.map((sub) => /* @__PURE__ */ jsx(SubagentRichCard, { subagent: sub }, sub.id)) : Array.from(grouped.entries()).map(([orbitalName, subs]) => /* @__PURE__ */ jsx(
|
|
51564
|
+
OrbitalGroup,
|
|
51565
|
+
{
|
|
51566
|
+
orbitalName,
|
|
51567
|
+
subagents: subs
|
|
51568
|
+
},
|
|
51569
|
+
orbitalName
|
|
51570
|
+
))
|
|
51571
|
+
] })
|
|
51572
|
+
] });
|
|
51573
|
+
};
|
|
51574
|
+
SubagentTracePanel.displayName = "SubagentTracePanel";
|
|
51575
|
+
}
|
|
51576
|
+
});
|
|
50066
51577
|
var TabbedContainer;
|
|
50067
51578
|
var init_TabbedContainer = __esm({
|
|
50068
51579
|
"components/core/organisms/layout/TabbedContainer.tsx"() {
|
|
@@ -50177,6 +51688,48 @@ var init_TabbedContainer = __esm({
|
|
|
50177
51688
|
TabbedContainer.displayName = "TabbedContainer";
|
|
50178
51689
|
}
|
|
50179
51690
|
});
|
|
51691
|
+
function TanksBoard({
|
|
51692
|
+
tiles,
|
|
51693
|
+
units,
|
|
51694
|
+
features,
|
|
51695
|
+
assetManifest,
|
|
51696
|
+
assetBaseUrl,
|
|
51697
|
+
scale = 0.45,
|
|
51698
|
+
showMinimap = true,
|
|
51699
|
+
enableCamera = true,
|
|
51700
|
+
tileClickEvent,
|
|
51701
|
+
unitClickEvent,
|
|
51702
|
+
isLoading,
|
|
51703
|
+
error,
|
|
51704
|
+
className
|
|
51705
|
+
}) {
|
|
51706
|
+
return /* @__PURE__ */ jsx("div", { className: cn("tanks-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
51707
|
+
IsometricCanvas_default,
|
|
51708
|
+
{
|
|
51709
|
+
tileLayout: "flat",
|
|
51710
|
+
tiles,
|
|
51711
|
+
units,
|
|
51712
|
+
features,
|
|
51713
|
+
assetManifest,
|
|
51714
|
+
assetBaseUrl,
|
|
51715
|
+
scale,
|
|
51716
|
+
showMinimap,
|
|
51717
|
+
enableCamera,
|
|
51718
|
+
tileClickEvent,
|
|
51719
|
+
unitClickEvent,
|
|
51720
|
+
isLoading,
|
|
51721
|
+
error
|
|
51722
|
+
}
|
|
51723
|
+
) });
|
|
51724
|
+
}
|
|
51725
|
+
var init_TanksBoard = __esm({
|
|
51726
|
+
"components/game/organisms/TanksBoard.tsx"() {
|
|
51727
|
+
"use client";
|
|
51728
|
+
init_cn();
|
|
51729
|
+
init_IsometricCanvas();
|
|
51730
|
+
TanksBoard.displayName = "TanksBoard";
|
|
51731
|
+
}
|
|
51732
|
+
});
|
|
50180
51733
|
var TeamOrganism;
|
|
50181
51734
|
var init_TeamOrganism = __esm({
|
|
50182
51735
|
"components/marketing/organisms/TeamOrganism.tsx"() {
|
|
@@ -50280,7 +51833,7 @@ var init_Timeline = __esm({
|
|
|
50280
51833
|
}) => {
|
|
50281
51834
|
const { t } = useTranslate();
|
|
50282
51835
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
50283
|
-
const items =
|
|
51836
|
+
const items = React85__default.useMemo(() => {
|
|
50284
51837
|
if (propItems) return propItems;
|
|
50285
51838
|
if (entityData.length === 0) return [];
|
|
50286
51839
|
return entityData.map((record, idx) => {
|
|
@@ -50387,7 +51940,7 @@ var init_Timeline = __esm({
|
|
|
50387
51940
|
}
|
|
50388
51941
|
});
|
|
50389
51942
|
function extractToastProps(children) {
|
|
50390
|
-
if (!
|
|
51943
|
+
if (!React85__default.isValidElement(children)) {
|
|
50391
51944
|
if (typeof children === "string") {
|
|
50392
51945
|
return { message: children };
|
|
50393
51946
|
}
|
|
@@ -50425,7 +51978,7 @@ var init_ToastSlot = __esm({
|
|
|
50425
51978
|
eventBus.emit("UI:CLOSE");
|
|
50426
51979
|
};
|
|
50427
51980
|
if (!isVisible) return null;
|
|
50428
|
-
const isCustomContent =
|
|
51981
|
+
const isCustomContent = React85__default.isValidElement(children) && !message;
|
|
50429
51982
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
50430
51983
|
Toast,
|
|
50431
51984
|
{
|
|
@@ -52041,7 +53594,7 @@ var init_WorldMapTemplate = __esm({
|
|
|
52041
53594
|
}
|
|
52042
53595
|
});
|
|
52043
53596
|
function lazyThree(name, loader) {
|
|
52044
|
-
const Lazy =
|
|
53597
|
+
const Lazy = React85__default.lazy(
|
|
52045
53598
|
() => loader().then((m) => {
|
|
52046
53599
|
const Resolved = m[name];
|
|
52047
53600
|
if (!Resolved) {
|
|
@@ -52053,13 +53606,13 @@ function lazyThree(name, loader) {
|
|
|
52053
53606
|
})
|
|
52054
53607
|
);
|
|
52055
53608
|
function ThreeWrapper(props) {
|
|
52056
|
-
return
|
|
53609
|
+
return React85__default.createElement(
|
|
52057
53610
|
ThreeBoundary,
|
|
52058
53611
|
{ name },
|
|
52059
|
-
|
|
52060
|
-
|
|
53612
|
+
React85__default.createElement(
|
|
53613
|
+
React85__default.Suspense,
|
|
52061
53614
|
{ fallback: null },
|
|
52062
|
-
|
|
53615
|
+
React85__default.createElement(Lazy, props)
|
|
52063
53616
|
)
|
|
52064
53617
|
);
|
|
52065
53618
|
}
|
|
@@ -52089,6 +53642,7 @@ var init_component_registry_generated = __esm({
|
|
|
52089
53642
|
init_BattleTemplate();
|
|
52090
53643
|
init_BehaviorView();
|
|
52091
53644
|
init_BloomQuizBlock();
|
|
53645
|
+
init_BoardgameBoard();
|
|
52092
53646
|
init_BookChapterView();
|
|
52093
53647
|
init_BookCoverPage();
|
|
52094
53648
|
init_BookNavBar();
|
|
@@ -52115,6 +53669,7 @@ var init_component_registry_generated = __esm({
|
|
|
52115
53669
|
init_Center();
|
|
52116
53670
|
init_Chart();
|
|
52117
53671
|
init_ChartLegend();
|
|
53672
|
+
init_ChatBar();
|
|
52118
53673
|
init_Checkbox();
|
|
52119
53674
|
init_ChoiceButton();
|
|
52120
53675
|
init_CityBuilderBoard();
|
|
@@ -52172,6 +53727,7 @@ var init_component_registry_generated = __esm({
|
|
|
52172
53727
|
init_FileTree();
|
|
52173
53728
|
init_FilterGroup();
|
|
52174
53729
|
init_FilterPill();
|
|
53730
|
+
init_FishingBoard();
|
|
52175
53731
|
init_Flex();
|
|
52176
53732
|
init_FlipCard();
|
|
52177
53733
|
init_FlipContainer();
|
|
@@ -52201,6 +53757,7 @@ var init_component_registry_generated = __esm({
|
|
|
52201
53757
|
init_HeroOrganism();
|
|
52202
53758
|
init_HeroSection();
|
|
52203
53759
|
init_HexStrategyBoard();
|
|
53760
|
+
init_HolidayRunnerBoard();
|
|
52204
53761
|
init_Icon();
|
|
52205
53762
|
init_InfiniteScrollSentinel();
|
|
52206
53763
|
init_Input();
|
|
@@ -52223,11 +53780,13 @@ var init_component_registry_generated = __esm({
|
|
|
52223
53780
|
init_MarketingFooter();
|
|
52224
53781
|
init_MasterDetail();
|
|
52225
53782
|
init_MasterDetailLayout();
|
|
53783
|
+
init_MatchPuzzleBoard();
|
|
52226
53784
|
init_MatrixQuestion();
|
|
52227
53785
|
init_MediaGallery();
|
|
52228
53786
|
init_Menu();
|
|
52229
53787
|
init_Meter();
|
|
52230
53788
|
init_MiniMap();
|
|
53789
|
+
init_MinigolfBoard();
|
|
52231
53790
|
init_Modal();
|
|
52232
53791
|
init_ModalSlot();
|
|
52233
53792
|
init_ModuleCard();
|
|
@@ -52240,6 +53799,8 @@ var init_component_registry_generated = __esm({
|
|
|
52240
53799
|
init_PageHeader();
|
|
52241
53800
|
init_Pagination();
|
|
52242
53801
|
init_PatternTile();
|
|
53802
|
+
init_PinballBoard();
|
|
53803
|
+
init_PirateBoard();
|
|
52243
53804
|
init_PlatformerBoard();
|
|
52244
53805
|
init_PlatformerCanvas();
|
|
52245
53806
|
init_PlatformerTemplate();
|
|
@@ -52257,6 +53818,7 @@ var init_component_registry_generated = __esm({
|
|
|
52257
53818
|
init_QrScanner();
|
|
52258
53819
|
init_QuestTracker();
|
|
52259
53820
|
init_QuizBlock();
|
|
53821
|
+
init_RacingBoard();
|
|
52260
53822
|
init_Radio();
|
|
52261
53823
|
init_RangeSlider();
|
|
52262
53824
|
init_ReflectionBlock();
|
|
@@ -52290,12 +53852,16 @@ var init_component_registry_generated = __esm({
|
|
|
52290
53852
|
init_SimulatorBoard();
|
|
52291
53853
|
init_Skeleton();
|
|
52292
53854
|
init_SocialProof();
|
|
53855
|
+
init_SokobanBoard();
|
|
52293
53856
|
init_SortableList();
|
|
53857
|
+
init_SpaceShmupBoard();
|
|
53858
|
+
init_SpaceStationBoard();
|
|
52294
53859
|
init_Sparkline();
|
|
52295
53860
|
init_Spinner();
|
|
52296
53861
|
init_Split();
|
|
52297
53862
|
init_SplitPane();
|
|
52298
53863
|
init_SplitSection();
|
|
53864
|
+
init_SportsBoard();
|
|
52299
53865
|
init_Sprite();
|
|
52300
53866
|
init_StarRating();
|
|
52301
53867
|
init_StatBadge();
|
|
@@ -52310,6 +53876,7 @@ var init_component_registry_generated = __esm({
|
|
|
52310
53876
|
init_StatusEffect();
|
|
52311
53877
|
init_StepFlow();
|
|
52312
53878
|
init_StepFlowOrganism();
|
|
53879
|
+
init_SubagentTracePanel();
|
|
52313
53880
|
init_SvgBranch();
|
|
52314
53881
|
init_SvgConnection();
|
|
52315
53882
|
init_SvgFlow();
|
|
@@ -52329,6 +53896,7 @@ var init_component_registry_generated = __esm({
|
|
|
52329
53896
|
init_Tabs();
|
|
52330
53897
|
init_TagCloud();
|
|
52331
53898
|
init_TagInput();
|
|
53899
|
+
init_TanksBoard();
|
|
52332
53900
|
init_TeamCard();
|
|
52333
53901
|
init_TeamOrganism();
|
|
52334
53902
|
init_TextHighlight();
|
|
@@ -52367,7 +53935,7 @@ var init_component_registry_generated = __esm({
|
|
|
52367
53935
|
init_WorldMapBoard();
|
|
52368
53936
|
init_WorldMapTemplate();
|
|
52369
53937
|
init_XPBar();
|
|
52370
|
-
ThreeBoundary = class extends
|
|
53938
|
+
ThreeBoundary = class extends React85__default.Component {
|
|
52371
53939
|
constructor() {
|
|
52372
53940
|
super(...arguments);
|
|
52373
53941
|
__publicField(this, "state", { failed: false });
|
|
@@ -52377,7 +53945,7 @@ var init_component_registry_generated = __esm({
|
|
|
52377
53945
|
}
|
|
52378
53946
|
render() {
|
|
52379
53947
|
if (this.state.failed) {
|
|
52380
|
-
return
|
|
53948
|
+
return React85__default.createElement(
|
|
52381
53949
|
"div",
|
|
52382
53950
|
{
|
|
52383
53951
|
"data-testid": "three-unavailable",
|
|
@@ -52416,6 +53984,7 @@ var init_component_registry_generated = __esm({
|
|
|
52416
53984
|
"BattleTemplate": BattleTemplate,
|
|
52417
53985
|
"BehaviorView": BehaviorView,
|
|
52418
53986
|
"BloomQuizBlock": BloomQuizBlock,
|
|
53987
|
+
"BoardgameBoard": BoardgameBoard,
|
|
52419
53988
|
"BookChapterView": BookChapterView,
|
|
52420
53989
|
"BookCoverPage": BookCoverPage,
|
|
52421
53990
|
"BookNavBar": BookNavBar,
|
|
@@ -52445,6 +54014,7 @@ var init_component_registry_generated = __esm({
|
|
|
52445
54014
|
"Center": Center,
|
|
52446
54015
|
"Chart": Chart,
|
|
52447
54016
|
"ChartLegend": ChartLegend,
|
|
54017
|
+
"ChatBar": ChatBar,
|
|
52448
54018
|
"Checkbox": Checkbox,
|
|
52449
54019
|
"ChoiceButton": ChoiceButton,
|
|
52450
54020
|
"CityBuilderBoard": CityBuilderBoard,
|
|
@@ -52505,6 +54075,7 @@ var init_component_registry_generated = __esm({
|
|
|
52505
54075
|
"FileTree": FileTree,
|
|
52506
54076
|
"FilterGroup": FilterGroup,
|
|
52507
54077
|
"FilterPill": FilterPill,
|
|
54078
|
+
"FishingBoard": FishingBoard,
|
|
52508
54079
|
"Flex": Flex,
|
|
52509
54080
|
"FlipCard": FlipCard,
|
|
52510
54081
|
"FlipContainer": FlipContainer,
|
|
@@ -52538,6 +54109,7 @@ var init_component_registry_generated = __esm({
|
|
|
52538
54109
|
"HeroOrganism": HeroOrganism,
|
|
52539
54110
|
"HeroSection": HeroSection,
|
|
52540
54111
|
"HexStrategyBoard": HexStrategyBoard,
|
|
54112
|
+
"HolidayRunnerBoard": HolidayRunnerBoard,
|
|
52541
54113
|
"Icon": Icon,
|
|
52542
54114
|
"InfiniteScrollSentinel": InfiniteScrollSentinel,
|
|
52543
54115
|
"Input": Input,
|
|
@@ -52562,11 +54134,13 @@ var init_component_registry_generated = __esm({
|
|
|
52562
54134
|
"MarketingFooter": MarketingFooter,
|
|
52563
54135
|
"MasterDetail": MasterDetail,
|
|
52564
54136
|
"MasterDetailLayout": MasterDetailLayout,
|
|
54137
|
+
"MatchPuzzleBoard": MatchPuzzleBoard,
|
|
52565
54138
|
"MatrixQuestion": MatrixQuestion,
|
|
52566
54139
|
"MediaGallery": MediaGallery,
|
|
52567
54140
|
"Menu": Menu,
|
|
52568
54141
|
"Meter": Meter,
|
|
52569
54142
|
"MiniMap": MiniMap,
|
|
54143
|
+
"MinigolfBoard": MinigolfBoard,
|
|
52570
54144
|
"Modal": Modal,
|
|
52571
54145
|
"ModalSlot": ModalSlot,
|
|
52572
54146
|
"ModuleCard": ModuleCard,
|
|
@@ -52579,6 +54153,8 @@ var init_component_registry_generated = __esm({
|
|
|
52579
54153
|
"PageHeader": PageHeader,
|
|
52580
54154
|
"Pagination": Pagination,
|
|
52581
54155
|
"PatternTile": PatternTile,
|
|
54156
|
+
"PinballBoard": PinballBoard,
|
|
54157
|
+
"PirateBoard": PirateBoard,
|
|
52582
54158
|
"PlatformerBoard": PlatformerBoard,
|
|
52583
54159
|
"PlatformerCanvas": PlatformerCanvas,
|
|
52584
54160
|
"PlatformerTemplate": PlatformerTemplate,
|
|
@@ -52596,6 +54172,7 @@ var init_component_registry_generated = __esm({
|
|
|
52596
54172
|
"QrScanner": QrScanner,
|
|
52597
54173
|
"QuestTracker": QuestTracker,
|
|
52598
54174
|
"QuizBlock": QuizBlock,
|
|
54175
|
+
"RacingBoard": RacingBoard,
|
|
52599
54176
|
"Radio": Radio,
|
|
52600
54177
|
"RangeSlider": RangeSlider,
|
|
52601
54178
|
"ReflectionBlock": ReflectionBlock,
|
|
@@ -52629,7 +54206,10 @@ var init_component_registry_generated = __esm({
|
|
|
52629
54206
|
"SimulatorBoard": SimulatorBoard,
|
|
52630
54207
|
"Skeleton": Skeleton,
|
|
52631
54208
|
"SocialProof": SocialProof,
|
|
54209
|
+
"SokobanBoard": SokobanBoard,
|
|
52632
54210
|
"SortableList": SortableList,
|
|
54211
|
+
"SpaceShmupBoard": SpaceShmupBoard,
|
|
54212
|
+
"SpaceStationBoard": SpaceStationBoard,
|
|
52633
54213
|
"Spacer": SpacerPattern,
|
|
52634
54214
|
"SpacerPattern": SpacerPattern,
|
|
52635
54215
|
"Sparkline": Sparkline,
|
|
@@ -52637,6 +54217,7 @@ var init_component_registry_generated = __esm({
|
|
|
52637
54217
|
"Split": Split,
|
|
52638
54218
|
"SplitPane": SplitPane,
|
|
52639
54219
|
"SplitSection": SplitSection,
|
|
54220
|
+
"SportsBoard": SportsBoard,
|
|
52640
54221
|
"Sprite": Sprite,
|
|
52641
54222
|
"Stack": Stack,
|
|
52642
54223
|
"StarRating": StarRating,
|
|
@@ -52652,6 +54233,7 @@ var init_component_registry_generated = __esm({
|
|
|
52652
54233
|
"StatusEffect": StatusEffect,
|
|
52653
54234
|
"StepFlow": StepFlow,
|
|
52654
54235
|
"StepFlowOrganism": StepFlowOrganism,
|
|
54236
|
+
"SubagentTracePanel": SubagentTracePanel,
|
|
52655
54237
|
"SvgBranch": SvgBranch,
|
|
52656
54238
|
"SvgConnection": SvgConnection,
|
|
52657
54239
|
"SvgFlow": SvgFlow,
|
|
@@ -52671,6 +54253,7 @@ var init_component_registry_generated = __esm({
|
|
|
52671
54253
|
"Tabs": Tabs,
|
|
52672
54254
|
"TagCloud": TagCloud,
|
|
52673
54255
|
"TagInput": TagInput,
|
|
54256
|
+
"TanksBoard": TanksBoard,
|
|
52674
54257
|
"TeamCard": TeamCard,
|
|
52675
54258
|
"TeamOrganism": TeamOrganism,
|
|
52676
54259
|
"TextHighlight": TextHighlight,
|
|
@@ -52728,7 +54311,7 @@ function SuspenseConfigProvider({
|
|
|
52728
54311
|
config,
|
|
52729
54312
|
children
|
|
52730
54313
|
}) {
|
|
52731
|
-
return
|
|
54314
|
+
return React85__default.createElement(
|
|
52732
54315
|
SuspenseConfigContext.Provider,
|
|
52733
54316
|
{ value: config },
|
|
52734
54317
|
children
|
|
@@ -53218,7 +54801,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
53218
54801
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
53219
54802
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
53220
54803
|
}
|
|
53221
|
-
return /* @__PURE__ */ jsx(
|
|
54804
|
+
return /* @__PURE__ */ jsx(React85__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
53222
54805
|
}
|
|
53223
54806
|
if (!child || typeof child !== "object") return null;
|
|
53224
54807
|
const childId = `${parentId}-${index}`;
|
|
@@ -53258,14 +54841,14 @@ function isPatternConfig(value) {
|
|
|
53258
54841
|
if (value === null || value === void 0) return false;
|
|
53259
54842
|
if (typeof value !== "object") return false;
|
|
53260
54843
|
if (Array.isArray(value)) return false;
|
|
53261
|
-
if (
|
|
54844
|
+
if (React85__default.isValidElement(value)) return false;
|
|
53262
54845
|
if (value instanceof Date) return false;
|
|
53263
54846
|
if (typeof value === "function") return false;
|
|
53264
54847
|
const record = value;
|
|
53265
54848
|
return "type" in record && typeof record.type === "string" && getComponentForPattern(record.type) !== null;
|
|
53266
54849
|
}
|
|
53267
54850
|
function isPlainConfigObject(value) {
|
|
53268
|
-
if (
|
|
54851
|
+
if (React85__default.isValidElement(value)) return false;
|
|
53269
54852
|
if (value instanceof Date) return false;
|
|
53270
54853
|
const proto = Object.getPrototypeOf(value);
|
|
53271
54854
|
return proto === Object.prototype || proto === null;
|
|
@@ -53391,7 +54974,7 @@ function SlotContentRenderer({
|
|
|
53391
54974
|
for (const slotKey of CONTENT_NODE_SLOTS) {
|
|
53392
54975
|
const slotVal = restProps[slotKey];
|
|
53393
54976
|
if (slotVal === void 0 || slotVal === null) continue;
|
|
53394
|
-
if (
|
|
54977
|
+
if (React85__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
|
|
53395
54978
|
if (Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
|
|
53396
54979
|
nodeSlotOverrides[slotKey] = renderPatternChildren(
|
|
53397
54980
|
slotVal,
|
|
@@ -53729,7 +55312,7 @@ function resolveLambdaBindings(body, params, item, index) {
|
|
|
53729
55312
|
if (Array.isArray(body)) {
|
|
53730
55313
|
return body.map((b) => recur(b));
|
|
53731
55314
|
}
|
|
53732
|
-
if (body !== null && typeof body === "object" && !
|
|
55315
|
+
if (body !== null && typeof body === "object" && !React85__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
53733
55316
|
const out = {};
|
|
53734
55317
|
for (const [k, v] of Object.entries(body)) {
|
|
53735
55318
|
out[k] = recur(v);
|
|
@@ -53748,7 +55331,7 @@ function getSlotContentRenderer4() {
|
|
|
53748
55331
|
function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
53749
55332
|
return (item, index) => {
|
|
53750
55333
|
const resolvedBody = resolveLambdaBindings(lambdaBody, params, item, index);
|
|
53751
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
55334
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React85__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
53752
55335
|
return null;
|
|
53753
55336
|
}
|
|
53754
55337
|
const record = resolvedBody;
|
|
@@ -53767,7 +55350,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
53767
55350
|
props: childProps,
|
|
53768
55351
|
priority: 0
|
|
53769
55352
|
};
|
|
53770
|
-
return
|
|
55353
|
+
return React85__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
53771
55354
|
};
|
|
53772
55355
|
}
|
|
53773
55356
|
function convertNode(node, callerKey) {
|
|
@@ -53786,7 +55369,7 @@ function convertNode(node, callerKey) {
|
|
|
53786
55369
|
});
|
|
53787
55370
|
return anyChanged ? mapped : node;
|
|
53788
55371
|
}
|
|
53789
|
-
if (typeof node === "object" && !
|
|
55372
|
+
if (typeof node === "object" && !React85__default.isValidElement(node) && !(node instanceof Date)) {
|
|
53790
55373
|
return convertObjectProps(node);
|
|
53791
55374
|
}
|
|
53792
55375
|
return node;
|