@simple-parlay/components 1.30.6-pre.8 → 2.0.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.
Files changed (116) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.mjs +653 -485
  4. package/dist/react/components/CallPayoutTable.d.ts +7 -1
  5. package/dist/react/components/CorrelationPropPlaceholder.d.ts +6 -1
  6. package/dist/react/components/DenseUi.d.ts +1 -0
  7. package/dist/react/components/EntriesPage.d.ts +0 -4
  8. package/dist/react/components/EntrySubmission.d.ts +1 -1
  9. package/dist/react/components/EventSwipeModal.d.ts +4 -0
  10. package/dist/react/components/GameCardParts.d.ts +28 -0
  11. package/dist/react/components/GameModeCard.d.ts +37 -6
  12. package/dist/react/components/GamePage.d.ts +4 -2
  13. package/dist/react/components/GameSelector.d.ts +1 -27
  14. package/dist/react/components/GameSetupPage.d.ts +5 -1
  15. package/dist/react/components/GameShelfCatalogue.d.ts +1 -7
  16. package/dist/react/components/GameShowcaseCatalogue.d.ts +11 -0
  17. package/dist/react/components/GameSkeletons.d.ts +24 -0
  18. package/dist/react/components/HowToPlayButton.d.ts +2 -1
  19. package/dist/react/components/LoadingIndicators.d.ts +27 -10
  20. package/dist/react/components/MatchRail.d.ts +52 -0
  21. package/dist/react/components/MatchTopBar.d.ts +19 -0
  22. package/dist/react/components/MultiLegTable.d.ts +3 -1
  23. package/dist/react/components/PageBackButton.d.ts +35 -6
  24. package/dist/react/components/PageSkeletons.d.ts +24 -0
  25. package/dist/react/components/PickGroupSection.d.ts +37 -0
  26. package/dist/react/components/PickerBrand.d.ts +0 -5
  27. package/dist/react/components/PicksSkeletons.d.ts +30 -0
  28. package/dist/react/components/PlaceEntryProvider.d.ts +37 -4
  29. package/dist/react/components/PropositionFilters.d.ts +0 -1
  30. package/dist/react/components/PropositionParts.d.ts +38 -0
  31. package/dist/react/components/QuickPickButton.d.ts +27 -1
  32. package/dist/react/components/QuickPickMenu.d.ts +19 -1
  33. package/dist/react/components/SelectionsPage.d.ts +8 -4
  34. package/dist/react/components/ShelfKit.d.ts +43 -0
  35. package/dist/react/components/SportRail.d.ts +1 -1
  36. package/dist/react/components/SportSelector.d.ts +1 -36
  37. package/dist/react/components/SuccessPage.d.ts +7 -3
  38. package/dist/react/components/SwipeDeck.d.ts +32 -3
  39. package/dist/react/components/YesNoMultiLogo.d.ts +13 -0
  40. package/dist/react/components/_primitives/index.d.ts +57 -12
  41. package/dist/react/index.cjs +1 -1
  42. package/dist/react/index.d.ts +15 -13
  43. package/dist/react/index.mjs +653 -485
  44. package/dist/react/utils/dom.d.ts +7 -0
  45. package/dist/react/utils/themes.d.ts +1 -1
  46. package/dist/react-native/components/CallGameCatalogue.d.ts +1 -0
  47. package/dist/react-native/components/CallPayoutTable.d.ts +7 -1
  48. package/dist/react-native/components/CallTicketBuilder.d.ts +2 -0
  49. package/dist/react-native/components/DenseUi.d.ts +4 -10
  50. package/dist/react-native/components/EntrySubmission.d.ts +1 -1
  51. package/dist/react-native/components/EventSwipeModal.d.ts +5 -0
  52. package/dist/react-native/components/GameCardParts.d.ts +29 -0
  53. package/dist/react-native/components/GameModeCard.d.ts +34 -5
  54. package/dist/react-native/components/GamePage.d.ts +3 -1
  55. package/dist/react-native/components/GameSelector.d.ts +1 -28
  56. package/dist/react-native/components/GameSetupPage.d.ts +4 -13
  57. package/dist/react-native/components/GameShelfCatalogue.d.ts +1 -6
  58. package/dist/react-native/components/GameSkeletons.d.ts +23 -0
  59. package/dist/react-native/components/HowToPlayButton.d.ts +2 -1
  60. package/dist/react-native/components/LoadingIndicators.d.ts +22 -10
  61. package/dist/react-native/components/MatchRail.d.ts +57 -0
  62. package/dist/react-native/components/MatchTopBar.d.ts +17 -0
  63. package/dist/react-native/components/MultiLegTable.d.ts +3 -1
  64. package/dist/react-native/components/PageBackButton.d.ts +32 -9
  65. package/dist/react-native/components/PageSkeletons.d.ts +23 -0
  66. package/dist/react-native/components/PickGroupSection.d.ts +37 -0
  67. package/dist/react-native/components/PickerBrand.d.ts +0 -4
  68. package/dist/react-native/components/PicksSkeletons.d.ts +31 -0
  69. package/dist/react-native/components/PlaceEntryProvider.d.ts +37 -4
  70. package/dist/react-native/components/PropositionFilters.d.ts +0 -1
  71. package/dist/react-native/components/PropositionParts.d.ts +35 -0
  72. package/dist/react-native/components/QuickPickButton.d.ts +27 -1
  73. package/dist/react-native/components/QuickPickMenu.d.ts +20 -1
  74. package/dist/react-native/components/SelectionsPage.d.ts +7 -4
  75. package/dist/react-native/components/ShelfKit.d.ts +62 -0
  76. package/dist/react-native/components/SportRail.d.ts +1 -1
  77. package/dist/react-native/components/SportSelector.d.ts +1 -33
  78. package/dist/react-native/components/SuccessPage.d.ts +7 -3
  79. package/dist/react-native/components/SwipeDeck.d.ts +43 -3
  80. package/dist/react-native/components/YesNoMultiLogo.d.ts +12 -0
  81. package/dist/react-native/components/_primitives/index.d.ts +92 -10
  82. package/dist/react-native/index.cjs +1 -1
  83. package/dist/react-native/index.d.ts +14 -12
  84. package/dist/react-native/index.mjs +559 -474
  85. package/dist/react-native/utils/themes.d.ts +1 -1
  86. package/dist/shared/button-ui.d.ts +65 -0
  87. package/dist/shared/call-presentation.d.ts +9 -1
  88. package/dist/shared/canvas.d.ts +14 -0
  89. package/dist/shared/correlation-steering.d.ts +14 -1
  90. package/dist/shared/date-filters.d.ts +0 -23
  91. package/dist/shared/dense-ui.d.ts +0 -1
  92. package/dist/shared/entry-progress.d.ts +38 -0
  93. package/dist/shared/game-artwork.d.ts +22 -0
  94. package/dist/shared/game-flow.d.ts +22 -0
  95. package/dist/shared/game-icons.d.ts +2 -1
  96. package/dist/shared/game-library.d.ts +30 -6
  97. package/dist/shared/game-shelf-presentation.d.ts +36 -1
  98. package/dist/shared/game-variants.d.ts +1 -1
  99. package/dist/shared/hooks.d.ts +1 -1
  100. package/dist/shared/selection-actions.d.ts +70 -4
  101. package/dist/shared/selection-caps.d.ts +67 -10
  102. package/dist/shared/selection-variants.d.ts +7 -0
  103. package/dist/shared/shelf-covers.d.ts +92 -0
  104. package/dist/shared/shelf-ui.d.ts +47 -0
  105. package/dist/shared/swipe-deck.d.ts +10 -0
  106. package/dist/shared/themes.d.ts +53 -10
  107. package/dist/shared/tokens.d.ts +7 -0
  108. package/dist/shared/types.d.ts +21 -4
  109. package/dist/shared/ui-system.d.ts +71 -0
  110. package/dist/shared/ui-variant.d.ts +5 -3
  111. package/dist/shared/utils.d.ts +4 -1
  112. package/package.json +1 -1
  113. package/dist/react/components/PerfectPickPage.d.ts +0 -22
  114. package/dist/react/components/RuleSetupPage.d.ts +0 -27
  115. package/dist/react-native/components/PerfectPickPage.d.ts +0 -20
  116. package/dist/react-native/components/RuleSetupPage.d.ts +0 -23
