@simple-parlay/components 1.30.6-pre.8 → 1.30.6-pre.9
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/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +337 -307
- package/dist/react/components/GameSelector.d.ts +1 -1
- package/dist/react/components/GameShowcaseCatalogue.d.ts +8 -0
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.mjs +337 -307
- package/dist/react-native/index.cjs +1 -1
- package/dist/react-native/index.mjs +2 -2
- package/dist/shared/game-artwork.d.ts +20 -0
- package/dist/shared/game-variants.d.ts +1 -1
- package/dist/shared/types.d.ts +3 -1
- package/package.json +1 -1
|
@@ -31,7 +31,27 @@ export interface GameArtwork {
|
|
|
31
31
|
presets: readonly CategoryGamePreset[];
|
|
32
32
|
/** Shelf cover data URLs by preset id. */
|
|
33
33
|
presetCovers: Readonly<Record<string, string>>;
|
|
34
|
+
/** Curated Showcase tiles for the API's games. Without one the Showcase draws a plain tile per game. */
|
|
35
|
+
catalogue?: ShowcaseCatalogue;
|
|
34
36
|
}
|
|
37
|
+
export type ShowcaseCategory = 'sports' | 'racing' | 'prediction' | 'fantasy';
|
|
38
|
+
export interface ShowcaseCard {
|
|
39
|
+
id: string;
|
|
40
|
+
name: string;
|
|
41
|
+
tier: string;
|
|
42
|
+
/** False dims the tile: a curated game the API is not offering right now. */
|
|
43
|
+
live: boolean;
|
|
44
|
+
tag: string;
|
|
45
|
+
description: string;
|
|
46
|
+
icon: string;
|
|
47
|
+
features: {
|
|
48
|
+
title: string;
|
|
49
|
+
text: string;
|
|
50
|
+
}[];
|
|
51
|
+
game?: Game;
|
|
52
|
+
}
|
|
53
|
+
/** `restricted` drops curated tiles that none of `games` match. */
|
|
54
|
+
export type ShowcaseCatalogue = (category: ShowcaseCategory, games: Game[], restricted?: boolean) => ShowcaseCard[];
|
|
35
55
|
export declare const BASE_GAME_ARTWORK: GameArtwork;
|
|
36
56
|
/** The base artwork plus the given packs, later packs winning. */
|
|
37
57
|
export declare function mergeGameArtwork(...packs: readonly (Partial<GameArtwork> | undefined)[]): GameArtwork;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Optional game-discovery layouts, independent of the overall UI theme. Only `shelf` has a React Native twin; the others are web layouts. */
|
|
2
|
-
export type GameVariant = 'cards' | 'split' | 'compare' | 'shelf';
|
|
2
|
+
export type GameVariant = 'cards' | 'split' | 'compare' | 'shelf' | 'showcase';
|
|
3
3
|
export declare const GAME_VARIANTS: readonly GameVariant[];
|
|
4
4
|
export declare const GAME_VARIANT_LABELS: Record<GameVariant, string>;
|
|
5
5
|
export declare function parseGameVariant(value: unknown): GameVariant | undefined;
|
package/dist/shared/types.d.ts
CHANGED
|
@@ -294,8 +294,10 @@ export interface PlaceEntryFlowProps {
|
|
|
294
294
|
howToPlayMarkdown?: string | null;
|
|
295
295
|
}
|
|
296
296
|
export interface GameSelectorProps {
|
|
297
|
-
/** Game discovery layout. Web renders cards, split, compare and
|
|
297
|
+
/** Game discovery layout. Web renders cards, split, compare, shelf and showcase; native renders shelf and falls back to the default grid for the rest. */
|
|
298
298
|
gameVariant?: GameVariant;
|
|
299
|
+
/** Showcase: `games` is already a curated set, so leave out the dimmed tiles for games not on offer. */
|
|
300
|
+
onlyListedGames?: boolean;
|
|
299
301
|
/** Back navigation for self-contained game layouts. */
|
|
300
302
|
onBack?: () => void;
|
|
301
303
|
uiVariant?: UiVariant;
|