@sensiblestats/widget-embed 0.6.0 → 0.7.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.
- package/CHANGELOG.md +39 -0
- package/dist/embed.global.js +32 -24
- package/dist/embed.global.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# @sensiblestats/widget-embed
|
|
2
2
|
|
|
3
|
+
## 0.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Add to slip on betting insight cards.
|
|
8
|
+
|
|
9
|
+
The operator supplies an `onAddToSlip` callback; the widget hands it one selection
|
|
10
|
+
keyed by `matchOddsId` (the operator's own odds-row id) and maps the callback's
|
|
11
|
+
typed result to a localized (en/tr) toast. Two server fields drive it:
|
|
12
|
+
`odds.matchOddsId` and the per-operator gate `addToSlipEnabled` — the button
|
|
13
|
+
renders only when the gate is true, a handler is supplied, and the insight carries
|
|
14
|
+
a usable odds id. The widget never touches stake, balance, or bet placement.
|
|
15
|
+
|
|
16
|
+
- **widget-sdk:** add `SlipSelection`, `AddToSlipResult`, `AddToSlipRejectReason`,
|
|
17
|
+
and the `isAddToSlipResult` runtime guard; extend `BettingInsight` with
|
|
18
|
+
`addToSlipEnabled` and `odds.matchOddsId`.
|
|
19
|
+
- **widget-react:** add `AddToSlipButton` and `Toast`, the `slip.ts` result→toast
|
|
20
|
+
mapping (which honours `price_changed.accepted`), en/tr copy, `conversationId`
|
|
21
|
+
capture on `turn_complete`, and the `onAddToSlip` config entry. Malformed
|
|
22
|
+
results, throws, and a 10s timeout all fail closed to a retryable button.
|
|
23
|
+
- **widget-embed:** re-bundles widget-react, so it is republished. Add-to-slip is
|
|
24
|
+
not exposed to script-tag hosts, because a callback cannot be expressed in a
|
|
25
|
+
`data-*` attribute.
|
|
26
|
+
|
|
27
|
+
This shipped to master in `dd2da0e1` (#248) but never reached npm, because the
|
|
28
|
+
version was not bumped in the merged commit and the release workflow's
|
|
29
|
+
`--tolerate-republish` therefore skipped every package.
|
|
30
|
+
|
|
31
|
+
## 0.6.1
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- Stop rendering generic entity cards. Any entity that isn't a team or a player
|
|
36
|
+
(coach, referee, stadium, competition) previously fell through to a low-value
|
|
37
|
+
"generic" card with no identity signal; those are now dropped at the reducer so
|
|
38
|
+
only team and player cards render. The generic rendering path is left intact so
|
|
39
|
+
a purpose-built variant can re-enable it later. widget-embed re-bundles
|
|
40
|
+
widget-react, so it must be republished too.
|
|
41
|
+
|
|
3
42
|
## 0.6.0
|
|
4
43
|
|
|
5
44
|
### Minor Changes
|