@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.js
CHANGED
|
@@ -11444,13 +11444,6 @@ var init_IsometricCanvas = __esm({
|
|
|
11444
11444
|
}
|
|
11445
11445
|
});
|
|
11446
11446
|
|
|
11447
|
-
// components/game/organisms/IsometricCanvas.tsx
|
|
11448
|
-
var init_IsometricCanvas2 = __esm({
|
|
11449
|
-
"components/game/organisms/IsometricCanvas.tsx"() {
|
|
11450
|
-
init_IsometricCanvas();
|
|
11451
|
-
}
|
|
11452
|
-
});
|
|
11453
|
-
|
|
11454
11447
|
// components/game/organisms/boardEntity.ts
|
|
11455
11448
|
function boardEntity(entity) {
|
|
11456
11449
|
if (!entity) return void 0;
|
|
@@ -11846,7 +11839,7 @@ var init_BattleBoard = __esm({
|
|
|
11846
11839
|
init_Button();
|
|
11847
11840
|
init_Typography();
|
|
11848
11841
|
init_Stack();
|
|
11849
|
-
|
|
11842
|
+
init_IsometricCanvas();
|
|
11850
11843
|
init_boardEntity();
|
|
11851
11844
|
init_isometric();
|
|
11852
11845
|
BattleBoard.displayName = "BattleBoard";
|
|
@@ -19761,7 +19754,7 @@ var init_CastleBoard = __esm({
|
|
|
19761
19754
|
"use client";
|
|
19762
19755
|
init_cn();
|
|
19763
19756
|
init_useEventBus();
|
|
19764
|
-
|
|
19757
|
+
init_IsometricCanvas();
|
|
19765
19758
|
init_boardEntity();
|
|
19766
19759
|
init_isometric();
|
|
19767
19760
|
CastleBoard.displayName = "CastleBoard";
|
|
@@ -21935,7 +21928,84 @@ var init_DashboardLayout = __esm({
|
|
|
21935
21928
|
NavLinkBottom.displayName = "NavLinkBottom";
|
|
21936
21929
|
}
|
|
21937
21930
|
});
|
|
21938
|
-
|
|
21931
|
+
function computeMenuStyle(position, triggerRect) {
|
|
21932
|
+
const isTop = position.startsWith("top");
|
|
21933
|
+
const isRight = position.endsWith("right") || position.endsWith("end");
|
|
21934
|
+
if (isTop) {
|
|
21935
|
+
return {
|
|
21936
|
+
top: triggerRect.top - MENU_GAP,
|
|
21937
|
+
transform: "translateY(-100%)",
|
|
21938
|
+
...isRight ? { right: window.innerWidth - triggerRect.right } : { left: triggerRect.left }
|
|
21939
|
+
};
|
|
21940
|
+
}
|
|
21941
|
+
return {
|
|
21942
|
+
top: triggerRect.bottom + MENU_GAP,
|
|
21943
|
+
...isRight ? { right: window.innerWidth - triggerRect.right } : { left: triggerRect.left }
|
|
21944
|
+
};
|
|
21945
|
+
}
|
|
21946
|
+
function SubMenu({
|
|
21947
|
+
items,
|
|
21948
|
+
itemRef,
|
|
21949
|
+
direction,
|
|
21950
|
+
eventBus
|
|
21951
|
+
}) {
|
|
21952
|
+
const [rect, setRect] = useState(null);
|
|
21953
|
+
useEffect(() => {
|
|
21954
|
+
if (itemRef) {
|
|
21955
|
+
setRect(itemRef.getBoundingClientRect());
|
|
21956
|
+
}
|
|
21957
|
+
}, [itemRef]);
|
|
21958
|
+
if (!rect) return null;
|
|
21959
|
+
const isRtl = direction === "rtl";
|
|
21960
|
+
const style = {
|
|
21961
|
+
top: rect.top,
|
|
21962
|
+
...isRtl ? { right: window.innerWidth - rect.left } : { left: rect.right }
|
|
21963
|
+
};
|
|
21964
|
+
const panel = /* @__PURE__ */ jsx(
|
|
21965
|
+
"div",
|
|
21966
|
+
{
|
|
21967
|
+
className: cn("fixed z-50", menuContainerStyles),
|
|
21968
|
+
style,
|
|
21969
|
+
children: items.map((item, index) => {
|
|
21970
|
+
const isDivider = item.id === "divider" || item.label === "divider";
|
|
21971
|
+
const itemId = item.id ?? `item-${item.label.toLowerCase().replace(/\s+/g, "-")}-${index}`;
|
|
21972
|
+
const isDanger = item.variant === "danger";
|
|
21973
|
+
if (isDivider) {
|
|
21974
|
+
return /* @__PURE__ */ jsx(Divider, { className: "my-1" }, `divider-${index}`);
|
|
21975
|
+
}
|
|
21976
|
+
return /* @__PURE__ */ jsxs(
|
|
21977
|
+
Box,
|
|
21978
|
+
{
|
|
21979
|
+
as: "button",
|
|
21980
|
+
onClick: () => {
|
|
21981
|
+
if (item.disabled) return;
|
|
21982
|
+
if (item.event) eventBus.emit(`UI:${item.event}`, { itemId, label: item.label });
|
|
21983
|
+
item.onClick?.();
|
|
21984
|
+
},
|
|
21985
|
+
"aria-disabled": item.disabled || void 0,
|
|
21986
|
+
"data-testid": item.event ? `action-${item.event}` : void 0,
|
|
21987
|
+
className: cn(
|
|
21988
|
+
"w-full flex items-center gap-3 px-4 py-2 text-start",
|
|
21989
|
+
"text-sm transition-colors",
|
|
21990
|
+
"hover:bg-muted focus:outline-none focus:bg-muted",
|
|
21991
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
21992
|
+
item.disabled && "cursor-not-allowed",
|
|
21993
|
+
isDanger && "text-error hover:bg-error/10"
|
|
21994
|
+
),
|
|
21995
|
+
children: [
|
|
21996
|
+
item.icon && (typeof item.icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: item.icon, size: "sm", className: "flex-shrink-0" }) : /* @__PURE__ */ jsx(Icon, { icon: item.icon, size: "sm", className: "flex-shrink-0" })),
|
|
21997
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: cn("flex-1", isDanger && "text-red-600"), children: item.label }),
|
|
21998
|
+
item.badge !== void 0 && /* @__PURE__ */ jsx("span", { className: "ml-auto text-xs font-medium", children: item.badge })
|
|
21999
|
+
]
|
|
22000
|
+
},
|
|
22001
|
+
itemId
|
|
22002
|
+
);
|
|
22003
|
+
})
|
|
22004
|
+
}
|
|
22005
|
+
);
|
|
22006
|
+
return typeof document !== "undefined" ? createPortal(panel, document.body) : panel;
|
|
22007
|
+
}
|
|
22008
|
+
var MENU_GAP, menuContainerStyles, Menu;
|
|
21939
22009
|
var init_Menu = __esm({
|
|
21940
22010
|
"components/core/molecules/Menu.tsx"() {
|
|
21941
22011
|
"use client";
|
|
@@ -21946,6 +22016,14 @@ var init_Menu = __esm({
|
|
|
21946
22016
|
init_Badge();
|
|
21947
22017
|
init_cn();
|
|
21948
22018
|
init_useEventBus();
|
|
22019
|
+
MENU_GAP = 4;
|
|
22020
|
+
menuContainerStyles = cn(
|
|
22021
|
+
"bg-card",
|
|
22022
|
+
"border-[length:var(--border-width)] border-border",
|
|
22023
|
+
"shadow-elevation-popover",
|
|
22024
|
+
"rounded-sm",
|
|
22025
|
+
"min-w-0 sm:min-w-[200px] max-w-[calc(100vw-1rem)] py-1"
|
|
22026
|
+
);
|
|
21949
22027
|
Menu = ({
|
|
21950
22028
|
trigger,
|
|
21951
22029
|
items,
|
|
@@ -21953,9 +22031,10 @@ var init_Menu = __esm({
|
|
|
21953
22031
|
className
|
|
21954
22032
|
}) => {
|
|
21955
22033
|
const eventBus = useEventBus();
|
|
21956
|
-
const {
|
|
22034
|
+
const { direction } = useTranslate();
|
|
21957
22035
|
const [isOpen, setIsOpen] = useState(false);
|
|
21958
22036
|
const [activeSubMenu, setActiveSubMenu] = useState(null);
|
|
22037
|
+
const [activeSubMenuRef, setActiveSubMenuRef] = useState(null);
|
|
21959
22038
|
const [triggerRect, setTriggerRect] = useState(null);
|
|
21960
22039
|
const triggerRef = useRef(null);
|
|
21961
22040
|
const menuRef = useRef(null);
|
|
@@ -21970,13 +22049,14 @@ var init_Menu = __esm({
|
|
|
21970
22049
|
}
|
|
21971
22050
|
setIsOpen(!isOpen);
|
|
21972
22051
|
setActiveSubMenu(null);
|
|
22052
|
+
setActiveSubMenuRef(null);
|
|
21973
22053
|
};
|
|
21974
|
-
const handleItemClick = (item) => {
|
|
22054
|
+
const handleItemClick = (item, itemId) => {
|
|
21975
22055
|
if (item.disabled) return;
|
|
21976
22056
|
if (item.subMenu && item.subMenu.length > 0) {
|
|
21977
|
-
setActiveSubMenu(
|
|
22057
|
+
setActiveSubMenu(itemId);
|
|
21978
22058
|
} else {
|
|
21979
|
-
if (item.event) eventBus.emit(`UI:${item.event}`, { itemId
|
|
22059
|
+
if (item.event) eventBus.emit(`UI:${item.event}`, { itemId, label: item.label });
|
|
21980
22060
|
item.onClick?.();
|
|
21981
22061
|
setIsOpen(false);
|
|
21982
22062
|
}
|
|
@@ -21991,22 +22071,12 @@ var init_Menu = __esm({
|
|
|
21991
22071
|
if (isOpen && menuRef.current && !menuRef.current.contains(e.target) && triggerRef.current && !triggerRef.current.contains(e.target)) {
|
|
21992
22072
|
setIsOpen(false);
|
|
21993
22073
|
setActiveSubMenu(null);
|
|
22074
|
+
setActiveSubMenuRef(null);
|
|
21994
22075
|
}
|
|
21995
22076
|
};
|
|
21996
22077
|
document.addEventListener("mousedown", handleClickOutside);
|
|
21997
22078
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
21998
22079
|
}, [isOpen]);
|
|
21999
|
-
const positionClasses = {
|
|
22000
|
-
"top-left": "bottom-full left-0 mb-2",
|
|
22001
|
-
"top-right": "bottom-full right-0 mb-2",
|
|
22002
|
-
"bottom-left": "top-full left-0 mt-2",
|
|
22003
|
-
"bottom-right": "top-full right-0 mt-2",
|
|
22004
|
-
// Aliases for pattern compatibility
|
|
22005
|
-
"top-start": "bottom-full left-0 mb-2",
|
|
22006
|
-
"top-end": "bottom-full right-0 mb-2",
|
|
22007
|
-
"bottom-start": "top-full left-0 mt-2",
|
|
22008
|
-
"bottom-end": "top-full right-0 mt-2"
|
|
22009
|
-
};
|
|
22010
22080
|
const rtlMirror = {
|
|
22011
22081
|
"top-left": "top-right",
|
|
22012
22082
|
"top-right": "top-left",
|
|
@@ -22018,7 +22088,6 @@ var init_Menu = __esm({
|
|
|
22018
22088
|
"bottom-end": "bottom-start"
|
|
22019
22089
|
};
|
|
22020
22090
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
22021
|
-
const subMenuSideClass = direction === "rtl" ? "right-full mr-2" : "left-full ml-2";
|
|
22022
22091
|
const triggerChild = React80__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
22023
22092
|
const triggerElement = React80__default.cloneElement(
|
|
22024
22093
|
triggerChild,
|
|
@@ -22027,94 +22096,83 @@ var init_Menu = __esm({
|
|
|
22027
22096
|
onClick: handleToggle
|
|
22028
22097
|
}
|
|
22029
22098
|
);
|
|
22030
|
-
const
|
|
22031
|
-
"
|
|
22032
|
-
"border-[length:var(--border-width)] border-border",
|
|
22033
|
-
"shadow-elevation-popover",
|
|
22034
|
-
"rounded-sm",
|
|
22035
|
-
"min-w-0 sm:min-w-[200px] max-w-[calc(100vw-1rem)] py-1"
|
|
22036
|
-
);
|
|
22037
|
-
const renderMenuItem = (item, hasSubMenu, index) => {
|
|
22099
|
+
const renderMenuItems = (menuItems) => menuItems.map((item, index) => {
|
|
22100
|
+
const isDivider = item.id === "divider" || item.label === "divider";
|
|
22038
22101
|
const itemId = item.id ?? `item-${item.label.toLowerCase().replace(/\s+/g, "-")}-${index}`;
|
|
22102
|
+
const hasSubMenu = !!(item.subMenu && item.subMenu.length > 0);
|
|
22039
22103
|
const isDanger = item.variant === "danger";
|
|
22040
|
-
|
|
22041
|
-
|
|
22042
|
-
|
|
22043
|
-
|
|
22044
|
-
|
|
22045
|
-
|
|
22046
|
-
|
|
22047
|
-
|
|
22048
|
-
|
|
22049
|
-
"
|
|
22050
|
-
|
|
22051
|
-
|
|
22052
|
-
|
|
22053
|
-
|
|
22054
|
-
item.disabled && "cursor-not-allowed",
|
|
22055
|
-
isDanger && "text-error hover:bg-error/10"
|
|
22056
|
-
),
|
|
22057
|
-
children: /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-3 flex-1 min-w-0", children: [
|
|
22058
|
-
item.icon && (typeof item.icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: item.icon, size: "sm", className: "flex-shrink-0" }) : /* @__PURE__ */ jsx(Icon, { icon: item.icon, size: "sm", className: "flex-shrink-0" })),
|
|
22059
|
-
/* @__PURE__ */ jsx(
|
|
22060
|
-
Typography,
|
|
22061
|
-
{
|
|
22062
|
-
variant: "small",
|
|
22063
|
-
className: cn("flex-1", isDanger && "text-red-600"),
|
|
22064
|
-
children: item.label
|
|
22104
|
+
if (isDivider) {
|
|
22105
|
+
return /* @__PURE__ */ jsx(Divider, { className: "my-1" }, `divider-${index}`);
|
|
22106
|
+
}
|
|
22107
|
+
return /* @__PURE__ */ jsxs(Box, { children: [
|
|
22108
|
+
/* @__PURE__ */ jsx(
|
|
22109
|
+
Box,
|
|
22110
|
+
{
|
|
22111
|
+
as: "button",
|
|
22112
|
+
onClick: () => handleItemClick({ ...item, id: itemId }, itemId),
|
|
22113
|
+
"aria-disabled": item.disabled || void 0,
|
|
22114
|
+
onMouseEnter: (e) => {
|
|
22115
|
+
if (hasSubMenu) {
|
|
22116
|
+
setActiveSubMenu(itemId);
|
|
22117
|
+
setActiveSubMenuRef(e.currentTarget);
|
|
22065
22118
|
}
|
|
22119
|
+
},
|
|
22120
|
+
"data-testid": item.event ? `action-${item.event}` : void 0,
|
|
22121
|
+
className: cn(
|
|
22122
|
+
"w-full flex items-center justify-between gap-3 px-4 py-2 text-start",
|
|
22123
|
+
"text-sm transition-colors",
|
|
22124
|
+
"hover:bg-muted",
|
|
22125
|
+
"focus:outline-none focus:bg-muted",
|
|
22126
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
22127
|
+
item.disabled && "cursor-not-allowed",
|
|
22128
|
+
isDanger && "text-error hover:bg-error/10"
|
|
22066
22129
|
),
|
|
22067
|
-
|
|
22068
|
-
|
|
22069
|
-
|
|
22070
|
-
|
|
22071
|
-
|
|
22072
|
-
|
|
22073
|
-
|
|
22074
|
-
|
|
22075
|
-
|
|
22076
|
-
const hasSubMenu = item.subMenu && item.subMenu.length > 0;
|
|
22077
|
-
const isDivider = item.id === "divider" || item.label === "divider";
|
|
22078
|
-
const itemId = item.id ?? `item-${item.label.toLowerCase().replace(/\s+/g, "-")}-${index}`;
|
|
22079
|
-
if (isDivider) {
|
|
22080
|
-
return /* @__PURE__ */ jsx(Divider, { className: "my-1" }, `divider-${index}`);
|
|
22081
|
-
}
|
|
22082
|
-
return /* @__PURE__ */ jsxs(Box, { children: [
|
|
22083
|
-
renderMenuItem(item, !!hasSubMenu, index),
|
|
22084
|
-
hasSubMenu && activeSubMenu === itemId && item.subMenu && /* @__PURE__ */ jsx(
|
|
22085
|
-
Box,
|
|
22086
|
-
{
|
|
22087
|
-
className: cn(
|
|
22088
|
-
"absolute top-0 z-50",
|
|
22089
|
-
subMenuSideClass,
|
|
22090
|
-
menuContainerStyles
|
|
22130
|
+
children: /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-3 flex-1 min-w-0", children: [
|
|
22131
|
+
item.icon && (typeof item.icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: item.icon, size: "sm", className: "flex-shrink-0" }) : /* @__PURE__ */ jsx(Icon, { icon: item.icon, size: "sm", className: "flex-shrink-0" })),
|
|
22132
|
+
/* @__PURE__ */ jsx(
|
|
22133
|
+
Typography,
|
|
22134
|
+
{
|
|
22135
|
+
variant: "small",
|
|
22136
|
+
className: cn("flex-1", isDanger && "text-red-600"),
|
|
22137
|
+
children: item.label
|
|
22138
|
+
}
|
|
22091
22139
|
),
|
|
22092
|
-
children:
|
|
22093
|
-
|
|
22094
|
-
|
|
22095
|
-
|
|
22096
|
-
|
|
22097
|
-
|
|
22098
|
-
|
|
22140
|
+
item.badge !== void 0 && /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", children: item.badge }),
|
|
22141
|
+
hasSubMenu && /* @__PURE__ */ jsx(
|
|
22142
|
+
Icon,
|
|
22143
|
+
{
|
|
22144
|
+
name: direction === "rtl" ? "chevron-left" : "chevron-right",
|
|
22145
|
+
size: "sm",
|
|
22146
|
+
className: "flex-shrink-0"
|
|
22147
|
+
}
|
|
22148
|
+
)
|
|
22149
|
+
] })
|
|
22150
|
+
}
|
|
22151
|
+
),
|
|
22152
|
+
hasSubMenu && activeSubMenu === itemId && item.subMenu && /* @__PURE__ */ jsx(
|
|
22153
|
+
SubMenu,
|
|
22154
|
+
{
|
|
22155
|
+
items: item.subMenu,
|
|
22156
|
+
itemRef: activeSubMenuRef,
|
|
22157
|
+
direction,
|
|
22158
|
+
eventBus
|
|
22159
|
+
}
|
|
22160
|
+
)
|
|
22161
|
+
] }, itemId);
|
|
22162
|
+
});
|
|
22163
|
+
const panel = isOpen && triggerRect ? /* @__PURE__ */ jsx(
|
|
22164
|
+
"div",
|
|
22165
|
+
{
|
|
22166
|
+
ref: menuRef,
|
|
22167
|
+
className: cn("fixed z-50", menuContainerStyles, className),
|
|
22168
|
+
style: computeMenuStyle(effectivePosition, triggerRect),
|
|
22169
|
+
role: "menu",
|
|
22170
|
+
children: renderMenuItems(items)
|
|
22171
|
+
}
|
|
22172
|
+
) : null;
|
|
22173
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22099
22174
|
triggerElement,
|
|
22100
|
-
|
|
22101
|
-
Box,
|
|
22102
|
-
{
|
|
22103
|
-
ref: menuRef,
|
|
22104
|
-
className: cn(
|
|
22105
|
-
"absolute z-50",
|
|
22106
|
-
menuContainerStyles,
|
|
22107
|
-
positionClasses[effectivePosition],
|
|
22108
|
-
className
|
|
22109
|
-
),
|
|
22110
|
-
style: {
|
|
22111
|
-
left: effectivePosition.includes("left") ? 0 : "auto",
|
|
22112
|
-
right: effectivePosition.includes("right") ? 0 : "auto"
|
|
22113
|
-
},
|
|
22114
|
-
role: "menu",
|
|
22115
|
-
children: renderMenuItems(items)
|
|
22116
|
-
}
|
|
22117
|
-
)
|
|
22175
|
+
panel && typeof document !== "undefined" ? createPortal(panel, document.body) : panel
|
|
22118
22176
|
] });
|
|
22119
22177
|
};
|
|
22120
22178
|
Menu.displayName = "Menu";
|
|
@@ -36520,7 +36578,6 @@ var init_DocumentViewer = __esm({
|
|
|
36520
36578
|
showPrint = false,
|
|
36521
36579
|
actions,
|
|
36522
36580
|
documents,
|
|
36523
|
-
entity,
|
|
36524
36581
|
isLoading = false,
|
|
36525
36582
|
error,
|
|
36526
36583
|
className
|
|
@@ -43316,7 +43373,7 @@ function TraitSlot({
|
|
|
43316
43373
|
size = "md",
|
|
43317
43374
|
showTooltip = true,
|
|
43318
43375
|
categoryColors,
|
|
43319
|
-
tooltipFrameUrl,
|
|
43376
|
+
tooltipFrameUrl = "",
|
|
43320
43377
|
className,
|
|
43321
43378
|
feedback,
|
|
43322
43379
|
onItemDrop,
|
|
@@ -46172,7 +46229,7 @@ var init_WorldMapBoard = __esm({
|
|
|
46172
46229
|
init_useEventBus();
|
|
46173
46230
|
init_Stack();
|
|
46174
46231
|
init_LoadingState();
|
|
46175
|
-
|
|
46232
|
+
init_IsometricCanvas();
|
|
46176
46233
|
init_boardEntity();
|
|
46177
46234
|
init_isometric();
|
|
46178
46235
|
WorldMapBoard.displayName = "WorldMapBoard";
|
|
@@ -46228,7 +46285,7 @@ function lazyThree(name, loader) {
|
|
|
46228
46285
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
46229
46286
|
return ThreeWrapper;
|
|
46230
46287
|
}
|
|
46231
|
-
var FeatureRenderer, COMPONENT_REGISTRY;
|
|
46288
|
+
var FeatureRenderer, GameCanvas3D, GameCanvas3DBattleTemplate, GameCanvas3DCastleTemplate, GameCanvas3DWorldMapTemplate, COMPONENT_REGISTRY;
|
|
46232
46289
|
var init_component_registry_generated = __esm({
|
|
46233
46290
|
"components/core/organisms/component-registry.generated.ts"() {
|
|
46234
46291
|
init_AboutPageTemplate();
|
|
@@ -46514,7 +46571,11 @@ var init_component_registry_generated = __esm({
|
|
|
46514
46571
|
init_WorldMapBoard();
|
|
46515
46572
|
init_WorldMapTemplate();
|
|
46516
46573
|
init_XPBar();
|
|
46517
|
-
FeatureRenderer = lazyThree("FeatureRenderer", () => import('@almadar/ui/components/
|
|
46574
|
+
FeatureRenderer = lazyThree("FeatureRenderer", () => import('@almadar/ui/components/molecules/game/three'));
|
|
46575
|
+
GameCanvas3D = lazyThree("GameCanvas3D", () => import('@almadar/ui/components/molecules/game/three'));
|
|
46576
|
+
GameCanvas3DBattleTemplate = lazyThree("GameCanvas3DBattleTemplate", () => import('@almadar/ui/components/molecules/game/three'));
|
|
46577
|
+
GameCanvas3DCastleTemplate = lazyThree("GameCanvas3DCastleTemplate", () => import('@almadar/ui/components/molecules/game/three'));
|
|
46578
|
+
GameCanvas3DWorldMapTemplate = lazyThree("GameCanvas3DWorldMapTemplate", () => import('@almadar/ui/components/molecules/game/three'));
|
|
46518
46579
|
COMPONENT_REGISTRY = {
|
|
46519
46580
|
"AboutPageTemplate": AboutPageTemplate,
|
|
46520
46581
|
"Accordion": Accordion,
|
|
@@ -46627,6 +46688,10 @@ var init_component_registry_generated = __esm({
|
|
|
46627
46688
|
"GameAudioProvider": GameAudioProvider,
|
|
46628
46689
|
"GameAudioToggle": GameAudioToggle,
|
|
46629
46690
|
"GameCanvas2D": GameCanvas2D,
|
|
46691
|
+
"GameCanvas3D": GameCanvas3D,
|
|
46692
|
+
"GameCanvas3DBattleTemplate": GameCanvas3DBattleTemplate,
|
|
46693
|
+
"GameCanvas3DCastleTemplate": GameCanvas3DCastleTemplate,
|
|
46694
|
+
"GameCanvas3DWorldMapTemplate": GameCanvas3DWorldMapTemplate,
|
|
46630
46695
|
"GameHud": GameHud,
|
|
46631
46696
|
"GameMenu": GameMenu,
|
|
46632
46697
|
"GameOverScreen": GameOverScreen,
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @packageDocumentation
|
|
11
11
|
*/
|
|
12
|
+
import type { PatternPropDef } from '@almadar/patterns';
|
|
12
13
|
import type { PatternConfig, ResolvedPattern } from './types';
|
|
13
14
|
/**
|
|
14
15
|
* Component mapping entry from component-mapping.json
|
|
@@ -27,11 +28,7 @@ interface PatternDefinition {
|
|
|
27
28
|
type: string;
|
|
28
29
|
category: string;
|
|
29
30
|
description: string;
|
|
30
|
-
propsSchema?: Record<string,
|
|
31
|
-
required?: boolean;
|
|
32
|
-
types?: string[];
|
|
33
|
-
description?: string;
|
|
34
|
-
}>;
|
|
31
|
+
propsSchema?: Record<string, PatternPropDef>;
|
|
35
32
|
}
|
|
36
33
|
/**
|
|
37
34
|
* Initialize the pattern resolver with mappings.
|