@simple-parlay/components 1.29.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 (127) hide show
  1. package/LICENSE +71 -0
  2. package/README.md +196 -0
  3. package/dist/index.d.ts +2 -0
  4. package/dist/index.js +1 -0
  5. package/dist/index.mjs +325 -0
  6. package/dist/react/components/BrandLockup.d.ts +18 -0
  7. package/dist/react/components/BrandLogo.d.ts +17 -0
  8. package/dist/react/components/CategoryPickerPage.d.ts +22 -0
  9. package/dist/react/components/ConfirmPage.d.ts +23 -0
  10. package/dist/react/components/EntriesPage.d.ts +19 -0
  11. package/dist/react/components/EntrySubmission.d.ts +2 -0
  12. package/dist/react/components/EventFilterBanner.d.ts +4 -0
  13. package/dist/react/components/EventPickerPage.d.ts +5 -0
  14. package/dist/react/components/GameEntries.d.ts +2 -0
  15. package/dist/react/components/GameLogo.d.ts +10 -0
  16. package/dist/react/components/GameModeCard.d.ts +34 -0
  17. package/dist/react/components/GamePage.d.ts +36 -0
  18. package/dist/react/components/GameSelector.d.ts +2 -0
  19. package/dist/react/components/GameSetBetPage.d.ts +21 -0
  20. package/dist/react/components/GameSetupPage.d.ts +27 -0
  21. package/dist/react/components/HowToPlayButton.d.ts +28 -0
  22. package/dist/react/components/HowToPlayPropsTable.d.ts +6 -0
  23. package/dist/react/components/HtmlContent.d.ts +5 -0
  24. package/dist/react/components/IconSvg.d.ts +11 -0
  25. package/dist/react/components/LadderPage.d.ts +21 -0
  26. package/dist/react/components/LoadingIndicators.d.ts +67 -0
  27. package/dist/react/components/MarkdownContent.d.ts +13 -0
  28. package/dist/react/components/MirrorPage.d.ts +21 -0
  29. package/dist/react/components/MultiLegTable.d.ts +40 -0
  30. package/dist/react/components/PageBackButton.d.ts +13 -0
  31. package/dist/react/components/PayoutCircles.d.ts +15 -0
  32. package/dist/react/components/PerfectPickPage.d.ts +22 -0
  33. package/dist/react/components/PickYourDividendPage.d.ts +21 -0
  34. package/dist/react/components/PickerBrand.d.ts +19 -0
  35. package/dist/react/components/PlaceEntryProvider.d.ts +137 -0
  36. package/dist/react/components/PressToPlayTile.d.ts +14 -0
  37. package/dist/react/components/QuickPickButton.d.ts +11 -0
  38. package/dist/react/components/QuickPickMenu.d.ts +17 -0
  39. package/dist/react/components/RuleSetupPage.d.ts +27 -0
  40. package/dist/react/components/SelectionReview.d.ts +2 -0
  41. package/dist/react/components/SelectionsPage.d.ts +25 -0
  42. package/dist/react/components/SportPickerPage.d.ts +27 -0
  43. package/dist/react/components/SportSelector.d.ts +2 -0
  44. package/dist/react/components/SuccessPage.d.ts +27 -0
  45. package/dist/react/components/_primitives/index.d.ts +91 -0
  46. package/dist/react/hooks/index.d.ts +1 -0
  47. package/dist/react/index.d.ts +74 -0
  48. package/dist/react/index.js +1 -0
  49. package/dist/react/index.mjs +325 -0
  50. package/dist/react/types/index.d.ts +8 -0
  51. package/dist/react/utils/api-client.d.ts +2 -0
  52. package/dist/react/utils/design.d.ts +55 -0
  53. package/dist/react/utils/dummy-data.d.ts +1 -0
  54. package/dist/react/utils/index.d.ts +2 -0
  55. package/dist/react/utils/themes.d.ts +13 -0
  56. package/dist/react-native/components/BrandLockup.d.ts +17 -0
  57. package/dist/react-native/components/BrandLogo.d.ts +16 -0
  58. package/dist/react-native/components/CategoryPickerPage.d.ts +17 -0
  59. package/dist/react-native/components/ConfirmPage.d.ts +19 -0
  60. package/dist/react-native/components/EntriesPage.d.ts +14 -0
  61. package/dist/react-native/components/EntrySubmission.d.ts +2 -0
  62. package/dist/react-native/components/EventFilterBanner.d.ts +4 -0
  63. package/dist/react-native/components/EventPickerPage.d.ts +4 -0
  64. package/dist/react-native/components/GameEntries.d.ts +2 -0
  65. package/dist/react-native/components/GameLogo.d.ts +9 -0
  66. package/dist/react-native/components/GameModeCard.d.ts +33 -0
  67. package/dist/react-native/components/GamePage.d.ts +33 -0
  68. package/dist/react-native/components/GameSelector.d.ts +2 -0
  69. package/dist/react-native/components/GameSetBetPage.d.ts +19 -0
  70. package/dist/react-native/components/GameSetupPage.d.ts +26 -0
  71. package/dist/react-native/components/HowToPlayButton.d.ts +17 -0
  72. package/dist/react-native/components/IconSvg.d.ts +9 -0
  73. package/dist/react-native/components/LadderPage.d.ts +19 -0
  74. package/dist/react-native/components/LoadingIndicators.d.ts +62 -0
  75. package/dist/react-native/components/MirrorPage.d.ts +19 -0
  76. package/dist/react-native/components/MultiLegTable.d.ts +37 -0
  77. package/dist/react-native/components/NativeMenuOverlay.d.ts +32 -0
  78. package/dist/react-native/components/PageBackButton.d.ts +25 -0
  79. package/dist/react-native/components/PayoutCircles.d.ts +14 -0
  80. package/dist/react-native/components/PerfectPickPage.d.ts +20 -0
  81. package/dist/react-native/components/PickYourDividendPage.d.ts +19 -0
  82. package/dist/react-native/components/PickerBrand.d.ts +18 -0
  83. package/dist/react-native/components/PlaceEntryProvider.d.ts +129 -0
  84. package/dist/react-native/components/PressToPlayTile.d.ts +13 -0
  85. package/dist/react-native/components/QuickPickButton.d.ts +11 -0
  86. package/dist/react-native/components/QuickPickMenu.d.ts +17 -0
  87. package/dist/react-native/components/RuleSetupPage.d.ts +23 -0
  88. package/dist/react-native/components/SelectionReview.d.ts +2 -0
  89. package/dist/react-native/components/SelectionsPage.d.ts +22 -0
  90. package/dist/react-native/components/SportPickerPage.d.ts +20 -0
  91. package/dist/react-native/components/SportSelector.d.ts +2 -0
  92. package/dist/react-native/components/SuccessPage.d.ts +24 -0
  93. package/dist/react-native/components/_primitives/index.d.ts +93 -0
  94. package/dist/react-native/hooks/index.d.ts +1 -0
  95. package/dist/react-native/index.d.ts +72 -0
  96. package/dist/react-native/index.js +1 -0
  97. package/dist/react-native/index.mjs +334 -0
  98. package/dist/react-native/types/index.d.ts +1 -0
  99. package/dist/react-native/utils/api-client.d.ts +2 -0
  100. package/dist/react-native/utils/dummy-data.d.ts +1 -0
  101. package/dist/react-native/utils/index.d.ts +2 -0
  102. package/dist/react-native/utils/themes.d.ts +5 -0
  103. package/dist/shared/api-client.d.ts +73 -0
  104. package/dist/shared/composite.d.ts +44 -0
  105. package/dist/shared/date-filters.d.ts +25 -0
  106. package/dist/shared/dummy-data.d.ts +9 -0
  107. package/dist/shared/game-flow.d.ts +39 -0
  108. package/dist/shared/game-icons.d.ts +10 -0
  109. package/dist/shared/game-set-bet.d.ts +48 -0
  110. package/dist/shared/game-tiers.d.ts +23 -0
  111. package/dist/shared/hooks.d.ts +100 -0
  112. package/dist/shared/how-to-play-html.d.ts +12 -0
  113. package/dist/shared/how-to-play-logo.d.ts +2 -0
  114. package/dist/shared/how-to-play-props-table.d.ts +21 -0
  115. package/dist/shared/how-to-play-styles.d.ts +2 -0
  116. package/dist/shared/ladder.d.ts +53 -0
  117. package/dist/shared/markdown.d.ts +24 -0
  118. package/dist/shared/mirror.d.ts +66 -0
  119. package/dist/shared/pick-your-dividend.d.ts +59 -0
  120. package/dist/shared/picker-brand.d.ts +11 -0
  121. package/dist/shared/rule-setup.d.ts +75 -0
  122. package/dist/shared/same-game-multi.d.ts +22 -0
  123. package/dist/shared/themes.d.ts +164 -0
  124. package/dist/shared/tokens.d.ts +64 -0
  125. package/dist/shared/types.d.ts +397 -0
  126. package/dist/shared/utils.d.ts +118 -0
  127. package/package.json +101 -0
