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.
- package/esm2022/lib/components/organisms/mini-games/chessimals-game.component.mjs +93 -13
- package/esm2022/lib/components/organisms/mini-games/mini-games.i18n.mjs +11 -5
- package/esm2022/lib/components/organisms/mini-games/retro-audio.service.mjs +34 -1
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +136 -17
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/organisms/mini-games/chessimals-game.component.d.ts +18 -3
- package/lib/components/organisms/mini-games/retro-audio.service.d.ts +1 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ interface ChessimalsAnimalView {
|
|
|
8
8
|
assetSrc: string;
|
|
9
9
|
tone: number;
|
|
10
10
|
}
|
|
11
|
-
type ChessimalsConfirmAction = 'restart' | '
|
|
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
|
-
|
|
111
|
+
resetToModeSetup(): void;
|
|
112
|
+
resetToGamesMenu(): void;
|
|
103
113
|
private resetFinishedLocalGameForNextVisit;
|
|
104
114
|
requestRestartGame(): void;
|
|
105
|
-
|
|
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;
|
package/lib/version.d.ts
CHANGED