@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.js
CHANGED
|
@@ -11011,13 +11011,6 @@ var init_IsometricCanvas = __esm({
|
|
|
11011
11011
|
}
|
|
11012
11012
|
});
|
|
11013
11013
|
|
|
11014
|
-
// components/game/organisms/IsometricCanvas.tsx
|
|
11015
|
-
var init_IsometricCanvas2 = __esm({
|
|
11016
|
-
"components/game/organisms/IsometricCanvas.tsx"() {
|
|
11017
|
-
init_IsometricCanvas();
|
|
11018
|
-
}
|
|
11019
|
-
});
|
|
11020
|
-
|
|
11021
11014
|
// components/game/organisms/boardEntity.ts
|
|
11022
11015
|
function boardEntity(entity) {
|
|
11023
11016
|
if (!entity) return void 0;
|
|
@@ -11413,7 +11406,7 @@ var init_BattleBoard = __esm({
|
|
|
11413
11406
|
init_Button();
|
|
11414
11407
|
init_Typography();
|
|
11415
11408
|
init_Stack();
|
|
11416
|
-
|
|
11409
|
+
init_IsometricCanvas();
|
|
11417
11410
|
init_boardEntity();
|
|
11418
11411
|
init_isometric();
|
|
11419
11412
|
BattleBoard.displayName = "BattleBoard";
|
|
@@ -19328,7 +19321,7 @@ var init_CastleBoard = __esm({
|
|
|
19328
19321
|
"use client";
|
|
19329
19322
|
init_cn();
|
|
19330
19323
|
init_useEventBus();
|
|
19331
|
-
|
|
19324
|
+
init_IsometricCanvas();
|
|
19332
19325
|
init_boardEntity();
|
|
19333
19326
|
init_isometric();
|
|
19334
19327
|
CastleBoard.displayName = "CastleBoard";
|
|
@@ -21502,7 +21495,84 @@ var init_DashboardLayout = __esm({
|
|
|
21502
21495
|
NavLinkBottom.displayName = "NavLinkBottom";
|
|
21503
21496
|
}
|
|
21504
21497
|
});
|
|
21505
|
-
|
|
21498
|
+
function computeMenuStyle(position, triggerRect) {
|
|
21499
|
+
const isTop = position.startsWith("top");
|
|
21500
|
+
const isRight = position.endsWith("right") || position.endsWith("end");
|
|
21501
|
+
if (isTop) {
|
|
21502
|
+
return {
|
|
21503
|
+
top: triggerRect.top - MENU_GAP,
|
|
21504
|
+
transform: "translateY(-100%)",
|
|
21505
|
+
...isRight ? { right: window.innerWidth - triggerRect.right } : { left: triggerRect.left }
|
|
21506
|
+
};
|
|
21507
|
+
}
|
|
21508
|
+
return {
|
|
21509
|
+
top: triggerRect.bottom + MENU_GAP,
|
|
21510
|
+
...isRight ? { right: window.innerWidth - triggerRect.right } : { left: triggerRect.left }
|
|
21511
|
+
};
|
|
21512
|
+
}
|
|
21513
|
+
function SubMenu({
|
|
21514
|
+
items,
|
|
21515
|
+
itemRef,
|
|
21516
|
+
direction,
|
|
21517
|
+
eventBus
|
|
21518
|
+
}) {
|
|
21519
|
+
const [rect, setRect] = useState(null);
|
|
21520
|
+
useEffect(() => {
|
|
21521
|
+
if (itemRef) {
|
|
21522
|
+
setRect(itemRef.getBoundingClientRect());
|
|
21523
|
+
}
|
|
21524
|
+
}, [itemRef]);
|
|
21525
|
+
if (!rect) return null;
|
|
21526
|
+
const isRtl = direction === "rtl";
|
|
21527
|
+
const style = {
|
|
21528
|
+
top: rect.top,
|
|
21529
|
+
...isRtl ? { right: window.innerWidth - rect.left } : { left: rect.right }
|
|
21530
|
+
};
|
|
21531
|
+
const panel = /* @__PURE__ */ jsx(
|
|
21532
|
+
"div",
|
|
21533
|
+
{
|
|
21534
|
+
className: cn("fixed z-50", menuContainerStyles),
|
|
21535
|
+
style,
|
|
21536
|
+
children: items.map((item, index) => {
|
|
21537
|
+
const isDivider = item.id === "divider" || item.label === "divider";
|
|
21538
|
+
const itemId = item.id ?? `item-${item.label.toLowerCase().replace(/\s+/g, "-")}-${index}`;
|
|
21539
|
+
const isDanger = item.variant === "danger";
|
|
21540
|
+
if (isDivider) {
|
|
21541
|
+
return /* @__PURE__ */ jsx(Divider, { className: "my-1" }, `divider-${index}`);
|
|
21542
|
+
}
|
|
21543
|
+
return /* @__PURE__ */ jsxs(
|
|
21544
|
+
Box,
|
|
21545
|
+
{
|
|
21546
|
+
as: "button",
|
|
21547
|
+
onClick: () => {
|
|
21548
|
+
if (item.disabled) return;
|
|
21549
|
+
if (item.event) eventBus.emit(`UI:${item.event}`, { itemId, label: item.label });
|
|
21550
|
+
item.onClick?.();
|
|
21551
|
+
},
|
|
21552
|
+
"aria-disabled": item.disabled || void 0,
|
|
21553
|
+
"data-testid": item.event ? `action-${item.event}` : void 0,
|
|
21554
|
+
className: cn(
|
|
21555
|
+
"w-full flex items-center gap-3 px-4 py-2 text-start",
|
|
21556
|
+
"text-sm transition-colors",
|
|
21557
|
+
"hover:bg-muted focus:outline-none focus:bg-muted",
|
|
21558
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
21559
|
+
item.disabled && "cursor-not-allowed",
|
|
21560
|
+
isDanger && "text-error hover:bg-error/10"
|
|
21561
|
+
),
|
|
21562
|
+
children: [
|
|
21563
|
+
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" })),
|
|
21564
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: cn("flex-1", isDanger && "text-red-600"), children: item.label }),
|
|
21565
|
+
item.badge !== void 0 && /* @__PURE__ */ jsx("span", { className: "ml-auto text-xs font-medium", children: item.badge })
|
|
21566
|
+
]
|
|
21567
|
+
},
|
|
21568
|
+
itemId
|
|
21569
|
+
);
|
|
21570
|
+
})
|
|
21571
|
+
}
|
|
21572
|
+
);
|
|
21573
|
+
return typeof document !== "undefined" ? createPortal(panel, document.body) : panel;
|
|
21574
|
+
}
|
|
21575
|
+
var MENU_GAP, menuContainerStyles, Menu;
|
|
21506
21576
|
var init_Menu = __esm({
|
|
21507
21577
|
"components/core/molecules/Menu.tsx"() {
|
|
21508
21578
|
"use client";
|
|
@@ -21513,6 +21583,14 @@ var init_Menu = __esm({
|
|
|
21513
21583
|
init_Badge();
|
|
21514
21584
|
init_cn();
|
|
21515
21585
|
init_useEventBus();
|
|
21586
|
+
MENU_GAP = 4;
|
|
21587
|
+
menuContainerStyles = cn(
|
|
21588
|
+
"bg-card",
|
|
21589
|
+
"border-[length:var(--border-width)] border-border",
|
|
21590
|
+
"shadow-elevation-popover",
|
|
21591
|
+
"rounded-sm",
|
|
21592
|
+
"min-w-0 sm:min-w-[200px] max-w-[calc(100vw-1rem)] py-1"
|
|
21593
|
+
);
|
|
21516
21594
|
Menu = ({
|
|
21517
21595
|
trigger,
|
|
21518
21596
|
items,
|
|
@@ -21520,9 +21598,10 @@ var init_Menu = __esm({
|
|
|
21520
21598
|
className
|
|
21521
21599
|
}) => {
|
|
21522
21600
|
const eventBus = useEventBus();
|
|
21523
|
-
const {
|
|
21601
|
+
const { direction } = useTranslate();
|
|
21524
21602
|
const [isOpen, setIsOpen] = useState(false);
|
|
21525
21603
|
const [activeSubMenu, setActiveSubMenu] = useState(null);
|
|
21604
|
+
const [activeSubMenuRef, setActiveSubMenuRef] = useState(null);
|
|
21526
21605
|
const [triggerRect, setTriggerRect] = useState(null);
|
|
21527
21606
|
const triggerRef = useRef(null);
|
|
21528
21607
|
const menuRef = useRef(null);
|
|
@@ -21537,13 +21616,14 @@ var init_Menu = __esm({
|
|
|
21537
21616
|
}
|
|
21538
21617
|
setIsOpen(!isOpen);
|
|
21539
21618
|
setActiveSubMenu(null);
|
|
21619
|
+
setActiveSubMenuRef(null);
|
|
21540
21620
|
};
|
|
21541
|
-
const handleItemClick = (item) => {
|
|
21621
|
+
const handleItemClick = (item, itemId) => {
|
|
21542
21622
|
if (item.disabled) return;
|
|
21543
21623
|
if (item.subMenu && item.subMenu.length > 0) {
|
|
21544
|
-
setActiveSubMenu(
|
|
21624
|
+
setActiveSubMenu(itemId);
|
|
21545
21625
|
} else {
|
|
21546
|
-
if (item.event) eventBus.emit(`UI:${item.event}`, { itemId
|
|
21626
|
+
if (item.event) eventBus.emit(`UI:${item.event}`, { itemId, label: item.label });
|
|
21547
21627
|
item.onClick?.();
|
|
21548
21628
|
setIsOpen(false);
|
|
21549
21629
|
}
|
|
@@ -21558,22 +21638,12 @@ var init_Menu = __esm({
|
|
|
21558
21638
|
if (isOpen && menuRef.current && !menuRef.current.contains(e.target) && triggerRef.current && !triggerRef.current.contains(e.target)) {
|
|
21559
21639
|
setIsOpen(false);
|
|
21560
21640
|
setActiveSubMenu(null);
|
|
21641
|
+
setActiveSubMenuRef(null);
|
|
21561
21642
|
}
|
|
21562
21643
|
};
|
|
21563
21644
|
document.addEventListener("mousedown", handleClickOutside);
|
|
21564
21645
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
21565
21646
|
}, [isOpen]);
|
|
21566
|
-
const positionClasses = {
|
|
21567
|
-
"top-left": "bottom-full left-0 mb-2",
|
|
21568
|
-
"top-right": "bottom-full right-0 mb-2",
|
|
21569
|
-
"bottom-left": "top-full left-0 mt-2",
|
|
21570
|
-
"bottom-right": "top-full right-0 mt-2",
|
|
21571
|
-
// Aliases for pattern compatibility
|
|
21572
|
-
"top-start": "bottom-full left-0 mb-2",
|
|
21573
|
-
"top-end": "bottom-full right-0 mb-2",
|
|
21574
|
-
"bottom-start": "top-full left-0 mt-2",
|
|
21575
|
-
"bottom-end": "top-full right-0 mt-2"
|
|
21576
|
-
};
|
|
21577
21647
|
const rtlMirror = {
|
|
21578
21648
|
"top-left": "top-right",
|
|
21579
21649
|
"top-right": "top-left",
|
|
@@ -21585,7 +21655,6 @@ var init_Menu = __esm({
|
|
|
21585
21655
|
"bottom-end": "bottom-start"
|
|
21586
21656
|
};
|
|
21587
21657
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
21588
|
-
const subMenuSideClass = direction === "rtl" ? "right-full mr-2" : "left-full ml-2";
|
|
21589
21658
|
const triggerChild = React79__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
21590
21659
|
const triggerElement = React79__default.cloneElement(
|
|
21591
21660
|
triggerChild,
|
|
@@ -21594,94 +21663,83 @@ var init_Menu = __esm({
|
|
|
21594
21663
|
onClick: handleToggle
|
|
21595
21664
|
}
|
|
21596
21665
|
);
|
|
21597
|
-
const
|
|
21598
|
-
"
|
|
21599
|
-
"border-[length:var(--border-width)] border-border",
|
|
21600
|
-
"shadow-elevation-popover",
|
|
21601
|
-
"rounded-sm",
|
|
21602
|
-
"min-w-0 sm:min-w-[200px] max-w-[calc(100vw-1rem)] py-1"
|
|
21603
|
-
);
|
|
21604
|
-
const renderMenuItem = (item, hasSubMenu, index) => {
|
|
21666
|
+
const renderMenuItems = (menuItems) => menuItems.map((item, index) => {
|
|
21667
|
+
const isDivider = item.id === "divider" || item.label === "divider";
|
|
21605
21668
|
const itemId = item.id ?? `item-${item.label.toLowerCase().replace(/\s+/g, "-")}-${index}`;
|
|
21669
|
+
const hasSubMenu = !!(item.subMenu && item.subMenu.length > 0);
|
|
21606
21670
|
const isDanger = item.variant === "danger";
|
|
21607
|
-
|
|
21608
|
-
|
|
21609
|
-
|
|
21610
|
-
|
|
21611
|
-
|
|
21612
|
-
|
|
21613
|
-
|
|
21614
|
-
|
|
21615
|
-
|
|
21616
|
-
"
|
|
21617
|
-
|
|
21618
|
-
|
|
21619
|
-
|
|
21620
|
-
|
|
21621
|
-
item.disabled && "cursor-not-allowed",
|
|
21622
|
-
isDanger && "text-error hover:bg-error/10"
|
|
21623
|
-
),
|
|
21624
|
-
children: /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-3 flex-1 min-w-0", children: [
|
|
21625
|
-
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" })),
|
|
21626
|
-
/* @__PURE__ */ jsx(
|
|
21627
|
-
Typography,
|
|
21628
|
-
{
|
|
21629
|
-
variant: "small",
|
|
21630
|
-
className: cn("flex-1", isDanger && "text-red-600"),
|
|
21631
|
-
children: item.label
|
|
21671
|
+
if (isDivider) {
|
|
21672
|
+
return /* @__PURE__ */ jsx(Divider, { className: "my-1" }, `divider-${index}`);
|
|
21673
|
+
}
|
|
21674
|
+
return /* @__PURE__ */ jsxs(Box, { children: [
|
|
21675
|
+
/* @__PURE__ */ jsx(
|
|
21676
|
+
Box,
|
|
21677
|
+
{
|
|
21678
|
+
as: "button",
|
|
21679
|
+
onClick: () => handleItemClick({ ...item, id: itemId }, itemId),
|
|
21680
|
+
"aria-disabled": item.disabled || void 0,
|
|
21681
|
+
onMouseEnter: (e) => {
|
|
21682
|
+
if (hasSubMenu) {
|
|
21683
|
+
setActiveSubMenu(itemId);
|
|
21684
|
+
setActiveSubMenuRef(e.currentTarget);
|
|
21632
21685
|
}
|
|
21686
|
+
},
|
|
21687
|
+
"data-testid": item.event ? `action-${item.event}` : void 0,
|
|
21688
|
+
className: cn(
|
|
21689
|
+
"w-full flex items-center justify-between gap-3 px-4 py-2 text-start",
|
|
21690
|
+
"text-sm transition-colors",
|
|
21691
|
+
"hover:bg-muted",
|
|
21692
|
+
"focus:outline-none focus:bg-muted",
|
|
21693
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
21694
|
+
item.disabled && "cursor-not-allowed",
|
|
21695
|
+
isDanger && "text-error hover:bg-error/10"
|
|
21633
21696
|
),
|
|
21634
|
-
|
|
21635
|
-
|
|
21636
|
-
|
|
21637
|
-
|
|
21638
|
-
|
|
21639
|
-
|
|
21640
|
-
|
|
21641
|
-
|
|
21642
|
-
|
|
21643
|
-
const hasSubMenu = item.subMenu && item.subMenu.length > 0;
|
|
21644
|
-
const isDivider = item.id === "divider" || item.label === "divider";
|
|
21645
|
-
const itemId = item.id ?? `item-${item.label.toLowerCase().replace(/\s+/g, "-")}-${index}`;
|
|
21646
|
-
if (isDivider) {
|
|
21647
|
-
return /* @__PURE__ */ jsx(Divider, { className: "my-1" }, `divider-${index}`);
|
|
21648
|
-
}
|
|
21649
|
-
return /* @__PURE__ */ jsxs(Box, { children: [
|
|
21650
|
-
renderMenuItem(item, !!hasSubMenu, index),
|
|
21651
|
-
hasSubMenu && activeSubMenu === itemId && item.subMenu && /* @__PURE__ */ jsx(
|
|
21652
|
-
Box,
|
|
21653
|
-
{
|
|
21654
|
-
className: cn(
|
|
21655
|
-
"absolute top-0 z-50",
|
|
21656
|
-
subMenuSideClass,
|
|
21657
|
-
menuContainerStyles
|
|
21697
|
+
children: /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-3 flex-1 min-w-0", children: [
|
|
21698
|
+
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" })),
|
|
21699
|
+
/* @__PURE__ */ jsx(
|
|
21700
|
+
Typography,
|
|
21701
|
+
{
|
|
21702
|
+
variant: "small",
|
|
21703
|
+
className: cn("flex-1", isDanger && "text-red-600"),
|
|
21704
|
+
children: item.label
|
|
21705
|
+
}
|
|
21658
21706
|
),
|
|
21659
|
-
children:
|
|
21660
|
-
|
|
21661
|
-
|
|
21662
|
-
|
|
21663
|
-
|
|
21664
|
-
|
|
21665
|
-
|
|
21707
|
+
item.badge !== void 0 && /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", children: item.badge }),
|
|
21708
|
+
hasSubMenu && /* @__PURE__ */ jsx(
|
|
21709
|
+
Icon,
|
|
21710
|
+
{
|
|
21711
|
+
name: direction === "rtl" ? "chevron-left" : "chevron-right",
|
|
21712
|
+
size: "sm",
|
|
21713
|
+
className: "flex-shrink-0"
|
|
21714
|
+
}
|
|
21715
|
+
)
|
|
21716
|
+
] })
|
|
21717
|
+
}
|
|
21718
|
+
),
|
|
21719
|
+
hasSubMenu && activeSubMenu === itemId && item.subMenu && /* @__PURE__ */ jsx(
|
|
21720
|
+
SubMenu,
|
|
21721
|
+
{
|
|
21722
|
+
items: item.subMenu,
|
|
21723
|
+
itemRef: activeSubMenuRef,
|
|
21724
|
+
direction,
|
|
21725
|
+
eventBus
|
|
21726
|
+
}
|
|
21727
|
+
)
|
|
21728
|
+
] }, itemId);
|
|
21729
|
+
});
|
|
21730
|
+
const panel = isOpen && triggerRect ? /* @__PURE__ */ jsx(
|
|
21731
|
+
"div",
|
|
21732
|
+
{
|
|
21733
|
+
ref: menuRef,
|
|
21734
|
+
className: cn("fixed z-50", menuContainerStyles, className),
|
|
21735
|
+
style: computeMenuStyle(effectivePosition, triggerRect),
|
|
21736
|
+
role: "menu",
|
|
21737
|
+
children: renderMenuItems(items)
|
|
21738
|
+
}
|
|
21739
|
+
) : null;
|
|
21740
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
21666
21741
|
triggerElement,
|
|
21667
|
-
|
|
21668
|
-
Box,
|
|
21669
|
-
{
|
|
21670
|
-
ref: menuRef,
|
|
21671
|
-
className: cn(
|
|
21672
|
-
"absolute z-50",
|
|
21673
|
-
menuContainerStyles,
|
|
21674
|
-
positionClasses[effectivePosition],
|
|
21675
|
-
className
|
|
21676
|
-
),
|
|
21677
|
-
style: {
|
|
21678
|
-
left: effectivePosition.includes("left") ? 0 : "auto",
|
|
21679
|
-
right: effectivePosition.includes("right") ? 0 : "auto"
|
|
21680
|
-
},
|
|
21681
|
-
role: "menu",
|
|
21682
|
-
children: renderMenuItems(items)
|
|
21683
|
-
}
|
|
21684
|
-
)
|
|
21742
|
+
panel && typeof document !== "undefined" ? createPortal(panel, document.body) : panel
|
|
21685
21743
|
] });
|
|
21686
21744
|
};
|
|
21687
21745
|
Menu.displayName = "Menu";
|
|
@@ -36087,7 +36145,6 @@ var init_DocumentViewer = __esm({
|
|
|
36087
36145
|
showPrint = false,
|
|
36088
36146
|
actions,
|
|
36089
36147
|
documents,
|
|
36090
|
-
entity,
|
|
36091
36148
|
isLoading = false,
|
|
36092
36149
|
error,
|
|
36093
36150
|
className
|
|
@@ -42902,7 +42959,7 @@ function TraitSlot({
|
|
|
42902
42959
|
size = "md",
|
|
42903
42960
|
showTooltip = true,
|
|
42904
42961
|
categoryColors,
|
|
42905
|
-
tooltipFrameUrl,
|
|
42962
|
+
tooltipFrameUrl = "",
|
|
42906
42963
|
className,
|
|
42907
42964
|
feedback,
|
|
42908
42965
|
onItemDrop,
|
|
@@ -45758,7 +45815,7 @@ var init_WorldMapBoard = __esm({
|
|
|
45758
45815
|
init_useEventBus();
|
|
45759
45816
|
init_Stack();
|
|
45760
45817
|
init_LoadingState();
|
|
45761
|
-
|
|
45818
|
+
init_IsometricCanvas();
|
|
45762
45819
|
init_boardEntity();
|
|
45763
45820
|
init_isometric();
|
|
45764
45821
|
WorldMapBoard.displayName = "WorldMapBoard";
|
|
@@ -45814,7 +45871,7 @@ function lazyThree(name, loader) {
|
|
|
45814
45871
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
45815
45872
|
return ThreeWrapper;
|
|
45816
45873
|
}
|
|
45817
|
-
var FeatureRenderer, COMPONENT_REGISTRY;
|
|
45874
|
+
var FeatureRenderer, GameCanvas3D, GameCanvas3DBattleTemplate, GameCanvas3DCastleTemplate, GameCanvas3DWorldMapTemplate, COMPONENT_REGISTRY;
|
|
45818
45875
|
var init_component_registry_generated = __esm({
|
|
45819
45876
|
"components/core/organisms/component-registry.generated.ts"() {
|
|
45820
45877
|
init_AboutPageTemplate();
|
|
@@ -46100,7 +46157,11 @@ var init_component_registry_generated = __esm({
|
|
|
46100
46157
|
init_WorldMapBoard();
|
|
46101
46158
|
init_WorldMapTemplate();
|
|
46102
46159
|
init_XPBar();
|
|
46103
|
-
FeatureRenderer = lazyThree("FeatureRenderer", () => import('@almadar/ui/components/
|
|
46160
|
+
FeatureRenderer = lazyThree("FeatureRenderer", () => import('@almadar/ui/components/molecules/game/three'));
|
|
46161
|
+
GameCanvas3D = lazyThree("GameCanvas3D", () => import('@almadar/ui/components/molecules/game/three'));
|
|
46162
|
+
GameCanvas3DBattleTemplate = lazyThree("GameCanvas3DBattleTemplate", () => import('@almadar/ui/components/molecules/game/three'));
|
|
46163
|
+
GameCanvas3DCastleTemplate = lazyThree("GameCanvas3DCastleTemplate", () => import('@almadar/ui/components/molecules/game/three'));
|
|
46164
|
+
GameCanvas3DWorldMapTemplate = lazyThree("GameCanvas3DWorldMapTemplate", () => import('@almadar/ui/components/molecules/game/three'));
|
|
46104
46165
|
COMPONENT_REGISTRY = {
|
|
46105
46166
|
"AboutPageTemplate": AboutPageTemplate,
|
|
46106
46167
|
"Accordion": Accordion,
|
|
@@ -46213,6 +46274,10 @@ var init_component_registry_generated = __esm({
|
|
|
46213
46274
|
"GameAudioProvider": GameAudioProvider,
|
|
46214
46275
|
"GameAudioToggle": GameAudioToggle,
|
|
46215
46276
|
"GameCanvas2D": GameCanvas2D,
|
|
46277
|
+
"GameCanvas3D": GameCanvas3D,
|
|
46278
|
+
"GameCanvas3DBattleTemplate": GameCanvas3DBattleTemplate,
|
|
46279
|
+
"GameCanvas3DCastleTemplate": GameCanvas3DCastleTemplate,
|
|
46280
|
+
"GameCanvas3DWorldMapTemplate": GameCanvas3DWorldMapTemplate,
|
|
46216
46281
|
"GameHud": GameHud,
|
|
46217
46282
|
"GameMenu": GameMenu,
|
|
46218
46283
|
"GameOverScreen": GameOverScreen,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@almadar/ui",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.30.0",
|
|
4
4
|
"description": "React UI components, hooks, and providers for Almadar",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -57,9 +57,14 @@
|
|
|
57
57
|
"require": "./dist/lib/index.cjs"
|
|
58
58
|
},
|
|
59
59
|
"./components/organisms/game/three": {
|
|
60
|
-
"types": "./dist/components/game/
|
|
61
|
-
"import": "./dist/components/game/
|
|
62
|
-
"require": "./dist/components/game/
|
|
60
|
+
"types": "./dist/components/game/molecules/three/index.d.ts",
|
|
61
|
+
"import": "./dist/components/game/molecules/three/index.js",
|
|
62
|
+
"require": "./dist/components/game/molecules/three/index.cjs"
|
|
63
|
+
},
|
|
64
|
+
"./components/molecules/game/three": {
|
|
65
|
+
"types": "./dist/components/game/molecules/three/index.d.ts",
|
|
66
|
+
"import": "./dist/components/game/molecules/three/index.js",
|
|
67
|
+
"require": "./dist/components/game/molecules/three/index.cjs"
|
|
63
68
|
},
|
|
64
69
|
"./components/organisms/game/TraitStateViewer": {
|
|
65
70
|
"import": "./components/game/organisms/TraitStateViewer.tsx",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/components/game/{organisms → molecules}/three/components/Canvas3DErrorBoundary.d.ts
RENAMED
|
File without changes
|
/package/dist/components/game/{organisms → molecules}/three/components/Canvas3DLoadingState.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|