# @sensiblestats/widget-sdk

## 0.117.0

### Minor Changes

- d46ece9: Client events for load, availability, launcher, open and close: widget_loaded, strings_state, widget_unavailable, slip_unavailable, storage_blocked, identity_change, language_change, request_failed, widget_error, widget_open source and first, widget_close method, tab and openMs, bubble_suppressed, bubble_intro_played, visibility_change and widget_init_failed. The sdk client now reports response statuses to listeners.

## 0.116.0

### Minor Changes

- Wire events v2: event ids, a session that survives reloads within 30 minutes, batch context, delivery classes and size-aware batching. The 13 public-only events, host calls, page changes and mobile bridge commands now reach the server. Needs ChatAssistantAPI and WidgetGateway from u676 Plan A.

## 0.115.0

### Minor Changes

- Every gateway call sends the visitor's IANA zone as `X-SS-Time-Zone` (the host's `timeZone` when set, else the browser's), so times and "today" the server writes follow the visitor instead of the operator's configured zone.

## 0.114.0

### Minor Changes

- ebf1a14: Web parity with the mobile wrappers. widget-sdk exports `UnavailableReason`, `Teaser`, `TeaserPrice`, `PriceResult` and `observingFetch` (the mobile bridge types now come from it; `MobileTeaser`, `MobileTeaserPrice` and `MobilePriceResult` are removed from widget-react). widget-react adds `launcher: false` (hides the built-in launcher), `onTeaser(teaser | null)` and `onUnavailable(reason)` (`widget_disabled`, `auth_failed`) to `StatsWidgetConfig`, and `tapAsk`, `tapPrice` (resolves `PriceResult | null`), `tapCta`, `tapTeaser`, `dismissTeaser`, `teaserShown` to the `WidgetHost` from `createWidgetHost()`. A mounted `<StatsWidget>` now rebuilds its client, starts a fresh thread, and drops the previous visitor's pins and slip marks when `userContext.operatorUserId` or `anonymousUserId` changes. The teaser methods act only when the widget has `launcher: false`, and `onTeaser(null)` is delivered when the widget unmounts. widget-embed adds `data-launcher="false"`, the `sensiblestats:teaser` (`detail.teaser`) and `sensiblestats:unavailable` (`detail.reason`) window events, and the six teaser actions on the `init()` handle and the `window.SensibleStatsWidget` global.

## 0.113.0

### Minor Changes

- e2b51d5: `PageContext.sport` is now `'football' | 'basketball' | 'americanfootball' | 'tennis'`, the same sport names used elsewhere in the widget, so a host page for NFL or tennis can tell the greeting which sport the visitor is on. The server still reads `nba` and `nfl`.

## 0.112.0

### Minor Changes

- New visitors see one game with its strongest fact and price, tappable asks, and a "What can I bet on tonight?" chip that answers with up to three games, each with its fact and price. A favourites prompt invites the visitor to pick teams, players and leagues.

## 0.111.0

### Minor Changes

- The greeting renders the canvas layout: game first, plain copy and green pills, from the new payload and the 0.152 one alike.

## 0.110.0

### Minor Changes

- The NBA greeting's price pills and the bubble's pill reprice as NBA, and an alternative row can name its own market.

## 0.109.0

### Minor Changes

- The greeting bubble shows a price pill that adds to the slip, and greeting adds are tagged with what led the greeting.

## 0.108.2

### Patch Changes

- Type the optional `trail` on greeting price selections (price at the last visit, then its moves since), matching the server wire.

## 0.108.1

### Patch Changes

- c54bb3a: Add the quarterLead and quarterTotal kinds to LiveMonitorFact.

## 0.108.0

### Minor Changes

- Greeting v2: market-first football board, bubble button with highlight, reprice on add, market chooser, combo hand-off, anonymous id kept beside the operator id.

## 0.107.0

### Minor Changes

- Compare card: two players or two seasons side by side, the higher value marked, with a game-count row and a shared period.

## 0.106.0

### Minor Changes

- The builder grid request takes `variant`, `keep` and `swapped`, the payload carries `variant` and `variants`, `noSwap` is a status, and two tracking events (`combo_variant_click`, `combo_swap_click`) exist.

## 0.105.0

### Minor Changes

- 0d4ddba: Opponent crests on NBA and NFL form rows, league logo in monitor headers, team crests on NFL insight badges, and player headshots in favourites

## 0.104.0

### Minor Changes

- 087796d: `combo_add` metadata `totalChosen` may be `'custom'` for a typed total.

## 0.103.0

### Minor Changes

- 3e4fd4c: Add the optional `fact` (`hits`, `games`, `window`) to `ComboLeg`.

## 0.102.0

### Minor Changes

- The widget records greeting impressions and taps on its own event batch, and slip events now carry the odds row id (`matchOddsId`).

## 0.101.0

### Minor Changes

- Smart Acca builder: when no combo lands on the asked total, draw the closest combo with a note, its combined price line, and mark the leg count that lands. Payloads carry `nearest`.

## 0.100.2

### Patch Changes

- Draw NFL team crests and player headshots on the followed-game card, the props roster and scorers, and the NFL insight cards, when the server sends them

## 0.100.1

### Patch Changes

- Draw team crests and player headshots on the greeting cards, chips and facts, on NBA favourites and on schedule rows, when the server sends them

## 0.100.0

### Minor Changes

- Entity cards for NBA and NFL answers, with a win-loss record bar.

## 0.99.0

### Minor Changes

- Favourites moves out of the tab strip into the header's kebab menu and opens as a bottom sheet over the chat. The greeting's "Pick your teams" invite and the ribbon's "+N more" open the same sheet. `WidgetTab` and `WidgetTrackingTab` no longer include `'favourites'`.

