valtech-components 4.0.452 → 4.0.454

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 (28) hide show
  1. package/esm2022/lib/components/organisms/mini-games/bubble-blitz-game.component.mjs +18 -9
  2. package/esm2022/lib/components/organisms/mini-games/chessimals-engine.mjs +109 -16
  3. package/esm2022/lib/components/organisms/mini-games/chessimals-game.component.mjs +18 -9
  4. package/esm2022/lib/components/organisms/mini-games/christianity-game.component.mjs +1735 -0
  5. package/esm2022/lib/components/organisms/mini-games/memory-game.component.mjs +18 -9
  6. package/esm2022/lib/components/organisms/mini-games/mini-games.i18n.mjs +159 -9
  7. package/esm2022/lib/components/organisms/mini-games/simon-game.component.mjs +18 -9
  8. package/esm2022/lib/components/organisms/mini-games/types.mjs +1 -1
  9. package/esm2022/lib/directives/light-ripple.directive.mjs +57 -0
  10. package/esm2022/lib/version.mjs +2 -2
  11. package/esm2022/mini-games/public-api.mjs +34 -2
  12. package/esm2022/public-api.mjs +3 -1
  13. package/fesm2022/valtech-components-mini-games.mjs +34 -2
  14. package/fesm2022/valtech-components-mini-games.mjs.map +1 -1
  15. package/fesm2022/valtech-components.mjs +2122 -58
  16. package/fesm2022/valtech-components.mjs.map +1 -1
  17. package/lib/components/organisms/mini-games/bubble-blitz-game.component.d.ts +2 -0
  18. package/lib/components/organisms/mini-games/chessimals-game.component.d.ts +3 -1
  19. package/lib/components/organisms/mini-games/christianity-game.component.d.ts +113 -0
  20. package/lib/components/organisms/mini-games/memory-game.component.d.ts +2 -0
  21. package/lib/components/organisms/mini-games/simon-game.component.d.ts +2 -0
  22. package/lib/components/organisms/mini-games/types.d.ts +74 -1
  23. package/lib/directives/light-ripple.directive.d.ts +8 -0
  24. package/lib/version.d.ts +1 -1
  25. package/mini-games/public-api.d.ts +4 -0
  26. package/package.json +2 -1
  27. package/public-api.d.ts +2 -0
  28. package/src/lib/assets/games/christianity/card-symbol.svg +51 -0
