@almadar/ui 5.46.0 → 5.47.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.
@@ -3268,43 +3268,51 @@ function GameCanvas3DBattleTemplate({
3268
3268
  const features = resolved ? Array.isArray(resolved.features) ? resolved.features : [] : propFeatures;
3269
3269
  const currentTurn = resolved?.currentTurn;
3270
3270
  const round = resolved?.round == null ? void 0 : Number(resolved.round);
3271
- return /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: cn("game-canvas-3d-battle-template", className), children: [
3272
- /* @__PURE__ */ jsxRuntime.jsx(
3273
- GameCanvas3D,
3274
- {
3275
- tiles,
3276
- units,
3277
- features,
3278
- cameraMode,
3279
- showGrid,
3280
- showCoordinates: false,
3281
- showTileInfo: false,
3282
- shadows,
3283
- backgroundColor,
3284
- tileClickEvent,
3285
- unitClickEvent,
3286
- selectedUnitId,
3287
- validMoves,
3288
- attackTargets,
3289
- className: "game-canvas-3d-battle-template__canvas"
3290
- }
3291
- ),
3292
- currentTurn && /* @__PURE__ */ jsxRuntime.jsxs(
3293
- HStack,
3294
- {
3295
- gap: "sm",
3296
- align: "center",
3297
- className: cn("battle-template__turn-indicator", `battle-template__turn-indicator--${currentTurn}`),
3298
- children: [
3299
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "turn-indicator__label", children: currentTurn === "player" ? "Your Turn" : "Enemy's Turn" }),
3300
- round != null && /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "turn-indicator__round", children: [
3301
- "Round ",
3302
- round
3303
- ] })
3304
- ]
3305
- }
3306
- )
3307
- ] });
3271
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3272
+ Box,
3273
+ {
3274
+ className: cn("game-canvas-3d-battle-template", className),
3275
+ style: { display: "block", position: "relative", width: "100%", minHeight: "85vh" },
3276
+ children: [
3277
+ /* @__PURE__ */ jsxRuntime.jsx(
3278
+ GameCanvas3D,
3279
+ {
3280
+ tiles,
3281
+ units,
3282
+ features,
3283
+ cameraMode,
3284
+ showGrid,
3285
+ showCoordinates: false,
3286
+ showTileInfo: false,
3287
+ shadows,
3288
+ backgroundColor,
3289
+ tileClickEvent,
3290
+ unitClickEvent,
3291
+ selectedUnitId,
3292
+ validMoves,
3293
+ attackTargets,
3294
+ className: "game-canvas-3d-battle-template__canvas"
3295
+ }
3296
+ ),
3297
+ currentTurn && /* @__PURE__ */ jsxRuntime.jsxs(
3298
+ HStack,
3299
+ {
3300
+ gap: "sm",
3301
+ align: "center",
3302
+ className: cn("battle-template__turn-indicator", `battle-template__turn-indicator--${currentTurn}`),
3303
+ style: { position: "absolute", top: "12px", right: "12px", zIndex: 10 },
3304
+ children: [
3305
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", className: "turn-indicator__label", children: currentTurn === "player" ? "Your Turn" : "Enemy's Turn" }),
3306
+ round != null && /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "turn-indicator__round", children: [
3307
+ "Round ",
3308
+ round
3309
+ ] })
3310
+ ]
3311
+ }
3312
+ )
3313
+ ]
3314
+ }
3315
+ );
3308
3316
  }
3309
3317
  GameCanvas3DBattleTemplate.displayName = "GameCanvas3DBattleTemplate";