## 0.98.0

### Minor Changes

- c6b974a: NBA crests and player headshots when the server sends image paths

## 0.97.0

### Minor Changes

- Show scored penalties in the live scorer strip with a "(pen)" marker: `LiveMonitorEvent.penalty` and the `widget.penaltyLabel` row.

## 0.96.0

### Minor Changes

- 97909b7: Live fact unit: the Following tab and the chat live card show a live fact with the evidence behind it, the one market it points to as a tappable price, and the kick-off price beside it. A market on hold or suspended shows no button, and the chat live card refreshes its fact on every live update, and hides it when the card is closed, stale or restored from storage.

## 0.95.0

### Minor Changes

- 5c2225f: Entity card: asked stats with coverage notes, muted defaults, a period footer and a header chip; the stat strip is three columns and scrolls after two full rows (taller when a tile has a coverage note) and fades at the bottom edge when more than six tiles follow.

## 0.94.0

### Minor Changes

- Log fact_view and fact_ask events and tag slip adds from a live fact with its key.

## 0.93.1

### Patch Changes

- NBA and NFL prop insight cards now put the player and the stat in the add-to-slip `display`, so a host can tell two players' "Over 24.5" picks apart. NBA "Add both" legs name each leg's own player and stat instead of the card title. The `SlipDisplay.selection` doc now says that an insight card's label can carry the team name and the line.

## 0.93.0

### Minor Changes

- Smart Acca cools off per sport: a builder 404 for one sport no longer hides the tab for the others. Every add-to-slip selection now carries `display` (match names, kickoff, raw market, selection and line, the player on a prop, and the market as the widget showed it), so a host can label a pick it cannot look up; display never rides tracking or event-log payloads. Acca legs wrap long player and team names instead of cutting them, and the added-to-slip toast sits on its own row.

## 0.92.0

### Minor Changes

- b7958d2: Tennis insight cards: serve and return scatter, serve-form bars and season path. The season path names its surface legend, draws the alive outline only when the server sends its label, and shows an "other surface" chip for bars with no known surface.

## 0.91.0

### Minor Changes

- c1cd84b: NBA vs-opponent card and a priced matchup position row.

## 0.90.0

### Minor Changes

- Live tennis card: set-by-set score with the serving player, game points, elapsed time, baseline price note, paused prices, serve and return tables with Match and Set tabs, today versus season, season record and titles, and the live score on the Live tab row and scoreboard tile. Adds `TennisScore.endState` (`TennisEndState`: retired, walkover, canceled, abandoned) for a final that was not played out, and `MatchState.tennis` so a Matches or Live row carries the score.

## 0.89.0

### Minor Changes

- Adds the optional `TennisHeadToHead.meetings` (up to three newest meetings) to the live monitor tennis type.

## 0.88.0

### Minor Changes

- Pin a tennis match from the schedule and follow it as a pre-match card: players with rank and race, the winner price with its movement since the opening, form, surface, tiebreak and deciding-set records, head to head and an ask button. A tennis match id is only unique within its tour, so the tour now travels with pins, prices, slip selections and the events and ledger entries that report them.

## 0.87.0

### Minor Changes

- Tennis in the Matches tab: the day's ATP matches by tournament with players, country codes, round, surface, time or time TBA, and match-winner prices that go to the operator slip. Live tennis matches show on the Live tab with a live marker.

## 0.86.1

### Patch Changes

- Ask for live match states in the host language: `getStates` and `postStates` take an optional locale, and the widget passes its host language.

## 0.86.0

### Minor Changes

- Read the Continue label, the countdown title and the Mystery Tiger position tiles from the server's strings rows. A widget whose non-English strings cannot load stays hidden: a 4xx other than 429 is final, anything else recovers through a 5-minute retry, the browser coming back online, or the tab becoming visible. The SDK's getWidgetStrings errors now carry the HTTP status and Retry-After, which the gateway forwards.

## 0.85.0

### Minor Changes

- `getWidgetStrings` reads the widget chrome strings for a language tag (`v1/{operatorId}/strings?lang=&v=`); new `WidgetStrings`, `StringTable` and `PluralRow` types.
- NBA and NFL card and props payloads carry server labels beside their codes: `statLabel`, `statusLabel`, `propLabel`, `positionLabel`, `label`, `shortLabel`.
- `locale` is optional on `getPricePresets` and `getBuilderGrid` (unset sends no language); `getPlayerProps` takes a `locale`.

## 0.84.0

### Minor Changes

- 1d12df8: A followed NFL game in progress shows the situation, scoring plays, a win-probability line, in-game markets and props with
  each player's numbers so far, and keeps form and head-to-head.

## 0.83.0

### Minor Changes

- f4e8a78: Today tab replaced by Live and Matches; schedule gains `matchDays`; `match_sheet` question source.

## 0.82.0

### Minor Changes

- NBA Following card: last-5 form dots and a rest chip for each team, and a Form & rest section with the rest line, the last five games against the opening spread and the season and venue records.

## 0.81.0

### Minor Changes

- Live NBA props show each player's stats so far: value on every stat chip, minutes on the row, a live bar beside the last five games, and the stats clock in the header.

## 0.80.0

### Minor Changes

- The combo builder moves out of the greeting into its own tab, after Today: Smart Acca (Smart Parlay in en-US, Akıllı Kupon in Turkish, Multipla Intelligente / Combinada Inteligente / Múltipla Inteligente in Italian, Spanish and Portuguese). The tab shows when the greeting sent a builder for at least one sport, lists only those sports, and goes away on a cool-off. `tab_change` and `widget_close` carry the new `builder` tab id. The greeting's facts no longer follow the builder's games select.

