@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/providers/index.cjs
CHANGED
|
@@ -11493,13 +11493,6 @@ var init_IsometricCanvas = __esm({
|
|
|
11493
11493
|
}
|
|
11494
11494
|
});
|
|
11495
11495
|
|
|
11496
|
-
// components/game/organisms/IsometricCanvas.tsx
|
|
11497
|
-
var init_IsometricCanvas2 = __esm({
|
|
11498
|
-
"components/game/organisms/IsometricCanvas.tsx"() {
|
|
11499
|
-
init_IsometricCanvas();
|
|
11500
|
-
}
|
|
11501
|
-
});
|
|
11502
|
-
|
|
11503
11496
|
// components/game/organisms/boardEntity.ts
|
|
11504
11497
|
function boardEntity(entity) {
|
|
11505
11498
|
if (!entity) return void 0;
|
|
@@ -11895,7 +11888,7 @@ var init_BattleBoard = __esm({
|
|
|
11895
11888
|
init_Button();
|
|
11896
11889
|
init_Typography();
|
|
11897
11890
|
init_Stack();
|
|
11898
|
-
|
|
11891
|
+
init_IsometricCanvas();
|
|
11899
11892
|
init_boardEntity();
|
|
11900
11893
|
init_isometric();
|
|
11901
11894
|
BattleBoard.displayName = "BattleBoard";
|
|
@@ -19810,7 +19803,7 @@ var init_CastleBoard = __esm({
|
|
|
19810
19803
|
"use client";
|
|
19811
19804
|
init_cn();
|
|
19812
19805
|
init_useEventBus();
|
|
19813
|
-
|
|
19806
|
+
init_IsometricCanvas();
|
|
19814
19807
|
init_boardEntity();
|
|
19815
19808
|
init_isometric();
|
|
19816
19809
|
CastleBoard.displayName = "CastleBoard";
|
|
@@ -21984,7 +21977,84 @@ var init_DashboardLayout = __esm({
|
|
|
21984
21977
|
NavLinkBottom.displayName = "NavLinkBottom";
|
|
21985
21978
|
}
|
|
21986
21979
|
});
|
|
21987
|
-
|
|
21980
|
+
function computeMenuStyle(position, triggerRect) {
|
|
21981
|
+
const isTop = position.startsWith("top");
|
|
21982
|
+
const isRight = position.endsWith("right") || position.endsWith("end");
|
|
21983
|
+
if (isTop) {
|
|
21984
|
+
return {
|
|
21985
|
+
top: triggerRect.top - MENU_GAP,
|
|
21986
|
+
transform: "translateY(-100%)",
|
|
21987
|
+
...isRight ? { right: window.innerWidth - triggerRect.right } : { left: triggerRect.left }
|
|
21988
|
+
};
|
|
21989
|
+
}
|
|
21990
|
+
return {
|
|
21991
|
+
top: triggerRect.bottom + MENU_GAP,
|
|
21992
|
+
...isRight ? { right: window.innerWidth - triggerRect.right } : { left: triggerRect.left }
|
|
21993
|
+
};
|
|
21994
|
+
}
|
|
21995
|
+
function SubMenu({
|
|
21996
|
+
items,
|
|
21997
|
+
itemRef,
|
|
21998
|
+
direction,
|
|
21999
|
+
eventBus
|
|
22000
|
+
}) {
|
|
22001
|
+
const [rect, setRect] = React80.useState(null);
|
|
22002
|
+
React80.useEffect(() => {
|
|
22003
|
+
if (itemRef) {
|
|
22004
|
+
setRect(itemRef.getBoundingClientRect());
|
|
22005
|
+
}
|
|
22006
|
+
}, [itemRef]);
|
|
22007
|
+
if (!rect) return null;
|
|
22008
|
+
const isRtl = direction === "rtl";
|
|
22009
|
+
const style = {
|
|
22010
|
+
top: rect.top,
|
|
22011
|
+
...isRtl ? { right: window.innerWidth - rect.left } : { left: rect.right }
|
|
22012
|
+
};
|
|
22013
|
+
const panel = /* @__PURE__ */ jsxRuntime.jsx(
|
|
22014
|
+
"div",
|
|
22015
|
+
{
|
|
22016
|
+
className: cn("fixed z-50", menuContainerStyles),
|
|
22017
|
+
style,
|
|
22018
|
+
children: items.map((item, index) => {
|
|
22019
|
+
const isDivider = item.id === "divider" || item.label === "divider";
|
|
22020
|
+
const itemId = item.id ?? `item-${item.label.toLowerCase().replace(/\s+/g, "-")}-${index}`;
|
|
22021
|
+
const isDanger = item.variant === "danger";
|
|
22022
|
+
if (isDivider) {
|
|
22023
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Divider, { className: "my-1" }, `divider-${index}`);
|
|
22024
|
+
}
|
|
22025
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
22026
|
+
Box,
|
|
22027
|
+
{
|
|
22028
|
+
as: "button",
|
|
22029
|
+
onClick: () => {
|
|
22030
|
+
if (item.disabled) return;
|
|
22031
|
+
if (item.event) eventBus.emit(`UI:${item.event}`, { itemId, label: item.label });
|
|
22032
|
+
item.onClick?.();
|
|
22033
|
+
},
|
|
22034
|
+
"aria-disabled": item.disabled || void 0,
|
|
22035
|
+
"data-testid": item.event ? `action-${item.event}` : void 0,
|
|
22036
|
+
className: cn(
|
|
22037
|
+
"w-full flex items-center gap-3 px-4 py-2 text-start",
|
|
22038
|
+
"text-sm transition-colors",
|
|
22039
|
+
"hover:bg-muted focus:outline-none focus:bg-muted",
|
|
22040
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
22041
|
+
item.disabled && "cursor-not-allowed",
|
|
22042
|
+
isDanger && "text-error hover:bg-error/10"
|
|
22043
|
+
),
|
|
22044
|
+
children: [
|
|
22045
|
+
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" })),
|
|
22046
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: cn("flex-1", isDanger && "text-red-600"), children: item.label }),
|
|
22047
|
+
item.badge !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto text-xs font-medium", children: item.badge })
|
|
22048
|
+
]
|
|
22049
|
+
},
|
|
22050
|
+
itemId
|
|
22051
|
+
);
|
|
22052
|
+
})
|
|
22053
|
+
}
|
|
22054
|
+
);
|
|
22055
|
+
return typeof document !== "undefined" ? reactDom.createPortal(panel, document.body) : panel;
|
|
22056
|
+
}
|
|
22057
|
+
var MENU_GAP, menuContainerStyles, Menu;
|
|
21988
22058
|
var init_Menu = __esm({
|
|
21989
22059
|
"components/core/molecules/Menu.tsx"() {
|
|
21990
22060
|
"use client";
|
|
@@ -21995,6 +22065,14 @@ var init_Menu = __esm({
|
|
|
21995
22065
|
init_Badge();
|
|
21996
22066
|
init_cn();
|
|
21997
22067
|
init_useEventBus();
|
|
22068
|
+
MENU_GAP = 4;
|
|
22069
|
+
menuContainerStyles = cn(
|
|
22070
|
+
"bg-card",
|
|
22071
|
+
"border-[length:var(--border-width)] border-border",
|
|
22072
|
+
"shadow-elevation-popover",
|
|
22073
|
+
"rounded-sm",
|
|
22074
|
+
"min-w-0 sm:min-w-[200px] max-w-[calc(100vw-1rem)] py-1"
|
|
22075
|
+
);
|
|
21998
22076
|
Menu = ({
|
|
21999
22077
|
trigger,
|
|
22000
22078
|
items,
|
|
@@ -22002,9 +22080,10 @@ var init_Menu = __esm({
|
|
|
22002
22080
|
className
|
|
22003
22081
|
}) => {
|
|
22004
22082
|
const eventBus = useEventBus();
|
|
22005
|
-
const {
|
|
22083
|
+
const { direction } = hooks.useTranslate();
|
|
22006
22084
|
const [isOpen, setIsOpen] = React80.useState(false);
|
|
22007
22085
|
const [activeSubMenu, setActiveSubMenu] = React80.useState(null);
|
|
22086
|
+
const [activeSubMenuRef, setActiveSubMenuRef] = React80.useState(null);
|
|
22008
22087
|
const [triggerRect, setTriggerRect] = React80.useState(null);
|
|
22009
22088
|
const triggerRef = React80.useRef(null);
|
|
22010
22089
|
const menuRef = React80.useRef(null);
|
|
@@ -22019,13 +22098,14 @@ var init_Menu = __esm({
|
|
|
22019
22098
|
}
|
|
22020
22099
|
setIsOpen(!isOpen);
|
|
22021
22100
|
setActiveSubMenu(null);
|
|
22101
|
+
setActiveSubMenuRef(null);
|
|
22022
22102
|
};
|
|
22023
|
-
const handleItemClick = (item) => {
|
|
22103
|
+
const handleItemClick = (item, itemId) => {
|
|
22024
22104
|
if (item.disabled) return;
|
|
22025
22105
|
if (item.subMenu && item.subMenu.length > 0) {
|
|
22026
|
-
setActiveSubMenu(
|
|
22106
|
+
setActiveSubMenu(itemId);
|
|
22027
22107
|
} else {
|
|
22028
|
-
if (item.event) eventBus.emit(`UI:${item.event}`, { itemId
|
|
22108
|
+
if (item.event) eventBus.emit(`UI:${item.event}`, { itemId, label: item.label });
|
|
22029
22109
|
item.onClick?.();
|
|
22030
22110
|
setIsOpen(false);
|
|
22031
22111
|
}
|
|
@@ -22040,22 +22120,12 @@ var init_Menu = __esm({
|
|
|
22040
22120
|
if (isOpen && menuRef.current && !menuRef.current.contains(e.target) && triggerRef.current && !triggerRef.current.contains(e.target)) {
|
|
22041
22121
|
setIsOpen(false);
|
|
22042
22122
|
setActiveSubMenu(null);
|
|
22123
|
+
setActiveSubMenuRef(null);
|
|
22043
22124
|
}
|
|
22044
22125
|
};
|
|
22045
22126
|
document.addEventListener("mousedown", handleClickOutside);
|
|
22046
22127
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
22047
22128
|
}, [isOpen]);
|
|
22048
|
-
const positionClasses = {
|
|
22049
|
-
"top-left": "bottom-full left-0 mb-2",
|
|
22050
|
-
"top-right": "bottom-full right-0 mb-2",
|
|
22051
|
-
"bottom-left": "top-full left-0 mt-2",
|
|
22052
|
-
"bottom-right": "top-full right-0 mt-2",
|
|
22053
|
-
// Aliases for pattern compatibility
|
|
22054
|
-
"top-start": "bottom-full left-0 mb-2",
|
|
22055
|
-
"top-end": "bottom-full right-0 mb-2",
|
|
22056
|
-
"bottom-start": "top-full left-0 mt-2",
|
|
22057
|
-
"bottom-end": "top-full right-0 mt-2"
|
|
22058
|
-
};
|
|
22059
22129
|
const rtlMirror = {
|
|
22060
22130
|
"top-left": "top-right",
|
|
22061
22131
|
"top-right": "top-left",
|
|
@@ -22067,7 +22137,6 @@ var init_Menu = __esm({
|
|
|
22067
22137
|
"bottom-end": "bottom-start"
|
|
22068
22138
|
};
|
|
22069
22139
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
22070
|
-
const subMenuSideClass = direction === "rtl" ? "right-full mr-2" : "left-full ml-2";
|
|
22071
22140
|
const triggerChild = React80__namespace.default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
22072
22141
|
const triggerElement = React80__namespace.default.cloneElement(
|
|
22073
22142
|
triggerChild,
|
|
@@ -22076,94 +22145,83 @@ var init_Menu = __esm({
|
|
|
22076
22145
|
onClick: handleToggle
|
|
22077
22146
|
}
|
|
22078
22147
|
);
|
|
22079
|
-
const
|
|
22080
|
-
"
|
|
22081
|
-
"border-[length:var(--border-width)] border-border",
|
|
22082
|
-
"shadow-elevation-popover",
|
|
22083
|
-
"rounded-sm",
|
|
22084
|
-
"min-w-0 sm:min-w-[200px] max-w-[calc(100vw-1rem)] py-1"
|
|
22085
|
-
);
|
|
22086
|
-
const renderMenuItem = (item, hasSubMenu, index) => {
|
|
22148
|
+
const renderMenuItems = (menuItems) => menuItems.map((item, index) => {
|
|
22149
|
+
const isDivider = item.id === "divider" || item.label === "divider";
|
|
22087
22150
|
const itemId = item.id ?? `item-${item.label.toLowerCase().replace(/\s+/g, "-")}-${index}`;
|
|
22151
|
+
const hasSubMenu = !!(item.subMenu && item.subMenu.length > 0);
|
|
22088
22152
|
const isDanger = item.variant === "danger";
|
|
22089
|
-
|
|
22090
|
-
|
|
22091
|
-
|
|
22092
|
-
|
|
22093
|
-
|
|
22094
|
-
|
|
22095
|
-
|
|
22096
|
-
|
|
22097
|
-
|
|
22098
|
-
"
|
|
22099
|
-
|
|
22100
|
-
|
|
22101
|
-
|
|
22102
|
-
|
|
22103
|
-
item.disabled && "cursor-not-allowed",
|
|
22104
|
-
isDanger && "text-error hover:bg-error/10"
|
|
22105
|
-
),
|
|
22106
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "flex items-center gap-3 flex-1 min-w-0", children: [
|
|
22107
|
-
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" })),
|
|
22108
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22109
|
-
Typography,
|
|
22110
|
-
{
|
|
22111
|
-
variant: "small",
|
|
22112
|
-
className: cn("flex-1", isDanger && "text-red-600"),
|
|
22113
|
-
children: item.label
|
|
22153
|
+
if (isDivider) {
|
|
22154
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Divider, { className: "my-1" }, `divider-${index}`);
|
|
22155
|
+
}
|
|
22156
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Box, { children: [
|
|
22157
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22158
|
+
Box,
|
|
22159
|
+
{
|
|
22160
|
+
as: "button",
|
|
22161
|
+
onClick: () => handleItemClick({ ...item, id: itemId }, itemId),
|
|
22162
|
+
"aria-disabled": item.disabled || void 0,
|
|
22163
|
+
onMouseEnter: (e) => {
|
|
22164
|
+
if (hasSubMenu) {
|
|
22165
|
+
setActiveSubMenu(itemId);
|
|
22166
|
+
setActiveSubMenuRef(e.currentTarget);
|
|
22114
22167
|
}
|
|
22168
|
+
},
|
|
22169
|
+
"data-testid": item.event ? `action-${item.event}` : void 0,
|
|
22170
|
+
className: cn(
|
|
22171
|
+
"w-full flex items-center justify-between gap-3 px-4 py-2 text-start",
|
|
22172
|
+
"text-sm transition-colors",
|
|
22173
|
+
"hover:bg-muted",
|
|
22174
|
+
"focus:outline-none focus:bg-muted",
|
|
22175
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
22176
|
+
item.disabled && "cursor-not-allowed",
|
|
22177
|
+
isDanger && "text-error hover:bg-error/10"
|
|
22115
22178
|
),
|
|
22116
|
-
|
|
22117
|
-
|
|
22118
|
-
|
|
22119
|
-
|
|
22120
|
-
|
|
22121
|
-
|
|
22122
|
-
|
|
22123
|
-
|
|
22124
|
-
|
|
22125
|
-
const hasSubMenu = item.subMenu && item.subMenu.length > 0;
|
|
22126
|
-
const isDivider = item.id === "divider" || item.label === "divider";
|
|
22127
|
-
const itemId = item.id ?? `item-${item.label.toLowerCase().replace(/\s+/g, "-")}-${index}`;
|
|
22128
|
-
if (isDivider) {
|
|
22129
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Divider, { className: "my-1" }, `divider-${index}`);
|
|
22130
|
-
}
|
|
22131
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Box, { children: [
|
|
22132
|
-
renderMenuItem(item, !!hasSubMenu, index),
|
|
22133
|
-
hasSubMenu && activeSubMenu === itemId && item.subMenu && /* @__PURE__ */ jsxRuntime.jsx(
|
|
22134
|
-
Box,
|
|
22135
|
-
{
|
|
22136
|
-
className: cn(
|
|
22137
|
-
"absolute top-0 z-50",
|
|
22138
|
-
subMenuSideClass,
|
|
22139
|
-
menuContainerStyles
|
|
22179
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "flex items-center gap-3 flex-1 min-w-0", children: [
|
|
22180
|
+
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" })),
|
|
22181
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22182
|
+
Typography,
|
|
22183
|
+
{
|
|
22184
|
+
variant: "small",
|
|
22185
|
+
className: cn("flex-1", isDanger && "text-red-600"),
|
|
22186
|
+
children: item.label
|
|
22187
|
+
}
|
|
22140
22188
|
),
|
|
22141
|
-
children:
|
|
22142
|
-
|
|
22143
|
-
|
|
22144
|
-
|
|
22145
|
-
|
|
22146
|
-
|
|
22147
|
-
|
|
22189
|
+
item.badge !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "default", size: "sm", children: item.badge }),
|
|
22190
|
+
hasSubMenu && /* @__PURE__ */ jsxRuntime.jsx(
|
|
22191
|
+
Icon,
|
|
22192
|
+
{
|
|
22193
|
+
name: direction === "rtl" ? "chevron-left" : "chevron-right",
|
|
22194
|
+
size: "sm",
|
|
22195
|
+
className: "flex-shrink-0"
|
|
22196
|
+
}
|
|
22197
|
+
)
|
|
22198
|
+
] })
|
|
22199
|
+
}
|
|
22200
|
+
),
|
|
22201
|
+
hasSubMenu && activeSubMenu === itemId && item.subMenu && /* @__PURE__ */ jsxRuntime.jsx(
|
|
22202
|
+
SubMenu,
|
|
22203
|
+
{
|
|
22204
|
+
items: item.subMenu,
|
|
22205
|
+
itemRef: activeSubMenuRef,
|
|
22206
|
+
direction,
|
|
22207
|
+
eventBus
|
|
22208
|
+
}
|
|
22209
|
+
)
|
|
22210
|
+
] }, itemId);
|
|
22211
|
+
});
|
|
22212
|
+
const panel = isOpen && triggerRect ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
22213
|
+
"div",
|
|
22214
|
+
{
|
|
22215
|
+
ref: menuRef,
|
|
22216
|
+
className: cn("fixed z-50", menuContainerStyles, className),
|
|
22217
|
+
style: computeMenuStyle(effectivePosition, triggerRect),
|
|
22218
|
+
role: "menu",
|
|
22219
|
+
children: renderMenuItems(items)
|
|
22220
|
+
}
|
|
22221
|
+
) : null;
|
|
22222
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
22148
22223
|
triggerElement,
|
|
22149
|
-
|
|
22150
|
-
Box,
|
|
22151
|
-
{
|
|
22152
|
-
ref: menuRef,
|
|
22153
|
-
className: cn(
|
|
22154
|
-
"absolute z-50",
|
|
22155
|
-
menuContainerStyles,
|
|
22156
|
-
positionClasses[effectivePosition],
|
|
22157
|
-
className
|
|
22158
|
-
),
|
|
22159
|
-
style: {
|
|
22160
|
-
left: effectivePosition.includes("left") ? 0 : "auto",
|
|
22161
|
-
right: effectivePosition.includes("right") ? 0 : "auto"
|
|
22162
|
-
},
|
|
22163
|
-
role: "menu",
|
|
22164
|
-
children: renderMenuItems(items)
|
|
22165
|
-
}
|
|
22166
|
-
)
|
|
22224
|
+
panel && typeof document !== "undefined" ? reactDom.createPortal(panel, document.body) : panel
|
|
22167
22225
|
] });
|
|
22168
22226
|
};
|
|
22169
22227
|
Menu.displayName = "Menu";
|
|
@@ -36569,7 +36627,6 @@ var init_DocumentViewer = __esm({
|
|
|
36569
36627
|
showPrint = false,
|
|
36570
36628
|
actions,
|
|
36571
36629
|
documents,
|
|
36572
|
-
entity,
|
|
36573
36630
|
isLoading = false,
|
|
36574
36631
|
error,
|
|
36575
36632
|
className
|
|
@@ -43365,7 +43422,7 @@ function TraitSlot({
|
|
|
43365
43422
|
size = "md",
|
|
43366
43423
|
showTooltip = true,
|
|
43367
43424
|
categoryColors,
|
|
43368
|
-
tooltipFrameUrl,
|
|
43425
|
+
tooltipFrameUrl = "",
|
|
43369
43426
|
className,
|
|
43370
43427
|
feedback,
|
|
43371
43428
|
onItemDrop,
|
|
@@ -46221,7 +46278,7 @@ var init_WorldMapBoard = __esm({
|
|
|
46221
46278
|
init_useEventBus();
|
|
46222
46279
|
init_Stack();
|
|
46223
46280
|
init_LoadingState();
|
|
46224
|
-
|
|
46281
|
+
init_IsometricCanvas();
|
|
46225
46282
|
init_boardEntity();
|
|
46226
46283
|
init_isometric();
|
|
46227
46284
|
WorldMapBoard.displayName = "WorldMapBoard";
|
|
@@ -46277,7 +46334,7 @@ function lazyThree(name, loader) {
|
|
|
46277
46334
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
46278
46335
|
return ThreeWrapper;
|
|
46279
46336
|
}
|
|
46280
|
-
var FeatureRenderer, COMPONENT_REGISTRY;
|
|
46337
|
+
var FeatureRenderer, GameCanvas3D, GameCanvas3DBattleTemplate, GameCanvas3DCastleTemplate, GameCanvas3DWorldMapTemplate, COMPONENT_REGISTRY;
|
|
46281
46338
|
var init_component_registry_generated = __esm({
|
|
46282
46339
|
"components/core/organisms/component-registry.generated.ts"() {
|
|
46283
46340
|
init_AboutPageTemplate();
|
|
@@ -46563,7 +46620,11 @@ var init_component_registry_generated = __esm({
|
|
|
46563
46620
|
init_WorldMapBoard();
|
|
46564
46621
|
init_WorldMapTemplate();
|
|
46565
46622
|
init_XPBar();
|
|
46566
|
-
FeatureRenderer = lazyThree("FeatureRenderer", () => import('@almadar/ui/components/
|
|
46623
|
+
FeatureRenderer = lazyThree("FeatureRenderer", () => import('@almadar/ui/components/molecules/game/three'));
|
|
46624
|
+
GameCanvas3D = lazyThree("GameCanvas3D", () => import('@almadar/ui/components/molecules/game/three'));
|
|
46625
|
+
GameCanvas3DBattleTemplate = lazyThree("GameCanvas3DBattleTemplate", () => import('@almadar/ui/components/molecules/game/three'));
|
|
46626
|
+
GameCanvas3DCastleTemplate = lazyThree("GameCanvas3DCastleTemplate", () => import('@almadar/ui/components/molecules/game/three'));
|
|
46627
|
+
GameCanvas3DWorldMapTemplate = lazyThree("GameCanvas3DWorldMapTemplate", () => import('@almadar/ui/components/molecules/game/three'));
|
|
46567
46628
|
COMPONENT_REGISTRY = {
|
|
46568
46629
|
"AboutPageTemplate": AboutPageTemplate,
|
|
46569
46630
|
"Accordion": Accordion,
|
|
@@ -46676,6 +46737,10 @@ var init_component_registry_generated = __esm({
|
|
|
46676
46737
|
"GameAudioProvider": GameAudioProvider,
|
|
46677
46738
|
"GameAudioToggle": GameAudioToggle,
|
|
46678
46739
|
"GameCanvas2D": GameCanvas2D,
|
|
46740
|
+
"GameCanvas3D": GameCanvas3D,
|
|
46741
|
+
"GameCanvas3DBattleTemplate": GameCanvas3DBattleTemplate,
|
|
46742
|
+
"GameCanvas3DCastleTemplate": GameCanvas3DCastleTemplate,
|
|
46743
|
+
"GameCanvas3DWorldMapTemplate": GameCanvas3DWorldMapTemplate,
|
|
46679
46744
|
"GameHud": GameHud,
|
|
46680
46745
|
"GameMenu": GameMenu,
|
|
46681
46746
|
"GameOverScreen": GameOverScreen,
|