@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,5 @@
|
|
|
1
1
|
import { BladeTheme } from '../../shared/themes';
|
|
2
2
|
export type { BladeTheme, BladeThemeSet, ColorScheme } from '../../shared/themes';
|
|
3
|
-
export { defaultTheme, greenTheme, greenLightTheme, darkTheme, goldTheme, goldLightTheme, defaultThemeSet, greenThemeSet, goldThemeSet, getTheme, getThemeSet, themes, themeSets, themeHeading, themeLabel, themeValue, themeAccent, accentOnSurface, themeProductYes, themeProductNo, PRODUCT_YES, PRODUCT_NO, themeTextAlt, themeTextAltMuted, themeSelectionCard, themeMatchupHeader, themeSelectionProp, themePickerSurfaceColors, resolveTheme, isThemeSet, useResolvedTheme, } from '../../shared/themes';
|
|
3
|
+
export { defaultTheme, greenTheme, greenLightTheme, darkTheme, goldTheme, goldLightTheme, defaultThemeSet, greenThemeSet, goldThemeSet, getTheme, getThemeSet, themes, themeSets, themeHeading, themeLabel, themeValue, themeAccent, canvasTheme, accentOnSurface, themeProductYes, themeProductNo, PRODUCT_YES, PRODUCT_NO, productTextOn, themeTextAlt, themeTextAltMuted, themeSelectionCard, themeMatchupHeader, themeSelectionProp, themePickerSurfaceColors, resolveTheme, isThemeSet, useResolvedTheme, } from '../../shared/themes';
|
|
4
4
|
export declare function themeBodyFont(t: BladeTheme): string;
|
|
5
5
|
export declare function themeHeadingFont(t: BladeTheme): string;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { BladeTheme } from './themes';
|
|
2
|
+
/**
|
|
3
|
+
* The kit's one button language. Web and RN both draw from here, in every UI
|
|
4
|
+
* system, so an action button looks and reacts the same on every screen:
|
|
5
|
+
*
|
|
6
|
+
* - primary — the one main action on a screen. Filled.
|
|
7
|
+
* - secondary — the alternative beside it. Filled in the theme's buttonSecondary — never an outline.
|
|
8
|
+
* - quiet — small actions (Undo, Clear picks, Show all). A tint pill.
|
|
9
|
+
*
|
|
10
|
+
* Two sizes: lg (52) for the page's main action, md (44) everywhere else.
|
|
11
|
+
* Chips, tabs and filters (`optionLook`) and icon-only buttons (`hoverTint`)
|
|
12
|
+
* share the same hover / press / disabled states.
|
|
13
|
+
*/
|
|
14
|
+
export declare const BUTTON_UI: {
|
|
15
|
+
readonly radius: 12;
|
|
16
|
+
readonly height: {
|
|
17
|
+
readonly md: 44;
|
|
18
|
+
readonly lg: 52;
|
|
19
|
+
};
|
|
20
|
+
readonly padX: {
|
|
21
|
+
readonly md: 14;
|
|
22
|
+
readonly lg: 18;
|
|
23
|
+
};
|
|
24
|
+
readonly fontSize: {
|
|
25
|
+
readonly md: 14;
|
|
26
|
+
readonly lg: 16;
|
|
27
|
+
};
|
|
28
|
+
readonly weight: 800;
|
|
29
|
+
readonly gap: 8;
|
|
30
|
+
/** Every button sinks a touch when pressed. */
|
|
31
|
+
readonly pressScale: 0.98;
|
|
32
|
+
readonly disabledOpacity: 0.5;
|
|
33
|
+
readonly ms: 150;
|
|
34
|
+
};
|
|
35
|
+
export type ButtonVariant = 'primary' | 'secondary' | 'quiet';
|
|
36
|
+
export type ButtonSize = 'md' | 'lg';
|
|
37
|
+
export interface PressState {
|
|
38
|
+
hovered?: boolean;
|
|
39
|
+
pressed?: boolean;
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
}
|
|
42
|
+
export interface ButtonLook {
|
|
43
|
+
background: string;
|
|
44
|
+
color: string;
|
|
45
|
+
borderColor: string;
|
|
46
|
+
borderWidth: number;
|
|
47
|
+
opacity: number;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The one hover rule for every unfilled control: it previews the colour it acts
|
|
51
|
+
* in — the ring turns that colour over a faint tint (a little more on press).
|
|
52
|
+
* Chips and icon buttons preview the primary, an unchosen Yes / No its own green / red.
|
|
53
|
+
*/
|
|
54
|
+
export declare function previewTint(color: string, { hovered, pressed, disabled }?: PressState): {
|
|
55
|
+
borderColor: string;
|
|
56
|
+
background: string;
|
|
57
|
+
} | null;
|
|
58
|
+
/** `previewTint` in the theme primary, background only. */
|
|
59
|
+
export declare function hoverTint(theme: BladeTheme, state?: PressState): string | undefined;
|
|
60
|
+
export declare function buttonLook(theme: BladeTheme, variant: ButtonVariant, state?: PressState): ButtonLook;
|
|
61
|
+
/** Chips, tabs, filters and options: teal with light text when chosen; a hairline card that tints on hover when not. */
|
|
62
|
+
export declare function optionLook(theme: BladeTheme, selected: boolean, state?: PressState): ButtonLook;
|
|
@@ -13,8 +13,16 @@ export interface CallPayoutView {
|
|
|
13
13
|
heading: string;
|
|
14
14
|
note: string;
|
|
15
15
|
rows: CallPayoutRow[];
|
|
16
|
+
/** A short line beside the heading, e.g. "Includes your $20 stake". */
|
|
17
|
+
aside?: string;
|
|
16
18
|
}
|
|
17
|
-
|
|
19
|
+
/**
|
|
20
|
+
* A ticket's outcomes, best first: "All 8 right", "7 right, 1 miss", "2 or more
|
|
21
|
+
* misses". No miss cover reads "All 8 right", "1 or more misses".
|
|
22
|
+
*/
|
|
23
|
+
export declare function callMissRows(legs: number, misses: number, collect: (wrong: number) => number): CallPayoutRow[];
|
|
24
|
+
/** `modeLabel` is kept for callers; the cover is already chosen above the table. */
|
|
25
|
+
export declare function callSafetyPayouts(ticket: SafetyNetTicket, _modeLabel?: string): CallPayoutView;
|
|
18
26
|
/** Outcome tables use the same pricing functions as setup and confirmation. */
|
|
19
27
|
export declare function callOutcomePayouts(game: Game, count: number, stake: number, expectedCorrect?: number): CallPayoutView | null;
|
|
20
28
|
export declare function callLegPayouts(game: Game, stake: number, payouts?: TopPayoutsResponse): CallPayoutView | null;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { BladeTheme } from './themes';
|
|
3
|
+
/**
|
|
4
|
+
* Marks its children as sitting on one of our own painted surfaces — a card,
|
|
5
|
+
* sheet, modal or a self-painted root like Dense — rather than the host page.
|
|
6
|
+
*/
|
|
7
|
+
export declare function OnSurface({ children }: {
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
}): import('react').FunctionComponentElement<import('react').ProviderProps<boolean>>;
|
|
10
|
+
/**
|
|
11
|
+
* The theme for page-level content (titles, labels, tabs, quiet buttons):
|
|
12
|
+
* `canvasTheme` on the host page, the theme itself inside an `OnSurface`.
|
|
13
|
+
*/
|
|
14
|
+
export declare function usePageTheme<T extends BladeTheme | undefined>(theme: T): T;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { BladeApiClient } from './api-client';
|
|
2
2
|
import { Game, Proposition } from './types';
|
|
3
|
+
/** Cross Game SGM's risk modes. Explicit opt-in only: 'off' and unknown modes keep the ordinary flow. */
|
|
4
|
+
export declare const hasSgmRiskMode: (game?: Game | null) => boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Only `any` prices through the Correlation Engine. A `limited` / `limited_2p` card holds one line, one total and one
|
|
7
|
+
* player per match, classes that move independently, so it pays off the count table like an ordinary game and
|
|
8
|
+
* `selectionCapsApply` holds it to that shape.
|
|
9
|
+
*/
|
|
3
10
|
export declare const usesCorrelationPricing: (game?: Game | null) => boolean;
|
|
4
11
|
export interface CorrelationQuote {
|
|
5
12
|
resultant_price: number;
|
|
@@ -1,26 +1,3 @@
|
|
|
1
1
|
import { Proposition } from './types';
|
|
2
|
-
/** Date-window chips shown above the proposition list. */
|
|
3
|
-
export type DateWindowId = 'today' | 'weekend' | 'next7';
|
|
4
|
-
export interface DateWindowOption {
|
|
5
|
-
id: DateWindowId;
|
|
6
|
-
label: string;
|
|
7
|
-
}
|
|
8
2
|
/** A proposition's commence time as a Date, or null when absent/invalid. */
|
|
9
3
|
export declare function propositionDate(p: Pick<Proposition, 'commence_time'>): Date | null;
|
|
10
|
-
/** Whether a commence time falls inside a window relative to `now`. */
|
|
11
|
-
export declare function matchesDateWindow(commenceTime: string | null | undefined, id: DateWindowId, now: Date): boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Which date-window chips are worth showing for a set of propositions.
|
|
14
|
-
*
|
|
15
|
-
* A window appears when at least one prop falls inside it — so the chips read
|
|
16
|
-
* the same way every time you open the panel. The whole group drops out only
|
|
17
|
-
* when no window can change the list at all (every dated prop inside every
|
|
18
|
-
* window it matches), which is what a game the operator already caps to a
|
|
19
|
-
* single day or week looks like.
|
|
20
|
-
*/
|
|
21
|
-
export declare function availableDateWindows(propositions: ReadonlyArray<Pick<Proposition, 'commence_time'>>, now: Date): DateWindowOption[];
|
|
22
|
-
/**
|
|
23
|
-
* Filter propositions to a window. `null` returns them unchanged; undated
|
|
24
|
-
* propositions are dropped whenever a window is active.
|
|
25
|
-
*/
|
|
26
|
-
export declare function filterByDateWindow<T extends Pick<Proposition, 'commence_time'>>(propositions: readonly T[], id: DateWindowId | null, now: Date): T[];
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Game, GameEntry, Proposition } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Game Shelf's placed + entries screens: what an entry pays and how it is
|
|
4
|
+
* going, read only off the existing pricing and rules. Web and native share it.
|
|
5
|
+
*/
|
|
6
|
+
export interface PayingOutcome {
|
|
7
|
+
correct: number;
|
|
8
|
+
amount: number;
|
|
9
|
+
}
|
|
10
|
+
export type PipState = 'right' | 'miss' | 'open';
|
|
11
|
+
export interface EntryLeg {
|
|
12
|
+
answer?: 'yes' | 'no';
|
|
13
|
+
prop?: Proposition;
|
|
14
|
+
}
|
|
15
|
+
/** Paying outcomes, best first: the ticket outcome table, else the API's win tiers. */
|
|
16
|
+
export declare function payingOutcomes(game: Game | null | undefined, legs: number, stake: number, expectedCorrect?: number | null, winningCounts?: number[] | null, payouts?: Record<number, number> | null): PayingOutcome[];
|
|
17
|
+
/** "Extra Shot" — the Safety Net cover a ticket bought, read off its expected-correct count. */
|
|
18
|
+
export declare function safetyModeLabel(game: Game | null | undefined, legs: number, expectedCorrect?: number | null): string | null;
|
|
19
|
+
/** The earliest unsettled leg still to start. */
|
|
20
|
+
export declare function nextResultAt(props: (Proposition | undefined)[], now?: number): Date | null;
|
|
21
|
+
/** Stake / pays card on the placed screen. */
|
|
22
|
+
export declare function placedEntrySummary(game: Game | null | undefined, props: Proposition[], stake: number, expectedCorrect: number | null | undefined, winningCounts: number[] | null | undefined, payouts: Record<number, number> | null | undefined, now?: number): {
|
|
23
|
+
payLabel: string;
|
|
24
|
+
pays: number;
|
|
25
|
+
note: string;
|
|
26
|
+
};
|
|
27
|
+
/** One row of the entries list. `settledLabel` is the existing Won / Paid / Lost status. */
|
|
28
|
+
export declare function shelfEntrySummary(entry: GameEntry, game: Game | undefined, legs: EntryLeg[], settledLabel: string | null, now?: number): {
|
|
29
|
+
detail: string;
|
|
30
|
+
pips: PipState[];
|
|
31
|
+
pay: {
|
|
32
|
+
label: string;
|
|
33
|
+
amount: number;
|
|
34
|
+
struck: boolean;
|
|
35
|
+
} | null;
|
|
36
|
+
status: string;
|
|
37
|
+
dead: boolean;
|
|
38
|
+
};
|
|
@@ -23,6 +23,8 @@ export interface GameArtwork {
|
|
|
23
23
|
icons: Readonly<Record<string, string>>;
|
|
24
24
|
/** Category covers and guide branding supplied by the library. */
|
|
25
25
|
categoryCovers?: Readonly<Record<string, string>>;
|
|
26
|
+
/** One SVG mark per category (currentColor + icon accent), drawn on the Shelf category banners' drawn covers. */
|
|
27
|
+
categoryIcons?: Readonly<Record<string, string>>;
|
|
26
28
|
guideLogo?: string;
|
|
27
29
|
catalogueImages?: Readonly<Record<string, string>>;
|
|
28
30
|
/** Shelf cover data URLs by icon id. */
|
|
@@ -48,6 +48,26 @@ export declare function lockedLegCount(game: Game | null | undefined, selectedCo
|
|
|
48
48
|
export declare function isLegsLockedGame(game: Game | null | undefined): boolean;
|
|
49
49
|
export declare function canQuickPickResize(game: Game | null | undefined): boolean;
|
|
50
50
|
export declare function quickPickSizes(game: Game | null | undefined, rule: GamePermittedRule | null | undefined, available: number): number[];
|
|
51
|
+
export type QuickPickControl = {
|
|
52
|
+
kind: 'menu';
|
|
53
|
+
counts: number[];
|
|
54
|
+
hint: string;
|
|
55
|
+
fillLabel?: string;
|
|
56
|
+
randomise?: {
|
|
57
|
+
label: string;
|
|
58
|
+
count: number;
|
|
59
|
+
};
|
|
60
|
+
} | {
|
|
61
|
+
kind: 'button';
|
|
62
|
+
mode: 'fill' | 'replace';
|
|
63
|
+
hint: string;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* What QuickPick offers. Several sizes: a menu of every size (picking one fills or trims the
|
|
67
|
+
* card to it) plus Randomise all once something is picked. One size: fill straight away on an empty card, randomise a
|
|
68
|
+
* full one, and ask "Fill the other N" or "Randomise all N" when it's part done.
|
|
69
|
+
*/
|
|
70
|
+
export declare function quickPickControl(sizes: readonly number[], answered: number, total: number, current: number): QuickPickControl;
|
|
51
71
|
export declare function isStakeLockedGame(game: Game | null | undefined): boolean;
|
|
52
72
|
/** Why the stake is fixed, shown beside the locked figure. */
|
|
53
73
|
export declare function stakeLockedNote(game: Game | null | undefined): string;
|
|
@@ -6,8 +6,9 @@ export declare const GAME_ICON_SCHEME = "game-icon:";
|
|
|
6
6
|
export declare const GAME_ICON_SVG: Readonly<Record<string, string>>;
|
|
7
7
|
/** Resolve a bundled icon id for a game; unknown games use the question-mark fallback. */
|
|
8
8
|
export declare function resolveGameIconId(game: Pick<Game, 'game_name' | 'quick_pick_only' | 'rule'>): GameIconId;
|
|
9
|
+
export declare const CATEGORY_ICON_PREFIX: RegExp;
|
|
9
10
|
/** Stable URL token consumed by IconSvg (never fetched over the network). */
|
|
10
|
-
export declare function resolveGameIconUrl(game: Pick<Game, 'game_name' | 'quick_pick_only' | 'rule'>): string;
|
|
11
|
+
export declare function resolveGameIconUrl(game: Pick<Game, 'game_name' | 'game_name_template' | 'quick_pick_only' | 'rule' | 'category'>): string;
|
|
11
12
|
export declare function isGameIconUrl(iconUrl: string): boolean;
|
|
12
13
|
/** Markup for a local icon token, from the given icon set (the base icons by default); unknown ids use the fallback. */
|
|
13
14
|
export declare function resolveGameIconMarkup(iconUrl: string, icons?: Readonly<Record<string, string | undefined>>): string | null;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { CategoryGamePreset, GameArtwork } from './game-artwork';
|
|
2
2
|
import { BladeTheme } from './themes';
|
|
3
|
-
import { Game } from './types';
|
|
3
|
+
import { Game, TopPayoutsResponse } from './types';
|
|
4
|
+
import { DrawnCover } from './shelf-covers';
|
|
4
5
|
import { GameTierId } from './game-tiers';
|
|
5
|
-
export { playbookTier as shelfTier, playbookHook as shelfHook } from './playbook';
|
|
6
|
+
export { playbookTier as shelfTier, playbookHook as shelfHook, playbookMechanic as shelfMechanic } from './playbook';
|
|
7
|
+
/** What a game pays: "$2,230 for 8 right" (Mirror: "right or wrong"). Null without payout data, never $0. */
|
|
8
|
+
export declare function shelfPayoutLine(game: Game, payouts?: TopPayoutsResponse): string | null;
|
|
6
9
|
/** Illustrated games lead each shelf; the rest follow in API order. */
|
|
7
10
|
export declare const FEATURED: string[];
|
|
8
11
|
export declare const COVER_COLORS: Record<string, string>;
|
|
@@ -35,9 +38,42 @@ export declare function resolveShelfSkin(theme: BladeTheme): {
|
|
|
35
38
|
buttonText: string;
|
|
36
39
|
coverText: string;
|
|
37
40
|
artwork?: Record<string, string | null>;
|
|
41
|
+
coverStyle?: "art" | "brand" | "mark" | "stacked" | "tile";
|
|
38
42
|
heroArtwork?: Record<string, string | null>;
|
|
39
43
|
categoryArtwork?: Record<string, string | null>;
|
|
40
44
|
};
|
|
45
|
+
/** Game Shelf's category banner: shared by the page and its loading skeleton on both platforms. */
|
|
46
|
+
export declare const SHELF_CATEGORY_BANNER: {
|
|
47
|
+
readonly height: 116;
|
|
48
|
+
readonly art: 150;
|
|
49
|
+
readonly radius: 16;
|
|
50
|
+
readonly pad: 16;
|
|
51
|
+
readonly gap: 12;
|
|
52
|
+
readonly minWidth: 300;
|
|
53
|
+
readonly mark: 92;
|
|
54
|
+
readonly markRight: 16;
|
|
55
|
+
};
|
|
41
56
|
/** Specific suite overrides precede generic rule artwork overrides. */
|
|
42
57
|
export declare function resolveShelfArtwork(game: Game, theme: BladeTheme, artwork?: GameArtwork): string | null | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* One Shelf cover: its ground and name ink, and either its illustration or its drawn art (`theme.shelf.coverStyle`).
|
|
60
|
+
* In `art` mode a game without an illustration is drawn in `brand`.
|
|
61
|
+
*/
|
|
62
|
+
export declare function resolveShelfCover(game: Game, theme: BladeTheme, artwork?: GameArtwork): {
|
|
63
|
+
ground: string;
|
|
64
|
+
ink: string;
|
|
65
|
+
art?: string;
|
|
66
|
+
drawn?: DrawnCover;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* One category banner's ground, name ink and picture, or its mark (from the game library's `categoryIcons`) drawn like
|
|
70
|
+
* the game covers: in `brand` on the stacked tiles on stone, in `mark` / `stacked` / `tile` on a colour ground. A
|
|
71
|
+
* picture set to null in `art` mode stays hidden; without a mark a drawn banner is its ground and name.
|
|
72
|
+
*/
|
|
73
|
+
export declare function resolveShelfCategoryArt(category: string, theme: BladeTheme, artwork?: Pick<GameArtwork, 'categoryCovers' | 'categoryIcons'>): {
|
|
74
|
+
ground?: string;
|
|
75
|
+
ink: string;
|
|
76
|
+
art?: string | null;
|
|
77
|
+
drawn?: DrawnCover;
|
|
78
|
+
};
|
|
43
79
|
export declare function shelfGameName(game: Game, presets?: readonly CategoryGamePreset[]): string;
|
package/dist/shared/hooks.d.ts
CHANGED
|
@@ -67,7 +67,7 @@ export declare function useCreateGameEntry(apiClient: BladeApiClient): {
|
|
|
67
67
|
clearSubmitError: () => void;
|
|
68
68
|
};
|
|
69
69
|
export declare function usePlaceEntryFlow(initialGameId?: number): {
|
|
70
|
-
step: "sport" | "
|
|
70
|
+
step: "sport" | "game" | "success" | "confirm";
|
|
71
71
|
selectedGame: Game | null;
|
|
72
72
|
selections: Record<number, "yes" | "no">;
|
|
73
73
|
placedEntry: GameEntry | null;
|
|
@@ -1,14 +1,80 @@
|
|
|
1
1
|
import { Game, TopPayoutsResponse } from './types';
|
|
2
|
+
import { MarketFamily } from './selection-caps';
|
|
2
3
|
/** Copy for the live slip docked under the selection list. */
|
|
3
4
|
export declare const SLIP_EMPTY_HINT = "Tap Yes or No to start building your multi.";
|
|
4
5
|
export declare const SLIP_STAKE_LABEL = "Your stake";
|
|
5
6
|
export declare const SLIP_DIVIDEND_LABEL = "Potential dividend";
|
|
6
7
|
export declare const SLIP_LEG_HINT = "Tap a leg to read it.";
|
|
7
8
|
export declare const SLIP_LEG_REMOVE = "Remove";
|
|
8
|
-
export declare const SLIP_CLEAR = "Clear
|
|
9
|
+
export declare const SLIP_CLEAR = "Clear picks";
|
|
10
|
+
export declare const SELECTION_UNDO = "Undo";
|
|
11
|
+
/** The accessible name of the bolt on a row QuickPick answered. */
|
|
12
|
+
export declare const QUICK_PICKED_NOTE = "Picked by QuickPick";
|
|
13
|
+
/** QuickPick's shuffle mark, stroked paths on a 24×24 viewBox: the QuickPick buttons, the snackbar and the row marks. */
|
|
14
|
+
export declare const QUICK_PICK_ICON: readonly string[];
|
|
15
|
+
/** Snackbar after QuickPick fills the empty slots: "Filled 6 picks". */
|
|
16
|
+
export declare function quickPickUndoMessage(filled: number): string;
|
|
17
|
+
/** Snackbar after QuickPick shrinks the card: "Removed your last 2 picks". */
|
|
18
|
+
export declare function quickPickTrimMessage(removed: number): string;
|
|
19
|
+
/** Snackbar after Randomise all: "Randomised all 8 picks". */
|
|
20
|
+
export declare function quickPickReplaceMessage(count: number): string;
|
|
21
|
+
/** Snackbar after Clear picks: "Cleared 5 picks". */
|
|
22
|
+
export declare function clearPicksUndoMessage(count: number): string;
|
|
23
|
+
/** Snackbar after a folded row swaps in for the pick holding its slot. */
|
|
24
|
+
export declare const SWAP_UNDO_MESSAGE = "Swapped your pick";
|
|
25
|
+
type PickGroupKey = MarketFamily | 'other';
|
|
26
|
+
/** A match card's rail labels, per group. */
|
|
27
|
+
export declare const PICK_GROUP_COPY: Record<PickGroupKey, {
|
|
28
|
+
label: string;
|
|
29
|
+
caption?: string;
|
|
30
|
+
noun: string;
|
|
31
|
+
}>;
|
|
32
|
+
export declare const pickGroupCopy: (family: MarketFamily | null) => {
|
|
33
|
+
label: string;
|
|
34
|
+
caption?: string;
|
|
35
|
+
noun: string;
|
|
36
|
+
};
|
|
37
|
+
/** Rail icons, stroked paths on a 24×24 viewBox: line versions of the Head to Head and Total Points marks, a jersey, a plus. */
|
|
38
|
+
export declare const PICK_GROUP_ICON: Record<PickGroupKey, readonly string[]>;
|
|
39
|
+
export declare const pickGroupIcon: (family: MarketFamily | null) => readonly string[];
|
|
40
|
+
/** The limit chip on a group's rail tile: "Pick 1" until it's full, then "1 of 1". */
|
|
41
|
+
export declare function pickLimitLabel(cap: number, full: boolean): string;
|
|
42
|
+
/** The tile the blocked rows fold into: "7 other players". */
|
|
43
|
+
export declare function foldedRowsLabel(count: number, family: MarketFamily | null): string;
|
|
44
|
+
/** The rule under it: "One per match. Picking another swaps it." */
|
|
45
|
+
export declare function foldedRowsRule(cap: number): string;
|
|
46
|
+
/** Shelf: how many `min`-wide columns fit across, `gap` apart — phone-width (400px) match cards by default. Same count as CSS `repeat(auto-fill, minmax(min, 1fr))`. */
|
|
47
|
+
export declare function shelfColumns(width: number, min?: number, gap?: number): number;
|
|
48
|
+
/**
|
|
49
|
+
* Shelf paging in fixed pages of `n` (1–2, 3–4 … 9): Next only ever brings in
|
|
50
|
+
* matches you haven't seen, and a jump to `at` lands on the page holding it.
|
|
51
|
+
* `prev` / `next` are where those pages start, null at the ends.
|
|
52
|
+
*/
|
|
53
|
+
export declare function shelfPage(count: number, at: number, n: number): {
|
|
54
|
+
start: number;
|
|
55
|
+
end: number;
|
|
56
|
+
prev: number | null;
|
|
57
|
+
next: number | null;
|
|
58
|
+
};
|
|
59
|
+
export type ShelfPage = ReturnType<typeof shelfPage>;
|
|
60
|
+
/** The jump board's days: every match in order under the day it starts ("Fri, 9 Oct"), with its place in the list. Undated ones share an unlabelled day. */
|
|
61
|
+
export declare function matchesByDay<T extends {
|
|
62
|
+
date: Date | null;
|
|
63
|
+
}>(events: readonly T[]): {
|
|
64
|
+
label: string;
|
|
65
|
+
items: {
|
|
66
|
+
event: T;
|
|
67
|
+
index: number;
|
|
68
|
+
}[];
|
|
69
|
+
}[];
|
|
70
|
+
/** "Next match", or "Next 2 matches" when the arrow pages several. */
|
|
71
|
+
export declare function stepLabel(dir: -1 | 1, count: number, noun: string): string;
|
|
72
|
+
/**
|
|
73
|
+
* The toggles that turn the `from` card into `to`: toggling an id's current
|
|
74
|
+
* answer drops it, toggling any other answer sets it. Empty when they match.
|
|
75
|
+
*/
|
|
76
|
+
export declare function selectionToggles(from: Record<number, 'yes' | 'no'>, to: Record<number, 'yes' | 'no'>): [number, 'yes' | 'no'][];
|
|
9
77
|
export declare const SPORT_LOCKED_HINT = "One sport per bet.";
|
|
10
|
-
export declare const VIEW_LIST_GLYPH = "\u2630";
|
|
11
|
-
export declare const VIEW_SWIPE_GLYPH = "\u21C6";
|
|
12
78
|
export declare const VIEW_LIST_LABEL = "List";
|
|
13
79
|
export declare const VIEW_SWIPE_LABEL = "Swipe";
|
|
14
80
|
export interface LiveSlipLeg {
|
|
@@ -59,3 +125,4 @@ export declare function payout20AtCount(payouts: TopPayoutsResponse | undefined,
|
|
|
59
125
|
expectedCorrect?: number;
|
|
60
126
|
stake?: number;
|
|
61
127
|
}): number;
|
|
128
|
+
export {};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Game, Proposition } from './types';
|
|
2
2
|
/**
|
|
3
|
-
* Which games ration the slots at all.
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* Game is already confined to a single fixture and priced for it, and every
|
|
3
|
+
* Which games ration the slots at all: the limited risk modes. BLADE holds a
|
|
4
|
+
* `limited` card to one line, one total and one player per match (two players
|
|
5
|
+
* under `limited_2p`) and prices it as independent legs, so the slots are the
|
|
6
|
+
* card's only rule. `any` leaves the mix to the Correlation Engine, and every
|
|
8
7
|
* other game leaves the slots alone — nothing greyed, no slot chips drawn.
|
|
9
8
|
*
|
|
10
9
|
* No game means no caps, so a caller that forgets to pass one shows no
|
|
@@ -17,10 +16,6 @@ export declare const MARKET_CAPS: Record<MarketFamily, number>;
|
|
|
17
16
|
export declare function marketCaps(game?: Game | null): Record<MarketFamily, number>;
|
|
18
17
|
/** Slot names, as they read on a fixture header. */
|
|
19
18
|
export declare const MARKET_FAMILY_LABEL: Record<MarketFamily, string>;
|
|
20
|
-
/** How the market filter names each family — plural, since it picks many. */
|
|
21
|
-
export declare const MARKET_FAMILY_FILTER_LABEL: Record<MarketFamily, string>;
|
|
22
|
-
/** A raw feed market type as a filter chip reads it: `player_first_try` → "Player First Try". */
|
|
23
|
-
export declare function formatMarketTypeLabel(marketType: string): string;
|
|
24
19
|
export declare function slotTooltip(family: MarketFamily, filled: boolean): string;
|
|
25
20
|
/** Why a greyed row won't answer. */
|
|
26
21
|
export declare function capReason(family: MarketFamily): string;
|
|
@@ -61,8 +56,69 @@ export interface SelectionCaps {
|
|
|
61
56
|
* question and get the same answer.
|
|
62
57
|
*/
|
|
63
58
|
export declare function buildSelectionCaps(propositions: readonly Proposition[], selections: Record<number, 'yes' | 'no'>, componentById?: ReadonlyMap<number, Proposition> | null, game?: Game | null): SelectionCaps;
|
|
59
|
+
/** A match card's groups, in reading order: the line, the total, the players, then anything else. */
|
|
60
|
+
export declare const PICK_GROUP_ORDER: readonly (MarketFamily | null)[];
|
|
61
|
+
export interface PickGroup {
|
|
62
|
+
family: MarketFamily | null;
|
|
63
|
+
props: Proposition[];
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* One match's questions split into PICK_GROUP_ORDER, each keeping the feed's
|
|
67
|
+
* order. A match with no family at all (a race, a novelty) comes back as one
|
|
68
|
+
* `null` group, which the card draws without a rail.
|
|
69
|
+
*/
|
|
70
|
+
export declare function groupByFamily(props: readonly Proposition[]): PickGroup[];
|
|
71
|
+
/**
|
|
72
|
+
* A shelf group's limit: shown only when the group offers more than it allows. Once it's full, `blocked` are the
|
|
73
|
+
* rows it rules out, which fold away in place behind one tile.
|
|
74
|
+
*/
|
|
75
|
+
export declare function shelfGroupLimit({ family, props }: PickGroup, selections: Record<number, 'yes' | 'no'>, caps: SelectionCaps, game?: Game | null): {
|
|
76
|
+
cap: number;
|
|
77
|
+
limited: boolean;
|
|
78
|
+
full: boolean;
|
|
79
|
+
blocked: ReadonlySet<number>;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Whether a limited game's server takes this leg: a spread, a total or a player prop, read off the market type the
|
|
83
|
+
* way BLADE's `correlation_market_class` reads it. Head-to-heads, corners and composites are refused.
|
|
84
|
+
*/
|
|
85
|
+
export declare function limitedLegAllowed(prop: Proposition): boolean;
|
|
86
|
+
/**
|
|
87
|
+
* The picks to drop so `prop` fits its match: for every family it would
|
|
88
|
+
* overfill, the same player's pick if there is one, else the most recent pick
|
|
89
|
+
* (by `pickOrder`; the last in the feed without it).
|
|
90
|
+
* Empty when it already fits.
|
|
91
|
+
*/
|
|
92
|
+
export declare function swapOut(prop: Proposition, pool: readonly Proposition[], selections: Record<number, 'yes' | 'no'>, componentById?: ReadonlyMap<number, Proposition> | null, game?: Game | null, pickOrder?: readonly number[]): number[];
|
|
93
|
+
/** Fisher–Yates: every order equally likely, which `sort(() => Math.random() - 0.5)` is not. */
|
|
94
|
+
export declare function shuffled<T>(rows: readonly T[]): T[];
|
|
64
95
|
/**
|
|
65
96
|
* Quick pick's pool, thinned to what a player could have picked by hand — one
|
|
66
97
|
* slot per family per fixture, in the order it is handed (already shuffled).
|
|
98
|
+
* `kept` are picks already on the card: they hold their slots first, but don't
|
|
99
|
+
* count toward `count`.
|
|
100
|
+
*/
|
|
101
|
+
export declare function takeWithinCaps(pool: readonly Proposition[], count: number, componentById?: ReadonlyMap<number, Proposition> | null, game?: Game | null, kept?: readonly Proposition[]): Proposition[];
|
|
102
|
+
export type QuickPickMode = 'fill' | 'replace';
|
|
103
|
+
type Answer = 'yes' | 'no';
|
|
104
|
+
/**
|
|
105
|
+
* QuickPick's next card at `count` picks. fill keeps the player's picks and adds random ones
|
|
106
|
+
* to the empty slots; with more picks than `count` it drops the most recent extras (by
|
|
107
|
+
* `pickOrder`). replace throws the card away and picks `count` afresh.
|
|
67
108
|
*/
|
|
68
|
-
export declare function
|
|
109
|
+
export declare function planQuickPick({ selections, pickOrder, propositions, count, mode, componentById, game, coin }: {
|
|
110
|
+
selections: Readonly<Record<number, Answer>>;
|
|
111
|
+
pickOrder: readonly number[];
|
|
112
|
+
propositions: readonly Proposition[];
|
|
113
|
+
count: number;
|
|
114
|
+
mode: QuickPickMode;
|
|
115
|
+
componentById?: ReadonlyMap<number, Proposition> | null;
|
|
116
|
+
game?: Game | null;
|
|
117
|
+
coin?: () => Answer;
|
|
118
|
+
}): {
|
|
119
|
+
next: Record<number, Answer>;
|
|
120
|
+
added: Record<number, Answer>;
|
|
121
|
+
removed: number;
|
|
122
|
+
kept: number;
|
|
123
|
+
};
|
|
124
|
+
export {};
|
|
@@ -42,6 +42,11 @@ export declare function teamCode(team: string | null | undefined): string;
|
|
|
42
42
|
export declare function fixtureShortLabel(event: SelectionEvent): string;
|
|
43
43
|
/** Both teams in full — the selected match chip, when the rail has room. */
|
|
44
44
|
export declare function fixtureFullLabel(event: SelectionEvent): string;
|
|
45
|
+
/** A grouping key's two clubs, when it names both ("Home vs Away"). */
|
|
46
|
+
export declare function splitMatchup(key: string, racing: boolean): {
|
|
47
|
+
home?: string;
|
|
48
|
+
away?: string;
|
|
49
|
+
};
|
|
45
50
|
/**
|
|
46
51
|
* Fixtures in kick-off order, split into day blocks; undated ones trail.
|
|
47
52
|
*
|
|
@@ -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';
|