@simple-parlay/components 1.30.6-pre.3 → 1.30.6-pre.4
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.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +212 -215
- package/dist/react/components/MultiLegTable.d.ts +3 -1
- package/dist/react/components/PlaceEntryProvider.d.ts +1 -0
- package/dist/react/index.js +1 -1
- package/dist/react/index.mjs +212 -215
- package/dist/react-native/components/MultiLegTable.d.ts +3 -1
- package/dist/react-native/components/PlaceEntryProvider.d.ts +1 -0
- package/dist/react-native/components/SportSelector.d.ts +1 -1
- package/dist/react-native/index.js +1 -1
- package/dist/react-native/index.mjs +332 -332
- package/dist/shared/game-flow.d.ts +12 -1
- package/dist/shared/game-set-bet.d.ts +0 -1
- package/dist/shared/menu-placement.d.ts +26 -0
- package/dist/shared/mirror.d.ts +5 -3
- package/dist/shared/selection-actions.d.ts +8 -4
- package/dist/shared/selection-caps.d.ts +0 -1
- package/dist/shared/types.d.ts +6 -0
- package/package.json +1 -1
|
@@ -38,7 +38,18 @@ export interface ConfirmBoostCopy {
|
|
|
38
38
|
*/
|
|
39
39
|
export declare function getConfirmBoostCopy(game: Game | null | undefined): ConfirmBoostCopy;
|
|
40
40
|
export declare function describeWinCondition(rule: GamePermittedRule | null | undefined, winningCounts: number[] | null | undefined, totalPicks: number, payouts?: Record<number, number> | null): string | null;
|
|
41
|
+
export interface WinConditionPrizeRow {
|
|
42
|
+
count: number;
|
|
43
|
+
label: string;
|
|
44
|
+
prize: number;
|
|
45
|
+
}
|
|
46
|
+
export declare function winConditionPrizeRows(winningCounts: number[] | null | undefined, totalPicks: number, payouts: Record<number, number> | null | undefined): WinConditionPrizeRow[];
|
|
47
|
+
export declare function lockedLegCount(game: Game | null | undefined, selectedCount: number | null | undefined): number | null;
|
|
48
|
+
export declare function isLegsLockedGame(game: Game | null | undefined): boolean;
|
|
41
49
|
export declare function isStakeLockedGame(game: Game | null | undefined): boolean;
|
|
42
50
|
/** Why the stake is fixed, shown beside the locked figure. */
|
|
43
51
|
export declare function stakeLockedNote(game: Game | null | undefined): string;
|
|
44
|
-
export declare function quotedPayoutAtCount(game: Game | null | undefined, count: number, stake: number
|
|
52
|
+
export declare function quotedPayoutAtCount(game: Game | null | undefined, count: number, stake: number, opts?: {
|
|
53
|
+
expectedCorrect?: number;
|
|
54
|
+
}): number;
|
|
55
|
+
export declare function roundQuotedPayout(amount: number, game?: Game | null): number;
|
|
@@ -39,7 +39,6 @@ export interface GameSetBetConfig {
|
|
|
39
39
|
}
|
|
40
40
|
/** Whether a game is a Game Set Bet (routes to the one-screen ticket builder). */
|
|
41
41
|
export declare function isGameSetBetGame(game: Game | null | undefined): boolean;
|
|
42
|
-
/** Price a ticket: total return incl. stake, exact to the cent — never rounded. */
|
|
43
42
|
export declare function gameSetPrize(stake: number, legs: number, opts?: {
|
|
44
43
|
operatorMargin?: number;
|
|
45
44
|
perLegProbability?: number;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface MenuPlacement {
|
|
2
|
+
top: number;
|
|
3
|
+
left: number;
|
|
4
|
+
maxHeight: number;
|
|
5
|
+
}
|
|
6
|
+
export interface MenuPlacementInput {
|
|
7
|
+
/** Trigger box, viewport coordinates (a `getBoundingClientRect()`). */
|
|
8
|
+
trigger: {
|
|
9
|
+
top: number;
|
|
10
|
+
bottom: number;
|
|
11
|
+
left: number;
|
|
12
|
+
right: number;
|
|
13
|
+
};
|
|
14
|
+
viewport: {
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
};
|
|
18
|
+
/** How tall the menu is with every option shown. */
|
|
19
|
+
wanted: number;
|
|
20
|
+
width: number;
|
|
21
|
+
align: 'left' | 'right';
|
|
22
|
+
direction: 'down' | 'up';
|
|
23
|
+
/** Trim an over-tall menu to a whole number of rows. */
|
|
24
|
+
snap?: (space: number) => number;
|
|
25
|
+
}
|
|
26
|
+
export declare function placeMenu({ trigger, viewport, wanted, width, align, direction, snap, }: MenuPlacementInput): MenuPlacement;
|
package/dist/shared/mirror.d.ts
CHANGED
|
@@ -13,11 +13,13 @@ import { Game } from './types';
|
|
|
13
13
|
* Pricing (suite-standard 21.875% margin): the prize budget is the stake less
|
|
14
14
|
* the margin, split equally across the two winning outcomes, so each side pays
|
|
15
15
|
* prize = stake × (1 − margin) × 2^(N−1)
|
|
16
|
-
* quoted
|
|
17
|
-
*
|
|
16
|
+
* quoted in whole dollars — a dividend is advertised as $1,333, never
|
|
17
|
+
* $1,333.33. Each extra leg doubles the prize and the margin holds flat at
|
|
18
|
+
* every leg count (RTP 78.125%, within the cent the rounding moves).
|
|
18
19
|
*/
|
|
19
20
|
/** Suite-standard operator margin for Mirror Standard. */
|
|
20
21
|
export declare const MIRROR_STANDARD_MARGIN = 0.21875;
|
|
22
|
+
export declare function resolveMirrorMargin(stored: number | null | undefined): number;
|
|
21
23
|
/** A live prize quote for a stake/legs combination. */
|
|
22
24
|
export interface MirrorPrize {
|
|
23
25
|
legs: number;
|
|
@@ -60,7 +62,7 @@ export declare function isMirrorGame(game: Game | null | undefined): boolean;
|
|
|
60
62
|
/** Which mirror this game is. Unknown rules fall back to the straight one. */
|
|
61
63
|
export declare function resolveMirrorVariantId(game: Game | null | undefined): MirrorVariantId;
|
|
62
64
|
/**
|
|
63
|
-
* Price a Mirror ticket: what each winning side pays,
|
|
65
|
+
* Price a Mirror ticket: what each winning side pays, to the dollar.
|
|
64
66
|
*
|
|
65
67
|
* The prize is fixed at the fair 50/50 price — stake × (1 − margin) × 2^(N−1) —
|
|
66
68
|
* so it is independent of `perLegProbability`; a skewed leg probability only
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { TopPayoutsResponse } from './types';
|
|
1
|
+
import { Game, TopPayoutsResponse } from './types';
|
|
2
2
|
/** Copy for the live slip docked under the selection list. */
|
|
3
3
|
export declare const SLIP_EMPTY_HINT = "Tap Yes or No to start building your multi.";
|
|
4
4
|
export declare const SLIP_STAKE_LABEL = "Your stake";
|
|
5
5
|
export declare const SLIP_DIVIDEND_LABEL = "Potential dividend";
|
|
6
6
|
export declare const SLIP_LEG_HINT = "Tap a leg to read it.";
|
|
7
7
|
export declare const SLIP_LEG_REMOVE = "Remove";
|
|
8
|
+
export declare const SLIP_CLEAR = "Clear bet";
|
|
8
9
|
export declare const VIEW_LIST_GLYPH = "\u2630";
|
|
9
10
|
export declare const VIEW_SWIPE_GLYPH = "\u21C6";
|
|
10
11
|
export declare const VIEW_LIST_LABEL = "List view";
|
|
@@ -50,7 +51,10 @@ export declare function buildLiveSlip({ selections, order, minReq, maxReq, stake
|
|
|
50
51
|
export declare function mergePickOrder(prev: number[], selections: Record<number, 'yes' | 'no'>): number[];
|
|
51
52
|
/**
|
|
52
53
|
* Dividend for a leg count, normalised to a $20 bet. Reads the game's own
|
|
53
|
-
* `/max-payout` table
|
|
54
|
-
* overload callout covers.
|
|
54
|
+
* `/max-payout` table
|
|
55
55
|
*/
|
|
56
|
-
export declare function payout20AtCount(payouts: TopPayoutsResponse | undefined, count: number
|
|
56
|
+
export declare function payout20AtCount(payouts: TopPayoutsResponse | undefined, count: number, opts?: {
|
|
57
|
+
game?: Game | null;
|
|
58
|
+
expectedCorrect?: number;
|
|
59
|
+
stake?: number;
|
|
60
|
+
}): number;
|
|
@@ -32,7 +32,6 @@ export interface SelectionCaps {
|
|
|
32
32
|
isCapped: (prop: Proposition) => boolean;
|
|
33
33
|
/** Families already spent in a fixture — for the slot chips on its header. */
|
|
34
34
|
filledFor: (key: string | null) => ReadonlySet<MarketFamily>;
|
|
35
|
-
/** Slots to draw on a fixture header, in a fixed order. */
|
|
36
35
|
slotsFor: (key: string | null) => {
|
|
37
36
|
family: MarketFamily;
|
|
38
37
|
label: string;
|
package/dist/shared/types.d.ts
CHANGED
|
@@ -67,6 +67,12 @@ export interface Game {
|
|
|
67
67
|
};
|
|
68
68
|
};
|
|
69
69
|
operator_margin?: number;
|
|
70
|
+
/**
|
|
71
|
+
* BLADE's quote-rounding switch: when true (or absent) quotes round to the
|
|
72
|
+
* nearest `payout_structure.round_to` (default $1); explicit false means the
|
|
73
|
+
* backend quotes exact and blade must not re-round.
|
|
74
|
+
*/
|
|
75
|
+
round_payouts?: boolean;
|
|
70
76
|
jackpot_enabled?: boolean;
|
|
71
77
|
jackpot_amount?: number;
|
|
72
78
|
jackpot_limit?: number | null;
|