@simple-parlay/components 2.0.2 → 2.1.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.
Files changed (43) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.mjs +522 -517
  4. package/dist/react/components/CorrelationGuide.d.ts +5 -0
  5. package/dist/react/components/CorrelationPropPlaceholder.d.ts +1 -1
  6. package/dist/react/components/EntrySubmission.d.ts +1 -1
  7. package/dist/react/components/HowToPlayPanel.d.ts +19 -0
  8. package/dist/react/components/LoadingIndicators.d.ts +3 -0
  9. package/dist/react/components/MarkdownContent.d.ts +4 -1
  10. package/dist/react/components/MultiLegTable.d.ts +2 -1
  11. package/dist/react/components/PickGroupSection.d.ts +4 -3
  12. package/dist/react/components/PlaceEntryProvider.d.ts +2 -0
  13. package/dist/react/hooks/index.d.ts +1 -1
  14. package/dist/react/index.cjs +1 -1
  15. package/dist/react/index.d.ts +2 -1
  16. package/dist/react/index.mjs +522 -517
  17. package/dist/react-native/components/CorrelationGuide.d.ts +5 -0
  18. package/dist/react-native/components/EntrySubmission.d.ts +1 -1
  19. package/dist/react-native/components/HowToPlayButton.d.ts +1 -11
  20. package/dist/react-native/components/HowToPlayPanel.d.ts +17 -0
  21. package/dist/react-native/components/LoadingIndicators.d.ts +5 -0
  22. package/dist/react-native/components/MultiLegTable.d.ts +2 -1
  23. package/dist/react-native/components/PickGroupSection.d.ts +4 -3
  24. package/dist/react-native/components/PlaceEntryProvider.d.ts +3 -5
  25. package/dist/react-native/hooks/index.d.ts +1 -1
  26. package/dist/react-native/index.cjs +1 -1
  27. package/dist/react-native/index.d.ts +2 -1
  28. package/dist/react-native/index.mjs +561 -559
  29. package/dist/shared/correlation-steering.d.ts +25 -5
  30. package/dist/shared/dense-ui.d.ts +1 -0
  31. package/dist/shared/game-artwork.d.ts +0 -1
  32. package/dist/shared/game-flow.d.ts +7 -1
  33. package/dist/shared/hooks.d.ts +4 -0
  34. package/dist/shared/how-to-play-props-table.d.ts +1 -17
  35. package/dist/shared/markdown.d.ts +8 -0
  36. package/dist/shared/types.d.ts +3 -3
  37. package/dist/shared/utils.d.ts +1 -0
  38. package/package.json +4 -2
  39. package/dist/react/components/HowToPlayPropsTable.d.ts +0 -6
  40. package/dist/react/components/HtmlContent.d.ts +0 -5
  41. package/dist/shared/how-to-play-html.d.ts +0 -12
  42. package/dist/shared/how-to-play-logo.d.ts +0 -2
  43. package/dist/shared/how-to-play-styles.d.ts +0 -2
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Tells the player what correlation pricing does to their picks before they make any,
3
+ * and lets them size the multi. Web twin: CorrelationGuide in react/components.
4
+ */
5
+ export declare function CorrelationGuide(): import("react/jsx-runtime").JSX.Element | null;
@@ -1,2 +1,2 @@
1
1
  import { EntrySubmissionProps } from '../types';
