@simple-parlay/components 1.30.6-pre.9 → 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.
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +653 -515
- package/dist/react/components/CallPayoutTable.d.ts +7 -1
- package/dist/react/components/CorrelationPropPlaceholder.d.ts +6 -1
- package/dist/react/components/DenseUi.d.ts +1 -0
- package/dist/react/components/EntriesPage.d.ts +0 -4
- package/dist/react/components/EntrySubmission.d.ts +1 -1
- package/dist/react/components/EventSwipeModal.d.ts +4 -0
- package/dist/react/components/GameCardParts.d.ts +28 -0
- package/dist/react/components/GameModeCard.d.ts +37 -6
- package/dist/react/components/GamePage.d.ts +4 -2
- package/dist/react/components/GameSelector.d.ts +1 -27
- package/dist/react/components/GameSetupPage.d.ts +5 -1
- package/dist/react/components/GameShelfCatalogue.d.ts +1 -7
- package/dist/react/components/GameShowcaseCatalogue.d.ts +4 -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 +52 -0
- 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 +35 -6
- 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 +37 -4
- 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 +27 -1
- package/dist/react/components/QuickPickMenu.d.ts +19 -1
- package/dist/react/components/SelectionsPage.d.ts +8 -4
- 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 +7 -3
- 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 +57 -12
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.d.ts +14 -12
- package/dist/react/index.mjs +653 -515
- package/dist/react/utils/dom.d.ts +7 -0
- 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/CallTicketBuilder.d.ts +2 -0
- package/dist/react-native/components/DenseUi.d.ts +4 -10
- 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 +34 -5
- package/dist/react-native/components/GamePage.d.ts +3 -1
- package/dist/react-native/components/GameSelector.d.ts +1 -28
- package/dist/react-native/components/GameSetupPage.d.ts +4 -13
- package/dist/react-native/components/GameShelfCatalogue.d.ts +1 -6
- 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 +57 -0
- 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 +32 -9
- 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 +37 -4
- 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 +27 -1
- package/dist/react-native/components/QuickPickMenu.d.ts +20 -1
- package/dist/react-native/components/SelectionsPage.d.ts +7 -4
- 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 +7 -3
- package/dist/react-native/components/SwipeDeck.d.ts +43 -3
- package/dist/react-native/components/YesNoMultiLogo.d.ts +12 -0
- package/dist/react-native/components/_primitives/index.d.ts +92 -10
- package/dist/react-native/index.cjs +1 -1
- package/dist/react-native/index.d.ts +14 -12
- package/dist/react-native/index.mjs +559 -474
- package/dist/react-native/utils/themes.d.ts +1 -1
- package/dist/shared/button-ui.d.ts +65 -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 +14 -1
- package/dist/shared/date-filters.d.ts +0 -23
- package/dist/shared/dense-ui.d.ts +0 -1
- 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 +22 -0
- package/dist/shared/game-icons.d.ts +2 -1
- package/dist/shared/game-library.d.ts +30 -6
- package/dist/shared/game-shelf-presentation.d.ts +36 -1
- package/dist/shared/hooks.d.ts +1 -1
- package/dist/shared/selection-actions.d.ts +70 -4
- package/dist/shared/selection-caps.d.ts +67 -10
- package/dist/shared/selection-variants.d.ts +7 -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 +53 -10
- package/dist/shared/tokens.d.ts +7 -0
- package/dist/shared/types.d.ts +19 -4
- package/dist/shared/ui-system.d.ts +71 -0
- package/dist/shared/ui-variant.d.ts +5 -3
- package/dist/shared/utils.d.ts +4 -1
- package/package.json +1 -1
- package/dist/react/components/PerfectPickPage.d.ts +0 -22
- package/dist/react/components/RuleSetupPage.d.ts +0 -27
- package/dist/react-native/components/PerfectPickPage.d.ts +0 -20
- package/dist/react-native/components/RuleSetupPage.d.ts +0 -23
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { BladeTheme } from './themes';
|
|
2
|
+
/**
|
|
3
|
+
* Game Shelf covers drawn from the game's own SVG mark instead of the bundled illustrations. `brand` is the designer's
|
|
4
|
+
* art: the YESNO signature stacked tiles (teal at 100 / 55 / 30%) carrying the mark in paper and citron, on stone —
|
|
5
|
+
* the 72_YESNO_Game_Set_Bet_Mark and app-icon system. `mark`, `stacked` and `tile` draw the mark itself on a colour
|
|
6
|
+
* ground. Shared by web and native: this builds the SVG and the geometry, each platform only puts them on screen.
|
|
7
|
+
*/
|
|
8
|
+
export type ShelfCoverStyle = NonNullable<NonNullable<BladeTheme['shelf']>['coverStyle']>;
|
|
9
|
+
export type DrawnCoverStyle = Exclude<ShelfCoverStyle, 'art' | 'brand'>;
|
|
10
|
+
export declare const SHELF_COVER_STYLES: readonly ShelfCoverStyle[];
|
|
11
|
+
export declare const SHELF_COVER_STYLE_LABELS: Record<ShelfCoverStyle, string>;
|
|
12
|
+
export declare function parseShelfCoverStyle(value: string | null | undefined): ShelfCoverStyle | undefined;
|
|
13
|
+
/** The brand art's fixed palette: a product mark, like the YESNO logo tiles, not theme shape. */
|
|
14
|
+
export declare const BRAND_COVER: {
|
|
15
|
+
readonly ground: "#DDD9D2";
|
|
16
|
+
readonly ink: "#0F4C5C";
|
|
17
|
+
readonly tile: "#0F4C5C";
|
|
18
|
+
readonly mark: "#FAFAF7";
|
|
19
|
+
readonly accent: "#DFFF1A";
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Grounds for the mark / stacked / tile covers, by icon id. Each holds the default cover ink (#111b36) at 4.5:1 or
|
|
23
|
+
* better under an 18px name, and leaves the light mark and its ink echo both readable.
|
|
24
|
+
*/
|
|
25
|
+
export declare const DRAWN_COVER_COLORS: Record<string, string>;
|
|
26
|
+
/** Category banner grounds for the same styles, from the same palette. */
|
|
27
|
+
export declare const DRAWN_CATEGORY_COLORS: Record<string, string>;
|
|
28
|
+
/** The light half of every drawn mark. */
|
|
29
|
+
export declare const COVER_PAPER = "#fafaf7";
|
|
30
|
+
/** A square, in fractions of its container's width. */
|
|
31
|
+
export interface ArtBox {
|
|
32
|
+
left: number;
|
|
33
|
+
top: number;
|
|
34
|
+
size: number;
|
|
35
|
+
}
|
|
36
|
+
/** A tile behind the mark (the stacked tiles, the press-to-play tile and its shadow); `radius` in fractions of the art box. */
|
|
37
|
+
export interface CoverTile extends ArtBox {
|
|
38
|
+
radius: number;
|
|
39
|
+
color: string;
|
|
40
|
+
opacity: number;
|
|
41
|
+
}
|
|
42
|
+
/** An SVG drawn in the art box. */
|
|
43
|
+
export interface CoverLayer extends ArtBox {
|
|
44
|
+
xml: string;
|
|
45
|
+
opacity?: number;
|
|
46
|
+
}
|
|
47
|
+
export interface DrawnCover {
|
|
48
|
+
/** Where the art sits on a game cover, in fractions of the cover's width. Banners place it themselves. */
|
|
49
|
+
box: ArtBox;
|
|
50
|
+
/** Full-surface SVG behind everything else (the tile style's faded pattern). */
|
|
51
|
+
pattern?: string;
|
|
52
|
+
/** Back to front, in fractions of the art box. */
|
|
53
|
+
tiles: CoverTile[];
|
|
54
|
+
/** The mark, in fractions of the art box. */
|
|
55
|
+
layers: CoverLayer[];
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Bake colours into an icon's markup: `currentColor` → `ink`, the icon accent → `accent`.
|
|
59
|
+
* `outline` edges every part without a stroke of its own, outside its fill: invisible on the ink
|
|
60
|
+
* body, but it's what holds a light part (a "%", a rung, a seam) against a light ground.
|
|
61
|
+
*/
|
|
62
|
+
export declare function tintIcon(raw: string, ink: string, accent: string, { outline }?: {
|
|
63
|
+
outline?: string;
|
|
64
|
+
}): string;
|
|
65
|
+
/**
|
|
66
|
+
* The mark repeated small and tilted, fading out before the name: `down` on a cover (name at the
|
|
67
|
+
* bottom), `left` on a banner (name on the left). `id` must be unique on the page.
|
|
68
|
+
*/
|
|
69
|
+
export declare function coverPatternXml(raw: string, ink: string, id: string, fade?: 'down' | 'left'): string;
|
|
70
|
+
/**
|
|
71
|
+
* The mark itself on a colour ground, above the name and under the tier chip:
|
|
72
|
+
* - mark: the mark in ink, its accent in paper, every part edged in ink.
|
|
73
|
+
* - stacked: the same mark over a solid echo of itself at a third strength, offset like the brand's stacked tiles.
|
|
74
|
+
* - tile: the press-to-play tile (ink, a hard shadow, the mark in the cover's own colour with a paper accent) on a faded
|
|
75
|
+
* pattern of the mark. Not the theme accent: YESNO's citron reads as a stray green on these grounds.
|
|
76
|
+
* Every style keeps the mark's body in ink (or on the ink tile): a light body on these light grounds can't reach 3:1,
|
|
77
|
+
* and the ink edge is what keeps the light parts readable.
|
|
78
|
+
*/
|
|
79
|
+
export declare function drawnCover(style: DrawnCoverStyle, raw: string, { ink, ground, id, fade }: {
|
|
80
|
+
ink: string;
|
|
81
|
+
ground: string;
|
|
82
|
+
id: string;
|
|
83
|
+
fade?: 'down' | 'left';
|
|
84
|
+
}): DrawnCover;
|
|
85
|
+
/**
|
|
86
|
+
* The designer's stacked mark, measured off 72_YESNO_Game_Set_Bet_Mark: 220 tiles (rx 44) stepping +25/+25 in a
|
|
87
|
+
* 270 box, the back two at 30% and 55%. The mark fills the front tile like the app icon's: a game's in paper with
|
|
88
|
+
* its citron accent; a single-colour glyph (a category's) all in citron, like the lockups' pills.
|
|
89
|
+
*/
|
|
90
|
+
export declare function brandCover(raw: string, ink?: string, accent?: string): DrawnCover;
|
|
91
|
+
/** Web: an icon's markup sized to fill its box, for drawing inline (lettering then takes the page's fonts). */
|
|
92
|
+
export declare function fillBox(xml: string): string;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Game Shelf's one set of measurements. Every Shelf page builds from these, through
|
|
3
|
+
* the ShelfKit components (web + RN), so the screens read as one product:
|
|
4
|
+
* light pages, white cards, one button set, one selected state, one action bar.
|
|
5
|
+
*/
|
|
6
|
+
export declare const SHELF_UI: {
|
|
7
|
+
readonly radius: {
|
|
8
|
+
readonly control: 12;
|
|
9
|
+
readonly card: 16;
|
|
10
|
+
readonly sheet: 24;
|
|
11
|
+
};
|
|
12
|
+
/** Primary / secondary buttons: 52 tall, 44 for the compact size. */
|
|
13
|
+
readonly button: {
|
|
14
|
+
readonly height: 52;
|
|
15
|
+
readonly compact: 44;
|
|
16
|
+
};
|
|
17
|
+
/** Chips, filters, tabs and options; 52 when they carry a second line. */
|
|
18
|
+
readonly option: {
|
|
19
|
+
readonly height: 44;
|
|
20
|
+
readonly tall: 52;
|
|
21
|
+
};
|
|
22
|
+
readonly card: {
|
|
23
|
+
readonly pad: 16;
|
|
24
|
+
};
|
|
25
|
+
readonly dock: {
|
|
26
|
+
readonly pad: 12;
|
|
27
|
+
readonly gap: 8;
|
|
28
|
+
readonly offset: 12;
|
|
29
|
+
};
|
|
30
|
+
readonly pip: {
|
|
31
|
+
readonly height: 6;
|
|
32
|
+
readonly radius: 3;
|
|
33
|
+
readonly gap: 4;
|
|
34
|
+
};
|
|
35
|
+
/** Between cards, and from the page header to the first card. */
|
|
36
|
+
readonly gap: 12;
|
|
37
|
+
readonly headerGap: 16;
|
|
38
|
+
readonly type: {
|
|
39
|
+
readonly money: 26;
|
|
40
|
+
readonly listMoney: 18;
|
|
41
|
+
readonly bandMoney: 22;
|
|
42
|
+
readonly label: 14;
|
|
43
|
+
readonly muted: 13;
|
|
44
|
+
readonly tag: 12;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
export type ShelfPipState = 'right' | 'miss' | 'open';
|
|
@@ -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;
|
|
@@ -106,8 +132,17 @@ export interface BladeTheme {
|
|
|
106
132
|
coverColors?: Record<string, string>;
|
|
107
133
|
/** Cover colour for games without artwork, by tier id (signature / premier / exclusive). */
|
|
108
134
|
tierColors?: Record<string, string>;
|
|
109
|
-
/** Replacement artwork by game icon id; null hides the bundled
|
|
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';
|
|
144
|
+
/** Replacement Showcase hero image by category (sports / racing / prediction / fantasy); null hides it. */
|
|
145
|
+
heroArtwork?: Record<string, string | null>;
|
|
111
146
|
categoryColors?: Record<string, string>;
|
|
112
147
|
/** Replacement category artwork; null hides the bundled image. */
|
|
113
148
|
categoryArtwork?: Record<string, string | null>;
|
|
@@ -119,9 +154,17 @@ export interface BladeTheme {
|
|
|
119
154
|
accent?: string;
|
|
120
155
|
};
|
|
121
156
|
fonts?: {
|
|
122
|
-
|
|
157
|
+
/** Omit to keep the host page's font. */
|
|
158
|
+
body?: string;
|
|
123
159
|
heading?: string;
|
|
124
160
|
mono?: string;
|
|
161
|
+
/**
|
|
162
|
+
* Fonts loaded one file per weight, as Expo loads them
|
|
163
|
+
* (`{ Roboto: { 400: 'Roboto_400Regular', 700: 'Roboto_700Bold' } }`),
|
|
164
|
+
* keyed by the family named in body/heading. React Native picks the
|
|
165
|
+
* nearest loaded weight by CSS rules; web ignores it.
|
|
166
|
+
*/
|
|
167
|
+
faces?: Record<string, FontFaces>;
|
|
125
168
|
};
|
|
126
169
|
spacing?: {
|
|
127
170
|
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
|
@@ -87,7 +87,7 @@ export interface Game {
|
|
|
87
87
|
/** Boolean alias for APIs that expose selection scope as a flag. */
|
|
88
88
|
require_same_event?: boolean;
|
|
89
89
|
require_distinct_events?: boolean;
|
|
90
|
-
sgm_mode?: 'off' | 'any' | 'limited';
|
|
90
|
+
sgm_mode?: 'off' | 'any' | 'limited' | 'limited_2p';
|
|
91
91
|
allocations?: GameAllocation[];
|
|
92
92
|
rule_expression?: string | RuleExpressionObject | null;
|
|
93
93
|
min_bet?: number | null;
|
|
@@ -180,6 +180,12 @@ export interface Proposition {
|
|
|
180
180
|
source_data?: string | null;
|
|
181
181
|
event_id?: string | null;
|
|
182
182
|
user_prediction?: "yes" | "no";
|
|
183
|
+
/** Set on entry legs while pending and the game is in play. `current` is the feed's running total / player stat. */
|
|
184
|
+
live?: {
|
|
185
|
+
status: string;
|
|
186
|
+
current?: number | null;
|
|
187
|
+
updated_at?: string | null;
|
|
188
|
+
} | null;
|
|
183
189
|
}
|
|
184
190
|
export interface GameEntry {
|
|
185
191
|
id: number;
|
|
@@ -193,6 +199,8 @@ export interface GameEntry {
|
|
|
193
199
|
winning?: number;
|
|
194
200
|
/** Raw API field for the payout; normalised into `winning` by the client. */
|
|
195
201
|
win_amount?: number;
|
|
202
|
+
/** All-correct payout in integer cents, set by BLADE on create. Excludes any jackpot. */
|
|
203
|
+
max_win_amount?: number | null;
|
|
196
204
|
expected_correct?: number;
|
|
197
205
|
bet_amount?: number;
|
|
198
206
|
stake?: number;
|
|
@@ -294,11 +302,13 @@ export interface PlaceEntryFlowProps {
|
|
|
294
302
|
howToPlayMarkdown?: string | null;
|
|
295
303
|
}
|
|
296
304
|
export interface GameSelectorProps {
|
|
297
|
-
/** Game discovery layout. Web renders cards, split, compare, shelf and showcase; native renders shelf and falls back to the
|
|
305
|
+
/** Game discovery layout; overrides the UI system's default. Web renders cards, split, compare, shelf and showcase; native renders shelf and falls back to the system's layout for the rest. */
|
|
298
306
|
gameVariant?: GameVariant;
|
|
299
307
|
/** Showcase: `games` is already a curated set, so leave out the dimmed tiles for games not on offer. */
|
|
300
308
|
onlyListedGames?: boolean;
|
|
301
|
-
/**
|
|
309
|
+
/** Showcase: leave out the hero image at the top. */
|
|
310
|
+
disableImage?: boolean;
|
|
311
|
+
/** @deprecated Layouts no longer draw their own header; back lives in the page header (`GamePageTitle` / `PageHeader`). */
|
|
302
312
|
onBack?: () => void;
|
|
303
313
|
uiVariant?: UiVariant;
|
|
304
314
|
games: Game[];
|
|
@@ -328,7 +338,8 @@ export interface SportSelectorProps {
|
|
|
328
338
|
propositions: Proposition[];
|
|
329
339
|
selections: Record<number, 'yes' | 'no'>;
|
|
330
340
|
onToggleSelection: (id: number, answer: 'yes' | 'no') => void;
|
|
331
|
-
|
|
341
|
+
/** Next step: the list's auto-advance, its QuickPick and its footer button. Optional when the page around it owns those. */
|
|
342
|
+
onNext?: () => void;
|
|
332
343
|
onBack: () => void;
|
|
333
344
|
loading?: boolean;
|
|
334
345
|
error?: string | null;
|
|
@@ -399,6 +410,8 @@ export interface EntrySubmissionProps {
|
|
|
399
410
|
/** Note shown beside the locked stake, e.g. "set by your dividend ladder". */
|
|
400
411
|
betAmountLockedNote?: string;
|
|
401
412
|
canSubmit?: boolean;
|
|
413
|
+
/** The first press of the two-stage submit landed — the button reads "Confirm entry". */
|
|
414
|
+
confirming?: boolean;
|
|
402
415
|
/**
|
|
403
416
|
* When false, the bet amount and Place Entry cards are replaced by a log-in
|
|
404
417
|
* prompt — pressing it calls `onSubmit`. @default true
|
|
@@ -408,6 +421,8 @@ export interface EntrySubmissionProps {
|
|
|
408
421
|
userBalance?: number;
|
|
409
422
|
onRecharge?: () => void;
|
|
410
423
|
boostBanner?: ReactNode;
|
|
424
|
+
/** Shelf: floats just above the dock, in its sticky block (the QuickPick undo snackbar). */
|
|
425
|
+
aboveDock?: ReactNode;
|
|
411
426
|
}
|
|
412
427
|
export interface SelectionReviewProps {
|
|
413
428
|
propositions: Proposition[];
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { UiVariant } from './ui-variant';
|
|
2
|
+
export interface UiSystemPages {
|
|
3
|
+
games: 'kit' | 'playbook' | 'call' | 'shelf' | 'dense';
|
|
4
|
+
picks: 'kit' | 'shelf' | 'call' | 'dense';
|
|
5
|
+
setup: 'kit' | 'ticket' | 'dense';
|
|
6
|
+
}
|
|
7
|
+
export interface PageHeaderSpec {
|
|
8
|
+
/**
|
|
9
|
+
* stacked — title, then a ← context row beneath it.
|
|
10
|
+
* toolbar — round back button + context eyebrow above a display title.
|
|
11
|
+
* bar — one compact ruled row: back, title, actions.
|
|
12
|
+
* inline — one unruled row: ← title, its extras, actions. The context label only names the back button.
|
|
13
|
+
*/
|
|
14
|
+
layout: 'stacked' | 'toolbar' | 'bar' | 'inline';
|
|
15
|
+
/** Title px on phones, then from 640px. */
|
|
16
|
+
size: readonly [number, number];
|
|
17
|
+
weight: 700 | 800;
|
|
18
|
+
/** Letter-spacing in em. */
|
|
19
|
+
tracking: number;
|
|
20
|
+
lineHeight: number;
|
|
21
|
+
}
|
|
22
|
+
export interface YesNoSpec {
|
|
23
|
+
fill: 'product' | 'primary' | 'button';
|
|
24
|
+
/** Metrics that replace the xs/sm/md size ramp. */
|
|
25
|
+
box?: {
|
|
26
|
+
minHeight: number;
|
|
27
|
+
minWidth: number;
|
|
28
|
+
padX: number;
|
|
29
|
+
padY: number;
|
|
30
|
+
radius: number;
|
|
31
|
+
fontSize: number;
|
|
32
|
+
weight: 700 | 750;
|
|
33
|
+
};
|
|
34
|
+
/** A ✓ before the selected label. */
|
|
35
|
+
check?: boolean;
|
|
36
|
+
/** Tiny "Selected" caption under the selected label. */
|
|
37
|
+
caption?: boolean;
|
|
38
|
+
/** Dim disabled sides (default true). */
|
|
39
|
+
dimDisabled?: boolean;
|
|
40
|
+
/** The read-only Yes/No tag: capitals (default) or sentence case. */
|
|
41
|
+
tagCase?: 'upper' | 'sentence';
|
|
42
|
+
}
|
|
43
|
+
/** The match scroll bar on the picks screen: fixture chips between previous / next buttons. */
|
|
44
|
+
export interface MatchRailSpec {
|
|
45
|
+
/** Chip and button corner radius in px; 999 is a pill. */
|
|
46
|
+
radius: number;
|
|
47
|
+
/** The selected chip fills with the theme's button colour or its primary. */
|
|
48
|
+
fill: 'button' | 'primary';
|
|
49
|
+
/** Pick count after the label: inline "· 2", or a round badge. */
|
|
50
|
+
count: 'inline' | 'badge';
|
|
51
|
+
}
|
|
52
|
+
export interface UiSystem {
|
|
53
|
+
label: string;
|
|
54
|
+
pages: UiSystemPages;
|
|
55
|
+
pageHeader: PageHeaderSpec;
|
|
56
|
+
yesNo: YesNoSpec;
|
|
57
|
+
matchRail: MatchRailSpec;
|
|
58
|
+
/**
|
|
59
|
+
* yesno — the green/red split button with a QUICKPICK caption.
|
|
60
|
+
* solid — one filled button: bolt mark + "QuickPick", a chevron when it opens a count menu.
|
|
61
|
+
* deck — a small deck of picks: the game icons' stacked tiles, an accent bolt tile and a line saying what it will do.
|
|
62
|
+
*/
|
|
63
|
+
quickPick: 'yesno' | 'solid' | 'deck';
|
|
64
|
+
/** Sport selector: the pill-track segmented control, or the match rail's chips. */
|
|
65
|
+
sportRail: 'segmented' | 'chips';
|
|
66
|
+
}
|
|
67
|
+
export declare const UI_SYSTEMS: Record<UiVariant, UiSystem>;
|
|
68
|
+
export declare function uiSystem(variant: UiVariant | undefined): UiSystem;
|
|
69
|
+
export declare function useUiSystem(): UiSystem;
|
|
70
|
+
/** Systems whose picks screen is the Game Shelf one: fixture tabs, inline Yes/No, one-row dock. */
|
|
71
|
+
export declare function usesShelfPicks(value: unknown): boolean;
|
|
@@ -5,10 +5,12 @@ export type UiVariant = 'default' | 'playbook' | 'call' | 'shelf' | DenseUiVaria
|
|
|
5
5
|
export declare const UI_VARIANTS: readonly UiVariant[];
|
|
6
6
|
export declare const UI_VARIANT_LABELS: Record<UiVariant, string>;
|
|
7
7
|
export declare function isDenseUiVariant(value: unknown): value is DenseUiVariant;
|
|
8
|
-
/** Variants that use the Game Shelf picks screen: fixture tabs, inline Yes/No, one-row dock. */
|
|
9
|
-
export declare function usesShelfPicks(value: unknown): boolean;
|
|
10
8
|
export declare function parseUiVariant(value: unknown): UiVariant;
|
|
11
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated UI systems no longer change theming — they only swap components.
|
|
11
|
+
* Pass a theme yourself; this returns the palette a system used to force, or
|
|
12
|
+
* undefined.
|
|
13
|
+
*/
|
|
12
14
|
export declare function uiVariantTheme(variant: UiVariant, colorScheme?: 'light' | 'dark'): BladeTheme | undefined;
|
|
13
15
|
export declare const UiVariantContext: import('react').Context<UiVariant>;
|
|
14
16
|
export declare function useUiVariant(): UiVariant;
|
package/dist/shared/utils.d.ts
CHANGED
|
@@ -119,7 +119,8 @@ export declare function isGameAvailableToday(game: Game, now?: Date): boolean;
|
|
|
119
119
|
export declare function getAvailableDaysLabel(game: Game): string | null;
|
|
120
120
|
export declare function contrastTextColour(bgColor: string | undefined | null, lightText?: string, darkText?: string): string;
|
|
121
121
|
export declare function readableColor(bg: string | undefined | null, desired: string | undefined | null, fallback: string, minRatio?: number): string;
|
|
122
|
-
|
|
122
|
+
export declare function predictionTopic(p: Proposition): string | undefined;
|
|
123
|
+
/** Group propositions by matchup (home_team vs away_team); prediction questions by topic. */
|
|
123
124
|
export declare function groupByMatchup(props: Proposition[]): Record<string, Proposition[]>;
|
|
124
125
|
export declare function groupByRace(props: Proposition[]): Record<string, Proposition[]>;
|
|
125
126
|
export declare function groupPropositionsForDisplay(props: Proposition[], gameCategory?: GameCategory, sportBaseKey?: string | null): Record<string, Proposition[]>;
|
|
@@ -140,3 +141,5 @@ export declare function getPayoutForCount(game: Game, count: number, price: numb
|
|
|
140
141
|
* Returns the picks without side effects — callers apply them via onToggleSelection.
|
|
141
142
|
*/
|
|
142
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;
|
package/package.json
CHANGED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Setup page for exact-rule games (Perfect Pick, Head to Head, Total Points):
|
|
3
|
-
* brand lockup plus the same two mode cards as every other unique game.
|
|
4
|
-
*/
|
|
5
|
-
export interface PerfectPickPageProps {
|
|
6
|
-
/** Called after Quick Pick fills the slip (navigate to the bet slip / confirm page). */
|
|
7
|
-
onQuickPick?: () => void;
|
|
8
|
-
/** Called when the user chooses to answer the legs themselves (navigate to selections). */
|
|
9
|
-
onPickYourOwn?: () => void;
|
|
10
|
-
onBack?: () => void;
|
|
11
|
-
/** Hide the built-in eyebrow title. */
|
|
12
|
-
hideTitle?: boolean;
|
|
13
|
-
/** Label for the back link (where "back" leads). @default 'Games' */
|
|
14
|
-
backLabel?: string;
|
|
15
|
-
className?: string;
|
|
16
|
-
}
|
|
17
|
-
export declare function PerfectPickPageTitle({ className, onBack, hideActions, }: {
|
|
18
|
-
className?: string;
|
|
19
|
-
onBack?: () => void;
|
|
20
|
-
hideActions?: boolean;
|
|
21
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
export declare function PerfectPickPage({ onQuickPick, onPickYourOwn, onBack, hideTitle, backLabel, className, }: PerfectPickPageProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { RuleSetupConfig, RuleSetupOption } from '../../shared/rule-setup';
|
|
3
|
-
export interface RuleSetupPageProps {
|
|
4
|
-
onContinue?: () => void;
|
|
5
|
-
onBack?: () => void;
|
|
6
|
-
/** Hide the built-in title section (use `<RuleSetupPageTitle />` separately). The game lockup always renders in the page body. */
|
|
7
|
-
hideTitle?: boolean;
|
|
8
|
-
hideActions?: boolean;
|
|
9
|
-
config?: RuleSetupConfig | null;
|
|
10
|
-
/** Render a custom dividends table on the option card */
|
|
11
|
-
renderDividends?: (option: RuleSetupOption) => React.ReactNode;
|
|
12
|
-
/** Label for the back link (where "back" leads). @default 'Games' */
|
|
13
|
-
backLabel?: string;
|
|
14
|
-
className?: string;
|
|
15
|
-
}
|
|
16
|
-
export declare function RuleSetupPageTitle({ className, onBack, hideActions, }: {
|
|
17
|
-
className?: string;
|
|
18
|
-
onBack?: () => void;
|
|
19
|
-
hideActions?: boolean;
|
|
20
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
export declare function RuleSetupPageActions({ onContinue, canContinue, continueLabel, className, }: {
|
|
22
|
-
onContinue?: () => void;
|
|
23
|
-
canContinue?: boolean;
|
|
24
|
-
continueLabel?: string;
|
|
25
|
-
className?: string;
|
|
26
|
-
}): import("react/jsx-runtime").JSX.Element | null;
|
|
27
|
-
export declare function RuleSetupPage({ onContinue, onBack, hideTitle, config: configOverride, renderDividends, backLabel, className, }: RuleSetupPageProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Setup page for exact-rule games (Perfect Pick, Head to Head, Total Points):
|
|
3
|
-
* brand lockup plus the same two mode cards as every other unique game.
|
|
4
|
-
*/
|
|
5
|
-
export interface PerfectPickPageProps {
|
|
6
|
-
/** Called after Quick Pick fills the slip (navigate to the bet slip / confirm page). */
|
|
7
|
-
onQuickPick?: () => void;
|
|
8
|
-
/** Called when the user chooses to answer the legs themselves (navigate to selections). */
|
|
9
|
-
onPickYourOwn?: () => void;
|
|
10
|
-
onBack?: () => void;
|
|
11
|
-
/** Hide the built-in eyebrow title. */
|
|
12
|
-
hideTitle?: boolean;
|
|
13
|
-
/** Label for the back link (where "back" leads). @default 'Games' */
|
|
14
|
-
backLabel?: string;
|
|
15
|
-
}
|
|
16
|
-
export declare function PerfectPickPageTitle({ onBack, hideActions, }?: {
|
|
17
|
-
onBack?: () => void;
|
|
18
|
-
hideActions?: boolean;
|
|
19
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
export declare function PerfectPickPage({ onQuickPick, onPickYourOwn, onBack, hideTitle, backLabel, }: PerfectPickPageProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { RuleSetupConfig, RuleSetupOption } from '../../shared/rule-setup';
|
|
3
|
-
export interface RuleSetupPageProps {
|
|
4
|
-
onContinue?: () => void;
|
|
5
|
-
onBack?: () => void;
|
|
6
|
-
/** Hide the built-in title section (use `<RuleSetupPageTitle />` separately). The game lockup always renders in the page body. */
|
|
7
|
-
hideTitle?: boolean;
|
|
8
|
-
hideActions?: boolean;
|
|
9
|
-
config?: RuleSetupConfig | null;
|
|
10
|
-
renderDividends?: (option: RuleSetupOption) => React.ReactNode;
|
|
11
|
-
/** Label for the back link (where "back" leads). @default 'Games' */
|
|
12
|
-
backLabel?: string;
|
|
13
|
-
}
|
|
14
|
-
export declare function RuleSetupPageTitle({ onBack, hideActions, }?: {
|
|
15
|
-
onBack?: () => void;
|
|
16
|
-
hideActions?: boolean;
|
|
17
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
export declare function RuleSetupPageActions({ onContinue, canContinue, continueLabel, }: {
|
|
19
|
-
onContinue?: () => void;
|
|
20
|
-
canContinue?: boolean;
|
|
21
|
-
continueLabel?: string;
|
|
22
|
-
}): import("react/jsx-runtime").JSX.Element | null;
|
|
23
|
-
export declare function RuleSetupPage({ onContinue, onBack, hideTitle, config: configOverride, renderDividends, backLabel, }: RuleSetupPageProps): import("react/jsx-runtime").JSX.Element;
|