@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
@@ -0,0 +1,30 @@
1
+ import { BladeTheme } from '../../shared/themes';
2
+ import { SelectionVariant } from '../../shared/selection-variants';
3
+ /**
4
+ * Picks-screen loading skeletons, one per layout the loaded list can take.
5
+ * Each copies its layout's rails, shells and row anatomy — the paddings,
6
+ * radii and the Yes/No pair at the system's real size — from SportSelector,
7
+ * SportRail, ChipRail, SelectionVariantList and DenseUi, so nothing moves when
8
+ * the propositions land. Twin: react-native/components/PicksSkeletons.
9
+ */
10
+ export type PicksSkeletonLayout = 'kit' | 'split' | 'split-inline' | 'compact' | 'shelf' | 'call' | 'dense';
11
+ /** The layout SportSelector draws for the selection variant it resolved. */
12
+ export declare function picksSkeletonLayout(variant?: SelectionVariant): PicksSkeletonLayout;
13
+ export interface PicksSkeletonProps {
14
+ theme: BladeTheme;
15
+ /** The selection layout SportSelector resolved; undefined is the packaged list. */
16
+ variant?: SelectionVariant;
17
+ /** Sports on offer when the screen carries the sport step; undefined when it has none. */
18
+ sports?: number;
19
+ /** The rail's heading line carries controls (the Swipe-all pill). */
20
+ actions?: boolean;
21
+ /** The packaged list's matchup header fill — it follows the game colour. */
22
+ headerBg?: string;
23
+ /** The packaged list's raised-card shadow. */
24
+ shadow?: string;
25
+ /** The host draws club badges. */
26
+ logos?: boolean;
27
+ /** Fixtures carry a Swipe pill. */
28
+ swipe?: boolean;
29
+ }
30
+ export declare function PicksSkeleton({ theme, variant, sports, actions, headerBg, shadow, logos, swipe, }: PicksSkeletonProps): import("react/jsx-runtime").JSX.Element;
@@ -5,13 +5,15 @@ import { PreviewCallPayouts } from '../../shared/use-call-payouts';
5
5
  import { UiVariant } from '../../shared/ui-variant';
6
6
  import { default as React } from 'react';
7
7
  import { BladeApiClient } from '../utils/api-client';
8
- import { YesNoLabels } from '../../shared/utils';
8
+ import { YesNoLabels, EntryCategory } from '../../shared/utils';
9
9
  import { Game, Proposition, SportSummary, GameEntry, TopPayoutsResponse, ShareData, ScreenSize } from '../types';
10
10
  import { BladeTheme, BladeThemeSet, ColorScheme } from '../utils/themes';
11
11
  import { SportDisplayNameOverrides, CategoryDisplayNameOverrides } from '../utils';
12
12
  import { RenderTeamLogo, RenderPropositionSilk, GamePermittedRule, GameCategory } from '../../shared/types';
13
13
  import { SelectionVariant } from '../../shared/selection-variants';
14
+ import { SwipeVariant } from '../../shared/swipe-deck';
14
15
  import { useCorrelationSteering } from '../../shared/correlation-steering';
16
+ import { QuickPickMode } from '../../shared/selection-caps';
15
17
  import { SameGameMultiEvent } from '../../shared/same-game-multi';