3310
3318
  var DEFAULT_3D_CASTLE_TILES = [
@@ -3369,42 +3377,49 @@ function GameCanvas3DCastleTemplate({
3369
3377
  const name = resolved?.name == null ? void 0 : String(resolved.name);
3370
3378
  const level = resolved?.level == null ? void 0 : Number(resolved.level);
3371
3379
  const owner = resolved?.owner == null ? void 0 : String(resolved.owner);
3372
- return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { className: cn("game-canvas-3d-castle-template", className), children: [
3373
- showHeader && name && /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "md", align: "center", className: "castle-template__header", children: [
3374
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "h2", className: "header__name", children: name }),
3375
- level != null && /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "header__level", children: [
3376
- "Level ",
3377
- level
3378
- ] }),
3379
- owner && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", color: "muted", className: "header__owner", children: owner })
3380
- ] }),
3381
- /* @__PURE__ */ jsxRuntime.jsx(
3382
- GameCanvas3D,
3383
- {
3384
- tiles,
3385
- units,
3386
- features,
3387
- cameraMode,
3388
- showGrid,
3389
- showCoordinates: false,
3390
- showTileInfo: false,
3391
- shadows,
3392
- backgroundColor,
3393
- featureClickEvent: buildingClickEvent,
3394
- unitClickEvent,
3395
- selectedTileIds,
3396
- validMoves: availableBuildSites,
3397
- className: "game-canvas-3d-castle-template__canvas"
3398
- }
3399
- ),
3400
- units.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", align: "center", className: "castle-template__garrison-info", children: [
3401
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "garrison-info__label", children: "Garrison:" }),
3402
- /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", weight: "bold", className: "garrison-info__count", children: [
3403
- units.length,
3404
- " units"
3405
- ] })
3406
- ] })
3407
- ] });
3380
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3381
+ VStack,
3382
+ {
3383
+ className: cn("game-canvas-3d-castle-template", className),
3384
+ style: { display: "block", width: "100%", minHeight: "85vh" },
3385
+ children: [
3386
+ showHeader && name && /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "md", align: "center", className: "castle-template__header", children: [
3387
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "h2", className: "header__name", children: name }),
3388
+ level != null && /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "header__level", children: [
3389
+ "Level ",
3390
+ level
3391
+ ] }),
3392
+ owner && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", color: "muted", className: "header__owner", children: owner })
3393
+ ] }),
3394
+ /* @__PURE__ */ jsxRuntime.jsx(
3395
+ GameCanvas3D,
3396
+ {
3397
+ tiles,
3398
+ units,
3399
+ features,
3400
+ cameraMode,
3401
+ showGrid,
3402
+ showCoordinates: false,
3403
+ showTileInfo: false,
3404
+ shadows,
3405
+ backgroundColor,
3406
+ featureClickEvent: buildingClickEvent,
3407
+ unitClickEvent,
3408
+ selectedTileIds,
3409
+ validMoves: availableBuildSites,
3410
+ className: "game-canvas-3d-castle-template__canvas"
3411
+ }
3412
+ ),
3413
+ units.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", align: "center", className: "castle-template__garrison-info", children: [
3414
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", className: "garrison-info__label", children: "Garrison:" }),
3415
+ /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", weight: "bold", className: "garrison-info__count", children: [
3416
+ units.length,
3417
+ " units"
3418
+ ] })
3419
+ ] })
3420
+ ]
3421
+ }
3422
+ );
3408
3423
  }
3409
3424
  GameCanvas3DCastleTemplate.displayName = "GameCanvas3DCastleTemplate";
3410
3425
  var DEFAULT_3D_WORLDMAP_TILES = [
@@ -3244,43 +3244,51 @@ function GameCanvas3DBattleTemplate({
3244
3244
  const features = resolved ? Array.isArray(resolved.features) ? resolved.features : [] : propFeatures;
3245
3245
  const currentTurn = resolved?.currentTurn;
3246
3246
  const round = resolved?.round == null ? void 0 : Number(resolved.round);
3247
- return /* @__PURE__ */ jsxs(Box, { className: cn("game-canvas-3d-battle-template", className), children: [
3248
- /* @__PURE__ */ jsx(
3249
- GameCanvas3D,
3250
- {
3251
- tiles,
3252
- units,
3253
- features,
3254
- cameraMode,
3255
- showGrid,
3256
- showCoordinates: false,
3257
- showTileInfo: false,
3258
- shadows,
3259
- backgroundColor,
3260
- tileClickEvent,
3261
- unitClickEvent,
3262
- selectedUnitId,
3263
- validMoves,
3264
- attackTargets,
3265
- className: "game-canvas-3d-battle-template__canvas"
3266
- }
3267
- ),
3268
- currentTurn && /* @__PURE__ */ jsxs(
3269
- HStack,
3270
- {
3271
- gap: "sm",
3272
- align: "center",
3273
- className: cn("battle-template__turn-indicator", `battle-template__turn-indicator--${currentTurn}`),
3274
- children: [
3275
- /* @__PURE__ */ jsx(Typography, { variant: "body", className: "turn-indicator__label", children: currentTurn === "player" ? "Your Turn" : "Enemy's Turn" }),
3276
- round != null && /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "turn-indicator__round", children: [
3277
- "Round ",
3278
- round
3279
- ] })
3280
- ]
3281
- }
3282
- )
3283
- ] });
3247
+ return /* @__PURE__ */ jsxs(
3248
+ Box,
3249
+ {
3250
+ className: cn("game-canvas-3d-battle-template", className),
3251
+ style: { display: "block", position: "relative", width: "100%", minHeight: "85vh" },
3252
+ children: [
3253
+ /* @__PURE__ */ jsx(
3254
+ GameCanvas3D,
3255
+ {
3256
+ tiles,
3257
+ units,
3258
+ features,
3259
+ cameraMode,
3260
+ showGrid,
3261
+ showCoordinates: false,
3262
+ showTileInfo: false,
3263
+ shadows,
3264
+ backgroundColor,
3265
+ tileClickEvent,
3266
+ unitClickEvent,
3267
+ selectedUnitId,
3268
+ validMoves,
3269
+ attackTargets,
3270
+ className: "game-canvas-3d-battle-template__canvas"
3271
+ }
3272
+ ),
3273
+ currentTurn && /* @__PURE__ */ jsxs(
3274
+ HStack,
3275
+ {
3276
+ gap: "sm",
3277
+ align: "center",
3278
+ className: cn("battle-template__turn-indicator", `battle-template__turn-indicator--${currentTurn}`),
3279
+ style: { position: "absolute", top: "12px", right: "12px", zIndex: 10 },
3280
+ children: [
3281
+ /* @__PURE__ */ jsx(Typography, { variant: "body", className: "turn-indicator__label", children: currentTurn === "player" ? "Your Turn" : "Enemy's Turn" }),
3282
+ round != null && /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "turn-indicator__round", children: [
3283
+ "Round ",
3284
+ round
3285
+ ] })
3286
+ ]
3287
+ }
3288
+ )
3289
+ ]
3290
+ }
3291
+ );
3284
3292
  }
