@almadar/ui 5.67.0 → 5.68.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 +3108 -1525
- package/dist/avl/index.js +1838 -255
- package/dist/components/game/molecules/IsometricCanvas.d.ts +1 -1
- package/dist/components/game/organisms/BoardgameBoard.d.ts +37 -0
- package/dist/components/game/organisms/FishingBoard.d.ts +33 -0
- package/dist/components/game/organisms/HolidayRunnerBoard.d.ts +35 -0
- package/dist/components/game/organisms/MatchPuzzleBoard.d.ts +37 -0
- package/dist/components/game/organisms/MinigolfBoard.d.ts +37 -0
- package/dist/components/game/organisms/PinballBoard.d.ts +35 -0
- package/dist/components/game/organisms/PirateBoard.d.ts +37 -0
- package/dist/components/game/organisms/RacingBoard.d.ts +29 -0
- package/dist/components/game/organisms/SokobanBoard.d.ts +37 -0
- package/dist/components/game/organisms/SpaceShmupBoard.d.ts +20 -0
- package/dist/components/game/organisms/SpaceStationBoard.d.ts +37 -0
- package/dist/components/game/organisms/SportsBoard.d.ts +37 -0
- package/dist/components/game/organisms/TanksBoard.d.ts +37 -0
- package/dist/components/game/organisms/index.d.ts +13 -0
- package/dist/components/game/organisms/utils/isometric.d.ts +10 -1
- package/dist/components/index.cjs +7328 -6733
- package/dist/components/index.js +6309 -5725
- package/dist/providers/index.cjs +2917 -1334
- package/dist/providers/index.js +1814 -231
- package/dist/runtime/index.cjs +2973 -1390
- package/dist/runtime/index.js +1818 -235
- package/package.json +1 -1
|
@@ -80,7 +80,7 @@ export interface IsometricCanvasProps {
|
|
|
80
80
|
}>;
|
|
81
81
|
/** Declarative event: emits UI:{tileLeaveEvent} with {} on tile leave */
|
|
82
82
|
tileLeaveEvent?: EventEmit<Record<string, never>>;
|
|
83
|
-
/** Tile layout projection: 'isometric' (default 2:1 diamond)
|
|
83
|
+
/** Tile layout projection: 'isometric' (default 2:1 diamond), 'hex' (pointy-top offset rows), or 'flat' (orthographic top-down square grid) */
|
|
84
84
|
tileLayout?: TileLayout;
|
|
85
85
|
/** Render scale (0.4 = 40% zoom) */
|
|
86
86
|
scale?: number;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AssetUrl, EventEmit } from '@almadar/core';
|
|
3
|
+
import type { IsometricTile, IsometricUnit, IsometricFeature } from './types/isometric';
|
|
4
|
+
import type { DisplayStateProps } from '../../core/organisms/types';
|
|
5
|
+
import type { IsometricCanvasProps } from '../molecules/IsometricCanvas';
|
|
6
|
+
export interface BoardgameBoardProps extends DisplayStateProps {
|
|
7
|
+
/** Board squares (flat top-down grid tiles) */
|
|
8
|
+
tiles?: IsometricTile[];
|
|
9
|
+
/** Tokens/units on the board */
|
|
10
|
+
units?: IsometricUnit[];
|
|
11
|
+
/** Features (markers, structures, etc.) on the board */
|
|
12
|
+
features?: IsometricFeature[];
|
|
13
|
+
/** Asset sprite manifest (same shape as IsometricCanvas.assetManifest) */
|
|
14
|
+
assetManifest?: IsometricCanvasProps['assetManifest'];
|
|
15
|
+
/** Base URL prepended to asset paths */
|
|
16
|
+
assetBaseUrl?: AssetUrl;
|
|
17
|
+
/** Render scale */
|
|
18
|
+
scale?: number;
|
|
19
|
+
/** Show minimap overlay */
|
|
20
|
+
showMinimap?: boolean;
|
|
21
|
+
/** Enable camera pan/zoom controls */
|
|
22
|
+
enableCamera?: boolean;
|
|
23
|
+
/** Declarative event: emits UI:{tileClickEvent} with { x, y } on tile click */
|
|
24
|
+
tileClickEvent?: EventEmit<{
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
27
|
+
}>;
|
|
28
|
+
/** Declarative event: emits UI:{unitClickEvent} with { unitId } on unit click */
|
|
29
|
+
unitClickEvent?: EventEmit<{
|
|
30
|
+
unitId: string;
|
|
31
|
+
}>;
|
|
32
|
+
}
|
|
33
|
+
export declare function BoardgameBoard({ tiles, units, features, assetManifest, assetBaseUrl, scale, showMinimap, enableCamera, tileClickEvent, unitClickEvent, isLoading, error, className, }: BoardgameBoardProps): React.ReactElement;
|
|
34
|
+
export declare namespace BoardgameBoard {
|
|
35
|
+
var displayName: string;
|
|
36
|
+
}
|
|
37
|
+
export default BoardgameBoard;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AssetUrl, EventEmit } from '@almadar/core';
|
|
3
|
+
import type { DisplayStateProps } from '../../core/organisms/types';
|
|
4
|
+
export interface FishingBoardProps extends DisplayStateProps {
|
|
5
|
+
/** Background image URL for the fishing scene */
|
|
6
|
+
backgroundImage?: AssetUrl;
|
|
7
|
+
/** Base URL prepended to asset paths */
|
|
8
|
+
assetBaseUrl?: AssetUrl;
|
|
9
|
+
/** Render scale */
|
|
10
|
+
scale?: number;
|
|
11
|
+
/** Show minimap overlay */
|
|
12
|
+
showMinimap?: boolean;
|
|
13
|
+
/** Enable camera pan/zoom controls */
|
|
14
|
+
enableCamera?: boolean;
|
|
15
|
+
/** Canvas width in pixels */
|
|
16
|
+
width?: number;
|
|
17
|
+
/** Canvas height in pixels */
|
|
18
|
+
height?: number;
|
|
19
|
+
/** Declarative event: emits UI:{tileClickEvent} with { x, y } on tile click */
|
|
20
|
+
tileClickEvent?: EventEmit<{
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
}>;
|
|
24
|
+
/** Declarative event: emits UI:{unitClickEvent} with { unitId } on unit click */
|
|
25
|
+
unitClickEvent?: EventEmit<{
|
|
26
|
+
unitId: string;
|
|
27
|
+
}>;
|
|
28
|
+
}
|
|
29
|
+
export declare function FishingBoard({ backgroundImage, assetBaseUrl, scale, showMinimap, enableCamera, width, height, isLoading, error, className, }: FishingBoardProps): React.ReactElement;
|
|
30
|
+
export declare namespace FishingBoard {
|
|
31
|
+
var displayName: string;
|
|
32
|
+
}
|
|
33
|
+
export default FishingBoard;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AssetUrl, EventEmit } from '@almadar/core';
|
|
3
|
+
import type { DisplayStateProps } from '../../core/organisms/types';
|
|
4
|
+
export interface HolidayRunnerBoardProps extends DisplayStateProps {
|
|
5
|
+
/** Background image URL for the runner level */
|
|
6
|
+
backgroundImage?: AssetUrl;
|
|
7
|
+
/** Base URL prefix for asset URLs */
|
|
8
|
+
assetBaseUrl?: AssetUrl;
|
|
9
|
+
/** Canvas width in pixels */
|
|
10
|
+
width?: number;
|
|
11
|
+
/** Canvas height in pixels */
|
|
12
|
+
height?: number;
|
|
13
|
+
/** Target frames per second */
|
|
14
|
+
fps?: number;
|
|
15
|
+
/** Render scale */
|
|
16
|
+
scale?: number;
|
|
17
|
+
/** Show minimap overlay */
|
|
18
|
+
showMinimap?: boolean;
|
|
19
|
+
/** Enable camera pan/zoom controls */
|
|
20
|
+
enableCamera?: boolean;
|
|
21
|
+
/** Declarative event: emits UI:{tickEvent} with { dt, frame } each tick */
|
|
22
|
+
tickEvent?: EventEmit<{
|
|
23
|
+
dt: number;
|
|
24
|
+
frame: number;
|
|
25
|
+
}>;
|
|
26
|
+
/** Declarative event: emits UI:{drawEvent} with { frame } each draw frame */
|
|
27
|
+
drawEvent?: EventEmit<{
|
|
28
|
+
frame: number;
|
|
29
|
+
}>;
|
|
30
|
+
}
|
|
31
|
+
export declare function HolidayRunnerBoard({ backgroundImage, assetBaseUrl, width, height, fps, isLoading, error, className, }: HolidayRunnerBoardProps): React.ReactElement;
|
|
32
|
+
export declare namespace HolidayRunnerBoard {
|
|
33
|
+
var displayName: string;
|
|
34
|
+
}
|
|
35
|
+
export default HolidayRunnerBoard;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AssetUrl, EventEmit } from '@almadar/core';
|
|
3
|
+
import type { IsometricTile, IsometricUnit, IsometricFeature } from './types/isometric';
|
|
4
|
+
import type { DisplayStateProps } from '../../core/organisms/types';
|
|
5
|
+
import type { IsometricCanvasProps } from '../molecules/IsometricCanvas';
|
|
6
|
+
export interface MatchPuzzleBoardProps extends DisplayStateProps {
|
|
7
|
+
/** Grid tiles for the match puzzle board */
|
|
8
|
+
tiles?: IsometricTile[];
|
|
9
|
+
/** Units on the board */
|
|
10
|
+
units?: IsometricUnit[];
|
|
11
|
+
/** Gem/feature items on the board */
|
|
12
|
+
features?: IsometricFeature[];
|
|
13
|
+
/** Asset sprite manifest (same shape as IsometricCanvas.assetManifest) */
|
|
14
|
+
assetManifest?: IsometricCanvasProps['assetManifest'];
|
|
15
|
+
/** Base URL prepended to manifest sprite paths */
|
|
16
|
+
assetBaseUrl?: AssetUrl;
|
|
17
|
+
/** Render scale */
|
|
18
|
+
scale?: number;
|
|
19
|
+
/** Show minimap overlay */
|
|
20
|
+
showMinimap?: boolean;
|
|
21
|
+
/** Enable camera pan/zoom controls */
|
|
22
|
+
enableCamera?: boolean;
|
|
23
|
+
/** Declarative event: emits UI:{tileClickEvent} with { x, y } on tile click */
|
|
24
|
+
tileClickEvent?: EventEmit<{
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
27
|
+
}>;
|
|
28
|
+
/** Declarative event: emits UI:{unitClickEvent} with { unitId } on unit click */
|
|
29
|
+
unitClickEvent?: EventEmit<{
|
|
30
|
+
unitId: string;
|
|
31
|
+
}>;
|
|
32
|
+
}
|
|
33
|
+
export declare function MatchPuzzleBoard({ tiles, units, features, assetManifest, assetBaseUrl, scale, showMinimap, enableCamera, tileClickEvent, unitClickEvent, isLoading, error, className, }: MatchPuzzleBoardProps): React.ReactElement;
|
|
34
|
+
export declare namespace MatchPuzzleBoard {
|
|
35
|
+
var displayName: string;
|
|
36
|
+
}
|
|
37
|
+
export default MatchPuzzleBoard;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AssetUrl, EventEmit } from '@almadar/core';
|
|
3
|
+
import type { IsometricTile, IsometricUnit, IsometricFeature } from './types/isometric';
|
|
4
|
+
import type { DisplayStateProps } from '../../core/organisms/types';
|
|
5
|
+
import type { IsometricCanvasProps } from '../molecules/IsometricCanvas';
|
|
6
|
+
export interface MinigolfBoardProps extends DisplayStateProps {
|
|
7
|
+
/** Isometric grid tiles */
|
|
8
|
+
tiles?: IsometricTile[];
|
|
9
|
+
/** Units on the board */
|
|
10
|
+
units?: IsometricUnit[];
|
|
11
|
+
/** Features (holes, obstacles, etc.) on the board */
|
|
12
|
+
features?: IsometricFeature[];
|
|
13
|
+
/** Asset sprite manifest (same shape as IsometricCanvas.assetManifest) */
|
|
14
|
+
assetManifest?: IsometricCanvasProps['assetManifest'];
|
|
15
|
+
/** Base URL prepended to manifest sprite paths */
|
|
16
|
+
assetBaseUrl?: AssetUrl;
|
|
17
|
+
/** Render scale */
|
|
18
|
+
scale?: number;
|
|
19
|
+
/** Show minimap overlay */
|
|
20
|
+
showMinimap?: boolean;
|
|
21
|
+
/** Enable camera pan/zoom controls */
|
|
22
|
+
enableCamera?: boolean;
|
|
23
|
+
/** Declarative event: emits UI:{tileClickEvent} with { x, y } on tile click */
|
|
24
|
+
tileClickEvent?: EventEmit<{
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
27
|
+
}>;
|
|
28
|
+
/** Declarative event: emits UI:{unitClickEvent} with { unitId } on unit click */
|
|
29
|
+
unitClickEvent?: EventEmit<{
|
|
30
|
+
unitId: string;
|
|
31
|
+
}>;
|
|
32
|
+
}
|
|
33
|
+
export declare function MinigolfBoard({ tiles, units, features, assetManifest, assetBaseUrl, scale, showMinimap, enableCamera, tileClickEvent, unitClickEvent, isLoading, error, className, }: MinigolfBoardProps): React.ReactElement;
|
|
34
|
+
export declare namespace MinigolfBoard {
|
|
35
|
+
var displayName: string;
|
|
36
|
+
}
|
|
37
|
+
export default MinigolfBoard;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AssetUrl, EventEmit } from '@almadar/core';
|
|
3
|
+
import type { DisplayStateProps } from '../../core/organisms/types';
|
|
4
|
+
export interface PinballBoardProps extends DisplayStateProps {
|
|
5
|
+
/** Playfield tiles */
|
|
6
|
+
tiles?: unknown[];
|
|
7
|
+
/** Ball units on the board */
|
|
8
|
+
units?: unknown[];
|
|
9
|
+
/** Features (bumpers, paddles, etc.) on the board */
|
|
10
|
+
features?: unknown[];
|
|
11
|
+
/** Asset sprite manifest */
|
|
12
|
+
assetManifest?: string;
|
|
13
|
+
/** Base URL prepended to manifest sprite paths */
|
|
14
|
+
assetBaseUrl?: AssetUrl;
|
|
15
|
+
/** Render scale */
|
|
16
|
+
scale?: number;
|
|
17
|
+
/** Show minimap overlay */
|
|
18
|
+
showMinimap?: boolean;
|
|
19
|
+
/** Enable camera pan/zoom controls */
|
|
20
|
+
enableCamera?: boolean;
|
|
21
|
+
/** Declarative event: emits UI:{tileClickEvent} with { x, y } on tile click */
|
|
22
|
+
tileClickEvent?: EventEmit<{
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
}>;
|
|
26
|
+
/** Declarative event: emits UI:{unitClickEvent} with { unitId } on unit click */
|
|
27
|
+
unitClickEvent?: EventEmit<{
|
|
28
|
+
unitId: string;
|
|
29
|
+
}>;
|
|
30
|
+
}
|
|
31
|
+
export declare function PinballBoard({ tiles: _tiles, units: _units, features: _features, assetManifest: _assetManifest, assetBaseUrl, scale, showMinimap: _showMinimap, enableCamera: _enableCamera, tileClickEvent: _tileClickEvent, unitClickEvent: _unitClickEvent, isLoading, error, className, }: PinballBoardProps): React.ReactElement;
|
|
32
|
+
export declare namespace PinballBoard {
|
|
33
|
+
var displayName: string;
|
|
34
|
+
}
|
|
35
|
+
export default PinballBoard;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AssetUrl, EventEmit } from '@almadar/core';
|
|
3
|
+
import type { IsometricTile, IsometricUnit, IsometricFeature } from './types/isometric';
|
|
4
|
+
import type { DisplayStateProps } from '../../core/organisms/types';
|
|
5
|
+
import type { IsometricCanvasProps } from '../molecules/IsometricCanvas';
|
|
6
|
+
export interface PirateBoardProps extends DisplayStateProps {
|
|
7
|
+
/** Sea/island grid tiles */
|
|
8
|
+
tiles?: IsometricTile[];
|
|
9
|
+
/** Ship and crew units on the board */
|
|
10
|
+
units?: IsometricUnit[];
|
|
11
|
+
/** Features (ports, treasures, etc.) on the board */
|
|
12
|
+
features?: IsometricFeature[];
|
|
13
|
+
/** Asset sprite manifest (same shape as IsometricCanvas.assetManifest) */
|
|
14
|
+
assetManifest?: IsometricCanvasProps['assetManifest'];
|
|
15
|
+
/** Base URL prepended to manifest sprite paths */
|
|
16
|
+
assetBaseUrl?: AssetUrl;
|
|
17
|
+
/** Render scale */
|
|
18
|
+
scale?: number;
|
|
19
|
+
/** Show minimap overlay */
|
|
20
|
+
showMinimap?: boolean;
|
|
21
|
+
/** Enable camera pan/zoom controls */
|
|
22
|
+
enableCamera?: boolean;
|
|
23
|
+
/** Declarative event: emits UI:{tileClickEvent} with { x, y } on tile click */
|
|
24
|
+
tileClickEvent?: EventEmit<{
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
27
|
+
}>;
|
|
28
|
+
/** Declarative event: emits UI:{unitClickEvent} with { unitId } on unit click */
|
|
29
|
+
unitClickEvent?: EventEmit<{
|
|
30
|
+
unitId: string;
|
|
31
|
+
}>;
|
|
32
|
+
}
|
|
33
|
+
export declare function PirateBoard({ tiles, units, features, assetManifest, assetBaseUrl, scale, showMinimap, enableCamera, tileClickEvent, unitClickEvent, isLoading, error, className, }: PirateBoardProps): React.ReactElement;
|
|
34
|
+
export declare namespace PirateBoard {
|
|
35
|
+
var displayName: string;
|
|
36
|
+
}
|
|
37
|
+
export default PirateBoard;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AssetUrl, EventEmit } from '@almadar/core';
|
|
3
|
+
import type { DisplayStateProps } from '../../core/organisms/types';
|
|
4
|
+
export interface RacingBoardProps extends DisplayStateProps {
|
|
5
|
+
/** Race track background image URL */
|
|
6
|
+
backgroundImage?: AssetUrl;
|
|
7
|
+
/** Base URL prepended to asset paths */
|
|
8
|
+
assetBaseUrl?: AssetUrl;
|
|
9
|
+
/** Canvas width in pixels */
|
|
10
|
+
width?: number;
|
|
11
|
+
/** Canvas height in pixels */
|
|
12
|
+
height?: number;
|
|
13
|
+
/** Target frames per second */
|
|
14
|
+
fps?: number;
|
|
15
|
+
/** Declarative event: emits UI:{tickEvent} with { dt, frame } each tick */
|
|
16
|
+
tickEvent?: EventEmit<{
|
|
17
|
+
dt: number;
|
|
18
|
+
frame: number;
|
|
19
|
+
}>;
|
|
20
|
+
/** Declarative event: emits UI:{drawEvent} with { frame } each draw frame */
|
|
21
|
+
drawEvent?: EventEmit<{
|
|
22
|
+
frame: number;
|
|
23
|
+
}>;
|
|
24
|
+
}
|
|
25
|
+
export declare function RacingBoard({ backgroundImage, assetBaseUrl, width, height, fps, tickEvent, drawEvent, className, }: RacingBoardProps): React.ReactElement;
|
|
26
|
+
export declare namespace RacingBoard {
|
|
27
|
+
var displayName: string;
|
|
28
|
+
}
|
|
29
|
+
export default RacingBoard;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AssetUrl, EventEmit } from '@almadar/core';
|
|
3
|
+
import type { IsometricTile, IsometricUnit, IsometricFeature } from './types/isometric';
|
|
4
|
+
import type { DisplayStateProps } from '../../core/organisms/types';
|
|
5
|
+
import type { IsometricCanvasProps } from '../molecules/IsometricCanvas';
|
|
6
|
+
export interface SokobanBoardProps extends DisplayStateProps {
|
|
7
|
+
/** Grid tiles (floor, wall, target) */
|
|
8
|
+
tiles?: IsometricTile[];
|
|
9
|
+
/** Units on the board (the pusher character) */
|
|
10
|
+
units?: IsometricUnit[];
|
|
11
|
+
/** Features (crates) on the board */
|
|
12
|
+
features?: IsometricFeature[];
|
|
13
|
+
/** Asset sprite manifest (same shape as IsometricCanvas.assetManifest) */
|
|
14
|
+
assetManifest?: IsometricCanvasProps['assetManifest'];
|
|
15
|
+
/** Base URL prepended to manifest sprite paths */
|
|
16
|
+
assetBaseUrl?: AssetUrl;
|
|
17
|
+
/** Render scale */
|
|
18
|
+
scale?: number;
|
|
19
|
+
/** Show minimap overlay */
|
|
20
|
+
showMinimap?: boolean;
|
|
21
|
+
/** Enable camera pan/zoom controls */
|
|
22
|
+
enableCamera?: boolean;
|
|
23
|
+
/** Declarative event: emits UI:{tileClickEvent} with { x, y } on tile click */
|
|
24
|
+
tileClickEvent?: EventEmit<{
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
27
|
+
}>;
|
|
28
|
+
/** Declarative event: emits UI:{unitClickEvent} with { unitId } on unit click */
|
|
29
|
+
unitClickEvent?: EventEmit<{
|
|
30
|
+
unitId: string;
|
|
31
|
+
}>;
|
|
32
|
+
}
|
|
33
|
+
export declare function SokobanBoard({ tiles, units, features, assetManifest, assetBaseUrl, scale, showMinimap, enableCamera, tileClickEvent, unitClickEvent, isLoading, error, className, }: SokobanBoardProps): React.ReactElement;
|
|
34
|
+
export declare namespace SokobanBoard {
|
|
35
|
+
var displayName: string;
|
|
36
|
+
}
|
|
37
|
+
export default SokobanBoard;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AssetUrl } from '@almadar/core';
|
|
3
|
+
import type { DisplayStateProps } from '../../core/organisms/types';
|
|
4
|
+
export interface SpaceShmupBoardProps extends DisplayStateProps {
|
|
5
|
+
/** Background image URL (starfield / space scene) */
|
|
6
|
+
backgroundImage?: AssetUrl;
|
|
7
|
+
/** Base URL prefix for asset URLs */
|
|
8
|
+
assetBaseUrl?: AssetUrl;
|
|
9
|
+
/** Canvas width in pixels */
|
|
10
|
+
width?: number;
|
|
11
|
+
/** Canvas height in pixels */
|
|
12
|
+
height?: number;
|
|
13
|
+
/** Target frames per second */
|
|
14
|
+
fps?: number;
|
|
15
|
+
}
|
|
16
|
+
export declare function SpaceShmupBoard({ backgroundImage, assetBaseUrl, width, height, fps, isLoading, error, className, }: SpaceShmupBoardProps): React.ReactElement;
|
|
17
|
+
export declare namespace SpaceShmupBoard {
|
|
18
|
+
var displayName: string;
|
|
19
|
+
}
|
|
20
|
+
export default SpaceShmupBoard;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AssetUrl, EventEmit } from '@almadar/core';
|
|
3
|
+
import type { IsometricTile, IsometricUnit, IsometricFeature } from './types/isometric';
|
|
4
|
+
import type { DisplayStateProps } from '../../core/organisms/types';
|
|
5
|
+
import type { IsometricCanvasProps } from '../molecules/IsometricCanvas';
|
|
6
|
+
export interface SpaceStationBoardProps extends DisplayStateProps {
|
|
7
|
+
/** Isometric grid tiles */
|
|
8
|
+
tiles?: IsometricTile[];
|
|
9
|
+
/** Units on the board */
|
|
10
|
+
units?: IsometricUnit[];
|
|
11
|
+
/** Features (consoles, airlocks, etc.) on the board */
|
|
12
|
+
features?: IsometricFeature[];
|
|
13
|
+
/** Asset sprite manifest (same shape as IsometricCanvas.assetManifest) */
|
|
14
|
+
assetManifest?: IsometricCanvasProps['assetManifest'];
|
|
15
|
+
/** Base URL prepended to manifest sprite paths */
|
|
16
|
+
assetBaseUrl?: AssetUrl;
|
|
17
|
+
/** Render scale */
|
|
18
|
+
scale?: number;
|
|
19
|
+
/** Show minimap overlay */
|
|
20
|
+
showMinimap?: boolean;
|
|
21
|
+
/** Enable camera pan/zoom controls */
|
|
22
|
+
enableCamera?: boolean;
|
|
23
|
+
/** Declarative event: emits UI:{tileClickEvent} with { x, y } on tile click */
|
|
24
|
+
tileClickEvent?: EventEmit<{
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
27
|
+
}>;
|
|
28
|
+
/** Declarative event: emits UI:{unitClickEvent} with { unitId } on unit click */
|
|
29
|
+
unitClickEvent?: EventEmit<{
|
|
30
|
+
unitId: string;
|
|
31
|
+
}>;
|
|
32
|
+
}
|
|
33
|
+
export declare function SpaceStationBoard({ tiles, units, features, assetManifest, assetBaseUrl, scale, showMinimap, enableCamera, tileClickEvent, unitClickEvent, isLoading, error, className, }: SpaceStationBoardProps): React.ReactElement;
|
|
34
|
+
export declare namespace SpaceStationBoard {
|
|
35
|
+
var displayName: string;
|
|
36
|
+
}
|
|
37
|
+
export default SpaceStationBoard;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AssetUrl, EventEmit } from '@almadar/core';
|
|
3
|
+
import type { IsometricTile, IsometricUnit, IsometricFeature } from './types/isometric';
|
|
4
|
+
import type { DisplayStateProps } from '../../core/organisms/types';
|
|
5
|
+
import type { IsometricCanvasProps } from '../molecules/IsometricCanvas';
|
|
6
|
+
export interface SportsBoardProps extends DisplayStateProps {
|
|
7
|
+
/** Court/field terrain tiles */
|
|
8
|
+
tiles?: IsometricTile[];
|
|
9
|
+
/** Player units on the board */
|
|
10
|
+
units?: IsometricUnit[];
|
|
11
|
+
/** Features (goals, markers, etc.) on the board */
|
|
12
|
+
features?: IsometricFeature[];
|
|
13
|
+
/** Asset sprite manifest (same shape as IsometricCanvas.assetManifest) */
|
|
14
|
+
assetManifest?: IsometricCanvasProps['assetManifest'];
|
|
15
|
+
/** Base URL prepended to asset paths */
|
|
16
|
+
assetBaseUrl?: AssetUrl;
|
|
17
|
+
/** Render scale */
|
|
18
|
+
scale?: number;
|
|
19
|
+
/** Show minimap overlay */
|
|
20
|
+
showMinimap?: boolean;
|
|
21
|
+
/** Enable camera pan/zoom controls */
|
|
22
|
+
enableCamera?: boolean;
|
|
23
|
+
/** Declarative event: emits UI:{tileClickEvent} with { x, y } on tile click */
|
|
24
|
+
tileClickEvent?: EventEmit<{
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
27
|
+
}>;
|
|
28
|
+
/** Declarative event: emits UI:{unitClickEvent} with { unitId } on unit click */
|
|
29
|
+
unitClickEvent?: EventEmit<{
|
|
30
|
+
unitId: string;
|
|
31
|
+
}>;
|
|
32
|
+
}
|
|
33
|
+
export declare function SportsBoard({ tiles, units, features, assetManifest, assetBaseUrl, scale, showMinimap, enableCamera, tileClickEvent, unitClickEvent, isLoading, error, className, }: SportsBoardProps): React.ReactElement;
|
|
34
|
+
export declare namespace SportsBoard {
|
|
35
|
+
var displayName: string;
|
|
36
|
+
}
|
|
37
|
+
export default SportsBoard;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AssetUrl, EventEmit } from '@almadar/core';
|
|
3
|
+
import type { IsometricTile, IsometricUnit, IsometricFeature } from './types/isometric';
|
|
4
|
+
import type { DisplayStateProps } from '../../core/organisms/types';
|
|
5
|
+
import type { IsometricCanvasProps } from '../molecules/IsometricCanvas';
|
|
6
|
+
export interface TanksBoardProps extends DisplayStateProps {
|
|
7
|
+
/** Ground/sand terrain tiles */
|
|
8
|
+
tiles?: IsometricTile[];
|
|
9
|
+
/** Tank units on the board */
|
|
10
|
+
units?: IsometricUnit[];
|
|
11
|
+
/** Features (obstacles, structures, etc.) on the board */
|
|
12
|
+
features?: IsometricFeature[];
|
|
13
|
+
/** Asset sprite manifest (same shape as IsometricCanvas.assetManifest) */
|
|
14
|
+
assetManifest?: IsometricCanvasProps['assetManifest'];
|
|
15
|
+
/** Base URL prepended to manifest sprite paths */
|
|
16
|
+
assetBaseUrl?: AssetUrl;
|
|
17
|
+
/** Render scale */
|
|
18
|
+
scale?: number;
|
|
19
|
+
/** Show minimap overlay */
|
|
20
|
+
showMinimap?: boolean;
|
|
21
|
+
/** Enable camera pan/zoom controls */
|
|
22
|
+
enableCamera?: boolean;
|
|
23
|
+
/** Declarative event: emits UI:{tileClickEvent} with { x, y } on tile click */
|
|
24
|
+
tileClickEvent?: EventEmit<{
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
27
|
+
}>;
|
|
28
|
+
/** Declarative event: emits UI:{unitClickEvent} with { unitId } on unit click */
|
|
29
|
+
unitClickEvent?: EventEmit<{
|
|
30
|
+
unitId: string;
|
|
31
|
+
}>;
|
|
32
|
+
}
|
|
33
|
+
export declare function TanksBoard({ tiles, units, features, assetManifest, assetBaseUrl, scale, showMinimap, enableCamera, tileClickEvent, unitClickEvent, isLoading, error, className, }: TanksBoardProps): React.ReactElement;
|
|
34
|
+
export declare namespace TanksBoard {
|
|
35
|
+
var displayName: string;
|
|
36
|
+
}
|
|
37
|
+
export default TanksBoard;
|
|
@@ -51,3 +51,16 @@ export { createInitialGameState, calculateValidMoves, calculateAttackTargets, }
|
|
|
51
51
|
export type { Position, GameUnit, UnitTrait, BoardTile, GamePhase, GameState, GameAction, } from './types/game';
|
|
52
52
|
export { combatAnimations, combatClasses, combatEffects, applyTemporaryEffect, calculateDamage, generateCombatMessage, } from './utils/combatEffects';
|
|
53
53
|
export type { CombatEffect, DamageResult, CombatEventType, CombatEventData, } from './utils/combatEffects';
|
|
54
|
+
export { RacingBoard, type RacingBoardProps } from './RacingBoard';
|
|
55
|
+
export { TanksBoard, type TanksBoardProps } from './TanksBoard';
|
|
56
|
+
export { SpaceShmupBoard, type SpaceShmupBoardProps } from './SpaceShmupBoard';
|
|
57
|
+
export { SportsBoard, type SportsBoardProps } from './SportsBoard';
|
|
58
|
+
export { SokobanBoard, type SokobanBoardProps } from './SokobanBoard';
|
|
59
|
+
export { BoardgameBoard, type BoardgameBoardProps } from './BoardgameBoard';
|
|
60
|
+
export { PirateBoard, type PirateBoardProps } from './PirateBoard';
|
|
61
|
+
export { PinballBoard, type PinballBoardProps } from './PinballBoard';
|
|
62
|
+
export { FishingBoard, type FishingBoardProps } from './FishingBoard';
|
|
63
|
+
export { MatchPuzzleBoard, type MatchPuzzleBoardProps } from './MatchPuzzleBoard';
|
|
64
|
+
export { HolidayRunnerBoard, type HolidayRunnerBoardProps } from './HolidayRunnerBoard';
|
|
65
|
+
export { MinigolfBoard, type MinigolfBoardProps } from './MinigolfBoard';
|
|
66
|
+
export { SpaceStationBoard, type SpaceStationBoardProps } from './SpaceStationBoard';
|
|
@@ -30,6 +30,7 @@ export declare const FEATURE_COLORS: Record<string, string>;
|
|
|
30
30
|
/**
|
|
31
31
|
* Tile layout mode. 'isometric' = 2:1 diamond projection (default).
|
|
32
32
|
* 'hex' = pointy-top offset-row hex grid.
|
|
33
|
+
* 'flat' = orthographic top-down square grid (sokoban/tanks/sports/etc.).
|
|
33
34
|
*
|
|
34
35
|
* Hex constants (at scale=1):
|
|
35
36
|
* w = TILE_WIDTH (256) — horizontal cell width
|
|
@@ -37,13 +38,21 @@ export declare const FEATURE_COLORS: Record<string, string>;
|
|
|
37
38
|
* Forward: screenX = col*w + (row&1)*(w/2) + baseOffsetX
|
|
38
39
|
* screenY = row * (h * 0.75)
|
|
39
40
|
* Inverse: row = round(screenY / (h*0.75)); col = round((screenX - (row&1)*(w/2) - baseOffsetX) / w)
|
|
41
|
+
*
|
|
42
|
+
* Flat constants (at scale=1):
|
|
43
|
+
* cellW = TILE_WIDTH (256) — horizontal cell pitch
|
|
44
|
+
* cellH = FLOOR_HEIGHT (128) — vertical cell pitch (= cellW/2; keeps same visual scale as hex rows)
|
|
45
|
+
* Forward: screenX = col*cellW + baseOffsetX
|
|
46
|
+
* screenY = row * cellH
|
|
47
|
+
* Inverse: col = round((screenX - baseOffsetX) / cellW); row = round(screenY / cellH)
|
|
40
48
|
*/
|
|
41
|
-
export type TileLayout = 'isometric' | 'hex';
|
|
49
|
+
export type TileLayout = 'isometric' | 'hex' | 'flat';
|
|
42
50
|
/**
|
|
43
51
|
* Convert tile grid coordinates to screen pixel coordinates.
|
|
44
52
|
*
|
|
45
53
|
* For 'isometric' (default): 2:1 diamond projection.
|
|
46
54
|
* For 'hex': pointy-top offset-row projection (odd rows shifted right by w/2).
|
|
55
|
+
* For 'flat': orthographic top-down square grid; col maps to X, row maps to Y.
|
|
47
56
|
*
|
|
48
57
|
* @param tileX - Grid X (col) coordinate
|
|
49
58
|
* @param tileY - Grid Y (row) coordinate
|