16
18
  export interface PlaceEntryContextValue {
17
19
  gameLibrary: GameLibrary<PlaceEntryContextValue>;
@@ -24,6 +26,8 @@ export interface PlaceEntryContextValue {
24
26
  /** Component legs of composite propositions, by id — for per-leg event labels. */
25
27
  compositeComponentById: ReadonlyMap<number, Proposition>;
26
28
  propositionsForCategoryPicker: Proposition[];
29
+ /** 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. */
30
+ availableCategories: EntryCategory[];
27
31
  propositionsForSportPicker: Proposition[];
28
32
  sportsForSelectedGame: string[];
29
33
  /** The sports the switcher can offer, busiest first, with their pick counts. */
@@ -46,6 +50,8 @@ export interface PlaceEntryContextValue {
46
50
  showCorrelationDebug: boolean;
47
51
  canSelectAnswer: (id: number, answer: 'yes' | 'no') => boolean;
48
52
  answeredCount: number;
53
+ /** Answered ids in the order they were picked — `selections` keys are numeric, so they sort. */
54
+ pickOrder: number[];
49
55
  betAmount: number;
50
56
  setBetAmount: (v: number) => void;
51
57
  expectedCorrect: number;
@@ -68,7 +74,12 @@ export interface PlaceEntryContextValue {
68
74
  userBalance?: number;
69
75
  hasSufficientBalance: boolean;
70
76
  refreshUserBalance: () => Promise<void>;
71
- handleSubmit: () => Promise<void>;
77
+ /** Two-stage: the first call arms `confirmPending`, the second places. Resolves true once placed. */
78
+ handleSubmit: () => Promise<boolean>;
79
+ /** The first Place entry press landed — buttons read "Confirm entry" until placed or the entry changes. */
80
+ confirmPending: boolean;
81
+ /** Integrator's own entry id, shown on the success page in place of BLADE's `#id`. */
82
+ entryReference?: string;
72
83
  selectGame: (game: Game) => void;
73
84
  goToSportSelection: () => void;
74
85
  goToConfirmation: () => void;
@@ -79,7 +90,23 @@ export interface PlaceEntryContextValue {
79
90
  correlationTargetCount: number;
80
91
  toggleSelection: (id: number, answer: 'yes' | 'no') => void;
81
92
  quickPickGame: (game: Game, count: number, stake?: number) => void;
82
- quickPickSelections: (count: number) => number;
93
+ /** Fills the empty slots only — existing picks stay. Returns the total picked after. */
94
+ /** fill (default) keeps the player's picks and fills or trims to `count`; replace randomises the whole card. */
95
+ quickPickSelections: (count: number, mode?: QuickPickMode) => number;
96
+ /** Ids QuickPick answered that still hold its answer, so rows can say so. */
97
+ quickPickedIds: number[];
98
+ /** Clear picks: drop every pick at once. Undoable. */
99
+ clearSelections: () => void;
100
+ /** Pick `id` in place of `out` (the picks holding its slot) as one undoable change. */
101
+ swapSelection: (id: number, answer: 'yes' | 'no', out: readonly number[]) => void;
102
+ /** The last bulk change (QuickPick fill, Clear picks) while it can still be taken back. */
103
+ /** The last bulk change, for the snackbar: what QuickPick or Clear picks did. */
104
+ selectionUndo: {
105
+ message: string;
106
+ kind: 'quickpick' | 'clear' | 'swap';
107
+ } | null;
108
+ undoSelectionChange: () => void;
109
+ dismissSelectionUndo: () => void;
83
110
  selectedCategory: string | null;
84
111
  setSelectedCategory: (category: string | null) => void;
85
112
  selectedSport: string | null;
@@ -103,6 +130,8 @@ export interface PlaceEntryContextValue {
103
130
  gameVariant?: GameVariant;
104
131
  /** Drop the per-fixture swipe deck the variant layouts offer. */
105
132
  disableEventSwipe?: boolean;
133
+ /** Look of the swipe view: the card `stack` (default) or the one-question `run`. */
134
+ swipeVariant?: SwipeVariant;
106
135
  enableSportFavourites?: boolean;
107
136
  filterSport?: string;
108
137
  initialSport?: string;
@@ -175,10 +204,14 @@ export interface PlaceEntryProviderProps {
175
204
  /** Optional game discovery layout, independent of uiVariant. `cards`, `split` and `compare` are web-only; native renders `shelf`. */
176
205
  gameVariant?: GameVariant;
177
206
  disableEventSwipe?: boolean;
207
+ /** Look of the swipe view: the card `stack` (default) or the one-question `run`. */
208
+ swipeVariant?: SwipeVariant;
178
209
  yesNoLabels?: YesNoLabels;
179
210
  enableSportFavourites?: boolean;
180
211
  onEntryPlaced?: (entry: GameEntry) => void;
181
212
  onBeforeSubmit?: (betAmount: number) => void | Promise<void>;
213
+ /** Integrator's own entry id — shown where "Entry #id successfully submitted" names the entry. Set it from `onEntryPlaced`. */
214
+ entryReference?: string;
182
215
  onCancel?: () => void;
183
216
  onShare?: (data: ShareData) => void;
184
217
  onRecharge?: () => void;
@@ -190,4 +223,4 @@ export interface PlaceEntryProviderProps {
190
223
  /** Map entry categories to UI labels. */
191
224
  categoryDisplayNames?: CategoryDisplayNameOverrides;
192
225
  }
193
- export declare function PlaceEntryProvider({ gameLibrary, apiClient: suppliedApiClient, scopePropositionsToSport, 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;
226
+ export declare function PlaceEntryProvider({ gameLibrary, apiClient: suppliedApiClient, scopePropositionsToSport, 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;
@@ -23,4 +23,3 @@ export interface FilterChipRowProps extends FilterChipGroup {
23
23
  className?: string;
24
24
  }
25
25
  export declare function FilterChipRow({ label, options, value, onChange, theme, bodyFont, className, }: FilterChipRowProps): import("react/jsx-runtime").JSX.Element;
26
- export declare function FilterChipPanel({ groups, theme, bodyFont, className }: FilterChipCarouselProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,38 @@
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, textClass: textClassOverride, textColor, eventLabels, 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 classes — the variant layouts set their own. */
21
+ textClass?: string;
22
+ /** Replaces `colors.text` on the question itself, legs included. */
23
+ textColor?: string;
24
+ /**
25
+ * How a leg names its fixture. `show` stacks the label above each leg —
26
+ * right where rows have room. `hover` keeps the legs on one line and puts
27
+ * the fixture in the tooltip instead, for compact rows like the slip and
28
+ * the confirm list. Either way the title attribute carries it.
29
+ */
30
+ eventLabels?: 'show' | 'hover';
31
+ /**
32
+ * Supplied, a leg names its fixture with the two club badges instead of a
33
+ * text chip — far lighter in a row, and the full matchup stays in the
34
+ * tooltip. Falls back to the text chip when the host renders no logos.
35
+ */
36
+ renderTeamLogo?: RenderTeamLogo;
37
+ theme?: BladeTheme;
38
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,37 @@
1
+ import { default as React } from 'react';
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?: React.CSSProperties;
29
+ }
30
+ /** QuickPick's shuffle mark. Decorative unless given a role and label. */
31
+ export declare function QuickPickIcon({ size, color, ...rest }: {
32
+ size?: number;
33
+ color?: string;
34
+ } & React.SVGProps<SVGSVGElement>): 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,5 @@
1
+ import { default as React } from 'react';
2
+ import { BladeTheme } from '../../shared/themes';
1
3
  export interface QuickPickMenuColors {
2
4
  background: string;
3
5
  backgroundAlt: string;
@@ -6,6 +8,8 @@ export interface QuickPickMenuColors {
6
8
  }
7
9
  export interface QuickPickMenuProps {
8
10
  counts: number[];
11
+ /** The size the card is on now, marked in the Shelf menu. */
12
+ current?: number;
9
13
  onPick: (count: number) => void;
10
14
  onDoubleAction?: () => void;
11
15
  colors: QuickPickMenuColors;
@@ -13,5 +17,19 @@ export interface QuickPickMenuProps {
13
17
  direction?: 'down' | 'up';
14
18
  /** Themed elevation for the dropdown (pass `elevatedShadow(theme)`). */
15
19
  menuShadow?: string;
20
+ /** Rounds the menu's corners to the theme's radius when set. */
21
+ theme?: BladeTheme;
22
+ /** What the trigger will do, shown by the deck QuickPick style. */
23
+ hint?: string;
24
+ /** "Fill the other 6": keep the player's picks, fill the empty slots. */
25
+ onFill?: () => void;
26
+ fillLabel?: string;
27
+ /** "Randomise all 8": throw the card away and pick it afresh. */
28
+ onRandomise?: () => void;
29
+ randomiseLabel?: string;
16
30
  }
17
- export declare function QuickPickMenu({ counts, onPick, onDoubleAction, colors, align, direction, menuShadow }: QuickPickMenuProps): import("react/jsx-runtime").JSX.Element;
31
+ /** A list / menu row: the shared hoverTint over the row, nothing else. RN twin: MenuRow in the RN QuickPickMenu. */
32
+ export declare function MenuRow({ theme: themeProp, style, ...rest }: React.ButtonHTMLAttributes<HTMLButtonElement> & {
33
+ theme?: BladeTheme;
34
+ }): import("react/jsx-runtime").JSX.Element;
35
+ 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;
@@ -21,11 +21,15 @@ export declare function SelectionsPageTitle({ className, onBack, onNext, hideAct
21
21
  onNext?: () => void;
22
22
  hideActions?: boolean;
23
23
  }): import("react/jsx-runtime").JSX.Element;
24
- /** Renders the live bet slip. Must be inside `<PlaceEntryProvider>`. */
25
- export declare function SelectionsPageActions({ onNext, onBack, hideButtons, className, }: {
24
+ /**
25
+ * What the last QuickPick or Clear picks did, with Undo: a white bar just above the dock, gone after 6s
26
+ * (held while hovered or focused). Game Shelf picks only. Hosts that render `<SelectionsPageActions />`
27
+ * themselves mount this just above their dock, inside the same sticky block.
28
+ */
29
+ export declare function SelectionUndoSnackbar(): import("react/jsx-runtime").JSX.Element | null;
30
+ export declare function SelectionsPageActions({ onNext, onBack, className, }: {
26
31
  onNext?: () => void;
27
32
  onBack?: () => void;
28
- hideButtons?: boolean;
29
33
  className?: string;
30
34
  }): import("react/jsx-runtime").JSX.Element;
31
35
  export declare function SelectionsPage({ onNext, onBack, hideTitle, hideActions, defaultView, view: controlledView, onViewChange, hideViewSwitch, onSwipeDragStateChange, className, }: SelectionsPageProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,43 @@
1
+ import { default as React } from 'react';
2
+ import { BladeTheme } from '../types';
3
+ import { DrawnCover } from '../../shared/shelf-covers';
4
+ import { ShelfPipState } from '../../shared/shelf-ui';
5
+ export declare function useShelfTheme(theme?: BladeTheme): BladeTheme;
6
+ type DivProps = React.HTMLAttributes<HTMLDivElement>;
7
+ /** A white card on the light page: hairline border, soft shadow, radius 16. */
8
+ export declare function ShelfCard({ theme: themeProp, padded, style, ...rest }: DivProps & {
9
+ theme?: BladeTheme;
10
+ padded?: boolean;
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ /** The one action bar: a white card docked to the bottom of the page (sticky on web when asked). */
13
+ export declare function ShelfDock({ theme: themeProp, sticky, style, ...rest }: DivProps & {
14
+ theme?: BladeTheme;
15
+ sticky?: boolean;
16
+ }): import("react/jsx-runtime").JSX.Element;
17
+ type OptionProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'style'> & {
18
+ theme?: BladeTheme;
19
+ selected: boolean;
20
+ /** A second, smaller line (a count or a detail); makes the option 52 tall. */
21
+ sub?: React.ReactNode;
22
+ style?: React.CSSProperties;
23
+ };
24
+ /** Every chip, filter, tab and option: teal with light text when chosen, white with a hairline when not. */
25
+ export declare function ShelfOption({ theme: themeProp, selected, sub, children, disabled, type, style, onMouseEnter, onMouseLeave, onPointerDown, onPointerUp, onFocus, onBlur, ...rest }: OptionProps): import("react/jsx-runtime").JSX.Element;
26
+ /** One progress mark per pick: right fills teal, a miss is outlined, still to play is a hairline grey. */
27
+ export declare function ShelfPips({ theme: themeProp, states, label, style }: {
28
+ theme?: BladeTheme;
29
+ states: readonly ShelfPipState[];
30
+ label?: string;
31
+ style?: React.CSSProperties;
32
+ }): import("react/jsx-runtime").JSX.Element;
33
+ /**
34
+ * A cover or banner's drawn art (`theme.shelf.coverStyle`): its pattern, tiles and mark. `frame` places
35
+ * the art box in any CSS lengths; inside it everything is a share of the box, so it scales with it. Sits over a
36
+ * `position: relative` surface. RN twin: DrawnArt in the RN ShelfKit.
37
+ */
38
+ export declare function DrawnArt({ drawn, frame, className }: {
39
+ drawn: DrawnCover;
40
+ frame: React.CSSProperties;
41
+ className?: string;
42
+ }): import("react/jsx-runtime").JSX.Element;
43
+ export {};
@@ -4,7 +4,7 @@ export interface SportRailProps {
4
4
  label?: string | null;
5
5
  /** Line under the heading. Pass `null` to drop it; omit for the default hint. */
6
6
  sublabel?: string | null;
7
- /** Controls parked on the heading's right — the track keeps the full width. */
7
+ /** Controls under the track — search and Swipe on the picks screen. */
8
8
  actions?: React.ReactNode;
9
9
  className?: string;
10
10
  }
@@ -1,9 +1,4 @@
1
- import { default as React } from 'react';
2
- import { SportSelectorProps, Proposition, RenderTeamLogo } 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 `sm` up. */
8
3
  export declare function MatchupTeams({ matchup, renderTeamLogo, altText, mutedColor, size, }: {
9
4
  matchup: string;
@@ -12,34 +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, textClass: textClassOverride, textColor, eventLabels, 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 classes — the variant layouts set their own. */
28
- textClass?: string;
29
- /** Replaces `colors.text` on the question itself, legs included. */
30
- textColor?: string;
31
- /**
32
- * How a leg names its fixture. `show` stacks the label above each leg —
33
- * right where rows have room. `hover` keeps the legs on one line and puts
34
- * the fixture in the tooltip instead, for compact rows like the slip and
35
- * the confirm list. Either way the title attribute carries it.
36
- */
37
- eventLabels?: 'show' | 'hover';
38
- /**
39
- * Supplied, a leg names its fixture with the two club badges instead of a
40
- * text chip — far lighter in a row, and the full matchup stays in the
41
- * tooltip. Falls back to the text chip when the host renders no logos.
42
- */
43
- renderTeamLogo?: RenderTeamLogo;
44
- }): import("react/jsx-runtime").JSX.Element;
45
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 "Close" / "Done" is clicked */
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) */
@@ -12,16 +13,19 @@ export interface SuccessPageProps {
12
13
  hideActions?: boolean;
13
14
  className?: string;
14
15
  }
15
- export declare function SuccessPageTitle({ className, onBack, hideActions, }: {
16
+ export declare function SuccessPageTitle({ className, }: {
16
17
  className?: string;
18
+ /** @deprecated The success page has no back: it would reopen the review of an entry that is already placed. */
17
19
  onBack?: () => void;
20
+ /** @deprecated Done lives in the dock as "View my entries". */
21
+ onDone?: () => void;
18
22
  hideActions?: boolean;
19
23
  }): import("react/jsx-runtime").JSX.Element;
20
- /** Renders Place Another + Share + Done buttons. Must be inside `<PlaceEntryProvider>`. */
24
+ /** Renders the dock: View my entries + Play again. Must be inside `<PlaceEntryProvider>`. */
21
25
  export declare function SuccessPageActions({ onPlayAgain, onDone, onShare, className, }: {
22
26
  onPlayAgain?: () => void;
23
27
  onDone?: () => void;
24
28
  onShare?: (data: ShareData) => void;
25
29
  className?: string;
26
30
  }): import("react/jsx-runtime").JSX.Element;
27
- export declare function SuccessPage({ onPlayAgain, onDone, onBack, onShare, hideTitle, hideActions, className }: SuccessPageProps): import("react/jsx-runtime").JSX.Element | null;
31
+ export declare function SuccessPage({ onPlayAgain, onDone, onShare, hideTitle, hideActions, className }: SuccessPageProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1,8 +1,8 @@
1
1
  import { default as React } from 'react';
2
2
  import { BladeTheme } from '../utils/themes';
3
- import { FlyDirection } from '../../shared/swipe-deck';
3
+ import { FlyDirection, SwipeVariant } from '../../shared/swipe-deck';
4
4
  import { Proposition } from '../../shared/types';
5
- export type { FlyDirection };
5
+ export type { FlyDirection, SwipeVariant };
6
6
  export interface SwipeCardApi {
7
7
  fly: (direction: FlyDirection) => void;
8
8
  }
@@ -13,16 +13,45 @@ export interface SwipeCardProps {
13
13
  depth?: number;
14
14
  enterFrom?: FlyDirection | null;
15
15
  canSkip?: boolean;
16
+ /** `run` shows only the top card and fades it instead of stamping it. @default 'stack' */
17
+ variant?: SwipeVariant;
16
18
  onResolve: (id: number, answer: 'yes' | 'no' | null) => void;
17
19
  registerApi?: (api: SwipeCardApi | null) => void;
18
20
  onDragStateChange?: (dragging: boolean) => void;
19
21
  children: React.ReactNode;
20
22
  }
21
- export declare function SwipeCard({ prop, theme: themeProp, depth, enterFrom, canSkip, onResolve, registerApi, onDragStateChange, children, }: SwipeCardProps): import("react/jsx-runtime").JSX.Element;
23
+ export declare function SwipeCard({ prop, theme: themeProp, depth, enterFrom, canSkip, variant, onResolve, registerApi, onDragStateChange, children, }: SwipeCardProps): import("react/jsx-runtime").JSX.Element;
22
24
  export interface SwipeCardFaceProps {
23
25
  prop: Proposition;
24
26
  }
25
27
  export declare function SwipeCardFace({ prop }: SwipeCardFaceProps): import("react/jsx-runtime").JSX.Element;
28
+ /**
29
+ * Set by {@link SwipeRunControls}: flies a copy of a new pick's tile from the
30
+ * pad that made it onto `tile`. Returns a cancel, or null when it can't fly.
31
+ */
32
+ export type RunLaunch = (answer: 'yes' | 'no', tile: HTMLElement) => (() => void) | null;
33
+ /**
34
+ * The run's picks, numbered top-down beside the question — 1 is the first. A pick
35
+ * made here flies in from its pad when `launch` is wired to the controls;
36
+ * the rest drop in. Tapping one hands it to `onRecall` to be answered again.
37
+ */
38
+ export declare function SwipeRunStack({ launch, onRecall, canRecall }: {
39
+ launch?: React.MutableRefObject<RunLaunch | null>;
40
+ onRecall?: (id: number) => void;
41
+ canRecall?: (id: number) => boolean;
42
+ }): import("react/jsx-runtime").JSX.Element;
43
+ export interface SwipeRunControlsProps {
44
+ onFly: (direction: FlyDirection) => void;
45
+ onUndo: () => void;
46
+ canUndo: boolean;
47
+ canSkip: boolean;
48
+ /** Whether the top card can take this answer right now. */
49
+ canAnswer: (answer: 'yes' | 'no') => boolean;
50
+ /** Shared with {@link SwipeRunStack} so new picks fly from these pads. */
51
+ launch?: React.MutableRefObject<RunLaunch | null>;
52
+ }
53
+ /** The run's controls: tall Yes/No pads with the gesture spelt out, then Undo and Skip. */
54
+ export declare function SwipeRunControls({ onFly, onUndo, canUndo, canSkip, canAnswer, launch }: SwipeRunControlsProps): import("react/jsx-runtime").JSX.Element;
26
55
  export interface SwipeDeckProps {
27
56
  onBack?: () => void;
28
57
  onNext?: () => void;
@@ -0,0 +1,13 @@
1
+ export interface YesNoMultiLogoProps {
2
+ /** Wordmark font size in px; the tiles and pipe scale with it. @default 22 */
3
+ size?: number;
4
+ className?: string;
5
+ }
6
+ /**
7
+ * The YESNO Multi horizontal logo: YESNO wordmark, the stacked-tile mark, a pipe, Multi®.
8
+ * Drawn in type and shapes from the brand master (62_YESNO_Multi_Horizontal.svg) so it
9
+ * follows the theme ink. RN twin: src/react-native/components/YesNoMultiLogo.tsx.
10
+ */
11
+ export declare function YesNoMultiLogo({ size, className }: YesNoMultiLogoProps): import("react/jsx-runtime").JSX.Element;
12
+ /** The page sign-off every page ends with: the logo, small and quiet, centred under the content. */
13
+ export declare function YesNoMultiFooter(): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,6 @@
1
1
  import { default as React, CSSProperties, MouseEvent, ReactNode } from 'react';
2
2
  import { BladeTheme } from '../../../shared/themes';
3
+ import { ButtonVariant, ButtonSize } from '../../../shared/button-ui';
3
4
  import { YesNoLabels } from '../../../shared/utils';
4
5
  /** Minimum hit area for anything tappable, in px (Apple 44pt / Material 48dp). Shrink the paint, never the target. */
5
6
  export declare const TOUCH_TARGET = 44;
@@ -32,23 +33,67 @@ export declare function Stack({ gap, align, justify, className, style, children,
32
33
  export declare function Row({ gap, align, justify, wrap, className, style, children, as, }: StackProps & {
33
34
  wrap?: boolean;
34
35
  }): import("react/jsx-runtime").JSX.Element;
35
- export type PressableVariant = 'primary' | 'secondary' | 'ghost' | 'danger';
36
- export interface PressableProps {
36
+ type PressHandlers = Pick<React.DOMAttributes<HTMLElement>, 'onMouseEnter' | 'onMouseLeave' | 'onPointerDown' | 'onPointerUp' | 'onFocus' | 'onBlur'>;
37
+ /**
38
+ * The one hover / press / keyboard-focus tracker behind every tappable control.
39
+ * Pass the caller's own handlers so both run. RN twin: `usePress` in RN _primitives.
40
+ */
41
+ export declare function usePress(theirs?: PressHandlers): {
42
+ hovered: boolean;
43
+ pressed: boolean;
44
+ focused: boolean;
45
+ handlers: PressHandlers;
46
+ };
47
+ /**
48
+ * onFocus / onBlur for a text field, or the box drawn around one: the edge turns
49
+ * borderFocus and wears the kit's focus ring, as a Button does. Pass the edge's
50
+ * resting colour so blur puts it back, and give the input itself `outline: 'none'`
51
+ * so the browser's own ring doesn't paint inside the box.
52
+ */
53
+ export declare function fieldFocus(theme: BladeTheme, restBorder: string): {
54
+ onFocus: (e: React.FocusEvent<HTMLElement>) => void;
55
+ onBlur: (e: React.FocusEvent<HTMLElement>) => void;
56
+ };
57
+ /** The shared transition + press sink for anything built on `usePress`. */
58
+ export declare function pressMotion(theme: BladeTheme, pressed: boolean, disabled?: boolean): CSSProperties;
59
+ export interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'style'> {
37
60
  theme: BladeTheme;
38
- variant?: PressableVariant;
39
- size?: 'sm' | 'md' | 'lg';
40
- disabled?: boolean;
61
+ /** primary: the screen's main action. secondary: the filled alternative. quiet: a tint pill for small actions. */
62
+ variant?: ButtonVariant;
63
+ /** lg (52) for the page's main action; md (44) everywhere else. */
64
+ size?: ButtonSize;
41
65
  block?: boolean;
42
- radius?: 'sm' | 'md' | 'lg' | 'pill';
66
+ /** onClick without the event. */
43
67
  onPress?: () => void;
44
- onDoubleClick?: () => void;
45
- type?: 'button' | 'submit';
46
- className?: string;
47
68
  style?: CSSProperties;
48
- children?: ReactNode;
49
- ariaLabel?: string;
50
69
  }
51
- export declare const Pressable: React.ForwardRefExoticComponent<PressableProps & React.RefAttributes<HTMLButtonElement>>;
70
+ /** The kit's one action button. Chips, icon buttons and Yes/No have their own components. */
71
+ export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
72
+ export interface PressCardProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'style'> {
73
+ theme: BladeTheme;
74
+ /** Hold the primary ring: the chosen card, or a keyboard-focused row. */
75
+ lit?: boolean;
76
+ /** The card's own shape. Give its border as borderWidth / borderStyle — the card owns borderColor. */
77
+ style?: CSSProperties;
78
+ }
79
+ /** A whole card that is one button. It keeps its own shape; its hairline turns primary on hover and it sinks on press. */
80
+ export declare const PressCard: React.ForwardRefExoticComponent<PressCardProps & React.RefAttributes<HTMLButtonElement>>;
81
+ export type IconButtonProps = Omit<ButtonProps, 'variant' | 'size' | 'block'> & {
82
+ 'aria-label': string;
83
+ size?: number;
84
+ tone?: 'default' | 'danger';
85
+ };
86
+ /**
87
+ * Icon-only button (back, close, remove, previous / next): a round disc with a
88
+ * hairline ring and the shared hover tint. `size` is the painted disc; the hit
89
+ * area never drops below 44 — a smaller disc keeps its own footprint in the
90
+ * layout and reaches out with negative margins.
91
+ */
92
+ export declare const IconButton: React.ForwardRefExoticComponent<Omit<ButtonProps, "variant" | "size" | "block"> & {
93
+ 'aria-label': string;
94
+ size?: number;
95
+ tone?: "default" | "danger";
96
+ } & React.RefAttributes<HTMLButtonElement>>;
52
97
  export interface TextProps {
53
98
  theme: BladeTheme;
54
99
  variant?: 'display' | 'heading' | 'subheading' | 'body' | 'caption' | 'eyebrow';