@simple-parlay/components 1.30.6-pre.6 → 1.30.6-pre.8
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 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +447 -419
- package/dist/react/components/CallGameCatalogue.d.ts +4 -0
- package/dist/react/components/CallPayoutTable.d.ts +6 -0
- package/dist/react/components/CallTicketBuilder.d.ts +3 -0
- package/dist/react/components/CorrelationChoicesSkeleton.d.ts +4 -0
- package/dist/react/components/CorrelationPricingDebug.d.ts +2 -0
- package/dist/react/components/CorrelationPropPlaceholder.d.ts +8 -0
- package/dist/react/components/DenseGameCatalogue.d.ts +2 -0
- package/dist/react/components/DenseUi.d.ts +29 -0
- package/dist/react/components/GamePage.d.ts +4 -2
- package/dist/react/components/GameSelector.d.ts +9 -1
- package/dist/react/components/GameSetupPage.d.ts +1 -1
- package/dist/react/components/GameShelfCatalogue.d.ts +8 -0
- package/dist/react/components/GameVariantCatalogue.d.ts +6 -0
- package/dist/react/components/HowToPlayButton.d.ts +3 -1
- package/dist/react/components/PlaceEntryProvider.d.ts +38 -5
- package/dist/react/components/PlaybookChooser.d.ts +7 -0
- package/dist/react/components/SafetyNetPage.d.ts +4 -1
- package/dist/react/components/_primitives/index.d.ts +3 -1
- package/dist/react/index.cjs +1 -0
- package/dist/react/index.d.ts +33 -10
- package/dist/react/index.mjs +447 -419
- package/dist/react-native/components/CallGameCatalogue.d.ts +16 -0
- package/dist/react-native/components/CallPayoutTable.d.ts +6 -0
- package/dist/react-native/components/CallTicketBuilder.d.ts +31 -0
- package/dist/react-native/components/CorrelationChoicesSkeleton.d.ts +3 -0
- package/dist/react-native/components/CorrelationPricingDebug.d.ts +2 -0
- package/dist/react-native/components/CorrelationPropPlaceholder.d.ts +7 -0
- package/dist/react-native/components/DenseGameCatalogue.d.ts +2 -0
- package/dist/react-native/components/DenseUi.d.ts +58 -0
- package/dist/react-native/components/GamePage.d.ts +5 -2
- package/dist/react-native/components/GameSelector.d.ts +9 -1
- package/dist/react-native/components/GameSetupPage.d.ts +1 -1
- package/dist/react-native/components/GameShelfCatalogue.d.ts +7 -0
- package/dist/react-native/components/HowToPlayButton.d.ts +3 -1
- package/dist/react-native/components/PlaceEntryProvider.d.ts +31 -5
- package/dist/react-native/components/PlaybookChooser.d.ts +7 -0
- package/dist/react-native/components/SafetyNetPage.d.ts +4 -1
- package/dist/react-native/components/_primitives/index.d.ts +3 -1
- package/dist/react-native/index.cjs +1 -0
- package/dist/react-native/index.d.ts +33 -10
- package/dist/react-native/index.mjs +474 -445
- package/dist/shared/api-client.d.ts +4 -3
- package/dist/shared/call-presentation.d.ts +20 -0
- package/dist/shared/correlation-steering.d.ts +43 -0
- package/dist/shared/dense-ui.d.ts +54 -0
- package/dist/shared/game-artwork.d.ts +41 -0
- package/dist/shared/game-icons.d.ts +6 -3
- package/dist/shared/game-library.d.ts +34 -0
- package/dist/shared/game-shelf-artwork.d.ts +3 -0
- package/dist/shared/game-shelf-presentation.d.ts +42 -0
- package/dist/shared/game-variants.d.ts +5 -0
- package/dist/shared/hooks.d.ts +7 -7
- package/dist/shared/how-to-play-html.d.ts +1 -1
- package/dist/shared/how-to-play-logo.d.ts +1 -1
- package/dist/shared/playbook.d.ts +29 -0
- package/dist/shared/selection-caps.d.ts +15 -3
- package/dist/shared/selection-variants.d.ts +3 -1
- package/dist/shared/themes.d.ts +20 -0
- package/dist/shared/types.d.ts +17 -2
- package/dist/shared/ui-variant.d.ts +14 -0
- package/dist/shared/use-call-payouts.d.ts +8 -0
- package/dist/shared/utils.d.ts +4 -4
- package/package.json +7 -8
- package/dist/index.js +0 -1
- package/dist/react/components/GameSetBetPage.d.ts +0 -21
- package/dist/react/components/LadderPage.d.ts +0 -21
- package/dist/react/components/MirrorPage.d.ts +0 -21
- package/dist/react/components/PickYourDividendPage.d.ts +0 -21
- package/dist/react/components/SixAgainPage.d.ts +0 -16
- package/dist/react/index.js +0 -1
- package/dist/react/utils/design.d.ts +0 -55
- package/dist/react-native/components/GameSetBetPage.d.ts +0 -19
- package/dist/react-native/components/LadderPage.d.ts +0 -19
- package/dist/react-native/components/MirrorPage.d.ts +0 -19
- package/dist/react-native/components/PickYourDividendPage.d.ts +0 -19
- package/dist/react-native/components/SixAgainPage.d.ts +0 -14
- package/dist/react-native/index.js +0 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BladeTheme } from './themes';
|
|
2
|
+
/** Presentation only. Omit to preserve the original component library UI. */
|
|
3
|
+
export type DenseUiVariant = 'playboard' | 'matchbook' | 'game-deck';
|
|
4
|
+
export type UiVariant = 'default' | 'playbook' | 'call' | 'shelf' | DenseUiVariant;
|
|
5
|
+
export declare const UI_VARIANTS: readonly UiVariant[];
|
|
6
|
+
export declare const UI_VARIANT_LABELS: Record<UiVariant, string>;
|
|
7
|
+
export declare function isDenseUiVariant(value: unknown): value is DenseUiVariant;
|
|
8
|
+
/** Variants that use the Game Shelf picks screen: fixture tabs, inline Yes/No, one-row dock. */
|
|
9
|
+
export declare function usesShelfPicks(value: unknown): boolean;
|
|
10
|
+
export declare function parseUiVariant(value: unknown): UiVariant;
|
|
11
|
+
/** Defaults only: a host's explicit theme continues to take precedence. */
|
|
12
|
+
export declare function uiVariantTheme(variant: UiVariant, colorScheme?: 'light' | 'dark'): BladeTheme | undefined;
|
|
13
|
+
export declare const UiVariantContext: import('react').Context<UiVariant>;
|
|
14
|
+
export declare function useUiVariant(): UiVariant;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Game, EntryPreviewRequest, EntryPreviewResponse } from './types';
|
|
2
|
+
import { CallPayoutView } from './call-presentation';
|
|
3
|
+
export type PreviewCallPayouts = (gameId: number, request: EntryPreviewRequest) => Promise<EntryPreviewResponse>;
|
|
4
|
+
/** Reuse the review endpoint: configured estimates never overwrite a live quote. */
|
|
5
|
+
export declare function useCallPayouts(preview: PreviewCallPayouts | undefined, game: Game | null, count: number, stake: number, expectedCorrect: number, ruleId: number | null | undefined, fallback: CallPayoutView | null): {
|
|
6
|
+
view: CallPayoutView | null;
|
|
7
|
+
estimated: boolean;
|
|
8
|
+
};
|
package/dist/shared/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Game, GamePermittedRule, Proposition, QuickPickResult } from './types';
|
|
1
|
+
import { Game, GamePermittedRule, Proposition, QuickPickResult, GameCategory } from './types';
|
|
2
2
|
export declare const DEFAULT_STAKE = 20;
|
|
3
3
|
export declare function stripColumns(count: number, containerWidth: number): number;
|
|
4
4
|
export declare function resolvePrice(price: number | string | {
|
|
@@ -19,7 +19,7 @@ export declare function groupPropositionsBySport(propositions: Proposition[]): R
|
|
|
19
19
|
export declare function getPropositionSportKey(prop: Proposition, pool?: Proposition[]): string;
|
|
20
20
|
export declare function collectPropositionSportKeys(propositions: Proposition[]): string[];
|
|
21
21
|
export declare function groupPropositionsByCategory(propositions: Proposition[]): Record<string, Proposition[]>;
|
|
22
|
-
export type EntryCategory =
|
|
22
|
+
export type EntryCategory = GameCategory;
|
|
23
23
|
export declare const ENTRY_CATEGORY_ORDER: EntryCategory[];
|
|
24
24
|
export declare function getPropositionEntryCategory(prop: Proposition): EntryCategory;
|
|
25
25
|
/**
|
|
@@ -63,7 +63,7 @@ export declare function getJackpotInfo(game: Game): {
|
|
|
63
63
|
limit: number;
|
|
64
64
|
progressive: boolean;
|
|
65
65
|
};
|
|
66
|
-
export declare function isRacingCategory(gameCategory?:
|
|
66
|
+
export declare function isRacingCategory(gameCategory?: GameCategory, propositions?: Proposition[], sportBaseKey?: string | null): boolean;
|
|
67
67
|
export declare function getSportDisplayName(sport: string, sportBaseKey?: string | null): string;
|
|
68
68
|
/** Host-supplied UI labels keyed by sport key (e.g. `basketball_nba` → `NBA`). */
|
|
69
69
|
export type SportDisplayNameOverrides = Record<string, string>;
|
|
@@ -122,7 +122,7 @@ export declare function readableColor(bg: string | undefined | null, desired: st
|
|
|
122
122
|
/** Group propositions by matchup (home_team vs away_team). */
|
|
123
123
|
export declare function groupByMatchup(props: Proposition[]): Record<string, Proposition[]>;
|
|
124
124
|
export declare function groupByRace(props: Proposition[]): Record<string, Proposition[]>;
|
|
125
|
-
export declare function groupPropositionsForDisplay(props: Proposition[], gameCategory?:
|
|
125
|
+
export declare function groupPropositionsForDisplay(props: Proposition[], gameCategory?: GameCategory, sportBaseKey?: string | null): Record<string, Proposition[]>;
|
|
126
126
|
/**
|
|
127
127
|
* Group picks under the event they belong to, keeping pick order. The key is
|
|
128
128
|
* the "A vs B" matchup, the race name, or `null` for props with no event.
|
package/package.json
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simple-parlay/components",
|
|
3
|
-
"version": "1.30.6-pre.
|
|
3
|
+
"version": "1.30.6-pre.8",
|
|
4
4
|
"description": "UI components, hooks, and utilities for React and React Native",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "./dist/index.
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.mjs",
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
11
|
"types": "./dist/index.d.ts",
|
|
12
12
|
"import": "./dist/index.mjs",
|
|
13
|
-
"require": "./dist/index.
|
|
13
|
+
"require": "./dist/index.cjs"
|
|
14
14
|
},
|
|
15
15
|
"./react": {
|
|
16
16
|
"types": "./dist/react/index.d.ts",
|
|
17
17
|
"import": "./dist/react/index.mjs",
|
|
18
|
-
"require": "./dist/react/index.
|
|
18
|
+
"require": "./dist/react/index.cjs"
|
|
19
19
|
},
|
|
20
20
|
"./react-native": {
|
|
21
21
|
"types": "./dist/react-native/index.d.ts",
|
|
22
22
|
"import": "./dist/react-native/index.mjs",
|
|
23
|
-
"require": "./dist/react-native/index.
|
|
23
|
+
"require": "./dist/react-native/index.cjs"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"files": [
|
|
@@ -48,9 +48,7 @@
|
|
|
48
48
|
"test:e2e:ui": "playwright test --ui",
|
|
49
49
|
"test:visual": "playwright test --config playwright.visual.config.ts",
|
|
50
50
|
"dev:expo": "npm run start --prefix dev-expo",
|
|
51
|
-
"prepublishOnly": "npm run build"
|
|
52
|
-
"generate:how-to-play-logo": "node scripts/embed-how-to-play-logo.mjs",
|
|
53
|
-
"generate:game-icons": "node scripts/embed-game-icons.mjs"
|
|
51
|
+
"prepublishOnly": "npm run build"
|
|
54
52
|
},
|
|
55
53
|
"keywords": [
|
|
56
54
|
"components",
|
|
@@ -91,6 +89,7 @@
|
|
|
91
89
|
"msw": "^2.12.10",
|
|
92
90
|
"react": "^18.2.0",
|
|
93
91
|
"react-dom": "^18.2.0",
|
|
92
|
+
"react-native": "^0.86.2",
|
|
94
93
|
"react-native-svg": "^15.15.4",
|
|
95
94
|
"react-native-web": "^0.21.2",
|
|
96
95
|
"terser": "^5.46.1",
|