@almadar/ui 5.71.0 → 5.72.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 +1780 -1951
- package/dist/avl/index.js +513 -684
- package/dist/components/game/atoms/ScoreDisplay.d.ts +1 -3
- package/dist/components/game/atoms/Sprite.d.ts +6 -1
- package/dist/components/game/atoms/XPBar.d.ts +1 -1
- package/dist/components/game/molecules/GameCanvas3D.d.ts +0 -2
- package/dist/components/game/molecules/IsometricCanvas.d.ts +4 -2
- package/dist/components/game/molecules/PlatformerCanvas.d.ts +4 -1
- package/dist/components/game/molecules/StatBadge.d.ts +3 -1
- package/dist/components/game/molecules/three/index.cjs +4 -81
- package/dist/components/game/molecules/three/index.js +4 -81
- package/dist/components/game/molecules/useUnitSpriteAtlas.d.ts +3 -2
- package/dist/components/game/organisms/types/isometric.d.ts +16 -0
- package/dist/components/index.cjs +1906 -2057
- package/dist/components/index.js +794 -945
- package/dist/providers/index.cjs +1589 -1760
- package/dist/providers/index.js +489 -660
- package/dist/runtime/index.cjs +1645 -1816
- package/dist/runtime/index.js +493 -664
- package/package.json +1 -1
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 React96 from 'react';
|
|
3
|
+
import React96__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';
|
|
@@ -3181,7 +3181,7 @@ var init_Typography = __esm({
|
|
|
3181
3181
|
}) => {
|
|
3182
3182
|
const variant = variantProp ?? (level ? `h${level}` : "body1");
|
|
3183
3183
|
const Component2 = as || defaultElements[variant];
|
|
3184
|
-
return
|
|
3184
|
+
return React96__default.createElement(
|
|
3185
3185
|
Component2,
|
|
3186
3186
|
{
|
|
3187
3187
|
id,
|
|
@@ -3518,7 +3518,7 @@ var init_Box = __esm({
|
|
|
3518
3518
|
fixed: "fixed",
|
|
3519
3519
|
sticky: "sticky"
|
|
3520
3520
|
};
|
|
3521
|
-
Box =
|
|
3521
|
+
Box = React96__default.forwardRef(
|
|
3522
3522
|
({
|
|
3523
3523
|
padding,
|
|
3524
3524
|
paddingX,
|
|
@@ -3583,7 +3583,7 @@ var init_Box = __esm({
|
|
|
3583
3583
|
onPointerDown?.(e);
|
|
3584
3584
|
}, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
|
|
3585
3585
|
const isClickable = action || onClick;
|
|
3586
|
-
return
|
|
3586
|
+
return React96__default.createElement(
|
|
3587
3587
|
Component2,
|
|
3588
3588
|
{
|
|
3589
3589
|
ref,
|
|
@@ -3679,7 +3679,7 @@ var init_Stack = __esm({
|
|
|
3679
3679
|
};
|
|
3680
3680
|
const isHorizontal = direction === "horizontal";
|
|
3681
3681
|
const directionClass = responsive && isHorizontal ? reverse ? "flex-col-reverse md:flex-row-reverse" : "flex-col md:flex-row" : isHorizontal ? reverse ? "flex-row-reverse" : "flex-row" : reverse ? "flex-col-reverse" : "flex-col";
|
|
3682
|
-
return
|
|
3682
|
+
return React96__default.createElement(
|
|
3683
3683
|
Component2,
|
|
3684
3684
|
{
|
|
3685
3685
|
className: cn(
|
|
@@ -4171,7 +4171,7 @@ var init_MiniStateMachine = __esm({
|
|
|
4171
4171
|
const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
|
|
4172
4172
|
const tc = transitionCounts[s.name] ?? 0;
|
|
4173
4173
|
const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
4174
|
-
return /* @__PURE__ */ jsxs(
|
|
4174
|
+
return /* @__PURE__ */ jsxs(React96__default.Fragment, { children: [
|
|
4175
4175
|
/* @__PURE__ */ jsx(
|
|
4176
4176
|
AvlState,
|
|
4177
4177
|
{
|
|
@@ -4546,7 +4546,7 @@ function loadLib(key, importer) {
|
|
|
4546
4546
|
return p2;
|
|
4547
4547
|
}
|
|
4548
4548
|
function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
|
|
4549
|
-
const Lazy =
|
|
4549
|
+
const Lazy = React96__default.lazy(async () => {
|
|
4550
4550
|
const lib = await loadLib(libKey, importer);
|
|
4551
4551
|
const Comp = pick(lib);
|
|
4552
4552
|
if (!Comp) {
|
|
@@ -4556,7 +4556,7 @@ function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
|
|
|
4556
4556
|
return { default: Comp };
|
|
4557
4557
|
});
|
|
4558
4558
|
const Wrapped = (props) => /* @__PURE__ */ jsx(
|
|
4559
|
-
|
|
4559
|
+
React96__default.Suspense,
|
|
4560
4560
|
{
|
|
4561
4561
|
fallback: /* @__PURE__ */ jsx(
|
|
4562
4562
|
"span",
|
|
@@ -5283,7 +5283,7 @@ var init_Icon = __esm({
|
|
|
5283
5283
|
const directIcon = typeof icon === "string" ? void 0 : icon;
|
|
5284
5284
|
const effectiveName = typeof icon === "string" ? icon : name;
|
|
5285
5285
|
const family = useIconFamily();
|
|
5286
|
-
const RenderedComponent =
|
|
5286
|
+
const RenderedComponent = React96__default.useMemo(() => {
|
|
5287
5287
|
if (directIcon) return null;
|
|
5288
5288
|
return effectiveName ? resolveIconForFamily(effectiveName, family) : null;
|
|
5289
5289
|
}, [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 (React96__default.isValidElement(value)) {
|
|
5349
5349
|
return value;
|
|
5350
5350
|
}
|
|
5351
5351
|
if (typeof value === "object" && value !== null && isIconLike(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 = React96__default.forwardRef(
|
|
5425
5425
|
({
|
|
5426
5426
|
className,
|
|
5427
5427
|
variant = "primary",
|
|
@@ -5487,7 +5487,7 @@ var Dialog;
|
|
|
5487
5487
|
var init_Dialog = __esm({
|
|
5488
5488
|
"components/core/atoms/Dialog.tsx"() {
|
|
5489
5489
|
init_cn();
|
|
5490
|
-
Dialog =
|
|
5490
|
+
Dialog = React96__default.forwardRef(
|
|
5491
5491
|
({
|
|
5492
5492
|
role = "dialog",
|
|
5493
5493
|
"aria-modal": ariaModal = true,
|
|
@@ -5982,7 +5982,7 @@ var init_Badge = __esm({
|
|
|
5982
5982
|
md: "px-2.5 py-1 text-sm",
|
|
5983
5983
|
lg: "px-3 py-1.5 text-base"
|
|
5984
5984
|
};
|
|
5985
|
-
Badge =
|
|
5985
|
+
Badge = React96__default.forwardRef(
|
|
5986
5986
|
({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
|
|
5987
5987
|
const iconSizes3 = {
|
|
5988
5988
|
sm: "h-icon-default w-icon-default",
|
|
@@ -6318,7 +6318,7 @@ var init_SvgFlow = __esm({
|
|
|
6318
6318
|
width = 100,
|
|
6319
6319
|
height = 100
|
|
6320
6320
|
}) => {
|
|
6321
|
-
const markerId =
|
|
6321
|
+
const markerId = React96__default.useMemo(() => {
|
|
6322
6322
|
flowIdCounter += 1;
|
|
6323
6323
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
6324
6324
|
}, []);
|
|
@@ -6911,7 +6911,7 @@ var init_SvgRing = __esm({
|
|
|
6911
6911
|
width = 100,
|
|
6912
6912
|
height = 100
|
|
6913
6913
|
}) => {
|
|
6914
|
-
const gradientId =
|
|
6914
|
+
const gradientId = React96__default.useMemo(() => {
|
|
6915
6915
|
ringIdCounter += 1;
|
|
6916
6916
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
6917
6917
|
}, []);
|
|
@@ -7092,7 +7092,7 @@ var init_Input = __esm({
|
|
|
7092
7092
|
init_cn();
|
|
7093
7093
|
init_Icon();
|
|
7094
7094
|
init_useEventBus();
|
|
7095
|
-
Input =
|
|
7095
|
+
Input = React96__default.forwardRef(
|
|
7096
7096
|
({
|
|
7097
7097
|
className,
|
|
7098
7098
|
inputType,
|
|
@@ -7252,7 +7252,7 @@ var Label;
|
|
|
7252
7252
|
var init_Label = __esm({
|
|
7253
7253
|
"components/core/atoms/Label.tsx"() {
|
|
7254
7254
|
init_cn();
|
|
7255
|
-
Label =
|
|
7255
|
+
Label = React96__default.forwardRef(
|
|
7256
7256
|
({ className, required, children, ...props }, ref) => {
|
|
7257
7257
|
return /* @__PURE__ */ jsxs(
|
|
7258
7258
|
"label",
|
|
@@ -7279,7 +7279,7 @@ var init_Textarea = __esm({
|
|
|
7279
7279
|
"components/core/atoms/Textarea.tsx"() {
|
|
7280
7280
|
init_cn();
|
|
7281
7281
|
init_useEventBus();
|
|
7282
|
-
Textarea =
|
|
7282
|
+
Textarea = React96__default.forwardRef(
|
|
7283
7283
|
({ className, error, onChange, ...props }, ref) => {
|
|
7284
7284
|
const eventBus = useEventBus();
|
|
7285
7285
|
const handleChange = (e) => {
|
|
@@ -7518,7 +7518,7 @@ var init_Select = __esm({
|
|
|
7518
7518
|
init_cn();
|
|
7519
7519
|
init_Icon();
|
|
7520
7520
|
init_useEventBus();
|
|
7521
|
-
Select =
|
|
7521
|
+
Select = React96__default.forwardRef(
|
|
7522
7522
|
(props, _ref) => {
|
|
7523
7523
|
const { multiple, searchable, clearable } = props;
|
|
7524
7524
|
if (multiple || searchable || clearable) {
|
|
@@ -7535,7 +7535,7 @@ var init_Checkbox = __esm({
|
|
|
7535
7535
|
"components/core/atoms/Checkbox.tsx"() {
|
|
7536
7536
|
init_cn();
|
|
7537
7537
|
init_useEventBus();
|
|
7538
|
-
Checkbox =
|
|
7538
|
+
Checkbox = React96__default.forwardRef(
|
|
7539
7539
|
({ className, label, id, onChange, ...props }, ref) => {
|
|
7540
7540
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
7541
7541
|
const eventBus = useEventBus();
|
|
@@ -7589,7 +7589,7 @@ var init_Spinner = __esm({
|
|
|
7589
7589
|
md: "h-6 w-6",
|
|
7590
7590
|
lg: "h-8 w-8"
|
|
7591
7591
|
};
|
|
7592
|
-
Spinner =
|
|
7592
|
+
Spinner = React96__default.forwardRef(
|
|
7593
7593
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
7594
7594
|
if (overlay) {
|
|
7595
7595
|
return /* @__PURE__ */ jsx(
|
|
@@ -7679,7 +7679,7 @@ var init_Card = __esm({
|
|
|
7679
7679
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
7680
7680
|
"tile-image-first": "p-0 overflow-hidden"
|
|
7681
7681
|
};
|
|
7682
|
-
Card =
|
|
7682
|
+
Card = React96__default.forwardRef(
|
|
7683
7683
|
({
|
|
7684
7684
|
className,
|
|
7685
7685
|
variant = "bordered",
|
|
@@ -7727,9 +7727,9 @@ var init_Card = __esm({
|
|
|
7727
7727
|
}
|
|
7728
7728
|
);
|
|
7729
7729
|
Card.displayName = "Card";
|
|
7730
|
-
CardHeader =
|
|
7730
|
+
CardHeader = React96__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
7731
7731
|
CardHeader.displayName = "CardHeader";
|
|
7732
|
-
CardTitle =
|
|
7732
|
+
CardTitle = React96__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7733
7733
|
"h3",
|
|
7734
7734
|
{
|
|
7735
7735
|
ref,
|
|
@@ -7742,11 +7742,11 @@ var init_Card = __esm({
|
|
|
7742
7742
|
}
|
|
7743
7743
|
));
|
|
7744
7744
|
CardTitle.displayName = "CardTitle";
|
|
7745
|
-
CardContent =
|
|
7745
|
+
CardContent = React96__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
7746
7746
|
CardContent.displayName = "CardContent";
|
|
7747
7747
|
CardBody = CardContent;
|
|
7748
7748
|
CardBody.displayName = "CardBody";
|
|
7749
|
-
CardFooter =
|
|
7749
|
+
CardFooter = React96__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7750
7750
|
"div",
|
|
7751
7751
|
{
|
|
7752
7752
|
ref,
|
|
@@ -7801,7 +7801,7 @@ var init_FilterPill = __esm({
|
|
|
7801
7801
|
md: "w-3.5 h-3.5",
|
|
7802
7802
|
lg: "w-4 h-4"
|
|
7803
7803
|
};
|
|
7804
|
-
FilterPill =
|
|
7804
|
+
FilterPill = React96__default.forwardRef(
|
|
7805
7805
|
({
|
|
7806
7806
|
className,
|
|
7807
7807
|
variant = "default",
|
|
@@ -7930,8 +7930,8 @@ var init_Avatar = __esm({
|
|
|
7930
7930
|
actionPayload
|
|
7931
7931
|
}) => {
|
|
7932
7932
|
const eventBus = useEventBus();
|
|
7933
|
-
const [imgFailed, setImgFailed] =
|
|
7934
|
-
|
|
7933
|
+
const [imgFailed, setImgFailed] = React96__default.useState(false);
|
|
7934
|
+
React96__default.useEffect(() => {
|
|
7935
7935
|
setImgFailed(false);
|
|
7936
7936
|
}, [src]);
|
|
7937
7937
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -8044,7 +8044,7 @@ var init_Center = __esm({
|
|
|
8044
8044
|
as: Component2 = "div"
|
|
8045
8045
|
}) => {
|
|
8046
8046
|
const mergedStyle = minHeight ? { minHeight, ...style } : style;
|
|
8047
|
-
return
|
|
8047
|
+
return React96__default.createElement(Component2, {
|
|
8048
8048
|
className: cn(
|
|
8049
8049
|
inline ? "inline-flex" : "flex",
|
|
8050
8050
|
horizontal && "justify-center",
|
|
@@ -8312,7 +8312,7 @@ var init_Radio = __esm({
|
|
|
8312
8312
|
md: "w-2.5 h-2.5",
|
|
8313
8313
|
lg: "w-3 h-3"
|
|
8314
8314
|
};
|
|
8315
|
-
Radio =
|
|
8315
|
+
Radio = React96__default.forwardRef(
|
|
8316
8316
|
({
|
|
8317
8317
|
label,
|
|
8318
8318
|
helperText,
|
|
@@ -8329,12 +8329,12 @@ var init_Radio = __esm({
|
|
|
8329
8329
|
onChange,
|
|
8330
8330
|
...props
|
|
8331
8331
|
}, ref) => {
|
|
8332
|
-
const reactId =
|
|
8332
|
+
const reactId = React96__default.useId();
|
|
8333
8333
|
const baseId = id || `radio-${reactId}`;
|
|
8334
8334
|
const hasError = !!error;
|
|
8335
8335
|
const eventBus = useEventBus();
|
|
8336
|
-
const [selected, setSelected] =
|
|
8337
|
-
|
|
8336
|
+
const [selected, setSelected] = React96__default.useState(value);
|
|
8337
|
+
React96__default.useEffect(() => {
|
|
8338
8338
|
if (value !== void 0) setSelected(value);
|
|
8339
8339
|
}, [value]);
|
|
8340
8340
|
const pick = (next, e) => {
|
|
@@ -8516,7 +8516,7 @@ var init_Switch = __esm({
|
|
|
8516
8516
|
"components/core/atoms/Switch.tsx"() {
|
|
8517
8517
|
"use client";
|
|
8518
8518
|
init_cn();
|
|
8519
|
-
Switch =
|
|
8519
|
+
Switch = React96.forwardRef(
|
|
8520
8520
|
({
|
|
8521
8521
|
checked,
|
|
8522
8522
|
defaultChecked = false,
|
|
@@ -8527,10 +8527,10 @@ var init_Switch = __esm({
|
|
|
8527
8527
|
name,
|
|
8528
8528
|
className
|
|
8529
8529
|
}, ref) => {
|
|
8530
|
-
const [isChecked, setIsChecked] =
|
|
8530
|
+
const [isChecked, setIsChecked] = React96.useState(
|
|
8531
8531
|
checked !== void 0 ? checked : defaultChecked
|
|
8532
8532
|
);
|
|
8533
|
-
|
|
8533
|
+
React96.useEffect(() => {
|
|
8534
8534
|
if (checked !== void 0) {
|
|
8535
8535
|
setIsChecked(checked);
|
|
8536
8536
|
}
|
|
@@ -8804,7 +8804,7 @@ var Aside;
|
|
|
8804
8804
|
var init_Aside = __esm({
|
|
8805
8805
|
"components/core/atoms/Aside.tsx"() {
|
|
8806
8806
|
init_cn();
|
|
8807
|
-
Aside =
|
|
8807
|
+
Aside = React96__default.forwardRef(
|
|
8808
8808
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
8809
8809
|
);
|
|
8810
8810
|
Aside.displayName = "Aside";
|
|
@@ -8883,9 +8883,9 @@ var init_LawReferenceTooltip = __esm({
|
|
|
8883
8883
|
className
|
|
8884
8884
|
}) => {
|
|
8885
8885
|
const { t } = useTranslate();
|
|
8886
|
-
const [isVisible, setIsVisible] =
|
|
8887
|
-
const timeoutRef =
|
|
8888
|
-
const triggerRef =
|
|
8886
|
+
const [isVisible, setIsVisible] = React96__default.useState(false);
|
|
8887
|
+
const timeoutRef = React96__default.useRef(null);
|
|
8888
|
+
const triggerRef = React96__default.useRef(null);
|
|
8889
8889
|
const handleMouseEnter = () => {
|
|
8890
8890
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
8891
8891
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -8896,7 +8896,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
8896
8896
|
};
|
|
8897
8897
|
const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
|
|
8898
8898
|
const open = isVisible || revealed;
|
|
8899
|
-
|
|
8899
|
+
React96__default.useEffect(() => {
|
|
8900
8900
|
return () => {
|
|
8901
8901
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
8902
8902
|
};
|
|
@@ -9108,7 +9108,7 @@ var init_StatusDot = __esm({
|
|
|
9108
9108
|
md: "w-2.5 h-2.5",
|
|
9109
9109
|
lg: "w-3 h-3"
|
|
9110
9110
|
};
|
|
9111
|
-
StatusDot =
|
|
9111
|
+
StatusDot = React96__default.forwardRef(
|
|
9112
9112
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
9113
9113
|
return /* @__PURE__ */ jsx(
|
|
9114
9114
|
"span",
|
|
@@ -9162,7 +9162,7 @@ var init_TrendIndicator = __esm({
|
|
|
9162
9162
|
down: "trending-down",
|
|
9163
9163
|
flat: "arrow-right"
|
|
9164
9164
|
};
|
|
9165
|
-
TrendIndicator =
|
|
9165
|
+
TrendIndicator = React96__default.forwardRef(
|
|
9166
9166
|
({
|
|
9167
9167
|
className,
|
|
9168
9168
|
value,
|
|
@@ -9229,7 +9229,7 @@ var init_RangeSlider = __esm({
|
|
|
9229
9229
|
md: "w-4 h-4",
|
|
9230
9230
|
lg: "w-5 h-5"
|
|
9231
9231
|
};
|
|
9232
|
-
RangeSlider =
|
|
9232
|
+
RangeSlider = React96__default.forwardRef(
|
|
9233
9233
|
({
|
|
9234
9234
|
className,
|
|
9235
9235
|
min = 0,
|
|
@@ -9737,7 +9737,7 @@ var init_ContentSection = __esm({
|
|
|
9737
9737
|
md: "py-16",
|
|
9738
9738
|
lg: "py-24"
|
|
9739
9739
|
};
|
|
9740
|
-
ContentSection =
|
|
9740
|
+
ContentSection = React96__default.forwardRef(
|
|
9741
9741
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
9742
9742
|
return /* @__PURE__ */ jsx(
|
|
9743
9743
|
Box,
|
|
@@ -10271,7 +10271,7 @@ var init_AnimatedReveal = __esm({
|
|
|
10271
10271
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
10272
10272
|
"none": {}
|
|
10273
10273
|
};
|
|
10274
|
-
AnimatedReveal =
|
|
10274
|
+
AnimatedReveal = React96__default.forwardRef(
|
|
10275
10275
|
({
|
|
10276
10276
|
trigger = "scroll",
|
|
10277
10277
|
animation = "fade-up",
|
|
@@ -10431,7 +10431,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
10431
10431
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
10432
10432
|
"use client";
|
|
10433
10433
|
init_cn();
|
|
10434
|
-
AnimatedGraphic =
|
|
10434
|
+
AnimatedGraphic = React96__default.forwardRef(
|
|
10435
10435
|
({
|
|
10436
10436
|
src,
|
|
10437
10437
|
svgContent,
|
|
@@ -10454,7 +10454,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
10454
10454
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
10455
10455
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
10456
10456
|
const prevAnimateRef = useRef(animate);
|
|
10457
|
-
const setRef =
|
|
10457
|
+
const setRef = React96__default.useCallback(
|
|
10458
10458
|
(node) => {
|
|
10459
10459
|
containerRef.current = node;
|
|
10460
10460
|
if (typeof ref === "function") ref(node);
|
|
@@ -10676,43 +10676,16 @@ function ScoreDisplay({
|
|
|
10676
10676
|
icon,
|
|
10677
10677
|
size = "md",
|
|
10678
10678
|
className,
|
|
10679
|
-
animated = true,
|
|
10680
10679
|
locale = "en-US"
|
|
10681
10680
|
}) {
|
|
10682
10681
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof score === "number" && !Number.isNaN(score) ? score : 0;
|
|
10683
|
-
const
|
|
10684
|
-
const [isAnimating, setIsAnimating] = React98.useState(false);
|
|
10685
|
-
React98.useEffect(() => {
|
|
10686
|
-
if (!animated || displayValue === resolvedValue) {
|
|
10687
|
-
setDisplayValue(resolvedValue);
|
|
10688
|
-
return;
|
|
10689
|
-
}
|
|
10690
|
-
setIsAnimating(true);
|
|
10691
|
-
const diff = resolvedValue - displayValue;
|
|
10692
|
-
const steps = Math.min(Math.abs(diff), 20);
|
|
10693
|
-
const increment = diff / steps;
|
|
10694
|
-
let current = displayValue;
|
|
10695
|
-
let step = 0;
|
|
10696
|
-
const timer = setInterval(() => {
|
|
10697
|
-
step++;
|
|
10698
|
-
current += increment;
|
|
10699
|
-
setDisplayValue(Math.round(current));
|
|
10700
|
-
if (step >= steps) {
|
|
10701
|
-
clearInterval(timer);
|
|
10702
|
-
setDisplayValue(resolvedValue);
|
|
10703
|
-
setIsAnimating(false);
|
|
10704
|
-
}
|
|
10705
|
-
}, 50);
|
|
10706
|
-
return () => clearInterval(timer);
|
|
10707
|
-
}, [resolvedValue, animated]);
|
|
10708
|
-
const formattedValue = new Intl.NumberFormat(locale).format(displayValue);
|
|
10682
|
+
const formattedValue = new Intl.NumberFormat(locale).format(resolvedValue);
|
|
10709
10683
|
return /* @__PURE__ */ jsxs(
|
|
10710
10684
|
"div",
|
|
10711
10685
|
{
|
|
10712
10686
|
className: cn(
|
|
10713
10687
|
"flex items-center gap-2 font-bold",
|
|
10714
10688
|
sizeMap2[size],
|
|
10715
|
-
isAnimating && "animate-pulse",
|
|
10716
10689
|
className
|
|
10717
10690
|
),
|
|
10718
10691
|
children: [
|
|
@@ -10736,7 +10709,6 @@ function ScoreDisplay({
|
|
|
10736
10709
|
var sizeMap2, DEFAULT_ASSET_URL;
|
|
10737
10710
|
var init_ScoreDisplay = __esm({
|
|
10738
10711
|
"components/game/atoms/ScoreDisplay.tsx"() {
|
|
10739
|
-
"use client";
|
|
10740
10712
|
init_cn();
|
|
10741
10713
|
init_Icon();
|
|
10742
10714
|
sizeMap2 = {
|
|
@@ -10765,9 +10737,9 @@ function ControlButton({
|
|
|
10765
10737
|
className
|
|
10766
10738
|
}) {
|
|
10767
10739
|
const eventBus = useEventBus();
|
|
10768
|
-
const [isPressed, setIsPressed] =
|
|
10740
|
+
const [isPressed, setIsPressed] = React96.useState(false);
|
|
10769
10741
|
const actualPressed = pressed ?? isPressed;
|
|
10770
|
-
const handlePointerDown =
|
|
10742
|
+
const handlePointerDown = React96.useCallback(
|
|
10771
10743
|
(e) => {
|
|
10772
10744
|
e.preventDefault();
|
|
10773
10745
|
if (disabled) return;
|
|
@@ -10777,7 +10749,7 @@ function ControlButton({
|
|
|
10777
10749
|
},
|
|
10778
10750
|
[disabled, pressEvent, eventBus, onPress]
|
|
10779
10751
|
);
|
|
10780
|
-
const handlePointerUp =
|
|
10752
|
+
const handlePointerUp = React96.useCallback(
|
|
10781
10753
|
(e) => {
|
|
10782
10754
|
e.preventDefault();
|
|
10783
10755
|
if (disabled) return;
|
|
@@ -10787,7 +10759,7 @@ function ControlButton({
|
|
|
10787
10759
|
},
|
|
10788
10760
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
10789
10761
|
);
|
|
10790
|
-
const handlePointerLeave =
|
|
10762
|
+
const handlePointerLeave = React96.useCallback(
|
|
10791
10763
|
(e) => {
|
|
10792
10764
|
if (isPressed) {
|
|
10793
10765
|
setIsPressed(false);
|
|
@@ -10875,13 +10847,6 @@ var init_spriteSheetConstants = __esm({
|
|
|
10875
10847
|
});
|
|
10876
10848
|
|
|
10877
10849
|
// components/game/organisms/utils/spriteAnimation.ts
|
|
10878
|
-
function inferDirection(dx, dy) {
|
|
10879
|
-
if (dx === 0 && dy === 0) return "se";
|
|
10880
|
-
if (dx >= 0 && dy >= 0) return "se";
|
|
10881
|
-
if (dx <= 0 && dy >= 0) return "sw";
|
|
10882
|
-
if (dx >= 0 && dy <= 0) return "ne";
|
|
10883
|
-
return "nw";
|
|
10884
|
-
}
|
|
10885
10850
|
function resolveSheetDirection(facing) {
|
|
10886
10851
|
switch (facing) {
|
|
10887
10852
|
case "se":
|
|
@@ -10902,19 +10867,6 @@ function frameRect(frame, row, columns, frameWidth, frameHeight) {
|
|
|
10902
10867
|
sh: frameHeight
|
|
10903
10868
|
};
|
|
10904
10869
|
}
|
|
10905
|
-
function getCurrentFrameFromDef(def, elapsed) {
|
|
10906
|
-
const frameDuration = 1e3 / def.frameRate;
|
|
10907
|
-
const totalDuration = def.frames * frameDuration;
|
|
10908
|
-
if (def.loop) {
|
|
10909
|
-
const frame2 = Math.floor(elapsed % totalDuration / frameDuration);
|
|
10910
|
-
return { frame: frame2, finished: false };
|
|
10911
|
-
}
|
|
10912
|
-
if (elapsed >= totalDuration) {
|
|
10913
|
-
return { frame: def.frames - 1, finished: true };
|
|
10914
|
-
}
|
|
10915
|
-
const frame = Math.floor(elapsed / frameDuration);
|
|
10916
|
-
return { frame, finished: false };
|
|
10917
|
-
}
|
|
10918
10870
|
var init_spriteAnimation = __esm({
|
|
10919
10871
|
"components/game/organisms/utils/spriteAnimation.ts"() {
|
|
10920
10872
|
}
|
|
@@ -10933,6 +10885,8 @@ function Sprite({
|
|
|
10933
10885
|
opacity = 1,
|
|
10934
10886
|
zIndex = 0,
|
|
10935
10887
|
columns = 16,
|
|
10888
|
+
animState: _animState,
|
|
10889
|
+
frameRate: _frameRate,
|
|
10936
10890
|
className,
|
|
10937
10891
|
onClick,
|
|
10938
10892
|
action
|
|
@@ -11416,21 +11370,6 @@ function XPBar({
|
|
|
11416
11370
|
}) {
|
|
11417
11371
|
const sizes = sizeMap9[size];
|
|
11418
11372
|
const percentage = max > 0 ? Math.max(0, Math.min(100, current / max * 100)) : 0;
|
|
11419
|
-
const [fillWidth, setFillWidth] = React98.useState(animated ? 0 : percentage);
|
|
11420
|
-
React98.useEffect(() => {
|
|
11421
|
-
if (!animated) {
|
|
11422
|
-
setFillWidth(percentage);
|
|
11423
|
-
return;
|
|
11424
|
-
}
|
|
11425
|
-
let frame2;
|
|
11426
|
-
const frame1 = requestAnimationFrame(() => {
|
|
11427
|
-
frame2 = requestAnimationFrame(() => setFillWidth(percentage));
|
|
11428
|
-
});
|
|
11429
|
-
return () => {
|
|
11430
|
-
cancelAnimationFrame(frame1);
|
|
11431
|
-
cancelAnimationFrame(frame2);
|
|
11432
|
-
};
|
|
11433
|
-
}, [animated, percentage]);
|
|
11434
11373
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-2", className), children: [
|
|
11435
11374
|
level != null && /* @__PURE__ */ jsxs(
|
|
11436
11375
|
"span",
|
|
@@ -11462,7 +11401,7 @@ function XPBar({
|
|
|
11462
11401
|
"bg-gradient-to-r from-accent to-info",
|
|
11463
11402
|
animated && "transition-all duration-500 ease-out"
|
|
11464
11403
|
),
|
|
11465
|
-
style: { width: `${
|
|
11404
|
+
style: { width: `${percentage}%` }
|
|
11466
11405
|
}
|
|
11467
11406
|
)
|
|
11468
11407
|
}
|
|
@@ -11479,7 +11418,6 @@ function XPBar({
|
|
|
11479
11418
|
var sizeMap9;
|
|
11480
11419
|
var init_XPBar = __esm({
|
|
11481
11420
|
"components/game/atoms/XPBar.tsx"() {
|
|
11482
|
-
"use client";
|
|
11483
11421
|
init_cn();
|
|
11484
11422
|
sizeMap9 = {
|
|
11485
11423
|
sm: { bar: "h-2", text: "text-xs", badge: "text-xs px-1.5 py-0.5" },
|
|
@@ -11925,9 +11863,9 @@ function MiniMap({
|
|
|
11925
11863
|
viewportRect = DEFAULT_VIEWPORT,
|
|
11926
11864
|
className
|
|
11927
11865
|
}) {
|
|
11928
|
-
const canvasRef =
|
|
11929
|
-
const frameRef =
|
|
11930
|
-
|
|
11866
|
+
const canvasRef = React96.useRef(null);
|
|
11867
|
+
const frameRef = React96.useRef(0);
|
|
11868
|
+
React96.useEffect(() => {
|
|
11931
11869
|
const canvas = canvasRef.current;
|
|
11932
11870
|
if (!canvas) return;
|
|
11933
11871
|
const ctx = canvas.getContext("2d");
|
|
@@ -12116,7 +12054,7 @@ var init_ErrorBoundary = __esm({
|
|
|
12116
12054
|
}
|
|
12117
12055
|
);
|
|
12118
12056
|
};
|
|
12119
|
-
ErrorBoundary = class extends
|
|
12057
|
+
ErrorBoundary = class extends React96__default.Component {
|
|
12120
12058
|
constructor(props) {
|
|
12121
12059
|
super(props);
|
|
12122
12060
|
__publicField(this, "reset", () => {
|
|
@@ -12427,7 +12365,7 @@ var init_Container = __esm({
|
|
|
12427
12365
|
as: Component2 = "div"
|
|
12428
12366
|
}) => {
|
|
12429
12367
|
const resolvedSize = maxWidth ?? size ?? "lg";
|
|
12430
|
-
return
|
|
12368
|
+
return React96__default.createElement(
|
|
12431
12369
|
Component2,
|
|
12432
12370
|
{
|
|
12433
12371
|
className: cn(
|
|
@@ -13150,8 +13088,8 @@ function ActionButtons({
|
|
|
13150
13088
|
disabled
|
|
13151
13089
|
}) {
|
|
13152
13090
|
const eventBus = useEventBus();
|
|
13153
|
-
const [activeButtons, setActiveButtons] =
|
|
13154
|
-
const handlePress =
|
|
13091
|
+
const [activeButtons, setActiveButtons] = React96.useState(/* @__PURE__ */ new Set());
|
|
13092
|
+
const handlePress = React96.useCallback(
|
|
13155
13093
|
(id) => {
|
|
13156
13094
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
13157
13095
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -13159,7 +13097,7 @@ function ActionButtons({
|
|
|
13159
13097
|
},
|
|
13160
13098
|
[actionEvent, eventBus, onAction]
|
|
13161
13099
|
);
|
|
13162
|
-
const handleRelease =
|
|
13100
|
+
const handleRelease = React96.useCallback(
|
|
13163
13101
|
(id) => {
|
|
13164
13102
|
setActiveButtons((prev) => {
|
|
13165
13103
|
const next = new Set(prev);
|
|
@@ -13989,50 +13927,6 @@ var init_AuthLayout = __esm({
|
|
|
13989
13927
|
AuthLayout.displayName = "AuthLayout";
|
|
13990
13928
|
}
|
|
13991
13929
|
});
|
|
13992
|
-
var LoadingState;
|
|
13993
|
-
var init_LoadingState = __esm({
|
|
13994
|
-
"components/core/molecules/LoadingState.tsx"() {
|
|
13995
|
-
"use client";
|
|
13996
|
-
init_cn();
|
|
13997
|
-
init_atoms2();
|
|
13998
|
-
init_Stack();
|
|
13999
|
-
init_Typography();
|
|
14000
|
-
LoadingState = ({
|
|
14001
|
-
title,
|
|
14002
|
-
message,
|
|
14003
|
-
className
|
|
14004
|
-
}) => {
|
|
14005
|
-
const { t } = useTranslate();
|
|
14006
|
-
const displayMessage = message ?? t("common.loading");
|
|
14007
|
-
return /* @__PURE__ */ jsxs(
|
|
14008
|
-
VStack,
|
|
14009
|
-
{
|
|
14010
|
-
align: "center",
|
|
14011
|
-
className: cn(
|
|
14012
|
-
"justify-center py-12",
|
|
14013
|
-
className
|
|
14014
|
-
),
|
|
14015
|
-
children: [
|
|
14016
|
-
/* @__PURE__ */ jsx(Spinner, { size: "lg" }),
|
|
14017
|
-
title && /* @__PURE__ */ jsx(Typography, { variant: "h3", className: "mt-4 text-lg font-semibold text-foreground", children: title }),
|
|
14018
|
-
/* @__PURE__ */ jsx(
|
|
14019
|
-
Typography,
|
|
14020
|
-
{
|
|
14021
|
-
variant: "small",
|
|
14022
|
-
className: cn(
|
|
14023
|
-
"text-muted-foreground",
|
|
14024
|
-
title ? "mt-2" : "mt-4"
|
|
14025
|
-
),
|
|
14026
|
-
children: displayMessage
|
|
14027
|
-
}
|
|
14028
|
-
)
|
|
14029
|
-
]
|
|
14030
|
-
}
|
|
14031
|
-
);
|
|
14032
|
-
};
|
|
14033
|
-
LoadingState.displayName = "LoadingState";
|
|
14034
|
-
}
|
|
14035
|
-
});
|
|
14036
13930
|
function getState() {
|
|
14037
13931
|
if (typeof window !== "undefined") {
|
|
14038
13932
|
const w = window;
|
|
@@ -14562,9 +14456,6 @@ function useUnitSpriteAtlas(units) {
|
|
|
14562
14456
|
const loadingRef = useRef(/* @__PURE__ */ new Set());
|
|
14563
14457
|
const [pendingCount, setPendingCount] = useState(0);
|
|
14564
14458
|
const [, forceTick] = useState(0);
|
|
14565
|
-
const animStatesRef = useRef(/* @__PURE__ */ new Map());
|
|
14566
|
-
const lastTickRef = useRef(0);
|
|
14567
|
-
const rafRef = useRef(0);
|
|
14568
14459
|
const atlasUrls = useMemo(() => {
|
|
14569
14460
|
const set = /* @__PURE__ */ new Set();
|
|
14570
14461
|
for (const unit of units) {
|
|
@@ -14610,54 +14501,6 @@ function useUnitSpriteAtlas(units) {
|
|
|
14610
14501
|
}
|
|
14611
14502
|
return [...urls];
|
|
14612
14503
|
}, [units, pendingCount]);
|
|
14613
|
-
useEffect(() => {
|
|
14614
|
-
const hasAtlasUnits = units.some((u) => unitAtlasUrl(u) !== null);
|
|
14615
|
-
if (!hasAtlasUnits) return;
|
|
14616
|
-
let running = true;
|
|
14617
|
-
const tick = (ts) => {
|
|
14618
|
-
if (!running) return;
|
|
14619
|
-
const last = lastTickRef.current || ts;
|
|
14620
|
-
const delta = ts - last;
|
|
14621
|
-
lastTickRef.current = ts;
|
|
14622
|
-
const states = animStatesRef.current;
|
|
14623
|
-
const currentIds = /* @__PURE__ */ new Set();
|
|
14624
|
-
for (const unit of units) {
|
|
14625
|
-
if (unitAtlasUrl(unit) === null) continue;
|
|
14626
|
-
currentIds.add(unit.id);
|
|
14627
|
-
let state = states.get(unit.id);
|
|
14628
|
-
if (!state) {
|
|
14629
|
-
state = { animation: "idle", direction: "se", elapsed: 0, walkHold: 0, prev: null };
|
|
14630
|
-
states.set(unit.id, state);
|
|
14631
|
-
}
|
|
14632
|
-
const posX = unit.position?.x ?? unit.x ?? 0;
|
|
14633
|
-
const posY = unit.position?.y ?? unit.y ?? 0;
|
|
14634
|
-
if (state.prev) {
|
|
14635
|
-
const dx = posX - state.prev.x;
|
|
14636
|
-
const dy = posY - state.prev.y;
|
|
14637
|
-
if (dx !== 0 || dy !== 0) {
|
|
14638
|
-
state.animation = "walk";
|
|
14639
|
-
state.direction = inferDirection(dx, dy);
|
|
14640
|
-
state.walkHold = WALK_HOLD_MS;
|
|
14641
|
-
} else if (state.animation === "walk") {
|
|
14642
|
-
state.walkHold -= delta;
|
|
14643
|
-
if (state.walkHold <= 0) state.animation = "idle";
|
|
14644
|
-
}
|
|
14645
|
-
}
|
|
14646
|
-
state.prev = { x: posX, y: posY };
|
|
14647
|
-
state.elapsed += delta;
|
|
14648
|
-
}
|
|
14649
|
-
for (const id of states.keys()) {
|
|
14650
|
-
if (!currentIds.has(id)) states.delete(id);
|
|
14651
|
-
}
|
|
14652
|
-
rafRef.current = requestAnimationFrame(tick);
|
|
14653
|
-
};
|
|
14654
|
-
rafRef.current = requestAnimationFrame(tick);
|
|
14655
|
-
return () => {
|
|
14656
|
-
running = false;
|
|
14657
|
-
cancelAnimationFrame(rafRef.current);
|
|
14658
|
-
lastTickRef.current = 0;
|
|
14659
|
-
};
|
|
14660
|
-
}, [units]);
|
|
14661
14504
|
const resolveUnitFrame = useCallback((unitId) => {
|
|
14662
14505
|
const unit = units.find((u) => u.id === unitId);
|
|
14663
14506
|
if (!unit) return null;
|
|
@@ -14665,18 +14508,14 @@ function useUnitSpriteAtlas(units) {
|
|
|
14665
14508
|
if (!atlasUrl) return null;
|
|
14666
14509
|
const atlas = atlasCacheRef.current.get(atlasUrl);
|
|
14667
14510
|
if (!atlas) return null;
|
|
14668
|
-
const
|
|
14669
|
-
const
|
|
14670
|
-
const direction = state?.direction ?? "se";
|
|
14671
|
-
const elapsed = state?.elapsed ?? 0;
|
|
14511
|
+
const animation = unit.animation ?? "idle";
|
|
14512
|
+
const frame = unit.frame ?? 0;
|
|
14672
14513
|
const def = atlas.animations[animation] ?? atlas.animations.idle;
|
|
14673
14514
|
if (!def) return null;
|
|
14674
|
-
const { sheetDir, flipX } = resolveSheetDirection(
|
|
14515
|
+
const { sheetDir, flipX } = resolveSheetDirection("se");
|
|
14675
14516
|
const rel = atlas.sheets[sheetDir] ?? atlas.sheets.se ?? atlas.sheets.sw;
|
|
14676
14517
|
if (!rel) return null;
|
|
14677
14518
|
const sheetUrl = resolveSheetUrl(atlasUrl, rel);
|
|
14678
|
-
const isIdle = animation === "idle";
|
|
14679
|
-
const frame = isIdle ? 0 : getCurrentFrameFromDef(def, elapsed).frame;
|
|
14680
14519
|
const rect = frameRect(frame, def.row, atlas.columns, atlas.frameWidth, atlas.frameHeight);
|
|
14681
14520
|
return {
|
|
14682
14521
|
sheetUrl,
|
|
@@ -14685,17 +14524,15 @@ function useUnitSpriteAtlas(units) {
|
|
|
14685
14524
|
sw: rect.sw,
|
|
14686
14525
|
sh: rect.sh,
|
|
14687
14526
|
flipX,
|
|
14688
|
-
applyBreathing:
|
|
14527
|
+
applyBreathing: animation === "idle"
|
|
14689
14528
|
};
|
|
14690
14529
|
}, [units]);
|
|
14691
14530
|
return { sheetUrls, resolveUnitFrame, pendingCount };
|
|
14692
14531
|
}
|
|
14693
|
-
var WALK_HOLD_MS;
|
|
14694
14532
|
var init_useUnitSpriteAtlas = __esm({
|
|
14695
14533
|
"components/game/molecules/useUnitSpriteAtlas.ts"() {
|
|
14696
14534
|
"use client";
|
|
14697
14535
|
init_spriteAnimation();
|
|
14698
|
-
WALK_HOLD_MS = 600;
|
|
14699
14536
|
}
|
|
14700
14537
|
});
|
|
14701
14538
|
|
|
@@ -14763,6 +14600,7 @@ function IsometricCanvas({
|
|
|
14763
14600
|
tiles: _tilesPropRaw = [],
|
|
14764
14601
|
units: _unitsPropRaw = [],
|
|
14765
14602
|
features: _featuresPropRaw = [],
|
|
14603
|
+
effects: _effectsPropRaw = [],
|
|
14766
14604
|
// Interaction state
|
|
14767
14605
|
selectedUnitId = null,
|
|
14768
14606
|
validMoves = [],
|
|
@@ -14795,7 +14633,7 @@ function IsometricCanvas({
|
|
|
14795
14633
|
resolveUnitFrame,
|
|
14796
14634
|
effectSpriteUrls = [],
|
|
14797
14635
|
onDrawEffects,
|
|
14798
|
-
hasActiveEffects:
|
|
14636
|
+
hasActiveEffects: _hasActiveEffects = false,
|
|
14799
14637
|
// Tuning
|
|
14800
14638
|
diamondTopY: diamondTopYProp,
|
|
14801
14639
|
// Remote asset loading
|
|
@@ -14805,13 +14643,12 @@ function IsometricCanvas({
|
|
|
14805
14643
|
const tilesProp = Array.isArray(_tilesPropRaw) ? _tilesPropRaw : [];
|
|
14806
14644
|
const unitsProp = Array.isArray(_unitsPropRaw) ? _unitsPropRaw : [];
|
|
14807
14645
|
const featuresProp = Array.isArray(_featuresPropRaw) ? _featuresPropRaw : [];
|
|
14646
|
+
const effects = Array.isArray(_effectsPropRaw) ? _effectsPropRaw : [];
|
|
14808
14647
|
const eventBus = useEventBus();
|
|
14809
14648
|
const { t } = useTranslate();
|
|
14810
14649
|
const canvasRef = useRef(null);
|
|
14811
14650
|
const containerRef = useRef(null);
|
|
14812
|
-
const
|
|
14813
|
-
const animTimeRef = useRef(0);
|
|
14814
|
-
const rafIdRef = useRef(0);
|
|
14651
|
+
const lerpRafRef = useRef(0);
|
|
14815
14652
|
const [viewportSize, setViewportSize] = useState({ width: 800, height: 600 });
|
|
14816
14653
|
useEffect(() => {
|
|
14817
14654
|
const el = containerRef.current;
|
|
@@ -14835,7 +14672,7 @@ function IsometricCanvas({
|
|
|
14835
14672
|
() => unitsProp.map((u) => u.position ? u : { ...u, position: { x: u.x ?? 0, y: u.y ?? 0 } }),
|
|
14836
14673
|
[unitsProp]
|
|
14837
14674
|
);
|
|
14838
|
-
const { sheetUrls: atlasSheetUrls, resolveUnitFrame: resolveUnitFrameInternal
|
|
14675
|
+
const { sheetUrls: atlasSheetUrls, resolveUnitFrame: resolveUnitFrameInternal } = useUnitSpriteAtlas(units);
|
|
14839
14676
|
const resolveFrameForUnit = useCallback((unitId) => {
|
|
14840
14677
|
return resolveUnitFrame?.(unitId) ?? resolveUnitFrameInternal(unitId);
|
|
14841
14678
|
}, [resolveUnitFrame, resolveUnitFrameInternal]);
|
|
@@ -14930,7 +14767,7 @@ function IsometricCanvas({
|
|
|
14930
14767
|
if (backgroundImage) urls.push(backgroundImage);
|
|
14931
14768
|
return [...new Set(urls.filter(Boolean))];
|
|
14932
14769
|
}, [sortedTiles, features, units, getTerrainSprite, getFeatureSprite, getUnitSprite, effectSpriteUrls, atlasSheetUrls, backgroundImage, assetManifest, resolveManifestUrl7]);
|
|
14933
|
-
const { getImage, pendingCount } = useImageCache(spriteUrls);
|
|
14770
|
+
const { getImage, pendingCount: _imagePendingCount } = useImageCache(spriteUrls);
|
|
14934
14771
|
useEffect(() => {
|
|
14935
14772
|
if (typeof window === "undefined") return;
|
|
14936
14773
|
const canvas = canvasRef.current;
|
|
@@ -14962,63 +14799,26 @@ function IsometricCanvas({
|
|
|
14962
14799
|
const resolveUnitSpriteUrl = useCallback((unit) => {
|
|
14963
14800
|
return unit.sprite || getUnitSprite?.(unit) || (unit.unitType ? resolveManifestUrl7(assetManifest?.units?.[unit.unitType]) : void 0);
|
|
14964
14801
|
}, [getUnitSprite, assetManifest, resolveManifestUrl7]);
|
|
14965
|
-
const
|
|
14966
|
-
if (!showMinimap) return;
|
|
14967
|
-
|
|
14968
|
-
|
|
14969
|
-
|
|
14970
|
-
|
|
14971
|
-
|
|
14972
|
-
|
|
14973
|
-
|
|
14974
|
-
|
|
14975
|
-
|
|
14976
|
-
|
|
14977
|
-
|
|
14978
|
-
|
|
14979
|
-
|
|
14980
|
-
|
|
14981
|
-
|
|
14982
|
-
|
|
14983
|
-
|
|
14984
|
-
|
|
14985
|
-
const offsetMx = (mW - worldW * scaleM) / 2;
|
|
14986
|
-
const offsetMy = (mH - worldH * scaleM) / 2;
|
|
14987
|
-
for (const tile of sortedTiles) {
|
|
14988
|
-
const pos = isoToScreen(tile.x, tile.y, scale, baseOffsetX, tileLayout);
|
|
14989
|
-
const mx = (pos.x - minX) * scaleM + offsetMx;
|
|
14990
|
-
const my = (pos.y - minY) * scaleM + offsetMy;
|
|
14991
|
-
const mTileW = scaledTileWidth * scaleM;
|
|
14992
|
-
const mFloorH = scaledFloorHeight * scaleM;
|
|
14993
|
-
mCtx.fillStyle = tile.terrain === "water" ? "#3b82f6" : tile.terrain === "mountain" ? "#78716c" : "#4ade80";
|
|
14994
|
-
mCtx.beginPath();
|
|
14995
|
-
mCtx.moveTo(mx + mTileW / 2, my);
|
|
14996
|
-
mCtx.lineTo(mx + mTileW, my + mFloorH / 2);
|
|
14997
|
-
mCtx.lineTo(mx + mTileW / 2, my + mFloorH);
|
|
14998
|
-
mCtx.lineTo(mx, my + mFloorH / 2);
|
|
14999
|
-
mCtx.closePath();
|
|
15000
|
-
mCtx.fill();
|
|
15001
|
-
}
|
|
15002
|
-
for (const unit of units) {
|
|
15003
|
-
if (!unit.position) continue;
|
|
15004
|
-
const pos = isoToScreen(unit.position.x, unit.position.y, scale, baseOffsetX, tileLayout);
|
|
15005
|
-
const mx = (pos.x + scaledTileWidth / 2 - minX) * scaleM + offsetMx;
|
|
15006
|
-
const my = (pos.y + scaledTileHeight / 2 - minY) * scaleM + offsetMy;
|
|
15007
|
-
mCtx.fillStyle = unit.team === "player" ? "#60a5fa" : unit.team === "enemy" ? "#f87171" : "#9ca3af";
|
|
15008
|
-
mCtx.beginPath();
|
|
15009
|
-
mCtx.arc(mx, my, 3, 0, Math.PI * 2);
|
|
15010
|
-
mCtx.fill();
|
|
15011
|
-
}
|
|
15012
|
-
const cam = cameraRef.current;
|
|
15013
|
-
const vLeft = (cam.x - minX) * scaleM + offsetMx;
|
|
15014
|
-
const vTop = (cam.y - minY) * scaleM + offsetMy;
|
|
15015
|
-
const vW = viewportSize.width / cam.zoom * scaleM;
|
|
15016
|
-
const vH = viewportSize.height / cam.zoom * scaleM;
|
|
15017
|
-
mCtx.strokeStyle = "rgba(255, 255, 255, 0.8)";
|
|
15018
|
-
mCtx.lineWidth = 1;
|
|
15019
|
-
mCtx.strokeRect(vLeft, vTop, vW, vH);
|
|
15020
|
-
}, [showMinimap, sortedTiles, units, tileLayout, scale, baseOffsetX, scaledTileWidth, scaledTileHeight, scaledFloorHeight, viewportSize, cameraRef]);
|
|
15021
|
-
const draw = useCallback((animTime) => {
|
|
14802
|
+
const miniMapTiles = useMemo(() => {
|
|
14803
|
+
if (!showMinimap) return [];
|
|
14804
|
+
return sortedTiles.map((t2) => ({
|
|
14805
|
+
x: t2.x,
|
|
14806
|
+
y: t2.y,
|
|
14807
|
+
color: t2.terrain === "water" ? "#3b82f6" : t2.terrain === "mountain" ? "#78716c" : "#4ade80"
|
|
14808
|
+
}));
|
|
14809
|
+
}, [showMinimap, sortedTiles]);
|
|
14810
|
+
const miniMapUnits = useMemo(() => {
|
|
14811
|
+
if (!showMinimap) return [];
|
|
14812
|
+
return units.filter((u) => u.position).map((u) => ({
|
|
14813
|
+
x: u.position.x,
|
|
14814
|
+
y: u.position.y,
|
|
14815
|
+
color: u.team === "player" ? "#60a5fa" : u.team === "enemy" ? "#f87171" : "#9ca3af",
|
|
14816
|
+
isPlayer: u.team === "player"
|
|
14817
|
+
}));
|
|
14818
|
+
}, [showMinimap, units]);
|
|
14819
|
+
const miniMapWidth = gridWidth || 10;
|
|
14820
|
+
const miniMapHeight = gridHeight || 10;
|
|
14821
|
+
const draw = useCallback(() => {
|
|
15022
14822
|
const canvas = canvasRef.current;
|
|
15023
14823
|
if (!canvas) return;
|
|
15024
14824
|
const ctx = canvas.getContext("2d");
|
|
@@ -15104,8 +14904,7 @@ function IsometricCanvas({
|
|
|
15104
14904
|
if (validMoveSet.has(tileKey)) {
|
|
15105
14905
|
const centerX = pos.x + scaledTileWidth / 2;
|
|
15106
14906
|
const topY = pos.y + scaledDiamondTopY;
|
|
15107
|
-
|
|
15108
|
-
ctx.fillStyle = `rgba(74, 222, 128, ${pulse})`;
|
|
14907
|
+
ctx.fillStyle = "rgba(74, 222, 128, 0.25)";
|
|
15109
14908
|
ctx.beginPath();
|
|
15110
14909
|
ctx.moveTo(centerX, topY);
|
|
15111
14910
|
ctx.lineTo(pos.x + scaledTileWidth, topY + scaledFloorHeight / 2);
|
|
@@ -15117,8 +14916,7 @@ function IsometricCanvas({
|
|
|
15117
14916
|
if (attackTargetSet.has(tileKey)) {
|
|
15118
14917
|
const centerX = pos.x + scaledTileWidth / 2;
|
|
15119
14918
|
const topY = pos.y + scaledDiamondTopY;
|
|
15120
|
-
|
|
15121
|
-
ctx.fillStyle = `rgba(239, 68, 68, ${pulse})`;
|
|
14919
|
+
ctx.fillStyle = "rgba(239, 68, 68, 0.35)";
|
|
15122
14920
|
ctx.beginPath();
|
|
15123
14921
|
ctx.moveTo(centerX, topY);
|
|
15124
14922
|
ctx.lineTo(pos.x + scaledTileWidth, topY + scaledFloorHeight / 2);
|
|
@@ -15191,7 +14989,7 @@ function IsometricCanvas({
|
|
|
15191
14989
|
const isSelected = unit.id === selectedUnitId;
|
|
15192
14990
|
const centerX = pos.x + scaledTileWidth / 2;
|
|
15193
14991
|
const groundY = pos.y + scaledDiamondTopY + scaledFloorHeight * 0.5;
|
|
15194
|
-
const breatheOffset = 0
|
|
14992
|
+
const breatheOffset = 0;
|
|
15195
14993
|
const unitSpriteUrl = resolveUnitSpriteUrl(unit);
|
|
15196
14994
|
const img = unitSpriteUrl ? getImage(unitSpriteUrl) : null;
|
|
15197
14995
|
const unitDrawH = scaledFloorHeight * spriteHeightRatio * unitScale;
|
|
@@ -15231,10 +15029,9 @@ function IsometricCanvas({
|
|
|
15231
15029
|
ctx.restore();
|
|
15232
15030
|
}
|
|
15233
15031
|
if (isSelected) {
|
|
15234
|
-
const ringAlpha = 0.6 + 0.3 * Math.sin(animTime * 4e-3);
|
|
15235
15032
|
ctx.beginPath();
|
|
15236
15033
|
ctx.ellipse(centerX, groundY, drawW / 2 + 4 * scale, 12 * scale, 0, 0, Math.PI * 2);
|
|
15237
|
-
ctx.strokeStyle =
|
|
15034
|
+
ctx.strokeStyle = "rgba(0, 200, 255, 0.8)";
|
|
15238
15035
|
ctx.lineWidth = 3;
|
|
15239
15036
|
ctx.stroke();
|
|
15240
15037
|
}
|
|
@@ -15290,66 +15087,29 @@ function IsometricCanvas({
|
|
|
15290
15087
|
ctx.lineWidth = 2;
|
|
15291
15088
|
ctx.stroke();
|
|
15292
15089
|
}
|
|
15293
|
-
if (unit.name) {
|
|
15294
|
-
const labelBg = unit.team === "player" ? "rgba(59, 130, 246, 0.9)" : unit.team === "enemy" ? "rgba(239, 68, 68, 0.9)" : "rgba(107, 114, 128, 0.9)";
|
|
15295
|
-
ctx.font = `bold ${10 * scale * 2.5}px system-ui`;
|
|
15296
|
-
ctx.textAlign = "center";
|
|
15297
|
-
const textWidth = ctx.measureText(unit.name).width;
|
|
15298
|
-
const labelY = groundY + 14 * scale - breatheOffset;
|
|
15299
|
-
ctx.fillStyle = labelBg;
|
|
15300
|
-
ctx.beginPath();
|
|
15301
|
-
ctx.roundRect(centerX - textWidth / 2 - 6 * scale, labelY - 8 * scale, textWidth + 12 * scale, 16 * scale, 4 * scale);
|
|
15302
|
-
ctx.fill();
|
|
15303
|
-
ctx.fillStyle = "white";
|
|
15304
|
-
ctx.fillText(unit.name, centerX, labelY + 4 * scale);
|
|
15305
|
-
}
|
|
15306
|
-
if (unit.health !== void 0 && unit.maxHealth !== void 0) {
|
|
15307
|
-
const barWidth = 40 * scale;
|
|
15308
|
-
const barHeight = 6 * scale;
|
|
15309
|
-
const barX = centerX - barWidth / 2;
|
|
15310
|
-
const barY = groundY - drawH - 2 * scale - breatheOffset;
|
|
15311
|
-
const healthRatio = unit.health / unit.maxHealth;
|
|
15312
|
-
const barRadius = barHeight / 2;
|
|
15313
|
-
ctx.fillStyle = "rgba(0, 0, 0, 0.7)";
|
|
15314
|
-
ctx.beginPath();
|
|
15315
|
-
ctx.roundRect(barX, barY, barWidth, barHeight, barRadius);
|
|
15316
|
-
ctx.fill();
|
|
15317
|
-
if (healthRatio > 0) {
|
|
15318
|
-
const fillWidth = barWidth * healthRatio;
|
|
15319
|
-
const gradient = ctx.createLinearGradient(barX, barY, barX, barY + barHeight);
|
|
15320
|
-
if (healthRatio > 0.6) {
|
|
15321
|
-
gradient.addColorStop(0, "#4ade80");
|
|
15322
|
-
gradient.addColorStop(1, "#22c55e");
|
|
15323
|
-
} else if (healthRatio > 0.3) {
|
|
15324
|
-
gradient.addColorStop(0, "#fde047");
|
|
15325
|
-
gradient.addColorStop(1, "#eab308");
|
|
15326
|
-
} else {
|
|
15327
|
-
gradient.addColorStop(0, "#f87171");
|
|
15328
|
-
gradient.addColorStop(1, "#ef4444");
|
|
15329
|
-
}
|
|
15330
|
-
ctx.fillStyle = gradient;
|
|
15331
|
-
ctx.save();
|
|
15332
|
-
ctx.beginPath();
|
|
15333
|
-
ctx.roundRect(barX, barY, fillWidth, barHeight, barRadius);
|
|
15334
|
-
ctx.clip();
|
|
15335
|
-
ctx.fillRect(barX, barY, fillWidth, barHeight);
|
|
15336
|
-
ctx.restore();
|
|
15337
|
-
}
|
|
15338
|
-
ctx.strokeStyle = "rgba(255, 255, 255, 0.3)";
|
|
15339
|
-
ctx.lineWidth = 1;
|
|
15340
|
-
ctx.beginPath();
|
|
15341
|
-
ctx.roundRect(barX, barY, barWidth, barHeight, barRadius);
|
|
15342
|
-
ctx.stroke();
|
|
15343
|
-
}
|
|
15344
15090
|
}
|
|
15345
|
-
|
|
15091
|
+
for (const fx of effects) {
|
|
15092
|
+
const spriteUrl = resolveManifestUrl7(assetManifest?.effects?.[fx.key]);
|
|
15093
|
+
if (!spriteUrl) continue;
|
|
15094
|
+
const img = getImage(spriteUrl);
|
|
15095
|
+
if (!img) continue;
|
|
15096
|
+
const pos = isoToScreen(fx.x, fx.y, scale, baseOffsetX, tileLayout);
|
|
15097
|
+
const cx = pos.x + scaledTileWidth / 2;
|
|
15098
|
+
const cy = pos.y + scaledDiamondTopY + scaledFloorHeight * 0.5;
|
|
15099
|
+
const alpha = Math.min(1, fx.ttl / 4);
|
|
15100
|
+
const prev = ctx.globalAlpha;
|
|
15101
|
+
ctx.globalAlpha = alpha;
|
|
15102
|
+
ctx.drawImage(img, cx - img.naturalWidth / 2, cy - img.naturalHeight / 2);
|
|
15103
|
+
ctx.globalAlpha = prev;
|
|
15104
|
+
}
|
|
15105
|
+
onDrawEffects?.(ctx, 0, getImage);
|
|
15346
15106
|
ctx.restore();
|
|
15347
|
-
drawMinimap();
|
|
15348
15107
|
}, [
|
|
15349
15108
|
sortedTiles,
|
|
15350
15109
|
units,
|
|
15351
15110
|
features,
|
|
15352
15111
|
selectedUnitId,
|
|
15112
|
+
effects,
|
|
15353
15113
|
tileLayout,
|
|
15354
15114
|
scale,
|
|
15355
15115
|
debug2,
|
|
@@ -15369,11 +15129,12 @@ function IsometricCanvas({
|
|
|
15369
15129
|
attackTargetSet,
|
|
15370
15130
|
hoveredTile,
|
|
15371
15131
|
viewportSize,
|
|
15372
|
-
drawMinimap,
|
|
15373
15132
|
onDrawEffects,
|
|
15374
15133
|
backgroundImage,
|
|
15375
15134
|
cameraRef,
|
|
15376
|
-
unitScale
|
|
15135
|
+
unitScale,
|
|
15136
|
+
resolveManifestUrl7,
|
|
15137
|
+
assetManifest
|
|
15377
15138
|
]);
|
|
15378
15139
|
useEffect(() => {
|
|
15379
15140
|
if (!selectedUnitId) return;
|
|
@@ -15388,30 +15149,33 @@ function IsometricCanvas({
|
|
|
15388
15149
|
};
|
|
15389
15150
|
}, [selectedUnitId, units, tileLayout, scale, baseOffsetX, scaledTileWidth, scaledDiamondTopY, scaledFloorHeight, viewportSize, targetCameraRef]);
|
|
15390
15151
|
useEffect(() => {
|
|
15391
|
-
|
|
15392
|
-
|
|
15393
|
-
|
|
15152
|
+
draw();
|
|
15153
|
+
}, [draw]);
|
|
15154
|
+
useEffect(() => {
|
|
15155
|
+
draw();
|
|
15156
|
+
}, [_imagePendingCount]);
|
|
15157
|
+
useEffect(() => {
|
|
15158
|
+
if (selectedUnitId == null) return;
|
|
15394
15159
|
let running = true;
|
|
15395
|
-
const
|
|
15160
|
+
const tick = () => {
|
|
15396
15161
|
if (!running) return;
|
|
15397
|
-
|
|
15398
|
-
|
|
15399
|
-
|
|
15400
|
-
rafIdRef.current = requestAnimationFrame(animate);
|
|
15162
|
+
const stillLerping = lerpToTarget();
|
|
15163
|
+
draw();
|
|
15164
|
+
if (stillLerping) lerpRafRef.current = requestAnimationFrame(tick);
|
|
15401
15165
|
};
|
|
15402
|
-
|
|
15166
|
+
lerpRafRef.current = requestAnimationFrame(tick);
|
|
15403
15167
|
return () => {
|
|
15404
15168
|
running = false;
|
|
15405
|
-
cancelAnimationFrame(
|
|
15169
|
+
cancelAnimationFrame(lerpRafRef.current);
|
|
15406
15170
|
};
|
|
15407
|
-
}, [
|
|
15171
|
+
}, [selectedUnitId, lerpToTarget, draw]);
|
|
15408
15172
|
const singlePointerActiveRef = useRef(false);
|
|
15409
15173
|
const handleCanvasPointerDown = useCallback((e) => {
|
|
15410
15174
|
singlePointerActiveRef.current = true;
|
|
15411
15175
|
if (enableCamera) handlePointerDown(e);
|
|
15412
15176
|
}, [enableCamera, handlePointerDown]);
|
|
15413
15177
|
const handleCanvasPointerMove = useCallback((e) => {
|
|
15414
|
-
if (enableCamera) handlePointerMove(e, () => draw(
|
|
15178
|
+
if (enableCamera) handlePointerMove(e, () => draw());
|
|
15415
15179
|
}, [enableCamera, handlePointerMove, draw]);
|
|
15416
15180
|
const handleCanvasHover = useCallback((e) => {
|
|
15417
15181
|
if (singlePointerActiveRef.current) return;
|
|
@@ -15453,10 +15217,10 @@ function IsometricCanvas({
|
|
|
15453
15217
|
onTileLeave?.();
|
|
15454
15218
|
}, [handleMouseLeave, onTileLeave, tileLeaveEvent, eventBus]);
|
|
15455
15219
|
const applyZoom = useCallback((factor, centerX, centerY) => {
|
|
15456
|
-
if (enableCamera) zoomAtPoint(factor, centerX, centerY, viewportSize, () => draw(
|
|
15220
|
+
if (enableCamera) zoomAtPoint(factor, centerX, centerY, viewportSize, () => draw());
|
|
15457
15221
|
}, [enableCamera, zoomAtPoint, viewportSize, draw]);
|
|
15458
15222
|
const applyPanDelta = useCallback((dx, dy) => {
|
|
15459
|
-
if (enableCamera) panBy(dx, dy, () => draw(
|
|
15223
|
+
if (enableCamera) panBy(dx, dy, () => draw());
|
|
15460
15224
|
}, [enableCamera, panBy, draw]);
|
|
15461
15225
|
const cancelSinglePointer = useCallback(() => {
|
|
15462
15226
|
singlePointerActiveRef.current = false;
|
|
@@ -15472,11 +15236,27 @@ function IsometricCanvas({
|
|
|
15472
15236
|
onPanDelta: applyPanDelta,
|
|
15473
15237
|
onMultiTouchStart: cancelSinglePointer
|
|
15474
15238
|
});
|
|
15239
|
+
const unitOverlays = useMemo(() => {
|
|
15240
|
+
if (sortedTiles.length === 0) return [];
|
|
15241
|
+
return units.filter((u) => !!u.position).map((u) => {
|
|
15242
|
+
const pos = isoToScreen(u.position.x, u.position.y, scale, baseOffsetX, tileLayout);
|
|
15243
|
+
const cam = cameraRef.current;
|
|
15244
|
+
const screenX = (pos.x + scaledTileWidth / 2 - (cam.x + viewportSize.width / 2)) * cam.zoom + viewportSize.width / 2;
|
|
15245
|
+
const screenY = (pos.y + scaledDiamondTopY + scaledFloorHeight * 0.5 - (cam.y + viewportSize.height / 2)) * cam.zoom + viewportSize.height / 2;
|
|
15246
|
+
return { unit: u, screenX, screenY };
|
|
15247
|
+
});
|
|
15248
|
+
}, [units, sortedTiles.length, scale, baseOffsetX, tileLayout, scaledTileWidth, scaledDiamondTopY, scaledFloorHeight, viewportSize, cameraRef]);
|
|
15475
15249
|
if (error) {
|
|
15476
|
-
return /* @__PURE__ */ jsx(
|
|
15250
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("flex items-center justify-center w-full h-full bg-[var(--color-card)] rounded-container", className), children: /* @__PURE__ */ jsxs(Stack, { direction: "vertical", gap: "md", align: "center", children: [
|
|
15251
|
+
/* @__PURE__ */ jsx(Icon, { name: "alert-circle", size: "xl" }),
|
|
15252
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-error", children: error.message })
|
|
15253
|
+
] }) });
|
|
15477
15254
|
}
|
|
15478
15255
|
if (isLoading) {
|
|
15479
|
-
return /* @__PURE__ */ jsx(
|
|
15256
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("flex items-center justify-center w-full h-full bg-[var(--color-card)] rounded-container", className), children: /* @__PURE__ */ jsxs(Stack, { direction: "vertical", gap: "md", align: "center", children: [
|
|
15257
|
+
/* @__PURE__ */ jsx(Icon, { name: "loader", size: "xl", className: "animate-spin" }),
|
|
15258
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-muted-foreground", children: t("canvas.loadingMessage") || "Loading\u2026" })
|
|
15259
|
+
] }) });
|
|
15480
15260
|
}
|
|
15481
15261
|
if (sortedTiles.length === 0) {
|
|
15482
15262
|
return /* @__PURE__ */ jsx(
|
|
@@ -15541,14 +15321,36 @@ function IsometricCanvas({
|
|
|
15541
15321
|
}
|
|
15542
15322
|
)
|
|
15543
15323
|
] }),
|
|
15544
|
-
|
|
15545
|
-
"
|
|
15324
|
+
unitOverlays.map(({ unit, screenX, screenY }) => /* @__PURE__ */ jsxs(
|
|
15325
|
+
"div",
|
|
15546
15326
|
{
|
|
15547
|
-
|
|
15548
|
-
|
|
15549
|
-
|
|
15327
|
+
className: "absolute pointer-events-none",
|
|
15328
|
+
style: { left: Math.round(screenX), top: Math.round(screenY), transform: "translate(-50%, 0)", zIndex: 5 },
|
|
15329
|
+
children: [
|
|
15330
|
+
unit.name && /* @__PURE__ */ jsx(
|
|
15331
|
+
"div",
|
|
15332
|
+
{
|
|
15333
|
+
className: "text-white text-xs font-bold px-1.5 py-0.5 rounded mb-0.5 whitespace-nowrap",
|
|
15334
|
+
style: { background: unit.team === "player" ? "rgba(59,130,246,0.9)" : unit.team === "enemy" ? "rgba(239,68,68,0.9)" : "rgba(107,114,128,0.9)" },
|
|
15335
|
+
children: unit.name
|
|
15336
|
+
}
|
|
15337
|
+
),
|
|
15338
|
+
unit.health !== void 0 && unit.maxHealth !== void 0 && unit.maxHealth > 0 && /* @__PURE__ */ jsx(HealthBar, { current: unit.health, max: unit.maxHealth, format: "bar", size: "sm" })
|
|
15339
|
+
]
|
|
15340
|
+
},
|
|
15341
|
+
unit.id
|
|
15342
|
+
)),
|
|
15343
|
+
showMinimap && /* @__PURE__ */ jsx("div", { className: "absolute bottom-2 right-2 pointer-events-none", style: { zIndex: 10 }, children: /* @__PURE__ */ jsx(
|
|
15344
|
+
MiniMap,
|
|
15345
|
+
{
|
|
15346
|
+
tiles: miniMapTiles,
|
|
15347
|
+
units: miniMapUnits,
|
|
15348
|
+
width: 150,
|
|
15349
|
+
height: 100,
|
|
15350
|
+
mapWidth: miniMapWidth,
|
|
15351
|
+
mapHeight: miniMapHeight
|
|
15550
15352
|
}
|
|
15551
|
-
)
|
|
15353
|
+
) })
|
|
15552
15354
|
]
|
|
15553
15355
|
}
|
|
15554
15356
|
);
|
|
@@ -15563,8 +15365,8 @@ var init_IsometricCanvas = __esm({
|
|
|
15563
15365
|
init_Stack();
|
|
15564
15366
|
init_Icon();
|
|
15565
15367
|
init_Typography();
|
|
15566
|
-
|
|
15567
|
-
|
|
15368
|
+
init_MiniMap();
|
|
15369
|
+
init_HealthBar();
|
|
15568
15370
|
init_useImageCache();
|
|
15569
15371
|
init_useCamera();
|
|
15570
15372
|
init_useCanvasGestures();
|
|
@@ -16295,6 +16097,50 @@ var init_Tabs = __esm({
|
|
|
16295
16097
|
Tabs.displayName = "Tabs";
|
|
16296
16098
|
}
|
|
16297
16099
|
});
|
|
16100
|
+
var LoadingState;
|
|
16101
|
+
var init_LoadingState = __esm({
|
|
16102
|
+
"components/core/molecules/LoadingState.tsx"() {
|
|
16103
|
+
"use client";
|
|
16104
|
+
init_cn();
|
|
16105
|
+
init_atoms2();
|
|
16106
|
+
init_Stack();
|
|
16107
|
+
init_Typography();
|
|
16108
|
+
LoadingState = ({
|
|
16109
|
+
title,
|
|
16110
|
+
message,
|
|
16111
|
+
className
|
|
16112
|
+
}) => {
|
|
16113
|
+
const { t } = useTranslate();
|
|
16114
|
+
const displayMessage = message ?? t("common.loading");
|
|
16115
|
+
return /* @__PURE__ */ jsxs(
|
|
16116
|
+
VStack,
|
|
16117
|
+
{
|
|
16118
|
+
align: "center",
|
|
16119
|
+
className: cn(
|
|
16120
|
+
"justify-center py-12",
|
|
16121
|
+
className
|
|
16122
|
+
),
|
|
16123
|
+
children: [
|
|
16124
|
+
/* @__PURE__ */ jsx(Spinner, { size: "lg" }),
|
|
16125
|
+
title && /* @__PURE__ */ jsx(Typography, { variant: "h3", className: "mt-4 text-lg font-semibold text-foreground", children: title }),
|
|
16126
|
+
/* @__PURE__ */ jsx(
|
|
16127
|
+
Typography,
|
|
16128
|
+
{
|
|
16129
|
+
variant: "small",
|
|
16130
|
+
className: cn(
|
|
16131
|
+
"text-muted-foreground",
|
|
16132
|
+
title ? "mt-2" : "mt-4"
|
|
16133
|
+
),
|
|
16134
|
+
children: displayMessage
|
|
16135
|
+
}
|
|
16136
|
+
)
|
|
16137
|
+
]
|
|
16138
|
+
}
|
|
16139
|
+
);
|
|
16140
|
+
};
|
|
16141
|
+
LoadingState.displayName = "LoadingState";
|
|
16142
|
+
}
|
|
16143
|
+
});
|
|
16298
16144
|
var ICON_NAME_ALIASES, lookStyles3, EmptyState;
|
|
16299
16145
|
var init_EmptyState = __esm({
|
|
16300
16146
|
"components/core/molecules/EmptyState.tsx"() {
|
|
@@ -16575,7 +16421,7 @@ var init_CodeBlock = __esm({
|
|
|
16575
16421
|
};
|
|
16576
16422
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
16577
16423
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
16578
|
-
CodeBlock =
|
|
16424
|
+
CodeBlock = React96__default.memo(
|
|
16579
16425
|
({
|
|
16580
16426
|
code: rawCode,
|
|
16581
16427
|
language = "text",
|
|
@@ -17162,7 +17008,7 @@ var init_MarkdownContent = __esm({
|
|
|
17162
17008
|
init_Box();
|
|
17163
17009
|
init_CodeBlock();
|
|
17164
17010
|
init_cn();
|
|
17165
|
-
MarkdownContent =
|
|
17011
|
+
MarkdownContent = React96__default.memo(
|
|
17166
17012
|
({ content, direction = "ltr", className }) => {
|
|
17167
17013
|
const { t: _t } = useTranslate();
|
|
17168
17014
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -18531,7 +18377,7 @@ var init_StateMachineView = __esm({
|
|
|
18531
18377
|
style: { top: title ? 30 : 0 },
|
|
18532
18378
|
children: [
|
|
18533
18379
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
18534
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
18380
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React96__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
18535
18381
|
StateNode,
|
|
18536
18382
|
{
|
|
18537
18383
|
state,
|
|
@@ -22500,7 +22346,7 @@ function CardHand({
|
|
|
22500
22346
|
className
|
|
22501
22347
|
}) {
|
|
22502
22348
|
const eventBus = useEventBus();
|
|
22503
|
-
const handleClick =
|
|
22349
|
+
const handleClick = React96.useCallback(
|
|
22504
22350
|
(card) => {
|
|
22505
22351
|
if (card.disabled) return;
|
|
22506
22352
|
onCardClick?.(card.id);
|
|
@@ -25489,10 +25335,10 @@ function CombatLog({
|
|
|
25489
25335
|
}, [events2, autoScroll]);
|
|
25490
25336
|
const safeEvents = events2 ?? [];
|
|
25491
25337
|
const visibleEvents = safeEvents.slice(-maxVisible);
|
|
25492
|
-
return /* @__PURE__ */ jsxs(
|
|
25338
|
+
return /* @__PURE__ */ jsxs(Box, { className: cn("flex flex-col rounded-container border border-border bg-card shadow-elevation-card", className), children: [
|
|
25493
25339
|
/* @__PURE__ */ jsx(Box, { padding: "sm", border: true, className: "border-b-2 border-x-0 border-t-0 border-border", children: /* @__PURE__ */ jsxs(Box, { display: "flex", className: "items-center justify-between", children: [
|
|
25494
25340
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "font-bold", children: title }),
|
|
25495
|
-
/* @__PURE__ */ jsxs(
|
|
25341
|
+
/* @__PURE__ */ jsxs("span", { className: "text-xs text-muted-foreground bg-muted/60 rounded px-1.5 py-0.5 border border-border/50 font-mono", children: [
|
|
25496
25342
|
safeEvents.length,
|
|
25497
25343
|
" events"
|
|
25498
25344
|
] })
|
|
@@ -25512,7 +25358,7 @@ function CombatLog({
|
|
|
25512
25358
|
/* @__PURE__ */ jsx(Box, { className: cn("flex-shrink-0 mt-0.5", colorClass), children: /* @__PURE__ */ jsx(EventIcon, { className: "h-4 w-4" }) }),
|
|
25513
25359
|
/* @__PURE__ */ jsxs(Box, { className: "flex-1 min-w-0", children: [
|
|
25514
25360
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "block", children: event.message }),
|
|
25515
|
-
event.value !== void 0 && /* @__PURE__ */ jsxs(
|
|
25361
|
+
event.value !== void 0 && /* @__PURE__ */ jsxs("span", { className: cn("inline-block mt-1 text-xs font-bold rounded px-1.5 py-0.5 border", eventValueColors[eventType]), children: [
|
|
25516
25362
|
eventType === "heal" ? "+" : eventType === "attack" ? "-" : "",
|
|
25517
25363
|
event.value
|
|
25518
25364
|
] })
|
|
@@ -25525,7 +25371,7 @@ function CombatLog({
|
|
|
25525
25371
|
}) }) })
|
|
25526
25372
|
] });
|
|
25527
25373
|
}
|
|
25528
|
-
var eventIcons, eventColors,
|
|
25374
|
+
var eventIcons, eventColors, eventValueColors, DEFAULT_COMBAT_EVENTS;
|
|
25529
25375
|
var init_CombatLog = __esm({
|
|
25530
25376
|
"components/game/molecules/CombatLog.tsx"() {
|
|
25531
25377
|
init_atoms2();
|
|
@@ -25548,14 +25394,14 @@ var init_CombatLog = __esm({
|
|
|
25548
25394
|
death: "text-muted-foreground",
|
|
25549
25395
|
spawn: "text-accent"
|
|
25550
25396
|
};
|
|
25551
|
-
|
|
25552
|
-
attack: "
|
|
25553
|
-
defend: "
|
|
25554
|
-
heal: "success",
|
|
25555
|
-
move: "warning",
|
|
25556
|
-
special: "
|
|
25557
|
-
death: "
|
|
25558
|
-
spawn: "
|
|
25397
|
+
eventValueColors = {
|
|
25398
|
+
attack: "text-error bg-error/10 border-error/30",
|
|
25399
|
+
defend: "text-info bg-info/10 border-info/30",
|
|
25400
|
+
heal: "text-success bg-success/10 border-success/30",
|
|
25401
|
+
move: "text-warning bg-warning/10 border-warning/30",
|
|
25402
|
+
special: "text-accent bg-accent/10 border-accent/30",
|
|
25403
|
+
death: "text-muted-foreground bg-muted/30 border-border",
|
|
25404
|
+
spawn: "text-accent bg-accent/10 border-accent/30"
|
|
25559
25405
|
};
|
|
25560
25406
|
DEFAULT_COMBAT_EVENTS = [
|
|
25561
25407
|
{ id: "e1", type: "spawn", message: "Shadow Guard entered the field.", timestamp: 0, turn: 1 },
|
|
@@ -25979,7 +25825,7 @@ function CraftingRecipe({
|
|
|
25979
25825
|
className
|
|
25980
25826
|
}) {
|
|
25981
25827
|
const eventBus = useEventBus();
|
|
25982
|
-
const handleCraft =
|
|
25828
|
+
const handleCraft = React96.useCallback(() => {
|
|
25983
25829
|
onCraft?.();
|
|
25984
25830
|
if (craftEvent) {
|
|
25985
25831
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -25996,7 +25842,7 @@ function CraftingRecipe({
|
|
|
25996
25842
|
children: [
|
|
25997
25843
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
25998
25844
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
25999
|
-
return /* @__PURE__ */ jsxs(
|
|
25845
|
+
return /* @__PURE__ */ jsxs(React96.Fragment, { children: [
|
|
26000
25846
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
26001
25847
|
ItemSlot,
|
|
26002
25848
|
{
|
|
@@ -26021,13 +25867,13 @@ function CraftingRecipe({
|
|
|
26021
25867
|
}
|
|
26022
25868
|
),
|
|
26023
25869
|
/* @__PURE__ */ jsx(
|
|
26024
|
-
|
|
25870
|
+
ActionButton,
|
|
26025
25871
|
{
|
|
25872
|
+
label: "Craft",
|
|
26026
25873
|
onClick: handleCraft,
|
|
26027
25874
|
disabled: !canCraft,
|
|
26028
25875
|
variant: canCraft ? "primary" : "secondary",
|
|
26029
|
-
size: "sm"
|
|
26030
|
-
children: "Craft"
|
|
25876
|
+
size: "sm"
|
|
26031
25877
|
}
|
|
26032
25878
|
)
|
|
26033
25879
|
]
|
|
@@ -26041,7 +25887,7 @@ var init_CraftingRecipe = __esm({
|
|
|
26041
25887
|
init_cn();
|
|
26042
25888
|
init_useEventBus();
|
|
26043
25889
|
init_ItemSlot();
|
|
26044
|
-
|
|
25890
|
+
init_ActionButton();
|
|
26045
25891
|
init_Box();
|
|
26046
25892
|
init_Stack();
|
|
26047
25893
|
init_Icon();
|
|
@@ -26068,8 +25914,8 @@ function DPad({
|
|
|
26068
25914
|
}) {
|
|
26069
25915
|
const eventBus = useEventBus();
|
|
26070
25916
|
const sizes = sizeMap15[size];
|
|
26071
|
-
const [activeDirections, setActiveDirections] =
|
|
26072
|
-
const handlePress =
|
|
25917
|
+
const [activeDirections, setActiveDirections] = React96.useState(/* @__PURE__ */ new Set());
|
|
25918
|
+
const handlePress = React96.useCallback(
|
|
26073
25919
|
(direction) => {
|
|
26074
25920
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
26075
25921
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -26077,7 +25923,7 @@ function DPad({
|
|
|
26077
25923
|
},
|
|
26078
25924
|
[directionEvent, eventBus, onDirection]
|
|
26079
25925
|
);
|
|
26080
|
-
const handleRelease =
|
|
25926
|
+
const handleRelease = React96.useCallback(
|
|
26081
25927
|
(direction) => {
|
|
26082
25928
|
setActiveDirections((prev) => {
|
|
26083
25929
|
const next = new Set(prev);
|
|
@@ -26962,8 +26808,8 @@ var init_Menu = __esm({
|
|
|
26962
26808
|
"bottom-end": "bottom-start"
|
|
26963
26809
|
};
|
|
26964
26810
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
26965
|
-
const triggerChild =
|
|
26966
|
-
const triggerElement =
|
|
26811
|
+
const triggerChild = React96__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
26812
|
+
const triggerElement = React96__default.cloneElement(
|
|
26967
26813
|
triggerChild,
|
|
26968
26814
|
{
|
|
26969
26815
|
ref: triggerRef,
|
|
@@ -27058,14 +26904,14 @@ function useDataDnd(args) {
|
|
|
27058
26904
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
27059
26905
|
const enabled = isZone || Boolean(dndRoot);
|
|
27060
26906
|
const eventBus = useEventBus();
|
|
27061
|
-
const parentRoot =
|
|
26907
|
+
const parentRoot = React96__default.useContext(RootCtx);
|
|
27062
26908
|
const isRoot = enabled && parentRoot === null;
|
|
27063
|
-
const zoneId =
|
|
26909
|
+
const zoneId = React96__default.useId();
|
|
27064
26910
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
27065
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
27066
|
-
const optimisticOrdersRef =
|
|
26911
|
+
const [optimisticOrders, setOptimisticOrders] = React96__default.useState(() => /* @__PURE__ */ new Map());
|
|
26912
|
+
const optimisticOrdersRef = React96__default.useRef(optimisticOrders);
|
|
27067
26913
|
optimisticOrdersRef.current = optimisticOrders;
|
|
27068
|
-
const clearOptimisticOrder =
|
|
26914
|
+
const clearOptimisticOrder = React96__default.useCallback((group) => {
|
|
27069
26915
|
setOptimisticOrders((prev) => {
|
|
27070
26916
|
if (!prev.has(group)) return prev;
|
|
27071
26917
|
const next = new Map(prev);
|
|
@@ -27090,7 +26936,7 @@ function useDataDnd(args) {
|
|
|
27090
26936
|
const raw = it[dndItemIdField];
|
|
27091
26937
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
27092
26938
|
}).join("|");
|
|
27093
|
-
const itemIds =
|
|
26939
|
+
const itemIds = React96__default.useMemo(
|
|
27094
26940
|
() => orderedItems.map((it, idx) => {
|
|
27095
26941
|
const raw = it[dndItemIdField];
|
|
27096
26942
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
@@ -27101,7 +26947,7 @@ function useDataDnd(args) {
|
|
|
27101
26947
|
const raw = it[dndItemIdField];
|
|
27102
26948
|
return raw != null ? String(raw) : `__${idx}`;
|
|
27103
26949
|
}).join("|");
|
|
27104
|
-
|
|
26950
|
+
React96__default.useEffect(() => {
|
|
27105
26951
|
const root = isRoot ? null : parentRoot;
|
|
27106
26952
|
if (root) {
|
|
27107
26953
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -27109,20 +26955,20 @@ function useDataDnd(args) {
|
|
|
27109
26955
|
clearOptimisticOrder(ownGroup);
|
|
27110
26956
|
}
|
|
27111
26957
|
}, [itemsContentSig, ownGroup]);
|
|
27112
|
-
const zonesRef =
|
|
27113
|
-
const registerZone =
|
|
26958
|
+
const zonesRef = React96__default.useRef(/* @__PURE__ */ new Map());
|
|
26959
|
+
const registerZone = React96__default.useCallback((zoneId2, meta2) => {
|
|
27114
26960
|
zonesRef.current.set(zoneId2, meta2);
|
|
27115
26961
|
}, []);
|
|
27116
|
-
const unregisterZone =
|
|
26962
|
+
const unregisterZone = React96__default.useCallback((zoneId2) => {
|
|
27117
26963
|
zonesRef.current.delete(zoneId2);
|
|
27118
26964
|
}, []);
|
|
27119
|
-
const [activeDrag, setActiveDrag] =
|
|
27120
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
27121
|
-
const meta =
|
|
26965
|
+
const [activeDrag, setActiveDrag] = React96__default.useState(null);
|
|
26966
|
+
const [overZoneGroup, setOverZoneGroup] = React96__default.useState(null);
|
|
26967
|
+
const meta = React96__default.useMemo(
|
|
27122
26968
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
27123
26969
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
27124
26970
|
);
|
|
27125
|
-
|
|
26971
|
+
React96__default.useEffect(() => {
|
|
27126
26972
|
const target = isRoot ? null : parentRoot;
|
|
27127
26973
|
if (!target) {
|
|
27128
26974
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -27141,7 +26987,7 @@ function useDataDnd(args) {
|
|
|
27141
26987
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
27142
26988
|
const sensors = useAlmadarDndSensors(true);
|
|
27143
26989
|
const collisionDetection = almadarDndCollisionDetection;
|
|
27144
|
-
const findZoneByItem =
|
|
26990
|
+
const findZoneByItem = React96__default.useCallback(
|
|
27145
26991
|
(id) => {
|
|
27146
26992
|
for (const z of zonesRef.current.values()) {
|
|
27147
26993
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -27150,7 +26996,7 @@ function useDataDnd(args) {
|
|
|
27150
26996
|
},
|
|
27151
26997
|
[]
|
|
27152
26998
|
);
|
|
27153
|
-
|
|
26999
|
+
React96__default.useCallback(
|
|
27154
27000
|
(group) => {
|
|
27155
27001
|
for (const z of zonesRef.current.values()) {
|
|
27156
27002
|
if (z.group === group) return z;
|
|
@@ -27159,7 +27005,7 @@ function useDataDnd(args) {
|
|
|
27159
27005
|
},
|
|
27160
27006
|
[]
|
|
27161
27007
|
);
|
|
27162
|
-
const handleDragEnd =
|
|
27008
|
+
const handleDragEnd = React96__default.useCallback(
|
|
27163
27009
|
(event) => {
|
|
27164
27010
|
const { active, over } = event;
|
|
27165
27011
|
const activeIdStr = String(active.id);
|
|
@@ -27250,8 +27096,8 @@ function useDataDnd(args) {
|
|
|
27250
27096
|
},
|
|
27251
27097
|
[eventBus]
|
|
27252
27098
|
);
|
|
27253
|
-
const sortableData =
|
|
27254
|
-
const SortableItem =
|
|
27099
|
+
const sortableData = React96__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
27100
|
+
const SortableItem = React96__default.useCallback(
|
|
27255
27101
|
({ id, children }) => {
|
|
27256
27102
|
const {
|
|
27257
27103
|
attributes,
|
|
@@ -27291,7 +27137,7 @@ function useDataDnd(args) {
|
|
|
27291
27137
|
id: droppableId,
|
|
27292
27138
|
data: sortableData
|
|
27293
27139
|
});
|
|
27294
|
-
const ctx =
|
|
27140
|
+
const ctx = React96__default.useContext(RootCtx);
|
|
27295
27141
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
27296
27142
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
27297
27143
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -27306,7 +27152,7 @@ function useDataDnd(args) {
|
|
|
27306
27152
|
showForeignPlaceholder,
|
|
27307
27153
|
ctxAvailable: ctx != null
|
|
27308
27154
|
});
|
|
27309
|
-
|
|
27155
|
+
React96__default.useEffect(() => {
|
|
27310
27156
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
27311
27157
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
27312
27158
|
return /* @__PURE__ */ jsx(
|
|
@@ -27320,11 +27166,11 @@ function useDataDnd(args) {
|
|
|
27320
27166
|
}
|
|
27321
27167
|
);
|
|
27322
27168
|
};
|
|
27323
|
-
const rootContextValue =
|
|
27169
|
+
const rootContextValue = React96__default.useMemo(
|
|
27324
27170
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
27325
27171
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
27326
27172
|
);
|
|
27327
|
-
const handleDragStart =
|
|
27173
|
+
const handleDragStart = React96__default.useCallback((event) => {
|
|
27328
27174
|
const sourceZone = findZoneByItem(event.active.id);
|
|
27329
27175
|
const rect = event.active.rect.current.initial;
|
|
27330
27176
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -27343,7 +27189,7 @@ function useDataDnd(args) {
|
|
|
27343
27189
|
isRoot
|
|
27344
27190
|
});
|
|
27345
27191
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
27346
|
-
const handleDragOver =
|
|
27192
|
+
const handleDragOver = React96__default.useCallback((event) => {
|
|
27347
27193
|
const { active, over } = event;
|
|
27348
27194
|
const overData = over?.data?.current;
|
|
27349
27195
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -27413,7 +27259,7 @@ function useDataDnd(args) {
|
|
|
27413
27259
|
return next;
|
|
27414
27260
|
});
|
|
27415
27261
|
}, []);
|
|
27416
|
-
const handleDragCancel =
|
|
27262
|
+
const handleDragCancel = React96__default.useCallback((event) => {
|
|
27417
27263
|
setActiveDrag(null);
|
|
27418
27264
|
setOverZoneGroup(null);
|
|
27419
27265
|
dndLog.warn("dragCancel", {
|
|
@@ -27421,12 +27267,12 @@ function useDataDnd(args) {
|
|
|
27421
27267
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
27422
27268
|
});
|
|
27423
27269
|
}, []);
|
|
27424
|
-
const handleDragEndWithCleanup =
|
|
27270
|
+
const handleDragEndWithCleanup = React96__default.useCallback((event) => {
|
|
27425
27271
|
handleDragEnd(event);
|
|
27426
27272
|
setActiveDrag(null);
|
|
27427
27273
|
setOverZoneGroup(null);
|
|
27428
27274
|
}, [handleDragEnd]);
|
|
27429
|
-
const wrapContainer =
|
|
27275
|
+
const wrapContainer = React96__default.useCallback(
|
|
27430
27276
|
(children) => {
|
|
27431
27277
|
if (!enabled) return children;
|
|
27432
27278
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -27480,7 +27326,7 @@ var init_useDataDnd = __esm({
|
|
|
27480
27326
|
init_useAlmadarDndCollision();
|
|
27481
27327
|
init_Box();
|
|
27482
27328
|
dndLog = createLogger("almadar:ui:dnd");
|
|
27483
|
-
RootCtx =
|
|
27329
|
+
RootCtx = React96__default.createContext(null);
|
|
27484
27330
|
}
|
|
27485
27331
|
});
|
|
27486
27332
|
function renderIconInput(icon, props) {
|
|
@@ -28006,7 +27852,7 @@ function DataList({
|
|
|
28006
27852
|
}) {
|
|
28007
27853
|
const eventBus = useEventBus();
|
|
28008
27854
|
const { t } = useTranslate();
|
|
28009
|
-
const [visibleCount, setVisibleCount] =
|
|
27855
|
+
const [visibleCount, setVisibleCount] = React96__default.useState(pageSize || Infinity);
|
|
28010
27856
|
const fieldDefs = fields ?? columns ?? [];
|
|
28011
27857
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
28012
27858
|
const dnd = useDataDnd({
|
|
@@ -28025,7 +27871,7 @@ function DataList({
|
|
|
28025
27871
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
28026
27872
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
28027
27873
|
const hasRenderProp = typeof children === "function";
|
|
28028
|
-
|
|
27874
|
+
React96__default.useEffect(() => {
|
|
28029
27875
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
28030
27876
|
const childrenTypeOf = typeof children;
|
|
28031
27877
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -28129,7 +27975,7 @@ function DataList({
|
|
|
28129
27975
|
const items2 = [...data];
|
|
28130
27976
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
28131
27977
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
28132
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
27978
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React96__default.Fragment, { children: [
|
|
28133
27979
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
28134
27980
|
group.items.map((itemData, index) => {
|
|
28135
27981
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -28270,7 +28116,7 @@ function DataList({
|
|
|
28270
28116
|
className
|
|
28271
28117
|
),
|
|
28272
28118
|
children: [
|
|
28273
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
28119
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React96__default.Fragment, { children: [
|
|
28274
28120
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
28275
28121
|
group.items.map(
|
|
28276
28122
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -29063,7 +28909,7 @@ var init_Flex = __esm({
|
|
|
29063
28909
|
flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
|
|
29064
28910
|
}
|
|
29065
28911
|
}
|
|
29066
|
-
return
|
|
28912
|
+
return React96__default.createElement(Component2, {
|
|
29067
28913
|
className: cn(
|
|
29068
28914
|
inline ? "inline-flex" : "flex",
|
|
29069
28915
|
directionStyles[direction],
|
|
@@ -29182,7 +29028,7 @@ var init_Grid = __esm({
|
|
|
29182
29028
|
as: Component2 = "div"
|
|
29183
29029
|
}) => {
|
|
29184
29030
|
const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
|
|
29185
|
-
return
|
|
29031
|
+
return React96__default.createElement(
|
|
29186
29032
|
Component2,
|
|
29187
29033
|
{
|
|
29188
29034
|
className: cn(
|
|
@@ -29378,9 +29224,9 @@ var init_Popover = __esm({
|
|
|
29378
29224
|
onMouseLeave: handleClose,
|
|
29379
29225
|
onPointerDown: tapTriggerProps.onPointerDown
|
|
29380
29226
|
};
|
|
29381
|
-
const childElement =
|
|
29227
|
+
const childElement = React96__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
29382
29228
|
const childPointerDown = childElement.props.onPointerDown;
|
|
29383
|
-
const triggerElement =
|
|
29229
|
+
const triggerElement = React96__default.cloneElement(
|
|
29384
29230
|
childElement,
|
|
29385
29231
|
{
|
|
29386
29232
|
ref: triggerRef,
|
|
@@ -29982,9 +29828,9 @@ var init_Tooltip = __esm({
|
|
|
29982
29828
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
29983
29829
|
};
|
|
29984
29830
|
}, []);
|
|
29985
|
-
const triggerElement =
|
|
29831
|
+
const triggerElement = React96__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
29986
29832
|
const childPointerDown = triggerElement.props.onPointerDown;
|
|
29987
|
-
const trigger =
|
|
29833
|
+
const trigger = React96__default.cloneElement(triggerElement, {
|
|
29988
29834
|
ref: triggerRef,
|
|
29989
29835
|
onMouseEnter: handleMouseEnter,
|
|
29990
29836
|
onMouseLeave: handleMouseLeave,
|
|
@@ -30074,7 +29920,7 @@ var init_WizardProgress = __esm({
|
|
|
30074
29920
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
30075
29921
|
const isActive = index === currentStep;
|
|
30076
29922
|
const isCompleted = index < currentStep;
|
|
30077
|
-
return /* @__PURE__ */ jsxs(
|
|
29923
|
+
return /* @__PURE__ */ jsxs(React96__default.Fragment, { children: [
|
|
30078
29924
|
/* @__PURE__ */ jsx(
|
|
30079
29925
|
"button",
|
|
30080
29926
|
{
|
|
@@ -31037,6 +30883,7 @@ var init_ProgressDots = __esm({
|
|
|
31037
30883
|
});
|
|
31038
30884
|
function StatBadge({
|
|
31039
30885
|
assetUrl,
|
|
30886
|
+
iconUrl,
|
|
31040
30887
|
label,
|
|
31041
30888
|
value = 0,
|
|
31042
30889
|
max,
|
|
@@ -31050,6 +30897,7 @@ function StatBadge({
|
|
|
31050
30897
|
field: _field
|
|
31051
30898
|
}) {
|
|
31052
30899
|
const numValue = typeof value === "number" ? value : parseInt(String(value), 10) || 0;
|
|
30900
|
+
const resolvedAsset = iconUrl ?? assetUrl;
|
|
31053
30901
|
return /* @__PURE__ */ jsxs(
|
|
31054
30902
|
"div",
|
|
31055
30903
|
{
|
|
@@ -31060,10 +30908,10 @@ function StatBadge({
|
|
|
31060
30908
|
className
|
|
31061
30909
|
),
|
|
31062
30910
|
children: [
|
|
31063
|
-
|
|
30911
|
+
resolvedAsset ? /* @__PURE__ */ jsx(
|
|
31064
30912
|
"img",
|
|
31065
30913
|
{
|
|
31066
|
-
src:
|
|
30914
|
+
src: resolvedAsset,
|
|
31067
30915
|
alt: "",
|
|
31068
30916
|
width: 16,
|
|
31069
30917
|
height: 16,
|
|
@@ -31094,8 +30942,7 @@ function StatBadge({
|
|
|
31094
30942
|
ScoreDisplay,
|
|
31095
30943
|
{
|
|
31096
30944
|
value: numValue,
|
|
31097
|
-
size: size === "lg" ? "md" : "sm"
|
|
31098
|
-
animated: true
|
|
30945
|
+
size: size === "lg" ? "md" : "sm"
|
|
31099
30946
|
}
|
|
31100
30947
|
),
|
|
31101
30948
|
format === "text" && /* @__PURE__ */ jsx("span", { className: "font-bold text-foreground", children: value })
|
|
@@ -31138,7 +30985,7 @@ function InventoryGrid({
|
|
|
31138
30985
|
const eventBus = useEventBus();
|
|
31139
30986
|
const slotCount = totalSlots ?? items.length;
|
|
31140
30987
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
31141
|
-
const handleSelect =
|
|
30988
|
+
const handleSelect = React96.useCallback(
|
|
31142
30989
|
(id) => {
|
|
31143
30990
|
onSelect?.(id);
|
|
31144
30991
|
if (selectEvent) {
|
|
@@ -31245,12 +31092,14 @@ function QuestTracker({
|
|
|
31245
31092
|
}
|
|
31246
31093
|
),
|
|
31247
31094
|
/* @__PURE__ */ jsx(Box, { className: "mt-1.5", children: /* @__PURE__ */ jsx(
|
|
31248
|
-
|
|
31095
|
+
HealthBar,
|
|
31249
31096
|
{
|
|
31250
|
-
|
|
31097
|
+
current: quest.progress,
|
|
31251
31098
|
max: quest.maxProgress,
|
|
31252
|
-
|
|
31253
|
-
size: "sm"
|
|
31099
|
+
format: "bar",
|
|
31100
|
+
size: "sm",
|
|
31101
|
+
animated: true,
|
|
31102
|
+
className: isCompleted ? "[--health-color:var(--color-success)]" : isActive ? "" : "opacity-60"
|
|
31254
31103
|
}
|
|
31255
31104
|
) }),
|
|
31256
31105
|
/* @__PURE__ */ jsxs(
|
|
@@ -31278,7 +31127,7 @@ var init_QuestTracker = __esm({
|
|
|
31278
31127
|
"use client";
|
|
31279
31128
|
init_cn();
|
|
31280
31129
|
init_WaypointMarker();
|
|
31281
|
-
|
|
31130
|
+
init_HealthBar();
|
|
31282
31131
|
init_Typography();
|
|
31283
31132
|
init_Box();
|
|
31284
31133
|
init_Stack();
|
|
@@ -31373,31 +31222,31 @@ function GameCanvas2D({
|
|
|
31373
31222
|
assetBaseUrl,
|
|
31374
31223
|
className
|
|
31375
31224
|
}) {
|
|
31376
|
-
const canvasRef =
|
|
31377
|
-
const rafRef =
|
|
31378
|
-
const frameRef =
|
|
31379
|
-
const lastTimeRef =
|
|
31380
|
-
const imageCache =
|
|
31225
|
+
const canvasRef = React96.useRef(null);
|
|
31226
|
+
const rafRef = React96.useRef(0);
|
|
31227
|
+
const frameRef = React96.useRef(0);
|
|
31228
|
+
const lastTimeRef = React96.useRef(0);
|
|
31229
|
+
const imageCache = React96.useRef(/* @__PURE__ */ new Map());
|
|
31381
31230
|
const emit = useEmitEvent();
|
|
31382
|
-
const onDrawRef =
|
|
31231
|
+
const onDrawRef = React96.useRef(onDraw);
|
|
31383
31232
|
onDrawRef.current = onDraw;
|
|
31384
|
-
const onTickRef =
|
|
31233
|
+
const onTickRef = React96.useRef(onTick);
|
|
31385
31234
|
onTickRef.current = onTick;
|
|
31386
|
-
const tickEventRef =
|
|
31235
|
+
const tickEventRef = React96.useRef(tickEvent);
|
|
31387
31236
|
tickEventRef.current = tickEvent;
|
|
31388
|
-
const drawEventRef =
|
|
31237
|
+
const drawEventRef = React96.useRef(drawEvent);
|
|
31389
31238
|
drawEventRef.current = drawEvent;
|
|
31390
|
-
const emitRef =
|
|
31239
|
+
const emitRef = React96.useRef(emit);
|
|
31391
31240
|
emitRef.current = emit;
|
|
31392
|
-
const assetBaseUrlRef =
|
|
31241
|
+
const assetBaseUrlRef = React96.useRef(assetBaseUrl);
|
|
31393
31242
|
assetBaseUrlRef.current = assetBaseUrl;
|
|
31394
|
-
const backgroundImageRef =
|
|
31243
|
+
const backgroundImageRef = React96.useRef(backgroundImage);
|
|
31395
31244
|
backgroundImageRef.current = backgroundImage;
|
|
31396
|
-
const widthRef =
|
|
31245
|
+
const widthRef = React96.useRef(width);
|
|
31397
31246
|
widthRef.current = width;
|
|
31398
|
-
const heightRef =
|
|
31247
|
+
const heightRef = React96.useRef(height);
|
|
31399
31248
|
heightRef.current = height;
|
|
31400
|
-
const loadImage =
|
|
31249
|
+
const loadImage = React96.useCallback((url) => {
|
|
31401
31250
|
const base = assetBaseUrlRef.current;
|
|
31402
31251
|
if (!url.startsWith("http") && !base) return null;
|
|
31403
31252
|
const fullUrl = url.startsWith("http") ? url : `${base}${url}`;
|
|
@@ -31411,7 +31260,7 @@ function GameCanvas2D({
|
|
|
31411
31260
|
}
|
|
31412
31261
|
return null;
|
|
31413
31262
|
}, []);
|
|
31414
|
-
|
|
31263
|
+
React96.useEffect(() => {
|
|
31415
31264
|
const canvas = canvasRef.current;
|
|
31416
31265
|
if (!canvas) return;
|
|
31417
31266
|
const ctx = canvas.getContext("2d");
|
|
@@ -31559,26 +31408,14 @@ function HealthPanel({
|
|
|
31559
31408
|
)
|
|
31560
31409
|
}
|
|
31561
31410
|
),
|
|
31562
|
-
effects && effects.length > 0 && /* @__PURE__ */ jsx(Box, { className: "flex items-center gap-1 flex-wrap", children: effects.map((effect, i) => /* @__PURE__ */
|
|
31563
|
-
|
|
31411
|
+
effects && effects.length > 0 && /* @__PURE__ */ jsx(Box, { className: "flex items-center gap-1 flex-wrap", children: effects.map((effect, i) => /* @__PURE__ */ jsx(
|
|
31412
|
+
StatusEffect,
|
|
31564
31413
|
{
|
|
31414
|
+
assetUrl: effect.assetUrl,
|
|
31415
|
+
icon: effect.icon,
|
|
31416
|
+
label: effect.label,
|
|
31565
31417
|
variant: effectVariantMap[effect.variant ?? "neutral"],
|
|
31566
|
-
size: "sm"
|
|
31567
|
-
icon: effect.assetUrl ? void 0 : effect.icon,
|
|
31568
|
-
children: [
|
|
31569
|
-
effect.assetUrl && /* @__PURE__ */ jsx(
|
|
31570
|
-
"img",
|
|
31571
|
-
{
|
|
31572
|
-
src: effect.assetUrl,
|
|
31573
|
-
alt: "",
|
|
31574
|
-
width: 12,
|
|
31575
|
-
height: 12,
|
|
31576
|
-
style: { imageRendering: "pixelated", objectFit: "contain" },
|
|
31577
|
-
className: "flex-shrink-0 inline-block"
|
|
31578
|
-
}
|
|
31579
|
-
),
|
|
31580
|
-
effect.label
|
|
31581
|
-
]
|
|
31418
|
+
size: "sm"
|
|
31582
31419
|
},
|
|
31583
31420
|
i
|
|
31584
31421
|
)) })
|
|
@@ -31592,17 +31429,17 @@ var init_HealthPanel = __esm({
|
|
|
31592
31429
|
"use client";
|
|
31593
31430
|
init_cn();
|
|
31594
31431
|
init_HealthBar();
|
|
31432
|
+
init_StatusEffect();
|
|
31595
31433
|
init_Box();
|
|
31596
31434
|
init_Typography();
|
|
31597
|
-
init_Badge();
|
|
31598
31435
|
sizeMap18 = {
|
|
31599
31436
|
sm: { gap: "gap-1", padding: "px-2 py-1.5", text: "text-xs", barSize: "sm" },
|
|
31600
31437
|
md: { gap: "gap-1.5", padding: "px-3 py-2", text: "text-sm", barSize: "md" },
|
|
31601
31438
|
lg: { gap: "gap-2", padding: "px-4 py-3", text: "text-base", barSize: "lg" }
|
|
31602
31439
|
};
|
|
31603
31440
|
effectVariantMap = {
|
|
31604
|
-
buff: "
|
|
31605
|
-
debuff: "
|
|
31441
|
+
buff: "buff",
|
|
31442
|
+
debuff: "debuff",
|
|
31606
31443
|
neutral: "neutral"
|
|
31607
31444
|
};
|
|
31608
31445
|
HealthPanel.displayName = "HealthPanel";
|
|
@@ -31622,13 +31459,13 @@ function ScoreBoard({
|
|
|
31622
31459
|
const multiplier = rawMultiplier ?? 1;
|
|
31623
31460
|
const level = rawLevel ?? 1;
|
|
31624
31461
|
return /* @__PURE__ */ jsx(
|
|
31625
|
-
|
|
31462
|
+
Box,
|
|
31626
31463
|
{
|
|
31627
31464
|
className: cn(
|
|
31628
|
-
"bg-[var(--color-card)]/90
|
|
31465
|
+
"rounded-container border border-border bg-[var(--color-card)]/90 backdrop-blur-sm p-3",
|
|
31629
31466
|
className
|
|
31630
31467
|
),
|
|
31631
|
-
children: /* @__PURE__ */
|
|
31468
|
+
children: /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-3 flex-wrap", children: [
|
|
31632
31469
|
/* @__PURE__ */ jsx(
|
|
31633
31470
|
StatBadge,
|
|
31634
31471
|
{
|
|
@@ -31670,7 +31507,7 @@ function ScoreBoard({
|
|
|
31670
31507
|
}
|
|
31671
31508
|
),
|
|
31672
31509
|
combo != null && combo > 0 && /* @__PURE__ */ jsx(ComboCounter, { combo, multiplier, size: "sm" })
|
|
31673
|
-
] })
|
|
31510
|
+
] })
|
|
31674
31511
|
}
|
|
31675
31512
|
);
|
|
31676
31513
|
}
|
|
@@ -31680,7 +31517,6 @@ var init_ScoreBoard = __esm({
|
|
|
31680
31517
|
init_cn();
|
|
31681
31518
|
init_ComboCounter();
|
|
31682
31519
|
init_StatBadge();
|
|
31683
|
-
init_Card();
|
|
31684
31520
|
init_Box();
|
|
31685
31521
|
ScoreBoard.displayName = "ScoreBoard";
|
|
31686
31522
|
}
|
|
@@ -31736,7 +31572,7 @@ function TurnPanel({
|
|
|
31736
31572
|
className
|
|
31737
31573
|
}) {
|
|
31738
31574
|
const eventBus = useEventBus();
|
|
31739
|
-
const handleAction =
|
|
31575
|
+
const handleAction = React96.useCallback(
|
|
31740
31576
|
(event) => {
|
|
31741
31577
|
if (event) {
|
|
31742
31578
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -31761,28 +31597,16 @@ function TurnPanel({
|
|
|
31761
31597
|
activeTeam
|
|
31762
31598
|
}
|
|
31763
31599
|
),
|
|
31764
|
-
actions && actions.length > 0 && /* @__PURE__ */ jsx(Box, { className: "flex items-center gap-1.5 ml-auto", children: actions.map((action, i) => /* @__PURE__ */
|
|
31765
|
-
|
|
31600
|
+
actions && actions.length > 0 && /* @__PURE__ */ jsx(Box, { className: "flex items-center gap-1.5 ml-auto", children: actions.map((action, i) => /* @__PURE__ */ jsx(
|
|
31601
|
+
ActionButton,
|
|
31766
31602
|
{
|
|
31767
|
-
|
|
31768
|
-
|
|
31603
|
+
label: action.label,
|
|
31604
|
+
icon: action.assetUrl ? void 0 : action.icon,
|
|
31605
|
+
assetUrl: action.assetUrl,
|
|
31769
31606
|
disabled: action.disabled,
|
|
31770
|
-
|
|
31771
|
-
|
|
31772
|
-
|
|
31773
|
-
action.assetUrl && /* @__PURE__ */ jsx(
|
|
31774
|
-
"img",
|
|
31775
|
-
{
|
|
31776
|
-
src: action.assetUrl,
|
|
31777
|
-
alt: "",
|
|
31778
|
-
width: 14,
|
|
31779
|
-
height: 14,
|
|
31780
|
-
style: { imageRendering: "pixelated", objectFit: "contain" },
|
|
31781
|
-
className: "flex-shrink-0"
|
|
31782
|
-
}
|
|
31783
|
-
),
|
|
31784
|
-
action.label
|
|
31785
|
-
]
|
|
31607
|
+
variant: "secondary",
|
|
31608
|
+
size: "sm",
|
|
31609
|
+
onClick: () => handleAction(action.event)
|
|
31786
31610
|
},
|
|
31787
31611
|
i
|
|
31788
31612
|
)) })
|
|
@@ -31796,7 +31620,7 @@ var init_TurnPanel = __esm({
|
|
|
31796
31620
|
"use client";
|
|
31797
31621
|
init_cn();
|
|
31798
31622
|
init_TurnIndicator();
|
|
31799
|
-
|
|
31623
|
+
init_ActionButton();
|
|
31800
31624
|
init_Box();
|
|
31801
31625
|
init_useEventBus();
|
|
31802
31626
|
DEFAULT_TURN_ACTIONS = [
|
|
@@ -31847,7 +31671,7 @@ function EnemyPlate({
|
|
|
31847
31671
|
}
|
|
31848
31672
|
)
|
|
31849
31673
|
] }),
|
|
31850
|
-
level != null && /* @__PURE__ */ jsxs(
|
|
31674
|
+
level != null && /* @__PURE__ */ jsxs("span", { className: "text-xs font-bold text-muted-foreground bg-muted/60 rounded px-1.5 py-0.5 border border-border/50 shrink-0", children: [
|
|
31851
31675
|
"Lv.",
|
|
31852
31676
|
level
|
|
31853
31677
|
] })
|
|
@@ -31878,12 +31702,12 @@ function EnemyPlate({
|
|
|
31878
31702
|
)
|
|
31879
31703
|
] }),
|
|
31880
31704
|
effects && effects.length > 0 && /* @__PURE__ */ jsx(Box, { className: "flex items-center gap-1 flex-wrap", children: effects.map((effect, i) => /* @__PURE__ */ jsx(
|
|
31881
|
-
|
|
31705
|
+
StatusEffect,
|
|
31882
31706
|
{
|
|
31883
|
-
variant: effectVariantMap2[effect.variant ?? "neutral"],
|
|
31884
|
-
size: "sm",
|
|
31885
31707
|
icon: effect.icon,
|
|
31886
|
-
|
|
31708
|
+
label: effect.label,
|
|
31709
|
+
variant: effectVariantMap2[effect.variant ?? "neutral"],
|
|
31710
|
+
size: "sm"
|
|
31887
31711
|
},
|
|
31888
31712
|
i
|
|
31889
31713
|
)) })
|
|
@@ -31897,12 +31721,12 @@ var init_EnemyPlate = __esm({
|
|
|
31897
31721
|
"use client";
|
|
31898
31722
|
init_cn();
|
|
31899
31723
|
init_HealthBar();
|
|
31724
|
+
init_StatusEffect();
|
|
31900
31725
|
init_Box();
|
|
31901
31726
|
init_Typography();
|
|
31902
|
-
init_Badge();
|
|
31903
31727
|
effectVariantMap2 = {
|
|
31904
|
-
buff: "
|
|
31905
|
-
debuff: "
|
|
31728
|
+
buff: "buff",
|
|
31729
|
+
debuff: "debuff",
|
|
31906
31730
|
neutral: "neutral"
|
|
31907
31731
|
};
|
|
31908
31732
|
DEFAULT_ENEMY_EFFECTS = [
|
|
@@ -31917,7 +31741,7 @@ function UnitCommandBar({
|
|
|
31917
31741
|
className
|
|
31918
31742
|
}) {
|
|
31919
31743
|
const eventBus = useEventBus();
|
|
31920
|
-
const handleCommand =
|
|
31744
|
+
const handleCommand = React96.useCallback(
|
|
31921
31745
|
(event) => {
|
|
31922
31746
|
if (event) {
|
|
31923
31747
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -31932,27 +31756,18 @@ function UnitCommandBar({
|
|
|
31932
31756
|
"flex items-center gap-1.5 rounded-container bg-[var(--color-card)]/90 border border-border backdrop-blur-sm px-2 py-1.5",
|
|
31933
31757
|
className
|
|
31934
31758
|
),
|
|
31935
|
-
children: commands.map((command, i) => /* @__PURE__ */
|
|
31936
|
-
|
|
31937
|
-
|
|
31938
|
-
|
|
31939
|
-
|
|
31940
|
-
|
|
31941
|
-
|
|
31942
|
-
|
|
31943
|
-
|
|
31944
|
-
|
|
31945
|
-
|
|
31946
|
-
|
|
31947
|
-
command.hotkey && /* @__PURE__ */ jsx(
|
|
31948
|
-
Typography,
|
|
31949
|
-
{
|
|
31950
|
-
variant: "caption",
|
|
31951
|
-
className: "text-muted-foreground text-xs font-mono",
|
|
31952
|
-
children: command.hotkey
|
|
31953
|
-
}
|
|
31954
|
-
)
|
|
31955
|
-
] }, i))
|
|
31759
|
+
children: commands.map((command, i) => /* @__PURE__ */ jsx(Box, { className: "flex flex-col items-center gap-0.5", children: /* @__PURE__ */ jsx(
|
|
31760
|
+
ActionButton,
|
|
31761
|
+
{
|
|
31762
|
+
label: command.label,
|
|
31763
|
+
icon: command.icon,
|
|
31764
|
+
disabled: command.disabled,
|
|
31765
|
+
hotkey: command.hotkey,
|
|
31766
|
+
variant: "secondary",
|
|
31767
|
+
size: "sm",
|
|
31768
|
+
onClick: () => handleCommand(command.event)
|
|
31769
|
+
}
|
|
31770
|
+
) }, i))
|
|
31956
31771
|
}
|
|
31957
31772
|
);
|
|
31958
31773
|
}
|
|
@@ -31961,9 +31776,8 @@ var init_UnitCommandBar = __esm({
|
|
|
31961
31776
|
"components/game/molecules/UnitCommandBar.tsx"() {
|
|
31962
31777
|
"use client";
|
|
31963
31778
|
init_cn();
|
|
31964
|
-
|
|
31779
|
+
init_ActionButton();
|
|
31965
31780
|
init_Box();
|
|
31966
|
-
init_Typography();
|
|
31967
31781
|
init_useEventBus();
|
|
31968
31782
|
DEFAULT_COMMANDS = [
|
|
31969
31783
|
{ label: "Move", icon: "move", event: "MOVE", hotkey: "M" },
|
|
@@ -32468,7 +32282,7 @@ function GameMenu({
|
|
|
32468
32282
|
} catch {
|
|
32469
32283
|
}
|
|
32470
32284
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
32471
|
-
const handleOptionClick =
|
|
32285
|
+
const handleOptionClick = React96.useCallback(
|
|
32472
32286
|
(option) => {
|
|
32473
32287
|
if (option.event && eventBus) {
|
|
32474
32288
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -32587,7 +32401,7 @@ function GameOverScreen({
|
|
|
32587
32401
|
} catch {
|
|
32588
32402
|
}
|
|
32589
32403
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
32590
|
-
const handleActionClick =
|
|
32404
|
+
const handleActionClick = React96.useCallback(
|
|
32591
32405
|
(action) => {
|
|
32592
32406
|
if (action.event && eventBus) {
|
|
32593
32407
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -32802,6 +32616,7 @@ function PlatformerCanvas({
|
|
|
32802
32616
|
rightEvent = "MOVE_RIGHT",
|
|
32803
32617
|
jumpEvent = "JUMP",
|
|
32804
32618
|
stopEvent = "STOP",
|
|
32619
|
+
effects = [],
|
|
32805
32620
|
className
|
|
32806
32621
|
}) {
|
|
32807
32622
|
const canvasRef = useRef(null);
|
|
@@ -32872,7 +32687,8 @@ function PlatformerCanvas({
|
|
|
32872
32687
|
playerSprite,
|
|
32873
32688
|
tileSprites,
|
|
32874
32689
|
backgroundImage,
|
|
32875
|
-
assetBaseUrl
|
|
32690
|
+
assetBaseUrl,
|
|
32691
|
+
effects
|
|
32876
32692
|
});
|
|
32877
32693
|
propsRef.current = {
|
|
32878
32694
|
platforms,
|
|
@@ -32885,7 +32701,8 @@ function PlatformerCanvas({
|
|
|
32885
32701
|
playerSprite,
|
|
32886
32702
|
tileSprites,
|
|
32887
32703
|
backgroundImage,
|
|
32888
|
-
assetBaseUrl
|
|
32704
|
+
assetBaseUrl,
|
|
32705
|
+
effects
|
|
32889
32706
|
};
|
|
32890
32707
|
const handleKeyDown = useCallback((e) => {
|
|
32891
32708
|
if (keysRef.current.has(e.code)) return;
|
|
@@ -32952,7 +32769,8 @@ function PlatformerCanvas({
|
|
|
32952
32769
|
bgColor: bg,
|
|
32953
32770
|
playerSprite: pSprite,
|
|
32954
32771
|
tileSprites: tSprites,
|
|
32955
|
-
backgroundImage: bgImg
|
|
32772
|
+
backgroundImage: bgImg,
|
|
32773
|
+
effects: fxList
|
|
32956
32774
|
} = propsRef.current;
|
|
32957
32775
|
const auth = playerRef.current;
|
|
32958
32776
|
const interped = positions.get("player");
|
|
@@ -33106,6 +32924,18 @@ function PlatformerCanvas({
|
|
|
33106
32924
|
ctx.arc(ppx + eyeOffsetX + 7, eyeY, eyeSize, 0, Math.PI * 2);
|
|
33107
32925
|
ctx.fill();
|
|
33108
32926
|
}
|
|
32927
|
+
for (const fx of fxList) {
|
|
32928
|
+
const fxScreenX = fx.x - camX;
|
|
32929
|
+
const fxScreenY = fx.y - camY;
|
|
32930
|
+
const alpha = Math.min(1, fx.ttl / 4);
|
|
32931
|
+
const prev = ctx.globalAlpha;
|
|
32932
|
+
ctx.globalAlpha = alpha;
|
|
32933
|
+
ctx.fillStyle = "#ffe066";
|
|
32934
|
+
ctx.beginPath();
|
|
32935
|
+
ctx.arc(fxScreenX, fxScreenY, 12, 0, Math.PI * 2);
|
|
32936
|
+
ctx.fill();
|
|
32937
|
+
ctx.globalAlpha = prev;
|
|
32938
|
+
}
|
|
33109
32939
|
};
|
|
33110
32940
|
return interp.startLoop(drawFrame);
|
|
33111
32941
|
}, [interp.startLoop, loadImage]);
|
|
@@ -33519,13 +33349,13 @@ var init_MapView = __esm({
|
|
|
33519
33349
|
shadowSize: [41, 41]
|
|
33520
33350
|
});
|
|
33521
33351
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
33522
|
-
const { useEffect:
|
|
33352
|
+
const { useEffect: useEffect87, useRef: useRef82, useCallback: useCallback133, useState: useState123 } = React96__default;
|
|
33523
33353
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
33524
33354
|
const { useEventBus: useEventBus4 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
33525
33355
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
33526
33356
|
const map = useMap();
|
|
33527
33357
|
const prevRef = useRef82({ centerLat, centerLng, zoom });
|
|
33528
|
-
|
|
33358
|
+
useEffect87(() => {
|
|
33529
33359
|
const prev = prevRef.current;
|
|
33530
33360
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
33531
33361
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -33536,7 +33366,7 @@ var init_MapView = __esm({
|
|
|
33536
33366
|
}
|
|
33537
33367
|
function MapClickHandler({ onMapClick }) {
|
|
33538
33368
|
const map = useMap();
|
|
33539
|
-
|
|
33369
|
+
useEffect87(() => {
|
|
33540
33370
|
if (!onMapClick) return;
|
|
33541
33371
|
const handler = (e) => {
|
|
33542
33372
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -33564,7 +33394,7 @@ var init_MapView = __esm({
|
|
|
33564
33394
|
showAttribution = true
|
|
33565
33395
|
}) {
|
|
33566
33396
|
const eventBus = useEventBus4();
|
|
33567
|
-
const [clickedPosition, setClickedPosition] =
|
|
33397
|
+
const [clickedPosition, setClickedPosition] = useState123(null);
|
|
33568
33398
|
const handleMapClick = useCallback133((lat, lng) => {
|
|
33569
33399
|
if (showClickedPin) {
|
|
33570
33400
|
setClickedPosition({ lat, lng });
|
|
@@ -34434,8 +34264,8 @@ function TableView({
|
|
|
34434
34264
|
}) {
|
|
34435
34265
|
const eventBus = useEventBus();
|
|
34436
34266
|
const { t } = useTranslate();
|
|
34437
|
-
const [visibleCount, setVisibleCount] =
|
|
34438
|
-
const [localSelected, setLocalSelected] =
|
|
34267
|
+
const [visibleCount, setVisibleCount] = React96__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
34268
|
+
const [localSelected, setLocalSelected] = React96__default.useState(/* @__PURE__ */ new Set());
|
|
34439
34269
|
const colDefs = columns ?? fields ?? [];
|
|
34440
34270
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
34441
34271
|
const dnd = useDataDnd({
|
|
@@ -34630,12 +34460,12 @@ function TableView({
|
|
|
34630
34460
|
]
|
|
34631
34461
|
}
|
|
34632
34462
|
);
|
|
34633
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
34463
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React96__default.Fragment, { children: rowInner }, id);
|
|
34634
34464
|
};
|
|
34635
34465
|
const items = Array.from(data);
|
|
34636
34466
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
34637
34467
|
let runningIndex = 0;
|
|
34638
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
34468
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React96__default.Fragment, { children: [
|
|
34639
34469
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
34640
34470
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
34641
34471
|
] }, gi)) });
|
|
@@ -35992,7 +35822,7 @@ var init_StepFlow = __esm({
|
|
|
35992
35822
|
className
|
|
35993
35823
|
}) => {
|
|
35994
35824
|
if (orientation === "vertical") {
|
|
35995
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
35825
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React96__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
35996
35826
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
35997
35827
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
35998
35828
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -36003,7 +35833,7 @@ var init_StepFlow = __esm({
|
|
|
36003
35833
|
] })
|
|
36004
35834
|
] }) }, index)) });
|
|
36005
35835
|
}
|
|
36006
|
-
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(
|
|
35836
|
+
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(React96__default.Fragment, { children: [
|
|
36007
35837
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
36008
35838
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
36009
35839
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -36988,7 +36818,7 @@ var init_LikertScale = __esm({
|
|
|
36988
36818
|
md: "text-base",
|
|
36989
36819
|
lg: "text-lg"
|
|
36990
36820
|
};
|
|
36991
|
-
LikertScale =
|
|
36821
|
+
LikertScale = React96__default.forwardRef(
|
|
36992
36822
|
({
|
|
36993
36823
|
question,
|
|
36994
36824
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -37000,7 +36830,7 @@ var init_LikertScale = __esm({
|
|
|
37000
36830
|
variant = "radios",
|
|
37001
36831
|
className
|
|
37002
36832
|
}, ref) => {
|
|
37003
|
-
const groupId =
|
|
36833
|
+
const groupId = React96__default.useId();
|
|
37004
36834
|
const eventBus = useEventBus();
|
|
37005
36835
|
const handleSelect = useCallback(
|
|
37006
36836
|
(next) => {
|
|
@@ -39282,7 +39112,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
39282
39112
|
"aria-label": t("aria.breadcrumb"),
|
|
39283
39113
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
39284
39114
|
const isLast = idx === items.length - 1;
|
|
39285
|
-
return /* @__PURE__ */ jsxs(
|
|
39115
|
+
return /* @__PURE__ */ jsxs(React96__default.Fragment, { children: [
|
|
39286
39116
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
39287
39117
|
Icon,
|
|
39288
39118
|
{
|
|
@@ -39946,7 +39776,7 @@ var init_PageHeader = __esm({
|
|
|
39946
39776
|
info: "bg-info/10 text-info"
|
|
39947
39777
|
};
|
|
39948
39778
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
39949
|
-
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(
|
|
39779
|
+
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(React96__default.Fragment, { children: [
|
|
39950
39780
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
39951
39781
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
39952
39782
|
"a",
|
|
@@ -40304,7 +40134,7 @@ var init_Section = __esm({
|
|
|
40304
40134
|
as: Component2 = "section"
|
|
40305
40135
|
}) => {
|
|
40306
40136
|
const hasHeader = title || description || action;
|
|
40307
|
-
return
|
|
40137
|
+
return React96__default.createElement(
|
|
40308
40138
|
Component2,
|
|
40309
40139
|
{
|
|
40310
40140
|
className: cn(
|
|
@@ -40672,7 +40502,7 @@ var init_WizardContainer = __esm({
|
|
|
40672
40502
|
const isCompleted = index < currentStep;
|
|
40673
40503
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
40674
40504
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
40675
|
-
return /* @__PURE__ */ jsxs(
|
|
40505
|
+
return /* @__PURE__ */ jsxs(React96__default.Fragment, { children: [
|
|
40676
40506
|
/* @__PURE__ */ jsx(
|
|
40677
40507
|
Button,
|
|
40678
40508
|
{
|
|
@@ -43251,7 +43081,7 @@ var init_DetailPanel = __esm({
|
|
|
43251
43081
|
}
|
|
43252
43082
|
});
|
|
43253
43083
|
function extractTitle(children) {
|
|
43254
|
-
if (!
|
|
43084
|
+
if (!React96__default.isValidElement(children)) return void 0;
|
|
43255
43085
|
const props = children.props;
|
|
43256
43086
|
if (typeof props.title === "string") {
|
|
43257
43087
|
return props.title;
|
|
@@ -43306,7 +43136,7 @@ function LinearView({
|
|
|
43306
43136
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
43307
43137
|
const isDone = i < currentIdx;
|
|
43308
43138
|
const isCurrent = i === currentIdx;
|
|
43309
|
-
return /* @__PURE__ */ jsxs(
|
|
43139
|
+
return /* @__PURE__ */ jsxs(React96__default.Fragment, { children: [
|
|
43310
43140
|
i > 0 && /* @__PURE__ */ jsx(
|
|
43311
43141
|
Typography,
|
|
43312
43142
|
{
|
|
@@ -44292,12 +44122,12 @@ var init_Form = __esm({
|
|
|
44292
44122
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
44293
44123
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
44294
44124
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
44295
|
-
const normalizedInitialData =
|
|
44125
|
+
const normalizedInitialData = React96__default.useMemo(() => {
|
|
44296
44126
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
44297
44127
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
44298
44128
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
44299
44129
|
}, [entity, initialData]);
|
|
44300
|
-
const entityDerivedFields =
|
|
44130
|
+
const entityDerivedFields = React96__default.useMemo(() => {
|
|
44301
44131
|
if (fields && fields.length > 0) return void 0;
|
|
44302
44132
|
if (!resolvedEntity) return void 0;
|
|
44303
44133
|
return resolvedEntity.fields.map(
|
|
@@ -44318,16 +44148,16 @@ var init_Form = __esm({
|
|
|
44318
44148
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
44319
44149
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
44320
44150
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
44321
|
-
const [formData, setFormData] =
|
|
44151
|
+
const [formData, setFormData] = React96__default.useState(
|
|
44322
44152
|
normalizedInitialData
|
|
44323
44153
|
);
|
|
44324
|
-
const [collapsedSections, setCollapsedSections] =
|
|
44154
|
+
const [collapsedSections, setCollapsedSections] = React96__default.useState(
|
|
44325
44155
|
/* @__PURE__ */ new Set()
|
|
44326
44156
|
);
|
|
44327
|
-
const [submitError, setSubmitError] =
|
|
44328
|
-
const formRef =
|
|
44157
|
+
const [submitError, setSubmitError] = React96__default.useState(null);
|
|
44158
|
+
const formRef = React96__default.useRef(null);
|
|
44329
44159
|
const formMode = props.mode;
|
|
44330
|
-
const mountedRef =
|
|
44160
|
+
const mountedRef = React96__default.useRef(false);
|
|
44331
44161
|
if (!mountedRef.current) {
|
|
44332
44162
|
mountedRef.current = true;
|
|
44333
44163
|
debug("forms", "mount", {
|
|
@@ -44340,7 +44170,7 @@ var init_Form = __esm({
|
|
|
44340
44170
|
});
|
|
44341
44171
|
}
|
|
44342
44172
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
44343
|
-
const evalContext =
|
|
44173
|
+
const evalContext = React96__default.useMemo(
|
|
44344
44174
|
() => ({
|
|
44345
44175
|
formValues: formData,
|
|
44346
44176
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -44349,7 +44179,7 @@ var init_Form = __esm({
|
|
|
44349
44179
|
}),
|
|
44350
44180
|
[formData, externalContext]
|
|
44351
44181
|
);
|
|
44352
|
-
|
|
44182
|
+
React96__default.useEffect(() => {
|
|
44353
44183
|
debug("forms", "initialData-sync", {
|
|
44354
44184
|
mode: formMode,
|
|
44355
44185
|
normalizedInitialData,
|
|
@@ -44360,7 +44190,7 @@ var init_Form = __esm({
|
|
|
44360
44190
|
setFormData(normalizedInitialData);
|
|
44361
44191
|
}
|
|
44362
44192
|
}, [normalizedInitialData]);
|
|
44363
|
-
const processCalculations =
|
|
44193
|
+
const processCalculations = React96__default.useCallback(
|
|
44364
44194
|
(changedFieldId, newFormData) => {
|
|
44365
44195
|
if (!hiddenCalculations.length) return;
|
|
44366
44196
|
const context = {
|
|
@@ -44385,7 +44215,7 @@ var init_Form = __esm({
|
|
|
44385
44215
|
},
|
|
44386
44216
|
[hiddenCalculations, externalContext, eventBus]
|
|
44387
44217
|
);
|
|
44388
|
-
const checkViolations =
|
|
44218
|
+
const checkViolations = React96__default.useCallback(
|
|
44389
44219
|
(changedFieldId, newFormData) => {
|
|
44390
44220
|
if (!violationTriggers.length) return;
|
|
44391
44221
|
const context = {
|
|
@@ -44423,7 +44253,7 @@ var init_Form = __esm({
|
|
|
44423
44253
|
processCalculations(name, newFormData);
|
|
44424
44254
|
checkViolations(name, newFormData);
|
|
44425
44255
|
};
|
|
44426
|
-
const isFieldVisible =
|
|
44256
|
+
const isFieldVisible = React96__default.useCallback(
|
|
44427
44257
|
(fieldName) => {
|
|
44428
44258
|
const condition = conditionalFields[fieldName];
|
|
44429
44259
|
if (!condition) return true;
|
|
@@ -44431,7 +44261,7 @@ var init_Form = __esm({
|
|
|
44431
44261
|
},
|
|
44432
44262
|
[conditionalFields, evalContext]
|
|
44433
44263
|
);
|
|
44434
|
-
const isSectionVisible =
|
|
44264
|
+
const isSectionVisible = React96__default.useCallback(
|
|
44435
44265
|
(section) => {
|
|
44436
44266
|
if (!section.condition) return true;
|
|
44437
44267
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -44507,7 +44337,7 @@ var init_Form = __esm({
|
|
|
44507
44337
|
eventBus.emit(`UI:${onCancel}`);
|
|
44508
44338
|
}
|
|
44509
44339
|
};
|
|
44510
|
-
const renderField =
|
|
44340
|
+
const renderField = React96__default.useCallback(
|
|
44511
44341
|
(field) => {
|
|
44512
44342
|
const fieldName = field.name || field.field;
|
|
44513
44343
|
if (!fieldName) return null;
|
|
@@ -44528,7 +44358,7 @@ var init_Form = __esm({
|
|
|
44528
44358
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
44529
44359
|
);
|
|
44530
44360
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
44531
|
-
const normalizedFields =
|
|
44361
|
+
const normalizedFields = React96__default.useMemo(() => {
|
|
44532
44362
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
44533
44363
|
return effectiveFields.map((field) => {
|
|
44534
44364
|
if (typeof field === "string") {
|
|
@@ -44552,7 +44382,7 @@ var init_Form = __esm({
|
|
|
44552
44382
|
return field;
|
|
44553
44383
|
});
|
|
44554
44384
|
}, [effectiveFields, resolvedEntity]);
|
|
44555
|
-
const schemaFields =
|
|
44385
|
+
const schemaFields = React96__default.useMemo(() => {
|
|
44556
44386
|
if (normalizedFields.length === 0) return null;
|
|
44557
44387
|
if (isDebugEnabled()) {
|
|
44558
44388
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -44562,7 +44392,7 @@ var init_Form = __esm({
|
|
|
44562
44392
|
}
|
|
44563
44393
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
44564
44394
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
44565
|
-
const sectionElements =
|
|
44395
|
+
const sectionElements = React96__default.useMemo(() => {
|
|
44566
44396
|
if (!sections || sections.length === 0) return null;
|
|
44567
44397
|
return sections.map((section) => {
|
|
44568
44398
|
if (!isSectionVisible(section)) {
|
|
@@ -46083,7 +45913,6 @@ var init_GameCanvas3D2 = __esm({
|
|
|
46083
45913
|
className,
|
|
46084
45914
|
isLoading: externalLoading,
|
|
46085
45915
|
error: externalError,
|
|
46086
|
-
entity,
|
|
46087
45916
|
preloadAssets = [],
|
|
46088
45917
|
tileClickEvent,
|
|
46089
45918
|
unitClickEvent,
|
|
@@ -46819,7 +46648,7 @@ var init_GameBoard3D = __esm({
|
|
|
46819
46648
|
}
|
|
46820
46649
|
});
|
|
46821
46650
|
function asDescriptor(v) {
|
|
46822
|
-
if (Array.isArray(v) ||
|
|
46651
|
+
if (Array.isArray(v) || React96__default.isValidElement(v)) return null;
|
|
46823
46652
|
const o = v;
|
|
46824
46653
|
if (typeof o.type !== "string") return null;
|
|
46825
46654
|
const props = o.props !== void 0 && typeof o.props === "object" && !Array.isArray(o.props) && o.props !== null ? o.props : void 0;
|
|
@@ -46834,10 +46663,10 @@ function getSlotContentRenderer2() {
|
|
|
46834
46663
|
}
|
|
46835
46664
|
function resolveDescriptor(value, idPrefix) {
|
|
46836
46665
|
if (value === null || value === void 0) return value;
|
|
46837
|
-
if (
|
|
46666
|
+
if (React96__default.isValidElement(value)) return value;
|
|
46838
46667
|
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
|
|
46839
46668
|
if (Array.isArray(value)) {
|
|
46840
|
-
return value.map((item, i) => /* @__PURE__ */ jsx(
|
|
46669
|
+
return value.map((item, i) => /* @__PURE__ */ jsx(React96__default.Fragment, { children: resolveDescriptor(item, `${idPrefix}-${i}`) }, i));
|
|
46841
46670
|
}
|
|
46842
46671
|
if (typeof value === "object" && value !== null) {
|
|
46843
46672
|
const desc = asDescriptor(value);
|
|
@@ -46937,10 +46766,10 @@ function getSlotContentRenderer3() {
|
|
|
46937
46766
|
}
|
|
46938
46767
|
function resolveDescriptor2(value, idPrefix) {
|
|
46939
46768
|
if (value === null || value === void 0) return value;
|
|
46940
|
-
if (
|
|
46769
|
+
if (React96__default.isValidElement(value)) return value;
|
|
46941
46770
|
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value;
|
|
46942
46771
|
if (Array.isArray(value)) {
|
|
46943
|
-
return value.map((item, i) => /* @__PURE__ */ jsx(
|
|
46772
|
+
return value.map((item, i) => /* @__PURE__ */ jsx(React96__default.Fragment, { children: resolveDescriptor2(item, `${idPrefix}-${i}`) }, i));
|
|
46944
46773
|
}
|
|
46945
46774
|
if (typeof value === "object") {
|
|
46946
46775
|
const rec = value;
|
|
@@ -47653,7 +47482,7 @@ var init_List = __esm({
|
|
|
47653
47482
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
47654
47483
|
return [];
|
|
47655
47484
|
}, [entity]);
|
|
47656
|
-
const getItemActions =
|
|
47485
|
+
const getItemActions = React96__default.useCallback(
|
|
47657
47486
|
(item) => {
|
|
47658
47487
|
if (!itemActions) return [];
|
|
47659
47488
|
if (typeof itemActions === "function") {
|
|
@@ -48170,7 +47999,7 @@ var init_MediaGallery = __esm({
|
|
|
48170
47999
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
48171
48000
|
);
|
|
48172
48001
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
48173
|
-
const items =
|
|
48002
|
+
const items = React96__default.useMemo(() => {
|
|
48174
48003
|
if (propItems) return propItems;
|
|
48175
48004
|
if (entityData.length === 0) return [];
|
|
48176
48005
|
return entityData.map((record, idx) => {
|
|
@@ -48375,7 +48204,7 @@ var init_MinigolfBoard = __esm({
|
|
|
48375
48204
|
}
|
|
48376
48205
|
});
|
|
48377
48206
|
function extractTitle2(children) {
|
|
48378
|
-
if (!
|
|
48207
|
+
if (!React96__default.isValidElement(children)) return void 0;
|
|
48379
48208
|
const props = children.props;
|
|
48380
48209
|
if (typeof props.title === "string") {
|
|
48381
48210
|
return props.title;
|
|
@@ -49576,7 +49405,7 @@ var init_debugRegistry = __esm({
|
|
|
49576
49405
|
}
|
|
49577
49406
|
});
|
|
49578
49407
|
function useDebugData() {
|
|
49579
|
-
const [data, setData] =
|
|
49408
|
+
const [data, setData] = React96.useState(() => ({
|
|
49580
49409
|
traits: [],
|
|
49581
49410
|
ticks: [],
|
|
49582
49411
|
guards: [],
|
|
@@ -49590,7 +49419,7 @@ function useDebugData() {
|
|
|
49590
49419
|
},
|
|
49591
49420
|
lastUpdate: Date.now()
|
|
49592
49421
|
}));
|
|
49593
|
-
|
|
49422
|
+
React96.useEffect(() => {
|
|
49594
49423
|
const updateData = () => {
|
|
49595
49424
|
setData({
|
|
49596
49425
|
traits: getAllTraits(),
|
|
@@ -49699,12 +49528,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
49699
49528
|
return positions;
|
|
49700
49529
|
}
|
|
49701
49530
|
function WalkMinimap() {
|
|
49702
|
-
const [walkStep, setWalkStep] =
|
|
49703
|
-
const [traits2, setTraits] =
|
|
49704
|
-
const [coveredEdges, setCoveredEdges] =
|
|
49705
|
-
const [completedTraits, setCompletedTraits] =
|
|
49706
|
-
const prevTraitRef =
|
|
49707
|
-
|
|
49531
|
+
const [walkStep, setWalkStep] = React96.useState(null);
|
|
49532
|
+
const [traits2, setTraits] = React96.useState([]);
|
|
49533
|
+
const [coveredEdges, setCoveredEdges] = React96.useState([]);
|
|
49534
|
+
const [completedTraits, setCompletedTraits] = React96.useState(/* @__PURE__ */ new Set());
|
|
49535
|
+
const prevTraitRef = React96.useRef(null);
|
|
49536
|
+
React96.useEffect(() => {
|
|
49708
49537
|
const interval = setInterval(() => {
|
|
49709
49538
|
const w = window;
|
|
49710
49539
|
const step = w.__orbitalWalkStep;
|
|
@@ -50140,15 +49969,15 @@ var init_EntitiesTab = __esm({
|
|
|
50140
49969
|
});
|
|
50141
49970
|
function EventFlowTab({ events: events2 }) {
|
|
50142
49971
|
const { t } = useTranslate();
|
|
50143
|
-
const [filter, setFilter] =
|
|
50144
|
-
const containerRef =
|
|
50145
|
-
const [autoScroll, setAutoScroll] =
|
|
50146
|
-
|
|
49972
|
+
const [filter, setFilter] = React96.useState("all");
|
|
49973
|
+
const containerRef = React96.useRef(null);
|
|
49974
|
+
const [autoScroll, setAutoScroll] = React96.useState(true);
|
|
49975
|
+
React96.useEffect(() => {
|
|
50147
49976
|
if (autoScroll && containerRef.current) {
|
|
50148
49977
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
50149
49978
|
}
|
|
50150
49979
|
}, [events2.length, autoScroll]);
|
|
50151
|
-
const filteredEvents =
|
|
49980
|
+
const filteredEvents = React96.useMemo(() => {
|
|
50152
49981
|
if (filter === "all") return events2;
|
|
50153
49982
|
return events2.filter((e) => e.type === filter);
|
|
50154
49983
|
}, [events2, filter]);
|
|
@@ -50264,7 +50093,7 @@ var init_EventFlowTab = __esm({
|
|
|
50264
50093
|
});
|
|
50265
50094
|
function GuardsPanel({ guards }) {
|
|
50266
50095
|
const { t } = useTranslate();
|
|
50267
|
-
const [filter, setFilter] =
|
|
50096
|
+
const [filter, setFilter] = React96.useState("all");
|
|
50268
50097
|
if (guards.length === 0) {
|
|
50269
50098
|
return /* @__PURE__ */ jsx(
|
|
50270
50099
|
EmptyState,
|
|
@@ -50277,7 +50106,7 @@ function GuardsPanel({ guards }) {
|
|
|
50277
50106
|
}
|
|
50278
50107
|
const passedCount = guards.filter((g) => g.result).length;
|
|
50279
50108
|
const failedCount = guards.length - passedCount;
|
|
50280
|
-
const filteredGuards =
|
|
50109
|
+
const filteredGuards = React96.useMemo(() => {
|
|
50281
50110
|
if (filter === "all") return guards;
|
|
50282
50111
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
50283
50112
|
return guards.filter((g) => !g.result);
|
|
@@ -50440,10 +50269,10 @@ function EffectBadge({ effect }) {
|
|
|
50440
50269
|
}
|
|
50441
50270
|
function TransitionTimeline({ transitions }) {
|
|
50442
50271
|
const { t } = useTranslate();
|
|
50443
|
-
const containerRef =
|
|
50444
|
-
const [autoScroll, setAutoScroll] =
|
|
50445
|
-
const [expandedId, setExpandedId] =
|
|
50446
|
-
|
|
50272
|
+
const containerRef = React96.useRef(null);
|
|
50273
|
+
const [autoScroll, setAutoScroll] = React96.useState(true);
|
|
50274
|
+
const [expandedId, setExpandedId] = React96.useState(null);
|
|
50275
|
+
React96.useEffect(() => {
|
|
50447
50276
|
if (autoScroll && containerRef.current) {
|
|
50448
50277
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
50449
50278
|
}
|
|
@@ -50723,9 +50552,9 @@ function getAllEvents(traits2) {
|
|
|
50723
50552
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
50724
50553
|
const eventBus = useEventBus();
|
|
50725
50554
|
const { t } = useTranslate();
|
|
50726
|
-
const [log15, setLog] =
|
|
50727
|
-
const prevStatesRef =
|
|
50728
|
-
|
|
50555
|
+
const [log15, setLog] = React96.useState([]);
|
|
50556
|
+
const prevStatesRef = React96.useRef(/* @__PURE__ */ new Map());
|
|
50557
|
+
React96.useEffect(() => {
|
|
50729
50558
|
for (const trait of traits2) {
|
|
50730
50559
|
const prev = prevStatesRef.current.get(trait.id);
|
|
50731
50560
|
if (prev && prev !== trait.currentState) {
|
|
@@ -50894,10 +50723,10 @@ function VerifyModePanel({
|
|
|
50894
50723
|
localCount
|
|
50895
50724
|
}) {
|
|
50896
50725
|
const { t } = useTranslate();
|
|
50897
|
-
const [expanded, setExpanded] =
|
|
50898
|
-
const scrollRef =
|
|
50899
|
-
const prevCountRef =
|
|
50900
|
-
|
|
50726
|
+
const [expanded, setExpanded] = React96.useState(true);
|
|
50727
|
+
const scrollRef = React96.useRef(null);
|
|
50728
|
+
const prevCountRef = React96.useRef(0);
|
|
50729
|
+
React96.useEffect(() => {
|
|
50901
50730
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
50902
50731
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
50903
50732
|
}
|
|
@@ -50954,10 +50783,10 @@ function RuntimeDebugger({
|
|
|
50954
50783
|
schema
|
|
50955
50784
|
}) {
|
|
50956
50785
|
const { t } = useTranslate();
|
|
50957
|
-
const [isCollapsed, setIsCollapsed] =
|
|
50958
|
-
const [isVisible, setIsVisible] =
|
|
50786
|
+
const [isCollapsed, setIsCollapsed] = React96.useState(mode === "verify" ? true : defaultCollapsed);
|
|
50787
|
+
const [isVisible, setIsVisible] = React96.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
50959
50788
|
const debugData = useDebugData();
|
|
50960
|
-
|
|
50789
|
+
React96.useEffect(() => {
|
|
50961
50790
|
if (mode === "inline") return;
|
|
50962
50791
|
return onDebugToggle((enabled) => {
|
|
50963
50792
|
setIsVisible(enabled);
|
|
@@ -50966,7 +50795,7 @@ function RuntimeDebugger({
|
|
|
50966
50795
|
}
|
|
50967
50796
|
});
|
|
50968
50797
|
}, [mode]);
|
|
50969
|
-
|
|
50798
|
+
React96.useEffect(() => {
|
|
50970
50799
|
if (mode === "inline") return;
|
|
50971
50800
|
const handleKeyDown = (e) => {
|
|
50972
50801
|
if (e.key === "`" && isVisible) {
|
|
@@ -51526,7 +51355,7 @@ function SequenceBar({
|
|
|
51526
51355
|
onSlotRemove(index);
|
|
51527
51356
|
}, [onSlotRemove, playing]);
|
|
51528
51357
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
51529
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
51358
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React96__default.Fragment, { children: [
|
|
51530
51359
|
i > 0 && /* @__PURE__ */ jsx(
|
|
51531
51360
|
Typography,
|
|
51532
51361
|
{
|
|
@@ -52615,7 +52444,7 @@ var init_StatCard = __esm({
|
|
|
52615
52444
|
const labelToUse = propLabel ?? propTitle;
|
|
52616
52445
|
const eventBus = useEventBus();
|
|
52617
52446
|
const { t } = useTranslate();
|
|
52618
|
-
const handleActionClick =
|
|
52447
|
+
const handleActionClick = React96__default.useCallback(() => {
|
|
52619
52448
|
if (action?.event) {
|
|
52620
52449
|
eventBus.emit(`UI:${action.event}`, {});
|
|
52621
52450
|
}
|
|
@@ -52626,7 +52455,7 @@ var init_StatCard = __esm({
|
|
|
52626
52455
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
52627
52456
|
const isLoading = externalLoading ?? false;
|
|
52628
52457
|
const error = externalError;
|
|
52629
|
-
const computeMetricValue =
|
|
52458
|
+
const computeMetricValue = React96__default.useCallback(
|
|
52630
52459
|
(metric, items) => {
|
|
52631
52460
|
if (metric.value !== void 0) {
|
|
52632
52461
|
return metric.value;
|
|
@@ -52665,7 +52494,7 @@ var init_StatCard = __esm({
|
|
|
52665
52494
|
},
|
|
52666
52495
|
[]
|
|
52667
52496
|
);
|
|
52668
|
-
const schemaStats =
|
|
52497
|
+
const schemaStats = React96__default.useMemo(() => {
|
|
52669
52498
|
if (!metrics || metrics.length === 0) return null;
|
|
52670
52499
|
return metrics.map((metric) => ({
|
|
52671
52500
|
label: metric.label,
|
|
@@ -52673,7 +52502,7 @@ var init_StatCard = __esm({
|
|
|
52673
52502
|
format: metric.format
|
|
52674
52503
|
}));
|
|
52675
52504
|
}, [metrics, data, computeMetricValue]);
|
|
52676
|
-
const calculatedTrend =
|
|
52505
|
+
const calculatedTrend = React96__default.useMemo(() => {
|
|
52677
52506
|
if (manualTrend !== void 0) return manualTrend;
|
|
52678
52507
|
if (previousValue === void 0 || currentValue === void 0)
|
|
52679
52508
|
return void 0;
|
|
@@ -53879,8 +53708,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
53879
53708
|
] });
|
|
53880
53709
|
};
|
|
53881
53710
|
InlineActivityStream = ({ activities, autoScroll = true, className }) => {
|
|
53882
|
-
const endRef =
|
|
53883
|
-
|
|
53711
|
+
const endRef = React96__default.useRef(null);
|
|
53712
|
+
React96__default.useEffect(() => {
|
|
53884
53713
|
if (!autoScroll) return;
|
|
53885
53714
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
53886
53715
|
}, [activities.length, autoScroll]);
|
|
@@ -53974,7 +53803,7 @@ var init_SubagentTracePanel = __esm({
|
|
|
53974
53803
|
};
|
|
53975
53804
|
SubagentRichCard = ({ subagent }) => {
|
|
53976
53805
|
const { t } = useTranslate();
|
|
53977
|
-
const activities =
|
|
53806
|
+
const activities = React96__default.useMemo(
|
|
53978
53807
|
() => subagentMessagesToActivities(subagent.messages),
|
|
53979
53808
|
[subagent.messages]
|
|
53980
53809
|
);
|
|
@@ -54051,8 +53880,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
54051
53880
|
] });
|
|
54052
53881
|
};
|
|
54053
53882
|
CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
|
|
54054
|
-
const endRef =
|
|
54055
|
-
|
|
53883
|
+
const endRef = React96__default.useRef(null);
|
|
53884
|
+
React96__default.useEffect(() => {
|
|
54056
53885
|
if (!autoScroll) return;
|
|
54057
53886
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
54058
53887
|
}, [messages.length, autoScroll]);
|
|
@@ -54524,7 +54353,7 @@ var init_Timeline = __esm({
|
|
|
54524
54353
|
}) => {
|
|
54525
54354
|
const { t } = useTranslate();
|
|
54526
54355
|
const entityData = entity ?? [];
|
|
54527
|
-
const items =
|
|
54356
|
+
const items = React96__default.useMemo(() => {
|
|
54528
54357
|
if (propItems) return propItems;
|
|
54529
54358
|
if (entityData.length === 0) return [];
|
|
54530
54359
|
return entityData.map((record, idx) => {
|
|
@@ -54626,7 +54455,7 @@ var init_Timeline = __esm({
|
|
|
54626
54455
|
}
|
|
54627
54456
|
});
|
|
54628
54457
|
function extractToastProps(children) {
|
|
54629
|
-
if (!
|
|
54458
|
+
if (!React96__default.isValidElement(children)) {
|
|
54630
54459
|
if (typeof children === "string") {
|
|
54631
54460
|
return { message: children };
|
|
54632
54461
|
}
|
|
@@ -54664,7 +54493,7 @@ var init_ToastSlot = __esm({
|
|
|
54664
54493
|
eventBus.emit("UI:CLOSE");
|
|
54665
54494
|
};
|
|
54666
54495
|
if (!isVisible) return null;
|
|
54667
|
-
const isCustomContent =
|
|
54496
|
+
const isCustomContent = React96__default.isValidElement(children) && !message;
|
|
54668
54497
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
54669
54498
|
Toast,
|
|
54670
54499
|
{
|
|
@@ -56281,7 +56110,7 @@ var init_WorldMapTemplate = __esm({
|
|
|
56281
56110
|
}
|
|
56282
56111
|
});
|
|
56283
56112
|
function lazyThree(name, loader) {
|
|
56284
|
-
const Lazy =
|
|
56113
|
+
const Lazy = React96__default.lazy(
|
|
56285
56114
|
() => loader().then((m) => {
|
|
56286
56115
|
const Resolved = m[name];
|
|
56287
56116
|
if (!Resolved) {
|
|
@@ -56293,13 +56122,13 @@ function lazyThree(name, loader) {
|
|
|
56293
56122
|
})
|
|
56294
56123
|
);
|
|
56295
56124
|
function ThreeWrapper(props) {
|
|
56296
|
-
return
|
|
56125
|
+
return React96__default.createElement(
|
|
56297
56126
|
ThreeBoundary,
|
|
56298
56127
|
{ name },
|
|
56299
|
-
|
|
56300
|
-
|
|
56128
|
+
React96__default.createElement(
|
|
56129
|
+
React96__default.Suspense,
|
|
56301
56130
|
{ fallback: null },
|
|
56302
|
-
|
|
56131
|
+
React96__default.createElement(Lazy, props)
|
|
56303
56132
|
)
|
|
56304
56133
|
);
|
|
56305
56134
|
}
|
|
@@ -56622,7 +56451,7 @@ var init_component_registry_generated = __esm({
|
|
|
56622
56451
|
init_WorldMapBoard();
|
|
56623
56452
|
init_WorldMapTemplate();
|
|
56624
56453
|
init_XPBar();
|
|
56625
|
-
ThreeBoundary = class extends
|
|
56454
|
+
ThreeBoundary = class extends React96__default.Component {
|
|
56626
56455
|
constructor() {
|
|
56627
56456
|
super(...arguments);
|
|
56628
56457
|
__publicField(this, "state", { failed: false });
|
|
@@ -56632,7 +56461,7 @@ var init_component_registry_generated = __esm({
|
|
|
56632
56461
|
}
|
|
56633
56462
|
render() {
|
|
56634
56463
|
if (this.state.failed) {
|
|
56635
|
-
return
|
|
56464
|
+
return React96__default.createElement(
|
|
56636
56465
|
"div",
|
|
56637
56466
|
{
|
|
56638
56467
|
"data-testid": "three-unavailable",
|
|
@@ -56998,7 +56827,7 @@ function SuspenseConfigProvider({
|
|
|
56998
56827
|
config,
|
|
56999
56828
|
children
|
|
57000
56829
|
}) {
|
|
57001
|
-
return
|
|
56830
|
+
return React96__default.createElement(
|
|
57002
56831
|
SuspenseConfigContext.Provider,
|
|
57003
56832
|
{ value: config },
|
|
57004
56833
|
children
|
|
@@ -57040,7 +56869,7 @@ function enrichFormFields(fields, entityDef) {
|
|
|
57040
56869
|
}
|
|
57041
56870
|
return { name: field, label: field.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (c) => c.toUpperCase()) };
|
|
57042
56871
|
}
|
|
57043
|
-
if (field && typeof field === "object" && !Array.isArray(field) && !
|
|
56872
|
+
if (field && typeof field === "object" && !Array.isArray(field) && !React96__default.isValidElement(field) && !(field instanceof Date)) {
|
|
57044
56873
|
const obj = field;
|
|
57045
56874
|
const fieldName = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
|
|
57046
56875
|
if (!fieldName) return field;
|
|
@@ -57486,7 +57315,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
57486
57315
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
57487
57316
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
57488
57317
|
}
|
|
57489
|
-
return /* @__PURE__ */ jsx(
|
|
57318
|
+
return /* @__PURE__ */ jsx(React96__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
57490
57319
|
}
|
|
57491
57320
|
if (!child || typeof child !== "object") return null;
|
|
57492
57321
|
const childId = `${parentId}-${index}`;
|
|
@@ -57526,14 +57355,14 @@ function isPatternConfig(value) {
|
|
|
57526
57355
|
if (value === null || value === void 0) return false;
|
|
57527
57356
|
if (typeof value !== "object") return false;
|
|
57528
57357
|
if (Array.isArray(value)) return false;
|
|
57529
|
-
if (
|
|
57358
|
+
if (React96__default.isValidElement(value)) return false;
|
|
57530
57359
|
if (value instanceof Date) return false;
|
|
57531
57360
|
if (typeof value === "function") return false;
|
|
57532
57361
|
const record = value;
|
|
57533
57362
|
return "type" in record && typeof record.type === "string" && getComponentForPattern(record.type) !== null;
|
|
57534
57363
|
}
|
|
57535
57364
|
function isPlainConfigObject(value) {
|
|
57536
|
-
if (
|
|
57365
|
+
if (React96__default.isValidElement(value)) return false;
|
|
57537
57366
|
if (value instanceof Date) return false;
|
|
57538
57367
|
const proto = Object.getPrototypeOf(value);
|
|
57539
57368
|
return proto === Object.prototype || proto === null;
|
|
@@ -57659,7 +57488,7 @@ function SlotContentRenderer({
|
|
|
57659
57488
|
for (const slotKey of CONTENT_NODE_SLOTS) {
|
|
57660
57489
|
const slotVal = restProps[slotKey];
|
|
57661
57490
|
if (slotVal === void 0 || slotVal === null) continue;
|
|
57662
|
-
if (
|
|
57491
|
+
if (React96__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
|
|
57663
57492
|
if (Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
|
|
57664
57493
|
nodeSlotOverrides[slotKey] = renderPatternChildren(
|
|
57665
57494
|
slotVal,
|
|
@@ -57708,7 +57537,7 @@ function SlotContentRenderer({
|
|
|
57708
57537
|
const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
|
|
57709
57538
|
if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
|
|
57710
57539
|
const sample = resolvedItems[0];
|
|
57711
|
-
if (sample && typeof sample === "object" && !Array.isArray(sample) && !
|
|
57540
|
+
if (sample && typeof sample === "object" && !Array.isArray(sample) && !React96__default.isValidElement(sample) && !(sample instanceof Date)) {
|
|
57712
57541
|
const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
|
|
57713
57542
|
finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
|
|
57714
57543
|
}
|
|
@@ -58071,7 +57900,7 @@ var AvlTransition = ({
|
|
|
58071
57900
|
opacity = 1,
|
|
58072
57901
|
className
|
|
58073
57902
|
}) => {
|
|
58074
|
-
const ids =
|
|
57903
|
+
const ids = React96__default.useMemo(() => {
|
|
58075
57904
|
avlTransitionId += 1;
|
|
58076
57905
|
return { arrow: `avl-tr-${avlTransitionId}-arrow` };
|
|
58077
57906
|
}, []);
|
|
@@ -58632,7 +58461,7 @@ var AvlStateMachine = ({
|
|
|
58632
58461
|
color = "var(--color-primary)",
|
|
58633
58462
|
animated = false
|
|
58634
58463
|
}) => {
|
|
58635
|
-
const ids =
|
|
58464
|
+
const ids = React96__default.useMemo(() => {
|
|
58636
58465
|
avlSmId += 1;
|
|
58637
58466
|
const base = `avl-sm-${avlSmId}`;
|
|
58638
58467
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -58831,7 +58660,7 @@ var AvlOrbitalUnit = ({
|
|
|
58831
58660
|
color = "var(--color-primary)",
|
|
58832
58661
|
animated = false
|
|
58833
58662
|
}) => {
|
|
58834
|
-
const ids =
|
|
58663
|
+
const ids = React96__default.useMemo(() => {
|
|
58835
58664
|
avlOuId += 1;
|
|
58836
58665
|
const base = `avl-ou-${avlOuId}`;
|
|
58837
58666
|
return { glow: `${base}-glow`, grad: `${base}-grad` };
|
|
@@ -58927,7 +58756,7 @@ var AvlClosedCircuit = ({
|
|
|
58927
58756
|
color = "var(--color-primary)",
|
|
58928
58757
|
animated = false
|
|
58929
58758
|
}) => {
|
|
58930
|
-
const ids =
|
|
58759
|
+
const ids = React96__default.useMemo(() => {
|
|
58931
58760
|
avlCcId += 1;
|
|
58932
58761
|
const base = `avl-cc-${avlCcId}`;
|
|
58933
58762
|
return { glow: `${base}-glow`, grad: `${base}-grad`, arrow: `${base}-arrow` };
|
|
@@ -59082,7 +58911,7 @@ var AvlEmitListen = ({
|
|
|
59082
58911
|
color = "var(--color-primary)",
|
|
59083
58912
|
animated = false
|
|
59084
58913
|
}) => {
|
|
59085
|
-
const ids =
|
|
58914
|
+
const ids = React96__default.useMemo(() => {
|
|
59086
58915
|
avlElId += 1;
|
|
59087
58916
|
const base = `avl-el-${avlElId}`;
|
|
59088
58917
|
return { arrow: `${base}-arrow`, grad: `${base}-grad` };
|
|
@@ -59356,7 +59185,7 @@ function renderNode(node, color, glowId) {
|
|
|
59356
59185
|
const baseR = node.type === "operator" ? 20 : 16;
|
|
59357
59186
|
const r2 = Math.max(baseR, labelLen * 3.5 + 6);
|
|
59358
59187
|
const nc = nodeColor(node.type, color);
|
|
59359
|
-
return /* @__PURE__ */ jsxs(
|
|
59188
|
+
return /* @__PURE__ */ jsxs(React96__default.Fragment, { children: [
|
|
59360
59189
|
node.children.map((child, i) => {
|
|
59361
59190
|
const childR = Math.max(
|
|
59362
59191
|
child.type === "operator" ? 20 : 16,
|
|
@@ -59413,7 +59242,7 @@ var AvlExprTree = ({
|
|
|
59413
59242
|
className,
|
|
59414
59243
|
color = "var(--color-primary)"
|
|
59415
59244
|
}) => {
|
|
59416
|
-
const ids =
|
|
59245
|
+
const ids = React96__default.useMemo(() => {
|
|
59417
59246
|
avlEtId += 1;
|
|
59418
59247
|
return { glow: `avl-et-${avlEtId}-glow` };
|
|
59419
59248
|
}, []);
|
|
@@ -60248,7 +60077,7 @@ var SystemNode = ({ data }) => {
|
|
|
60248
60077
|
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) => {
|
|
60249
60078
|
const tc = transitionCounts[s.name] ?? 0;
|
|
60250
60079
|
const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
60251
|
-
return /* @__PURE__ */ jsxs(
|
|
60080
|
+
return /* @__PURE__ */ jsxs(React96__default.Fragment, { children: [
|
|
60252
60081
|
/* @__PURE__ */ jsx(AvlState, { x: i * 14 + 1, y: 1, width: 10, height: 8, name: "", role, isInitial: s.isInitial ?? void 0, isTerminal: s.isTerminal ?? void 0 }),
|
|
60253
60082
|
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 })
|
|
60254
60083
|
] }, s.name);
|
|
@@ -61398,7 +61227,7 @@ function resolveLambdaBindings(body, params, item, index) {
|
|
|
61398
61227
|
if (Array.isArray(body)) {
|
|
61399
61228
|
return body.map((b) => recur(b));
|
|
61400
61229
|
}
|
|
61401
|
-
if (body !== null && typeof body === "object" && !
|
|
61230
|
+
if (body !== null && typeof body === "object" && !React96__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
|
|
61402
61231
|
const out = {};
|
|
61403
61232
|
for (const [k, v] of Object.entries(body)) {
|
|
61404
61233
|
out[k] = recur(v);
|
|
@@ -61417,7 +61246,7 @@ function getSlotContentRenderer4() {
|
|
|
61417
61246
|
function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
61418
61247
|
return (item, index) => {
|
|
61419
61248
|
const resolvedBody = resolveLambdaBindings(lambdaBody, params, item, index);
|
|
61420
|
-
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" ||
|
|
61249
|
+
if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React96__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
|
|
61421
61250
|
return null;
|
|
61422
61251
|
}
|
|
61423
61252
|
const record = resolvedBody;
|
|
@@ -61436,7 +61265,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
|
|
|
61436
61265
|
props: childProps,
|
|
61437
61266
|
priority: 0
|
|
61438
61267
|
};
|
|
61439
|
-
return
|
|
61268
|
+
return React96__default.createElement(SlotContentRenderer2, { content: childContent });
|
|
61440
61269
|
};
|
|
61441
61270
|
}
|
|
61442
61271
|
function convertNode(node, callerKey) {
|
|
@@ -61455,7 +61284,7 @@ function convertNode(node, callerKey) {
|
|
|
61455
61284
|
});
|
|
61456
61285
|
return anyChanged ? mapped : node;
|
|
61457
61286
|
}
|
|
61458
|
-
if (typeof node === "object" && !
|
|
61287
|
+
if (typeof node === "object" && !React96__default.isValidElement(node) && !(node instanceof Date)) {
|
|
61459
61288
|
return convertObjectProps(node);
|
|
61460
61289
|
}
|
|
61461
61290
|
return node;
|
|
@@ -63687,8 +63516,8 @@ function CanvasDndProvider({
|
|
|
63687
63516
|
}) {
|
|
63688
63517
|
const eventBus = useEventBus();
|
|
63689
63518
|
const sensors = useAlmadarDndSensors(false);
|
|
63690
|
-
const [activePayload, setActivePayload] =
|
|
63691
|
-
const handleDragStart =
|
|
63519
|
+
const [activePayload, setActivePayload] = React96__default.useState(null);
|
|
63520
|
+
const handleDragStart = React96__default.useCallback((e) => {
|
|
63692
63521
|
const data = e.active.data.current;
|
|
63693
63522
|
const payload = data?.payload;
|
|
63694
63523
|
if (payload) {
|
|
@@ -63699,7 +63528,7 @@ function CanvasDndProvider({
|
|
|
63699
63528
|
log13.warn("dragStart:missing-payload", { id: e.active.id });
|
|
63700
63529
|
}
|
|
63701
63530
|
}, [eventBus]);
|
|
63702
|
-
const handleDragEnd =
|
|
63531
|
+
const handleDragEnd = React96__default.useCallback((e) => {
|
|
63703
63532
|
setActivePayload(null);
|
|
63704
63533
|
const activeData = e.active.data.current;
|
|
63705
63534
|
const payload = activeData?.payload;
|
|
@@ -63728,7 +63557,7 @@ function CanvasDndProvider({
|
|
|
63728
63557
|
const suppressed = onDrop ? onDrop(drop) === true : false;
|
|
63729
63558
|
if (!suppressed) defaultEmit(eventBus, drop);
|
|
63730
63559
|
}, [eventBus, onDrop]);
|
|
63731
|
-
const handleDragCancel =
|
|
63560
|
+
const handleDragCancel = React96__default.useCallback(() => {
|
|
63732
63561
|
setActivePayload(null);
|
|
63733
63562
|
log13.info("dragCancel");
|
|
63734
63563
|
}, []);
|
|
@@ -64486,7 +64315,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
64486
64315
|
}
|
|
64487
64316
|
);
|
|
64488
64317
|
};
|
|
64489
|
-
var OrbPreviewNode =
|
|
64318
|
+
var OrbPreviewNode = React96__default.memo(OrbPreviewNodeInner);
|
|
64490
64319
|
OrbPreviewNode.displayName = "OrbPreviewNode";
|
|
64491
64320
|
orbPreviewLog.debug("export-resolved", () => ({
|
|
64492
64321
|
type: typeof OrbPreviewNode,
|
|
@@ -64591,7 +64420,7 @@ var EventFlowEdgeInner = (props) => {
|
|
|
64591
64420
|
) })
|
|
64592
64421
|
] });
|
|
64593
64422
|
};
|
|
64594
|
-
var EventFlowEdge =
|
|
64423
|
+
var EventFlowEdge = React96__default.memo(EventFlowEdgeInner);
|
|
64595
64424
|
EventFlowEdge.displayName = "EventFlowEdge";
|
|
64596
64425
|
|
|
64597
64426
|
// components/avl/molecules/BehaviorComposeNode.tsx
|
|
@@ -64738,7 +64567,7 @@ var BehaviorComposeNodeInner = (props) => {
|
|
|
64738
64567
|
}
|
|
64739
64568
|
);
|
|
64740
64569
|
};
|
|
64741
|
-
var BehaviorComposeNode =
|
|
64570
|
+
var BehaviorComposeNode = React96__default.memo(BehaviorComposeNodeInner);
|
|
64742
64571
|
BehaviorComposeNode.displayName = "BehaviorComposeNode";
|
|
64743
64572
|
|
|
64744
64573
|
// components/avl/molecules/avl-behavior-compose-converter.ts
|
|
@@ -65764,7 +65593,7 @@ var TraitCardNodeInner = (props) => {
|
|
|
65764
65593
|
}
|
|
65765
65594
|
);
|
|
65766
65595
|
};
|
|
65767
|
-
var TraitCardNode =
|
|
65596
|
+
var TraitCardNode = React96__default.memo(TraitCardNodeInner);
|
|
65768
65597
|
TraitCardNode.displayName = "TraitCardNode";
|
|
65769
65598
|
|
|
65770
65599
|
// components/avl/organisms/FlowCanvas.tsx
|
|
@@ -65837,7 +65666,7 @@ function FlowCanvasInner({
|
|
|
65837
65666
|
initialOrbital
|
|
65838
65667
|
);
|
|
65839
65668
|
const [expandedBehaviorAlias, setExpandedBehaviorAlias] = useState(void 0);
|
|
65840
|
-
const screenSizeUserOverrideRef =
|
|
65669
|
+
const screenSizeUserOverrideRef = React96__default.useRef(false);
|
|
65841
65670
|
const [screenSize, setScreenSize] = useState(
|
|
65842
65671
|
() => typeof window === "undefined" ? "laptop" : detectScreenSize(window.innerWidth)
|
|
65843
65672
|
);
|
|
@@ -66221,7 +66050,7 @@ var ZoomBreadcrumb = ({
|
|
|
66221
66050
|
if (eventName && band === "detail") {
|
|
66222
66051
|
segments.push({ icon: "\u26A1", label: eventName });
|
|
66223
66052
|
}
|
|
66224
|
-
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(
|
|
66053
|
+
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(React96__default.Fragment, { children: [
|
|
66225
66054
|
i > 0 && /* @__PURE__ */ jsx("span", { className: "opacity-40", children: ">" }),
|
|
66226
66055
|
/* @__PURE__ */ jsx("span", { className: "opacity-60", children: seg.icon }),
|
|
66227
66056
|
/* @__PURE__ */ jsx("span", { children: seg.label })
|
|
@@ -66562,7 +66391,7 @@ var EventWireOverlay = ({
|
|
|
66562
66391
|
containerW,
|
|
66563
66392
|
containerH
|
|
66564
66393
|
}) => {
|
|
66565
|
-
const ids =
|
|
66394
|
+
const ids = React96__default.useMemo(() => {
|
|
66566
66395
|
avlOczWireId += 1;
|
|
66567
66396
|
return { arrow: `avl-ocz-wire-${avlOczWireId}-arrow` };
|
|
66568
66397
|
}, []);
|
|
@@ -66929,7 +66758,7 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
66929
66758
|
borderRadius: 6,
|
|
66930
66759
|
border: `1px solid ${color}`
|
|
66931
66760
|
},
|
|
66932
|
-
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(
|
|
66761
|
+
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React96__default.Fragment, { children: [
|
|
66933
66762
|
i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", style: { opacity: 0.5, color }, children: "/" }),
|
|
66934
66763
|
i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
|
|
66935
66764
|
Box,
|