valtech-components 4.0.569 → 4.0.571

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.
Files changed (22) hide show
  1. package/esm2022/lib/components/atoms/qr-code/qr-code.component.mjs +26 -3
  2. package/esm2022/lib/components/atoms/qr-code/types.mjs +1 -1
  3. package/esm2022/lib/components/molecules/ticket-card/ticket-card.component.mjs +6 -12
  4. package/esm2022/lib/components/organisms/mini-games/chessimals-challenge-progress.service.mjs +28 -27
  5. package/esm2022/lib/components/organisms/mini-games/chessimals-engine.mjs +32 -13
  6. package/esm2022/lib/components/organisms/mini-games/chessimals-game.component.mjs +135 -32
  7. package/esm2022/lib/components/organisms/mini-games/mini-games.i18n.mjs +19 -19
  8. package/esm2022/lib/services/errors/valtech-error.service.mjs +3 -3
  9. package/esm2022/lib/services/ticket-card-image/ticket-card-image.service.mjs +32 -1
  10. package/esm2022/lib/services/ticket-card-image/types.mjs +1 -1
  11. package/esm2022/lib/version.mjs +2 -2
  12. package/fesm2022/valtech-components.mjs +273 -102
  13. package/fesm2022/valtech-components.mjs.map +1 -1
  14. package/lib/components/atoms/qr-code/qr-code.component.d.ts +1 -0
  15. package/lib/components/atoms/qr-code/types.d.ts +4 -0
  16. package/lib/components/organisms/mini-games/chessimals-challenge-progress.service.d.ts +1 -0
  17. package/lib/components/organisms/mini-games/chessimals-game.component.d.ts +13 -1
  18. package/lib/services/errors/valtech-error.service.d.ts +3 -3
  19. package/lib/services/ticket-card-image/ticket-card-image.service.d.ts +2 -0
  20. package/lib/services/ticket-card-image/types.d.ts +2 -0
  21. package/lib/version.d.ts +1 -1
  22. package/package.json +1 -1
