@simple-parlay/components 2.0.1 → 2.0.2

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 CHANGED
@@ -1,2 +1,2 @@
1
- export declare const version = "2.0.1";
1
+ export declare const version = "2.0.2";
2
2
  export * from './react';
package/dist/index.mjs CHANGED
@@ -650,4 +650,4 @@ return u("span",{role:"img","aria-label":`YESNO ${t}`,className:a,style:{display
650
650
  /* @__PURE__ */h(Bl,{iconUrl:e,width:m,height:m,iconColor:l,accentColor:s,ariaLabel:""}),
651
651
  /* @__PURE__ */u("span",{"aria-hidden":!0,style:{fontSize:g,letterSpacing:.045*-g,lineHeight:1,whiteSpace:"nowrap"},children:[/* @__PURE__ */h("span",{style:{fontWeight:800},children:"YES"}),/* @__PURE__ */h("span",{style:{fontWeight:600},children:"NO"})]}),
652
652
  /* @__PURE__ */h("span",{"aria-hidden":!0,style:{width:Math.max(2,Math.round(.045*r)),height:.78*r,backgroundColor:c,flexShrink:0}}),
653
- /* @__PURE__ */h("span",{"aria-hidden":!0,style:{display:"inline-flex",flexDirection:"column",fontSize:f,fontWeight:500,letterSpacing:.012*-f,lineHeight:1.14,textAlign:"left"},children:p.map((e,t)=>/* @__PURE__ */u("span",{style:{whiteSpace:"nowrap"},children:[e,i&&t===p.length-1&&/* @__PURE__ */h("sup",{style:{fontSize:.36*f,fontWeight:500,marginLeft:1},children:"™"})]},`${e}-${t}`))})]})}var gp=["cards","split","compare","shelf","showcase"],fp={cards:"Cards",split:"Split",compare:"Compare",shelf:"Game Shelf",showcase:"Showcase"};function xp(e){return gp.includes(e)?e:void 0}var bp="2.0.1";export{Vi as BASE_GAME_ARTWORK,Ii as BASE_GAME_IDS,Dn as BUTTON_UI,$i as BladeApiClient,_d as BrandChipTile,up as BrandLockup,$d as BrandTile,En as Button,hi as CHALLENGE_MISSES,mi as CHALLENGE_MULTIPLE,cp as CallTicketBuilder,qo as CategoryIcon,wd as CategoryPickerPage,vd as CategoryPickerPageActions,yd as CategoryPickerPageTitle,Vo as ChevronRightIcon,Id as ConfirmPage,Rd as ConfirmPageActions,jd as ConfirmPageTitle,Gs as CorrelationChoicesSkeleton,md as CorrelationPricingDebug,Is as CorrelationPropPlaceholder,_n as DOUBLE_SHOT_MIN_LEGS,$n as EXTRA_SHOT_MIN_LEGS,qd as EntriesPage,Gd as EntriesPageTitle,Yc as EntrySubmission,od as EventFilterBanner,Ad as EventPickerPage,ac as EventSwipeModal,Jo as FilterChipCarousel,Zo as FilterChipRow,me as GAME_ICON_SCHEME,he as GAME_ICON_SVG,Rr as GAME_TIER_LEVEL,Ir as GAME_TIER_TABS,gp as GAME_VARIANTS,fp as GAME_VARIANT_LABELS,ui as GOLDEN_POINT_FACTOR,Ki as GameArtworkContext,rd as GameEntries,Vd as GameLogo,op as GameModeCard,sp as GameModeKitStyles,pd as GamePage,dd as GamePageActions,ep as GamePageHeader,cd as GamePageTitle,Hs as GameSelector,mp as GameSetupPage,hp as GameSetupPageTitle,tp as GameSportRow,Yo as HowToPlayButton,Uo as HowToPlayModal,jo as HowToPlayPanel,Yn as IconButton,Bl as IconSvg,ap as KitCard,Tr as LADDER_FAMILY,Pr as LADDER_REFERENCE_BET,Mr as LADDER_STAKES,ip as LegPips,Xo as LockIcon,oi as MIRROR_CROSS,qr as MIRROR_STANDARD_MARGIN,ai as MIRROR_TICK,To as MarkdownContent,fi as NO_BOOSTS,rp as OPTION_STRIP_ITEM,np as OptionStrip,Br as PYD_LEG_RUNGS,Nr as PYD_RETAIL_DIVIDENDS,Ul as PageBackLink,Yl as PageHeader,Gl as PageTitleBackRow,qc as PayoutCircles,Ma as PlaceEntryContext,La as PlaceEntryProvider,lp as PlayModeCards,Un as PressCard,bl as QuickPickButton,oc as SELECTION_VARIANTS,pi as SIX_AGAIN_LEGS,di as SIX_AGAIN_MARGIN,pp as SafetyNetPage,dp as SafetyNetPageTitle,Qo as ScrollShelf,jc as SelectionReview,Sd as SelectionUndoSnackbar,Sc as SelectionVariantList,Dd as SelectionsPage,Pd as SelectionsPageActions,Fd as SelectionsPageTitle,Qd as SportPickerPage,Kd as SportPickerPageActions,Xd as SportPickerPageTitle,bd as SportRail,Ko as StarIcon,Yd as SuccessPage,Ud as SuccessPageActions,Ed as SuccessPageTitle,$s as SwipeCard,_s as SwipeCardFace,rc as SwipeDeck,un as UI_VARIANTS,gn as UI_VARIANT_LABELS,yn as UiVariantContext,Es as VISIBLE_DEPTH,Go as YesNoCategoryLabel,qn as YesNoLabelsProvider,sd as YesNoMultiFooter,ld as YesNoMultiLogo,Et as accentOnSurface,Mn as applyTheme,Yr as availableGameTierTabs,Hn as buttonLook,qi as categoryShelfArtwork,ci as collapseMirrorSet,ut as contrastTextColour,ji as correlationDebugText,$t as darkTheme,Gr as defaultGameTierId,Jt as defaultTheme,an as defaultThemeSet,Ur as filterGamesByTierLevel,D as filterPropositionsToEvent,Zi as findCategoryGamePreset,He as formatCurrency,Oe as formatDate,B as formatSameGameMultiEventLabel,Hr as fullStackPrize,xr as gameNeedsRuleSetup,wr as gameSetPrize,Gi as gameShelfArtwork,Ci as getConfirmBoostCopy,ki as getGameFlow,kr as getGameSetBetConfig,Ke as getJackpotInfo,jr as getLadderConfig,ei as getMirrorConfig,Sr as getPickYourDividendConfig,F as getPropositionEventId,fr as getRuleSetupConfig,mr as getSafetyNetConfig,rr as getSafetyNetPricing,wi as getSixAgainConfig,Je as getSportDisplayName,cn as getTheme,dn as getThemeSet,tn as goldLightTheme,_t as goldTheme,ln as goldThemeSet,en as greenLightTheme,Zt as greenTheme,on as greenThemeSet,je as groupPropositionsBySport,z as groupSameGameMultiEvents,gc as groupSelectionDays,Jd as hexA,fn as isDenseUiVariant,Ni as isFixedCardExactGame,we as isGameIconUrl,vr as isGameSetBetGame,Dr as isLadderGame,Zr as isMirrorGame,Bi as isOpenExactMultiGame,Cr as isPickYourDividendGame,nr as isSafetyNetGame,A as isSameGameMultiGame,T as isSelectableSameGameMultiProposition,gi as isSixAgainGame,Qt as isThemeSet,qe as isValidSelectionCount,Or as ladderCollectAt,Wr as ladderTiers,Xi as mergeGameArtwork,_r as mirrorPrize,li as mirrorPrizeRows,ii as mirrorSuitePrize,si as mirrorVariantGames,On as optionLook,xp as parseGameVariant,xn as parseUiVariant,pl as previewCopy,Ln as previewTint,L as propositionsBelongToEvent,zr as pydLadder,Fr as pydRung,$e as resolveCategoryDisplayName,xe as resolveGameIconId,ke as resolveGameIconMarkup,ve as resolveGameIconUrl,Er as resolveGameTierLevel,Te as resolvePrice,hl as resolveShelfArtwork,Ze as resolveSportDisplayName,Kt as resolveTheme,ir as roundDividendAmount,Li as roundQuotedPayout,lr as safetyNetCollect,or as safetyNetTicket,gl as shelfGameName,bi as sixAgainRuleId,yi as sixAgainStakeMultiples,xi as sixAgainTicket,It as themeAccent,Sn as themeBodyFont,Dt as themeHeading,Pn as themeHeadingFont,Lt as themeLabel,Gt as themeSelectionCard,mn as themeSets,Ut as themeTextAlt,Yt as themeTextAltMuted,Wt as themeValue,pn as themes,bn as uiVariantTheme,Tn as useBladeTheme,Zd as useBrandTileColors,pa as useCalculatePayout,Hi as useCorrelationSteering,sa as useCreateGameEntry,ma as useEntryPreview,da as useEvaluateRule,Qi as useGameArtwork,oa as useGameEntries,la as useGameMaxPayouts,ra as useGames,Da as usePlaceEntry,ca as usePlaceEntryFlow,jn as usePress,ia as usePropositions,hn as useResolvedTheme,aa as useSports,Ys as useSwipeDeck,vn as useUiVariant,Vn as useYesNoLabels,Wi as usesCorrelationPricing,bp as version};
653
+ /* @__PURE__ */h("span",{"aria-hidden":!0,style:{display:"inline-flex",flexDirection:"column",fontSize:f,fontWeight:500,letterSpacing:.012*-f,lineHeight:1.14,textAlign:"left"},children:p.map((e,t)=>/* @__PURE__ */u("span",{style:{whiteSpace:"nowrap"},children:[e,i&&t===p.length-1&&/* @__PURE__ */h("sup",{style:{fontSize:.36*f,fontWeight:500,marginLeft:1},children:"™"})]},`${e}-${t}`))})]})}var gp=["cards","split","compare","shelf","showcase"],fp={cards:"Cards",split:"Split",compare:"Compare",shelf:"Game Shelf",showcase:"Showcase"};function xp(e){return gp.includes(e)?e:void 0}var bp="2.0.2";export{Vi as BASE_GAME_ARTWORK,Ii as BASE_GAME_IDS,Dn as BUTTON_UI,$i as BladeApiClient,_d as BrandChipTile,up as BrandLockup,$d as BrandTile,En as Button,hi as CHALLENGE_MISSES,mi as CHALLENGE_MULTIPLE,cp as CallTicketBuilder,qo as CategoryIcon,wd as CategoryPickerPage,vd as CategoryPickerPageActions,yd as CategoryPickerPageTitle,Vo as ChevronRightIcon,Id as ConfirmPage,Rd as ConfirmPageActions,jd as ConfirmPageTitle,Gs as CorrelationChoicesSkeleton,md as CorrelationPricingDebug,Is as CorrelationPropPlaceholder,_n as DOUBLE_SHOT_MIN_LEGS,$n as EXTRA_SHOT_MIN_LEGS,qd as EntriesPage,Gd as EntriesPageTitle,Yc as EntrySubmission,od as EventFilterBanner,Ad as EventPickerPage,ac as EventSwipeModal,Jo as FilterChipCarousel,Zo as FilterChipRow,me as GAME_ICON_SCHEME,he as GAME_ICON_SVG,Rr as GAME_TIER_LEVEL,Ir as GAME_TIER_TABS,gp as GAME_VARIANTS,fp as GAME_VARIANT_LABELS,ui as GOLDEN_POINT_FACTOR,Ki as GameArtworkContext,rd as GameEntries,Vd as GameLogo,op as GameModeCard,sp as GameModeKitStyles,pd as GamePage,dd as GamePageActions,ep as GamePageHeader,cd as GamePageTitle,Hs as GameSelector,mp as GameSetupPage,hp as GameSetupPageTitle,tp as GameSportRow,Yo as HowToPlayButton,Uo as HowToPlayModal,jo as HowToPlayPanel,Yn as IconButton,Bl as IconSvg,ap as KitCard,Tr as LADDER_FAMILY,Pr as LADDER_REFERENCE_BET,Mr as LADDER_STAKES,ip as LegPips,Xo as LockIcon,oi as MIRROR_CROSS,qr as MIRROR_STANDARD_MARGIN,ai as MIRROR_TICK,To as MarkdownContent,fi as NO_BOOSTS,rp as OPTION_STRIP_ITEM,np as OptionStrip,Br as PYD_LEG_RUNGS,Nr as PYD_RETAIL_DIVIDENDS,Ul as PageBackLink,Yl as PageHeader,Gl as PageTitleBackRow,qc as PayoutCircles,Ma as PlaceEntryContext,La as PlaceEntryProvider,lp as PlayModeCards,Un as PressCard,bl as QuickPickButton,oc as SELECTION_VARIANTS,pi as SIX_AGAIN_LEGS,di as SIX_AGAIN_MARGIN,pp as SafetyNetPage,dp as SafetyNetPageTitle,Qo as ScrollShelf,jc as SelectionReview,Sd as SelectionUndoSnackbar,Sc as SelectionVariantList,Dd as SelectionsPage,Pd as SelectionsPageActions,Fd as SelectionsPageTitle,Qd as SportPickerPage,Kd as SportPickerPageActions,Xd as SportPickerPageTitle,bd as SportRail,Ko as StarIcon,Yd as SuccessPage,Ud as SuccessPageActions,Ed as SuccessPageTitle,$s as SwipeCard,_s as SwipeCardFace,rc as SwipeDeck,un as UI_VARIANTS,gn as UI_VARIANT_LABELS,yn as UiVariantContext,Es as VISIBLE_DEPTH,Go as YesNoCategoryLabel,qn as YesNoLabelsProvider,sd as YesNoMultiFooter,ld as YesNoMultiLogo,Et as accentOnSurface,Mn as applyTheme,Yr as availableGameTierTabs,Hn as buttonLook,qi as categoryShelfArtwork,ci as collapseMirrorSet,ut as contrastTextColour,ji as correlationDebugText,$t as darkTheme,Gr as defaultGameTierId,Jt as defaultTheme,an as defaultThemeSet,Ur as filterGamesByTierLevel,D as filterPropositionsToEvent,Zi as findCategoryGamePreset,He as formatCurrency,Oe as formatDate,B as formatSameGameMultiEventLabel,Hr as fullStackPrize,xr as gameNeedsRuleSetup,wr as gameSetPrize,Gi as gameShelfArtwork,Ci as getConfirmBoostCopy,ki as getGameFlow,kr as getGameSetBetConfig,Ke as getJackpotInfo,jr as getLadderConfig,ei as getMirrorConfig,Sr as getPickYourDividendConfig,F as getPropositionEventId,fr as getRuleSetupConfig,mr as getSafetyNetConfig,rr as getSafetyNetPricing,wi as getSixAgainConfig,Je as getSportDisplayName,cn as getTheme,dn as getThemeSet,tn as goldLightTheme,_t as goldTheme,ln as goldThemeSet,en as greenLightTheme,Zt as greenTheme,on as greenThemeSet,je as groupPropositionsBySport,z as groupSameGameMultiEvents,gc as groupSelectionDays,Jd as hexA,fn as isDenseUiVariant,Ni as isFixedCardExactGame,we as isGameIconUrl,vr as isGameSetBetGame,Dr as isLadderGame,Zr as isMirrorGame,Bi as isOpenExactMultiGame,Cr as isPickYourDividendGame,nr as isSafetyNetGame,A as isSameGameMultiGame,T as isSelectableSameGameMultiProposition,gi as isSixAgainGame,Qt as isThemeSet,qe as isValidSelectionCount,Or as ladderCollectAt,Wr as ladderTiers,Xi as mergeGameArtwork,_r as mirrorPrize,li as mirrorPrizeRows,ii as mirrorSuitePrize,si as mirrorVariantGames,On as optionLook,xp as parseGameVariant,xn as parseUiVariant,pl as previewCopy,Ln as previewTint,L as propositionsBelongToEvent,zr as pydLadder,Fr as pydRung,$e as resolveCategoryDisplayName,xe as resolveGameIconId,ke as resolveGameIconMarkup,ve as resolveGameIconUrl,Er as resolveGameTierLevel,Te as resolvePrice,hl as resolveShelfArtwork,Ze as resolveSportDisplayName,Kt as resolveTheme,ir as roundDividendAmount,Li as roundQuotedPayout,lr as safetyNetCollect,or as safetyNetTicket,gl as shelfGameName,bi as sixAgainRuleId,yi as sixAgainStakeMultiples,xi as sixAgainTicket,It as themeAccent,Sn as themeBodyFont,Dt as themeHeading,Pn as themeHeadingFont,Lt as themeLabel,Gt as themeSelectionCard,mn as themeSets,Ut as themeTextAlt,Yt as themeTextAltMuted,Wt as themeValue,pn as themes,bn as uiVariantTheme,Tn as useBladeTheme,Zd as useBrandTileColors,pa as useCalculatePayout,Hi as useCorrelationSteering,sa as useCreateGameEntry,ma as useEntryPreview,da as useEvaluateRule,Qi as useGameArtwork,oa as useGameEntries,la as useGameMaxPayouts,ra as useGames,Da as usePlaceEntry,ca as usePlaceEntryFlow,jn as usePress,ia as usePropositions,hn as useResolvedTheme,aa as useSports,Ys as useSwipeDeck,vn as useUiVariant,Vn as useYesNoLabels,Wi as usesCorrelationPricing,bp as version};
@@ -1,6 +1,14 @@
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
+ }>;
4
12
  export interface HowToPlayButtonProps {
5
13
  content?: string | null;
6
14
  panel?: HowToPlayPanelContent | null;
@@ -24,5 +32,7 @@ export interface HowToPlayButtonProps {
24
32
  };
25
33
  bodyFont?: string;
26
34
  headingFont?: string;
35
+ /** Pass `WebView` from react-native-webview for HTML guides. Defaults to PlaceEntryProvider's. */
36
+ WebViewComponent?: WebViewComponent;
27
37
  }
