@almadar/ui 5.69.0 → 5.70.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.
@@ -47244,35 +47244,44 @@ var init_HexStrategyBoard = __esm({
47244
47244
  }
47245
47245
  });
47246
47246
  function HolidayRunnerBoard({
47247
- backgroundImage,
47247
+ tiles,
47248
+ units,
47249
+ features,
47250
+ assetManifest,
47248
47251
  assetBaseUrl,
47249
- width = 800,
47250
- height = 400,
47251
- fps = 60,
47252
+ scale = 0.45,
47253
+ showMinimap = false,
47254
+ enableCamera = true,
47255
+ tileClickEvent,
47256
+ unitClickEvent,
47252
47257
  isLoading,
47253
47258
  error,
47254
47259
  className
47255
47260
  }) {
47256
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("holiday-runner-board relative w-full h-full", className), children: [
47257
- isLoading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/40 z-10", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-white text-sm", children: "Loading\u2026" }) }),
47258
- error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/60 z-10", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-red-400 text-sm", children: error.message }) }),
47259
- /* @__PURE__ */ jsxRuntime.jsx(
47260
- GameCanvas2D,
47261
- {
47262
- width,
47263
- height,
47264
- fps,
47265
- backgroundImage: backgroundImage ?? "",
47266
- assetBaseUrl
47267
- }
47268
- )
47269
- ] });
47261
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("holiday-runner-board relative w-full h-full", className), children: /* @__PURE__ */ jsxRuntime.jsx(
47262
+ IsometricCanvas_default,
47263
+ {
47264
+ tileLayout: "flat",
47265
+ tiles,
47266
+ units,
47267
+ features,
47268
+ assetManifest,
47269
+ assetBaseUrl,
47270
+ scale,
47271
+ showMinimap,
47272
+ enableCamera,
47273
+ tileClickEvent,
47274
+ unitClickEvent,
47275
+ isLoading,
47276
+ error
47277
+ }
47278
+ ) });
47270
47279
  }
47271
47280
  var init_HolidayRunnerBoard = __esm({
47272
47281
  "components/game/organisms/HolidayRunnerBoard.tsx"() {
47273
47282
  "use client";
47274
47283
  init_cn();
47275
- init_GameCanvas2D();
47284
+ init_IsometricCanvas();
47276
47285
  HolidayRunnerBoard.displayName = "HolidayRunnerBoard";
47277
47286
  }
47278
47287
  });
@@ -48990,25 +48999,36 @@ var init_PricingPageTemplate = __esm({
48990
48999
  }
48991
49000
  });
48992
49001
  function RacingBoard({
48993
- backgroundImage,
49002
+ tiles,
49003
+ units,
49004
+ features,
49005
+ assetManifest,
48994
49006
  assetBaseUrl,
48995
- width = 800,
48996
- height = 600,
48997
- fps = 60,
48998
- tickEvent,
48999
- drawEvent,
49007
+ scale = 0.45,
49008
+ showMinimap = true,
49009
+ enableCamera = true,
49010
+ tileClickEvent,
49011
+ unitClickEvent,
49012
+ isLoading,
49013
+ error,
49000
49014
  className
49001
49015
  }) {
49002
49016
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("racing-board relative w-full h-full", className), children: /* @__PURE__ */ jsxRuntime.jsx(
49003
- GameCanvas2D,
49017
+ IsometricCanvas_default,
49004
49018
  {
49005
- backgroundImage,
49019
+ tileLayout: "flat",
49020
+ tiles,
49021
+ units,
49022
+ features,
49023
+ assetManifest,
49006
49024
  assetBaseUrl,
49007
- width,
49008
- height,
49009
- fps,
49010
- tickEvent: typeof tickEvent === "string" ? tickEvent : void 0,
49011
- drawEvent: typeof drawEvent === "string" ? drawEvent : void 0
49025
+ scale,
49026
+ showMinimap,
49027
+ enableCamera,
49028
+ tileClickEvent,
49029
+ unitClickEvent,
49030
+ isLoading,
49031
+ error
49012
49032
  }
49013
49033
  ) });
