BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/mrdoge-ui/mrdoge-stats-list-adapter

Stats List Adapter (Mr. Doge SDK)

mrdoge-ui/mrdoge-stats-list-adapter
FreeUtility

Maps a real match.stats (any of the 8 sports) onto Stats List's entries prop.

Install it

npx shadcn@latest add https://mrdoge.co/r/mrdoge-stats-list-adapter.json

Source

lib/mrdoge-adapters/stats-list.tsmrdoge.co/r/mrdoge-stats-list-adapter.json · first 6 KB
1import type { MatchDetail, MatchStats } from "@mrdoge/protocol"
2import type { StatsListEntry } from "@/registry/mrdoge-ui/stats-list/stats-list"
3
4function pair(label: string, home: number | undefined, away: number | undefined, format?: (n: number) => string): StatsListEntry | null {
5 if (home == null || away == null) return null
6 const toText = format ?? String
7 return { label, home: toText(home), away: toText(away), homeValue: home, awayValue: away }
8}
9
10function percent(value: number) {
11 return `${Math.round(value * 100)}%`
12}
13
14// Booleans (who's serving, who's in the bonus) still render as a bar (a
15// full bar on whichever side is true, empty on the other) rather than
16// being dropped, since every row here is a comparison bar.
17function booleanPair(label: string, home: boolean | undefined, away: boolean | undefined): StatsListEntry | null {
18 if (home == null && away == null) return null
19 return {
20 label,
21 home: home ? "Yes" : "No",
22 away: away ? "Yes" : "No",
23 homeValue: home ? 1 : 0,
24 awayValue: away ? 1 : 0,
25 }
26}
27
28/**
29 * Maps a real `match.stats` (from `matches.get()`/`matches.subscribe()`)
30 * to Stats List's entries: a plain array, one row per available stat. If
31 * the SDK's shape changes, this fails to compile.
32 *
33 * MatchStats is a discriminated union per sport, so this switches on
34 * `stats.sport`. Every branch is covered, but four sports
35 * (american football, baseball, ice hockey, handball) currently have no
36 * comparable home/away stats in the protocol beyond score and clock
37 * (already shown elsewhere, e.g. Match Highlight), so those return an
38 * empty array rather than padding the list with fields that don't exist.
39 * Tennis's current-game points ("15"/"40"/"AD") aren't included: text,
40 * not a number, so there's no meaningful bar for it.
41 */
42export function statsToStatsListEntries(stats: MatchStats | null | undefined): StatsListEntry[] {
43 if (!stats) return []
44
45 switch (stats.sport) {
46 case "soccer":
47 return [
48 pair("Possession", stats.homePossession, stats.awayPossession, percent),
49 pair("Expected Goals", stats.homeExpectedGoals, stats.awayExpectedGoals, (n) => n.toFixed(2)),
50 pair("Shots", stats.homeShots, stats.awayShots),
51 pair("Shots on Target", stats.homeShotsOnTarget, stats.awayShotsOnTarget),
52 pair("Corners", stats.homeCorners, stats.awayCorners),
53 pair("Fouls", stats.homeFouls, stats.awayFouls),
54 pair("Offsides", stats.homeOffsides, stats.awayOffsides),
55// … truncated

What it pulls in

npm packages

  • @mrdoge/protocol

Other registry items

  • stats-list

Files it writes

  • lib/mrdoge-adapters/stats-list.ts

Facts

Registry
mrdoge-ui
Type
registry:lib
Access
Free
Files written
1
Licence
MIT
In the index
at or before 2026-08-12
Last confirmed
today

Go to the source

mrdoge.co mrdogeco/docs on GitHub Raw registry item This item as JSON

More from mrdoge-ui

All 26 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Bet Slip Adapter (Mr. Doge SDK)mrdoge-bet-slip-adaptermrdoge-uiUtilitiesFree1 dep
Mr. Doge Clientmrdoge-clientmrdoge-uiUtilitiesFree1 dep
Conflict Adapter (Mr. Doge SDK)mrdoge-conflict-adaptermrdoge-uiUtilitiesFree1 dep
Match Card Adapter (Mr. Doge SDK)mrdoge-match-card-adaptermrdoge-uiUtilitiesFree1 dep
Match Highlight Adapter (Mr. Doge SDK)mrdoge-match-highlight-adaptermrdoge-uiUtilitiesFree1 dep
Match Timeline Adapter (Mr. Doge SDK)mrdoge-match-timeline-adaptermrdoge-uiUtilitiesFree1 dep
Odds Selector Adapter (Mr. Doge SDK)mrdoge-odds-selector-adaptermrdoge-uiUtilitiesFree1 dep
Rate Limitrate-limitmrdoge-uiUtilitiesFreeno deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex