valtech-components 4.0.411 → 4.0.412

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.
@@ -1,4 +1,5 @@
1
- import { ChessimalsAnimalType, ChessimalsBotDifficulty, ChessimalsBoardSize, ChessimalsGameMode, ChessimalsGameState, ChessimalsGameStatus, ChessimalsMove, ChessimalsMoveHistoryEntry, ChessimalsOnlineState, ChessimalsPiece, ChessimalsPlayerColor, ChessimalsPosition } from './types';
1
+ import { ChessimalsAnimalType, ChessimalsBotDifficulty, ChessimalsBotProfile, ChessimalsBotProfileId, ChessimalsBoardSize, ChessimalsGameMode, ChessimalsGameState, ChessimalsGameStatus, ChessimalsMove, ChessimalsMoveHistoryEntry, ChessimalsOnlineState, ChessimalsPiece, ChessimalsPlayerColor, ChessimalsPosition } from './types';
2
+ export declare const CHESSIMALS_BOT_PROFILES: ChessimalsBotProfile[];
2
3
  export interface CreateChessimalsGameOptions {
3
4
  id?: string;
4
5
  mode?: ChessimalsGameMode;
@@ -9,7 +10,7 @@ export declare function createChessimalsGame(boardSize?: ChessimalsBoardSize, op
9
10
  export declare function getChessimalsPieceAt(state: ChessimalsGameState, position: ChessimalsPosition): ChessimalsPiece | undefined;
10
11
  export declare function getChessimalsLegalMoves(state: ChessimalsGameState, pieceId: string, animal?: ChessimalsAnimalType): ChessimalsMove[];
11
12
  export declare function getChessimalsAllLegalMoves(state: ChessimalsGameState, color?: ChessimalsPlayerColor): ChessimalsMove[];
12
- export declare function chooseChessimalsBotMove(state: ChessimalsGameState, difficulty?: ChessimalsBotDifficulty): ChessimalsMove | undefined;
13
+ export declare function chooseChessimalsBotMove(state: ChessimalsGameState, difficulty?: ChessimalsBotDifficulty, profileId?: ChessimalsBotProfileId): ChessimalsMove | undefined;
13
14
  export declare function applyChessimalsMove(state: ChessimalsGameState, candidate: ChessimalsMove): ChessimalsGameState;
14
15
  export declare function createChessimalsReviewState(state: ChessimalsGameState, entry: ChessimalsMoveHistoryEntry): ChessimalsGameState;
15
16
  export declare function resignChessimalsGame(state: ChessimalsGameState, color: ChessimalsPlayerColor): ChessimalsGameState;
@@ -1,6 +1,6 @@
1
1
  import { OnDestroy, OnInit } from '@angular/core';
2
2
  import { FormControl } from '@angular/forms';
3
- import { ChessimalsAnimalType, ChessimalsBotDifficulty, ChessimalsBoardSize, ChessimalsGameState, ChessimalsHistoryEntry, ChessimalsLocalMode, ChessimalsMove, ChessimalsPiece, ChessimalsPlayerColor, ChessimalsPosition } from './types';
3
+ import { ChessimalsAnimalType, ChessimalsBotDifficulty, ChessimalsBotProfile, ChessimalsBotProfileId, ChessimalsBoardSize, ChessimalsGameState, ChessimalsHistoryEntry, ChessimalsLocalMode, ChessimalsMove, ChessimalsPiece, ChessimalsPlayerColor, ChessimalsPosition } from './types';
4
4
  import { RangeInputMetadata } from '../../molecules/range-input/types';
5
5
  import { ToggleInputMetadata } from '../../molecules/toggle-input/types';
6
6
  import { UserAvatarMetadata } from '../../atoms/user-avatar/types';
@@ -43,6 +43,7 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
43
43
  private readonly auth;
44
44
  private readonly haptics;
45
45
  private readonly playerProfiles;
46
+ private readonly ngZone;
46
47
  private boardOrientationTimer;
47
48
  private moveAnimationTimer;
48
49
  private botTurnTimer;
@@ -61,11 +62,13 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
61
62
  readonly boardSizes: ChessimalsBoardSize[];
62
63
  readonly localModes: ChessimalsLocalMode[];
63
64
  readonly botDifficulties: ChessimalsBotDifficulty[];
65
+ readonly botProfiles: ChessimalsBotProfile[];
64
66
  readonly animals: ChessimalsAnimalView[];
65
67
  readonly screen: import("@angular/core").WritableSignal<"home" | "game">;
66
68
  readonly selectedBoardSize: import("@angular/core").WritableSignal<ChessimalsBoardSize>;
67
69
  readonly selectedLocalMode: import("@angular/core").WritableSignal<ChessimalsLocalMode>;
68
70
  readonly selectedBotDifficulty: import("@angular/core").WritableSignal<ChessimalsBotDifficulty>;
71
+ readonly selectedBotProfileId: import("@angular/core").WritableSignal<ChessimalsBotProfileId>;
69
72
  readonly game: import("@angular/core").WritableSignal<ChessimalsGameState>;
70
73
  readonly selectedPieceId: import("@angular/core").WritableSignal<string>;
71
74
  readonly selectedAnimal: import("@angular/core").WritableSignal<ChessimalsAnimalType>;
@@ -102,6 +105,7 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
102
105
  readonly sfxToggleProps: import("@angular/core").Signal<ToggleInputMetadata>;
103
106
  readonly musicVolumeProps: import("@angular/core").Signal<RangeInputMetadata>;
104
107
  readonly sfxVolumeProps: import("@angular/core").Signal<RangeInputMetadata>;
108
+ readonly availableBotProfiles: import("@angular/core").Signal<ChessimalsBotProfile[]>;
105
109
  set onlineGameId(value: string | null | undefined);
106
110
  miniGamesRoute: string;
107
111
  projectionMode: boolean;
@@ -197,6 +201,12 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
197
201
  showRankLabel(col: number): boolean;
198
202
  showFileLabel(row: number): boolean;
199
203
  playerLabel(color: ChessimalsPlayerColor): string;
204
+ winnerDisplayName(): string;
205
+ winnerSideLabel(): string;
206
+ winnerInitials(): string;
207
+ isCurrentPlayerVictory(): boolean;
208
+ isCurrentPlayerDefeat(): boolean;
209
+ private playerDisplayName;
200
210
  modeChipLabel(): string;
201
211
  turnTitle(): string;
202
212
  normalizeGameId(value: string): string;
@@ -221,7 +231,10 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
221
231
  unlockedLabel(color: ChessimalsPlayerColor): string;
222
232
  localModeLabel(mode: ChessimalsLocalMode): string;
223
233
  localModeDescription(mode: ChessimalsLocalMode): string;
234
+ selectBotDifficulty(difficulty: ChessimalsBotDifficulty): void;
224
235
  botDifficultyLabel(difficulty: ChessimalsBotDifficulty): string;
236
+ botProfileLabel(profile: ChessimalsBotProfile): string;
237
+ botProfileDescription(profile: ChessimalsBotProfile): string;
225
238
  animalLabel(type: ChessimalsAnimalType): string;
226
239
  canReviewPrevious(): boolean;
227
240
  canReviewNext(): boolean;
@@ -41,7 +41,15 @@ export type ChessimalsWinReason = 'promotion' | 'elimination' | 'resignation';
41
41
  export type ChessimalsGameMode = 'local' | 'online';
42
42
  export type ChessimalsLocalMode = 'one-device' | 'bot';
43
43
  export type ChessimalsBotDifficulty = 'easy' | 'normal' | 'hard';
44
+ export type ChessimalsBotProfileId = 'explorer' | 'impulsive' | 'runner' | 'hunter' | 'guardian' | 'jumper' | 'strategist' | 'predator' | 'sprinter' | 'sentinel';
44
45
  export type ChessimalsGameStatus = 'waiting' | 'in_progress' | 'finished' | 'expired';
46
+ export interface ChessimalsBotProfile {
47
+ id: ChessimalsBotProfileId;
48
+ difficulty: ChessimalsBotDifficulty;
49
+ avatar: string;
50
+ labelKey: string;
51
+ descriptionKey: string;
52
+ }
45
53
  export interface ChessimalsPosition {
46
54
  row: number;
47
55
  col: number;
package/lib/version.d.ts CHANGED
@@ -2,4 +2,4 @@
2
2
  * Current version of valtech-components.
3
3
  * This is automatically updated during the publish process.
4
4
  */
5
- export declare const VERSION = "4.0.411";
5
+ export declare const VERSION = "4.0.412";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "4.0.411",
3
+ "version": "4.0.412",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "valtech-firebase-config": "./src/lib/services/firebase/scripts/generate-sw-config.js"