@simple-parlay/components 1.29.0
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/LICENSE +71 -0
- package/README.md +196 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/index.mjs +325 -0
- package/dist/react/components/BrandLockup.d.ts +18 -0
- package/dist/react/components/BrandLogo.d.ts +17 -0
- package/dist/react/components/CategoryPickerPage.d.ts +22 -0
- package/dist/react/components/ConfirmPage.d.ts +23 -0
- package/dist/react/components/EntriesPage.d.ts +19 -0
- package/dist/react/components/EntrySubmission.d.ts +2 -0
- package/dist/react/components/EventFilterBanner.d.ts +4 -0
- package/dist/react/components/EventPickerPage.d.ts +5 -0
- package/dist/react/components/GameEntries.d.ts +2 -0
- package/dist/react/components/GameLogo.d.ts +10 -0
- package/dist/react/components/GameModeCard.d.ts +34 -0
- package/dist/react/components/GamePage.d.ts +36 -0
- package/dist/react/components/GameSelector.d.ts +2 -0
- package/dist/react/components/GameSetBetPage.d.ts +21 -0
- package/dist/react/components/GameSetupPage.d.ts +27 -0
- package/dist/react/components/HowToPlayButton.d.ts +28 -0
- package/dist/react/components/HowToPlayPropsTable.d.ts +6 -0
- package/dist/react/components/HtmlContent.d.ts +5 -0
- package/dist/react/components/IconSvg.d.ts +11 -0
- package/dist/react/components/LadderPage.d.ts +21 -0
- package/dist/react/components/LoadingIndicators.d.ts +67 -0
- package/dist/react/components/MarkdownContent.d.ts +13 -0
- package/dist/react/components/MirrorPage.d.ts +21 -0
- package/dist/react/components/MultiLegTable.d.ts +40 -0
- package/dist/react/components/PageBackButton.d.ts +13 -0
- package/dist/react/components/PayoutCircles.d.ts +15 -0
- package/dist/react/components/PerfectPickPage.d.ts +22 -0
- package/dist/react/components/PickYourDividendPage.d.ts +21 -0
- package/dist/react/components/PickerBrand.d.ts +19 -0
- package/dist/react/components/PlaceEntryProvider.d.ts +137 -0
- package/dist/react/components/PressToPlayTile.d.ts +14 -0
- package/dist/react/components/QuickPickButton.d.ts +11 -0
- package/dist/react/components/QuickPickMenu.d.ts +17 -0
- package/dist/react/components/RuleSetupPage.d.ts +27 -0
- package/dist/react/components/SelectionReview.d.ts +2 -0
- package/dist/react/components/SelectionsPage.d.ts +25 -0
- package/dist/react/components/SportPickerPage.d.ts +27 -0
- package/dist/react/components/SportSelector.d.ts +2 -0
- package/dist/react/components/SuccessPage.d.ts +27 -0
- package/dist/react/components/_primitives/index.d.ts +91 -0
- package/dist/react/hooks/index.d.ts +1 -0
- package/dist/react/index.d.ts +74 -0
- package/dist/react/index.js +1 -0
- package/dist/react/index.mjs +325 -0
- package/dist/react/types/index.d.ts +8 -0
- package/dist/react/utils/api-client.d.ts +2 -0
- package/dist/react/utils/design.d.ts +55 -0
- package/dist/react/utils/dummy-data.d.ts +1 -0
- package/dist/react/utils/index.d.ts +2 -0
- package/dist/react/utils/themes.d.ts +13 -0
- package/dist/react-native/components/BrandLockup.d.ts +17 -0
- package/dist/react-native/components/BrandLogo.d.ts +16 -0
- package/dist/react-native/components/CategoryPickerPage.d.ts +17 -0
- package/dist/react-native/components/ConfirmPage.d.ts +19 -0
- package/dist/react-native/components/EntriesPage.d.ts +14 -0
- package/dist/react-native/components/EntrySubmission.d.ts +2 -0
- package/dist/react-native/components/EventFilterBanner.d.ts +4 -0
- package/dist/react-native/components/EventPickerPage.d.ts +4 -0
- package/dist/react-native/components/GameEntries.d.ts +2 -0
- package/dist/react-native/components/GameLogo.d.ts +9 -0
- package/dist/react-native/components/GameModeCard.d.ts +33 -0
- package/dist/react-native/components/GamePage.d.ts +33 -0
- package/dist/react-native/components/GameSelector.d.ts +2 -0
- package/dist/react-native/components/GameSetBetPage.d.ts +19 -0
- package/dist/react-native/components/GameSetupPage.d.ts +26 -0
- package/dist/react-native/components/HowToPlayButton.d.ts +17 -0
- package/dist/react-native/components/IconSvg.d.ts +9 -0
- package/dist/react-native/components/LadderPage.d.ts +19 -0
- package/dist/react-native/components/LoadingIndicators.d.ts +62 -0
- package/dist/react-native/components/MirrorPage.d.ts +19 -0
- package/dist/react-native/components/MultiLegTable.d.ts +37 -0
- package/dist/react-native/components/NativeMenuOverlay.d.ts +32 -0
- package/dist/react-native/components/PageBackButton.d.ts +25 -0
- package/dist/react-native/components/PayoutCircles.d.ts +14 -0
- package/dist/react-native/components/PerfectPickPage.d.ts +20 -0
- package/dist/react-native/components/PickYourDividendPage.d.ts +19 -0
- package/dist/react-native/components/PickerBrand.d.ts +18 -0
- package/dist/react-native/components/PlaceEntryProvider.d.ts +129 -0
- package/dist/react-native/components/PressToPlayTile.d.ts +13 -0
- package/dist/react-native/components/QuickPickButton.d.ts +11 -0
- package/dist/react-native/components/QuickPickMenu.d.ts +17 -0
- package/dist/react-native/components/RuleSetupPage.d.ts +23 -0
- package/dist/react-native/components/SelectionReview.d.ts +2 -0
- package/dist/react-native/components/SelectionsPage.d.ts +22 -0
- package/dist/react-native/components/SportPickerPage.d.ts +20 -0
- package/dist/react-native/components/SportSelector.d.ts +2 -0
- package/dist/react-native/components/SuccessPage.d.ts +24 -0
- package/dist/react-native/components/_primitives/index.d.ts +93 -0
- package/dist/react-native/hooks/index.d.ts +1 -0
- package/dist/react-native/index.d.ts +72 -0
- package/dist/react-native/index.js +1 -0
- package/dist/react-native/index.mjs +334 -0
- package/dist/react-native/types/index.d.ts +1 -0
- package/dist/react-native/utils/api-client.d.ts +2 -0
- package/dist/react-native/utils/dummy-data.d.ts +1 -0
- package/dist/react-native/utils/index.d.ts +2 -0
- package/dist/react-native/utils/themes.d.ts +5 -0
- package/dist/shared/api-client.d.ts +73 -0
- package/dist/shared/composite.d.ts +44 -0
- package/dist/shared/date-filters.d.ts +25 -0
- package/dist/shared/dummy-data.d.ts +9 -0
- package/dist/shared/game-flow.d.ts +39 -0
- package/dist/shared/game-icons.d.ts +10 -0
- package/dist/shared/game-set-bet.d.ts +48 -0
- package/dist/shared/game-tiers.d.ts +23 -0
- package/dist/shared/hooks.d.ts +100 -0
- package/dist/shared/how-to-play-html.d.ts +12 -0
- package/dist/shared/how-to-play-logo.d.ts +2 -0
- package/dist/shared/how-to-play-props-table.d.ts +21 -0
- package/dist/shared/how-to-play-styles.d.ts +2 -0
- package/dist/shared/ladder.d.ts +53 -0
- package/dist/shared/markdown.d.ts +24 -0
- package/dist/shared/mirror.d.ts +66 -0
- package/dist/shared/pick-your-dividend.d.ts +59 -0
- package/dist/shared/picker-brand.d.ts +11 -0
- package/dist/shared/rule-setup.d.ts +75 -0
- package/dist/shared/same-game-multi.d.ts +22 -0
- package/dist/shared/themes.d.ts +164 -0
- package/dist/shared/tokens.d.ts +64 -0
- package/dist/shared/types.d.ts +397 -0
- package/dist/shared/utils.d.ts +118 -0
- package/package.json +101 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { BladeTheme } from '../types';
|
|
3
|
+
export declare function CategoryIcon({ category, size, color, }: {
|
|
4
|
+
category: string;
|
|
5
|
+
size?: number | string;
|
|
6
|
+
color?: string;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function ChevronRightIcon({ size, color, }: {
|
|
9
|
+
size?: number;
|
|
10
|
+
color?: string;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function YesNoCategoryLabel({ label, category, icon, theme, disabled, }: {
|
|
13
|
+
label: string;
|
|
14
|
+
category: string;
|
|
15
|
+
icon?: React.ReactNode;
|
|
16
|
+
theme: BladeTheme;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Game, Proposition, SportSummary, GameEntry, TopPayoutsResponse, ShareData, ScreenSize } from '../types';
|
|
3
|
+
import { BladeTheme, BladeThemeSet, ColorScheme } from '../utils/themes';
|
|
4
|
+
import { SportDisplayNameOverrides, CategoryDisplayNameOverrides } from '../utils';
|
|
5
|
+
import { RenderTeamLogo } from '../../shared/types';
|
|
6
|
+
import { SameGameMultiEvent } from '../../shared/same-game-multi';
|
|
7
|
+
export interface PlaceEntryContextValue {
|
|
8
|
+
theme: BladeTheme;
|
|
9
|
+
bodyFont: string;
|
|
10
|
+
headingFont: string;
|
|
11
|
+
games: Game[];
|
|
12
|
+
propositions: Proposition[];
|
|
13
|
+
propositionsForCategoryPicker: Proposition[];
|
|
14
|
+
propositionsForSportPicker: Proposition[];
|
|
15
|
+
sportSummaries: SportSummary[];
|
|
16
|
+
loading: boolean;
|
|
17
|
+
error: string | null;
|
|
18
|
+
step: 'game' | 'sport' | 'review' | 'confirm' | 'success';
|
|
19
|
+
selectedGame: Game | null;
|
|
20
|
+
selections: Record<number, 'yes' | 'no'>;
|
|
21
|
+
placedEntry: GameEntry | null;
|
|
22
|
+
selectedPropositionIds: number[];
|
|
23
|
+
selectedPropositions: Proposition[];
|
|
24
|
+
selectionValid: boolean;
|
|
25
|
+
answeredCount: number;
|
|
26
|
+
betAmount: number;
|
|
27
|
+
setBetAmount: (v: number) => void;
|
|
28
|
+
expectedCorrect: number;
|
|
29
|
+
setExpectedCorrect: (v: number) => void;
|
|
30
|
+
selectedPropositionCount: number | undefined;
|
|
31
|
+
handlePropositionCountChange: (count: number) => void;
|
|
32
|
+
upgradePropositionCount: (count: number) => void;
|
|
33
|
+
winningCounts: number[];
|
|
34
|
+
payouts: Record<number, number>;
|
|
35
|
+
overloadPayouts: Record<number, number>;
|
|
36
|
+
submitting: boolean;
|
|
37
|
+
submitError: string | null;
|
|
38
|
+
canSubmit: boolean;
|
|
39
|
+
gamePrice: number;
|
|
40
|
+
userBalance?: number;
|
|
41
|
+
hasSufficientBalance: boolean;
|
|
42
|
+
refreshUserBalance: () => Promise<void>;
|
|
43
|
+
handleSubmit: () => Promise<void>;
|
|
44
|
+
selectGame: (game: Game) => void;
|
|
45
|
+
goToSportSelection: () => void;
|
|
46
|
+
goToConfirmation: () => void;
|
|
47
|
+
goBack: () => void;
|
|
48
|
+
reset: () => void;
|
|
49
|
+
clearSelectedGame: () => void;
|
|
50
|
+
toggleSelection: (id: number, answer: 'yes' | 'no') => void;
|
|
51
|
+
quickPickGame: (game: Game, count: number) => void;
|
|
52
|
+
selectedCategory: string | null;
|
|
53
|
+
setSelectedCategory: (category: string | null) => void;
|
|
54
|
+
selectedSport: string | null;
|
|
55
|
+
setSelectedSport: (sport: string | null) => void;
|
|
56
|
+
selectedEventId: string | null;
|
|
57
|
+
sameGameMultiEvents: SameGameMultiEvent[];
|
|
58
|
+
selectSameGameMultiEvent: (eventId: string | null) => void;
|
|
59
|
+
apiUrl: string;
|
|
60
|
+
apiKey?: string;
|
|
61
|
+
fetchImpl?: typeof fetch;
|
|
62
|
+
getAuthHeaders?: () => Promise<Record<string, string>> | Record<string, string>;
|
|
63
|
+
userId?: string | number;
|
|
64
|
+
showHomeAway: boolean;
|
|
65
|
+
disableQuickPick: boolean;
|
|
66
|
+
renderTeamLogo?: RenderTeamLogo;
|
|
67
|
+
filterSport?: string;
|
|
68
|
+
initialSport?: string;
|
|
69
|
+
initialEventId?: string;
|
|
70
|
+
initialEventLabel?: string;
|
|
71
|
+
sportBaseKey?: string;
|
|
72
|
+
gameCategory?: 'sports' | 'casino' | 'racing';
|
|
73
|
+
screenSize: ScreenSize;
|
|
74
|
+
eventFilterActive: boolean;
|
|
75
|
+
eventFilterLabel?: string;
|
|
76
|
+
clearEventFilter: () => void;
|
|
77
|
+
displaySportName: (sport: string) => string;
|
|
78
|
+
displayCategoryName: (category: string) => string;
|
|
79
|
+
maxPayouts: Record<number, TopPayoutsResponse>;
|
|
80
|
+
howToPlayMarkdown: string | null;
|
|
81
|
+
onEntryPlaced?: (entry: GameEntry) => void;
|
|
82
|
+
onCancel?: () => void;
|
|
83
|
+
onShare?: (data: ShareData) => void;
|
|
84
|
+
onRecharge?: () => void;
|
|
85
|
+
demoEntries?: GameEntry[];
|
|
86
|
+
demoGames?: Game[];
|
|
87
|
+
demoPropositions?: Proposition[];
|
|
88
|
+
}
|
|
89
|
+
declare const PlaceEntryContext: React.Context<PlaceEntryContextValue | null>;
|
|
90
|
+
export { PlaceEntryContext };
|
|
91
|
+
export declare function usePlaceEntry(): PlaceEntryContextValue;
|
|
92
|
+
export interface PlaceEntryProviderProps {
|
|
93
|
+
apiUrl: string;
|
|
94
|
+
apiKey?: string;
|
|
95
|
+
fetchImpl?: typeof fetch;
|
|
96
|
+
getAuthHeaders?: () => Promise<Record<string, string>> | Record<string, string>;
|
|
97
|
+
userId?: string | number;
|
|
98
|
+
getUserBalance?: () => Promise<number> | number;
|
|
99
|
+
children: React.ReactNode;
|
|
100
|
+
theme?: BladeTheme | BladeThemeSet;
|
|
101
|
+
colorScheme?: ColorScheme;
|
|
102
|
+
demoGames?: Game[];
|
|
103
|
+
demoPropositions?: Proposition[];
|
|
104
|
+
demoEntries?: GameEntry[];
|
|
105
|
+
/** Demo dividend/max-payout data (the /max-payout fetch is skipped for demo data). */
|
|
106
|
+
demoMaxPayouts?: Record<number, TopPayoutsResponse>;
|
|
107
|
+
gameCategory?: 'sports' | 'casino' | 'racing';
|
|
108
|
+
jurisdiction?: string;
|
|
109
|
+
initialGameId?: number;
|
|
110
|
+
filterSport?: string;
|
|
111
|
+
initialSport?: string;
|
|
112
|
+
initialEventId?: string;
|
|
113
|
+
initialEventLabel?: string;
|
|
114
|
+
sportBaseKey?: string;
|
|
115
|
+
showHomeAway?: boolean;
|
|
116
|
+
disableQuickPick?: boolean;
|
|
117
|
+
renderTeamLogo?: RenderTeamLogo;
|
|
118
|
+
onEntryPlaced?: (entry: GameEntry) => void;
|
|
119
|
+
onBeforeSubmit?: (betAmount: number) => void | Promise<void>;
|
|
120
|
+
onCancel?: () => void;
|
|
121
|
+
onShare?: (data: ShareData) => void;
|
|
122
|
+
onRecharge?: () => void;
|
|
123
|
+
onClearEventFilter?: () => void;
|
|
124
|
+
screenSize?: ScreenSize;
|
|
125
|
+
howToPlayMarkdown?: string | null;
|
|
126
|
+
sportDisplayNames?: SportDisplayNameOverrides;
|
|
127
|
+
categoryDisplayNames?: CategoryDisplayNameOverrides;
|
|
128
|
+
}
|
|
129
|
+
export declare function PlaceEntryProvider({ apiUrl, apiKey, fetchImpl, getAuthHeaders, userId, getUserBalance, children, theme: themeProp, colorScheme, demoGames, demoPropositions, demoEntries, demoMaxPayouts, gameCategory, jurisdiction, initialGameId, filterSport, initialSport, initialEventId, initialEventLabel, sportBaseKey, showHomeAway, disableQuickPick, renderTeamLogo, onEntryPlaced, onBeforeSubmit, onCancel, onShare, onRecharge, onClearEventFilter, screenSize, howToPlayMarkdown: howToPlayMarkdownProp, sportDisplayNames, categoryDisplayNames, }: PlaceEntryProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface PressToPlayTileProps {
|
|
2
|
+
iconUrl: string;
|
|
3
|
+
gameName: string;
|
|
4
|
+
onPress?: () => void;
|
|
5
|
+
size?: number;
|
|
6
|
+
brandColor?: string;
|
|
7
|
+
cardColor?: string;
|
|
8
|
+
iconColor?: string;
|
|
9
|
+
accentColor?: string;
|
|
10
|
+
captionColor?: string;
|
|
11
|
+
accessibilityLabel?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function PressToPlayTile({ iconUrl, gameName, onPress, size, brandColor, cardColor, iconColor, accentColor, captionColor, accessibilityLabel, }: PressToPlayTileProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BladeTheme } from '../types';
|
|
2
|
+
export interface QuickPickButtonProps {
|
|
3
|
+
onPress: () => void;
|
|
4
|
+
onDoubleClick?: () => void;
|
|
5
|
+
label?: string;
|
|
6
|
+
size?: 'md' | 'sm';
|
|
7
|
+
yesColor?: string;
|
|
8
|
+
noColor?: string;
|
|
9
|
+
theme?: BladeTheme;
|
|
10
|
+
}
|
|
11
|
+
export declare function QuickPickButton({ onPress, onDoubleClick, label, size, yesColor, noColor, theme: themeProp, }: QuickPickButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface QuickPickMenuColors {
|
|
2
|
+
background: string;
|
|
3
|
+
backgroundAlt: string;
|
|
4
|
+
border: string;
|
|
5
|
+
text: string;
|
|
6
|
+
}
|
|
7
|
+
export interface QuickPickMenuProps {
|
|
8
|
+
counts: number[];
|
|
9
|
+
onPick: (count: number) => void;
|
|
10
|
+
onDoubleAction?: () => void;
|
|
11
|
+
colors: QuickPickMenuColors;
|
|
12
|
+
align?: 'left' | 'right';
|
|
13
|
+
direction?: 'down' | 'up';
|
|
14
|
+
/** Themed elevation for the dropdown (pass `elevatedShadow(theme)`). */
|
|
15
|
+
menuShadow?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function QuickPickMenu({ counts, onPick, onDoubleAction, colors, align, direction, menuShadow }: QuickPickMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { RuleSetupConfig, RuleSetupOption } from '../../shared/rule-setup';
|
|
3
|
+
export interface RuleSetupPageProps {
|
|
4
|
+
onContinue?: () => void;
|
|
5
|
+
onBack?: () => void;
|
|
6
|
+
/** Hide the built-in title section (use `<RuleSetupPageTitle />` separately). The game lockup always renders in the page body. */
|
|
7
|
+
hideTitle?: boolean;
|
|
8
|
+
hideActions?: boolean;
|
|
9
|
+
config?: RuleSetupConfig | null;
|
|
10
|
+
renderDividends?: (option: RuleSetupOption) => React.ReactNode;
|
|
11
|
+
/** Label for the back link (where "back" leads). @default 'Games' */
|
|
12
|
+
backLabel?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function RuleSetupPageTitle({ onBack, hideActions, }?: {
|
|
15
|
+
onBack?: () => void;
|
|
16
|
+
hideActions?: boolean;
|
|
17
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function RuleSetupPageActions({ onContinue, canContinue, continueLabel, }: {
|
|
19
|
+
onContinue?: () => void;
|
|
20
|
+
canContinue?: boolean;
|
|
21
|
+
continueLabel?: string;
|
|
22
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
23
|
+
export declare function RuleSetupPage({ onContinue, onBack, hideTitle, config: configOverride, renderDividends, backLabel, }: RuleSetupPageProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { SelectionReviewProps } from '../types';
|
|
2
|
+
export declare function SelectionReview({ propositions, selections, onToggleSelection, onNext, onBack, theme: themeProp, colorScheme, hideActions, renderTeamLogo, showHomeAway, allowAnswerToggle, gameName, potentialPayout, defaultExpanded, addMorePicks, }: SelectionReviewProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface SelectionsPageProps {
|
|
2
|
+
/** Called when the user presses Continue (e.g. navigate to confirm screen) */
|
|
3
|
+
onNext?: () => void;
|
|
4
|
+
/** Called when the user presses Back (e.g. navigate to game screen) */
|
|
5
|
+
onBack?: () => void;
|
|
6
|
+
/** Hide the built-in title section (use `<SelectionsPageTitle />` separately) */
|
|
7
|
+
hideTitle?: boolean;
|
|
8
|
+
/** Hide the built-in action buttons (use `<SelectionsPageActions />` separately) */
|
|
9
|
+
hideActions?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function SelectionsPageTitle({ onBack, onNext, hideActions }?: {
|
|
12
|
+
onBack?: () => void;
|
|
13
|
+
onNext?: () => void;
|
|
14
|
+
hideActions?: boolean;
|
|
15
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
/** Renders selection progress indicator. Must be inside `<PlaceEntryProvider>`. */
|
|
17
|
+
export declare function SelectionsPageActions({ onNext, onBack, hideButtons, }: {
|
|
18
|
+
onNext?: () => void;
|
|
19
|
+
onBack?: () => void;
|
|
20
|
+
hideButtons?: boolean;
|
|
21
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function SelectionsPage({ onNext, onBack, hideTitle, hideActions }: SelectionsPageProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface SportPickerPageProps {
|
|
3
|
+
onSelectSport?: (sport: string) => void;
|
|
4
|
+
onCancel?: () => void;
|
|
5
|
+
hideTitle?: boolean;
|
|
6
|
+
hideActions?: boolean;
|
|
7
|
+
renderSportLogo?: (sportKey: string) => React.ReactNode;
|
|
8
|
+
renderSportTagline?: (sport: string, count: number) => string;
|
|
9
|
+
/** Label for the back link (where "back" leads). @default 'Category' */
|
|
10
|
+
backLabel?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function SportPickerPageTitle({ onBack, hideActions, backLabel, }?: {
|
|
13
|
+
onBack?: () => void;
|
|
14
|
+
hideActions?: boolean;
|
|
15
|
+
backLabel?: string;
|
|
16
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function SportPickerPageActions({ onCancel, }: {
|
|
18
|
+
onCancel?: () => void;
|
|
19
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
20
|
+
export declare function SportPickerPage({ onSelectSport, onCancel, hideTitle, hideActions, renderSportLogo, renderSportTagline, backLabel, }: SportPickerPageProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { SportSelectorProps } from '../../shared/types';
|
|
2
|
+
export declare function SportSelector({ game, propositions, selections, onToggleSelection, onNext, onBack, loading, error, theme: themeProp, colorScheme, hideActions, initialSport, renderTeamLogo, disableQuickPick, selectedPropositionCount, onPropositionCountChange, showHomeAway, gameCategory, }: SportSelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ShareData } from '../types';
|
|
2
|
+
export interface SuccessPageProps {
|
|
3
|
+
/** Called when "Place Another" is pressed */
|
|
4
|
+
onPlayAgain?: () => void;
|
|
5
|
+
/** Called when "Done" is pressed */
|
|
6
|
+
onDone?: () => void;
|
|
7
|
+
onBack?: () => void;
|
|
8
|
+
onShare?: (data: ShareData) => void;
|
|
9
|
+
/** Hide the built-in title section (use `<SuccessPageTitle />` separately) */
|
|
10
|
+
hideTitle?: boolean;
|
|
11
|
+
/** Hide the built-in action buttons (use `<SuccessPageActions />` separately) */
|
|
12
|
+
hideActions?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare function SuccessPageTitle({ onBack, hideActions, }?: {
|
|
15
|
+
onBack?: () => void;
|
|
16
|
+
hideActions?: boolean;
|
|
17
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
/** Renders Place Another + Share + Done buttons. Must be inside `<PlaceEntryProvider>`. */
|
|
19
|
+
export declare function SuccessPageActions({ onPlayAgain, onDone, onShare, }: {
|
|
20
|
+
onPlayAgain?: () => void;
|
|
21
|
+
onDone?: () => void;
|
|
22
|
+
onShare?: (data: ShareData) => void;
|
|
23
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function SuccessPage({ onPlayAgain, onDone, onBack, onShare, hideTitle, hideActions }: SuccessPageProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ViewStyle, TextStyle, StyleProp, Animated } from 'react-native';
|
|
3
|
+
import { BladeTheme } from '../../../shared/themes';
|
|
4
|
+
export declare function useBreakpoint(minWidth?: number): boolean;
|
|
5
|
+
export type SurfaceLevel = 'flat' | 'raised' | 'elevated';
|
|
6
|
+
export interface SurfaceProps {
|
|
7
|
+
theme: BladeTheme;
|
|
8
|
+
level?: SurfaceLevel;
|
|
9
|
+
padding?: 'none' | 'sm' | 'md' | 'lg';
|
|
10
|
+
radius?: 'sm' | 'md' | 'lg' | 'pill' | 'none';
|
|
11
|
+
style?: StyleProp<ViewStyle>;
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare function Surface({ theme, level, padding, radius, style, children, }: SurfaceProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export interface StackProps {
|
|
16
|
+
gap?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | number;
|
|
17
|
+
align?: ViewStyle['alignItems'];
|
|
18
|
+
justify?: ViewStyle['justifyContent'];
|
|
19
|
+
style?: StyleProp<ViewStyle>;
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
}
|
|
22
|
+
export declare function Stack({ gap, align, justify, style, children }: StackProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare function Row({ gap, align, justify, wrap, style, children, }: StackProps & {
|
|
24
|
+
wrap?: boolean;
|
|
25
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export type PressableVariant = 'primary' | 'secondary' | 'ghost' | 'danger';
|
|
27
|
+
export interface PressableProps {
|
|
28
|
+
theme: BladeTheme;
|
|
29
|
+
variant?: PressableVariant;
|
|
30
|
+
size?: 'sm' | 'md' | 'lg';
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
block?: boolean;
|
|
33
|
+
radius?: 'sm' | 'md' | 'lg' | 'pill';
|
|
34
|
+
onPress?: () => void;
|
|
35
|
+
onLongPress?: () => void;
|
|
36
|
+
style?: StyleProp<ViewStyle>;
|
|
37
|
+
children?: ReactNode;
|
|
38
|
+
accessibilityLabel?: string;
|
|
39
|
+
}
|
|
40
|
+
export declare function Pressable({ theme, variant, size, disabled, block, radius, onPress, onLongPress, style, children, accessibilityLabel, }: PressableProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export interface TextProps {
|
|
42
|
+
theme: BladeTheme;
|
|
43
|
+
variant?: 'display' | 'heading' | 'subheading' | 'body' | 'caption' | 'eyebrow';
|
|
44
|
+
numeric?: boolean;
|
|
45
|
+
tone?: 'default' | 'muted' | 'primary' | 'success' | 'error' | 'warning';
|
|
46
|
+
weight?: '400' | '500' | '600' | '700';
|
|
47
|
+
align?: TextStyle['textAlign'];
|
|
48
|
+
style?: StyleProp<TextStyle>;
|
|
49
|
+
children?: ReactNode;
|
|
50
|
+
}
|
|
51
|
+
export declare function Text({ theme, variant, numeric, tone, weight, align, style, children, }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
export declare function Divider({ theme, orientation, style, }: {
|
|
53
|
+
theme: BladeTheme;
|
|
54
|
+
orientation?: 'horizontal' | 'vertical';
|
|
55
|
+
style?: StyleProp<ViewStyle>;
|
|
56
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
export type YesNoValue = 'yes' | 'no';
|
|
58
|
+
export type YesNoAnswer = YesNoValue | null | undefined;
|
|
59
|
+
export type YesNoSize = 'xs' | 'sm' | 'md';
|
|
60
|
+
export interface YesNoButtonsProps {
|
|
61
|
+
theme: BladeTheme;
|
|
62
|
+
/** Currently selected side, if any. */
|
|
63
|
+
value?: YesNoAnswer;
|
|
64
|
+
onYes?: () => void;
|
|
65
|
+
onNo?: () => void;
|
|
66
|
+
size?: YesNoSize;
|
|
67
|
+
disabled?: boolean;
|
|
68
|
+
yesLabel?: string;
|
|
69
|
+
noLabel?: string;
|
|
70
|
+
style?: StyleProp<ViewStyle>;
|
|
71
|
+
}
|
|
72
|
+
/** The interactive Yes/No pair. Identical everywhere it is used. */
|
|
73
|
+
export declare function YesNoButtons({ theme, value, onYes, onNo, size, disabled, yesLabel, noLabel, style, }: YesNoButtonsProps): import("react/jsx-runtime").JSX.Element;
|
|
74
|
+
/** Read-only Yes/No chip — the settled answer, same product tokens. */
|
|
75
|
+
export declare function YesNoTag({ theme, value, size, style, }: {
|
|
76
|
+
theme: BladeTheme;
|
|
77
|
+
value: YesNoValue;
|
|
78
|
+
size?: 'sm' | 'md';
|
|
79
|
+
style?: StyleProp<ViewStyle>;
|
|
80
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
81
|
+
/** Fade + rise on mount. `delay` (ms) staggers siblings like the web `animationDelay`. */
|
|
82
|
+
export declare function useMountEntrance(delay?: number): {
|
|
83
|
+
opacity: Animated.Value;
|
|
84
|
+
transform: {
|
|
85
|
+
translateY: Animated.AnimatedInterpolation<number>;
|
|
86
|
+
}[];
|
|
87
|
+
};
|
|
88
|
+
/** Convenience wrapper: an `Animated.View` that plays the mount entrance. */
|
|
89
|
+
export declare function Entrance({ delay, style, children, }: {
|
|
90
|
+
delay?: number;
|
|
91
|
+
style?: StyleProp<ViewStyle>;
|
|
92
|
+
children?: ReactNode;
|
|
93
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useGames, usePropositions, useSports, useGameEntries, useCreateGameEntry, useGameMaxPayouts, usePlaceEntryFlow, useEvaluateRule, useCalculatePayout, useEntryPreview, useCompositeComponentLookup, } from '../../shared/hooks';
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export { HowToPlayButton } from './components/HowToPlayButton';
|
|
2
|
+
export type { HowToPlayButtonProps } from './components/HowToPlayButton';
|
|
3
|
+
export { GameSelector } from './components/GameSelector';
|
|
4
|
+
export { SelectionReview } from './components/SelectionReview';
|
|
5
|
+
export { EntrySubmission } from './components/EntrySubmission';
|
|
6
|
+
export { PayoutCircles } from './components/PayoutCircles';
|
|
7
|
+
export { GameEntries } from './components/GameEntries';
|
|
8
|
+
export { QuickPickButton } from './components/QuickPickButton';
|
|
9
|
+
export type { QuickPickButtonProps } from './components/QuickPickButton';
|
|
10
|
+
export { PlaceEntryProvider, usePlaceEntry } from './components/PlaceEntryProvider';
|
|
11
|
+
export type { PlaceEntryProviderProps, PlaceEntryContextValue } from './components/PlaceEntryProvider';
|
|
12
|
+
export { GamePage, GamePageTitle, GamePageActions } from './components/GamePage';
|
|
13
|
+
export type { GamePageProps } from './components/GamePage';
|
|
14
|
+
export { EventFilterBanner } from './components/EventFilterBanner';
|
|
15
|
+
export type { EventFilterBannerProps } from './components/EventFilterBanner';
|
|
16
|
+
export { SelectionsPage, SelectionsPageTitle, SelectionsPageActions } from './components/SelectionsPage';
|
|
17
|
+
export type { SelectionsPageProps } from './components/SelectionsPage';
|
|
18
|
+
export { ConfirmPage, ConfirmPageTitle, ConfirmPageActions } from './components/ConfirmPage';
|
|
19
|
+
export type { ConfirmPageProps } from './components/ConfirmPage';
|
|
20
|
+
export { SuccessPage, SuccessPageTitle, SuccessPageActions } from './components/SuccessPage';
|
|
21
|
+
export type { SuccessPageProps } from './components/SuccessPage';
|
|
22
|
+
export { EntriesPage, EntriesPageTitle } from './components/EntriesPage';
|
|
23
|
+
export type { EntriesPageProps } from './components/EntriesPage';
|
|
24
|
+
export { SportPickerPage, SportPickerPageTitle, SportPickerPageActions } from './components/SportPickerPage';
|
|
25
|
+
export type { SportPickerPageProps } from './components/SportPickerPage';
|
|
26
|
+
export { CategoryPickerPage, CategoryPickerPageTitle, CategoryPickerPageActions } from './components/CategoryPickerPage';
|
|
27
|
+
export type { CategoryPickerPageProps } from './components/CategoryPickerPage';
|
|
28
|
+
export { RuleSetupPage, RuleSetupPageTitle, RuleSetupPageActions } from './components/RuleSetupPage';
|
|
29
|
+
export type { RuleSetupPageProps } from './components/RuleSetupPage';
|
|
30
|
+
export { getRuleSetupConfig, gameNeedsRuleSetup, roundDividendAmount, } from '../shared/rule-setup';
|
|
31
|
+
export type { RuleSetupConfig, RuleSetupMode, RuleSetupOption, } from '../shared/rule-setup';
|
|
32
|
+
export { EventPickerPage } from './components/EventPickerPage';
|
|
33
|
+
export type { EventPickerPageProps } from './components/EventPickerPage';
|
|
34
|
+
export { GameSetBetPage, GameSetBetPageTitle } from './components/GameSetBetPage';
|
|
35
|
+
export type { GameSetBetPageProps } from './components/GameSetBetPage';
|
|
36
|
+
export { getGameSetBetConfig, gameSetPrize, isGameSetBetGame, } from '../shared/game-set-bet';
|
|
37
|
+
export type { GameSetBetConfig, GameSetBetPrize, } from '../shared/game-set-bet';
|
|
38
|
+
export { PickYourDividendPage, PickYourDividendPageTitle } from './components/PickYourDividendPage';
|
|
39
|
+
export type { PickYourDividendPageProps } from './components/PickYourDividendPage';
|
|
40
|
+
export { getPickYourDividendConfig, isPickYourDividendGame, pydLadder, pydRung, PYD_RETAIL_DIVIDENDS, PYD_LEG_RUNGS, } from '../shared/pick-your-dividend';
|
|
41
|
+
export type { PickYourDividendConfig, PydDividendGame, PydRung, } from '../shared/pick-your-dividend';
|
|
42
|
+
export { LadderPage, LadderPageTitle } from './components/LadderPage';
|
|
43
|
+
export type { LadderPageProps } from './components/LadderPage';
|
|
44
|
+
export { getLadderConfig, isLadderGame, ladderTiers, ladderCollectAt, fullStackPrize, LADDER_FAMILY, LADDER_STAKES, LADDER_REFERENCE_BET, } from '../shared/ladder';
|
|
45
|
+
export type { LadderConfig, LadderDef, LadderTier, } from '../shared/ladder';
|
|
46
|
+
export { MirrorPage, MirrorPageTitle } from './components/MirrorPage';
|
|
47
|
+
export type { MirrorPageProps } from './components/MirrorPage';
|
|
48
|
+
export { getMirrorConfig, mirrorPrize, isMirrorGame, MIRROR_STANDARD_MARGIN, } from '../shared/mirror';
|
|
49
|
+
export type { MirrorConfig, MirrorPrize, } from '../shared/mirror';
|
|
50
|
+
export { getGameFlow, getConfirmBoostCopy, isFixedCardExactGame, isOpenExactMultiGame } from '../shared/game-flow';
|
|
51
|
+
export { GAME_TIER_LEVEL, GAME_TIER_TABS, resolveGameTierLevel, filterGamesByTierLevel, availableGameTierTabs, defaultGameTierId, } from '../shared/game-tiers';
|
|
52
|
+
export type { GameTierId } from '../shared/game-tiers';
|
|
53
|
+
export type { GameFlow, ConfirmBoostCopy } from '../shared/game-flow';
|
|
54
|
+
export { filterPropositionsToEvent, formatSameGameMultiEventLabel, getPropositionEventId, groupSameGameMultiEvents, isSameGameMultiGame, isSelectableSameGameMultiProposition, propositionsBelongToEvent, } from '../shared/same-game-multi';
|
|
55
|
+
export type { SameGameMultiEvent } from '../shared/same-game-multi';
|
|
56
|
+
export { GameSetupPage } from './components/GameSetupPage';
|
|
57
|
+
export type { GameSetupPageProps } from './components/GameSetupPage';
|
|
58
|
+
export { PerfectPickPage, PerfectPickPageTitle } from './components/PerfectPickPage';
|
|
59
|
+
export type { PerfectPickPageProps } from './components/PerfectPickPage';
|
|
60
|
+
export { BrandLockup } from './components/BrandLockup';
|
|
61
|
+
export type { BrandLockupProps } from './components/BrandLockup';
|
|
62
|
+
export { GameLogo } from './components/GameLogo';
|
|
63
|
+
export type { GameLogoProps } from './components/GameLogo';
|
|
64
|
+
export { YesNoCategoryLabel, CategoryIcon, ChevronRightIcon } from './components/PickerBrand';
|
|
65
|
+
export type { Game, SportSummary, Proposition, GameEntry, RuleExpressionObject, PlaceEntryFlowProps, GameSelectorProps, EntrySubmissionProps, SelectionReviewProps, GameEntriesProps, ResolvedEntryData, ShareData, ScreenSize, EvaluateRuleRequest, EvaluateRuleResponse, CalculatePayoutRequest, CalculatePayoutResponse, EntryPreviewRequest, EntryPreviewResponse, } from './types';
|
|
66
|
+
export { BladeApiClient } from './utils/api-client';
|
|
67
|
+
export type { BladeApiClientConfig } from './utils/api-client';
|
|
68
|
+
export { formatCurrency, formatDate, groupPropositionsBySport, isValidSelectionCount, getSportDisplayName, resolveSportDisplayName, resolveCategoryDisplayName, resolvePrice, getJackpotInfo, contrastTextColour, } from './utils';
|
|
69
|
+
export type { SportDisplayNameOverrides, CategoryDisplayNameOverrides } from './utils';
|
|
70
|
+
export { getTheme, getThemeSet, useResolvedTheme, resolveTheme, isThemeSet, themes, themeSets, defaultTheme, greenTheme, greenLightTheme, darkTheme, goldTheme, goldLightTheme, defaultThemeSet, greenThemeSet, goldThemeSet, themeHeading, themeLabel, themeValue, themeAccent, themeTextAlt, themeTextAltMuted, themeBodyFont, themeHeadingFont, } from './utils/themes';
|
|
71
|
+
export type { BladeTheme, BladeThemeSet, ColorScheme } from './utils/themes';
|
|
72
|
+
export { useGames, usePropositions, useSports, useGameEntries, useCreateGameEntry, useGameMaxPayouts, usePlaceEntryFlow, useEvaluateRule, useCalculatePayout, useEntryPreview, } from './hooks';
|