valtech-components 4.0.396 → 4.0.398
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 +28 -17
- package/esm2022/lib/components/organisms/mini-games/chessimals-online.service.mjs +125 -20
- package/esm2022/lib/components/organisms/mini-games/types.mjs +1 -1
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +152 -36
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/organisms/mini-games/chessimals-game.component.d.ts +1 -0
- package/lib/components/organisms/mini-games/chessimals-online.service.d.ts +12 -1
- package/lib/components/organisms/mini-games/types.d.ts +5 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -103,6 +103,7 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
|
|
|
103
103
|
readonly boardOrientationColor: import("@angular/core").Signal<ChessimalsPlayerColor>;
|
|
104
104
|
readonly onlineRole: import("@angular/core").Signal<"waiting" | "pending" | ChessimalsPlayerColor | "spectator">;
|
|
105
105
|
readonly canPlayCurrentTurn: import("@angular/core").Signal<boolean>;
|
|
106
|
+
readonly canControlCurrentGame: import("@angular/core").Signal<boolean>;
|
|
106
107
|
readonly rematchState: import("@angular/core").Signal<ChessimalsRematchState>;
|
|
107
108
|
readonly currentTurnTitle: import("@angular/core").Signal<string>;
|
|
108
109
|
readonly winTitle: import("@angular/core").Signal<string>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import { ChessimalsBoardSize, ChessimalsGameState, ChessimalsHistoryEntry, ChessimalsMove, ChessimalsPlayerColor } from './types';
|
|
2
|
+
import { ChessimalsBoardSize, ChessimalsGameState, ChessimalsHistoryEntry, ChessimalsMove, ChessimalsOnlineParticipant, ChessimalsPlayerColor } from './types';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class ChessimalsOnlineService {
|
|
5
5
|
private readonly firebaseAuth;
|
|
@@ -22,6 +22,10 @@ export declare class ChessimalsOnlineService {
|
|
|
22
22
|
participantSide(state: ChessimalsGameState, uid?: string): ChessimalsPlayerColor | undefined;
|
|
23
23
|
isParticipant(state: ChessimalsGameState, uid?: string): boolean;
|
|
24
24
|
isHostWaiting(state: ChessimalsGameState, uid?: string): boolean;
|
|
25
|
+
isPendingGuest(state: ChessimalsGameState, uid?: string): boolean;
|
|
26
|
+
hasCurrentRematchRequest(state: ChessimalsGameState, uid?: string): boolean;
|
|
27
|
+
hasOpponentRematchRequest(state: ChessimalsGameState, uid?: string): boolean;
|
|
28
|
+
participantKey(participant?: ChessimalsOnlineParticipant): string;
|
|
25
29
|
shareUrl(gameId: string, baseRoute?: string): string;
|
|
26
30
|
projectionShareUrl(gameId: string, baseRoute?: string): string;
|
|
27
31
|
saveCurrentUserHistory(state: ChessimalsGameState): Promise<void>;
|
|
@@ -32,6 +36,13 @@ export declare class ChessimalsOnlineService {
|
|
|
32
36
|
private decodeInput;
|
|
33
37
|
private createParticipant;
|
|
34
38
|
private normalizeHandle;
|
|
39
|
+
private buildSeatKey;
|
|
40
|
+
private currentSeatKey;
|
|
41
|
+
private participantForSide;
|
|
42
|
+
private participantEntries;
|
|
43
|
+
private participantRequestKeys;
|
|
44
|
+
private matchesCurrentParticipant;
|
|
45
|
+
private normalizeColor;
|
|
35
46
|
private withUpdatedAt;
|
|
36
47
|
private withMoveLog;
|
|
37
48
|
private createMoveLogEntry;
|
|
@@ -73,6 +73,8 @@ export interface ChessimalsMoveLogEntry {
|
|
|
73
73
|
id: string;
|
|
74
74
|
at: string;
|
|
75
75
|
uid: string;
|
|
76
|
+
profileId?: string;
|
|
77
|
+
seatKey?: string;
|
|
76
78
|
side?: ChessimalsPlayerColor;
|
|
77
79
|
status: ChessimalsMoveLogStatus;
|
|
78
80
|
code?: string;
|
|
@@ -84,9 +86,12 @@ export interface ChessimalsMoveLogEntry {
|
|
|
84
86
|
}
|
|
85
87
|
export interface ChessimalsOnlineParticipant {
|
|
86
88
|
uid: string;
|
|
89
|
+
accountUserId?: string;
|
|
87
90
|
profileId: string;
|
|
91
|
+
seatKey?: string;
|
|
88
92
|
name: string;
|
|
89
93
|
handle?: string;
|
|
94
|
+
email?: string;
|
|
90
95
|
avatar: string;
|
|
91
96
|
avatarUrl?: string;
|
|
92
97
|
color: string;
|
package/lib/version.d.ts
CHANGED