@almadar/ui 5.67.0 → 5.69.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avl/index.cjs +3138 -1529
- package/dist/avl/index.js +1868 -259
- package/dist/components/game/molecules/IsometricCanvas.d.ts +1 -1
- package/dist/components/game/organisms/BoardgameBoard.d.ts +37 -0
- package/dist/components/game/organisms/FishingBoard.d.ts +33 -0
- package/dist/components/game/organisms/HolidayRunnerBoard.d.ts +35 -0
- package/dist/components/game/organisms/MatchPuzzleBoard.d.ts +37 -0
- package/dist/components/game/organisms/MinigolfBoard.d.ts +37 -0
- package/dist/components/game/organisms/PinballBoard.d.ts +35 -0
- package/dist/components/game/organisms/PirateBoard.d.ts +37 -0
- package/dist/components/game/organisms/RacingBoard.d.ts +29 -0
- package/dist/components/game/organisms/SokobanBoard.d.ts +37 -0
- package/dist/components/game/organisms/SpaceShmupBoard.d.ts +20 -0
- package/dist/components/game/organisms/SpaceStationBoard.d.ts +37 -0
- package/dist/components/game/organisms/SportsBoard.d.ts +37 -0
- package/dist/components/game/organisms/TanksBoard.d.ts +37 -0
- package/dist/components/game/organisms/index.d.ts +13 -0
- package/dist/components/game/organisms/utils/isometric.d.ts +10 -1
- package/dist/components/index.cjs +7350 -6737
- package/dist/components/index.js +6339 -5737
- package/dist/providers/index.cjs +2947 -1338
- package/dist/providers/index.js +1844 -235
- package/dist/runtime/index.cjs +3003 -1394
- package/dist/runtime/index.js +1848 -239
- package/package.json +1 -1
package/dist/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);
|
|
@@ -7130,6 +7130,14 @@ var init_ControlButton = __esm({
|
|
|
7130
7130
|
}
|
|
7131
7131
|
});
|
|
7132
7132
|
|
|
7133
|
+
// components/game/organisms/utils/spriteSheetConstants.ts
|
|
7134
|
+
var SHEET_COLUMNS;
|
|
7135
|
+
var init_spriteSheetConstants = __esm({
|
|
7136
|
+
"components/game/organisms/utils/spriteSheetConstants.ts"() {
|
|
7137
|
+
SHEET_COLUMNS = 8;
|
|
7138
|
+
}
|
|
7139
|
+
});
|
|
7140
|
+
|
|
7133
7141
|
// components/game/organisms/utils/spriteAnimation.ts
|
|
7134
7142
|
function inferDirection(dx, dy) {
|
|
7135
7143
|
if (dx === 0 && dy === 0) return "se";
|
|
@@ -7672,8 +7680,8 @@ function XPBar({
|
|
|
7672
7680
|
}) {
|
|
7673
7681
|
const sizes = sizeMap9[size];
|
|
7674
7682
|
const percentage = max > 0 ? Math.max(0, Math.min(100, current / max * 100)) : 0;
|
|
7675
|
-
const [fillWidth, setFillWidth] =
|
|
7676
|
-
|
|
7683
|
+
const [fillWidth, setFillWidth] = React85.useState(animated ? 0 : percentage);
|
|
7684
|
+
React85.useEffect(() => {
|
|
7677
7685
|
if (!animated) {
|
|
7678
7686
|
setFillWidth(percentage);
|
|
7679
7687
|
return;
|
|
@@ -8181,9 +8189,9 @@ function MiniMap({
|
|
|
8181
8189
|
viewportRect = DEFAULT_VIEWPORT,
|
|
8182
8190
|
className
|
|
8183
8191
|
}) {
|
|
8184
|
-
const canvasRef =
|
|
8185
|
-
const frameRef =
|
|
8186
|
-
|
|
8192
|
+
const canvasRef = React85.useRef(null);
|
|
8193
|
+
const frameRef = React85.useRef(0);
|
|
8194
|
+
React85.useEffect(() => {
|
|
8187
8195
|
const canvas = canvasRef.current;
|
|
8188
8196
|
if (!canvas) return;
|
|
8189
8197
|
const ctx = canvas.getContext("2d");
|
|
@@ -8372,7 +8380,7 @@ var init_ErrorBoundary = __esm({
|
|
|
8372
8380
|
}
|
|
8373
8381
|
);
|
|
8374
8382
|
};
|
|
8375
|
-
ErrorBoundary = class extends
|
|
8383
|
+
ErrorBoundary = class extends React85__default.Component {
|
|
8376
8384
|
constructor(props) {
|
|
8377
8385
|
super(props);
|
|
8378
8386
|
__publicField(this, "reset", () => {
|
|
@@ -9407,8 +9415,8 @@ function ActionButtons({
|
|
|
9407
9415
|
disabled
|
|
9408
9416
|
}) {
|
|
9409
9417
|
const eventBus = useEventBus();
|
|
9410
|
-
const [activeButtons, setActiveButtons] =
|
|
9411
|
-
const handlePress =
|
|
9418
|
+
const [activeButtons, setActiveButtons] = React85.useState(/* @__PURE__ */ new Set());
|
|
9419
|
+
const handlePress = React85.useCallback(
|
|
9412
9420
|
(id) => {
|
|
9413
9421
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
9414
9422
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -9416,7 +9424,7 @@ function ActionButtons({
|
|
|
9416
9424
|
},
|
|
9417
9425
|
[actionEvent, eventBus, onAction]
|
|
9418
9426
|
);
|
|
9419
|
-
const handleRelease =
|
|
9427
|
+
const handleRelease = React85.useCallback(
|
|
9420
9428
|
(id) => {
|
|
9421
9429
|
setActiveButtons((prev) => {
|
|
9422
9430
|
const next = new Set(prev);
|
|
@@ -10965,6 +10973,11 @@ function isoToScreen(tileX, tileY, scale, baseOffsetX, layout = "isometric") {
|
|
|
10965
10973
|
const screenY2 = tileY * (scaledFloorHeight * 0.75);
|
|
10966
10974
|
return { x: screenX2, y: screenY2 };
|
|
10967
10975
|
}
|
|
10976
|
+
if (layout === "flat") {
|
|
10977
|
+
const screenX2 = tileX * scaledTileWidth + baseOffsetX;
|
|
10978
|
+
const screenY2 = tileY * scaledFloorHeight;
|
|
10979
|
+
return { x: screenX2, y: screenY2 };
|
|
10980
|
+
}
|
|
10968
10981
|
const screenX = (tileX - tileY) * (scaledTileWidth / 2) + baseOffsetX;
|
|
10969
10982
|
const screenY = (tileX + tileY) * (scaledFloorHeight / 2);
|
|
10970
10983
|
return { x: screenX, y: screenY };
|
|
@@ -10977,6 +10990,11 @@ function screenToIso(screenX, screenY, scale, baseOffsetX, layout = "isometric")
|
|
|
10977
10990
|
const col = Math.round((screenX - (row & 1) * (scaledTileWidth / 2) - baseOffsetX) / scaledTileWidth);
|
|
10978
10991
|
return { x: col, y: row };
|
|
10979
10992
|
}
|
|
10993
|
+
if (layout === "flat") {
|
|
10994
|
+
const col = Math.round((screenX - baseOffsetX) / scaledTileWidth);
|
|
10995
|
+
const row = Math.round(screenY / scaledFloorHeight);
|
|
10996
|
+
return { x: col, y: row };
|
|
10997
|
+
}
|
|
10980
10998
|
const adjustedX = screenX - baseOffsetX;
|
|
10981
10999
|
const tileX = (adjustedX / (scaledTileWidth / 2) + screenY / (scaledFloorHeight / 2)) / 2;
|
|
10982
11000
|
const tileY = (screenY / (scaledFloorHeight / 2) - adjustedX / (scaledTileWidth / 2)) / 2;
|
|
@@ -11096,7 +11114,7 @@ function IsometricCanvas({
|
|
|
11096
11114
|
);
|
|
11097
11115
|
const sortedTiles = useMemo(() => {
|
|
11098
11116
|
const tiles = [...tilesProp];
|
|
11099
|
-
if (tileLayout === "hex") {
|
|
11117
|
+
if (tileLayout === "hex" || tileLayout === "flat") {
|
|
11100
11118
|
tiles.sort((a, b) => a.y !== b.y ? a.y - b.y : a.x - b.x);
|
|
11101
11119
|
} else {
|
|
11102
11120
|
tiles.sort((a, b) => {
|
|
@@ -11224,7 +11242,7 @@ function IsometricCanvas({
|
|
|
11224
11242
|
const minX = Math.min(...allScreenPos.map((p2) => p2.x));
|
|
11225
11243
|
const maxX = Math.max(...allScreenPos.map((p2) => p2.x + scaledTileWidth));
|
|
11226
11244
|
const minY = Math.min(...allScreenPos.map((p2) => p2.y));
|
|
11227
|
-
const tileBottomExtent = tileLayout === "hex" ? scaledTileWidth : scaledTileHeight;
|
|
11245
|
+
const tileBottomExtent = tileLayout === "hex" || tileLayout === "flat" ? scaledTileWidth : scaledTileHeight;
|
|
11228
11246
|
const maxY = Math.max(...allScreenPos.map((p2) => p2.y + tileBottomExtent));
|
|
11229
11247
|
const worldW = maxX - minX;
|
|
11230
11248
|
const worldH = maxY - minY;
|
|
@@ -11317,7 +11335,7 @@ function IsometricCanvas({
|
|
|
11317
11335
|
const drawW = scaledTileWidth;
|
|
11318
11336
|
const drawH = scaledTileWidth * (img.naturalHeight / img.naturalWidth);
|
|
11319
11337
|
const drawX = pos.x;
|
|
11320
|
-
const drawY = tileLayout === "hex" ? pos.y : pos.y + scaledTileHeight - drawH;
|
|
11338
|
+
const drawY = tileLayout === "hex" || tileLayout === "flat" ? pos.y : pos.y + scaledTileHeight - drawH;
|
|
11321
11339
|
ctx.drawImage(img, drawX, drawY, drawW, drawH);
|
|
11322
11340
|
}
|
|
11323
11341
|
} else {
|
|
@@ -11384,7 +11402,7 @@ function IsometricCanvas({
|
|
|
11384
11402
|
}
|
|
11385
11403
|
}
|
|
11386
11404
|
const sortedFeatures = [...features].sort((a, b) => {
|
|
11387
|
-
if (tileLayout === "hex") return a.y !== b.y ? a.y - b.y : a.x - b.x;
|
|
11405
|
+
if (tileLayout === "hex" || tileLayout === "flat") return a.y !== b.y ? a.y - b.y : a.x - b.x;
|
|
11388
11406
|
const depthA = a.x + a.y;
|
|
11389
11407
|
const depthB = b.x + b.y;
|
|
11390
11408
|
return depthA !== depthB ? depthA - depthB : a.y - b.y;
|
|
@@ -11425,7 +11443,7 @@ function IsometricCanvas({
|
|
|
11425
11443
|
}
|
|
11426
11444
|
const unitsWithPosition = units.filter((u) => !!u.position);
|
|
11427
11445
|
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;
|
|
11446
|
+
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
11447
|
const depthA = a.position.x + a.position.y;
|
|
11430
11448
|
const depthB = b.position.x + b.position.y;
|
|
11431
11449
|
return depthA !== depthB ? depthA - depthB : a.position.y - b.position.y;
|
|
@@ -11443,7 +11461,13 @@ function IsometricCanvas({
|
|
|
11443
11461
|
const img = unitSpriteUrl ? getImage(unitSpriteUrl) : null;
|
|
11444
11462
|
const unitDrawH = scaledFloorHeight * spriteHeightRatio * unitScale;
|
|
11445
11463
|
const maxUnitW = scaledTileWidth * spriteMaxWidthRatio * unitScale;
|
|
11446
|
-
const
|
|
11464
|
+
const SHEET_ROWS = 5;
|
|
11465
|
+
const sheetFrameW = img ? img.naturalWidth / SHEET_COLUMNS : 0;
|
|
11466
|
+
const sheetFrameH = img ? img.naturalHeight / SHEET_ROWS : 0;
|
|
11467
|
+
const imgIsSheet = img ? img.naturalWidth % SHEET_COLUMNS === 0 && img.naturalHeight % SHEET_ROWS === 0 && Math.abs(sheetFrameW - sheetFrameH) < 2 : false;
|
|
11468
|
+
const frameW = imgIsSheet ? sheetFrameW : img?.naturalWidth ?? 1;
|
|
11469
|
+
const frameH = imgIsSheet ? sheetFrameH : img?.naturalHeight ?? 1;
|
|
11470
|
+
const ar = frameW / (frameH || 1);
|
|
11447
11471
|
let drawH = unitDrawH;
|
|
11448
11472
|
let drawW = unitDrawH * ar;
|
|
11449
11473
|
if (drawW > maxUnitW) {
|
|
@@ -11457,7 +11481,11 @@ function IsometricCanvas({
|
|
|
11457
11481
|
ctx.save();
|
|
11458
11482
|
ctx.globalAlpha = 0.25;
|
|
11459
11483
|
if (img) {
|
|
11460
|
-
|
|
11484
|
+
if (imgIsSheet) {
|
|
11485
|
+
ctx.drawImage(img, 0, 0, sheetFrameW, sheetFrameH, ghostCenterX - drawW / 2, ghostGroundY - drawH, drawW, drawH);
|
|
11486
|
+
} else {
|
|
11487
|
+
ctx.drawImage(img, ghostCenterX - drawW / 2, ghostGroundY - drawH, drawW, drawH);
|
|
11488
|
+
}
|
|
11461
11489
|
} else {
|
|
11462
11490
|
const color = unit.team === "player" ? "#3b82f6" : unit.team === "enemy" ? "#ef4444" : "#6b7280";
|
|
11463
11491
|
ctx.beginPath();
|
|
@@ -11501,14 +11529,21 @@ function IsometricCanvas({
|
|
|
11501
11529
|
ctx.restore();
|
|
11502
11530
|
} else if (img) {
|
|
11503
11531
|
const spriteY = groundY - drawH - breatheOffset;
|
|
11532
|
+
const drawUnit = (x) => {
|
|
11533
|
+
if (imgIsSheet) {
|
|
11534
|
+
ctx.drawImage(img, 0, 0, sheetFrameW, sheetFrameH, x, spriteY, drawW, drawH);
|
|
11535
|
+
} else {
|
|
11536
|
+
ctx.drawImage(img, x, spriteY, drawW, drawH);
|
|
11537
|
+
}
|
|
11538
|
+
};
|
|
11504
11539
|
if (unit.team) {
|
|
11505
11540
|
ctx.save();
|
|
11506
11541
|
ctx.shadowColor = unit.team === "player" ? "rgba(0, 150, 255, 0.6)" : "rgba(255, 50, 50, 0.6)";
|
|
11507
11542
|
ctx.shadowBlur = 12 * scale;
|
|
11508
|
-
|
|
11543
|
+
drawUnit(centerX - drawW / 2);
|
|
11509
11544
|
ctx.restore();
|
|
11510
11545
|
} else {
|
|
11511
|
-
|
|
11546
|
+
drawUnit(centerX - drawW / 2);
|
|
11512
11547
|
}
|
|
11513
11548
|
} else {
|
|
11514
11549
|
const color = unit.team === "player" ? "#3b82f6" : unit.team === "enemy" ? "#ef4444" : "#6b7280";
|
|
@@ -11801,6 +11836,7 @@ var init_IsometricCanvas = __esm({
|
|
|
11801
11836
|
init_useUnitSpriteAtlas();
|
|
11802
11837
|
init_verificationRegistry();
|
|
11803
11838
|
init_isometric();
|
|
11839
|
+
init_spriteSheetConstants();
|
|
11804
11840
|
IsometricCanvas.displayName = "IsometricCanvas";
|
|
11805
11841
|
IsometricCanvas_default = IsometricCanvas;
|
|
11806
11842
|
}
|
|
@@ -13600,7 +13636,7 @@ var init_CodeBlock = __esm({
|
|
|
13600
13636
|
};
|
|
13601
13637
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
13602
13638
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
13603
|
-
CodeBlock =
|
|
13639
|
+
CodeBlock = React85__default.memo(
|
|
13604
13640
|
({
|
|
13605
13641
|
code: rawCode,
|
|
13606
13642
|
language = "text",
|
|
@@ -14187,7 +14223,7 @@ var init_MarkdownContent = __esm({
|
|
|
14187
14223
|
init_Box();
|
|
14188
14224
|
init_CodeBlock();
|
|
14189
14225
|
init_cn();
|
|
14190
|
-
MarkdownContent =
|
|
14226
|
+
MarkdownContent = React85__default.memo(
|
|
14191
14227
|
({ content, direction = "ltr", className }) => {
|
|
14192
14228
|
const { t: _t } = useTranslate();
|
|
14193
14229
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -14477,6 +14513,48 @@ var init_BloomQuizBlock = __esm({
|
|
|
14477
14513
|
BloomQuizBlock.displayName = "BloomQuizBlock";
|
|
14478
14514
|
}
|
|
14479
14515
|
});
|
|
14516
|
+
function BoardgameBoard({
|
|
14517
|
+
tiles,
|
|
14518
|
+
units,
|
|
14519
|
+
features,
|
|
14520
|
+
assetManifest,
|
|
14521
|
+
assetBaseUrl,
|
|
14522
|
+
scale = 0.45,
|
|
14523
|
+
showMinimap = false,
|
|
14524
|
+
enableCamera = true,
|
|
14525
|
+
tileClickEvent,
|
|
14526
|
+
unitClickEvent,
|
|
14527
|
+
isLoading,
|
|
14528
|
+
error,
|
|
14529
|
+
className
|
|
14530
|
+
}) {
|
|
14531
|
+
return /* @__PURE__ */ jsx("div", { className: cn("boardgame-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
14532
|
+
IsometricCanvas_default,
|
|
14533
|
+
{
|
|
14534
|
+
tileLayout: "flat",
|
|
14535
|
+
tiles,
|
|
14536
|
+
units,
|
|
14537
|
+
features,
|
|
14538
|
+
assetManifest,
|
|
14539
|
+
assetBaseUrl,
|
|
14540
|
+
scale,
|
|
14541
|
+
showMinimap,
|
|
14542
|
+
enableCamera,
|
|
14543
|
+
tileClickEvent,
|
|
14544
|
+
unitClickEvent,
|
|
14545
|
+
isLoading,
|
|
14546
|
+
error
|
|
14547
|
+
}
|
|
14548
|
+
) });
|
|
14549
|
+
}
|
|
14550
|
+
var init_BoardgameBoard = __esm({
|
|
14551
|
+
"components/game/organisms/BoardgameBoard.tsx"() {
|
|
14552
|
+
"use client";
|
|
14553
|
+
init_cn();
|
|
14554
|
+
init_IsometricCanvas();
|
|
14555
|
+
BoardgameBoard.displayName = "BoardgameBoard";
|
|
14556
|
+
}
|
|
14557
|
+
});
|
|
14480
14558
|
var MIN_DIAGRAM_WIDTH, ScaledDiagram;
|
|
14481
14559
|
var init_ScaledDiagram = __esm({
|
|
14482
14560
|
"components/core/molecules/ScaledDiagram.tsx"() {
|
|
@@ -15514,7 +15592,7 @@ var init_StateMachineView = __esm({
|
|
|
15514
15592
|
style: { top: title ? 30 : 0 },
|
|
15515
15593
|
children: [
|
|
15516
15594
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
15517
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
15595
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React85__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
15518
15596
|
StateNode,
|
|
15519
15597
|
{
|
|
15520
15598
|
state,
|
|
@@ -19469,7 +19547,7 @@ function CardHand({
|
|
|
19469
19547
|
className
|
|
19470
19548
|
}) {
|
|
19471
19549
|
const eventBus = useEventBus();
|
|
19472
|
-
const handleClick =
|
|
19550
|
+
const handleClick = React85.useCallback(
|
|
19473
19551
|
(card) => {
|
|
19474
19552
|
if (card.disabled) return;
|
|
19475
19553
|
onCardClick?.(card.id);
|
|
@@ -21615,6 +21693,215 @@ var init_ChartLegend = __esm({
|
|
|
21615
21693
|
ChartLegend.displayName = "ChartLegend";
|
|
21616
21694
|
}
|
|
21617
21695
|
});
|
|
21696
|
+
|
|
21697
|
+
// components/core/organisms/trace-edit-focus.ts
|
|
21698
|
+
function asString(v) {
|
|
21699
|
+
return typeof v === "string" ? v : void 0;
|
|
21700
|
+
}
|
|
21701
|
+
function asLevel(v) {
|
|
21702
|
+
if (typeof v === "string" && EDIT_FOCUS_LEVELS.has(v)) {
|
|
21703
|
+
return v;
|
|
21704
|
+
}
|
|
21705
|
+
return "node";
|
|
21706
|
+
}
|
|
21707
|
+
function isEventPayload(v) {
|
|
21708
|
+
return v !== null && v !== void 0 && typeof v === "object" && !Array.isArray(v) && !(v instanceof Date);
|
|
21709
|
+
}
|
|
21710
|
+
function parseEditFocus(value) {
|
|
21711
|
+
if (!isEventPayload(value)) return null;
|
|
21712
|
+
const payload = value;
|
|
21713
|
+
const orbital = asString(payload.orbital);
|
|
21714
|
+
if (orbital === void 0 || orbital.length === 0) return null;
|
|
21715
|
+
const focus = {
|
|
21716
|
+
level: asLevel(payload.level),
|
|
21717
|
+
orbital,
|
|
21718
|
+
label: asString(payload.label) ?? orbital
|
|
21719
|
+
};
|
|
21720
|
+
const trait = asString(payload.trait);
|
|
21721
|
+
if (trait !== void 0) focus.trait = trait;
|
|
21722
|
+
const transition = asString(payload.transition);
|
|
21723
|
+
if (transition !== void 0) focus.transition = transition;
|
|
21724
|
+
const state = asString(payload.state);
|
|
21725
|
+
if (state !== void 0) focus.state = state;
|
|
21726
|
+
const slot = asString(payload.slot);
|
|
21727
|
+
if (slot !== void 0) focus.slot = slot;
|
|
21728
|
+
const path = asString(payload.path);
|
|
21729
|
+
if (path !== void 0) focus.path = path;
|
|
21730
|
+
const patternType = asString(payload.patternType);
|
|
21731
|
+
if (patternType !== void 0) focus.patternType = patternType;
|
|
21732
|
+
const entity = asString(payload.entity);
|
|
21733
|
+
if (entity !== void 0) focus.entity = entity;
|
|
21734
|
+
const source = asString(payload.source);
|
|
21735
|
+
if (source !== void 0) focus.source = source;
|
|
21736
|
+
return focus;
|
|
21737
|
+
}
|
|
21738
|
+
var ELEMENT_SELECTED_EVENT, EDIT_FOCUS_LEVELS;
|
|
21739
|
+
var init_trace_edit_focus = __esm({
|
|
21740
|
+
"components/core/organisms/trace-edit-focus.ts"() {
|
|
21741
|
+
ELEMENT_SELECTED_EVENT = "UI:ELEMENT_SELECTED";
|
|
21742
|
+
EDIT_FOCUS_LEVELS = /* @__PURE__ */ new Set([
|
|
21743
|
+
"node",
|
|
21744
|
+
"slot",
|
|
21745
|
+
"field",
|
|
21746
|
+
"effect",
|
|
21747
|
+
"trait",
|
|
21748
|
+
"page",
|
|
21749
|
+
"orbital"
|
|
21750
|
+
]);
|
|
21751
|
+
}
|
|
21752
|
+
});
|
|
21753
|
+
function getJepaBadgeVariant(probability) {
|
|
21754
|
+
if (probability >= 0.9) return "success";
|
|
21755
|
+
if (probability >= 0.5) return "warning";
|
|
21756
|
+
return "danger";
|
|
21757
|
+
}
|
|
21758
|
+
function ChatBar({
|
|
21759
|
+
status = "idle",
|
|
21760
|
+
activeGate,
|
|
21761
|
+
jepaValidity,
|
|
21762
|
+
placeholder,
|
|
21763
|
+
context,
|
|
21764
|
+
className
|
|
21765
|
+
}) {
|
|
21766
|
+
const { t } = useTranslate();
|
|
21767
|
+
const eventBus = useEventBus();
|
|
21768
|
+
const [inputValue, setInputValue] = useState("");
|
|
21769
|
+
const [focus, setFocus] = useState(null);
|
|
21770
|
+
const clearFocus = useCallback(() => {
|
|
21771
|
+
setFocus(null);
|
|
21772
|
+
eventBus.emit(ELEMENT_SELECTED_EVENT, { focus: null });
|
|
21773
|
+
}, [eventBus]);
|
|
21774
|
+
const handleKeyDown = useCallback((e) => {
|
|
21775
|
+
if (e.key !== "Enter" || e.shiftKey) return;
|
|
21776
|
+
const trimmed = inputValue.trim();
|
|
21777
|
+
if (!trimmed) return;
|
|
21778
|
+
e.preventDefault();
|
|
21779
|
+
eventBus.emit("UI:CHAT_SEND", { message: trimmed });
|
|
21780
|
+
}, [inputValue, eventBus]);
|
|
21781
|
+
useEffect(() => {
|
|
21782
|
+
const unsubSend = eventBus.on("UI:CHAT_SEND", () => {
|
|
21783
|
+
setInputValue("");
|
|
21784
|
+
setFocus(null);
|
|
21785
|
+
});
|
|
21786
|
+
const unsubSelect = eventBus.on(ELEMENT_SELECTED_EVENT, (e) => {
|
|
21787
|
+
setFocus(parseEditFocus(e.payload?.focus));
|
|
21788
|
+
});
|
|
21789
|
+
return () => {
|
|
21790
|
+
unsubSend();
|
|
21791
|
+
unsubSelect();
|
|
21792
|
+
};
|
|
21793
|
+
}, [eventBus]);
|
|
21794
|
+
const trailingAction = status === "error" ? /* @__PURE__ */ jsxs(Button, { variant: "secondary", size: "sm", action: "RETRY_GENERATION", className: "rounded-none flex-shrink-0 h-auto", children: [
|
|
21795
|
+
/* @__PURE__ */ jsx(Icon, { name: "refresh-cw", size: "xs" }),
|
|
21796
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", children: t("openFile.retry") })
|
|
21797
|
+
] }) : status === "running" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
21798
|
+
/* @__PURE__ */ jsx(
|
|
21799
|
+
Button,
|
|
21800
|
+
{
|
|
21801
|
+
variant: "ghost",
|
|
21802
|
+
size: "sm",
|
|
21803
|
+
action: "PAUSE",
|
|
21804
|
+
title: t("chatBar.pauseTheAgentYouCanEdit"),
|
|
21805
|
+
className: "rounded-none flex-shrink-0 h-auto",
|
|
21806
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "pause", size: "xs" })
|
|
21807
|
+
}
|
|
21808
|
+
),
|
|
21809
|
+
/* @__PURE__ */ jsx(
|
|
21810
|
+
Button,
|
|
21811
|
+
{
|
|
21812
|
+
variant: "ghost",
|
|
21813
|
+
size: "sm",
|
|
21814
|
+
action: "STOP",
|
|
21815
|
+
title: t("chatBar.cancelGeneration"),
|
|
21816
|
+
className: "rounded-none flex-shrink-0 h-auto border-l border-[var(--color-border)]",
|
|
21817
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "square", size: "xs" })
|
|
21818
|
+
}
|
|
21819
|
+
)
|
|
21820
|
+
] }) : status === "paused" ? /* @__PURE__ */ jsxs(
|
|
21821
|
+
Button,
|
|
21822
|
+
{
|
|
21823
|
+
variant: "primary",
|
|
21824
|
+
size: "sm",
|
|
21825
|
+
action: "RESUME",
|
|
21826
|
+
title: t("chatBar.resumeTheAgentYourCanvasEdits"),
|
|
21827
|
+
className: "rounded-none flex-shrink-0 h-auto",
|
|
21828
|
+
children: [
|
|
21829
|
+
/* @__PURE__ */ jsx(Icon, { name: "play", size: "xs" }),
|
|
21830
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", children: t("chatBar.resume") })
|
|
21831
|
+
]
|
|
21832
|
+
}
|
|
21833
|
+
) : /* @__PURE__ */ jsx(
|
|
21834
|
+
Button,
|
|
21835
|
+
{
|
|
21836
|
+
variant: "primary",
|
|
21837
|
+
size: "sm",
|
|
21838
|
+
action: "CHAT_SEND",
|
|
21839
|
+
actionPayload: { message: inputValue.trim() },
|
|
21840
|
+
disabled: !inputValue.trim(),
|
|
21841
|
+
"aria-label": t("chatBar.sendMessage"),
|
|
21842
|
+
className: "rounded-none flex-shrink-0 h-auto",
|
|
21843
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "send", size: "xs" })
|
|
21844
|
+
}
|
|
21845
|
+
);
|
|
21846
|
+
return /* @__PURE__ */ jsxs(Box, { className: `border-t border-[var(--color-border)] bg-[var(--color-card)] ${className ?? ""}`, children: [
|
|
21847
|
+
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: [
|
|
21848
|
+
/* @__PURE__ */ jsx(Icon, { name: "mouse-pointer-2", size: "xs" }),
|
|
21849
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-inherit truncate", children: [
|
|
21850
|
+
t("chatBar.editing"),
|
|
21851
|
+
": ",
|
|
21852
|
+
focus.label
|
|
21853
|
+
] }),
|
|
21854
|
+
/* @__PURE__ */ jsx(
|
|
21855
|
+
Box,
|
|
21856
|
+
{
|
|
21857
|
+
onClick: clearFocus,
|
|
21858
|
+
title: t("chatBar.clearSelection"),
|
|
21859
|
+
className: "cursor-pointer flex items-center ml-1 hover:opacity-70",
|
|
21860
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" })
|
|
21861
|
+
}
|
|
21862
|
+
)
|
|
21863
|
+
] }) }),
|
|
21864
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center px-4 py-2", children: [
|
|
21865
|
+
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 }) }),
|
|
21866
|
+
/* @__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: [
|
|
21867
|
+
/* @__PURE__ */ jsx(
|
|
21868
|
+
Textarea,
|
|
21869
|
+
{
|
|
21870
|
+
value: inputValue,
|
|
21871
|
+
placeholder: placeholder ?? t("chatBar.askTheAgentAnything"),
|
|
21872
|
+
onChange: (e) => setInputValue(e.target.value),
|
|
21873
|
+
onKeyDown: handleKeyDown,
|
|
21874
|
+
rows: 1,
|
|
21875
|
+
className: "flex-1 min-w-0 min-h-0 text-sm border-0 rounded-none shadow-none bg-transparent resize-none focus:ring-0"
|
|
21876
|
+
}
|
|
21877
|
+
),
|
|
21878
|
+
trailingAction
|
|
21879
|
+
] }),
|
|
21880
|
+
(activeGate || jepaValidity !== void 0) && /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center flex-shrink-0", children: [
|
|
21881
|
+
activeGate && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "whitespace-nowrap", children: activeGate }),
|
|
21882
|
+
jepaValidity !== void 0 && /* @__PURE__ */ jsx(Badge, { variant: getJepaBadgeVariant(jepaValidity), size: "sm", children: /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-inherit", children: [
|
|
21883
|
+
(jepaValidity * 100).toFixed(1),
|
|
21884
|
+
"%"
|
|
21885
|
+
] }) })
|
|
21886
|
+
] })
|
|
21887
|
+
] })
|
|
21888
|
+
] });
|
|
21889
|
+
}
|
|
21890
|
+
var init_ChatBar = __esm({
|
|
21891
|
+
"components/core/organisms/ChatBar.tsx"() {
|
|
21892
|
+
"use client";
|
|
21893
|
+
init_Box();
|
|
21894
|
+
init_Stack();
|
|
21895
|
+
init_Typography();
|
|
21896
|
+
init_Button();
|
|
21897
|
+
init_Badge();
|
|
21898
|
+
init_Icon();
|
|
21899
|
+
init_Textarea();
|
|
21900
|
+
init_useEventBus();
|
|
21901
|
+
init_trace_edit_focus();
|
|
21902
|
+
ChatBar.displayName = "ChatBar";
|
|
21903
|
+
}
|
|
21904
|
+
});
|
|
21618
21905
|
function resolveManifestUrl2(manifest, relative) {
|
|
21619
21906
|
if (relative == null) return void 0;
|
|
21620
21907
|
if (/^https?:\/\//.test(relative)) return relative;
|
|
@@ -22738,7 +23025,7 @@ function CraftingRecipe({
|
|
|
22738
23025
|
className
|
|
22739
23026
|
}) {
|
|
22740
23027
|
const eventBus = useEventBus();
|
|
22741
|
-
const handleCraft =
|
|
23028
|
+
const handleCraft = React85.useCallback(() => {
|
|
22742
23029
|
onCraft?.();
|
|
22743
23030
|
if (craftEvent) {
|
|
22744
23031
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -22755,7 +23042,7 @@ function CraftingRecipe({
|
|
|
22755
23042
|
children: [
|
|
22756
23043
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
22757
23044
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
22758
|
-
return /* @__PURE__ */ jsxs(
|
|
23045
|
+
return /* @__PURE__ */ jsxs(React85.Fragment, { children: [
|
|
22759
23046
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
22760
23047
|
ItemSlot,
|
|
22761
23048
|
{
|
|
@@ -22827,8 +23114,8 @@ function DPad({
|
|
|
22827
23114
|
}) {
|
|
22828
23115
|
const eventBus = useEventBus();
|
|
22829
23116
|
const sizes = sizeMap15[size];
|
|
22830
|
-
const [activeDirections, setActiveDirections] =
|
|
22831
|
-
const handlePress =
|
|
23117
|
+
const [activeDirections, setActiveDirections] = React85.useState(/* @__PURE__ */ new Set());
|
|
23118
|
+
const handlePress = React85.useCallback(
|
|
22832
23119
|
(direction) => {
|
|
22833
23120
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
22834
23121
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -22836,7 +23123,7 @@ function DPad({
|
|
|
22836
23123
|
},
|
|
22837
23124
|
[directionEvent, eventBus, onDirection]
|
|
22838
23125
|
);
|
|
22839
|
-
const handleRelease =
|
|
23126
|
+
const handleRelease = React85.useCallback(
|
|
22840
23127
|
(direction) => {
|
|
22841
23128
|
setActiveDirections((prev) => {
|
|
22842
23129
|
const next = new Set(prev);
|
|
@@ -23721,8 +24008,8 @@ var init_Menu = __esm({
|
|
|
23721
24008
|
"bottom-end": "bottom-start"
|
|
23722
24009
|
};
|
|
23723
24010
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
23724
|
-
const triggerChild =
|
|
23725
|
-
const triggerElement =
|
|
24011
|
+
const triggerChild = React85__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
24012
|
+
const triggerElement = React85__default.cloneElement(
|
|
23726
24013
|
triggerChild,
|
|
23727
24014
|
{
|
|
23728
24015
|
ref: triggerRef,
|
|
@@ -23817,14 +24104,14 @@ function useDataDnd(args) {
|
|
|
23817
24104
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
23818
24105
|
const enabled = isZone || Boolean(dndRoot);
|
|
23819
24106
|
const eventBus = useEventBus();
|
|
23820
|
-
const parentRoot =
|
|
24107
|
+
const parentRoot = React85__default.useContext(RootCtx);
|
|
23821
24108
|
const isRoot = enabled && parentRoot === null;
|
|
23822
|
-
const zoneId =
|
|
24109
|
+
const zoneId = React85__default.useId();
|
|
23823
24110
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
23824
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
23825
|
-
const optimisticOrdersRef =
|
|
24111
|
+
const [optimisticOrders, setOptimisticOrders] = React85__default.useState(() => /* @__PURE__ */ new Map());
|
|
24112
|
+
const optimisticOrdersRef = React85__default.useRef(optimisticOrders);
|
|
23826
24113
|
optimisticOrdersRef.current = optimisticOrders;
|
|
23827
|
-
const clearOptimisticOrder =
|
|
24114
|
+
const clearOptimisticOrder = React85__default.useCallback((group) => {
|
|
23828
24115
|
setOptimisticOrders((prev) => {
|
|
23829
24116
|
if (!prev.has(group)) return prev;
|
|
23830
24117
|
const next = new Map(prev);
|
|
@@ -23849,7 +24136,7 @@ function useDataDnd(args) {
|
|
|
23849
24136
|
const raw = it[dndItemIdField];
|
|
23850
24137
|
return String(raw ?? `__idx_${idx}`);
|
|
23851
24138
|
}).join("|");
|
|
23852
|
-
const itemIds =
|
|
24139
|
+
const itemIds = React85__default.useMemo(
|
|
23853
24140
|
() => orderedItems.map((it, idx) => {
|
|
23854
24141
|
const raw = it[dndItemIdField];
|
|
23855
24142
|
return raw ?? `__idx_${idx}`;
|
|
@@ -23857,7 +24144,7 @@ function useDataDnd(args) {
|
|
|
23857
24144
|
[itemIdsSignature]
|
|
23858
24145
|
);
|
|
23859
24146
|
const itemsContentSig = items.map((it, idx) => String(it[dndItemIdField] ?? `__${idx}`)).join("|");
|
|
23860
|
-
|
|
24147
|
+
React85__default.useEffect(() => {
|
|
23861
24148
|
const root = isRoot ? null : parentRoot;
|
|
23862
24149
|
if (root) {
|
|
23863
24150
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -23865,20 +24152,20 @@ function useDataDnd(args) {
|
|
|
23865
24152
|
clearOptimisticOrder(ownGroup);
|
|
23866
24153
|
}
|
|
23867
24154
|
}, [itemsContentSig, ownGroup]);
|
|
23868
|
-
const zonesRef =
|
|
23869
|
-
const registerZone =
|
|
24155
|
+
const zonesRef = React85__default.useRef(/* @__PURE__ */ new Map());
|
|
24156
|
+
const registerZone = React85__default.useCallback((zoneId2, meta2) => {
|
|
23870
24157
|
zonesRef.current.set(zoneId2, meta2);
|
|
23871
24158
|
}, []);
|
|
23872
|
-
const unregisterZone =
|
|
24159
|
+
const unregisterZone = React85__default.useCallback((zoneId2) => {
|
|
23873
24160
|
zonesRef.current.delete(zoneId2);
|
|
23874
24161
|
}, []);
|
|
23875
|
-
const [activeDrag, setActiveDrag] =
|
|
23876
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
23877
|
-
const meta =
|
|
24162
|
+
const [activeDrag, setActiveDrag] = React85__default.useState(null);
|
|
24163
|
+
const [overZoneGroup, setOverZoneGroup] = React85__default.useState(null);
|
|
24164
|
+
const meta = React85__default.useMemo(
|
|
23878
24165
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
23879
24166
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
23880
24167
|
);
|
|
23881
|
-
|
|
24168
|
+
React85__default.useEffect(() => {
|
|
23882
24169
|
const target = isRoot ? null : parentRoot;
|
|
23883
24170
|
if (!target) {
|
|
23884
24171
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -23897,7 +24184,7 @@ function useDataDnd(args) {
|
|
|
23897
24184
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
23898
24185
|
const sensors = useAlmadarDndSensors(true);
|
|
23899
24186
|
const collisionDetection = almadarDndCollisionDetection;
|
|
23900
|
-
const findZoneByItem =
|
|
24187
|
+
const findZoneByItem = React85__default.useCallback(
|
|
23901
24188
|
(id) => {
|
|
23902
24189
|
for (const z of zonesRef.current.values()) {
|
|
23903
24190
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -23906,7 +24193,7 @@ function useDataDnd(args) {
|
|
|
23906
24193
|
},
|
|
23907
24194
|
[]
|
|
23908
24195
|
);
|
|
23909
|
-
|
|
24196
|
+
React85__default.useCallback(
|
|
23910
24197
|
(group) => {
|
|
23911
24198
|
for (const z of zonesRef.current.values()) {
|
|
23912
24199
|
if (z.group === group) return z;
|
|
@@ -23915,7 +24202,7 @@ function useDataDnd(args) {
|
|
|
23915
24202
|
},
|
|
23916
24203
|
[]
|
|
23917
24204
|
);
|
|
23918
|
-
const handleDragEnd =
|
|
24205
|
+
const handleDragEnd = React85__default.useCallback(
|
|
23919
24206
|
(event) => {
|
|
23920
24207
|
const { active, over } = event;
|
|
23921
24208
|
const activeIdStr = String(active.id);
|
|
@@ -24006,8 +24293,8 @@ function useDataDnd(args) {
|
|
|
24006
24293
|
},
|
|
24007
24294
|
[eventBus]
|
|
24008
24295
|
);
|
|
24009
|
-
const sortableData =
|
|
24010
|
-
const SortableItem =
|
|
24296
|
+
const sortableData = React85__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
24297
|
+
const SortableItem = React85__default.useCallback(
|
|
24011
24298
|
({ id, children }) => {
|
|
24012
24299
|
const {
|
|
24013
24300
|
attributes,
|
|
@@ -24047,7 +24334,7 @@ function useDataDnd(args) {
|
|
|
24047
24334
|
id: droppableId,
|
|
24048
24335
|
data: sortableData
|
|
24049
24336
|
});
|
|
24050
|
-
const ctx =
|
|
24337
|
+
const ctx = React85__default.useContext(RootCtx);
|
|
24051
24338
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
24052
24339
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
24053
24340
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -24062,7 +24349,7 @@ function useDataDnd(args) {
|
|
|
24062
24349
|
showForeignPlaceholder,
|
|
24063
24350
|
ctxAvailable: ctx != null
|
|
24064
24351
|
});
|
|
24065
|
-
|
|
24352
|
+
React85__default.useEffect(() => {
|
|
24066
24353
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
24067
24354
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
24068
24355
|
return /* @__PURE__ */ jsx(
|
|
@@ -24076,11 +24363,11 @@ function useDataDnd(args) {
|
|
|
24076
24363
|
}
|
|
24077
24364
|
);
|
|
24078
24365
|
};
|
|
24079
|
-
const rootContextValue =
|
|
24366
|
+
const rootContextValue = React85__default.useMemo(
|
|
24080
24367
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
24081
24368
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
24082
24369
|
);
|
|
24083
|
-
const handleDragStart =
|
|
24370
|
+
const handleDragStart = React85__default.useCallback((event) => {
|
|
24084
24371
|
const sourceZone = findZoneByItem(event.active.id);
|
|
24085
24372
|
const rect = event.active.rect.current.initial;
|
|
24086
24373
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -24099,7 +24386,7 @@ function useDataDnd(args) {
|
|
|
24099
24386
|
isRoot
|
|
24100
24387
|
});
|
|
24101
24388
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
24102
|
-
const handleDragOver =
|
|
24389
|
+
const handleDragOver = React85__default.useCallback((event) => {
|
|
24103
24390
|
const { active, over } = event;
|
|
24104
24391
|
const overData = over?.data?.current;
|
|
24105
24392
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -24169,7 +24456,7 @@ function useDataDnd(args) {
|
|
|
24169
24456
|
return next;
|
|
24170
24457
|
});
|
|
24171
24458
|
}, []);
|
|
24172
|
-
const handleDragCancel =
|
|
24459
|
+
const handleDragCancel = React85__default.useCallback((event) => {
|
|
24173
24460
|
setActiveDrag(null);
|
|
24174
24461
|
setOverZoneGroup(null);
|
|
24175
24462
|
dndLog.warn("dragCancel", {
|
|
@@ -24177,12 +24464,12 @@ function useDataDnd(args) {
|
|
|
24177
24464
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
24178
24465
|
});
|
|
24179
24466
|
}, []);
|
|
24180
|
-
const handleDragEndWithCleanup =
|
|
24467
|
+
const handleDragEndWithCleanup = React85__default.useCallback((event) => {
|
|
24181
24468
|
handleDragEnd(event);
|
|
24182
24469
|
setActiveDrag(null);
|
|
24183
24470
|
setOverZoneGroup(null);
|
|
24184
24471
|
}, [handleDragEnd]);
|
|
24185
|
-
const wrapContainer =
|
|
24472
|
+
const wrapContainer = React85__default.useCallback(
|
|
24186
24473
|
(children) => {
|
|
24187
24474
|
if (!enabled) return children;
|
|
24188
24475
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -24236,7 +24523,7 @@ var init_useDataDnd = __esm({
|
|
|
24236
24523
|
init_useAlmadarDndCollision();
|
|
24237
24524
|
init_Box();
|
|
24238
24525
|
dndLog = createLogger("almadar:ui:dnd");
|
|
24239
|
-
RootCtx =
|
|
24526
|
+
RootCtx = React85__default.createContext(null);
|
|
24240
24527
|
}
|
|
24241
24528
|
});
|
|
24242
24529
|
function renderIconInput(icon, props) {
|
|
@@ -24762,7 +25049,7 @@ function DataList({
|
|
|
24762
25049
|
}) {
|
|
24763
25050
|
const eventBus = useEventBus();
|
|
24764
25051
|
const { t } = useTranslate();
|
|
24765
|
-
const [visibleCount, setVisibleCount] =
|
|
25052
|
+
const [visibleCount, setVisibleCount] = React85__default.useState(pageSize || Infinity);
|
|
24766
25053
|
const fieldDefs = fields ?? columns ?? [];
|
|
24767
25054
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
24768
25055
|
const dnd = useDataDnd({
|
|
@@ -24781,7 +25068,7 @@ function DataList({
|
|
|
24781
25068
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
24782
25069
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
24783
25070
|
const hasRenderProp = typeof children === "function";
|
|
24784
|
-
|
|
25071
|
+
React85__default.useEffect(() => {
|
|
24785
25072
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
24786
25073
|
const childrenTypeOf = typeof children;
|
|
24787
25074
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -24886,7 +25173,7 @@ function DataList({
|
|
|
24886
25173
|
const items2 = data.map((item) => item);
|
|
24887
25174
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
24888
25175
|
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(
|
|
25176
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
24890
25177
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
24891
25178
|
group.items.map((itemData, index) => {
|
|
24892
25179
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -25027,7 +25314,7 @@ function DataList({
|
|
|
25027
25314
|
className
|
|
25028
25315
|
),
|
|
25029
25316
|
children: [
|
|
25030
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
25317
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
25031
25318
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
25032
25319
|
group.items.map(
|
|
25033
25320
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -25943,7 +26230,7 @@ var init_Grid = __esm({
|
|
|
25943
26230
|
as: Component2 = "div"
|
|
25944
26231
|
}) => {
|
|
25945
26232
|
const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
|
|
25946
|
-
return
|
|
26233
|
+
return React85__default.createElement(
|
|
25947
26234
|
Component2,
|
|
25948
26235
|
{
|
|
25949
26236
|
className: cn(
|
|
@@ -26139,9 +26426,9 @@ var init_Popover = __esm({
|
|
|
26139
26426
|
onMouseLeave: handleClose,
|
|
26140
26427
|
onPointerDown: tapTriggerProps.onPointerDown
|
|
26141
26428
|
};
|
|
26142
|
-
const childElement =
|
|
26429
|
+
const childElement = React85__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
26143
26430
|
const childPointerDown = childElement.props.onPointerDown;
|
|
26144
|
-
const triggerElement =
|
|
26431
|
+
const triggerElement = React85__default.cloneElement(
|
|
26145
26432
|
childElement,
|
|
26146
26433
|
{
|
|
26147
26434
|
ref: triggerRef,
|
|
@@ -26743,9 +27030,9 @@ var init_Tooltip = __esm({
|
|
|
26743
27030
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
26744
27031
|
};
|
|
26745
27032
|
}, []);
|
|
26746
|
-
const triggerElement =
|
|
27033
|
+
const triggerElement = React85__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
26747
27034
|
const childPointerDown = triggerElement.props.onPointerDown;
|
|
26748
|
-
const trigger =
|
|
27035
|
+
const trigger = React85__default.cloneElement(triggerElement, {
|
|
26749
27036
|
ref: triggerRef,
|
|
26750
27037
|
onMouseEnter: handleMouseEnter,
|
|
26751
27038
|
onMouseLeave: handleMouseLeave,
|
|
@@ -26835,7 +27122,7 @@ var init_WizardProgress = __esm({
|
|
|
26835
27122
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
26836
27123
|
const isActive = index === currentStep;
|
|
26837
27124
|
const isCompleted = index < currentStep;
|
|
26838
|
-
return /* @__PURE__ */ jsxs(
|
|
27125
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
26839
27126
|
/* @__PURE__ */ jsx(
|
|
26840
27127
|
"button",
|
|
26841
27128
|
{
|
|
@@ -27898,7 +28185,7 @@ function InventoryGrid({
|
|
|
27898
28185
|
const eventBus = useEventBus();
|
|
27899
28186
|
const slotCount = totalSlots ?? items.length;
|
|
27900
28187
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
27901
|
-
const handleSelect =
|
|
28188
|
+
const handleSelect = React85.useCallback(
|
|
27902
28189
|
(id) => {
|
|
27903
28190
|
onSelect?.(id);
|
|
27904
28191
|
if (selectEvent) {
|
|
@@ -28133,31 +28420,31 @@ function GameCanvas2D({
|
|
|
28133
28420
|
assetBaseUrl,
|
|
28134
28421
|
className
|
|
28135
28422
|
}) {
|
|
28136
|
-
const canvasRef =
|
|
28137
|
-
const rafRef =
|
|
28138
|
-
const frameRef =
|
|
28139
|
-
const lastTimeRef =
|
|
28140
|
-
const imageCache =
|
|
28423
|
+
const canvasRef = React85.useRef(null);
|
|
28424
|
+
const rafRef = React85.useRef(0);
|
|
28425
|
+
const frameRef = React85.useRef(0);
|
|
28426
|
+
const lastTimeRef = React85.useRef(0);
|
|
28427
|
+
const imageCache = React85.useRef(/* @__PURE__ */ new Map());
|
|
28141
28428
|
const emit = useEmitEvent();
|
|
28142
|
-
const onDrawRef =
|
|
28429
|
+
const onDrawRef = React85.useRef(onDraw);
|
|
28143
28430
|
onDrawRef.current = onDraw;
|
|
28144
|
-
const onTickRef =
|
|
28431
|
+
const onTickRef = React85.useRef(onTick);
|
|
28145
28432
|
onTickRef.current = onTick;
|
|
28146
|
-
const tickEventRef =
|
|
28433
|
+
const tickEventRef = React85.useRef(tickEvent);
|
|
28147
28434
|
tickEventRef.current = tickEvent;
|
|
28148
|
-
const drawEventRef =
|
|
28435
|
+
const drawEventRef = React85.useRef(drawEvent);
|
|
28149
28436
|
drawEventRef.current = drawEvent;
|
|
28150
|
-
const emitRef =
|
|
28437
|
+
const emitRef = React85.useRef(emit);
|
|
28151
28438
|
emitRef.current = emit;
|
|
28152
|
-
const assetBaseUrlRef =
|
|
28439
|
+
const assetBaseUrlRef = React85.useRef(assetBaseUrl);
|
|
28153
28440
|
assetBaseUrlRef.current = assetBaseUrl;
|
|
28154
|
-
const backgroundImageRef =
|
|
28441
|
+
const backgroundImageRef = React85.useRef(backgroundImage);
|
|
28155
28442
|
backgroundImageRef.current = backgroundImage;
|
|
28156
|
-
const widthRef =
|
|
28443
|
+
const widthRef = React85.useRef(width);
|
|
28157
28444
|
widthRef.current = width;
|
|
28158
|
-
const heightRef =
|
|
28445
|
+
const heightRef = React85.useRef(height);
|
|
28159
28446
|
heightRef.current = height;
|
|
28160
|
-
const loadImage =
|
|
28447
|
+
const loadImage = React85.useCallback((url) => {
|
|
28161
28448
|
const base = assetBaseUrlRef.current;
|
|
28162
28449
|
if (!url.startsWith("http") && !base) return null;
|
|
28163
28450
|
const fullUrl = url.startsWith("http") ? url : `${base}${url}`;
|
|
@@ -28171,7 +28458,7 @@ function GameCanvas2D({
|
|
|
28171
28458
|
}
|
|
28172
28459
|
return null;
|
|
28173
28460
|
}, []);
|
|
28174
|
-
|
|
28461
|
+
React85.useEffect(() => {
|
|
28175
28462
|
const canvas = canvasRef.current;
|
|
28176
28463
|
if (!canvas) return;
|
|
28177
28464
|
const ctx = canvas.getContext("2d");
|
|
@@ -28496,7 +28783,7 @@ function TurnPanel({
|
|
|
28496
28783
|
className
|
|
28497
28784
|
}) {
|
|
28498
28785
|
const eventBus = useEventBus();
|
|
28499
|
-
const handleAction =
|
|
28786
|
+
const handleAction = React85.useCallback(
|
|
28500
28787
|
(event) => {
|
|
28501
28788
|
if (event) {
|
|
28502
28789
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -28677,7 +28964,7 @@ function UnitCommandBar({
|
|
|
28677
28964
|
className
|
|
28678
28965
|
}) {
|
|
28679
28966
|
const eventBus = useEventBus();
|
|
28680
|
-
const handleCommand =
|
|
28967
|
+
const handleCommand = React85.useCallback(
|
|
28681
28968
|
(event) => {
|
|
28682
28969
|
if (event) {
|
|
28683
28970
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -29228,7 +29515,7 @@ function GameMenu({
|
|
|
29228
29515
|
} catch {
|
|
29229
29516
|
}
|
|
29230
29517
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
29231
|
-
const handleOptionClick =
|
|
29518
|
+
const handleOptionClick = React85.useCallback(
|
|
29232
29519
|
(option) => {
|
|
29233
29520
|
if (option.event && eventBus) {
|
|
29234
29521
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -29347,7 +29634,7 @@ function GameOverScreen({
|
|
|
29347
29634
|
} catch {
|
|
29348
29635
|
}
|
|
29349
29636
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
29350
|
-
const handleActionClick =
|
|
29637
|
+
const handleActionClick = React85.useCallback(
|
|
29351
29638
|
(action) => {
|
|
29352
29639
|
if (action.event && eventBus) {
|
|
29353
29640
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -30279,13 +30566,13 @@ var init_MapView = __esm({
|
|
|
30279
30566
|
shadowSize: [41, 41]
|
|
30280
30567
|
});
|
|
30281
30568
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
30282
|
-
const { useEffect:
|
|
30569
|
+
const { useEffect: useEffect85, useRef: useRef80, useCallback: useCallback127, useState: useState117 } = React85__default;
|
|
30283
30570
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
30284
30571
|
const { useEventBus: useEventBus4 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
30285
30572
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
30286
30573
|
const map = useMap();
|
|
30287
30574
|
const prevRef = useRef80({ centerLat, centerLng, zoom });
|
|
30288
|
-
|
|
30575
|
+
useEffect85(() => {
|
|
30289
30576
|
const prev = prevRef.current;
|
|
30290
30577
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
30291
30578
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -30296,7 +30583,7 @@ var init_MapView = __esm({
|
|
|
30296
30583
|
}
|
|
30297
30584
|
function MapClickHandler({ onMapClick }) {
|
|
30298
30585
|
const map = useMap();
|
|
30299
|
-
|
|
30586
|
+
useEffect85(() => {
|
|
30300
30587
|
if (!onMapClick) return;
|
|
30301
30588
|
const handler = (e) => {
|
|
30302
30589
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -30324,8 +30611,8 @@ var init_MapView = __esm({
|
|
|
30324
30611
|
showAttribution = true
|
|
30325
30612
|
}) {
|
|
30326
30613
|
const eventBus = useEventBus4();
|
|
30327
|
-
const [clickedPosition, setClickedPosition] =
|
|
30328
|
-
const handleMapClick =
|
|
30614
|
+
const [clickedPosition, setClickedPosition] = useState117(null);
|
|
30615
|
+
const handleMapClick = useCallback127((lat, lng) => {
|
|
30329
30616
|
if (showClickedPin) {
|
|
30330
30617
|
setClickedPosition({ lat, lng });
|
|
30331
30618
|
}
|
|
@@ -30334,7 +30621,7 @@ var init_MapView = __esm({
|
|
|
30334
30621
|
eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
|
|
30335
30622
|
}
|
|
30336
30623
|
}, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
|
|
30337
|
-
const handleMarkerClick =
|
|
30624
|
+
const handleMarkerClick = useCallback127((marker) => {
|
|
30338
30625
|
onMarkerClick?.(marker);
|
|
30339
30626
|
if (markerClickEvent) {
|
|
30340
30627
|
eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
|
|
@@ -31185,8 +31472,8 @@ function TableView({
|
|
|
31185
31472
|
}) {
|
|
31186
31473
|
const eventBus = useEventBus();
|
|
31187
31474
|
const { t } = useTranslate();
|
|
31188
|
-
const [visibleCount, setVisibleCount] =
|
|
31189
|
-
const [localSelected, setLocalSelected] =
|
|
31475
|
+
const [visibleCount, setVisibleCount] = React85__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
31476
|
+
const [localSelected, setLocalSelected] = React85__default.useState(/* @__PURE__ */ new Set());
|
|
31190
31477
|
const colDefs = columns ?? fields ?? [];
|
|
31191
31478
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
31192
31479
|
const dnd = useDataDnd({
|
|
@@ -31381,12 +31668,12 @@ function TableView({
|
|
|
31381
31668
|
]
|
|
31382
31669
|
}
|
|
31383
31670
|
);
|
|
31384
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
31671
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React85__default.Fragment, { children: rowInner }, id);
|
|
31385
31672
|
};
|
|
31386
31673
|
const items = data.map((row) => row);
|
|
31387
31674
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
31388
31675
|
let runningIndex = 0;
|
|
31389
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
31676
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
31390
31677
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
31391
31678
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
31392
31679
|
] }, gi)) });
|
|
@@ -32743,7 +33030,7 @@ var init_StepFlow = __esm({
|
|
|
32743
33030
|
className
|
|
32744
33031
|
}) => {
|
|
32745
33032
|
if (orientation === "vertical") {
|
|
32746
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
33033
|
+
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
33034
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
32748
33035
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
32749
33036
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -32754,7 +33041,7 @@ var init_StepFlow = __esm({
|
|
|
32754
33041
|
] })
|
|
32755
33042
|
] }) }, index)) });
|
|
32756
33043
|
}
|
|
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(
|
|
33044
|
+
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
33045
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
32759
33046
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
32760
33047
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -33739,7 +34026,7 @@ var init_LikertScale = __esm({
|
|
|
33739
34026
|
md: "text-base",
|
|
33740
34027
|
lg: "text-lg"
|
|
33741
34028
|
};
|
|
33742
|
-
LikertScale =
|
|
34029
|
+
LikertScale = React85__default.forwardRef(
|
|
33743
34030
|
({
|
|
33744
34031
|
question,
|
|
33745
34032
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -33751,7 +34038,7 @@ var init_LikertScale = __esm({
|
|
|
33751
34038
|
variant = "radios",
|
|
33752
34039
|
className
|
|
33753
34040
|
}, ref) => {
|
|
33754
|
-
const groupId =
|
|
34041
|
+
const groupId = React85__default.useId();
|
|
33755
34042
|
const eventBus = useEventBus();
|
|
33756
34043
|
const handleSelect = useCallback(
|
|
33757
34044
|
(next) => {
|
|
@@ -36033,7 +36320,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
36033
36320
|
"aria-label": t("aria.breadcrumb"),
|
|
36034
36321
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
36035
36322
|
const isLast = idx === items.length - 1;
|
|
36036
|
-
return /* @__PURE__ */ jsxs(
|
|
36323
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
36037
36324
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
36038
36325
|
Icon,
|
|
36039
36326
|
{
|
|
@@ -36902,7 +37189,7 @@ var init_MiniStateMachine = __esm({
|
|
|
36902
37189
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
36903
37190
|
const tc = transitionCounts[s.name] ?? 0;
|
|
36904
37191
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
36905
|
-
return /* @__PURE__ */ jsxs(
|
|
37192
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
36906
37193
|
/* @__PURE__ */ jsx(
|
|
36907
37194
|
AvlState,
|
|
36908
37195
|
{
|
|
@@ -37106,7 +37393,7 @@ var init_PageHeader = __esm({
|
|
|
37106
37393
|
info: "bg-info/10 text-info"
|
|
37107
37394
|
};
|
|
37108
37395
|
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(
|
|
37396
|
+
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
37397
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
37111
37398
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
37112
37399
|
"a",
|
|
@@ -37835,7 +38122,7 @@ var init_WizardContainer = __esm({
|
|
|
37835
38122
|
const isCompleted = index < currentStep;
|
|
37836
38123
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
37837
38124
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
37838
|
-
return /* @__PURE__ */ jsxs(
|
|
38125
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
37839
38126
|
/* @__PURE__ */ jsx(
|
|
37840
38127
|
Button,
|
|
37841
38128
|
{
|
|
@@ -40395,7 +40682,7 @@ var init_DetailPanel = __esm({
|
|
|
40395
40682
|
}
|
|
40396
40683
|
});
|
|
40397
40684
|
function extractTitle(children) {
|
|
40398
|
-
if (!
|
|
40685
|
+
if (!React85__default.isValidElement(children)) return void 0;
|
|
40399
40686
|
const props = children.props;
|
|
40400
40687
|
if (typeof props.title === "string") {
|
|
40401
40688
|
return props.title;
|
|
@@ -40450,7 +40737,7 @@ function LinearView({
|
|
|
40450
40737
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
40451
40738
|
const isDone = i < currentIdx;
|
|
40452
40739
|
const isCurrent = i === currentIdx;
|
|
40453
|
-
return /* @__PURE__ */ jsxs(
|
|
40740
|
+
return /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
40454
40741
|
i > 0 && /* @__PURE__ */ jsx(
|
|
40455
40742
|
Typography,
|
|
40456
40743
|
{
|
|
@@ -41219,6 +41506,42 @@ var init_FeatureGridOrganism = __esm({
|
|
|
41219
41506
|
FeatureGridOrganism.displayName = "FeatureGridOrganism";
|
|
41220
41507
|
}
|
|
41221
41508
|
});
|
|
41509
|
+
function FishingBoard({
|
|
41510
|
+
backgroundImage,
|
|
41511
|
+
assetBaseUrl,
|
|
41512
|
+
scale = 1,
|
|
41513
|
+
showMinimap = false,
|
|
41514
|
+
enableCamera = true,
|
|
41515
|
+
width = 800,
|
|
41516
|
+
height = 600,
|
|
41517
|
+
isLoading,
|
|
41518
|
+
error,
|
|
41519
|
+
className
|
|
41520
|
+
}) {
|
|
41521
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("fishing-board relative w-full h-full", className), children: [
|
|
41522
|
+
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" }) }),
|
|
41523
|
+
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 }) }),
|
|
41524
|
+
/* @__PURE__ */ jsx(
|
|
41525
|
+
GameCanvas2D,
|
|
41526
|
+
{
|
|
41527
|
+
width,
|
|
41528
|
+
height,
|
|
41529
|
+
backgroundImage: backgroundImage ?? "",
|
|
41530
|
+
assetBaseUrl,
|
|
41531
|
+
fps: 60,
|
|
41532
|
+
className: "w-full h-full"
|
|
41533
|
+
}
|
|
41534
|
+
)
|
|
41535
|
+
] });
|
|
41536
|
+
}
|
|
41537
|
+
var init_FishingBoard = __esm({
|
|
41538
|
+
"components/game/organisms/FishingBoard.tsx"() {
|
|
41539
|
+
"use client";
|
|
41540
|
+
init_cn();
|
|
41541
|
+
init_GameCanvas2D();
|
|
41542
|
+
FishingBoard.displayName = "FishingBoard";
|
|
41543
|
+
}
|
|
41544
|
+
});
|
|
41222
41545
|
function toSharedContext2(formCtx) {
|
|
41223
41546
|
return createMinimalContext(
|
|
41224
41547
|
{
|
|
@@ -41400,12 +41723,12 @@ var init_Form = __esm({
|
|
|
41400
41723
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
41401
41724
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
41402
41725
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
41403
|
-
const normalizedInitialData =
|
|
41726
|
+
const normalizedInitialData = React85__default.useMemo(() => {
|
|
41404
41727
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
41405
41728
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
41406
41729
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
41407
41730
|
}, [entity, initialData]);
|
|
41408
|
-
const entityDerivedFields =
|
|
41731
|
+
const entityDerivedFields = React85__default.useMemo(() => {
|
|
41409
41732
|
if (fields && fields.length > 0) return void 0;
|
|
41410
41733
|
if (!resolvedEntity) return void 0;
|
|
41411
41734
|
return resolvedEntity.fields.map(
|
|
@@ -41425,16 +41748,16 @@ var init_Form = __esm({
|
|
|
41425
41748
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
41426
41749
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
41427
41750
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
41428
|
-
const [formData, setFormData] =
|
|
41751
|
+
const [formData, setFormData] = React85__default.useState(
|
|
41429
41752
|
normalizedInitialData
|
|
41430
41753
|
);
|
|
41431
|
-
const [collapsedSections, setCollapsedSections] =
|
|
41754
|
+
const [collapsedSections, setCollapsedSections] = React85__default.useState(
|
|
41432
41755
|
/* @__PURE__ */ new Set()
|
|
41433
41756
|
);
|
|
41434
|
-
const [submitError, setSubmitError] =
|
|
41435
|
-
const formRef =
|
|
41757
|
+
const [submitError, setSubmitError] = React85__default.useState(null);
|
|
41758
|
+
const formRef = React85__default.useRef(null);
|
|
41436
41759
|
const formMode = props.mode;
|
|
41437
|
-
const mountedRef =
|
|
41760
|
+
const mountedRef = React85__default.useRef(false);
|
|
41438
41761
|
if (!mountedRef.current) {
|
|
41439
41762
|
mountedRef.current = true;
|
|
41440
41763
|
debug("forms", "mount", {
|
|
@@ -41447,7 +41770,7 @@ var init_Form = __esm({
|
|
|
41447
41770
|
});
|
|
41448
41771
|
}
|
|
41449
41772
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
41450
|
-
const evalContext =
|
|
41773
|
+
const evalContext = React85__default.useMemo(
|
|
41451
41774
|
() => ({
|
|
41452
41775
|
formValues: formData,
|
|
41453
41776
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -41456,7 +41779,7 @@ var init_Form = __esm({
|
|
|
41456
41779
|
}),
|
|
41457
41780
|
[formData, externalContext]
|
|
41458
41781
|
);
|
|
41459
|
-
|
|
41782
|
+
React85__default.useEffect(() => {
|
|
41460
41783
|
debug("forms", "initialData-sync", {
|
|
41461
41784
|
mode: formMode,
|
|
41462
41785
|
normalizedInitialData,
|
|
@@ -41467,7 +41790,7 @@ var init_Form = __esm({
|
|
|
41467
41790
|
setFormData(normalizedInitialData);
|
|
41468
41791
|
}
|
|
41469
41792
|
}, [normalizedInitialData]);
|
|
41470
|
-
const processCalculations =
|
|
41793
|
+
const processCalculations = React85__default.useCallback(
|
|
41471
41794
|
(changedFieldId, newFormData) => {
|
|
41472
41795
|
if (!hiddenCalculations.length) return;
|
|
41473
41796
|
const context = {
|
|
@@ -41492,7 +41815,7 @@ var init_Form = __esm({
|
|
|
41492
41815
|
},
|
|
41493
41816
|
[hiddenCalculations, externalContext, eventBus]
|
|
41494
41817
|
);
|
|
41495
|
-
const checkViolations =
|
|
41818
|
+
const checkViolations = React85__default.useCallback(
|
|
41496
41819
|
(changedFieldId, newFormData) => {
|
|
41497
41820
|
if (!violationTriggers.length) return;
|
|
41498
41821
|
const context = {
|
|
@@ -41530,7 +41853,7 @@ var init_Form = __esm({
|
|
|
41530
41853
|
processCalculations(name, newFormData);
|
|
41531
41854
|
checkViolations(name, newFormData);
|
|
41532
41855
|
};
|
|
41533
|
-
const isFieldVisible =
|
|
41856
|
+
const isFieldVisible = React85__default.useCallback(
|
|
41534
41857
|
(fieldName) => {
|
|
41535
41858
|
const condition = conditionalFields[fieldName];
|
|
41536
41859
|
if (!condition) return true;
|
|
@@ -41538,7 +41861,7 @@ var init_Form = __esm({
|
|
|
41538
41861
|
},
|
|
41539
41862
|
[conditionalFields, evalContext]
|
|
41540
41863
|
);
|
|
41541
|
-
const isSectionVisible =
|
|
41864
|
+
const isSectionVisible = React85__default.useCallback(
|
|
41542
41865
|
(section) => {
|
|
41543
41866
|
if (!section.condition) return true;
|
|
41544
41867
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -41614,7 +41937,7 @@ var init_Form = __esm({
|
|
|
41614
41937
|
eventBus.emit(`UI:${onCancel}`);
|
|
41615
41938
|
}
|
|
41616
41939
|
};
|
|
41617
|
-
const renderField =
|
|
41940
|
+
const renderField = React85__default.useCallback(
|
|
41618
41941
|
(field) => {
|
|
41619
41942
|
const fieldName = field.name || field.field;
|
|
41620
41943
|
if (!fieldName) return null;
|
|
@@ -41635,7 +41958,7 @@ var init_Form = __esm({
|
|
|
41635
41958
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
41636
41959
|
);
|
|
41637
41960
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
41638
|
-
const normalizedFields =
|
|
41961
|
+
const normalizedFields = React85__default.useMemo(() => {
|
|
41639
41962
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
41640
41963
|
return effectiveFields.map((field) => {
|
|
41641
41964
|
if (typeof field === "string") {
|
|
@@ -41658,7 +41981,7 @@ var init_Form = __esm({
|
|
|
41658
41981
|
return field;
|
|
41659
41982
|
});
|
|
41660
41983
|
}, [effectiveFields, resolvedEntity]);
|
|
41661
|
-
const schemaFields =
|
|
41984
|
+
const schemaFields = React85__default.useMemo(() => {
|
|
41662
41985
|
if (normalizedFields.length === 0) return null;
|
|
41663
41986
|
if (isDebugEnabled()) {
|
|
41664
41987
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -41668,7 +41991,7 @@ var init_Form = __esm({
|
|
|
41668
41991
|
}
|
|
41669
41992
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
41670
41993
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
41671
|
-
const sectionElements =
|
|
41994
|
+
const sectionElements = React85__default.useMemo(() => {
|
|
41672
41995
|
if (!sections || sections.length === 0) return null;
|
|
41673
41996
|
return sections.map((section) => {
|
|
41674
41997
|
if (!isSectionVisible(section)) {
|
|
@@ -43932,10 +44255,10 @@ function getSlotContentRenderer2() {
|
|
|
43932
44255
|
}
|
|
43933
44256
|
function resolveDescriptor(value, idPrefix) {
|
|
43934
44257
|
if (value === null || value === void 0) return value;
|
|
43935
|
-
if (
|
|
44258
|
+
if (React85__default.isValidElement(value)) return value;
|
|
43936
44259
|
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
|
|
43937
44260
|
if (Array.isArray(value)) {
|
|
43938
|
-
return value.map((item, i) => /* @__PURE__ */ jsx(
|
|
44261
|
+
return value.map((item, i) => /* @__PURE__ */ jsx(React85__default.Fragment, { children: resolveDescriptor(item, `${idPrefix}-${i}`) }, i));
|
|
43939
44262
|
}
|
|
43940
44263
|
if (typeof value === "object") {
|
|
43941
44264
|
const rec = value;
|
|
@@ -44036,10 +44359,10 @@ function getSlotContentRenderer3() {
|
|
|
44036
44359
|
}
|
|
44037
44360
|
function resolveDescriptor2(value, idPrefix) {
|
|
44038
44361
|
if (value === null || value === void 0) return value;
|
|
44039
|
-
if (
|
|
44362
|
+
if (React85__default.isValidElement(value)) return value;
|
|
44040
44363
|
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
|
|
44041
44364
|
if (Array.isArray(value)) {
|
|
44042
|
-
return value.map((item, i) => /* @__PURE__ */ jsx(
|
|
44365
|
+
return value.map((item, i) => /* @__PURE__ */ jsx(React85__default.Fragment, { children: resolveDescriptor2(item, `${idPrefix}-${i}`) }, i));
|
|
44043
44366
|
}
|
|
44044
44367
|
if (typeof value === "object") {
|
|
44045
44368
|
const rec = value;
|
|
@@ -44372,6 +44695,39 @@ var init_HexStrategyBoard = __esm({
|
|
|
44372
44695
|
HexStrategyBoard.displayName = "HexStrategyBoard";
|
|
44373
44696
|
}
|
|
44374
44697
|
});
|
|
44698
|
+
function HolidayRunnerBoard({
|
|
44699
|
+
backgroundImage,
|
|
44700
|
+
assetBaseUrl,
|
|
44701
|
+
width = 800,
|
|
44702
|
+
height = 400,
|
|
44703
|
+
fps = 60,
|
|
44704
|
+
isLoading,
|
|
44705
|
+
error,
|
|
44706
|
+
className
|
|
44707
|
+
}) {
|
|
44708
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("holiday-runner-board relative w-full h-full", className), children: [
|
|
44709
|
+
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" }) }),
|
|
44710
|
+
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 }) }),
|
|
44711
|
+
/* @__PURE__ */ jsx(
|
|
44712
|
+
GameCanvas2D,
|
|
44713
|
+
{
|
|
44714
|
+
width,
|
|
44715
|
+
height,
|
|
44716
|
+
fps,
|
|
44717
|
+
backgroundImage: backgroundImage ?? "",
|
|
44718
|
+
assetBaseUrl
|
|
44719
|
+
}
|
|
44720
|
+
)
|
|
44721
|
+
] });
|
|
44722
|
+
}
|
|
44723
|
+
var init_HolidayRunnerBoard = __esm({
|
|
44724
|
+
"components/game/organisms/HolidayRunnerBoard.tsx"() {
|
|
44725
|
+
"use client";
|
|
44726
|
+
init_cn();
|
|
44727
|
+
init_GameCanvas2D();
|
|
44728
|
+
HolidayRunnerBoard.displayName = "HolidayRunnerBoard";
|
|
44729
|
+
}
|
|
44730
|
+
});
|
|
44375
44731
|
var LandingPageTemplate;
|
|
44376
44732
|
var init_LandingPageTemplate = __esm({
|
|
44377
44733
|
"components/marketing/templates/LandingPageTemplate.tsx"() {
|
|
@@ -44707,7 +45063,7 @@ var init_List = __esm({
|
|
|
44707
45063
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
44708
45064
|
return [];
|
|
44709
45065
|
}, [entity]);
|
|
44710
|
-
const getItemActions =
|
|
45066
|
+
const getItemActions = React85__default.useCallback(
|
|
44711
45067
|
(item) => {
|
|
44712
45068
|
if (!itemActions) return [];
|
|
44713
45069
|
if (typeof itemActions === "function") {
|
|
@@ -45126,6 +45482,48 @@ var init_MasterDetailLayout = __esm({
|
|
|
45126
45482
|
MasterDetailLayout.displayName = "MasterDetailLayout";
|
|
45127
45483
|
}
|
|
45128
45484
|
});
|
|
45485
|
+
function MatchPuzzleBoard({
|
|
45486
|
+
tiles,
|
|
45487
|
+
units,
|
|
45488
|
+
features,
|
|
45489
|
+
assetManifest,
|
|
45490
|
+
assetBaseUrl,
|
|
45491
|
+
scale = 0.45,
|
|
45492
|
+
showMinimap = false,
|
|
45493
|
+
enableCamera = false,
|
|
45494
|
+
tileClickEvent,
|
|
45495
|
+
unitClickEvent,
|
|
45496
|
+
isLoading,
|
|
45497
|
+
error,
|
|
45498
|
+
className
|
|
45499
|
+
}) {
|
|
45500
|
+
return /* @__PURE__ */ jsx("div", { className: cn("match-puzzle-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
45501
|
+
IsometricCanvas_default,
|
|
45502
|
+
{
|
|
45503
|
+
tileLayout: "flat",
|
|
45504
|
+
tiles,
|
|
45505
|
+
units,
|
|
45506
|
+
features,
|
|
45507
|
+
assetManifest,
|
|
45508
|
+
assetBaseUrl,
|
|
45509
|
+
scale,
|
|
45510
|
+
showMinimap,
|
|
45511
|
+
enableCamera,
|
|
45512
|
+
tileClickEvent,
|
|
45513
|
+
unitClickEvent,
|
|
45514
|
+
isLoading,
|
|
45515
|
+
error
|
|
45516
|
+
}
|
|
45517
|
+
) });
|
|
45518
|
+
}
|
|
45519
|
+
var init_MatchPuzzleBoard = __esm({
|
|
45520
|
+
"components/game/organisms/MatchPuzzleBoard.tsx"() {
|
|
45521
|
+
"use client";
|
|
45522
|
+
init_cn();
|
|
45523
|
+
init_IsometricCanvas();
|
|
45524
|
+
MatchPuzzleBoard.displayName = "MatchPuzzleBoard";
|
|
45525
|
+
}
|
|
45526
|
+
});
|
|
45129
45527
|
var COLUMN_CLASSES, ASPECT_CLASSES, MediaGallery;
|
|
45130
45528
|
var init_MediaGallery = __esm({
|
|
45131
45529
|
"components/core/organisms/MediaGallery.tsx"() {
|
|
@@ -45183,7 +45581,7 @@ var init_MediaGallery = __esm({
|
|
|
45183
45581
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
45184
45582
|
);
|
|
45185
45583
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
45186
|
-
const items =
|
|
45584
|
+
const items = React85__default.useMemo(() => {
|
|
45187
45585
|
if (propItems) return propItems;
|
|
45188
45586
|
if (entityData.length === 0) return [];
|
|
45189
45587
|
return entityData.map((record, idx) => ({
|
|
@@ -45343,8 +45741,50 @@ var init_MediaGallery = __esm({
|
|
|
45343
45741
|
MediaGallery.displayName = "MediaGallery";
|
|
45344
45742
|
}
|
|
45345
45743
|
});
|
|
45744
|
+
function MinigolfBoard({
|
|
45745
|
+
tiles,
|
|
45746
|
+
units,
|
|
45747
|
+
features,
|
|
45748
|
+
assetManifest,
|
|
45749
|
+
assetBaseUrl,
|
|
45750
|
+
scale = 0.45,
|
|
45751
|
+
showMinimap = true,
|
|
45752
|
+
enableCamera = true,
|
|
45753
|
+
tileClickEvent,
|
|
45754
|
+
unitClickEvent,
|
|
45755
|
+
isLoading,
|
|
45756
|
+
error,
|
|
45757
|
+
className
|
|
45758
|
+
}) {
|
|
45759
|
+
return /* @__PURE__ */ jsx("div", { className: cn("minigolf-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
45760
|
+
IsometricCanvas_default,
|
|
45761
|
+
{
|
|
45762
|
+
tileLayout: "isometric",
|
|
45763
|
+
tiles,
|
|
45764
|
+
units,
|
|
45765
|
+
features,
|
|
45766
|
+
assetManifest,
|
|
45767
|
+
assetBaseUrl,
|
|
45768
|
+
scale,
|
|
45769
|
+
showMinimap,
|
|
45770
|
+
enableCamera,
|
|
45771
|
+
tileClickEvent,
|
|
45772
|
+
unitClickEvent,
|
|
45773
|
+
isLoading,
|
|
45774
|
+
error
|
|
45775
|
+
}
|
|
45776
|
+
) });
|
|
45777
|
+
}
|
|
45778
|
+
var init_MinigolfBoard = __esm({
|
|
45779
|
+
"components/game/organisms/MinigolfBoard.tsx"() {
|
|
45780
|
+
"use client";
|
|
45781
|
+
init_cn();
|
|
45782
|
+
init_IsometricCanvas();
|
|
45783
|
+
MinigolfBoard.displayName = "MinigolfBoard";
|
|
45784
|
+
}
|
|
45785
|
+
});
|
|
45346
45786
|
function extractTitle2(children) {
|
|
45347
|
-
if (!
|
|
45787
|
+
if (!React85__default.isValidElement(children)) return void 0;
|
|
45348
45788
|
const props = children.props;
|
|
45349
45789
|
if (typeof props.title === "string") {
|
|
45350
45790
|
return props.title;
|
|
@@ -45560,6 +46000,87 @@ var init_NegotiatorBoard = __esm({
|
|
|
45560
46000
|
NegotiatorBoard.displayName = "NegotiatorBoard";
|
|
45561
46001
|
}
|
|
45562
46002
|
});
|
|
46003
|
+
function PinballBoard({
|
|
46004
|
+
tiles: _tiles,
|
|
46005
|
+
units: _units,
|
|
46006
|
+
features: _features,
|
|
46007
|
+
assetManifest: _assetManifest,
|
|
46008
|
+
assetBaseUrl,
|
|
46009
|
+
scale = 1,
|
|
46010
|
+
showMinimap: _showMinimap = false,
|
|
46011
|
+
enableCamera: _enableCamera = false,
|
|
46012
|
+
tileClickEvent: _tileClickEvent,
|
|
46013
|
+
unitClickEvent: _unitClickEvent,
|
|
46014
|
+
isLoading,
|
|
46015
|
+
error,
|
|
46016
|
+
className
|
|
46017
|
+
}) {
|
|
46018
|
+
if (isLoading) {
|
|
46019
|
+
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..." }) });
|
|
46020
|
+
}
|
|
46021
|
+
if (error) {
|
|
46022
|
+
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 }) });
|
|
46023
|
+
}
|
|
46024
|
+
return /* @__PURE__ */ jsx("div", { className: cn("pinball-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
46025
|
+
GameCanvas2D,
|
|
46026
|
+
{
|
|
46027
|
+
width: Math.round(400 * scale),
|
|
46028
|
+
height: Math.round(800 * scale),
|
|
46029
|
+
assetBaseUrl,
|
|
46030
|
+
fps: 60
|
|
46031
|
+
}
|
|
46032
|
+
) });
|
|
46033
|
+
}
|
|
46034
|
+
var init_PinballBoard = __esm({
|
|
46035
|
+
"components/game/organisms/PinballBoard.tsx"() {
|
|
46036
|
+
"use client";
|
|
46037
|
+
init_cn();
|
|
46038
|
+
init_GameCanvas2D();
|
|
46039
|
+
PinballBoard.displayName = "PinballBoard";
|
|
46040
|
+
}
|
|
46041
|
+
});
|
|
46042
|
+
function PirateBoard({
|
|
46043
|
+
tiles,
|
|
46044
|
+
units,
|
|
46045
|
+
features,
|
|
46046
|
+
assetManifest,
|
|
46047
|
+
assetBaseUrl,
|
|
46048
|
+
scale = 0.45,
|
|
46049
|
+
showMinimap = true,
|
|
46050
|
+
enableCamera = true,
|
|
46051
|
+
tileClickEvent,
|
|
46052
|
+
unitClickEvent,
|
|
46053
|
+
isLoading,
|
|
46054
|
+
error,
|
|
46055
|
+
className
|
|
46056
|
+
}) {
|
|
46057
|
+
return /* @__PURE__ */ jsx("div", { className: cn("pirate-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
46058
|
+
IsometricCanvas_default,
|
|
46059
|
+
{
|
|
46060
|
+
tileLayout: "flat",
|
|
46061
|
+
tiles,
|
|
46062
|
+
units,
|
|
46063
|
+
features,
|
|
46064
|
+
assetManifest,
|
|
46065
|
+
assetBaseUrl,
|
|
46066
|
+
scale,
|
|
46067
|
+
showMinimap,
|
|
46068
|
+
enableCamera,
|
|
46069
|
+
tileClickEvent,
|
|
46070
|
+
unitClickEvent,
|
|
46071
|
+
isLoading,
|
|
46072
|
+
error
|
|
46073
|
+
}
|
|
46074
|
+
) });
|
|
46075
|
+
}
|
|
46076
|
+
var init_PirateBoard = __esm({
|
|
46077
|
+
"components/game/organisms/PirateBoard.tsx"() {
|
|
46078
|
+
"use client";
|
|
46079
|
+
init_cn();
|
|
46080
|
+
init_IsometricCanvas();
|
|
46081
|
+
PirateBoard.displayName = "PirateBoard";
|
|
46082
|
+
}
|
|
46083
|
+
});
|
|
45563
46084
|
function resolveEntity(entity) {
|
|
45564
46085
|
if (!entity) return {};
|
|
45565
46086
|
if (Array.isArray(entity)) return entity[0] ?? {};
|
|
@@ -45920,6 +46441,37 @@ var init_PricingPageTemplate = __esm({
|
|
|
45920
46441
|
PricingPageTemplate.displayName = "PricingPageTemplate";
|
|
45921
46442
|
}
|
|
45922
46443
|
});
|
|
46444
|
+
function RacingBoard({
|
|
46445
|
+
backgroundImage,
|
|
46446
|
+
assetBaseUrl,
|
|
46447
|
+
width = 800,
|
|
46448
|
+
height = 600,
|
|
46449
|
+
fps = 60,
|
|
46450
|
+
tickEvent,
|
|
46451
|
+
drawEvent,
|
|
46452
|
+
className
|
|
46453
|
+
}) {
|
|
46454
|
+
return /* @__PURE__ */ jsx("div", { className: cn("racing-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
46455
|
+
GameCanvas2D,
|
|
46456
|
+
{
|
|
46457
|
+
backgroundImage,
|
|
46458
|
+
assetBaseUrl,
|
|
46459
|
+
width,
|
|
46460
|
+
height,
|
|
46461
|
+
fps,
|
|
46462
|
+
tickEvent: typeof tickEvent === "string" ? tickEvent : void 0,
|
|
46463
|
+
drawEvent: typeof drawEvent === "string" ? drawEvent : void 0
|
|
46464
|
+
}
|
|
46465
|
+
) });
|
|
46466
|
+
}
|
|
46467
|
+
var init_RacingBoard = __esm({
|
|
46468
|
+
"components/game/organisms/RacingBoard.tsx"() {
|
|
46469
|
+
"use client";
|
|
46470
|
+
init_cn();
|
|
46471
|
+
init_GameCanvas2D();
|
|
46472
|
+
RacingBoard.displayName = "RacingBoard";
|
|
46473
|
+
}
|
|
46474
|
+
});
|
|
45923
46475
|
function resolveManifestUrl3(manifest, relative) {
|
|
45924
46476
|
if (relative == null) return void 0;
|
|
45925
46477
|
if (/^https?:\/\//.test(relative)) return relative;
|
|
@@ -46414,7 +46966,7 @@ var init_debugRegistry = __esm({
|
|
|
46414
46966
|
}
|
|
46415
46967
|
});
|
|
46416
46968
|
function useDebugData() {
|
|
46417
|
-
const [data, setData] =
|
|
46969
|
+
const [data, setData] = React85.useState(() => ({
|
|
46418
46970
|
traits: [],
|
|
46419
46971
|
ticks: [],
|
|
46420
46972
|
guards: [],
|
|
@@ -46428,7 +46980,7 @@ function useDebugData() {
|
|
|
46428
46980
|
},
|
|
46429
46981
|
lastUpdate: Date.now()
|
|
46430
46982
|
}));
|
|
46431
|
-
|
|
46983
|
+
React85.useEffect(() => {
|
|
46432
46984
|
const updateData = () => {
|
|
46433
46985
|
setData({
|
|
46434
46986
|
traits: getAllTraits(),
|
|
@@ -46537,12 +47089,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
46537
47089
|
return positions;
|
|
46538
47090
|
}
|
|
46539
47091
|
function WalkMinimap() {
|
|
46540
|
-
const [walkStep, setWalkStep] =
|
|
46541
|
-
const [traits2, setTraits] =
|
|
46542
|
-
const [coveredEdges, setCoveredEdges] =
|
|
46543
|
-
const [completedTraits, setCompletedTraits] =
|
|
46544
|
-
const prevTraitRef =
|
|
46545
|
-
|
|
47092
|
+
const [walkStep, setWalkStep] = React85.useState(null);
|
|
47093
|
+
const [traits2, setTraits] = React85.useState([]);
|
|
47094
|
+
const [coveredEdges, setCoveredEdges] = React85.useState([]);
|
|
47095
|
+
const [completedTraits, setCompletedTraits] = React85.useState(/* @__PURE__ */ new Set());
|
|
47096
|
+
const prevTraitRef = React85.useRef(null);
|
|
47097
|
+
React85.useEffect(() => {
|
|
46546
47098
|
const interval = setInterval(() => {
|
|
46547
47099
|
const w = window;
|
|
46548
47100
|
const step = w.__orbitalWalkStep;
|
|
@@ -46978,15 +47530,15 @@ var init_EntitiesTab = __esm({
|
|
|
46978
47530
|
});
|
|
46979
47531
|
function EventFlowTab({ events: events2 }) {
|
|
46980
47532
|
const { t } = useTranslate();
|
|
46981
|
-
const [filter, setFilter] =
|
|
46982
|
-
const containerRef =
|
|
46983
|
-
const [autoScroll, setAutoScroll] =
|
|
46984
|
-
|
|
47533
|
+
const [filter, setFilter] = React85.useState("all");
|
|
47534
|
+
const containerRef = React85.useRef(null);
|
|
47535
|
+
const [autoScroll, setAutoScroll] = React85.useState(true);
|
|
47536
|
+
React85.useEffect(() => {
|
|
46985
47537
|
if (autoScroll && containerRef.current) {
|
|
46986
47538
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
46987
47539
|
}
|
|
46988
47540
|
}, [events2.length, autoScroll]);
|
|
46989
|
-
const filteredEvents =
|
|
47541
|
+
const filteredEvents = React85.useMemo(() => {
|
|
46990
47542
|
if (filter === "all") return events2;
|
|
46991
47543
|
return events2.filter((e) => e.type === filter);
|
|
46992
47544
|
}, [events2, filter]);
|
|
@@ -47102,7 +47654,7 @@ var init_EventFlowTab = __esm({
|
|
|
47102
47654
|
});
|
|
47103
47655
|
function GuardsPanel({ guards }) {
|
|
47104
47656
|
const { t } = useTranslate();
|
|
47105
|
-
const [filter, setFilter] =
|
|
47657
|
+
const [filter, setFilter] = React85.useState("all");
|
|
47106
47658
|
if (guards.length === 0) {
|
|
47107
47659
|
return /* @__PURE__ */ jsx(
|
|
47108
47660
|
EmptyState,
|
|
@@ -47115,7 +47667,7 @@ function GuardsPanel({ guards }) {
|
|
|
47115
47667
|
}
|
|
47116
47668
|
const passedCount = guards.filter((g) => g.result).length;
|
|
47117
47669
|
const failedCount = guards.length - passedCount;
|
|
47118
|
-
const filteredGuards =
|
|
47670
|
+
const filteredGuards = React85.useMemo(() => {
|
|
47119
47671
|
if (filter === "all") return guards;
|
|
47120
47672
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
47121
47673
|
return guards.filter((g) => !g.result);
|
|
@@ -47278,10 +47830,10 @@ function EffectBadge({ effect }) {
|
|
|
47278
47830
|
}
|
|
47279
47831
|
function TransitionTimeline({ transitions }) {
|
|
47280
47832
|
const { t } = useTranslate();
|
|
47281
|
-
const containerRef =
|
|
47282
|
-
const [autoScroll, setAutoScroll] =
|
|
47283
|
-
const [expandedId, setExpandedId] =
|
|
47284
|
-
|
|
47833
|
+
const containerRef = React85.useRef(null);
|
|
47834
|
+
const [autoScroll, setAutoScroll] = React85.useState(true);
|
|
47835
|
+
const [expandedId, setExpandedId] = React85.useState(null);
|
|
47836
|
+
React85.useEffect(() => {
|
|
47285
47837
|
if (autoScroll && containerRef.current) {
|
|
47286
47838
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
47287
47839
|
}
|
|
@@ -47561,9 +48113,9 @@ function getAllEvents(traits2) {
|
|
|
47561
48113
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
47562
48114
|
const eventBus = useEventBus();
|
|
47563
48115
|
const { t } = useTranslate();
|
|
47564
|
-
const [log14, setLog] =
|
|
47565
|
-
const prevStatesRef =
|
|
47566
|
-
|
|
48116
|
+
const [log14, setLog] = React85.useState([]);
|
|
48117
|
+
const prevStatesRef = React85.useRef(/* @__PURE__ */ new Map());
|
|
48118
|
+
React85.useEffect(() => {
|
|
47567
48119
|
for (const trait of traits2) {
|
|
47568
48120
|
const prev = prevStatesRef.current.get(trait.id);
|
|
47569
48121
|
if (prev && prev !== trait.currentState) {
|
|
@@ -47732,10 +48284,10 @@ function VerifyModePanel({
|
|
|
47732
48284
|
localCount
|
|
47733
48285
|
}) {
|
|
47734
48286
|
const { t } = useTranslate();
|
|
47735
|
-
const [expanded, setExpanded] =
|
|
47736
|
-
const scrollRef =
|
|
47737
|
-
const prevCountRef =
|
|
47738
|
-
|
|
48287
|
+
const [expanded, setExpanded] = React85.useState(true);
|
|
48288
|
+
const scrollRef = React85.useRef(null);
|
|
48289
|
+
const prevCountRef = React85.useRef(0);
|
|
48290
|
+
React85.useEffect(() => {
|
|
47739
48291
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
47740
48292
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
47741
48293
|
}
|
|
@@ -47792,10 +48344,10 @@ function RuntimeDebugger({
|
|
|
47792
48344
|
schema
|
|
47793
48345
|
}) {
|
|
47794
48346
|
const { t } = useTranslate();
|
|
47795
|
-
const [isCollapsed, setIsCollapsed] =
|
|
47796
|
-
const [isVisible, setIsVisible] =
|
|
48347
|
+
const [isCollapsed, setIsCollapsed] = React85.useState(mode === "verify" ? true : defaultCollapsed);
|
|
48348
|
+
const [isVisible, setIsVisible] = React85.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
47797
48349
|
const debugData = useDebugData();
|
|
47798
|
-
|
|
48350
|
+
React85.useEffect(() => {
|
|
47799
48351
|
if (mode === "inline") return;
|
|
47800
48352
|
return onDebugToggle((enabled) => {
|
|
47801
48353
|
setIsVisible(enabled);
|
|
@@ -47804,7 +48356,7 @@ function RuntimeDebugger({
|
|
|
47804
48356
|
}
|
|
47805
48357
|
});
|
|
47806
48358
|
}, [mode]);
|
|
47807
|
-
|
|
48359
|
+
React85.useEffect(() => {
|
|
47808
48360
|
if (mode === "inline") return;
|
|
47809
48361
|
const handleKeyDown = (e) => {
|
|
47810
48362
|
if (e.key === "`" && isVisible) {
|
|
@@ -48364,7 +48916,7 @@ function SequenceBar({
|
|
|
48364
48916
|
onSlotRemove(index);
|
|
48365
48917
|
}, [onSlotRemove, playing]);
|
|
48366
48918
|
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(
|
|
48919
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React85__default.Fragment, { children: [
|
|
48368
48920
|
i > 0 && /* @__PURE__ */ jsx(
|
|
48369
48921
|
Typography,
|
|
48370
48922
|
{
|
|
@@ -49125,6 +49677,123 @@ var init_SimulatorBoard = __esm({
|
|
|
49125
49677
|
SimulatorBoard.displayName = "SimulatorBoard";
|
|
49126
49678
|
}
|
|
49127
49679
|
});
|
|
49680
|
+
function SokobanBoard({
|
|
49681
|
+
tiles,
|
|
49682
|
+
units,
|
|
49683
|
+
features,
|
|
49684
|
+
assetManifest,
|
|
49685
|
+
assetBaseUrl,
|
|
49686
|
+
scale = 0.45,
|
|
49687
|
+
showMinimap = false,
|
|
49688
|
+
enableCamera = false,
|
|
49689
|
+
tileClickEvent,
|
|
49690
|
+
unitClickEvent,
|
|
49691
|
+
isLoading,
|
|
49692
|
+
error,
|
|
49693
|
+
className
|
|
49694
|
+
}) {
|
|
49695
|
+
return /* @__PURE__ */ jsx("div", { className: cn("sokoban-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
49696
|
+
IsometricCanvas_default,
|
|
49697
|
+
{
|
|
49698
|
+
tileLayout: "flat",
|
|
49699
|
+
tiles,
|
|
49700
|
+
units,
|
|
49701
|
+
features,
|
|
49702
|
+
assetManifest,
|
|
49703
|
+
assetBaseUrl,
|
|
49704
|
+
scale,
|
|
49705
|
+
showMinimap,
|
|
49706
|
+
enableCamera,
|
|
49707
|
+
tileClickEvent,
|
|
49708
|
+
unitClickEvent,
|
|
49709
|
+
isLoading,
|
|
49710
|
+
error
|
|
49711
|
+
}
|
|
49712
|
+
) });
|
|
49713
|
+
}
|
|
49714
|
+
var init_SokobanBoard = __esm({
|
|
49715
|
+
"components/game/organisms/SokobanBoard.tsx"() {
|
|
49716
|
+
"use client";
|
|
49717
|
+
init_cn();
|
|
49718
|
+
init_IsometricCanvas();
|
|
49719
|
+
SokobanBoard.displayName = "SokobanBoard";
|
|
49720
|
+
}
|
|
49721
|
+
});
|
|
49722
|
+
function SpaceShmupBoard({
|
|
49723
|
+
backgroundImage,
|
|
49724
|
+
assetBaseUrl,
|
|
49725
|
+
width = 800,
|
|
49726
|
+
height = 600,
|
|
49727
|
+
fps = 60,
|
|
49728
|
+
isLoading,
|
|
49729
|
+
error,
|
|
49730
|
+
className
|
|
49731
|
+
}) {
|
|
49732
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("space-shmup-board relative w-full h-full", className), children: [
|
|
49733
|
+
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" }) }),
|
|
49734
|
+
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 }) }),
|
|
49735
|
+
/* @__PURE__ */ jsx(
|
|
49736
|
+
GameCanvas2D,
|
|
49737
|
+
{
|
|
49738
|
+
backgroundImage,
|
|
49739
|
+
assetBaseUrl,
|
|
49740
|
+
width,
|
|
49741
|
+
height,
|
|
49742
|
+
fps
|
|
49743
|
+
}
|
|
49744
|
+
)
|
|
49745
|
+
] });
|
|
49746
|
+
}
|
|
49747
|
+
var init_SpaceShmupBoard = __esm({
|
|
49748
|
+
"components/game/organisms/SpaceShmupBoard.tsx"() {
|
|
49749
|
+
"use client";
|
|
49750
|
+
init_cn();
|
|
49751
|
+
init_GameCanvas2D();
|
|
49752
|
+
SpaceShmupBoard.displayName = "SpaceShmupBoard";
|
|
49753
|
+
}
|
|
49754
|
+
});
|
|
49755
|
+
function SpaceStationBoard({
|
|
49756
|
+
tiles,
|
|
49757
|
+
units,
|
|
49758
|
+
features,
|
|
49759
|
+
assetManifest,
|
|
49760
|
+
assetBaseUrl,
|
|
49761
|
+
scale = 0.45,
|
|
49762
|
+
showMinimap = true,
|
|
49763
|
+
enableCamera = true,
|
|
49764
|
+
tileClickEvent,
|
|
49765
|
+
unitClickEvent,
|
|
49766
|
+
isLoading,
|
|
49767
|
+
error,
|
|
49768
|
+
className
|
|
49769
|
+
}) {
|
|
49770
|
+
return /* @__PURE__ */ jsx("div", { className: cn("space-station-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
49771
|
+
IsometricCanvas_default,
|
|
49772
|
+
{
|
|
49773
|
+
tileLayout: "isometric",
|
|
49774
|
+
tiles,
|
|
49775
|
+
units,
|
|
49776
|
+
features,
|
|
49777
|
+
assetManifest,
|
|
49778
|
+
assetBaseUrl,
|
|
49779
|
+
scale,
|
|
49780
|
+
showMinimap,
|
|
49781
|
+
enableCamera,
|
|
49782
|
+
tileClickEvent,
|
|
49783
|
+
unitClickEvent,
|
|
49784
|
+
isLoading,
|
|
49785
|
+
error
|
|
49786
|
+
}
|
|
49787
|
+
) });
|
|
49788
|
+
}
|
|
49789
|
+
var init_SpaceStationBoard = __esm({
|
|
49790
|
+
"components/game/organisms/SpaceStationBoard.tsx"() {
|
|
49791
|
+
"use client";
|
|
49792
|
+
init_cn();
|
|
49793
|
+
init_IsometricCanvas();
|
|
49794
|
+
SpaceStationBoard.displayName = "SpaceStationBoard";
|
|
49795
|
+
}
|
|
49796
|
+
});
|
|
49128
49797
|
var SplitPane;
|
|
49129
49798
|
var init_SplitPane = __esm({
|
|
49130
49799
|
"components/core/organisms/layout/SplitPane.tsx"() {
|
|
@@ -49218,6 +49887,48 @@ var init_SplitPane = __esm({
|
|
|
49218
49887
|
SplitPane.displayName = "SplitPane";
|
|
49219
49888
|
}
|
|
49220
49889
|
});
|
|
49890
|
+
function SportsBoard({
|
|
49891
|
+
tiles,
|
|
49892
|
+
units,
|
|
49893
|
+
features,
|
|
49894
|
+
assetManifest,
|
|
49895
|
+
assetBaseUrl,
|
|
49896
|
+
scale = 0.45,
|
|
49897
|
+
showMinimap = false,
|
|
49898
|
+
enableCamera = true,
|
|
49899
|
+
tileClickEvent,
|
|
49900
|
+
unitClickEvent,
|
|
49901
|
+
isLoading,
|
|
49902
|
+
error,
|
|
49903
|
+
className
|
|
49904
|
+
}) {
|
|
49905
|
+
return /* @__PURE__ */ jsx("div", { className: cn("sports-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
49906
|
+
IsometricCanvas_default,
|
|
49907
|
+
{
|
|
49908
|
+
tileLayout: "flat",
|
|
49909
|
+
tiles,
|
|
49910
|
+
units,
|
|
49911
|
+
features,
|
|
49912
|
+
assetManifest,
|
|
49913
|
+
assetBaseUrl,
|
|
49914
|
+
scale,
|
|
49915
|
+
showMinimap,
|
|
49916
|
+
enableCamera,
|
|
49917
|
+
tileClickEvent,
|
|
49918
|
+
unitClickEvent,
|
|
49919
|
+
isLoading,
|
|
49920
|
+
error
|
|
49921
|
+
}
|
|
49922
|
+
) });
|
|
49923
|
+
}
|
|
49924
|
+
var init_SportsBoard = __esm({
|
|
49925
|
+
"components/game/organisms/SportsBoard.tsx"() {
|
|
49926
|
+
"use client";
|
|
49927
|
+
init_cn();
|
|
49928
|
+
init_IsometricCanvas();
|
|
49929
|
+
SportsBoard.displayName = "SportsBoard";
|
|
49930
|
+
}
|
|
49931
|
+
});
|
|
49221
49932
|
var StatCard;
|
|
49222
49933
|
var init_StatCard = __esm({
|
|
49223
49934
|
"components/core/organisms/StatCard.tsx"() {
|
|
@@ -49256,7 +49967,7 @@ var init_StatCard = __esm({
|
|
|
49256
49967
|
const labelToUse = propLabel ?? propTitle;
|
|
49257
49968
|
const eventBus = useEventBus();
|
|
49258
49969
|
const { t } = useTranslate();
|
|
49259
|
-
const handleActionClick =
|
|
49970
|
+
const handleActionClick = React85__default.useCallback(() => {
|
|
49260
49971
|
if (action?.event) {
|
|
49261
49972
|
eventBus.emit(`UI:${action.event}`, {});
|
|
49262
49973
|
}
|
|
@@ -49267,7 +49978,7 @@ var init_StatCard = __esm({
|
|
|
49267
49978
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
49268
49979
|
const isLoading = externalLoading ?? false;
|
|
49269
49980
|
const error = externalError;
|
|
49270
|
-
const computeMetricValue =
|
|
49981
|
+
const computeMetricValue = React85__default.useCallback(
|
|
49271
49982
|
(metric, items) => {
|
|
49272
49983
|
if (metric.value !== void 0) {
|
|
49273
49984
|
return metric.value;
|
|
@@ -49306,7 +50017,7 @@ var init_StatCard = __esm({
|
|
|
49306
50017
|
},
|
|
49307
50018
|
[]
|
|
49308
50019
|
);
|
|
49309
|
-
const schemaStats =
|
|
50020
|
+
const schemaStats = React85__default.useMemo(() => {
|
|
49310
50021
|
if (!metrics || metrics.length === 0) return null;
|
|
49311
50022
|
return metrics.map((metric) => ({
|
|
49312
50023
|
label: metric.label,
|
|
@@ -49314,7 +50025,7 @@ var init_StatCard = __esm({
|
|
|
49314
50025
|
format: metric.format
|
|
49315
50026
|
}));
|
|
49316
50027
|
}, [metrics, data, computeMetricValue]);
|
|
49317
|
-
const calculatedTrend =
|
|
50028
|
+
const calculatedTrend = React85__default.useMemo(() => {
|
|
49318
50029
|
if (manualTrend !== void 0) return manualTrend;
|
|
49319
50030
|
if (previousValue === void 0 || currentValue === void 0)
|
|
49320
50031
|
return void 0;
|
|
@@ -50063,6 +50774,832 @@ var init_StepFlowOrganism = __esm({
|
|
|
50063
50774
|
StepFlowOrganism.displayName = "StepFlowOrganism";
|
|
50064
50775
|
}
|
|
50065
50776
|
});
|
|
50777
|
+
|
|
50778
|
+
// components/core/molecules/markdown/index.ts
|
|
50779
|
+
var init_markdown = __esm({
|
|
50780
|
+
"components/core/molecules/markdown/index.ts"() {
|
|
50781
|
+
init_MarkdownContent();
|
|
50782
|
+
init_CodeBlock();
|
|
50783
|
+
}
|
|
50784
|
+
});
|
|
50785
|
+
function groupByOrbital(subagents) {
|
|
50786
|
+
const map = /* @__PURE__ */ new Map();
|
|
50787
|
+
for (const sub of subagents) {
|
|
50788
|
+
const key = sub.orbitalName ?? "(unattached)";
|
|
50789
|
+
const arr = map.get(key) ?? [];
|
|
50790
|
+
arr.push(sub);
|
|
50791
|
+
map.set(key, arr);
|
|
50792
|
+
}
|
|
50793
|
+
return map;
|
|
50794
|
+
}
|
|
50795
|
+
function statusIconName(status) {
|
|
50796
|
+
switch (status) {
|
|
50797
|
+
case "running":
|
|
50798
|
+
return "loader";
|
|
50799
|
+
case "complete":
|
|
50800
|
+
return "check";
|
|
50801
|
+
case "error":
|
|
50802
|
+
return "x";
|
|
50803
|
+
default:
|
|
50804
|
+
return "circle";
|
|
50805
|
+
}
|
|
50806
|
+
}
|
|
50807
|
+
function lastMessage(sub) {
|
|
50808
|
+
if (sub.messages.length === 0) return void 0;
|
|
50809
|
+
return sub.messages[sub.messages.length - 1].message;
|
|
50810
|
+
}
|
|
50811
|
+
function formatHHMMSS(ts) {
|
|
50812
|
+
const d = new Date(ts);
|
|
50813
|
+
const hh = String(d.getHours()).padStart(2, "0");
|
|
50814
|
+
const mm = String(d.getMinutes()).padStart(2, "0");
|
|
50815
|
+
const ss = String(d.getSeconds()).padStart(2, "0");
|
|
50816
|
+
return `${hh}:${mm}:${ss}`;
|
|
50817
|
+
}
|
|
50818
|
+
function compactJson(value) {
|
|
50819
|
+
if (value === void 0 || value === null) return "";
|
|
50820
|
+
if (typeof value === "string") return value;
|
|
50821
|
+
try {
|
|
50822
|
+
const json = JSON.stringify(value);
|
|
50823
|
+
if (json.length <= 240) return json;
|
|
50824
|
+
return json.slice(0, 239) + "\u2026";
|
|
50825
|
+
} catch {
|
|
50826
|
+
return String(value);
|
|
50827
|
+
}
|
|
50828
|
+
}
|
|
50829
|
+
function tryPrettyJson(s) {
|
|
50830
|
+
try {
|
|
50831
|
+
return JSON.stringify(JSON.parse(s), null, 2);
|
|
50832
|
+
} catch {
|
|
50833
|
+
return null;
|
|
50834
|
+
}
|
|
50835
|
+
}
|
|
50836
|
+
function summarizeArgs(args) {
|
|
50837
|
+
const keys = Object.keys(args);
|
|
50838
|
+
if (keys.length === 0) return "";
|
|
50839
|
+
return keys.slice(0, 3).join(", ") + (keys.length > 3 ? ", \u2026" : "");
|
|
50840
|
+
}
|
|
50841
|
+
function previewText(text, max = 120) {
|
|
50842
|
+
if (!text) return "";
|
|
50843
|
+
return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
|
|
50844
|
+
}
|
|
50845
|
+
function coordinatorToActivityItems(activities) {
|
|
50846
|
+
return activities.flatMap((a) => {
|
|
50847
|
+
switch (a.type) {
|
|
50848
|
+
case "tool_call":
|
|
50849
|
+
return [{
|
|
50850
|
+
type: "tool_call",
|
|
50851
|
+
tool: a.tool,
|
|
50852
|
+
args: a.args,
|
|
50853
|
+
timestamp: a.timestamp
|
|
50854
|
+
}];
|
|
50855
|
+
case "tool_result":
|
|
50856
|
+
return [{
|
|
50857
|
+
type: "tool_result",
|
|
50858
|
+
tool: a.tool,
|
|
50859
|
+
result: a.result,
|
|
50860
|
+
success: a.success,
|
|
50861
|
+
timestamp: a.timestamp
|
|
50862
|
+
}];
|
|
50863
|
+
case "message":
|
|
50864
|
+
return [{
|
|
50865
|
+
type: "message",
|
|
50866
|
+
role: a.role,
|
|
50867
|
+
content: a.content,
|
|
50868
|
+
timestamp: a.timestamp
|
|
50869
|
+
}];
|
|
50870
|
+
case "error":
|
|
50871
|
+
return [{
|
|
50872
|
+
type: "message",
|
|
50873
|
+
role: "system",
|
|
50874
|
+
content: `Error: ${a.message}`,
|
|
50875
|
+
timestamp: a.timestamp
|
|
50876
|
+
}];
|
|
50877
|
+
case "coordinator_decision":
|
|
50878
|
+
case "plan_committed":
|
|
50879
|
+
case "pending_question":
|
|
50880
|
+
case "clarification_question":
|
|
50881
|
+
return [];
|
|
50882
|
+
case "file_operation":
|
|
50883
|
+
return [{
|
|
50884
|
+
type: "file_operation",
|
|
50885
|
+
operation: a.operation,
|
|
50886
|
+
path: a.path,
|
|
50887
|
+
success: a.success,
|
|
50888
|
+
timestamp: a.timestamp
|
|
50889
|
+
}];
|
|
50890
|
+
case "schema_diff":
|
|
50891
|
+
return [{
|
|
50892
|
+
type: "schema_diff",
|
|
50893
|
+
filePath: a.filePath,
|
|
50894
|
+
hunks: a.hunks,
|
|
50895
|
+
timestamp: a.timestamp
|
|
50896
|
+
}];
|
|
50897
|
+
}
|
|
50898
|
+
});
|
|
50899
|
+
}
|
|
50900
|
+
function pluckCoordinatorState(activities) {
|
|
50901
|
+
let decision = null;
|
|
50902
|
+
let plan = null;
|
|
50903
|
+
const pendingQuestions = [];
|
|
50904
|
+
for (const a of activities) {
|
|
50905
|
+
if (a.type === "coordinator_decision") decision = a;
|
|
50906
|
+
else if (a.type === "plan_committed") plan = a;
|
|
50907
|
+
else if (a.type === "pending_question") pendingQuestions.push(a);
|
|
50908
|
+
}
|
|
50909
|
+
return { decision, plan, pendingQuestions };
|
|
50910
|
+
}
|
|
50911
|
+
function subagentMessagesToActivities(messages) {
|
|
50912
|
+
return messages.map((m) => {
|
|
50913
|
+
if (m.tool) {
|
|
50914
|
+
return {
|
|
50915
|
+
type: "tool_call",
|
|
50916
|
+
tool: m.tool,
|
|
50917
|
+
args: { preview: m.message },
|
|
50918
|
+
timestamp: m.timestamp
|
|
50919
|
+
};
|
|
50920
|
+
}
|
|
50921
|
+
return {
|
|
50922
|
+
type: "message",
|
|
50923
|
+
role: "system",
|
|
50924
|
+
content: m.message,
|
|
50925
|
+
timestamp: m.timestamp
|
|
50926
|
+
};
|
|
50927
|
+
});
|
|
50928
|
+
}
|
|
50929
|
+
function buildTimelineItems(messages, activities, subagents) {
|
|
50930
|
+
const items = [];
|
|
50931
|
+
if (messages) {
|
|
50932
|
+
messages.forEach((m, i) => items.push({ source: "message", data: m, index: i }));
|
|
50933
|
+
}
|
|
50934
|
+
if (activities) {
|
|
50935
|
+
activities.forEach((a) => items.push({ source: "activity", data: a }));
|
|
50936
|
+
}
|
|
50937
|
+
subagents.forEach((s) => items.push({ source: "subagent", data: s }));
|
|
50938
|
+
return items;
|
|
50939
|
+
}
|
|
50940
|
+
function timelineItemIcon(item) {
|
|
50941
|
+
switch (item.source) {
|
|
50942
|
+
case "message": {
|
|
50943
|
+
const m = item.data;
|
|
50944
|
+
if (m.role === "tool") return { name: "terminal", color: "text-[var(--color-primary)]" };
|
|
50945
|
+
if (m.reasoningContent) return { name: "sparkles", color: "text-[var(--color-primary)]" };
|
|
50946
|
+
if (m.role === "user") return { name: "user", color: "text-[var(--color-primary)]" };
|
|
50947
|
+
return { name: "message-square", color: "text-[var(--color-muted-foreground)]" };
|
|
50948
|
+
}
|
|
50949
|
+
case "activity": {
|
|
50950
|
+
const a = item.data;
|
|
50951
|
+
switch (a.type) {
|
|
50952
|
+
case "tool_call":
|
|
50953
|
+
return { name: "terminal", color: "text-[var(--color-primary)]" };
|
|
50954
|
+
case "tool_result":
|
|
50955
|
+
return { name: a.success !== false ? "check" : "x", color: a.success !== false ? "text-[var(--color-success)]" : "text-[var(--color-danger)]" };
|
|
50956
|
+
case "error":
|
|
50957
|
+
return { name: "alert-triangle", color: "text-[var(--color-danger)]" };
|
|
50958
|
+
case "file_operation":
|
|
50959
|
+
return { name: "file", color: "text-[var(--color-muted-foreground)]" };
|
|
50960
|
+
case "schema_diff":
|
|
50961
|
+
return { name: "git-commit", color: "text-[var(--color-muted-foreground)]" };
|
|
50962
|
+
default:
|
|
50963
|
+
return { name: "info", color: "text-[var(--color-muted-foreground)]" };
|
|
50964
|
+
}
|
|
50965
|
+
}
|
|
50966
|
+
case "subagent":
|
|
50967
|
+
return { name: "bot", color: "text-[var(--color-primary)]" };
|
|
50968
|
+
}
|
|
50969
|
+
}
|
|
50970
|
+
function timelineItemLabel(item) {
|
|
50971
|
+
switch (item.source) {
|
|
50972
|
+
case "message": {
|
|
50973
|
+
const m = item.data;
|
|
50974
|
+
if (m.role === "tool") return "tool";
|
|
50975
|
+
if (m.reasoningContent) return "thinking";
|
|
50976
|
+
return m.role;
|
|
50977
|
+
}
|
|
50978
|
+
case "activity":
|
|
50979
|
+
return item.data.type;
|
|
50980
|
+
case "subagent":
|
|
50981
|
+
return "subagent";
|
|
50982
|
+
}
|
|
50983
|
+
}
|
|
50984
|
+
function timelineItemPreview(item) {
|
|
50985
|
+
switch (item.source) {
|
|
50986
|
+
case "message": {
|
|
50987
|
+
const m = item.data;
|
|
50988
|
+
if (m.role === "tool") return `${m.toolName ?? "tool"} \u2192 ${m.toolCallId?.slice(0, 8) ?? ""}`;
|
|
50989
|
+
if (m.reasoningContent) return previewText(m.reasoningContent, 120);
|
|
50990
|
+
return previewText(m.content, 120);
|
|
50991
|
+
}
|
|
50992
|
+
case "activity": {
|
|
50993
|
+
const a = item.data;
|
|
50994
|
+
switch (a.type) {
|
|
50995
|
+
case "tool_call":
|
|
50996
|
+
return `${a.tool}(${summarizeArgs(a.args)})`;
|
|
50997
|
+
case "tool_result":
|
|
50998
|
+
return `${a.tool}: ${compactJson(a.result)}`;
|
|
50999
|
+
case "message":
|
|
51000
|
+
return previewText(a.content, 120);
|
|
51001
|
+
case "error":
|
|
51002
|
+
return previewText(a.message, 120);
|
|
51003
|
+
case "file_operation":
|
|
51004
|
+
return `${a.operation} ${a.path}`;
|
|
51005
|
+
case "schema_diff":
|
|
51006
|
+
return `diff ${a.filePath}`;
|
|
51007
|
+
default:
|
|
51008
|
+
return String(a.type);
|
|
51009
|
+
}
|
|
51010
|
+
}
|
|
51011
|
+
case "subagent":
|
|
51012
|
+
return `${item.data.name} \xB7 ${item.data.task}`;
|
|
51013
|
+
}
|
|
51014
|
+
}
|
|
51015
|
+
function timelineItemTimeLabel(item) {
|
|
51016
|
+
if (item.source === "activity") return formatHHMMSS(item.data.timestamp);
|
|
51017
|
+
if (item.source === "subagent") {
|
|
51018
|
+
const ts = item.data.messages[0]?.timestamp;
|
|
51019
|
+
return ts !== void 0 ? formatHHMMSS(ts) : void 0;
|
|
51020
|
+
}
|
|
51021
|
+
return void 0;
|
|
51022
|
+
}
|
|
51023
|
+
function TraceDetailContent({ item }) {
|
|
51024
|
+
const { t } = useTranslate();
|
|
51025
|
+
switch (item.source) {
|
|
51026
|
+
case "message": {
|
|
51027
|
+
const m = item.data;
|
|
51028
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51029
|
+
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "items-center", children: /* @__PURE__ */ jsx(Badge, { variant: roleBadgeVariant[m.role], className: "text-[10px] uppercase", children: m.role }) }),
|
|
51030
|
+
typeof m.reasoningContent === "string" && m.reasoningContent.length > 0 && /* @__PURE__ */ jsxs(Box, { children: [
|
|
51031
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "mb-1", children: t("subagentTrace.reasoning") }),
|
|
51032
|
+
/* @__PURE__ */ jsx(MarkdownContent, { content: m.reasoningContent })
|
|
51033
|
+
] }),
|
|
51034
|
+
m.content.length > 0 && /* @__PURE__ */ jsxs(Box, { children: [
|
|
51035
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "mb-1", children: t("subagentTrace.content") }),
|
|
51036
|
+
m.role === "tool" ? (() => {
|
|
51037
|
+
const pretty = tryPrettyJson(m.content);
|
|
51038
|
+
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 });
|
|
51039
|
+
})() : /* @__PURE__ */ jsx(MarkdownContent, { content: m.content })
|
|
51040
|
+
] }),
|
|
51041
|
+
Array.isArray(m.toolCalls) && m.toolCalls.length > 0 && /* @__PURE__ */ jsxs(Box, { children: [
|
|
51042
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "mb-1", children: t("subagentTrace.toolCalls") }),
|
|
51043
|
+
/* @__PURE__ */ jsx(
|
|
51044
|
+
Accordion,
|
|
51045
|
+
{
|
|
51046
|
+
multiple: true,
|
|
51047
|
+
items: m.toolCalls.map((tc, i) => ({
|
|
51048
|
+
id: `tc-detail-${i}`,
|
|
51049
|
+
title: `${tc.name}(${summarizeArgs(tc.args)})`,
|
|
51050
|
+
content: /* @__PURE__ */ jsx(CodeBlock, { code: JSON.stringify(tc.args, null, 2), language: "json", maxHeight: "24rem" })
|
|
51051
|
+
}))
|
|
51052
|
+
}
|
|
51053
|
+
)
|
|
51054
|
+
] })
|
|
51055
|
+
] });
|
|
51056
|
+
}
|
|
51057
|
+
case "activity": {
|
|
51058
|
+
const a = item.data;
|
|
51059
|
+
switch (a.type) {
|
|
51060
|
+
case "tool_call":
|
|
51061
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51062
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51063
|
+
/* @__PURE__ */ jsx(Badge, { variant: "default", className: "text-[10px]", children: "tool_call" }),
|
|
51064
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
51065
|
+
] }),
|
|
51066
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: a.tool }),
|
|
51067
|
+
/* @__PURE__ */ jsx(CodeBlock, { code: JSON.stringify(a.args, null, 2), language: "json", maxHeight: "60vh" })
|
|
51068
|
+
] });
|
|
51069
|
+
case "tool_result":
|
|
51070
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51071
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51072
|
+
/* @__PURE__ */ jsx(Badge, { variant: a.success !== false ? "default" : "warning", className: "text-[10px]", children: a.success !== false ? "success" : "fail" }),
|
|
51073
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
51074
|
+
] }),
|
|
51075
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: a.tool }),
|
|
51076
|
+
/* @__PURE__ */ jsx(CodeBlock, { code: JSON.stringify(a.result, null, 2), language: "json", maxHeight: "60vh" })
|
|
51077
|
+
] });
|
|
51078
|
+
case "message":
|
|
51079
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51080
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51081
|
+
/* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: a.role }),
|
|
51082
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
51083
|
+
] }),
|
|
51084
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "whitespace-pre-wrap", children: a.content })
|
|
51085
|
+
] });
|
|
51086
|
+
case "error":
|
|
51087
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51088
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51089
|
+
/* @__PURE__ */ jsx(Badge, { variant: "warning", className: "text-[10px]", children: "error" }),
|
|
51090
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
51091
|
+
] }),
|
|
51092
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "whitespace-pre-wrap text-[var(--color-danger)]", children: a.message })
|
|
51093
|
+
] });
|
|
51094
|
+
case "file_operation":
|
|
51095
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51096
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51097
|
+
/* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: "file" }),
|
|
51098
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
51099
|
+
] }),
|
|
51100
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "body2", children: [
|
|
51101
|
+
a.operation,
|
|
51102
|
+
" ",
|
|
51103
|
+
a.path
|
|
51104
|
+
] })
|
|
51105
|
+
] });
|
|
51106
|
+
case "schema_diff":
|
|
51107
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51108
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51109
|
+
/* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: "diff" }),
|
|
51110
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
51111
|
+
] }),
|
|
51112
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: a.filePath })
|
|
51113
|
+
] });
|
|
51114
|
+
default:
|
|
51115
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51116
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) }),
|
|
51117
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: String(a.type) })
|
|
51118
|
+
] });
|
|
51119
|
+
}
|
|
51120
|
+
}
|
|
51121
|
+
case "subagent": {
|
|
51122
|
+
const s = item.data;
|
|
51123
|
+
const activities = subagentMessagesToActivities(s.messages);
|
|
51124
|
+
const ts = s.messages[0]?.timestamp;
|
|
51125
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
51126
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51127
|
+
/* @__PURE__ */ jsx(Badge, { variant: "default", className: "text-[10px]", children: s.role }),
|
|
51128
|
+
ts !== void 0 && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(ts) })
|
|
51129
|
+
] }),
|
|
51130
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", weight: "semibold", children: s.name }),
|
|
51131
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", color: "muted", children: s.task }),
|
|
51132
|
+
activities.length > 0 && /* @__PURE__ */ jsx(Box, { className: "border-t border-[var(--color-border)] pt-2", children: /* @__PURE__ */ jsx(InlineActivityStream, { activities, autoScroll: false }) })
|
|
51133
|
+
] });
|
|
51134
|
+
}
|
|
51135
|
+
}
|
|
51136
|
+
}
|
|
51137
|
+
var InlineActivityRow, InlineActivityStream, CoordinatorCard, SubagentRow, OrbitalGroup, SubagentRichCard, roleBadgeVariant, ChatMessageRow, CoordinatorConversation, SubagentTracePanel;
|
|
51138
|
+
var init_SubagentTracePanel = __esm({
|
|
51139
|
+
"components/core/organisms/SubagentTracePanel.tsx"() {
|
|
51140
|
+
"use client";
|
|
51141
|
+
init_Box();
|
|
51142
|
+
init_Stack();
|
|
51143
|
+
init_Typography();
|
|
51144
|
+
init_Badge();
|
|
51145
|
+
init_Icon();
|
|
51146
|
+
init_Button();
|
|
51147
|
+
init_Modal();
|
|
51148
|
+
init_Accordion();
|
|
51149
|
+
init_markdown();
|
|
51150
|
+
InlineActivityRow = ({ activity }) => {
|
|
51151
|
+
const time = formatHHMMSS(activity.timestamp);
|
|
51152
|
+
const baseRow = "items-start px-3 py-1 hover:bg-[var(--color-surface)]";
|
|
51153
|
+
if (activity.type === "tool_call") {
|
|
51154
|
+
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
|
|
51155
|
+
/* @__PURE__ */ jsx(Icon, { name: "terminal", size: "xs", className: "mt-0.5 flex-shrink-0 text-[var(--color-primary)]" }),
|
|
51156
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "flex-1 min-w-0 text-[11px] font-mono break-all whitespace-pre-wrap", children: [
|
|
51157
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", weight: "semibold", className: "text-[11px] font-mono", children: activity.tool }),
|
|
51158
|
+
activity.args !== void 0 && /* @__PURE__ */ jsxs(Typography, { as: "span", variant: "caption", color: "muted", className: "text-[11px] font-mono", children: [
|
|
51159
|
+
" ",
|
|
51160
|
+
compactJson(activity.args)
|
|
51161
|
+
] })
|
|
51162
|
+
] }),
|
|
51163
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
|
|
51164
|
+
] });
|
|
51165
|
+
}
|
|
51166
|
+
if (activity.type === "tool_result") {
|
|
51167
|
+
const success = activity.success !== false;
|
|
51168
|
+
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
|
|
51169
|
+
/* @__PURE__ */ jsx(
|
|
51170
|
+
Icon,
|
|
51171
|
+
{
|
|
51172
|
+
name: success ? "check" : "x",
|
|
51173
|
+
size: "xs",
|
|
51174
|
+
className: `mt-0.5 flex-shrink-0 ${success ? "text-[var(--color-success)]" : "text-[var(--color-danger)]"}`
|
|
51175
|
+
}
|
|
51176
|
+
),
|
|
51177
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "flex-1 min-w-0 text-[11px] font-mono break-all whitespace-pre-wrap", children: [
|
|
51178
|
+
/* @__PURE__ */ jsxs(Typography, { as: "span", variant: "caption", color: "muted", className: "text-[11px] font-mono", children: [
|
|
51179
|
+
activity.tool,
|
|
51180
|
+
":",
|
|
51181
|
+
" "
|
|
51182
|
+
] }),
|
|
51183
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "text-[11px] font-mono", children: compactJson(activity.result) })
|
|
51184
|
+
] }),
|
|
51185
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
|
|
51186
|
+
] });
|
|
51187
|
+
}
|
|
51188
|
+
if (activity.type === "message") {
|
|
51189
|
+
const role = activity.role;
|
|
51190
|
+
const iconName = role === "user" ? "user" : role === "system" ? "info" : "sparkles";
|
|
51191
|
+
const roleColor = role === "user" ? "text-[var(--color-primary)]" : role === "system" ? "text-[var(--color-muted-foreground)]" : "text-[var(--color-foreground)]";
|
|
51192
|
+
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
|
|
51193
|
+
/* @__PURE__ */ jsx(Icon, { name: iconName, size: "xs", className: `mt-0.5 flex-shrink-0 ${roleColor}` }),
|
|
51194
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "flex-1 min-w-0 text-[11px] whitespace-pre-wrap break-words", children: activity.content }),
|
|
51195
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
|
|
51196
|
+
] });
|
|
51197
|
+
}
|
|
51198
|
+
if (activity.type === "error") {
|
|
51199
|
+
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
|
|
51200
|
+
/* @__PURE__ */ jsx(Icon, { name: "alert-triangle", size: "xs", className: "mt-0.5 flex-shrink-0 text-[var(--color-danger)]" }),
|
|
51201
|
+
/* @__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 }),
|
|
51202
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
|
|
51203
|
+
] });
|
|
51204
|
+
}
|
|
51205
|
+
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
|
|
51206
|
+
/* @__PURE__ */ jsx(Icon, { name: "file", size: "xs", className: "mt-0.5 flex-shrink-0 text-[var(--color-muted-foreground)]" }),
|
|
51207
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", className: "flex-1 min-w-0 text-[11px] font-mono break-all", children: [
|
|
51208
|
+
"[",
|
|
51209
|
+
activity.type,
|
|
51210
|
+
"] ",
|
|
51211
|
+
compactJson(activity)
|
|
51212
|
+
] }),
|
|
51213
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
|
|
51214
|
+
] });
|
|
51215
|
+
};
|
|
51216
|
+
InlineActivityStream = ({ activities, autoScroll = true, className }) => {
|
|
51217
|
+
const endRef = React85__default.useRef(null);
|
|
51218
|
+
React85__default.useEffect(() => {
|
|
51219
|
+
if (!autoScroll) return;
|
|
51220
|
+
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
51221
|
+
}, [activities.length, autoScroll]);
|
|
51222
|
+
return /* @__PURE__ */ jsxs(Box, { className, children: [
|
|
51223
|
+
activities.map((a, i) => /* @__PURE__ */ jsx(InlineActivityRow, { activity: a }, `${a.timestamp}-${i}`)),
|
|
51224
|
+
/* @__PURE__ */ jsx(Box, { ref: endRef })
|
|
51225
|
+
] });
|
|
51226
|
+
};
|
|
51227
|
+
CoordinatorCard = ({ snapshot, className }) => {
|
|
51228
|
+
const { t } = useTranslate();
|
|
51229
|
+
const { decision, plan, pendingQuestions } = snapshot;
|
|
51230
|
+
if (!decision && !plan && pendingQuestions.length === 0) return null;
|
|
51231
|
+
return /* @__PURE__ */ jsxs(
|
|
51232
|
+
Box,
|
|
51233
|
+
{
|
|
51234
|
+
className: `px-3 py-2 border-b border-[var(--color-border)] bg-[var(--color-muted)]/30 ${className ?? ""}`,
|
|
51235
|
+
children: [
|
|
51236
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center mb-2", children: [
|
|
51237
|
+
/* @__PURE__ */ jsx(Icon, { name: "compass", size: "xs" }),
|
|
51238
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold text-[11px]", children: t("subagentTrace.coordinator") })
|
|
51239
|
+
] }),
|
|
51240
|
+
decision && /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "mb-2", children: [
|
|
51241
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51242
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] uppercase tracking-wide", children: t("subagentTrace.organism") }),
|
|
51243
|
+
/* @__PURE__ */ jsx(Badge, { variant: "default", className: "text-[10px]", children: decision.organism }),
|
|
51244
|
+
decision.priorOrganism && decision.priorOrganism !== decision.organism && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: t("subagentTrace.wasOrganism", { organism: decision.priorOrganism }) })
|
|
51245
|
+
] }),
|
|
51246
|
+
decision.reason && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[11px] mt-0.5", children: decision.reason })
|
|
51247
|
+
] }),
|
|
51248
|
+
plan && plan.orbitals.length > 0 && /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "mb-2", children: [
|
|
51249
|
+
/* @__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 }) }),
|
|
51250
|
+
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap", children: plan.orbitals.map((o) => /* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: o }, o)) })
|
|
51251
|
+
] }),
|
|
51252
|
+
pendingQuestions.length > 0 && /* @__PURE__ */ jsxs(VStack, { gap: "none", children: [
|
|
51253
|
+
/* @__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 }) }),
|
|
51254
|
+
pendingQuestions.map((q) => /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-start", children: [
|
|
51255
|
+
/* @__PURE__ */ jsx(Icon, { name: "help-circle", size: "xs", className: "mt-0.5 flex-shrink-0 text-[var(--color-warning)]" }),
|
|
51256
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-[11px] flex-1 min-w-0", children: [
|
|
51257
|
+
q.question,
|
|
51258
|
+
q.orbitalName && /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", className: "text-[10px] ml-1", children: [
|
|
51259
|
+
"(",
|
|
51260
|
+
q.orbitalName,
|
|
51261
|
+
")"
|
|
51262
|
+
] })
|
|
51263
|
+
] })
|
|
51264
|
+
] }, q.questionId))
|
|
51265
|
+
] })
|
|
51266
|
+
]
|
|
51267
|
+
}
|
|
51268
|
+
);
|
|
51269
|
+
};
|
|
51270
|
+
SubagentRow = ({ subagent }) => {
|
|
51271
|
+
const recent = lastMessage(subagent);
|
|
51272
|
+
return /* @__PURE__ */ jsxs(
|
|
51273
|
+
HStack,
|
|
51274
|
+
{
|
|
51275
|
+
gap: "sm",
|
|
51276
|
+
className: "items-start px-3 py-2 border-b border-[var(--color-border)]",
|
|
51277
|
+
children: [
|
|
51278
|
+
/* @__PURE__ */ jsx(Box, { className: "pt-0.5", children: /* @__PURE__ */ jsx(Icon, { name: statusIconName(subagent.status), size: "xs" }) }),
|
|
51279
|
+
/* @__PURE__ */ jsxs(VStack, { gap: "none", className: "flex-1 min-w-0", children: [
|
|
51280
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center", children: [
|
|
51281
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-medium truncate", children: subagent.name }),
|
|
51282
|
+
/* @__PURE__ */ jsx(Badge, { variant: "default", children: subagent.role })
|
|
51283
|
+
] }),
|
|
51284
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "truncate", children: recent ?? subagent.task })
|
|
51285
|
+
] })
|
|
51286
|
+
]
|
|
51287
|
+
}
|
|
51288
|
+
);
|
|
51289
|
+
};
|
|
51290
|
+
OrbitalGroup = ({ orbitalName, subagents }) => {
|
|
51291
|
+
const { t } = useTranslate();
|
|
51292
|
+
const runningCount = subagents.filter((s) => s.status === "running").length;
|
|
51293
|
+
const completeCount = subagents.filter((s) => s.status === "complete").length;
|
|
51294
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "border-b border-[var(--color-border)]", children: [
|
|
51295
|
+
/* @__PURE__ */ jsxs(
|
|
51296
|
+
HStack,
|
|
51297
|
+
{
|
|
51298
|
+
gap: "sm",
|
|
51299
|
+
className: "items-center px-3 py-2 bg-[var(--color-surface)] border-b border-[var(--color-border)]",
|
|
51300
|
+
children: [
|
|
51301
|
+
/* @__PURE__ */ jsx(Icon, { name: "circle", size: "xs" }),
|
|
51302
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold flex-1 truncate", children: orbitalName }),
|
|
51303
|
+
/* @__PURE__ */ jsx(Badge, { variant: "default", children: runningCount > 0 ? t("subagentTrace.countRunning", { count: runningCount }) : t("subagentTrace.countDone", { count: completeCount }) })
|
|
51304
|
+
]
|
|
51305
|
+
}
|
|
51306
|
+
),
|
|
51307
|
+
subagents.map((sub) => /* @__PURE__ */ jsx(SubagentRow, { subagent: sub }, sub.id))
|
|
51308
|
+
] });
|
|
51309
|
+
};
|
|
51310
|
+
SubagentRichCard = ({ subagent }) => {
|
|
51311
|
+
const { t } = useTranslate();
|
|
51312
|
+
const activities = React85__default.useMemo(
|
|
51313
|
+
() => subagentMessagesToActivities(subagent.messages),
|
|
51314
|
+
[subagent.messages]
|
|
51315
|
+
);
|
|
51316
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "border-b border-[var(--color-border)] p-3", children: [
|
|
51317
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center mb-2", children: [
|
|
51318
|
+
/* @__PURE__ */ jsx(
|
|
51319
|
+
Box,
|
|
51320
|
+
{
|
|
51321
|
+
style: {
|
|
51322
|
+
width: 8,
|
|
51323
|
+
height: 8,
|
|
51324
|
+
borderRadius: "50%",
|
|
51325
|
+
flexShrink: 0,
|
|
51326
|
+
backgroundColor: subagent.status === "complete" ? "var(--color-success)" : subagent.status === "error" ? "var(--color-error)" : "var(--color-primary)",
|
|
51327
|
+
...subagent.status === "running" ? { animation: "pulse 1.5s infinite" } : {}
|
|
51328
|
+
}
|
|
51329
|
+
}
|
|
51330
|
+
),
|
|
51331
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold flex-1 truncate", children: subagent.name }),
|
|
51332
|
+
/* @__PURE__ */ jsx(Badge, { variant: subagent.role === "deterministic" ? "default" : subagent.role === "llm" ? "info" : "warning", children: subagent.role }),
|
|
51333
|
+
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` })
|
|
51334
|
+
] }),
|
|
51335
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "mb-2", children: subagent.task }),
|
|
51336
|
+
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") })
|
|
51337
|
+
] });
|
|
51338
|
+
};
|
|
51339
|
+
roleBadgeVariant = {
|
|
51340
|
+
system: "neutral",
|
|
51341
|
+
user: "info",
|
|
51342
|
+
assistant: "default",
|
|
51343
|
+
tool: "warning"
|
|
51344
|
+
};
|
|
51345
|
+
ChatMessageRow = ({ message, index }) => {
|
|
51346
|
+
const { t } = useTranslate();
|
|
51347
|
+
const { role, content, toolCalls, reasoningContent, toolCallId, toolName } = message;
|
|
51348
|
+
if (role === "tool") {
|
|
51349
|
+
const pretty = tryPrettyJson(content);
|
|
51350
|
+
const title = `${toolName ?? "tool"} \u2192${toolCallId ? ` ${toolCallId.slice(0, 8)}` : ""}`;
|
|
51351
|
+
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 });
|
|
51352
|
+
const items = [{ id: `tool-${index}`, title, content: body }];
|
|
51353
|
+
return /* @__PURE__ */ jsx(Box, { className: "px-3 py-2 border-b border-[var(--color-border)]", children: /* @__PURE__ */ jsx(Accordion, { items }) });
|
|
51354
|
+
}
|
|
51355
|
+
const hasReasoning = typeof reasoningContent === "string" && reasoningContent.length > 0;
|
|
51356
|
+
const hasToolCalls = Array.isArray(toolCalls) && toolCalls.length > 0;
|
|
51357
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "px-3 py-2 border-b border-[var(--color-border)]", children: [
|
|
51358
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51359
|
+
/* @__PURE__ */ jsx(Badge, { variant: roleBadgeVariant[role], className: "text-[10px] uppercase", children: role }),
|
|
51360
|
+
hasReasoning && /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: [
|
|
51361
|
+
"\xB7 ",
|
|
51362
|
+
t("subagentTrace.thinking")
|
|
51363
|
+
] }),
|
|
51364
|
+
hasToolCalls && /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: [
|
|
51365
|
+
"\xB7 ",
|
|
51366
|
+
toolCalls.length === 1 ? t("subagentTrace.toolCallCount", { count: toolCalls.length }) : t("subagentTrace.toolCallCountPlural", { count: toolCalls.length })
|
|
51367
|
+
] })
|
|
51368
|
+
] }),
|
|
51369
|
+
hasReasoning && /* @__PURE__ */ jsx(Accordion, { items: [{
|
|
51370
|
+
id: `reasoning-${index}`,
|
|
51371
|
+
title: t("subagentTrace.reasoning"),
|
|
51372
|
+
content: /* @__PURE__ */ jsx(MarkdownContent, { content: reasoningContent })
|
|
51373
|
+
}] }),
|
|
51374
|
+
content.length > 0 && /* @__PURE__ */ jsx(MarkdownContent, { content }),
|
|
51375
|
+
hasToolCalls && /* @__PURE__ */ jsx(
|
|
51376
|
+
Accordion,
|
|
51377
|
+
{
|
|
51378
|
+
multiple: true,
|
|
51379
|
+
items: toolCalls.map((tc, i) => ({
|
|
51380
|
+
id: `tc-${index}-${i}`,
|
|
51381
|
+
title: `${tc.name}(${summarizeArgs(tc.args)})`,
|
|
51382
|
+
content: /* @__PURE__ */ jsx(CodeBlock, { code: JSON.stringify(tc.args, null, 2), language: "json", maxHeight: "24rem" })
|
|
51383
|
+
}))
|
|
51384
|
+
}
|
|
51385
|
+
)
|
|
51386
|
+
] });
|
|
51387
|
+
};
|
|
51388
|
+
CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
|
|
51389
|
+
const endRef = React85__default.useRef(null);
|
|
51390
|
+
React85__default.useEffect(() => {
|
|
51391
|
+
if (!autoScroll) return;
|
|
51392
|
+
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
51393
|
+
}, [messages.length, autoScroll]);
|
|
51394
|
+
return /* @__PURE__ */ jsxs(Box, { className, children: [
|
|
51395
|
+
messages.map((m, i) => /* @__PURE__ */ jsx(ChatMessageRow, { message: m, index: i }, `msg-${i}`)),
|
|
51396
|
+
/* @__PURE__ */ jsx(Box, { ref: endRef })
|
|
51397
|
+
] });
|
|
51398
|
+
};
|
|
51399
|
+
SubagentTracePanel = ({
|
|
51400
|
+
subagents,
|
|
51401
|
+
focusedOrbital,
|
|
51402
|
+
disclosureLevel,
|
|
51403
|
+
open,
|
|
51404
|
+
onClose,
|
|
51405
|
+
className,
|
|
51406
|
+
mode = "overlay",
|
|
51407
|
+
coordinatorActivities,
|
|
51408
|
+
coordinatorMessages
|
|
51409
|
+
}) => {
|
|
51410
|
+
const { t } = useTranslate();
|
|
51411
|
+
const [selectedItem, setSelectedItem] = useState(null);
|
|
51412
|
+
const densityLabel = (rich) => rich ? t("subagentTrace.densityRich") : t("subagentTrace.densityCompact");
|
|
51413
|
+
if (mode === "overlay" && !open) return null;
|
|
51414
|
+
const isTabMode = mode === "tab";
|
|
51415
|
+
const isRichMode = isTabMode || disclosureLevel >= 3;
|
|
51416
|
+
if (isTabMode) {
|
|
51417
|
+
const timelineItems = buildTimelineItems(coordinatorMessages, coordinatorActivities, subagents);
|
|
51418
|
+
const hasData = timelineItems.length > 0;
|
|
51419
|
+
return /* @__PURE__ */ jsxs(Box, { className: `h-full w-full bg-[var(--color-card)] overflow-hidden flex flex-col ${className ?? ""}`, children: [
|
|
51420
|
+
/* @__PURE__ */ jsxs(
|
|
51421
|
+
HStack,
|
|
51422
|
+
{
|
|
51423
|
+
gap: "sm",
|
|
51424
|
+
className: "items-center px-3 py-2 border-b border-[var(--color-border)]",
|
|
51425
|
+
children: [
|
|
51426
|
+
/* @__PURE__ */ jsx(Icon, { name: "activity", size: "sm" }),
|
|
51427
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold flex-1", children: t("subagentTrace.trace") }),
|
|
51428
|
+
onClose && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" }) })
|
|
51429
|
+
]
|
|
51430
|
+
}
|
|
51431
|
+
),
|
|
51432
|
+
!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") }) }),
|
|
51433
|
+
hasData && /* @__PURE__ */ jsx(Box, { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx(VStack, { gap: "none", children: timelineItems.map((item, i) => {
|
|
51434
|
+
const { name: iconName, color: iconColor } = timelineItemIcon(item);
|
|
51435
|
+
const isLast = i === timelineItems.length - 1;
|
|
51436
|
+
return /* @__PURE__ */ jsxs(
|
|
51437
|
+
Box,
|
|
51438
|
+
{
|
|
51439
|
+
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",
|
|
51440
|
+
onClick: () => setSelectedItem(item),
|
|
51441
|
+
children: [
|
|
51442
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex flex-col items-center mr-3 mt-0.5", style: { width: 20 }, children: [
|
|
51443
|
+
/* @__PURE__ */ jsx(
|
|
51444
|
+
Box,
|
|
51445
|
+
{
|
|
51446
|
+
className: "rounded-full flex-shrink-0",
|
|
51447
|
+
style: {
|
|
51448
|
+
width: 8,
|
|
51449
|
+
height: 8,
|
|
51450
|
+
backgroundColor: "var(--color-primary)"
|
|
51451
|
+
}
|
|
51452
|
+
}
|
|
51453
|
+
),
|
|
51454
|
+
!isLast && /* @__PURE__ */ jsx(
|
|
51455
|
+
Box,
|
|
51456
|
+
{
|
|
51457
|
+
className: "flex-1",
|
|
51458
|
+
style: {
|
|
51459
|
+
width: 2,
|
|
51460
|
+
backgroundColor: "var(--color-border)",
|
|
51461
|
+
marginTop: 4,
|
|
51462
|
+
minHeight: 24
|
|
51463
|
+
}
|
|
51464
|
+
}
|
|
51465
|
+
)
|
|
51466
|
+
] }),
|
|
51467
|
+
/* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "flex-1 min-w-0", children: [
|
|
51468
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
51469
|
+
/* @__PURE__ */ jsx(Icon, { name: iconName, size: "xs", className: `flex-shrink-0 ${iconColor}` }),
|
|
51470
|
+
timelineItemTimeLabel(item) && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: timelineItemTimeLabel(item) }),
|
|
51471
|
+
/* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: timelineItemLabel(item) })
|
|
51472
|
+
] }),
|
|
51473
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-start", children: [
|
|
51474
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", color: "muted", className: "flex-1 min-w-0 line-clamp-2", children: timelineItemPreview(item) }),
|
|
51475
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", className: "flex-shrink-0 mt-0", onClick: (e) => {
|
|
51476
|
+
e.stopPropagation();
|
|
51477
|
+
setSelectedItem(item);
|
|
51478
|
+
}, children: /* @__PURE__ */ jsx(Icon, { name: "maximize-2", size: "xs" }) })
|
|
51479
|
+
] })
|
|
51480
|
+
] })
|
|
51481
|
+
]
|
|
51482
|
+
},
|
|
51483
|
+
`${item.source}-${i}`
|
|
51484
|
+
);
|
|
51485
|
+
}) }) }),
|
|
51486
|
+
/* @__PURE__ */ jsx(
|
|
51487
|
+
Modal,
|
|
51488
|
+
{
|
|
51489
|
+
isOpen: selectedItem !== null,
|
|
51490
|
+
onClose: () => setSelectedItem(null),
|
|
51491
|
+
title: selectedItem ? `${timelineItemLabel(selectedItem)}${timelineItemTimeLabel(selectedItem) ? ` \xB7 ${timelineItemTimeLabel(selectedItem)}` : ""}` : "",
|
|
51492
|
+
size: "lg",
|
|
51493
|
+
children: selectedItem && /* @__PURE__ */ jsx(TraceDetailContent, { item: selectedItem })
|
|
51494
|
+
}
|
|
51495
|
+
)
|
|
51496
|
+
] });
|
|
51497
|
+
}
|
|
51498
|
+
const filtered = focusedOrbital ? subagents.filter((s) => s.orbitalName === focusedOrbital) : subagents;
|
|
51499
|
+
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 ?? ""}`;
|
|
51500
|
+
const wrapperStyle = { zIndex: 20 };
|
|
51501
|
+
const hasCoordinatorData = coordinatorMessages && coordinatorMessages.length > 0 || coordinatorActivities && coordinatorActivities.length > 0;
|
|
51502
|
+
if (filtered.length === 0 && !hasCoordinatorData) {
|
|
51503
|
+
return /* @__PURE__ */ jsxs(Box, { className: wrapperClass, style: wrapperStyle, children: [
|
|
51504
|
+
/* @__PURE__ */ jsxs(
|
|
51505
|
+
HStack,
|
|
51506
|
+
{
|
|
51507
|
+
gap: "sm",
|
|
51508
|
+
className: "items-center px-3 py-2 border-b border-[var(--color-border)]",
|
|
51509
|
+
children: [
|
|
51510
|
+
/* @__PURE__ */ jsx(Icon, { name: "activity", size: "sm" }),
|
|
51511
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold flex-1", children: t("subagentTrace.subagents") }),
|
|
51512
|
+
onClose && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" }) })
|
|
51513
|
+
]
|
|
51514
|
+
}
|
|
51515
|
+
),
|
|
51516
|
+
/* @__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") }) })
|
|
51517
|
+
] });
|
|
51518
|
+
}
|
|
51519
|
+
if (focusedOrbital) {
|
|
51520
|
+
return /* @__PURE__ */ jsxs(Box, { className: wrapperClass, style: wrapperStyle, children: [
|
|
51521
|
+
/* @__PURE__ */ jsxs(
|
|
51522
|
+
HStack,
|
|
51523
|
+
{
|
|
51524
|
+
gap: "sm",
|
|
51525
|
+
className: "items-center px-3 py-2 border-b border-[var(--color-border)]",
|
|
51526
|
+
children: [
|
|
51527
|
+
/* @__PURE__ */ jsx(Icon, { name: "activity", size: "sm" }),
|
|
51528
|
+
/* @__PURE__ */ jsxs(VStack, { gap: "none", className: "flex-1 min-w-0", children: [
|
|
51529
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold truncate", children: focusedOrbital }),
|
|
51530
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", children: [
|
|
51531
|
+
filtered.length === 1 ? t("subagentTrace.subagentCount", { count: filtered.length }) : t("subagentTrace.subagentCountPlural", { count: filtered.length }),
|
|
51532
|
+
" \xB7 ",
|
|
51533
|
+
densityLabel(isRichMode)
|
|
51534
|
+
] })
|
|
51535
|
+
] }),
|
|
51536
|
+
onClose && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" }) })
|
|
51537
|
+
]
|
|
51538
|
+
}
|
|
51539
|
+
),
|
|
51540
|
+
/* @__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)) })
|
|
51541
|
+
] });
|
|
51542
|
+
}
|
|
51543
|
+
const grouped = groupByOrbital(filtered);
|
|
51544
|
+
const coordinatorSnapshot = pluckCoordinatorState(coordinatorActivities ?? []);
|
|
51545
|
+
return /* @__PURE__ */ jsxs(Box, { className: wrapperClass, style: wrapperStyle, children: [
|
|
51546
|
+
/* @__PURE__ */ jsxs(
|
|
51547
|
+
HStack,
|
|
51548
|
+
{
|
|
51549
|
+
gap: "sm",
|
|
51550
|
+
className: "items-center px-3 py-2 border-b border-[var(--color-border)]",
|
|
51551
|
+
children: [
|
|
51552
|
+
/* @__PURE__ */ jsx(Icon, { name: "activity", size: "sm" }),
|
|
51553
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "font-semibold flex-1", children: [
|
|
51554
|
+
t("subagentTrace.subagentsWithCount", { count: filtered.length }),
|
|
51555
|
+
" \xB7 ",
|
|
51556
|
+
densityLabel(isRichMode)
|
|
51557
|
+
] }),
|
|
51558
|
+
onClose && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" }) })
|
|
51559
|
+
]
|
|
51560
|
+
}
|
|
51561
|
+
),
|
|
51562
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex-1 overflow-y-auto", children: [
|
|
51563
|
+
!focusedOrbital && isRichMode && /* @__PURE__ */ jsx(CoordinatorCard, { snapshot: coordinatorSnapshot }),
|
|
51564
|
+
coordinatorMessages && coordinatorMessages.length > 0 ? /* @__PURE__ */ jsxs(Box, { className: "border-b border-[var(--color-border)]", children: [
|
|
51565
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center px-3 py-1.5 bg-[var(--color-card)] border-b border-[var(--color-border)]", children: [
|
|
51566
|
+
/* @__PURE__ */ jsx(Box, { style: { width: 6, height: 6, borderRadius: "50%", backgroundColor: "var(--color-primary)", flexShrink: 0 } }),
|
|
51567
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold text-[11px]", children: t("subagentTrace.coordinator") }),
|
|
51568
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: t("subagentTrace.messagesCount", { count: coordinatorMessages.length }) })
|
|
51569
|
+
] }),
|
|
51570
|
+
/* @__PURE__ */ jsx(Box, { className: "max-h-[36rem] overflow-y-auto", children: /* @__PURE__ */ jsx(CoordinatorConversation, { messages: coordinatorMessages, autoScroll: true }) })
|
|
51571
|
+
] }) : coordinatorActivities && coordinatorActivities.length > 0 && (() => {
|
|
51572
|
+
const filteredCoordinator = coordinatorActivities;
|
|
51573
|
+
if (filteredCoordinator.length === 0) return null;
|
|
51574
|
+
return /* @__PURE__ */ jsxs(Box, { className: "border-b border-[var(--color-border)]", children: [
|
|
51575
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center px-3 py-1.5 bg-[var(--color-card)] border-b border-[var(--color-border)]", children: [
|
|
51576
|
+
/* @__PURE__ */ jsx(Box, { style: { width: 6, height: 6, borderRadius: "50%", backgroundColor: "var(--color-primary)", flexShrink: 0 } }),
|
|
51577
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold text-[11px]", children: t("subagentTrace.coordinator") }),
|
|
51578
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: t("subagentTrace.eventsCount", { count: filteredCoordinator.length }) })
|
|
51579
|
+
] }),
|
|
51580
|
+
/* @__PURE__ */ jsx(Box, { className: "max-h-60 overflow-y-auto", children: /* @__PURE__ */ jsx(
|
|
51581
|
+
InlineActivityStream,
|
|
51582
|
+
{
|
|
51583
|
+
activities: coordinatorToActivityItems(filteredCoordinator),
|
|
51584
|
+
autoScroll: true
|
|
51585
|
+
}
|
|
51586
|
+
) })
|
|
51587
|
+
] });
|
|
51588
|
+
})(),
|
|
51589
|
+
isRichMode ? filtered.map((sub) => /* @__PURE__ */ jsx(SubagentRichCard, { subagent: sub }, sub.id)) : Array.from(grouped.entries()).map(([orbitalName, subs]) => /* @__PURE__ */ jsx(
|
|
51590
|
+
OrbitalGroup,
|
|
51591
|
+
{
|
|
51592
|
+
orbitalName,
|
|
51593
|
+
subagents: subs
|
|
51594
|
+
},
|
|
51595
|
+
orbitalName
|
|
51596
|
+
))
|
|
51597
|
+
] })
|
|
51598
|
+
] });
|
|
51599
|
+
};
|
|
51600
|
+
SubagentTracePanel.displayName = "SubagentTracePanel";
|
|
51601
|
+
}
|
|
51602
|
+
});
|
|
50066
51603
|
var TabbedContainer;
|
|
50067
51604
|
var init_TabbedContainer = __esm({
|
|
50068
51605
|
"components/core/organisms/layout/TabbedContainer.tsx"() {
|
|
@@ -50177,6 +51714,48 @@ var init_TabbedContainer = __esm({
|
|
|
50177
51714
|
TabbedContainer.displayName = "TabbedContainer";
|
|
50178
51715
|
}
|
|
50179
51716
|
});
|
|
51717
|
+
function TanksBoard({
|
|
51718
|
+
tiles,
|
|
51719
|
+
units,
|
|
51720
|
+
features,
|
|
51721
|
+
assetManifest,
|
|
51722
|
+
assetBaseUrl,
|
|
51723
|
+
scale = 0.45,
|
|
51724
|
+
showMinimap = true,
|
|
51725
|
+
enableCamera = true,
|
|
51726
|
+
tileClickEvent,
|
|
51727
|
+
unitClickEvent,
|
|
51728
|
+
isLoading,
|
|
51729
|
+
error,
|
|
51730
|
+
className
|
|
51731
|
+
}) {
|
|
51732
|
+
return /* @__PURE__ */ jsx("div", { className: cn("tanks-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
51733
|
+
IsometricCanvas_default,
|
|
51734
|
+
{
|
|
51735
|
+
tileLayout: "flat",
|
|
51736
|
+
tiles,
|
|
51737
|
+
units,
|
|
51738
|
+
features,
|
|
51739
|
+
assetManifest,
|
|
51740
|
+
assetBaseUrl,
|
|
51741
|
+
scale,
|
|
51742
|
+
showMinimap,
|
|
51743
|
+
enableCamera,
|
|
51744
|
+
tileClickEvent,
|
|
51745
|
+
unitClickEvent,
|
|
51746
|
+
isLoading,
|
|
51747
|
+
error
|
|
51748
|
+
}
|
|
51749
|
+
) });
|
|
51750
|
+
}
|
|
51751
|
+
var init_TanksBoard = __esm({
|
|
51752
|
+
"components/game/organisms/TanksBoard.tsx"() {
|
|
51753
|
+
"use client";
|
|
51754
|
+
init_cn();
|
|
51755
|
+
init_IsometricCanvas();
|
|
51756
|
+
TanksBoard.displayName = "TanksBoard";
|
|
51757
|
+
}
|
|
51758
|
+
});
|
|
50180
51759
|
var TeamOrganism;
|
|
50181
51760
|
var init_TeamOrganism = __esm({
|
|
50182
51761
|
"components/marketing/organisms/TeamOrganism.tsx"() {
|
|
@@ -50280,7 +51859,7 @@ var init_Timeline = __esm({
|
|
|
50280
51859
|
}) => {
|
|
50281
51860
|
const { t } = useTranslate();
|
|
50282
51861
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
50283
|
-
const items =
|
|
51862
|
+
const items = React85__default.useMemo(() => {
|
|
50284
51863
|
if (propItems) return propItems;
|
|
50285
51864
|
if (entityData.length === 0) return [];
|
|
50286
51865
|
return entityData.map((record, idx) => {
|
|
@@ -50387,7 +51966,7 @@ var init_Timeline = __esm({
|
|
|
50387
51966
|
}
|
|
50388
51967
|
});
|
|
50389
51968
|
function extractToastProps(children) {
|
|
50390
|
-
if (!
|
|
51969
|
+
if (!React85__default.isValidElement(children)) {
|
|
50391
51970
|
if (typeof children === "string") {
|
|
50392
51971
|
return { message: children };
|
|
50393
51972
|
}
|
|
@@ -50425,7 +52004,7 @@ var init_ToastSlot = __esm({
|
|
|
50425
52004
|
eventBus.emit("UI:CLOSE");
|
|
50426
52005
|
};
|
|
50427
52006
|
if (!isVisible) return null;
|
|
50428
|
-
const isCustomContent =
|
|
52007
|
+
const isCustomContent = React85__default.isValidElement(children) && !message;
|
|
50429
52008
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
50430
52009
|
Toast,
|
|
50431
52010
|
{
|
|
@@ -52041,7 +53620,7 @@ var init_WorldMapTemplate = __esm({
|
|
|
52041
53620
|
}
|
|
52042
53621
|
});
|
|
52043
53622
|
function lazyThree(name, loader) {
|
|
52044
|
-
const Lazy =
|
|
53623
|
+
const Lazy = React85__default.lazy(
|
|
52045
53624
|
() => loader().then((m) => {
|
|
52046
53625
|
const Resolved = m[name];
|
|
52047
53626
|
if (!Resolved) {
|
|
@@ -52053,13 +53632,13 @@ function lazyThree(name, loader) {
|
|
|
52053
53632
|
})
|
|
52054
53633
|
);
|
|
52055
53634
|
function ThreeWrapper(props) {
|
|
52056
|
-
return
|
|
53635
|
+
return React85__default.createElement(
|
|
52057
53636
|
ThreeBoundary,
|
|
52058
53637
|
{ name },
|
|
52059
|
-
|
|
52060
|
-
|
|
53638
|
+
React85__default.createElement(
|
|
53639
|
+
React85__default.Suspense,
|
|
52061
53640
|
{ fallback: null },
|
|
52062
|
-
|
|
53641
|
+
React85__default.createElement(Lazy, props)
|
|
52063
53642
|
)
|
|
52064
53643
|
);
|
|
52065
53644
|
}
|
|
@@ -52089,6 +53668,7 @@ var init_component_registry_generated = __esm({
|
|
|
52089
53668
|
init_BattleTemplate();
|
|
52090
53669
|
init_BehaviorView();
|
|
52091
53670
|
init_BloomQuizBlock();
|
|
53671
|
+
init_BoardgameBoard();
|
|
52092
53672
|
init_BookChapterView();
|
|
52093
53673
|
init_BookCoverPage();
|
|
52094
53674
|
init_BookNavBar();
|
|
@@ -52115,6 +53695,7 @@ var init_component_registry_generated = __esm({
|
|
|
52115
53695
|
init_Center();
|
|
52116
53696
|
init_Chart();
|
|
52117
53697
|
init_ChartLegend();
|
|
53698
|
+
init_ChatBar();
|
|
52118
53699
|
init_Checkbox();
|
|
52119
53700
|
init_ChoiceButton();
|
|
52120
53701
|
init_CityBuilderBoard();
|
|
@@ -52172,6 +53753,7 @@ var init_component_registry_generated = __esm({
|
|
|
52172
53753
|
init_FileTree();
|
|
52173
53754
|
init_FilterGroup();
|
|
52174
53755
|
init_FilterPill();
|
|
53756
|
+
init_FishingBoard();
|
|
52175
53757
|
init_Flex();
|
|
52176
53758
|
init_FlipCard();
|
|
52177
53759
|
init_FlipContainer();
|
|
@@ -52201,6 +53783,7 @@ var init_component_registry_generated = __esm({
|
|
|
52201
53783
|
init_HeroOrganism();
|
|
52202
53784
|
init_HeroSection();
|
|
52203
53785
|
init_HexStrategyBoard();
|
|
53786
|
+
init_HolidayRunnerBoard();
|
|
52204
53787
|
init_Icon();
|
|
52205
53788
|
init_InfiniteScrollSentinel();
|
|
52206
53789
|
init_Input();
|
|
@@ -52223,11 +53806,13 @@ var init_component_registry_generated = __esm({
|
|
|
52223
53806
|
init_MarketingFooter();
|
|
52224
53807
|
init_MasterDetail();
|
|
52225
53808
|
init_MasterDetailLayout();
|
|
53809
|
+
init_MatchPuzzleBoard();
|
|
52226
53810
|
init_MatrixQuestion();
|
|
52227
53811
|
init_MediaGallery();
|
|
52228
53812
|
init_Menu();
|
|
52229
53813
|
init_Meter();
|
|
52230
53814
|
init_MiniMap();
|
|
53815
|
+
init_MinigolfBoard();
|
|
52231
53816
|
init_Modal();
|
|
52232
53817
|
init_ModalSlot();
|
|
52233
53818
|
init_ModuleCard();
|
|
@@ -52240,6 +53825,8 @@ var init_component_registry_generated = __esm({
|
|
|
52240
53825
|
init_PageHeader();
|
|
52241
53826
|
init_Pagination();
|
|
52242
53827
|
init_PatternTile();
|
|
53828
|
+
init_PinballBoard();
|
|
53829
|
+
init_PirateBoard();
|
|
52243
53830
|
init_PlatformerBoard();
|
|
52244
53831
|
init_PlatformerCanvas();
|
|
52245
53832
|
init_PlatformerTemplate();
|
|
@@ -52257,6 +53844,7 @@ var init_component_registry_generated = __esm({
|
|
|
52257
53844
|
init_QrScanner();
|
|
52258
53845
|
init_QuestTracker();
|
|
52259
53846
|
init_QuizBlock();
|
|
53847
|
+
init_RacingBoard();
|
|
52260
53848
|
init_Radio();
|
|
52261
53849
|
init_RangeSlider();
|
|
52262
53850
|
init_ReflectionBlock();
|
|
@@ -52290,12 +53878,16 @@ var init_component_registry_generated = __esm({
|
|
|
52290
53878
|
init_SimulatorBoard();
|
|
52291
53879
|
init_Skeleton();
|
|
52292
53880
|
init_SocialProof();
|
|
53881
|
+
init_SokobanBoard();
|
|
52293
53882
|
init_SortableList();
|
|
53883
|
+
init_SpaceShmupBoard();
|
|
53884
|
+
init_SpaceStationBoard();
|
|
52294
53885
|
init_Sparkline();
|
|
52295
53886
|
init_Spinner();
|
|
52296
53887
|
init_Split();
|
|
52297
53888
|
init_SplitPane();
|
|
52298
53889
|
init_SplitSection();
|
|
53890
|
+
init_SportsBoard();
|
|
52299
53891
|
init_Sprite();
|
|
52300
53892
|
init_StarRating();
|
|
52301
53893
|
init_StatBadge();
|
|
@@ -52310,6 +53902,7 @@ var init_component_registry_generated = __esm({
|
|
|
52310
53902
|
init_StatusEffect();
|
|
52311
53903
|
init_StepFlow();
|
|
52312
53904
|
init_StepFlowOrganism();
|
|
53905
|
+
init_SubagentTracePanel();
|
|
52313
53906
|
init_SvgBranch();
|
|
52314
53907
|
init_SvgConnection();
|
|
52315
53908
|
init_SvgFlow();
|
|
@@ -52329,6 +53922,7 @@ var init_component_registry_generated = __esm({
|
|
|
52329
53922
|
init_Tabs();
|
|
52330
53923
|
init_TagCloud();
|
|
52331
53924
|
init_TagInput();
|
|
53925
|
+
init_TanksBoard();
|
|
52332
53926
|
init_TeamCard();
|
|
52333
53927
|
init_TeamOrganism();
|
|
52334
53928
|
init_TextHighlight();
|
|
@@ -52367,7 +53961,7 @@ var init_component_registry_generated = __esm({
|
|
|
52367
53961
|
init_WorldMapBoard();
|
|
52368
53962
|
init_WorldMapTemplate();
|
|
52369
53963
|
init_XPBar();
|
|
52370
|
-
ThreeBoundary = class extends
|
|
53964
|
+
ThreeBoundary = class extends React85__default.Component {
|
|
52371
53965
|
constructor() {
|
|
52372
53966
|
super(...arguments);
|
|
52373
53967
|
__publicField(this, "state", { failed: false });
|
|
@@ -52377,7 +53971,7 @@ var init_component_registry_generated = __esm({
|
|
|
52377
53971
|
}
|
|
52378
53972
|
render() {
|
|
52379
53973
|
if (this.state.failed) {
|
|
52380
|
-
return
|
|
53974
|
+
return React85__default.createElement(
|
|
52381
53975
|
"div",
|
|
52382
53976
|
{
|
|
52383
53977
|
"data-testid": "three-unavailable",
|
|
@@ -52416,6 +54010,7 @@ var init_component_registry_generated = __esm({
|
|
|
52416
54010
|
"BattleTemplate": BattleTemplate,
|
|
52417
54011
|
"BehaviorView": BehaviorView,
|
|
52418
54012
|
"BloomQuizBlock": BloomQuizBlock,
|
|
54013
|
+
"BoardgameBoard": BoardgameBoard,
|
|
52419
54014
|
"BookChapterView": BookChapterView,
|
|
52420
54015
|
"BookCoverPage": BookCoverPage,
|
|
52421
54016
|
"BookNavBar": BookNavBar,
|
|
@@ -52445,6 +54040,7 @@ var init_component_registry_generated = __esm({
|
|
|
52445
54040
|
"Center": Center,
|
|
52446
54041
|
"Chart": Chart,
|
|
52447
54042
|
"ChartLegend": ChartLegend,
|
|
54043
|
+
"ChatBar": ChatBar,
|
|
52448
54044
|
"Checkbox": Checkbox,
|
|
52449
54045
|
"ChoiceButton": ChoiceButton,
|
|
52450
54046
|
"CityBuilderBoard": CityBuilderBoard,
|
|
@@ -52505,6 +54101,7 @@ var init_component_registry_generated = __esm({
|
|
|
52505
54101
|
"FileTree": FileTree,
|
|
52506
54102
|
"FilterGroup": FilterGroup,
|
|
52507
54103
|
"FilterPill": FilterPill,
|
|
54104
|
+
"FishingBoard": FishingBoard,
|
|
52508
54105
|
"Flex": Flex,
|
|
52509
54106
|
"FlipCard": FlipCard,
|
|
52510
54107
|
"FlipContainer": FlipContainer,
|
|
@@ -52538,6 +54135,7 @@ var init_component_registry_generated = __esm({
|
|
|
52538
54135
|
"HeroOrganism": HeroOrganism,
|
|
52539
54136
|
"HeroSection": HeroSection,
|
|
52540
54137
|
"HexStrategyBoard": HexStrategyBoard,
|
|
54138
|
+
"HolidayRunnerBoard": HolidayRunnerBoard,
|
|
52541
54139
|
"Icon": Icon,
|
|
52542
54140
|
"InfiniteScrollSentinel": InfiniteScrollSentinel,
|
|
52543
54141
|
"Input": Input,
|
|
@@ -52562,11 +54160,13 @@ var init_component_registry_generated = __esm({
|
|
|
52562
54160
|
"MarketingFooter": MarketingFooter,
|
|
52563
54161
|
"MasterDetail": MasterDetail,
|
|
52564
54162
|
"MasterDetailLayout": MasterDetailLayout,
|
|
54163
|
+
"MatchPuzzleBoard": MatchPuzzleBoard,
|
|
52565
54164
|
"MatrixQuestion": MatrixQuestion,
|
|
52566
54165
|
"MediaGallery": MediaGallery,
|
|
52567
54166
|
"Menu": Menu,
|
|
52568
54167
|
"Meter": Meter,
|
|
52569
54168
|
"MiniMap": MiniMap,
|
|
54169
|
+
"MinigolfBoard": MinigolfBoard,
|
|
52570
54170
|
"Modal": Modal,
|
|
52571
54171
|
"ModalSlot": ModalSlot,
|
|
52572
54172
|
"ModuleCard": ModuleCard,
|
|
@@ -52579,6 +54179,8 @@ var init_component_registry_generated = __esm({
|
|
|
52579
54179
|
"PageHeader": PageHeader,
|
|
52580
54180
|
"Pagination": Pagination,
|
|
52581
54181
|
"PatternTile": PatternTile,
|
|
54182
|
+
"PinballBoard": PinballBoard,
|
|
54183
|
+
"PirateBoard": PirateBoard,
|
|
52582
54184
|
"PlatformerBoard": PlatformerBoard,
|
|
52583
54185
|
"PlatformerCanvas": PlatformerCanvas,
|
|
52584
54186
|
"PlatformerTemplate": PlatformerTemplate,
|
|
@@ -52596,6 +54198,7 @@ var init_component_registry_generated = __esm({
|
|
|
52596
54198
|
"QrScanner": QrScanner,
|
|
52597
54199
|
"QuestTracker": QuestTracker,
|
|
52598
54200
|
"QuizBlock": QuizBlock,
|
|
54201
|
+
"RacingBoard": RacingBoard,
|
|
52599
54202
|
"Radio": Radio,
|
|
52600
54203
|
"RangeSlider": RangeSlider,
|
|
52601
54204
|
"ReflectionBlock": ReflectionBlock,
|
|
@@ -52629,7 +54232,10 @@ var init_component_registry_generated = __esm({
|
|
|
52629
54232
|
"SimulatorBoard": SimulatorBoard,
|
|
52630
54233
|
"Skeleton": Skeleton,
|
|
52631
54234
|
"SocialProof": SocialProof,
|
|
54235
|
+
"SokobanBoard": SokobanBoard,
|
|
52632
54236
|
"SortableList": SortableList,
|
|
54237
|
+
"SpaceShmupBoard": SpaceShmupBoard,
|
|
54238
|
+
"SpaceStationBoard": SpaceStationBoard,
|
|
52633
54239
|
"Spacer": SpacerPattern,
|
|
52634
54240
|
"SpacerPattern": SpacerPattern,
|
|
52635
54241
|
"Sparkline": Sparkline,
|
|
@@ -52637,6 +54243,7 @@ var init_component_registry_generated = __esm({
|
|
|
52637
54243
|
"Split": Split,
|
|
52638
54244
|
"SplitPane": SplitPane,
|
|
52639
54245
|
"SplitSection": SplitSection,
|
|
54246
|
+
"SportsBoard": SportsBoard,
|
|
52640
54247
|
"Sprite": Sprite,
|
|
52641
54248
|
"Stack": Stack,
|
|
52642
54249
|
"StarRating": StarRating,
|
|
@@ -52652,6 +54259,7 @@ var init_component_registry_generated = __esm({
|
|
|
52652
54259
|
"StatusEffect": StatusEffect,
|
|
52653
54260
|
"StepFlow": StepFlow,
|
|
52654
54261
|
"StepFlowOrganism": StepFlowOrganism,
|
|
54262
|
+
"SubagentTracePanel": SubagentTracePanel,
|
|
52655
54263
|
"SvgBranch": SvgBranch,
|
|
52656
54264
|
"SvgConnection": SvgConnection,
|
|
52657
54265
|
"SvgFlow": SvgFlow,
|
|
@@ -52671,6 +54279,7 @@ var init_component_registry_generated = __esm({
|
|
|
52671
54279
|
"Tabs": Tabs,
|
|
52672
54280
|
"TagCloud": TagCloud,
|
|
52673
54281
|
"TagInput": TagInput,
|
|
54282
|
+
"TanksBoard": TanksBoard,
|
|
52674
54283
|
"TeamCard": TeamCard,
|
|
52675
54284
|
"TeamOrganism": TeamOrganism,
|
|
52676
54285
|
"TextHighlight": TextHighlight,
|
|
@@ -52728,7 +54337,7 @@ function SuspenseConfigProvider({
|
|
|
52728
54337
|
config,
|
|
52729
54338
|
children
|
|
52730
54339
|
}) {
|
|
52731
|
-
return
|
|
54340
|
+
return React85__default.createElement(
|
|
52732
54341
|
SuspenseConfigContext.Provider,
|
|
52733
54342
|
{ value: config },
|
|
52734
54343
|
children
|
|
@@ -53218,7 +54827,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
53218
54827
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
53219
54828
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
53220
54829
|
}
|
|
53221
|
-
return /* @__PURE__ */ jsx(
|
|
54830
|
+
return /* @__PURE__ */ jsx(React85__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
53222
54831
|
}
|
|
53223
54832
|
if (!child || typeof child !== "object") return null;
|
|
53224
54833
|
const childId = `${parentId}-${index}`;
|
|
@@ -53258,14 +54867,14 @@ function isPatternConfig(value) {
|
|
|
53258
54867
|
if (value === null || value === void 0) return false;
|
|
53259
54868
|
if (typeof value !== "object") return false;
|
|
53260
54869
|
if (Array.isArray(value)) return false;
|
|
53261
|
-
if (
|
|
54870
|
+
if (React85__default.isValidElement(value)) return false;
|
|
53262
54871
|
if (value instanceof Date) return false;
|
|
53263
54872
|
if (typeof value === "function") return false;
|
|
53264
54873
|
const record = value;
|
|
53265
54874
|
return "type" in record && typeof record.type === "string" && getComponentForPattern(record.type) !== null;
|
|
53266
54875
|
}
|
|
53267
54876
|
function isPlainConfigObject(value) {
|
|
53268
|
-
if (
|
|
54877
|
+
if (React85__default.isValidElement(value)) return false;
|
|
53269
54878
|
if (value instanceof Date) return false;
|
|
53270
54879
|
const proto = Object.getPrototypeOf(value);
|
|
53271
54880
|
return proto === Object.prototype || proto === null;
|
|
@@ -53391,7 +55000,7 @@ function SlotContentRenderer({
|
|
|
53391
55000
|
for (const slotKey of CONTENT_NODE_SLOTS) {
|
|
53392
55001
|
const slotVal = restProps[slotKey];
|
|
53393
55002
|
if (slotVal === void 0 || slotVal === null) continue;
|
|
53394
|
-
if (
|
|
55003
|
+
if (React85__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
|
|
53395
55004
|
if (Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
|
|
53396
55005
|
nodeSlotOverrides[slotKey] = renderPatternChildren(
|
|
53397
55006
|
slotVal,
|
|
@@ -53729,7 +55338,7 @@ function resolveLambdaBindings(body, params, item, index) {
|
|
|
53729
55338
|
if (Array.isArray(body)) {
|
|
53730
55339
|
return body.map((b) => recur(b));
|
|
53731
55340
|
}
|
|
53732
|
-
if (body !== null && typeof body === "object" && !
|
|
55341
|
+
if (body !== null && typeof body === "object" && !React85__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
53733
55342
|
const out = {};
|
|
53734
55343
|
for (const [k, v] of Object.entries(body)) {
|
|
53735
55344
|
out[k] = recur(v);
|
|
@@ -53748,7 +55357,7 @@ function getSlotContentRenderer4() {
|
|
|
53748
55357
|
function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
53749
55358
|
return (item, index) => {
|
|
53750
55359
|
const resolvedBody = resolveLambdaBindings(lambdaBody, params, item, index);
|
|
53751
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
55360
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React85__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
53752
55361
|
return null;
|
|
53753
55362
|
}
|
|
53754
55363
|
const record = resolvedBody;
|
|
@@ -53767,7 +55376,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
53767
55376
|
props: childProps,
|
|
53768
55377
|
priority: 0
|
|
53769
55378
|
};
|
|
53770
|
-
return
|
|
55379
|
+
return React85__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
53771
55380
|
};
|
|
53772
55381
|
}
|
|
53773
55382
|
function convertNode(node, callerKey) {
|
|
@@ -53786,7 +55395,7 @@ function convertNode(node, callerKey) {
|
|
|
53786
55395
|
});
|
|
53787
55396
|
return anyChanged ? mapped : node;
|
|
53788
55397
|
}
|
|
53789
|
-
if (typeof node === "object" && !
|
|
55398
|
+
if (typeof node === "object" && !React85__default.isValidElement(node) && !(node instanceof Date)) {
|
|
53790
55399
|
return convertObjectProps(node);
|
|
53791
55400
|
}
|
|
53792
55401
|
return node;
|