@simple-parlay/components 1.30.6-pre.10 → 1.30.6-pre.11
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 +653 -467
- package/dist/react/components/CallPayoutTable.d.ts +7 -1
- package/dist/react/components/EntrySubmission.d.ts +1 -1
- package/dist/react/components/EventSwipeModal.d.ts +4 -0
- package/dist/react/components/GameCardParts.d.ts +28 -0
- package/dist/react/components/GameModeCard.d.ts +6 -2
- package/dist/react/components/GameSelector.d.ts +1 -27
- package/dist/react/components/GameShowcaseCatalogue.d.ts +3 -1
- package/dist/react/components/GameSkeletons.d.ts +24 -0
- package/dist/react/components/HowToPlayButton.d.ts +2 -1
- package/dist/react/components/LoadingIndicators.d.ts +27 -10
- package/dist/react/components/MatchRail.d.ts +23 -1
- package/dist/react/components/MatchTopBar.d.ts +19 -0
- package/dist/react/components/MultiLegTable.d.ts +3 -1
- package/dist/react/components/PageBackButton.d.ts +28 -7
- package/dist/react/components/PageSkeletons.d.ts +24 -0
- package/dist/react/components/PickGroupSection.d.ts +37 -0
- package/dist/react/components/PickerBrand.d.ts +0 -5
- package/dist/react/components/PicksSkeletons.d.ts +30 -0
- package/dist/react/components/PlaceEntryProvider.d.ts +34 -3
- package/dist/react/components/PropositionFilters.d.ts +0 -1
- package/dist/react/components/PropositionParts.d.ts +38 -0
- package/dist/react/components/QuickPickButton.d.ts +24 -1
- package/dist/react/components/QuickPickMenu.d.ts +19 -1
- package/dist/react/components/SafetyNetPage.d.ts +19 -0
- package/dist/react/components/SelectionsPage.d.ts +7 -2
- package/dist/react/components/ShelfKit.d.ts +43 -0
- package/dist/react/components/SportRail.d.ts +1 -1
- package/dist/react/components/SportSelector.d.ts +1 -36
- package/dist/react/components/SuccessPage.d.ts +4 -2
- package/dist/react/components/SwipeDeck.d.ts +32 -3
- package/dist/react/components/YesNoMultiLogo.d.ts +13 -0
- package/dist/react/components/_primitives/index.d.ts +47 -12
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.d.ts +10 -2
- package/dist/react/index.mjs +653 -467
- package/dist/react/utils/themes.d.ts +1 -1
- package/dist/react-native/components/CallGameCatalogue.d.ts +1 -0
- package/dist/react-native/components/CallPayoutTable.d.ts +7 -1
- package/dist/react-native/components/DenseUi.d.ts +2 -9
- package/dist/react-native/components/EntrySubmission.d.ts +1 -1
- package/dist/react-native/components/EventSwipeModal.d.ts +5 -0
- package/dist/react-native/components/GameCardParts.d.ts +29 -0
- package/dist/react-native/components/GameModeCard.d.ts +3 -1
- package/dist/react-native/components/GameSelector.d.ts +0 -27
- package/dist/react-native/components/GameShelfCatalogue.d.ts +0 -5
- package/dist/react-native/components/GameSkeletons.d.ts +23 -0
- package/dist/react-native/components/HowToPlayButton.d.ts +2 -1
- package/dist/react-native/components/LoadingIndicators.d.ts +22 -10
- package/dist/react-native/components/MatchRail.d.ts +23 -2
- package/dist/react-native/components/MatchTopBar.d.ts +17 -0
- package/dist/react-native/components/MultiLegTable.d.ts +3 -1
- package/dist/react-native/components/PageBackButton.d.ts +26 -10
- package/dist/react-native/components/PageSkeletons.d.ts +23 -0
- package/dist/react-native/components/PickGroupSection.d.ts +37 -0
- package/dist/react-native/components/PickerBrand.d.ts +0 -4
- package/dist/react-native/components/PicksSkeletons.d.ts +31 -0
- package/dist/react-native/components/PlaceEntryProvider.d.ts +34 -3
- package/dist/react-native/components/PropositionFilters.d.ts +0 -1
- package/dist/react-native/components/PropositionParts.d.ts +35 -0
- package/dist/react-native/components/QuickPickButton.d.ts +24 -1
- package/dist/react-native/components/QuickPickMenu.d.ts +20 -1
- package/dist/react-native/components/SafetyNetPage.d.ts +17 -0
- package/dist/react-native/components/SelectionsPage.d.ts +6 -2
- package/dist/react-native/components/ShelfKit.d.ts +62 -0
- package/dist/react-native/components/SportRail.d.ts +1 -1
- package/dist/react-native/components/SportSelector.d.ts +1 -33
- package/dist/react-native/components/SuccessPage.d.ts +4 -2
- package/dist/react-native/components/SwipeDeck.d.ts +37 -3
- package/dist/react-native/components/YesNoMultiLogo.d.ts +12 -0
- package/dist/react-native/components/_primitives/index.d.ts +83 -10
- package/dist/react-native/index.cjs +1 -1
- package/dist/react-native/index.d.ts +10 -2
- package/dist/react-native/index.mjs +561 -438
- package/dist/react-native/utils/themes.d.ts +1 -1
- package/dist/shared/button-ui.d.ts +62 -0
- package/dist/shared/call-presentation.d.ts +9 -1
- package/dist/shared/canvas.d.ts +14 -0
- package/dist/shared/correlation-steering.d.ts +7 -0
- package/dist/shared/date-filters.d.ts +0 -23
- package/dist/shared/entry-progress.d.ts +38 -0
- package/dist/shared/game-artwork.d.ts +2 -0
- package/dist/shared/game-flow.d.ts +20 -0
- package/dist/shared/game-icons.d.ts +2 -1
- package/dist/shared/game-shelf-presentation.d.ts +38 -2
- package/dist/shared/hooks.d.ts +1 -1
- package/dist/shared/selection-actions.d.ts +70 -3
- package/dist/shared/selection-caps.d.ts +66 -10
- package/dist/shared/selection-variants.d.ts +5 -0
- package/dist/shared/shelf-covers.d.ts +92 -0
- package/dist/shared/shelf-ui.d.ts +47 -0
- package/dist/shared/swipe-deck.d.ts +10 -0
- package/dist/shared/themes.d.ts +48 -8
- package/dist/shared/tokens.d.ts +7 -0
- package/dist/shared/types.d.ts +6 -1
- package/dist/shared/ui-system.d.ts +4 -3
- package/dist/shared/utils.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { Proposition } from './types';
|
|
2
2
|
export type FlyDirection = 'right' | 'left' | 'up';
|
|
3
|
+
/**
|
|
4
|
+
* How the swipe deck looks. `stack` is the card pile with Yes/No/Skip stamps;
|
|
5
|
+
* `run` is one card at a time over big Yes/No pads, with the picks numbered
|
|
6
|
+
* down a column beside it.
|
|
7
|
+
*/
|
|
8
|
+
export type SwipeVariant = 'stack' | 'run';
|
|
3
9
|
/** How many cards the deck renders in the stack at once. */
|
|
4
10
|
export declare const VISIBLE_DEPTH = 3;
|
|
5
11
|
export interface SwipeDeckState {
|
|
@@ -14,6 +20,10 @@ export interface SwipeDeckState {
|
|
|
14
20
|
} | null;
|
|
15
21
|
resolve: (id: number, answer: 'yes' | 'no' | null) => void;
|
|
16
22
|
undo: () => void;
|
|
23
|
+
/** Whether {@link recall} can bring this pick back — it has to be answered and in this deck's pool. */
|
|
24
|
+
canRecall: (id: number) => boolean;
|
|
25
|
+
/** Clears a pick and puts its card back on top, to be answered again. */
|
|
26
|
+
recall: (id: number) => void;
|
|
17
27
|
}
|
|
18
28
|
/**
|
|
19
29
|
* The platform-free half of the swipe deck — queue, visible stack, and what
|
package/dist/shared/themes.d.ts
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Theme types and color data shared between React and React Native.
|
|
3
|
-
*
|
|
4
|
-
* Platform-specific helpers (CSS custom properties on web, font fallbacks
|
|
5
|
-
* on RN) live in their respective utils/themes.ts files and re-export
|
|
6
|
-
* everything from here.
|
|
7
|
-
*/
|
|
8
1
|
export declare function themeHeading(t: BladeTheme): string;
|
|
9
2
|
export declare function themeLabel(t: BladeTheme): string;
|
|
10
3
|
export declare function themeValue(t: BladeTheme): string;
|
|
@@ -14,9 +7,30 @@ export declare function themeValue(t: BladeTheme): string;
|
|
|
14
7
|
* allowed. Point the Yes/No control at these, never at brand or status tokens.
|
|
15
8
|
*/
|
|
16
9
|
export declare const PRODUCT_YES = "#00C853";
|
|
17
|
-
export declare const PRODUCT_NO = "#
|
|
10
|
+
export declare const PRODUCT_NO = "#D32F2F";
|
|
11
|
+
/** Dark ink for text on a light product fill — 5.4:1 on PRODUCT_YES, where white is only 2.2:1. */
|
|
12
|
+
export declare const PRODUCT_INK = "#123B45";
|
|
18
13
|
export declare function themeProductYes(t: BladeTheme): string;
|
|
19
14
|
export declare function themeProductNo(t: BladeTheme): string;
|
|
15
|
+
/** Text on a Yes/No product fill: white, or PRODUCT_INK when the fill is light. */
|
|
16
|
+
export declare function productTextOn(fill: string): string;
|
|
17
|
+
export type FontWeightValue = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
|
|
18
|
+
export type FontFaces = Partial<Record<FontWeightValue, string>>;
|
|
19
|
+
/**
|
|
20
|
+
* The font file for a family at a weight, from `theme.fonts.faces`, picked
|
|
21
|
+
* the way CSS matches weights: 400–500 look up to 500, then down, then up;
|
|
22
|
+
* lighter looks down first; heavier looks up first. Undefined when the
|
|
23
|
+
* family has no faces listed.
|
|
24
|
+
*/
|
|
25
|
+
export declare function fontFace(theme: BladeTheme | undefined, family: string | undefined, weight: string | number | undefined): string | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* The theme for content drawn straight on the host page rather than inside a
|
|
28
|
+
* card. The same theme on a light page; on a `canvas` page its inks become
|
|
29
|
+
* the on-canvas ones and `primary` becomes the brand accent (selected tabs,
|
|
30
|
+
* dots, back-link hover), so nothing paints dark-on-dark. Cards inside such
|
|
31
|
+
* content take the normal theme.
|
|
32
|
+
*/
|
|
33
|
+
export declare function canvasTheme(t: BladeTheme): BladeTheme;
|
|
20
34
|
export declare function themeAccent(t: BladeTheme): string;
|
|
21
35
|
export declare function themeBrandChip(t: BladeTheme): string;
|
|
22
36
|
export declare function accentOnSurface(surface: string, accent: string | undefined, fallback: string): string;
|
|
@@ -78,6 +92,18 @@ export interface BladeTheme {
|
|
|
78
92
|
surface?: string;
|
|
79
93
|
surfaceElevated?: string;
|
|
80
94
|
borderSubtle?: string;
|
|
95
|
+
/**
|
|
96
|
+
* The host page the components sit on, when it isn't a light page — e.g.
|
|
97
|
+
* a dark brand background with content in white cards. Whatever is drawn
|
|
98
|
+
* straight on it (page titles, labels, quiet buttons, selected tabs) uses
|
|
99
|
+
* `canvasTheme(theme)`; cards keep `background`. Unset: a light page.
|
|
100
|
+
* Not `shelf.canvas`, which is the Shelf system's own panel colour.
|
|
101
|
+
*/
|
|
102
|
+
canvas?: string;
|
|
103
|
+
/** Text and icons straight on `canvas`. Default: white or `text`, whichever reads. */
|
|
104
|
+
onCanvas?: string;
|
|
105
|
+
/** Secondary text straight on `canvas`. Default: `onCanvas` at 72%. */
|
|
106
|
+
onCanvasMuted?: string;
|
|
81
107
|
text: string;
|
|
82
108
|
textAlt?: string;
|
|
83
109
|
textAltMuted?: string;
|
|
@@ -108,6 +134,13 @@ export interface BladeTheme {
|
|
|
108
134
|
tierColors?: Record<string, string>;
|
|
109
135
|
/** Replacement artwork by game icon id — Shelf covers and Showcase tiles; null hides the bundled Shelf cover. */
|
|
110
136
|
artwork?: Record<string, string | null>;
|
|
137
|
+
/**
|
|
138
|
+
* How Shelf covers and category banners are drawn. `brand` (default): no illustrations — every game cover is the
|
|
139
|
+
* YESNO stacked tiles carrying the game's mark on stone, and every category banner its glyph. `art`: the
|
|
140
|
+
* illustrations, with a game that has none drawn in `brand`. `mark` / `stacked` / `tile`: the mark itself on a
|
|
141
|
+
* colour ground — big, over a solid echo, or on a press-to-play tile over a faded pattern of it.
|
|
142
|
+
*/
|
|
143
|
+
coverStyle?: 'art' | 'brand' | 'mark' | 'stacked' | 'tile';
|
|
111
144
|
/** Replacement Showcase hero image by category (sports / racing / prediction / fantasy); null hides it. */
|
|
112
145
|
heroArtwork?: Record<string, string | null>;
|
|
113
146
|
categoryColors?: Record<string, string>;
|
|
@@ -124,6 +157,13 @@ export interface BladeTheme {
|
|
|
124
157
|
body: string;
|
|
125
158
|
heading?: string;
|
|
126
159
|
mono?: string;
|
|
160
|
+
/**
|
|
161
|
+
* Fonts loaded one file per weight, as Expo loads them
|
|
162
|
+
* (`{ Roboto: { 400: 'Roboto_400Regular', 700: 'Roboto_700Bold' } }`),
|
|
163
|
+
* keyed by the family named in body/heading. React Native picks the
|
|
164
|
+
* nearest loaded weight by CSS rules; web ignores it.
|
|
165
|
+
*/
|
|
166
|
+
faces?: Record<string, FontFaces>;
|
|
127
167
|
};
|
|
128
168
|
spacing?: {
|
|
129
169
|
sm: string;
|
package/dist/shared/tokens.d.ts
CHANGED
|
@@ -46,6 +46,13 @@ export interface ResolvedTokens {
|
|
|
46
46
|
export declare const EASING_STANDARD = "cubic-bezier(0.2, 0, 0, 1)";
|
|
47
47
|
export declare const DURATION_FAST = 160;
|
|
48
48
|
export declare const DURATION_STD = 220;
|
|
49
|
+
/**
|
|
50
|
+
* A component's designed corner radius, moved onto the host theme's radius
|
|
51
|
+
* scale — the same slots `resolveTokens` uses: ~8px → sm, ~12px → md,
|
|
52
|
+
* 14px and up → lg, 999 (pill) → full. Small details (6px and under) keep
|
|
53
|
+
* their own radius, as does a theme without `borderRadius`.
|
|
54
|
+
*/
|
|
55
|
+
export declare function themeRadius(theme: BladeTheme | undefined, px: number): number;
|
|
49
56
|
export declare function resolveTokens(theme: BladeTheme): ResolvedTokens;
|
|
50
57
|
/**
|
|
51
58
|
* Soft, themed elevation for a card/menu that lifts off the page. Single source
|
package/dist/shared/types.d.ts
CHANGED
|
@@ -298,6 +298,8 @@ export interface GameSelectorProps {
|
|
|
298
298
|
gameVariant?: GameVariant;
|
|
299
299
|
/** Showcase: `games` is already a curated set, so leave out the dimmed tiles for games not on offer. */
|
|
300
300
|
onlyListedGames?: boolean;
|
|
301
|
+
/** Showcase: leave out the hero image at the top. */
|
|
302
|
+
disableImage?: boolean;
|
|
301
303
|
/** @deprecated Layouts no longer draw their own header; back lives in the page header (`GamePageTitle` / `PageHeader`). */
|
|
302
304
|
onBack?: () => void;
|
|
303
305
|
uiVariant?: UiVariant;
|
|
@@ -328,7 +330,8 @@ export interface SportSelectorProps {
|
|
|
328
330
|
propositions: Proposition[];
|
|
329
331
|
selections: Record<number, 'yes' | 'no'>;
|
|
330
332
|
onToggleSelection: (id: number, answer: 'yes' | 'no') => void;
|
|
331
|
-
|
|
333
|
+
/** Next step: the list's auto-advance, its QuickPick and its footer button. Optional when the page around it owns those. */
|
|
334
|
+
onNext?: () => void;
|
|
332
335
|
onBack: () => void;
|
|
333
336
|
loading?: boolean;
|
|
334
337
|
error?: string | null;
|
|
@@ -399,6 +402,8 @@ export interface EntrySubmissionProps {
|
|
|
399
402
|
/** Note shown beside the locked stake, e.g. "set by your dividend ladder". */
|
|
400
403
|
betAmountLockedNote?: string;
|
|
401
404
|
canSubmit?: boolean;
|
|
405
|
+
/** The first press of the two-stage submit landed — the button reads "Confirm entry". */
|
|
406
|
+
confirming?: boolean;
|
|
402
407
|
/**
|
|
403
408
|
* When false, the bet amount and Place Entry cards are replaced by a log-in
|
|
404
409
|
* prompt — pressing it calls `onSubmit`. @default true
|
|
@@ -30,14 +30,14 @@ export interface YesNoSpec {
|
|
|
30
30
|
fontSize: number;
|
|
31
31
|
weight: 700 | 750;
|
|
32
32
|
};
|
|
33
|
-
/** Underline the selected label. */
|
|
34
|
-
underline?: boolean;
|
|
35
33
|
/** A ✓ before the selected label. */
|
|
36
34
|
check?: boolean;
|
|
37
35
|
/** Tiny "Selected" caption under the selected label. */
|
|
38
36
|
caption?: boolean;
|
|
39
37
|
/** Dim disabled sides (default true). */
|
|
40
38
|
dimDisabled?: boolean;
|
|
39
|
+
/** The read-only Yes/No tag: capitals (default) or sentence case. */
|
|
40
|
+
tagCase?: 'upper' | 'sentence';
|
|
41
41
|
}
|
|
42
42
|
/** The match scroll bar on the picks screen: fixture chips between previous / next buttons. */
|
|
43
43
|
export interface MatchRailSpec {
|
|
@@ -57,8 +57,9 @@ export interface UiSystem {
|
|
|
57
57
|
/**
|
|
58
58
|
* yesno — the green/red split button with a QUICKPICK caption.
|
|
59
59
|
* solid — one filled button: bolt mark + "QuickPick", a chevron when it opens a count menu.
|
|
60
|
+
* deck — a small deck of picks: the game icons' stacked tiles, an accent bolt tile and a line saying what it will do.
|
|
60
61
|
*/
|
|
61
|
-
quickPick: 'yesno' | 'solid';
|
|
62
|
+
quickPick: 'yesno' | 'solid' | 'deck';
|
|
62
63
|
/** Sport selector: the pill-track segmented control, or the match rail's chips. */
|
|
63
64
|
sportRail: 'segmented' | 'chips';
|
|
64
65
|
}
|
package/dist/shared/utils.d.ts
CHANGED
|
@@ -141,3 +141,5 @@ export declare function getPayoutForCount(game: Game, count: number, price: numb
|
|
|
141
141
|
* Returns the picks without side effects — callers apply them via onToggleSelection.
|
|
142
142
|
*/
|
|
143
143
|
export declare function generateQuickPick(propositions: Proposition[], totalToAnswer: number): QuickPickResult;
|
|
144
|
+
/** Holds the host page still under one of our modals; returns the release. Web only. */
|
|
145
|
+
export declare function lockPageScroll(doc: Document): () => void;
|