@simple-parlay/components 1.30.6-pre.4 → 1.30.6-pre.6

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.
Files changed (32) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/index.js +1 -1
  3. package/dist/index.mjs +288 -290
  4. package/dist/react/components/PlaceEntryProvider.d.ts +3 -1
  5. package/dist/react/components/PropositionFilters.d.ts +3 -1
  6. package/dist/react/components/ScrollShelf.d.ts +5 -1
  7. package/dist/react/components/SportRail.d.ts +13 -7
  8. package/dist/react/components/SportSelector.d.ts +1 -1
  9. package/dist/react/components/_primitives/index.d.ts +4 -0
  10. package/dist/react/index.d.ts +2 -0
  11. package/dist/react/index.js +1 -1
  12. package/dist/react/index.mjs +288 -290
  13. package/dist/react/utils/index.d.ts +1 -1
  14. package/dist/react-native/components/LoadingIndicators.d.ts +1 -1
  15. package/dist/react-native/components/PlaceEntryProvider.d.ts +3 -1
  16. package/dist/react-native/components/PropositionFilters.d.ts +3 -1
  17. package/dist/react-native/components/ScrollShelf.d.ts +8 -1
  18. package/dist/react-native/components/SportRail.d.ts +13 -7
  19. package/dist/react-native/components/SportSelector.d.ts +1 -1
  20. package/dist/react-native/components/_primitives/index.d.ts +5 -1
  21. package/dist/react-native/index.d.ts +2 -0
  22. package/dist/react-native/index.js +1 -1
  23. package/dist/react-native/index.mjs +378 -381
  24. package/dist/react-native/utils/index.d.ts +1 -1
  25. package/dist/shared/date-filters.d.ts +5 -4
  26. package/dist/shared/hooks.d.ts +1 -1
  27. package/dist/shared/picker-brand.d.ts +22 -0
  28. package/dist/shared/selection-actions.d.ts +3 -2
  29. package/dist/shared/selection-caps.d.ts +4 -0
  30. package/dist/shared/types.d.ts +6 -0
  31. package/dist/shared/utils.d.ts +11 -1
  32. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- export { resolvePrice, toNumber, toBool, formatYesNo, formatCurrency, formatDate, groupPropositionsBySport, getPropositionSportKey, collectPropositionSportKeys, compositePropositionMatchesSport, compositePropositionMatchesGameSports, groupPropositionsByCategory, groupPropositionsByEntryCategory, getPropositionEntryCategory, isRacingProposition, getAvailableEntryCategories, getSportPickerTitle, getCategoryDisplayName, getCategoryTagline, getSportShortCode, getSportPickerTagline, getSportSummaryTagline, splitSportLabel, getSportComingSoonCaption, getHowToPlayPanel, describeDemoVerdict, groupByMatchup, groupByRace, groupPropositionsForDisplay, isRacingCategory, buildRangeLegOptions, getPayoutForCount, generateQuickPick, isValidSelectionCount, getEffectivePropositionLimits, findPermittedRule, getJackpotInfo, getSportDisplayName, resolveSportDisplayName, resolveCategoryDisplayName, filterPropositionsForGame, filterPropositionPool, filterGamesByPropositionPool, filterGamesByEntryCategory, gameHasPropositionsInPool, getGameEntryCategory, gameMatchesEntryCategory, gamePermitsSport, normalizeGamesSport, sportKeysCompatible, propositionSportMatches, isGameAvailableToday, getAvailableDaysLabel, contrastTextColour, readableColor, getCompositeOperatorLabel, getCompositeHelperText, parseCompositeDescription, inferCompositeOperatorFromDescription, resolveCompositeOperator, resolveCompositeDisplay, resolveCompositeLegs, parseCompositeComponentIds, collectCompositeComponentIds, formatPropositionEventLabel, getPropositionDescription, getPropositionMarketType, resolveGameIconId, resolveGameIconUrl, isGameIconUrl, resolveGameIconMarkup, } from '../../shared/utils';
