@simple-parlay/components 1.30.6-pre.3 → 1.30.6-pre.5
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 +289 -294
- package/dist/react/components/MultiLegTable.d.ts +3 -1
- package/dist/react/components/PlaceEntryProvider.d.ts +4 -1
- package/dist/react/components/PropositionFilters.d.ts +3 -1
- package/dist/react/components/SportRail.d.ts +0 -4
- package/dist/react/components/SportSelector.d.ts +1 -1
- package/dist/react/components/_primitives/index.d.ts +4 -0
- package/dist/react/index.d.ts +2 -0
- package/dist/react/index.js +1 -1
- package/dist/react/index.mjs +289 -294
- package/dist/react/utils/index.d.ts +1 -1
- package/dist/react-native/components/LoadingIndicators.d.ts +1 -1
- package/dist/react-native/components/MultiLegTable.d.ts +3 -1
- package/dist/react-native/components/PlaceEntryProvider.d.ts +4 -1
- package/dist/react-native/components/PropositionFilters.d.ts +3 -1
- package/dist/react-native/components/SportRail.d.ts +6 -4
- package/dist/react-native/components/SportSelector.d.ts +2 -2
- package/dist/react-native/components/_primitives/index.d.ts +5 -1
- package/dist/react-native/index.d.ts +2 -0
- package/dist/react-native/index.js +1 -1
- package/dist/react-native/index.mjs +376 -379
- package/dist/react-native/utils/index.d.ts +1 -1
- package/dist/shared/date-filters.d.ts +5 -4
- package/dist/shared/game-flow.d.ts +12 -1
- package/dist/shared/game-set-bet.d.ts +0 -1
- package/dist/shared/hooks.d.ts +1 -1
- package/dist/shared/menu-placement.d.ts +26 -0
- package/dist/shared/mirror.d.ts +5 -3
- package/dist/shared/picker-brand.d.ts +2 -0
- package/dist/shared/selection-actions.d.ts +9 -4
- package/dist/shared/selection-caps.d.ts +0 -1
- package/dist/shared/types.d.ts +7 -0
- package/dist/shared/utils.d.ts +11 -1
- package/package.json +1 -1
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { Game } from '../../shared/types';
|
|
1
2
|
export interface MultiLegTableTier {
|
|
2
3
|
count: number;
|
|
3
4
|
payout20: number;
|
|
4
5
|
}
|
|
5
6
|
export interface MultiLegTableProps {
|
|
6
7
|
tiers: MultiLegTableTier[];
|
|
8
|
+
game?: Game | null;
|
|
7
9
|
selectedCount?: number;
|
|
8
10
|
onSelect: (count: number) => void;
|
|
9
11
|
colors: {
|
|
@@ -37,4 +39,4 @@ export interface MultiLegTableProps {
|
|
|
37
39
|
* Renders a compact Legs / Dividend / $X returns table identical to the
|
|
38
40
|
* one on the Game Page. Used by both GameSelector and ConfirmPage.
|
|
39
41
|
*/
|
|
40
|
-
export declare function MultiLegTable({ tiers, selectedCount, onSelect, colors: c, bodyFont, extraBetAmount, buttonLabel, columnLabel, buildYourOwn, quickPickOnly, onQuickPick, collapsible, expanded: expandedProp, onExpandedChange, summaryTiers }: MultiLegTableProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export declare function MultiLegTable({ tiers, game, selectedCount, onSelect, colors: c, bodyFont, extraBetAmount, buttonLabel, columnLabel, buildYourOwn, quickPickOnly, onQuickPick, collapsible, expanded: expandedProp, onExpandedChange, summaryTiers }: MultiLegTableProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { YesNoLabels } from '../../shared/utils';
|
|
2
3
|
import { Game, Proposition, SportSummary, GameEntry, TopPayoutsResponse, ShareData, ScreenSize } from '../types';
|
|
3
4
|
import { BladeTheme, BladeThemeSet, ColorScheme } from '../utils/themes';
|
|
4
5
|
import { SportDisplayNameOverrides, CategoryDisplayNameOverrides } from '../utils';
|
|
@@ -61,6 +62,7 @@ export interface PlaceEntryContextValue {
|
|
|
61
62
|
clearSelectedGame: () => void;
|
|
62
63
|
toggleSelection: (id: number, answer: 'yes' | 'no') => void;
|
|
63
64
|
quickPickGame: (game: Game, count: number, stake?: number) => void;
|
|
65
|
+
quickPickSelections: (count: number) => number;
|
|
64
66
|
selectedCategory: string | null;
|
|
65
67
|
setSelectedCategory: (category: string | null) => void;
|
|
66
68
|
selectedSport: string | null;
|
|
@@ -140,6 +142,7 @@ export interface PlaceEntryProviderProps {
|
|
|
140
142
|
renderPropositionSilk?: RenderPropositionSilk;
|
|
141
143
|
selectionVariant?: SelectionVariant;
|
|
142
144
|
disableEventSwipe?: boolean;
|
|
145
|
+
yesNoLabels?: YesNoLabels;
|
|
143
146
|
enableSportFavourites?: boolean;
|
|
144
147
|
onEntryPlaced?: (entry: GameEntry) => void;
|
|
145
148
|
onBeforeSubmit?: (betAmount: number) => void | Promise<void>;
|
|
@@ -154,4 +157,4 @@ export interface PlaceEntryProviderProps {
|
|
|
154
157
|
/** Map entry categories to UI labels. */
|
|
155
158
|
categoryDisplayNames?: CategoryDisplayNameOverrides;
|
|
156
159
|
}
|
|
157
|
-
export declare function PlaceEntryProvider({ apiUrl, apiKey, fetchImpl, getAuthHeaders, userId, getUserBalance, children, theme: themeProp, colorScheme, demoGames, demoPropositions, demoEntries, demoMaxPayouts, gameCategory, jurisdiction, initialGameId, filterSport, initialSport, initialEventId, initialEventLabel, sportBaseKey, disableQuickPick, renderTeamLogo, renderPropositionSilk, selectionVariant, disableEventSwipe, enableSportFavourites, onEntryPlaced, onBeforeSubmit, onCancel, onShare, onRecharge, onClearEventFilter, screenSize, howToPlayMarkdown: howToPlayMarkdownProp, sportDisplayNames, categoryDisplayNames, }: PlaceEntryProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
160
|
+
export declare function PlaceEntryProvider({ apiUrl, apiKey, fetchImpl, getAuthHeaders, userId, getUserBalance, children, theme: themeProp, colorScheme, demoGames, demoPropositions, demoEntries, demoMaxPayouts, gameCategory, jurisdiction, initialGameId, filterSport, initialSport, initialEventId, initialEventLabel, sportBaseKey, disableQuickPick, renderTeamLogo, renderPropositionSilk, selectionVariant, disableEventSwipe, enableSportFavourites, yesNoLabels, onEntryPlaced, onBeforeSubmit, onCancel, onShare, onRecharge, onClearEventFilter, screenSize, howToPlayMarkdown: howToPlayMarkdownProp, sportDisplayNames, categoryDisplayNames, }: PlaceEntryProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,9 +6,10 @@ export interface FilterChipOption {
|
|
|
6
6
|
export interface FilterChipGroup {
|
|
7
7
|
label?: string;
|
|
8
8
|
options: FilterChipOption[];
|
|
9
|
-
value: string | null;
|
|
9
|
+
value: string | null | string[];
|
|
10
10
|
onChange: (value: string | null) => void;
|
|
11
11
|
}
|
|
12
|
+
export declare function isChipActive(groupValue: FilterChipGroup['value'], optValue: string | null): boolean;
|
|
12
13
|
export interface FilterChipCarouselProps {
|
|
13
14
|
groups: FilterChipGroup[];
|
|
14
15
|
theme: BladeTheme;
|
|
@@ -22,3 +23,4 @@ export interface FilterChipRowProps extends FilterChipGroup {
|
|
|
22
23
|
className?: string;
|
|
23
24
|
}
|
|
24
25
|
export declare function FilterChipRow({ label, options, value, onChange, theme, bodyFont, className, }: FilterChipRowProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare function FilterChipPanel({ groups, theme, bodyFont, className }: FilterChipCarouselProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -9,10 +9,6 @@ export interface SportRailProps {
|
|
|
9
9
|
className?: string;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
* The sport step, and the only place the sport is chosen: it sits on the game's
|
|
13
|
-
* setup page, after the game and before the picks. The game page never shows it
|
|
14
|
-
* — a sport picked up front just scopes the game list — and the selections show
|
|
15
|
-
* the sport read-only, with a Change that comes back here.
|
|
16
12
|
*
|
|
17
13
|
* Renders nothing at all when the sport is not a choice, which is every
|
|
18
14
|
* single-sport game.
|
|
@@ -42,4 +42,4 @@ export declare function CompositePropositionText({ prop, colors: c, size, compon
|
|
|
42
42
|
*/
|
|
43
43
|
renderTeamLogo?: RenderTeamLogo;
|
|
44
44
|
}): import("react/jsx-runtime").JSX.Element;
|
|
45
|
-
export declare function SportSelector({ game, propositions, selections, onToggleSelection, onNext, onBack, loading, error, theme: themeProp, colorScheme, hideActions, initialSport, renderTeamLogo, disableQuickPick, selectedPropositionCount, onPropositionCountChange, gameCategory, headerExtra, variant, disableEventSwipe, }: SportSelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export declare function SportSelector({ game, propositions, selections, onToggleSelection, onNext, onBack, loading, error, theme: themeProp, colorScheme, hideActions, initialSport, renderTeamLogo, disableQuickPick, selectedPropositionCount, onPropositionCountChange, gameCategory, headerExtra, railSlot, variant, disableEventSwipe, }: SportSelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { default as React, CSSProperties, MouseEvent, ReactNode } from 'react';
|
|
2
2
|
import { BladeTheme } from '../../../shared/themes';
|
|
3
|
+
import { YesNoLabels } from '../../../shared/utils';
|
|
3
4
|
/** Minimum hit area for anything tappable, in px (Apple 44pt / Material 48dp). Shrink the paint, never the target. */
|
|
4
5
|
export declare const TOUCH_TARGET = 44;
|
|
5
6
|
export declare function useBreakpoint(minWidth?: number): boolean;
|
|
@@ -69,6 +70,9 @@ export declare function Divider({ theme, orientation, style, }: {
|
|
|
69
70
|
export type YesNoValue = 'yes' | 'no';
|
|
70
71
|
export type YesNoAnswer = YesNoValue | null | undefined;
|
|
71
72
|
export type YesNoSize = 'xs' | 'sm' | 'md';
|
|
73
|
+
export type { YesNoLabels };
|
|
74
|
+
export declare const YesNoLabelsProvider: React.Provider<YesNoLabels>;
|
|
75
|
+
export declare function useYesNoLabels(): YesNoLabels;
|
|
72
76
|
export interface YesNoButtonsProps {
|
|
73
77
|
theme: BladeTheme;
|
|
74
78
|
/** Currently selected side, if any. */
|
package/dist/react/index.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ export { GameEntries } from './components/GameEntries';
|
|
|
14
14
|
export { QuickPickButton } from './components/QuickPickButton';
|
|
15
15
|
export type { QuickPickButtonProps } from './components/QuickPickButton';
|
|
16
16
|
export { PlaceEntryProvider, usePlaceEntry } from './components/PlaceEntryProvider';
|
|
17
|
+
export { useYesNoLabels } from './components/_primitives';
|
|
18
|
+
export type { YesNoLabels } from '../shared/utils';
|
|
17
19
|
export type { PlaceEntryProviderProps, PlaceEntryContextValue } from './components/PlaceEntryProvider';
|
|
18
20
|
export { GamePage, GamePageTitle, GamePageActions } from './components/GamePage';
|
|
19
21
|
export type { GamePageProps } from './components/GamePage';
|