28
- export declare function HowToPlayButton({ content, panel, theme, extra, title, label, variant, touchSize, colors, bodyFont, headingFont, }: HowToPlayButtonProps): import("react/jsx-runtime").JSX.Element | null;
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;
@@ -14,6 +14,7 @@ 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';
17
18
  export interface PlaceEntryContextValue {
18
19
  gameLibrary: GameLibrary<PlaceEntryContextValue>;
19
20
  getGameFlow: (game: Game | null | undefined) => GameFlow;
@@ -155,6 +156,8 @@ export interface PlaceEntryContextValue {
155
156
  }
156
157
  declare const PlaceEntryContext: React.Context<PlaceEntryContextValue | null>;
157
158
  export { PlaceEntryContext };
159
+ /** To stop Metro throwing a hissy fit. */
160
+ export declare const WebViewContext: React.Context<WebViewComponent | undefined>;
158
161
  export declare function usePlaceEntry(): PlaceEntryContextValue;
159
162
  export interface PlaceEntryProviderProps {
160
163
  /** Additional game implementations. Perfect Pick, H2H and Safety Net are built in. */
@@ -207,7 +210,8 @@ export interface PlaceEntryProviderProps {
207
210
  onClearEventFilter?: () => void;
208
211
  screenSize?: ScreenSize;
209
212
  howToPlayMarkdown?: string | null;
213
+ WebViewComponent?: WebViewComponent;
210
214
  sportDisplayNames?: SportDisplayNameOverrides;
211
215
  categoryDisplayNames?: CategoryDisplayNameOverrides;
212
216
  }
213
- 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;
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;