@@ -44,6 +44,7 @@ export declare class BubbleBlitzGameComponent implements OnDestroy {
44
44
  readonly animating: import("@angular/core").WritableSignal<boolean>;
45
45
  readonly leaderboard: import("@angular/core").WritableSignal<BubbleLeaderboardEntry[]>;
46
46
  readonly confirmAction: import("@angular/core").WritableSignal<BubbleConfirmAction>;
47
+ private readonly confirmedAction;
47
48
  readonly config: import("@angular/core").Signal<BubbleBlitzModeConfig>;
48
49
  readonly feverReady: import("@angular/core").Signal<boolean>;
49
50
  readonly feverProgress: import("@angular/core").Signal<number>;
@@ -73,6 +74,7 @@ export declare class BubbleBlitzGameComponent implements OnDestroy {
73
74
  requestChangeMode(): void;
74
75
  requestChangeGame(): void;
75
76
  closeConfirmModal(): void;
77
+ handleConfirmModalDismissed(): void;
76
78
  confirmPendingAction(token?: string): void;
77
79
  private startTimer;
78
80
  private stopTimer;
@@ -72,7 +72,7 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
72
72
  readonly botProfiles: ChessimalsBotProfile[];
73
73
  readonly challengeLadder: ChessimalsChallengeBot[];
74
74
  readonly animals: ChessimalsAnimalView[];
75
- readonly valtechComponentsVersion = "4.0.452";
75
+ readonly valtechComponentsVersion = "4.0.454";
76
76
  readonly screen: import("@angular/core").WritableSignal<"home" | "game">;
77
77
  readonly selectedBoardSize: import("@angular/core").WritableSignal<ChessimalsBoardSize>;
78
78
  readonly selectedLocalMode: import("@angular/core").WritableSignal<ChessimalsLocalMode>;
@@ -102,6 +102,7 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
102
102
  readonly moveTrail: import("@angular/core").Signal<ChessimalsMoveTrailView>;
103
103
  readonly botThinking: import("@angular/core").WritableSignal<boolean>;
104
104
  readonly confirmAction: import("@angular/core").WritableSignal<ChessimalsConfirmAction>;
105
+ private readonly confirmedAction;
105
106
  readonly onlineJoinCode: import("@angular/core").WritableSignal<string>;
106
107
  readonly onlineLoading: import("@angular/core").WritableSignal<boolean>;
107
108
  readonly onlineAction: import("@angular/core").WritableSignal<"create" | "join" | "accept" | "reject">;
@@ -225,6 +226,7 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
225
226
  requestChangeGame(): void;
226
227
  requestResign(): void;
227
228
  closeConfirmModal(): void;
229
+ handleConfirmModalDismissed(): void;
228
230
  confirmPendingAction(token?: string): void;
229
231
  private resignGame;
230
232
  openRulesModal(): void;
@@ -0,0 +1,113 @@
1
+ import { CdkDrag, CdkDragDrop } from '@angular/cdk/drag-drop';
2
+ import { ChristianityCardDefinition, ChristianityCharacterInstance, ChristianityGameState, ChristianityOfferingInstance, ChristianityPlayerState, ChristianitySeat } from './types';
3
+ import * as i0 from "@angular/core";
4
+ interface ChristianityCardPreview {
5
+ title: string;
6
+ eyebrow: string;
7
+ meta: string;
8
+ body: string;
9
+ cardId?: string;
10
+ source?: 'hand' | 'board' | 'pile';
11
+ }
12
+ interface ChristianityInfoPanel {
13
+ title: string;
14
+ eyebrow: string;
15
+ meta: string;
16
+ body: string;
17
+ facts: string[];
18
+ }
19
+ interface ChristianityPreviewTilt {
20
+ rotateX: number;
21
+ rotateY: number;
22
+ shiftX: number;
23
+ shiftY: number;
24
+ }
25
+ export declare class ChristianityGameComponent {
26
+ private i18n;
27
+ protected readonly game: import("@angular/core").WritableSignal<ChristianityGameState>;
28
+ protected readonly selectedHandCard: import("@angular/core").WritableSignal<string>;
29
+ protected readonly selectedAttacker: import("@angular/core").WritableSignal<ChristianityCharacterInstance>;
30
+ protected readonly selectedPreview: import("@angular/core").WritableSignal<ChristianityCardPreview>;
31
+ protected readonly selectedInfo: import("@angular/core").WritableSignal<ChristianityInfoPanel>;
32
+ protected readonly previewTilt: import("@angular/core").WritableSignal<ChristianityPreviewTilt>;
33
+ protected readonly hoveredHandIndex: import("@angular/core").WritableSignal<number>;
34
+ protected readonly draggingCardId: import("@angular/core").WritableSignal<string>;
35
+ protected readonly showHistory: import("@angular/core").WritableSignal<boolean>;
36
+ protected readonly offeringsSeat: import("@angular/core").WritableSignal<ChristianitySeat>;
37
+ protected readonly canDropOnBattleSlot: (drag: CdkDrag<string>) => boolean;
38
+ protected readonly canDropOnOfferings: (drag: CdkDrag<string>) => boolean;
39
+ protected readonly player: import("@angular/core").Signal<ChristianityPlayerState>;
40
+ protected readonly opponent: import("@angular/core").Signal<ChristianityPlayerState>;
41
+ protected readonly currentPlayer: import("@angular/core").Signal<ChristianityPlayerState>;
42
+ protected readonly isOwnTurn: import("@angular/core").Signal<boolean>;
43
+ protected readonly hasOpponentGuards: import("@angular/core").Signal<boolean>;
44
+ protected readonly opponentHandCount: import("@angular/core").Signal<number>;
45
+ protected readonly selectedCardDefinition: import("@angular/core").Signal<ChristianityCardDefinition>;
46
+ protected readonly selectedPreviewCard: import("@angular/core").Signal<ChristianityCardDefinition>;
47
+ protected readonly statusText: import("@angular/core").Signal<string>;
48
+ constructor();
49
+ protected t(key: string): string;
50
+ protected cardDefinition(cardId: string): ChristianityCardDefinition;
51
+ protected cardTypeLabel(card: ChristianityCardDefinition): string;
52
+ protected battleSlots(seat: ChristianitySeat): Array<{
53
+ trackId: string;
54
+ card?: ChristianityCharacterInstance;
55
+ }>;
56
+ protected battleSlotDropId(index: number): string;
57
+ protected dropTargetIds(): string[];
58
+ protected hiddenHandCards(count: number): unknown[];
59
+ protected fanTransform(index: number, total: number, opponent: boolean): string;
60
+ protected handCardZIndex(index: number): number;
61
+ protected setHoveredHandIndex(index: number): void;
62
+ protected clearHoveredHandIndex(): void;
63
+ protected releaseHoveredHand(event: PointerEvent): void;
64
+ private handWaveLift;
65
+ private handWaveScale;
66
+ protected readyOfferings(player: ChristianityPlayerState): number;
67
+ protected totalOfferings(player: ChristianityPlayerState): number;
68
+ protected canPlay(card: ChristianityCardDefinition): boolean;
69
+ protected canPlaySelected(): boolean;
70
+ protected selectedActionLabel(): string;
71
+ protected selectedActionDisabled(): boolean;
72
+ protected previewActionDisabled(): boolean;
73
+ protected canPlaceSelectedCharacter(): boolean;
74
+ protected canPlaceSelectedOffering(): boolean;
75
+ protected isDraggingCharacter(): boolean;
76
+ protected isDraggingOffering(): boolean;
77
+ protected startDraggingCard(cardId: string): void;
78
+ protected endDraggingCard(): void;
79
+ protected dropOnBattleSlot(event: CdkDragDrop<number, unknown, string>, slotIndex: number): void;
80
+ protected dropOnOfferings(event: CdkDragDrop<unknown, unknown, string>): void;
81
+ protected selectHandCard(cardId: string): void;
82
+ protected playSelectedCard(slotIndex?: number): void;
83
+ protected playCardFromHand(cardId: string, slotIndex?: number): void;
84
+ protected playPreviewCard(): void;
85
+ protected handleOfferingPile(seat: ChristianitySeat): void;
86
+ protected selectAttacker(card: ChristianityCharacterInstance): void;
87
+ protected handleOpponentCharacter(card: ChristianityCharacterInstance): void;
88
+ protected handleOpponentLeader(): void;
89
+ protected attackLeader(): void;
90
+ protected attackCharacter(target: ChristianityCharacterInstance): void;
91
+ protected endTurn(): void;
92
+ protected resetMock(): void;
93
+ protected closePreview(): void;
94
+ protected closeInfo(): void;
95
+ protected openOfferings(seat: ChristianitySeat): void;
96
+ protected openHistory(): void;
97
+ protected closeOfferings(): void;
98
+ protected tiltPreview(event: PointerEvent): void;
99
+ protected resetPreviewTilt(): void;
100
+ private cleanupDestroyed;
101
+ protected inspectLeader(seat: ChristianitySeat): void;
102
+ protected inspectOffering(offering: ChristianityOfferingInstance): void;
103
+ protected canUseOfferingAbility(offering: ChristianityOfferingInstance, seat: ChristianitySeat): boolean;
104
+ protected useOfferingAbility(offering: ChristianityOfferingInstance, seat: ChristianitySeat): void;
105
+ protected inspectDeck(): void;
106
+ protected inspectHandCard(cardId: string, fromHand?: boolean): void;
107
+ protected inspectHistoryCard(cardId: string): void;
108
+ private inspectCharacter;
109
+ private spendOfferings;
110
+ static ɵfac: i0.ɵɵFactoryDeclaration<ChristianityGameComponent, never>;
111
+ static ɵcmp: i0.ɵɵComponentDeclaration<ChristianityGameComponent, "val-christianity-game", never, {}, {}, never, never, true, never>;
112
+ }
113
+ export {};
@@ -41,6 +41,7 @@ export declare class MemoryGameComponent implements OnDestroy {
41
41
  readonly lockBoard: import("@angular/core").WritableSignal<boolean>;
42
42
  readonly leaderboard: import("@angular/core").WritableSignal<MemoryLeaderboardEntry[]>;
43
43
  readonly confirmAction: import("@angular/core").WritableSignal<MemoryConfirmAction>;
44
+ private readonly confirmedAction;
44
45
  private timer?;
45
46
  private firstPick?;
46
47
  readonly profileConfig: import("@angular/core").Signal<{
@@ -75,6 +76,7 @@ export declare class MemoryGameComponent implements OnDestroy {
75
76
  requestChangeMode(): void;
76
77
  requestChangeGame(): void;
77
78
  closeConfirmModal(): void;
79
+ handleConfirmModalDismissed(): void;
78
80
  confirmPendingAction(token?: string): void;
79
81
  flip(card: MemoryGameCard): void;
80
82
  private startTimer;
@@ -32,6 +32,7 @@ export declare class SimonGameComponent implements OnDestroy {
32
32
  readonly activePad: import("@angular/core").WritableSignal<string>;
33
33
  readonly leaderboard: import("@angular/core").WritableSignal<SimonLeaderboardEntry[]>;
34
34
  readonly confirmAction: import("@angular/core").WritableSignal<SimonConfirmAction>;
35
+ private readonly confirmedAction;
35
36
  readonly modeConfig: import("@angular/core").Signal<SimonModeConfig>;
36
37
  readonly bestRound: import("@angular/core").Signal<number>;
37
38
  readonly modeLeaderboard: import("@angular/core").Signal<SimonLeaderboardEntry[]>;
@@ -52,6 +53,7 @@ export declare class SimonGameComponent implements OnDestroy {
52
53
  requestChangeMode(): void;
53
54
  requestChangeGame(): void;
54
55
  closeConfirmModal(): void;
56
+ handleConfirmModalDismissed(): void;
55
57
  confirmPendingAction(token?: string): void;
56
58
  tap(pad: SimonPad): void;
57
59
  scoreText(entry: SimonLeaderboardEntry): string;
@@ -52,7 +52,7 @@ export type ChessimalsWinReason = 'promotion' | 'elimination' | 'resignation';
52
52
  export type ChessimalsGameMode = 'local' | 'online';
53
53
  export type ChessimalsLocalMode = 'one-device' | 'bot';
54
54
  export type ChessimalsBotDifficulty = 'easy' | 'normal' | 'hard';
55
- export type ChessimalsBotProfileId = 'explorer' | 'impulsive' | 'runner' | 'hunter' | 'guardian' | 'jumper' | 'strategist' | 'predator' | 'sprinter' | 'sentinel';
55
+ export type ChessimalsBotProfileId = 'explorer' | 'impulsive' | 'runner' | 'hunter' | 'guardian' | 'jumper' | 'strategist' | 'predator' | 'sprinter' | 'sentinel' | 'oracle' | 'ambusher' | 'locksmith' | 'storm' | 'matriarch' | 'endgame';
56
56
  export type ChessimalsGameStatus = 'waiting' | 'in_progress' | 'finished' | 'expired';
57
57
  export interface ChessimalsBotProfile {
58
58
  id: ChessimalsBotProfileId;
@@ -233,3 +233,76 @@ export interface ChessimalsGameState {
233
233
  moveHistory?: ChessimalsMoveHistoryEntry[];
234
234
  online?: ChessimalsOnlineState;
235
235
  }
236
+ export type ChristianitySeat = 'P1' | 'P2';
237
+ export type ChristianityGameStatus = 'in_progress' | 'finished';
238
+ export type ChristianityGameMode = 'solo_bot' | 'two_player' | 'local_pass';
239
+ export type ChristianityCardType = 'character' | 'offering';
240
+ export type ChristianityCardRarity = 'normal' | 'uncommon' | 'rare' | 'legendary';
241
+ export interface ChristianityCardDefinition {
242
+ id: string;
243
+ name: string;
244
+ type: ChristianityCardType;
245
+ cost: number;
246
+ attack: number;
247
+ life: number;
248
+ abilityName?: string;
249
+ abilityText?: string;
250
+ abilityCost?: number;
251
+ imageUrl?: string;
252
+ verseText?: string;
253
+ scripture?: string;
254
+ edition?: string;
255
+ collectorNumber?: string;
256
+ author?: string;
257
+ year?: string;
258
+ rarity?: ChristianityCardRarity;
259
+ }
260
+ export interface ChristianityCharacterInstance {
261
+ instanceId: string;
262
+ cardId: string;
263
+ name: string;
264
+ owner: ChristianitySeat;
265
+ controller: ChristianitySeat;
266
+ attack: number;
267
+ currentHp: number;
268
+ maxHp: number;
269
+ canAttack: boolean;
270
+ }
271
+ export interface ChristianityOfferingInstance {
272
+ instanceId: string;
273
+ cardId: string;
274
+ name: string;
275
+ owner: ChristianitySeat;
276
+ ready: boolean;
277
+ value: number;
278
+ abilityName?: string;
279
+ abilityText?: string;
280
+ abilityCost?: number;
281
+ }
282
+ export interface ChristianityPlayerState {
283
+ seat: ChristianitySeat;
284
+ displayName: string;
285
+ avatar?: string;
286
+ avatarColor?: string;
287
+ leaderName: string;
288
+ leaderHp: number;
289
+ leaderMaxHp: number;
290
+ offerings: ChristianityOfferingInstance[];
291
+ offeringPlayedThisTurn: boolean;
292
+ hand?: string[];
293
+ handCount?: number;
294
+ battleZone: ChristianityCharacterInstance[];
295
+ }
296
+ export interface ChristianityGameState {
297
+ gameId: string;
298
+ status: ChristianityGameStatus;
299
+ mode: ChristianityGameMode;
300
+ turnOwner: ChristianitySeat;
301
+ revision: number;
302
+ turnCount: number;
303
+ matchScore: Record<ChristianitySeat, number>;
304
+ sharedDeck: string[];
305
+ historyZone: string[];
306
+ players: Record<ChristianitySeat, ChristianityPlayerState>;
307
+ log: string[];
308
+ }
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class LightRippleDirective {
3
+ private host;
4
+ private renderer;
5
+ createRipple(event: PointerEvent): void;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<LightRippleDirective, never>;
7
+ static ɵdir: i0.ɵɵDirectiveDeclaration<LightRippleDirective, "[valLightRipple]", never, {}, {}, never, never, true, never>;
8
+ }
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.452";
5
+ export declare const VERSION = "4.0.454";
@@ -27,6 +27,10 @@ export declare class ChessimalsGamePageComponent {
27
27
  static ɵfac: i0.ɵɵFactoryDeclaration<ChessimalsGamePageComponent, never>;
28
28
  static ɵcmp: i0.ɵɵComponentDeclaration<ChessimalsGamePageComponent, "val-chessimals-game-page", never, {}, {}, never, never, true, never>;
29
29
  }
30
+ export declare class ChristianityGamePageComponent {
31
+ static ɵfac: i0.ɵɵFactoryDeclaration<ChristianityGamePageComponent, never>;
32
+ static ɵcmp: i0.ɵɵComponentDeclaration<ChristianityGamePageComponent, "val-christianity-game-page", never, {}, {}, never, never, true, never>;
33
+ }
30
34
  export declare class ChessimalsOnlineGamePageComponent {
31
35
  private readonly route;
32
36
  readonly gameId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "4.0.452",
3
+ "version": "4.0.454",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "valtech-firebase-config": "./src/lib/services/firebase/scripts/generate-sw-config.js"
@@ -39,6 +39,7 @@
39
39
  }
40
40
  },
41
41
  "dependencies": {
42
+ "@angular/cdk": "^18.2.14",
42
43
  "@capacitor/app-launcher": "^6.0.4",
43
44
  "@capacitor/browser": "^6.0.3",
44
45
  "@zxing/browser": "^0.2.0",
package/public-api.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from './lib/version';
2
2
  export * from './lib/directives/has-permission.directive';
3
+ export * from './lib/directives/light-ripple.directive';
3
4
  export * from './lib/components/atoms/avatar/avatar.component';
4
5
  export * from './lib/components/atoms/avatar/types';
5
6
  export * from './lib/components/atoms/box/box.component';
@@ -340,6 +341,7 @@ export * from './lib/components/organisms/member-import-modal/member-import-moda
340
341
  export * from './lib/components/organisms/mini-games/chessimals-engine';
341
342
  export * from './lib/components/organisms/mini-games/chessimals-game.component';
342
343
  export * from './lib/components/organisms/mini-games/chessimals-online.service';
344
+ export * from './lib/components/organisms/mini-games/christianity-game.component';
343
345
  export * from './lib/components/organisms/mini-games/bubble-blitz-game.component';
344
346
  export * from './lib/components/organisms/mini-games/memory-game.component';
345
347
  export * from './lib/components/organisms/mini-games/mini-game-player-profile.service';
@@ -0,0 +1,51 @@
1
+ <svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <title>Christianity game symbol</title>
3
+ <path
4
+ d="M256 33C195 92 162 151 158 230C96 259 55 312 21 432C91 455 174 458 256 414C338 458 421 455 491 432C457 312 416 259 354 230C350 151 317 92 256 33Z"
5
+ fill="#8FD7F2"
6
+ stroke="#12699B"
7
+ stroke-width="23"
8
+ stroke-linejoin="round"
9
+ />
10
+ <path
11
+ d="M256 66C214 112 185 162 180 239C205 233 230 230 256 230C282 230 307 233 332 239C327 162 298 112 256 66Z"
12
+ fill="#101827"
13
+ stroke="#12699B"
14
+ stroke-width="18"
15
+ stroke-linejoin="round"
16
+ />
17
+ <path
18
+ d="M56 418C104 430 163 431 219 407C194 377 175 341 163 294C112 318 82 356 56 418Z"
19
+ fill="#101827"
20
+ stroke="#12699B"
21
+ stroke-width="18"
22
+ stroke-linejoin="round"
23
+ />
24
+ <path
25
+ d="M456 418C408 430 349 431 293 407C318 377 337 341 349 294C400 318 430 356 456 418Z"
26
+ fill="#101827"
27
+ stroke="#12699B"
28
+ stroke-width="18"
29
+ stroke-linejoin="round"
30
+ />
31
+ <path
32
+ d="M181 279C229 267 283 267 331 279C320 321 294 357 256 392C218 357 192 321 181 279Z"
33
+ fill="#101827"
34
+ stroke="#12699B"
35
+ stroke-width="18"
36
+ stroke-linejoin="round"
37
+ />
38
+ <path
39
+ d="M149 190C151 178 154 166 158 154"
40
+ stroke="#12699B"
41
+ stroke-width="18"
42
+ stroke-linecap="round"
43
+ />
44
+ <path
45
+ d="M165 134C184 92 215 55 256 21C297 55 328 92 347 134"
46
+ stroke="#8FD7F2"
47
+ stroke-width="16"
48
+ stroke-linecap="round"
49
+ opacity="0.78"
50
+ />
51
+ </svg>