49014
49034
  }
@@ -49016,7 +49036,7 @@ var init_RacingBoard = __esm({
49016
49036
  "components/game/organisms/RacingBoard.tsx"() {
49017
49037
  "use client";
49018
49038
  init_cn();
49019
- init_GameCanvas2D();
49039
+ init_IsometricCanvas();
49020
49040
  RacingBoard.displayName = "RacingBoard";
49021
49041
  }
49022
49042
  });
@@ -52268,35 +52288,44 @@ var init_SokobanBoard = __esm({
52268
52288
  }
52269
52289
  });
52270
52290
  function SpaceShmupBoard({
52271
- backgroundImage,
52291
+ tiles,
52292
+ units,
52293
+ features,
52294
+ assetManifest,
52272
52295
  assetBaseUrl,
52273
- width = 800,
52274
- height = 600,
52275
- fps = 60,
52296
+ scale = 0.45,
52297
+ showMinimap = false,
52298
+ enableCamera = true,
52299
+ tileClickEvent,
52300
+ unitClickEvent,
52276
52301
  isLoading,
52277
52302
  error,
52278
52303
  className
52279
52304
  }) {
52280
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("space-shmup-board relative w-full h-full", className), children: [
52281
- isLoading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/60 z-10", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-white text-sm", children: "Loading\u2026" }) }),
52282
- error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-red-900/60 z-10", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-white text-sm", children: error.message }) }),
52283
- /* @__PURE__ */ jsxRuntime.jsx(
52284
- GameCanvas2D,
52285
- {
52286
- backgroundImage,
52287
- assetBaseUrl,
52288
- width,
52289
- height,
52290
- fps
52291
- }
52292
- )
52293
- ] });
52305
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("space-shmup-board relative w-full h-full", className), children: /* @__PURE__ */ jsxRuntime.jsx(
52306
+ IsometricCanvas_default,
52307
+ {
52308
+ tileLayout: "flat",
52309
+ tiles,
52310
+ units,
52311
+ features,
52312
+ assetManifest,
52313
+ assetBaseUrl,
52314
+ scale,
52315
+ showMinimap,
52316
+ enableCamera,
52317
+ tileClickEvent,
52318
+ unitClickEvent,
52319
+ isLoading,
52320
+ error
52321
+ }
52322
+ ) });
52294
52323
  }
52295
52324
  var init_SpaceShmupBoard = __esm({
52296
52325
  "components/game/organisms/SpaceShmupBoard.tsx"() {
52297
52326
  "use client";
52298
52327
  init_cn();
52299
- init_GameCanvas2D();
52328
+ init_IsometricCanvas();
52300
52329
  SpaceShmupBoard.displayName = "SpaceShmupBoard";
52301
52330
  }
52302
52331
  });
package/dist/avl/index.js CHANGED
@@ -47197,35 +47197,44 @@ var init_HexStrategyBoard = __esm({
47197
47197
  }
47198
47198
  });
47199
47199
  function HolidayRunnerBoard({
47200
- backgroundImage,
47200
+ tiles,
47201
+ units,
47202
+ features,
47203
+ assetManifest,
47201
47204
  assetBaseUrl,
47202
- width = 800,
47203
- height = 400,
47204
- fps = 60,
47205
+ scale = 0.45,
47206
+ showMinimap = false,
47207
+ enableCamera = true,
47208
+ tileClickEvent,
47209
+ unitClickEvent,
47205
47210
  isLoading,
47206
47211
  error,
47207
47212
  className
47208
47213
  }) {
47209
- return /* @__PURE__ */ jsxs("div", { className: cn("holiday-runner-board relative w-full h-full", className), children: [
47210
- isLoading && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/40 z-10", children: /* @__PURE__ */ jsx("span", { className: "text-white text-sm", children: "Loading\u2026" }) }),
47211
- error && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/60 z-10", children: /* @__PURE__ */ jsx("span", { className: "text-red-400 text-sm", children: error.message }) }),
47212
- /* @__PURE__ */ jsx(
47213
- GameCanvas2D,
47214
- {
47215
- width,
47216
- height,
47217
- fps,
47218
- backgroundImage: backgroundImage ?? "",
47219
- assetBaseUrl
47220
- }
47221
- )
47222
- ] });
47214
+ return /* @__PURE__ */ jsx("div", { className: cn("holiday-runner-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
47215
+ IsometricCanvas_default,
47216
+ {
47217
+ tileLayout: "flat",
47218
+ tiles,
47219
+ units,
47220
+ features,
47221
+ assetManifest,
47222
+ assetBaseUrl,
47223
+ scale,
47224
+ showMinimap,
47225
+ enableCamera,
47226
+ tileClickEvent,
47227
+ unitClickEvent,
47228
+ isLoading,
47229
+ error
47230
+ }
47231
+ ) });
47223
47232
  }