3285
3293
  GameCanvas3DBattleTemplate.displayName = "GameCanvas3DBattleTemplate";
3286
3294
  var DEFAULT_3D_CASTLE_TILES = [
@@ -3345,42 +3353,49 @@ function GameCanvas3DCastleTemplate({
3345
3353
  const name = resolved?.name == null ? void 0 : String(resolved.name);
3346
3354
  const level = resolved?.level == null ? void 0 : Number(resolved.level);
3347
3355
  const owner = resolved?.owner == null ? void 0 : String(resolved.owner);
3348
- return /* @__PURE__ */ jsxs(VStack, { className: cn("game-canvas-3d-castle-template", className), children: [
3349
- showHeader && name && /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "center", className: "castle-template__header", children: [
3350
- /* @__PURE__ */ jsx(Typography, { variant: "h2", className: "header__name", children: name }),
3351
- level != null && /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "header__level", children: [
3352
- "Level ",
3353
- level
3354
- ] }),
3355
- owner && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", className: "header__owner", children: owner })
3356
- ] }),
3357
- /* @__PURE__ */ jsx(
3358
- GameCanvas3D,
3359
- {
3360
- tiles,
3361
- units,
3362
- features,
3363
- cameraMode,
3364
- showGrid,
3365
- showCoordinates: false,
3366
- showTileInfo: false,
3367
- shadows,
3368
- backgroundColor,
3369
- featureClickEvent: buildingClickEvent,
3370
- unitClickEvent,
3371
- selectedTileIds,
3372
- validMoves: availableBuildSites,
3373
- className: "game-canvas-3d-castle-template__canvas"
3374
- }
3375
- ),
3376
- units.length > 0 && /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: "castle-template__garrison-info", children: [
3377
- /* @__PURE__ */ jsx(Typography, { variant: "small", className: "garrison-info__label", children: "Garrison:" }),
3378
- /* @__PURE__ */ jsxs(Typography, { variant: "small", weight: "bold", className: "garrison-info__count", children: [
3379
- units.length,
3380
- " units"
3381
- ] })
3382
- ] })
3383
- ] });
3356
+ return /* @__PURE__ */ jsxs(
3357
+ VStack,
3358
+ {
3359
+ className: cn("game-canvas-3d-castle-template", className),
3360
+ style: { display: "block", width: "100%", minHeight: "85vh" },
3361
+ children: [
3362
+ showHeader && name && /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "center", className: "castle-template__header", children: [
3363
+ /* @__PURE__ */ jsx(Typography, { variant: "h2", className: "header__name", children: name }),
3364
+ level != null && /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "header__level", children: [
3365
+ "Level ",
3366
+ level
3367
+ ] }),
3368
+ owner && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", className: "header__owner", children: owner })
3369
+ ] }),
3370
+ /* @__PURE__ */ jsx(
3371
+ GameCanvas3D,
3372
+ {
3373
+ tiles,
3374
+ units,
3375
+ features,
3376
+ cameraMode,
3377
+ showGrid,
3378
+ showCoordinates: false,
3379
+ showTileInfo: false,
3380
+ shadows,
3381
+ backgroundColor,
3382
+ featureClickEvent: buildingClickEvent,
3383
+ unitClickEvent,
3384
+ selectedTileIds,
3385
+ validMoves: availableBuildSites,
3386
+ className: "game-canvas-3d-castle-template__canvas"
3387
+ }
3388
+ ),
3389
+ units.length > 0 && /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: "castle-template__garrison-info", children: [
3390
+ /* @__PURE__ */ jsx(Typography, { variant: "small", className: "garrison-info__label", children: "Garrison:" }),
3391
+ /* @__PURE__ */ jsxs(Typography, { variant: "small", weight: "bold", className: "garrison-info__count", children: [
3392
+ units.length,
3393
+ " units"
3394
+ ] })
3395
+ ] })
3396
+ ]
3397
+ }
3398
+ );
3384
3399
  }
3385
3400
  GameCanvas3DCastleTemplate.displayName = "GameCanvas3DCastleTemplate";
3386
3401
  var DEFAULT_3D_WORLDMAP_TILES = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/ui",
3
- "version": "5.46.0",
3
+ "version": "5.47.0",
4
4
  "description": "React UI components, hooks, and providers for Almadar",
5
5
  "type": "module",
6
6
  "sideEffects": [