@almadar/ui 5.65.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.
Files changed (42) hide show
  1. package/dist/avl/index.cjs +3259 -1568
  2. package/dist/avl/index.d.cts +10 -2
  3. package/dist/avl/index.d.ts +1 -0
  4. package/dist/avl/index.js +1992 -302
  5. package/dist/components/avl/derive-edit-focus.d.ts +8 -0
  6. package/dist/components/core/organisms/ChatBar.d.ts +31 -0
  7. package/dist/components/core/organisms/SubagentTracePanel.d.ts +50 -0
  8. package/dist/components/core/organisms/index.d.ts +3 -0
  9. package/dist/components/core/organisms/trace-edit-focus.d.ts +14 -0
  10. package/dist/components/game/atoms/ChoiceButton.d.ts +7 -1
  11. package/dist/components/game/molecules/HealthPanel.d.ts +3 -0
  12. package/dist/components/game/molecules/IsometricCanvas.d.ts +1 -1
  13. package/dist/components/game/molecules/PowerupSlots.d.ts +3 -0
  14. package/dist/components/game/molecules/TurnPanel.d.ts +3 -0
  15. package/dist/components/game/molecules/three/index.cjs +6 -6
  16. package/dist/components/game/molecules/three/index.js +6 -6
  17. package/dist/components/game/organisms/BoardgameBoard.d.ts +37 -0
  18. package/dist/components/game/organisms/FishingBoard.d.ts +33 -0
  19. package/dist/components/game/organisms/HolidayRunnerBoard.d.ts +35 -0
  20. package/dist/components/game/organisms/MatchPuzzleBoard.d.ts +37 -0
  21. package/dist/components/game/organisms/MinigolfBoard.d.ts +37 -0
  22. package/dist/components/game/organisms/PinballBoard.d.ts +35 -0
  23. package/dist/components/game/organisms/PirateBoard.d.ts +37 -0
  24. package/dist/components/game/organisms/RacingBoard.d.ts +29 -0
  25. package/dist/components/game/organisms/SokobanBoard.d.ts +37 -0
  26. package/dist/components/game/organisms/SpaceShmupBoard.d.ts +20 -0
  27. package/dist/components/game/organisms/SpaceStationBoard.d.ts +37 -0
  28. package/dist/components/game/organisms/SportsBoard.d.ts +37 -0
  29. package/dist/components/game/organisms/TanksBoard.d.ts +37 -0
  30. package/dist/components/game/organisms/index.d.ts +13 -0
  31. package/dist/components/game/organisms/utils/isometric.d.ts +10 -1
  32. package/dist/components/index.cjs +3096 -1377
  33. package/dist/components/index.js +1970 -266
  34. package/dist/hooks/index.cjs +94 -0
  35. package/dist/hooks/index.d.ts +1 -0
  36. package/dist/hooks/index.js +95 -2
  37. package/dist/hooks/useAgentTrace.d.ts +85 -0
  38. package/dist/providers/index.cjs +3037 -1351
  39. package/dist/providers/index.js +1937 -251
  40. package/dist/runtime/index.cjs +3095 -1409
  41. package/dist/runtime/index.js +1943 -257
  42. package/package.json +2 -2
@@ -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