47224
47233
  var init_HolidayRunnerBoard = __esm({
47225
47234
  "components/game/organisms/HolidayRunnerBoard.tsx"() {
47226
47235
  "use client";
47227
47236
  init_cn();
47228
- init_GameCanvas2D();
47237
+ init_IsometricCanvas();
47229
47238
  HolidayRunnerBoard.displayName = "HolidayRunnerBoard";
47230
47239
  }
47231
47240
  });
@@ -48943,25 +48952,36 @@ var init_PricingPageTemplate = __esm({
48943
48952
  }
48944
48953
  });
48945
48954
  function RacingBoard({
48946
- backgroundImage,
48955
+ tiles,
48956
+ units,
48957
+ features,
48958
+ assetManifest,
48947
48959
  assetBaseUrl,
48948
- width = 800,
48949
- height = 600,
48950
- fps = 60,
48951
- tickEvent,
48952
- drawEvent,
48960
+ scale = 0.45,
48961
+ showMinimap = true,
48962
+ enableCamera = true,
48963
+ tileClickEvent,
48964
+ unitClickEvent,
48965
+ isLoading,
48966
+ error,
48953
48967
  className
48954
48968
  }) {
48955
48969
  return /* @__PURE__ */ jsx("div", { className: cn("racing-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
48956
- GameCanvas2D,
48970
+ IsometricCanvas_default,
48957
48971
  {
48958
- backgroundImage,
48972
+ tileLayout: "flat",
48973
+ tiles,
48974
+ units,
48975
+ features,
48976
+ assetManifest,
48959
48977
  assetBaseUrl,
48960
- width,
48961
- height,
48962
- fps,
48963
- tickEvent: typeof tickEvent === "string" ? tickEvent : void 0,
48964
- drawEvent: typeof drawEvent === "string" ? drawEvent : void 0
48978
+ scale,
48979
+ showMinimap,
48980
+ enableCamera,
48981
+ tileClickEvent,
48982
+ unitClickEvent,
48983
+ isLoading,
48984
+ error
48965
48985
  }
48966
48986
  ) });
48967
48987
  }
@@ -48969,7 +48989,7 @@ var init_RacingBoard = __esm({
48969
48989
  "components/game/organisms/RacingBoard.tsx"() {
48970
48990
  "use client";
48971
48991
  init_cn();
48972
- init_GameCanvas2D();
48992
+ init_IsometricCanvas();
48973
48993
  RacingBoard.displayName = "RacingBoard";
48974
48994
  }
48975
48995
  });
@@ -52221,35 +52241,44 @@ var init_SokobanBoard = __esm({
52221
52241
  }
52222
52242
  });
