valtech-components 4.0.375 → 4.0.377

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.
@@ -43,7 +43,7 @@ export declare class RightsFooterComponent {
43
43
  /**
44
44
  * Computed helper for color prop in template.
45
45
  */
46
- propsColor: import("@angular/core").Signal<"medium" | "success" | "primary" | "secondary" | "tertiary" | "warning" | "danger" | "light" | "dark">;
46
+ propsColor: import("@angular/core").Signal<"success" | "medium" | "primary" | "secondary" | "tertiary" | "warning" | "danger" | "light" | "dark">;
47
47
  /**
48
48
  * Computed helper for withMargin prop in template.
49
49
  */
@@ -11,7 +11,7 @@ export declare class TextComponent {
11
11
  */
12
12
  displayContent: import("@angular/core").Signal<string>;
13
13
  propsColor: import("@angular/core").Signal<import("@ionic/core").Color>;
14
- propsSize: import("@angular/core").Signal<"medium" | "small" | "large" | "xlarge">;
14
+ propsSize: import("@angular/core").Signal<"small" | "medium" | "large" | "xlarge">;
15
15
  propsBold: import("@angular/core").Signal<boolean>;
16
16
  propsProcessLinks: import("@angular/core").Signal<boolean>;
17
17
  propsAllowPartialBold: import("@angular/core").Signal<boolean>;
@@ -38,7 +38,7 @@ export declare class UserAvatarComponent {
38
38
  readonly imageUrl: import("@angular/core").Signal<string>;
39
39
  /** Iniciales — 1-2 chars derivados de name (preferred) o email prefix. */
40
40
  readonly initials: import("@angular/core").Signal<string>;
41
- readonly sizeClass: import("@angular/core").Signal<"medium" | "small" | "large" | "xlarge" | "xsmall">;
41
+ readonly sizeClass: import("@angular/core").Signal<"small" | "medium" | "large" | "xlarge" | "xsmall">;
42
42
  readonly shapeClass: import("@angular/core").Signal<"circle" | "square">;
43
43
  /** Background — explicito o derivado deterministicamente del user. */
44
44
  readonly bgColor: import("@angular/core").Signal<string>;
@@ -41,8 +41,8 @@ export declare class FeaturesListComponent {
41
41
  iconColor: string;
42
42
  iconSize: number;
43
43
  mode: "horizontal" | "vertical";
44
- gap: "medium" | "small" | "large";
45
- alignment: "start" | "center";
44
+ gap: "small" | "medium" | "large";
45
+ alignment: "center" | "start";
46
46
  imageShape: "circle" | "square";
47
47
  maxVisible: number;
48
48
  showMoreLabel?: string;
@@ -6,7 +6,7 @@ export declare class OperationReferenceComponent {
6
6
  protected label: import("@angular/core").Signal<string>;
7
7
  protected copiedLabel: import("@angular/core").Signal<string>;
8
8
  protected copyAriaLabel: import("@angular/core").Signal<string>;
9
- protected align: import("@angular/core").Signal<"start" | "center" | "end">;
9
+ protected align: import("@angular/core").Signal<"center" | "start" | "end">;
10
10
  protected copyValue(): void;
11
11
  static ɵfac: i0.ɵɵFactoryDeclaration<OperationReferenceComponent, never>;
12
12
  static ɵcmp: i0.ɵɵComponentDeclaration<OperationReferenceComponent, "val-operation-reference", never, { "props": { "alias": "props"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
@@ -45,7 +45,7 @@ export declare class ArticleComponent implements OnInit {
45
45
  getVideoElement(element: ArticleElement): ArticleVideoElement;
46
46
  getCustomElement(element: ArticleElement): ArticleCustomElement;
47
47
  getQuoteTextProps(element: ArticleElement): {
48
- size: "medium" | "small" | "large" | "xlarge";
48
+ size: "small" | "medium" | "large" | "xlarge";
49
49
  color: import("@ionic/core").Color;
50
50
  content?: string;
51
51
  bold: boolean;
@@ -61,7 +61,7 @@ export declare class ArticleComponent implements OnInit {
61
61
  showQuoteMark?: boolean;
62
62
  };
63
63
  getHighlightTextProps(element: ArticleElement): {
64
- size: "medium" | "small" | "large" | "xlarge";
64
+ size: "small" | "medium" | "large" | "xlarge";
65
65
  color: import("@ionic/core").Color;
66
66
  content?: string;
67
67
  bold: boolean;
@@ -1,5 +1,5 @@
1
1
  import { OnDestroy, OnInit } from '@angular/core';
2
- import { ChessimalsAnimalType, ChessimalsBotDifficulty, ChessimalsBoardSize, ChessimalsGameState, ChessimalsLocalMode, ChessimalsMove, ChessimalsPiece, ChessimalsPlayerColor, ChessimalsPosition } from './types';
2
+ import { ChessimalsAnimalType, ChessimalsBotDifficulty, ChessimalsBoardSize, ChessimalsGameState, ChessimalsHistoryEntry, ChessimalsLocalMode, ChessimalsMove, ChessimalsPiece, ChessimalsPlayerColor, ChessimalsPosition } from './types';
3
3
  import { UserAvatarMetadata } from '../../atoms/user-avatar/types';
4
4
  import { ButtonMetadata } from '../../types';
5
5
  import * as i0 from "@angular/core";
@@ -29,6 +29,9 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
29
29
  private botTurnTimer;
30
30
  private readonly routeSubscription;
31
31
  private onlineSubscription;
32
+ private historySubscription;
33
+ private historyUid;
34
+ private historyWatchTimer;
32
35
  private pendingOnlineGameId;
33
36
  private openingOnlineGameId;
34
37
  private openedOnlineGameId;
@@ -53,6 +56,7 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
53
56
  readonly onlineLoading: import("@angular/core").WritableSignal<boolean>;
54
57
  readonly onlineError: import("@angular/core").WritableSignal<string>;
55
58
  readonly onlineUid: import("@angular/core").WritableSignal<string>;
59
+ readonly onlineHistory: import("@angular/core").WritableSignal<ChessimalsHistoryEntry[]>;
56
60
  readonly resumeSplashVisible: import("@angular/core").WritableSignal<boolean>;
57
61
  readonly loggedInUser: import("@angular/core").Signal<import("valtech-components").AuthUser>;
58
62
  readonly localPlayerProfile: import("@angular/core").Signal<import("./types").MiniGamePlayerProfile>;
@@ -61,6 +65,7 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
61
65
  readonly loggedPlayerHandle: import("@angular/core").Signal<string>;
62
66
  readonly loggedPlayerAvatarProps: import("@angular/core").Signal<UserAvatarMetadata>;
63
67
  set onlineGameId(value: string | null | undefined);
68
+ miniGamesRoute: string;
64
69
  readonly currentPlayer: import("@angular/core").Signal<import("./types").ChessimalsPlayerState>;
65
70
  readonly legalMoves: import("@angular/core").Signal<ChessimalsMove[]>;
66
71
  readonly legalMoveKeys: import("@angular/core").Signal<Set<string>>;
@@ -70,7 +75,7 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
70
75
  readonly displayRows: import("@angular/core").Signal<number[]>;
71
76
  readonly displayCols: import("@angular/core").Signal<number[]>;
72
77
  readonly boardOrientationColor: import("@angular/core").Signal<ChessimalsPlayerColor>;
73
- readonly onlineRole: import("@angular/core").Signal<"waiting" | ChessimalsPlayerColor | "spectator">;
78
+ readonly onlineRole: import("@angular/core").Signal<"waiting" | "pending" | ChessimalsPlayerColor | "spectator">;
74
79
  readonly canPlayCurrentTurn: import("@angular/core").Signal<boolean>;
75
80
  readonly currentTurnTitle: import("@angular/core").Signal<string>;
76
81
  readonly winTitle: import("@angular/core").Signal<string>;
@@ -124,11 +129,20 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
124
129
  playerLabel(color: ChessimalsPlayerColor): string;
125
130
  modeChipLabel(): string;
126
131
  turnTitle(): string;
127
- turnBody(): string;
128
132
  normalizeGameId(value: string): string;
129
133
  copyOnlineLink(): Promise<void>;
130
134
  shareOnlineLink(): Promise<void>;
135
+ canReviewPendingGuest(): boolean;
136
+ pendingGuestName(): string;
137
+ waitingTitle(): string;
138
+ waitingBody(): string;
139
+ acceptOnlineGuest(): Promise<void>;
140
+ rejectOnlineGuest(): Promise<void>;
141
+ openHistoryGame(entry: ChessimalsHistoryEntry): void;
142
+ historyOutcomeLabel(entry: ChessimalsHistoryEntry): string;
131
143
  requestOnlineRematch(): Promise<void>;
144
+ private queueHistoryWatch;
145
+ private watchOnlineHistory;
132
146
  unlockedLabel(color: ChessimalsPlayerColor): string;
133
147
  localModeLabel(mode: ChessimalsLocalMode): string;
134
148
  localModeDescription(mode: ChessimalsLocalMode): string;
@@ -137,8 +151,10 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
137
151
  private displayRowIndex;
138
152
  private displayColIndex;
139
153
  private watchOnlineGame;
154
+ private miniGamesBaseRoute;
155
+ private chessimalsGameRoute;
140
156
  private capitalize;
141
157
  static ɵfac: i0.ɵɵFactoryDeclaration<ChessimalsGameComponent, never>;
142
- static ɵcmp: i0.ɵɵComponentDeclaration<ChessimalsGameComponent, "val-chessimals-game", never, { "onlineGameId": { "alias": "onlineGameId"; "required": false; }; }, {}, never, never, true, never>;
158
+ static ɵcmp: i0.ɵɵComponentDeclaration<ChessimalsGameComponent, "val-chessimals-game", never, { "onlineGameId": { "alias": "onlineGameId"; "required": false; }; "miniGamesRoute": { "alias": "miniGamesRoute"; "required": false; }; }, {}, never, never, true, never>;
143
159
  }
144
160
  export {};
@@ -1,5 +1,5 @@
1
1
  import { Observable } from 'rxjs';
2
- import { ChessimalsBoardSize, ChessimalsGameState, ChessimalsMove, ChessimalsPlayerColor } from './types';
2
+ import { ChessimalsBoardSize, ChessimalsGameState, ChessimalsHistoryEntry, ChessimalsMove, ChessimalsPlayerColor } from './types';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class ChessimalsOnlineService {
5
5
  private readonly auth;
@@ -11,19 +11,28 @@ export declare class ChessimalsOnlineService {
11
11
  isValidGameId(value: string): boolean;
12
12
  createGame(boardSize: ChessimalsBoardSize): Promise<ChessimalsGameState>;
13
13
  watchGame(gameId: string): Observable<ChessimalsGameState | null>;
14
+ watchHistory(limitCount?: number): Observable<ChessimalsHistoryEntry[]>;
14
15
  joinGame(gameId: string): Promise<void>;
16
+ acceptGuest(gameId: string): Promise<void>;
17
+ rejectGuest(gameId: string): Promise<void>;
15
18
  move(gameId: string, move: ChessimalsMove): Promise<void>;
16
19
  resign(gameId: string): Promise<void>;
17
20
  requestRematch(gameId: string): Promise<void>;
18
21
  participantSide(state: ChessimalsGameState, uid?: string): ChessimalsPlayerColor | undefined;
19
22
  isParticipant(state: ChessimalsGameState, uid?: string): boolean;
20
23
  isHostWaiting(state: ChessimalsGameState, uid?: string): boolean;
21
- shareUrl(gameId: string): string;
24
+ shareUrl(gameId: string, baseRoute?: string): string;
25
+ saveCurrentUserHistory(state: ChessimalsGameState): Promise<void>;
22
26
  private gameRef;
27
+ private historyPath;
28
+ private historyRef;
23
29
  private ensureUser;
24
30
  private decodeInput;
25
31
  private createParticipant;
26
32
  private withUpdatedAt;
33
+ private createHistoryEntry;
34
+ private withoutUndefined;
35
+ private historyOutcome;
27
36
  private assertNotExpired;
28
37
  private createGameId;
29
38
  private randomIndex;
@@ -85,10 +85,32 @@ export interface ChessimalsOnlineState {
85
85
  expiresAt: string;
86
86
  expiresAtMs: number;
87
87
  round: number;
88
+ rematchOf?: string;
88
89
  lobby?: ChessimalsOnlineParticipant;
90
+ pendingGuest?: ChessimalsOnlineParticipant;
89
91
  participants?: Partial<Record<ChessimalsPlayerColor, ChessimalsOnlineParticipant>>;
90
92
  rematchRequests?: string[];
91
93
  }
94
+ export type ChessimalsHistoryOutcome = 'waiting' | 'pending' | 'in_progress' | 'won' | 'lost' | 'declined';
95
+ export interface ChessimalsHistoryEntry {
96
+ gameId: string;
97
+ mode: 'online';
98
+ boardSize: ChessimalsBoardSize;
99
+ status: ChessimalsGameStatus;
100
+ outcome: ChessimalsHistoryOutcome;
101
+ side?: ChessimalsPlayerColor;
102
+ opponentUid?: string;
103
+ opponentName?: string;
104
+ winner?: ChessimalsPlayerColor;
105
+ winnerReason?: ChessimalsWinReason;
106
+ moveCount: number;
107
+ round: number;
108
+ createdAt: string;
109
+ updatedAt: string;
110
+ finishedAt?: string;
111
+ expiresAt?: string;
112
+ rematchOf?: string;
113
+ }
92
114
  export interface ChessimalsGameState {
93
115
  id: string;
94
116
  mode: ChessimalsGameMode;
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.375";
5
+ export declare const VERSION = "4.0.377";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "4.0.375",
3
+ "version": "4.0.377",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "valtech-firebase-config": "./src/lib/services/firebase/scripts/generate-sw-config.js"