@almadar/ui 5.83.0 → 5.85.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/ui",
3
- "version": "5.83.0",
3
+ "version": "5.85.0",
4
4
  "description": "React UI components, hooks, and providers for Almadar",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -1,45 +0,0 @@
1
- import React from 'react';
2
- import type { Asset, EventEmit, EntityRow } from '@almadar/core';
3
- import type { DisplayStateProps } from '../../../core/organisms/types';
4
- /** Manifest of per-card sprite map (UI value DTO). */
5
- type CardBattlerAssetManifest = {
6
- cards?: Record<string, Asset>;
7
- };
8
- /** One card as carried on the entity / passed as a prop. */
9
- export interface CardBattlerCard {
10
- id: string;
11
- iconKey?: string;
12
- title?: string;
13
- cost?: number;
14
- attack?: number;
15
- defense?: number;
16
- }
17
- export interface CardBattlerBoardProps extends DisplayStateProps {
18
- entity?: EntityRow | readonly EntityRow[];
19
- /** Cards remaining in the draw deck (count-only view). */
20
- deck?: CardBattlerCard[];
21
- /** Cards currently in the player's hand. */
22
- hand?: CardBattlerCard[];
23
- /** Cards played onto the board this match. */
24
- board?: CardBattlerCard[];
25
- mana?: number;
26
- maxMana?: number;
27
- turn?: number;
28
- result?: 'none' | 'won' | 'lost';
29
- /** Base-url + per-iconKey card sprite map (organism owns asset choice). */
30
- assetManifest?: CardBattlerAssetManifest;
31
- playCardEvent?: EventEmit<{
32
- cardId: string;
33
- }>;
34
- endTurnEvent?: EventEmit<Record<string, never>>;
35
- playAgainEvent?: EventEmit<Record<string, never>>;
36
- gameEndEvent?: EventEmit<{
37
- result: 'won' | 'lost';
38
- }>;
39
- className?: string;
40
- }
41
- export declare function CardBattlerBoard({ entity, deck: propDeck, hand: propHand, board: propBoard, mana: propMana, maxMana: propMaxMana, turn: propTurn, result: propResult, assetManifest: propAssetManifest, playCardEvent, endTurnEvent, playAgainEvent, gameEndEvent, className, }: CardBattlerBoardProps): React.JSX.Element;
42
- export declare namespace CardBattlerBoard {
43
- var displayName: string;
44
- }
45
- export default CardBattlerBoard;
@@ -1,44 +0,0 @@
1
- import React from 'react';
2
- import type { Asset, EventEmit, EntityRow } from '@almadar/core';
3
- import type { DisplayStateProps } from '../../../core/organisms/types';
4
- /** Manifest of per-key scene + portrait maps (UI value DTO). */
5
- type VisualNovelAssetManifest = {
6
- backgrounds?: Record<string, Asset>;
7
- portraits?: Record<string, Asset>;
8
- };
9
- export interface VisualNovelChoice {
10
- label: string;
11
- nextId: string;
12
- }
13
- export interface VisualNovelNode {
14
- id: string;
15
- speaker: string;
16
- text: string;
17
- backgroundKey?: string;
18
- portraitKey?: string;
19
- choices?: VisualNovelChoice[];
20
- }
21
- export interface VisualNovelBoardProps extends DisplayStateProps {
22
- entity?: EntityRow | readonly EntityRow[];
23
- /** Full dialogue graph. */
24
- nodes?: VisualNovelNode[];
25
- /** Id of the node currently displayed. */
26
- currentNodeId?: string;
27
- /** Asset base-url + scene/portrait sprite maps (organism owns asset choice). */
28
- assetManifest?: VisualNovelAssetManifest;
29
- /** Typewriter speed in ms per character (0 = instant). */
30
- typewriterSpeed?: number;
31
- /** Portrait draw-size multiplier. */
32
- portraitScale?: number;
33
- chooseEvent?: EventEmit<{
34
- choiceIndex: number;
35
- }>;
36
- advanceEvent?: EventEmit<Record<string, never>>;
37
- restartEvent?: EventEmit<Record<string, never>>;
38
- className?: string;
39
- }
40
- export declare function VisualNovelBoard({ entity, nodes: propNodes, currentNodeId: propCurrentNodeId, assetManifest: propAssetManifest, typewriterSpeed, portraitScale, chooseEvent, advanceEvent, restartEvent, className, }: VisualNovelBoardProps): React.JSX.Element;
41
- export declare namespace VisualNovelBoard {
42
- var displayName: string;
43
- }
44
- export default VisualNovelBoard;