@@ -15,6 +15,7 @@ export declare class QrCodeComponent implements OnInit {
15
15
  getBorderRadius(): string;
16
16
  getPadding(): string;
17
17
  getQrBorderRadius(): string;
18
+ getLogoSize(): string;
18
19
  getContainerClasses(): string;
19
20
  getContainerBackground(): string;
20
21
  getShadow(): string;
@@ -67,6 +67,10 @@ export interface QrCodeMetadata {
67
67
  cssClass?: string;
68
68
  /** Size override (will scale the image) */
69
69
  displaySize?: number;
70
+ /** Logo rendered over the QR when the generated bitmap cannot embed it reliably */
71
+ logoUrl?: string;
72
+ /** Logo size as a fraction of the displayed QR size. Default: 0.2 */
73
+ logoSizeRatio?: number;
70
74
  /** Border radius for the container */
71
75
  borderRadius?: number;
72
76
  /** Show border around QR */
@@ -9,6 +9,7 @@ export declare class ChessimalsChallengeProgressService {
9
9
  watchStats(): Observable<ChessimalsChallengeStats | undefined>;
10
10
  watchRecentRuns(limitCount?: number): Observable<ChessimalsChallengeRun[]>;
11
11
  watchActiveRun(): Observable<ChessimalsChallengeRun | undefined>;
12
+ private watchWhenFirebaseAuthReady;
12
13
  saveRun(run: ChessimalsChallengeRun): Promise<void>;
13
14
  recordChallengeStarted(run: ChessimalsChallengeRun): Promise<void>;
14
15
  applyRoundResult(args: {
@@ -76,6 +76,13 @@ interface ChessimalsGameScoreView {
76
76
  bestMove?: ChessimalsMoveScoreView;
77
77
  score: number;
78
78
  }
79
+ interface ChessimalsBotOpponentView {
80
+ avatar: string;
81
+ avatarSrc: string;
82
+ eyebrow: string;
83
+ title: string;
84
+ description: string;
85
+ }
79
86
  export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
80
87
  private readonly i18n;
81
88
  private readonly audio;
@@ -122,7 +129,7 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
122
129
  readonly botProfiles: ChessimalsBotProfile[];
123
130
  readonly challengeLadder: ChessimalsChallengeBot[];
124
131
  readonly animals: ChessimalsAnimalView[];
125
- readonly valtechComponentsVersion = "4.0.569";
132
+ readonly valtechComponentsVersion = "4.0.571";
126
133
  readonly screen: import("@angular/core").WritableSignal<"home" | "challenge" | "path" | "game">;
127
134
  readonly selectedBoardSize: import("@angular/core").WritableSignal<ChessimalsBoardSize>;
128
135
  readonly selectedLocalMode: import("@angular/core").WritableSignal<ChessimalsLocalMode>;
@@ -196,6 +203,11 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
196
203
  readonly availableBotProfiles: import("@angular/core").Signal<ChessimalsBotProfile[]>;
197
204
  readonly selectedBotProfile: import("@angular/core").Signal<ChessimalsBotProfile>;
198
205
  readonly gameBotProfile: import("@angular/core").Signal<ChessimalsBotProfile>;
206
+ readonly botOpponentProfile: import("@angular/core").Signal<ChessimalsBotProfile>;
207
+ readonly botOpponentEyebrow: import("@angular/core").Signal<string>;
208
+ readonly botOpponentTitle: import("@angular/core").Signal<string>;
209
+ readonly botOpponentDescription: import("@angular/core").Signal<string>;
210
+ readonly botOpponentCard: import("@angular/core").Signal<ChessimalsBotOpponentView>;
199
211
  readonly activeChallengeBot: import("@angular/core").Signal<ChessimalsChallengeBot>;
200
212
  readonly resumableChallengeRun: import("@angular/core").Signal<ChessimalsChallengeRun>;
201
213
  set onlineGameId(value: string | null | undefined);
@@ -33,9 +33,9 @@ export interface ValtechErrorHandleOptions {
33
33
  /** Si mostrar un toast con el mensaje resuelto. Default: `true`. */
34
34
  toast?: boolean;
35
35
  /**
36
- * Si incluir un botón "Copiar ID" en el toast cuando el backend devuelve un
37
- * `operationId`. Útil para soporte: el usuario copia el ID y lo entrega al
38
- * equipo para buscar en CloudWatch. Default: `false`.
36
+ * Si incluir un botón "Copiar código de error" en el toast cuando el backend
37
+ * devuelve un `operationId`. Útil para soporte: el usuario copia el ID y lo
38
+ * entrega al equipo para buscar en CloudWatch. Default: `false`.
39
39
  */
40
40
  showOperationId?: boolean;
41
41
  }
@@ -9,6 +9,8 @@ export declare class TicketCardImageService {
9
9
  private drawFooter;
10
10
  private fillWrappedText;
11
11
  private drawDetail;
12
+ private drawQrLogo;
13
+ private drawBingoFallbackMark;
12
14
  private roundRect;
13
15
  private loadImage;
14
16
  static ɵfac: i0.ɵɵFactoryDeclaration<TicketCardImageService, never>;
@@ -1,6 +1,8 @@
1
1
  export interface TicketCardImageConfig {
2
2
  /** QR code as dataUrl (PNG/base64) */
3
3
  qrDataUrl: string;
4
+ /** Logo rendered in the center of the QR. URL or dataUrl. Optional. */
5
+ qrLogoUrl?: string;
4
6
  /** Logo to show in the header. URL or dataUrl. Optional. */
5
7
  logoUrl?: string;
6
8
  /** Header background color (CSS color). Default: bingo gradient '#9b1fde' -> '#c93075'. */
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.569";
5
+ export declare const VERSION = "4.0.571";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "4.0.569",
3
+ "version": "4.0.571",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "valtech-firebase-config": "./src/lib/services/firebase/scripts/generate-sw-config.js"