2
- export declare function EntrySubmission({ game, propositions, selections, onToggleSelection, onRemoveSelection, onSubmit, onBack, loading, error, expectedCorrect, onExpectedCorrectChange, betAmount, onBetAmountChange, theme: themeProp, colorScheme, hideActions, winningCounts: winningCountsProp, payouts: payoutsProp, renderTeamLogo, componentById, showCustomAmount, betAmountLocked, betAmountLockedNote, canSubmit: canSubmitProp, confirming, authenticated, userBalance, onRecharge, boostBanner, aboveDock, }: EntrySubmissionProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function EntrySubmission({ game, propositions, selections, onToggleSelection, onRemoveSelection, onSubmit, onBack, loading, error, expectedCorrect, onExpectedCorrectChange, betAmount, onBetAmountChange, theme: themeProp, colorScheme, hideActions, winningCounts: winningCountsProp, payouts: payoutsProp, payoutPending, renderTeamLogo, componentById, showCustomAmount, betAmountLocked, betAmountLockedNote, canSubmit: canSubmitProp, confirming, authenticated, userBalance, onRecharge, boostBanner, aboveDock, }: EntrySubmissionProps): import("react/jsx-runtime").JSX.Element;
@@ -1,14 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  import { HowToPlayPanelContent } from '../../shared/how-to-play-panel';
3
3
  import { BladeTheme } from '../types';
4
- export type WebViewComponent = React.ComponentType<{
5
- source: {
6
- html: string;
7
- };
8
- style: object;
9
- originWhitelist?: string[];
10
- scrollEnabled?: boolean;
11
- }>;
12
4
  export interface HowToPlayButtonProps {
13
5
  content?: string | null;
14
6
  panel?: HowToPlayPanelContent | null;
@@ -32,7 +24,5 @@ export interface HowToPlayButtonProps {
32
24
  };
33
25
  bodyFont?: string;
34
26
  headingFont?: string;
35
- /** Pass `WebView` from react-native-webview for HTML guides. Defaults to PlaceEntryProvider's. */
36
- WebViewComponent?: WebViewComponent;
37
27
  }
38
- export declare function HowToPlayButton({ content, panel, theme, extra, title, label, variant, touchSize, colors, bodyFont, headingFont, WebViewComponent: WebViewProp, }: HowToPlayButtonProps): import("react/jsx-runtime").JSX.Element | null;
28
+ export declare function HowToPlayButton({ content, panel, theme, extra, title, label, variant, touchSize, colors, bodyFont, headingFont, }: HowToPlayButtonProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1,6 +1,23 @@
1
1
  import { default as React } from 'react';
2
2
  import { BladeTheme } from '../types';
3
3
  import { HowToPlayPanelContent } from '../../shared/how-to-play-panel';
4
+ export declare function PanelTabs<Id extends string>({ theme, font, tabs, active, onSelect }: {
5
+ theme: BladeTheme;
6
+ font?: string;
7
+ tabs: readonly {
8
+ id: Id;
9
+ label: string;
10
+ }[];
11
+ active: Id;
12
+ onSelect: (id: Id) => void;
13
+ }): import("react/jsx-runtime").JSX.Element;
14
+ export declare function GuidePropRows({ theme, rows, font }: {
15
+ theme: BladeTheme;
16
+ rows: readonly {
17
+ question: string;
18
+ }[];
19
+ font?: string;
20
+ }): import("react/jsx-runtime").JSX.Element;
4
21
  export interface HowToPlayPanelProps {
5
22
  panel: HowToPlayPanelContent;
6
23
  theme: BladeTheme;
@@ -20,6 +20,11 @@ export declare function Shimmer({ color, style }: {
20
20
  color: string;
21
21
  style?: object;
22
22
  }): import("react/jsx-runtime").JSX.Element;
23
+ export declare function AmountShimmer({ color, width, height }: {
24
+ color: string;
25
+ width?: number;
26
+ height?: number;
27
+ }): import("react/jsx-runtime").JSX.Element;
23
28
  /** RN mirror of web `CategoryGridSkeleton` (1 col < 400px, 2 cols ≥ 400px). */
24
29
  export declare function CategoryGridSkeleton({ colors, count, theme, }: {
25
30
  colors: PickerSurfaceColors;
@@ -26,6 +26,7 @@ export interface MultiLegTableProps {
26
26
  colors: MultiLegTableColors;
27
27
  bodyFont?: string;
28
28
  extraBetAmount?: number;
29
+ pending?: boolean;
29
30
  buttonLabel?: (count: number) => string;
30
31
  /** Left-column label above the tier buttons. @default 'Legs' */
31
32
  columnLabel?: string;
@@ -38,4 +39,4 @@ export interface MultiLegTableProps {
38
39
  summaryTiers?: MultiLegTableTier[];
39
40
  theme?: BladeTheme;
40
41
  }
41
- export declare function MultiLegTable({ tiers, game, selectedCount, onSelect, colors: c, bodyFont, extraBetAmount, buttonLabel, columnLabel, buildYourOwn, quickPickOnly, onQuickPick, collapsible, expanded: expandedProp, onExpandedChange, summaryTiers, theme }: 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, theme, pending }: MultiLegTableProps): import("react/jsx-runtime").JSX.Element;
@@ -22,6 +22,7 @@ export interface PickGroupSectionProps {
22
22
  pickOrder?: readonly number[];
23
23
  /** Stretch to fill the card (the last group of a shelf card). */
24
24
  last?: boolean;
25
+ rowsBackground?: string;
25
26
  /** One row. `swap` is set on a row a full limit folded: answering it swaps it in, resolving the picks it replaces on the tap. */
26
27
  renderRow: (prop: Proposition, opts: {
27
28
  top: boolean;
@@ -29,9 +30,9 @@ export interface PickGroupSectionProps {
29
30
  }) => React.ReactNode;
30
31
  }
31
32
  /**
32
- * One group of a match's questions (the line, the total, the players): a rounded rail tile (icon, label, the limit
33
- * when there are more options than it allows) beside its rows. Once the limit is full, the rows it blocks fold away
33
+ * One group of a match's questions (the line, the total, the players): a flush, square rail column (icon, label, the
34
+ * limit when there are more options than it allows) beside its rows, the same shape as the rows. Once the limit is full, the rows it blocks fold away
34
35
  * in place behind one tile; opened, each of them swaps in for the held pick. Every system's picks page draws it.
35
36
  * Web twin: PickGroupSection in the web components.
36
37
  */
37
- export declare function PickGroupSection({ theme, group, selections, caps, game, pool, componentById, pickOrder, last, renderRow }: PickGroupSectionProps): import("react/jsx-runtime").JSX.Element;
38
+ export declare function PickGroupSection({ theme, group, selections, caps, game, pool, componentById, pickOrder, last, rowsBackground, renderRow }: PickGroupSectionProps): import("react/jsx-runtime").JSX.Element;
@@ -14,7 +14,6 @@ import { SwipeVariant } from '../../shared/swipe-deck';
14
14
  import { useCorrelationSteering } from '../../shared/correlation-steering';
15
15
  import { QuickPickMode } from '../../shared/selection-caps';
16
16
  import { SameGameMultiEvent } from '../../shared/same-game-multi';
17
- import { WebViewComponent } from './HowToPlayButton';
18
17
  export interface PlaceEntryContextValue {
19
18
  gameLibrary: GameLibrary<PlaceEntryContextValue>;
20
19
  getGameFlow: (game: Game | null | undefined) => GameFlow;
@@ -145,6 +144,8 @@ export interface PlaceEntryContextValue {
145
144
  displaySportName: (sport: string) => string;
146
145
  displayCategoryName: (category: string) => string;
147
146
  maxPayouts: Record<number, TopPayoutsResponse>;
147
+ stakePayouts?: TopPayoutsResponse;
148
+ quotePending: boolean;
148
149
  howToPlayMarkdown: string | null;
149
150
  onEntryPlaced?: (entry: GameEntry) => void;
150
151
  onCancel?: () => void;
@@ -156,8 +157,6 @@ export interface PlaceEntryContextValue {
156
157
  }
157
158
  declare const PlaceEntryContext: React.Context<PlaceEntryContextValue | null>;
158
159
  export { PlaceEntryContext };
159
- /** To stop Metro throwing a hissy fit. */
160
- export declare const WebViewContext: React.Context<WebViewComponent | undefined>;
161
160
  export declare function usePlaceEntry(): PlaceEntryContextValue;
162
161
  export interface PlaceEntryProviderProps {
163
162
  /** Additional game implementations. Perfect Pick, H2H and Safety Net are built in. */
@@ -210,8 +209,7 @@ export interface PlaceEntryProviderProps {
210
209
  onClearEventFilter?: () => void;
211
210
  screenSize?: ScreenSize;
212
211
  howToPlayMarkdown?: string | null;
213
- WebViewComponent?: WebViewComponent;
214
212
  sportDisplayNames?: SportDisplayNameOverrides;
215
213
  categoryDisplayNames?: CategoryDisplayNameOverrides;
216
214
  }
217
- export declare function PlaceEntryProvider({ gameLibrary, showCorrelationDebug, 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, uiVariant, selectionVariant, gameVariant, disableEventSwipe, swipeVariant, enableSportFavourites, yesNoLabels, onEntryPlaced, onBeforeSubmit, entryReference, onCancel, onShare, onRecharge, onClearEventFilter, screenSize, howToPlayMarkdown: howToPlayMarkdownProp, WebViewComponent, sportDisplayNames, categoryDisplayNames, }: PlaceEntryProviderProps): import("react/jsx-runtime").JSX.Element;
215
+ export declare function PlaceEntryProvider({ gameLibrary, showCorrelationDebug, 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, uiVariant, selectionVariant, gameVariant, disableEventSwipe, swipeVariant, enableSportFavourites, yesNoLabels, onEntryPlaced, onBeforeSubmit, entryReference, onCancel, onShare, onRecharge, onClearEventFilter, screenSize, howToPlayMarkdown: howToPlayMarkdownProp, sportDisplayNames, categoryDisplayNames, }: PlaceEntryProviderProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- export { useGames, usePropositions, useSports, useGameEntries, useCreateGameEntry, useGameMaxPayouts, usePlaceEntryFlow, useEvaluateRule, useCalculatePayout, useEntryPreview, useCompositeComponentLookup, } from '../../shared/hooks';
1
+ export { useGames, usePropositions, useSports, useGameEntries, useCreateGameEntry, useGameMaxPayouts, useStakePayouts, usePlaceEntryFlow, useEvaluateRule, useCalculatePayout, useEntryPreview, useCompositeComponentLookup, } from '../../shared/hooks';