@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/runtime/index.cjs
CHANGED
|
@@ -11060,13 +11060,6 @@ var init_IsometricCanvas = __esm({
|
|
|
11060
11060
|
}
|
|
11061
11061
|
});
|
|
11062
11062
|
|
|
11063
|
-
// components/game/organisms/IsometricCanvas.tsx
|
|
11064
|
-
var init_IsometricCanvas2 = __esm({
|
|
11065
|
-
"components/game/organisms/IsometricCanvas.tsx"() {
|
|
11066
|
-
init_IsometricCanvas();
|
|
11067
|
-
}
|
|
11068
|
-
});
|
|
11069
|
-
|
|
11070
11063
|
// components/game/organisms/boardEntity.ts
|
|
11071
11064
|
function boardEntity(entity) {
|
|
11072
11065
|
if (!entity) return void 0;
|
|
@@ -11462,7 +11455,7 @@ var init_BattleBoard = __esm({
|
|
|
11462
11455
|
init_Button();
|
|
11463
11456
|
init_Typography();
|
|
11464
11457
|
init_Stack();
|
|
11465
|
-
|
|
11458
|
+
init_IsometricCanvas();
|
|
11466
11459
|
init_boardEntity();
|
|
11467
11460
|
init_isometric();
|
|
11468
11461
|
BattleBoard.displayName = "BattleBoard";
|
|
@@ -19377,7 +19370,7 @@ var init_CastleBoard = __esm({
|
|
|
19377
19370
|
"use client";
|
|
19378
19371
|
init_cn();
|
|
19379
19372
|
init_useEventBus();
|
|
19380
|
-
|
|
19373
|
+
init_IsometricCanvas();
|
|
19381
19374
|
init_boardEntity();
|
|
19382
19375
|
init_isometric();
|
|
19383
19376
|
CastleBoard.displayName = "CastleBoard";
|
|
@@ -21551,7 +21544,84 @@ var init_DashboardLayout = __esm({
|
|
|
21551
21544
|
NavLinkBottom.displayName = "NavLinkBottom";
|
|
21552
21545
|
}
|
|
21553
21546
|
});
|
|
21554
|
-
|
|
21547
|
+
function computeMenuStyle(position, triggerRect) {
|
|
21548
|
+
const isTop = position.startsWith("top");
|
|
21549
|
+
const isRight = position.endsWith("right") || position.endsWith("end");
|
|
21550
|
+
if (isTop) {
|
|
21551
|
+
return {
|
|
21552
|
+
top: triggerRect.top - MENU_GAP,
|
|
21553
|
+
transform: "translateY(-100%)",
|
|
21554
|
+
...isRight ? { right: window.innerWidth - triggerRect.right } : { left: triggerRect.left }
|
|
21555
|
+
};
|
|
21556
|
+
}
|
|
21557
|
+
return {
|
|
21558
|
+
top: triggerRect.bottom + MENU_GAP,
|
|
21559
|
+
...isRight ? { right: window.innerWidth - triggerRect.right } : { left: triggerRect.left }
|
|
21560
|
+
};
|
|
21561
|
+
}
|
|
21562
|
+
function SubMenu({
|
|
21563
|
+
items,
|
|
21564
|
+
itemRef,
|
|
21565
|
+
direction,
|
|
21566
|
+
eventBus
|
|
21567
|
+
}) {
|
|
21568
|
+
const [rect, setRect] = React79.useState(null);
|
|
21569
|
+
React79.useEffect(() => {
|
|
21570
|
+
if (itemRef) {
|
|
21571
|
+
setRect(itemRef.getBoundingClientRect());
|
|
21572
|
+
}
|
|
21573
|
+
}, [itemRef]);
|
|
21574
|
+
if (!rect) return null;
|
|
21575
|
+
const isRtl = direction === "rtl";
|
|
21576
|
+
const style = {
|
|
21577
|
+
top: rect.top,
|
|
21578
|
+
...isRtl ? { right: window.innerWidth - rect.left } : { left: rect.right }
|
|
21579
|
+
};
|
|
21580
|
+
const panel = /* @__PURE__ */ jsxRuntime.jsx(
|
|
21581
|
+
"div",
|
|
21582
|
+
{
|
|
21583
|
+
className: cn("fixed z-50", menuContainerStyles),
|
|
21584
|
+
style,
|
|
21585
|
+
children: items.map((item, index) => {
|
|
21586
|
+
const isDivider = item.id === "divider" || item.label === "divider";
|
|
21587
|
+
const itemId = item.id ?? `item-${item.label.toLowerCase().replace(/\s+/g, "-")}-${index}`;
|
|
21588
|
+
const isDanger = item.variant === "danger";
|
|
21589
|
+
if (isDivider) {
|
|
21590
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Divider, { className: "my-1" }, `divider-${index}`);
|
|
21591
|
+
}
|
|
21592
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
21593
|
+
Box,
|
|
21594
|
+
{
|
|
21595
|
+
as: "button",
|
|
21596
|
+
onClick: () => {
|
|
21597
|
+
if (item.disabled) return;
|
|
21598
|
+
if (item.event) eventBus.emit(`UI:${item.event}`, { itemId, label: item.label });
|
|
21599
|
+
item.onClick?.();
|
|
21600
|
+
},
|
|
21601
|
+
"aria-disabled": item.disabled || void 0,
|
|
21602
|
+
"data-testid": item.event ? `action-${item.event}` : void 0,
|
|
21603
|
+
className: cn(
|
|
21604
|
+
"w-full flex items-center gap-3 px-4 py-2 text-start",
|
|
21605
|
+
"text-sm transition-colors",
|
|
21606
|
+
"hover:bg-muted focus:outline-none focus:bg-muted",
|
|
21607
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
21608
|
+
item.disabled && "cursor-not-allowed",
|
|
21609
|
+
isDanger && "text-error hover:bg-error/10"
|
|
21610
|
+
),
|
|
21611
|
+
children: [
|
|
21612
|
+
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" })),
|
|
21613
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: cn("flex-1", isDanger && "text-red-600"), children: item.label }),
|
|
21614
|
+
item.badge !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto text-xs font-medium", children: item.badge })
|
|
21615
|
+
]
|
|
21616
|
+
},
|
|
21617
|
+
itemId
|
|
21618
|
+
);
|
|
21619
|
+
})
|
|
21620
|
+
}
|
|
21621
|
+
);
|
|
21622
|
+
return typeof document !== "undefined" ? reactDom.createPortal(panel, document.body) : panel;
|
|
21623
|
+
}
|
|
21624
|
+
var MENU_GAP, menuContainerStyles, Menu;
|
|
21555
21625
|
var init_Menu = __esm({
|
|
21556
21626
|
"components/core/molecules/Menu.tsx"() {
|
|
21557
21627
|
"use client";
|
|
@@ -21562,6 +21632,14 @@ var init_Menu = __esm({
|
|
|
21562
21632
|
init_Badge();
|
|
21563
21633
|
init_cn();
|
|
21564
21634
|
init_useEventBus();
|
|
21635
|
+
MENU_GAP = 4;
|
|
21636
|
+
menuContainerStyles = cn(
|
|
21637
|
+
"bg-card",
|
|
21638
|
+
"border-[length:var(--border-width)] border-border",
|
|
21639
|
+
"shadow-elevation-popover",
|
|
21640
|
+
"rounded-sm",
|
|
21641
|
+
"min-w-0 sm:min-w-[200px] max-w-[calc(100vw-1rem)] py-1"
|
|
21642
|
+
);
|
|
21565
21643
|
Menu = ({
|
|
21566
21644
|
trigger,
|
|
21567
21645
|
items,
|
|
@@ -21569,9 +21647,10 @@ var init_Menu = __esm({
|
|
|
21569
21647
|
className
|
|
21570
21648
|
}) => {
|
|
21571
21649
|
const eventBus = useEventBus();
|
|
21572
|
-
const {
|
|
21650
|
+
const { direction } = hooks.useTranslate();
|
|
21573
21651
|
const [isOpen, setIsOpen] = React79.useState(false);
|
|
21574
21652
|
const [activeSubMenu, setActiveSubMenu] = React79.useState(null);
|
|
21653
|
+
const [activeSubMenuRef, setActiveSubMenuRef] = React79.useState(null);
|
|
21575
21654
|
const [triggerRect, setTriggerRect] = React79.useState(null);
|
|
21576
21655
|
const triggerRef = React79.useRef(null);
|
|
21577
21656
|
const menuRef = React79.useRef(null);
|
|
@@ -21586,13 +21665,14 @@ var init_Menu = __esm({
|
|
|
21586
21665
|
}
|
|
21587
21666
|
setIsOpen(!isOpen);
|
|
21588
21667
|
setActiveSubMenu(null);
|
|
21668
|
+
setActiveSubMenuRef(null);
|
|
21589
21669
|
};
|
|
21590
|
-
const handleItemClick = (item) => {
|
|
21670
|
+
const handleItemClick = (item, itemId) => {
|
|
21591
21671
|
if (item.disabled) return;
|
|
21592
21672
|
if (item.subMenu && item.subMenu.length > 0) {
|
|
21593
|
-
setActiveSubMenu(
|
|
21673
|
+
setActiveSubMenu(itemId);
|
|
21594
21674
|
} else {
|
|
21595
|
-
if (item.event) eventBus.emit(`UI:${item.event}`, { itemId
|
|
21675
|
+
if (item.event) eventBus.emit(`UI:${item.event}`, { itemId, label: item.label });
|
|
21596
21676
|
item.onClick?.();
|
|
21597
21677
|
setIsOpen(false);
|
|
21598
21678
|
}
|
|
@@ -21607,22 +21687,12 @@ var init_Menu = __esm({
|
|
|
21607
21687
|
if (isOpen && menuRef.current && !menuRef.current.contains(e.target) && triggerRef.current && !triggerRef.current.contains(e.target)) {
|
|
21608
21688
|
setIsOpen(false);
|
|
21609
21689
|
setActiveSubMenu(null);
|
|
21690
|
+
setActiveSubMenuRef(null);
|
|
21610
21691
|
}
|
|
21611
21692
|
};
|
|
21612
21693
|
document.addEventListener("mousedown", handleClickOutside);
|
|
21613
21694
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
21614
21695
|
}, [isOpen]);
|
|
21615
|
-
const positionClasses = {
|
|
21616
|
-
"top-left": "bottom-full left-0 mb-2",
|
|
21617
|
-
"top-right": "bottom-full right-0 mb-2",
|
|
21618
|
-
"bottom-left": "top-full left-0 mt-2",
|
|
21619
|
-
"bottom-right": "top-full right-0 mt-2",
|
|
21620
|
-
// Aliases for pattern compatibility
|
|
21621
|
-
"top-start": "bottom-full left-0 mb-2",
|
|
21622
|
-
"top-end": "bottom-full right-0 mb-2",
|
|
21623
|
-
"bottom-start": "top-full left-0 mt-2",
|
|
21624
|
-
"bottom-end": "top-full right-0 mt-2"
|
|
21625
|
-
};
|
|
21626
21696
|
const rtlMirror = {
|
|
21627
21697
|
"top-left": "top-right",
|
|
21628
21698
|
"top-right": "top-left",
|
|
@@ -21634,7 +21704,6 @@ var init_Menu = __esm({
|
|
|
21634
21704
|
"bottom-end": "bottom-start"
|
|
21635
21705
|
};
|
|
21636
21706
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
21637
|
-
const subMenuSideClass = direction === "rtl" ? "right-full mr-2" : "left-full ml-2";
|
|
21638
21707
|
const triggerChild = React79__namespace.default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
21639
21708
|
const triggerElement = React79__namespace.default.cloneElement(
|
|
21640
21709
|
triggerChild,
|
|
@@ -21643,94 +21712,83 @@ var init_Menu = __esm({
|
|
|
21643
21712
|
onClick: handleToggle
|
|
21644
21713
|
}
|
|
21645
21714
|
);
|
|
21646
|
-
const
|
|
21647
|
-
"
|
|
21648
|
-
"border-[length:var(--border-width)] border-border",
|
|
21649
|
-
"shadow-elevation-popover",
|
|
21650
|
-
"rounded-sm",
|
|
21651
|
-
"min-w-0 sm:min-w-[200px] max-w-[calc(100vw-1rem)] py-1"
|
|
21652
|
-
);
|
|
21653
|
-
const renderMenuItem = (item, hasSubMenu, index) => {
|
|
21715
|
+
const renderMenuItems = (menuItems) => menuItems.map((item, index) => {
|
|
21716
|
+
const isDivider = item.id === "divider" || item.label === "divider";
|
|
21654
21717
|
const itemId = item.id ?? `item-${item.label.toLowerCase().replace(/\s+/g, "-")}-${index}`;
|
|
21718
|
+
const hasSubMenu = !!(item.subMenu && item.subMenu.length > 0);
|
|
21655
21719
|
const isDanger = item.variant === "danger";
|
|
21656
|
-
|
|
21657
|
-
|
|
21658
|
-
|
|
21659
|
-
|
|
21660
|
-
|
|
21661
|
-
|
|
21662
|
-
|
|
21663
|
-
|
|
21664
|
-
|
|
21665
|
-
"
|
|
21666
|
-
|
|
21667
|
-
|
|
21668
|
-
|
|
21669
|
-
|
|
21670
|
-
item.disabled && "cursor-not-allowed",
|
|
21671
|
-
isDanger && "text-error hover:bg-error/10"
|
|
21672
|
-
),
|
|
21673
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "flex items-center gap-3 flex-1 min-w-0", children: [
|
|
21674
|
-
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" })),
|
|
21675
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
21676
|
-
Typography,
|
|
21677
|
-
{
|
|
21678
|
-
variant: "small",
|
|
21679
|
-
className: cn("flex-1", isDanger && "text-red-600"),
|
|
21680
|
-
children: item.label
|
|
21720
|
+
if (isDivider) {
|
|
21721
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Divider, { className: "my-1" }, `divider-${index}`);
|
|
21722
|
+
}
|
|
21723
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Box, { children: [
|
|
21724
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
21725
|
+
Box,
|
|
21726
|
+
{
|
|
21727
|
+
as: "button",
|
|
21728
|
+
onClick: () => handleItemClick({ ...item, id: itemId }, itemId),
|
|
21729
|
+
"aria-disabled": item.disabled || void 0,
|
|
21730
|
+
onMouseEnter: (e) => {
|
|
21731
|
+
if (hasSubMenu) {
|
|
21732
|
+
setActiveSubMenu(itemId);
|
|
21733
|
+
setActiveSubMenuRef(e.currentTarget);
|
|
21681
21734
|
}
|
|
21735
|
+
},
|
|
21736
|
+
"data-testid": item.event ? `action-${item.event}` : void 0,
|
|
21737
|
+
className: cn(
|
|
21738
|
+
"w-full flex items-center justify-between gap-3 px-4 py-2 text-start",
|
|
21739
|
+
"text-sm transition-colors",
|
|
21740
|
+
"hover:bg-muted",
|
|
21741
|
+
"focus:outline-none focus:bg-muted",
|
|
21742
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
21743
|
+
item.disabled && "cursor-not-allowed",
|
|
21744
|
+
isDanger && "text-error hover:bg-error/10"
|
|
21682
21745
|
),
|
|
21683
|
-
|
|
21684
|
-
|
|
21685
|
-
|
|
21686
|
-
|
|
21687
|
-
|
|
21688
|
-
|
|
21689
|
-
|
|
21690
|
-
|
|
21691
|
-
|
|
21692
|
-
const hasSubMenu = item.subMenu && item.subMenu.length > 0;
|
|
21693
|
-
const isDivider = item.id === "divider" || item.label === "divider";
|
|
21694
|
-
const itemId = item.id ?? `item-${item.label.toLowerCase().replace(/\s+/g, "-")}-${index}`;
|
|
21695
|
-
if (isDivider) {
|
|
21696
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Divider, { className: "my-1" }, `divider-${index}`);
|
|
21697
|
-
}
|
|
21698
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Box, { children: [
|
|
21699
|
-
renderMenuItem(item, !!hasSubMenu, index),
|
|
21700
|
-
hasSubMenu && activeSubMenu === itemId && item.subMenu && /* @__PURE__ */ jsxRuntime.jsx(
|
|
21701
|
-
Box,
|
|
21702
|
-
{
|
|
21703
|
-
className: cn(
|
|
21704
|
-
"absolute top-0 z-50",
|
|
21705
|
-
subMenuSideClass,
|
|
21706
|
-
menuContainerStyles
|
|
21746
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "flex items-center gap-3 flex-1 min-w-0", children: [
|
|
21747
|
+
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" })),
|
|
21748
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
21749
|
+
Typography,
|
|
21750
|
+
{
|
|
21751
|
+
variant: "small",
|
|
21752
|
+
className: cn("flex-1", isDanger && "text-red-600"),
|
|
21753
|
+
children: item.label
|
|
21754
|
+
}
|
|
21707
21755
|
),
|
|
21708
|
-
children:
|
|
21709
|
-
|
|
21710
|
-
|
|
21711
|
-
|
|
21712
|
-
|
|
21713
|
-
|
|
21714
|
-
|
|
21756
|
+
item.badge !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "default", size: "sm", children: item.badge }),
|
|
21757
|
+
hasSubMenu && /* @__PURE__ */ jsxRuntime.jsx(
|
|
21758
|
+
Icon,
|
|
21759
|
+
{
|
|
21760
|
+
name: direction === "rtl" ? "chevron-left" : "chevron-right",
|
|
21761
|
+
size: "sm",
|
|
21762
|
+
className: "flex-shrink-0"
|
|
21763
|
+
}
|
|
21764
|
+
)
|
|
21765
|
+
] })
|
|
21766
|
+
}
|
|
21767
|
+
),
|
|
21768
|
+
hasSubMenu && activeSubMenu === itemId && item.subMenu && /* @__PURE__ */ jsxRuntime.jsx(
|
|
21769
|
+
SubMenu,
|
|
21770
|
+
{
|
|
21771
|
+
items: item.subMenu,
|
|
21772
|
+
itemRef: activeSubMenuRef,
|
|
21773
|
+
direction,
|
|
21774
|
+
eventBus
|
|
21775
|
+
}
|
|
21776
|
+
)
|
|
21777
|
+
] }, itemId);
|
|
21778
|
+
});
|
|
21779
|
+
const panel = isOpen && triggerRect ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
21780
|
+
"div",
|
|
21781
|
+
{
|
|
21782
|
+
ref: menuRef,
|
|
21783
|
+
className: cn("fixed z-50", menuContainerStyles, className),
|
|
21784
|
+
style: computeMenuStyle(effectivePosition, triggerRect),
|
|
21785
|
+
role: "menu",
|
|
21786
|
+
children: renderMenuItems(items)
|
|
21787
|
+
}
|
|
21788
|
+
) : null;
|
|
21789
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
21715
21790
|
triggerElement,
|
|
21716
|
-
|
|
21717
|
-
Box,
|
|
21718
|
-
{
|
|
21719
|
-
ref: menuRef,
|
|
21720
|
-
className: cn(
|
|
21721
|
-
"absolute z-50",
|
|
21722
|
-
menuContainerStyles,
|
|
21723
|
-
positionClasses[effectivePosition],
|
|
21724
|
-
className
|
|
21725
|
-
),
|
|
21726
|
-
style: {
|
|
21727
|
-
left: effectivePosition.includes("left") ? 0 : "auto",
|
|
21728
|
-
right: effectivePosition.includes("right") ? 0 : "auto"
|
|
21729
|
-
},
|
|
21730
|
-
role: "menu",
|
|
21731
|
-
children: renderMenuItems(items)
|
|
21732
|
-
}
|
|
21733
|
-
)
|
|
21791
|
+
panel && typeof document !== "undefined" ? reactDom.createPortal(panel, document.body) : panel
|
|
21734
21792
|
] });
|
|
21735
21793
|
};
|
|
21736
21794
|
Menu.displayName = "Menu";
|
|
@@ -36136,7 +36194,6 @@ var init_DocumentViewer = __esm({
|
|
|
36136
36194
|
showPrint = false,
|
|
36137
36195
|
actions,
|
|
36138
36196
|
documents,
|
|
36139
|
-
entity,
|
|
36140
36197
|
isLoading = false,
|
|
36141
36198
|
error,
|
|
36142
36199
|
className
|
|
@@ -42951,7 +43008,7 @@ function TraitSlot({
|
|
|
42951
43008
|
size = "md",
|
|
42952
43009
|
showTooltip = true,
|
|
42953
43010
|
categoryColors,
|
|
42954
|
-
tooltipFrameUrl,
|
|
43011
|
+
tooltipFrameUrl = "",
|
|
42955
43012
|
className,
|
|
42956
43013
|
feedback,
|
|
42957
43014
|
onItemDrop,
|
|
@@ -45807,7 +45864,7 @@ var init_WorldMapBoard = __esm({
|
|
|
45807
45864
|
init_useEventBus();
|
|
45808
45865
|
init_Stack();
|
|
45809
45866
|
init_LoadingState();
|
|
45810
|
-
|
|
45867
|
+
init_IsometricCanvas();
|
|
45811
45868
|
init_boardEntity();
|
|
45812
45869
|
init_isometric();
|
|
45813
45870
|
WorldMapBoard.displayName = "WorldMapBoard";
|
|
@@ -45863,7 +45920,7 @@ function lazyThree(name, loader) {
|
|
|
45863
45920
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
45864
45921
|
return ThreeWrapper;
|
|
45865
45922
|
}
|
|
45866
|
-
var FeatureRenderer, COMPONENT_REGISTRY;
|
|
45923
|
+
var FeatureRenderer, GameCanvas3D, GameCanvas3DBattleTemplate, GameCanvas3DCastleTemplate, GameCanvas3DWorldMapTemplate, COMPONENT_REGISTRY;
|
|
45867
45924
|
var init_component_registry_generated = __esm({
|
|
45868
45925
|
"components/core/organisms/component-registry.generated.ts"() {
|
|
45869
45926
|
init_AboutPageTemplate();
|
|
@@ -46149,7 +46206,11 @@ var init_component_registry_generated = __esm({
|
|
|
46149
46206
|
init_WorldMapBoard();
|
|
46150
46207
|
init_WorldMapTemplate();
|
|
46151
46208
|
init_XPBar();
|
|
46152
|
-
FeatureRenderer = lazyThree("FeatureRenderer", () => import('@almadar/ui/components/
|
|
46209
|
+
FeatureRenderer = lazyThree("FeatureRenderer", () => import('@almadar/ui/components/molecules/game/three'));
|
|
46210
|
+
GameCanvas3D = lazyThree("GameCanvas3D", () => import('@almadar/ui/components/molecules/game/three'));
|
|
46211
|
+
GameCanvas3DBattleTemplate = lazyThree("GameCanvas3DBattleTemplate", () => import('@almadar/ui/components/molecules/game/three'));
|
|
46212
|
+
GameCanvas3DCastleTemplate = lazyThree("GameCanvas3DCastleTemplate", () => import('@almadar/ui/components/molecules/game/three'));
|
|
46213
|
+
GameCanvas3DWorldMapTemplate = lazyThree("GameCanvas3DWorldMapTemplate", () => import('@almadar/ui/components/molecules/game/three'));
|
|
46153
46214
|
COMPONENT_REGISTRY = {
|
|
46154
46215
|
"AboutPageTemplate": AboutPageTemplate,
|
|
46155
46216
|
"Accordion": Accordion,
|
|
@@ -46262,6 +46323,10 @@ var init_component_registry_generated = __esm({
|
|
|
46262
46323
|
"GameAudioProvider": GameAudioProvider,
|
|
46263
46324
|
"GameAudioToggle": GameAudioToggle,
|
|
46264
46325
|
"GameCanvas2D": GameCanvas2D,
|
|
46326
|
+
"GameCanvas3D": GameCanvas3D,
|
|
46327
|
+
"GameCanvas3DBattleTemplate": GameCanvas3DBattleTemplate,
|
|
46328
|
+
"GameCanvas3DCastleTemplate": GameCanvas3DCastleTemplate,
|
|
46329
|
+
"GameCanvas3DWorldMapTemplate": GameCanvas3DWorldMapTemplate,
|
|
46265
46330
|
"GameHud": GameHud,
|
|
46266
46331
|
"GameMenu": GameMenu,
|
|
46267
46332
|
"GameOverScreen": GameOverScreen,
|