@@ -13,10 +13,6 @@ export declare function LockIcon({ size, color, }: {
13
13
  size?: number;
14
14
  color?: string;
15
15
  }): import("react/jsx-runtime").JSX.Element;
16
- export declare function FilterIcon({ size, color, }: {
17
- size?: number;
18
- color?: string;
19
- }): import("react/jsx-runtime").JSX.Element;
20
16
  export declare function YesNoCategoryLabel({ label, category, icon, theme, disabled, }: {
21
17
  label: string;
22
18
  category: string;
@@ -0,0 +1,31 @@
1
+ import { ViewStyle } from 'react-native';
2
+ import { BladeTheme } from '../../shared/themes';
3
+ import { SelectionVariant } from '../../shared/selection-variants';
4
+ /**
5
+ * Picks-screen loading skeletons, one per layout the loaded list can take —
6
+ * twin of the web `PicksSkeletons`. Each copies its layout's rails, shells and
7
+ * row anatomy from the RN SportSelector, SportRail, ChipRail,
8
+ * SelectionVariantList and DenseUi (which differ from web where those do), so
9
+ * nothing moves when the propositions land.
10
+ */
11
+ export type PicksSkeletonLayout = 'kit' | 'split' | 'split-inline' | 'compact' | 'shelf' | 'call' | 'dense';
12
+ /** The layout SportSelector draws for the selection variant it resolved. */
13
+ export declare function picksSkeletonLayout(variant?: SelectionVariant): PicksSkeletonLayout;
14
+ export interface PicksSkeletonProps {
15
+ theme: BladeTheme;
16
+ /** The selection layout SportSelector resolved; undefined is the packaged list. */
17
+ variant?: SelectionVariant;
18
+ /** Sports on offer when the screen carries the sport step; undefined when it has none. */
19
+ sports?: number;
20
+ /** The rail's heading line carries controls (the Swipe-all pill). */
21
+ actions?: boolean;
22
+ /** The packaged list's matchup header fill — it follows the game colour. */
23
+ headerBg?: string;
24
+ /** The packaged list's raised-card shadow. */
25
+ shadow?: ViewStyle;
26
+ /** The host draws club badges. */
27
+ logos?: boolean;
28
+ /** Fixtures carry a Swipe pill. */
29
+ swipe?: boolean;
30
+ }
31
+ export declare function PicksSkeleton({ theme, variant, sports, actions, headerBg, shadow, logos, swipe, }: PicksSkeletonProps): import("react/jsx-runtime").JSX.Element;
@@ -4,13 +4,15 @@ import { GameFlow } from '../../shared/game-flow';
4
4
  import { PreviewCallPayouts } from '../../shared/use-call-payouts';
5
5
  import { UiVariant } from '../../shared/ui-variant';
6
6
  import { default as React } from 'react';
7
- import { YesNoLabels } from '../../shared/utils';
7
+ import { YesNoLabels, EntryCategory } from '../../shared/utils';
8
8
  import { Game, Proposition, SportSummary, GameEntry, TopPayoutsResponse, ShareData, ScreenSize } from '../types';
9
9
  import { BladeTheme, BladeThemeSet, ColorScheme } from '../utils/themes';
10
10
  import { SportDisplayNameOverrides, CategoryDisplayNameOverrides } from '../utils';
11
11
  import { RenderTeamLogo, RenderPropositionSilk, GamePermittedRule, GameCategory } from '../../shared/types';
12
12
  import { SelectionVariant } from '../../shared/selection-variants';
13
+ import { SwipeVariant } from '../../shared/swipe-deck';
13
14
  import { useCorrelationSteering } from '../../shared/correlation-steering';
15
+ import { QuickPickMode } from '../../shared/selection-caps';
14
16
  import { SameGameMultiEvent } from '../../shared/same-game-multi';
15
17
  export interface PlaceEntryContextValue {
16
18
  gameLibrary: GameLibrary<PlaceEntryContextValue>;
@@ -23,6 +25,8 @@ export interface PlaceEntryContextValue {
23
25
  /** Component legs of composite propositions, by id — for per-leg event labels. */
24
26
  compositeComponentById: ReadonlyMap<number, Proposition>;
25
27
  propositionsForCategoryPicker: Proposition[];
28
+ /** Categories with an active game, for the category tiles. Taken from the games, not the propositions: the unscoped propositions feed is paged, so it can leave a whole category out. */
29
+ availableCategories: EntryCategory[];
26
30
  propositionsForSportPicker: Proposition[];
27
31
  sportsForSelectedGame: string[];
28
32
  /** The sports the switcher can offer, busiest first, with their pick counts. */
@@ -43,6 +47,8 @@ export interface PlaceEntryContextValue {
43
47
  showCorrelationDebug: boolean;
44
48
  canSelectAnswer: (id: number, answer: 'yes' | 'no') => boolean;
45
49
  answeredCount: number;
50
+ /** Answered ids in the order they were picked — `selections` keys are numeric, so they sort. */
51
+ pickOrder: number[];
46
52
  betAmount: number;
47
53
  setBetAmount: (v: number) => void;
48
54
  expectedCorrect: number;
@@ -65,7 +71,12 @@ export interface PlaceEntryContextValue {
65
71
  userBalance?: number;
66
72
  hasSufficientBalance: boolean;
67
73
  refreshUserBalance: () => Promise<void>;
68
- handleSubmit: () => Promise<void>;
74
+ /** Two-stage: the first call arms `confirmPending`, the second places. Resolves true once placed. */
75
+ handleSubmit: () => Promise<boolean>;
76
+ /** The first Place entry press landed — buttons read "Confirm entry" until placed or the entry changes. */
77
+ confirmPending: boolean;
78
+ /** Integrator's own entry id, shown on the success page in place of BLADE's `#id`. */
79
+ entryReference?: string;
69
80
  selectGame: (game: Game) => void;
70
81
  goToSportSelection: () => void;
71
82
  goToConfirmation: () => void;
@@ -76,7 +87,23 @@ export interface PlaceEntryContextValue {
76
87
  correlationTargetCount: number;
77
88
  toggleSelection: (id: number, answer: 'yes' | 'no') => void;
78
89
  quickPickGame: (game: Game, count: number, stake?: number) => void;
79
- quickPickSelections: (count: number) => number;
90
+ /** Fills the empty slots only — existing picks stay. Returns the total picked after. */
91
+ /** fill (default) keeps the player's picks and fills or trims to `count`; replace randomises the whole card. */
92
+ quickPickSelections: (count: number, mode?: QuickPickMode) => number;
93
+ /** Ids QuickPick answered that still hold its answer, so rows can say so. */
94
+ quickPickedIds: number[];
95
+ /** Clear picks: drop every pick at once. Undoable. */
96
+ clearSelections: () => void;
97
+ /** Pick `id` in place of `out` (the picks holding its slot) as one undoable change. */
98
+ swapSelection: (id: number, answer: 'yes' | 'no', out: readonly number[]) => void;
99
+ /** The last bulk change (QuickPick fill, Clear picks) while it can still be taken back. */
100
+ /** The last bulk change, for the snackbar: what QuickPick or Clear picks did. */
101
+ selectionUndo: {
102
+ message: string;
103
+ kind: 'quickpick' | 'clear' | 'swap';
104
+ } | null;
105
+ undoSelectionChange: () => void;
106
+ dismissSelectionUndo: () => void;
80
107
  selectedCategory: string | null;
81
108
  setSelectedCategory: (category: string | null) => void;
82
109
  selectedSport: string | null;
@@ -100,6 +127,8 @@ export interface PlaceEntryContextValue {
100
127
  gameVariant?: GameVariant;
101
128
  /** Drop the per-fixture swipe deck the variant layouts offer. */
102
129
  disableEventSwipe?: boolean;
130
+ /** Look of the swipe view: the card `stack` (default) or the one-question `run`. */
131
+ swipeVariant?: SwipeVariant;
103
132
  /** Let players star a sport in the rail to pin it up front (per device). Off by default. */
104
133
  enableSportFavourites?: boolean;
105
134
  filterSport?: string;
@@ -163,11 +192,15 @@ export interface PlaceEntryProviderProps {
163
192
  /** Game discovery layout; native supports `shelf`, with web-only layouts falling back. */
164
193
  gameVariant?: GameVariant;
165
194
  disableEventSwipe?: boolean;
195
+ /** Look of the swipe view: the card `stack` (default) or the one-question `run`. */
196
+ swipeVariant?: SwipeVariant;
166
197
  /** Let players star a sport in the rail to pin it up front (per device). Off by default. */
167
198
  yesNoLabels?: YesNoLabels;
168
199
  enableSportFavourites?: boolean;
169
200
  onEntryPlaced?: (entry: GameEntry) => void;
170
201
  onBeforeSubmit?: (betAmount: number) => void | Promise<void>;
202
+ /** Integrator's own entry id — shown where "Entry #id successfully submitted" names the entry. Set it from `onEntryPlaced`. */
203
+ entryReference?: string;
171
204
  onCancel?: () => void;
172
205
  onShare?: (data: ShareData) => void;
173
206
  onRecharge?: () => void;
@@ -177,4 +210,4 @@ export interface PlaceEntryProviderProps {
177
210
  sportDisplayNames?: SportDisplayNameOverrides;
178
211
  categoryDisplayNames?: CategoryDisplayNameOverrides;
179
212
  }
180
- 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, enableSportFavourites, yesNoLabels, onEntryPlaced, onBeforeSubmit, onCancel, onShare, onRecharge, onClearEventFilter, screenSize, howToPlayMarkdown: howToPlayMarkdownProp, sportDisplayNames, categoryDisplayNames, }: PlaceEntryProviderProps): import("react/jsx-runtime").JSX.Element;
213
+ 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, sportDisplayNames, categoryDisplayNames, }: PlaceEntryProviderProps): import("react/jsx-runtime").JSX.Element;
@@ -16,7 +16,6 @@ export interface FilterChipCarouselProps {
16
16
  bodyFont?: string;
17
17
  }
18
18
  export declare function FilterChipCarousel({ groups, theme, bodyFont, }: FilterChipCarouselProps): import("react/jsx-runtime").JSX.Element | null;
19
- export declare function FilterChipPanel({ groups, theme, bodyFont }: FilterChipCarouselProps): import("react/jsx-runtime").JSX.Element | null;
20
19
  export interface FilterChipRowProps extends FilterChipGroup {
21
20
  theme: BladeTheme;
22
21
  bodyFont?: string;
@@ -0,0 +1,35 @@
1
+ import { default as React } from 'react';
2
+ import { Proposition, RenderTeamLogo, SportSelectorProps } from '../../shared/types';
3
+ import { BladeTheme } from '../../shared/themes';
4
+ /** A header key names two teams when it splits on " vs " — `MatchupTeams`' own test. */
5
+ export declare function isMatchupKey(key?: string | null): boolean;
6
+ /** The runner's silk, for single-event rows; under an "A vs B" header the logos are already up top. */
7
+ export declare function runnerLogo(prop: Proposition, renderTeamLogo: SportSelectorProps['renderTeamLogo'], headerKey?: string | null): React.ReactNode;
8
+ export declare function CompositePropositionText({ prop, colors: c, size, componentById, textStyle, textColor, renderTeamLogo, theme, }: {
9
+ prop: Proposition;
10
+ colors: {
11
+ primary: string;
12
+ text: string;
13
+ textMuted?: string;
14
+ textAltMuted?: string;
15
+ backgroundAlt?: string;
16
+ border?: string;
17
+ };
18
+ size?: 'sm' | 'md';
19
+ componentById?: ReadonlyMap<number, Proposition>;
20
+ /** Replaces the size-derived type — the variant layouts set their own. */
21
+ textStyle?: {
22
+ fontSize: number;
23
+ fontWeight: '400' | '500' | '600' | '700';
24
+ lineHeight?: number;
25
+ textAlign?: 'left' | 'center';
26
+ };
27
+ /** Replaces `colors.text` on the question itself, legs included. */
28
+ textColor?: string;
29
+ /**
30
+ * Supplied, a leg names its fixture with the two club badges instead of a
31
+ * text chip — far lighter in a row. Falls back to the chip without it.
32
+ */
33
+ renderTeamLogo?: RenderTeamLogo;
34
+ theme?: BladeTheme;
35
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,37 @@
1
+ import { StyleProp, ViewStyle } from 'react-native';
1
2
  import { BladeTheme } from '../types';
2
3
  export interface QuickPickButtonProps {
3
4
  onPress: () => void;
4
5
  onDoubleClick?: () => void;
5
6
  label?: string;
7
+ /** sm fits a one-row (inline) page header at 44px. Defaults to the system's header. */
6
8
  size?: 'md' | 'sm';
7
9
  yesColor?: string;
8
10
  noColor?: string;
9
11
  theme?: BladeTheme;
12
+ menu?: boolean;
13
+ expanded?: boolean;
14
+ /** What a press will do, e.g. "Fill 6 for me". Shown by the deck style. */
15
+ hint?: string;
10
16
  }
11
- export declare function QuickPickButton({ onPress, onDoubleClick, label, size, yesColor, noColor, theme: themeProp, }: QuickPickButtonProps): import("react/jsx-runtime").JSX.Element;
17
+ export interface QuickPickDeckButtonProps {
18
+ onPress: () => void;
19
+ onDoubleClick?: () => void;
20
+ /** What a press will do, e.g. "Fill 6 for me". */
21
+ hint?: string;
22
+ /** solid on its own; paper beside a main button, so that one stays the first choice. */
23
+ tone?: 'solid' | 'paper';
24
+ theme?: BladeTheme;
25
+ menu?: boolean;
26
+ expanded?: boolean;
27
+ disabled?: boolean;
28
+ style?: StyleProp<ViewStyle>;
29
+ }
30
+ /** QuickPick's shuffle mark. */
31
+ export declare function QuickPickIcon({ size, color }: {
32
+ size?: number;
33
+ color: string;
34
+ }): import("react/jsx-runtime").JSX.Element;
35
+ /** QuickPick as a small deck: the game icons' stacked tiles, an accent shuffle tile and a line saying what it will do. */
36
+ export declare function QuickPickDeckButton({ onPress, onDoubleClick, hint, tone, theme: themeProp, menu, expanded, disabled, style, }: QuickPickDeckButtonProps): import("react/jsx-runtime").JSX.Element;
37
+ export declare function QuickPickButton({ onPress, onDoubleClick, label, size, yesColor, noColor, theme: themeProp, menu, expanded, hint, }: QuickPickButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,6 @@
1
+ import { ComponentProps } from 'react';
2
+ import { TouchableOpacity } from 'react-native';
3
+ import { BladeTheme } from '../../shared/themes';
1
4
  export interface QuickPickMenuColors {
2
5
  background: string;
3
6
  backgroundAlt: string;
@@ -6,6 +9,8 @@ export interface QuickPickMenuColors {
6
9
  }
7
10
  export interface QuickPickMenuProps {
8
11
  counts: number[];
12
+ /** The size the card is on now, marked in the Shelf menu. */
13
+ current?: number;
9
14
  onPick: (count: number) => void;
10
15
  onDoubleAction?: () => void;
11
16
  colors: QuickPickMenuColors;
@@ -13,5 +18,19 @@ export interface QuickPickMenuProps {
13
18
  direction?: 'down' | 'up';
14
19
  /** Themed elevation for the dropdown (pass `elevatedShadow(theme)`). */
15
20
  menuShadow?: string;
21
+ /** Rounds the menu's corners to the theme's radius when set. */
22
+ theme?: BladeTheme;
23
+ /** What the trigger will do, shown by the deck QuickPick style. */
24
+ hint?: string;
25
+ /** "Fill the other 6": keep the player's picks, fill the empty slots. */
26
+ onFill?: () => void;
27
+ fillLabel?: string;
28
+ /** "Randomise all 8": throw the card away and pick it afresh. */
29
+ onRandomise?: () => void;
30
+ randomiseLabel?: string;
16
31
  }
17
- export declare function QuickPickMenu({ counts, onPick, onDoubleAction, colors, align, direction, menuShadow }: QuickPickMenuProps): import("react/jsx-runtime").JSX.Element;
32
+ /** A list / menu row: the shared hoverTint over the row, nothing else. Web twin: MenuRow in the web QuickPickMenu. */
33
+ export declare function MenuRow({ theme: themeProp, style, ...rest }: ComponentProps<typeof TouchableOpacity> & {
34
+ theme?: BladeTheme;
35
+ }): import("react/jsx-runtime").JSX.Element;
36
+ export declare function QuickPickMenu({ counts, current, onPick, onDoubleAction, colors, align, direction, menuShadow, theme, hint, onFill, fillLabel, onRandomise, randomiseLabel }: QuickPickMenuProps): import("react/jsx-runtime").JSX.Element;
@@ -6,7 +6,7 @@ export interface SelectionsPageProps {
6
6
  onBack?: () => void;
7
7
  /** Hide the built-in title section (use `<SelectionsPageTitle />` separately) */
8
8
  hideTitle?: boolean;
9
- /** Hide the built-in action buttons (use `<SelectionsPageActions />` separately) */
9
+ /** Hide the built-in action buttons (use `<SelectionsPageActions />` separately, with `<SelectionUndoSnackbar />` just above it) */
10
10
  hideActions?: boolean;
11
11
  defaultView?: SelectionsView;
12
12
  view?: SelectionsView;
@@ -19,10 +19,13 @@ 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 the live bet slip. Must be inside `<PlaceEntryProvider>`. */
23
- export declare function SelectionsPageActions({ onNext, onBack, hideButtons, }: {
22
+ /**
23
+ * What the last QuickPick or Clear picks did, with Undo: a white bar just above the dock, gone after 6s.
24
+ * Game Shelf picks only. Hosts that render `<SelectionsPageActions />` themselves mount this just above their dock.
25
+ */
26
+ export declare function SelectionUndoSnackbar(): import("react/jsx-runtime").JSX.Element | null;
27
+ export declare function SelectionsPageActions({ onNext, onBack, }: {
24
28
  onNext?: () => void;
25
29
  onBack?: () => void;
26
- hideButtons?: boolean;
27
30
  }): import("react/jsx-runtime").JSX.Element;
28
31
  export declare function SelectionsPage({ onNext, onBack, hideTitle, hideActions, defaultView, view: controlledView, onViewChange, hideViewSwitch, onSwipeDragStateChange, }: SelectionsPageProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,62 @@
1
+ import { default as React } from 'react';
2
+ import { TouchableOpacity, StyleProp, ViewStyle, ViewProps } from 'react-native';
3
+ import { BladeTheme } from '../types';
4
+ import { DrawnCover } from '../../shared/shelf-covers';
5
+ import { ShelfPipState } from '../../shared/shelf-ui';
6
+ export declare function useShelfTheme(theme?: BladeTheme): BladeTheme;
7
+ /** A white card on the light page: hairline border, soft shadow, radius 16. */
8
+ export declare function ShelfCard({ theme: themeProp, padded, style, ...rest }: ViewProps & {
9
+ theme?: BladeTheme;
10
+ padded?: boolean;
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ /** The one action bar: a white card at the bottom of the page (RN has no sticky, so it closes the page). */
13
+ export declare function ShelfDock({ theme: themeProp, style, ...rest }: ViewProps & {
14
+ theme?: BladeTheme;
15
+ }): import("react/jsx-runtime").JSX.Element;
16
+ export interface ShelfOptionProps {
17
+ theme?: BladeTheme;
18
+ selected: boolean;
19
+ /** A second, smaller line (a count or a detail); makes the option 52 tall. */
20
+ sub?: React.ReactNode;
21
+ disabled?: boolean;
22
+ onPress?: () => void;
23
+ accessibilityLabel?: string;
24
+ accessibilityRole?: 'button' | 'tab' | 'radio' | 'menuitem';
25
+ testID?: string;
26
+ style?: StyleProp<ViewStyle>;
27
+ children: React.ReactNode;
28
+ }
29
+ /** Every chip, filter, tab and option: teal with light text when chosen, white with a hairline when not. */
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. */
32
+ export declare function ShelfPips({ theme: themeProp, states, label, style }: {
33
+ theme?: BladeTheme;
34
+ states: readonly ShelfPipState[];
35
+ label?: string;
36
+ style?: StyleProp<ViewStyle>;
37
+ }): import("react/jsx-runtime").JSX.Element;
38
+ /**
39
+ * A cover or banner's drawn art (`theme.shelf.coverStyle`): its pattern, tiles and mark. `frame` places
40
+ * the art box in px; inside it everything is a share of the box. Sits over its parent, full bleed.
41
+ * Web twin: DrawnArt in the web ShelfKit.
42
+ */
43
+ export declare function DrawnArt({ drawn, frame, dim }: {
44
+ drawn: DrawnCover;
45
+ frame: {
46
+ left?: number;
47
+ right?: number;
48
+ top: number;
49
+ size: number;
50
+ };
51
+ dim?: boolean;
52
+ }): import("react/jsx-runtime").JSX.Element;
53
+ /**
54
+ * A borderless picture button (shelf cover, category banner): a press sinks it;
55
+ * hover and `lit` draw a 3px `ring` inside its edge. Web: the `.gs-item` CSS and
56
+ * ShelfCategoryBanner's ring overlay.
57
+ */
58
+ export declare function ShelfArtButton({ ring, radius, lit, children, style, ...rest }: React.ComponentProps<typeof TouchableOpacity> & {
59
+ ring: string;
60
+ radius: number;
61
+ lit?: boolean;
62
+ }): import("react/jsx-runtime").JSX.Element;
@@ -5,7 +5,7 @@ export interface SportRailProps {
5
5
  label?: string | null;
6
6
  /** Line under the heading. Pass `null` to drop it; omit for the default hint. */
7
7
  sublabel?: string | null;
8
- /** Controls parked on the heading's right — the track keeps the full width. */
8
+ /** Controls under the track — search and Swipe on the picks screen. */
9
9
  actions?: React.ReactNode;
10
10
  style?: StyleProp<ViewStyle>;
11
11
  }
@@ -1,9 +1,4 @@
1
- import { default as React } from 'react';
2
- import { Proposition, RenderTeamLogo, SportSelectorProps } from '../../shared/types';
3
- /** A header key names two teams when it splits on " vs " — `MatchupTeams`' own test. */
4
- export declare function isMatchupKey(key?: string | null): boolean;
5
- /** The runner's silk, for single-event rows; under an "A vs B" header the logos are already up top. */
6
- export declare function runnerLogo(prop: Proposition, renderTeamLogo: SportSelectorProps['renderTeamLogo'], headerKey?: string | null): React.ReactNode;
1
+ import { SportSelectorProps } from '../../shared/types';
7
2
  /** "A vs B" as a header — names stack beside the "vs" on a phone, one line from 640px up. */
8
3
  export declare function MatchupTeams({ matchup, renderTeamLogo, altText, mutedColor, size, }: {
9
4
  matchup: string;
@@ -12,31 +7,4 @@ export declare function MatchupTeams({ matchup, renderTeamLogo, altText, mutedCo
12
7
  mutedColor: string;
13
8
  size?: 'sm' | 'md';
14
9
  }): import("react/jsx-runtime").JSX.Element;
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
10
  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;
@@ -4,6 +4,7 @@ export interface SuccessPageProps {
4
4
  onPlayAgain?: () => void;
5
5
  /** Called when "Done" is pressed */
6
6
  onDone?: () => void;
7
+ /** @deprecated Unused: the success page has no back. */
7
8
  onBack?: () => void;
8
9
  onShare?: (data: ShareData) => void;
9
10
  /** Hide the built-in title section (use `<SuccessPageTitle />` separately) */
@@ -11,14 +12,17 @@ export interface SuccessPageProps {
11
12
  /** Hide the built-in action buttons (use `<SuccessPageActions />` separately) */
12
13
  hideActions?: boolean;
13
14
  }
14
- export declare function SuccessPageTitle({ onBack, hideActions, }?: {
15
+ export declare function SuccessPageTitle(_props?: {
16
+ /** @deprecated The success page has no back: it would reopen the review of an entry that is already placed. */
15
17
  onBack?: () => void;
18
+ /** @deprecated Done lives in the dock as "View my entries". */
19
+ onDone?: () => void;
16
20
  hideActions?: boolean;
17
21
  }): import("react/jsx-runtime").JSX.Element;
18
- /** Renders Place Another + Share + Done buttons. Must be inside `<PlaceEntryProvider>`. */
22
+ /** Renders the dock: View my entries + Play again. Must be inside `<PlaceEntryProvider>`. */
19
23
  export declare function SuccessPageActions({ onPlayAgain, onDone, onShare, }: {
20
24
  onPlayAgain?: () => void;
21
25
  onDone?: () => void;
22
26
  onShare?: (data: ShareData) => void;
23
27
  }): 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;
28
+ export declare function SuccessPage({ onPlayAgain, onDone, onShare, hideTitle, hideActions }: SuccessPageProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1,8 +1,9 @@
1
1
  import { default as React } from 'react';
2
+ import { View } from 'react-native';
2
3
  import { BladeTheme } from '../utils/themes';
3
- import { FlyDirection } from '../../shared/swipe-deck';
4
+ import { FlyDirection, SwipeVariant } from '../../shared/swipe-deck';
4
5
  import { Proposition } from '../../shared/types';
5
- export type { FlyDirection };
6
+ export type { FlyDirection, SwipeVariant };
6
7
  export interface SwipeCardApi {
7
8
  fly: (direction: FlyDirection) => void;
8
9
  }
@@ -13,16 +14,55 @@ export interface SwipeCardProps {
13
14
  depth?: number;
14
15
  enterFrom?: FlyDirection | null;
15
16
  canSkip?: boolean;
17
+ /** `run` shows only the top card and fades it instead of stamping it. @default 'stack' */
18
+ variant?: SwipeVariant;
16
19
  onResolve: (id: number, answer: 'yes' | 'no' | null) => void;
17
20
  registerApi?: (api: SwipeCardApi | null) => void;
18
21
  onDragStateChange?: (dragging: boolean) => void;
22
+ /**
23
+ * Take the touch on contact instead of on the first move. Set it inside an RN `Modal`: the modal host claims any
24
+ * touch start nothing below it claims, and only an ancestor of the holder can take a touch over, so a card that
25
+ * waits for movement never gets the drag. Leave it off on a scrolling page, where waiting lets vertical drags scroll.
26
+ */
27
+ claimTouchStart?: boolean;
19
28
  children: React.ReactNode;
20
29
  }
21
- export declare function SwipeCard({ prop, theme: themeProp, depth, enterFrom, canSkip, onResolve, registerApi, onDragStateChange, children, }: SwipeCardProps): import("react/jsx-runtime").JSX.Element;
30
+ export declare function SwipeCard({ prop, theme: themeProp, depth, enterFrom, canSkip, variant, onResolve, registerApi, onDragStateChange, claimTouchStart, children, }: SwipeCardProps): import("react/jsx-runtime").JSX.Element;
22
31
  export interface SwipeCardFaceProps {
23
32
  prop: Proposition;
24
33
  }
25
34
  export declare function SwipeCardFace({ prop }: SwipeCardFaceProps): import("react/jsx-runtime").JSX.Element;
35
+ /**
36
+ * Set by {@link SwipeRunControls}: measures the pad that made a new pick and
37
+ * its `tile`, flies a copy between them, then calls `land`. Returns a cancel,
38
+ * or null when it can't fly.
39
+ */
40
+ export type RunLaunch = (answer: 'yes' | 'no', tile: View, face: {
41
+ number: number;
42
+ color: string;
43
+ }, land: () => void) => (() => void) | null;
44
+ /**
45
+ * The run's picks, numbered top-down beside the question — 1 is the first. A pick
46
+ * made here flies in from its pad when `launch` is wired to the controls;
47
+ * the rest drop in. Tapping one hands it to `onRecall` to be answered again.
48
+ */
49
+ export declare function SwipeRunStack({ launch, onRecall, canRecall }: {
50
+ launch?: React.MutableRefObject<RunLaunch | null>;
51
+ onRecall?: (id: number) => void;
52
+ canRecall?: (id: number) => boolean;
53
+ }): import("react/jsx-runtime").JSX.Element;
54
+ export interface SwipeRunControlsProps {
55
+ onFly: (direction: FlyDirection) => void;
56
+ onUndo: () => void;
57
+ canUndo: boolean;
58
+ canSkip: boolean;
59
+ /** Whether the top card can take this answer right now. */
60
+ canAnswer: (answer: 'yes' | 'no') => boolean;
61
+ /** Shared with {@link SwipeRunStack} so new picks fly from these pads. */
62
+ launch?: React.MutableRefObject<RunLaunch | null>;
63
+ }
64
+ /** The run's controls: tall Yes/No pads with the gesture spelt out, then Undo and Skip. */
65
+ export declare function SwipeRunControls({ onFly, onUndo, canUndo, canSkip, canAnswer, launch }: SwipeRunControlsProps): import("react/jsx-runtime").JSX.Element;
26
66
  export interface SwipeDeckProps {
27
67
  onBack?: () => void;
28
68
  onNext?: () => void;
@@ -0,0 +1,12 @@
1
+ export interface YesNoMultiLogoProps {
2
+ /** Wordmark font size in px; the tiles and pipe scale with it. @default 22 */
3
+ size?: number;
4
+ }
5
+ /**
6
+ * The YESNO Multi horizontal logo: YESNO wordmark, the stacked-tile mark, a pipe, Multi®.
7
+ * Drawn in type and shapes from the brand master (62_YESNO_Multi_Horizontal.svg) so it
8
+ * follows the theme ink. Web twin: src/react/components/YesNoMultiLogo.tsx.
9
+ */
10
+ export declare function YesNoMultiLogo({ size }: YesNoMultiLogoProps): import("react/jsx-runtime").JSX.Element;
11
+ /** The page sign-off every page ends with: the logo, small and quiet, centred under the content. */
12
+ export declare function YesNoMultiFooter(): import("react/jsx-runtime").JSX.Element;