valtech-components 4.0.378 → 4.0.380

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.
@@ -8,7 +8,7 @@ interface ChessimalsAnimalView {
8
8
  assetSrc: string;
9
9
  tone: number;
10
10
  }
11
- type ChessimalsConfirmAction = 'restart' | 'home' | 'resign';
11
+ type ChessimalsConfirmAction = 'restart' | 'mode' | 'games' | 'resign';
12
12
  type ChessimalsRematchState = 'none' | 'requested' | 'incoming';
13
13
  interface ChessimalsMovingPieceView {
14
14
  color: ChessimalsPlayerColor;
@@ -17,6 +17,12 @@ interface ChessimalsMovingPieceView {
17
17
  toRow: number;
18
18
  toCol: number;
19
19
  }
20
+ interface ChessimalsMoveEffectView {
21
+ animal?: ChessimalsAnimalType;
22
+ from: ChessimalsPosition;
23
+ to: ChessimalsPosition;
24
+ capture: boolean;
25
+ }
20
26
  export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
21
27
  private readonly i18n;
22
28
  private readonly audio;
@@ -33,6 +39,8 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
33
39
  private historySubscription;
34
40
  private historyUid;
35
41
  private historyWatchTimer;
42
+ private moveEffectStartTimer;
43
+ private moveEffectClearTimer;
36
44
  private pendingOnlineGameId;
37
45
  private openingOnlineGameId;
38
46
  private openedOnlineGameId;
@@ -51,6 +59,7 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
51
59
  readonly isRulesModalOpen: import("@angular/core").WritableSignal<boolean>;
52
60
  readonly isBoardOrienting: import("@angular/core").WritableSignal<boolean>;
53
61
  readonly movingPiece: import("@angular/core").WritableSignal<ChessimalsMovingPieceView>;
62
+ readonly moveEffect: import("@angular/core").WritableSignal<ChessimalsMoveEffectView>;
54
63
  readonly botThinking: import("@angular/core").WritableSignal<boolean>;
55
64
  readonly confirmAction: import("@angular/core").WritableSignal<ChessimalsConfirmAction>;
56
65
  readonly onlineJoinCode: import("@angular/core").WritableSignal<string>;
@@ -99,10 +108,12 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
99
108
  joinOnlineGameByCode(): Promise<void>;
100
109
  openOnlineGame(gameId: string): Promise<void>;
101
110
  restartGame(): void;
102
- resetToHome(): void;
111
+ resetToModeSetup(): void;
112
+ resetToGamesMenu(): void;
103
113
  private resetFinishedLocalGameForNextVisit;
104
114
  requestRestartGame(): void;
105
- requestResetToHome(): void;
115
+ requestChangeMode(): void;
116
+ requestChangeGame(): void;
106
117
  requestResign(): void;
107
118
  closeConfirmModal(): void;
108
119
  confirmPendingAction(token?: string): void;
@@ -119,6 +130,7 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
119
130
  private shouldKeepBoardOrientationStatic;
120
131
  private focusBoardSoon;
121
132
  private playMoveSound;
133
+ private queueMoveEffect;
122
134
  toggleAnimal(animal: ChessimalsAnimalView): void;
123
135
  pieceAt(row: number, col: number): ChessimalsPiece | undefined;
124
136
  isDarkCell(row: number, col: number): boolean;
@@ -127,6 +139,9 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
127
139
  isCaptureCell(row: number, col: number): boolean;
128
140
  isLastMoveCell(row: number, col: number): boolean;
129
141
  isMovingSourceCell(row: number, col: number): boolean;
142
+ isMoveEffectCell(row: number, col: number, animal?: ChessimalsAnimalType): boolean;
143
+ isMoveEffectSourceCell(row: number, col: number): boolean;
144
+ isMoveEffectCaptureCell(row: number, col: number): boolean;
130
145
  fileLabel(col: number): string;
131
146
  rankLabel(row: number): string;
132
147
  playerLabel(color: ChessimalsPlayerColor): string;
@@ -35,6 +35,7 @@ export declare class RetroAudioService {
35
35
  private gameMelody;
36
36
  private sequence;
37
37
  private tone;
38
+ private sweep;
38
39
  private readonly handleVisibilityChange;
39
40
  private readonly handlePageHide;
40
41
  private readonly handlePageShow;
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.378";
5
+ export declare const VERSION = "4.0.380";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "4.0.378",
3
+ "version": "4.0.380",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "valtech-firebase-config": "./src/lib/services/firebase/scripts/generate-sw-config.js"