1
+ export { resolvePrice, toNumber, toBool, formatYesNo, DEFAULT_YES_NO_LABELS, formatCurrency, formatDate, groupPropositionsBySport, getPropositionSportKey, collectPropositionSportKeys, compositePropositionMatchesSport, compositePropositionMatchesGameSports, groupPropositionsByCategory, groupPropositionsByEntryCategory, getPropositionEntryCategory, isRacingProposition, getAvailableEntryCategories, getSportPickerTitle, getCategoryDisplayName, getCategoryTagline, getSportShortCode, getSportPickerTagline, getSportSummaryTagline, splitSportLabel, getSportComingSoonCaption, getHowToPlayPanel, describeDemoVerdict, groupByMatchup, groupByRace, groupPropositionsForDisplay, isRacingCategory, buildRangeLegOptions, getPayoutForCount, generateQuickPick, isValidSelectionCount, getEffectivePropositionLimits, findPermittedRule, getJackpotInfo, getSportDisplayName, resolveSportDisplayName, resolveSportLabel, resolveCategoryDisplayName, filterPropositionsForGame, filterPropositionPool, filterGamesByPropositionPool, filterGamesByEntryCategory, gameHasPropositionsInPool, getGameEntryCategory, gameMatchesEntryCategory, gamePermitsSport, normalizeGamesSport, sportKeysCompatible, propositionSportMatches, isGameAvailableToday, getAvailableDaysLabel, contrastTextColour, readableColor, getCompositeOperatorLabel, getCompositeHelperText, parseCompositeDescription, inferCompositeOperatorFromDescription, resolveCompositeOperator, resolveCompositeDisplay, resolveCompositeLegs, parseCompositeComponentIds, collectCompositeComponentIds, formatPropositionEventLabel, getPropositionDescription, getPropositionMarketType, resolveGameIconId, resolveGameIconUrl, isGameIconUrl, resolveGameIconMarkup, } from '../../shared/utils';
2
2
  export type { SportDisplayNameOverrides, CategoryDisplayNameOverrides, GameIconId, ComingSoonSport, HowToPlayPanelContent, HowToPlaySummarySegment, HowToPlayStep, HowToPlayDemoLeg, HowToPlayDemoVerdict } from '../../shared/utils';
@@ -23,7 +23,7 @@ export declare function CategoryGridSkeleton({ colors, count, }: {
23
23
  colors: PickerSurfaceColors;
24
24
  count?: number;
25
25
  }): import("react/jsx-runtime").JSX.Element;