## 0.79.0

### Minor Changes

- Remove the preset speed dial and its Set-the-numbers tool. Breaking for widget-sdk: `ChatPreset` is combo only, and `PresetSinglesCell`, `PresetMarketCell`, the singles, singlesFrom and markets grid rows and `limitOptions`/`floorOptions` are gone. `isPresetGrid` now requires only `combos`, `maxLegs` and `totalOptions`.

## 0.78.0

### Minor Changes

- - Odds formats. The visitor picks Decimal, Fractional or American in a new Settings sheet (chat menu, with a Light, Dark or Auto theme choice) and every price on a card, chip, ribbon and builder follows it; the choice is saved on the device. The operator sets the starting format with the new `oddsFormat` config key, or `data-odds-format` on the embed script. The Settings odds row is hidden when the operator does not offer odds, and the theme row when `surface` or `ink` is set. The sdk reads the new `widget-settings` route, and prices arrive as three forms (decimal, fractional, American) from the server.

    Breaking: the `price_changed` slip result now carries `newOdds` in the operator's own format instead of `newOddsDecimal`, and a stored chat thread moves to schema v2 (older threads are dropped). Tracking events still carry decimal prices only, and add-to-slip sends the operator's format, never the visitor's.

## 0.77.0

### Minor Changes

- `combo_add_click` now also fires when "Add all" adds every leg of a combo card in chat, and carries `surface` (`builder` or `chat`). `answer_received.cardTypes` reports a team or player card as `team_player` instead of `entity_card`.

## 0.76.0

### Minor Changes

- Add tracking events. `onEvent` on the React config, or a `sensiblestats:event` DOM event on `window` for the embed, reports widget activity to the operator's own tracker. Questions report their length; `eventText` (`data-event-text="true"`) adds the full text.
- A connection that drops while an answer streams now surfaces as a `NetworkError` instead of a raw `TypeError`, so the turn ends with an error.

## 0.75.0

### Minor Changes

- Personal greeting sections, a Favourites tab, and a combo_add event when a builder combo is added to the slip.

## 0.74.1

### Patch Changes

- Send the visitor ids (`operatorUserId`, `anonymousUserId`) in the `X-SS-Operator-User-Id` and `X-SS-Anonymous-User-Id` request headers on every gateway call instead of the query string and JSON body. Blank ids, and ids the gateway would reject (non-ASCII or over 128 characters), send no header; `sendSignal` then falls back to the anonymous id. Public function signatures are unchanged.

## 0.74.0

### Minor Changes

- NFL Following card: pre-kickoff player props (trends, per-player roster with last-10 bars and rung hit counts, TD scorers) and a Last 5 block with head-to-head and opening-line spread chips. `getPlayerProps` and `loadPlayerProps` take an optional `sport`, `PlayerPropsBundle` gains `facts` and `form`, a price gains `hits` and a stat gains `games`. NBA calls send no `sport` and are unchanged.

## 0.73.0

### Minor Changes

- 532bdc6: Today tab lists NFL games after the NBA group. The schedule request now opts into `americanfootball`, and the states poll sends `nflGameIds` (only when non-empty) alongside `nbaGameIds`; `Conversation.getStates` takes the NFL ids as a third argument. NFL rows show team abbreviations, kickoff time, and the live quarter, clock and score, and pin as `americanfootball`. Cached Today schedules from before this release are discarded once. Deploy the server first: an older server ignores the extra sport, so a widget released before it caches a day with no NFL group for up to six hours.

## 0.72.0

### Minor Changes

- Each sport tab on the greeting dashboard shows its own chips: `GreetingDashboardSet.suggestedActions` is read for the sport on screen, and a server that sends none keeps the turn's chips.

## 0.71.0

### Minor Changes

- 5304e92: NFL joins the sport switch. `americanfootball` now has the wire key `nfl`, so NFL dashboard taps, pins and slip picks send `sport: "nfl"` with `nfl:` ids, and an NFL choice is remembered. Adds the `gridiron`, `run` and `catch` dashboard icons. Needs ChatAssistantAPI and WidgetGateway with u599; an older server answers `sport: "nfl"` with a 400.

## 0.70.0

### Minor Changes

- da187a5: Add a sport switch above the greeting dashboard. The widget now sends the `sport_switch` capability; when the server returns dashboards for two or more sports, the switch picks between them, the choice is stored on the device for 30 days and sent as `rememberedSport` on chat requests, and each switch logs a `dashboard_sport_switch` event. A tap on an NBA tile sends `sport: "nba"`. `widget-sdk` adds `GreetingDashboardSet`, `dashboards`, `defaultSport` and `defaultSportSource` on the turn-complete event, `rememberedSport` on `ChatInput`, and `fromWireSport`.

## 0.69.0

### Minor Changes

- Send `sport: "nba"` on NBA pins, slips and host slip events, with qualified ids (`nba:game:{id}`, `nba:market:{key}`) on pin events and the bare game id on slip events. `SignalInput` and `WidgetEventInput` gain an optional `sport`; each sport in the SDK's sport map gains a `wireKey` (`nba` for basketball, none for NFL, which sends nothing new). Football bodies are unchanged. A basketball slip pick keeps its `matchId`. Release only after ChatAssistantAPI and WidgetGateway carrying u592 are deployed: an older server would read the `nba:` ids as football.

## 0.68.0

### Minor Changes

- NFL in Following: monitor card, pin, slip on insights and the pre-kickoff market

## 0.67.0

### Minor Changes

- NFL cards: nfl_insight event, americanfootball market odds, sport map