package/LICENSE ADDED
@@ -0,0 +1,71 @@
1
+ Proprietary Software License
2
+
3
+ Copyright (c) 2026 Simple Parlay Pty Ltd (ABN 55 675 621 413).
4
+ All rights reserved.
5
+
6
+ 1. Definitions
7
+
8
+ "Software" means the @simple-parlay/components package, including its
9
+ compiled distribution files and any accompanying documentation.
10
+
11
+ "Simple Parlay" means Simple Parlay Pty Ltd.
12
+
13
+ "Licensee" means the organisation or individual using the Software.
14
+
15
+ 2. Grant of License
16
+
17
+ Subject to a valid written agreement between the Licensee and Simple
18
+ Parlay, Simple Parlay grants the Licensee a limited, non-exclusive,
19
+ non-transferable, non-sublicensable, revocable license to install and use
20
+ the Software solely to integrate with and consume the Simple Parlay API.
21
+
22
+ The Software is published to a public package registry for ease of
23
+ distribution only. Public availability does not grant any license or
24
+ right of use to any party that has not entered into such an agreement.
25
+
26
+ 3. Restrictions
27
+
28
+ Except as expressly permitted by a written agreement with Simple Parlay,
29
+ the Licensee must not:
30
+
31
+ (a) redistribute, sell, lease, sublicense, or otherwise make the Software
32
+ available to any third party;
33
+ (b) modify, adapt, translate, or create derivative works of the Software;
34
+ (c) reverse engineer, decompile, or disassemble the Software, except to
35
+ the extent this restriction is prohibited by applicable law;
36
+ (d) remove or alter any proprietary notices contained in the Software; or
37
+ (e) use the Software for any purpose other than integrating with the
38
+ Simple Parlay API.
39
+
40
+ 4. Ownership
41
+
42
+ The Software is licensed, not sold. Simple Parlay retains all right,
43
+ title, and interest in and to the Software, including all intellectual
44
+ property rights therein.
45
+
46
+ 5. No Warranty
47
+
48
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
49
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
50
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.
51
+
52
+ 6. Limitation of Liability
53
+
54
+ TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL SIMPLE PARLAY
55
+ BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN
56
+ ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN
57
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
58
+
59
+ 7. Termination
60
+
61
+ This license terminates automatically if the Licensee breaches any of its
62
+ terms, or upon termination of the written agreement between the Licensee
63
+ and Simple Parlay. Upon termination, the Licensee must cease all use of
64
+ the Software.
65
+
66
+ 8. Governing Law
67
+
68
+ This license is governed by the laws of New South Wales, Australia,
69
+ without regard to its conflict of law provisions.
70
+
71
+ For licensing enquiries, contact Simple Parlay Pty Ltd.
package/README.md ADDED
@@ -0,0 +1,196 @@
1
+ # @simple-parlay/components
2
+
3
+ UI components, hooks, and utilities for building BLADE game-entry
4
+ experiences in React.
5
+
6
+ | | |
7
+ |---|---|
8
+ | **Version** | 1.28.0 |
9
+ | **Licence** | Proprietary — see [LICENSE](./LICENSE) |
10
+ | **Registry** | Public npm — no auth token required |
11
+ | **Changelog** | [CHANGELOG.md](./CHANGELOG.md) |
12
+
13
+ ---
14
+
15
+ ## Licence & Usage Notice
16
+
17
+ This package is proprietary software owned by
18
+ **Simple Parlay Pty Ltd** (ABN 55 675 621 413) and is provided under a
19
+ restricted, non-transferable licence. It may only be used by organisations
20
+ that have entered into a written agreement with Simple Parlay Pty Ltd.
21
+
22
+ Unauthorised use, redistribution, or disclosure to third parties is
23
+ prohibited. This software is provided as-is without warranty of any kind.
24
+
25
+ ---
26
+
27
+ ## Integration Guide
28
+
29
+ ### Prerequisites
30
+
31
+ | Requirement | Version |
32
+ |-------------|---------|
33
+ | Node.js | ≥ 18 |
34
+ | React | ≥ 18 |
35
+ | React DOM | ≥ 18 |
36
+
37
+ ### 1. Install
38
+
39
+ ```bash
40
+ npm install @simple-parlay/components
41
+ ```
42
+
43
+ > **No auth token or `.npmrc` required.** This package is published to the
44
+ > public npm registry so it installs with a single command. Use of the
45
+ > Software is governed by the [LICENSE](./LICENSE) and requires a written
46
+ > agreement with Simple Parlay Pty Ltd.
47
+
48
+ ### 2. Import — React sub-path
49
+
50
+ All React components, hooks, utilities, and types are available from the
51
+ `/react` sub-path export:
52
+
53
+ ```tsx
54
+ import {
55
+ // Components
56
+ PlaceEntryFlow,
57
+ GameSelector,
58
+ SportSelector,
59
+ EntrySubmission,
60
+ PayoutCircles,
61
+
62
+ // Hooks
63
+ useGames,
64
+ usePropositions,
65
+ useCreateGameEntry,
66
+ usePlaceEntryFlow,
67
+ useEvaluateRule,
68
+ useCalculatePayout,
69
+
70
+ // API client
71
+ BladeApiClient,
72
+
73
+ // Utilities
74
+ formatCurrency,
75
+
76
+ // Theming
77
+ getTheme,
78
+ applyTheme,
79
+ useBladeTheme,
80
+ themes,
81
+
82
+ // Types (import type)
83
+ type Game,
84
+ type Proposition,
85
+ type GameEntry,
86
+ type PlaceEntryFlowProps,
87
+ type BladeTheme,
88
+ type BladeApiClientConfig,
89
+ } from '@simple-parlay/components/react';
90
+ ```
91
+
92
+ ### 3. Quick start — full-page flow
93
+
94
+ The fastest way to get up and running is with the `PlaceEntryFlow` component.
95
+ It handles game selection, proposition picking, entry configuration, and
96
+ submission in a single self-contained widget:
97
+
98
+ ```tsx
99
+ import { PlaceEntryFlow } from '@simple-parlay/components/react';
100
+
101
+ function App() {
102
+ return (
103
+ <PlaceEntryFlow
104
+ apiUrl="https://your-api-endpoint.example.com"
105
+ apiKey="your-api-key"
106
+ userId={42}
107
+ onEntryPlaced={(entry) => console.log('Entry placed:', entry)}
108
+ onCancel={() => console.log('Cancelled')}
109
+ />
110
+ );
111
+ }
112
+ ```
113
+
114
+ #### Props
115
+
116
+ | Prop | Type | Required | Description |
117
+ |--------------------|-------------------------------|----------|------------------------------------------------------|
118
+ | `apiUrl` | `string` | ✅ | Base URL of the API |
119
+ | `apiKey` | `string` | ✅ | API key for authentication |
120
+ | `userId` | `number` | — | Current user ID |
121
+ | `onEntryPlaced` | `(entry: GameEntry) => void` | — | Callback fired after successful submission |
122
+ | `onCancel` | `() => void` | — | Callback fired when user cancels |
123
+ | `initialGameId` | `number` | — | Pre-select a game by ID |
124
+ | `gameCategory` | `'sports' \| 'casino' \| 'racing'` | — | Filter games to a specific category |
125
+ | `jurisdiction` | `string` | — | Filter games by jurisdiction |
126
+ | `theme` | `BladeTheme` | — | Custom theme object |
127
+ | `modal` | `boolean` | — | Render as a fixed overlay (default) or inline card |
128
+ | `className` | `string` | — | Additional CSS class name |
129
+
130
+ ### 4. Using individual components
131
+
132
+ For tighter control, compose the lower-level components yourself:
133
+
134
+ ```tsx
135
+ import {
136
+ GameSelector,
137
+ SportSelector,
138
+ EntrySubmission,
139
+ PayoutCircles,
140
+ useGames,
141
+ usePropositions,
142
+ BladeApiClient,
143
+ } from '@simple-parlay/components/react';
144
+
145
+ const client = new BladeApiClient({
146
+ baseUrl: 'https://your-api-endpoint.example.com',
147
+ apiKey: 'your-api-key',
148
+ });
149
+
150
+ function CustomFlow() {
151
+ const { games, loading } = useGames(client);
152
+ // … build your own UI with the individual components
153
+ }
154
+ ```
155
+
156
+ ### 5. Theming
157
+
158
+ Apply a built-in theme or supply your own `BladeTheme` object:
159
+
160
+ ```tsx
161
+ import {
162
+ PlaceEntryFlow,
163
+ getTheme,
164
+ darkTheme,
165
+ goldTheme,
166
+ } from '@simple-parlay/components/react';
167
+
168
+ // Use a built-in theme
169
+ <PlaceEntryFlow theme={darkTheme} /* … */ />
170
+
171
+ // Or retrieve one by name
172
+ <PlaceEntryFlow theme={getTheme('gold')} /* … */ />
173
+ ```
174
+
175
+ ### 6. API client
176
+
177
+ The `BladeApiClient` can also be used standalone for server-side or headless
178
+ integrations:
179
+
180
+ ```ts
181
+ import { BladeApiClient } from '@simple-parlay/components/react';
182
+
183
+ const client = new BladeApiClient({
184
+ baseUrl: 'https://your-api-endpoint.example.com',
185
+ apiKey: 'your-api-key',
186
+ });
187
+
188
+ const games = await client.getGames();
189
+ const propositions = await client.getPropositions();
190
+ ```
191
+
192
+ ---
193
+
194
+ ## What's new
195
+
196
+ See [CHANGELOG.md](./CHANGELOG.md) for a full version history.
@@ -0,0 +1,2 @@
1
+ export declare const version = "1.29.0";
2
+ export * from './react';