@sensiblestats/widget-embed 0.6.1 → 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 CHANGED
@@ -1,5 +1,33 @@
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
+
3
31
  ## 0.6.1
4
32
 
5
33
  ### Patch Changes