## 0.66.0

### Minor Changes

- 5d0450f: Add `PageContext` and `ChatInput.page`, `ChatGrounding.sport`, and the greeting tile fields `meta` and `imageCodes`.

## 0.65.0

### Minor Changes

- 5cf2439: Add optional `live` to `PlayerPropsBundle`: true when the prices are in-game ones for a game in progress.

## 0.64.0

### Minor Changes

- NBA matchup, quarter ladder and settle recap cards, behind the nba_insight_v2 capability.

## 0.63.1

### Patch Changes

- Co-hit card no longer shows a combined price; `combinedPrice` is optional and deprecated.

## 0.63.0

### Minor Changes

- NBA player props on the Following card: points, rebounds, assists and threes with alt lines and last 5 games, before tip-off.

## 0.62.0

### Minor Changes

- 1989f8f: Following tab follows up to 5 games, football and NBA, with a scoreboard strip, an NBA game card and a 5-game limit toast. NBA games on the Today tab get a Follow pin.

## 0.61.0

### Minor Changes

- 2392632: Today tab lists NBA games alongside football for operators offered NBA

## 0.60.0

### Minor Changes

- NBA bettor cards: the `nba_insight` event types and parsing (prop reason, ladder, teammate out, co-hit, line move),
  and `SlipSelection.sport`, which is `'basketball'` on an NBA selection so a slip is keyed by sport plus id.

## 0.59.0

### Minor Changes

- 3b75853: The widget sends its version in an X-SS-Client header (widget-react/<version>) so the operator panel can show which version each brand runs. The SDK takes an optional `client` option and sends no header without it.

## 0.58.0

### Minor Changes

- 8973968: Add `homeShortCode`/`awayShortCode` to `FormAndH2H`.

## 0.57.0

### Minor Changes

- Pinned pre-match cards on the Following tab now show a collapsed Form & H2H module (last-5 form for both teams plus head-to-head record), hidden once the match goes live. Adds `formAndH2H` to the live-monitor match snapshot. widget-embed is bumped too since it depends on widget-react and widget-sdk and ships the same snapshot shape.

## 0.56.0

### Minor Changes

- Club tab: full player page (photo, availability, season performance ranks, match log) and the full Stats table. `ClubPlayerAvailabilityStatus` adds `'unavailable'` for sideline reasons that are neither injury nor suspension, and `ClubPlayerPerformance.unrankedReason` (`'minutes' | 'cohort' | 'noLeague'`, optional) says why a player is not ranked.

## 0.55.0

### Minor Changes

- 15439be: Add `getClubSquadStats`, `getClubPlayerDetail` and `getClubRecords` (and the matching `conversation` methods and payload types) for the Club tab squad stats, player detail and records.

## 0.54.0

### Minor Changes

- Add `MarketOddsCard.insights` (up to 2 stats, strongest first) alongside the existing single `insight`. Older servers only send `insight`; this is additive and optional.

## 0.53.0

### Minor Changes

- ab92577: Add Club fixtures/standings/squad endpoints.

## 0.52.0

### Minor Changes

- e7aa85a: Today tab redesign: live band, search, Your/Top leagues and All leagues tile grids, and a
  league-detail view with star/unstar, replacing the per-league accordion.

## 0.51.0

### Minor Changes

- Show the brand's limit message: LimitError for limit refusals, the limit_notice capability, and a status line that replaces the composer while the assistant is paused.

## 0.50.0

### Minor Changes

- The SDK adds the entity-free `widget_open` event type. It is batched like the popup events, and each open is added to the user's count for the day.

## 0.49.0

### Minor Changes

- All markets (N) under chat odds cards and an odds icon with the count on list rows; one pinned match at a time, and a pin or All markets tap opens it in Following.

## 0.48.0

### Minor Changes

- Add by-market preset row with market dropdown to SetNumbersTool.

  widget-sdk: PresetMarketCell type and markets field on PresetGrid; market kind on ChatPreset.
  widget-react: single market row with ChoiceSelect dropdown in Set the numbers tool; marketRow/marketName/marketDisplay/marketMessage strings.
  widget-embed: picks up the new widget-react; bundle carries the market row.

## 0.47.0

### Minor Changes

- Onboarding presets, stage 3: the open pick pool.

  - widget-sdk: `ComboLeg.insight` is optional and may be null; `getPricePresets` and
    `Conversation.getPricePresets(locale, { pool })` take `pool: 'open'`.
  - widget-react: a combo leg with no stat is drawn with its price and no stat line, and its slip
    selection carries no `insightId`, instead of the whole card being dropped; every chat request
    declares `price_presets_open`; the preset grid is asked with `pool=open`. Picking a combo total that exists only at another match count moves the match count to the nearest count that has it.
  - widget-embed: rebuilt against the new widget-react and widget-sdk.

## 0.46.0

### Minor Changes

- 8fd2f53: Combo card legs now carry a match pin and no longer link to the match page: a tap on the pin adds the match to the Following tab, and the right arrow that closed the widget on a phone is gone. Adds optional `pinEnabled` to `ComboLeg`; an older server that omits it shows no pin.

## 0.45.0

### Minor Changes

- Onboarding presets, stage 2.

  - widget-sdk: `PresetGrid`, `PresetSinglesCell`, `PresetComboCell`, `PresetPick`; `Conversation.getPricePresets(locale)`
    for `GET v1/{operatorId}/price-presets`; optional `ChatInput.preset` (`ChatPreset`).
  - widget-react: a round button above Send, shown on the Chat tab once the grid answers 200, fans out
    "Set the numbers" and "Build a combo"; each opens a modal tool over the chat that disables the
    composer until it closes; a tool's Send puts the ask in the chat with the `preset` field; a combo
    card gains "Change total or matches"; the composer takes `disabled` and `onType`.
  - widget-embed: rebuilt against the new widget-react and widget-sdk.

