@simple-parlay/components 2.0.2 → 2.2.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/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +687 -653
- package/dist/react/components/CorrelationGuide.d.ts +5 -0
- package/dist/react/components/CorrelationPropPlaceholder.d.ts +1 -1
- package/dist/react/components/EntryRulePicks.d.ts +62 -0
- package/dist/react/components/EntrySubmission.d.ts +1 -1
- package/dist/react/components/GameEntries.d.ts +1 -1
- package/dist/react/components/GameShowcaseCatalogue.d.ts +2 -1
- package/dist/react/components/HowToPlayPanel.d.ts +19 -0
- package/dist/react/components/LoadingIndicators.d.ts +3 -0
- package/dist/react/components/MarkdownContent.d.ts +4 -1
- package/dist/react/components/MultiLegTable.d.ts +2 -1
- package/dist/react/components/PickGroupSection.d.ts +4 -3
- package/dist/react/components/PlaceEntryProvider.d.ts +13 -2
- package/dist/react/components/SelectionVariantList.d.ts +18 -0
- package/dist/react/components/ShelfKit.d.ts +1 -1
- package/dist/react/components/YesNoMultiLogo.d.ts +5 -2
- package/dist/react/components/_primitives/index.d.ts +4 -2
- package/dist/react/hooks/index.d.ts +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.d.ts +4 -1
- package/dist/react/index.mjs +687 -653
- package/dist/react/types/index.d.ts +1 -1
- package/dist/react-native/components/CorrelationGuide.d.ts +5 -0
- package/dist/react-native/components/EntryRulePicks.d.ts +66 -0
- package/dist/react-native/components/EntrySubmission.d.ts +1 -1
- package/dist/react-native/components/GameEntries.d.ts +1 -1
- package/dist/react-native/components/HowToPlayButton.d.ts +6 -11
- package/dist/react-native/components/HowToPlayPanel.d.ts +17 -0
- package/dist/react-native/components/LoadingIndicators.d.ts +5 -0
- package/dist/react-native/components/MultiLegTable.d.ts +2 -1
- package/dist/react-native/components/PickGroupSection.d.ts +4 -3
- package/dist/react-native/components/PlaceEntryProvider.d.ts +13 -6
- package/dist/react-native/components/SelectionVariantList.d.ts +40 -0
- package/dist/react-native/components/ShelfKit.d.ts +1 -1
- package/dist/react-native/components/_primitives/index.d.ts +3 -1
- package/dist/react-native/hooks/index.d.ts +1 -1
- package/dist/react-native/index.cjs +1 -1
- package/dist/react-native/index.d.ts +4 -1
- package/dist/react-native/index.mjs +587 -559
- package/dist/react-native/types/index.d.ts +1 -1
- package/dist/shared/api-client.d.ts +7 -1
- package/dist/shared/correlation-steering.d.ts +25 -5
- package/dist/shared/dense-ui.d.ts +1 -0
- package/dist/shared/entry-features.d.ts +34 -0
- package/dist/shared/entry-rules.d.ts +178 -0
- package/dist/shared/game-artwork.d.ts +0 -1
- package/dist/shared/game-flow.d.ts +7 -1
- package/dist/shared/hooks.d.ts +4 -0
- package/dist/shared/how-to-play-props-table.d.ts +1 -17
- package/dist/shared/markdown.d.ts +8 -0
- package/dist/shared/shelf-covers.d.ts +0 -2
- package/dist/shared/shelf-ui.d.ts +2 -1
- package/dist/shared/types.d.ts +93 -3
- package/dist/shared/utils.d.ts +1 -0
- package/package.json +4 -2
- package/dist/react/components/HowToPlayPropsTable.d.ts +0 -6
- package/dist/react/components/HtmlContent.d.ts +0 -5
- package/dist/shared/how-to-play-html.d.ts +0 -12
- package/dist/shared/how-to-play-logo.d.ts +0 -2
- package/dist/shared/how-to-play-styles.d.ts +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PlaceEntryFlowProps as SharedPlaceEntryFlowProps, GameEntriesProps as SharedGameEntriesProps } from '../../shared/types';
|
|
2
|
-
export type { BladeTheme, BladeThemeSet, ColorScheme, ScreenSize, RuleExpressionObject, Game, GameAllocation, SportSummary, Proposition, GameEntry, GameSelectorProps, EntrySubmissionProps, SelectionReviewProps, EvaluateRuleRequest, EvaluateRuleResponse, CalculatePayoutRequest, CalculatePayoutResponse, EntryPreviewRequest, EntryPreviewResponse, TopPayoutEntry, TopPayoutsResponse, ResolvedEntryData, ShareData, PendingBet, QuickPickResult, } from '../../shared/types';
|
|
2
|
+
export type { GameFeatureId, EntryRuleAction, EntryFeatureClient, EntryFeatureOffer, EntryFeatureQuote, EntryFeatureQuoteInput, BladeTheme, BladeThemeSet, ColorScheme, ScreenSize, RuleExpressionObject, Game, GameAllocation, SportSummary, Proposition, GameEntry, GameSelectorProps, EntrySubmissionProps, SelectionReviewProps, EvaluateRuleRequest, EvaluateRuleResponse, CalculatePayoutRequest, CalculatePayoutResponse, EntryPreviewRequest, EntryPreviewResponse, TopPayoutEntry, TopPayoutsResponse, ResolvedEntryData, ShareData, PendingBet, QuickPickResult, } from '../../shared/types';
|
|
3
3
|
export interface PlaceEntryFlowProps extends SharedPlaceEntryFlowProps {
|
|
4
4
|
className?: string;
|
|
5
5
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tells the player what correlation pricing does to their picks before they make any,
|
|
3
|
+
* and lets them size the multi. Web twin: CorrelationGuide in react/components.
|
|
4
|
+
*/
|
|
5
|
+
export declare function CorrelationGuide(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { EntryFeatureClient, EntryRuleAction, GameEntry, Proposition } from '../types';
|
|
2
|
+
import { RenderTeamLogo } from '../../shared/types';
|
|
3
|
+
import { BladeTheme } from '../utils/themes';
|
|
4
|
+
import { EntryRuleId, EntryRuleResult } from '../../shared/entry-rules';
|
|
5
|
+
/** A game feature the player opened from an entry card. */
|
|
6
|
+
export type EntryRuleView = {
|
|
7
|
+
rule: 'double_down' | 'late_swap';
|
|
8
|
+
entry: GameEntry;
|
|
9
|
+
drop: Proposition;
|
|
10
|
+
dropAnswer?: 'yes' | 'no';
|
|
11
|
+
} | {
|
|
12
|
+
rule: 'press';
|
|
13
|
+
entry: GameEntry;
|
|
14
|
+
winnings: number;
|
|
15
|
+
} | {
|
|
16
|
+
rule: 'second_thoughts';
|
|
17
|
+
entry: GameEntry;
|
|
18
|
+
picks: {
|
|
19
|
+
prop: Proposition;
|
|
20
|
+
answer?: 'yes' | 'no';
|
|
21
|
+
}[];
|
|
22
|
+
} | {
|
|
23
|
+
rule: 'hot_hand';
|
|
24
|
+
entry: GameEntry;
|
|
25
|
+
};
|
|
26
|
+
export declare const RULE_EYEBROW: {
|
|
27
|
+
readonly fontSize: 11;
|
|
28
|
+
readonly fontWeight: "800";
|
|
29
|
+
readonly letterSpacing: 1.54;
|
|
30
|
+
readonly textTransform: "uppercase";
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* The feature's mark: its glyph in the accent on a primary tile, like the game emblems.
|
|
34
|
+
* `explain` makes it the way in to the feature's explainer: a `?` badge, and a tap opens it. Web twin: RuleTile.
|
|
35
|
+
*/
|
|
36
|
+
export declare function RuleTile({ theme, rule, size, explain }: {
|
|
37
|
+
theme: BladeTheme;
|
|
38
|
+
rule: EntryRuleId;
|
|
39
|
+
size?: number;
|
|
40
|
+
explain?: boolean;
|
|
41
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
/** What a feature does, in the How-to-Play guide's shape: the mark and one line, three numbered steps, an example payout. Web twin: RuleExplainer. */
|
|
43
|
+
export declare function RuleExplainer({ theme, rule }: {
|
|
44
|
+
theme: BladeTheme;
|
|
45
|
+
rule: EntryRuleId;
|
|
46
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
/** One pick as a row: what was called and the call. Web twin: RulePickRow. */
|
|
48
|
+
export declare function RulePickRow({ theme, prop, answer, struck }: {
|
|
49
|
+
theme: BladeTheme;
|
|
50
|
+
prop: Proposition;
|
|
51
|
+
answer?: 'yes' | 'no';
|
|
52
|
+
struck?: boolean;
|
|
53
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
/**
|
|
55
|
+
* The picks screen, pointed at a game feature: the Shelf picks list and a checkout dock. BLADE quotes
|
|
56
|
+
* the exact stake and payout for the picks as they stand; the button arms, then accepts that quote. Web twin: EntryRulePicks.
|
|
57
|
+
*/
|
|
58
|
+
export declare function EntryRulePicks({ view, pool, theme, client, renderTeamLogo, onBack, onDone }: {
|
|
59
|
+
view: EntryRuleView;
|
|
60
|
+
pool: Proposition[];
|
|
61
|
+
theme: BladeTheme;
|
|
62
|
+
client: EntryFeatureClient | null;
|
|
63
|
+
renderTeamLogo?: RenderTeamLogo;
|
|
64
|
+
onBack: () => void;
|
|
65
|
+
onDone: (action: EntryRuleAction, result: EntryRuleResult) => void;
|
|
66
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { EntrySubmissionProps } from '../types';
|
|
2
|
-
export declare function EntrySubmission({ game, propositions, selections, onToggleSelection, onRemoveSelection, onSubmit, onBack, loading, error, expectedCorrect, onExpectedCorrectChange, betAmount, onBetAmountChange, theme: themeProp, colorScheme, hideActions, winningCounts: winningCountsProp, payouts: payoutsProp, renderTeamLogo, componentById, showCustomAmount, betAmountLocked, betAmountLockedNote, canSubmit: canSubmitProp, confirming, authenticated, userBalance, onRecharge, boostBanner, aboveDock, }: EntrySubmissionProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function EntrySubmission({ game, propositions, selections, onToggleSelection, onRemoveSelection, onSubmit, onBack, loading, error, expectedCorrect, onExpectedCorrectChange, betAmount, onBetAmountChange, theme: themeProp, colorScheme, hideActions, winningCounts: winningCountsProp, payouts: payoutsProp, payoutPending, renderTeamLogo, componentById, showCustomAmount, betAmountLocked, betAmountLockedNote, canSubmit: canSubmitProp, confirming, authenticated, userBalance, onRecharge, boostBanner, aboveDock, }: EntrySubmissionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { GameEntriesProps } from '../types';
|
|
2
|
-
export declare function GameEntries({ apiUrl, apiKey, fetchImpl, getAuthHeaders, userId, demoEntries, demoGames, demoPropositions, onSelectEntry, theme: themeProp, colorScheme, renderTeamLogo, filterSport, }: GameEntriesProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function GameEntries({ apiUrl, apiKey, fetchImpl, getAuthHeaders, userId, demoEntries, demoGames, demoPropositions, onSelectEntry, theme: themeProp, colorScheme, renderTeamLogo, filterSport, onEntryRule, entryFeatureClient, }: GameEntriesProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { HowToPlayPanelContent } from '../../shared/how-to-play-panel';
|
|
3
3
|
import { BladeTheme } from '../types';
|
|
4
|
-
export type WebViewComponent = React.ComponentType<{
|
|
5
|
-
source: {
|
|
6
|
-
html: string;
|
|
7
|
-
};
|
|
8
|
-
style: object;
|
|
9
|
-
originWhitelist?: string[];
|
|
10
|
-
scrollEnabled?: boolean;
|
|
11
|
-
}>;
|
|
12
4
|
export interface HowToPlayButtonProps {
|
|
13
5
|
content?: string | null;
|
|
14
6
|
panel?: HowToPlayPanelContent | null;
|
|
@@ -32,7 +24,10 @@ export interface HowToPlayButtonProps {
|
|
|
32
24
|
};
|
|
33
25
|
bodyFont?: string;
|
|
34
26
|
headingFont?: string;
|
|
35
|
-
/** Pass `WebView` from react-native-webview for HTML guides. Defaults to PlaceEntryProvider's. */
|
|
36
|
-
WebViewComponent?: WebViewComponent;
|
|
37
27
|
}
|
|
38
|
-
export declare function HowToPlayButton({ content, panel, theme, extra, title, label, variant, touchSize, colors, bodyFont, headingFont,
|
|
28
|
+
export declare function HowToPlayButton({ content, panel, theme, extra, title, label, variant, touchSize, colors, bodyFont, headingFont, }: HowToPlayButtonProps): import("react/jsx-runtime").JSX.Element | null;
|
|
29
|
+
/** The How-to-Play sheet on its own, for triggers other than the button (the game-feature tiles). Web twin: HowToPlayModal. */
|
|
30
|
+
export declare function HowToPlayModal({ open, onClose, title, content, panel, theme, extra, colors, bodyFont, headingFont, }: Omit<HowToPlayButtonProps, 'label' | 'variant' | 'touchSize'> & {
|
|
31
|
+
open: boolean;
|
|
32
|
+
onClose: () => void;
|
|
33
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { BladeTheme } from '../types';
|
|
3
3
|
import { HowToPlayPanelContent } from '../../shared/how-to-play-panel';
|
|
4
|
+
export declare function PanelTabs<Id extends string>({ theme, font, tabs, active, onSelect }: {
|
|
5
|
+
theme: BladeTheme;
|
|
6
|
+
font?: string;
|
|
7
|
+
tabs: readonly {
|
|
8
|
+
id: Id;
|
|
9
|
+
label: string;
|
|
10
|
+
}[];
|
|
11
|
+
active: Id;
|
|
12
|
+
onSelect: (id: Id) => void;
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function GuidePropRows({ theme, rows, font }: {
|
|
15
|
+
theme: BladeTheme;
|
|
16
|
+
rows: readonly {
|
|
17
|
+
question: string;
|
|
18
|
+
}[];
|
|
19
|
+
font?: string;
|
|
20
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
4
21
|
export interface HowToPlayPanelProps {
|
|
5
22
|
panel: HowToPlayPanelContent;
|
|
6
23
|
theme: BladeTheme;
|
|
@@ -20,6 +20,11 @@ export declare function Shimmer({ color, style }: {
|
|
|
20
20
|
color: string;
|
|
21
21
|
style?: object;
|
|
22
22
|
}): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare function AmountShimmer({ color, width, height }: {
|
|
24
|
+
color: string;
|
|
25
|
+
width?: number;
|
|
26
|
+
height?: number;
|
|
27
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
23
28
|
/** RN mirror of web `CategoryGridSkeleton` (1 col < 400px, 2 cols ≥ 400px). */
|
|
24
29
|
export declare function CategoryGridSkeleton({ colors, count, theme, }: {
|
|
25
30
|
colors: PickerSurfaceColors;
|
|
@@ -26,6 +26,7 @@ export interface MultiLegTableProps {
|
|
|
26
26
|
colors: MultiLegTableColors;
|
|
27
27
|
bodyFont?: string;
|
|
28
28
|
extraBetAmount?: number;
|
|
29
|
+
pending?: boolean;
|
|
29
30
|
buttonLabel?: (count: number) => string;
|
|
30
31
|
/** Left-column label above the tier buttons. @default 'Legs' */
|
|
31
32
|
columnLabel?: string;
|
|
@@ -38,4 +39,4 @@ export interface MultiLegTableProps {
|
|
|
38
39
|
summaryTiers?: MultiLegTableTier[];
|
|
39
40
|
theme?: BladeTheme;
|
|
40
41
|
}
|
|
41
|
-
export declare function MultiLegTable({ tiers, game, selectedCount, onSelect, colors: c, bodyFont, extraBetAmount, buttonLabel, columnLabel, buildYourOwn, quickPickOnly, onQuickPick, collapsible, expanded: expandedProp, onExpandedChange, summaryTiers, theme }: MultiLegTableProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export declare function MultiLegTable({ tiers, game, selectedCount, onSelect, colors: c, bodyFont, extraBetAmount, buttonLabel, columnLabel, buildYourOwn, quickPickOnly, onQuickPick, collapsible, expanded: expandedProp, onExpandedChange, summaryTiers, theme, pending }: MultiLegTableProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -22,6 +22,7 @@ export interface PickGroupSectionProps {
|
|
|
22
22
|
pickOrder?: readonly number[];
|
|
23
23
|
/** Stretch to fill the card (the last group of a shelf card). */
|
|
24
24
|
last?: boolean;
|
|
25
|
+
rowsBackground?: string;
|
|
25
26
|
/** One row. `swap` is set on a row a full limit folded: answering it swaps it in, resolving the picks it replaces on the tap. */
|
|
26
27
|
renderRow: (prop: Proposition, opts: {
|
|
27
28
|
top: boolean;
|
|
@@ -29,9 +30,9 @@ export interface PickGroupSectionProps {
|
|
|
29
30
|
}) => React.ReactNode;
|
|
30
31
|
}
|
|
31
32
|
/**
|
|
32
|
-
* One group of a match's questions (the line, the total, the players): a
|
|
33
|
-
* when there are more options than it allows) beside its rows. Once the limit is full, the rows it blocks fold away
|
|
33
|
+
* One group of a match's questions (the line, the total, the players): a flush, square rail column (icon, label, the
|
|
34
|
+
* limit when there are more options than it allows) beside its rows, the same shape as the rows. Once the limit is full, the rows it blocks fold away
|
|
34
35
|
* in place behind one tile; opened, each of them swaps in for the held pick. Every system's picks page draws it.
|
|
35
36
|
* Web twin: PickGroupSection in the web components.
|
|
36
37
|
*/
|
|
37
|
-
export declare function PickGroupSection({ theme, group, selections, caps, game, pool, componentById, pickOrder, last, renderRow }: PickGroupSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export declare function PickGroupSection({ theme, group, selections, caps, game, pool, componentById, pickOrder, last, rowsBackground, renderRow }: PickGroupSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,9 +3,10 @@ import { GameLibrary } from '../../shared/game-library';
|
|
|
3
3
|
import { GameFlow } from '../../shared/game-flow';
|
|
4
4
|
import { PreviewCallPayouts } from '../../shared/use-call-payouts';
|
|
5
5
|
import { UiVariant } from '../../shared/ui-variant';
|
|
6
|
+
import { UiSystem } from '../../shared/ui-system';
|
|
6
7
|
import { default as React } from 'react';
|
|
7
8
|
import { YesNoLabels, EntryCategory } from '../../shared/utils';
|
|
8
|
-
import { Game, Proposition, SportSummary, GameEntry, TopPayoutsResponse, ShareData, ScreenSize } from '../types';
|
|
9
|
+
import { Game, Proposition, SportSummary, GameEntry, GameEntriesProps, TopPayoutsResponse, ShareData, ScreenSize } from '../types';
|
|
9
10
|
import { BladeTheme, BladeThemeSet, ColorScheme } from '../utils/themes';
|
|
10
11
|
import { SportDisplayNameOverrides, CategoryDisplayNameOverrides } from '../utils';
|
|
11
12
|
import { RenderTeamLogo, RenderPropositionSilk, GamePermittedRule, GameCategory } from '../../shared/types';
|
|
@@ -14,7 +15,6 @@ import { SwipeVariant } from '../../shared/swipe-deck';
|
|
|
14
15
|
import { useCorrelationSteering } from '../../shared/correlation-steering';
|
|
15
16
|
import { QuickPickMode } from '../../shared/selection-caps';
|
|
16
17
|
import { SameGameMultiEvent } from '../../shared/same-game-multi';
|
|
17
|
-
import { WebViewComponent } from './HowToPlayButton';
|
|
18
18
|
export interface PlaceEntryContextValue {
|
|
19
19
|
gameLibrary: GameLibrary<PlaceEntryContextValue>;
|
|
20
20
|
getGameFlow: (game: Game | null | undefined) => GameFlow;
|
|
@@ -122,6 +122,8 @@ export interface PlaceEntryContextValue {
|
|
|
122
122
|
renderPropositionSilk?: RenderPropositionSilk;
|
|
123
123
|
/** Optional presentation. Existing UI remains the default. */
|
|
124
124
|
uiVariant?: UiVariant;
|
|
125
|
+
/** The resolved UI_SYSTEMS entry for `uiVariant`; the game library draws its setup pages from it. */
|
|
126
|
+
uiSystemSpec: UiSystem;
|
|
125
127
|
/** Proposition layout override; undefined follows the UI variant. */
|
|
126
128
|
selectionVariant?: SelectionVariant;
|
|
127
129
|
/** Game discovery layout; native supports `shelf`, with web-only layouts falling back. */
|
|
@@ -133,6 +135,10 @@ export interface PlaceEntryContextValue {
|
|
|
133
135
|
/** Let players star a sport in the rail to pin it up front (per device). Off by default. */
|
|
134
136
|
enableSportFavourites?: boolean;
|
|
135
137
|
filterSport?: string;
|
|
138
|
+
/** Called when the player uses a game feature (Double Down, Press, Late Swap) on an entry. */
|
|
139
|
+
onEntryRule?: GameEntriesProps['onEntryRule'];
|
|
140
|
+
/** Overrides the BLADE calls behind game features (the playground's demo pricer). */
|
|
141
|
+
entryFeatureClient?: GameEntriesProps['entryFeatureClient'];
|
|
136
142
|
initialSport?: string;
|
|
137
143
|
initialEventId?: string;
|
|
138
144
|
initialEventLabel?: string;
|
|
@@ -145,6 +151,8 @@ export interface PlaceEntryContextValue {
|
|
|
145
151
|
displaySportName: (sport: string) => string;
|
|
146
152
|
displayCategoryName: (category: string) => string;
|
|
147
153
|
maxPayouts: Record<number, TopPayoutsResponse>;
|
|
154
|
+
stakePayouts?: TopPayoutsResponse;
|
|
155
|
+
quotePending: boolean;
|
|
148
156
|
howToPlayMarkdown: string | null;
|
|
149
157
|
onEntryPlaced?: (entry: GameEntry) => void;
|
|
150
158
|
onCancel?: () => void;
|
|
@@ -156,8 +164,6 @@ export interface PlaceEntryContextValue {
|
|
|
156
164
|
}
|
|
157
165
|
declare const PlaceEntryContext: React.Context<PlaceEntryContextValue | null>;
|
|
158
166
|
export { PlaceEntryContext };
|
|
159
|
-
/** To stop Metro throwing a hissy fit. */
|
|
160
|
-
export declare const WebViewContext: React.Context<WebViewComponent | undefined>;
|
|
161
167
|
export declare function usePlaceEntry(): PlaceEntryContextValue;
|
|
162
168
|
export interface PlaceEntryProviderProps {
|
|
163
169
|
/** Additional game implementations. Perfect Pick, H2H and Safety Net are built in. */
|
|
@@ -182,6 +188,8 @@ export interface PlaceEntryProviderProps {
|
|
|
182
188
|
jurisdiction?: string;
|
|
183
189
|
initialGameId?: number;
|
|
184
190
|
filterSport?: string;
|
|
191
|
+
onEntryRule?: GameEntriesProps['onEntryRule'];
|
|
192
|
+
entryFeatureClient?: GameEntriesProps['entryFeatureClient'];
|
|
185
193
|
initialSport?: string;
|
|
186
194
|
initialEventId?: string;
|
|
187
195
|
initialEventLabel?: string;
|
|
@@ -210,8 +218,7 @@ export interface PlaceEntryProviderProps {
|
|
|
210
218
|
onClearEventFilter?: () => void;
|
|
211
219
|
screenSize?: ScreenSize;
|
|
212
220
|
howToPlayMarkdown?: string | null;
|
|
213
|
-
WebViewComponent?: WebViewComponent;
|
|
214
221
|
sportDisplayNames?: SportDisplayNameOverrides;
|
|
215
222
|
categoryDisplayNames?: CategoryDisplayNameOverrides;
|
|
216
223
|
}
|
|
217
|
-
export declare function PlaceEntryProvider({ gameLibrary, showCorrelationDebug, apiUrl, apiKey, fetchImpl, getAuthHeaders, userId, getUserBalance, children, theme: themeProp, colorScheme, demoGames, demoPropositions, demoEntries, demoMaxPayouts, gameCategory, jurisdiction, initialGameId, filterSport, initialSport, initialEventId, initialEventLabel, sportBaseKey, disableQuickPick, renderTeamLogo, renderPropositionSilk, uiVariant, selectionVariant, gameVariant, disableEventSwipe, swipeVariant, enableSportFavourites, yesNoLabels, onEntryPlaced, onBeforeSubmit, entryReference, onCancel, onShare, onRecharge, onClearEventFilter, screenSize, howToPlayMarkdown: howToPlayMarkdownProp,
|
|
224
|
+
export declare function PlaceEntryProvider({ gameLibrary, showCorrelationDebug, apiUrl, apiKey, fetchImpl, getAuthHeaders, userId, getUserBalance, children, theme: themeProp, colorScheme, demoGames, demoPropositions, demoEntries, demoMaxPayouts, gameCategory, jurisdiction, initialGameId, filterSport, onEntryRule, entryFeatureClient, initialSport, initialEventId, initialEventLabel, sportBaseKey, disableQuickPick, renderTeamLogo, renderPropositionSilk, uiVariant, selectionVariant, gameVariant, disableEventSwipe, swipeVariant, enableSportFavourites, yesNoLabels, onEntryPlaced, onBeforeSubmit, entryReference, onCancel, onShare, onRecharge, onClearEventFilter, screenSize, howToPlayMarkdown: howToPlayMarkdownProp, sportDisplayNames, categoryDisplayNames, }: PlaceEntryProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,6 +2,44 @@ import { Proposition } from '../types';
|
|
|
2
2
|
import { BladeTheme } from '../../shared/themes';
|
|
3
3
|
import { SelectionVariant } from '../../shared/selection-variants';
|
|
4
4
|
import { RenderTeamLogo } from '../../shared/types';
|
|
5
|
+
/**
|
|
6
|
+
* The fixture-first proposition layouts — YESNO's own designs, ported from the
|
|
7
|
+
* demo site and folded into the packaged selector. Twin of the web
|
|
8
|
+
* `SelectionVariantList`, same layouts and same tokens.
|
|
9
|
+
*
|
|
10
|
+
* It draws only the list body. Filters, quick pick, the header and the action
|
|
11
|
+
* bar stay with `SportSelector`, and the propositions arrive already filtered
|
|
12
|
+
* and already grouped, so a variant can never disagree with the default list
|
|
13
|
+
* about what is on offer.
|
|
14
|
+
*/
|
|
15
|
+
/** Question type per layout — the reference site's own ramp, not the packaged one. */
|
|
16
|
+
export declare const QUESTION_TYPE: {
|
|
17
|
+
readonly split: {
|
|
18
|
+
readonly fontSize: 13;
|
|
19
|
+
readonly fontWeight: "400";
|
|
20
|
+
readonly lineHeight: 18;
|
|
21
|
+
};
|
|
22
|
+
readonly compact: {
|
|
23
|
+
readonly fontSize: 11;
|
|
24
|
+
readonly fontWeight: "400";
|
|
25
|
+
readonly lineHeight: 15;
|
|
26
|
+
};
|
|
27
|
+
readonly dense: {
|
|
28
|
+
readonly fontSize: 16;
|
|
29
|
+
readonly fontWeight: "600";
|
|
30
|
+
readonly lineHeight: 22;
|
|
31
|
+
};
|
|
32
|
+
readonly call: {
|
|
33
|
+
readonly fontSize: 15;
|
|
34
|
+
readonly fontWeight: "600";
|
|
35
|
+
readonly lineHeight: 23;
|
|
36
|
+
};
|
|
37
|
+
readonly shelf: {
|
|
38
|
+
readonly fontSize: 14;
|
|
39
|
+
readonly fontWeight: "500";
|
|
40
|
+
readonly lineHeight: 19;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
5
43
|
export interface SelectionVariantListProps {
|
|
6
44
|
variant: SelectionVariant;
|
|
7
45
|
/** Already filtered and grouped by `groupPropositionsForDisplay`. */
|
|
@@ -18,3 +56,5 @@ export interface SelectionVariantListProps {
|
|
|
18
56
|
disableEventSwipe?: boolean;
|
|
19
57
|
}
|
|
20
58
|
export declare function SelectionVariantList({ variant, groups, racing, selections, onToggleSelection, atMax, theme, renderTeamLogo, componentById, disableEventSwipe, }: SelectionVariantListProps): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
/** Railed rows put Yes / No under the question on a card narrower than this. Web twin: SHELF_ROW_CSS. */
|
|
60
|
+
export declare const SHELF_STACK_BELOW = 440;
|
|
@@ -28,7 +28,7 @@ export interface ShelfOptionProps {
|
|
|
28
28
|
}
|
|
29
29
|
/** Every chip, filter, tab and option: teal with light text when chosen, white with a hairline when not. */
|
|
30
30
|
export declare function ShelfOption({ theme: themeProp, selected, sub, disabled, onPress, accessibilityLabel, accessibilityRole, testID, style, children }: ShelfOptionProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
-
/** One progress mark per pick: right fills teal, a miss is outlined, still to play is a hairline grey. */
|
|
31
|
+
/** One progress mark per pick: right fills teal, a miss is outlined, still to play is a hairline grey, a miss you can undo is the accent. */
|
|
32
32
|
export declare function ShelfPips({ theme: themeProp, states, label, style }: {
|
|
33
33
|
theme?: BladeTheme;
|
|
34
34
|
states: readonly ShelfPipState[];
|
|
@@ -124,6 +124,8 @@ export interface IconButtonProps {
|
|
|
124
124
|
size?: number;
|
|
125
125
|
/** danger: the hover ring turns the error colour (remove a pick). */
|
|
126
126
|
tone?: 'default' | 'danger';
|
|
127
|
+
/** The glyph alone: no disc or ring. */
|
|
128
|
+
bare?: boolean;
|
|
127
129
|
/** Merged with the button's own disabled state: expanded for disclosures. */
|
|
128
130
|
accessibilityState?: {
|
|
129
131
|
expanded?: boolean;
|
|
@@ -140,7 +142,7 @@ export interface IconButtonProps {
|
|
|
140
142
|
* footprint and reaches out to a 44 hit area with negative margins.
|
|
141
143
|
* Web twin: `IconButton` in src/react/components/_primitives.
|
|
142
144
|
*/
|
|
143
|
-
export declare function IconButton({ theme, accessibilityLabel, onPress, disabled, size, tone, accessibilityState, testID, style, children }: IconButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
145
|
+
export declare function IconButton({ theme, accessibilityLabel, onPress, disabled, size, tone, bare, accessibilityState, testID, style, children }: IconButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
144
146
|
/** The icon colour inside an IconButton at rest (hover recolours the ring, not the glyph, on native). */
|
|
145
147
|
export declare function iconButtonInk(theme: BladeTheme): string;
|
|
146
148
|
export interface TextProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { useGames, usePropositions, useSports, useGameEntries, useCreateGameEntry, useGameMaxPayouts, usePlaceEntryFlow, useEvaluateRule, useCalculatePayout, useEntryPreview, useCompositeComponentLookup, } from '../../shared/hooks';
|
|
1
|
+
export { useGames, usePropositions, useSports, useGameEntries, useCreateGameEntry, useGameMaxPayouts, useStakePayouts, usePlaceEntryFlow, useEvaluateRule, useCalculatePayout, useEntryPreview, useCompositeComponentLookup, } from '../../shared/hooks';
|