52223
52243
  function SpaceShmupBoard({
52224
- backgroundImage,
52244
+ tiles,
52245
+ units,
52246
+ features,
52247
+ assetManifest,
52225
52248
  assetBaseUrl,
52226
- width = 800,
52227
- height = 600,
52228
- fps = 60,
52249
+ scale = 0.45,
52250
+ showMinimap = false,
52251
+ enableCamera = true,
52252
+ tileClickEvent,
52253
+ unitClickEvent,
52229
52254
  isLoading,
52230
52255
  error,
52231
52256
  className
52232
52257
  }) {
52233
- return /* @__PURE__ */ jsxs("div", { className: cn("space-shmup-board relative w-full h-full", className), children: [
52234
- isLoading && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/60 z-10", children: /* @__PURE__ */ jsx("span", { className: "text-white text-sm", children: "Loading\u2026" }) }),
52235
- error && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-red-900/60 z-10", children: /* @__PURE__ */ jsx("span", { className: "text-white text-sm", children: error.message }) }),
52236
- /* @__PURE__ */ jsx(
52237
- GameCanvas2D,
52238
- {
52239
- backgroundImage,
52240
- assetBaseUrl,
52241
- width,
52242
- height,
52243
- fps
52244
- }
52245
- )
52246
- ] });
52258
+ return /* @__PURE__ */ jsx("div", { className: cn("space-shmup-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
52259
+ IsometricCanvas_default,
52260
+ {
52261
+ tileLayout: "flat",
52262
+ tiles,
52263
+ units,
52264
+ features,
52265
+ assetManifest,
52266
+ assetBaseUrl,
52267
+ scale,
52268
+ showMinimap,
52269
+ enableCamera,
52270
+ tileClickEvent,
52271
+ unitClickEvent,
52272
+ isLoading,
52273
+ error
52274
+ }
52275
+ ) });
52247
52276
  }
52248
52277
  var init_SpaceShmupBoard = __esm({
52249
52278
  "components/game/organisms/SpaceShmupBoard.tsx"() {
52250
52279
  "use client";
52251
52280
  init_cn();
52252
- init_GameCanvas2D();
52281
+ init_IsometricCanvas();
52253
52282
  SpaceShmupBoard.displayName = "SpaceShmupBoard";
52254
52283
  }
52255
52284
  });
@@ -1,34 +1,36 @@
1
1
  import React from 'react';
2
2
  import type { AssetUrl, EventEmit } from '@almadar/core';
3
+ import type { IsometricTile, IsometricUnit, IsometricFeature } from './types/isometric';
3
4
  import type { DisplayStateProps } from '../../core/organisms/types';
