@simple-parlay/components 2.0.1 → 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 (42) 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/HowToPlayPanel.d.ts +17 -0
  20. package/dist/react-native/components/LoadingIndicators.d.ts +5 -0
  21. package/dist/react-native/components/MultiLegTable.d.ts +2 -1
  22. package/dist/react-native/components/PickGroupSection.d.ts +4 -3
  23. package/dist/react-native/components/PlaceEntryProvider.d.ts +2 -0
  24. package/dist/react-native/hooks/index.d.ts +1 -1
  25. package/dist/react-native/index.cjs +1 -1
  26. package/dist/react-native/index.d.ts +2 -1
  27. package/dist/react-native/index.mjs +561 -559
  28. package/dist/shared/correlation-steering.d.ts +25 -5
  29. package/dist/shared/dense-ui.d.ts +1 -0
  30. package/dist/shared/game-artwork.d.ts +0 -1
  31. package/dist/shared/game-flow.d.ts +7 -1
  32. package/dist/shared/hooks.d.ts +4 -0
  33. package/dist/shared/how-to-play-props-table.d.ts +1 -17
  34. package/dist/shared/markdown.d.ts +8 -0
  35. package/dist/shared/types.d.ts +3 -3
  36. package/dist/shared/utils.d.ts +1 -0
  37. package/package.json +4 -7
  38. package/dist/react/components/HowToPlayPropsTable.d.ts +0 -6
  39. package/dist/react/components/HtmlContent.d.ts +0 -5
  40. package/dist/shared/how-to-play-html.d.ts +0 -12
  41. package/dist/shared/how-to-play-logo.d.ts +0 -2
  42. 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. RN twin: CorrelationGuide in react-native/components.
4
+ */
5
+ export declare function CorrelationGuide(): import("react/jsx-runtime").JSX.Element | null;
@@ -3,7 +3,7 @@ import { default as React } from 'react';
3
3
  * Holds a row back while the choices are re-priced. The first load has no
4
4
  * quote to show yet, so it paints a skeleton over the original's dimensions.
5
5
  * After that the rows on screen are the last quote's: they stay readable,
6
- * dimmed, until the next one lands, so a tap never wipes the list.
6
+ * pulsing, until the next one lands, so a tap never wipes the list.
7
7
  */
8
8
  export declare function CorrelationPropPlaceholder({ id, kind, stretch, children }: {
9
9
  id: number;
@@ -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,6 +1,25 @@
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
+ /** The panel's tab track; the markdown guide's section buttons use it too. RN twin: PanelTabs in the RN HowToPlayPanel. */
5
+ export declare function PanelTabs<Id extends string>({ theme, font, tabs, active, onSelect }: {
6
+ theme: BladeTheme;
7
+ font?: string;
8
+ tabs: readonly {
9
+ id: Id;
10
+ label: string;
11
+ }[];
12
+ active: Id;
13
+ onSelect: (id: Id) => void;
14
+ }): import("react/jsx-runtime").JSX.Element;
15
+ /** The guide's YES / NO example rows as real prop rows: tap an answer, as on the picks page. RN twin: GuidePropRows in the RN HowToPlayPanel. */
16
+ export declare function GuidePropRows({ theme, rows, font }: {
17
+ theme: BladeTheme;
18
+ rows: readonly {
19
+ question: string;
20
+ }[];
21
+ font?: string;
22
+ }): import("react/jsx-runtime").JSX.Element;
4
23
  export interface HowToPlayPanelProps {
5
24
  panel: HowToPlayPanelContent;
6
25
  theme: BladeTheme;
@@ -23,6 +23,9 @@ export declare function Shimmer({ color, className, style, }: {
23
23
  className?: string;
24
24
  style?: React.CSSProperties;
25
25
  }): import("react/jsx-runtime").JSX.Element;
26
+ export declare function AmountShimmer({ color }: {
27
+ color?: string;
28
+ }): import("react/jsx-runtime").JSX.Element;
26
29
  export declare function PickerPageShell({ className, bodyFont, children, }: {
27
30
  className?: string;
28
31
  bodyFont: string;
@@ -1,3 +1,4 @@
1
+ import { BladeTheme } from '../types';
1
2
  export interface MarkdownContentProps {
2
3
  content: string;
3
4
  colors: {
@@ -6,8 +7,10 @@ export interface MarkdownContentProps {
6
7
  border: string;
7
8
  primary?: string;
8
9
  };
10
+ /** Each `#` section gets a button and shows one at a time. Defaults to the provider's theme. */
11
+ theme?: BladeTheme;
9
12
  bodyFont?: string;
10
13
  headingFont?: string;
11
14
  className?: string;
12
15
  }
13
- export declare function MarkdownContent({ content, colors, bodyFont, headingFont, className, }: MarkdownContentProps): import("react/jsx-runtime").JSX.Element;
16
+ export declare function MarkdownContent({ content, colors, theme, bodyFont, headingFont, className, }: MarkdownContentProps): import("react/jsx-runtime").JSX.Element;
@@ -25,6 +25,7 @@ export interface MultiLegTableProps {
25
25
  };
26
26
  bodyFont?: string;
27
27
  extraBetAmount?: number;
28
+ pending?: boolean;
28
29
  buttonLabel?: (count: number) => string;
29
30
  /** Left-column label above the tier buttons. @default 'Legs' */
30
31
  columnLabel?: string;
@@ -41,4 +42,4 @@ export interface MultiLegTableProps {
41
42
  * Renders a compact Legs / Dividend / $X returns table identical to the
42
43
  * one on the Game Page. Used by both GameSelector and ConfirmPage.
43
44
  */
44
- 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;
45
+ 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
  * RN twin: PickGroupSection in the RN 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;
@@ -148,6 +148,8 @@ export interface PlaceEntryContextValue {
148
148
  /** Resolve an entry category to its UI label (host overrides applied). */
149
149
  displayCategoryName: (category: string) => string;
150
150
  maxPayouts: Record<number, TopPayoutsResponse>;
151
+ stakePayouts?: TopPayoutsResponse;
152
+ quotePending: boolean;
151
153
  howToPlayMarkdown: string | null;
152
154
  onEntryPlaced?: (entry: GameEntry) => void;
153
155
  onCancel?: () => void;
@@ -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';