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