@simple-parlay/components 1.30.5 → 1.30.6-pre.10
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 +451 -374
- 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 +13 -0
- package/dist/react/components/DenseGameCatalogue.d.ts +2 -0
- package/dist/react/components/DenseUi.d.ts +30 -0
- package/dist/react/components/EntriesPage.d.ts +0 -4
- package/dist/react/components/EntrySubmission.d.ts +1 -1
- package/dist/react/components/EventSwipeModal.d.ts +19 -0
- package/dist/react/components/GameModeCard.d.ts +41 -6
- package/dist/react/components/GamePage.d.ts +3 -1
- package/dist/react/components/GameSelector.d.ts +9 -1
- package/dist/react/components/GameSetupPage.d.ts +6 -2
- package/dist/react/components/GameShelfCatalogue.d.ts +2 -0
- package/dist/react/components/GameShowcaseCatalogue.d.ts +9 -0
- package/dist/react/components/GameVariantCatalogue.d.ts +6 -0
- package/dist/react/components/HowToPlayButton.d.ts +3 -1
- package/dist/react/components/MatchRail.d.ts +30 -0
- package/dist/react/components/MultiLegTable.d.ts +3 -1
- package/dist/react/components/PageBackButton.d.ts +8 -0
- package/dist/react/components/PickerBrand.d.ts +7 -0
- package/dist/react/components/PlaceEntryProvider.d.ts +62 -5
- package/dist/react/components/PlaybookChooser.d.ts +7 -0
- package/dist/react/components/PropositionFilters.d.ts +3 -1
- package/dist/react/components/QuickPickButton.d.ts +3 -1
- package/dist/react/components/ScrollShelf.d.ts +25 -0
- package/dist/react/components/SelectionReview.d.ts +1 -1
- package/dist/react/components/SelectionVariantList.d.ts +20 -0
- package/dist/react/components/SelectionsPage.d.ts +1 -1
- package/dist/react/components/SportRail.d.ts +26 -0
- package/dist/react/components/SportSelector.d.ts +32 -2
- package/dist/react/components/_primitives/index.d.ts +9 -1
- package/dist/react/index.cjs +1 -0
- package/dist/react/index.d.ts +49 -16
- package/dist/react/index.mjs +451 -374
- package/dist/react/utils/dom.d.ts +7 -0
- package/dist/react/utils/index.d.ts +1 -1
- 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 +33 -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 +59 -0
- package/dist/react-native/components/EntrySubmission.d.ts +1 -1
- package/dist/react-native/components/EventSwipeModal.d.ts +17 -0
- package/dist/react-native/components/GameModeCard.d.ts +41 -6
- package/dist/react-native/components/GamePage.d.ts +4 -1
- package/dist/react-native/components/GameSelector.d.ts +9 -1
- package/dist/react-native/components/GameSetupPage.d.ts +5 -14
- 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/LoadingIndicators.d.ts +1 -1
- package/dist/react-native/components/MatchRail.d.ts +36 -0
- package/dist/react-native/components/MultiLegTable.d.ts +3 -1
- package/dist/react-native/components/PageBackButton.d.ts +7 -0
- package/dist/react-native/components/PickerBrand.d.ts +6 -0
- package/dist/react-native/components/PlaceEntryProvider.d.ts +57 -5
- package/dist/react-native/components/PlaybookChooser.d.ts +7 -0
- package/dist/react-native/components/PropositionFilters.d.ts +3 -1
- package/dist/react-native/components/QuickPickButton.d.ts +3 -1
- package/dist/react-native/components/ScrollShelf.d.ts +23 -0
- package/dist/react-native/components/SelectionReview.d.ts +1 -1
- package/dist/react-native/components/SelectionVariantList.d.ts +20 -0
- package/dist/react-native/components/SelectionsPage.d.ts +1 -1
- package/dist/react-native/components/SportRail.d.ts +27 -0
- package/dist/react-native/components/SportSelector.d.ts +29 -2
- package/dist/react-native/components/_primitives/index.d.ts +12 -2
- package/dist/react-native/index.cjs +1 -0
- package/dist/react-native/index.d.ts +49 -16
- package/dist/react-native/index.mjs +438 -382
- package/dist/react-native/utils/index.d.ts +1 -1
- package/dist/shared/api-client.d.ts +4 -3
- package/dist/shared/call-presentation.d.ts +20 -0
- package/dist/shared/composite.d.ts +7 -0
- package/dist/shared/correlation-steering.d.ts +49 -0
- package/dist/shared/date-filters.d.ts +5 -4
- package/dist/shared/dense-ui.d.ts +54 -0
- package/dist/shared/favourite-sport.d.ts +2 -0
- package/dist/shared/game-artwork.d.ts +61 -0
- package/dist/shared/game-flow.d.ts +18 -1
- package/dist/shared/game-icons.d.ts +6 -3
- package/dist/shared/game-library.d.ts +58 -0
- package/dist/shared/game-set-bet.d.ts +0 -1
- package/dist/shared/game-shelf-artwork.d.ts +3 -0
- package/dist/shared/game-shelf-presentation.d.ts +43 -0
- package/dist/shared/game-variants.d.ts +5 -0
- package/dist/shared/hooks.d.ts +9 -8
- 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/menu-placement.d.ts +26 -0
- package/dist/shared/mirror.d.ts +88 -5
- package/dist/shared/pick-your-dividend.d.ts +2 -1
- package/dist/shared/picker-brand.d.ts +22 -0
- package/dist/shared/playbook.d.ts +29 -0
- package/dist/shared/selection-actions.d.ts +61 -0
- package/dist/shared/selection-caps.d.ts +68 -0
- package/dist/shared/selection-variants.d.ts +52 -0
- package/dist/shared/six-again.d.ts +105 -0
- package/dist/shared/swipe-deck.d.ts +1 -1
- package/dist/shared/themes.d.ts +22 -0
- package/dist/shared/types.d.ts +83 -3
- package/dist/shared/ui-system.d.ts +69 -0
- package/dist/shared/ui-variant.d.ts +16 -0
- package/dist/shared/use-call-payouts.d.ts +8 -0
- package/dist/shared/utils.d.ts +18 -6
- 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/PerfectPickPage.d.ts +0 -22
- package/dist/react/components/PickYourDividendPage.d.ts +0 -21
- package/dist/react/components/RuleSetupPage.d.ts +0 -27
- package/dist/react/components/SafetyNetPage.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/PerfectPickPage.d.ts +0 -20
- package/dist/react-native/components/PickYourDividendPage.d.ts +0 -19
- package/dist/react-native/components/RuleSetupPage.d.ts +0 -23
- package/dist/react-native/components/SafetyNetPage.d.ts +0 -14
- package/dist/react-native/index.js +0 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ViewStyle, StyleProp } from 'react-native';
|
|
3
|
+
import { BladeTheme } from '../types';
|
|
4
|
+
export interface ScrollShelfProps {
|
|
5
|
+
theme: BladeTheme;
|
|
6
|
+
/** Padding/gap for the row's content — cards need more room than chips. */
|
|
7
|
+
contentContainerStyle?: StyleProp<ViewStyle>;
|
|
8
|
+
/** Drop the arrow discs — they overhang, which a pill-shaped shelf clips. */
|
|
9
|
+
hideArrows?: boolean;
|
|
10
|
+
/** Row width vs. its content, so a caller can shorten labels that don't fit. */
|
|
11
|
+
onMetrics?: (metrics: {
|
|
12
|
+
viewport: number;
|
|
13
|
+
content: number;
|
|
14
|
+
}) => void;
|
|
15
|
+
style?: StyleProp<ViewStyle>;
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The horizontal shelf every picker row sits in: edge arrow discs once there is
|
|
20
|
+
* more in that direction. Shared so the filter chips and the sport rail scroll
|
|
21
|
+
* identically.
|
|
22
|
+
*/
|
|
23
|
+
export declare function ScrollShelf({ theme, contentContainerStyle, hideArrows, onMetrics, style, children, }: ScrollShelfProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { SelectionReviewProps } from '../types';
|
|
2
|
-
export declare function SelectionReview({ propositions, selections, onToggleSelection, onNext, onBack, theme: themeProp, colorScheme, hideActions, renderTeamLogo, allowAnswerToggle, gameName, potentialPayout, defaultExpanded, addMorePicks, }: SelectionReviewProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function SelectionReview({ propositions, selections, onToggleSelection, onNext, onBack, theme: themeProp, colorScheme, hideActions, renderTeamLogo, allowAnswerToggle, gameName, potentialPayout, defaultExpanded, componentById, addMorePicks, }: SelectionReviewProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Proposition } from '../types';
|
|
2
|
+
import { BladeTheme } from '../../shared/themes';
|
|
3
|
+
import { SelectionVariant } from '../../shared/selection-variants';
|
|
4
|
+
import { RenderTeamLogo } from '../../shared/types';
|
|
5
|
+
export interface SelectionVariantListProps {
|
|
6
|
+
variant: SelectionVariant;
|
|
7
|
+
/** Already filtered and grouped by `groupPropositionsForDisplay`. */
|
|
8
|
+
groups: Record<string, Proposition[]>;
|
|
9
|
+
racing: boolean;
|
|
10
|
+
selections: Record<number, 'yes' | 'no'>;
|
|
11
|
+
onToggleSelection: (id: number, answer: 'yes' | 'no') => void;
|
|
12
|
+
/** True once the game's leg cap is full — unanswered props go quiet. */
|
|
13
|
+
atMax: boolean;
|
|
14
|
+
theme: BladeTheme;
|
|
15
|
+
renderTeamLogo?: RenderTeamLogo;
|
|
16
|
+
componentById?: ReadonlyMap<number, Proposition>;
|
|
17
|
+
/** Drop the per-fixture swipe deck, leaving the rows as the only way to answer. */
|
|
18
|
+
disableEventSwipe?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare function SelectionVariantList({ variant, groups, racing, selections, onToggleSelection, atMax, theme, renderTeamLogo, componentById, disableEventSwipe, }: SelectionVariantListProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -19,7 +19,7 @@ export declare function SelectionsPageTitle({ onBack, onNext, hideActions }?: {
|
|
|
19
19
|
onNext?: () => void;
|
|
20
20
|
hideActions?: boolean;
|
|
21
21
|
}): import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
/** Renders
|
|
22
|
+
/** Renders the live bet slip. Must be inside `<PlaceEntryProvider>`. */
|
|
23
23
|
export declare function SelectionsPageActions({ onNext, onBack, hideButtons, }: {
|
|
24
24
|
onNext?: () => void;
|
|
25
25
|
onBack?: () => void;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
export interface SportRailProps {
|
|
4
|
+
/** Heading above the rail. Pass `null` to drop it. @default 'Pick your sport' */
|
|
5
|
+
label?: string | null;
|
|
6
|
+
/** Line under the heading. Pass `null` to drop it; omit for the default hint. */
|
|
7
|
+
sublabel?: string | null;
|
|
8
|
+
/** Controls parked on the heading's right — the track keeps the full width. */
|
|
9
|
+
actions?: React.ReactNode;
|
|
10
|
+
style?: StyleProp<ViewStyle>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The sport step. It sits on a game's setup page, and — for the games that have
|
|
14
|
+
* no setup page — above the proposition list, so there is always one place to
|
|
15
|
+
* change it. Never on the game grid.
|
|
16
|
+
*
|
|
17
|
+
* One oval track: every sport rides it as its short code, and the selected one
|
|
18
|
+
* opens out to its full name on a filled thumb. Codes keep the track compact,
|
|
19
|
+
* the selection says what it is in plain English.
|
|
20
|
+
*
|
|
21
|
+
* A bet is one sport: once the slip has picks the track locks, and the only way
|
|
22
|
+
* across is to clear the bet — silently wiping the card on a mis-tap was worse.
|
|
23
|
+
*
|
|
24
|
+
* Renders nothing at all when the sport is not a choice, which is every
|
|
25
|
+
* single-sport game.
|
|
26
|
+
*/
|
|
27
|
+
export declare function SportRail({ label, sublabel, actions, style }: SportRailProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { Proposition, SportSelectorProps } from '../../shared/types';
|
|
2
|
+
import { Proposition, RenderTeamLogo, SportSelectorProps } from '../../shared/types';
|
|
3
3
|
/** A header key names two teams when it splits on " vs " — `MatchupTeams`' own test. */
|
|
4
4
|
export declare function isMatchupKey(key?: string | null): boolean;
|
|
5
5
|
/** The runner's silk, for single-event rows; under an "A vs B" header the logos are already up top. */
|
|
@@ -12,4 +12,31 @@ export declare function MatchupTeams({ matchup, renderTeamLogo, altText, mutedCo
|
|
|
12
12
|
mutedColor: string;
|
|
13
13
|
size?: 'sm' | 'md';
|
|
14
14
|
}): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export declare function
|
|
15
|
+
export declare function CompositePropositionText({ prop, colors: c, size, componentById, textStyle, textColor, renderTeamLogo, }: {
|
|
16
|
+
prop: Proposition;
|
|
17
|
+
colors: {
|
|
18
|
+
primary: string;
|
|
19
|
+
text: string;
|
|
20
|
+
textMuted?: string;
|
|
21
|
+
textAltMuted?: string;
|
|
22
|
+
backgroundAlt?: string;
|
|
23
|
+
border?: string;
|
|
24
|
+
};
|
|
25
|
+
size?: 'sm' | 'md';
|
|
26
|
+
componentById?: ReadonlyMap<number, Proposition>;
|
|
27
|
+
/** Replaces the size-derived type — the variant layouts set their own. */
|
|
28
|
+
textStyle?: {
|
|
29
|
+
fontSize: number;
|
|
30
|
+
fontWeight: '400' | '500' | '600' | '700';
|
|
31
|
+
lineHeight?: number;
|
|
32
|
+
textAlign?: 'left' | 'center';
|
|
33
|
+
};
|
|
34
|
+
/** Replaces `colors.text` on the question itself, legs included. */
|
|
35
|
+
textColor?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Supplied, a leg names its fixture with the two club badges instead of a
|
|
38
|
+
* text chip — far lighter in a row. Falls back to the chip without it.
|
|
39
|
+
*/
|
|
40
|
+
renderTeamLogo?: RenderTeamLogo;
|
|
41
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export declare function SportSelector({ game, propositions, selections, onToggleSelection, onNext, onBack, loading, error, theme: themeProp, colorScheme, hideActions, initialSport, renderTeamLogo, disableQuickPick, selectedPropositionCount, onPropositionCountChange, gameCategory, headerExtra, railSlot, variant, disableEventSwipe, }: SportSelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
2
|
import { ViewStyle, TextStyle, StyleProp, Animated } from 'react-native';
|
|
3
3
|
import { BladeTheme } from '../../../shared/themes';
|
|
4
|
+
import { YesNoLabels } from '../../../shared/utils';
|
|
4
5
|
/** Twin of the web `TOUCH_TARGET`: minimum hit area in px. Shrink the paint, never the target. */
|
|
5
6
|
export declare const TOUCH_TARGET = 44;
|
|
6
7
|
/**
|
|
@@ -11,6 +12,8 @@ export declare const TOUCH_TARGET = 44;
|
|
|
11
12
|
export declare function scrollRowTo(ref: {
|
|
12
13
|
current: unknown;
|
|
13
14
|
}, x: number, animated?: boolean): void;
|
|
15
|
+
export declare function webDocOf(node: unknown): Document;
|
|
16
|
+
export declare function webWinOf(node: unknown): Window;
|
|
14
17
|
/**
|
|
15
18
|
* Hover handlers for the react-native-web twin — RN's own prop types omit them
|
|
16
19
|
* and they are inert on native. Spread it (`{...hoverHandlers(a, b)}`) instead
|
|
@@ -78,6 +81,9 @@ export declare function Divider({ theme, orientation, style, }: {
|
|
|
78
81
|
export type YesNoValue = 'yes' | 'no';
|
|
79
82
|
export type YesNoAnswer = YesNoValue | null | undefined;
|
|
80
83
|
export type YesNoSize = 'xs' | 'sm' | 'md';
|
|
84
|
+
export type { YesNoLabels };
|
|
85
|
+
export declare const YesNoLabelsProvider: React.Provider<YesNoLabels>;
|
|
86
|
+
export declare function useYesNoLabels(): YesNoLabels;
|
|
81
87
|
export interface YesNoButtonsProps {
|
|
82
88
|
theme: BladeTheme;
|
|
83
89
|
/** Currently selected side, if any. */
|
|
@@ -85,13 +91,17 @@ export interface YesNoButtonsProps {
|
|
|
85
91
|
onYes?: () => void;
|
|
86
92
|
onNo?: () => void;
|
|
87
93
|
size?: YesNoSize;
|
|
94
|
+
/** Fill the row, each side taking half — the roomy card layouts want this. */
|
|
95
|
+
stretch?: boolean;
|
|
88
96
|
disabled?: boolean;
|
|
97
|
+
yesDisabled?: boolean;
|
|
98
|
+
noDisabled?: boolean;
|
|
89
99
|
yesLabel?: string;
|
|
90
100
|
noLabel?: string;
|
|
91
101
|
style?: StyleProp<ViewStyle>;
|
|
92
102
|
}
|
|
93
103
|
/** The interactive Yes/No pair. Identical everywhere it is used. */
|
|
94
|
-
export declare function YesNoButtons({ theme, value, onYes, onNo, size, disabled, yesLabel, noLabel, style, }: YesNoButtonsProps): import("react/jsx-runtime").JSX.Element;
|
|
104
|
+
export declare function YesNoButtons({ theme, value, onYes, onNo, size, stretch, disabled, yesDisabled, noDisabled, yesLabel, noLabel, style, }: YesNoButtonsProps): import("react/jsx-runtime").JSX.Element;
|
|
95
105
|
/** Read-only Yes/No chip — the settled answer, same product tokens. */
|
|
96
106
|
export declare function YesNoTag({ theme, value, size, style, }: {
|
|
97
107
|
theme: BladeTheme;
|