valtech-components 4.0.411 → 4.0.413

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,7 +1,7 @@
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';
4
- import { RangeInputMetadata } from '../../molecules/range-input/types';
3
+ import { ChessimalsAnimalType, ChessimalsBotDifficulty, ChessimalsBotProfile, ChessimalsBotProfileId, ChessimalsBoardSize, ChessimalsGameState, ChessimalsHistoryEntry, ChessimalsLocalMode, ChessimalsMove, ChessimalsPiece, ChessimalsPlayerColor, ChessimalsPosition } from './types';
4
+ import { RangeInputMetadata, RangeValue } from '../../molecules/range-input/types';
5
5
  import { ToggleInputMetadata } from '../../molecules/toggle-input/types';
6
6
  import { UserAvatarMetadata } from '../../atoms/user-avatar/types';
7
7
  import { ButtonMetadata } from '../../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;
@@ -141,6 +145,7 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
141
145
  ngOnInit(): void;
142
146
  protected t(key: string): string;
143
147
  private shortUserId;
148
+ private rangeValueToNumber;
144
149
  startGame(): void;
145
150
  createOnlineGame(): Promise<void>;
146
151
  joinOnlineGameByCode(): Promise<void>;
@@ -160,6 +165,8 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
160
165
  closeRulesModal(): void;
161
166
  openSettingsModal(): void;
162
167
  closeSettingsModal(): void;
168
+ setMusicVolume(value: number | RangeValue): void;
169
+ setSfxVolume(value: number | RangeValue): void;
163
170
  selectCell(position: ChessimalsPosition): void;
164
171
  private animateMove;
165
172
  private applyAnimatedMove;
@@ -197,6 +204,12 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
197
204
  showRankLabel(col: number): boolean;
198
205
  showFileLabel(row: number): boolean;
199
206
  playerLabel(color: ChessimalsPlayerColor): string;
207
+ winnerDisplayName(): string;
208
+ winnerSideLabel(): string;
209
+ winnerInitials(): string;
210
+ isCurrentPlayerVictory(): boolean;
211
+ isCurrentPlayerDefeat(): boolean;
212
+ private playerDisplayName;
200
213
  modeChipLabel(): string;
201
214
  turnTitle(): string;
202
215
  normalizeGameId(value: string): string;
@@ -221,7 +234,10 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
221
234
  unlockedLabel(color: ChessimalsPlayerColor): string;
222
235
  localModeLabel(mode: ChessimalsLocalMode): string;
223
236
  localModeDescription(mode: ChessimalsLocalMode): string;
237
+ selectBotDifficulty(difficulty: ChessimalsBotDifficulty): void;
224
238
  botDifficultyLabel(difficulty: ChessimalsBotDifficulty): string;
239
+ botProfileLabel(profile: ChessimalsBotProfile): string;
240
+ botProfileDescription(profile: ChessimalsBotProfile): string;
225
241
  animalLabel(type: ChessimalsAnimalType): string;
226
242
  canReviewPrevious(): boolean;
227
243
  canReviewNext(): boolean;
@@ -75,6 +75,8 @@ export declare class RetroAudioService {
75
75
  private sequence;
76
76
  private startSampleMusic;
77
77
  private stopSampleMusic;
78
+ private applySampleMusicVolume;
79
+ private sampleMusicVolume;
78
80
  private tone;
79
81
  private sweep;
80
82
  private filteredNoise;
@@ -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.413";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "4.0.411",
3
+ "version": "4.0.413",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "valtech-firebase-config": "./src/lib/services/firebase/scripts/generate-sw-config.js"