@almadar/ui 5.28.5 → 5.30.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 +178 -113
- package/dist/avl/index.js +178 -113
- package/dist/components/core/molecules/DocumentViewer.d.ts +0 -2
- package/dist/components/core/molecules/Header.d.ts +0 -4
- package/dist/components/core/molecules/Navigation.d.ts +0 -2
- package/dist/components/core/molecules/PageHeader.d.ts +0 -2
- package/dist/components/core/molecules/PropertyInspector.d.ts +8 -1
- package/dist/components/core/organisms/index.d.ts +1 -1
- package/dist/components/core/templates/index.d.ts +3 -0
- package/dist/components/game/{organisms → molecules}/GameCanvas3D.d.ts +1 -3
- package/dist/components/game/molecules/index.d.ts +1 -0
- package/dist/components/game/{organisms → molecules}/three/hooks/useGameCanvas3DEvents.d.ts +1 -1
- package/dist/components/game/{organisms → molecules}/three/index.cjs +29 -4
- package/dist/components/game/{organisms → molecules}/three/index.css +3 -3
- package/dist/components/game/{organisms → molecules}/three/index.js +29 -4
- package/dist/components/game/{organisms → molecules}/three/renderers/FeatureRenderer.d.ts +1 -1
- package/dist/components/game/{organisms → molecules}/three/renderers/FeatureRenderer3D.d.ts +1 -1
- package/dist/components/game/{organisms → molecules}/three/renderers/TileRenderer.d.ts +1 -1
- package/dist/components/game/{organisms → molecules}/three/renderers/UnitRenderer.d.ts +1 -1
- package/dist/components/game/organisms/TraitSlot.d.ts +3 -1
- package/dist/components/game/organisms/index.d.ts +0 -9
- package/dist/components/game/organisms/types/isometric.d.ts +2 -0
- package/dist/components/index.cjs +786 -692
- package/dist/components/index.js +788 -694
- package/dist/providers/index.cjs +178 -113
- package/dist/providers/index.js +178 -113
- package/dist/renderer/pattern-resolver.d.ts +2 -5
- package/dist/runtime/index.cjs +178 -113
- package/dist/runtime/index.js +178 -113
- package/package.json +9 -4
- package/dist/components/game/organisms/CombatLog.d.ts +0 -2
- package/dist/components/game/organisms/DialogueBox.d.ts +0 -2
- package/dist/components/game/organisms/GameHud.d.ts +0 -2
- package/dist/components/game/organisms/GameMenu.d.ts +0 -2
- package/dist/components/game/organisms/GameOverScreen.d.ts +0 -2
- package/dist/components/game/organisms/InventoryPanel.d.ts +0 -2
- package/dist/components/game/organisms/IsometricCanvas.d.ts +0 -3
- package/dist/components/game/organisms/PlatformerCanvas.d.ts +0 -2
- /package/dist/components/game/{organisms → molecules}/three/Camera3D.d.ts +0 -0
- /package/dist/components/game/{organisms → molecules}/three/Lighting3D.d.ts +0 -0
- /package/dist/components/game/{organisms → molecules}/three/Scene3D.d.ts +0 -0
- /package/dist/components/game/{organisms → molecules}/three/components/Canvas3DErrorBoundary.d.ts +0 -0
- /package/dist/components/game/{organisms → molecules}/three/components/Canvas3DLoadingState.d.ts +0 -0
- /package/dist/components/game/{organisms → molecules}/three/components/ModelLoader.d.ts +0 -0
- /package/dist/components/game/{organisms → molecules}/three/components/PhysicsObject3D.d.ts +0 -0
- /package/dist/components/game/{organisms → molecules}/three/components/index.d.ts +0 -0
- /package/dist/components/game/{organisms → molecules}/three/hooks/useAssetLoader.d.ts +0 -0
- /package/dist/components/game/{organisms → molecules}/three/hooks/useRaycaster.d.ts +0 -0
- /package/dist/components/game/{organisms → molecules}/three/hooks/useSceneGraph.d.ts +0 -0
- /package/dist/components/game/{organisms → molecules}/three/hooks/useThree.d.ts +0 -0
- /package/dist/components/game/{organisms → molecules}/three/index.d.ts +0 -0
- /package/dist/components/game/{organisms → molecules}/three/loaders/AssetLoader.d.ts +0 -0
- /package/dist/components/game/{organisms → molecules}/three/renderers/index.d.ts +0 -0
- /package/dist/components/game/{organisms → molecules}/three/utils/culling.d.ts +0 -0
- /package/dist/components/game/{organisms → molecules}/three/utils/grid3D.d.ts +0 -0
package/dist/avl/index.cjs
CHANGED
|
@@ -14799,13 +14799,6 @@ var init_IsometricCanvas = __esm({
|
|
|
14799
14799
|
}
|
|
14800
14800
|
});
|
|
14801
14801
|
|
|
14802
|
-
// components/game/organisms/IsometricCanvas.tsx
|
|
14803
|
-
var init_IsometricCanvas2 = __esm({
|
|
14804
|
-
"components/game/organisms/IsometricCanvas.tsx"() {
|
|
14805
|
-
init_IsometricCanvas();
|
|
14806
|
-
}
|
|
14807
|
-
});
|
|
14808
|
-
|
|
14809
14802
|
// components/game/organisms/boardEntity.ts
|
|
14810
14803
|
function boardEntity(entity) {
|
|
14811
14804
|
if (!entity) return void 0;
|
|
@@ -15201,7 +15194,7 @@ var init_BattleBoard = __esm({
|
|
|
15201
15194
|
init_Button();
|
|
15202
15195
|
init_Typography();
|
|
15203
15196
|
init_Stack();
|
|
15204
|
-
|
|
15197
|
+
init_IsometricCanvas();
|
|
15205
15198
|
init_boardEntity();
|
|
15206
15199
|
init_isometric();
|
|
15207
15200
|
BattleBoard.displayName = "BattleBoard";
|
|
@@ -22287,7 +22280,7 @@ var init_CastleBoard = __esm({
|
|
|
22287
22280
|
"use client";
|
|
22288
22281
|
init_cn();
|
|
22289
22282
|
init_useEventBus();
|
|
22290
|
-
|
|
22283
|
+
init_IsometricCanvas();
|
|
22291
22284
|
init_boardEntity();
|
|
22292
22285
|
init_isometric();
|
|
22293
22286
|
CastleBoard.displayName = "CastleBoard";
|
|
@@ -24461,7 +24454,84 @@ var init_DashboardLayout = __esm({
|
|
|
24461
24454
|
NavLinkBottom.displayName = "NavLinkBottom";
|
|
24462
24455
|
}
|
|
24463
24456
|
});
|
|
24464
|
-
|
|
24457
|
+
function computeMenuStyle(position, triggerRect) {
|
|
24458
|
+
const isTop = position.startsWith("top");
|
|
24459
|
+
const isRight = position.endsWith("right") || position.endsWith("end");
|
|
24460
|
+
if (isTop) {
|
|
24461
|
+
return {
|
|
24462
|
+
top: triggerRect.top - MENU_GAP,
|
|
24463
|
+
transform: "translateY(-100%)",
|
|
24464
|
+
...isRight ? { right: window.innerWidth - triggerRect.right } : { left: triggerRect.left }
|
|
24465
|
+
};
|
|
24466
|
+
}
|
|
24467
|
+
return {
|
|
24468
|
+
top: triggerRect.bottom + MENU_GAP,
|
|
24469
|
+
...isRight ? { right: window.innerWidth - triggerRect.right } : { left: triggerRect.left }
|
|
24470
|
+
};
|
|
24471
|
+
}
|
|
24472
|
+
function SubMenu({
|
|
24473
|
+
items,
|
|
24474
|
+
itemRef,
|
|
24475
|
+
direction,
|
|
24476
|
+
eventBus
|
|
24477
|
+
}) {
|
|
24478
|
+
const [rect, setRect] = React88.useState(null);
|
|
24479
|
+
React88.useEffect(() => {
|
|
24480
|
+
if (itemRef) {
|
|
24481
|
+
setRect(itemRef.getBoundingClientRect());
|
|
24482
|
+
}
|
|
24483
|
+
}, [itemRef]);
|
|
24484
|
+
if (!rect) return null;
|
|
24485
|
+
const isRtl = direction === "rtl";
|
|
24486
|
+
const style = {
|
|
24487
|
+
top: rect.top,
|
|
24488
|
+
...isRtl ? { right: window.innerWidth - rect.left } : { left: rect.right }
|
|
24489
|
+
};
|
|
24490
|
+
const panel = /* @__PURE__ */ jsxRuntime.jsx(
|
|
24491
|
+
"div",
|
|
24492
|
+
{
|
|
24493
|
+
className: cn("fixed z-50", menuContainerStyles),
|
|
24494
|
+
style,
|
|
24495
|
+
children: items.map((item, index) => {
|
|
24496
|
+
const isDivider = item.id === "divider" || item.label === "divider";
|
|
24497
|
+
const itemId = item.id ?? `item-${item.label.toLowerCase().replace(/\s+/g, "-")}-${index}`;
|
|
24498
|
+
const isDanger = item.variant === "danger";
|
|
24499
|
+
if (isDivider) {
|
|
24500
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Divider, { className: "my-1" }, `divider-${index}`);
|
|
24501
|
+
}
|
|
24502
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
24503
|
+
Box,
|
|
24504
|
+
{
|
|
24505
|
+
as: "button",
|
|
24506
|
+
onClick: () => {
|
|
24507
|
+
if (item.disabled) return;
|
|
24508
|
+
if (item.event) eventBus.emit(`UI:${item.event}`, { itemId, label: item.label });
|
|
24509
|
+
item.onClick?.();
|
|
24510
|
+
},
|
|
24511
|
+
"aria-disabled": item.disabled || void 0,
|
|
24512
|
+
"data-testid": item.event ? `action-${item.event}` : void 0,
|
|
24513
|
+
className: cn(
|
|
24514
|
+
"w-full flex items-center gap-3 px-4 py-2 text-start",
|
|
24515
|
+
"text-sm transition-colors",
|
|
24516
|
+
"hover:bg-muted focus:outline-none focus:bg-muted",
|
|
24517
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
24518
|
+
item.disabled && "cursor-not-allowed",
|
|
24519
|
+
isDanger && "text-error hover:bg-error/10"
|
|
24520
|
+
),
|
|
24521
|
+
children: [
|
|
24522
|
+
item.icon && (typeof item.icon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: item.icon, size: "sm", className: "flex-shrink-0" }) : /* @__PURE__ */ jsxRuntime.jsx(Icon, { icon: item.icon, size: "sm", className: "flex-shrink-0" })),
|
|
24523
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: cn("flex-1", isDanger && "text-red-600"), children: item.label }),
|
|
24524
|
+
item.badge !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto text-xs font-medium", children: item.badge })
|
|
24525
|
+
]
|
|
24526
|
+
},
|
|
24527
|
+
itemId
|
|
24528
|
+
);
|
|
24529
|
+
})
|
|
24530
|
+
}
|
|
24531
|
+
);
|
|
24532
|
+
return typeof document !== "undefined" ? reactDom.createPortal(panel, document.body) : panel;
|
|
24533
|
+
}
|
|
24534
|
+
var MENU_GAP, menuContainerStyles, Menu;
|
|
24465
24535
|
var init_Menu = __esm({
|
|
24466
24536
|
"components/core/molecules/Menu.tsx"() {
|
|
24467
24537
|
"use client";
|
|
@@ -24472,6 +24542,14 @@ var init_Menu = __esm({
|
|
|
24472
24542
|
init_Badge();
|
|
24473
24543
|
init_cn();
|
|
24474
24544
|
init_useEventBus();
|
|
24545
|
+
MENU_GAP = 4;
|
|
24546
|
+
menuContainerStyles = cn(
|
|
24547
|
+
"bg-card",
|
|
24548
|
+
"border-[length:var(--border-width)] border-border",
|
|
24549
|
+
"shadow-elevation-popover",
|
|
24550
|
+
"rounded-sm",
|
|
24551
|
+
"min-w-0 sm:min-w-[200px] max-w-[calc(100vw-1rem)] py-1"
|
|
24552
|
+
);
|
|
24475
24553
|
Menu = ({
|
|
24476
24554
|
trigger,
|
|
24477
24555
|
items,
|
|
@@ -24479,9 +24557,10 @@ var init_Menu = __esm({
|
|
|
24479
24557
|
className
|
|
24480
24558
|
}) => {
|
|
24481
24559
|
const eventBus = useEventBus();
|
|
24482
|
-
const {
|
|
24560
|
+
const { direction } = hooks.useTranslate();
|
|
24483
24561
|
const [isOpen, setIsOpen] = React88.useState(false);
|
|
24484
24562
|
const [activeSubMenu, setActiveSubMenu] = React88.useState(null);
|
|
24563
|
+
const [activeSubMenuRef, setActiveSubMenuRef] = React88.useState(null);
|
|
24485
24564
|
const [triggerRect, setTriggerRect] = React88.useState(null);
|
|
24486
24565
|
const triggerRef = React88.useRef(null);
|
|
24487
24566
|
const menuRef = React88.useRef(null);
|
|
@@ -24496,13 +24575,14 @@ var init_Menu = __esm({
|
|
|
24496
24575
|
}
|
|
24497
24576
|
setIsOpen(!isOpen);
|
|
24498
24577
|
setActiveSubMenu(null);
|
|
24578
|
+
setActiveSubMenuRef(null);
|
|
24499
24579
|
};
|
|
24500
|
-
const handleItemClick = (item) => {
|
|
24580
|
+
const handleItemClick = (item, itemId) => {
|
|
24501
24581
|
if (item.disabled) return;
|
|
24502
24582
|
if (item.subMenu && item.subMenu.length > 0) {
|
|
24503
|
-
setActiveSubMenu(
|
|
24583
|
+
setActiveSubMenu(itemId);
|
|
24504
24584
|
} else {
|
|
24505
|
-
if (item.event) eventBus.emit(`UI:${item.event}`, { itemId
|
|
24585
|
+
if (item.event) eventBus.emit(`UI:${item.event}`, { itemId, label: item.label });
|
|
24506
24586
|
item.onClick?.();
|
|
24507
24587
|
setIsOpen(false);
|
|
24508
24588
|
}
|
|
@@ -24517,22 +24597,12 @@ var init_Menu = __esm({
|
|
|
24517
24597
|
if (isOpen && menuRef.current && !menuRef.current.contains(e.target) && triggerRef.current && !triggerRef.current.contains(e.target)) {
|
|
24518
24598
|
setIsOpen(false);
|
|
24519
24599
|
setActiveSubMenu(null);
|
|
24600
|
+
setActiveSubMenuRef(null);
|
|
24520
24601
|
}
|
|
24521
24602
|
};
|
|
24522
24603
|
document.addEventListener("mousedown", handleClickOutside);
|
|
24523
24604
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
24524
24605
|
}, [isOpen]);
|
|
24525
|
-
const positionClasses = {
|
|
24526
|
-
"top-left": "bottom-full left-0 mb-2",
|
|
24527
|
-
"top-right": "bottom-full right-0 mb-2",
|
|
24528
|
-
"bottom-left": "top-full left-0 mt-2",
|
|
24529
|
-
"bottom-right": "top-full right-0 mt-2",
|
|
24530
|
-
// Aliases for pattern compatibility
|
|
24531
|
-
"top-start": "bottom-full left-0 mb-2",
|
|
24532
|
-
"top-end": "bottom-full right-0 mb-2",
|
|
24533
|
-
"bottom-start": "top-full left-0 mt-2",
|
|
24534
|
-
"bottom-end": "top-full right-0 mt-2"
|
|
24535
|
-
};
|
|
24536
24606
|
const rtlMirror = {
|
|
24537
24607
|
"top-left": "top-right",
|
|
24538
24608
|
"top-right": "top-left",
|
|
@@ -24544,7 +24614,6 @@ var init_Menu = __esm({
|
|
|
24544
24614
|
"bottom-end": "bottom-start"
|
|
24545
24615
|
};
|
|
24546
24616
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
24547
|
-
const subMenuSideClass = direction === "rtl" ? "right-full mr-2" : "left-full ml-2";
|
|
24548
24617
|
const triggerChild = React88__namespace.default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
24549
24618
|
const triggerElement = React88__namespace.default.cloneElement(
|
|
24550
24619
|
triggerChild,
|
|
@@ -24553,94 +24622,83 @@ var init_Menu = __esm({
|
|
|
24553
24622
|
onClick: handleToggle
|
|
24554
24623
|
}
|
|
24555
24624
|
);
|
|
24556
|
-
const
|
|
24557
|
-
"
|
|
24558
|
-
"border-[length:var(--border-width)] border-border",
|
|
24559
|
-
"shadow-elevation-popover",
|
|
24560
|
-
"rounded-sm",
|
|
24561
|
-
"min-w-0 sm:min-w-[200px] max-w-[calc(100vw-1rem)] py-1"
|
|
24562
|
-
);
|
|
24563
|
-
const renderMenuItem = (item, hasSubMenu, index) => {
|
|
24625
|
+
const renderMenuItems = (menuItems) => menuItems.map((item, index) => {
|
|
24626
|
+
const isDivider = item.id === "divider" || item.label === "divider";
|
|
24564
24627
|
const itemId = item.id ?? `item-${item.label.toLowerCase().replace(/\s+/g, "-")}-${index}`;
|
|
24628
|
+
const hasSubMenu = !!(item.subMenu && item.subMenu.length > 0);
|
|
24565
24629
|
const isDanger = item.variant === "danger";
|
|
24566
|
-
|
|
24567
|
-
|
|
24568
|
-
|
|
24569
|
-
|
|
24570
|
-
|
|
24571
|
-
|
|
24572
|
-
|
|
24573
|
-
|
|
24574
|
-
|
|
24575
|
-
"
|
|
24576
|
-
|
|
24577
|
-
|
|
24578
|
-
|
|
24579
|
-
|
|
24580
|
-
item.disabled && "cursor-not-allowed",
|
|
24581
|
-
isDanger && "text-error hover:bg-error/10"
|
|
24582
|
-
),
|
|
24583
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "flex items-center gap-3 flex-1 min-w-0", children: [
|
|
24584
|
-
item.icon && (typeof item.icon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: item.icon, size: "sm", className: "flex-shrink-0" }) : /* @__PURE__ */ jsxRuntime.jsx(Icon, { icon: item.icon, size: "sm", className: "flex-shrink-0" })),
|
|
24585
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
24586
|
-
Typography,
|
|
24587
|
-
{
|
|
24588
|
-
variant: "small",
|
|
24589
|
-
className: cn("flex-1", isDanger && "text-red-600"),
|
|
24590
|
-
children: item.label
|
|
24630
|
+
if (isDivider) {
|
|
24631
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Divider, { className: "my-1" }, `divider-${index}`);
|
|
24632
|
+
}
|
|
24633
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Box, { children: [
|
|
24634
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
24635
|
+
Box,
|
|
24636
|
+
{
|
|
24637
|
+
as: "button",
|
|
24638
|
+
onClick: () => handleItemClick({ ...item, id: itemId }, itemId),
|
|
24639
|
+
"aria-disabled": item.disabled || void 0,
|
|
24640
|
+
onMouseEnter: (e) => {
|
|
24641
|
+
if (hasSubMenu) {
|
|
24642
|
+
setActiveSubMenu(itemId);
|
|
24643
|
+
setActiveSubMenuRef(e.currentTarget);
|
|
24591
24644
|
}
|
|
24645
|
+
},
|
|
24646
|
+
"data-testid": item.event ? `action-${item.event}` : void 0,
|
|
24647
|
+
className: cn(
|
|
24648
|
+
"w-full flex items-center justify-between gap-3 px-4 py-2 text-start",
|
|
24649
|
+
"text-sm transition-colors",
|
|
24650
|
+
"hover:bg-muted",
|
|
24651
|
+
"focus:outline-none focus:bg-muted",
|
|
24652
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
24653
|
+
item.disabled && "cursor-not-allowed",
|
|
24654
|
+
isDanger && "text-error hover:bg-error/10"
|
|
24592
24655
|
),
|
|
24593
|
-
|
|
24594
|
-
|
|
24595
|
-
|
|
24596
|
-
|
|
24597
|
-
|
|
24598
|
-
|
|
24599
|
-
|
|
24600
|
-
|
|
24601
|
-
|
|
24602
|
-
const hasSubMenu = item.subMenu && item.subMenu.length > 0;
|
|
24603
|
-
const isDivider = item.id === "divider" || item.label === "divider";
|
|
24604
|
-
const itemId = item.id ?? `item-${item.label.toLowerCase().replace(/\s+/g, "-")}-${index}`;
|
|
24605
|
-
if (isDivider) {
|
|
24606
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Divider, { className: "my-1" }, `divider-${index}`);
|
|
24607
|
-
}
|
|
24608
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Box, { children: [
|
|
24609
|
-
renderMenuItem(item, !!hasSubMenu, index),
|
|
24610
|
-
hasSubMenu && activeSubMenu === itemId && item.subMenu && /* @__PURE__ */ jsxRuntime.jsx(
|
|
24611
|
-
Box,
|
|
24612
|
-
{
|
|
24613
|
-
className: cn(
|
|
24614
|
-
"absolute top-0 z-50",
|
|
24615
|
-
subMenuSideClass,
|
|
24616
|
-
menuContainerStyles
|
|
24656
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "flex items-center gap-3 flex-1 min-w-0", children: [
|
|
24657
|
+
item.icon && (typeof item.icon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: item.icon, size: "sm", className: "flex-shrink-0" }) : /* @__PURE__ */ jsxRuntime.jsx(Icon, { icon: item.icon, size: "sm", className: "flex-shrink-0" })),
|
|
24658
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
24659
|
+
Typography,
|
|
24660
|
+
{
|
|
24661
|
+
variant: "small",
|
|
24662
|
+
className: cn("flex-1", isDanger && "text-red-600"),
|
|
24663
|
+
children: item.label
|
|
24664
|
+
}
|
|
24617
24665
|
),
|
|
24618
|
-
children:
|
|
24619
|
-
|
|
24620
|
-
|
|
24621
|
-
|
|
24622
|
-
|
|
24623
|
-
|
|
24624
|
-
|
|
24666
|
+
item.badge !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "default", size: "sm", children: item.badge }),
|
|
24667
|
+
hasSubMenu && /* @__PURE__ */ jsxRuntime.jsx(
|
|
24668
|
+
Icon,
|
|
24669
|
+
{
|
|
24670
|
+
name: direction === "rtl" ? "chevron-left" : "chevron-right",
|
|
24671
|
+
size: "sm",
|
|
24672
|
+
className: "flex-shrink-0"
|
|
24673
|
+
}
|
|
24674
|
+
)
|
|
24675
|
+
] })
|
|
24676
|
+
}
|
|
24677
|
+
),
|
|
24678
|
+
hasSubMenu && activeSubMenu === itemId && item.subMenu && /* @__PURE__ */ jsxRuntime.jsx(
|
|
24679
|
+
SubMenu,
|
|
24680
|
+
{
|
|
24681
|
+
items: item.subMenu,
|
|
24682
|
+
itemRef: activeSubMenuRef,
|
|
24683
|
+
direction,
|
|
24684
|
+
eventBus
|
|
24685
|
+
}
|
|
24686
|
+
)
|
|
24687
|
+
] }, itemId);
|
|
24688
|
+
});
|
|
24689
|
+
const panel = isOpen && triggerRect ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
24690
|
+
"div",
|
|
24691
|
+
{
|
|
24692
|
+
ref: menuRef,
|
|
24693
|
+
className: cn("fixed z-50", menuContainerStyles, className),
|
|
24694
|
+
style: computeMenuStyle(effectivePosition, triggerRect),
|
|
24695
|
+
role: "menu",
|
|
24696
|
+
children: renderMenuItems(items)
|
|
24697
|
+
}
|
|
24698
|
+
) : null;
|
|
24699
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
24625
24700
|
triggerElement,
|
|
24626
|
-
|
|
24627
|
-
Box,
|
|
24628
|
-
{
|
|
24629
|
-
ref: menuRef,
|
|
24630
|
-
className: cn(
|
|
24631
|
-
"absolute z-50",
|
|
24632
|
-
menuContainerStyles,
|
|
24633
|
-
positionClasses[effectivePosition],
|
|
24634
|
-
className
|
|
24635
|
-
),
|
|
24636
|
-
style: {
|
|
24637
|
-
left: effectivePosition.includes("left") ? 0 : "auto",
|
|
24638
|
-
right: effectivePosition.includes("right") ? 0 : "auto"
|
|
24639
|
-
},
|
|
24640
|
-
role: "menu",
|
|
24641
|
-
children: renderMenuItems(items)
|
|
24642
|
-
}
|
|
24643
|
-
)
|
|
24701
|
+
panel && typeof document !== "undefined" ? reactDom.createPortal(panel, document.body) : panel
|
|
24644
24702
|
] });
|
|
24645
24703
|
};
|
|
24646
24704
|
Menu.displayName = "Menu";
|
|
@@ -38637,7 +38695,6 @@ var init_DocumentViewer = __esm({
|
|
|
38637
38695
|
showPrint = false,
|
|
38638
38696
|
actions,
|
|
38639
38697
|
documents,
|
|
38640
|
-
entity,
|
|
38641
38698
|
isLoading = false,
|
|
38642
38699
|
error,
|
|
38643
38700
|
className
|
|
@@ -45452,7 +45509,7 @@ function TraitSlot({
|
|
|
45452
45509
|
size = "md",
|
|
45453
45510
|
showTooltip = true,
|
|
45454
45511
|
categoryColors,
|
|
45455
|
-
tooltipFrameUrl,
|
|
45512
|
+
tooltipFrameUrl = "",
|
|
45456
45513
|
className,
|
|
45457
45514
|
feedback,
|
|
45458
45515
|
onItemDrop,
|
|
@@ -48308,7 +48365,7 @@ var init_WorldMapBoard = __esm({
|
|
|
48308
48365
|
init_useEventBus();
|
|
48309
48366
|
init_Stack();
|
|
48310
48367
|
init_LoadingState();
|
|
48311
|
-
|
|
48368
|
+
init_IsometricCanvas();
|
|
48312
48369
|
init_boardEntity();
|
|
48313
48370
|
init_isometric();
|
|
48314
48371
|
WorldMapBoard.displayName = "WorldMapBoard";
|
|
@@ -48364,7 +48421,7 @@ function lazyThree(name, loader) {
|
|
|
48364
48421
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
48365
48422
|
return ThreeWrapper;
|
|
48366
48423
|
}
|
|
48367
|
-
var FeatureRenderer, COMPONENT_REGISTRY;
|
|
48424
|
+
var FeatureRenderer, GameCanvas3D, GameCanvas3DBattleTemplate, GameCanvas3DCastleTemplate, GameCanvas3DWorldMapTemplate, COMPONENT_REGISTRY;
|
|
48368
48425
|
var init_component_registry_generated = __esm({
|
|
48369
48426
|
"components/core/organisms/component-registry.generated.ts"() {
|
|
48370
48427
|
init_AboutPageTemplate();
|
|
@@ -48650,7 +48707,11 @@ var init_component_registry_generated = __esm({
|
|
|
48650
48707
|
init_WorldMapBoard();
|
|
48651
48708
|
init_WorldMapTemplate();
|
|
48652
48709
|
init_XPBar();
|
|
48653
|
-
FeatureRenderer = lazyThree("FeatureRenderer", () => import('@almadar/ui/components/
|
|
48710
|
+
FeatureRenderer = lazyThree("FeatureRenderer", () => import('@almadar/ui/components/molecules/game/three'));
|
|
48711
|
+
GameCanvas3D = lazyThree("GameCanvas3D", () => import('@almadar/ui/components/molecules/game/three'));
|
|
48712
|
+
GameCanvas3DBattleTemplate = lazyThree("GameCanvas3DBattleTemplate", () => import('@almadar/ui/components/molecules/game/three'));
|
|
48713
|
+
GameCanvas3DCastleTemplate = lazyThree("GameCanvas3DCastleTemplate", () => import('@almadar/ui/components/molecules/game/three'));
|
|
48714
|
+
GameCanvas3DWorldMapTemplate = lazyThree("GameCanvas3DWorldMapTemplate", () => import('@almadar/ui/components/molecules/game/three'));
|
|
48654
48715
|
COMPONENT_REGISTRY = {
|
|
48655
48716
|
"AboutPageTemplate": AboutPageTemplate,
|
|
48656
48717
|
"Accordion": Accordion,
|
|
@@ -48763,6 +48824,10 @@ var init_component_registry_generated = __esm({
|
|
|
48763
48824
|
"GameAudioProvider": GameAudioProvider,
|
|
48764
48825
|
"GameAudioToggle": GameAudioToggle,
|
|
48765
48826
|
"GameCanvas2D": GameCanvas2D,
|
|
48827
|
+
"GameCanvas3D": GameCanvas3D,
|
|
48828
|
+
"GameCanvas3DBattleTemplate": GameCanvas3DBattleTemplate,
|
|
48829
|
+
"GameCanvas3DCastleTemplate": GameCanvas3DCastleTemplate,
|
|
48830
|
+
"GameCanvas3DWorldMapTemplate": GameCanvas3DWorldMapTemplate,
|
|
48766
48831
|
"GameHud": GameHud,
|
|
48767
48832
|
"GameMenu": GameMenu,
|
|
48768
48833
|
"GameOverScreen": GameOverScreen,
|