<goma-sports-navigation-dialog>
Self-contained sport-picker dialog: a trigger pill that, on tap, opens a modal grid of sport tiles with an optional search input. Sister widget to goma-sports-navigation-horizontal: same data sources (prop / rpc / subscribe), same selection state, same goma:sport-select event, just rendered as a popover dialog instead of a horizontal swiper. Designed primarily for mobile layouts where the horizontal strip wouldn't fit, but the contract is identical so the two widgets are interchangeable wherever a single-selection sports picker is needed.
Live demo
Open in the playground →: toggle Sports navigation (dialog) in the widget rail, then tap the trigger pill on the stage to open the modal. The playground's mock source (a fourth option layered on top of the widget's own prop / rpc / subscribe for demo purposes) drifts live-count badges on a 4-second cadence so you can verify the dialog stays responsive while open.
Element tag
html
<goma-sports-navigation-dialog></goma-sports-navigation-dialog>Installation
@gomagaming/sports-navigation-dialog is a scoped private package. See Installation for the one-time .npmrc setup required to consume it.
bash
npm install @gomagaming/sports-navigation-dialogYou also need the shared peer dependencies installed at your app level:
bash
npm install vue pinia vue-router vue-i18n @vueuse/core autobahn-browservue, pinia, vue-router, vue-i18n, @vueuse/core, and autobahn-browser are declared as peerDependencies so a consumer with multiple @gomagaming/* widgets gets exactly one copy of each.
Configuration
js
const el = document.getElementById('snd')
el.config = {
socketUrl: 'wss://api-ndwstage.everymatrix.com/v2',
socketRealm: 'www.yes.dk',
apiBaseUrl: 'https://api-ndwstage.everymatrix.com',
bettingApiBaseUrl: 'https://sports-api.example.com',
ucsOperatorId: '2838',
locale: 'en',
}The shape is identical to the horizontal sibling: see its config table. All keys are optional in prop mode (no socket is opened).
Data sources
The dataSource property selects where the sport list comes from: defaults to 'prop', and the default sports list is [], so an unconfigured widget renders an empty grid until the host feeds data (via el.sports, or by switching to 'rpc' / 'subscribe'). Every example on this page sets sports explicitly or switches to 'subscribe' with a real socket config for this reason. The mechanism is shared with the horizontal widget via the same useSportsSource composable.
| Mode | Behaviour |
|---|---|
'prop' (default) | Host feeds el.sports = […]. No socket. |
'rpc' | One-shot $wcall on connect populates the list once. |
'subscribe' | Live WAMP subscription streams updates as games go live. |
See Sports Navigation Horizontal § Data sources for the full breakdown of liveStatus mappings, RPC method names, and subscription topic URLs.
Props / attributes
Inherited from the shared sports-picker contract (identical to the horizontal sibling):
| Property | Attribute | Default | Description |
|---|---|---|---|
dataSource | data-source | 'prop' | 'prop' / 'rpc' / 'subscribe'. |
liveStatus | live-status | 'LIVE' | 'LIVE' / 'NOT_LIVE' / 'BOTH'. |
sports | sports | [] | Array of GomaSport. |
selectedSportId | selected-sport-id | null | Currently selected sport id. Two-way. |
showLabels | show-labels | true | Render the sport name under each tile icon. |
showLiveCount | show-live-count | true | Render the live-event count badge on each sport tile. Set false to hide it. |
skeletonCount | skeleton-count | 12 | Placeholder tile count until the first non-empty sports assignment. |
Dialog-specific knobs:
| Property | Attribute | Default | Description |
|---|---|---|---|
open | open | false | Programmatic open/close. Two-way: tapping the trigger flips it to true; selecting a sport flips it back to false. |
showSearch | show-search | true | Render the search input inside the modal. Set false to hide. |
showTrigger | show-trigger | true | Render the built-in trigger pill. Set false when the dialog is opened externally (host control or the goma:sports-dialog-open event). |
showBackButton | show-back-button | false | Show a Back button (header left) that emits goma:dialog-back and closes: for returning to a previous view. |
showApplyButton | show-apply-button | false | Show an Apply footer. When on, tapping a tile only highlights it (no auto-close); Apply commits the highlighted sport (goma:sport-select) and closes. |
gridColumns | grid-columns | 0 | Force a fixed column count; 0 = auto (currently 4). |
mobileBreakpoint | mobile-breakpoint | 'sm' | Viewport width below which the dialog renders as a bottom-sheet (full-width, anchored to viewport bottom, slide-up animation) instead of a centred modal. Accepts a Tailwind token ('sm' 640 / 'md' 768 / 'lg' 1024 / 'xl' 1280 / '2xl' 1536) or a raw pixel value (number 480 or string '480px'). |
spaceBetween from the horizontal sibling is not applicable here: the grid uses CSS gap from the panel layout.
Bottom-sheet vs centred modal
Below mobileBreakpoint the panel renders as a bottom-sheet: full-width, anchored to the viewport bottom, rounded only at the top, with a small drag-handle pill above the header (purely visual, the sheet isn't draggable yet) and a slide-up entry/exit. At or above the breakpoint, the panel is a classic centred modal with rounded corners on all sides and a scale + fade entry/exit. The transition is live: resizing the viewport across the breakpoint while the dialog is open swaps the layout without re-mounting.
GomaSport shape
Identical to the horizontal sibling: see GomaSport.
Behavior
The widget renders only the trigger pill in its closed state: its host element shrinks to that footprint. Tapping the pill opens the modal.
Open / close
- Tapping the trigger pill sets
el.open = trueand opens the modal. - Selecting a sport tile dispatches
goma:sport-select, mutatesstate.selectedSportId, and auto-closes the dialog (unlessshowApplyButtonis on, see below). - Tapping the Cancel button (top-right), tapping the backdrop, or pressing Escape closes the dialog.
- Hosts can drive open/close programmatically:
el.open = true/el.open = false. Each transition emitsgoma:dialog-open/goma:dialog-close.
Sort order
Live-first partition: same as the horizontal widget. Sports with numberOfLiveEvents > 0 float to the top, sorted by live count desc; the rest preserve original order.
Search
When showSearch is true (default), the modal renders an input with a magnifying-glass icon and a localised placeholder (sports_navigation_dialog_search_placeholder). The query filters the sport list by case-insensitive substring against sport.name. An empty match shows a localised "no results" message (sports_navigation_dialog_no_results). The search query resets every time the dialog reopens.
Trigger pill customisation
The trigger pill is rendered inside the widget's Shadow DOM, so it is not stylable from the outer document. All customisation flows through the public surface: CSS variables for visuals, message overrides for text, and the selectedSportId property for the icon and announced selection.
Visual
The pill displays the selected sport's icon and name on an accent-coloured background; it is rounded on the right only. Before a sport is selected it shows a placeholder label instead of a name, and long sport names truncate with an ellipsis to keep the pill compact. Driven by --goma-highlightPrimary (pill background + focus ring) and --goma-highlightPrimaryContrast (icon glyph + name text): see Theming below.
Text / accessibility
The pill's aria-label is built from sports_navigation_dialog_title plus the currently-selected sport name. Override the base label per locale via config.messages:
js
el.config = {
/* … */
messages: {
en: { sports_navigation_dialog_title: 'Pick a sport' },
fr: { sports_navigation_dialog_title: 'Choisir un sport' },
},
}
// → aria-label="Pick a sport: Football" once a sport is selected.The pill's icon and name come from the currently selected sport: feed sports and selectedSportId to control which sport appears. The icon resolves from the selected sport's iconId. Until a sport is selected (e.g. while the sport list is still loading in rpc/subscribe mode) the pill shows the noicon glyph with a placeholder label (sports_navigation_dialog_placeholder, default Sport) so it is never empty. A sport whose iconId has no artwork in the bundled set falls back to its family's glyph. An e-sports category draws the e-sports icon. On the pill and on the tiles alike, with the neutral noicon glyph as the last resort when the list names no family. Neither ever shows the browser's broken-image glyph. In the WAMP modes the family is looked up across the whole sport list the feed sent, not only the sports currently on screen: a parent category carries no events of its own, so it is routinely absent from the live slice, and the stand-in would otherwise degrade to the neutral glyph for every child. Your own artwork is asked for first either way: ${iconBaseUrl}/icons/… when a base URL is set, the origin-relative /icons/… when it is not, and a fallback appears only once that request has failed.
Hide the search bar with a single switch
js
el.showSearch = false // hides the search input on every open
el.setAttribute('show-search', 'false') // attribute equivalentThe placeholder defaults to Search sports... (and the localised equivalents in fr / pt). Override it per locale via config.messages: the same string also feeds the input's sr-only <label>, so both move together:
js
el.config = {
/* … */
messages: {
en: { sports_navigation_dialog_search_placeholder: 'Find a sport…' },
fr: { sports_navigation_dialog_search_placeholder: 'Trouver un sport…' },
pt: { sports_navigation_dialog_search_placeholder: 'Encontrar um desporto…' },
},
}Events
| Status | Event | Detail | Emitted when |
|---|---|---|---|
| Canonical | ready | {} | Widget mounted, initial render done. |
| Canonical | goma:sport-select | { sportId, sportName, sportIconId, previousSportId } | User tapped (or activated via Enter/Space) a sport tile, or the host set selectedSportId: never on mount, and never when re-assigned the value already held (re-tapping the active tile still closes the dialog, it just announces nothing). In showApplyButton mode the selection is PENDING: tapping only highlights, and the event is emitted when Apply is pressed, reporting the sport the dialog opened on as previousSportId. See Driving a selection from the host. |
| Canonical | goma:dialog-open | {} | state.open transitioned from false → true. |
| Canonical | goma:dialog-close | {} | state.open transitioned from true → false. |
| Canonical | goma:dialog-back | {} | The Back button (showBackButton) was pressed; the dialog closes. |
| Canonical | goma:retry | {} | The error banner's Retry button is pressed. |
| Canonical | goma:error | { message, code, component? } | Two paths. Connection layer: the WAMP adapter exhausts its 5 retry attempts (code: 'API_INIT_ERROR'), alongside goma:connection { state: 'failed' }. Widget root scope: an error raised in the widget's own outermost component (its setup, its render, its lifecycle hooks or its watchers), where code is the error's name, e.g. 'TypeError' ('RUNTIME_ERROR' when it has none). Errors raised inside the widget's child components do not reach this event: the in-shadow error boundary catches those and shows the retry banner instead, emitting only goma:retry. |
goma:sport-select is bubbles + composed, so it crosses the shadow-DOM boundary and is observable from a window.addEventListener('goma:sport-select', …) listener: the dialog and the horizontal picker are drop-in interchangeable for any consumer wiring that expected the horizontal picker (e.g. <goma-events-horizontal>'s followSportPicker rewiring keeps working).
Opening via an event. Any control on the page can open the dialog by dispatching a composed goma:sports-dialog-open event: window.dispatchEvent(new CustomEvent('goma:sports-dialog-open', { bubbles: true, composed: true })). Paired with showTrigger: false, this lets another widget (e.g. <goma-filters-settings>'s "Filters applied to:" card) act as the trigger.
Integrates with
Emits goma:sport-select (the same payload shape as <goma-sports-navigation-horizontal>) so any downstream widget with a followSportPicker prop (e.g. <goma-events-horizontal>, <goma-region-filter>, <goma-competitions-list>) re-scopes when either sports picker is on the page; the two are interchangeable from a listener's point of view.
Listens for a goma:sports-dialog-open command on window: a composed event no shipped widget currently dispatches on its own. It's the documented open hook for a host-driven trigger (e.g. <goma-filters-settings>'s "Filters applied to:" row) that wants to reuse this widget's picker UI with showTrigger: false instead of building its own.
This widget writes no shared-storage envelope (goma:betslip:v4, goma:favorites:v1, etc.): selection state lives only in state.selectedSportId and the goma:sport-select event. See Cross-widget wiring and Shared state for the full contracts.
Empty / loading / error states
| State | Trigger | Render |
|---|---|---|
| Skeleton | First open before the host has fed sports | Pulsing placeholder circles (count = skeletonCount). Gated once hasReceivedData flips true it never reverts, even if sports is later reassigned to []. |
| Empty | Host fed sports = [] after at least one assignment | Localised sports_navigation_empty message. |
| No results | Search query has no match | Localised sports_navigation_dialog_no_results message. |
| Render error | An error is thrown while rendering (or state._forceError is set) | An inline error banner with a Retry button (retry) that clears the error and emits goma:retry; auto-clears after 8 seconds if not dismissed. |
Theming
Override CSS variables via el.theme = { … }: the prefix --goma- is added automatically.
js
el.theme = {
// The dialog is a popover, so its host element should usually be transparent.
// Override backgroundPrimary if you want a backdrop band behind the trigger pill.
backgroundPrimary: 'transparent',
// Modal panel background: decoupled from backgroundPrimary so consumers can
// paint a transparent host while keeping the modal opaque.
dialogBackground: '#03061b',
// Selected-tile ring + pill/Apply-button accent
highlightPrimary: '#ff6600',
// Live-count badge
liveCountBackground: '#ed4f63',
liveCountText: '#ffffff',
textPrimary: '#ffffff',
textSecondary: '#939dff',
}Tokens used by this widget
| Token | Element |
|---|---|
--goma-backgroundPrimary | Host element background (consumers usually set this to transparent for popover usage). |
--goma-dialogBackground | Modal panel background. Specific to this widget: defaults to #03061b in main.css. |
--goma-backgroundCards | Unselected sport-tile circle background; search-input background; skeleton placeholders. |
--goma-highlightPrimary | Selected-tile ring; trigger-pill and Apply-button background; Back/Cancel button text. |
--goma-highlightPrimaryContrast | Trigger-pill icon + name text, Apply-button text, and the error-banner Retry-button text. |
--goma-textPrimary | Title, selected label, body text. |
--goma-textSecondary | Unselected labels; placeholder text. |
--goma-separatorLine | Panel border, search-input border. |
--goma-liveCountBackground | Live-count badge background. |
--goma-liveCountText | Live-count badge text. |
--goma-alertError | Render-error banner background. |
--goma-iconPrimary | Declared on this widget's token surface, but not currently wired to anything: SportItem.vue renders its <sb-icon> with no color class or style applied, so the token has no path to the SVG. (The mechanism itself works elsewhere: the bundled sport SVGs use fill="currentColor", and e.g. <goma-suggested-bet> recolors an <sb-icon> via a text-iconPrimary wrapper class, this widget's own markup just never opts in.) Setting this token has no observable effect today. |
See the Theming guide for the complete token reference.
i18n / message overrides
| Key | Default (en) | Used in |
|---|---|---|
sports_navigation_dialog_title | Sports available | Modal header title; base of the trigger pill's aria-label |
sports_navigation_dialog_placeholder | Sport | Trigger-pill label shown when no sport is selected yet |
sports_navigation_dialog_search_placeholder | Search sports... | Search input placeholder + associated <label> |
sports_navigation_dialog_no_results | No sports match your search | Empty-search-result message |
sports_navigation_aria | Sports navigation | Grid aria-label (shared with horizontal) |
sports_navigation_empty | No sports available | Empty-list message (shared with horizontal) |
back | Back | Header Back button (showBackButton) |
cancel | Cancel | Header dismiss button (top-right) |
apply | Apply | Apply-footer button (showApplyButton) |
retry | Retry | Error-banner button |
Override with config.messages:
js
el.config = {
/* … */
messages: {
en: { sports_navigation_dialog_title: 'Pick a sport' },
fr: { sports_navigation_dialog_title: 'Choisir un sport' },
},
}Embedding examples
Vanilla HTML
html
<goma-sports-navigation-dialog id="snd"></goma-sports-navigation-dialog>
<script type="module">
import '@gomagaming/sports-navigation-dialog'
const el = document.getElementById('snd')
el.dataSource = 'subscribe'
el.liveStatus = 'LIVE'
el.config = {
socketUrl: 'wss://example.com/v2',
socketRealm: 'www.example.com',
apiBaseUrl: 'https://api.example.com',
bettingApiBaseUrl: 'https://sports-api.example.com',
ucsOperatorId: '2838',
locale: 'en',
}
el.addEventListener('goma:sport-select', (e) => {
console.log('Selected:', e.detail.sportName, e.detail.sportId)
})
</script>React
jsx
import '@gomagaming/sports-navigation-dialog'
import { useEffect, useRef } from 'react'
function SportsPicker({ config }) {
const ref = useRef(null)
useEffect(() => {
if (!ref.current) return
ref.current.dataSource = 'subscribe'
ref.current.liveStatus = 'LIVE'
ref.current.config = config
}, [config])
return (
<goma-sports-navigation-dialog
ref={ref}
onGoma:sport-select={(e) => console.log(e.detail)}
/>
)
}Vue 3
vue
<script setup>
import '@gomagaming/sports-navigation-dialog'
import { ref, onMounted } from 'vue'
const el = ref(null)
const props = defineProps(['config'])
onMounted(() => {
el.value.dataSource = 'subscribe'
el.value.liveStatus = 'LIVE'
el.value.config = props.config
})
</script>
<template>
<goma-sports-navigation-dialog
ref="el"
@goma:sport-select="(e) => console.log(e.detail)"
/>
</template>Prop mode (no backend)
js
el.dataSource = 'prop'
el.sports = await fetch('/api/my-sports').then(r => r.json())
el.selectedSportId = '3'Accessibility
| Element | Role | Attributes |
|---|---|---|
| Trigger pill | button | aria-haspopup="dialog", aria-expanded, aria-label (announces current selection) |
| Modal panel | native <dialog> | aria-labelledby → title id; inert while closed (removed just before showModal()): showModal() supplies modal semantics natively, no explicit aria-modal attribute is authored |
| Sport tile | tab | tabindex="0", aria-selected, aria-label="{name}" |
| Live-count badge | - | aria-label="N live event(s)" |
| Search input | - | associated sr-only <label> whose text matches the placeholder |
Keyboard: Tab cycles focus inside the modal; Shift+Tab cycles backward; Escape closes; Enter/Space activates the focused tile. Focus returns to the trigger pill on close.
Focus trap: provided by the browser. The widget uses a native <dialog> opened via showModal(), which puts the dialog into the browser's top layer and traps Tab/Shift+Tab inside automatically. The inert attribute on the dialog wrapper keeps its descendants out of the tab order while the dialog is closed.
iOS Safari notes
An early prototype tried <div role="dialog"> with user-space sentinels, a custom focus-trap, and a host-elevation workaround to handle iOS Safari's quirks around shadow-rooted overlays. This widget shipped with a different architecture, native <dialog> + showModal(), which lets the browser's top layer escape those quirks. The table below maps each iOS-specific symptom to its current solution:
| Symptom on iOS | Solution in this widget |
|---|---|
| Inputs under 16 px trigger an auto-zoom | Search input has inline font-size: 16px. |
Native <dialog> focus-trap leaks when used as a styled box in light DOM | The dialog opens via showModal() into the browser's top layer: the trap is browser-managed, not user-space, and works because the dialog tree is no longer anchored to the host's stacking context. |
showModal() doesn't scroll-lock the page on iOS | useScrollLock from @gomagaming/core applied on every open (and released on close/unmount). |
Shadow-rooted z-index doesn't always cover sibling widgets | Native <dialog> top layer escapes every ancestor stacking context: the dialog paints above sibling widgets without any host-elevation workaround. |
| Keyboard focus tracking edge cases | Browser-managed focus trap inside the top-layer dialog handles these: no custom keydown tracking needed. |
| Layout flex/grid quirks on the dialog/panel root | The dialog itself is a transparent full-viewport stage (display: grid; place-items: center) and the visible panel uses flex flex-col: layout lives on inner wrappers, not on the panel root. |
What's deferred
The mobile bottom-sheet's drag-handle pill is currently decorative only: the sheet is not swipe-to-dismiss draggable yet; closing on mobile still requires tapping Cancel, the backdrop, or Escape.
Integration Caveats
SSR/webview: importing this package outside a browser previously threw immediately; fixed with a guard on the shared element factory.
Tokens/Theming: the docs previously claimed
--goma-iconPrimarydrives icon color via<sb-icon>here, which is now corrected. This widget's ownSportItem.vuenever applies a color class to its<sb-icon>usage, so the token has no effect in this widget specifically. (The mechanism itself works: bundled sport SVGs usefill="currentColor", and other widgets, e.g.<goma-suggested-bet>, do recolor an<sb-icon>this way.) The render-error banner's--goma-alertErrortoken is now listed in the Theming table above.Initialization: this widget shares
@gomagaming/core's i18n singleton with every other widget on the page; mounting two widgets with differentlocalevalues on one page is not currently isolated per instance (a known constraint, not fixed in this pass).Configuring before the definition loads. Assigning
config(or any property) while the element is still an unknown element is safe: the value is replayed through the widget when it upgrades. That matters when loading from the CDN, whose loader imports widget modules asynchronously, so your script usually runs first. On release sets at 0.34.0 and earlier the value was silently discarded and the widget mounted with no configuration and a clean console: there, awaitwindow.__gomaCdn.readyfirst, or configure through attributes. See Setting a property before the widget's definition has loaded.
See Integration Caveats for the cross-widget picture.
Changelog
Current release: 0.37.11. Every GomaPulse package shares one version number and they are published together, so a release that changes nothing here still bumps this widget. Only the releases that changed it are listed below.
Every release that changed this widget, newest first. The latest is open; the rest expand.
0.37.1
- A sports picker set to
liveStatus: 'NOT_LIVE'(sports navigation horizontal and dialog, filters settings) no longer lists sports that only have live events. The full sports list the widget loads on connect could land after the widget's own pre-live list and mark every sport as pre-live; it now carries no such mark, so the pre-live list stays as the source sent it, inrpcandsubscribemodes. Pickers set to'LIVE'or'BOTH'are unchanged, and sports outside the pre-live list still get their names and icons.
0.36.1
Playground manifests (
@gomagaming/<widget>/playground) now offer a control for every setting each widget really has. Settings that cannot be a form field (raw provider data, read-only state mirrors, props a widget never reads) are recorded with a reason in the repo instead of being silently missing.Controls that never reached the widget are fixed:
- The betslips'
placeBetHeadersJson/placeBetBodyJson/quickAddAmountsJsonare nowplaceBetHeaders/placeBetBody/quickAddAmounts. - The time-filter and filters-settings ticks editors set
ticks. - live-chat's layout control writes
position, the config key the element reads. - The sports-navigation widgets drop the unread
sportsJson. - JSON-typed defaults are real objects and arrays instead of serialized strings. The top-competitions
highlightedImagesstring default was indexed character by character and requested bad image URLs on every load. The missions-hubemptyStateImagesillustrations now show.
No widget runtime behaviour changes.
- The betslips'
0.35.0
Every picker now announces a host-driven selection, not just a tap
Setting a picker's selection from the page (
el.selectedSportId = '8'for a menu entry, a deep link, state restored after a refresh) used to change the highlighted item silently, because the event was emitted from inside the click handler. Anything wired up with afollow*prop kept its previous filter, so the highlighted pill and the data underneath it disagreed. The only workaround was to forge the widget's own event onwindow, which breaks as soon as a*Selectorprop is set.All seven pickers now emit from a watcher on the selection itself, so a tap, an internal reset and a host write are indistinguishable:
<goma-region-filter>,<goma-top-competitions>,<goma-top-competitions-pills>,<goma-competitions-list>,<goma-competition-filter>,<goma-sports-navigation-horizontal>and<goma-sports-navigation-dialog>.@gomagaming/coregains the shareduseSelectionEmitcomposable they all use, so a picker added later inherits the behaviour rather than reimplementing it.Three rules hold across all of them. Nothing is emitted on mount, so a value seeded from markup (
<goma-region-filter selected-region-id="19">) opens on that scope without firing the chain during boot. Re-assigning the value already held emits nothing. And ids are the contract while names are best-effort: a selection applied before the widget's list has loaded still emits immediately with the right id andnulldescriptors, so deep links never have to wait for data.Two deliberate exceptions:
<goma-competitions-list>stays silent when the selection is CLEARED, since closing its drill-in detail has its own event and an empty selection would scope a following feed to nothing; and<goma-sports-navigation-dialog>inshowApplyButtonmode treats the selection as pending, emitting when Apply is pressed.Two behaviour changes come with the single emit point. Re-tapping the item already active no longer emits (it is not a change): in the dialog that still closes it, it just announces nothing. And
<goma-top-competitions>'sisFeaturedis now derived fromhighlightedImagesand the active variant rather than passed in from the tap, so a host write reports it as truthfully as a click.<goma-top-competitions-pills>also gainsresetCompetitionOnSportChange(defaulttrue), matchingresetRegionOnSportChangeon<goma-region-filter>: it clears the selection on asportIdchange, and with it on no write order lets one navigation action set a sport and a competition together.A sport with no bundled icon now falls back to a real glyph instead of the browser's broken-image icon.
SbIconresolves a bundled SVG by name and otherwise falls through to an<img>. For a sport id the feed ships before its artwork exists (e-Volleyball, in the sports carousel and in the "Sports available" list) that<img>404s, and the old error handler only faded it toopacity: 0.2, which leaves the broken-image glyph on screen at 20%. A failed<img>is now dropped from the render instead.What stands in is the sport's family glyph: every e-sports category falls back to the e-sports icon, which is a real icon rather than "no icon". The family is read from the sport list the widget was already fed (the parent whose
childrenIdsnames the category) so no id list has to be kept in step with the provider, and a flat feed that names no parent simply falls back to the neutralnoiconglyph as before. The newsportIconNameshelper in@gomagaming/coreis what the sport tiles, the picker's trigger pill and the settings modal's sport row all resolve through.A host serving its own sport artwork keeps priority, and keeps it whether or not it configured a base URL:
${iconBaseUrl}/icons/sports/dark_mode/{iconId}.svgwhen one is set, and the origin-relative/icons/sports/dark_mode/{iconId}.svgwhen it is not.iconBaseUrlhas no value that means "my own root" (''and'/'both read as unset), so a host serving icons from its root keeps working with no configuration at all. A stand-in is considered only once that request has failed.Every widget that draws a sport glyph through
SbIconinherits the change, which is why they are all listed here: the two sports pickers, the settings modal, both top-competitions widgets, the sport banners, the game-details header, the suggested-bet legs, the My Bets cards, the two betslips that embed them, the highlight card and the Pros' Choice card.The family is looked up across the whole sport list the feed sent rather than the slice on screen. In
rpc/subscribemodeuseSportsSourcemirrors the betting store filtered to the current context (LIVE vs popular), and a parent category carries no events of its own, so it is routinely missing from that slice: every e-sports child would have fallen back to the neutral glyph. The unfiltered list is mirrored alongside it asstate.sportsCatalog, andsportIconLookupList(new in@gomagaming/core) is what the tiles, the trigger pill and the settings row read.mapSportalso refresheschildrenIdson an existing entry: the list was written only when the entry was first created, so a family relation that arrived on a later dump, or a child added to one. Never reached the widget.<goma-sports-navigation-dialog>: the "Sports available" sheet's search box now reads Search sports... instead of Filter by country.... The input filters the sport tiles by name (it has never filtered by country) so the old placeholder described a filter the widget does not have. Thefrandptlocales are corrected alongsideen(Rechercher un sport.../Procurar desporto...).The string lives in
@gomagaming/core's locale bundles undersports_navigation_dialog_search_placeholder, and the dialog reuses it for the input'ssr-only<label>, so the accessible name moves with the visible placeholder. Hosts that already overrode the key viaconfig.messagesare unaffected.The same wrong-entity caption survived in French on two more keys:
competitions_filter_search_placeholderread Filtrer par pays... andsearch_field_competitionsFiltrez par pays..., whereenandptname a competition in both. Both are orphaned today (no widget references them), so nothing rendered them; they are corrected here so the next widget to adopt one does not ship the bug again. The test is keyed to the competition-captioned family rather than to a single key, so a third instance cannot hide behind a guard that only watches the one someone noticed.
0.34.0
Stop a region list fetched for the wrong sport from overwriting the right one, and parse numeric strings assigned to numeric widget properties instead of silently replacing them with the widget's default
A
<goma-region-filter>configured for any sport other than Football issued two location requests instead of one: its own, correctly scoped to the configured sport, and a second one (scoped to Football) that nothing had asked for. Both wrote the same place, so the pills the widget rendered were whichever response happened to come back last. The same race reached<goma-competitions-list>, which groups its competitions by the same region data.The unrequested request came from the per-widget boot routine, which fetched locations with no sport at all and so fell back to sport
1. Locations are scoped to a sport on the server, and boot has no sport to scope them by, so it no longer fetches them: the only readers of that data are the widgets above, and each of them already fetches it for the sport it is showing.That removes the collision at its source. As a second line of defence, a locations payload now records which sport it was fetched for, and a widget ignores one belonging to a sport it is not showing. This matters whenever two scoped fetches can overlap (switching sport while a request is still in flight, for instance) and it is deliberately narrow: a payload with no recorded sport is still rendered, so the guard can only ever suppress data it can positively identify as belonging to somewhere else.
Separately, every numeric property on every widget (
sportId,skeletonCount,pageSize,spaceBetween,autoplayIntervaland the rest) used to accept a JavaScript number and nothing else. A numeric string was not parsed; it was discarded and quietly replaced by the property's default value.el.sportId = '8'therefore left the widget on sport1and fetched the wrong data, with nothing logged to say so. Three ordinary integration paths hand over a string: a router parameter, a value read out of a CMS or JSON configuration, and a framework re-render that stringifies its props. Numeric strings are now parsed. Values that are not a finite number and not a numeric string (null,undefined,'', booleans, objects,NaN,Infinity) still fall back to the default, as before. HTML attributes (sport-id="8") and theconfigobject were never affected by this and are unchanged.
0.32.0
Widgets no longer dispatch a bare
errorevent alongsidegoma:error.Every factory-built widget's app-level Vue error handler dispatched two events for the same failure:
goma:error, and an un-namespacederror. The bare one is gone;goma:erroris unchanged and still carries the same{ message, code, component? }detail.Like every GomaPulse event it was
composedand bubbling, so it did not stop at the widget. It crossed the shadow root, crossed the document, and arrived at whatever the host had onwindow.addEventListener('error', …): as aCustomEventwithmessage,errorandfilenameallundefined, since those areErrorEventfields aCustomEventdoes not have. A host with error reporting installed received a malformed error record it could neither read nor attribute.That had been written off as harmless on the grounds that the handler behind it could never fire. It can. Vue begins its
errorCapturedwalk at the throwing component's parent, so theonErrorCapturedboundary each widget installs in its own root component cannot see that component's own errors, and being the root, there is nothing above it to catch them either. Anything raised in a widget's root scope (its setup, its render, its lifecycle hooks, its watchers) skips the boundary and reaches the app-level handler every time. Only errors from child components are caught by the boundary, which is what it is for: those show the in-shadow banner and emitgoma:retry.Hosts listening for
goma:errorneed no change. A host listening for bareerroron a widget element should move togoma:error; it was documented as unreachable, so in practice it delivered nothing until now.
0.26.0
Stop publishing source maps and package source.
dist/*.js.mapwas emitted by the shared Vite preset and swept into every tarball byfiles: ["dist/", "src/"], with the original source inlined insourcesContent.src/shipped the same source again, in the clear. Both are one URL away from a browser once a package is served from a CDN, so the preset now builds withsourcemap: falseandfilesno longer carriessrc/.@gomagaming/corekeeps the two paths its export map actually points at:src/styles/main.cssandsrc/types/index.d.ts. Its tarball drops from 1741 files to 576, which also brings it back under the 900-file limit a per-request unpacker can handle.Deep imports of
@gomagaming/<pkg>/src/*from an installed package no longer resolve. Nothing documented used them; imports inside the monorepo are unaffected.
0.12.0
<goma-sports-navigation-dialog>: tighten and complete the selected-sport trigger pill. Icon (and its placeholder) sized to 16px, pill padding5px 10px, and the label now always renders (truncating long sport names with an ellipsis so the pill stays compact), falling back to a "Sport" placeholder (newsports_navigation_dialog_placeholderi18n key in en/fr/pt) while the sport list loads instead of showing an empty pill.
0.11.0
<goma-sports-navigation-dialog>: redesign the picker (60px-circle grid, "Filter by country…" search placeholder) and add composition props:showTrigger(hide the built-in pill),showBackButton(Back button →goma:dialog-back), andshowApplyButton(Apply footer: tapping a tile highlights, Apply commitsgoma:sport-select+ closes). It can now be opened externally via a composedgoma:sports-dialog-openevent. Panel height is now a definite90dvh/92dvhso it matches the<goma-filters-settings>settings modal exactly (they swap in place when embedded).
0.9.2
- The dialog trigger pill is redesigned: it now shows the selected sport's icon and name on the accent (
highlightPrimary) background, rounded on the right only, without the up/down caret arrows. goma-sports-navigation-horizontalandgoma-sports-navigation-dialoggain ashowLiveCountprop /show-live-countattribute (defaulttrue). Set it tofalseto hide the live-event count badge on each sport tile.
0.9.0
New widget
<goma-competitions-list>: vertical list of competitions grouped by region, scoped per sport.Each region renders as a collapsible card (flag + region name + caret in the header, competition rows with separator lines in the expanded body), matching the design. Multi-open accordion; the first region card is expanded by default, controlled via
initialOpenRegionIds.- Reuses
useCompetitionsSource+useLocationsSource; joins them client-side onvenueIdto build the per-region groups. - Three data sources via
dataSource:'prop'(host-fed viael.competitions/el.regions),'rpc'(one-shotgetCompetitions+getLocationson connect; default),'subscribe'(placeholder, falls back to RPC). sportIdis mandatory (defaults to 1 = Football). Pair with the sports picker viafollowSportPickerto re-fetch on sport change.- Emits
goma:competition-selectwith the same payload as<goma-competition-filter>: downstream<goma-events-horizontal>withfollowCompetitionPicker: truecooperates with no changes. - Also emits
goma:region-toggle(informational) when a region accordion card is opened or closed.
Released alongside the rest of the lockstep family at a minor bump.
- Reuses
New widget
<goma-multi-banners>. A swipeable carousel of injectable banner cards, three types in one widget: sport events, casino game promos, and info banners.All data is host-fed via the
bannersarray (no CMS). For a sport banner, settingeventId(live or prelive) makes the widget resolve teams, start time, score and odds itself; without it the host supplies those fields inline. The background image is always host-fed.- Sport cards adapt to event state: live cards show the running clock/part and score (
home - away), prelive cards show the kickoff date + time. - Carousel chrome: prev/next arrows, pagination dots, swipe/drag, opt-in autoplay (off by default). The track is clipped + isolated so nothing bleeds over neighbouring widgets.
- Emits
goma:banner-select(every banner),goma:event-navigate(sport-card body tap → game-details), andgoma:outcome-select(sport odds tap → betslip, same shape as events-horizontal). - No new theme tokens; all colours map to existing
--goma-*tokens.
@gomagaming/sports-domainadditions (additive, no change to existing paths):- New action group
sports.bannerEvents(createBannerEventsActions): a multi-event subscription manager that accumulates events intobettingStore.events(skipStoreCleanup) so several event cards keyed by id coexist with live odds, unlike the singular-gamematchDetailspath. - Public exports for
useGameScoresTallOddsanduseGamePartsAndTimesTallOddsso other widgets can render live scores/clocks from a store event.
- Sport cards adapt to event state: live cards show the running clock/part and score (
0.8.0
New widget
<goma-top-competitions>: sidebar "Top Competitions" list.A vertical list of competition rows (sport icon + region flag + name) with a section title above. Selecting a row emits
goma:competition-selectwith the full payload (competitionId, competitionName, sportSportId, competitionVenueId, previousCompetitionId).- Three data sources via
dataSource:'prop'(host-fed),'rpc'(one-shotpopularTournamentscall on connect; default),'subscribe'(placeholder, falls back to RPC). - Sport scope set once via
config.sportId; no picker-chain wiring. - Sport icons resolved off
iconBaseUrl(/icons/sports/dark_mode/{sportId}.svg), flags offflagBaseUrl({venueId}.png). Same conventions as the rest of the filter family. - New composable
useTopCompetitionsSourcein@gomagaming/sports-domainwraps the existingoddsApi.betting.getTopCompetitionsRPC.
Released alongside the rest of the lockstep family at a minor bump.
- Three data sources via
0.7.0
Playground scenario presets, live theme-token editor, and family-wide picker-coupling defaults.
Widget runtime defaults
- events-horizontal:
followSportPicker,followRegionPicker,followCompetitionPicker,followTimePickerall flip fromfalsetotruein the element-class defaults and the playground manifest. Drop a sibling picker or filter on the page and the events feed auto-couples without any explicit config. Consumers that don't want the coupling set the flag tofalse(or the matching HTML attributefollow-sport-picker="false", etc.). - region-filter:
followSportPickerdefault flips totruein the element class + manifest. The widget will re-fetch the region list whenever a sibling sports picker emitsgoma:sport-select. - competition-filter:
followSportPickerandfollowRegionPickerdefaults both flip totrue. Drops the manual wiring step from the picker-chain composition. - region-filter / competition-filter: playground manifest's
sourcedefault flips from'mock'to'rpc'. Aligns the manifest with the element class's owndataSource: 'rpc'default; consumers of the published widgets are unaffected (mock was a playground-only convenience).
Breaking-ish note: a host page that mounts multiple of these widgets side-by-side without setting
follow*Pickerexplicitly will now see them auto-react to each other's selection events. The old isolated behaviour is restored withfollow*Picker: false.Playground SPA additions (not published; bundled into the docs site at
/playground)- Scenario presets: a named scenario is an ordered set of widgets
- per-instance configs + theme + token overrides + locale. Three built-ins ship:
full-betting(filters row + sports nav + events + game details + sidebar betslip),mobile-layout(dialog picker + events + floating betslip), anddark-neon-blue-showcase. TopBar gains a Scenario<select>that replaces widgets / configs / theme in one mutation; the dropdown auto-flips to "Custom" the moment the user diverges from the preset.
- per-instance configs + theme + token overrides + locale. Three built-ins ship:
- Live theme-token editor: new Inspector "Theme" tab grouped by prefix (Backgrounds, Text, Icons, Highlights, …). Edits write through
store.setThemeToken('--goma-X', '#hex')to the global override layer (sparseRecord<--goma-key, hex>), which Stage's fast-path watcher pushes viael.theme = …to every mounted element._applyTheme()writeshost.style.setProperty(--goma-X)reactively, so token edits repaint with no Vue remount. - Share URL: v3 envelope additively carries
themeTokensandactiveScenario. Default values are dropped from the encoded payload (size optimisation, hydrate re-applies defaults). Foreign payloads with poisonedthemeTokens(non-object, arrays, non-string values) are normalised back to{}inhydrate(). dark-minttheme renamed todark-neon-blue: palette pulled verbatim from the new Figma tokens export (Uniclub Dark Neon Blue). Highlights / live tags / button-primary flip from mint green (#5cffc0,#00ffbc) to neon cyan (#29f2ff); secondary accent flips from indigo#5b56ffto purple#8750ff. Backgrounds, text, icons, separators, dialog background are unchanged. New tokens added: inputs, alerts, betslip, game header, hero card, tickets, stats, shadows. Persisted state or share URLs that pintheme: 'dark-mint'fall back toTHEMES.defaultafter hydrate.
Tests
- New
tests/playground-scenarios.test.js: 19 vitest cases coveringapplyScenario,setThemeToken+activeScenarioCustom-flip,resetThemeTokens, share URL round-trip with the new envelope fields, hydrate normalisation of malformed payloads. - New
tests/integration/playground-scenarios.spec.ts. 4 Playwright cases: scenario → DOM mount, dark-neon-blue palette assertion (backgroundPrimary+highlightPrimary), live token edit without remount (element identity preserved), share URL round-trip across pages. tests/integration/playground-inspector.spec.ts: tab list extended with the new "Theme" tab.
- events-horizontal:
0.6.0
New widget:
<goma-competition-filter>. Horizontal pill row of competitions (tournaments, leagues) with a hardcoded "All" pill on the leftmost slot, single-selection state, and optional competition icons resolved officonBaseUrl(same convention as sport-navigation,competitions/{id}.svg). Sister widget to<goma-region-filter>; same data-source surface, same picker-chain pattern, plus an additional client-side filter wired to the region picker.What's new
- New package
@gomagaming/competition-filter. Element:<goma-competition-filter>. Reference docs:docs/widgets/competition-filter.md. - Hardcoded "All" pill emits
{ competitionId: 'all', competitionName: <localised> }viagoma:competition-select: maps straight to the matches-aggregator topic's literalallno-filter tournamentId segment. - Opt-in
followSportPicker(re-fetch on sport-select) andfollowRegionPicker(client-side filter onvenueIdvia the picked regionId;'all'disables). Both resetselectedCompetitionIdto'all'and emitgoma:competition-selecton context change so downstream listeners clear their tournamentId filter in the same tick.
@gomagaming/events-horizontaladditions- New
followCompetitionPicker+competitionPickerSelectoropt-in props. Third in the picker chain: listens forgoma:competition-selectat the window and rewrites segment index 2 (tournamentId) of the matches-aggregator topic. The existingrewriteTopicSegment(topic, idx, value)helper does the lifting: adapter-resolved prefix when available, canonical'custom-matches-aggregator/'fallback otherwise (works in mock mode + pre-WAMP-connect). - Playground manifest gains a
followCompetitionPickertoggle under "advanced".
@gomagaming/sports-domainadditionsuseCompetitionsSource(state): public composable. Watchesstate.sportId+state.regionId+state.dataSource; callsoddsApi.betting.getCompetitions({ sportId })on connect and mirrors avenueId-filtered slice ofbettingStore.competitionsintostate.competitions. The region filter runs client-side without requiring a re-fetch.subscribeToCompetitions({ sportId, afterInitialDump })stub on the everymatrix betting module (warn-once + RPC fallback, same shape assubscribeToLocations). Backend topic for live competition updates is deferred.
@gomagaming/coreadditions- Four new bundled i18n keys per locale (en/fr/pt):
competition_filter_all_label,competition_filter_aria,competition_filter_empty,competition_filter_live_events_count(vue-i18n 3-form plural for the live-count badge).
gomawt playground
competition-filterjoins the registry, typesWidgetIdunion, storeALL_WIDGETS, VitePress theme side-effect import, Stage event-log allow-list (goma:competition-select), and EventLogPanel category classifier.- demo entry-file imports added to playground/isolation/stress/ soak entries; workspace dep +
optimizeDeps.excludeentry indemo/.
Three-layer chain ready out of the box: drop a sports navigation picker, a region filter, a competition filter, and an events-horizontal feed on the same page; turn on the relevant
follow*Pickerflags and the topic chain{sportId}/{locationId}/{tournamentId}updates segment-by-segment with no host glue and no WAMP reconnect.- New package
Drop the unused
operatorIdfield from the public widget config surface. The field was declared in@gomagaming/coredefaults + TypeScript types but never read anywhere on the data path:ucsOperatorIdis the only operator identifier the EveryMatrix adapter (anduseBetslipLogic) consume. Settingconfig.operatorIdon a widget element now logs an "unknown config key" warning indebug: truemode instead of being silently accepted.Migration: consumers using
config.operatorIdshould rename toconfig.ucsOperatorId. No behavioural change for consumers who already only setucsOperatorId(which the docs have always recommended).@gomagaming/corechanges:createWidgetElement.js:COMMON_DEFAULTSno longer seedsoperatorId; theknownTopLevelKeysvalidator set drops it.types/index.d.ts: removedoperatorId?: stringfrom theGomaWidgetConfiginterface.
@gomagaming/betslip-sidebardocstring tweak:custom-elements.jsonexample endpoint placeholder changed from/place-bet/4313/v2/betsto/place-bet/2838/v2/bets(matches the staging operator id used by the playground EM demo preset). No behavioural change.
gomawt playground:
- The "Connection" panel drops the
operatorIdinput row; share-URL envelope, persistence, types, and preset filler all scrubbed in lockstep so older share URLs that carriedoperatorIdare silently ignored on hydrate (the field falls out ofSTATE_DEFAULTSand the validator'sstringFieldslist). - New mobile UI: ≤760 px viewport gets a bottom tab bar (Widgets / Stage / Inspect) routing the body panels; the topbar folds Mode/Theme/Locale/API URL behind a
⋮disclosure; Connection panel grid collapses to a single column; tab targets meet 44 px touch-target guidance and inputs use 16 px font to suppress iOS focus-zoom. - EM demo preset refreshed to the NDW staging endpoint (
wss://api-ndwstage.everymatrix.com/v2, realmwww.demo1-stage.everymatrix.com, ucsOperatorId2838).
VitePress docs site:
- Locked to dark mode (
appearance: 'force-dark'): the appearance toggle is hidden from the nav. The playground's dark--bg-*tokens no longer two-tone against a light VitePress chrome. - Homepage, introduction, publishing, and widget reference docs refreshed to current state: nine widgets shipped, eleven publishable packages in the lockstep group, example URLs scrubbed of the previous client-specific staging hostnames (now use generic
api.example.com/sports-api.example.complaceholders), exampleucsOperatorIdliteral updated to2838. Three new widget docs (region/competition/time-filter) added to the homepage feature sections.
New widget:
<goma-region-filter>. Horizontal pill row of regions (countries) with a hardcoded "All" pill on the leftmost slot, single-selection state, and an optional flag glyph per pill. Sources its region list from a one-shot WAMP RPC call on connect, with a placeholdersubscribemode that currently falls back to RPC until the backend exposes a live-update topic for locations.What's new
- New package
@gomagaming/region-filterpublished in lockstep with the existing widgets. Element:<goma-region-filter>. Reference docs:docs/widgets/region-filter.md. - Hardcoded "All" pill emits
{ regionId: 'all', regionName: 'All' }viagoma:region-select(canonical "no filter" sentinel, matches the matches-aggregator topic format wherelocationId='all'). - Flag glyphs rendered from a configurable CDN: default
flagBaseUrlis the upstream Glastcoper flag pack, resolved as${flagBaseUrl}{regionId}.png. Falls back to a globe glyph when a flag fails to load. - Opt-in
followSportPickerautomation (mirrors<goma-events-horizontal>): when enabled, the widget listens at the window forgoma:sport-selectevents emitted by sibling sports-navigation widgets and rewrites itssportIdso the region list refetches automatically. OptionalsportPickerSelectorscopes the listener to a specific picker for multi-instance disambiguation.
@gomagaming/events-horizontaladditions- New
followRegionPicker+regionPickerSelectoropt-in props. Mirror the existingfollowSportPickerplumbing but listen forgoma:region-selectand rewrite the locationId segment (index 1) of the matches-aggregator topic. The region-filter's hardcoded "All" pill emitsregionId: 'all'which lines up exactly with the matches-aggregator topic's literalallno-filter segment: no special-casing needed. Drop a<goma-region-filter>alongside an events-horizontal feed and setfollow-region-pickeron the latter; selections flow through with no host glue and no WAMP reconnect (the existinguseTopicSubscriptionwatcher rebinds the topic in place).
@gomagaming/sports-domainadditionsuseLocationsSource(state): public composable that drivesstate.regionsfrom the WAMP API. Watchesstate.dataSource,state.sportId, and the apiContainer's connection; on connect, callsoddsApi.betting.getLocations({ sportId })and mirrorsbettingStore.locationsinto the widget's reactive state.subscribeToLocations({ sportId, afterInitialDump }): new stub method on the Everymatrix betting module. Logs a one-time warning and falls back to one-shotgetAllLocationsuntil the live topic is wired backend-side. Returns a no-op unregister so the composable's cleanup contract stays uniform with the other subscribe methods.
@gomagaming/coreadditions- Three new bundled i18n keys across
en.json,fr.json, andpt.json:region_filter_aria,region_filter_empty.
gomawt playground
region-filterjoins the playground registry, storeALL_WIDGETS, typesWidgetIdunion, and VitePress theme side-effect imports. The embedded/playgroundroute can mount it alongside the other six widgets.
- New package
New widget:
<goma-time-filter>. Horizontal pill row of time-interval filters with a hardcoded "All" pill on the leftmost slot. Pure host-fed; no WAMP transport, no sport-scoping, no API container.Lighter than the rest of the filter family: no
setupAppplumbing on the element, no shared composable in@gomagaming/sports-domain. Just anintervalsprop, aselectedTimeValueselection state, and agoma:time-selectevent.What's new
- New package
@gomagaming/time-filter. Element:<goma-time-filter>. Reference docs:docs/widgets/time-filter.md. - The host feeds
el.intervals = [{ label, value }, …].labelis rendered verbatim (hosts pre-localise, only the hardcoded "All" pill is locale-driven, via the bundledtime_filter_all_labelkey).valuematches the matches-aggregator topic's hoursInterval segment ('0-1','0-24','24-48', etc.). Malformed entries drop silently; duplicates byvaluekeep the first occurrence. - The hardcoded "All" pill emits
{ timeValue: 'all', timeLabel: <localised>, previousTimeValue }viagoma:time-select: maps straight to the matches-aggregator topic's literalallno-filter hoursInterval segment.
@gomagaming/events-horizontaladditions- New
followTimePicker+timePickerSelectoropt-in props. Fourth in the picker chain. Listens forgoma:time-selectat the window and rewrites segment index 3 (hoursInterval) of the matches-aggregator topic withdetail.timeValue. Reuses the existingrewriteTopicSegment(topic, idx, value)helper (with its canonical-prefix fallback so mock-mode + pre-WAMP-connect rewrites still land). - Playground manifest gains a
followTimePickertoggle under "advanced".
@gomagaming/coreadditions- Three new bundled i18n keys per locale (en/fr/pt):
time_filter_all_label,time_filter_aria,time_filter_empty.
gomawt playground
time-filterjoins the registry, typesWidgetIdunion, storeALL_WIDGETS, VitePress theme side-effect import, Stage event-log allow-list (goma:time-select), and EventLogPanel category classifier.- demo entry-file imports added across playground/isolation/stress/ soak; workspace dep +
optimizeDeps.excludeentry indemo/.
Four-segment chain ready out of the box: drop a sports navigation picker, a region filter, a competition filter, a time filter, and an events-horizontal feed on the same page; turn on the relevant
follow*Pickerflags and the topic chain{sportId}/{locationId}/{tournamentId}/{hoursInterval}updates segment-by-segment with no host glue and no WAMP reconnect.- New package
0.5.2
- packages: wire up the now-live
gomawt.gomagaming.comdocs subdomain across npm-facing surfaces. Adds ahomepagefield to each of the eight publishablepackage.jsonfiles so the npm sidebar shows a "Homepage" link again (widget packages point at their per-widget docs page under/widgets/<name>;@gomagaming/coreand@gomagaming/sports-domainpoint at the site root). Replaces the two_coming soon_Documentation bullets in each README with real links togomawt.gomagaming.com/widgets/<name>(full reference) andgomawt.gomagaming.com/playground(live playground). No code change.
0.5.1
events-horizontal: flip
followSportPickerdefault totruein the playground manifest so integrators landing on the playground see the events feed auto-follow any sports picker they enable. The shipped widget's element-class default (followSportPicker: false) is unchanged: consumers who don't opt in viaconfig.followSportPickeror the HTML attribute still get the old behaviour.Playground + maintenance polish:
@gomagaming/events-horizontalnow exports its ownpackage.json("./package.json": "./package.json"in the exports map). Lets consumers read the package version without import-resolution errors; the embedded playground uses this to render its lockstep version badge.@gomagaming/sports-navigation-dialog's playground mock fixture now driftsliveCountevery 4 seconds, matching the horizontal sister. Previously itssubscribe()was a no-op; the dialog's badge UX now exercises while the dialog is open. Initial dataset unchanged.- Source comments scrubbed of stale internal references throughout the eight published packages. No behaviour change.
packages: scrub private-repo URLs from npm-facing metadata and rewrite client-facing READMEs. Removes
repository,homepage, andbugsfields from all eight publishablepackage.jsonfiles: the gomawt GitHub repo is private, so these fields were leaking a 404-on-anonymous link into the npm sidebar. Rewrites the six widget READMEs and the two internal-package READMEs (@gomagaming/core,@gomagaming/sports-domain) with a client-dev-targeted template: blockquote one-liner, framework-agnostic note, install snippet with.npmrc+NPM_TOKENauth blurb, widget-specific quick-start, and placeholder Documentation section (the canonical docs subdomain and public playground URL are pending DevOps; they'll fill in via find-and-replace on_coming soon_and a singlehomepagefield add perpackage.jsononce available). No code change.
0.5.0
New widget:
<goma-game-details>. Page-shaped Web Component that renders the full details for one sporting event. Header (teams, score, clock) + market-category tabs + fixed-height scrollable list of collapsible market cards with IntersectionObserver-driven batched rendering. Fills its parent; the host owns presentation context (route slot, drawer, modal, sized column, their choice). a separate change.Cross-widget cooperation works out of the box: drop a
<goma-events-horizontal>and a<goma-game-details>on the same page and card taps drive the details widget via the existinggoma:event-navigateevent (opt-out viaconfig.followEventNavigate: false).What's new
- New package
@gomagaming/game-detailspublished in lockstep alongside the existing widgets. Element:<goma-game-details>. Reference docs:docs/widgets/game-details.md. - New per-component subscription pattern (
.subscription.jsfiles) port the source post-a separate change architecture: each internal component (Header / MarketsList) owns its own WAMP subscription withonScopeDisposecleanup. Multi-instance safe: each<goma-game-details>mount gets its ownuseGameDetails()state andcreateMatchDetailsActions()closure. - Five new theme tokens with CSS-level fallbacks to existing tokens:
--goma-tabPillBackground,--goma-tabPillBackgroundActive,--goma-tabPillText,--goma-tabPillTextActive,--goma-marketCardHeaderBackground. Documented indocs/guide/theming.md → Game details. - New
marketsListHeightconfig knob (mirrored as themarkets-list-heightHTML attribute). Accepts any CSS length ('480px'default,'70vh','calc(100vh - 200px)', …): bounds the markets-list scroll viewport so the widget doesn't sprawl in hosts that don't constrain it.
@gomagaming/sports-domainadditionsactions.sports.matchDetails.*: six new WAMP actions lifted from the source repo's actions tree:subscribeToMatch/unSubscribeToMatch,subscribeToMarketGroups/unRegisterToMarketGroups,subscribeToMarketsByMarketGroupKey/unSubscribeToMarketsByMarketGroupKey. Per-instanceunregisterclosure viacreateMatchDetailsActions(): co-mounted widgets don't share WAMP handles.- New public exports:
useOddsApiActions,useActionsContainer,useLoader,useGameCardsTallOdds,RegularOdds,formattedUnixDate,formattedUnixTime,connectSportsApiReactive. These were already used internally; opening them up so external widgets (incl. this one) can compose without deep imports. adapter.createActions(router, apiContainer): adapter signature widened. Action factories close overapiContainerand readoddsApifromapiContainer.oddsApi.valuedirectly instead ofuseOddsApi()/inject(). Required because action methods are invoked from watcher callbacks that fire outside Vue's setup context (e.g., when a WAMPonInitialDumpcascades through a reactive store patch into a watcher), whereinject()returnsundefined. The closure path is reliable regardless of where the callback runs. Backwards-compatible: existing adapters that ignore the second arg keep working.useLoaderloader store gainsmatchDetailsMarketGroupMarketsflag (used by the markets-by-group action'safterInitialDumpcallback).
@gomagaming/coreadditions- Bundled i18n keys for game-details added across
en.json,fr.json, andpt.json:empty_state_match_not_available_*,empty_state_match_no_markets_*,market_categories,collapse. createWidgetElement'sCOMMON_DEFAULTSnow declare the provider / connection fields (provider,socketUrl,socketRealm,bettingApiBaseUrl,operatorId,ucsOperatorId) so every widget's reactive state bridge auto-tracks them. Setting them viael.config = { socketUrl: '…', … }propagates into the widget's_state: the newconnectSportsApiReactivehelper watches that and reconnects on runtime change.
Connection-reactive widgets (all five publishable widgets + game-details)
- Every shipped widget now uses
connectSportsApiReactiveinstead of the one-shotconnectSportsApi(...)call insetupApp. Hosts can changesocketUrl(and the other connection fields) at any time after mount and the widget tears down the old WAMP handle and re-establishes against the new params. Use case: the gomawt playground's "Apply" button for the Connection panel; any host that rotates credentials / switches environments without remounting the widget. - New public export from
@gomagaming/sports-domain:connectSportsApiReactive({ app, host, router, apiContainer, actionsContainer, name }).
gomawt playground
- New "Connection" disclosure in the TopBar with six inputs (
provider,socketUrl,socketRealm,bettingApiBaseUrl,operatorId,ucsOperatorId), Apply / Revert buttons, share-URL- localStorage persistence.
- Live connection-state badges on each widget card (driven by
goma:connectionevents). - Generic mock-fixture plumbing: fixtures can now declare arbitrary top-level keys (not just
events/sports); the Stage applies each as a JS property on the element. - Game-details added to the rail with a mock fixture (Arsenal vs Chelsea, four market groups, six markets, drifting odds + live clock).
- Events-horizontal's
subscribemode now auto-builds the WAMP topic from the manifest'ssportId+eventLimitwhen the user hasn't settopicexplicitly.
Follow-up
BetBoosttab, share button, favorite toggle, stats / lineups / H2H / commentary are explicit v2+ surfaces (recorded indocs/widgets/game-details.md → What's deferred).
- New package
Playground manifest schema additively extended (Phase 4 inspector parity with
demo/).@gomagaming/coreexports new control types (slider,textarea,json), two new tag values ('transport','mock'), an optional per-controldependsOn: { key, oneOf }field for conditional visibility, an optional top-levelthemeTokensper-widget token registry, and an optionaltopicBuilderfunction field for read-only WAMP topic previews. Phase 2 manifests continue to validate without modification (regression guard in the schema test suite).Every shipped widget's
playground.manifest.jswill be expanded in subsequent commits on this branch with the full per-widget configuration surface previously only exposed in the internaldemo/sandbox (transport block, mock-streaming knobs, full theme tokens, place-bet JSON fields where applicable). After this block the playground SPA can render the new control types and respectdependsOnfiltering; the per-widget manifests catch up in Block D.
0.4.0
Phase 2 retrofit for the betslip widgets:
@gomagaming/betslip-floatingand@gomagaming/betslip-sidebarnow ship the same./playgroundsub-export contract as the other widgets. Each has asrc/playground.manifest.jsvalidated byPlaygroundManifestSchemain@gomagaming/core, adist/playground.jsemitted alongside the main bundle (via theextraEntriesoption in@gomagaming/vite-preset), a./playgroundentry inpackage.jsonexports, and a per-package Vitest test asserting schema conformance. Unlike events-horizontal / sports-navigation-*, the betslip widgets ship nomock()fixture: they read selections from cross-widget shared storage (goma:betslip:v3) populated by events-horizontal, so the playground demos them by enabling events-horizontal alongside and tapping outcomes.The betslip widgets also join the fixed lockstep group in
.changeset/config.json, so all 7 publishable packages now version together. This fixes the version-skew introduced when betslip widgets were added at 0.2.0 in the a separate change PR without lockstep membership.The playground SPA gains all five widgets in its registry, store, Stage element map, and snippet PKG_NAMES; vite.config.ts'
optimizeDeps.includeis extended to pre-bundle all five main entries plus their./playgroundsub-exports.
0.3.0
Adds the playground manifest contract: every widget package now exports a
./playgroundsub-export carrying a declarative manifest (validated byPlaygroundManifestSchemain @gomagaming/core) plus an optional lazy-loaded mock fixture. Powers the new client-facing playground at /playground/ on the docs site (replaces the workspace-internal demo/ snapshot).Schema lives in @gomagaming/core; consumers can
import { validateManifest } from '@gomagaming/core'to assert manifest conformance. zod is now a runtime dep of @gomagaming/core (tree-shaken away for widget bundles that don't reference the schema).
0.2.0
Dedup architecture: externalize peers + workspace deps in widget builds, narrow
coreandsports-domainexportsto drop the./src/*escape hatch, and promote widget-consumed targets into main entries. Multi-widget consumers now resolve a single copy ofvue,pinia,vue-router,vue-i18n,@vueuse/core,autobahn-browser, swiper,@gomagaming/core, and@gomagaming/sports-domain: measured ~17% reduction in two-widget consumer bundle gzip total. Per-widget published artifacts shrink dramatically (e.g.events-horizontal1.7 MB → 6.75 KB gzip, 99.6% smaller). Sport-icon dedup remains per-widget and is tracked as a follow-up.Breaking: removes
./src/*from@gomagaming/coreand@gomagaming/sports-domainpackage.jsonexports. Any consumer that imported via@gomagaming/<pkg>/src/...paths must switch to the main-entry import (import { X } from '@gomagaming/<pkg>').sports-domain's main entry now exportsLiveRegularOdds,PreLiveRegularOdds,OutrightRegularOdds,MarketRegularOdds,SkeletonCard,useTopicSubscription,useSportsSource,sortOutcomes, andnormaliseTopicPrefix.@gomagaming/sports-navigation-dialogships for the first time at0.2.0(no prior 0.1.x publish).
All notable changes to this package will be documented in this file. Auto-generated by Changesets; do not edit by hand.