26
- /** RN mirror of web `SportGridSkeleton` — stacked tile on phones, logo-row when wide. */
26
+ /** RN mirror of web `SportGridSkeleton` — a stacked tile at every width. */
27
27
  export declare function SportGridSkeleton({ colors, count, }: {
28
28
  colors: PickerSurfaceColors;
29
29
  count?: number;
@@ -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';
@@ -137,6 +138,7 @@ export interface PlaceEntryProviderProps {
137
138
  selectionVariant?: SelectionVariant;
138
139
  disableEventSwipe?: boolean;
139
140
  /** Let players star a sport in the rail to pin it up front (per device). Off by default. */
141
+ yesNoLabels?: YesNoLabels;
140
142
  enableSportFavourites?: boolean;
141
143
  onEntryPlaced?: (entry: GameEntry) => void;
142
144
  onBeforeSubmit?: (betAmount: number) => void | Promise<void>;
@@ -149,4 +151,4 @@ export interface PlaceEntryProviderProps {
149
151
  sportDisplayNames?: SportDisplayNameOverrides;
150
152
  categoryDisplayNames?: CategoryDisplayNameOverrides;
151
153
  }
152
- 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;
154
+ 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,15 +6,17 @@ 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;
15
16
  bodyFont?: string;
16
17
  }
17
18
  export declare function FilterChipCarousel({ groups, theme, bodyFont, }: FilterChipCarouselProps): import("react/jsx-runtime").JSX.Element | null;
19
+ export declare function FilterChipPanel({ groups, theme, bodyFont }: FilterChipCarouselProps): import("react/jsx-runtime").JSX.Element | null;
18
20
  export interface FilterChipRowProps extends FilterChipGroup {
19
21
  theme: BladeTheme;
20
22
  bodyFont?: string;
@@ -5,6 +5,13 @@ export interface ScrollShelfProps {
5
5
  theme: BladeTheme;
6
6
  /** Padding/gap for the row's content — cards need more room than chips. */
7
7
  contentContainerStyle?: StyleProp<ViewStyle>;
8
+ /** Drop the arrow discs — they overhang, which a pill-shaped shelf clips. */
9
+ hideArrows?: boolean;
10
+ /** Row width vs. its content, so a caller can shorten labels that don't fit. */
11
+ onMetrics?: (metrics: {
12
+ viewport: number;
13
+ content: number;
14
+ }) => void;
8
15
  style?: StyleProp<ViewStyle>;
9
16
  children: React.ReactNode;
10
17
  }
@@ -13,4 +20,4 @@ export interface ScrollShelfProps {
13
20
  * more in that direction. Shared so the filter chips and the sport rail scroll
14
21
  * identically.
15
22
  */
16
- export declare function ScrollShelf({ theme, contentContainerStyle, style, children, }: ScrollShelfProps): import("react/jsx-runtime").JSX.Element;
23
+ export declare function ScrollShelf({ theme, contentContainerStyle, hideArrows, onMetrics, style, children, }: ScrollShelfProps): import("react/jsx-runtime").JSX.Element;
@@ -5,17 +5,23 @@ export interface SportRailProps {
5
5
  label?: string | null;
6
6
  /** Line under the heading. Pass `null` to drop it; omit for the default hint. */
7
7
  sublabel?: string | null;
8
- /** Custom renderer for the sport tile. */
9
- renderSportLogo?: (sportKey: string) => React.ReactNode;
8
+ /** Controls parked on the heading's right — the track keeps the full width. */
9
+ actions?: React.ReactNode;
10
10
  style?: StyleProp<ViewStyle>;
11
11
  }
12
12
  /**
13
- * The sport step, and the only place the sport is chosen: it sits on the game's
14
- * setup page, after the game and before the picks. The game page never shows it
15
- * — a sport picked up front just scopes the game list — and the selections show
16
- * the sport read-only, with a Change that comes back here.
13
+ * The sport step. It sits on a game's setup page, and — for the games that have
14
+ * no setup page — above the proposition list, so there is always one place to
15
+ * change it. Never on the game grid.
16
+ *
17
+ * One oval track: every sport rides it as its short code, and the selected one
18
+ * opens out to its full name on a filled thumb. Codes keep the track compact,
19
+ * the selection says what it is in plain English.
20
+ *
21
+ * A bet is one sport: once the slip has picks the track locks, and the only way
22
+ * across is to clear the bet — silently wiping the card on a mis-tap was worse.
17
23
  *
18
24
  * Renders nothing at all when the sport is not a choice, which is every
19
25
  * single-sport game.
20
26
  */
21
- export declare function SportRail({ label, sublabel, renderSportLogo, style }: SportRailProps): import("react/jsx-runtime").JSX.Element | null;
27
+ export declare function SportRail({ label, sublabel, actions, style }: SportRailProps): import("react/jsx-runtime").JSX.Element | null;
@@ -39,4 +39,4 @@ export declare function CompositePropositionText({ prop, colors: c, size, compon
39
39
  */
40
40
  renderTeamLogo?: RenderTeamLogo;
41
41
  }): import("react/jsx-runtime").JSX.Element;
42
- 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;
42
+ 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,6 +1,7 @@
1
- import { ReactNode } from 'react';
1
+ import { default as React, ReactNode } from 'react';
2
2
  import { ViewStyle, TextStyle, StyleProp, Animated } from 'react-native';
3
3
  import { BladeTheme } from '../../../shared/themes';
4
+ import { YesNoLabels } from '../../../shared/utils';
4
5
  /** Twin of the web `TOUCH_TARGET`: minimum hit area in px. Shrink the paint, never the target. */
5
6
  export declare const TOUCH_TARGET = 44;
6
7
  /**
@@ -78,6 +79,9 @@ export declare function Divider({ theme, orientation, style, }: {
78
79
  export type YesNoValue = 'yes' | 'no';
79
80
  export type YesNoAnswer = YesNoValue | null | undefined;
80
81
  export type YesNoSize = 'xs' | 'sm' | 'md';
82
+ export type { YesNoLabels };
83
+ export declare const YesNoLabelsProvider: React.Provider<YesNoLabels>;
84
+ export declare function useYesNoLabels(): YesNoLabels;
81
85
  export interface YesNoButtonsProps {
82
86
  theme: BladeTheme;
83
87
  /** Currently selected side, if any. */
@@ -12,6 +12,8 @@ export { GameEntries } from './components/GameEntries';
12
12
  export { QuickPickButton } from './components/QuickPickButton';
13
13
  export type { QuickPickButtonProps } from './components/QuickPickButton';
14
14
  export { PlaceEntryProvider, usePlaceEntry } from './components/PlaceEntryProvider';
15
+ export { useYesNoLabels } from './components/_primitives';
16
+ export type { YesNoLabels } from '../shared/utils';
15
17
  export type { PlaceEntryProviderProps, PlaceEntryContextValue } from './components/PlaceEntryProvider';
16
18
  export { GamePage, GamePageTitle, GamePageActions } from './components/GamePage';
17
19
  export type { GamePageProps } from './components/GamePage';