## 0.44.0

### Minor Changes

- 43177ff: Stage 4 live card: add `MarketOddsLiveBlock` to widget-sdk and watches support to widget-react.

  widget-sdk: `MarketOddsLiveBlock` interface (Phase, scores, MinuteLabel, IsSuspended, IsSettled, AsOfUtc, ClosedReason); `live` field on `MarketOddsCard` (null on pre-match cards, present on live cards); `WatchRef` type alias exported.

  widget-react: `WatchRef` type and `watches` option on `UseLiveMonitorOptions`; the poll loop fires when `watches.length > 0` even without user pins, passing watches alongside pins in each `getLiveMonitor` call; `liveCard` i18n keys (stale, suspended, noPrice, fullTime) in EN and TR; `MarketOddsVM.live` field mapped from the card payload.

## 0.43.0

### Minor Changes

- Onboarding presets, stage 1.

  - widget-sdk: `combo_card` stream event with `ComboCard`, `ComboLeg` and `ComboReplacedLeg`;
    optional `ChatInput.clientCapabilities`; `popup_ask_tap` widget event.
  - widget-react: sends `clientCapabilities: ["price_presets"]` on every chat request; draws the combo
    card (legs, prices, stats, the multiplication line, one Add to slip per leg, the server's replaced-leg note);
    a price tile's tap shows its ask as the user's bubble; the launcher bubble shows up to two price
    asks under its line.
  - widget-embed: rebuilt against the new widget-react and widget-sdk.

## 0.42.0

### Minor Changes

- Match odds card, stage 3: a price card the server sends for the market the user bets on carries `tag: "your_market"`, and the card shows a "Your market" / "İlgilendiğin bahis" label on its market line. A card with no tag or an unknown tag shows no label.

## 0.41.0

### Minor Changes

- `MarketOddsCard` gains an optional `insight` (`{ insightId, ruleId, text }`), the stat a price card draws above its rows, and the barrel exports its type, `MarketOddsCardInsight`. A server that sends no `insight` gives the card as before.

## 0.40.0

### Minor Changes

- Betting insight cards show only the fact sentence. The supporting stat rows, the "This league / All comps / H2H" scope tabs and the expand/collapse arrow are gone, and the full sentence is always visible. The market accordion no longer prefixes the fact with a "Value" tag. `BettingInsight.stats`, `BettingInsight.scopes` and the `BettingInsightStat` type are removed from the SDK, and the `showStats`, `hideStats` and `accordionValueLabel` UI strings are removed; the widget no longer emits `insight_expand`.

## 0.39.0

### Minor Changes

- Host events. `createWidgetHost()` and the `host` prop let an operator tell the widget when a slip selection is removed (`slipRemoved`), a bet is placed (`betPlaced`) and a match page is opened (`matchOpened`). `config.onOpenMatch` turns team names into links that call the operator with the match id. The "In slip" mark now belongs to the odd, so it survives closing the panel and shows on every button for that odd. New event names `slip_remove`, `bet_placed`, `match_view` and `match_open`; `match_view` is deferred and never starts a request of its own. `EventLogger.resume()` undoes `dispose()`, which stops events being dropped under React StrictMode in a development build.

## 0.38.0

### Minor Changes

- Live match facts on the pinned live match card: the `LiveMonitorFact` type and optional `facts` on `LiveMonitorMatch`, the fact block with its odds chip and "Ask about this", and chat grounding on a tapped fact.

## 0.37.0

### Minor Changes

- Slip events carry the pick: `slip_click` and `slip_result` now send `matchId`, `line` and `odds` from every add-to-slip call site, plus the raw `selection` label when the widget locale is English (a missing or unsupported locale counts as English). Other locales leave `selection` out because the server sends them localized labels ("2.5 Üst"); follow-up: add a raw label to the insight, odds-row and live-monitor payloads so every locale can send it. New entity-free launcher popup events (`popup_shown`, `popup_opened`, `popup_dismissed`). Dashboard tiles with `emphasis: "hero"` render as a full-width lead tile with both crests, a badge pill and the price; the badge and price text reach 4.5:1 contrast on light and dark panels, the price is announced as "Odds 1.85" in the widget language, and discovery tints skip the hero so the regular tiles keep their colour order. The live monitor no longer writes pins or polls again when a request finishes after the widget unmounts. The label-keyed `InsightMarketClicked` signal on add-to-slip is removed.
- Type changes in the event log exports: `WireEvent` is now a union of an entity event and a popup event, so an interface can no longer `extends WireEvent` (use an intersection type) and `WireEvent.entityType` is optional. `WidgetEventInput.name` is narrowed to `WidgetEntityEventName`, so a value typed as the wider `WidgetEventName` no longer fits it. `EventLogger.log` takes `WidgetLogInput`. New exports: `WidgetEntityEventName`, `WidgetPopupEventName`, `WidgetPopupEventInput`, `WidgetLogInput`, `GreetingDashboardTileEmphasis`.

## 0.36.0

### Minor Changes

- Games: send the widget language with game config, result and play requests so server-written game text (quiz questions, grid labels, stat names, hints) arrives in Turkish; Beat the Grid resolves row abbreviations and header icons from stable keys.

## 0.35.4

### Patch Changes

- Leaderboard: render a default state when the weekly board has no scores yet. Weekly boards reset each week, so the tab now shows a "new week, blank slate" panel (with a last-week champion strip when history exists) or a "be the first" cold-start panel, each with a CTA into the Games tab, instead of a blank screen. A configured weekly prize is shown when present. Adds optional `weeklyPrize` and `lastWeek` fields to `LeaderboardPayload` (backend populates them separately; absent = cold start).

## 0.35.3

### Patch Changes

- Show every scorer on the pinned live-match card, not just the latest goal. The composer was fetching the eight most-recent events of any type, so a late run of substitutions and bookings pushed earlier goals out of the window; it now fetches the match's goals (and red cards) in full, chronologically. The scorer strip renders home and away scorers in two columns with a ⚽ between, collapses a brace onto one line ("Powell 87', 90+6'"), and marks own goals "(OG)". Adds an `ownGoal` flag to `LiveMonitorEvent` and an `ownGoalLabel` string (EN "OG", TR "KK").

## 0.35.2

### Patch Changes

- 324f7eb: Injuries card: order columns by home/away (home left, away right).

## 0.35.1

### Patch Changes

- A suspended selection no longer appears in the market-odds ladder. The wire row now carries isSuspended, so the client can drop prices the bookmaker is not taking instead of offering an Add to slip button that always fails.

## 0.35.0

### Minor Changes

- Shows a half-time label instead of a frozen 45', ages the live minute against when the reading was
  actually taken so it no longer sits up to two minutes behind, and stops asserting a clock for a
  single match whose sync window has stalled.

## 0.34.0

### Minor Changes

- Fixes the Today tab collapsing to blank bars: children of the monitor scroller no longer shrink,
  so the list scrolls instead of compressing 27 competition groups to fit. Also disambiguates
  same-named competitions with their country, which the schedule response now carries.

## 0.33.0

### Minor Changes

- Adds a Today tab showing live and today's fixtures grouped by competition, and makes the tab
  strip content-driven: Chat, Today, Following and Odds each render only when they have something.
  The `tabMatches` UI string is renamed `tabFollowing`.

## 0.32.0

### Minor Changes

- Widget interest-event logging (u354): the widget now emits explicit interaction events — pin/unpin, add-to-slip (with outcome), "more insights" expand, and dashboard tile taps — batched to the operator gateway's `/v1/{op}/events` route for personalization. Best-effort in-memory delivery with a keepalive unload flush; no behavioural change to existing pin/slip/expand actions.

## 0.31.0

### Minor Changes

- Betting cards (insight, market-odds, odds-movement) now render a server-supplied `kickoffLabel`
  in the operator's timezone and language when present, falling back to browser-zone formatting of
  `kickoffUtc` for older servers.

## 0.30.1

### Patch Changes

- Greeting dashboard tiles can now carry an opaque `actionRef`: when the server binds a tile to a tool, a tap forwards the ref (resolved server-side, skipping the LLM planning turn) and `actionValue` stays as the fallback. Adds `actionRef` to `GreetingDashboardTile`; `MessageList` forwards it on tap when present.

## 0.30.0

### Minor Changes

- 8d25f74: Match odds accordion: pinned matches on the Matches tab now show a browsable accordion of every priced market instead of a single 1X2 card. Odds load lazily on expand and refresh live while open; each market surfaces its value insight. Adds `conversation.getMarketOdds` and `availableMarkets` on the live-monitor snapshot; removes the snapshot's `mainMarket`.

## 0.29.1

### Patch Changes

- Add `greetingIsLead` to the club-fan dashboard payload type (consumed by widget-react's preview lead).

## 0.29.0

### Minor Changes

- Live monitor's momentum block gets a localized "Momentum" title with the home/away pressure split (styled like the card's other stat rows), and its end-of-series marker is now an HTML overlay dot instead of an SVG `<circle>` -- the wave's `preserveAspectRatio="none"` scaling was stretching the circle into a squashed, half-clipped oval. `LiveMonitorMatch` gains an additive `momentumHomePct` field.

## 0.28.0

### Minor Changes

- Crest images on market-odds cards and restructured Odds-tab context line with pre-match kickoff pill layout.

## 0.27.0

### Minor Changes

- Live monitor tabs (u322): pin markets/matches from betting cards into Matches/Odds tabs with a batched live poll; pinEnabled flag on betting cards; monitor types + /live-monitor transport.

## 0.26.0

### Minor Changes

- 9d0b409: Replace the pre-match fixture card's W/D/L letter pills with a two-column "Team form" card: each of the last five results renders as a coloured scoreline card (subject crest, score, opponent crest), oriented by which side the team played on. `FixtureCardData.homeForm`/`awayForm` change from `string[]` to a new `FormMatch[]` shape (`result`, `teamScore`, `oppScore`, `teamIsHome`, `opponentCrestUrl`).

## 0.25.3

### Patch Changes

- 5ab3370: FixtureCard is now a plain DataCard on the wire (no actionLabel/actionRef/actionType/rank) — the server stopped issuing a match-preview binding for it now that the greeting chips own the compare-form/match-preview action (u318). No visual change; the type-only update keeps `@sensiblestats/widget-react` and `@sensiblestats/widget-embed` in lockstep with the SDK's contract.

## 0.25.2

### Patch Changes

- aed14de: Redesign the club post-match dashboard cards: result card now shows team crests and a big score, goals card shows per-goal icons, stats card renders split comparison bars oriented by venue, and top performer / next fixture cards get a player avatar and next-opponent teaser. Adds crest URLs and numeric stat fields to the widget-sdk post-match types backing these cards.

## 0.25.1

### Patch Changes

- 4eed68b: Fix the post-match "Match stats" card rendering each team's stats under the opposite team. The row values are club-first, but the card was always drawing the club value on the left while the result card above renders home-left/away-right — so when the club played away (e.g. Liverpool at Ipswich) the club's stats appeared under the home team. The card now orients by venue via a new `clubIsHome` field, matching the result card.

## 0.25.0

### Minor Changes

- f3f845c: Auto-transition the club fan dashboard from preMatch to live without a reload.

  Widget SDK: mirror the live dashboard's server contracts — `LiveScoreData` gains
  `minute`/`clockRunning`/crest URLs, `LiveEventLine` gains a typed `minute`/`type`/`side`
  (plus optional `player`/`playerOff`), `LiveStatRow` gains numeric `clubNum`/`oppNum`,
  and `LiveStatsData` gains a typed `momentum: MomentumPoint[]` series plus a
  `clubIsHome`/`homeName`/`awayName` venue signal (mirroring the existing `ClubIsHome`
  pattern on `RestingNextData`/`PostMatchNextData`).

  Widget React: adds a `useLiveClock` hook that ticks the displayed live minute forward
  once per real minute between 60s polls, so the clock doesn't look frozen. The tick is
  capped at minute+15 so a stuck `clockRunning:true` (no live→postMatch transition landed)
  holds instead of climbing past stoppage time.

  Widget React: redesigns the live score card — team crests (falling back to a coloured
  initials chip when a crest URL is missing or fails to load), a pulsing Live pill wired
  to the ticking clock, and a scorers line derived from the timeline's goal events.
  Introduces the shared `--ss-w-home`/`--ss-w-away`/`--ss-w-track` colour tokens the
  timeline and stats cards will also use.

  Widget React: redesigns the live events timeline into a compact two-sided view — each
  club's events sit on their own side of a centre spine, most-recent 3 shown with a "See
  more" toggle for the rest. Goals get a bold name and an accented minute badge, yellow/red
  cards get a coloured card mark, substitutions show both players, and unrecognised event
  types fall back to a neutral dot instead of breaking.

  Widget React: redesigns the live stats card — every row is now a home/away split bar
  (guarded against a 0/0 stat, which renders an even split rather than a NaN width) plus
  a new `MomentumWave` component that plots the per-minute momentum series as a filled
  area wave with a dashed baseline and a "now" dot, falling back to the plain-text
  momentum label when no series is available. Both the split bars and the wave now
  colour by VENUE (`--ss-w-home`/`--ss-w-away`, keyed off the new `clubIsHome` field) so
  the same team reads as the same colour across the score, timeline, and stats cards —
  club-positive momentum fills with the club's own venue colour rather than always
  painting the club as "home". The colour legend uses the real home/away team names.

  Widget React: the 60s live poll now refreshes the dashboard's greeting/lead line
  alongside its cards, so it no longer goes stale (e.g. reading "0–0" while the score
  card already shows "0–2"). A poll response without a greeting leaves the existing
  one in place rather than clearing it.

## 0.24.0

### Minor Changes

- Add live (in-play) club dashboard cards (score/clock, event timeline, live stats) that self-refresh by polling every 60s.

## 0.23.0

### Minor Changes

- 57112ca: Add resting (between-matches) club dashboard cards: next up, standings, season so far, recent form.

## 0.22.0

### Minor Changes

- 04c6e5b: Add post-match club dashboard cards (result, goals, stats, top performer, what's next); the three interactive cards tap through via actionRef.

## 0.21.0

### Minor Changes

- a1d4987: `ClubFanDashboardPrefillCard` now carries `actionRef`/`actionType`/`rank` instead of the prose `actionValue` — tapping a fan-dashboard card resolves a server-issued action binding instead of re-planning a client-supplied command string.

## 0.20.0

### Minor Changes

- 008d361: Render the club fan pre-match dashboard: fixture, countdown, injuries, reason-to-bet, where-to-watch, congested-week, transfers and links cards, with the fixture/congested-week cards tappable via the existing send path. Re-bundle widget-embed for the widget-react/widget-sdk changes.
- Club fan pre-match dashboard: render server-owned localized labels only (no widget-side i18n) and restructure the cards. The SDK contract now carries every visible string (date/venue/form labels, head-to-head labels, countdown unit labels, injury empty/return labels, link labels, self-contained injuries with team names/crests). Cards are reworked — countdown leads with a state-based clock, the fixture splits into fixture/last-five/head-to-head, injuries gains team-headed columns with a divider, link tiles are filled. Re-bundle widget-embed for the widget-react/widget-sdk changes.

## 0.19.0

### Minor Changes

- Remove club match-day dashboard renderers and SDK types. The server no longer emits the `clubDashboard` block; the corresponding widget renderers, CSS, and SDK type union are stripped in this forward bump.

## 0.18.0

### Minor Changes

- Match Preview card: deterministic matchPreviewCard block type (sdk) + renderer (react).

## 0.17.0

### Minor Changes

- Add `actionRef` to `ChatInput` and to the club-dashboard FixtureHero/fact-entry event types (`ctaActionRef`, `ClubDashboardFactEntry.actionRef`), replacing the prose `ctaActionValue` execution path with an opaque predefined-action-contract ref.

## 0.16.0

### Minor Changes

- Add per-fact grounding block entries to the chat input contract for fact-grounded club dashboard taps.

## 0.15.0

### Minor Changes

- 5fd5471: Add optional home/away crest, competition logo and kickoff fields to the betting insight payload.

## 0.14.0

### Minor Changes

- 399d6bf: Add `isMarketFloor` to `BettingInsight` — flags a card as a real market price shown because the value engine found no edge, not a value recommendation.

## 0.13.0

### Minor Changes

- Render the Club Match-Day dashboard (typed blocks: greeting header, fixture hero, form guide, match preview, team DNA, countdown) delivered on `turn_complete.clubDashboard`.

## 0.12.0

### Minor Changes

- Add `createNdjsonParser` / `NdjsonParser` to the public exports, and add greeting-dashboard types (`GreetingDashboard`, `GreetingDashboardTile`, `GreetingDashboardLayout`, `GreetingDashboardSpan`, `GreetingDashboardSignalRef`). `TurnCompleteEventData` gains an optional `dashboard` field carrying the greeting dashboard payload for the turn.

## 0.11.0

### Minor Changes

- Odds movement price chart card (SP4 widget half).

  - `widget-sdk`: `odds_movement` chat event — `OddsMovementCard`, `OddsMovementPoint`, `OddsMovementEventData`.
  - `widget-react`: renders the card — a time-proportional inline SVG price chart with bookmaker, direction badge, suspended state and excluded-observation disclosure.
  - `widget-embed`: re-bundles `widget-react`, so it ships the new card too.

## 0.10.0

### Minor Changes

- 3c93b88: Show odds movement on betting insight cards, using the same markup and neutral styling as market-odds rows.

  The movement markup moves into a shared component and its CSS classes are renamed from `ss-w-mo-move` / `ss-w-mo-prev` / `ss-w-mo-arrow` to `ss-w-move` / `ss-w-move-prev` / `ss-w-move-arrow`, since the same element is now rendered by both card types. Operator stylesheets targeting the old names need updating.

## 0.9.0

### Minor Changes

- Neutral odds price-movement display on market_odds card rows.

## 0.8.0

### Minor Changes

- Entity cards now show the season and per-competition scope chips. `EntityCard`
  drops the flat `stats` field in favor of `seasonName` + `scopes` (`All` aggregate
  plus one scope per competition, each with an optional logo); the widget renders a
  season label and, for 2+ competitions, a chip row that switches the stat set
  client-side. `widget-embed` re-bundles `widget-react`, so it is republished too.

## 0.7.0

### Minor Changes

- 8af5152: Add market_odds event types (MarketOddsCard, MarketOddsRow) for the new odds-only card.

## 0.6.0

### Minor Changes

- Add to slip on betting insight cards.

  The operator supplies an `onAddToSlip` callback; the widget hands it one selection
  keyed by `matchOddsId` (the operator's own odds-row id) and maps the callback's
  typed result to a localized (en/tr) toast. Two server fields drive it:
  `odds.matchOddsId` and the per-operator gate `addToSlipEnabled` — the button
  renders only when the gate is true, a handler is supplied, and the insight carries
  a usable odds id. The widget never touches stake, balance, or bet placement.

  - **widget-sdk:** add `SlipSelection`, `AddToSlipResult`, `AddToSlipRejectReason`,
    and the `isAddToSlipResult` runtime guard; extend `BettingInsight` with
    `addToSlipEnabled` and `odds.matchOddsId`.
  - **widget-react:** add `AddToSlipButton` and `Toast`, the `slip.ts` result→toast
    mapping (which honours `price_changed.accepted`), en/tr copy, `conversationId`
    capture on `turn_complete`, and the `onAddToSlip` config entry. Malformed
    results, throws, and a 10s timeout all fail closed to a retryable button.
  - **widget-embed:** re-bundles widget-react, so it is republished. Add-to-slip is
    not exposed to script-tag hosts, because a callback cannot be expressed in a
    `data-*` attribute.

  This shipped to master in `dd2da0e1` (#248) but never reached npm, because the
  version was not bumped in the merged commit and the release workflow's
  `--tolerate-republish` therefore skipped every package.

## 0.5.0

### Minor Changes

- Show competition name on betting insight cards. This shipped to master in
  `6d629e6b` but never reached npm because the version wasn't bumped, so the
  release workflow's `--tolerate-republish` skipped every package. This changeset
  bumps all three so the change actually publishes (widget-embed re-bundles
  widget-react, so it must be republished too).

## 0.4.0

### Minor Changes

- Redesigned betting-insight card with scoped supporting stats.

  - **widget-sdk:** extend `BettingInsight` with `homeTeamName`, `awayTeamName`, and `scopes` (`{ key, label, stats }[]`), so consumers can type the fixture line and the per-scope stat sets (this league / all competitions / head-to-head) the server now streams.
  - **widget-react:** rebuild the betting card around the new payload — a phase-aware live/pre-match status line with the fixture, a promoted market with clearly labeled odds (and an optional bookmaker name), and scope chips that switch the supporting stats in place (shown only when ≥2 scopes are present, otherwise flat stat rows with a "show more" expander). The responsible-gambling disclaimer always renders. Type scale and spacing match the surrounding chat cards.
  - **widget-embed:** rebuild against `@sensiblestats/widget-react` so the hosted embed renders the redesigned card.

## 0.3.0

### Minor Changes

- Add the `betting_insight` chat event to the `ChatEvent` union and export the `BettingInsight`, `BettingInsightOdds`, and `BettingInsightStat` types, so consumers can type and render betting-insight events (market, selection, odds, supporting stats). The wire payload was already streamed; this makes it a first-class part of the SDK's event model.

## 0.2.0

### Minor Changes

- 5857cb0: Add `imagePath`, `subtitle`, and `stats` (`EntityCardStat[]`) to the `EntityCard` type and export `EntityCardStat`, so consumers can render enriched entity cards (image, subtitle, and season stats).

## 0.1.0

### Minor Changes

- 61c6ba1: Initial release of the headless widget SDK: typed streaming chat (async-iterator + callbacks), stateful Conversation helper, personalization signals, and a typed error model.
