@simple-parlay/components 2.3.2 → 2.3.3-pre.1

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.
@@ -22,7 +22,15 @@ export interface GameEdition {
22
22
  * Artwork a game library brings with it. Components includes basic-game artwork; the
23
23
  * provider merges every pack in `gameLibrary` for IconSvg and the shelf.
24
24
  */
25
+ /** A game that is not live yet: the Game Shelf shows it as a dimmed "Coming soon" tile. */
26
+ export interface ComingSoonGame {
27
+ id: string;
28
+ name: string;
29
+ hint?: string;
30
+ }
25
31
  export interface GameArtwork {
32
+ /** Games to tease on the Game Shelf. */
33
+ comingSoon?: readonly ComingSoonGame[];
26
34
  /** SVG markup by icon id (see resolveGameIconId). */
27
35
  icons: Readonly<Record<string, string>>;
28
36
  /** Category covers and guide branding supplied by the library. */
@@ -35,6 +35,7 @@ export declare function resolveShelfSkin(theme: BladeTheme): {
35
35
  button: string;
36
36
  buttonText: string;
37
37
  coverText: string;
38
+ coverGround?: string;
38
39
  artwork?: Record<string, string | null>;
39
40
  coverStyle?: "art" | "brand" | "mark" | "stacked" | "tile";
40
41
  heroArtwork?: Record<string, string | null>;
@@ -10,6 +10,8 @@ export declare function useGames(apiClient: BladeApiClient, params?: {
10
10
  loading: boolean;
11
11
  error: string | null;
12
12
  refetch: () => Promise<void>;
13
+ refresh: () => Promise<void>;
14
+ revision: number;
13
15
  games: Game[];
14
16
  howToPlayMarkdown: string | null;
15
17
  };
@@ -19,11 +21,18 @@ export declare function usePropositions(apiClient: BladeApiClient, params?: {
19
21
  category?: GameCategory;
20
22
  }, options?: {
21
23
  skip?: boolean;
24
+ /** Refresh quietly every `ms` while `when()` holds, and when the tab returns. `revision` counts the refreshes that landed. */
25
+ poll?: {
26
+ ms: number;
27
+ when: () => boolean;
28
+ };
22
29
  }): {
23
30
  loading: boolean;
24
31
  error: string | null;
25
32
  refetch: () => Promise<void>;
33
+ revision: number;
26
34
  propositions: Proposition[];
35
+ refresh: () => Promise<void>;
27
36
  };
28
37
  export declare function useSports(apiClient: BladeApiClient, options?: {
29
38
  skip?: boolean;
@@ -31,6 +40,8 @@ export declare function useSports(apiClient: BladeApiClient, options?: {
31
40
  loading: boolean;
32
41
  error: string | null;
33
42
  refetch: () => Promise<void>;
43
+ refresh: () => Promise<void>;
44
+ revision: number;
34
45
  sports: import('./types').SportSummary[];
35
46
  };
36
47
  export declare function useGameEntries(apiClient: BladeApiClient, params?: {
@@ -11,6 +11,8 @@ export interface HowToPlayStep {
11
11
  export interface HowToPlayDemoLeg {
12
12
  question: string;
13
13
  outcome: 'yes' | 'no';
14
+ /** The fixture, shown under the question as on a real card. */
15
+ match?: string;
14
16
  }
15
17
  export interface HowToPlayPanelContent {
16
18
  id: GameIconId;
@@ -0,0 +1,11 @@
1
+ import { Proposition } from './types';
2
+ /** A pick can still be played: not expired, suspended, voided or settled, and not closed to betting. */
3
+ export declare function isPropositionPlayable(p: Proposition): boolean;
4
+ /**
5
+ * The picked ids that can no longer be played, given what BLADE returns for exactly those ids
6
+ * (`getPropositionsByIds`, expired included): an id BLADE no longer returns, or one that is not playable.
7
+ * Checked by id, not against the paged pool, so a pick off the first page is never mistaken for a gone one.
8
+ */
9
+ export declare function unavailableSelectionIds(ids: readonly number[], found: readonly Proposition[]): number[];
10
+ export declare const PICKS_POLL_MS = 30000;
11
+ export declare const unavailablePicksMessage: (count: number) => string;
@@ -129,6 +129,8 @@ export interface BladeTheme {
129
129
  button?: string;
130
130
  buttonText?: string;
131
131
  coverText?: string;
132
+ /** The card behind every `brand` game cover and category banner. @default stone #DDD9D2 */
133
+ coverGround?: string;
132
134
  coverColors?: Record<string, string>;
133
135
  /** Cover colour for games without artwork, by tier id (signature / premier / exclusive). */
134
136
  tierColors?: Record<string, string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simple-parlay/components",
3
- "version": "2.3.2",
3
+ "version": "2.3.3-pre.1",
4
4
  "description": "UI components, hooks, and utilities for React and React Native",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",