{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "radial-chart",
  "title": "Radial chart",
  "description": "Values as arcs round a centre: rings against goals of their own that lap past them, or a gauge with a needle, the Meter’s low and high marks, and its range at the ends. The ring under the pointer or the keys stays bright while the rest step back and its value rolls into the centre; a new value sweeps each ring from where it is.",
  "registryDependencies": [
    "https://kinoui.com/r/chart.json",
    "https://kinoui.com/r/chart-centre.json",
    "https://kinoui.com/r/chart-core.json",
    "https://kinoui.com/r/chart-root.json",
    "https://kinoui.com/r/chart-math.json",
    "https://kinoui.com/r/chart-radial.json",
    "https://kinoui.com/r/number-format.json",
    "https://kinoui.com/r/placeholder.json",
    "https://kinoui.com/r/run-progress.json",
    "https://kinoui.com/r/theme.json"
  ],
  "files": [
    {
      "path": "registry/components/kino/radial-chart.tsx",
      "content": "'use client'\n\nimport {\n  type CategoryChartProps,\n  figureProps,\n  pickedName,\n  shareColor,\n  ShareTooltipContent,\n  useChartActive,\n  useRegistry,\n} from '@/registry/lib/chart-base'\nimport { ChartCentreText } from '@/registry/lib/chart-centre'\nimport {\n  ListChartFrame,\n  type ListChartStop,\n  useListChart,\n} from '@/registry/lib/chart-list'\nimport { listReader } from '@/registry/lib/chart-list-reader'\nimport {\n  allWhole,\n  type ChartDatum,\n  type ChartPattern,\n  numberOf,\n} from '@/registry/lib/chart-math'\nimport {\n  fitRound,\n  outerPoint,\n  type RadialBox,\n  ringAt,\n  ringBandsOf,\n  type RingBand,\n  type RoundMark,\n  round,\n  standsClear,\n  type Sweep,\n  sweepMarks,\n  sweepOf,\n  TEXT_HEIGHT,\n  turnOf,\n  withinSweep,\n} from '@/registry/lib/chart-radial'\nimport {\n  ChartSvgPattern,\n  forcedSeriesTextColor,\n  plotLayerClassName,\n  stepBackInkClassName,\n  useChartRootValue,\n} from '@/registry/lib/chart-root'\nimport { linearScale } from '@/registry/lib/chart-scale'\nimport { numberFormatter } from '@/registry/lib/number-format'\nimport {\n  placeholderBreatheClassName,\n  placeholderInkClassName,\n} from '@/registry/lib/placeholder'\nimport { registerProperties } from '@/registry/lib/run-progress'\nimport {\n  Children,\n  type ComponentProps,\n  createContext,\n  type CSSProperties,\n  isValidElement,\n  memo,\n  type ReactNode,\n  use,\n  useLayoutEffect,\n} from 'react'\n\nimport { cn } from '@/lib/utils'\n\n/*\n * The Radial chart: values as arcs round a centre, one ring per row, such\n * as a day's activity against its goals, or a gauge with a needle. Each\n * ring moves on one number, its value as a share of its top, from which CSS\n * works out its arc, the lap past its top and the needle's turn, so a new\n * value sweeps from wherever the ring is, in one transition that turns back\n * cleanly when it's cut short. The ring under the pointer or the keys stays\n * bright while the rest step back, and its value rolls into the centre.\n */\n\ninterface RadialChartProps extends Omit<\n  CategoryChartProps,\n  'ordered' | 'tickCount' | 'tickValues' | 'allowDecimals'\n> {\n  /** The key of each ring's value in the data. The config's keys are the rings, under `index`. */\n  dataKey: string\n  /**\n   * The key of each ring's own top in the data, such as a goal: each ring is\n   * drawn as its share of it, and on a whole circle, laps past it.\n   */\n  maxKey?: string\n  /** What the values are, such as \"Visitors\": the centre's caption for a value of your own, and the data table's column. */\n  valueLabel?: string\n  /** Where the arc starts, in degrees clockwise from the top. */\n  startAngle?: number\n  /** Where the arc ends, in degrees clockwise from the top: 360 past the start for a whole circle. */\n  endAngle?: number\n  /** The hole's radius as a share of the chart's; by default, each ring takes 15% of the radius, down to a hole of 0.3. */\n  innerRadius?: number\n  /** Below this value a ring warns: its arc and value turn red. A notch across the ring marks it. */\n  low?: number\n  /** Past this value a ring warns, as below `low`. */\n  high?: number\n  /**\n   * How the rings arrive the first time the chart comes into view: drawn\n   * round from their start, or simply there, the default, since a page that\n   * loads doesn't animate into place.\n   */\n  entrance?: 'draw' | 'none'\n}\n\n/** A ring as the chart draws it. */\ninterface RadialRing {\n  category: ListChartStop\n  band: RingBand\n  value: number\n  /** The ring's top: its `maxKey`'s value, or the domain's end. */\n  top: number\n  /** How far round the arc its value reaches, from 0; past 1 it laps, on a whole circle. */\n  fraction: number\n  /**\n   * The value as a share of its top, for the words: never held, so 150% reads\n   * as 150%. With no top of its own (no `maxKey` and no domain's end), a share\n   * of the rings' total, since a rounded-out top means nothing to the reader.\n   */\n  share: number\n  warn: boolean\n  /** Where `low` and `high` sit along the arc, from 0 to 1. */\n  notches: readonly number[]\n}\n\n/** What a part needs room for round the arc. */\ntype RadialPart = 'needle' | 'range' | 'centre'\n\ninterface RadialContextValue {\n  /** Every ring's stop, a leaving one's too, in the chart's fixed order. */\n  stops: readonly ListChartStop[]\n  /** A ring's name, as the chart writes it, from its value under the chart's `index`. */\n  nameText: (value: unknown) => string\n  /** Every ring, a leaving one too, outermost first. */\n  rings: readonly RadialRing[]\n  /** Each ring still in the data's, by its place among them. */\n  current: readonly RadialRing[]\n  sweep: Sweep\n  /** The circle's centre and radius, in the px the chart draws in. */\n  centre: { x: number; y: number }\n  radius: number\n  /** The hole's radius, in px. */\n  hole: number\n  /** The size the chart draws at: its plot's, or before the plot is measured, a stand-in the drawing is fitted from. */\n  drawn: { width: number; height: number }\n  measured: boolean\n  /** Where the centre's words sit: in the middle of the hole, above the centre on an arc open below, or under the needle's hub. */\n  centrePlace: 'middle' | 'above' | 'below'\n  /** The domain's ends, which the range writes. */\n  domain: readonly [number, number]\n  laps: boolean\n  addPart: (part: RadialPart) => () => void\n  valueLabel: string\n  entering: boolean\n}\n\nconst RadialContext = createContext<RadialContextValue | null>(null)\n\nfunction useRadial() {\n  const radial = use(RadialContext)\n  if (!radial) throw new Error('Radial chart parts go inside a `RadialChart`.')\n  return radial\n}\n\nconst radialChartKeys = [\n  'dataKey',\n  'maxKey',\n  'valueLabel',\n  'startAngle',\n  'endAngle',\n  'innerRadius',\n  'low',\n  'high',\n  'entrance',\n]\n\n/** The room between two rings, in px. */\nconst RING_GAP = 4\n\n/** The needle's hub, in px from its centre. */\nconst HUB = 6\n\n/** The room between the needle's tip and the ring, in px. */\nconst NEEDLE_GAP = 6\n\n/** The room the centre's words take under the hub: the gap, the value at its largest and its caption, in px. */\nconst CENTRE_HEIGHT = 64\n\n/** The room between an arc's end and the range's value under it, in px. */\nconst RANGE_GAP = 6\n\n/** The room between a ring's start and its label, in px. */\nconst LABEL_GAP = 8\n\n/** How far a label's line of text may pass the plot's top or bottom, in px: the room above and below its letters. */\nconst EDGE_SLACK = 4\n\n/** The radius the chart is drawn at before its plot is measured, in px. */\nconst STAND_IN_RADIUS = 120\n\n/** The most laps a ring draws past its top. */\nconst MOST_LAPS = 10\n\nconst TURN = Math.PI * 2\n\n/** The properties the rings and the needle move on, so their transitions can run them. Once per page. */\nfunction registerRadialProperties() {\n  registerProperties([\n    {\n      name: '--radial-value',\n      syntax: '<number>',\n      inherits: true,\n      initialValue: '0',\n    },\n    {\n      name: '--radial-needle',\n      syntax: '<number>',\n      inherits: false,\n      initialValue: '0',\n    },\n    ...(['--ring-r', '--ring-t'] as const).map((name) => ({\n      name,\n      syntax: '<length>',\n      inherits: true,\n      initialValue: '0px',\n    })),\n  ])\n}\n\n/**\n * How far round its arc a value reaches: its share of the way from `low`\n * to `top`, from 0, and at most a whole arc, or on a whole circle that\n * `laps`, a few turns. No room between the two, or no value, reaches none.\n */\nfunction ringFraction(value: number | null, low: number, top: number, laps: boolean) {\n  if (value === null || !Number.isFinite(top) || top <= low) return 0\n  const share = (value - low) / (top - low)\n  return Math.min(laps ? MOST_LAPS : 1, Math.max(0, share))\n}\n\n/** The hole's radius by default, as a share of the chart's: each of `count` rings takes 15% of the radius, down to 0.3. */\nfunction defaultInnerRadius(count: number) {\n  return Math.max(0.3, 1 - 0.15 * Math.max(1, count))\n}\n\n/**\n * The rings from the outside in: in the data's order, each leaving one in\n * the place it had, after the ring that has taken that place now.\n */\nfunction ringOrder<T extends { index: number; leaving: boolean }>(\n  categories: readonly T[],\n) {\n  return [...categories].sort(\n    (a, b) => a.index - b.index || Number(a.leaving) - Number(b.leaving),\n  )\n}\n\n/** Where the centre's words sit: under the needle's hub, above the centre on an arc open at the bottom, or in the middle. */\nfunction centrePlaceOf(sweep: Sweep, inner: number, needle: boolean) {\n  if (needle) return 'below' as const\n  const lowest = Math.max(...sweepMarks(sweep, inner).map((mark) => mark.y))\n  return lowest < 0.3 ? ('above' as const) : ('middle' as const)\n}\n\n/**\n * Where an arc that ends at `turn` with a hole of `inner` reaches lowest\n * there, as fractions of the radius from the centre: across, the middle of\n * the ring's end; down, its inside or its outside, whichever is lower.\n */\nfunction endPoint(turn: number, inner: number) {\n  const sin = Math.sin(turn * TURN)\n  const cos = Math.cos(turn * TURN)\n  return {\n    x: ((1 + inner) / 2) * sin,\n    y: Math.max(-cos, -inner * cos),\n  }\n}\n\n/**\n * The box of a ring's label, in px from the centre: before the ring starts,\n * at `turn`, on its middle `radius` px out, against that point and away\n * from where the ring runs.\n */\nfunction startLabelBox(turn: number, radius: number, width: number, height: number) {\n  const sin = Math.sin(turn * TURN)\n  const cos = Math.cos(turn * TURN)\n  // The way the ring runs from its start, clockwise: a label sits the other way.\n  const x = radius * sin - cos * (LABEL_GAP + width / 2)\n  const y = -radius * cos - sin * (LABEL_GAP + height / 2)\n  return {\n    left: x - width / 2,\n    right: x + width / 2,\n    top: y - height / 2,\n    bottom: y + height / 2,\n  }\n}\n\n/**\n * Whether a box, in px from the centre, stays clear of the rings from\n * `inner` to `outer` px along the arc `sweep`: none of its corners, the\n * middles of its sides or its middle lies on them.\n */\nfunction clearsArc(box: RadialBox, inner: number, outer: number, sweep: Sweep) {\n  const xs = [box.left, (box.left + box.right) / 2, box.right]\n  const ys = [box.top, (box.top + box.bottom) / 2, box.bottom]\n  return xs.every((x) =>\n    ys.every((y) => {\n      const distance = Math.hypot(x, y)\n      if (distance < inner - 1 || distance > outer + 1) return true\n      return !withinSweep(turnOf(x, y), sweep)\n    }),\n  )\n}\n\n/**\n * The turn a ring's value ends at, for its tooltip: as far round its arc as\n * it reaches, and on a lap, as far round that lap.\n */\nfunction endTurn(fraction: number, sweep: Sweep) {\n  const along = fraction > 1 ? fraction % 1 : fraction\n  return sweep.start + along * sweep.size\n}\n\n/**\n * The size the chart draws at before its plot is measured: a box as large as\n * what `marks` reach at the stand-in radius, which the drawing is fitted to\n * the plot from, so it shows from the server's first paint.\n */\nfunction standInSize(marks: readonly RoundMark[]) {\n  const across = marks.flatMap((mark) => [\n    mark.x * STAND_IN_RADIUS - (mark.left ?? 0),\n    mark.x * STAND_IN_RADIUS + (mark.right ?? 0),\n  ])\n  const down = marks.flatMap((mark) => [\n    mark.y * STAND_IN_RADIUS - (mark.up ?? 0),\n    mark.y * STAND_IN_RADIUS + (mark.down ?? 0),\n  ])\n  return {\n    width: Math.ceil(Math.max(...across) - Math.min(...across)) + 1,\n    height: Math.ceil(Math.max(...down) - Math.min(...down)) + 1,\n  }\n}\n\n/** The highest value of `dataKey` in the rows, from zero, rounded out as an axis would be. */\nfunction radialTop(rows: readonly ChartDatum[], dataKey: string) {\n  let high = 0\n  for (const row of rows) high = Math.max(high, numberOf(row[dataKey]) ?? 0)\n  return linearScale([0, high]).domain[1]\n}\n\n/**\n * The chart's root: it fits the arc to its plot, works out each ring's\n * band and how far round it reaches, and lays out the frame its centre,\n * labels, needle and tooltip draw in.\n */\nfunction RadialChart(props: RadialChartProps) {\n  const {\n    dataKey,\n    maxKey,\n    valueLabel,\n    startAngle = 0,\n    endAngle = 360,\n    innerRadius,\n    low,\n    high,\n    entrance = 'none',\n    domain,\n    messages,\n    description,\n    empty,\n    className,\n    children,\n    ref,\n  } = props\n  registerRadialProperties()\n  const chart = useListChart(\n    {\n      ...props,\n      // A ring is named by its config's label, as its legend entry is.\n      categoryFormat:\n        props.categoryFormat ??\n        ((value) => {\n          const named = props.config[String(value)]?.label\n          return typeof named === 'string' ? named : String(value)\n        }),\n      messages: {\n        series: 'Rings',\n        empty: 'No data yet',\n        allHidden: 'Every ring is hidden',\n        showAll: (count) => `Show all ${count} rings`,\n        ...messages,\n      },\n    },\n    { entrance: entrance !== 'none', rowsAreSeries: true },\n  )\n  const { state, stopText } = chart\n  // Rounded out here, once, so the top never changes with the plot's size.\n  const scale = linearScale([0, radialTop(chart.drawn, dataKey)], {\n    domain: domain ?? [0, 'auto'],\n    tickCount: 5,\n    nice: false,\n    allowDecimals: !allWhole(chart.rows, chart.shown),\n  })\n  const parts = useRegistry<RadialPart>()\n  // The parts among its own children are known from the first render, as on the server's\n  // first paint; any deeper one joins once it mounts.\n  const declared = Children.toArray(children).flatMap((child) =>\n    !isValidElement(child)\n      ? []\n      : child.type === RadialChartNeedle\n        ? ['needle' as const]\n        : child.type === RadialChartRange\n          ? ['range' as const]\n          : child.type === RadialChartCentre\n            ? ['centre' as const]\n            : [],\n  )\n  const has = (part: RadialPart) => declared.includes(part) || parts.values.includes(part)\n  const sweep = sweepOf(startAngle, endAngle)\n  const laps = sweep.size >= 1\n  const inner = Math.min(\n    0.95,\n    Math.max(0, innerRadius ?? defaultInnerRadius(state.series.length)),\n  )\n  const needle = has('needle')\n  const range = has('range') && !laps\n  const centrePlace = centrePlaceOf(sweep, inner, needle)\n  const [min, max] = scale.domain\n  const endText = (value: number) => state.textWidth(state.valueText(value))\n  const marks: RoundMark[] = sweepMarks(sweep, inner)\n  if (needle) marks.push({ x: 0, y: 0, left: HUB, right: HUB, up: HUB, down: HUB })\n  if (needle && has('centre')) {\n    marks.push({ x: 0, y: 0, down: HUB + CENTRE_HEIGHT })\n  }\n  if (range) {\n    for (const [turn, value] of [\n      [sweep.start, min],\n      [sweep.start + sweep.size, max],\n    ] as const) {\n      const half = endText(value) / 2\n      marks.push({\n        ...endPoint(turn, inner),\n        left: half,\n        right: half,\n        down: RANGE_GAP + TEXT_HEIGHT,\n      })\n    }\n  }\n  const measured = state.plotSize.width > 0 && state.plotSize.height > 0\n  // Before the plot is measured, the chart is drawn at a stand-in radius, in a box as large\n  // as what it reaches there, which the drawing is fitted to the plot from.\n  const drawn = measured ? state.plotSize : standInSize(marks)\n  const fit = fitRound(drawn.width, drawn.height, marks)\n  const radius = fit.radius\n  const centre = { x: fit.x, y: fit.y }\n  const hole = radius * inner\n\n  // Outermost first, in the data's order; a leaving ring keeps the place it had.\n  const order = ringOrder(chart.stops)\n  const bandList = ringBandsOf(\n    radius,\n    hole,\n    order.map((stop) => !stop.leaving),\n    RING_GAP,\n  )\n  const bands = new Map(order.map((stop, at) => [stop.key, bandList[at]!]))\n  const notchesOf = (top: number) =>\n    [low, high].flatMap((mark) =>\n      mark === undefined ? [] : [ringFraction(mark, min, top, false)],\n    )\n  // A top the reader knows: each ring's own, or a domain's end they set.\n  const ownTop = maxKey !== undefined || typeof domain?.[1] === 'number'\n  const total = order.reduce(\n    (sum, stop) =>\n      stop.leaving ? sum : sum + Math.max(0, numberOf(stop.datum[dataKey]) ?? 0),\n    0,\n  )\n  const rings: RadialRing[] = order.map((stop) => {\n    const value = numberOf(stop.datum[dataKey])\n    const top = maxKey === undefined ? max : (numberOf(stop.datum[maxKey]) ?? 0)\n    const fraction = ringFraction(value, min, top, laps)\n    return {\n      category: stop,\n      band: bands.get(stop.key) ?? { inner: 0, outer: 0 },\n      value: value ?? 0,\n      top,\n      fraction: chart.entered && !stop.leaving ? fraction : 0,\n      share: !value\n        ? 0\n        : ownTop\n          ? top > min\n            ? (value - min) / (top - min)\n            : 0\n          : total > 0\n            ? value / total\n            : 0,\n      warn:\n        value !== null &&\n        ((high !== undefined && value > high) || (low !== undefined && value < low)),\n      notches: notchesOf(top),\n    }\n  })\n  const current = chart.current.map((stop) =>\n    rings.find((ring) => ring.category.key === stop.key)!,\n  )\n  const percent = numberFormatter(state.locale, {\n    style: 'percent',\n    maximumFractionDigits: 0,\n  })\n  const label = valueLabel ?? state.messages.value\n  const amountText = (ring: RadialRing) =>\n    maxKey === undefined\n      ? state.valueText(ring.value)\n      : state.messages.outOf(state.valueText(ring.value), state.valueText(ring.top))\n  const reader = listReader({\n    current: chart.current,\n    walk: { kind: 'straight', orientation: 'vertical' },\n    series: { kind: 'none' },\n    direction: state.direction,\n    hit: (point) =>\n      ringAt(\n        point.x - centre.x,\n        point.y - centre.y,\n        current.map((ring) => ring.band),\n        sweep,\n      ),\n    // The tooltip sits past the outer ring, where the ring's value ends.\n    anchor: (stop) => {\n      const ring = current[stop.index]\n      if (!ring || !measured) return null\n      return outerPoint(\n        endTurn(ring.fraction, sweep),\n        drawn.width,\n        drawn.height,\n        radius,\n        centre,\n      )\n    },\n    words: {\n      describe: (stop) => {\n        const ring = current[stop.index]\n        const name = pickedName(\n          stopText(stop.value),\n          chart.picked === stop.key,\n          state.messages,\n        )\n        return `${name}: ${ring ? `${amountText(ring)}, ${percent.format(ring.share)}` : ''}`\n      },\n      tooltip: (stop) => {\n        const ring = current[stop.index]\n        if (!ring) return null\n        return (\n          <ShareTooltipContent\n            chart={state}\n            category={ring.category}\n            name={stopText(ring.category.value)}\n            rows={[\n              {\n                label: null,\n                value: amountText(ring),\n                share: percent.format(ring.share),\n              },\n            ]}\n          />\n        )\n      },\n      table: {\n        header: state.messages.category,\n        columns: [label, state.messages.share],\n        rows: current.map((ring) => ({\n          key: ring.category.key,\n          name: stopText(ring.category.value),\n          cells: [amountText(ring), percent.format(ring.share)],\n        })),\n        footer: [],\n      },\n    },\n  })\n\n  return (\n    <RadialContext\n      value={{\n        stops: chart.stops,\n        nameText: stopText,\n        rings,\n        current,\n        sweep,\n        centre,\n        radius,\n        hole,\n        drawn,\n        measured,\n        centrePlace,\n        domain: [min, max],\n        laps,\n        addPart: parts.add,\n        valueLabel: label,\n        entering: chart.entering,\n      }}\n    >\n      <ListChartFrame\n        chart={chart}\n        reader={reader}\n        ref={ref}\n        slot='radial-chart'\n        description={description}\n        empty={empty}\n        measuring={false}\n        className={className}\n        placeholder={\n          chart.placeholder ? (\n            <RadialTracks slot='radial-chart-placeholder' breathe />\n          ) : (\n            (chart.status === 'empty' || chart.status === 'hidden') && (\n              <RadialTracks slot='radial-chart-track' />\n            )\n          )\n        }\n        {...figureProps(props, radialChartKeys)}\n      >\n        <RadialRings />\n        {children}\n      </ListChartFrame>\n    </RadialContext>\n  )\n}\n\n/**\n * Where the HTML parts sit: the circle's centre and how large a px of the\n * drawing is, as CSS variables. Before the plot is measured, the stand-in's\n * px are scaled to the plot as its SVG is, from the plot's own size.\n */\nfunction placeStyle(radial: RadialContextValue): CSSProperties {\n  const { drawn, centre, measured } = radial\n  if (measured) {\n    return {\n      '--radial-unit': '1px',\n      '--radial-x': `${round(centre.x)}px`,\n      '--radial-y': `${round(centre.y)}px`,\n    } as CSSProperties\n  }\n  const unit = `min(calc(100cqw / ${drawn.width}), calc(100cqh / ${drawn.height}))`\n  return {\n    '--radial-unit': unit,\n    '--radial-x': `calc(50cqw + ${round(centre.x - drawn.width / 2)} * ${unit})`,\n    '--radial-y': `calc(50cqh + ${round(centre.y - drawn.height / 2)} * ${unit})`,\n  } as CSSProperties\n}\n\n/** An SVG as large as the plot, drawn in the chart's px, or fitted to it from the stand-in. */\nfunction RadialSvg({ children }: { children: ReactNode }) {\n  const { drawn } = useRadial()\n  return (\n    <svg\n      className='absolute inset-0 size-full overflow-visible'\n      viewBox={`0 0 ${round(drawn.width)} ${round(drawn.height)}`}\n      preserveAspectRatio='xMidYMid meet'\n    >\n      {children}\n    </svg>\n  )\n}\n\n/** The rings, each in its category's colour, the one under the pointer or the keys bright. */\nfunction RadialRings() {\n  const chart = useChartRootValue()\n  const { spotlit } = useChartActive()\n  const radial = useRadial()\n  if (chart.status === 'empty' || chart.status === 'loading') return null\n  return (\n    <div\n      data-slot='radial-chart-rings'\n      aria-hidden\n      className={cn(plotLayerClassName, 'z-10')}\n    >\n      <RadialSvg>\n        {/*\n         * In the chart's fixed order, not the rings' from the outside in: an element moved in\n         * the page starts again with no transition, so a ring that leaves would vanish.\n         */}\n        {inPageOrder(radial.stops, radial.rings).map((ring) => {\n          const { category } = ring\n          const slot = chart.series.indexOf(category.key)\n          const lit = spotlit === category.index && !category.leaving\n          const dim =\n            (spotlit !== null && !lit && !category.leaving) ||\n            (chart.emphasis !== null && chart.emphasis !== category.key)\n          return (\n            <RingShape\n              key={category.key}\n              id={`${chart.id}-${category.key}`}\n              cx={round(radial.centre.x)}\n              cy={round(radial.centre.y)}\n              band={ring.band}\n              reach={radial.radius + 10}\n              fraction={ring.fraction}\n              sweep={radial.sweep}\n              laps={radial.laps}\n              notches={ring.notches}\n              dim={dim}\n              warn={ring.warn && !category.leaving}\n              leaving={category.leaving}\n              entering={radial.entering}\n              color={shareColor(chart, category)}\n              slot={slot === -1 ? category.index : slot}\n              pattern={slot === -1 ? 'solid' : chart.patternOf(category.key)}\n            />\n          )\n        })}\n      </RadialSvg>\n    </div>\n  )\n}\n\n/** A circle's length, as a multiple of its radius. */\nconst CIRCLE = round(TURN * 10_000) / 10_000\n\n/**\n * The dash along a ring's circle that draws a share of its arc, as CSS from\n * the ring's own `--ring-r` and `--ring-t`: its round caps reach exactly to\n * where the share starts and ends, and the dash never repeats round the\n * circle. `reach` is the share, as CSS, from 0 to 1.\n */\nfunction arcDash(reach: string, size: number): CSSProperties {\n  const length = `max(0.01px, calc(${reach} * ${round(size * CIRCLE * 10_000) / 10_000} * var(--ring-r) - var(--ring-t)))`\n  return {\n    '--dash': length,\n    strokeDasharray: `var(--dash) calc(${CIRCLE} * var(--ring-r) + var(--ring-t))`,\n    strokeDashoffset: `calc(var(--dash) + ${CIRCLE} * var(--ring-r) + var(--ring-t) / 2)`,\n  } as CSSProperties\n}\n\n/**\n * One ring: its track along the whole arc in a tint of its colour, its\n * value's arc over it, and on a whole circle, the lap past its top with a\n * shadow under the lap's end, as activity rings show it. Everything is\n * worked out from the ring's `--radial-value`, `--ring-r` and `--ring-t`,\n * which its transition runs from wherever they are. Memoised, so the\n * pointer moving between rings redraws only the ones it lights or dims.\n */\nconst RingShape = memo(function RingShape({\n  id,\n  cx,\n  cy,\n  band,\n  reach,\n  fraction,\n  sweep,\n  laps,\n  notches,\n  dim,\n  warn,\n  leaving,\n  entering,\n  color,\n  slot,\n  pattern,\n}: {\n  id: string\n  cx: number\n  cy: number\n  band: RingBand\n  /** How far out anything of a ring can reach while it moves, in px: the chart's radius and a little. */\n  reach: number\n  fraction: number\n  sweep: Sweep\n  laps: boolean\n  notches: readonly number[]\n  dim: boolean\n  warn: boolean\n  leaving: boolean\n  entering: boolean\n  color: string\n  slot: number\n  pattern: ChartPattern\n}) {\n  const middle = (band.inner + band.outer) / 2\n  const thickness = band.outer - band.inner\n  const patternId = `${id}-pattern`\n  const notchId = `${id}-notches`\n  const lapId = `${id}-lap`\n  // A circle starts on its right; turned back a quarter and on to the arc's start, it starts there.\n  const startDegrees = round(sweep.start * 360)\n  const turned = `rotate(${round(startDegrees - 90)} ${cx} ${cy})`\n  // The lap's end cap sits half the ring's thickness back from where the value ends.\n  const capBack = middle > 0 ? round((thickness / 2 / (TURN * middle)) * 360) : 0\n  const circle = {\n    cx,\n    cy,\n    style: {\n      r: 'var(--ring-r)',\n      strokeWidth: 'var(--ring-t)',\n    } as CSSProperties,\n  }\n  const share = laps ? 'clamp(0, var(--radial-value), 1)' : 'var(--radial-value)'\n  const lapReach = 'clamp(0, calc(var(--radial-value) - 1), 1)'\n  const stroke = pattern === 'solid' ? 'currentColor' : `url(#${patternId})`\n  const box = {\n    x: round(cx - reach),\n    y: round(cy - reach),\n    width: round(reach * 2),\n    height: round(reach * 2),\n  }\n  return (\n    <g\n      data-slot='radial-chart-ring'\n      data-dim={dim ? '' : undefined}\n      data-warn={warn ? '' : undefined}\n      data-leaving={leaving ? '' : undefined}\n      data-entering={entering ? '' : undefined}\n      className={cn(\n        '[--radial-value:var(--radial-to)] [--mark-color:var(--ring-color)] [--ring-r:var(--ring-r-to)] [--ring-t:var(--ring-t-to)] text-(--mark-ink) transition-none duration-(--motion-layout-duration) ease-[var(--motion-layout-fade-easing),var(--motion-layout-fade-easing),var(--motion-layout-easing),var(--motion-layout-easing),var(--motion-layout-easing)] group-data-mounted/chart:transition-[color,opacity,--radial-value,--ring-r,--ring-t] group-data-mounted/chart:starting:[--radial-value:0] group-data-mounted/chart:starting:[--ring-t:0px] data-entering:duration-(--motion-draw-duration) data-entering:ease-[var(--motion-layout-fade-easing),var(--motion-layout-fade-easing),var(--motion-draw-easing),var(--motion-layout-easing),var(--motion-layout-easing)] data-leaving:opacity-0 data-warn:[--mark-color:var(--destructive)] motion-reduce:group-data-mounted/chart:transition-[color,opacity]',\n        stepBackInkClassName,\n        forcedSeriesTextColor(slot),\n      )}\n      style={\n        {\n          '--ring-color': color,\n          // Variables, not the properties, so the class's starting values aren't overruled.\n          '--radial-to': round(fraction * 10_000) / 10_000,\n          '--ring-r-to': `${round(middle)}px`,\n          '--ring-t-to': `${round(thickness)}px`,\n        } as CSSProperties\n      }\n    >\n      {pattern !== 'solid' && <ChartSvgPattern id={patternId} pattern={pattern} />}\n      {notches.length > 0 && (\n        <defs>\n          {/* Where the ring warns: a notch cut through the track and the arc, as the Meter's. */}\n          <mask id={notchId} maskUnits='userSpaceOnUse' {...box}>\n            <rect {...box} fill='white' />\n            {notches.map((notch) => (\n              <line\n                key={notch}\n                x1={cx}\n                y1={cy}\n                x2={cx}\n                y2={round(cy - band.outer - 2)}\n                stroke='black'\n                strokeWidth={2}\n                transform={`rotate(${round(startDegrees + notch * sweep.size * 360)} ${cx} ${cy})`}\n              />\n            ))}\n          </mask>\n        </defs>\n      )}\n      <g mask={notches.length > 0 ? `url(#${notchId})` : undefined}>\n        <circle\n          {...circle}\n          data-slot='radial-chart-track'\n          transform={turned}\n          className='fill-none [stroke-linecap:round] stroke-[color-mix(in_oklab,var(--ring-color)_16%,transparent)] forced-colors:stroke-[GrayText]'\n          style={{ ...circle.style, ...(laps ? {} : arcDash('1', sweep.size)) }}\n        />\n        <circle\n          {...circle}\n          transform={turned}\n          className='fill-none [stroke-linecap:round] opacity-[min(1,calc(var(--radial-value)*1000000))]'\n          style={{\n            ...circle.style,\n            stroke,\n            ...arcDash(share, sweep.size),\n          }}\n        />\n        {laps && (\n          // From its top on, the ring is whole, its start and end no longer meeting in a seam,\n          // and the lap past it shows, ending in a cap that casts its shadow.\n          <g className='opacity-[clamp(0,calc((var(--radial-value)_-_1)*1000000_+_1),1)]'>\n            <defs>\n              <mask id={lapId} maskUnits='userSpaceOnUse' {...box}>\n                <circle {...circle} fill='none' stroke='white' />\n              </mask>\n            </defs>\n            <circle\n              {...circle}\n              className='fill-none'\n              style={{ ...circle.style, stroke }}\n            />\n            {/*\n             * The lap's end casts a shadow on the ring under it, ahead of where it ends, and only\n             * on the ring, so the overlap reads.\n             */}\n            <g\n              mask={`url(#${lapId})`}\n              // Only once it laps: at its top exactly, nothing overlaps to cast on.\n              className='opacity-[clamp(0,calc((var(--radial-value)_-_1)*1000000),1)]'\n            >\n              <g\n                className='[transform:rotate(calc(var(--radial-value)*360deg_+_var(--cap-turn)))]'\n                style={\n                  {\n                    transformOrigin: `${cx}px ${cy}px`,\n                    '--cap-turn': `${round(startDegrees - capBack)}deg`,\n                  } as CSSProperties\n                }\n              >\n                <circle\n                  cx={cx}\n                  className='fill-current [filter:drop-shadow(calc(var(--ring-t)*0.18)_0_calc(var(--ring-t)*0.18)_rgb(0_0_0/0.45))] forced-colors:hidden'\n                  style={\n                    {\n                      cy: `calc(${cy}px - var(--ring-r))`,\n                      r: 'calc(var(--ring-t) / 2)',\n                    } as CSSProperties\n                  }\n                />\n              </g>\n            </g>\n            {/* The lap, one turn at most, ending where the value ends. */}\n            <g\n              className='[transform:rotate(calc((var(--radial-value)_-_clamp(0,calc(var(--radial-value)_-_1),1))*360deg))]'\n              style={{ transformOrigin: `${cx}px ${cy}px` }}\n            >\n              <circle\n                {...circle}\n                transform={turned}\n                className='fill-none [stroke-linecap:round]'\n                style={{ ...circle.style, stroke, ...arcDash(lapReach, 1) }}\n              />\n            </g>\n          </g>\n        )}\n      </g>\n    </g>\n  )\n})\n\n/**\n * Every ring's track along the whole arc in the placeholder's tint: what\n * shows while the data loads, breathing slowly, and behind a chart with\n * nothing to draw, so it keeps its shape.\n */\nfunction RadialTracks({ slot, breathe = false }: { slot: string; breathe?: boolean }) {\n  const chart = useChartRootValue()\n  const radial = useRadial()\n  const bands = ringBandsOf(\n    radial.radius,\n    radial.hole,\n    chart.series.map(() => true),\n    RING_GAP,\n  )\n  const cx = round(radial.centre.x)\n  const cy = round(radial.centre.y)\n  const turned = `rotate(${round(radial.sweep.start * 360 - 90)} ${cx} ${cy})`\n  return (\n    <div\n      data-slot={slot}\n      aria-hidden\n      className={cn(\n        plotLayerClassName,\n        'z-10 transition-opacity duration-(--motion-enter-duration) ease-(--motion-enter-easing) group-data-mounted/chart:starting:opacity-0',\n      )}\n    >\n      <div className={cn('absolute inset-0', breathe && placeholderBreatheClassName)}>\n        <RadialSvg>\n          {bands.map((band, at) => (\n            <circle\n              key={chart.series[at]}\n              cx={cx}\n              cy={cy}\n              transform={turned}\n              className={cn(\n                'fill-none [stroke-linecap:round] stroke-current',\n                placeholderInkClassName,\n              )}\n              style={\n                {\n                  '--ring-r': `${round((band.inner + band.outer) / 2)}px`,\n                  '--ring-t': `${round(band.outer - band.inner)}px`,\n                  r: 'var(--ring-r)',\n                  strokeWidth: 'var(--ring-t)',\n                  ...(radial.laps ? {} : arcDash('1', radial.sweep.size)),\n                } as CSSProperties\n              }\n            />\n          ))}\n        </RadialSvg>\n      </div>\n    </div>\n  )\n}\n\n/** The rings in the chart's fixed order, which sorting or hiding them doesn't change. */\nfunction inPageOrder(categories: readonly ListChartStop[], rings: readonly RadialRing[]) {\n  return categories.flatMap((category) => {\n    const ring = rings.find((each) => each.category.key === category.key)\n    return ring ? [ring] : []\n  })\n}\n\n/** Tells the chart a part is there, so it leaves the part's room round the arc. */\nfunction useRadialPart(part: RadialPart) {\n  const { addPart } = useRadial()\n  useLayoutEffect(() => addPart(part), [addPart, part])\n}\n\n/**\n * What sits in the hole: the value and name of the ring under the pointer,\n * the keys, or picked, rolling in as it changes, and at rest, the first\n * ring's, or a value of your own under `label`. A ring that warns writes\n * its value in red, as the Meter does.\n */\nfunction RadialChartCentre({\n  value,\n  label,\n  content = 'value',\n  className,\n  style,\n  ...props\n}: Omit<ComponentProps<'div'>, 'children' | 'content'> & {\n  /** The value at rest, such as a total, in place of the first ring's. */\n  value?: number\n  /** The caption at rest: the first ring's name, or with `value`, the chart's `valueLabel`. */\n  label?: ReactNode\n  /** What the centre writes: each ring's value, or its share of its top. */\n  content?: 'value' | 'share'\n}) {\n  useRadialPart('centre')\n  const chart = useChartRootValue()\n  const { spotlit } = useChartActive()\n  const radial = useRadial()\n  if (chart.status !== 'ready') return null\n  const lit = spotlit === null ? undefined : radial.current[spotlit]\n  const ring = lit ?? radial.current[0]\n  if (!ring) return null\n  const own = !lit && value !== undefined\n  const shown = own ? value : content === 'share' ? ring.share : ring.value\n  const caption = lit\n    ? radial.nameText(lit.category.value)\n    : (label ?? (own ? radial.valueLabel : radial.nameText(ring.category.value)))\n  const format =\n    content === 'share' && !own\n      ? ({ style: 'percent', maximumFractionDigits: 0 } as const)\n      : chart.format\n  const place = radial.centrePlace\n  return (\n    <div\n      data-slot='radial-chart-centre'\n      aria-hidden\n      className={cn(plotLayerClassName, 'z-20', className)}\n      style={{ ...placeStyle(radial), ...style }}\n      {...props}\n    >\n      <div\n        className={cn(\n          'absolute top-(--radial-y) left-(--radial-x) flex justify-center',\n          place === 'middle' && '-translate-1/2',\n          place === 'above' && '-translate-x-1/2 -translate-y-full',\n        )}\n        style={\n          {\n            '--centre-hole': `calc(var(--radial-unit) * ${round(radial.hole * 2 * (place === 'below' ? 1.15 : 1))})`,\n            ...(place === 'below'\n              ? { translate: `-50% calc(var(--radial-unit) * ${HUB + 6})` }\n              : {}),\n          } as CSSProperties\n        }\n      >\n        <ChartCentreText\n          value={shown}\n          caption={caption}\n          format={format}\n          locale={chart.locale}\n          className={cn(\n            'transition-colors duration-(--motion-layout-duration) ease-(--motion-layout-fade-easing)',\n            !own && ring.warn && 'text-destructive',\n          )}\n        />\n      </div>\n    </div>\n  )\n}\n\n/**\n * A needle from a hub at the centre, pointing at the first ring's value, as\n * a gauge's. It turns in step with the ring's arc, on the same role, and\n * never past the arc's ends.\n */\nfunction RadialChartNeedle({\n  className,\n  ...props\n}: Omit<ComponentProps<'div'>, 'children'>) {\n  useRadialPart('needle')\n  const chart = useChartRootValue()\n  const radial = useRadial()\n  const ring = radial.current[0]\n  if (chart.status !== 'ready' || !ring) return null\n  const { x: cx, y: cy } = radial.centre\n  const innermost = radial.current.at(-1)?.band.inner ?? radial.hole\n  const length = Math.max(HUB * 2, innermost - NEEDLE_GAP)\n  const startDegrees = round(radial.sweep.start * 360)\n  return (\n    <div\n      data-slot='radial-chart-needle'\n      aria-hidden\n      className={cn(plotLayerClassName, 'z-20', className)}\n      {...props}\n    >\n      <RadialSvg>\n        <g\n          data-entering={radial.entering ? '' : undefined}\n          className='fill-foreground [--radial-needle:var(--needle-to)] [transform:rotate(calc(var(--needle-start)_+_clamp(0,var(--radial-needle),1)*var(--needle-span)))] transition-none duration-(--motion-layout-duration) ease-(--motion-layout-easing) group-data-mounted/chart:transition-[--radial-needle] group-data-mounted/chart:starting:[--radial-needle:0] data-entering:duration-(--motion-draw-duration) data-entering:ease-(--motion-draw-easing) motion-reduce:group-data-mounted/chart:transition-none forced-colors:fill-[CanvasText]'\n          style={\n            {\n              transformOrigin: `${round(cx)}px ${round(cy)}px`,\n              '--needle-to': round(ring.fraction * 10_000) / 10_000,\n              '--needle-start': `${startDegrees}deg`,\n              '--needle-span': `${round(radial.sweep.size * 360)}deg`,\n            } as CSSProperties\n          }\n        >\n          {/* Narrowing from the hub to its tip, at the top, turned to the value. */}\n          <path\n            d={`M${round(cx - HUB / 2)} ${round(cy)} L${round(cx - 0.75)} ${round(cy - length)} L${round(cx + 0.75)} ${round(cy - length)} L${round(cx + HUB / 2)} ${round(cy)} Z`}\n          />\n          <circle cx={round(cx)} cy={round(cy)} r={HUB} />\n          <circle cx={round(cx)} cy={round(cy)} r={HUB / 3} className='fill-background' />\n        </g>\n      </RadialSvg>\n    </div>\n  )\n}\n\n/**\n * The domain's ends, written under the arc's ends: what an empty and a\n * full arc stand for, as a gauge shows them. Nothing on a whole circle,\n * whose ends meet.\n */\nfunction RadialChartRange({\n  className,\n  style,\n  ...props\n}: Omit<ComponentProps<'div'>, 'children'>) {\n  useRadialPart('range')\n  const chart = useChartRootValue()\n  const radial = useRadial()\n  if (chart.status !== 'ready' || radial.laps) return null\n  const outer = radial.radius\n  const inner = outer === 0 ? 0 : radial.hole / outer\n  const ends = [\n    { turn: radial.sweep.start, value: radial.domain[0] },\n    { turn: radial.sweep.start + radial.sweep.size, value: radial.domain[1] },\n  ]\n  return (\n    <div\n      data-slot='radial-chart-range'\n      aria-hidden\n      className={cn(plotLayerClassName, 'z-20', className)}\n      style={{ ...placeStyle(radial), ...style }}\n      {...props}\n    >\n      {ends.map((end, at) => {\n        const point = endPoint(end.turn, inner)\n        return (\n          <span\n            key={at === 0 ? 'min' : 'max'}\n            dir='auto'\n            className='text-muted-foreground absolute top-(--radial-y) left-(--radial-x) tabular-nums'\n            style={{\n              translate: `calc(-50% + var(--radial-unit) * ${round(point.x * outer)}) calc(var(--radial-unit) * ${round(point.y * outer + RANGE_GAP)})`,\n            }}\n          >\n            {chart.valueText(end.value)}\n          </span>\n        )\n      })}\n    </div>\n  )\n}\n\n/** What a ring's label is given to write. */\ninterface RadialLabelRing {\n  key: string\n  /** The ring's name, from its config's label. */\n  name: string\n  value: number\n  /** Its value as a share of its top, or of the rings' total when it has none. */\n  share: number\n}\n\n/**\n * Writes each ring's name, value or share before its start, in the open\n * part of the circle, as a column that names the rings where they begin. A\n * label that would cross a ring, another label or the plot's edge is\n * skipped, and each moves with its ring's band.\n */\nfunction RadialChartLabels({\n  content = 'name',\n  className,\n  style,\n  ...props\n}: Omit<ComponentProps<'div'>, 'children' | 'content'> & {\n  /** What each label writes: the ring's name, its value, its share, or your own words. */\n  content?: 'name' | 'value' | 'share' | ((ring: RadialLabelRing) => string)\n}) {\n  const chart = useChartRootValue()\n  const { spotlit } = useChartActive()\n  const radial = useRadial()\n  if (chart.status !== 'ready') return null\n  const percent = numberFormatter(chart.locale, {\n    style: 'percent',\n    maximumFractionDigits: 0,\n  })\n  const textOf = (ring: RadialRing) => {\n    const named: RadialLabelRing = {\n      key: ring.category.key,\n      name: radial.nameText(ring.category.value),\n      value: ring.value,\n      share: ring.share,\n    }\n    if (typeof content === 'function') return content(named)\n    if (content === 'share') return percent.format(named.share)\n    if (content === 'value') return chart.valueText(named.value)\n    return named.name\n  }\n  const shown = labelsShown(\n    radial.rings.map((ring) => ({\n      width: chart.textWidth(textOf(ring)),\n      band: ring.band,\n      present: !ring.category.leaving,\n    })),\n    radial.sweep,\n    radial.centre,\n    radial.drawn,\n  )\n  return (\n    <div\n      data-slot='radial-chart-labels'\n      aria-hidden\n      className={cn(plotLayerClassName, 'z-20', className)}\n      style={{ ...placeStyle(radial), ...style }}\n      {...props}\n    >\n      {inPageOrder(radial.stops, radial.rings).map((ring) => {\n        const at = radial.rings.indexOf(ring)\n        const width = chart.textWidth(textOf(ring))\n        const box = startLabelBox(\n          radial.sweep.start,\n          (ring.band.inner + ring.band.outer) / 2,\n          width,\n          TEXT_HEIGHT,\n        )\n        return (\n          <RingLabel\n            key={ring.category.key}\n            x={(box.left + box.right) / 2}\n            y={(box.top + box.bottom) / 2}\n            shown={(shown[at] ?? false) && !radial.entering}\n            dim={\n              spotlit !== null &&\n              radial.current[spotlit]?.category.key !== ring.category.key\n            }\n          >\n            {textOf(ring)}\n          </RingLabel>\n        )\n      })}\n    </div>\n  )\n}\n\n/**\n * Which rings' labels show, by place: each present ring's, before its start,\n * unless it would cross a ring, a label of a ring further out, or the\n * plot's edge. Sizes in px, the centre's place in the plot `plot` px.\n */\nfunction labelsShown(\n  labels: readonly { width: number; band: RingBand; present: boolean }[],\n  sweep: Sweep,\n  centre: { x: number; y: number },\n  plot: { width: number; height: number },\n): boolean[] {\n  const drawnRings = labels.filter((label) => label.present)\n  const inner = drawnRings.at(-1)?.band.inner ?? 0\n  const outer = drawnRings[0]?.band.outer ?? 0\n  const placed: RadialBox[] = []\n  return labels.map((label) => {\n    if (!label.present || label.band.outer <= label.band.inner) return false\n    const box = startLabelBox(\n      sweep.start,\n      (label.band.inner + label.band.outer) / 2,\n      label.width,\n      TEXT_HEIGHT,\n    )\n    // A line of text is taller than its letters, so it may pass the plot's edge by a little.\n    const inside =\n      box.left + centre.x >= 0 &&\n      box.right + centre.x <= plot.width &&\n      box.top + centre.y >= -EDGE_SLACK &&\n      box.bottom + centre.y <= plot.height + EDGE_SLACK\n    if (!inside || !clearsArc(box, inner, outer, sweep) || !standsClear(box, placed)) {\n      return false\n    }\n    placed.push(box)\n    return true\n  })\n}\n\n/** One ring's label, moving with its ring's band. Memoised, as the rings are. */\nconst RingLabel = memo(function RingLabel({\n  x,\n  y,\n  shown,\n  dim,\n  children,\n}: {\n  x: number\n  y: number\n  shown: boolean\n  dim: boolean\n  children: string\n}) {\n  return (\n    <div\n      className={cn(\n        'absolute top-(--radial-y) left-(--radial-x) size-0 [translate:calc(var(--radial-unit)*var(--label-x))_calc(var(--radial-unit)*var(--label-y))] transition-none duration-(--motion-layout-duration) ease-[var(--motion-layout-fade-easing),var(--motion-layout-easing)] group-data-mounted/chart:transition-[opacity,translate] motion-reduce:group-data-mounted/chart:transition-opacity',\n        !shown && 'opacity-0',\n      )}\n      style={{ '--label-x': round(x), '--label-y': round(y) } as CSSProperties}\n    >\n      <span\n        dir='auto'\n        className={cn(\n          'absolute top-0 left-0 -translate-1/2 font-medium whitespace-nowrap tabular-nums transition-colors duration-(--motion-layout-duration) ease-(--motion-layout-fade-easing)',\n          dim ? 'text-muted-foreground' : 'text-foreground',\n        )}\n      >\n        {children}\n      </span>\n    </div>\n  )\n})\n\nexport {\n  clearsArc,\n  defaultInnerRadius,\n  endTurn,\n  labelsShown,\n  RadialChart,\n  RadialChartCentre,\n  RadialChartLabels,\n  type RadialChartProps,\n  RadialChartNeedle,\n  RadialChartRange,\n  type RadialLabelRing,\n  radialTop,\n  ringFraction,\n  ringOrder,\n  standInSize,\n  startLabelBox,\n}\n",
      "type": "registry:component",
      "target": "@components/kino/radial-chart.tsx"
    }
  ],
  "type": "registry:component"
}