@simple-parlay/components 1.30.6-pre.4 → 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.
@@ -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';
@@ -12,10 +12,11 @@ export declare function matchesDateWindow(commenceTime: string | null | undefine
12
12
  /**
13
13
  * Which date-window chips are worth showing for a set of propositions.
14
14
  *
15
- * A window only appears when it *partitions* the set — at least one prop falls
16
- * inside it and at least one outside — so a filter that would match everything
17
- * (a game the operator already caps to, say, this week) or nothing (no games
18
- * today) is hidden rather than shown as a no-op.
15
+ * A window appears when at least one prop falls inside it — so the chips read
16
+ * the same way every time you open the panel. The whole group drops out only
17
+ * when no window can change the list at all (every dated prop inside every
18
+ * window it matches), which is what a game the operator already caps to a
19
+ * single day or week looks like.
19
20
  */
20
21
  export declare function availableDateWindows(propositions: ReadonlyArray<Pick<Proposition, 'commence_time'>>, now: Date): DateWindowOption[];
21
22
  /**
@@ -67,7 +67,7 @@ export declare function useCreateGameEntry(apiClient: BladeApiClient): {
67
67
  clearSubmitError: () => void;
68
68
  };
69
69
  export declare function usePlaceEntryFlow(initialGameId?: number): {
70
- step: "success" | "sport" | "game" | "confirm";
70
+ step: "sport" | "success" | "game" | "confirm";
71
71
  selectedGame: Game | null;
72
72
  selections: Record<number, "yes" | "no">;
73
73
  placedEntry: GameEntry | null;
@@ -2,6 +2,8 @@ export declare const PICKER_BRAND: {
2
2
  readonly stone: "#DDD9D2";
3
3
  readonly teal: "#0F4C5C";
4
4
  readonly citron: "#DFFF1A";
5
+ readonly tealMid: "#4B7985";
6
+ readonly tealSoft: "#7B9DA5";
5
7
  };
6
8
  export declare const SPORT_SHORT_CODES: Record<string, string>;
7
9
  export declare function getCategoryTagline(category: string): string;
@@ -6,6 +6,7 @@ export declare const SLIP_DIVIDEND_LABEL = "Potential dividend";
6
6
  export declare const SLIP_LEG_HINT = "Tap a leg to read it.";
7
7
  export declare const SLIP_LEG_REMOVE = "Remove";
8
8
  export declare const SLIP_CLEAR = "Clear bet";
9
+ export declare const SPORT_LOCKED_HINT = "One sport per bet.";
9
10
  export declare const VIEW_LIST_GLYPH = "\u2630";
10
11
  export declare const VIEW_SWIPE_GLYPH = "\u21C6";
11
12
  export declare const VIEW_LIST_LABEL = "List view";
@@ -332,6 +332,7 @@ export interface SportSelectorProps {
332
332
  onPropositionCountChange?: (count: number) => void;
333
333
  allowAnswerToggle?: boolean;
334
334
  headerExtra?: ReactNode;
335
+ railSlot?: ReactNode;
335
336
  /**
336
337
  * Which proposition layout to draw. Omitted (the default) is the packaged
337
338
  * matchup list; the variants are YESNO's fixture-first designs. Falls back to
@@ -7,7 +7,12 @@ export declare function resolvePrice(price: number | string | {
7
7
  } | null | undefined): number;
8
8
  export declare function toNumber(value: unknown): number;
9
9
  export declare function toBool(value: unknown): boolean;
10
- export declare function formatYesNo(value: string): string;
10
+ export interface YesNoLabels {
11
+ yes: string;
12
+ no: string;
13
+ }
14
+ export declare const DEFAULT_YES_NO_LABELS: YesNoLabels;
15
+ export declare function formatYesNo(value: string, labels?: YesNoLabels): string;
11
16
  export declare function formatCurrency(value: number): string;
12
17
  export declare function formatDate(date: Date | string): string;
13
18
  export declare function groupPropositionsBySport(propositions: Proposition[]): Record<string, Proposition[]>;
@@ -65,6 +70,11 @@ export type SportDisplayNameOverrides = Record<string, string>;
65
70
  /** Host-supplied UI labels keyed by entry category (e.g. `sports`, `casino`, `racing`). */
66
71
  export type CategoryDisplayNameOverrides = Record<string, string>;
67
72
  export declare function resolveSportDisplayName(sport: string, overrides?: SportDisplayNameOverrides | null, sportBaseKey?: string | null): string;
73
+ export declare function resolveSportLabel(sport: string, sources: {
74
+ overrides?: SportDisplayNameOverrides | null;
75
+ summaryLabel?: string | null;
76
+ sportBaseKey?: string | null;
77
+ }): string;
68
78
  export declare function resolveCategoryDisplayName(category: string, overrides?: CategoryDisplayNameOverrides | null): string;
69
79
  /**
70
80
  * Filter propositions to only those allowed by a game's constraints.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simple-parlay/components",
3
- "version": "1.30.6-pre.4",
3
+ "version": "1.30.6-pre.5",
4
4
  "description": "UI components, hooks, and utilities for React and React Native",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",