@almadar/ui 5.65.0 → 5.68.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avl/index.cjs +3259 -1568
- package/dist/avl/index.d.cts +10 -2
- package/dist/avl/index.d.ts +1 -0
- package/dist/avl/index.js +1992 -302
- package/dist/components/avl/derive-edit-focus.d.ts +8 -0
- package/dist/components/core/organisms/ChatBar.d.ts +31 -0
- package/dist/components/core/organisms/SubagentTracePanel.d.ts +50 -0
- package/dist/components/core/organisms/index.d.ts +3 -0
- package/dist/components/core/organisms/trace-edit-focus.d.ts +14 -0
- package/dist/components/game/atoms/ChoiceButton.d.ts +7 -1
- package/dist/components/game/molecules/HealthPanel.d.ts +3 -0
- package/dist/components/game/molecules/IsometricCanvas.d.ts +1 -1
- package/dist/components/game/molecules/PowerupSlots.d.ts +3 -0
- package/dist/components/game/molecules/TurnPanel.d.ts +3 -0
- package/dist/components/game/molecules/three/index.cjs +6 -6
- package/dist/components/game/molecules/three/index.js +6 -6
- package/dist/components/game/organisms/BoardgameBoard.d.ts +37 -0
- package/dist/components/game/organisms/FishingBoard.d.ts +33 -0
- package/dist/components/game/organisms/HolidayRunnerBoard.d.ts +35 -0
- package/dist/components/game/organisms/MatchPuzzleBoard.d.ts +37 -0
- package/dist/components/game/organisms/MinigolfBoard.d.ts +37 -0
- package/dist/components/game/organisms/PinballBoard.d.ts +35 -0
- package/dist/components/game/organisms/PirateBoard.d.ts +37 -0
- package/dist/components/game/organisms/RacingBoard.d.ts +29 -0
- package/dist/components/game/organisms/SokobanBoard.d.ts +37 -0
- package/dist/components/game/organisms/SpaceShmupBoard.d.ts +20 -0
- package/dist/components/game/organisms/SpaceStationBoard.d.ts +37 -0
- package/dist/components/game/organisms/SportsBoard.d.ts +37 -0
- package/dist/components/game/organisms/TanksBoard.d.ts +37 -0
- package/dist/components/game/organisms/index.d.ts +13 -0
- package/dist/components/game/organisms/utils/isometric.d.ts +10 -1
- package/dist/components/index.cjs +3096 -1377
- package/dist/components/index.js +1970 -266
- package/dist/hooks/index.cjs +94 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +95 -2
- package/dist/hooks/useAgentTrace.d.ts +85 -0
- package/dist/providers/index.cjs +3037 -1351
- package/dist/providers/index.js +1937 -251
- package/dist/runtime/index.cjs +3095 -1409
- package/dist/runtime/index.js +1943 -257
- package/package.json +2 -2
package/dist/avl/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
2
|
+
import * as React94 from 'react';
|
|
3
|
+
import React94__default, { createContext, useState, useMemo, useRef, useEffect, useContext, useCallback, Suspense, useLayoutEffect, Profiler, useReducer, useSyncExternalStore, lazy, useId, forwardRef, useImperativeHandle, Component } from 'react';
|
|
4
4
|
import { OrbitalProvider, EventBusContext, useTraitScope, VerificationProvider, TraitScopeProvider } from '@almadar/ui/providers';
|
|
5
5
|
import { createLogger, isLogLevelEnabled } from '@almadar/logger';
|
|
6
6
|
import ELK from 'elkjs/lib/elk.bundled.js';
|
|
@@ -46,7 +46,7 @@ import { GLTFLoader as GLTFLoader$1 } from 'three/examples/jsm/loaders/GLTFLoade
|
|
|
46
46
|
import { clone } from 'three/examples/jsm/utils/SkeletonUtils';
|
|
47
47
|
import { Canvas, useLoader, useFrame, useThree } from '@react-three/fiber';
|
|
48
48
|
import { Billboard, Grid as Grid$1, OrbitControls } from '@react-three/drei';
|
|
49
|
-
import { getPatternDefinition, getComponentForPattern
|
|
49
|
+
import { getPatternDefinition, getComponentForPattern, isEntityAwarePattern } from '@almadar/patterns';
|
|
50
50
|
import { OrbitalServerRuntime } from '@almadar/runtime/OrbitalServerRuntime';
|
|
51
51
|
import { InMemoryPersistence, StateMachineManager, collectDeclaredConfigDefaults, createServerEffectHandlers, EffectExecutor, createContextFromBindings } from '@almadar/runtime';
|
|
52
52
|
|
|
@@ -3519,7 +3519,7 @@ var init_Box = __esm({
|
|
|
3519
3519
|
fixed: "fixed",
|
|
3520
3520
|
sticky: "sticky"
|
|
3521
3521
|
};
|
|
3522
|
-
Box =
|
|
3522
|
+
Box = React94__default.forwardRef(
|
|
3523
3523
|
({
|
|
3524
3524
|
padding,
|
|
3525
3525
|
paddingX,
|
|
@@ -3584,7 +3584,7 @@ var init_Box = __esm({
|
|
|
3584
3584
|
onPointerDown?.(e);
|
|
3585
3585
|
}, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
|
|
3586
3586
|
const isClickable = action || onClick;
|
|
3587
|
-
return
|
|
3587
|
+
return React94__default.createElement(
|
|
3588
3588
|
Component2,
|
|
3589
3589
|
{
|
|
3590
3590
|
ref,
|
|
@@ -4175,7 +4175,7 @@ var init_MiniStateMachine = __esm({
|
|
|
4175
4175
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
4176
4176
|
const tc = transitionCounts[s.name] ?? 0;
|
|
4177
4177
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
4178
|
-
return /* @__PURE__ */ jsxs(
|
|
4178
|
+
return /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
|
|
4179
4179
|
/* @__PURE__ */ jsx(
|
|
4180
4180
|
AvlState,
|
|
4181
4181
|
{
|
|
@@ -4550,7 +4550,7 @@ function loadLib(key, importer) {
|
|
|
4550
4550
|
return p2;
|
|
4551
4551
|
}
|
|
4552
4552
|
function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
|
|
4553
|
-
const Lazy =
|
|
4553
|
+
const Lazy = React94__default.lazy(async () => {
|
|
4554
4554
|
const lib = await loadLib(libKey, importer);
|
|
4555
4555
|
const Comp = pick(lib);
|
|
4556
4556
|
if (!Comp) {
|
|
@@ -4560,7 +4560,7 @@ function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
|
|
|
4560
4560
|
return { default: Comp };
|
|
4561
4561
|
});
|
|
4562
4562
|
const Wrapped = (props) => /* @__PURE__ */ jsx(
|
|
4563
|
-
|
|
4563
|
+
React94__default.Suspense,
|
|
4564
4564
|
{
|
|
4565
4565
|
fallback: /* @__PURE__ */ jsx(
|
|
4566
4566
|
"span",
|
|
@@ -5286,7 +5286,7 @@ var init_Icon = __esm({
|
|
|
5286
5286
|
const directIcon = typeof icon === "string" ? void 0 : icon;
|
|
5287
5287
|
const effectiveName = typeof icon === "string" ? icon : name;
|
|
5288
5288
|
const family = useIconFamily();
|
|
5289
|
-
const RenderedComponent =
|
|
5289
|
+
const RenderedComponent = React94__default.useMemo(() => {
|
|
5290
5290
|
if (directIcon) return null;
|
|
5291
5291
|
return effectiveName ? resolveIconForFamily(effectiveName, family) : null;
|
|
5292
5292
|
}, [directIcon, effectiveName, family]);
|
|
@@ -5345,7 +5345,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
5345
5345
|
const IconComp = value;
|
|
5346
5346
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
5347
5347
|
}
|
|
5348
|
-
if (
|
|
5348
|
+
if (React94__default.isValidElement(value)) {
|
|
5349
5349
|
return value;
|
|
5350
5350
|
}
|
|
5351
5351
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -5421,7 +5421,7 @@ var init_Button = __esm({
|
|
|
5421
5421
|
md: "h-icon-default w-icon-default",
|
|
5422
5422
|
lg: "h-icon-default w-icon-default"
|
|
5423
5423
|
};
|
|
5424
|
-
Button =
|
|
5424
|
+
Button = React94__default.forwardRef(
|
|
5425
5425
|
({
|
|
5426
5426
|
className,
|
|
5427
5427
|
variant = "primary",
|
|
@@ -5486,7 +5486,7 @@ var Dialog;
|
|
|
5486
5486
|
var init_Dialog = __esm({
|
|
5487
5487
|
"components/core/atoms/Dialog.tsx"() {
|
|
5488
5488
|
init_cn();
|
|
5489
|
-
Dialog =
|
|
5489
|
+
Dialog = React94__default.forwardRef(
|
|
5490
5490
|
({
|
|
5491
5491
|
role = "dialog",
|
|
5492
5492
|
"aria-modal": ariaModal = true,
|
|
@@ -5981,7 +5981,7 @@ var init_Badge = __esm({
|
|
|
5981
5981
|
md: "px-2.5 py-1 text-sm",
|
|
5982
5982
|
lg: "px-3 py-1.5 text-base"
|
|
5983
5983
|
};
|
|
5984
|
-
Badge =
|
|
5984
|
+
Badge = React94__default.forwardRef(
|
|
5985
5985
|
({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
|
|
5986
5986
|
const iconSizes3 = {
|
|
5987
5987
|
sm: "h-icon-default w-icon-default",
|
|
@@ -6317,7 +6317,7 @@ var init_SvgFlow = __esm({
|
|
|
6317
6317
|
width = 100,
|
|
6318
6318
|
height = 100
|
|
6319
6319
|
}) => {
|
|
6320
|
-
const markerId =
|
|
6320
|
+
const markerId = React94__default.useMemo(() => {
|
|
6321
6321
|
flowIdCounter += 1;
|
|
6322
6322
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
6323
6323
|
}, []);
|
|
@@ -6910,7 +6910,7 @@ var init_SvgRing = __esm({
|
|
|
6910
6910
|
width = 100,
|
|
6911
6911
|
height = 100
|
|
6912
6912
|
}) => {
|
|
6913
|
-
const gradientId =
|
|
6913
|
+
const gradientId = React94__default.useMemo(() => {
|
|
6914
6914
|
ringIdCounter += 1;
|
|
6915
6915
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
6916
6916
|
}, []);
|
|
@@ -7091,7 +7091,7 @@ var init_Input = __esm({
|
|
|
7091
7091
|
init_cn();
|
|
7092
7092
|
init_Icon();
|
|
7093
7093
|
init_useEventBus();
|
|
7094
|
-
Input =
|
|
7094
|
+
Input = React94__default.forwardRef(
|
|
7095
7095
|
({
|
|
7096
7096
|
className,
|
|
7097
7097
|
inputType,
|
|
@@ -7251,7 +7251,7 @@ var Label;
|
|
|
7251
7251
|
var init_Label = __esm({
|
|
7252
7252
|
"components/core/atoms/Label.tsx"() {
|
|
7253
7253
|
init_cn();
|
|
7254
|
-
Label =
|
|
7254
|
+
Label = React94__default.forwardRef(
|
|
7255
7255
|
({ className, required, children, ...props }, ref) => {
|
|
7256
7256
|
return /* @__PURE__ */ jsxs(
|
|
7257
7257
|
"label",
|
|
@@ -7278,7 +7278,7 @@ var init_Textarea = __esm({
|
|
|
7278
7278
|
"components/core/atoms/Textarea.tsx"() {
|
|
7279
7279
|
init_cn();
|
|
7280
7280
|
init_useEventBus();
|
|
7281
|
-
Textarea =
|
|
7281
|
+
Textarea = React94__default.forwardRef(
|
|
7282
7282
|
({ className, error, onChange, ...props }, ref) => {
|
|
7283
7283
|
const eventBus = useEventBus();
|
|
7284
7284
|
const handleChange = (e) => {
|
|
@@ -7517,7 +7517,7 @@ var init_Select = __esm({
|
|
|
7517
7517
|
init_cn();
|
|
7518
7518
|
init_Icon();
|
|
7519
7519
|
init_useEventBus();
|
|
7520
|
-
Select =
|
|
7520
|
+
Select = React94__default.forwardRef(
|
|
7521
7521
|
(props, _ref) => {
|
|
7522
7522
|
const { multiple, searchable, clearable } = props;
|
|
7523
7523
|
if (multiple || searchable || clearable) {
|
|
@@ -7534,7 +7534,7 @@ var init_Checkbox = __esm({
|
|
|
7534
7534
|
"components/core/atoms/Checkbox.tsx"() {
|
|
7535
7535
|
init_cn();
|
|
7536
7536
|
init_useEventBus();
|
|
7537
|
-
Checkbox =
|
|
7537
|
+
Checkbox = React94__default.forwardRef(
|
|
7538
7538
|
({ className, label, id, onChange, ...props }, ref) => {
|
|
7539
7539
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
7540
7540
|
const eventBus = useEventBus();
|
|
@@ -7588,7 +7588,7 @@ var init_Spinner = __esm({
|
|
|
7588
7588
|
md: "h-6 w-6",
|
|
7589
7589
|
lg: "h-8 w-8"
|
|
7590
7590
|
};
|
|
7591
|
-
Spinner =
|
|
7591
|
+
Spinner = React94__default.forwardRef(
|
|
7592
7592
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
7593
7593
|
if (overlay) {
|
|
7594
7594
|
return /* @__PURE__ */ jsx(
|
|
@@ -7678,7 +7678,7 @@ var init_Card = __esm({
|
|
|
7678
7678
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
7679
7679
|
"tile-image-first": "p-0 overflow-hidden"
|
|
7680
7680
|
};
|
|
7681
|
-
Card =
|
|
7681
|
+
Card = React94__default.forwardRef(
|
|
7682
7682
|
({
|
|
7683
7683
|
className,
|
|
7684
7684
|
variant = "bordered",
|
|
@@ -7726,9 +7726,9 @@ var init_Card = __esm({
|
|
|
7726
7726
|
}
|
|
7727
7727
|
);
|
|
7728
7728
|
Card.displayName = "Card";
|
|
7729
|
-
CardHeader =
|
|
7729
|
+
CardHeader = React94__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
7730
7730
|
CardHeader.displayName = "CardHeader";
|
|
7731
|
-
CardTitle =
|
|
7731
|
+
CardTitle = React94__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7732
7732
|
"h3",
|
|
7733
7733
|
{
|
|
7734
7734
|
ref,
|
|
@@ -7741,11 +7741,11 @@ var init_Card = __esm({
|
|
|
7741
7741
|
}
|
|
7742
7742
|
));
|
|
7743
7743
|
CardTitle.displayName = "CardTitle";
|
|
7744
|
-
CardContent =
|
|
7744
|
+
CardContent = React94__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
7745
7745
|
CardContent.displayName = "CardContent";
|
|
7746
7746
|
CardBody = CardContent;
|
|
7747
7747
|
CardBody.displayName = "CardBody";
|
|
7748
|
-
CardFooter =
|
|
7748
|
+
CardFooter = React94__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7749
7749
|
"div",
|
|
7750
7750
|
{
|
|
7751
7751
|
ref,
|
|
@@ -7800,7 +7800,7 @@ var init_FilterPill = __esm({
|
|
|
7800
7800
|
md: "w-3.5 h-3.5",
|
|
7801
7801
|
lg: "w-4 h-4"
|
|
7802
7802
|
};
|
|
7803
|
-
FilterPill =
|
|
7803
|
+
FilterPill = React94__default.forwardRef(
|
|
7804
7804
|
({
|
|
7805
7805
|
className,
|
|
7806
7806
|
variant = "default",
|
|
@@ -7929,8 +7929,8 @@ var init_Avatar = __esm({
|
|
|
7929
7929
|
actionPayload
|
|
7930
7930
|
}) => {
|
|
7931
7931
|
const eventBus = useEventBus();
|
|
7932
|
-
const [imgFailed, setImgFailed] =
|
|
7933
|
-
|
|
7932
|
+
const [imgFailed, setImgFailed] = React94__default.useState(false);
|
|
7933
|
+
React94__default.useEffect(() => {
|
|
7934
7934
|
setImgFailed(false);
|
|
7935
7935
|
}, [src]);
|
|
7936
7936
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -8315,7 +8315,7 @@ var init_Radio = __esm({
|
|
|
8315
8315
|
md: "w-2.5 h-2.5",
|
|
8316
8316
|
lg: "w-3 h-3"
|
|
8317
8317
|
};
|
|
8318
|
-
Radio =
|
|
8318
|
+
Radio = React94__default.forwardRef(
|
|
8319
8319
|
({
|
|
8320
8320
|
label,
|
|
8321
8321
|
helperText,
|
|
@@ -8332,12 +8332,12 @@ var init_Radio = __esm({
|
|
|
8332
8332
|
onChange,
|
|
8333
8333
|
...props
|
|
8334
8334
|
}, ref) => {
|
|
8335
|
-
const reactId =
|
|
8335
|
+
const reactId = React94__default.useId();
|
|
8336
8336
|
const baseId = id || `radio-${reactId}`;
|
|
8337
8337
|
const hasError = !!error;
|
|
8338
8338
|
const eventBus = useEventBus();
|
|
8339
|
-
const [selected, setSelected] =
|
|
8340
|
-
|
|
8339
|
+
const [selected, setSelected] = React94__default.useState(value);
|
|
8340
|
+
React94__default.useEffect(() => {
|
|
8341
8341
|
if (value !== void 0) setSelected(value);
|
|
8342
8342
|
}, [value]);
|
|
8343
8343
|
const pick = (next, e) => {
|
|
@@ -8519,7 +8519,7 @@ var init_Switch = __esm({
|
|
|
8519
8519
|
"components/core/atoms/Switch.tsx"() {
|
|
8520
8520
|
"use client";
|
|
8521
8521
|
init_cn();
|
|
8522
|
-
Switch =
|
|
8522
|
+
Switch = React94.forwardRef(
|
|
8523
8523
|
({
|
|
8524
8524
|
checked,
|
|
8525
8525
|
defaultChecked = false,
|
|
@@ -8530,10 +8530,10 @@ var init_Switch = __esm({
|
|
|
8530
8530
|
name,
|
|
8531
8531
|
className
|
|
8532
8532
|
}, ref) => {
|
|
8533
|
-
const [isChecked, setIsChecked] =
|
|
8533
|
+
const [isChecked, setIsChecked] = React94.useState(
|
|
8534
8534
|
checked !== void 0 ? checked : defaultChecked
|
|
8535
8535
|
);
|
|
8536
|
-
|
|
8536
|
+
React94.useEffect(() => {
|
|
8537
8537
|
if (checked !== void 0) {
|
|
8538
8538
|
setIsChecked(checked);
|
|
8539
8539
|
}
|
|
@@ -8807,7 +8807,7 @@ var Aside;
|
|
|
8807
8807
|
var init_Aside = __esm({
|
|
8808
8808
|
"components/core/atoms/Aside.tsx"() {
|
|
8809
8809
|
init_cn();
|
|
8810
|
-
Aside =
|
|
8810
|
+
Aside = React94__default.forwardRef(
|
|
8811
8811
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
8812
8812
|
);
|
|
8813
8813
|
Aside.displayName = "Aside";
|
|
@@ -8886,9 +8886,9 @@ var init_LawReferenceTooltip = __esm({
|
|
|
8886
8886
|
className
|
|
8887
8887
|
}) => {
|
|
8888
8888
|
const { t } = useTranslate();
|
|
8889
|
-
const [isVisible, setIsVisible] =
|
|
8890
|
-
const timeoutRef =
|
|
8891
|
-
const triggerRef =
|
|
8889
|
+
const [isVisible, setIsVisible] = React94__default.useState(false);
|
|
8890
|
+
const timeoutRef = React94__default.useRef(null);
|
|
8891
|
+
const triggerRef = React94__default.useRef(null);
|
|
8892
8892
|
const handleMouseEnter = () => {
|
|
8893
8893
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
8894
8894
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -8899,7 +8899,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
8899
8899
|
};
|
|
8900
8900
|
const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
|
|
8901
8901
|
const open = isVisible || revealed;
|
|
8902
|
-
|
|
8902
|
+
React94__default.useEffect(() => {
|
|
8903
8903
|
return () => {
|
|
8904
8904
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
8905
8905
|
};
|
|
@@ -9111,7 +9111,7 @@ var init_StatusDot = __esm({
|
|
|
9111
9111
|
md: "w-2.5 h-2.5",
|
|
9112
9112
|
lg: "w-3 h-3"
|
|
9113
9113
|
};
|
|
9114
|
-
StatusDot =
|
|
9114
|
+
StatusDot = React94__default.forwardRef(
|
|
9115
9115
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
9116
9116
|
return /* @__PURE__ */ jsx(
|
|
9117
9117
|
"span",
|
|
@@ -9165,7 +9165,7 @@ var init_TrendIndicator = __esm({
|
|
|
9165
9165
|
down: "trending-down",
|
|
9166
9166
|
flat: "arrow-right"
|
|
9167
9167
|
};
|
|
9168
|
-
TrendIndicator =
|
|
9168
|
+
TrendIndicator = React94__default.forwardRef(
|
|
9169
9169
|
({
|
|
9170
9170
|
className,
|
|
9171
9171
|
value,
|
|
@@ -9232,7 +9232,7 @@ var init_RangeSlider = __esm({
|
|
|
9232
9232
|
md: "w-4 h-4",
|
|
9233
9233
|
lg: "w-5 h-5"
|
|
9234
9234
|
};
|
|
9235
|
-
RangeSlider =
|
|
9235
|
+
RangeSlider = React94__default.forwardRef(
|
|
9236
9236
|
({
|
|
9237
9237
|
className,
|
|
9238
9238
|
min = 0,
|
|
@@ -9740,7 +9740,7 @@ var init_ContentSection = __esm({
|
|
|
9740
9740
|
md: "py-16",
|
|
9741
9741
|
lg: "py-24"
|
|
9742
9742
|
};
|
|
9743
|
-
ContentSection =
|
|
9743
|
+
ContentSection = React94__default.forwardRef(
|
|
9744
9744
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
9745
9745
|
return /* @__PURE__ */ jsx(
|
|
9746
9746
|
Box,
|
|
@@ -10274,7 +10274,7 @@ var init_AnimatedReveal = __esm({
|
|
|
10274
10274
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
10275
10275
|
"none": {}
|
|
10276
10276
|
};
|
|
10277
|
-
AnimatedReveal =
|
|
10277
|
+
AnimatedReveal = React94__default.forwardRef(
|
|
10278
10278
|
({
|
|
10279
10279
|
trigger = "scroll",
|
|
10280
10280
|
animation = "fade-up",
|
|
@@ -10434,7 +10434,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
10434
10434
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
10435
10435
|
"use client";
|
|
10436
10436
|
init_cn();
|
|
10437
|
-
AnimatedGraphic =
|
|
10437
|
+
AnimatedGraphic = React94__default.forwardRef(
|
|
10438
10438
|
({
|
|
10439
10439
|
src,
|
|
10440
10440
|
svgContent,
|
|
@@ -10457,7 +10457,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
10457
10457
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
10458
10458
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
10459
10459
|
const prevAnimateRef = useRef(animate);
|
|
10460
|
-
const setRef =
|
|
10460
|
+
const setRef = React94__default.useCallback(
|
|
10461
10461
|
(node) => {
|
|
10462
10462
|
containerRef.current = node;
|
|
10463
10463
|
if (typeof ref === "function") ref(node);
|
|
@@ -10683,9 +10683,9 @@ function ScoreDisplay({
|
|
|
10683
10683
|
...rest
|
|
10684
10684
|
}) {
|
|
10685
10685
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
|
|
10686
|
-
const [displayValue, setDisplayValue] =
|
|
10687
|
-
const [isAnimating, setIsAnimating] =
|
|
10688
|
-
|
|
10686
|
+
const [displayValue, setDisplayValue] = React94.useState(resolvedValue);
|
|
10687
|
+
const [isAnimating, setIsAnimating] = React94.useState(false);
|
|
10688
|
+
React94.useEffect(() => {
|
|
10689
10689
|
if (!animated || displayValue === resolvedValue) {
|
|
10690
10690
|
setDisplayValue(resolvedValue);
|
|
10691
10691
|
return;
|
|
@@ -10768,9 +10768,9 @@ function ControlButton({
|
|
|
10768
10768
|
className
|
|
10769
10769
|
}) {
|
|
10770
10770
|
const eventBus = useEventBus();
|
|
10771
|
-
const [isPressed, setIsPressed] =
|
|
10771
|
+
const [isPressed, setIsPressed] = React94.useState(false);
|
|
10772
10772
|
const actualPressed = pressed ?? isPressed;
|
|
10773
|
-
const handlePointerDown =
|
|
10773
|
+
const handlePointerDown = React94.useCallback(
|
|
10774
10774
|
(e) => {
|
|
10775
10775
|
e.preventDefault();
|
|
10776
10776
|
if (disabled) return;
|
|
@@ -10780,7 +10780,7 @@ function ControlButton({
|
|
|
10780
10780
|
},
|
|
10781
10781
|
[disabled, pressEvent, eventBus, onPress]
|
|
10782
10782
|
);
|
|
10783
|
-
const handlePointerUp =
|
|
10783
|
+
const handlePointerUp = React94.useCallback(
|
|
10784
10784
|
(e) => {
|
|
10785
10785
|
e.preventDefault();
|
|
10786
10786
|
if (disabled) return;
|
|
@@ -10790,7 +10790,7 @@ function ControlButton({
|
|
|
10790
10790
|
},
|
|
10791
10791
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
10792
10792
|
);
|
|
10793
|
-
const handlePointerLeave =
|
|
10793
|
+
const handlePointerLeave = React94.useCallback(
|
|
10794
10794
|
(e) => {
|
|
10795
10795
|
if (isPressed) {
|
|
10796
10796
|
setIsPressed(false);
|
|
@@ -11411,8 +11411,8 @@ function XPBar({
|
|
|
11411
11411
|
}) {
|
|
11412
11412
|
const sizes = sizeMap9[size];
|
|
11413
11413
|
const percentage = max > 0 ? Math.max(0, Math.min(100, current / max * 100)) : 0;
|
|
11414
|
-
const [fillWidth, setFillWidth] =
|
|
11415
|
-
|
|
11414
|
+
const [fillWidth, setFillWidth] = React94.useState(animated ? 0 : percentage);
|
|
11415
|
+
React94.useEffect(() => {
|
|
11416
11416
|
if (!animated) {
|
|
11417
11417
|
setFillWidth(percentage);
|
|
11418
11418
|
return;
|
|
@@ -11755,6 +11755,8 @@ var init_DialogueBubble = __esm({
|
|
|
11755
11755
|
function ChoiceButton({
|
|
11756
11756
|
text = "Charge forward into the fray",
|
|
11757
11757
|
index,
|
|
11758
|
+
assetUrl,
|
|
11759
|
+
icon,
|
|
11758
11760
|
disabled = false,
|
|
11759
11761
|
selected = false,
|
|
11760
11762
|
onClick,
|
|
@@ -11787,6 +11789,23 @@ function ChoiceButton({
|
|
|
11787
11789
|
]
|
|
11788
11790
|
}
|
|
11789
11791
|
),
|
|
11792
|
+
assetUrl ? /* @__PURE__ */ jsx(
|
|
11793
|
+
"img",
|
|
11794
|
+
{
|
|
11795
|
+
src: assetUrl,
|
|
11796
|
+
alt: "",
|
|
11797
|
+
width: 16,
|
|
11798
|
+
height: 16,
|
|
11799
|
+
style: { imageRendering: "pixelated", objectFit: "contain" },
|
|
11800
|
+
className: "flex-shrink-0"
|
|
11801
|
+
}
|
|
11802
|
+
) : icon ? /* @__PURE__ */ jsx("span", { className: "flex-shrink-0 text-sm", children: typeof icon === "string" ? (() => {
|
|
11803
|
+
const I = resolveIcon(icon);
|
|
11804
|
+
return I ? /* @__PURE__ */ jsx(I, { className: "w-4 h-4" }) : null;
|
|
11805
|
+
})() : /* @__PURE__ */ (() => {
|
|
11806
|
+
const I = icon;
|
|
11807
|
+
return /* @__PURE__ */ jsx(I, { className: "w-4 h-4" });
|
|
11808
|
+
})() }) : null,
|
|
11790
11809
|
/* @__PURE__ */ jsx("span", { className: "text-sm leading-snug", children: text })
|
|
11791
11810
|
]
|
|
11792
11811
|
}
|
|
@@ -11795,6 +11814,7 @@ function ChoiceButton({
|
|
|
11795
11814
|
var init_ChoiceButton = __esm({
|
|
11796
11815
|
"components/game/atoms/ChoiceButton.tsx"() {
|
|
11797
11816
|
init_cn();
|
|
11817
|
+
init_Icon();
|
|
11798
11818
|
ChoiceButton.displayName = "ChoiceButton";
|
|
11799
11819
|
}
|
|
11800
11820
|
});
|
|
@@ -11900,9 +11920,9 @@ function MiniMap({
|
|
|
11900
11920
|
viewportRect = DEFAULT_VIEWPORT,
|
|
11901
11921
|
className
|
|
11902
11922
|
}) {
|
|
11903
|
-
const canvasRef =
|
|
11904
|
-
const frameRef =
|
|
11905
|
-
|
|
11923
|
+
const canvasRef = React94.useRef(null);
|
|
11924
|
+
const frameRef = React94.useRef(0);
|
|
11925
|
+
React94.useEffect(() => {
|
|
11906
11926
|
const canvas = canvasRef.current;
|
|
11907
11927
|
if (!canvas) return;
|
|
11908
11928
|
const ctx = canvas.getContext("2d");
|
|
@@ -12091,7 +12111,7 @@ var init_ErrorBoundary = __esm({
|
|
|
12091
12111
|
}
|
|
12092
12112
|
);
|
|
12093
12113
|
};
|
|
12094
|
-
ErrorBoundary = class extends
|
|
12114
|
+
ErrorBoundary = class extends React94__default.Component {
|
|
12095
12115
|
constructor(props) {
|
|
12096
12116
|
super(props);
|
|
12097
12117
|
__publicField(this, "reset", () => {
|
|
@@ -13126,8 +13146,8 @@ function ActionButtons({
|
|
|
13126
13146
|
disabled
|
|
13127
13147
|
}) {
|
|
13128
13148
|
const eventBus = useEventBus();
|
|
13129
|
-
const [activeButtons, setActiveButtons] =
|
|
13130
|
-
const handlePress =
|
|
13149
|
+
const [activeButtons, setActiveButtons] = React94.useState(/* @__PURE__ */ new Set());
|
|
13150
|
+
const handlePress = React94.useCallback(
|
|
13131
13151
|
(id) => {
|
|
13132
13152
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
13133
13153
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -13135,7 +13155,7 @@ function ActionButtons({
|
|
|
13135
13155
|
},
|
|
13136
13156
|
[actionEvent, eventBus, onAction]
|
|
13137
13157
|
);
|
|
13138
|
-
const handleRelease =
|
|
13158
|
+
const handleRelease = React94.useCallback(
|
|
13139
13159
|
(id) => {
|
|
13140
13160
|
setActiveButtons((prev) => {
|
|
13141
13161
|
const next = new Set(prev);
|
|
@@ -14684,6 +14704,11 @@ function isoToScreen(tileX, tileY, scale, baseOffsetX, layout = "isometric") {
|
|
|
14684
14704
|
const screenY2 = tileY * (scaledFloorHeight * 0.75);
|
|
14685
14705
|
return { x: screenX2, y: screenY2 };
|
|
14686
14706
|
}
|
|
14707
|
+
if (layout === "flat") {
|
|
14708
|
+
const screenX2 = tileX * scaledTileWidth + baseOffsetX;
|
|
14709
|
+
const screenY2 = tileY * scaledFloorHeight;
|
|
14710
|
+
return { x: screenX2, y: screenY2 };
|
|
14711
|
+
}
|
|
14687
14712
|
const screenX = (tileX - tileY) * (scaledTileWidth / 2) + baseOffsetX;
|
|
14688
14713
|
const screenY = (tileX + tileY) * (scaledFloorHeight / 2);
|
|
14689
14714
|
return { x: screenX, y: screenY };
|
|
@@ -14696,6 +14721,11 @@ function screenToIso(screenX, screenY, scale, baseOffsetX, layout = "isometric")
|
|
|
14696
14721
|
const col = Math.round((screenX - (row & 1) * (scaledTileWidth / 2) - baseOffsetX) / scaledTileWidth);
|
|
14697
14722
|
return { x: col, y: row };
|
|
14698
14723
|
}
|
|
14724
|
+
if (layout === "flat") {
|
|
14725
|
+
const col = Math.round((screenX - baseOffsetX) / scaledTileWidth);
|
|
14726
|
+
const row = Math.round(screenY / scaledFloorHeight);
|
|
14727
|
+
return { x: col, y: row };
|
|
14728
|
+
}
|
|
14699
14729
|
const adjustedX = screenX - baseOffsetX;
|
|
14700
14730
|
const tileX = (adjustedX / (scaledTileWidth / 2) + screenY / (scaledFloorHeight / 2)) / 2;
|
|
14701
14731
|
const tileY = (screenY / (scaledFloorHeight / 2) - adjustedX / (scaledTileWidth / 2)) / 2;
|
|
@@ -14815,7 +14845,7 @@ function IsometricCanvas({
|
|
|
14815
14845
|
);
|
|
14816
14846
|
const sortedTiles = useMemo(() => {
|
|
14817
14847
|
const tiles = [...tilesProp];
|
|
14818
|
-
if (tileLayout === "hex") {
|
|
14848
|
+
if (tileLayout === "hex" || tileLayout === "flat") {
|
|
14819
14849
|
tiles.sort((a, b) => a.y !== b.y ? a.y - b.y : a.x - b.x);
|
|
14820
14850
|
} else {
|
|
14821
14851
|
tiles.sort((a, b) => {
|
|
@@ -14943,7 +14973,8 @@ function IsometricCanvas({
|
|
|
14943
14973
|
const minX = Math.min(...allScreenPos.map((p2) => p2.x));
|
|
14944
14974
|
const maxX = Math.max(...allScreenPos.map((p2) => p2.x + scaledTileWidth));
|
|
14945
14975
|
const minY = Math.min(...allScreenPos.map((p2) => p2.y));
|
|
14946
|
-
const
|
|
14976
|
+
const tileBottomExtent = tileLayout === "hex" || tileLayout === "flat" ? scaledTileWidth : scaledTileHeight;
|
|
14977
|
+
const maxY = Math.max(...allScreenPos.map((p2) => p2.y + tileBottomExtent));
|
|
14947
14978
|
const worldW = maxX - minX;
|
|
14948
14979
|
const worldH = maxY - minY;
|
|
14949
14980
|
const scaleM = Math.min(mW / worldW, mH / worldH) * 0.9;
|
|
@@ -15035,7 +15066,7 @@ function IsometricCanvas({
|
|
|
15035
15066
|
const drawW = scaledTileWidth;
|
|
15036
15067
|
const drawH = scaledTileWidth * (img.naturalHeight / img.naturalWidth);
|
|
15037
15068
|
const drawX = pos.x;
|
|
15038
|
-
const drawY = pos.y + scaledTileHeight - drawH;
|
|
15069
|
+
const drawY = tileLayout === "hex" || tileLayout === "flat" ? pos.y : pos.y + scaledTileHeight - drawH;
|
|
15039
15070
|
ctx.drawImage(img, drawX, drawY, drawW, drawH);
|
|
15040
15071
|
}
|
|
15041
15072
|
} else {
|
|
@@ -15102,7 +15133,7 @@ function IsometricCanvas({
|
|
|
15102
15133
|
}
|
|
15103
15134
|
}
|
|
15104
15135
|
const sortedFeatures = [...features].sort((a, b) => {
|
|
15105
|
-
if (tileLayout === "hex") return a.y !== b.y ? a.y - b.y : a.x - b.x;
|
|
15136
|
+
if (tileLayout === "hex" || tileLayout === "flat") return a.y !== b.y ? a.y - b.y : a.x - b.x;
|
|
15106
15137
|
const depthA = a.x + a.y;
|
|
15107
15138
|
const depthB = b.x + b.y;
|
|
15108
15139
|
return depthA !== depthB ? depthA - depthB : a.y - b.y;
|
|
@@ -15143,7 +15174,7 @@ function IsometricCanvas({
|
|
|
15143
15174
|
}
|
|
15144
15175
|
const unitsWithPosition = units.filter((u) => !!u.position);
|
|
15145
15176
|
const sortedUnits = [...unitsWithPosition].sort((a, b) => {
|
|
15146
|
-
if (tileLayout === "hex") return a.position.y !== b.position.y ? a.position.y - b.position.y : a.position.x - b.position.x;
|
|
15177
|
+
if (tileLayout === "hex" || tileLayout === "flat") return a.position.y !== b.position.y ? a.position.y - b.position.y : a.position.x - b.position.x;
|
|
15147
15178
|
const depthA = a.position.x + a.position.y;
|
|
15148
15179
|
const depthB = b.position.x + b.position.y;
|
|
15149
15180
|
return depthA !== depthB ? depthA - depthB : a.position.y - b.position.y;
|
|
@@ -16489,7 +16520,7 @@ var init_CodeBlock = __esm({
|
|
|
16489
16520
|
};
|
|
16490
16521
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
16491
16522
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
16492
|
-
CodeBlock =
|
|
16523
|
+
CodeBlock = React94__default.memo(
|
|
16493
16524
|
({
|
|
16494
16525
|
code: rawCode,
|
|
16495
16526
|
language = "text",
|
|
@@ -17076,7 +17107,7 @@ var init_MarkdownContent = __esm({
|
|
|
17076
17107
|
init_Box();
|
|
17077
17108
|
init_CodeBlock();
|
|
17078
17109
|
init_cn();
|
|
17079
|
-
MarkdownContent =
|
|
17110
|
+
MarkdownContent = React94__default.memo(
|
|
17080
17111
|
({ content, direction = "ltr", className }) => {
|
|
17081
17112
|
const { t: _t } = useTranslate();
|
|
17082
17113
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -17366,6 +17397,48 @@ var init_BloomQuizBlock = __esm({
|
|
|
17366
17397
|
BloomQuizBlock.displayName = "BloomQuizBlock";
|
|
17367
17398
|
}
|
|
17368
17399
|
});
|
|
17400
|
+
function BoardgameBoard({
|
|
17401
|
+
tiles,
|
|
17402
|
+
units,
|
|
17403
|
+
features,
|
|
17404
|
+
assetManifest,
|
|
17405
|
+
assetBaseUrl,
|
|
17406
|
+
scale = 0.45,
|
|
17407
|
+
showMinimap = false,
|
|
17408
|
+
enableCamera = true,
|
|
17409
|
+
tileClickEvent,
|
|
17410
|
+
unitClickEvent,
|
|
17411
|
+
isLoading,
|
|
17412
|
+
error,
|
|
17413
|
+
className
|
|
17414
|
+
}) {
|
|
17415
|
+
return /* @__PURE__ */ jsx("div", { className: cn("boardgame-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
17416
|
+
IsometricCanvas_default,
|
|
17417
|
+
{
|
|
17418
|
+
tileLayout: "flat",
|
|
17419
|
+
tiles,
|
|
17420
|
+
units,
|
|
17421
|
+
features,
|
|
17422
|
+
assetManifest,
|
|
17423
|
+
assetBaseUrl,
|
|
17424
|
+
scale,
|
|
17425
|
+
showMinimap,
|
|
17426
|
+
enableCamera,
|
|
17427
|
+
tileClickEvent,
|
|
17428
|
+
unitClickEvent,
|
|
17429
|
+
isLoading,
|
|
17430
|
+
error
|
|
17431
|
+
}
|
|
17432
|
+
) });
|
|
17433
|
+
}
|
|
17434
|
+
var init_BoardgameBoard = __esm({
|
|
17435
|
+
"components/game/organisms/BoardgameBoard.tsx"() {
|
|
17436
|
+
"use client";
|
|
17437
|
+
init_cn();
|
|
17438
|
+
init_IsometricCanvas();
|
|
17439
|
+
BoardgameBoard.displayName = "BoardgameBoard";
|
|
17440
|
+
}
|
|
17441
|
+
});
|
|
17369
17442
|
var MIN_DIAGRAM_WIDTH, ScaledDiagram;
|
|
17370
17443
|
var init_ScaledDiagram = __esm({
|
|
17371
17444
|
"components/core/molecules/ScaledDiagram.tsx"() {
|
|
@@ -18403,7 +18476,7 @@ var init_StateMachineView = __esm({
|
|
|
18403
18476
|
style: { top: title ? 30 : 0 },
|
|
18404
18477
|
children: [
|
|
18405
18478
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
18406
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
18479
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React94__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
18407
18480
|
StateNode,
|
|
18408
18481
|
{
|
|
18409
18482
|
state,
|
|
@@ -22358,7 +22431,7 @@ function CardHand({
|
|
|
22358
22431
|
className
|
|
22359
22432
|
}) {
|
|
22360
22433
|
const eventBus = useEventBus();
|
|
22361
|
-
const handleClick =
|
|
22434
|
+
const handleClick = React94.useCallback(
|
|
22362
22435
|
(card) => {
|
|
22363
22436
|
if (card.disabled) return;
|
|
22364
22437
|
onCardClick?.(card.id);
|
|
@@ -24504,6 +24577,215 @@ var init_ChartLegend = __esm({
|
|
|
24504
24577
|
ChartLegend.displayName = "ChartLegend";
|
|
24505
24578
|
}
|
|
24506
24579
|
});
|
|
24580
|
+
|
|
24581
|
+
// components/core/organisms/trace-edit-focus.ts
|
|
24582
|
+
function asString(v) {
|
|
24583
|
+
return typeof v === "string" ? v : void 0;
|
|
24584
|
+
}
|
|
24585
|
+
function asLevel(v) {
|
|
24586
|
+
if (typeof v === "string" && EDIT_FOCUS_LEVELS.has(v)) {
|
|
24587
|
+
return v;
|
|
24588
|
+
}
|
|
24589
|
+
return "node";
|
|
24590
|
+
}
|
|
24591
|
+
function isEventPayload(v) {
|
|
24592
|
+
return v !== null && v !== void 0 && typeof v === "object" && !Array.isArray(v) && !(v instanceof Date);
|
|
24593
|
+
}
|
|
24594
|
+
function parseEditFocus(value) {
|
|
24595
|
+
if (!isEventPayload(value)) return null;
|
|
24596
|
+
const payload = value;
|
|
24597
|
+
const orbital = asString(payload.orbital);
|
|
24598
|
+
if (orbital === void 0 || orbital.length === 0) return null;
|
|
24599
|
+
const focus = {
|
|
24600
|
+
level: asLevel(payload.level),
|
|
24601
|
+
orbital,
|
|
24602
|
+
label: asString(payload.label) ?? orbital
|
|
24603
|
+
};
|
|
24604
|
+
const trait = asString(payload.trait);
|
|
24605
|
+
if (trait !== void 0) focus.trait = trait;
|
|
24606
|
+
const transition = asString(payload.transition);
|
|
24607
|
+
if (transition !== void 0) focus.transition = transition;
|
|
24608
|
+
const state = asString(payload.state);
|
|
24609
|
+
if (state !== void 0) focus.state = state;
|
|
24610
|
+
const slot = asString(payload.slot);
|
|
24611
|
+
if (slot !== void 0) focus.slot = slot;
|
|
24612
|
+
const path = asString(payload.path);
|
|
24613
|
+
if (path !== void 0) focus.path = path;
|
|
24614
|
+
const patternType = asString(payload.patternType);
|
|
24615
|
+
if (patternType !== void 0) focus.patternType = patternType;
|
|
24616
|
+
const entity = asString(payload.entity);
|
|
24617
|
+
if (entity !== void 0) focus.entity = entity;
|
|
24618
|
+
const source = asString(payload.source);
|
|
24619
|
+
if (source !== void 0) focus.source = source;
|
|
24620
|
+
return focus;
|
|
24621
|
+
}
|
|
24622
|
+
var ELEMENT_SELECTED_EVENT, EDIT_FOCUS_LEVELS;
|
|
24623
|
+
var init_trace_edit_focus = __esm({
|
|
24624
|
+
"components/core/organisms/trace-edit-focus.ts"() {
|
|
24625
|
+
ELEMENT_SELECTED_EVENT = "UI:ELEMENT_SELECTED";
|
|
24626
|
+
EDIT_FOCUS_LEVELS = /* @__PURE__ */ new Set([
|
|
24627
|
+
"node",
|
|
24628
|
+
"slot",
|
|
24629
|
+
"field",
|
|
24630
|
+
"effect",
|
|
24631
|
+
"trait",
|
|
24632
|
+
"page",
|
|
24633
|
+
"orbital"
|
|
24634
|
+
]);
|
|
24635
|
+
}
|
|
24636
|
+
});
|
|
24637
|
+
function getJepaBadgeVariant(probability) {
|
|
24638
|
+
if (probability >= 0.9) return "success";
|
|
24639
|
+
if (probability >= 0.5) return "warning";
|
|
24640
|
+
return "danger";
|
|
24641
|
+
}
|
|
24642
|
+
function ChatBar({
|
|
24643
|
+
status = "idle",
|
|
24644
|
+
activeGate,
|
|
24645
|
+
jepaValidity,
|
|
24646
|
+
placeholder,
|
|
24647
|
+
context,
|
|
24648
|
+
className
|
|
24649
|
+
}) {
|
|
24650
|
+
const { t } = useTranslate();
|
|
24651
|
+
const eventBus = useEventBus();
|
|
24652
|
+
const [inputValue, setInputValue] = useState("");
|
|
24653
|
+
const [focus, setFocus] = useState(null);
|
|
24654
|
+
const clearFocus = useCallback(() => {
|
|
24655
|
+
setFocus(null);
|
|
24656
|
+
eventBus.emit(ELEMENT_SELECTED_EVENT, { focus: null });
|
|
24657
|
+
}, [eventBus]);
|
|
24658
|
+
const handleKeyDown = useCallback((e) => {
|
|
24659
|
+
if (e.key !== "Enter" || e.shiftKey) return;
|
|
24660
|
+
const trimmed = inputValue.trim();
|
|
24661
|
+
if (!trimmed) return;
|
|
24662
|
+
e.preventDefault();
|
|
24663
|
+
eventBus.emit("UI:CHAT_SEND", { message: trimmed });
|
|
24664
|
+
}, [inputValue, eventBus]);
|
|
24665
|
+
useEffect(() => {
|
|
24666
|
+
const unsubSend = eventBus.on("UI:CHAT_SEND", () => {
|
|
24667
|
+
setInputValue("");
|
|
24668
|
+
setFocus(null);
|
|
24669
|
+
});
|
|
24670
|
+
const unsubSelect = eventBus.on(ELEMENT_SELECTED_EVENT, (e) => {
|
|
24671
|
+
setFocus(parseEditFocus(e.payload?.focus));
|
|
24672
|
+
});
|
|
24673
|
+
return () => {
|
|
24674
|
+
unsubSend();
|
|
24675
|
+
unsubSelect();
|
|
24676
|
+
};
|
|
24677
|
+
}, [eventBus]);
|
|
24678
|
+
const trailingAction = status === "error" ? /* @__PURE__ */ jsxs(Button, { variant: "secondary", size: "sm", action: "RETRY_GENERATION", className: "rounded-none flex-shrink-0 h-auto", children: [
|
|
24679
|
+
/* @__PURE__ */ jsx(Icon, { name: "refresh-cw", size: "xs" }),
|
|
24680
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", children: t("openFile.retry") })
|
|
24681
|
+
] }) : status === "running" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
24682
|
+
/* @__PURE__ */ jsx(
|
|
24683
|
+
Button,
|
|
24684
|
+
{
|
|
24685
|
+
variant: "ghost",
|
|
24686
|
+
size: "sm",
|
|
24687
|
+
action: "PAUSE",
|
|
24688
|
+
title: t("chatBar.pauseTheAgentYouCanEdit"),
|
|
24689
|
+
className: "rounded-none flex-shrink-0 h-auto",
|
|
24690
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "pause", size: "xs" })
|
|
24691
|
+
}
|
|
24692
|
+
),
|
|
24693
|
+
/* @__PURE__ */ jsx(
|
|
24694
|
+
Button,
|
|
24695
|
+
{
|
|
24696
|
+
variant: "ghost",
|
|
24697
|
+
size: "sm",
|
|
24698
|
+
action: "STOP",
|
|
24699
|
+
title: t("chatBar.cancelGeneration"),
|
|
24700
|
+
className: "rounded-none flex-shrink-0 h-auto border-l border-[var(--color-border)]",
|
|
24701
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "square", size: "xs" })
|
|
24702
|
+
}
|
|
24703
|
+
)
|
|
24704
|
+
] }) : status === "paused" ? /* @__PURE__ */ jsxs(
|
|
24705
|
+
Button,
|
|
24706
|
+
{
|
|
24707
|
+
variant: "primary",
|
|
24708
|
+
size: "sm",
|
|
24709
|
+
action: "RESUME",
|
|
24710
|
+
title: t("chatBar.resumeTheAgentYourCanvasEdits"),
|
|
24711
|
+
className: "rounded-none flex-shrink-0 h-auto",
|
|
24712
|
+
children: [
|
|
24713
|
+
/* @__PURE__ */ jsx(Icon, { name: "play", size: "xs" }),
|
|
24714
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", children: t("chatBar.resume") })
|
|
24715
|
+
]
|
|
24716
|
+
}
|
|
24717
|
+
) : /* @__PURE__ */ jsx(
|
|
24718
|
+
Button,
|
|
24719
|
+
{
|
|
24720
|
+
variant: "primary",
|
|
24721
|
+
size: "sm",
|
|
24722
|
+
action: "CHAT_SEND",
|
|
24723
|
+
actionPayload: { message: inputValue.trim() },
|
|
24724
|
+
disabled: !inputValue.trim(),
|
|
24725
|
+
"aria-label": t("chatBar.sendMessage"),
|
|
24726
|
+
className: "rounded-none flex-shrink-0 h-auto",
|
|
24727
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "send", size: "xs" })
|
|
24728
|
+
}
|
|
24729
|
+
);
|
|
24730
|
+
return /* @__PURE__ */ jsxs(Box, { className: `border-t border-[var(--color-border)] bg-[var(--color-card)] ${className ?? ""}`, children: [
|
|
24731
|
+
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: [
|
|
24732
|
+
/* @__PURE__ */ jsx(Icon, { name: "mouse-pointer-2", size: "xs" }),
|
|
24733
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-inherit truncate", children: [
|
|
24734
|
+
t("chatBar.editing"),
|
|
24735
|
+
": ",
|
|
24736
|
+
focus.label
|
|
24737
|
+
] }),
|
|
24738
|
+
/* @__PURE__ */ jsx(
|
|
24739
|
+
Box,
|
|
24740
|
+
{
|
|
24741
|
+
onClick: clearFocus,
|
|
24742
|
+
title: t("chatBar.clearSelection"),
|
|
24743
|
+
className: "cursor-pointer flex items-center ml-1 hover:opacity-70",
|
|
24744
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" })
|
|
24745
|
+
}
|
|
24746
|
+
)
|
|
24747
|
+
] }) }),
|
|
24748
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center px-4 py-2", children: [
|
|
24749
|
+
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 }) }),
|
|
24750
|
+
/* @__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: [
|
|
24751
|
+
/* @__PURE__ */ jsx(
|
|
24752
|
+
Textarea,
|
|
24753
|
+
{
|
|
24754
|
+
value: inputValue,
|
|
24755
|
+
placeholder: placeholder ?? t("chatBar.askTheAgentAnything"),
|
|
24756
|
+
onChange: (e) => setInputValue(e.target.value),
|
|
24757
|
+
onKeyDown: handleKeyDown,
|
|
24758
|
+
rows: 1,
|
|
24759
|
+
className: "flex-1 min-w-0 min-h-0 text-sm border-0 rounded-none shadow-none bg-transparent resize-none focus:ring-0"
|
|
24760
|
+
}
|
|
24761
|
+
),
|
|
24762
|
+
trailingAction
|
|
24763
|
+
] }),
|
|
24764
|
+
(activeGate || jepaValidity !== void 0) && /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center flex-shrink-0", children: [
|
|
24765
|
+
activeGate && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "whitespace-nowrap", children: activeGate }),
|
|
24766
|
+
jepaValidity !== void 0 && /* @__PURE__ */ jsx(Badge, { variant: getJepaBadgeVariant(jepaValidity), size: "sm", children: /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-inherit", children: [
|
|
24767
|
+
(jepaValidity * 100).toFixed(1),
|
|
24768
|
+
"%"
|
|
24769
|
+
] }) })
|
|
24770
|
+
] })
|
|
24771
|
+
] })
|
|
24772
|
+
] });
|
|
24773
|
+
}
|
|
24774
|
+
var init_ChatBar = __esm({
|
|
24775
|
+
"components/core/organisms/ChatBar.tsx"() {
|
|
24776
|
+
"use client";
|
|
24777
|
+
init_Box();
|
|
24778
|
+
init_Stack();
|
|
24779
|
+
init_Typography();
|
|
24780
|
+
init_Button();
|
|
24781
|
+
init_Badge();
|
|
24782
|
+
init_Icon();
|
|
24783
|
+
init_Textarea();
|
|
24784
|
+
init_useEventBus();
|
|
24785
|
+
init_trace_edit_focus();
|
|
24786
|
+
ChatBar.displayName = "ChatBar";
|
|
24787
|
+
}
|
|
24788
|
+
});
|
|
24507
24789
|
function resolveManifestUrl2(manifest, relative) {
|
|
24508
24790
|
if (relative == null) return void 0;
|
|
24509
24791
|
if (/^https?:\/\//.test(relative)) return relative;
|
|
@@ -25627,7 +25909,7 @@ function CraftingRecipe({
|
|
|
25627
25909
|
className
|
|
25628
25910
|
}) {
|
|
25629
25911
|
const eventBus = useEventBus();
|
|
25630
|
-
const handleCraft =
|
|
25912
|
+
const handleCraft = React94.useCallback(() => {
|
|
25631
25913
|
onCraft?.();
|
|
25632
25914
|
if (craftEvent) {
|
|
25633
25915
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -25644,7 +25926,7 @@ function CraftingRecipe({
|
|
|
25644
25926
|
children: [
|
|
25645
25927
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
25646
25928
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
25647
|
-
return /* @__PURE__ */ jsxs(
|
|
25929
|
+
return /* @__PURE__ */ jsxs(React94.Fragment, { children: [
|
|
25648
25930
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
25649
25931
|
ItemSlot,
|
|
25650
25932
|
{
|
|
@@ -25716,8 +25998,8 @@ function DPad({
|
|
|
25716
25998
|
}) {
|
|
25717
25999
|
const eventBus = useEventBus();
|
|
25718
26000
|
const sizes = sizeMap15[size];
|
|
25719
|
-
const [activeDirections, setActiveDirections] =
|
|
25720
|
-
const handlePress =
|
|
26001
|
+
const [activeDirections, setActiveDirections] = React94.useState(/* @__PURE__ */ new Set());
|
|
26002
|
+
const handlePress = React94.useCallback(
|
|
25721
26003
|
(direction) => {
|
|
25722
26004
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
25723
26005
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -25725,7 +26007,7 @@ function DPad({
|
|
|
25725
26007
|
},
|
|
25726
26008
|
[directionEvent, eventBus, onDirection]
|
|
25727
26009
|
);
|
|
25728
|
-
const handleRelease =
|
|
26010
|
+
const handleRelease = React94.useCallback(
|
|
25729
26011
|
(direction) => {
|
|
25730
26012
|
setActiveDirections((prev) => {
|
|
25731
26013
|
const next = new Set(prev);
|
|
@@ -26610,8 +26892,8 @@ var init_Menu = __esm({
|
|
|
26610
26892
|
"bottom-end": "bottom-start"
|
|
26611
26893
|
};
|
|
26612
26894
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
26613
|
-
const triggerChild =
|
|
26614
|
-
const triggerElement =
|
|
26895
|
+
const triggerChild = React94__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
26896
|
+
const triggerElement = React94__default.cloneElement(
|
|
26615
26897
|
triggerChild,
|
|
26616
26898
|
{
|
|
26617
26899
|
ref: triggerRef,
|
|
@@ -26706,14 +26988,14 @@ function useDataDnd(args) {
|
|
|
26706
26988
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
26707
26989
|
const enabled = isZone || Boolean(dndRoot);
|
|
26708
26990
|
const eventBus = useEventBus();
|
|
26709
|
-
const parentRoot =
|
|
26991
|
+
const parentRoot = React94__default.useContext(RootCtx);
|
|
26710
26992
|
const isRoot = enabled && parentRoot === null;
|
|
26711
|
-
const zoneId =
|
|
26993
|
+
const zoneId = React94__default.useId();
|
|
26712
26994
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
26713
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
26714
|
-
const optimisticOrdersRef =
|
|
26995
|
+
const [optimisticOrders, setOptimisticOrders] = React94__default.useState(() => /* @__PURE__ */ new Map());
|
|
26996
|
+
const optimisticOrdersRef = React94__default.useRef(optimisticOrders);
|
|
26715
26997
|
optimisticOrdersRef.current = optimisticOrders;
|
|
26716
|
-
const clearOptimisticOrder =
|
|
26998
|
+
const clearOptimisticOrder = React94__default.useCallback((group) => {
|
|
26717
26999
|
setOptimisticOrders((prev) => {
|
|
26718
27000
|
if (!prev.has(group)) return prev;
|
|
26719
27001
|
const next = new Map(prev);
|
|
@@ -26738,7 +27020,7 @@ function useDataDnd(args) {
|
|
|
26738
27020
|
const raw = it[dndItemIdField];
|
|
26739
27021
|
return String(raw ?? `__idx_${idx}`);
|
|
26740
27022
|
}).join("|");
|
|
26741
|
-
const itemIds =
|
|
27023
|
+
const itemIds = React94__default.useMemo(
|
|
26742
27024
|
() => orderedItems.map((it, idx) => {
|
|
26743
27025
|
const raw = it[dndItemIdField];
|
|
26744
27026
|
return raw ?? `__idx_${idx}`;
|
|
@@ -26746,7 +27028,7 @@ function useDataDnd(args) {
|
|
|
26746
27028
|
[itemIdsSignature]
|
|
26747
27029
|
);
|
|
26748
27030
|
const itemsContentSig = items.map((it, idx) => String(it[dndItemIdField] ?? `__${idx}`)).join("|");
|
|
26749
|
-
|
|
27031
|
+
React94__default.useEffect(() => {
|
|
26750
27032
|
const root = isRoot ? null : parentRoot;
|
|
26751
27033
|
if (root) {
|
|
26752
27034
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -26754,20 +27036,20 @@ function useDataDnd(args) {
|
|
|
26754
27036
|
clearOptimisticOrder(ownGroup);
|
|
26755
27037
|
}
|
|
26756
27038
|
}, [itemsContentSig, ownGroup]);
|
|
26757
|
-
const zonesRef =
|
|
26758
|
-
const registerZone =
|
|
27039
|
+
const zonesRef = React94__default.useRef(/* @__PURE__ */ new Map());
|
|
27040
|
+
const registerZone = React94__default.useCallback((zoneId2, meta2) => {
|
|
26759
27041
|
zonesRef.current.set(zoneId2, meta2);
|
|
26760
27042
|
}, []);
|
|
26761
|
-
const unregisterZone =
|
|
27043
|
+
const unregisterZone = React94__default.useCallback((zoneId2) => {
|
|
26762
27044
|
zonesRef.current.delete(zoneId2);
|
|
26763
27045
|
}, []);
|
|
26764
|
-
const [activeDrag, setActiveDrag] =
|
|
26765
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
26766
|
-
const meta =
|
|
27046
|
+
const [activeDrag, setActiveDrag] = React94__default.useState(null);
|
|
27047
|
+
const [overZoneGroup, setOverZoneGroup] = React94__default.useState(null);
|
|
27048
|
+
const meta = React94__default.useMemo(
|
|
26767
27049
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
26768
27050
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
26769
27051
|
);
|
|
26770
|
-
|
|
27052
|
+
React94__default.useEffect(() => {
|
|
26771
27053
|
const target = isRoot ? null : parentRoot;
|
|
26772
27054
|
if (!target) {
|
|
26773
27055
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -26786,7 +27068,7 @@ function useDataDnd(args) {
|
|
|
26786
27068
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
26787
27069
|
const sensors = useAlmadarDndSensors(true);
|
|
26788
27070
|
const collisionDetection = almadarDndCollisionDetection;
|
|
26789
|
-
const findZoneByItem =
|
|
27071
|
+
const findZoneByItem = React94__default.useCallback(
|
|
26790
27072
|
(id) => {
|
|
26791
27073
|
for (const z of zonesRef.current.values()) {
|
|
26792
27074
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -26795,7 +27077,7 @@ function useDataDnd(args) {
|
|
|
26795
27077
|
},
|
|
26796
27078
|
[]
|
|
26797
27079
|
);
|
|
26798
|
-
|
|
27080
|
+
React94__default.useCallback(
|
|
26799
27081
|
(group) => {
|
|
26800
27082
|
for (const z of zonesRef.current.values()) {
|
|
26801
27083
|
if (z.group === group) return z;
|
|
@@ -26804,7 +27086,7 @@ function useDataDnd(args) {
|
|
|
26804
27086
|
},
|
|
26805
27087
|
[]
|
|
26806
27088
|
);
|
|
26807
|
-
const handleDragEnd =
|
|
27089
|
+
const handleDragEnd = React94__default.useCallback(
|
|
26808
27090
|
(event) => {
|
|
26809
27091
|
const { active, over } = event;
|
|
26810
27092
|
const activeIdStr = String(active.id);
|
|
@@ -26895,8 +27177,8 @@ function useDataDnd(args) {
|
|
|
26895
27177
|
},
|
|
26896
27178
|
[eventBus]
|
|
26897
27179
|
);
|
|
26898
|
-
const sortableData =
|
|
26899
|
-
const SortableItem =
|
|
27180
|
+
const sortableData = React94__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
27181
|
+
const SortableItem = React94__default.useCallback(
|
|
26900
27182
|
({ id, children }) => {
|
|
26901
27183
|
const {
|
|
26902
27184
|
attributes,
|
|
@@ -26936,7 +27218,7 @@ function useDataDnd(args) {
|
|
|
26936
27218
|
id: droppableId,
|
|
26937
27219
|
data: sortableData
|
|
26938
27220
|
});
|
|
26939
|
-
const ctx =
|
|
27221
|
+
const ctx = React94__default.useContext(RootCtx);
|
|
26940
27222
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
26941
27223
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
26942
27224
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -26951,7 +27233,7 @@ function useDataDnd(args) {
|
|
|
26951
27233
|
showForeignPlaceholder,
|
|
26952
27234
|
ctxAvailable: ctx != null
|
|
26953
27235
|
});
|
|
26954
|
-
|
|
27236
|
+
React94__default.useEffect(() => {
|
|
26955
27237
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
26956
27238
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
26957
27239
|
return /* @__PURE__ */ jsx(
|
|
@@ -26965,11 +27247,11 @@ function useDataDnd(args) {
|
|
|
26965
27247
|
}
|
|
26966
27248
|
);
|
|
26967
27249
|
};
|
|
26968
|
-
const rootContextValue =
|
|
27250
|
+
const rootContextValue = React94__default.useMemo(
|
|
26969
27251
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
26970
27252
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
26971
27253
|
);
|
|
26972
|
-
const handleDragStart =
|
|
27254
|
+
const handleDragStart = React94__default.useCallback((event) => {
|
|
26973
27255
|
const sourceZone = findZoneByItem(event.active.id);
|
|
26974
27256
|
const rect = event.active.rect.current.initial;
|
|
26975
27257
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -26988,7 +27270,7 @@ function useDataDnd(args) {
|
|
|
26988
27270
|
isRoot
|
|
26989
27271
|
});
|
|
26990
27272
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
26991
|
-
const handleDragOver =
|
|
27273
|
+
const handleDragOver = React94__default.useCallback((event) => {
|
|
26992
27274
|
const { active, over } = event;
|
|
26993
27275
|
const overData = over?.data?.current;
|
|
26994
27276
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -27058,7 +27340,7 @@ function useDataDnd(args) {
|
|
|
27058
27340
|
return next;
|
|
27059
27341
|
});
|
|
27060
27342
|
}, []);
|
|
27061
|
-
const handleDragCancel =
|
|
27343
|
+
const handleDragCancel = React94__default.useCallback((event) => {
|
|
27062
27344
|
setActiveDrag(null);
|
|
27063
27345
|
setOverZoneGroup(null);
|
|
27064
27346
|
dndLog.warn("dragCancel", {
|
|
@@ -27066,12 +27348,12 @@ function useDataDnd(args) {
|
|
|
27066
27348
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
27067
27349
|
});
|
|
27068
27350
|
}, []);
|
|
27069
|
-
const handleDragEndWithCleanup =
|
|
27351
|
+
const handleDragEndWithCleanup = React94__default.useCallback((event) => {
|
|
27070
27352
|
handleDragEnd(event);
|
|
27071
27353
|
setActiveDrag(null);
|
|
27072
27354
|
setOverZoneGroup(null);
|
|
27073
27355
|
}, [handleDragEnd]);
|
|
27074
|
-
const wrapContainer =
|
|
27356
|
+
const wrapContainer = React94__default.useCallback(
|
|
27075
27357
|
(children) => {
|
|
27076
27358
|
if (!enabled) return children;
|
|
27077
27359
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -27125,7 +27407,7 @@ var init_useDataDnd = __esm({
|
|
|
27125
27407
|
init_useAlmadarDndCollision();
|
|
27126
27408
|
init_Box();
|
|
27127
27409
|
dndLog = createLogger("almadar:ui:dnd");
|
|
27128
|
-
RootCtx =
|
|
27410
|
+
RootCtx = React94__default.createContext(null);
|
|
27129
27411
|
}
|
|
27130
27412
|
});
|
|
27131
27413
|
function renderIconInput(icon, props) {
|
|
@@ -27651,7 +27933,7 @@ function DataList({
|
|
|
27651
27933
|
}) {
|
|
27652
27934
|
const eventBus = useEventBus();
|
|
27653
27935
|
const { t } = useTranslate();
|
|
27654
|
-
const [visibleCount, setVisibleCount] =
|
|
27936
|
+
const [visibleCount, setVisibleCount] = React94__default.useState(pageSize || Infinity);
|
|
27655
27937
|
const fieldDefs = fields ?? columns ?? [];
|
|
27656
27938
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
27657
27939
|
const dnd = useDataDnd({
|
|
@@ -27670,7 +27952,7 @@ function DataList({
|
|
|
27670
27952
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
27671
27953
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
27672
27954
|
const hasRenderProp = typeof children === "function";
|
|
27673
|
-
|
|
27955
|
+
React94__default.useEffect(() => {
|
|
27674
27956
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
27675
27957
|
const childrenTypeOf = typeof children;
|
|
27676
27958
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -27775,7 +28057,7 @@ function DataList({
|
|
|
27775
28057
|
const items2 = data.map((item) => item);
|
|
27776
28058
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
27777
28059
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
27778
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
28060
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
|
|
27779
28061
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
27780
28062
|
group.items.map((itemData, index) => {
|
|
27781
28063
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -27916,7 +28198,7 @@ function DataList({
|
|
|
27916
28198
|
className
|
|
27917
28199
|
),
|
|
27918
28200
|
children: [
|
|
27919
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
28201
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
|
|
27920
28202
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
27921
28203
|
group.items.map(
|
|
27922
28204
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -28832,7 +29114,7 @@ var init_Grid = __esm({
|
|
|
28832
29114
|
as: Component2 = "div"
|
|
28833
29115
|
}) => {
|
|
28834
29116
|
const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
|
|
28835
|
-
return
|
|
29117
|
+
return React94__default.createElement(
|
|
28836
29118
|
Component2,
|
|
28837
29119
|
{
|
|
28838
29120
|
className: cn(
|
|
@@ -29028,9 +29310,9 @@ var init_Popover = __esm({
|
|
|
29028
29310
|
onMouseLeave: handleClose,
|
|
29029
29311
|
onPointerDown: tapTriggerProps.onPointerDown
|
|
29030
29312
|
};
|
|
29031
|
-
const childElement =
|
|
29313
|
+
const childElement = React94__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
29032
29314
|
const childPointerDown = childElement.props.onPointerDown;
|
|
29033
|
-
const triggerElement =
|
|
29315
|
+
const triggerElement = React94__default.cloneElement(
|
|
29034
29316
|
childElement,
|
|
29035
29317
|
{
|
|
29036
29318
|
ref: triggerRef,
|
|
@@ -29632,9 +29914,9 @@ var init_Tooltip = __esm({
|
|
|
29632
29914
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
29633
29915
|
};
|
|
29634
29916
|
}, []);
|
|
29635
|
-
const triggerElement =
|
|
29917
|
+
const triggerElement = React94__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
29636
29918
|
const childPointerDown = triggerElement.props.onPointerDown;
|
|
29637
|
-
const trigger =
|
|
29919
|
+
const trigger = React94__default.cloneElement(triggerElement, {
|
|
29638
29920
|
ref: triggerRef,
|
|
29639
29921
|
onMouseEnter: handleMouseEnter,
|
|
29640
29922
|
onMouseLeave: handleMouseLeave,
|
|
@@ -29724,7 +30006,7 @@ var init_WizardProgress = __esm({
|
|
|
29724
30006
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
29725
30007
|
const isActive = index === currentStep;
|
|
29726
30008
|
const isCompleted = index < currentStep;
|
|
29727
|
-
return /* @__PURE__ */ jsxs(
|
|
30009
|
+
return /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
|
|
29728
30010
|
/* @__PURE__ */ jsx(
|
|
29729
30011
|
"button",
|
|
29730
30012
|
{
|
|
@@ -30787,7 +31069,7 @@ function InventoryGrid({
|
|
|
30787
31069
|
const eventBus = useEventBus();
|
|
30788
31070
|
const slotCount = totalSlots ?? items.length;
|
|
30789
31071
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
30790
|
-
const handleSelect =
|
|
31072
|
+
const handleSelect = React94.useCallback(
|
|
30791
31073
|
(id) => {
|
|
30792
31074
|
onSelect?.(id);
|
|
30793
31075
|
if (selectEvent) {
|
|
@@ -30958,6 +31240,7 @@ function PowerupSlots({
|
|
|
30958
31240
|
/* @__PURE__ */ jsx(
|
|
30959
31241
|
ItemSlot,
|
|
30960
31242
|
{
|
|
31243
|
+
assetUrl: powerup.assetUrl,
|
|
30961
31244
|
icon: powerup.icon,
|
|
30962
31245
|
label: powerup.label,
|
|
30963
31246
|
rarity: "uncommon",
|
|
@@ -31021,31 +31304,31 @@ function GameCanvas2D({
|
|
|
31021
31304
|
assetBaseUrl,
|
|
31022
31305
|
className
|
|
31023
31306
|
}) {
|
|
31024
|
-
const canvasRef =
|
|
31025
|
-
const rafRef =
|
|
31026
|
-
const frameRef =
|
|
31027
|
-
const lastTimeRef =
|
|
31028
|
-
const imageCache =
|
|
31307
|
+
const canvasRef = React94.useRef(null);
|
|
31308
|
+
const rafRef = React94.useRef(0);
|
|
31309
|
+
const frameRef = React94.useRef(0);
|
|
31310
|
+
const lastTimeRef = React94.useRef(0);
|
|
31311
|
+
const imageCache = React94.useRef(/* @__PURE__ */ new Map());
|
|
31029
31312
|
const emit = useEmitEvent();
|
|
31030
|
-
const onDrawRef =
|
|
31313
|
+
const onDrawRef = React94.useRef(onDraw);
|
|
31031
31314
|
onDrawRef.current = onDraw;
|
|
31032
|
-
const onTickRef =
|
|
31315
|
+
const onTickRef = React94.useRef(onTick);
|
|
31033
31316
|
onTickRef.current = onTick;
|
|
31034
|
-
const tickEventRef =
|
|
31317
|
+
const tickEventRef = React94.useRef(tickEvent);
|
|
31035
31318
|
tickEventRef.current = tickEvent;
|
|
31036
|
-
const drawEventRef =
|
|
31319
|
+
const drawEventRef = React94.useRef(drawEvent);
|
|
31037
31320
|
drawEventRef.current = drawEvent;
|
|
31038
|
-
const emitRef =
|
|
31321
|
+
const emitRef = React94.useRef(emit);
|
|
31039
31322
|
emitRef.current = emit;
|
|
31040
|
-
const assetBaseUrlRef =
|
|
31323
|
+
const assetBaseUrlRef = React94.useRef(assetBaseUrl);
|
|
31041
31324
|
assetBaseUrlRef.current = assetBaseUrl;
|
|
31042
|
-
const backgroundImageRef =
|
|
31325
|
+
const backgroundImageRef = React94.useRef(backgroundImage);
|
|
31043
31326
|
backgroundImageRef.current = backgroundImage;
|
|
31044
|
-
const widthRef =
|
|
31327
|
+
const widthRef = React94.useRef(width);
|
|
31045
31328
|
widthRef.current = width;
|
|
31046
|
-
const heightRef =
|
|
31329
|
+
const heightRef = React94.useRef(height);
|
|
31047
31330
|
heightRef.current = height;
|
|
31048
|
-
const loadImage =
|
|
31331
|
+
const loadImage = React94.useCallback((url) => {
|
|
31049
31332
|
const base = assetBaseUrlRef.current;
|
|
31050
31333
|
if (!url.startsWith("http") && !base) return null;
|
|
31051
31334
|
const fullUrl = url.startsWith("http") ? url : `${base}${url}`;
|
|
@@ -31059,7 +31342,7 @@ function GameCanvas2D({
|
|
|
31059
31342
|
}
|
|
31060
31343
|
return null;
|
|
31061
31344
|
}, []);
|
|
31062
|
-
|
|
31345
|
+
React94.useEffect(() => {
|
|
31063
31346
|
const canvas = canvasRef.current;
|
|
31064
31347
|
if (!canvas) return;
|
|
31065
31348
|
const ctx = canvas.getContext("2d");
|
|
@@ -31207,13 +31490,26 @@ function HealthPanel({
|
|
|
31207
31490
|
)
|
|
31208
31491
|
}
|
|
31209
31492
|
),
|
|
31210
|
-
effects && effects.length > 0 && /* @__PURE__ */ jsx(Box, { className: "flex items-center gap-1 flex-wrap", children: effects.map((effect, i) => /* @__PURE__ */
|
|
31493
|
+
effects && effects.length > 0 && /* @__PURE__ */ jsx(Box, { className: "flex items-center gap-1 flex-wrap", children: effects.map((effect, i) => /* @__PURE__ */ jsxs(
|
|
31211
31494
|
Badge,
|
|
31212
31495
|
{
|
|
31213
31496
|
variant: effectVariantMap[effect.variant ?? "neutral"],
|
|
31214
31497
|
size: "sm",
|
|
31215
|
-
icon: effect.icon,
|
|
31216
|
-
children:
|
|
31498
|
+
icon: effect.assetUrl ? void 0 : effect.icon,
|
|
31499
|
+
children: [
|
|
31500
|
+
effect.assetUrl && /* @__PURE__ */ jsx(
|
|
31501
|
+
"img",
|
|
31502
|
+
{
|
|
31503
|
+
src: effect.assetUrl,
|
|
31504
|
+
alt: "",
|
|
31505
|
+
width: 12,
|
|
31506
|
+
height: 12,
|
|
31507
|
+
style: { imageRendering: "pixelated", objectFit: "contain" },
|
|
31508
|
+
className: "flex-shrink-0 inline-block"
|
|
31509
|
+
}
|
|
31510
|
+
),
|
|
31511
|
+
effect.label
|
|
31512
|
+
]
|
|
31217
31513
|
},
|
|
31218
31514
|
i
|
|
31219
31515
|
)) })
|
|
@@ -31371,7 +31667,7 @@ function TurnPanel({
|
|
|
31371
31667
|
className
|
|
31372
31668
|
}) {
|
|
31373
31669
|
const eventBus = useEventBus();
|
|
31374
|
-
const handleAction =
|
|
31670
|
+
const handleAction = React94.useCallback(
|
|
31375
31671
|
(event) => {
|
|
31376
31672
|
if (event) {
|
|
31377
31673
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -31396,15 +31692,28 @@ function TurnPanel({
|
|
|
31396
31692
|
activeTeam
|
|
31397
31693
|
}
|
|
31398
31694
|
),
|
|
31399
|
-
actions && actions.length > 0 && /* @__PURE__ */ jsx(Box, { className: "flex items-center gap-1.5 ml-auto", children: actions.map((action, i) => /* @__PURE__ */
|
|
31695
|
+
actions && actions.length > 0 && /* @__PURE__ */ jsx(Box, { className: "flex items-center gap-1.5 ml-auto", children: actions.map((action, i) => /* @__PURE__ */ jsxs(
|
|
31400
31696
|
Button,
|
|
31401
31697
|
{
|
|
31402
31698
|
variant: "ghost",
|
|
31403
31699
|
size: "sm",
|
|
31404
31700
|
disabled: action.disabled,
|
|
31405
|
-
leftIcon: action.icon,
|
|
31701
|
+
leftIcon: action.assetUrl ? void 0 : action.icon,
|
|
31406
31702
|
onClick: () => handleAction(action.event),
|
|
31407
|
-
children:
|
|
31703
|
+
children: [
|
|
31704
|
+
action.assetUrl && /* @__PURE__ */ jsx(
|
|
31705
|
+
"img",
|
|
31706
|
+
{
|
|
31707
|
+
src: action.assetUrl,
|
|
31708
|
+
alt: "",
|
|
31709
|
+
width: 14,
|
|
31710
|
+
height: 14,
|
|
31711
|
+
style: { imageRendering: "pixelated", objectFit: "contain" },
|
|
31712
|
+
className: "flex-shrink-0"
|
|
31713
|
+
}
|
|
31714
|
+
),
|
|
31715
|
+
action.label
|
|
31716
|
+
]
|
|
31408
31717
|
},
|
|
31409
31718
|
i
|
|
31410
31719
|
)) })
|
|
@@ -31539,7 +31848,7 @@ function UnitCommandBar({
|
|
|
31539
31848
|
className
|
|
31540
31849
|
}) {
|
|
31541
31850
|
const eventBus = useEventBus();
|
|
31542
|
-
const handleCommand =
|
|
31851
|
+
const handleCommand = React94.useCallback(
|
|
31543
31852
|
(event) => {
|
|
31544
31853
|
if (event) {
|
|
31545
31854
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -32090,7 +32399,7 @@ function GameMenu({
|
|
|
32090
32399
|
} catch {
|
|
32091
32400
|
}
|
|
32092
32401
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
32093
|
-
const handleOptionClick =
|
|
32402
|
+
const handleOptionClick = React94.useCallback(
|
|
32094
32403
|
(option) => {
|
|
32095
32404
|
if (option.event && eventBus) {
|
|
32096
32405
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -32209,7 +32518,7 @@ function GameOverScreen({
|
|
|
32209
32518
|
} catch {
|
|
32210
32519
|
}
|
|
32211
32520
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
32212
|
-
const handleActionClick =
|
|
32521
|
+
const handleActionClick = React94.useCallback(
|
|
32213
32522
|
(action) => {
|
|
32214
32523
|
if (action.event && eventBus) {
|
|
32215
32524
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -33141,13 +33450,13 @@ var init_MapView = __esm({
|
|
|
33141
33450
|
shadowSize: [41, 41]
|
|
33142
33451
|
});
|
|
33143
33452
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
33144
|
-
const { useEffect:
|
|
33453
|
+
const { useEffect: useEffect89, useRef: useRef82, useCallback: useCallback133, useState: useState125 } = React94__default;
|
|
33145
33454
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
33146
33455
|
const { useEventBus: useEventBus4 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
33147
33456
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
33148
33457
|
const map = useMap();
|
|
33149
33458
|
const prevRef = useRef82({ centerLat, centerLng, zoom });
|
|
33150
|
-
|
|
33459
|
+
useEffect89(() => {
|
|
33151
33460
|
const prev = prevRef.current;
|
|
33152
33461
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
33153
33462
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -33158,7 +33467,7 @@ var init_MapView = __esm({
|
|
|
33158
33467
|
}
|
|
33159
33468
|
function MapClickHandler({ onMapClick }) {
|
|
33160
33469
|
const map = useMap();
|
|
33161
|
-
|
|
33470
|
+
useEffect89(() => {
|
|
33162
33471
|
if (!onMapClick) return;
|
|
33163
33472
|
const handler = (e) => {
|
|
33164
33473
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -33186,8 +33495,8 @@ var init_MapView = __esm({
|
|
|
33186
33495
|
showAttribution = true
|
|
33187
33496
|
}) {
|
|
33188
33497
|
const eventBus = useEventBus4();
|
|
33189
|
-
const [clickedPosition, setClickedPosition] =
|
|
33190
|
-
const handleMapClick =
|
|
33498
|
+
const [clickedPosition, setClickedPosition] = useState125(null);
|
|
33499
|
+
const handleMapClick = useCallback133((lat, lng) => {
|
|
33191
33500
|
if (showClickedPin) {
|
|
33192
33501
|
setClickedPosition({ lat, lng });
|
|
33193
33502
|
}
|
|
@@ -33196,7 +33505,7 @@ var init_MapView = __esm({
|
|
|
33196
33505
|
eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
|
|
33197
33506
|
}
|
|
33198
33507
|
}, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
|
|
33199
|
-
const handleMarkerClick =
|
|
33508
|
+
const handleMarkerClick = useCallback133((marker) => {
|
|
33200
33509
|
onMarkerClick?.(marker);
|
|
33201
33510
|
if (markerClickEvent) {
|
|
33202
33511
|
eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
|
|
@@ -34047,8 +34356,8 @@ function TableView({
|
|
|
34047
34356
|
}) {
|
|
34048
34357
|
const eventBus = useEventBus();
|
|
34049
34358
|
const { t } = useTranslate();
|
|
34050
|
-
const [visibleCount, setVisibleCount] =
|
|
34051
|
-
const [localSelected, setLocalSelected] =
|
|
34359
|
+
const [visibleCount, setVisibleCount] = React94__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
34360
|
+
const [localSelected, setLocalSelected] = React94__default.useState(/* @__PURE__ */ new Set());
|
|
34052
34361
|
const colDefs = columns ?? fields ?? [];
|
|
34053
34362
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
34054
34363
|
const dnd = useDataDnd({
|
|
@@ -34243,12 +34552,12 @@ function TableView({
|
|
|
34243
34552
|
]
|
|
34244
34553
|
}
|
|
34245
34554
|
);
|
|
34246
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
34555
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React94__default.Fragment, { children: rowInner }, id);
|
|
34247
34556
|
};
|
|
34248
34557
|
const items = data.map((row) => row);
|
|
34249
34558
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
34250
34559
|
let runningIndex = 0;
|
|
34251
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
34560
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
|
|
34252
34561
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
34253
34562
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
34254
34563
|
] }, gi)) });
|
|
@@ -35605,7 +35914,7 @@ var init_StepFlow = __esm({
|
|
|
35605
35914
|
className
|
|
35606
35915
|
}) => {
|
|
35607
35916
|
if (orientation === "vertical") {
|
|
35608
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
35917
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React94__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
35609
35918
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
35610
35919
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
35611
35920
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -35616,7 +35925,7 @@ var init_StepFlow = __esm({
|
|
|
35616
35925
|
] })
|
|
35617
35926
|
] }) }, index)) });
|
|
35618
35927
|
}
|
|
35619
|
-
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(
|
|
35928
|
+
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(React94__default.Fragment, { children: [
|
|
35620
35929
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
35621
35930
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
35622
35931
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -36601,7 +36910,7 @@ var init_LikertScale = __esm({
|
|
|
36601
36910
|
md: "text-base",
|
|
36602
36911
|
lg: "text-lg"
|
|
36603
36912
|
};
|
|
36604
|
-
LikertScale =
|
|
36913
|
+
LikertScale = React94__default.forwardRef(
|
|
36605
36914
|
({
|
|
36606
36915
|
question,
|
|
36607
36916
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -36613,7 +36922,7 @@ var init_LikertScale = __esm({
|
|
|
36613
36922
|
variant = "radios",
|
|
36614
36923
|
className
|
|
36615
36924
|
}, ref) => {
|
|
36616
|
-
const groupId =
|
|
36925
|
+
const groupId = React94__default.useId();
|
|
36617
36926
|
const eventBus = useEventBus();
|
|
36618
36927
|
const handleSelect = useCallback(
|
|
36619
36928
|
(next) => {
|
|
@@ -38895,7 +39204,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
38895
39204
|
"aria-label": t("aria.breadcrumb"),
|
|
38896
39205
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
38897
39206
|
const isLast = idx === items.length - 1;
|
|
38898
|
-
return /* @__PURE__ */ jsxs(
|
|
39207
|
+
return /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
|
|
38899
39208
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
38900
39209
|
Icon,
|
|
38901
39210
|
{
|
|
@@ -39559,7 +39868,7 @@ var init_PageHeader = __esm({
|
|
|
39559
39868
|
info: "bg-info/10 text-info"
|
|
39560
39869
|
};
|
|
39561
39870
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
39562
|
-
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(
|
|
39871
|
+
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(React94__default.Fragment, { children: [
|
|
39563
39872
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
39564
39873
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
39565
39874
|
"a",
|
|
@@ -40288,7 +40597,7 @@ var init_WizardContainer = __esm({
|
|
|
40288
40597
|
const isCompleted = index < currentStep;
|
|
40289
40598
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
40290
40599
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
40291
|
-
return /* @__PURE__ */ jsxs(
|
|
40600
|
+
return /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
|
|
40292
40601
|
/* @__PURE__ */ jsx(
|
|
40293
40602
|
Button,
|
|
40294
40603
|
{
|
|
@@ -42848,7 +43157,7 @@ var init_DetailPanel = __esm({
|
|
|
42848
43157
|
}
|
|
42849
43158
|
});
|
|
42850
43159
|
function extractTitle(children) {
|
|
42851
|
-
if (!
|
|
43160
|
+
if (!React94__default.isValidElement(children)) return void 0;
|
|
42852
43161
|
const props = children.props;
|
|
42853
43162
|
if (typeof props.title === "string") {
|
|
42854
43163
|
return props.title;
|
|
@@ -42903,7 +43212,7 @@ function LinearView({
|
|
|
42903
43212
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
42904
43213
|
const isDone = i < currentIdx;
|
|
42905
43214
|
const isCurrent = i === currentIdx;
|
|
42906
|
-
return /* @__PURE__ */ jsxs(
|
|
43215
|
+
return /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
|
|
42907
43216
|
i > 0 && /* @__PURE__ */ jsx(
|
|
42908
43217
|
Typography,
|
|
42909
43218
|
{
|
|
@@ -43672,6 +43981,42 @@ var init_FeatureGridOrganism = __esm({
|
|
|
43672
43981
|
FeatureGridOrganism.displayName = "FeatureGridOrganism";
|
|
43673
43982
|
}
|
|
43674
43983
|
});
|
|
43984
|
+
function FishingBoard({
|
|
43985
|
+
backgroundImage,
|
|
43986
|
+
assetBaseUrl,
|
|
43987
|
+
scale = 1,
|
|
43988
|
+
showMinimap = false,
|
|
43989
|
+
enableCamera = true,
|
|
43990
|
+
width = 800,
|
|
43991
|
+
height = 600,
|
|
43992
|
+
isLoading,
|
|
43993
|
+
error,
|
|
43994
|
+
className
|
|
43995
|
+
}) {
|
|
43996
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("fishing-board relative w-full h-full", className), children: [
|
|
43997
|
+
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" }) }),
|
|
43998
|
+
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 }) }),
|
|
43999
|
+
/* @__PURE__ */ jsx(
|
|
44000
|
+
GameCanvas2D,
|
|
44001
|
+
{
|
|
44002
|
+
width,
|
|
44003
|
+
height,
|
|
44004
|
+
backgroundImage: backgroundImage ?? "",
|
|
44005
|
+
assetBaseUrl,
|
|
44006
|
+
fps: 60,
|
|
44007
|
+
className: "w-full h-full"
|
|
44008
|
+
}
|
|
44009
|
+
)
|
|
44010
|
+
] });
|
|
44011
|
+
}
|
|
44012
|
+
var init_FishingBoard = __esm({
|
|
44013
|
+
"components/game/organisms/FishingBoard.tsx"() {
|
|
44014
|
+
"use client";
|
|
44015
|
+
init_cn();
|
|
44016
|
+
init_GameCanvas2D();
|
|
44017
|
+
FishingBoard.displayName = "FishingBoard";
|
|
44018
|
+
}
|
|
44019
|
+
});
|
|
43675
44020
|
function toSharedContext2(formCtx) {
|
|
43676
44021
|
return createMinimalContext(
|
|
43677
44022
|
{
|
|
@@ -43853,12 +44198,12 @@ var init_Form = __esm({
|
|
|
43853
44198
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
43854
44199
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
43855
44200
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
43856
|
-
const normalizedInitialData =
|
|
44201
|
+
const normalizedInitialData = React94__default.useMemo(() => {
|
|
43857
44202
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
43858
44203
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
43859
44204
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
43860
44205
|
}, [entity, initialData]);
|
|
43861
|
-
const entityDerivedFields =
|
|
44206
|
+
const entityDerivedFields = React94__default.useMemo(() => {
|
|
43862
44207
|
if (fields && fields.length > 0) return void 0;
|
|
43863
44208
|
if (!resolvedEntity) return void 0;
|
|
43864
44209
|
return resolvedEntity.fields.map(
|
|
@@ -43878,16 +44223,16 @@ var init_Form = __esm({
|
|
|
43878
44223
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
43879
44224
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
43880
44225
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
43881
|
-
const [formData, setFormData] =
|
|
44226
|
+
const [formData, setFormData] = React94__default.useState(
|
|
43882
44227
|
normalizedInitialData
|
|
43883
44228
|
);
|
|
43884
|
-
const [collapsedSections, setCollapsedSections] =
|
|
44229
|
+
const [collapsedSections, setCollapsedSections] = React94__default.useState(
|
|
43885
44230
|
/* @__PURE__ */ new Set()
|
|
43886
44231
|
);
|
|
43887
|
-
const [submitError, setSubmitError] =
|
|
43888
|
-
const formRef =
|
|
44232
|
+
const [submitError, setSubmitError] = React94__default.useState(null);
|
|
44233
|
+
const formRef = React94__default.useRef(null);
|
|
43889
44234
|
const formMode = props.mode;
|
|
43890
|
-
const mountedRef =
|
|
44235
|
+
const mountedRef = React94__default.useRef(false);
|
|
43891
44236
|
if (!mountedRef.current) {
|
|
43892
44237
|
mountedRef.current = true;
|
|
43893
44238
|
debug("forms", "mount", {
|
|
@@ -43900,7 +44245,7 @@ var init_Form = __esm({
|
|
|
43900
44245
|
});
|
|
43901
44246
|
}
|
|
43902
44247
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
43903
|
-
const evalContext =
|
|
44248
|
+
const evalContext = React94__default.useMemo(
|
|
43904
44249
|
() => ({
|
|
43905
44250
|
formValues: formData,
|
|
43906
44251
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -43909,7 +44254,7 @@ var init_Form = __esm({
|
|
|
43909
44254
|
}),
|
|
43910
44255
|
[formData, externalContext]
|
|
43911
44256
|
);
|
|
43912
|
-
|
|
44257
|
+
React94__default.useEffect(() => {
|
|
43913
44258
|
debug("forms", "initialData-sync", {
|
|
43914
44259
|
mode: formMode,
|
|
43915
44260
|
normalizedInitialData,
|
|
@@ -43920,7 +44265,7 @@ var init_Form = __esm({
|
|
|
43920
44265
|
setFormData(normalizedInitialData);
|
|
43921
44266
|
}
|
|
43922
44267
|
}, [normalizedInitialData]);
|
|
43923
|
-
const processCalculations =
|
|
44268
|
+
const processCalculations = React94__default.useCallback(
|
|
43924
44269
|
(changedFieldId, newFormData) => {
|
|
43925
44270
|
if (!hiddenCalculations.length) return;
|
|
43926
44271
|
const context = {
|
|
@@ -43945,7 +44290,7 @@ var init_Form = __esm({
|
|
|
43945
44290
|
},
|
|
43946
44291
|
[hiddenCalculations, externalContext, eventBus]
|
|
43947
44292
|
);
|
|
43948
|
-
const checkViolations =
|
|
44293
|
+
const checkViolations = React94__default.useCallback(
|
|
43949
44294
|
(changedFieldId, newFormData) => {
|
|
43950
44295
|
if (!violationTriggers.length) return;
|
|
43951
44296
|
const context = {
|
|
@@ -43983,7 +44328,7 @@ var init_Form = __esm({
|
|
|
43983
44328
|
processCalculations(name, newFormData);
|
|
43984
44329
|
checkViolations(name, newFormData);
|
|
43985
44330
|
};
|
|
43986
|
-
const isFieldVisible =
|
|
44331
|
+
const isFieldVisible = React94__default.useCallback(
|
|
43987
44332
|
(fieldName) => {
|
|
43988
44333
|
const condition = conditionalFields[fieldName];
|
|
43989
44334
|
if (!condition) return true;
|
|
@@ -43991,7 +44336,7 @@ var init_Form = __esm({
|
|
|
43991
44336
|
},
|
|
43992
44337
|
[conditionalFields, evalContext]
|
|
43993
44338
|
);
|
|
43994
|
-
const isSectionVisible =
|
|
44339
|
+
const isSectionVisible = React94__default.useCallback(
|
|
43995
44340
|
(section) => {
|
|
43996
44341
|
if (!section.condition) return true;
|
|
43997
44342
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -44067,7 +44412,7 @@ var init_Form = __esm({
|
|
|
44067
44412
|
eventBus.emit(`UI:${onCancel}`);
|
|
44068
44413
|
}
|
|
44069
44414
|
};
|
|
44070
|
-
const renderField =
|
|
44415
|
+
const renderField = React94__default.useCallback(
|
|
44071
44416
|
(field) => {
|
|
44072
44417
|
const fieldName = field.name || field.field;
|
|
44073
44418
|
if (!fieldName) return null;
|
|
@@ -44088,7 +44433,7 @@ var init_Form = __esm({
|
|
|
44088
44433
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
44089
44434
|
);
|
|
44090
44435
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
44091
|
-
const normalizedFields =
|
|
44436
|
+
const normalizedFields = React94__default.useMemo(() => {
|
|
44092
44437
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
44093
44438
|
return effectiveFields.map((field) => {
|
|
44094
44439
|
if (typeof field === "string") {
|
|
@@ -44111,7 +44456,7 @@ var init_Form = __esm({
|
|
|
44111
44456
|
return field;
|
|
44112
44457
|
});
|
|
44113
44458
|
}, [effectiveFields, resolvedEntity]);
|
|
44114
|
-
const schemaFields =
|
|
44459
|
+
const schemaFields = React94__default.useMemo(() => {
|
|
44115
44460
|
if (normalizedFields.length === 0) return null;
|
|
44116
44461
|
if (isDebugEnabled()) {
|
|
44117
44462
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -44121,7 +44466,7 @@ var init_Form = __esm({
|
|
|
44121
44466
|
}
|
|
44122
44467
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
44123
44468
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
44124
|
-
const sectionElements =
|
|
44469
|
+
const sectionElements = React94__default.useMemo(() => {
|
|
44125
44470
|
if (!sections || sections.length === 0) return null;
|
|
44126
44471
|
return sections.map((section) => {
|
|
44127
44472
|
if (!isSectionVisible(section)) {
|
|
@@ -45911,9 +46256,9 @@ var init_GameCanvas3D2 = __esm({
|
|
|
45911
46256
|
const color = unit.faction === "player" ? 4491519 : unit.faction === "enemy" ? 16729156 : 16777028;
|
|
45912
46257
|
const hasAtlas = unitAtlasUrl(unit) !== null;
|
|
45913
46258
|
const initialFrame = hasAtlas ? resolveUnitFrame(unit.id) : null;
|
|
45914
|
-
const modelScale = UNIT_BASE_MODEL_SCALE * unitScale;
|
|
45915
|
-
const billboardHeight = UNIT_BASE_BILLBOARD_HEIGHT * unitScale;
|
|
45916
|
-
const primitiveRadius = UNIT_BASE_PRIMITIVE_RADIUS * unitScale;
|
|
46259
|
+
const modelScale = UNIT_BASE_MODEL_SCALE * unitScale * gridConfig.cellSize;
|
|
46260
|
+
const billboardHeight = UNIT_BASE_BILLBOARD_HEIGHT * unitScale * gridConfig.cellSize;
|
|
46261
|
+
const primitiveRadius = UNIT_BASE_PRIMITIVE_RADIUS * unitScale * gridConfig.cellSize;
|
|
45917
46262
|
return /* @__PURE__ */ jsxs(
|
|
45918
46263
|
"group",
|
|
45919
46264
|
{
|
|
@@ -45960,7 +46305,7 @@ var init_GameCanvas3D2 = __esm({
|
|
|
45960
46305
|
/* @__PURE__ */ jsx("meshStandardMaterial", { color })
|
|
45961
46306
|
] })
|
|
45962
46307
|
] }),
|
|
45963
|
-
unit.health !== void 0 && unit.maxHealth !== void 0 && /* @__PURE__ */ jsxs("group", { position: [0,
|
|
46308
|
+
unit.health !== void 0 && unit.maxHealth !== void 0 && /* @__PURE__ */ jsxs("group", { position: [0, billboardHeight, 0], children: [
|
|
45964
46309
|
/* @__PURE__ */ jsxs("mesh", { position: [-0.25, 0, 0], children: [
|
|
45965
46310
|
/* @__PURE__ */ jsx("planeGeometry", { args: [0.5, 0.05] }),
|
|
45966
46311
|
/* @__PURE__ */ jsx("meshBasicMaterial", { color: 3355443 })
|
|
@@ -45989,7 +46334,7 @@ var init_GameCanvas3D2 = __esm({
|
|
|
45989
46334
|
}
|
|
45990
46335
|
);
|
|
45991
46336
|
},
|
|
45992
|
-
[selectedUnitId, handleUnitClick, resolveUnitFrame, unitScale]
|
|
46337
|
+
[selectedUnitId, handleUnitClick, resolveUnitFrame, unitScale, gridConfig]
|
|
45993
46338
|
);
|
|
45994
46339
|
const DefaultFeatureRenderer = useCallback(
|
|
45995
46340
|
({
|
|
@@ -46077,7 +46422,7 @@ var init_GameCanvas3D2 = __esm({
|
|
|
46077
46422
|
{
|
|
46078
46423
|
ref: containerRef,
|
|
46079
46424
|
className: cn("game-canvas-3d relative w-full overflow-hidden", className),
|
|
46080
|
-
style: {
|
|
46425
|
+
style: { flex: "1 1 0", minHeight: "400px" },
|
|
46081
46426
|
"data-orientation": orientation,
|
|
46082
46427
|
"data-camera-mode": cameraMode,
|
|
46083
46428
|
"data-overlay": overlay,
|
|
@@ -46377,13 +46722,39 @@ var init_GameBoard3D = __esm({
|
|
|
46377
46722
|
GameBoard3D.displayName = "GameBoard3D";
|
|
46378
46723
|
}
|
|
46379
46724
|
});
|
|
46380
|
-
|
|
46725
|
+
function getSlotContentRenderer2() {
|
|
46726
|
+
if (_scr) return _scr;
|
|
46727
|
+
const mod = (init_UISlotRenderer(), __toCommonJS(UISlotRenderer_exports));
|
|
46728
|
+
_scr = mod.SlotContentRenderer;
|
|
46729
|
+
return _scr;
|
|
46730
|
+
}
|
|
46731
|
+
function resolveDescriptor(value, idPrefix) {
|
|
46732
|
+
if (value === null || value === void 0) return value;
|
|
46733
|
+
if (React94__default.isValidElement(value)) return value;
|
|
46734
|
+
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
|
|
46735
|
+
if (Array.isArray(value)) {
|
|
46736
|
+
return value.map((item, i) => /* @__PURE__ */ jsx(React94__default.Fragment, { children: resolveDescriptor(item, `${idPrefix}-${i}`) }, i));
|
|
46737
|
+
}
|
|
46738
|
+
if (typeof value === "object") {
|
|
46739
|
+
const rec = value;
|
|
46740
|
+
if (typeof rec.type === "string" && getComponentForPattern(rec.type) !== null) {
|
|
46741
|
+
const { type, props: nestedProps, _id, ...flatProps } = rec;
|
|
46742
|
+
const resolvedProps = nestedProps !== void 0 ? nestedProps : flatProps;
|
|
46743
|
+
const content = { id: _id ?? idPrefix, pattern: type, props: resolvedProps, priority: 0 };
|
|
46744
|
+
const SCR = getSlotContentRenderer2();
|
|
46745
|
+
return /* @__PURE__ */ jsx(SCR, { content, onDismiss: () => void 0 });
|
|
46746
|
+
}
|
|
46747
|
+
}
|
|
46748
|
+
return null;
|
|
46749
|
+
}
|
|
46750
|
+
var _scr, GameShell;
|
|
46381
46751
|
var init_GameShell = __esm({
|
|
46382
46752
|
"components/game/templates/GameShell.tsx"() {
|
|
46383
46753
|
init_cn();
|
|
46384
46754
|
init_Box();
|
|
46385
46755
|
init_Stack();
|
|
46386
46756
|
init_Typography();
|
|
46757
|
+
_scr = null;
|
|
46387
46758
|
GameShell = ({
|
|
46388
46759
|
appName = "Game",
|
|
46389
46760
|
hud,
|
|
@@ -46432,7 +46803,7 @@ var init_GameShell = __esm({
|
|
|
46432
46803
|
children: appName
|
|
46433
46804
|
}
|
|
46434
46805
|
),
|
|
46435
|
-
hud && /* @__PURE__ */ jsx(Box, { className: "game-shell__hud", children: hud })
|
|
46806
|
+
hud && /* @__PURE__ */ jsx(Box, { className: "game-shell__hud", children: resolveDescriptor(hud, "gs-hud") })
|
|
46436
46807
|
]
|
|
46437
46808
|
}
|
|
46438
46809
|
),
|
|
@@ -46445,7 +46816,7 @@ var init_GameShell = __esm({
|
|
|
46445
46816
|
overflow: "hidden",
|
|
46446
46817
|
position: "relative"
|
|
46447
46818
|
},
|
|
46448
|
-
children
|
|
46819
|
+
children: resolveDescriptor(children, "gs-children")
|
|
46449
46820
|
}
|
|
46450
46821
|
)
|
|
46451
46822
|
]
|
|
@@ -46455,7 +46826,32 @@ var init_GameShell = __esm({
|
|
|
46455
46826
|
GameShell.displayName = "GameShell";
|
|
46456
46827
|
}
|
|
46457
46828
|
});
|
|
46458
|
-
|
|
46829
|
+
function getSlotContentRenderer3() {
|
|
46830
|
+
if (_scr2) return _scr2;
|
|
46831
|
+
const mod = (init_UISlotRenderer(), __toCommonJS(UISlotRenderer_exports));
|
|
46832
|
+
_scr2 = mod.SlotContentRenderer;
|
|
46833
|
+
return _scr2;
|
|
46834
|
+
}
|
|
46835
|
+
function resolveDescriptor2(value, idPrefix) {
|
|
46836
|
+
if (value === null || value === void 0) return value;
|
|
46837
|
+
if (React94__default.isValidElement(value)) return value;
|
|
46838
|
+
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
|
|
46839
|
+
if (Array.isArray(value)) {
|
|
46840
|
+
return value.map((item, i) => /* @__PURE__ */ jsx(React94__default.Fragment, { children: resolveDescriptor2(item, `${idPrefix}-${i}`) }, i));
|
|
46841
|
+
}
|
|
46842
|
+
if (typeof value === "object") {
|
|
46843
|
+
const rec = value;
|
|
46844
|
+
if (typeof rec.type === "string" && getComponentForPattern(rec.type) !== null) {
|
|
46845
|
+
const { type, props: nestedProps, _id, ...flatProps } = rec;
|
|
46846
|
+
const resolvedProps = nestedProps !== void 0 ? nestedProps : flatProps;
|
|
46847
|
+
const content = { id: _id ?? idPrefix, pattern: type, props: resolvedProps, priority: 0 };
|
|
46848
|
+
const SCR = getSlotContentRenderer3();
|
|
46849
|
+
return /* @__PURE__ */ jsx(SCR, { content, onDismiss: () => void 0 });
|
|
46850
|
+
}
|
|
46851
|
+
}
|
|
46852
|
+
return null;
|
|
46853
|
+
}
|
|
46854
|
+
var _scr2, GameTemplate;
|
|
46459
46855
|
var init_GameTemplate = __esm({
|
|
46460
46856
|
"components/game/templates/GameTemplate.tsx"() {
|
|
46461
46857
|
init_cn();
|
|
@@ -46463,6 +46859,7 @@ var init_GameTemplate = __esm({
|
|
|
46463
46859
|
init_Stack();
|
|
46464
46860
|
init_Typography();
|
|
46465
46861
|
init_Button();
|
|
46862
|
+
_scr2 = null;
|
|
46466
46863
|
GameTemplate = ({
|
|
46467
46864
|
entity,
|
|
46468
46865
|
title = "Game",
|
|
@@ -46530,13 +46927,13 @@ var init_GameTemplate = __esm({
|
|
|
46530
46927
|
fullWidth: true,
|
|
46531
46928
|
className: "flex-1 bg-muted",
|
|
46532
46929
|
children: [
|
|
46533
|
-
children,
|
|
46930
|
+
resolveDescriptor2(children, "gt-children"),
|
|
46534
46931
|
hud && /* @__PURE__ */ jsx(
|
|
46535
46932
|
Box,
|
|
46536
46933
|
{
|
|
46537
46934
|
position: "absolute",
|
|
46538
46935
|
className: "top-0 left-0 right-0 pointer-events-none",
|
|
46539
|
-
children: /* @__PURE__ */ jsx(Box, { padding: "md", className: "pointer-events-auto w-fit", children: hud })
|
|
46936
|
+
children: /* @__PURE__ */ jsx(Box, { padding: "md", className: "pointer-events-auto w-fit", children: resolveDescriptor2(hud, "gt-hud") })
|
|
46540
46937
|
}
|
|
46541
46938
|
)
|
|
46542
46939
|
]
|
|
@@ -46561,7 +46958,7 @@ var init_GameTemplate = __esm({
|
|
|
46561
46958
|
children: /* @__PURE__ */ jsx(Typography, { variant: "h6", children: "Debug Panel" })
|
|
46562
46959
|
}
|
|
46563
46960
|
),
|
|
46564
|
-
/* @__PURE__ */ jsx(Box, { padding: "md", children: debugPanel })
|
|
46961
|
+
/* @__PURE__ */ jsx(Box, { padding: "md", children: resolveDescriptor2(debugPanel, "gt-debug") })
|
|
46565
46962
|
]
|
|
46566
46963
|
}
|
|
46567
46964
|
)
|
|
@@ -46773,6 +47170,39 @@ var init_HexStrategyBoard = __esm({
|
|
|
46773
47170
|
HexStrategyBoard.displayName = "HexStrategyBoard";
|
|
46774
47171
|
}
|
|
46775
47172
|
});
|
|
47173
|
+
function HolidayRunnerBoard({
|
|
47174
|
+
backgroundImage,
|
|
47175
|
+
assetBaseUrl,
|
|
47176
|
+
width = 800,
|
|
47177
|
+
height = 400,
|
|
47178
|
+
fps = 60,
|
|
47179
|
+
isLoading,
|
|
47180
|
+
error,
|
|
47181
|
+
className
|
|
47182
|
+
}) {
|
|
47183
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("holiday-runner-board relative w-full h-full", className), children: [
|
|
47184
|
+
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" }) }),
|
|
47185
|
+
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 }) }),
|
|
47186
|
+
/* @__PURE__ */ jsx(
|
|
47187
|
+
GameCanvas2D,
|
|
47188
|
+
{
|
|
47189
|
+
width,
|
|
47190
|
+
height,
|
|
47191
|
+
fps,
|
|
47192
|
+
backgroundImage: backgroundImage ?? "",
|
|
47193
|
+
assetBaseUrl
|
|
47194
|
+
}
|
|
47195
|
+
)
|
|
47196
|
+
] });
|
|
47197
|
+
}
|
|
47198
|
+
var init_HolidayRunnerBoard = __esm({
|
|
47199
|
+
"components/game/organisms/HolidayRunnerBoard.tsx"() {
|
|
47200
|
+
"use client";
|
|
47201
|
+
init_cn();
|
|
47202
|
+
init_GameCanvas2D();
|
|
47203
|
+
HolidayRunnerBoard.displayName = "HolidayRunnerBoard";
|
|
47204
|
+
}
|
|
47205
|
+
});
|
|
46776
47206
|
var LandingPageTemplate;
|
|
46777
47207
|
var init_LandingPageTemplate = __esm({
|
|
46778
47208
|
"components/marketing/templates/LandingPageTemplate.tsx"() {
|
|
@@ -47108,7 +47538,7 @@ var init_List = __esm({
|
|
|
47108
47538
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
47109
47539
|
return [];
|
|
47110
47540
|
}, [entity]);
|
|
47111
|
-
const getItemActions =
|
|
47541
|
+
const getItemActions = React94__default.useCallback(
|
|
47112
47542
|
(item) => {
|
|
47113
47543
|
if (!itemActions) return [];
|
|
47114
47544
|
if (typeof itemActions === "function") {
|
|
@@ -47527,6 +47957,48 @@ var init_MasterDetailLayout = __esm({
|
|
|
47527
47957
|
MasterDetailLayout.displayName = "MasterDetailLayout";
|
|
47528
47958
|
}
|
|
47529
47959
|
});
|
|
47960
|
+
function MatchPuzzleBoard({
|
|
47961
|
+
tiles,
|
|
47962
|
+
units,
|
|
47963
|
+
features,
|
|
47964
|
+
assetManifest,
|
|
47965
|
+
assetBaseUrl,
|
|
47966
|
+
scale = 0.45,
|
|
47967
|
+
showMinimap = false,
|
|
47968
|
+
enableCamera = false,
|
|
47969
|
+
tileClickEvent,
|
|
47970
|
+
unitClickEvent,
|
|
47971
|
+
isLoading,
|
|
47972
|
+
error,
|
|
47973
|
+
className
|
|
47974
|
+
}) {
|
|
47975
|
+
return /* @__PURE__ */ jsx("div", { className: cn("match-puzzle-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
47976
|
+
IsometricCanvas_default,
|
|
47977
|
+
{
|
|
47978
|
+
tileLayout: "flat",
|
|
47979
|
+
tiles,
|
|
47980
|
+
units,
|
|
47981
|
+
features,
|
|
47982
|
+
assetManifest,
|
|
47983
|
+
assetBaseUrl,
|
|
47984
|
+
scale,
|
|
47985
|
+
showMinimap,
|
|
47986
|
+
enableCamera,
|
|
47987
|
+
tileClickEvent,
|
|
47988
|
+
unitClickEvent,
|
|
47989
|
+
isLoading,
|
|
47990
|
+
error
|
|
47991
|
+
}
|
|
47992
|
+
) });
|
|
47993
|
+
}
|
|
47994
|
+
var init_MatchPuzzleBoard = __esm({
|
|
47995
|
+
"components/game/organisms/MatchPuzzleBoard.tsx"() {
|
|
47996
|
+
"use client";
|
|
47997
|
+
init_cn();
|
|
47998
|
+
init_IsometricCanvas();
|
|
47999
|
+
MatchPuzzleBoard.displayName = "MatchPuzzleBoard";
|
|
48000
|
+
}
|
|
48001
|
+
});
|
|
47530
48002
|
var COLUMN_CLASSES, ASPECT_CLASSES, MediaGallery;
|
|
47531
48003
|
var init_MediaGallery = __esm({
|
|
47532
48004
|
"components/core/organisms/MediaGallery.tsx"() {
|
|
@@ -47584,7 +48056,7 @@ var init_MediaGallery = __esm({
|
|
|
47584
48056
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
47585
48057
|
);
|
|
47586
48058
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
47587
|
-
const items =
|
|
48059
|
+
const items = React94__default.useMemo(() => {
|
|
47588
48060
|
if (propItems) return propItems;
|
|
47589
48061
|
if (entityData.length === 0) return [];
|
|
47590
48062
|
return entityData.map((record, idx) => ({
|
|
@@ -47744,8 +48216,50 @@ var init_MediaGallery = __esm({
|
|
|
47744
48216
|
MediaGallery.displayName = "MediaGallery";
|
|
47745
48217
|
}
|
|
47746
48218
|
});
|
|
48219
|
+
function MinigolfBoard({
|
|
48220
|
+
tiles,
|
|
48221
|
+
units,
|
|
48222
|
+
features,
|
|
48223
|
+
assetManifest,
|
|
48224
|
+
assetBaseUrl,
|
|
48225
|
+
scale = 0.45,
|
|
48226
|
+
showMinimap = true,
|
|
48227
|
+
enableCamera = true,
|
|
48228
|
+
tileClickEvent,
|
|
48229
|
+
unitClickEvent,
|
|
48230
|
+
isLoading,
|
|
48231
|
+
error,
|
|
48232
|
+
className
|
|
48233
|
+
}) {
|
|
48234
|
+
return /* @__PURE__ */ jsx("div", { className: cn("minigolf-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
48235
|
+
IsometricCanvas_default,
|
|
48236
|
+
{
|
|
48237
|
+
tileLayout: "isometric",
|
|
48238
|
+
tiles,
|
|
48239
|
+
units,
|
|
48240
|
+
features,
|
|
48241
|
+
assetManifest,
|
|
48242
|
+
assetBaseUrl,
|
|
48243
|
+
scale,
|
|
48244
|
+
showMinimap,
|
|
48245
|
+
enableCamera,
|
|
48246
|
+
tileClickEvent,
|
|
48247
|
+
unitClickEvent,
|
|
48248
|
+
isLoading,
|
|
48249
|
+
error
|
|
48250
|
+
}
|
|
48251
|
+
) });
|
|
48252
|
+
}
|
|
48253
|
+
var init_MinigolfBoard = __esm({
|
|
48254
|
+
"components/game/organisms/MinigolfBoard.tsx"() {
|
|
48255
|
+
"use client";
|
|
48256
|
+
init_cn();
|
|
48257
|
+
init_IsometricCanvas();
|
|
48258
|
+
MinigolfBoard.displayName = "MinigolfBoard";
|
|
48259
|
+
}
|
|
48260
|
+
});
|
|
47747
48261
|
function extractTitle2(children) {
|
|
47748
|
-
if (!
|
|
48262
|
+
if (!React94__default.isValidElement(children)) return void 0;
|
|
47749
48263
|
const props = children.props;
|
|
47750
48264
|
if (typeof props.title === "string") {
|
|
47751
48265
|
return props.title;
|
|
@@ -47961,6 +48475,87 @@ var init_NegotiatorBoard = __esm({
|
|
|
47961
48475
|
NegotiatorBoard.displayName = "NegotiatorBoard";
|
|
47962
48476
|
}
|
|
47963
48477
|
});
|
|
48478
|
+
function PinballBoard({
|
|
48479
|
+
tiles: _tiles,
|
|
48480
|
+
units: _units,
|
|
48481
|
+
features: _features,
|
|
48482
|
+
assetManifest: _assetManifest,
|
|
48483
|
+
assetBaseUrl,
|
|
48484
|
+
scale = 1,
|
|
48485
|
+
showMinimap: _showMinimap = false,
|
|
48486
|
+
enableCamera: _enableCamera = false,
|
|
48487
|
+
tileClickEvent: _tileClickEvent,
|
|
48488
|
+
unitClickEvent: _unitClickEvent,
|
|
48489
|
+
isLoading,
|
|
48490
|
+
error,
|
|
48491
|
+
className
|
|
48492
|
+
}) {
|
|
48493
|
+
if (isLoading) {
|
|
48494
|
+
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..." }) });
|
|
48495
|
+
}
|
|
48496
|
+
if (error) {
|
|
48497
|
+
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 }) });
|
|
48498
|
+
}
|
|
48499
|
+
return /* @__PURE__ */ jsx("div", { className: cn("pinball-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
48500
|
+
GameCanvas2D,
|
|
48501
|
+
{
|
|
48502
|
+
width: Math.round(400 * scale),
|
|
48503
|
+
height: Math.round(800 * scale),
|
|
48504
|
+
assetBaseUrl,
|
|
48505
|
+
fps: 60
|
|
48506
|
+
}
|
|
48507
|
+
) });
|
|
48508
|
+
}
|
|
48509
|
+
var init_PinballBoard = __esm({
|
|
48510
|
+
"components/game/organisms/PinballBoard.tsx"() {
|
|
48511
|
+
"use client";
|
|
48512
|
+
init_cn();
|
|
48513
|
+
init_GameCanvas2D();
|
|
48514
|
+
PinballBoard.displayName = "PinballBoard";
|
|
48515
|
+
}
|
|
48516
|
+
});
|
|
48517
|
+
function PirateBoard({
|
|
48518
|
+
tiles,
|
|
48519
|
+
units,
|
|
48520
|
+
features,
|
|
48521
|
+
assetManifest,
|
|
48522
|
+
assetBaseUrl,
|
|
48523
|
+
scale = 0.45,
|
|
48524
|
+
showMinimap = true,
|
|
48525
|
+
enableCamera = true,
|
|
48526
|
+
tileClickEvent,
|
|
48527
|
+
unitClickEvent,
|
|
48528
|
+
isLoading,
|
|
48529
|
+
error,
|
|
48530
|
+
className
|
|
48531
|
+
}) {
|
|
48532
|
+
return /* @__PURE__ */ jsx("div", { className: cn("pirate-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
48533
|
+
IsometricCanvas_default,
|
|
48534
|
+
{
|
|
48535
|
+
tileLayout: "flat",
|
|
48536
|
+
tiles,
|
|
48537
|
+
units,
|
|
48538
|
+
features,
|
|
48539
|
+
assetManifest,
|
|
48540
|
+
assetBaseUrl,
|
|
48541
|
+
scale,
|
|
48542
|
+
showMinimap,
|
|
48543
|
+
enableCamera,
|
|
48544
|
+
tileClickEvent,
|
|
48545
|
+
unitClickEvent,
|
|
48546
|
+
isLoading,
|
|
48547
|
+
error
|
|
48548
|
+
}
|
|
48549
|
+
) });
|
|
48550
|
+
}
|
|
48551
|
+
var init_PirateBoard = __esm({
|
|
48552
|
+
"components/game/organisms/PirateBoard.tsx"() {
|
|
48553
|
+
"use client";
|
|
48554
|
+
init_cn();
|
|
48555
|
+
init_IsometricCanvas();
|
|
48556
|
+
PirateBoard.displayName = "PirateBoard";
|
|
48557
|
+
}
|
|
48558
|
+
});
|
|
47964
48559
|
function resolveEntity(entity) {
|
|
47965
48560
|
if (!entity) return {};
|
|
47966
48561
|
if (Array.isArray(entity)) return entity[0] ?? {};
|
|
@@ -48321,6 +48916,37 @@ var init_PricingPageTemplate = __esm({
|
|
|
48321
48916
|
PricingPageTemplate.displayName = "PricingPageTemplate";
|
|
48322
48917
|
}
|
|
48323
48918
|
});
|
|
48919
|
+
function RacingBoard({
|
|
48920
|
+
backgroundImage,
|
|
48921
|
+
assetBaseUrl,
|
|
48922
|
+
width = 800,
|
|
48923
|
+
height = 600,
|
|
48924
|
+
fps = 60,
|
|
48925
|
+
tickEvent,
|
|
48926
|
+
drawEvent,
|
|
48927
|
+
className
|
|
48928
|
+
}) {
|
|
48929
|
+
return /* @__PURE__ */ jsx("div", { className: cn("racing-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
48930
|
+
GameCanvas2D,
|
|
48931
|
+
{
|
|
48932
|
+
backgroundImage,
|
|
48933
|
+
assetBaseUrl,
|
|
48934
|
+
width,
|
|
48935
|
+
height,
|
|
48936
|
+
fps,
|
|
48937
|
+
tickEvent: typeof tickEvent === "string" ? tickEvent : void 0,
|
|
48938
|
+
drawEvent: typeof drawEvent === "string" ? drawEvent : void 0
|
|
48939
|
+
}
|
|
48940
|
+
) });
|
|
48941
|
+
}
|
|
48942
|
+
var init_RacingBoard = __esm({
|
|
48943
|
+
"components/game/organisms/RacingBoard.tsx"() {
|
|
48944
|
+
"use client";
|
|
48945
|
+
init_cn();
|
|
48946
|
+
init_GameCanvas2D();
|
|
48947
|
+
RacingBoard.displayName = "RacingBoard";
|
|
48948
|
+
}
|
|
48949
|
+
});
|
|
48324
48950
|
function resolveManifestUrl3(manifest, relative) {
|
|
48325
48951
|
if (relative == null) return void 0;
|
|
48326
48952
|
if (/^https?:\/\//.test(relative)) return relative;
|
|
@@ -48815,7 +49441,7 @@ var init_debugRegistry = __esm({
|
|
|
48815
49441
|
}
|
|
48816
49442
|
});
|
|
48817
49443
|
function useDebugData() {
|
|
48818
|
-
const [data, setData] =
|
|
49444
|
+
const [data, setData] = React94.useState(() => ({
|
|
48819
49445
|
traits: [],
|
|
48820
49446
|
ticks: [],
|
|
48821
49447
|
guards: [],
|
|
@@ -48829,7 +49455,7 @@ function useDebugData() {
|
|
|
48829
49455
|
},
|
|
48830
49456
|
lastUpdate: Date.now()
|
|
48831
49457
|
}));
|
|
48832
|
-
|
|
49458
|
+
React94.useEffect(() => {
|
|
48833
49459
|
const updateData = () => {
|
|
48834
49460
|
setData({
|
|
48835
49461
|
traits: getAllTraits(),
|
|
@@ -48938,12 +49564,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
48938
49564
|
return positions;
|
|
48939
49565
|
}
|
|
48940
49566
|
function WalkMinimap() {
|
|
48941
|
-
const [walkStep, setWalkStep] =
|
|
48942
|
-
const [traits2, setTraits] =
|
|
48943
|
-
const [coveredEdges, setCoveredEdges] =
|
|
48944
|
-
const [completedTraits, setCompletedTraits] =
|
|
48945
|
-
const prevTraitRef =
|
|
48946
|
-
|
|
49567
|
+
const [walkStep, setWalkStep] = React94.useState(null);
|
|
49568
|
+
const [traits2, setTraits] = React94.useState([]);
|
|
49569
|
+
const [coveredEdges, setCoveredEdges] = React94.useState([]);
|
|
49570
|
+
const [completedTraits, setCompletedTraits] = React94.useState(/* @__PURE__ */ new Set());
|
|
49571
|
+
const prevTraitRef = React94.useRef(null);
|
|
49572
|
+
React94.useEffect(() => {
|
|
48947
49573
|
const interval = setInterval(() => {
|
|
48948
49574
|
const w = window;
|
|
48949
49575
|
const step = w.__orbitalWalkStep;
|
|
@@ -49379,15 +50005,15 @@ var init_EntitiesTab = __esm({
|
|
|
49379
50005
|
});
|
|
49380
50006
|
function EventFlowTab({ events: events2 }) {
|
|
49381
50007
|
const { t } = useTranslate();
|
|
49382
|
-
const [filter, setFilter] =
|
|
49383
|
-
const containerRef =
|
|
49384
|
-
const [autoScroll, setAutoScroll] =
|
|
49385
|
-
|
|
50008
|
+
const [filter, setFilter] = React94.useState("all");
|
|
50009
|
+
const containerRef = React94.useRef(null);
|
|
50010
|
+
const [autoScroll, setAutoScroll] = React94.useState(true);
|
|
50011
|
+
React94.useEffect(() => {
|
|
49386
50012
|
if (autoScroll && containerRef.current) {
|
|
49387
50013
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
49388
50014
|
}
|
|
49389
50015
|
}, [events2.length, autoScroll]);
|
|
49390
|
-
const filteredEvents =
|
|
50016
|
+
const filteredEvents = React94.useMemo(() => {
|
|
49391
50017
|
if (filter === "all") return events2;
|
|
49392
50018
|
return events2.filter((e) => e.type === filter);
|
|
49393
50019
|
}, [events2, filter]);
|
|
@@ -49503,7 +50129,7 @@ var init_EventFlowTab = __esm({
|
|
|
49503
50129
|
});
|
|
49504
50130
|
function GuardsPanel({ guards }) {
|
|
49505
50131
|
const { t } = useTranslate();
|
|
49506
|
-
const [filter, setFilter] =
|
|
50132
|
+
const [filter, setFilter] = React94.useState("all");
|
|
49507
50133
|
if (guards.length === 0) {
|
|
49508
50134
|
return /* @__PURE__ */ jsx(
|
|
49509
50135
|
EmptyState,
|
|
@@ -49516,7 +50142,7 @@ function GuardsPanel({ guards }) {
|
|
|
49516
50142
|
}
|
|
49517
50143
|
const passedCount = guards.filter((g) => g.result).length;
|
|
49518
50144
|
const failedCount = guards.length - passedCount;
|
|
49519
|
-
const filteredGuards =
|
|
50145
|
+
const filteredGuards = React94.useMemo(() => {
|
|
49520
50146
|
if (filter === "all") return guards;
|
|
49521
50147
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
49522
50148
|
return guards.filter((g) => !g.result);
|
|
@@ -49679,10 +50305,10 @@ function EffectBadge({ effect }) {
|
|
|
49679
50305
|
}
|
|
49680
50306
|
function TransitionTimeline({ transitions }) {
|
|
49681
50307
|
const { t } = useTranslate();
|
|
49682
|
-
const containerRef =
|
|
49683
|
-
const [autoScroll, setAutoScroll] =
|
|
49684
|
-
const [expandedId, setExpandedId] =
|
|
49685
|
-
|
|
50308
|
+
const containerRef = React94.useRef(null);
|
|
50309
|
+
const [autoScroll, setAutoScroll] = React94.useState(true);
|
|
50310
|
+
const [expandedId, setExpandedId] = React94.useState(null);
|
|
50311
|
+
React94.useEffect(() => {
|
|
49686
50312
|
if (autoScroll && containerRef.current) {
|
|
49687
50313
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
49688
50314
|
}
|
|
@@ -49962,9 +50588,9 @@ function getAllEvents(traits2) {
|
|
|
49962
50588
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
49963
50589
|
const eventBus = useEventBus();
|
|
49964
50590
|
const { t } = useTranslate();
|
|
49965
|
-
const [log15, setLog] =
|
|
49966
|
-
const prevStatesRef =
|
|
49967
|
-
|
|
50591
|
+
const [log15, setLog] = React94.useState([]);
|
|
50592
|
+
const prevStatesRef = React94.useRef(/* @__PURE__ */ new Map());
|
|
50593
|
+
React94.useEffect(() => {
|
|
49968
50594
|
for (const trait of traits2) {
|
|
49969
50595
|
const prev = prevStatesRef.current.get(trait.id);
|
|
49970
50596
|
if (prev && prev !== trait.currentState) {
|
|
@@ -50133,10 +50759,10 @@ function VerifyModePanel({
|
|
|
50133
50759
|
localCount
|
|
50134
50760
|
}) {
|
|
50135
50761
|
const { t } = useTranslate();
|
|
50136
|
-
const [expanded, setExpanded] =
|
|
50137
|
-
const scrollRef =
|
|
50138
|
-
const prevCountRef =
|
|
50139
|
-
|
|
50762
|
+
const [expanded, setExpanded] = React94.useState(true);
|
|
50763
|
+
const scrollRef = React94.useRef(null);
|
|
50764
|
+
const prevCountRef = React94.useRef(0);
|
|
50765
|
+
React94.useEffect(() => {
|
|
50140
50766
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
50141
50767
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
50142
50768
|
}
|
|
@@ -50193,10 +50819,10 @@ function RuntimeDebugger({
|
|
|
50193
50819
|
schema
|
|
50194
50820
|
}) {
|
|
50195
50821
|
const { t } = useTranslate();
|
|
50196
|
-
const [isCollapsed, setIsCollapsed] =
|
|
50197
|
-
const [isVisible, setIsVisible] =
|
|
50822
|
+
const [isCollapsed, setIsCollapsed] = React94.useState(mode === "verify" ? true : defaultCollapsed);
|
|
50823
|
+
const [isVisible, setIsVisible] = React94.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
50198
50824
|
const debugData = useDebugData();
|
|
50199
|
-
|
|
50825
|
+
React94.useEffect(() => {
|
|
50200
50826
|
if (mode === "inline") return;
|
|
50201
50827
|
return onDebugToggle((enabled) => {
|
|
50202
50828
|
setIsVisible(enabled);
|
|
@@ -50205,7 +50831,7 @@ function RuntimeDebugger({
|
|
|
50205
50831
|
}
|
|
50206
50832
|
});
|
|
50207
50833
|
}, [mode]);
|
|
50208
|
-
|
|
50834
|
+
React94.useEffect(() => {
|
|
50209
50835
|
if (mode === "inline") return;
|
|
50210
50836
|
const handleKeyDown = (e) => {
|
|
50211
50837
|
if (e.key === "`" && isVisible) {
|
|
@@ -50765,7 +51391,7 @@ function SequenceBar({
|
|
|
50765
51391
|
onSlotRemove(index);
|
|
50766
51392
|
}, [onSlotRemove, playing]);
|
|
50767
51393
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
50768
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
51394
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
|
|
50769
51395
|
i > 0 && /* @__PURE__ */ jsx(
|
|
50770
51396
|
Typography,
|
|
50771
51397
|
{
|
|
@@ -51526,6 +52152,123 @@ var init_SimulatorBoard = __esm({
|
|
|
51526
52152
|
SimulatorBoard.displayName = "SimulatorBoard";
|
|
51527
52153
|
}
|
|
51528
52154
|
});
|
|
52155
|
+
function SokobanBoard({
|
|
52156
|
+
tiles,
|
|
52157
|
+
units,
|
|
52158
|
+
features,
|
|
52159
|
+
assetManifest,
|
|
52160
|
+
assetBaseUrl,
|
|
52161
|
+
scale = 0.45,
|
|
52162
|
+
showMinimap = false,
|
|
52163
|
+
enableCamera = false,
|
|
52164
|
+
tileClickEvent,
|
|
52165
|
+
unitClickEvent,
|
|
52166
|
+
isLoading,
|
|
52167
|
+
error,
|
|
52168
|
+
className
|
|
52169
|
+
}) {
|
|
52170
|
+
return /* @__PURE__ */ jsx("div", { className: cn("sokoban-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
52171
|
+
IsometricCanvas_default,
|
|
52172
|
+
{
|
|
52173
|
+
tileLayout: "flat",
|
|
52174
|
+
tiles,
|
|
52175
|
+
units,
|
|
52176
|
+
features,
|
|
52177
|
+
assetManifest,
|
|
52178
|
+
assetBaseUrl,
|
|
52179
|
+
scale,
|
|
52180
|
+
showMinimap,
|
|
52181
|
+
enableCamera,
|
|
52182
|
+
tileClickEvent,
|
|
52183
|
+
unitClickEvent,
|
|
52184
|
+
isLoading,
|
|
52185
|
+
error
|
|
52186
|
+
}
|
|
52187
|
+
) });
|
|
52188
|
+
}
|
|
52189
|
+
var init_SokobanBoard = __esm({
|
|
52190
|
+
"components/game/organisms/SokobanBoard.tsx"() {
|
|
52191
|
+
"use client";
|
|
52192
|
+
init_cn();
|
|
52193
|
+
init_IsometricCanvas();
|
|
52194
|
+
SokobanBoard.displayName = "SokobanBoard";
|
|
52195
|
+
}
|
|
52196
|
+
});
|
|
52197
|
+
function SpaceShmupBoard({
|
|
52198
|
+
backgroundImage,
|
|
52199
|
+
assetBaseUrl,
|
|
52200
|
+
width = 800,
|
|
52201
|
+
height = 600,
|
|
52202
|
+
fps = 60,
|
|
52203
|
+
isLoading,
|
|
52204
|
+
error,
|
|
52205
|
+
className
|
|
52206
|
+
}) {
|
|
52207
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("space-shmup-board relative w-full h-full", className), children: [
|
|
52208
|
+
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" }) }),
|
|
52209
|
+
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 }) }),
|
|
52210
|
+
/* @__PURE__ */ jsx(
|
|
52211
|
+
GameCanvas2D,
|
|
52212
|
+
{
|
|
52213
|
+
backgroundImage,
|
|
52214
|
+
assetBaseUrl,
|
|
52215
|
+
width,
|
|
52216
|
+
height,
|
|
52217
|
+
fps
|
|
52218
|
+
}
|
|
52219
|
+
)
|
|
52220
|
+
] });
|
|
52221
|
+
}
|
|
52222
|
+
var init_SpaceShmupBoard = __esm({
|
|
52223
|
+
"components/game/organisms/SpaceShmupBoard.tsx"() {
|
|
52224
|
+
"use client";
|
|
52225
|
+
init_cn();
|
|
52226
|
+
init_GameCanvas2D();
|
|
52227
|
+
SpaceShmupBoard.displayName = "SpaceShmupBoard";
|
|
52228
|
+
}
|
|
52229
|
+
});
|
|
52230
|
+
function SpaceStationBoard({
|
|
52231
|
+
tiles,
|
|
52232
|
+
units,
|
|
52233
|
+
features,
|
|
52234
|
+
assetManifest,
|
|
52235
|
+
assetBaseUrl,
|
|
52236
|
+
scale = 0.45,
|
|
52237
|
+
showMinimap = true,
|
|
52238
|
+
enableCamera = true,
|
|
52239
|
+
tileClickEvent,
|
|
52240
|
+
unitClickEvent,
|
|
52241
|
+
isLoading,
|
|
52242
|
+
error,
|
|
52243
|
+
className
|
|
52244
|
+
}) {
|
|
52245
|
+
return /* @__PURE__ */ jsx("div", { className: cn("space-station-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
52246
|
+
IsometricCanvas_default,
|
|
52247
|
+
{
|
|
52248
|
+
tileLayout: "isometric",
|
|
52249
|
+
tiles,
|
|
52250
|
+
units,
|
|
52251
|
+
features,
|
|
52252
|
+
assetManifest,
|
|
52253
|
+
assetBaseUrl,
|
|
52254
|
+
scale,
|
|
52255
|
+
showMinimap,
|
|
52256
|
+
enableCamera,
|
|
52257
|
+
tileClickEvent,
|
|
52258
|
+
unitClickEvent,
|
|
52259
|
+
isLoading,
|
|
52260
|
+
error
|
|
52261
|
+
}
|
|
52262
|
+
) });
|
|
52263
|
+
}
|
|
52264
|
+
var init_SpaceStationBoard = __esm({
|
|
52265
|
+
"components/game/organisms/SpaceStationBoard.tsx"() {
|
|
52266
|
+
"use client";
|
|
52267
|
+
init_cn();
|
|
52268
|
+
init_IsometricCanvas();
|
|
52269
|
+
SpaceStationBoard.displayName = "SpaceStationBoard";
|
|
52270
|
+
}
|
|
52271
|
+
});
|
|
51529
52272
|
var SplitPane;
|
|
51530
52273
|
var init_SplitPane = __esm({
|
|
51531
52274
|
"components/core/organisms/layout/SplitPane.tsx"() {
|
|
@@ -51619,6 +52362,48 @@ var init_SplitPane = __esm({
|
|
|
51619
52362
|
SplitPane.displayName = "SplitPane";
|
|
51620
52363
|
}
|
|
51621
52364
|
});
|
|
52365
|
+
function SportsBoard({
|
|
52366
|
+
tiles,
|
|
52367
|
+
units,
|
|
52368
|
+
features,
|
|
52369
|
+
assetManifest,
|
|
52370
|
+
assetBaseUrl,
|
|
52371
|
+
scale = 0.45,
|
|
52372
|
+
showMinimap = false,
|
|
52373
|
+
enableCamera = true,
|
|
52374
|
+
tileClickEvent,
|
|
52375
|
+
unitClickEvent,
|
|
52376
|
+
isLoading,
|
|
52377
|
+
error,
|
|
52378
|
+
className
|
|
52379
|
+
}) {
|
|
52380
|
+
return /* @__PURE__ */ jsx("div", { className: cn("sports-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
52381
|
+
IsometricCanvas_default,
|
|
52382
|
+
{
|
|
52383
|
+
tileLayout: "flat",
|
|
52384
|
+
tiles,
|
|
52385
|
+
units,
|
|
52386
|
+
features,
|
|
52387
|
+
assetManifest,
|
|
52388
|
+
assetBaseUrl,
|
|
52389
|
+
scale,
|
|
52390
|
+
showMinimap,
|
|
52391
|
+
enableCamera,
|
|
52392
|
+
tileClickEvent,
|
|
52393
|
+
unitClickEvent,
|
|
52394
|
+
isLoading,
|
|
52395
|
+
error
|
|
52396
|
+
}
|
|
52397
|
+
) });
|
|
52398
|
+
}
|
|
52399
|
+
var init_SportsBoard = __esm({
|
|
52400
|
+
"components/game/organisms/SportsBoard.tsx"() {
|
|
52401
|
+
"use client";
|
|
52402
|
+
init_cn();
|
|
52403
|
+
init_IsometricCanvas();
|
|
52404
|
+
SportsBoard.displayName = "SportsBoard";
|
|
52405
|
+
}
|
|
52406
|
+
});
|
|
51622
52407
|
var StatCard;
|
|
51623
52408
|
var init_StatCard = __esm({
|
|
51624
52409
|
"components/core/organisms/StatCard.tsx"() {
|
|
@@ -51657,7 +52442,7 @@ var init_StatCard = __esm({
|
|
|
51657
52442
|
const labelToUse = propLabel ?? propTitle;
|
|
51658
52443
|
const eventBus = useEventBus();
|
|
51659
52444
|
const { t } = useTranslate();
|
|
51660
|
-
const handleActionClick =
|
|
52445
|
+
const handleActionClick = React94__default.useCallback(() => {
|
|
51661
52446
|
if (action?.event) {
|
|
51662
52447
|
eventBus.emit(`UI:${action.event}`, {});
|
|
51663
52448
|
}
|
|
@@ -51668,7 +52453,7 @@ var init_StatCard = __esm({
|
|
|
51668
52453
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
51669
52454
|
const isLoading = externalLoading ?? false;
|
|
51670
52455
|
const error = externalError;
|
|
51671
|
-
const computeMetricValue =
|
|
52456
|
+
const computeMetricValue = React94__default.useCallback(
|
|
51672
52457
|
(metric, items) => {
|
|
51673
52458
|
if (metric.value !== void 0) {
|
|
51674
52459
|
return metric.value;
|
|
@@ -51707,7 +52492,7 @@ var init_StatCard = __esm({
|
|
|
51707
52492
|
},
|
|
51708
52493
|
[]
|
|
51709
52494
|
);
|
|
51710
|
-
const schemaStats =
|
|
52495
|
+
const schemaStats = React94__default.useMemo(() => {
|
|
51711
52496
|
if (!metrics || metrics.length === 0) return null;
|
|
51712
52497
|
return metrics.map((metric) => ({
|
|
51713
52498
|
label: metric.label,
|
|
@@ -51715,7 +52500,7 @@ var init_StatCard = __esm({
|
|
|
51715
52500
|
format: metric.format
|
|
51716
52501
|
}));
|
|
51717
52502
|
}, [metrics, data, computeMetricValue]);
|
|
51718
|
-
const calculatedTrend =
|
|
52503
|
+
const calculatedTrend = React94__default.useMemo(() => {
|
|
51719
52504
|
if (manualTrend !== void 0) return manualTrend;
|
|
51720
52505
|
if (previousValue === void 0 || currentValue === void 0)
|
|
51721
52506
|
return void 0;
|
|
@@ -52464,6 +53249,832 @@ var init_StepFlowOrganism = __esm({
|
|
|
52464
53249
|
StepFlowOrganism.displayName = "StepFlowOrganism";
|
|
52465
53250
|
}
|
|
52466
53251
|
});
|
|
53252
|
+
|
|
53253
|
+
// components/core/molecules/markdown/index.ts
|
|
53254
|
+
var init_markdown = __esm({
|
|
53255
|
+
"components/core/molecules/markdown/index.ts"() {
|
|
53256
|
+
init_MarkdownContent();
|
|
53257
|
+
init_CodeBlock();
|
|
53258
|
+
}
|
|
53259
|
+
});
|
|
53260
|
+
function groupByOrbital(subagents) {
|
|
53261
|
+
const map = /* @__PURE__ */ new Map();
|
|
53262
|
+
for (const sub of subagents) {
|
|
53263
|
+
const key = sub.orbitalName ?? "(unattached)";
|
|
53264
|
+
const arr = map.get(key) ?? [];
|
|
53265
|
+
arr.push(sub);
|
|
53266
|
+
map.set(key, arr);
|
|
53267
|
+
}
|
|
53268
|
+
return map;
|
|
53269
|
+
}
|
|
53270
|
+
function statusIconName(status) {
|
|
53271
|
+
switch (status) {
|
|
53272
|
+
case "running":
|
|
53273
|
+
return "loader";
|
|
53274
|
+
case "complete":
|
|
53275
|
+
return "check";
|
|
53276
|
+
case "error":
|
|
53277
|
+
return "x";
|
|
53278
|
+
default:
|
|
53279
|
+
return "circle";
|
|
53280
|
+
}
|
|
53281
|
+
}
|
|
53282
|
+
function lastMessage(sub) {
|
|
53283
|
+
if (sub.messages.length === 0) return void 0;
|
|
53284
|
+
return sub.messages[sub.messages.length - 1].message;
|
|
53285
|
+
}
|
|
53286
|
+
function formatHHMMSS(ts) {
|
|
53287
|
+
const d = new Date(ts);
|
|
53288
|
+
const hh = String(d.getHours()).padStart(2, "0");
|
|
53289
|
+
const mm = String(d.getMinutes()).padStart(2, "0");
|
|
53290
|
+
const ss = String(d.getSeconds()).padStart(2, "0");
|
|
53291
|
+
return `${hh}:${mm}:${ss}`;
|
|
53292
|
+
}
|
|
53293
|
+
function compactJson(value) {
|
|
53294
|
+
if (value === void 0 || value === null) return "";
|
|
53295
|
+
if (typeof value === "string") return value;
|
|
53296
|
+
try {
|
|
53297
|
+
const json = JSON.stringify(value);
|
|
53298
|
+
if (json.length <= 240) return json;
|
|
53299
|
+
return json.slice(0, 239) + "\u2026";
|
|
53300
|
+
} catch {
|
|
53301
|
+
return String(value);
|
|
53302
|
+
}
|
|
53303
|
+
}
|
|
53304
|
+
function tryPrettyJson(s) {
|
|
53305
|
+
try {
|
|
53306
|
+
return JSON.stringify(JSON.parse(s), null, 2);
|
|
53307
|
+
} catch {
|
|
53308
|
+
return null;
|
|
53309
|
+
}
|
|
53310
|
+
}
|
|
53311
|
+
function summarizeArgs(args) {
|
|
53312
|
+
const keys = Object.keys(args);
|
|
53313
|
+
if (keys.length === 0) return "";
|
|
53314
|
+
return keys.slice(0, 3).join(", ") + (keys.length > 3 ? ", \u2026" : "");
|
|
53315
|
+
}
|
|
53316
|
+
function previewText(text, max = 120) {
|
|
53317
|
+
if (!text) return "";
|
|
53318
|
+
return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
|
|
53319
|
+
}
|
|
53320
|
+
function coordinatorToActivityItems(activities) {
|
|
53321
|
+
return activities.flatMap((a) => {
|
|
53322
|
+
switch (a.type) {
|
|
53323
|
+
case "tool_call":
|
|
53324
|
+
return [{
|
|
53325
|
+
type: "tool_call",
|
|
53326
|
+
tool: a.tool,
|
|
53327
|
+
args: a.args,
|
|
53328
|
+
timestamp: a.timestamp
|
|
53329
|
+
}];
|
|
53330
|
+
case "tool_result":
|
|
53331
|
+
return [{
|
|
53332
|
+
type: "tool_result",
|
|
53333
|
+
tool: a.tool,
|
|
53334
|
+
result: a.result,
|
|
53335
|
+
success: a.success,
|
|
53336
|
+
timestamp: a.timestamp
|
|
53337
|
+
}];
|
|
53338
|
+
case "message":
|
|
53339
|
+
return [{
|
|
53340
|
+
type: "message",
|
|
53341
|
+
role: a.role,
|
|
53342
|
+
content: a.content,
|
|
53343
|
+
timestamp: a.timestamp
|
|
53344
|
+
}];
|
|
53345
|
+
case "error":
|
|
53346
|
+
return [{
|
|
53347
|
+
type: "message",
|
|
53348
|
+
role: "system",
|
|
53349
|
+
content: `Error: ${a.message}`,
|
|
53350
|
+
timestamp: a.timestamp
|
|
53351
|
+
}];
|
|
53352
|
+
case "coordinator_decision":
|
|
53353
|
+
case "plan_committed":
|
|
53354
|
+
case "pending_question":
|
|
53355
|
+
case "clarification_question":
|
|
53356
|
+
return [];
|
|
53357
|
+
case "file_operation":
|
|
53358
|
+
return [{
|
|
53359
|
+
type: "file_operation",
|
|
53360
|
+
operation: a.operation,
|
|
53361
|
+
path: a.path,
|
|
53362
|
+
success: a.success,
|
|
53363
|
+
timestamp: a.timestamp
|
|
53364
|
+
}];
|
|
53365
|
+
case "schema_diff":
|
|
53366
|
+
return [{
|
|
53367
|
+
type: "schema_diff",
|
|
53368
|
+
filePath: a.filePath,
|
|
53369
|
+
hunks: a.hunks,
|
|
53370
|
+
timestamp: a.timestamp
|
|
53371
|
+
}];
|
|
53372
|
+
}
|
|
53373
|
+
});
|
|
53374
|
+
}
|
|
53375
|
+
function pluckCoordinatorState(activities) {
|
|
53376
|
+
let decision = null;
|
|
53377
|
+
let plan = null;
|
|
53378
|
+
const pendingQuestions = [];
|
|
53379
|
+
for (const a of activities) {
|
|
53380
|
+
if (a.type === "coordinator_decision") decision = a;
|
|
53381
|
+
else if (a.type === "plan_committed") plan = a;
|
|
53382
|
+
else if (a.type === "pending_question") pendingQuestions.push(a);
|
|
53383
|
+
}
|
|
53384
|
+
return { decision, plan, pendingQuestions };
|
|
53385
|
+
}
|
|
53386
|
+
function subagentMessagesToActivities(messages) {
|
|
53387
|
+
return messages.map((m) => {
|
|
53388
|
+
if (m.tool) {
|
|
53389
|
+
return {
|
|
53390
|
+
type: "tool_call",
|
|
53391
|
+
tool: m.tool,
|
|
53392
|
+
args: { preview: m.message },
|
|
53393
|
+
timestamp: m.timestamp
|
|
53394
|
+
};
|
|
53395
|
+
}
|
|
53396
|
+
return {
|
|
53397
|
+
type: "message",
|
|
53398
|
+
role: "system",
|
|
53399
|
+
content: m.message,
|
|
53400
|
+
timestamp: m.timestamp
|
|
53401
|
+
};
|
|
53402
|
+
});
|
|
53403
|
+
}
|
|
53404
|
+
function buildTimelineItems(messages, activities, subagents) {
|
|
53405
|
+
const items = [];
|
|
53406
|
+
if (messages) {
|
|
53407
|
+
messages.forEach((m, i) => items.push({ source: "message", data: m, index: i }));
|
|
53408
|
+
}
|
|
53409
|
+
if (activities) {
|
|
53410
|
+
activities.forEach((a) => items.push({ source: "activity", data: a }));
|
|
53411
|
+
}
|
|
53412
|
+
subagents.forEach((s) => items.push({ source: "subagent", data: s }));
|
|
53413
|
+
return items;
|
|
53414
|
+
}
|
|
53415
|
+
function timelineItemIcon(item) {
|
|
53416
|
+
switch (item.source) {
|
|
53417
|
+
case "message": {
|
|
53418
|
+
const m = item.data;
|
|
53419
|
+
if (m.role === "tool") return { name: "terminal", color: "text-[var(--color-primary)]" };
|
|
53420
|
+
if (m.reasoningContent) return { name: "sparkles", color: "text-[var(--color-primary)]" };
|
|
53421
|
+
if (m.role === "user") return { name: "user", color: "text-[var(--color-primary)]" };
|
|
53422
|
+
return { name: "message-square", color: "text-[var(--color-muted-foreground)]" };
|
|
53423
|
+
}
|
|
53424
|
+
case "activity": {
|
|
53425
|
+
const a = item.data;
|
|
53426
|
+
switch (a.type) {
|
|
53427
|
+
case "tool_call":
|
|
53428
|
+
return { name: "terminal", color: "text-[var(--color-primary)]" };
|
|
53429
|
+
case "tool_result":
|
|
53430
|
+
return { name: a.success !== false ? "check" : "x", color: a.success !== false ? "text-[var(--color-success)]" : "text-[var(--color-danger)]" };
|
|
53431
|
+
case "error":
|
|
53432
|
+
return { name: "alert-triangle", color: "text-[var(--color-danger)]" };
|
|
53433
|
+
case "file_operation":
|
|
53434
|
+
return { name: "file", color: "text-[var(--color-muted-foreground)]" };
|
|
53435
|
+
case "schema_diff":
|
|
53436
|
+
return { name: "git-commit", color: "text-[var(--color-muted-foreground)]" };
|
|
53437
|
+
default:
|
|
53438
|
+
return { name: "info", color: "text-[var(--color-muted-foreground)]" };
|
|
53439
|
+
}
|
|
53440
|
+
}
|
|
53441
|
+
case "subagent":
|
|
53442
|
+
return { name: "bot", color: "text-[var(--color-primary)]" };
|
|
53443
|
+
}
|
|
53444
|
+
}
|
|
53445
|
+
function timelineItemLabel(item) {
|
|
53446
|
+
switch (item.source) {
|
|
53447
|
+
case "message": {
|
|
53448
|
+
const m = item.data;
|
|
53449
|
+
if (m.role === "tool") return "tool";
|
|
53450
|
+
if (m.reasoningContent) return "thinking";
|
|
53451
|
+
return m.role;
|
|
53452
|
+
}
|
|
53453
|
+
case "activity":
|
|
53454
|
+
return item.data.type;
|
|
53455
|
+
case "subagent":
|
|
53456
|
+
return "subagent";
|
|
53457
|
+
}
|
|
53458
|
+
}
|
|
53459
|
+
function timelineItemPreview(item) {
|
|
53460
|
+
switch (item.source) {
|
|
53461
|
+
case "message": {
|
|
53462
|
+
const m = item.data;
|
|
53463
|
+
if (m.role === "tool") return `${m.toolName ?? "tool"} \u2192 ${m.toolCallId?.slice(0, 8) ?? ""}`;
|
|
53464
|
+
if (m.reasoningContent) return previewText(m.reasoningContent, 120);
|
|
53465
|
+
return previewText(m.content, 120);
|
|
53466
|
+
}
|
|
53467
|
+
case "activity": {
|
|
53468
|
+
const a = item.data;
|
|
53469
|
+
switch (a.type) {
|
|
53470
|
+
case "tool_call":
|
|
53471
|
+
return `${a.tool}(${summarizeArgs(a.args)})`;
|
|
53472
|
+
case "tool_result":
|
|
53473
|
+
return `${a.tool}: ${compactJson(a.result)}`;
|
|
53474
|
+
case "message":
|
|
53475
|
+
return previewText(a.content, 120);
|
|
53476
|
+
case "error":
|
|
53477
|
+
return previewText(a.message, 120);
|
|
53478
|
+
case "file_operation":
|
|
53479
|
+
return `${a.operation} ${a.path}`;
|
|
53480
|
+
case "schema_diff":
|
|
53481
|
+
return `diff ${a.filePath}`;
|
|
53482
|
+
default:
|
|
53483
|
+
return String(a.type);
|
|
53484
|
+
}
|
|
53485
|
+
}
|
|
53486
|
+
case "subagent":
|
|
53487
|
+
return `${item.data.name} \xB7 ${item.data.task}`;
|
|
53488
|
+
}
|
|
53489
|
+
}
|
|
53490
|
+
function timelineItemTimeLabel(item) {
|
|
53491
|
+
if (item.source === "activity") return formatHHMMSS(item.data.timestamp);
|
|
53492
|
+
if (item.source === "subagent") {
|
|
53493
|
+
const ts = item.data.messages[0]?.timestamp;
|
|
53494
|
+
return ts !== void 0 ? formatHHMMSS(ts) : void 0;
|
|
53495
|
+
}
|
|
53496
|
+
return void 0;
|
|
53497
|
+
}
|
|
53498
|
+
function TraceDetailContent({ item }) {
|
|
53499
|
+
const { t } = useTranslate();
|
|
53500
|
+
switch (item.source) {
|
|
53501
|
+
case "message": {
|
|
53502
|
+
const m = item.data;
|
|
53503
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
53504
|
+
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "items-center", children: /* @__PURE__ */ jsx(Badge, { variant: roleBadgeVariant[m.role], className: "text-[10px] uppercase", children: m.role }) }),
|
|
53505
|
+
typeof m.reasoningContent === "string" && m.reasoningContent.length > 0 && /* @__PURE__ */ jsxs(Box, { children: [
|
|
53506
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "mb-1", children: t("subagentTrace.reasoning") }),
|
|
53507
|
+
/* @__PURE__ */ jsx(MarkdownContent, { content: m.reasoningContent })
|
|
53508
|
+
] }),
|
|
53509
|
+
m.content.length > 0 && /* @__PURE__ */ jsxs(Box, { children: [
|
|
53510
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "mb-1", children: t("subagentTrace.content") }),
|
|
53511
|
+
m.role === "tool" ? (() => {
|
|
53512
|
+
const pretty = tryPrettyJson(m.content);
|
|
53513
|
+
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 });
|
|
53514
|
+
})() : /* @__PURE__ */ jsx(MarkdownContent, { content: m.content })
|
|
53515
|
+
] }),
|
|
53516
|
+
Array.isArray(m.toolCalls) && m.toolCalls.length > 0 && /* @__PURE__ */ jsxs(Box, { children: [
|
|
53517
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "mb-1", children: t("subagentTrace.toolCalls") }),
|
|
53518
|
+
/* @__PURE__ */ jsx(
|
|
53519
|
+
Accordion,
|
|
53520
|
+
{
|
|
53521
|
+
multiple: true,
|
|
53522
|
+
items: m.toolCalls.map((tc, i) => ({
|
|
53523
|
+
id: `tc-detail-${i}`,
|
|
53524
|
+
title: `${tc.name}(${summarizeArgs(tc.args)})`,
|
|
53525
|
+
content: /* @__PURE__ */ jsx(CodeBlock, { code: JSON.stringify(tc.args, null, 2), language: "json", maxHeight: "24rem" })
|
|
53526
|
+
}))
|
|
53527
|
+
}
|
|
53528
|
+
)
|
|
53529
|
+
] })
|
|
53530
|
+
] });
|
|
53531
|
+
}
|
|
53532
|
+
case "activity": {
|
|
53533
|
+
const a = item.data;
|
|
53534
|
+
switch (a.type) {
|
|
53535
|
+
case "tool_call":
|
|
53536
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
53537
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
53538
|
+
/* @__PURE__ */ jsx(Badge, { variant: "default", className: "text-[10px]", children: "tool_call" }),
|
|
53539
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
53540
|
+
] }),
|
|
53541
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: a.tool }),
|
|
53542
|
+
/* @__PURE__ */ jsx(CodeBlock, { code: JSON.stringify(a.args, null, 2), language: "json", maxHeight: "60vh" })
|
|
53543
|
+
] });
|
|
53544
|
+
case "tool_result":
|
|
53545
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
53546
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
53547
|
+
/* @__PURE__ */ jsx(Badge, { variant: a.success !== false ? "default" : "warning", className: "text-[10px]", children: a.success !== false ? "success" : "fail" }),
|
|
53548
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
53549
|
+
] }),
|
|
53550
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: a.tool }),
|
|
53551
|
+
/* @__PURE__ */ jsx(CodeBlock, { code: JSON.stringify(a.result, null, 2), language: "json", maxHeight: "60vh" })
|
|
53552
|
+
] });
|
|
53553
|
+
case "message":
|
|
53554
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
53555
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
53556
|
+
/* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: a.role }),
|
|
53557
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
53558
|
+
] }),
|
|
53559
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "whitespace-pre-wrap", children: a.content })
|
|
53560
|
+
] });
|
|
53561
|
+
case "error":
|
|
53562
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
53563
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
53564
|
+
/* @__PURE__ */ jsx(Badge, { variant: "warning", className: "text-[10px]", children: "error" }),
|
|
53565
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
53566
|
+
] }),
|
|
53567
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "whitespace-pre-wrap text-[var(--color-danger)]", children: a.message })
|
|
53568
|
+
] });
|
|
53569
|
+
case "file_operation":
|
|
53570
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
53571
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
53572
|
+
/* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: "file" }),
|
|
53573
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
53574
|
+
] }),
|
|
53575
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "body2", children: [
|
|
53576
|
+
a.operation,
|
|
53577
|
+
" ",
|
|
53578
|
+
a.path
|
|
53579
|
+
] })
|
|
53580
|
+
] });
|
|
53581
|
+
case "schema_diff":
|
|
53582
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
53583
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
53584
|
+
/* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: "diff" }),
|
|
53585
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) })
|
|
53586
|
+
] }),
|
|
53587
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: a.filePath })
|
|
53588
|
+
] });
|
|
53589
|
+
default:
|
|
53590
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
53591
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(a.timestamp) }),
|
|
53592
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: String(a.type) })
|
|
53593
|
+
] });
|
|
53594
|
+
}
|
|
53595
|
+
}
|
|
53596
|
+
case "subagent": {
|
|
53597
|
+
const s = item.data;
|
|
53598
|
+
const activities = subagentMessagesToActivities(s.messages);
|
|
53599
|
+
const ts = s.messages[0]?.timestamp;
|
|
53600
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
53601
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
53602
|
+
/* @__PURE__ */ jsx(Badge, { variant: "default", className: "text-[10px]", children: s.role }),
|
|
53603
|
+
ts !== void 0 && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: formatHHMMSS(ts) })
|
|
53604
|
+
] }),
|
|
53605
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", weight: "semibold", children: s.name }),
|
|
53606
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", color: "muted", children: s.task }),
|
|
53607
|
+
activities.length > 0 && /* @__PURE__ */ jsx(Box, { className: "border-t border-[var(--color-border)] pt-2", children: /* @__PURE__ */ jsx(InlineActivityStream, { activities, autoScroll: false }) })
|
|
53608
|
+
] });
|
|
53609
|
+
}
|
|
53610
|
+
}
|
|
53611
|
+
}
|
|
53612
|
+
var InlineActivityRow, InlineActivityStream, CoordinatorCard, SubagentRow, OrbitalGroup, SubagentRichCard, roleBadgeVariant, ChatMessageRow, CoordinatorConversation, SubagentTracePanel;
|
|
53613
|
+
var init_SubagentTracePanel = __esm({
|
|
53614
|
+
"components/core/organisms/SubagentTracePanel.tsx"() {
|
|
53615
|
+
"use client";
|
|
53616
|
+
init_Box();
|
|
53617
|
+
init_Stack();
|
|
53618
|
+
init_Typography();
|
|
53619
|
+
init_Badge();
|
|
53620
|
+
init_Icon();
|
|
53621
|
+
init_Button();
|
|
53622
|
+
init_Modal();
|
|
53623
|
+
init_Accordion();
|
|
53624
|
+
init_markdown();
|
|
53625
|
+
InlineActivityRow = ({ activity }) => {
|
|
53626
|
+
const time = formatHHMMSS(activity.timestamp);
|
|
53627
|
+
const baseRow = "items-start px-3 py-1 hover:bg-[var(--color-surface)]";
|
|
53628
|
+
if (activity.type === "tool_call") {
|
|
53629
|
+
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
|
|
53630
|
+
/* @__PURE__ */ jsx(Icon, { name: "terminal", size: "xs", className: "mt-0.5 flex-shrink-0 text-[var(--color-primary)]" }),
|
|
53631
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "flex-1 min-w-0 text-[11px] font-mono break-all whitespace-pre-wrap", children: [
|
|
53632
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", weight: "semibold", className: "text-[11px] font-mono", children: activity.tool }),
|
|
53633
|
+
activity.args !== void 0 && /* @__PURE__ */ jsxs(Typography, { as: "span", variant: "caption", color: "muted", className: "text-[11px] font-mono", children: [
|
|
53634
|
+
" ",
|
|
53635
|
+
compactJson(activity.args)
|
|
53636
|
+
] })
|
|
53637
|
+
] }),
|
|
53638
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
|
|
53639
|
+
] });
|
|
53640
|
+
}
|
|
53641
|
+
if (activity.type === "tool_result") {
|
|
53642
|
+
const success = activity.success !== false;
|
|
53643
|
+
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
|
|
53644
|
+
/* @__PURE__ */ jsx(
|
|
53645
|
+
Icon,
|
|
53646
|
+
{
|
|
53647
|
+
name: success ? "check" : "x",
|
|
53648
|
+
size: "xs",
|
|
53649
|
+
className: `mt-0.5 flex-shrink-0 ${success ? "text-[var(--color-success)]" : "text-[var(--color-danger)]"}`
|
|
53650
|
+
}
|
|
53651
|
+
),
|
|
53652
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "flex-1 min-w-0 text-[11px] font-mono break-all whitespace-pre-wrap", children: [
|
|
53653
|
+
/* @__PURE__ */ jsxs(Typography, { as: "span", variant: "caption", color: "muted", className: "text-[11px] font-mono", children: [
|
|
53654
|
+
activity.tool,
|
|
53655
|
+
":",
|
|
53656
|
+
" "
|
|
53657
|
+
] }),
|
|
53658
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "text-[11px] font-mono", children: compactJson(activity.result) })
|
|
53659
|
+
] }),
|
|
53660
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
|
|
53661
|
+
] });
|
|
53662
|
+
}
|
|
53663
|
+
if (activity.type === "message") {
|
|
53664
|
+
const role = activity.role;
|
|
53665
|
+
const iconName = role === "user" ? "user" : role === "system" ? "info" : "sparkles";
|
|
53666
|
+
const roleColor = role === "user" ? "text-[var(--color-primary)]" : role === "system" ? "text-[var(--color-muted-foreground)]" : "text-[var(--color-foreground)]";
|
|
53667
|
+
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
|
|
53668
|
+
/* @__PURE__ */ jsx(Icon, { name: iconName, size: "xs", className: `mt-0.5 flex-shrink-0 ${roleColor}` }),
|
|
53669
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "flex-1 min-w-0 text-[11px] whitespace-pre-wrap break-words", children: activity.content }),
|
|
53670
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
|
|
53671
|
+
] });
|
|
53672
|
+
}
|
|
53673
|
+
if (activity.type === "error") {
|
|
53674
|
+
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
|
|
53675
|
+
/* @__PURE__ */ jsx(Icon, { name: "alert-triangle", size: "xs", className: "mt-0.5 flex-shrink-0 text-[var(--color-danger)]" }),
|
|
53676
|
+
/* @__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 }),
|
|
53677
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
|
|
53678
|
+
] });
|
|
53679
|
+
}
|
|
53680
|
+
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", className: baseRow, children: [
|
|
53681
|
+
/* @__PURE__ */ jsx(Icon, { name: "file", size: "xs", className: "mt-0.5 flex-shrink-0 text-[var(--color-muted-foreground)]" }),
|
|
53682
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", className: "flex-1 min-w-0 text-[11px] font-mono break-all", children: [
|
|
53683
|
+
"[",
|
|
53684
|
+
activity.type,
|
|
53685
|
+
"] ",
|
|
53686
|
+
compactJson(activity)
|
|
53687
|
+
] }),
|
|
53688
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] flex-shrink-0 tabular-nums mt-0.5", children: time })
|
|
53689
|
+
] });
|
|
53690
|
+
};
|
|
53691
|
+
InlineActivityStream = ({ activities, autoScroll = true, className }) => {
|
|
53692
|
+
const endRef = React94__default.useRef(null);
|
|
53693
|
+
React94__default.useEffect(() => {
|
|
53694
|
+
if (!autoScroll) return;
|
|
53695
|
+
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
53696
|
+
}, [activities.length, autoScroll]);
|
|
53697
|
+
return /* @__PURE__ */ jsxs(Box, { className, children: [
|
|
53698
|
+
activities.map((a, i) => /* @__PURE__ */ jsx(InlineActivityRow, { activity: a }, `${a.timestamp}-${i}`)),
|
|
53699
|
+
/* @__PURE__ */ jsx(Box, { ref: endRef })
|
|
53700
|
+
] });
|
|
53701
|
+
};
|
|
53702
|
+
CoordinatorCard = ({ snapshot, className }) => {
|
|
53703
|
+
const { t } = useTranslate();
|
|
53704
|
+
const { decision, plan, pendingQuestions } = snapshot;
|
|
53705
|
+
if (!decision && !plan && pendingQuestions.length === 0) return null;
|
|
53706
|
+
return /* @__PURE__ */ jsxs(
|
|
53707
|
+
Box,
|
|
53708
|
+
{
|
|
53709
|
+
className: `px-3 py-2 border-b border-[var(--color-border)] bg-[var(--color-muted)]/30 ${className ?? ""}`,
|
|
53710
|
+
children: [
|
|
53711
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center mb-2", children: [
|
|
53712
|
+
/* @__PURE__ */ jsx(Icon, { name: "compass", size: "xs" }),
|
|
53713
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold text-[11px]", children: t("subagentTrace.coordinator") })
|
|
53714
|
+
] }),
|
|
53715
|
+
decision && /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "mb-2", children: [
|
|
53716
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
53717
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px] uppercase tracking-wide", children: t("subagentTrace.organism") }),
|
|
53718
|
+
/* @__PURE__ */ jsx(Badge, { variant: "default", className: "text-[10px]", children: decision.organism }),
|
|
53719
|
+
decision.priorOrganism && decision.priorOrganism !== decision.organism && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: t("subagentTrace.wasOrganism", { organism: decision.priorOrganism }) })
|
|
53720
|
+
] }),
|
|
53721
|
+
decision.reason && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[11px] mt-0.5", children: decision.reason })
|
|
53722
|
+
] }),
|
|
53723
|
+
plan && plan.orbitals.length > 0 && /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "mb-2", children: [
|
|
53724
|
+
/* @__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 }) }),
|
|
53725
|
+
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap", children: plan.orbitals.map((o) => /* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: o }, o)) })
|
|
53726
|
+
] }),
|
|
53727
|
+
pendingQuestions.length > 0 && /* @__PURE__ */ jsxs(VStack, { gap: "none", children: [
|
|
53728
|
+
/* @__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 }) }),
|
|
53729
|
+
pendingQuestions.map((q) => /* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-start", children: [
|
|
53730
|
+
/* @__PURE__ */ jsx(Icon, { name: "help-circle", size: "xs", className: "mt-0.5 flex-shrink-0 text-[var(--color-warning)]" }),
|
|
53731
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-[11px] flex-1 min-w-0", children: [
|
|
53732
|
+
q.question,
|
|
53733
|
+
q.orbitalName && /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", className: "text-[10px] ml-1", children: [
|
|
53734
|
+
"(",
|
|
53735
|
+
q.orbitalName,
|
|
53736
|
+
")"
|
|
53737
|
+
] })
|
|
53738
|
+
] })
|
|
53739
|
+
] }, q.questionId))
|
|
53740
|
+
] })
|
|
53741
|
+
]
|
|
53742
|
+
}
|
|
53743
|
+
);
|
|
53744
|
+
};
|
|
53745
|
+
SubagentRow = ({ subagent }) => {
|
|
53746
|
+
const recent = lastMessage(subagent);
|
|
53747
|
+
return /* @__PURE__ */ jsxs(
|
|
53748
|
+
HStack,
|
|
53749
|
+
{
|
|
53750
|
+
gap: "sm",
|
|
53751
|
+
className: "items-start px-3 py-2 border-b border-[var(--color-border)]",
|
|
53752
|
+
children: [
|
|
53753
|
+
/* @__PURE__ */ jsx(Box, { className: "pt-0.5", children: /* @__PURE__ */ jsx(Icon, { name: statusIconName(subagent.status), size: "xs" }) }),
|
|
53754
|
+
/* @__PURE__ */ jsxs(VStack, { gap: "none", className: "flex-1 min-w-0", children: [
|
|
53755
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center", children: [
|
|
53756
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-medium truncate", children: subagent.name }),
|
|
53757
|
+
/* @__PURE__ */ jsx(Badge, { variant: "default", children: subagent.role })
|
|
53758
|
+
] }),
|
|
53759
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "truncate", children: recent ?? subagent.task })
|
|
53760
|
+
] })
|
|
53761
|
+
]
|
|
53762
|
+
}
|
|
53763
|
+
);
|
|
53764
|
+
};
|
|
53765
|
+
OrbitalGroup = ({ orbitalName, subagents }) => {
|
|
53766
|
+
const { t } = useTranslate();
|
|
53767
|
+
const runningCount = subagents.filter((s) => s.status === "running").length;
|
|
53768
|
+
const completeCount = subagents.filter((s) => s.status === "complete").length;
|
|
53769
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "border-b border-[var(--color-border)]", children: [
|
|
53770
|
+
/* @__PURE__ */ jsxs(
|
|
53771
|
+
HStack,
|
|
53772
|
+
{
|
|
53773
|
+
gap: "sm",
|
|
53774
|
+
className: "items-center px-3 py-2 bg-[var(--color-surface)] border-b border-[var(--color-border)]",
|
|
53775
|
+
children: [
|
|
53776
|
+
/* @__PURE__ */ jsx(Icon, { name: "circle", size: "xs" }),
|
|
53777
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold flex-1 truncate", children: orbitalName }),
|
|
53778
|
+
/* @__PURE__ */ jsx(Badge, { variant: "default", children: runningCount > 0 ? t("subagentTrace.countRunning", { count: runningCount }) : t("subagentTrace.countDone", { count: completeCount }) })
|
|
53779
|
+
]
|
|
53780
|
+
}
|
|
53781
|
+
),
|
|
53782
|
+
subagents.map((sub) => /* @__PURE__ */ jsx(SubagentRow, { subagent: sub }, sub.id))
|
|
53783
|
+
] });
|
|
53784
|
+
};
|
|
53785
|
+
SubagentRichCard = ({ subagent }) => {
|
|
53786
|
+
const { t } = useTranslate();
|
|
53787
|
+
const activities = React94__default.useMemo(
|
|
53788
|
+
() => subagentMessagesToActivities(subagent.messages),
|
|
53789
|
+
[subagent.messages]
|
|
53790
|
+
);
|
|
53791
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "border-b border-[var(--color-border)] p-3", children: [
|
|
53792
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center mb-2", children: [
|
|
53793
|
+
/* @__PURE__ */ jsx(
|
|
53794
|
+
Box,
|
|
53795
|
+
{
|
|
53796
|
+
style: {
|
|
53797
|
+
width: 8,
|
|
53798
|
+
height: 8,
|
|
53799
|
+
borderRadius: "50%",
|
|
53800
|
+
flexShrink: 0,
|
|
53801
|
+
backgroundColor: subagent.status === "complete" ? "var(--color-success)" : subagent.status === "error" ? "var(--color-error)" : "var(--color-primary)",
|
|
53802
|
+
...subagent.status === "running" ? { animation: "pulse 1.5s infinite" } : {}
|
|
53803
|
+
}
|
|
53804
|
+
}
|
|
53805
|
+
),
|
|
53806
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold flex-1 truncate", children: subagent.name }),
|
|
53807
|
+
/* @__PURE__ */ jsx(Badge, { variant: subagent.role === "deterministic" ? "default" : subagent.role === "llm" ? "info" : "warning", children: subagent.role }),
|
|
53808
|
+
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` })
|
|
53809
|
+
] }),
|
|
53810
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "mb-2", children: subagent.task }),
|
|
53811
|
+
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") })
|
|
53812
|
+
] });
|
|
53813
|
+
};
|
|
53814
|
+
roleBadgeVariant = {
|
|
53815
|
+
system: "neutral",
|
|
53816
|
+
user: "info",
|
|
53817
|
+
assistant: "default",
|
|
53818
|
+
tool: "warning"
|
|
53819
|
+
};
|
|
53820
|
+
ChatMessageRow = ({ message, index }) => {
|
|
53821
|
+
const { t } = useTranslate();
|
|
53822
|
+
const { role, content, toolCalls, reasoningContent, toolCallId, toolName } = message;
|
|
53823
|
+
if (role === "tool") {
|
|
53824
|
+
const pretty = tryPrettyJson(content);
|
|
53825
|
+
const title = `${toolName ?? "tool"} \u2192${toolCallId ? ` ${toolCallId.slice(0, 8)}` : ""}`;
|
|
53826
|
+
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 });
|
|
53827
|
+
const items = [{ id: `tool-${index}`, title, content: body }];
|
|
53828
|
+
return /* @__PURE__ */ jsx(Box, { className: "px-3 py-2 border-b border-[var(--color-border)]", children: /* @__PURE__ */ jsx(Accordion, { items }) });
|
|
53829
|
+
}
|
|
53830
|
+
const hasReasoning = typeof reasoningContent === "string" && reasoningContent.length > 0;
|
|
53831
|
+
const hasToolCalls = Array.isArray(toolCalls) && toolCalls.length > 0;
|
|
53832
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "px-3 py-2 border-b border-[var(--color-border)]", children: [
|
|
53833
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
53834
|
+
/* @__PURE__ */ jsx(Badge, { variant: roleBadgeVariant[role], className: "text-[10px] uppercase", children: role }),
|
|
53835
|
+
hasReasoning && /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: [
|
|
53836
|
+
"\xB7 ",
|
|
53837
|
+
t("subagentTrace.thinking")
|
|
53838
|
+
] }),
|
|
53839
|
+
hasToolCalls && /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: [
|
|
53840
|
+
"\xB7 ",
|
|
53841
|
+
toolCalls.length === 1 ? t("subagentTrace.toolCallCount", { count: toolCalls.length }) : t("subagentTrace.toolCallCountPlural", { count: toolCalls.length })
|
|
53842
|
+
] })
|
|
53843
|
+
] }),
|
|
53844
|
+
hasReasoning && /* @__PURE__ */ jsx(Accordion, { items: [{
|
|
53845
|
+
id: `reasoning-${index}`,
|
|
53846
|
+
title: t("subagentTrace.reasoning"),
|
|
53847
|
+
content: /* @__PURE__ */ jsx(MarkdownContent, { content: reasoningContent })
|
|
53848
|
+
}] }),
|
|
53849
|
+
content.length > 0 && /* @__PURE__ */ jsx(MarkdownContent, { content }),
|
|
53850
|
+
hasToolCalls && /* @__PURE__ */ jsx(
|
|
53851
|
+
Accordion,
|
|
53852
|
+
{
|
|
53853
|
+
multiple: true,
|
|
53854
|
+
items: toolCalls.map((tc, i) => ({
|
|
53855
|
+
id: `tc-${index}-${i}`,
|
|
53856
|
+
title: `${tc.name}(${summarizeArgs(tc.args)})`,
|
|
53857
|
+
content: /* @__PURE__ */ jsx(CodeBlock, { code: JSON.stringify(tc.args, null, 2), language: "json", maxHeight: "24rem" })
|
|
53858
|
+
}))
|
|
53859
|
+
}
|
|
53860
|
+
)
|
|
53861
|
+
] });
|
|
53862
|
+
};
|
|
53863
|
+
CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
|
|
53864
|
+
const endRef = React94__default.useRef(null);
|
|
53865
|
+
React94__default.useEffect(() => {
|
|
53866
|
+
if (!autoScroll) return;
|
|
53867
|
+
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
53868
|
+
}, [messages.length, autoScroll]);
|
|
53869
|
+
return /* @__PURE__ */ jsxs(Box, { className, children: [
|
|
53870
|
+
messages.map((m, i) => /* @__PURE__ */ jsx(ChatMessageRow, { message: m, index: i }, `msg-${i}`)),
|
|
53871
|
+
/* @__PURE__ */ jsx(Box, { ref: endRef })
|
|
53872
|
+
] });
|
|
53873
|
+
};
|
|
53874
|
+
SubagentTracePanel = ({
|
|
53875
|
+
subagents,
|
|
53876
|
+
focusedOrbital,
|
|
53877
|
+
disclosureLevel,
|
|
53878
|
+
open,
|
|
53879
|
+
onClose,
|
|
53880
|
+
className,
|
|
53881
|
+
mode = "overlay",
|
|
53882
|
+
coordinatorActivities,
|
|
53883
|
+
coordinatorMessages
|
|
53884
|
+
}) => {
|
|
53885
|
+
const { t } = useTranslate();
|
|
53886
|
+
const [selectedItem, setSelectedItem] = useState(null);
|
|
53887
|
+
const densityLabel = (rich) => rich ? t("subagentTrace.densityRich") : t("subagentTrace.densityCompact");
|
|
53888
|
+
if (mode === "overlay" && !open) return null;
|
|
53889
|
+
const isTabMode = mode === "tab";
|
|
53890
|
+
const isRichMode = isTabMode || disclosureLevel >= 3;
|
|
53891
|
+
if (isTabMode) {
|
|
53892
|
+
const timelineItems = buildTimelineItems(coordinatorMessages, coordinatorActivities, subagents);
|
|
53893
|
+
const hasData = timelineItems.length > 0;
|
|
53894
|
+
return /* @__PURE__ */ jsxs(Box, { className: `h-full w-full bg-[var(--color-card)] overflow-hidden flex flex-col ${className ?? ""}`, children: [
|
|
53895
|
+
/* @__PURE__ */ jsxs(
|
|
53896
|
+
HStack,
|
|
53897
|
+
{
|
|
53898
|
+
gap: "sm",
|
|
53899
|
+
className: "items-center px-3 py-2 border-b border-[var(--color-border)]",
|
|
53900
|
+
children: [
|
|
53901
|
+
/* @__PURE__ */ jsx(Icon, { name: "activity", size: "sm" }),
|
|
53902
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold flex-1", children: t("subagentTrace.trace") }),
|
|
53903
|
+
onClose && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" }) })
|
|
53904
|
+
]
|
|
53905
|
+
}
|
|
53906
|
+
),
|
|
53907
|
+
!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") }) }),
|
|
53908
|
+
hasData && /* @__PURE__ */ jsx(Box, { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx(VStack, { gap: "none", children: timelineItems.map((item, i) => {
|
|
53909
|
+
const { name: iconName, color: iconColor } = timelineItemIcon(item);
|
|
53910
|
+
const isLast = i === timelineItems.length - 1;
|
|
53911
|
+
return /* @__PURE__ */ jsxs(
|
|
53912
|
+
Box,
|
|
53913
|
+
{
|
|
53914
|
+
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",
|
|
53915
|
+
onClick: () => setSelectedItem(item),
|
|
53916
|
+
children: [
|
|
53917
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex flex-col items-center mr-3 mt-0.5", style: { width: 20 }, children: [
|
|
53918
|
+
/* @__PURE__ */ jsx(
|
|
53919
|
+
Box,
|
|
53920
|
+
{
|
|
53921
|
+
className: "rounded-full flex-shrink-0",
|
|
53922
|
+
style: {
|
|
53923
|
+
width: 8,
|
|
53924
|
+
height: 8,
|
|
53925
|
+
backgroundColor: "var(--color-primary)"
|
|
53926
|
+
}
|
|
53927
|
+
}
|
|
53928
|
+
),
|
|
53929
|
+
!isLast && /* @__PURE__ */ jsx(
|
|
53930
|
+
Box,
|
|
53931
|
+
{
|
|
53932
|
+
className: "flex-1",
|
|
53933
|
+
style: {
|
|
53934
|
+
width: 2,
|
|
53935
|
+
backgroundColor: "var(--color-border)",
|
|
53936
|
+
marginTop: 4,
|
|
53937
|
+
minHeight: 24
|
|
53938
|
+
}
|
|
53939
|
+
}
|
|
53940
|
+
)
|
|
53941
|
+
] }),
|
|
53942
|
+
/* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "flex-1 min-w-0", children: [
|
|
53943
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center", children: [
|
|
53944
|
+
/* @__PURE__ */ jsx(Icon, { name: iconName, size: "xs", className: `flex-shrink-0 ${iconColor}` }),
|
|
53945
|
+
timelineItemTimeLabel(item) && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: timelineItemTimeLabel(item) }),
|
|
53946
|
+
/* @__PURE__ */ jsx(Badge, { variant: "neutral", className: "text-[10px]", children: timelineItemLabel(item) })
|
|
53947
|
+
] }),
|
|
53948
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-start", children: [
|
|
53949
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", color: "muted", className: "flex-1 min-w-0 line-clamp-2", children: timelineItemPreview(item) }),
|
|
53950
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", className: "flex-shrink-0 mt-0", onClick: (e) => {
|
|
53951
|
+
e.stopPropagation();
|
|
53952
|
+
setSelectedItem(item);
|
|
53953
|
+
}, children: /* @__PURE__ */ jsx(Icon, { name: "maximize-2", size: "xs" }) })
|
|
53954
|
+
] })
|
|
53955
|
+
] })
|
|
53956
|
+
]
|
|
53957
|
+
},
|
|
53958
|
+
`${item.source}-${i}`
|
|
53959
|
+
);
|
|
53960
|
+
}) }) }),
|
|
53961
|
+
/* @__PURE__ */ jsx(
|
|
53962
|
+
Modal,
|
|
53963
|
+
{
|
|
53964
|
+
isOpen: selectedItem !== null,
|
|
53965
|
+
onClose: () => setSelectedItem(null),
|
|
53966
|
+
title: selectedItem ? `${timelineItemLabel(selectedItem)}${timelineItemTimeLabel(selectedItem) ? ` \xB7 ${timelineItemTimeLabel(selectedItem)}` : ""}` : "",
|
|
53967
|
+
size: "lg",
|
|
53968
|
+
children: selectedItem && /* @__PURE__ */ jsx(TraceDetailContent, { item: selectedItem })
|
|
53969
|
+
}
|
|
53970
|
+
)
|
|
53971
|
+
] });
|
|
53972
|
+
}
|
|
53973
|
+
const filtered = focusedOrbital ? subagents.filter((s) => s.orbitalName === focusedOrbital) : subagents;
|
|
53974
|
+
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 ?? ""}`;
|
|
53975
|
+
const wrapperStyle = { zIndex: 20 };
|
|
53976
|
+
const hasCoordinatorData = coordinatorMessages && coordinatorMessages.length > 0 || coordinatorActivities && coordinatorActivities.length > 0;
|
|
53977
|
+
if (filtered.length === 0 && !hasCoordinatorData) {
|
|
53978
|
+
return /* @__PURE__ */ jsxs(Box, { className: wrapperClass, style: wrapperStyle, children: [
|
|
53979
|
+
/* @__PURE__ */ jsxs(
|
|
53980
|
+
HStack,
|
|
53981
|
+
{
|
|
53982
|
+
gap: "sm",
|
|
53983
|
+
className: "items-center px-3 py-2 border-b border-[var(--color-border)]",
|
|
53984
|
+
children: [
|
|
53985
|
+
/* @__PURE__ */ jsx(Icon, { name: "activity", size: "sm" }),
|
|
53986
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold flex-1", children: t("subagentTrace.subagents") }),
|
|
53987
|
+
onClose && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" }) })
|
|
53988
|
+
]
|
|
53989
|
+
}
|
|
53990
|
+
),
|
|
53991
|
+
/* @__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") }) })
|
|
53992
|
+
] });
|
|
53993
|
+
}
|
|
53994
|
+
if (focusedOrbital) {
|
|
53995
|
+
return /* @__PURE__ */ jsxs(Box, { className: wrapperClass, style: wrapperStyle, children: [
|
|
53996
|
+
/* @__PURE__ */ jsxs(
|
|
53997
|
+
HStack,
|
|
53998
|
+
{
|
|
53999
|
+
gap: "sm",
|
|
54000
|
+
className: "items-center px-3 py-2 border-b border-[var(--color-border)]",
|
|
54001
|
+
children: [
|
|
54002
|
+
/* @__PURE__ */ jsx(Icon, { name: "activity", size: "sm" }),
|
|
54003
|
+
/* @__PURE__ */ jsxs(VStack, { gap: "none", className: "flex-1 min-w-0", children: [
|
|
54004
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold truncate", children: focusedOrbital }),
|
|
54005
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "muted", children: [
|
|
54006
|
+
filtered.length === 1 ? t("subagentTrace.subagentCount", { count: filtered.length }) : t("subagentTrace.subagentCountPlural", { count: filtered.length }),
|
|
54007
|
+
" \xB7 ",
|
|
54008
|
+
densityLabel(isRichMode)
|
|
54009
|
+
] })
|
|
54010
|
+
] }),
|
|
54011
|
+
onClose && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" }) })
|
|
54012
|
+
]
|
|
54013
|
+
}
|
|
54014
|
+
),
|
|
54015
|
+
/* @__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)) })
|
|
54016
|
+
] });
|
|
54017
|
+
}
|
|
54018
|
+
const grouped = groupByOrbital(filtered);
|
|
54019
|
+
const coordinatorSnapshot = pluckCoordinatorState(coordinatorActivities ?? []);
|
|
54020
|
+
return /* @__PURE__ */ jsxs(Box, { className: wrapperClass, style: wrapperStyle, children: [
|
|
54021
|
+
/* @__PURE__ */ jsxs(
|
|
54022
|
+
HStack,
|
|
54023
|
+
{
|
|
54024
|
+
gap: "sm",
|
|
54025
|
+
className: "items-center px-3 py-2 border-b border-[var(--color-border)]",
|
|
54026
|
+
children: [
|
|
54027
|
+
/* @__PURE__ */ jsx(Icon, { name: "activity", size: "sm" }),
|
|
54028
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "font-semibold flex-1", children: [
|
|
54029
|
+
t("subagentTrace.subagentsWithCount", { count: filtered.length }),
|
|
54030
|
+
" \xB7 ",
|
|
54031
|
+
densityLabel(isRichMode)
|
|
54032
|
+
] }),
|
|
54033
|
+
onClose && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { name: "x", size: "xs" }) })
|
|
54034
|
+
]
|
|
54035
|
+
}
|
|
54036
|
+
),
|
|
54037
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex-1 overflow-y-auto", children: [
|
|
54038
|
+
!focusedOrbital && isRichMode && /* @__PURE__ */ jsx(CoordinatorCard, { snapshot: coordinatorSnapshot }),
|
|
54039
|
+
coordinatorMessages && coordinatorMessages.length > 0 ? /* @__PURE__ */ jsxs(Box, { className: "border-b border-[var(--color-border)]", children: [
|
|
54040
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center px-3 py-1.5 bg-[var(--color-card)] border-b border-[var(--color-border)]", children: [
|
|
54041
|
+
/* @__PURE__ */ jsx(Box, { style: { width: 6, height: 6, borderRadius: "50%", backgroundColor: "var(--color-primary)", flexShrink: 0 } }),
|
|
54042
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold text-[11px]", children: t("subagentTrace.coordinator") }),
|
|
54043
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: t("subagentTrace.messagesCount", { count: coordinatorMessages.length }) })
|
|
54044
|
+
] }),
|
|
54045
|
+
/* @__PURE__ */ jsx(Box, { className: "max-h-[36rem] overflow-y-auto", children: /* @__PURE__ */ jsx(CoordinatorConversation, { messages: coordinatorMessages, autoScroll: true }) })
|
|
54046
|
+
] }) : coordinatorActivities && coordinatorActivities.length > 0 && (() => {
|
|
54047
|
+
const filteredCoordinator = coordinatorActivities;
|
|
54048
|
+
if (filteredCoordinator.length === 0) return null;
|
|
54049
|
+
return /* @__PURE__ */ jsxs(Box, { className: "border-b border-[var(--color-border)]", children: [
|
|
54050
|
+
/* @__PURE__ */ jsxs(HStack, { gap: "xs", className: "items-center px-3 py-1.5 bg-[var(--color-card)] border-b border-[var(--color-border)]", children: [
|
|
54051
|
+
/* @__PURE__ */ jsx(Box, { style: { width: 6, height: 6, borderRadius: "50%", backgroundColor: "var(--color-primary)", flexShrink: 0 } }),
|
|
54052
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-semibold text-[11px]", children: t("subagentTrace.coordinator") }),
|
|
54053
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-[10px]", children: t("subagentTrace.eventsCount", { count: filteredCoordinator.length }) })
|
|
54054
|
+
] }),
|
|
54055
|
+
/* @__PURE__ */ jsx(Box, { className: "max-h-60 overflow-y-auto", children: /* @__PURE__ */ jsx(
|
|
54056
|
+
InlineActivityStream,
|
|
54057
|
+
{
|
|
54058
|
+
activities: coordinatorToActivityItems(filteredCoordinator),
|
|
54059
|
+
autoScroll: true
|
|
54060
|
+
}
|
|
54061
|
+
) })
|
|
54062
|
+
] });
|
|
54063
|
+
})(),
|
|
54064
|
+
isRichMode ? filtered.map((sub) => /* @__PURE__ */ jsx(SubagentRichCard, { subagent: sub }, sub.id)) : Array.from(grouped.entries()).map(([orbitalName, subs]) => /* @__PURE__ */ jsx(
|
|
54065
|
+
OrbitalGroup,
|
|
54066
|
+
{
|
|
54067
|
+
orbitalName,
|
|
54068
|
+
subagents: subs
|
|
54069
|
+
},
|
|
54070
|
+
orbitalName
|
|
54071
|
+
))
|
|
54072
|
+
] })
|
|
54073
|
+
] });
|
|
54074
|
+
};
|
|
54075
|
+
SubagentTracePanel.displayName = "SubagentTracePanel";
|
|
54076
|
+
}
|
|
54077
|
+
});
|
|
52467
54078
|
var TabbedContainer;
|
|
52468
54079
|
var init_TabbedContainer = __esm({
|
|
52469
54080
|
"components/core/organisms/layout/TabbedContainer.tsx"() {
|
|
@@ -52578,6 +54189,48 @@ var init_TabbedContainer = __esm({
|
|
|
52578
54189
|
TabbedContainer.displayName = "TabbedContainer";
|
|
52579
54190
|
}
|
|
52580
54191
|
});
|
|
54192
|
+
function TanksBoard({
|
|
54193
|
+
tiles,
|
|
54194
|
+
units,
|
|
54195
|
+
features,
|
|
54196
|
+
assetManifest,
|
|
54197
|
+
assetBaseUrl,
|
|
54198
|
+
scale = 0.45,
|
|
54199
|
+
showMinimap = true,
|
|
54200
|
+
enableCamera = true,
|
|
54201
|
+
tileClickEvent,
|
|
54202
|
+
unitClickEvent,
|
|
54203
|
+
isLoading,
|
|
54204
|
+
error,
|
|
54205
|
+
className
|
|
54206
|
+
}) {
|
|
54207
|
+
return /* @__PURE__ */ jsx("div", { className: cn("tanks-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
54208
|
+
IsometricCanvas_default,
|
|
54209
|
+
{
|
|
54210
|
+
tileLayout: "flat",
|
|
54211
|
+
tiles,
|
|
54212
|
+
units,
|
|
54213
|
+
features,
|
|
54214
|
+
assetManifest,
|
|
54215
|
+
assetBaseUrl,
|
|
54216
|
+
scale,
|
|
54217
|
+
showMinimap,
|
|
54218
|
+
enableCamera,
|
|
54219
|
+
tileClickEvent,
|
|
54220
|
+
unitClickEvent,
|
|
54221
|
+
isLoading,
|
|
54222
|
+
error
|
|
54223
|
+
}
|
|
54224
|
+
) });
|
|
54225
|
+
}
|
|
54226
|
+
var init_TanksBoard = __esm({
|
|
54227
|
+
"components/game/organisms/TanksBoard.tsx"() {
|
|
54228
|
+
"use client";
|
|
54229
|
+
init_cn();
|
|
54230
|
+
init_IsometricCanvas();
|
|
54231
|
+
TanksBoard.displayName = "TanksBoard";
|
|
54232
|
+
}
|
|
54233
|
+
});
|
|
52581
54234
|
var TeamOrganism;
|
|
52582
54235
|
var init_TeamOrganism = __esm({
|
|
52583
54236
|
"components/marketing/organisms/TeamOrganism.tsx"() {
|
|
@@ -52681,7 +54334,7 @@ var init_Timeline = __esm({
|
|
|
52681
54334
|
}) => {
|
|
52682
54335
|
const { t } = useTranslate();
|
|
52683
54336
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
52684
|
-
const items =
|
|
54337
|
+
const items = React94__default.useMemo(() => {
|
|
52685
54338
|
if (propItems) return propItems;
|
|
52686
54339
|
if (entityData.length === 0) return [];
|
|
52687
54340
|
return entityData.map((record, idx) => {
|
|
@@ -52788,7 +54441,7 @@ var init_Timeline = __esm({
|
|
|
52788
54441
|
}
|
|
52789
54442
|
});
|
|
52790
54443
|
function extractToastProps(children) {
|
|
52791
|
-
if (!
|
|
54444
|
+
if (!React94__default.isValidElement(children)) {
|
|
52792
54445
|
if (typeof children === "string") {
|
|
52793
54446
|
return { message: children };
|
|
52794
54447
|
}
|
|
@@ -52826,7 +54479,7 @@ var init_ToastSlot = __esm({
|
|
|
52826
54479
|
eventBus.emit("UI:CLOSE");
|
|
52827
54480
|
};
|
|
52828
54481
|
if (!isVisible) return null;
|
|
52829
|
-
const isCustomContent =
|
|
54482
|
+
const isCustomContent = React94__default.isValidElement(children) && !message;
|
|
52830
54483
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
52831
54484
|
Toast,
|
|
52832
54485
|
{
|
|
@@ -54442,7 +56095,7 @@ var init_WorldMapTemplate = __esm({
|
|
|
54442
56095
|
}
|
|
54443
56096
|
});
|
|
54444
56097
|
function lazyThree(name, loader) {
|
|
54445
|
-
const Lazy =
|
|
56098
|
+
const Lazy = React94__default.lazy(
|
|
54446
56099
|
() => loader().then((m) => {
|
|
54447
56100
|
const Resolved = m[name];
|
|
54448
56101
|
if (!Resolved) {
|
|
@@ -54454,13 +56107,13 @@ function lazyThree(name, loader) {
|
|
|
54454
56107
|
})
|
|
54455
56108
|
);
|
|
54456
56109
|
function ThreeWrapper(props) {
|
|
54457
|
-
return
|
|
56110
|
+
return React94__default.createElement(
|
|
54458
56111
|
ThreeBoundary,
|
|
54459
56112
|
{ name },
|
|
54460
|
-
|
|
54461
|
-
|
|
56113
|
+
React94__default.createElement(
|
|
56114
|
+
React94__default.Suspense,
|
|
54462
56115
|
{ fallback: null },
|
|
54463
|
-
|
|
56116
|
+
React94__default.createElement(Lazy, props)
|
|
54464
56117
|
)
|
|
54465
56118
|
);
|
|
54466
56119
|
}
|
|
@@ -54490,6 +56143,7 @@ var init_component_registry_generated = __esm({
|
|
|
54490
56143
|
init_BattleTemplate();
|
|
54491
56144
|
init_BehaviorView();
|
|
54492
56145
|
init_BloomQuizBlock();
|
|
56146
|
+
init_BoardgameBoard();
|
|
54493
56147
|
init_BookChapterView();
|
|
54494
56148
|
init_BookCoverPage();
|
|
54495
56149
|
init_BookNavBar();
|
|
@@ -54516,6 +56170,7 @@ var init_component_registry_generated = __esm({
|
|
|
54516
56170
|
init_Center();
|
|
54517
56171
|
init_Chart();
|
|
54518
56172
|
init_ChartLegend();
|
|
56173
|
+
init_ChatBar();
|
|
54519
56174
|
init_Checkbox();
|
|
54520
56175
|
init_ChoiceButton();
|
|
54521
56176
|
init_CityBuilderBoard();
|
|
@@ -54573,6 +56228,7 @@ var init_component_registry_generated = __esm({
|
|
|
54573
56228
|
init_FileTree();
|
|
54574
56229
|
init_FilterGroup();
|
|
54575
56230
|
init_FilterPill();
|
|
56231
|
+
init_FishingBoard();
|
|
54576
56232
|
init_Flex();
|
|
54577
56233
|
init_FlipCard();
|
|
54578
56234
|
init_FlipContainer();
|
|
@@ -54602,6 +56258,7 @@ var init_component_registry_generated = __esm({
|
|
|
54602
56258
|
init_HeroOrganism();
|
|
54603
56259
|
init_HeroSection();
|
|
54604
56260
|
init_HexStrategyBoard();
|
|
56261
|
+
init_HolidayRunnerBoard();
|
|
54605
56262
|
init_Icon();
|
|
54606
56263
|
init_InfiniteScrollSentinel();
|
|
54607
56264
|
init_Input();
|
|
@@ -54624,11 +56281,13 @@ var init_component_registry_generated = __esm({
|
|
|
54624
56281
|
init_MarketingFooter();
|
|
54625
56282
|
init_MasterDetail();
|
|
54626
56283
|
init_MasterDetailLayout();
|
|
56284
|
+
init_MatchPuzzleBoard();
|
|
54627
56285
|
init_MatrixQuestion();
|
|
54628
56286
|
init_MediaGallery();
|
|
54629
56287
|
init_Menu();
|
|
54630
56288
|
init_Meter();
|
|
54631
56289
|
init_MiniMap();
|
|
56290
|
+
init_MinigolfBoard();
|
|
54632
56291
|
init_Modal();
|
|
54633
56292
|
init_ModalSlot();
|
|
54634
56293
|
init_ModuleCard();
|
|
@@ -54641,6 +56300,8 @@ var init_component_registry_generated = __esm({
|
|
|
54641
56300
|
init_PageHeader();
|
|
54642
56301
|
init_Pagination();
|
|
54643
56302
|
init_PatternTile();
|
|
56303
|
+
init_PinballBoard();
|
|
56304
|
+
init_PirateBoard();
|
|
54644
56305
|
init_PlatformerBoard();
|
|
54645
56306
|
init_PlatformerCanvas();
|
|
54646
56307
|
init_PlatformerTemplate();
|
|
@@ -54658,6 +56319,7 @@ var init_component_registry_generated = __esm({
|
|
|
54658
56319
|
init_QrScanner();
|
|
54659
56320
|
init_QuestTracker();
|
|
54660
56321
|
init_QuizBlock();
|
|
56322
|
+
init_RacingBoard();
|
|
54661
56323
|
init_Radio();
|
|
54662
56324
|
init_RangeSlider();
|
|
54663
56325
|
init_ReflectionBlock();
|
|
@@ -54691,12 +56353,16 @@ var init_component_registry_generated = __esm({
|
|
|
54691
56353
|
init_SimulatorBoard();
|
|
54692
56354
|
init_Skeleton();
|
|
54693
56355
|
init_SocialProof();
|
|
56356
|
+
init_SokobanBoard();
|
|
54694
56357
|
init_SortableList();
|
|
56358
|
+
init_SpaceShmupBoard();
|
|
56359
|
+
init_SpaceStationBoard();
|
|
54695
56360
|
init_Sparkline();
|
|
54696
56361
|
init_Spinner();
|
|
54697
56362
|
init_Split();
|
|
54698
56363
|
init_SplitPane();
|
|
54699
56364
|
init_SplitSection();
|
|
56365
|
+
init_SportsBoard();
|
|
54700
56366
|
init_Sprite();
|
|
54701
56367
|
init_StarRating();
|
|
54702
56368
|
init_StatBadge();
|
|
@@ -54711,6 +56377,7 @@ var init_component_registry_generated = __esm({
|
|
|
54711
56377
|
init_StatusEffect();
|
|
54712
56378
|
init_StepFlow();
|
|
54713
56379
|
init_StepFlowOrganism();
|
|
56380
|
+
init_SubagentTracePanel();
|
|
54714
56381
|
init_SvgBranch();
|
|
54715
56382
|
init_SvgConnection();
|
|
54716
56383
|
init_SvgFlow();
|
|
@@ -54730,6 +56397,7 @@ var init_component_registry_generated = __esm({
|
|
|
54730
56397
|
init_Tabs();
|
|
54731
56398
|
init_TagCloud();
|
|
54732
56399
|
init_TagInput();
|
|
56400
|
+
init_TanksBoard();
|
|
54733
56401
|
init_TeamCard();
|
|
54734
56402
|
init_TeamOrganism();
|
|
54735
56403
|
init_TextHighlight();
|
|
@@ -54768,7 +56436,7 @@ var init_component_registry_generated = __esm({
|
|
|
54768
56436
|
init_WorldMapBoard();
|
|
54769
56437
|
init_WorldMapTemplate();
|
|
54770
56438
|
init_XPBar();
|
|
54771
|
-
ThreeBoundary = class extends
|
|
56439
|
+
ThreeBoundary = class extends React94__default.Component {
|
|
54772
56440
|
constructor() {
|
|
54773
56441
|
super(...arguments);
|
|
54774
56442
|
__publicField(this, "state", { failed: false });
|
|
@@ -54778,7 +56446,7 @@ var init_component_registry_generated = __esm({
|
|
|
54778
56446
|
}
|
|
54779
56447
|
render() {
|
|
54780
56448
|
if (this.state.failed) {
|
|
54781
|
-
return
|
|
56449
|
+
return React94__default.createElement(
|
|
54782
56450
|
"div",
|
|
54783
56451
|
{
|
|
54784
56452
|
"data-testid": "three-unavailable",
|
|
@@ -54817,6 +56485,7 @@ var init_component_registry_generated = __esm({
|
|
|
54817
56485
|
"BattleTemplate": BattleTemplate,
|
|
54818
56486
|
"BehaviorView": BehaviorView,
|
|
54819
56487
|
"BloomQuizBlock": BloomQuizBlock,
|
|
56488
|
+
"BoardgameBoard": BoardgameBoard,
|
|
54820
56489
|
"BookChapterView": BookChapterView,
|
|
54821
56490
|
"BookCoverPage": BookCoverPage,
|
|
54822
56491
|
"BookNavBar": BookNavBar,
|
|
@@ -54846,6 +56515,7 @@ var init_component_registry_generated = __esm({
|
|
|
54846
56515
|
"Center": Center,
|
|
54847
56516
|
"Chart": Chart,
|
|
54848
56517
|
"ChartLegend": ChartLegend,
|
|
56518
|
+
"ChatBar": ChatBar,
|
|
54849
56519
|
"Checkbox": Checkbox,
|
|
54850
56520
|
"ChoiceButton": ChoiceButton,
|
|
54851
56521
|
"CityBuilderBoard": CityBuilderBoard,
|
|
@@ -54906,6 +56576,7 @@ var init_component_registry_generated = __esm({
|
|
|
54906
56576
|
"FileTree": FileTree,
|
|
54907
56577
|
"FilterGroup": FilterGroup,
|
|
54908
56578
|
"FilterPill": FilterPill,
|
|
56579
|
+
"FishingBoard": FishingBoard,
|
|
54909
56580
|
"Flex": Flex,
|
|
54910
56581
|
"FlipCard": FlipCard,
|
|
54911
56582
|
"FlipContainer": FlipContainer,
|
|
@@ -54939,6 +56610,7 @@ var init_component_registry_generated = __esm({
|
|
|
54939
56610
|
"HeroOrganism": HeroOrganism,
|
|
54940
56611
|
"HeroSection": HeroSection,
|
|
54941
56612
|
"HexStrategyBoard": HexStrategyBoard,
|
|
56613
|
+
"HolidayRunnerBoard": HolidayRunnerBoard,
|
|
54942
56614
|
"Icon": Icon,
|
|
54943
56615
|
"InfiniteScrollSentinel": InfiniteScrollSentinel,
|
|
54944
56616
|
"Input": Input,
|
|
@@ -54963,11 +56635,13 @@ var init_component_registry_generated = __esm({
|
|
|
54963
56635
|
"MarketingFooter": MarketingFooter,
|
|
54964
56636
|
"MasterDetail": MasterDetail,
|
|
54965
56637
|
"MasterDetailLayout": MasterDetailLayout,
|
|
56638
|
+
"MatchPuzzleBoard": MatchPuzzleBoard,
|
|
54966
56639
|
"MatrixQuestion": MatrixQuestion,
|
|
54967
56640
|
"MediaGallery": MediaGallery,
|
|
54968
56641
|
"Menu": Menu,
|
|
54969
56642
|
"Meter": Meter,
|
|
54970
56643
|
"MiniMap": MiniMap,
|
|
56644
|
+
"MinigolfBoard": MinigolfBoard,
|
|
54971
56645
|
"Modal": Modal,
|
|
54972
56646
|
"ModalSlot": ModalSlot,
|
|
54973
56647
|
"ModuleCard": ModuleCard,
|
|
@@ -54980,6 +56654,8 @@ var init_component_registry_generated = __esm({
|
|
|
54980
56654
|
"PageHeader": PageHeader,
|
|
54981
56655
|
"Pagination": Pagination,
|
|
54982
56656
|
"PatternTile": PatternTile,
|
|
56657
|
+
"PinballBoard": PinballBoard,
|
|
56658
|
+
"PirateBoard": PirateBoard,
|
|
54983
56659
|
"PlatformerBoard": PlatformerBoard,
|
|
54984
56660
|
"PlatformerCanvas": PlatformerCanvas,
|
|
54985
56661
|
"PlatformerTemplate": PlatformerTemplate,
|
|
@@ -54997,6 +56673,7 @@ var init_component_registry_generated = __esm({
|
|
|
54997
56673
|
"QrScanner": QrScanner,
|
|
54998
56674
|
"QuestTracker": QuestTracker,
|
|
54999
56675
|
"QuizBlock": QuizBlock,
|
|
56676
|
+
"RacingBoard": RacingBoard,
|
|
55000
56677
|
"Radio": Radio,
|
|
55001
56678
|
"RangeSlider": RangeSlider,
|
|
55002
56679
|
"ReflectionBlock": ReflectionBlock,
|
|
@@ -55030,7 +56707,10 @@ var init_component_registry_generated = __esm({
|
|
|
55030
56707
|
"SimulatorBoard": SimulatorBoard,
|
|
55031
56708
|
"Skeleton": Skeleton,
|
|
55032
56709
|
"SocialProof": SocialProof,
|
|
56710
|
+
"SokobanBoard": SokobanBoard,
|
|
55033
56711
|
"SortableList": SortableList,
|
|
56712
|
+
"SpaceShmupBoard": SpaceShmupBoard,
|
|
56713
|
+
"SpaceStationBoard": SpaceStationBoard,
|
|
55034
56714
|
"Spacer": SpacerPattern,
|
|
55035
56715
|
"SpacerPattern": SpacerPattern,
|
|
55036
56716
|
"Sparkline": Sparkline,
|
|
@@ -55038,6 +56718,7 @@ var init_component_registry_generated = __esm({
|
|
|
55038
56718
|
"Split": Split,
|
|
55039
56719
|
"SplitPane": SplitPane,
|
|
55040
56720
|
"SplitSection": SplitSection,
|
|
56721
|
+
"SportsBoard": SportsBoard,
|
|
55041
56722
|
"Sprite": Sprite,
|
|
55042
56723
|
"Stack": Stack,
|
|
55043
56724
|
"StarRating": StarRating,
|
|
@@ -55053,6 +56734,7 @@ var init_component_registry_generated = __esm({
|
|
|
55053
56734
|
"StatusEffect": StatusEffect,
|
|
55054
56735
|
"StepFlow": StepFlow,
|
|
55055
56736
|
"StepFlowOrganism": StepFlowOrganism,
|
|
56737
|
+
"SubagentTracePanel": SubagentTracePanel,
|
|
55056
56738
|
"SvgBranch": SvgBranch,
|
|
55057
56739
|
"SvgConnection": SvgConnection,
|
|
55058
56740
|
"SvgFlow": SvgFlow,
|
|
@@ -55072,6 +56754,7 @@ var init_component_registry_generated = __esm({
|
|
|
55072
56754
|
"Tabs": Tabs,
|
|
55073
56755
|
"TagCloud": TagCloud,
|
|
55074
56756
|
"TagInput": TagInput,
|
|
56757
|
+
"TanksBoard": TanksBoard,
|
|
55075
56758
|
"TeamCard": TeamCard,
|
|
55076
56759
|
"TeamOrganism": TeamOrganism,
|
|
55077
56760
|
"TextHighlight": TextHighlight,
|
|
@@ -55129,7 +56812,7 @@ function SuspenseConfigProvider({
|
|
|
55129
56812
|
config,
|
|
55130
56813
|
children
|
|
55131
56814
|
}) {
|
|
55132
|
-
return
|
|
56815
|
+
return React94__default.createElement(
|
|
55133
56816
|
SuspenseConfigContext.Provider,
|
|
55134
56817
|
{ value: config },
|
|
55135
56818
|
children
|
|
@@ -55140,8 +56823,8 @@ function getSlotFallback(slot, config) {
|
|
|
55140
56823
|
const variant = SLOT_SKELETON_MAP[slot] ?? "text";
|
|
55141
56824
|
return /* @__PURE__ */ jsx(Skeleton, { variant });
|
|
55142
56825
|
}
|
|
55143
|
-
function
|
|
55144
|
-
const mapping = getComponentForPattern
|
|
56826
|
+
function getComponentForPattern3(patternType) {
|
|
56827
|
+
const mapping = getComponentForPattern(patternType);
|
|
55145
56828
|
if (!mapping) {
|
|
55146
56829
|
return null;
|
|
55147
56830
|
}
|
|
@@ -55619,7 +57302,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
55619
57302
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
55620
57303
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
55621
57304
|
}
|
|
55622
|
-
return /* @__PURE__ */ jsx(
|
|
57305
|
+
return /* @__PURE__ */ jsx(React94__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
55623
57306
|
}
|
|
55624
57307
|
if (!child || typeof child !== "object") return null;
|
|
55625
57308
|
const childId = `${parentId}-${index}`;
|
|
@@ -55659,14 +57342,14 @@ function isPatternConfig(value) {
|
|
|
55659
57342
|
if (value === null || value === void 0) return false;
|
|
55660
57343
|
if (typeof value !== "object") return false;
|
|
55661
57344
|
if (Array.isArray(value)) return false;
|
|
55662
|
-
if (
|
|
57345
|
+
if (React94__default.isValidElement(value)) return false;
|
|
55663
57346
|
if (value instanceof Date) return false;
|
|
55664
57347
|
if (typeof value === "function") return false;
|
|
55665
57348
|
const record = value;
|
|
55666
|
-
return "type" in record && typeof record.type === "string" && getComponentForPattern
|
|
57349
|
+
return "type" in record && typeof record.type === "string" && getComponentForPattern(record.type) !== null;
|
|
55667
57350
|
}
|
|
55668
57351
|
function isPlainConfigObject(value) {
|
|
55669
|
-
if (
|
|
57352
|
+
if (React94__default.isValidElement(value)) return false;
|
|
55670
57353
|
if (value instanceof Date) return false;
|
|
55671
57354
|
const proto = Object.getPrototypeOf(value);
|
|
55672
57355
|
return proto === Object.prototype || proto === null;
|
|
@@ -55771,7 +57454,8 @@ function SlotContentRenderer({
|
|
|
55771
57454
|
entityDef = schemaCtx.entities.get(linkedEntity);
|
|
55772
57455
|
}
|
|
55773
57456
|
}
|
|
55774
|
-
const
|
|
57457
|
+
const orbitalName = schemaCtx && content.sourceTrait !== void 0 ? schemaCtx.orbitalsByTrait.get(content.sourceTrait) : void 0;
|
|
57458
|
+
const PatternComponent = getComponentForPattern3(content.pattern);
|
|
55775
57459
|
if (PatternComponent) {
|
|
55776
57460
|
const childrenConfig = content.props.children;
|
|
55777
57461
|
const isSingleChild = typeof childrenConfig === "string" || typeof childrenConfig === "object" && childrenConfig !== null && !Array.isArray(childrenConfig) && "type" in childrenConfig;
|
|
@@ -55791,7 +57475,7 @@ function SlotContentRenderer({
|
|
|
55791
57475
|
for (const slotKey of CONTENT_NODE_SLOTS) {
|
|
55792
57476
|
const slotVal = restProps[slotKey];
|
|
55793
57477
|
if (slotVal === void 0 || slotVal === null) continue;
|
|
55794
|
-
if (
|
|
57478
|
+
if (React94__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
|
|
55795
57479
|
if (Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
|
|
55796
57480
|
nodeSlotOverrides[slotKey] = renderPatternChildren(
|
|
55797
57481
|
slotVal,
|
|
@@ -55869,6 +57553,7 @@ function SlotContentRenderer({
|
|
|
55869
57553
|
"data-orb-entity": content.entity,
|
|
55870
57554
|
"data-orb-path": myPath,
|
|
55871
57555
|
"data-orb-pattern": content.pattern,
|
|
57556
|
+
"data-orb-orbital": orbitalName,
|
|
55872
57557
|
children: renderedChildren !== void 0 ? /* @__PURE__ */ jsx(PatternComponent, { ...finalProps, children: renderedChildren }) : /* @__PURE__ */ jsx(PatternComponent, { ...finalProps })
|
|
55873
57558
|
}
|
|
55874
57559
|
);
|
|
@@ -55888,6 +57573,7 @@ function SlotContentRenderer({
|
|
|
55888
57573
|
"data-orb-entity": content.entity,
|
|
55889
57574
|
"data-orb-path": patternPath ?? "root",
|
|
55890
57575
|
"data-orb-pattern": content.pattern,
|
|
57576
|
+
"data-orb-orbital": orbitalName,
|
|
55891
57577
|
children: content.props.children ?? /* @__PURE__ */ jsxs(Box, { className: "p-4 text-sm text-muted-foreground border border-dashed border-border rounded", children: [
|
|
55892
57578
|
"Unknown pattern: ",
|
|
55893
57579
|
content.pattern,
|
|
@@ -56202,7 +57888,7 @@ var AvlTransition = ({
|
|
|
56202
57888
|
opacity = 1,
|
|
56203
57889
|
className
|
|
56204
57890
|
}) => {
|
|
56205
|
-
const ids =
|
|
57891
|
+
const ids = React94__default.useMemo(() => {
|
|
56206
57892
|
avlTransitionId += 1;
|
|
56207
57893
|
return { arrow: `avl-tr-${avlTransitionId}-arrow` };
|
|
56208
57894
|
}, []);
|
|
@@ -56763,7 +58449,7 @@ var AvlStateMachine = ({
|
|
|
56763
58449
|
color = "var(--color-primary)",
|
|
56764
58450
|
animated = false
|
|
56765
58451
|
}) => {
|
|
56766
|
-
const ids =
|
|
58452
|
+
const ids = React94__default.useMemo(() => {
|
|
56767
58453
|
avlSmId += 1;
|
|
56768
58454
|
const base = `avl-sm-${avlSmId}`;
|
|
56769
58455
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -56962,7 +58648,7 @@ var AvlOrbitalUnit = ({
|
|
|
56962
58648
|
color = "var(--color-primary)",
|
|
56963
58649
|
animated = false
|
|
56964
58650
|
}) => {
|
|
56965
|
-
const ids =
|
|
58651
|
+
const ids = React94__default.useMemo(() => {
|
|
56966
58652
|
avlOuId += 1;
|
|
56967
58653
|
const base = `avl-ou-${avlOuId}`;
|
|
56968
58654
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -57058,7 +58744,7 @@ var AvlClosedCircuit = ({
|
|
|
57058
58744
|
color = "var(--color-primary)",
|
|
57059
58745
|
animated = false
|
|
57060
58746
|
}) => {
|
|
57061
|
-
const ids =
|
|
58747
|
+
const ids = React94__default.useMemo(() => {
|
|
57062
58748
|
avlCcId += 1;
|
|
57063
58749
|
const base = `avl-cc-${avlCcId}`;
|
|
57064
58750
|
return { glow: `${base}-glow`, grad: `${base}-grad`, arrow: `${base}-arrow` };
|
|
@@ -57213,7 +58899,7 @@ var AvlEmitListen = ({
|
|
|
57213
58899
|
color = "var(--color-primary)",
|
|
57214
58900
|
animated = false
|
|
57215
58901
|
}) => {
|
|
57216
|
-
const ids =
|
|
58902
|
+
const ids = React94__default.useMemo(() => {
|
|
57217
58903
|
avlElId += 1;
|
|
57218
58904
|
const base = `avl-el-${avlElId}`;
|
|
57219
58905
|
return { arrow: `${base}-arrow`, grad: `${base}-grad` };
|
|
@@ -57487,7 +59173,7 @@ function renderNode(node, color, glowId) {
|
|
|
57487
59173
|
const baseR = node.type === "operator" ? 20 : 16;
|
|
57488
59174
|
const r2 = Math.max(baseR, labelLen * 3.5 + 6);
|
|
57489
59175
|
const nc = nodeColor(node.type, color);
|
|
57490
|
-
return /* @__PURE__ */ jsxs(
|
|
59176
|
+
return /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
|
|
57491
59177
|
node.children.map((child, i) => {
|
|
57492
59178
|
const childR = Math.max(
|
|
57493
59179
|
child.type === "operator" ? 20 : 16,
|
|
@@ -57544,7 +59230,7 @@ var AvlExprTree = ({
|
|
|
57544
59230
|
className,
|
|
57545
59231
|
color = "var(--color-primary)"
|
|
57546
59232
|
}) => {
|
|
57547
|
-
const ids =
|
|
59233
|
+
const ids = React94__default.useMemo(() => {
|
|
57548
59234
|
avlEtId += 1;
|
|
57549
59235
|
return { glow: `avl-et-${avlEtId}-glow` };
|
|
57550
59236
|
}, []);
|
|
@@ -58368,7 +60054,7 @@ var SystemNode = ({ data }) => {
|
|
|
58368
60054
|
stateChain.length > 0 && /* @__PURE__ */ jsx("svg", { width: stateChain.length * 14 + 2, height: 10, viewBox: `0 0 ${stateChain.length * 14 + 2} 10`, children: stateChain.map((s, i) => {
|
|
58369
60055
|
const tc = transitionCounts[s.name] ?? 0;
|
|
58370
60056
|
const role = getStateRole(s.name, s.isInitial, s.isTerminal, tc, maxTC);
|
|
58371
|
-
return /* @__PURE__ */ jsxs(
|
|
60057
|
+
return /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
|
|
58372
60058
|
/* @__PURE__ */ jsx(AvlState, { x: i * 14 + 1, y: 1, width: 10, height: 8, name: "", role, isInitial: s.isInitial, isTerminal: s.isTerminal }),
|
|
58373
60059
|
i < stateChain.length - 1 && /* @__PURE__ */ jsx("line", { x1: i * 14 + 12, y1: 5, x2: i * 14 + 15, y2: 5, stroke: "var(--color-border)", strokeWidth: 0.5 })
|
|
58374
60060
|
] }, s.name);
|
|
@@ -59520,7 +61206,7 @@ function resolveLambdaBindings(body, params, item, index) {
|
|
|
59520
61206
|
if (Array.isArray(body)) {
|
|
59521
61207
|
return body.map((b) => recur(b));
|
|
59522
61208
|
}
|
|
59523
|
-
if (body !== null && typeof body === "object" && !
|
|
61209
|
+
if (body !== null && typeof body === "object" && !React94__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
59524
61210
|
const out = {};
|
|
59525
61211
|
for (const [k, v] of Object.entries(body)) {
|
|
59526
61212
|
out[k] = recur(v);
|
|
@@ -59530,7 +61216,7 @@ function resolveLambdaBindings(body, params, item, index) {
|
|
|
59530
61216
|
return body;
|
|
59531
61217
|
}
|
|
59532
61218
|
var _slotContentRenderer2 = null;
|
|
59533
|
-
function
|
|
61219
|
+
function getSlotContentRenderer4() {
|
|
59534
61220
|
if (_slotContentRenderer2) return _slotContentRenderer2;
|
|
59535
61221
|
const mod = (init_UISlotRenderer(), __toCommonJS(UISlotRenderer_exports));
|
|
59536
61222
|
_slotContentRenderer2 = mod.SlotContentRenderer;
|
|
@@ -59539,14 +61225,14 @@ function getSlotContentRenderer2() {
|
|
|
59539
61225
|
function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
59540
61226
|
return (item, index) => {
|
|
59541
61227
|
const resolvedBody = resolveLambdaBindings(lambdaBody, params, item, index);
|
|
59542
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
61228
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React94__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
59543
61229
|
return null;
|
|
59544
61230
|
}
|
|
59545
61231
|
const record = resolvedBody;
|
|
59546
61232
|
if (typeof record.type !== "string") {
|
|
59547
61233
|
return null;
|
|
59548
61234
|
}
|
|
59549
|
-
const SlotContentRenderer2 =
|
|
61235
|
+
const SlotContentRenderer2 = getSlotContentRenderer4();
|
|
59550
61236
|
const rawChildProps = {};
|
|
59551
61237
|
for (const [k, v] of Object.entries(record)) {
|
|
59552
61238
|
if (k !== "type") rawChildProps[k] = v;
|
|
@@ -59558,7 +61244,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
59558
61244
|
props: childProps,
|
|
59559
61245
|
priority: 0
|
|
59560
61246
|
};
|
|
59561
|
-
return
|
|
61247
|
+
return React94__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
59562
61248
|
};
|
|
59563
61249
|
}
|
|
59564
61250
|
function convertNode(node, callerKey) {
|
|
@@ -59577,7 +61263,7 @@ function convertNode(node, callerKey) {
|
|
|
59577
61263
|
});
|
|
59578
61264
|
return anyChanged ? mapped : node;
|
|
59579
61265
|
}
|
|
59580
|
-
if (typeof node === "object" && !
|
|
61266
|
+
if (typeof node === "object" && !React94__default.isValidElement(node) && !(node instanceof Date)) {
|
|
59581
61267
|
return convertObjectProps(node);
|
|
59582
61268
|
}
|
|
59583
61269
|
return node;
|
|
@@ -61809,8 +63495,8 @@ function CanvasDndProvider({
|
|
|
61809
63495
|
}) {
|
|
61810
63496
|
const eventBus = useEventBus();
|
|
61811
63497
|
const sensors = useAlmadarDndSensors(false);
|
|
61812
|
-
const [activePayload, setActivePayload] =
|
|
61813
|
-
const handleDragStart =
|
|
63498
|
+
const [activePayload, setActivePayload] = React94__default.useState(null);
|
|
63499
|
+
const handleDragStart = React94__default.useCallback((e) => {
|
|
61814
63500
|
const data = e.active.data.current;
|
|
61815
63501
|
const payload = data?.payload;
|
|
61816
63502
|
if (payload) {
|
|
@@ -61821,7 +63507,7 @@ function CanvasDndProvider({
|
|
|
61821
63507
|
log13.warn("dragStart:missing-payload", { id: e.active.id });
|
|
61822
63508
|
}
|
|
61823
63509
|
}, [eventBus]);
|
|
61824
|
-
const handleDragEnd =
|
|
63510
|
+
const handleDragEnd = React94__default.useCallback((e) => {
|
|
61825
63511
|
setActivePayload(null);
|
|
61826
63512
|
const activeData = e.active.data.current;
|
|
61827
63513
|
const payload = activeData?.payload;
|
|
@@ -61850,7 +63536,7 @@ function CanvasDndProvider({
|
|
|
61850
63536
|
const suppressed = onDrop ? onDrop(drop) === true : false;
|
|
61851
63537
|
if (!suppressed) defaultEmit(eventBus, drop);
|
|
61852
63538
|
}, [eventBus, onDrop]);
|
|
61853
|
-
const handleDragCancel =
|
|
63539
|
+
const handleDragCancel = React94__default.useCallback(() => {
|
|
61854
63540
|
setActivePayload(null);
|
|
61855
63541
|
log13.info("dragCancel");
|
|
61856
63542
|
}, []);
|
|
@@ -61906,6 +63592,33 @@ function formatPayloadTooltip(fields) {
|
|
|
61906
63592
|
);
|
|
61907
63593
|
return `{ ${parts.join(", ")} }`;
|
|
61908
63594
|
}
|
|
63595
|
+
|
|
63596
|
+
// components/avl/derive-edit-focus.ts
|
|
63597
|
+
function deriveEditFocusFromElement(el) {
|
|
63598
|
+
const orbitalEl = el.getAttribute("data-orb-orbital") !== null ? el : el.closest("[data-orb-orbital]");
|
|
63599
|
+
const orbital = orbitalEl?.getAttribute("data-orb-orbital") ?? "";
|
|
63600
|
+
if (!orbital) return null;
|
|
63601
|
+
const path = el.getAttribute("data-orb-path") ?? el.getAttribute("data-pattern-path");
|
|
63602
|
+
const patternType = el.getAttribute("data-orb-pattern") ?? el.getAttribute("data-pattern");
|
|
63603
|
+
const trait = el.getAttribute("data-orb-trait") ?? el.getAttribute("data-source-trait");
|
|
63604
|
+
const focus = {
|
|
63605
|
+
level: "node",
|
|
63606
|
+
orbital,
|
|
63607
|
+
label: patternType ?? trait ?? "element"
|
|
63608
|
+
};
|
|
63609
|
+
if (path !== null) focus.path = path;
|
|
63610
|
+
if (trait !== null) focus.trait = trait;
|
|
63611
|
+
if (patternType !== null) focus.patternType = patternType;
|
|
63612
|
+
const transition = el.getAttribute("data-orb-transition");
|
|
63613
|
+
if (transition !== null) focus.transition = transition;
|
|
63614
|
+
const state = el.getAttribute("data-orb-state");
|
|
63615
|
+
if (state !== null) focus.state = state;
|
|
63616
|
+
const slot = el.getAttribute("data-orb-slot");
|
|
63617
|
+
if (slot !== null) focus.slot = slot;
|
|
63618
|
+
const entity = el.getAttribute("data-orb-entity");
|
|
63619
|
+
if (entity !== null) focus.entity = entity;
|
|
63620
|
+
return focus;
|
|
63621
|
+
}
|
|
61909
63622
|
function entityNameOf(ref) {
|
|
61910
63623
|
if (!ref) return void 0;
|
|
61911
63624
|
if (typeof ref === "string") return ref;
|
|
@@ -62191,29 +63904,6 @@ function rectRelativeTo(el, container, zoom) {
|
|
|
62191
63904
|
height: (u.bottom - u.top) / z
|
|
62192
63905
|
};
|
|
62193
63906
|
}
|
|
62194
|
-
function buildFocus(el, orbitalName) {
|
|
62195
|
-
if (!orbitalName) return null;
|
|
62196
|
-
const path = el.getAttribute("data-orb-path") ?? el.getAttribute("data-pattern-path");
|
|
62197
|
-
const patternType = el.getAttribute("data-orb-pattern") ?? el.getAttribute("data-pattern");
|
|
62198
|
-
const trait = el.getAttribute("data-orb-trait") ?? el.getAttribute("data-source-trait");
|
|
62199
|
-
const focus = {
|
|
62200
|
-
level: "node",
|
|
62201
|
-
orbital: orbitalName,
|
|
62202
|
-
label: patternType ?? trait ?? "element"
|
|
62203
|
-
};
|
|
62204
|
-
if (path !== null) focus.path = path;
|
|
62205
|
-
if (trait !== null) focus.trait = trait;
|
|
62206
|
-
if (patternType !== null) focus.patternType = patternType;
|
|
62207
|
-
const transition = el.getAttribute("data-orb-transition");
|
|
62208
|
-
if (transition !== null) focus.transition = transition;
|
|
62209
|
-
const state = el.getAttribute("data-orb-state");
|
|
62210
|
-
if (state !== null) focus.state = state;
|
|
62211
|
-
const slot = el.getAttribute("data-orb-slot");
|
|
62212
|
-
if (slot !== null) focus.slot = slot;
|
|
62213
|
-
const entity = el.getAttribute("data-orb-entity");
|
|
62214
|
-
if (entity !== null) focus.entity = entity;
|
|
62215
|
-
return focus;
|
|
62216
|
-
}
|
|
62217
63907
|
var OrbPreviewNodeInner = (props) => {
|
|
62218
63908
|
const data = props.data;
|
|
62219
63909
|
const screenSize = useContext(ScreenSizeContext);
|
|
@@ -62282,7 +63972,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
62282
63972
|
nodeData: data,
|
|
62283
63973
|
rect: rect ?? void 0
|
|
62284
63974
|
});
|
|
62285
|
-
const focus =
|
|
63975
|
+
const focus = deriveEditFocusFromElement(patternEl);
|
|
62286
63976
|
if (focus) eventBus.emit("UI:ELEMENT_SELECTED", { focus: { ...focus } });
|
|
62287
63977
|
} else {
|
|
62288
63978
|
setSelectedRect(null);
|
|
@@ -62604,7 +64294,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
62604
64294
|
}
|
|
62605
64295
|
);
|
|
62606
64296
|
};
|
|
62607
|
-
var OrbPreviewNode =
|
|
64297
|
+
var OrbPreviewNode = React94__default.memo(OrbPreviewNodeInner);
|
|
62608
64298
|
OrbPreviewNode.displayName = "OrbPreviewNode";
|
|
62609
64299
|
orbPreviewLog.debug("export-resolved", () => ({
|
|
62610
64300
|
type: typeof OrbPreviewNode,
|
|
@@ -62709,7 +64399,7 @@ var EventFlowEdgeInner = (props) => {
|
|
|
62709
64399
|
) })
|
|
62710
64400
|
] });
|
|
62711
64401
|
};
|
|
62712
|
-
var EventFlowEdge =
|
|
64402
|
+
var EventFlowEdge = React94__default.memo(EventFlowEdgeInner);
|
|
62713
64403
|
EventFlowEdge.displayName = "EventFlowEdge";
|
|
62714
64404
|
|
|
62715
64405
|
// components/avl/molecules/BehaviorComposeNode.tsx
|
|
@@ -62856,7 +64546,7 @@ var BehaviorComposeNodeInner = (props) => {
|
|
|
62856
64546
|
}
|
|
62857
64547
|
);
|
|
62858
64548
|
};
|
|
62859
|
-
var BehaviorComposeNode =
|
|
64549
|
+
var BehaviorComposeNode = React94__default.memo(BehaviorComposeNodeInner);
|
|
62860
64550
|
BehaviorComposeNode.displayName = "BehaviorComposeNode";
|
|
62861
64551
|
|
|
62862
64552
|
// components/avl/molecules/avl-behavior-compose-converter.ts
|
|
@@ -63868,7 +65558,7 @@ var TraitCardNodeInner = (props) => {
|
|
|
63868
65558
|
}
|
|
63869
65559
|
);
|
|
63870
65560
|
};
|
|
63871
|
-
var TraitCardNode =
|
|
65561
|
+
var TraitCardNode = React94__default.memo(TraitCardNodeInner);
|
|
63872
65562
|
TraitCardNode.displayName = "TraitCardNode";
|
|
63873
65563
|
|
|
63874
65564
|
// components/avl/organisms/FlowCanvas.tsx
|
|
@@ -63941,7 +65631,7 @@ function FlowCanvasInner({
|
|
|
63941
65631
|
initialOrbital
|
|
63942
65632
|
);
|
|
63943
65633
|
const [expandedBehaviorAlias, setExpandedBehaviorAlias] = useState(void 0);
|
|
63944
|
-
const screenSizeUserOverrideRef =
|
|
65634
|
+
const screenSizeUserOverrideRef = React94__default.useRef(false);
|
|
63945
65635
|
const [screenSize, setScreenSize] = useState(
|
|
63946
65636
|
() => typeof window === "undefined" ? "laptop" : detectScreenSize(window.innerWidth)
|
|
63947
65637
|
);
|
|
@@ -64325,7 +66015,7 @@ var ZoomBreadcrumb = ({
|
|
|
64325
66015
|
if (eventName && band === "detail") {
|
|
64326
66016
|
segments.push({ icon: "\u26A1", label: eventName });
|
|
64327
66017
|
}
|
|
64328
|
-
return /* @__PURE__ */ jsx("div", { className: "absolute top-2 left-2 z-10 flex items-center gap-1 px-2 py-1 rounded-md bg-card/90 border border-border text-xs text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(
|
|
66018
|
+
return /* @__PURE__ */ jsx("div", { className: "absolute top-2 left-2 z-10 flex items-center gap-1 px-2 py-1 rounded-md bg-card/90 border border-border text-xs text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
|
|
64329
66019
|
i > 0 && /* @__PURE__ */ jsx("span", { className: "opacity-40", children: ">" }),
|
|
64330
66020
|
/* @__PURE__ */ jsx("span", { className: "opacity-60", children: seg.icon }),
|
|
64331
66021
|
/* @__PURE__ */ jsx("span", { children: seg.label })
|
|
@@ -64666,7 +66356,7 @@ var EventWireOverlay = ({
|
|
|
64666
66356
|
containerW,
|
|
64667
66357
|
containerH
|
|
64668
66358
|
}) => {
|
|
64669
|
-
const ids =
|
|
66359
|
+
const ids = React94__default.useMemo(() => {
|
|
64670
66360
|
avlOczWireId += 1;
|
|
64671
66361
|
return { arrow: `avl-ocz-wire-${avlOczWireId}-arrow` };
|
|
64672
66362
|
}, []);
|
|
@@ -65033,7 +66723,7 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
65033
66723
|
borderRadius: 6,
|
|
65034
66724
|
border: `1px solid ${color}`
|
|
65035
66725
|
},
|
|
65036
|
-
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(
|
|
66726
|
+
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React94__default.Fragment, { children: [
|
|
65037
66727
|
i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", style: { opacity: 0.5, color }, children: "/" }),
|
|
65038
66728
|
i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
|
|
65039
66729
|
Box,
|
|
@@ -65523,4 +67213,4 @@ var AvlClickTarget = ({
|
|
|
65523
67213
|
};
|
|
65524
67214
|
AvlClickTarget.displayName = "AvlClickTarget";
|
|
65525
67215
|
|
|
65526
|
-
export { AVL_FIELD_TYPE_SHAPES, AVL_OPERATOR_COLORS, AvlApplication, AvlBackwardEdge, AvlBehaviorGlyph, AvlBinding, AvlBindingEdge, AvlBindingRef, AvlClickTarget, AvlClosedCircuit, AvlCosmicZoom, AvlEffect, AvlEmitListen, AvlEntity, AvlEvent, AvlEventWireEdge, AvlExprTree, AvlField, AvlFieldType, AvlGuard, AvlLiteral, AvlOperator, AvlOrbital, AvlOrbitalNode, AvlOrbitalUnit, AvlOrbitalsCosmicZoom, AvlPage, AvlPageEdge, AvlPersistence, AvlSExpr, AvlSlotMap, AvlState, AvlStateMachine, AvlSwimLane, AvlTrait, AvlTraitScene, AvlTransition, AvlTransitionEdge, AvlTransitionLane, AvlTransitionScene, BehaviorComposeNode, BehaviorView, CONNECTION_COLORS, CanvasDndProvider, DOMAIN_COLORS, DetailView, EFFECT_CATEGORY_COLORS, EFFECT_TYPE_TO_CATEGORY, EventFlowEdge, FlowCanvas, MiniStateMachine, ModuleCard, OrbInspector, OrbPreviewNode, STATE_COLORS, SystemNode, ZOOM_BAND_THRESHOLDS, ZoomBandContext, ZoomBreadcrumb, ZoomLegend, arcPath, behaviorsToComposeGraph, computeTraitLayout, computeZoomBand, curveControlPoint, edgePath, getStateRole, gridPositions, orbitalToExpandedGraph, parseApplicationLevel, parseOrbitalLevel, parseTraitLevel, parseTransitionLevel, radialPositions, registryEntryToCanvasEntry, ringPositions, schemaToFlowGraph, schemaToOverviewGraph, useCanvasDraggable, useCanvasDroppable, useZoomBand, zoomProgress };
|
|
67216
|
+
export { AVL_FIELD_TYPE_SHAPES, AVL_OPERATOR_COLORS, AvlApplication, AvlBackwardEdge, AvlBehaviorGlyph, AvlBinding, AvlBindingEdge, AvlBindingRef, AvlClickTarget, AvlClosedCircuit, AvlCosmicZoom, AvlEffect, AvlEmitListen, AvlEntity, AvlEvent, AvlEventWireEdge, AvlExprTree, AvlField, AvlFieldType, AvlGuard, AvlLiteral, AvlOperator, AvlOrbital, AvlOrbitalNode, AvlOrbitalUnit, AvlOrbitalsCosmicZoom, AvlPage, AvlPageEdge, AvlPersistence, AvlSExpr, AvlSlotMap, AvlState, AvlStateMachine, AvlSwimLane, AvlTrait, AvlTraitScene, AvlTransition, AvlTransitionEdge, AvlTransitionLane, AvlTransitionScene, BehaviorComposeNode, BehaviorView, CONNECTION_COLORS, CanvasDndProvider, DOMAIN_COLORS, DetailView, EFFECT_CATEGORY_COLORS, EFFECT_TYPE_TO_CATEGORY, EventFlowEdge, FlowCanvas, MiniStateMachine, ModuleCard, OrbInspector, OrbPreviewNode, STATE_COLORS, SystemNode, ZOOM_BAND_THRESHOLDS, ZoomBandContext, ZoomBreadcrumb, ZoomLegend, arcPath, behaviorsToComposeGraph, computeTraitLayout, computeZoomBand, curveControlPoint, deriveEditFocusFromElement, edgePath, getStateRole, gridPositions, orbitalToExpandedGraph, parseApplicationLevel, parseOrbitalLevel, parseTraitLevel, parseTransitionLevel, radialPositions, registryEntryToCanvasEntry, ringPositions, schemaToFlowGraph, schemaToOverviewGraph, useCanvasDraggable, useCanvasDroppable, useZoomBand, zoomProgress };
|