valtech-components 4.0.629 → 4.0.632

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.
@@ -24,8 +24,11 @@ export declare class ChessimalsAdventureComponent {
24
24
  readonly actViews: import("@angular/core").Signal<AdventureActView[]>;
25
25
  constructor();
26
26
  t(key: string): string;
27
+ private readonly ADV_ACT_THEMES;
27
28
  avatarSrc(profileId: string): string;
28
- nodeIcon(type: ChessimalsAdventureNode['type']): string;
29
+ actAssetSrc(actId: string): string;
30
+ actBgSrc(actId: string): string;
31
+ nodeAssetSrc(type: ChessimalsAdventureNode['type']): string;
29
32
  onNodeTap(nodeView: AdventureNodeView): void;
30
33
  dismissEncounter(): void;
31
34
  confirmPlay(): void;
@@ -133,7 +133,7 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
133
133
  readonly botProfiles: ChessimalsBotProfile[];
134
134
  readonly challengeLadder: ChessimalsChallengeBot[];
135
135
  readonly animals: ChessimalsAnimalView[];
136
- readonly valtechComponentsVersion = "4.0.629";
136
+ readonly valtechComponentsVersion = "4.0.632";
137
137
  readonly screen: import("@angular/core").WritableSignal<"home" | "challenge" | "path" | "game">;
138
138
  readonly selectedBoardSize: import("@angular/core").WritableSignal<ChessimalsBoardSize>;
139
139
  readonly selectedLocalMode: import("@angular/core").WritableSignal<ChessimalsLocalMode>;
@@ -104,6 +104,34 @@ export declare class AuthService implements OnDestroy {
104
104
  * dev cross-site con cookie de terceros bloqueada) → invitado.
105
105
  */
106
106
  private bootstrapSessionFromHintCookie;
107
+ /**
108
+ * Nombre de la sessionStorage key usada como guarda anti-loop del bridge.
109
+ * `sessionStorage` (no localStorage) — el guard debe expirar naturalmente al
110
+ * cerrar la pestaña; una sesión de familia recién iniciada en otra pestaña
111
+ * debe poder reintentar el bridge en una pestaña nueva.
112
+ */
113
+ private static readonly SSO_BRIDGE_GUARD_KEY;
114
+ /**
115
+ * ¿Corresponde disparar el redirect al Auth Proxy Central (ADR-050 Modo B)?
116
+ *
117
+ * Falso si: la config no lo habilita, falta `ssoBridgeUrl`, no corremos en
118
+ * un browser real (SSR/tests), o esta pestaña YA volvió de un intento de
119
+ * bridge — sin este último guard, un bridge que redirige sin `?handoff`
120
+ * (sin sesión) dispararía un bucle infinito de redirects en cada
121
+ * `initialize()` posterior de la misma pestaña.
122
+ */
123
+ private shouldBootstrapViaSSOBridge;
124
+ /**
125
+ * Navega la página completa al Auth Proxy Central con `redirect_uri` = la
126
+ * URL actual. El backend valida la cookie `valtech_refresh` (visible solo
127
+ * en su propio dominio, por eso el redirect debe ser top-level navigation
128
+ * y no un fetch) y redirige de vuelta con `?handoff=TOKEN` si hay sesión.
129
+ *
130
+ * Marca el guard ANTES de navegar — si el bridge redirige sin `?handoff`
131
+ * (sin sesión), el siguiente `initialize()` de esta pestaña no debe volver
132
+ * a intentar el bridge.
133
+ */
134
+ private redirectToSSOBridge;
107
135
  ngOnDestroy(): void;
108
136
  /**
109
137
  * Inicia sesión con email y contraseña.
@@ -84,6 +84,41 @@ export interface ValtechAuthConfig {
84
84
  * credencial — el token real va en la cookie HttpOnly `valtech_refresh`.
85
85
  */
86
86
  loggedInHintCookie?: string;
87
+ /**
88
+ * Bootstrapear la sesión vía el Auth Proxy Central cuando esta app NO
89
+ * comparte dominio raíz con el resto del factory (ADR-050, Modo B — ej. un
90
+ * producto con dominio propio como `sigify.com`, a diferencia de bingo/
91
+ * showcase bajo `*.myvaltech.com`).
92
+ *
93
+ * Cuando es `true`, no hay access token local NI cookie-hint legible
94
+ * (`bootstrapSessionFromHint` no aplica en este dominio — la cookie
95
+ * `Domain=.myvaltech.com` nunca llega aquí), e `initialize()` no viene de
96
+ * un retorno del bridge (ver más abajo), la app hace una navegación de
97
+ * página completa a `ssoBridgeUrl` con `redirect_uri` = la URL actual.
98
+ *
99
+ * El backend valida la cookie `valtech_refresh` (HttpOnly, sólo visible en
100
+ * su propio dominio) y:
101
+ * - si hay sesión activa: redirige de vuelta con `?handoff=TOKEN` — el
102
+ * `APP_INITIALIZER` de `HandoffService.detectAndExchangeHandoff()`
103
+ * (ya requerido por cross-app handoff, ver frontend/CLAUDE.md) instala
104
+ * la sesión sin pedir credenciales.
105
+ * - si no hay sesión: redirige de vuelta sin `?handoff` — la app cae a
106
+ * invitado, comportamiento normal.
107
+ *
108
+ * El usuario ve una redirección breve (dos cargas de página), tal como
109
+ * documenta el ADR-050 para este modo — no hay forma de evitarla sin
110
+ * iframe/popup, y esos rompen con el bloqueo de cookies de terceros.
111
+ *
112
+ * Requiere `ssoBridgeUrl` seteado y el `APP_INITIALIZER` de handoff
113
+ * cableado en `main.ts` (mismo requisito que el handoff cross-app manual).
114
+ */
115
+ bootstrapSessionFromBridge?: boolean;
116
+ /**
117
+ * URL completa del endpoint `GET /v2/auth/sso-bridge` del Auth Proxy
118
+ * Central (ej: 'https://api.myvaltech.com/v2/auth/sso-bridge'). Requerido
119
+ * cuando `bootstrapSessionFromBridge` es `true`.
120
+ */
121
+ ssoBridgeUrl?: string;
87
122
  }
