@almadar/ui 5.39.0 → 5.41.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 +405 -113
- package/dist/avl/index.js +405 -113
- package/dist/components/game/atoms/ItemSlot.d.ts +5 -2
- package/dist/components/game/molecules/DialogueBox.d.ts +0 -21
- package/dist/components/game/molecules/InventoryPanel.d.ts +0 -16
- package/dist/components/index.cjs +405 -113
- package/dist/components/index.js +405 -113
- package/dist/providers/index.cjs +405 -113
- package/dist/providers/index.js +405 -113
- package/dist/runtime/index.cjs +405 -113
- package/dist/runtime/index.js +405 -113
- package/package.json +1 -1
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { type IconInput } from '../../core/atoms/Icon';
|
|
2
|
+
import type { AssetUrl } from '@almadar/core';
|
|
2
3
|
export interface ItemSlotProps {
|
|
3
|
-
/**
|
|
4
|
+
/** Sprite image URL — takes precedence over icon when provided */
|
|
5
|
+
assetUrl?: AssetUrl;
|
|
6
|
+
/** Icon component or emoji — shown only when assetUrl is absent */
|
|
4
7
|
icon?: IconInput;
|
|
5
8
|
/** Item label */
|
|
6
9
|
label?: string;
|
|
@@ -19,7 +22,7 @@ export interface ItemSlotProps {
|
|
|
19
22
|
/** Additional CSS classes */
|
|
20
23
|
className?: string;
|
|
21
24
|
}
|
|
22
|
-
export declare function ItemSlot({ icon, label, quantity, rarity, empty, size, selected, onClick, className, }: ItemSlotProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare function ItemSlot({ assetUrl, icon, label, quantity, rarity, empty, size, selected, onClick, className, }: ItemSlotProps): import("react/jsx-runtime").JSX.Element;
|
|
23
26
|
export declare namespace ItemSlot {
|
|
24
27
|
var displayName: string;
|
|
25
28
|
}
|
|
@@ -56,26 +56,5 @@ export interface DialogueBoxProps {
|
|
|
56
56
|
/** Optional className */
|
|
57
57
|
className?: string;
|
|
58
58
|
}
|
|
59
|
-
/**
|
|
60
|
-
* Dialogue box component with typewriter effect
|
|
61
|
-
*
|
|
62
|
-
* @example
|
|
63
|
-
* ```tsx
|
|
64
|
-
* <DialogueBox
|
|
65
|
-
* dialogue={{
|
|
66
|
-
* speaker: "Old Man",
|
|
67
|
-
* text: "It's dangerous to go alone! Take this.",
|
|
68
|
-
* portrait: "/portraits/oldman.png",
|
|
69
|
-
* choices: [
|
|
70
|
-
* { text: "Thank you!", action: "ACCEPT_ITEM" },
|
|
71
|
-
* { text: "No thanks", next: "decline_node" }
|
|
72
|
-
* ]
|
|
73
|
-
* }}
|
|
74
|
-
* typewriterSpeed={30}
|
|
75
|
-
* onChoice={(choice) => handleChoice(choice)}
|
|
76
|
-
* position="bottom"
|
|
77
|
-
* />
|
|
78
|
-
* ```
|
|
79
|
-
*/
|
|
80
59
|
export declare function DialogueBox({ dialogue, typewriterSpeed, position, onComplete, onChoice, onAdvance, completeEvent, choiceEvent, advanceEvent, className, }: DialogueBoxProps): React.JSX.Element;
|
|
81
60
|
export default DialogueBox;
|
|
@@ -54,21 +54,5 @@ export interface InventoryPanelProps {
|
|
|
54
54
|
/** Slot size in pixels */
|
|
55
55
|
slotSize?: number;
|
|
56
56
|
}
|
|
57
|
-
/**
|
|
58
|
-
* Inventory panel component with grid layout
|
|
59
|
-
*
|
|
60
|
-
* @example
|
|
61
|
-
* ```tsx
|
|
62
|
-
* <InventoryPanel
|
|
63
|
-
* items={playerInventory}
|
|
64
|
-
* slots={20}
|
|
65
|
-
* columns={5}
|
|
66
|
-
* selectedSlot={selectedSlot}
|
|
67
|
-
* onSelectSlot={setSelectedSlot}
|
|
68
|
-
* onUseItem={(item) => console.log('Used:', item.name)}
|
|
69
|
-
* showTooltips
|
|
70
|
-
* />
|
|
71
|
-
* ```
|
|
72
|
-
*/
|
|
73
57
|
export declare function InventoryPanel({ items, slots, columns, selectedSlot, onSelectSlot, onUseItem, onDropItem, selectSlotEvent, useItemEvent, dropItemEvent, showTooltips, className, slotSize, }: InventoryPanelProps): React.JSX.Element;
|
|
74
58
|
export default InventoryPanel;
|