5
+ import type { IsometricCanvasProps } from '../molecules/IsometricCanvas';
4
6
  export interface HolidayRunnerBoardProps extends DisplayStateProps {
5
- /** Background image URL for the runner level */
6
- backgroundImage?: AssetUrl;
7
- /** Base URL prefix for asset URLs */
7
+ /** Ground/sky terrain tiles for the side-scroll strip */
8
+ tiles?: IsometricTile[];
9
+ /** Runner and obstacle units on the board */
10
+ units?: IsometricUnit[];
11
+ /** Features (gifts, 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 */
8
16
  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
17
  /** Render scale */
16
18
  scale?: number;
17
19
  /** Show minimap overlay */
18
20
  showMinimap?: boolean;
19
21
  /** Enable camera pan/zoom controls */
20
22
  enableCamera?: boolean;
21
- /** Declarative event: emits UI:{tickEvent} with { dt, frame } each tick */
22
- tickEvent?: EventEmit<{
23
- dt: number;
24
- frame: number;
23
+ /** Declarative event: emits UI:{tileClickEvent} with { x, y } on tile click */
24
+ tileClickEvent?: EventEmit<{
25
+ x: number;
26
+ y: number;
25
27
  }>;
26
- /** Declarative event: emits UI:{drawEvent} with { frame } each draw frame */
27
- drawEvent?: EventEmit<{
28
- frame: number;
28
+ /** Declarative event: emits UI:{unitClickEvent} with { unitId } on unit click */
29
+ unitClickEvent?: EventEmit<{
30
+ unitId: string;
29
31
  }>;
30
32
  }
31
- export declare function HolidayRunnerBoard({ backgroundImage, assetBaseUrl, width, height, fps, isLoading, error, className, }: HolidayRunnerBoardProps): React.ReactElement;
33
+ export declare function HolidayRunnerBoard({ tiles, units, features, assetManifest, assetBaseUrl, scale, showMinimap, enableCamera, tileClickEvent, unitClickEvent, isLoading, error, className, }: HolidayRunnerBoardProps): React.ReactElement;
32
34
  export declare namespace HolidayRunnerBoard {
33
35
  var displayName: string;
34
36
  }
@@ -1,28 +1,36 @@
1
1
  import React from 'react';
2
2
  import type { AssetUrl, EventEmit } from '@almadar/core';
3
+ import type { IsometricTile, IsometricUnit, IsometricFeature } from './types/isometric';
3
4
  import type { DisplayStateProps } from '../../core/organisms/types';
5
+ import type { IsometricCanvasProps } from '../molecules/IsometricCanvas';
4
6
  export interface RacingBoardProps extends DisplayStateProps {
5
- /** Race track background image URL */
6
- backgroundImage?: AssetUrl;
7
- /** Base URL prepended to asset paths */
7
+ /** Road + grass terrain tiles forming the race circuit */
8
+ tiles?: IsometricTile[];
9
+ /** Car units on the track */
10
+ units?: IsometricUnit[];
11
+ /** Track features (pit lane markers, start/finish line, etc.) */
12
+ features?: IsometricFeature[];
13
+ /** Asset sprite manifest (same shape as IsometricCanvas.assetManifest) */
14
+ assetManifest?: IsometricCanvasProps['assetManifest'];
15
+ /** Base URL prepended to manifest sprite paths */
8
16
  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;
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;
19
27
  }>;
20
- /** Declarative event: emits UI:{drawEvent} with { frame } each draw frame */
21
- drawEvent?: EventEmit<{
22
- frame: number;
28
+ /** Declarative event: emits UI:{unitClickEvent} with { unitId } on unit click */
29
+ unitClickEvent?: EventEmit<{
30
+ unitId: string;
23
31
  }>;
24
32
  }
25
- export declare function RacingBoard({ backgroundImage, assetBaseUrl, width, height, fps, tickEvent, drawEvent, className, }: RacingBoardProps): React.ReactElement;
33
+ export declare function RacingBoard({ tiles, units, features, assetManifest, assetBaseUrl, scale, showMinimap, enableCamera, tileClickEvent, unitClickEvent, isLoading, error, className, }: RacingBoardProps): React.ReactElement;
26
34
  export declare namespace RacingBoard {
27
35
  var displayName: string;
28
36
  }
@@ -1,19 +1,36 @@
1
1
  import React from 'react';
2
- import type { AssetUrl } from '@almadar/core';
2
+ import type { AssetUrl, EventEmit } from '@almadar/core';
3
+ import type { IsometricTile, IsometricUnit, IsometricFeature } from './types/isometric';
3
4
  import type { DisplayStateProps } from '../../core/organisms/types';
5
+ import type { IsometricCanvasProps } from '../molecules/IsometricCanvas';
4
6
  export interface SpaceShmupBoardProps extends DisplayStateProps {
5
- /** Background image URL (starfield / space scene) */
6
- backgroundImage?: AssetUrl;
7
- /** Base URL prefix for asset URLs */
7
+ /** Space terrain tiles filling the grid */
8
+ tiles?: IsometricTile[];
9
+ /** Player ship and enemy ships on the board */
10
+ units?: IsometricUnit[];
11
+ /** Features (asteroids, power-ups, 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 */
8
16
  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;
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
+ }>;
15
32
  }
16
- export declare function SpaceShmupBoard({ backgroundImage, assetBaseUrl, width, height, fps, isLoading, error, className, }: SpaceShmupBoardProps): React.ReactElement;
33
+ export declare function SpaceShmupBoard({ tiles, units, features, assetManifest, assetBaseUrl, scale, showMinimap, enableCamera, tileClickEvent, unitClickEvent, isLoading, error, className, }: SpaceShmupBoardProps): React.ReactElement;
17
34
  export declare namespace SpaceShmupBoard {
18
35
  var displayName: string;
19
36
  }