88
123
  /**
89
124
  * Estado completo de autenticación.
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.629";
5
+ export declare const VERSION = "4.0.632";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "4.0.629",
3
+ "version": "4.0.632",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "valtech-firebase-config": "./src/lib/services/firebase/scripts/generate-sw-config.js"
@@ -47,6 +47,32 @@ Transparent 512x512 PNGs:
47
47
  - `nodes/mystery.png`: mystery/reward node.
48
48
  - `nodes/boss.png`: boss encounter node.
49
49
 
50
+ ### Act Backgrounds
51
+
52
+ Wide 1600x900 PNGs for adventure ambience behind the map or behind the game
53
+ surface:
54
+
55
+ - `backgrounds/savanna.png`: warm open savanna.
56
+ - `backgrounds/jungle.png`: lush jungle clearing.
57
+ - `backgrounds/arctic.png`: bright icy clearing.
58
+ - `backgrounds/coliseum.png`: final arena.
59
+
60
+ These backgrounds are intentionally calmer in the center so a board, map, or
61
+ encounter panel can sit on top.
62
+
63
+ ### Visual Proposals
64
+
65
+ Exploratory assets for improving the board and pawns:
66
+
67
+ - `proposals/savanna-board-concept.png`: direction for a wilder savanna board.
68
+ - `proposals/pawn-white-adventure.png`: transparent 512x512 white pawn concept.
69
+ - `proposals/pawn-black-adventure.png`: transparent 512x512 black pawn concept.
70
+
71
+ The board concept is not a functional board asset. Recreate the grid with CSS,
72
+ canvas, or deterministic HTML so the 6x6 and 8x8 boards keep exact rows,
73
+ columns, hit areas, labels, and accessibility. Use the concept for palette,
74
+ border, texture, and edge decoration only.
75
+
50
76
  ## Implementation Notes
51
77
 
52
78
  - Use these assets instead of emojis in the adventure map and encounter UI.
@@ -55,3 +81,5 @@ Transparent 512x512 PNGs:
55
81
  - act icons: 64-112px depending on card density;
56
82
  - node icons: 48-88px depending on node size;
57
83
  - hero: full-width responsive image with `object-fit: cover` and UI-owned border radius.
84
+ - backgrounds: full-width layer with dark/light overlay tuned per theme;
85
+ - pawn concepts: test at the smallest mobile board size before replacing the current pieces.