{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "chart",
  "title": "Chart",
  "author": "superzero11 <https://github.com/superzero11/uiset>",
  "description": "The frame every UISet chart shares: title, a legend that isolates series, a Chart/Table switch with the table twin, a keyboard listbox of data positions, tooltips, palettes validated for color blindness per skin, and agent actions.",
  "dependencies": [
    "@ui-sdk/core@0.1.0-beta.5",
    "@ui-sdk/react@0.1.0-beta.5"
  ],
  "registryDependencies": [
    "https://uiset.dev/r/uiset.json",
    "https://uiset.dev/r/segmented-control.json"
  ],
  "files": [
    {
      "path": "registry/uiset/ui/chart.tsx",
      "content": "\"use client\"\n\nimport { usePart, usePrimitive, type PartProps } from \"@ui-sdk/react/primitive\"\nimport type { StateOf } from \"@ui-sdk/core\"\nimport {\n  createElement,\n  useEffect,\n  useId,\n  useLayoutEffect,\n  useRef,\n  useState,\n  type CSSProperties,\n  type ReactNode,\n} from \"react\"\nimport { chartPoints, type ChartCommands, type ChartSelectChange } from \"./chart/points\"\nimport { formatValue, type ChartValue } from \"./chart/scale\"\nimport { SegmentedControl, SegmentedControlItem } from \"./segmented-control\"\nimport \"./shell/shell.css\"\nimport \"./chart/tokens.css\"\nimport \"./chart/chart.css\"\n\n// The frame every UISet chart shares. A chart computes geometry; the frame gives it a\n// title, a legend that isolates series, a Chart/Table switch with the table twin, the\n// accessible layer of data positions over the drawing, the tooltip, and agent actions.\n\nimport {\n  seriesColor,\n  slotOf,\n  type ChartFrameSeries,\n  type ChartGeometry,\n  type ChartPlotContext,\n  type ChartPoint,\n  type ChartSeries,\n  type ChartTable,\n} from \"./chart/plot\"\nimport { tooltipRow, type VChild } from \"./chart/vnode\"\n\ntype ChartPlot = {\n  svg: ReactNode\n  points: ChartPoint[]\n  tooltip?: (key: string) => ReactNode\n  /** Drawn over the options, under the tooltip: crosshairs, end labels. */\n  overlay?: ReactNode\n}\n\ntype ChartFrameProps = {\n  title: string\n  description?: ReactNode\n  height?: number\n  series: ChartFrameSeries[]\n  table: ChartTable\n  orientation?: \"horizontal\" | \"vertical\"\n  /** Options in rows of this many (a heatmap), so Up and Down move by a row. */\n  columns?: number\n  /** Hover picks the nearest point rather than the one under the pointer (scatter). */\n  nearest?: boolean\n  selected?: string | null\n  /** The pin changed: by a person, an agent, or new data dropping the pinned position. */\n  onSelect?: (key: string | null, details: ChartSelectChange) => void\n  /** Rows for agents: the data as a person would read it. */\n  rows: () => unknown[]\n  plot: (context: ChartPlotContext) => ChartPlot\n  actions?: ReactNode\n  className?: string\n}\n\n/** A chart's drawing, as nodes, turned into React elements. */\nfunction toReact(children: readonly VChild[] | undefined): ReactNode {\n  return children?.map((child, index) => {\n    if (child === null || child === undefined || child === false) return null\n    if (typeof child !== \"object\") return child\n    // Unkeyed nodes take their place, marked so it can't meet a numeric key (\"0\").\n    const props: Record<string, unknown> = { key: child.key ?? `#${index}` }\n    for (const [name, value] of Object.entries(child.attrs)) {\n      if (value === undefined || value === null || value === false) continue\n      props[name === \"class\" ? \"className\" : name] = value\n    }\n    return createElement(child.tag, props, ...((toReact(child.children) as ReactNode[] | undefined) ?? []))\n  })\n}\n\n/** A chart's geometry, drawn by the React frame. */\nfunction reactPlot(geometry: ChartGeometry): ChartPlot {\n  return {\n    svg: toReact(geometry.svg),\n    points: geometry.points,\n    tooltip: geometry.tooltip ? (key) => toReact(geometry.tooltip!(key) ?? undefined) : undefined,\n    overlay: geometry.overlay ? toReact(geometry.overlay) : undefined,\n  }\n}\n\nfunction useWidth(fallback = 640) {\n  const ref = useRef<HTMLDivElement>(null)\n  const [width, setWidth] = useState(fallback)\n  useLayoutEffect(() => {\n    const el = ref.current\n    if (!el) return\n    // A hidden plot (the table is showing) measures 0; keep the last width.\n    const measure = () => {\n      if (el.clientWidth > 0) setWidth(Math.max(120, Math.round(el.clientWidth)))\n    }\n    measure()\n    const observer = new ResizeObserver(measure)\n    observer.observe(el)\n    return () => observer.disconnect()\n  }, [])\n  return [ref, width] as const\n}\n\ntype PointState = StateOf<typeof chartPoints, \"point\">\n\nfunction ChartOption({ value, ...props }: { value: string } & PartProps<\"div\", PointState>) {\n  return usePart(chartPoints, \"point\", { value }, props, \"div\")\n}\n\nfunction ChartLegend({\n  title,\n  series,\n  isolated,\n  onIsolate,\n}: {\n  title: string\n  series: ChartFrameSeries[]\n  isolated: string | null\n  onIsolate: (key: string | null) => void\n}) {\n  // Agents isolate a series with the chart's own `isolate`, which these buttons repeat.\n  return (\n    <div className=\"chart-legend\" role=\"group\" aria-label={`${title} series`} data-agent-hidden>\n      {series.map((s) => (\n        <button\n          key={s.key}\n          type=\"button\"\n          className=\"chart-legend-item\"\n          aria-pressed={isolated === s.key}\n          data-dimmed={isolated && isolated !== s.key ? \"\" : undefined}\n          onClick={() => onIsolate(isolated === s.key ? null : s.key)}\n          style={{ \"--series\": seriesColor(series, s.key) } as CSSProperties}\n        >\n          <span className=\"chart-swatch\" data-shape={s.shape} aria-hidden=\"true\" />\n          {s.label}\n        </button>\n      ))}\n    </div>\n  )\n}\n\nfunction ChartTableView({ title, table }: { title: string; table: ChartTable }) {\n  return (\n    <div className=\"chart-table-scroller\" role=\"region\" aria-label={`${title} table`} tabIndex={0}>\n      <table className=\"chart-table\">\n        <caption className=\"uiset-visually-hidden\">{title}</caption>\n        <thead>\n          <tr>\n            {table.head.map((cell, i) => (\n              <th key={i} scope=\"col\" data-numeric={table.numeric?.[i] ? \"\" : undefined}>\n                {cell}\n              </th>\n            ))}\n          </tr>\n        </thead>\n        <tbody>\n          {table.rows.map((row) => (\n            <tr key={row.key}>\n              {row.cells.map((cell, i) =>\n                i === 0 ? (\n                  <th key={i} scope=\"row\">\n                    {cell}\n                  </th>\n                ) : (\n                  <td key={i} data-numeric={table.numeric?.[i] ? \"\" : undefined}>\n                    {cell}\n                  </td>\n                ),\n              )}\n            </tr>\n          ))}\n        </tbody>\n      </table>\n    </div>\n  )\n}\n\nfunction ChartFrame({\n  title,\n  description,\n  height = 240,\n  series,\n  table,\n  orientation = \"horizontal\",\n  columns,\n  nearest = false,\n  selected: selectedProp,\n  onSelect,\n  rows,\n  plot,\n  actions,\n  className,\n}: ChartFrameProps) {\n  const titleId = useId()\n  const [view, setView] = useState<\"chart\" | \"table\">(\"chart\")\n  const [isolatedInner, setIsolated] = useState<string | null>(null)\n  // A series that's gone isn't isolated: new `series` show them all.\n  const isolated = isolatedInner !== null && series.some((s) => s.key === isolatedInner) ? isolatedInner : null\n  const [active, setActive] = useState<string | null>(null)\n  const [selectedInner, setSelectedInner] = useState<string | null>(null)\n  const selected = selectedProp !== undefined ? selectedProp : selectedInner\n  const [plotRef, width] = useWidth()\n  const shown = (key: string) => !isolated || isolated === key\n  const select = (key: string | null, details: ChartSelectChange) => {\n    if (selectedProp === undefined) setSelectedInner(key)\n    onSelect?.(key, details)\n  }\n  const drawn = plot({ width, height, shown, active, selected })\n  // Agents name a position by what people read (\"March\"), and only then by its key: a\n  // sorted bar chart's keys aren't its readings.\n  const byLabel = (name: string) => {\n    const wanted = name.toLowerCase()\n    return (\n      drawn.points.find((p) => p.label.toLowerCase() === wanted) ??\n      drawn.points.find((p) => p.label.toLowerCase().startsWith(`${wanted}:`)) ??\n      drawn.points.find((p) => p.key === name)\n    )\n  }\n  // A pin the data no longer has is let go, and the page hears so.\n  const stale = selected !== null && !drawn.points.some((p) => p.key === selected)\n  useEffect(() => {\n    if (stale) select(null, { source: \"data\", reason: \"removed\" })\n  })\n\n  const commands: ChartCommands = {\n    select: (name) => {\n      if (name === null) {\n        select(null, { source: \"agent\", reason: \"command\" })\n        return true\n      }\n      const point = byLabel(name)\n      if (!point) throw new Error(`No \"${name}\" in ${title}.`)\n      select(point.key, { source: \"agent\", reason: \"command\" })\n      return true\n    },\n    isolate: (name) => {\n      const found = series.find(\n        (s) => s.key === name || s.label.toLowerCase() === name.toLowerCase(),\n      )\n      if (!found)\n        throw new Error(\n          `No series \"${name}\" in ${title}. Its series: ${series.map((s) => s.label).join(\", \")}.`,\n        )\n      setIsolated(found.key)\n      return true\n    },\n    showAll: () => {\n      setIsolated(null)\n      return true\n    },\n    showTable: (on) => {\n      setView(on ? \"table\" : \"chart\")\n      return true\n    },\n  }\n\n  const handle = usePrimitive(chartPoints, {\n    orientation,\n    columns,\n    nearest,\n    selected,\n    onSelect: select,\n    onActiveChange: setActive,\n    items: rows,\n    view: {\n      showing: view,\n      series: isolated ? series.find((s) => s.key === isolated)?.label : \"all\",\n      ...(selected ? { pinned: drawn.points.find((p) => p.key === selected)?.label } : {}),\n    },\n    commands,\n  })\n\n  const anchor = drawn.points.find((p) => p.key === active) ?? drawn.points.find((p) => p.key === selected)\n  const tip = anchor && drawn.tooltip?.(anchor.key)\n  const flip = anchor ? anchor.anchor.x > width * 0.6 : false\n\n  const layer = usePart(\n    handle,\n    \"root\",\n    {},\n    {\n      \"aria-label\": title,\n      className: \"chart-points\",\n      // Scatter points can sit close together; the pointer only has to be nearest.\n      onPointerMove: nearest\n        ? (event: React.PointerEvent<HTMLDivElement>) => {\n            const box = event.currentTarget.getBoundingClientRect()\n            const px = event.clientX - box.left\n            const py = event.clientY - box.top\n            let best: ChartPoint | undefined\n            let distance = 48 * 48\n            for (const point of drawn.points) {\n              const dx = point.x + point.width / 2 - px\n              const dy = point.y + point.height / 2 - py\n              const d = dx * dx + dy * dy\n              if (d < distance) {\n                distance = d\n                best = point\n              }\n            }\n            handle.api.setActive(best?.key ?? null)\n          }\n        : undefined,\n      // A click pins the point the tooltip shows.\n      onClick: nearest\n        ? (event: React.MouseEvent) => {\n            if (event.detail > 0) handle.api.toggleActive()\n          }\n        : undefined,\n      children: drawn.points.map((point) => (\n        <ChartOption\n          key={point.key}\n          value={point.key}\n          aria-label={point.label}\n          className=\"chart-point\"\n          style={{ left: point.x, top: point.y, width: point.width, height: point.height }}\n        />\n      )),\n    },\n    \"div\",\n  )\n\n  return (\n    <figure\n      className={[\"chart\", className].filter(Boolean).join(\" \")}\n      aria-labelledby={titleId}\n      data-view={view}\n    >\n      <figcaption className=\"chart-header\">\n        <div className=\"chart-heading\">\n          <span id={titleId} className=\"chart-title\">\n            {title}\n          </span>\n          {description && <span className=\"chart-description\">{description}</span>}\n        </div>\n        <div className=\"chart-actions\">\n          {actions}\n          {/* Agents use the chart's showTable action; the switch would only add noise. With\n              the table showing, the chart's actions are out of reach, so the switch is how\n              an agent gets back. */}\n          <SegmentedControl\n            data-agent-hidden={view === \"chart\" ? \"\" : undefined}\n            aria-label={`Show ${title} as`}\n            value={view}\n            onValueChange={(next) => next && setView(next as \"chart\" | \"table\")}\n          >\n            <SegmentedControlItem value=\"chart\">Chart</SegmentedControlItem>\n            <SegmentedControlItem value=\"table\">Table</SegmentedControlItem>\n          </SegmentedControl>\n        </div>\n      </figcaption>\n      {series.length > 1 && view === \"chart\" && (\n        <ChartLegend title={title} series={series} isolated={isolated} onIsolate={setIsolated} />\n      )}\n      <div ref={plotRef} className=\"chart-plot\" style={{ blockSize: height }} hidden={view !== \"chart\"}>\n        <svg\n          className=\"chart-svg\"\n          width={width}\n          height={height}\n          viewBox={`0 0 ${width} ${height}`}\n          aria-hidden=\"true\"\n          focusable=\"false\"\n        >\n          {drawn.svg}\n        </svg>\n        {layer}\n        {drawn.overlay}\n        {tip && (\n          <div\n            className=\"chart-tooltip\"\n            aria-hidden=\"true\"\n            data-flip={flip ? \"\" : undefined}\n            style={{ left: anchor.anchor.x, top: anchor.anchor.y }}\n          >\n            {tip}\n          </div>\n        )}\n      </div>\n      {view === \"table\" && <ChartTableView title={title} table={table} />}\n    </figure>\n  )\n}\n\n/** A tooltip row: a line key in the series color, the value strong, the name after. */\nfunction ChartTooltipRow({\n  color,\n  value,\n  label,\n  shape = \"line\",\n}: {\n  color: string\n  value: string\n  label: string\n  shape?: \"line\" | \"rect\" | \"dot\"\n}) {\n  return toReact([tooltipRow(color, value, label, shape)])\n}\n\nexport { ChartFrame, ChartTooltipRow, formatValue, reactPlot, seriesColor, slotOf, toReact }\nexport type {\n  ChartFrameProps,\n  ChartFrameSeries,\n  ChartPlot,\n  ChartPlotContext,\n  ChartPoint,\n  ChartSeries,\n  ChartTable,\n  ChartValue,\n}\n",
      "type": "registry:ui",
      "target": "@ui/chart.tsx"
    },
    {
      "path": "registry/uiset/ui/chart/points.ts",
      "content": "import { createRovingFocus, definePrimitive, selects } from \"@ui-sdk/core\"\n\n// The part of a chart people and assistive tech use. The SVG only draws; over it sits a\n// listbox with one option per data position (an x for lines, a category for bars, a\n// point for scatter, a part for a segmented bar). One tab stop, arrows between options,\n// Enter to pin one. Hover and focus share the same \"active\" option, so the tooltip and\n// the crosshair follow either.\n\ntype ChartSelectDetails = {\n  /** What the person used. */\n  source: \"keyboard\" | \"pointer\"\n  /** \"toggle\" pins or unpins a position; \"dismiss\" is Escape letting go of the pin. */\n  reason: \"toggle\" | \"dismiss\"\n}\n\n/** Every way a chart's pin changes, as its frame reports it: a person's, an agent's, or the data dropping the pinned position. */\ntype ChartSelectChange = {\n  source: ChartSelectDetails[\"source\"] | \"agent\" | \"data\"\n  reason: ChartSelectDetails[\"reason\"] | \"command\" | \"removed\"\n}\n\ntype ChartCommands = {\n  select?: (point: string | null) => boolean\n  isolate?: (series: string) => boolean\n  showAll?: () => boolean\n  showTable?: (shown: boolean) => boolean\n}\n\ntype ChartPointsOptions = {\n  /** Which arrows move: Left/Right for lines and columns, Up/Down for horizontal bars. */\n  orientation?: \"horizontal\" | \"vertical\" | \"both\"\n  /** Options laid out in rows of this many, like a heatmap: Up and Down move by a row. */\n  columns?: number\n  /** The pointer picks the nearest option (scatter), so a click pins that one, not the box under it. */\n  nearest?: boolean\n  /** The pinned option's key, or null. */\n  selected?: string | null\n  /** A person pins or unpins a position: how, and why. Agents pin through `commands.select`. */\n  onSelect?: (key: string | null, details: ChartSelectDetails) => void\n  /** The option under the pointer or holding focus, for the tooltip and crosshair. */\n  onActiveChange?: (key: string | null) => void\n  /** The data as rows, for agents. */\n  items?: () => unknown[]\n  /** What the chart shows now (series, view), for agents. */\n  view?: object\n  commands?: ChartCommands\n}\n\n/**\n * Agents read items as `{ value, label }` and drop other fields, so a row as a person\n * reads it goes in the label: its first field, then the rest, like \"Jan (Revenue: $12k)\".\n */\nconst asItems = (rows: unknown[], valueKey?: string) =>\n  rows.map((row, index) => {\n    if (!row || typeof row !== \"object\") return { value: String(row), label: String(row) }\n    const record = row as Record<string, unknown>\n    const entries = Object.entries(record).filter(([key]) => key !== valueKey)\n    const [first, ...rest] = entries\n    const head = first ? String(first[1]) : \"\"\n    const label = rest.length ? `${head} (${rest.map(([key, value]) => `${key}: ${value}`).join(\", \")})` : head\n    return { value: valueKey && valueKey in record ? String(record[valueKey]) : head || String(index), label }\n  })\n\n/** @internal Left out of @uiset/web's declarations: its type names UI SDK internals. */\nconst chartPoints = definePrimitive({\n  name: \"chart\",\n  options: {\n    orientation: \"string\",\n    columns: \"number\",\n    nearest: \"boolean\",\n    selected: \"value\",\n    onSelect: \"callback\",\n    onActiveChange: \"callback\",\n    items: \"value\",\n    view: \"value\",\n    commands: \"value\",\n  },\n  state: (options: ChartPointsOptions) => ({\n    focused: null as string | null,\n    active: null as string | null,\n    selected: options.selected ?? null,\n    view: options.view ?? {},\n    orientation: options.orientation ?? \"horizontal\",\n    grid: (options.columns ?? 0) > 0,\n  }),\n  sync: (options) => ({\n    selected: options.selected ?? null,\n    view: options.view ?? {},\n    orientation: options.orientation ?? \"horizontal\",\n    grid: (options.columns ?? 0) > 0,\n  }),\n  api: (context) => {\n    const opts = () => context.options()\n    const roving = createRovingFocus(context, {\n      slot: \"point\",\n      key: \"focused\",\n      // Data order with Home and End; Up and Down move a row when options form a grid,\n      // and stop at its edges. Charts draw left to right in every language, so Right is\n      // always the next position. Modified arrows are left to the browser.\n      move: (event, { from, items }) => {\n        if (event.ctrlKey || event.metaKey || event.altKey) return undefined\n        const index = items.findIndex((item) => item.key === from.key)\n        const columns = opts().columns ?? 0\n        const orientation = opts().orientation ?? \"horizontal\"\n        const across = columns > 0 || orientation !== \"vertical\"\n        const down = columns > 0 ? columns : orientation !== \"horizontal\" ? 1 : 0\n        // In a grid, Left and Right stop at the row's ends instead of wrapping to the next.\n        const atRowStart = columns > 0 && index % columns === 0\n        const atRowEnd = columns > 0 && index % columns === columns - 1\n        let next: number | undefined\n        if (event.key === \"Home\") next = 0\n        else if (event.key === \"End\") next = items.length - 1\n        else if (event.key === \"ArrowRight\" && across) next = atRowEnd ? index : index + 1\n        else if (event.key === \"ArrowLeft\" && across) next = atRowStart ? index : index - 1\n        else if (event.key === \"ArrowDown\" && down) next = index + down\n        else if (event.key === \"ArrowUp\" && down) next = index - down\n        if (next === undefined) return undefined\n        if (next < 0 || next >= items.length) return from.key\n        return items[next]?.key\n      },\n    })\n    const setActive = (key: string | null) => {\n      if (context.store.get().active === key) return\n      context.store.set({ active: key })\n      opts().onActiveChange?.(key)\n    }\n    const command = <K extends keyof ChartCommands>(name: K) => {\n      const run = opts().commands?.[name]\n      if (!run) throw new Error(`This chart doesn't support ${name}.`)\n      return run as NonNullable<ChartCommands[K]>\n    }\n    const toggle = (key: string, source: ChartSelectDetails[\"source\"] = \"pointer\") => {\n      opts().onSelect?.(context.store.get().selected === key ? null : key, { source, reason: \"toggle\" })\n    }\n    return {\n      roving,\n      setActive,\n      toggle,\n      /** Pins (or unpins) the option under the pointer or holding focus. */\n      toggleActive: () => {\n        const key = context.store.get().active\n        if (key !== null) toggle(key)\n      },\n      nearest: () => opts().nearest ?? false,\n      items: () => asItems(opts().items?.() ?? []),\n      keydown(event: KeyboardEvent, key: string, el: HTMLElement | undefined) {\n        // `press` covers clicks and screen readers; an option gets no click from keys.\n        if (event.key === \"Enter\" || event.key === \" \") {\n          event.preventDefault()\n          toggle(key, \"keyboard\")\n          return\n        }\n        if (event.key === \"Escape\") {\n          // Unpin first; with nothing pinned, Escape dismisses the tooltip (WCAG 1.4.13).\n          if (context.store.get().selected !== null) {\n            event.preventDefault()\n            opts().onSelect?.(null, { source: \"keyboard\", reason: \"dismiss\" })\n            return\n          }\n          if (context.store.get().active !== null) {\n            event.preventDefault()\n            setActive(null)\n            return\n          }\n        }\n        if (el) roving.keydown(event, el)\n      },\n      select: (point: string | null) => command(\"select\")(point),\n      isolate: (series: string) => command(\"isolate\")(series),\n      showAll: () => command(\"showAll\")(),\n      showTable: (shown: boolean) => command(\"showTable\")(shown),\n    }\n  },\n  slots: (slot) => ({\n    root: slot({\n      role: \"listbox\",\n      keys: { none: \"Each option handles the arrows.\" },\n      attrs: (state) => ({\n        // A grid of options (a heatmap) moves both ways, so it names no single direction.\n        \"aria-orientation\": state.grid\n          ? undefined\n          : state.orientation === \"vertical\"\n            ? \"vertical\"\n            : \"horizontal\",\n      }),\n      on: {\n        // Leaving with the pointer falls back to this chart's focused option, if any.\n        pointerleave: (_event, { api, store, el }) => {\n          const inside = !!el && el.contains(document.activeElement)\n          api.setActive(inside ? store.get().focused : null)\n        },\n      },\n    }),\n    point: slot<{ value: string }, { active: boolean; selected: boolean }>({\n      props: { value: \"string\" },\n      role: \"option\",\n      focus: \"roving\",\n      keys: [\"ArrowLeft\", \"ArrowRight\", \"ArrowUp\", \"ArrowDown\", \"Home\", \"End\", \"Enter\", \" \", \"Escape\"],\n      // A click or a screen reader's activation pins the option; Enter and Space do too.\n      // With nearest-point picking, a real click belongs to the chart, which pins the\n      // point the tooltip shows rather than the box under the pointer.\n      press: ({ api, key }, event) => {\n        const pointer = event instanceof MouseEvent && event.detail > 0\n        if (pointer && api.nearest()) return\n        api.toggle(key, pointer ? \"pointer\" : \"keyboard\")\n      },\n      selects: selects({\n        active: ({ key }) => [key, null],\n        selected: ({ key }) => [key, null],\n        focused: ({ key }) => [key, null],\n      }),\n      state: (state, { key }) => ({ active: state.active === key, selected: state.selected === key }),\n      attrs: (state, part) => ({\n        tabindex: part.api.roving.tabIndex(state, part),\n        \"aria-selected\": String(state.selected === part.key),\n        \"data-active\": state.active === part.key ? \"\" : undefined,\n        \"data-selected\": state.selected === part.key ? \"\" : undefined,\n      }),\n      on: {\n        keydown: (event, { api, key, el }) => api.keydown(event as KeyboardEvent, key, el),\n        focus: (_event, { api, key }) => api.setActive(key),\n        blur: (_event, { api }) => api.setActive(null),\n        pointermove: (_event, { api, key }) => api.setActive(key),\n      },\n      bind: (el, part) => part.api.roving.bind(el, part),\n    }),\n  }),\n  agent: {\n    actions: [\"select\", \"isolate\", \"showAll\", \"showTable\"],\n    items: (api) => api.items(),\n  },\n})\n\nexport { chartPoints }\nexport type { ChartCommands, ChartPointsOptions, ChartSelectChange, ChartSelectDetails }\n",
      "type": "registry:file",
      "target": "@ui/chart/points.ts"
    },
    {
      "path": "registry/uiset/ui/chart/scale.ts",
      "content": "// Framework-free scales and ticks for UISet charts. Pure functions, so they run on a\n// server and in tests, and every chart shares one idea of \"a nice axis\".\n\ntype Linear = {\n  (value: number): number\n  domain: [number, number]\n  range: [number, number]\n  ticks: number[]\n  invert: (pixel: number) => number\n}\n\n// 1, 2, 2.5, 5 × 10^n: steps people read without effort.\nfunction niceStep(span: number, count: number) {\n  const raw = span / Math.max(1, count)\n  const power = 10 ** Math.floor(Math.log10(raw))\n  const fraction = raw / power\n  const nice = fraction <= 1 ? 1 : fraction <= 2 ? 2 : fraction <= 2.5 ? 2.5 : fraction <= 5 ? 5 : 10\n  return nice * power\n}\n\n/** Rounds a domain out to nice steps and lists its ticks. Zero stays in when asked. */\nfunction niceDomain(min: number, max: number, count = 5, zero = true) {\n  let lo = zero ? Math.min(0, min) : min\n  let hi = zero ? Math.max(0, max) : max\n  if (lo === hi) {\n    hi = lo === 0 ? 1 : lo + Math.abs(lo) * 0.5\n    if (!zero) lo -= Math.abs(lo) * 0.5 || 1\n  }\n  const step = niceStep(hi - lo, count)\n  lo = Math.floor(lo / step) * step\n  hi = Math.ceil(hi / step) * step\n  const ticks: number[] = []\n  for (let v = lo; v <= hi + step / 2; v += step) ticks.push(Number(v.toFixed(10)))\n  return { domain: [lo, hi] as [number, number], ticks }\n}\n\n/** The smallest and largest finite values, or undefined for none. A loop, so any length works. */\nfunction extent(values: readonly (number | null | undefined)[]): [number | undefined, number | undefined] {\n  let lo: number | undefined\n  let hi: number | undefined\n  for (const v of values) {\n    if (v === null || v === undefined || !Number.isFinite(v)) continue\n    if (lo === undefined || v < lo) lo = v\n    if (hi === undefined || v > hi) hi = v\n  }\n  return [lo, hi]\n}\n\nfunction linear(\n  values: readonly number[],\n  range: [number, number],\n  { count = 5, zero = true, domain }: { count?: number; zero?: boolean; domain?: [number, number] } = {},\n): Linear {\n  const [lo, hi] = extent(values)\n  const nice = domain\n    ? niceDomain(domain[0], domain[1], count, false)\n    : niceDomain(lo ?? 0, hi ?? 1, count, zero)\n  const [d0, d1] = nice.domain\n  const [r0, r1] = range\n  const scale = ((value: number) => r0 + ((value - d0) / (d1 - d0 || 1)) * (r1 - r0)) as Linear\n  scale.domain = nice.domain\n  scale.range = range\n  scale.ticks = nice.ticks\n  scale.invert = (pixel) => d0 + ((pixel - r0) / (r1 - r0 || 1)) * (d1 - d0)\n  return scale\n}\n\ntype Band = {\n  (key: string): number\n  bandwidth: number\n  step: number\n  keys: readonly string[]\n}\n\n/** Even bands for categories, with an inner gap between them and an outer margin. */\nfunction band(keys: readonly string[], range: [number, number], padding = 0.3): Band {\n  const [r0, r1] = range\n  const n = Math.max(1, keys.length)\n  const step = (r1 - r0) / (n + padding)\n  const bandwidth = step * (1 - padding)\n  const index = new Map(keys.map((key, i) => [key, i]))\n  const scale = ((key: string) => r0 + step * padding + step * (index.get(key) ?? 0)) as Band\n  scale.bandwidth = bandwidth\n  scale.step = step\n  scale.keys = keys\n  return scale\n}\n\n/** Points spread evenly across the range, for x positions of a line. */\nfunction point(count: number, range: [number, number]) {\n  const [r0, r1] = range\n  return (index: number) => (count <= 1 ? (r0 + r1) / 2 : r0 + ((r1 - r0) * index) / (count - 1))\n}\n\n/** Axis labels: full under 10,000, compact past it (10K, 1.2M), one style per axis. */\nfunction tickFormatter(ticks: readonly number[], locale?: string) {\n  const top = Math.max(...ticks.map(Math.abs))\n  const compact = top >= 10000\n  const step = ticks.length > 1 ? Math.abs(ticks[1]! - ticks[0]!) : 1\n  // As many decimals as the step has (0.25 → 2), so ticks never round onto each other.\n  const digits = Math.min(4, (String(Number(step.toFixed(10))).split(\".\")[1] ?? \"\").length)\n  const format = new Intl.NumberFormat(locale, {\n    notation: compact ? \"compact\" : \"standard\",\n    maximumFractionDigits: compact ? 1 : digits,\n  })\n  return (value: number) => format.format(value)\n}\n\n/** Picks up to `count` evenly spaced indexes to label, always keeping the first and last. */\nfunction labelIndexes(length: number, count: number) {\n  if (length <= count) return Array.from({ length }, (_, i) => i)\n  const step = Math.ceil((length - 1) / (count - 1))\n  const picked: number[] = []\n  for (let i = 0; i < length; i += step) picked.push(i)\n  if (picked.at(-1) !== length - 1) {\n    if (length - 1 - picked.at(-1)! < step / 2) picked.pop()\n    picked.push(length - 1)\n  }\n  return picked\n}\n\ntype ChartValue = number | null | undefined\n\n/**\n * A value formatter: yours, or plain numbers in `locale`. Pass a locale when rendering on\n * a server, so server and browser print the same digits.\n */\nfunction numberFormat(locale?: string, format?: (value: number) => string): (value: number) => string {\n  return format ?? new Intl.NumberFormat(locale, { maximumFractionDigits: 2 }).format\n}\n\n/** A value as a person reads it, or \"No data\" for a gap. */\nfunction formatValue(value: ChartValue, format?: (value: number) => string, locale?: string) {\n  return value === null || value === undefined || !Number.isFinite(value)\n    ? \"No data\"\n    : numberFormat(locale, format)(value)\n}\n\nexport {\n  band,\n  extent,\n  formatValue,\n  labelIndexes,\n  linear,\n  niceDomain,\n  niceStep,\n  numberFormat,\n  point,\n  tickFormatter,\n}\nexport type { Band, ChartValue, Linear }\n",
      "type": "registry:file",
      "target": "@ui/chart/scale.ts"
    },
    {
      "path": "registry/uiset/ui/chart/plot.ts",
      "content": "// What every chart hands its frame, framework-free: the series for the legend, the table\n// twin, rows for agents, and, for a given size, the drawing and the data positions.\nimport type { ChartValue } from \"./scale\"\nimport type { VChild, VNode } from \"./vnode\"\n\ntype ChartSeries<Datum> = {\n  key: string\n  label: string\n  value: (datum: Datum) => ChartValue\n}\n\ntype ChartFrameSeries = { key: string; label: string; shape: \"line\" | \"rect\" | \"dot\" }\n\n/** One data position people and assistive tech can reach: its reading and its box. */\ntype ChartPoint = {\n  key: string\n  /** What a screen reader hears, and what an agent reads: \"March: Revenue $12,400\". */\n  label: string\n  x: number\n  y: number\n  width: number\n  height: number\n  /** Where the tooltip points. */\n  anchor: { x: number; y: number }\n}\n\ntype ChartPlotContext = {\n  width: number\n  height: number\n  shown: (series: string) => boolean\n  active: string | null\n  selected: string | null\n}\n\ntype ChartTable = {\n  head: string[]\n  rows: { key: string; cells: string[] }[]\n  /** Columns holding numbers, aligned to the end. */\n  numeric?: boolean[]\n}\n\n/** A chart's drawing at one size: SVG nodes, the positions over them, and tooltips. */\ntype ChartGeometry = {\n  svg: VChild[]\n  points: ChartPoint[]\n  tooltip?: (key: string) => VChild[] | null\n  /** Drawn over the options, under the tooltip: crosshairs, end labels. */\n  overlay?: VNode[]\n}\n\n/** What the frame shows besides the drawing. */\ntype ChartFrameData = {\n  series: ChartFrameSeries[]\n  table: ChartTable\n  rows: () => unknown[]\n  className: string\n  orientation?: \"horizontal\" | \"vertical\"\n  /** Options in rows of this many (a heatmap), so Up and Down move by a row. */\n  columns?: number\n  /** Hover picks the nearest point rather than the one under the pointer (scatter). */\n  nearest?: boolean\n}\n\nconst slotOf = (index: number) => (index < 8 ? `var(--chart-${index + 1})` : \"var(--chart-other)\")\n\n/** Color follows the entity: a series keeps its slot whatever else is shown. */\nfunction seriesColor(series: readonly { key: string }[], key: string) {\n  return slotOf(series.findIndex((s) => s.key === key))\n}\n\n/**\n * The position the drawing follows: the one under the pointer or focus, else the pinned\n * one, and never a key the data no longer has (a stale pin draws nothing, not a crosshair\n * off the edge).\n */\nfunction focusKey(active: string | null, pinned: string | null, has: (key: string) => boolean) {\n  if (active !== null && has(active)) return active\n  if (pinned !== null && has(pinned)) return pinned\n  return null\n}\n\nexport { focusKey, seriesColor, slotOf }\nexport type { ChartFrameData, ChartFrameSeries, ChartGeometry, ChartPlotContext, ChartPoint, ChartSeries, ChartTable }\n",
      "type": "registry:file",
      "target": "@ui/chart/plot.ts"
    },
    {
      "path": "registry/uiset/ui/chart/vnode.ts",
      "content": "// A chart's drawing as plain data: what to draw, not how. Each chart computes its geometry\n// once, into these nodes; the React frame turns them into elements and the web elements into\n// DOM, so both draw exactly the same thing.\n\ntype VAttrs = Record<string, string | number | boolean | null | undefined | Record<string, string | number>>\n\ntype VNode = { tag: string; attrs: VAttrs; children: VChild[]; key?: string | number }\ntype VChild = VNode | string | number | null | undefined | false\n\n/** v(\"circle\", { className: \"chart-dot\", cx, cy, r: 4 }) */\nfunction v(tag: string, attrs: VAttrs & { key?: string | number } = {}, ...children: (VChild | VChild[])[]): VNode {\n  const { key, ...rest } = attrs\n  return { tag, attrs: rest as VAttrs, children: children.flat() as VChild[], key: key as string | number | undefined }\n}\n\n/** A tooltip row: a key in the series color, the value strong, the name after. */\nfunction tooltipRow(color: string, value: string, label: string, shape: \"line\" | \"rect\" | \"dot\" = \"line\", key?: string) {\n  return v(\n    \"span\",\n    { key, className: \"chart-tooltip-row\", style: { \"--series\": color } },\n    v(\"span\", { className: \"chart-swatch\", \"data-shape\": shape }),\n    v(\"strong\", {}, value),\n    v(\"span\", {}, label),\n  )\n}\n\n/** The attribute a DOM element takes for a node's attribute name. */\nconst domName = (name: string) => (name === \"className\" ? \"class\" : name === \"textAnchor\" ? \"text-anchor\" : name)\n\nexport { domName, tooltipRow, v }\nexport type { VAttrs, VChild, VNode }\n",
      "type": "registry:file",
      "target": "@ui/chart/vnode.ts"
    },
    {
      "path": "registry/uiset/ui/chart/tokens.css",
      "content": "@layer ui-sdk, uiset.tokens, uiset.base, uiset.skin;\n\n/*\n  Chart colors, validated per surface with the dataviz six-checks script (docs/charts.md):\n  categorical slots in a fixed order (never cycled, never by rank), one-hue sequential\n  steps, a diverging pair with a gray midpoint, and quiet chrome. Text never uses these;\n  it stays in --ui-foreground and --ui-muted-foreground.\n*/\n\n@layer uiset.tokens {\n  :where([data-uiset]) {\n    --chart-1: light-dark(oklch(0.575 0.163 255.5), oklch(0.622 0.161 255.1));\n    --chart-2: light-dark(oklch(0.671 0.175 40.6), oklch(0.622 0.173 40.1));\n    --chart-3: light-dark(oklch(0.669 0.141 162.1), oklch(0.621 0.128 163.1));\n    --chart-4: light-dark(oklch(0.764 0.161 75.1), oklch(0.67 0.143 73.2));\n    --chart-5: light-dark(oklch(0.716 0.141 357.4), oklch(0.622 0.171 0.8));\n    --chart-6: light-dark(oklch(0.529 0.18 142.5), oklch(0.529 0.18 142.5));\n    --chart-7: light-dark(oklch(0.527 0.197 283.4), oklch(0.67 0.145 286.8));\n    --chart-8: light-dark(oklch(0.623 0.191 24.9), oklch(0.669 0.159 22.3));\n    /* \"Other\" and de-emphasized series: a gray that never reads as a slot. */\n    --chart-other: color-mix(in oklch, var(--ui-muted-foreground) 70%, var(--ui-background));\n\n    /* Sequential, one hue: step 1 is \"little\", step 7 is \"most\". Dark mode runs the same\n       ramp from the surface up, so \"most\" is always the loudest. */\n    --chart-seq-1: light-dark(oklch(0.905 0.041 252.8), oklch(0.338 0.103 256.9));\n    --chart-seq-2: light-dark(oklch(0.812 0.079 253.4), oklch(0.433 0.128 256.5));\n    --chart-seq-3: light-dark(oklch(0.717 0.118 253.6), oklch(0.527 0.15 255.9));\n    --chart-seq-4: light-dark(oklch(0.622 0.161 255.1), oklch(0.622 0.161 255.1));\n    --chart-seq-5: light-dark(oklch(0.527 0.15 255.9), oklch(0.717 0.118 253.6));\n    --chart-seq-6: light-dark(oklch(0.433 0.128 256.5), oklch(0.812 0.079 253.4));\n    --chart-seq-7: light-dark(oklch(0.338 0.103 256.9), oklch(0.905 0.041 252.8));\n\n    /* Diverging: two poles that read as opposite, a gray middle that reads as nothing. */\n    --chart-neg: var(--chart-8);\n    --chart-mid: light-dark(oklch(0.951 0.004 95), oklch(0.34 0.005 106.7));\n    --chart-pos: var(--chart-1);\n\n    /* Chrome: hairlines one step off the surface, solid, never dashed. */\n    --chart-grid: color-mix(in oklch, var(--ui-foreground) 9%, var(--ui-background));\n    --chart-axis: color-mix(in oklch, var(--ui-foreground) 24%, var(--ui-background));\n    --chart-surface: var(--ui-background);\n    --chart-crosshair: color-mix(in oklch, var(--ui-foreground) 45%, var(--ui-background));\n    --chart-area-opacity: 0.1;\n  }\n}\n\n@layer uiset.skin {\n  /* Blueprint paper is mid blue (L 0.36): its set sits above the usual dark band so every\n     slot keeps 3:1 on the paper. Adjacent pairs: CVD ΔE 14.6, normal 18.7. The first six\n     (a segmented bar's most parts) also clear every pair: CVD 9.3, normal 17.3. */\n  [data-uiset][data-skin=\"blueprint\"] {\n    --chart-1: oklch(0.74 0.11 279.9);\n    --chart-2: oklch(0.86 0.14 159.9);\n    --chart-3: oklch(0.739 0.17 49.8);\n    --chart-4: oklch(0.7 0.2 351);\n    --chart-5: oklch(0.89 0.18 96);\n    --chart-6: oklch(0.89 0.1 327);\n    --chart-7: oklch(0.859 0.14 130.1);\n    --chart-8: oklch(0.789 0.117 242.6);\n    --chart-seq-1: color-mix(in oklab, var(--blueprint-line) 14%, var(--blueprint-paper));\n    --chart-seq-2: color-mix(in oklab, var(--blueprint-line) 28%, var(--blueprint-paper));\n    --chart-seq-3: color-mix(in oklab, var(--blueprint-line) 42%, var(--blueprint-paper));\n    --chart-seq-4: color-mix(in oklab, var(--blueprint-line) 56%, var(--blueprint-paper));\n    --chart-seq-5: color-mix(in oklab, var(--blueprint-line) 70%, var(--blueprint-paper));\n    --chart-seq-6: color-mix(in oklab, var(--blueprint-line) 85%, var(--blueprint-paper));\n    --chart-seq-7: var(--blueprint-line);\n    --chart-neg: var(--chart-3);\n    --chart-pos: var(--chart-2);\n    --chart-mid: color-mix(in oklab, var(--blueprint-line) 20%, var(--blueprint-paper));\n    --chart-grid: var(--blueprint-faint);\n    --chart-axis: color-mix(in oklab, var(--blueprint-line) 55%, var(--blueprint-paper));\n    --chart-crosshair: var(--blueprint-line);\n    --chart-area-opacity: 0.16;\n  }\n\n  /* Studio keeps the validated dark set and lights its sequential ramp like a lamp.\n     Ramps mix in OKLab: OKLCH would swing the hue from amber through pink to the panel. */\n  [data-uiset][data-skin=\"studio\"] {\n    --chart-seq-1: color-mix(in oklab, var(--studio-lamp) 14%, var(--studio-panel));\n    --chart-seq-2: color-mix(in oklab, var(--studio-lamp) 28%, var(--studio-panel));\n    --chart-seq-3: color-mix(in oklab, var(--studio-lamp) 42%, var(--studio-panel));\n    --chart-seq-4: color-mix(in oklab, var(--studio-lamp) 56%, var(--studio-panel));\n    --chart-seq-5: color-mix(in oklab, var(--studio-lamp) 70%, var(--studio-panel));\n    --chart-seq-6: color-mix(in oklab, var(--studio-lamp) 85%, var(--studio-panel));\n    --chart-seq-7: var(--studio-lamp);\n    --chart-crosshair: var(--studio-lamp);\n  }\n  /* Phosphor: the tube's own green first, then the other phosphors (blue, P3 amber, P22\n     red, P4 white, lavender, cyan, pink), each 3:1 or more on the tube. Adjacent pairs:\n     CVD ΔE ≥ 9.5, normal ≥ 17; the first six clear every pair (CVD 9.4, normal 19.6). */\n  [data-uiset][data-skin=\"phosphor\"] {\n    --chart-1: oklch(0.88 0.17 148);\n    --chart-2: oklch(0.72 0.2 250);\n    --chart-3: oklch(0.84 0.17 75);\n    --chart-4: oklch(0.68 0.17 28);\n    --chart-5: oklch(0.96 0.02 150);\n    --chart-6: oklch(0.84 0.11 300);\n    --chart-7: oklch(0.92 0.11 195);\n    --chart-8: oklch(0.76 0.14 355);\n    --chart-seq-1: color-mix(in oklab, var(--phosphor-glow) 14%, var(--phosphor-tube));\n    --chart-seq-2: color-mix(in oklab, var(--phosphor-glow) 28%, var(--phosphor-tube));\n    --chart-seq-3: color-mix(in oklab, var(--phosphor-glow) 42%, var(--phosphor-tube));\n    --chart-seq-4: color-mix(in oklab, var(--phosphor-glow) 56%, var(--phosphor-tube));\n    --chart-seq-5: color-mix(in oklab, var(--phosphor-glow) 70%, var(--phosphor-tube));\n    --chart-seq-6: color-mix(in oklab, var(--phosphor-glow) 85%, var(--phosphor-tube));\n    --chart-seq-7: var(--phosphor-glow);\n    --chart-neg: var(--chart-4);\n    --chart-pos: var(--chart-2);\n    --chart-mid: color-mix(in oklab, var(--phosphor-dim) 30%, var(--phosphor-tube));\n    --chart-grid: oklch(0.75 0.11 150 / 0.2);\n    --chart-axis: color-mix(in oklab, var(--phosphor-dim) 70%, var(--phosphor-tube));\n    --chart-crosshair: var(--phosphor-glow);\n    --chart-area-opacity: 0.14;\n  }\n\n  /* Ink: data is the one place with color, a muted print-like set, like color e-paper:\n     ink first, then blue, orange, sage, dark red, purple, teal, mustard, each 3:1 or more\n     on the screen. Adjacent pairs: CVD ΔE ≥ 9.8, normal ≥ 16; the first six clear every\n     pair (CVD 9.8, normal 16.5). Sequential steps are ink on the screen. */\n  [data-uiset][data-skin=\"ink\"] {\n    --chart-1: oklch(0.2 0 0);\n    --chart-2: oklch(0.5 0.12 250);\n    --chart-3: oklch(0.58 0.15 55);\n    --chart-4: oklch(0.58 0.06 150);\n    --chart-5: oklch(0.42 0.15 25);\n    --chart-6: oklch(0.38 0.15 300);\n    --chart-7: oklch(0.58 0.09 195);\n    --chart-8: oklch(0.58 0.12 95);\n    --chart-seq-1: color-mix(in oklab, var(--ink-ink) 14%, var(--ink-screen));\n    --chart-seq-2: color-mix(in oklab, var(--ink-ink) 28%, var(--ink-screen));\n    --chart-seq-3: color-mix(in oklab, var(--ink-ink) 42%, var(--ink-screen));\n    --chart-seq-4: color-mix(in oklab, var(--ink-ink) 56%, var(--ink-screen));\n    --chart-seq-5: color-mix(in oklab, var(--ink-ink) 70%, var(--ink-screen));\n    --chart-seq-6: color-mix(in oklab, var(--ink-ink) 85%, var(--ink-screen));\n    --chart-seq-7: var(--ink-ink);\n    --chart-neg: var(--chart-5);\n    --chart-pos: var(--chart-2);\n    --chart-mid: var(--ink-tint);\n    --chart-grid: oklch(0.82 0 0);\n    --chart-axis: oklch(0.55 0 0);\n    --chart-crosshair: var(--ink-ink);\n    --chart-area-opacity: 0.12;\n  }\n}\n",
      "type": "registry:file",
      "target": "@ui/chart/tokens.css"
    },
    {
      "path": "registry/uiset/ui/chart/chart.css",
      "content": "@layer ui-sdk, uiset.tokens, uiset.base, uiset.skin;\n\n@layer uiset.base {\n  .chart {\n    display: grid;\n    align-content: start;\n    gap: 0.75rem;\n    min-width: 0;\n    margin: 0;\n    color: var(--ui-foreground);\n    font-size: 0.875rem;\n  }\n\n  .chart-header {\n    display: flex;\n    flex-wrap: wrap;\n    align-items: start;\n    justify-content: space-between;\n    gap: 0.5rem 1rem;\n  }\n\n  .chart-heading {\n    display: grid;\n    gap: 0.125rem;\n    min-width: 0;\n  }\n\n  .chart-title {\n    font-size: 0.9375rem;\n    font-weight: 600;\n  }\n\n  .chart-description {\n    color: var(--ui-muted-foreground);\n    font-size: 0.8125rem;\n  }\n\n  .chart-actions {\n    display: flex;\n    flex-wrap: wrap;\n    align-items: center;\n    gap: 0.5rem;\n\n    [data-slot=\"segmented-control\"] {\n      font-size: 0.8125rem;\n    }\n  }\n\n  /* Legend: the identity channel, and a filter. Pressing one isolates its series. */\n  .chart-legend {\n    display: flex;\n    flex-wrap: wrap;\n    gap: 0.25rem 0.75rem;\n  }\n\n  .chart-legend-item {\n    display: inline-flex;\n    align-items: center;\n    gap: 0.4rem;\n    min-block-size: 1.5rem;\n    padding: 0.125rem 0.375rem;\n    margin-inline-start: -0.375rem;\n    border: 0;\n    border-radius: var(--ui-radius);\n    background: transparent;\n    color: var(--ui-foreground);\n    font: inherit;\n    font-size: 0.8125rem;\n    cursor: pointer;\n\n    &:hover {\n      background: color-mix(in oklch, var(--ui-foreground) 6%, transparent);\n    }\n\n    &:focus-visible {\n      outline: 2px solid var(--ui-ring-border);\n      outline-offset: 1px;\n    }\n\n    &[aria-pressed=\"true\"] {\n      font-weight: 600;\n    }\n\n    &[data-dimmed] {\n      color: var(--ui-muted-foreground);\n\n      .chart-swatch {\n        opacity: 0.35;\n      }\n    }\n  }\n\n  /* A swatch mirrors its mark: a short line for lines, a block for bars and areas. */\n  .chart-swatch {\n    flex-shrink: 0;\n    inline-size: 0.75rem;\n    block-size: 0.75rem;\n    border-radius: 3px;\n    background: var(--series);\n\n    &[data-shape=\"line\"] {\n      block-size: 3px;\n      border-radius: 2px;\n    }\n\n    &[data-shape=\"dot\"] {\n      inline-size: 0.625rem;\n      block-size: 0.625rem;\n      border-radius: 50%;\n    }\n  }\n\n  .chart-plot {\n    position: relative;\n    min-width: 0;\n\n    &[hidden] {\n      display: none;\n    }\n  }\n\n  /* Charts draw left to right in every language (the arrows follow the drawing), and\n     never overflow their box before the first measure. */\n  .chart-svg {\n    display: block;\n    max-inline-size: 100%;\n    block-size: auto;\n    overflow: visible;\n    direction: ltr;\n    font-family: inherit;\n  }\n\n  .chart-grid line {\n    stroke: var(--chart-grid);\n    stroke-width: 1;\n    shape-rendering: crispEdges;\n\n    &[data-zero] {\n      stroke: var(--chart-axis);\n    }\n  }\n\n  .chart-axis-labels text {\n    fill: var(--ui-muted-foreground);\n    font-size: 11.5px;\n    font-variant-numeric: tabular-nums;\n  }\n\n  .chart-end-label {\n    fill: var(--ui-foreground);\n    font-size: 12px;\n    font-weight: 500;\n  }\n\n  .chart-value-label {\n    fill: var(--ui-foreground);\n    font-size: 11.5px;\n    font-variant-numeric: tabular-nums;\n  }\n\n  .chart-crosshair {\n    stroke: var(--chart-crosshair);\n    stroke-width: 1;\n    shape-rendering: crispEdges;\n  }\n\n  .chart-line {\n    fill: none;\n    stroke: var(--series);\n    stroke-width: 2;\n    stroke-linejoin: round;\n    stroke-linecap: round;\n  }\n\n  .chart-area {\n    fill: var(--series);\n    fill-opacity: var(--chart-area-opacity);\n  }\n\n  /* Stacked bands: a light wash each, with the series line along its top edge. */\n  .line-chart.chart-stacked .chart-area {\n    fill-opacity: calc(var(--chart-area-opacity) * 2.2);\n  }\n\n  /* Dots carry a 2px ring in the surface color, so they read where lines cross. */\n  .chart-dot {\n    fill: var(--series);\n    stroke: var(--chart-surface);\n    stroke-width: 2;\n  }\n\n  .chart-bar {\n    fill: var(--series);\n\n    &[data-dim] {\n      opacity: 0.5;\n    }\n  }\n\n  .chart-series[data-dim] {\n    opacity: 0.25;\n  }\n\n  /* The layer people and assistive tech use: one target per data position. */\n  .chart-points {\n    position: absolute;\n    inset: 0;\n    outline: none;\n  }\n\n  .chart-point {\n    position: absolute;\n    border-radius: calc(var(--ui-radius) - 1px);\n    outline: none;\n    cursor: crosshair;\n\n    &:focus-visible {\n      outline: 2px solid var(--ui-ring-border);\n      outline-offset: -2px;\n    }\n\n    &[data-selected] {\n      background: color-mix(in oklch, var(--ui-foreground) 5%, transparent);\n    }\n\n    .bar-chart &,\n    .segmented-bar &,\n    .heatmap & {\n      cursor: pointer;\n    }\n  }\n\n  .chart-tooltip {\n    position: absolute;\n    z-index: 2;\n    display: grid;\n    gap: 0.25rem;\n    min-inline-size: 8rem;\n    max-inline-size: 16rem;\n    padding: 0.5rem 0.625rem;\n    border: 1px solid var(--ui-border);\n    border-radius: var(--uiset-popup-radius, calc(var(--ui-radius) + 4px));\n    background: var(--ui-background);\n    box-shadow: var(--ui-shadow);\n    font-size: 0.8125rem;\n    pointer-events: none;\n    translate: 12px calc(-100% - 8px);\n\n    &[data-flip] {\n      translate: calc(-100% - 12px) calc(-100% - 8px);\n    }\n  }\n\n  .chart-tooltip-title {\n    color: var(--ui-muted-foreground);\n    font-size: 0.75rem;\n  }\n\n  /* Values lead, names follow; a line key carries the identity. */\n  .chart-tooltip-row {\n    display: grid;\n    grid-template-columns: 0.75rem auto 1fr;\n    align-items: center;\n    gap: 0.5rem;\n\n    strong {\n      font-weight: 600;\n      font-variant-numeric: tabular-nums;\n    }\n\n    span:last-child {\n      color: var(--ui-muted-foreground);\n    }\n  }\n\n  .chart-tooltip-total {\n    padding-block-start: 0.25rem;\n    border-block-start: 1px solid var(--ui-border);\n    color: var(--ui-muted-foreground);\n\n    strong {\n      color: var(--ui-foreground);\n      font-variant-numeric: tabular-nums;\n    }\n  }\n\n  .chart-axis-title {\n    fill: var(--ui-muted-foreground);\n    font-size: 11.5px;\n    font-weight: 600;\n  }\n\n  .chart-dot[data-dim] {\n    opacity: 0.45;\n  }\n\n  .scatter-chart .chart-point {\n    border-radius: 50%;\n  }\n\n  /* Segmented bar: a share printed inside its block, in white or near-black by the fill. */\n  /* Above L 0.56 near-black reads better than white; every slot clears 4.5:1 either way. */\n  .segmented-bar-label {\n    fill: white;\n    fill: oklch(from var(--series) clamp(0, (0.56 - l) * 1000, 1) 0 0);\n    font-size: 12px;\n    font-weight: 600;\n    font-variant-numeric: tabular-nums;\n  }\n\n  .heatmap-cell {\n    fill: var(--cell, var(--chart-grid));\n\n    &[data-empty] {\n      fill: var(--chart-grid);\n    }\n\n    &[data-active] {\n      stroke: var(--ui-foreground);\n      stroke-width: 2;\n    }\n  }\n\n  .heatmap-scale-label {\n    fill: var(--ui-muted-foreground);\n    font-size: 11.5px;\n    font-variant-numeric: tabular-nums;\n  }\n\n  .heatmap-tooltip-row {\n    grid-template-columns: auto 1fr;\n  }\n\n  .sparkline {\n    display: inline-block;\n    vertical-align: middle;\n    overflow: visible;\n\n    .chart-dot {\n      stroke-width: 1.5;\n    }\n  }\n\n  /* The table twin. */\n  .chart-table-scroller {\n    max-block-size: 22rem;\n    overflow: auto;\n    border: 1px solid var(--ui-border);\n    border-radius: calc(var(--ui-radius) + 2px);\n\n    &:focus-visible {\n      outline: 2px solid var(--ui-ring-border);\n      outline-offset: 2px;\n    }\n  }\n\n  .chart-table {\n    inline-size: 100%;\n    border-collapse: collapse;\n    font-size: 0.8125rem;\n\n    th,\n    td {\n      padding: 0.375rem 0.75rem;\n      border-block-end: 1px solid var(--ui-border);\n      text-align: start;\n      white-space: nowrap;\n    }\n\n    thead th {\n      position: sticky;\n      top: 0;\n      background: color-mix(in oklch, var(--ui-muted) 60%, var(--ui-background));\n      color: var(--ui-muted-foreground);\n      font-weight: 600;\n    }\n\n    tbody th {\n      font-weight: 500;\n    }\n\n    [data-numeric] {\n      text-align: end;\n      font-variant-numeric: tabular-nums;\n    }\n  }\n\n  /* Series keep their colors in forced colors; chrome takes the system's. */\n  @media (forced-colors: active) {\n    .chart-svg .chart-series,\n    .chart-svg .chart-bar,\n    .chart-swatch {\n      forced-color-adjust: none;\n    }\n\n    .chart-crosshair {\n      stroke: CanvasText;\n    }\n  }\n}\n",
      "type": "registry:file",
      "target": "@ui/chart/chart.css"
    },
    {
      "path": "registry/uiset/ui/shell/shell.css",
      "content": "@layer ui-sdk, uiset.tokens, uiset.base, uiset.skin;\n\n@layer uiset.base {\n  :where([data-uiset]) {\n    /* Status colors: text and edges hold 4.5:1 / 3:1 on --ui-background in each scheme. */\n    /* Dark values also clear 4.5:1 on the mid-dark Blueprint and Studio panels. */\n    --tone-info: light-dark(oklch(0.48 0.15 255), oklch(0.86 0.08 240));\n    --tone-success: light-dark(oklch(0.47 0.12 150), oklch(0.87 0.11 150));\n    --tone-warning: light-dark(oklch(0.5 0.12 70), oklch(0.89 0.11 85));\n    --tone-danger: light-dark(oklch(0.46 0.19 27), oklch(0.86 0.08 25));\n    --tone-neutral: var(--ui-muted-foreground);\n  }\n\n  .uiset-visually-hidden {\n    position: absolute;\n    width: 1px;\n    height: 1px;\n    overflow: hidden;\n    clip-path: inset(50%);\n    white-space: nowrap;\n  }\n\n  .uiset-icon {\n    width: 1rem;\n    height: 1rem;\n    flex-shrink: 0;\n    fill: none;\n    stroke: currentColor;\n    stroke-width: 1.75;\n    stroke-linecap: round;\n    stroke-linejoin: round;\n  }\n\n  /* App shell */\n\n  .app-shell {\n    --sidebar-width: 15rem;\n    display: grid;\n    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);\n    min-height: var(--app-shell-height, 100dvh);\n    background: var(--ui-background);\n    color: var(--ui-foreground);\n\n    &[data-narrow] {\n      grid-template-columns: minmax(0, 1fr);\n    }\n  }\n\n  [data-sidebar=\"collapsed\"] .app-shell:not([data-narrow]) {\n    --sidebar-width: 3.75rem;\n  }\n\n  .app-sidebar,\n  .app-drawer {\n    display: flex;\n    flex-direction: column;\n    gap: 0.75rem;\n    min-width: 0;\n    padding: 0.75rem;\n    border-inline-end: 1px solid var(--ui-border);\n    background: color-mix(in oklab, var(--ui-muted) 55%, var(--ui-background));\n    overflow: hidden;\n  }\n\n  .app-sidebar-top {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    gap: 0.5rem;\n    min-height: 2.25rem;\n  }\n\n  .app-brand {\n    min-width: 0;\n    margin: 0;\n    overflow: hidden;\n    font-weight: 600;\n    white-space: nowrap;\n    text-overflow: ellipsis;\n  }\n\n  [data-sidebar=\"collapsed\"] .app-sidebar .app-brand {\n    display: none;\n  }\n\n  .app-sidebar-toggle,\n  .app-menu-button {\n    flex-shrink: 0;\n    width: 2.25rem;\n    height: 2.25rem;\n    padding: 0;\n  }\n\n  .app-main {\n    display: flex;\n    flex-direction: column;\n    min-width: 0;\n  }\n\n  /* Its padding counts in its height, with or without a page's box-sizing reset. */\n  .app-header {\n    box-sizing: border-box;\n    display: flex;\n    flex-wrap: wrap;\n    align-items: center;\n    gap: 0.75rem;\n    min-height: 3.25rem;\n    padding: 0.5rem 1rem;\n    border-bottom: 1px solid var(--ui-border);\n  }\n\n  /* The padding is a variable, so a full-bleed page (an inbox) can cancel it exactly. */\n  .app-content {\n    --app-shell-pad: clamp(1rem, 3vw, 2rem);\n    flex: 1;\n    min-width: 0;\n    padding: var(--app-shell-pad);\n  }\n\n  .sidebar-nav {\n    display: grid;\n    gap: 1rem;\n  }\n\n  .sidebar-group {\n    display: grid;\n    gap: 0.25rem;\n\n    ul {\n      display: grid;\n      gap: 2px;\n      margin: 0;\n      padding: 0;\n      list-style: none;\n    }\n  }\n\n  .sidebar-group-title {\n    margin: 0;\n    padding-inline: 0.5rem;\n    font-size: 0.75rem;\n    font-weight: 600;\n    color: var(--ui-muted-foreground);\n  }\n\n  /* Collapsed to icons: group titles leave the layout (a hidden title used to keep its\n     width and push the icons off center), and a rule separates the groups instead. */\n  [data-sidebar=\"collapsed\"] .app-sidebar {\n    .sidebar-group-title {\n      position: absolute;\n      width: 1px;\n      height: 1px;\n      overflow: hidden;\n      clip-path: inset(50%);\n      white-space: nowrap;\n    }\n\n    .sidebar-nav {\n      gap: 0.5rem;\n    }\n\n    .sidebar-group + .sidebar-group {\n      padding-block-start: 0.5rem;\n      border-block-start: 1px solid var(--ui-border);\n    }\n  }\n\n  /* A tooltip trigger, so UI SDK's stylesheet would draw it as a button: reset that. */\n  .sidebar-link {\n    display: flex;\n    align-items: center;\n    justify-content: flex-start;\n    gap: 0.625rem;\n    width: 100%;\n    height: auto;\n    min-height: 2.25rem;\n    padding: 0.375rem 0.5rem;\n    border: 0;\n    border-radius: var(--ui-radius);\n    background: transparent;\n    color: var(--ui-foreground);\n    font-weight: 400;\n    text-decoration: none;\n\n    &:hover {\n      background: var(--ui-muted);\n    }\n\n    &[aria-current=\"page\"] {\n      position: relative;\n      background: var(--ui-muted);\n      font-weight: 600;\n\n      /* A short bar, inset from the corners (an inset shadow bent around them). */\n      &::before {\n        content: \"\";\n        position: absolute;\n        inset-block: 0.5rem;\n        inset-inline-start: 0;\n        inline-size: 3px;\n        border-radius: 999px;\n        background: var(--ui-primary);\n      }\n    }\n\n    &:focus-visible {\n      outline: 2px solid var(--ui-ring-border);\n      outline-offset: -2px;\n    }\n  }\n\n  .sidebar-icon {\n    display: inline-grid;\n    place-items: center;\n    width: 1.25rem;\n    flex-shrink: 0;\n  }\n\n  .sidebar-label {\n    flex: 1;\n    min-width: 0;\n    overflow: hidden;\n    white-space: nowrap;\n    text-overflow: ellipsis;\n  }\n\n  .sidebar-badge {\n    font-size: 0.75rem;\n  }\n\n  /* Each link is a square icon button, centered in the rail under the toggle; the current\n     page shows by its fill and an accent icon (a side bar on a square reads as a glitch). */\n  [data-sidebar=\"collapsed\"] .app-sidebar {\n    .sidebar-link {\n      justify-content: center;\n      inline-size: 2.25rem;\n      min-block-size: 2.25rem;\n      margin-inline: auto;\n      padding: 0;\n\n      &[aria-current=\"page\"] {\n        color: color-mix(in oklch, var(--ui-primary) 55%, var(--ui-foreground));\n\n        &::before {\n          display: none;\n        }\n      }\n    }\n\n    .sidebar-label,\n    .sidebar-badge {\n      position: absolute;\n      width: 1px;\n      height: 1px;\n      overflow: hidden;\n      clip-path: inset(50%);\n    }\n  }\n\n  /* The tooltip repeats the visible label, so it only shows when labels are hidden. */\n  [data-sidebar=\"expanded\"] .sidebar-tooltip,\n  .app-drawer .sidebar-tooltip {\n    display: none;\n  }\n\n  /* Page structure */\n\n  .breadcrumbs ol {\n    display: flex;\n    flex-wrap: wrap;\n    align-items: center;\n    gap: 0.25rem;\n    margin: 0;\n    padding: 0;\n    list-style: none;\n    font-size: 0.875rem;\n  }\n\n  .breadcrumbs li {\n    display: inline-flex;\n    align-items: center;\n    gap: 0.25rem;\n    color: var(--ui-muted-foreground);\n\n    a {\n      color: inherit;\n      text-underline-offset: 0.2em;\n    }\n\n    [aria-current=\"page\"] {\n      color: var(--ui-foreground);\n      font-weight: 500;\n    }\n  }\n\n  .breadcrumbs-separator {\n    width: 0.875rem;\n    height: 0.875rem;\n  }\n\n  .page-header {\n    display: grid;\n    gap: 0.75rem;\n    margin-bottom: 1.5rem;\n  }\n\n  .page-header-row {\n    display: flex;\n    flex-wrap: wrap;\n    align-items: flex-end;\n    justify-content: space-between;\n    gap: 1rem;\n  }\n\n  .page-header-title {\n    margin: 0;\n    font-size: clamp(1.5rem, 3vw, 1.875rem);\n    line-height: 1.15;\n    text-wrap: balance;\n  }\n\n  .page-header-description {\n    max-width: 42rem;\n    margin: 0.375rem 0 0;\n    color: var(--ui-muted-foreground);\n  }\n\n  .page-header-actions {\n    display: flex;\n    flex-wrap: wrap;\n    gap: 0.5rem;\n  }\n\n  .card {\n    display: grid;\n    gap: 1rem;\n    min-width: 0;\n    padding: 1.25rem;\n    border: 1px solid var(--ui-border);\n    border-radius: calc(var(--ui-radius) + 6px);\n    background: var(--ui-background);\n  }\n\n  .card-header {\n    display: grid;\n    gap: 0.25rem;\n  }\n\n  .card-title {\n    margin: 0;\n    font-size: 1rem;\n    font-weight: 600;\n  }\n\n  .card-description {\n    margin: 0;\n    color: var(--ui-muted-foreground);\n    font-size: 0.875rem;\n  }\n\n  .card-footer {\n    display: flex;\n    flex-wrap: wrap;\n    gap: 0.5rem;\n    padding-top: 1rem;\n    border-top: 1px solid var(--ui-border);\n  }\n\n  /* Data display */\n\n  .badge {\n    --badge-color: var(--tone-neutral);\n    display: inline-flex;\n    align-items: center;\n    gap: 0.25rem;\n    padding: 0.0625rem 0.5rem;\n    border: 1px solid color-mix(in oklab, var(--badge-color) 55%, transparent);\n    border-radius: min(999px, calc(var(--ui-radius) * 999));\n    background: color-mix(in oklab, var(--badge-color) 10%, var(--ui-background));\n    color: var(--badge-color);\n    font-size: 0.75rem;\n    font-weight: 600;\n    line-height: 1.5;\n    white-space: nowrap;\n\n    &[data-tone=\"info\"] {\n      --badge-color: var(--tone-info);\n    }\n\n    &[data-tone=\"success\"] {\n      --badge-color: var(--tone-success);\n    }\n\n    &[data-tone=\"warning\"] {\n      --badge-color: var(--tone-warning);\n    }\n\n    &[data-tone=\"danger\"] {\n      --badge-color: var(--tone-danger);\n    }\n  }\n\n  .count-badge {\n    position: relative;\n    display: inline-flex;\n    vertical-align: middle;\n  }\n\n  /* The solid button's colors: every skin already holds 4.5:1 between them. */\n  .count-badge-count {\n    position: absolute;\n    inset-block-start: 0;\n    inset-inline-end: 0;\n    translate: 40% -40%;\n    display: inline-flex;\n    align-items: center;\n    justify-content: center;\n    box-sizing: border-box;\n    min-width: 1.125rem;\n    height: 1.125rem;\n    padding-inline: 0.3125rem;\n    border-radius: min(999px, calc(var(--ui-radius) * 999));\n    background: var(--uiset-solid-bg);\n    color: var(--uiset-solid-fg);\n    box-shadow: 0 0 0 2px var(--ui-background);\n    font-size: 0.6875rem;\n    font-weight: 600;\n    font-variant-numeric: tabular-nums;\n    line-height: 1;\n    white-space: nowrap;\n    pointer-events: none;\n\n    &:dir(rtl) {\n      translate: -40% -40%;\n    }\n\n    &[data-dot] {\n      min-width: 0.625rem;\n      width: 0.625rem;\n      height: 0.625rem;\n      padding: 0;\n      translate: 20% -20%;\n\n      &:dir(rtl) {\n        translate: -20% -20%;\n      }\n    }\n  }\n\n  /* Each avatar overlaps the one before it, with a ring of the page color between them. */\n  .avatar-group {\n    display: inline-flex;\n    align-items: center;\n    vertical-align: middle;\n\n    & > * {\n      box-shadow: 0 0 0 2px var(--ui-background);\n    }\n\n    /* A small overlap: more would cover the next avatar's initials. */\n    & > * + * {\n      margin-inline-start: calc(var(--ui-spacing) * -1);\n    }\n  }\n\n  .avatar-group-more {\n    font-variant-numeric: tabular-nums;\n  }\n\n  /* Content sits at the top, so figures in a row line up whether or not one has a trend. */\n  .stat {\n    display: grid;\n    align-content: start;\n    gap: 0.25rem;\n\n    p {\n      margin: 0;\n    }\n  }\n\n  .stat-label {\n    font-size: 0.875rem;\n    color: var(--ui-muted-foreground);\n  }\n\n  .stat-trend {\n    max-inline-size: 100%;\n  }\n\n  /* A standalone figure keeps proportional digits; tabular ones look loose this big. */\n  .stat-value {\n    font-size: 1.75rem;\n    font-weight: 650;\n    line-height: 1.15;\n  }\n\n  .stat-change {\n    display: inline-flex;\n    align-items: center;\n    gap: 0.25rem;\n    font-size: 0.875rem;\n    font-weight: 600;\n\n    &[data-good] {\n      color: var(--tone-success);\n    }\n\n    &[data-bad] {\n      color: var(--tone-danger);\n    }\n  }\n\n  .stat-period,\n  .stat-description {\n    color: var(--ui-muted-foreground);\n    font-weight: 400;\n  }\n\n  .stat-description {\n    font-size: 0.8125rem;\n  }\n\n  .empty-state {\n    display: grid;\n    justify-items: center;\n    gap: 0.5rem;\n    padding: 2.5rem 1rem;\n    text-align: center;\n  }\n\n  .empty-state-icon {\n    width: 2rem;\n    height: 2rem;\n    color: var(--ui-muted-foreground);\n  }\n\n  .empty-state-title {\n    margin: 0.25rem 0 0;\n    font-size: 1.0625rem;\n  }\n\n  .empty-state-description {\n    max-width: 28rem;\n    margin: 0;\n    color: var(--ui-muted-foreground);\n  }\n\n  .empty-state-actions {\n    display: flex;\n    flex-wrap: wrap;\n    justify-content: center;\n    gap: 0.5rem;\n    margin-top: 0.5rem;\n  }\n\n  .skeleton {\n    display: block;\n    width: 100%;\n    border-radius: var(--ui-radius);\n    background: linear-gradient(\n        90deg,\n        var(--ui-muted) 0 35%,\n        color-mix(in oklab, var(--ui-muted), var(--ui-foreground) 8%) 50%,\n        var(--ui-muted) 65% 100%\n      )\n      0 0 / 300% 100%;\n    animation: skeleton-wave 1.6s ease-in-out infinite;\n  }\n\n  .skeleton-text {\n    display: grid;\n    gap: 0.5rem;\n\n    .skeleton {\n      height: 0.75rem;\n    }\n  }\n\n  @keyframes skeleton-wave {\n    from {\n      background-position: 100% 0;\n    }\n    to {\n      background-position: 0 0;\n    }\n  }\n\n  .description-list {\n    display: grid;\n    margin: 0;\n\n    &[data-layout=\"columns\"] .description-item {\n      display: grid;\n      grid-template-columns: minmax(8rem, 1fr) 2fr;\n      gap: 1rem;\n    }\n\n    dt {\n      color: var(--ui-muted-foreground);\n    }\n\n    dd {\n      margin: 0;\n      min-width: 0;\n      overflow-wrap: anywhere;\n    }\n  }\n\n  .description-item {\n    padding-block: 0.625rem;\n    border-bottom: 1px solid var(--ui-border);\n\n    &:last-child {\n      border-bottom: 0;\n    }\n  }\n\n  .item-list {\n    display: grid;\n    margin: 0;\n    padding: 0;\n    list-style: none;\n  }\n\n  .item {\n    display: flex;\n    align-items: center;\n    gap: 0.75rem;\n    min-height: 3rem;\n    padding-block: 0.625rem;\n    border-bottom: 1px solid var(--ui-border);\n\n    &:last-child {\n      border-bottom: 0;\n    }\n  }\n\n  .item-text {\n    display: grid;\n    flex: 1;\n    min-width: 0;\n  }\n\n  .item-title {\n    overflow: hidden;\n    color: var(--ui-foreground);\n    font-weight: 500;\n    white-space: nowrap;\n    text-overflow: ellipsis;\n  }\n\n  a.item-title {\n    text-decoration: none;\n\n    &:hover {\n      text-decoration: underline;\n    }\n  }\n\n  .item-description,\n  .item-meta {\n    color: var(--ui-muted-foreground);\n    font-size: 0.8125rem;\n  }\n\n  .item-actions {\n    display: flex;\n    gap: 0.25rem;\n  }\n\n  .alert {\n    --alert-color: var(--tone-info);\n    display: grid;\n    grid-template-columns: auto minmax(0, 1fr) auto;\n    gap: 0.75rem;\n    align-items: start;\n    padding: 0.875rem 1rem;\n    position: relative;\n    overflow: hidden;\n    padding-inline-start: calc(1rem + 3px);\n    border: 1px solid color-mix(in oklab, var(--alert-color) 45%, var(--ui-border));\n    border-radius: calc(var(--ui-radius) + 4px);\n    background: color-mix(in oklab, var(--alert-color) 7%, var(--ui-background));\n\n    /* The accent is a straight bar the corners clip; a thick border would taper into them. */\n    &::before {\n      content: \"\";\n      position: absolute;\n      inset-block: 0;\n      inset-inline-start: 0;\n      inline-size: 4px;\n      background: var(--alert-color);\n    }\n\n    &[data-tone=\"success\"] {\n      --alert-color: var(--tone-success);\n    }\n\n    &[data-tone=\"warning\"] {\n      --alert-color: var(--tone-warning);\n    }\n\n    &[data-tone=\"danger\"] {\n      --alert-color: var(--tone-danger);\n    }\n  }\n\n  .alert-icon {\n    width: 1.25rem;\n    height: 1.25rem;\n    color: var(--alert-color);\n  }\n\n  .alert-body {\n    display: grid;\n    gap: 0.25rem;\n  }\n\n  .alert-title {\n    margin: 0;\n    font-weight: 600;\n  }\n\n  .alert-text {\n    color: var(--ui-foreground);\n  }\n\n  .alert-actions {\n    display: flex;\n    flex-wrap: wrap;\n    gap: 0.5rem;\n    margin-top: 0.375rem;\n  }\n\n  .alert-dismiss {\n    width: 2rem;\n    height: 2rem;\n    padding: 0;\n  }\n\n  /* Sized in its own em so a key sits inside a line of text, not below it. */\n  .kbd {\n    display: inline-flex;\n    align-items: center;\n    min-width: 1.75em;\n    height: 1.75em;\n    justify-content: center;\n    padding-inline: 0.4em;\n    vertical-align: 0.125em;\n    line-height: 1;\n    border: 1px solid var(--ui-input);\n    border-bottom-width: 2px;\n    border-radius: calc(var(--ui-radius) / 2 + 2px);\n    background: var(--ui-background);\n    color: var(--ui-foreground);\n    font-family: var(--ui-font-mono);\n    font-size: 0.75rem;\n  }\n\n  .spinner {\n    display: inline-block;\n    flex-shrink: 0;\n    border: 2px solid color-mix(in oklab, var(--ui-foreground) 18%, transparent);\n    border-top-color: var(--ui-primary);\n    border-radius: 50%;\n    animation: spinner-turn 0.8s linear infinite;\n  }\n\n  @keyframes spinner-turn {\n    to {\n      rotate: 1turn;\n    }\n  }\n\n  .stepper {\n    container-type: inline-size;\n  }\n\n  .stepper ol {\n    display: flex;\n    flex-wrap: wrap;\n    gap: 0.25rem 1rem;\n    margin: 0;\n    padding: 0;\n    list-style: none;\n  }\n\n  /* Marks line up across steps, whether a step has a description or not. */\n  .stepper-step {\n    align-items: flex-start;\n    gap: 0.625rem;\n    height: auto;\n    min-height: 2.75rem;\n    padding: 0.375rem 0.625rem 0.375rem 0.375rem;\n    text-align: start;\n  }\n\n  @container (max-width: 30rem) {\n    .stepper ol {\n      flex-direction: column;\n      flex-wrap: nowrap;\n    }\n  }\n\n  .stepper-mark {\n    box-sizing: border-box;\n    display: inline-grid;\n    place-items: center;\n    width: 1.75rem;\n    height: 1.75rem;\n    flex-shrink: 0;\n    border: 2px solid var(--ui-input);\n    border-radius: 50%;\n    font-size: 0.8125rem;\n    font-weight: 600;\n    font-variant-numeric: tabular-nums;\n  }\n\n  .stepper li[data-state=\"current\"] .stepper-mark {\n    border-color: var(--ui-primary);\n    color: var(--ui-primary);\n  }\n\n  .stepper li[data-state=\"complete\"] .stepper-mark {\n    border-color: var(--ui-primary);\n    background: var(--ui-primary);\n    color: var(--ui-primary-foreground);\n  }\n\n  /* The label's first line centers on the mark, whatever the page's line height. */\n  .stepper-text {\n    display: grid;\n    padding-block-start: max(0px, calc((1.75rem - 1lh) / 2));\n  }\n\n  .stepper-label {\n    font-weight: 600;\n  }\n\n  .stepper-description {\n    font-size: 0.75rem;\n    color: var(--ui-muted-foreground);\n  }\n\n  .search-field {\n    position: relative;\n    display: flex;\n    /* A row even as a UI SDK field (which stacks its parts), so the icon centers. */\n    flex-direction: row;\n    align-items: center;\n    width: 100%;\n\n    [data-slot=\"input\"] {\n      width: 100%;\n      padding-inline: 2.125rem 3rem;\n    }\n  }\n\n  .search-field-icon {\n    position: absolute;\n    inset-inline-start: 0.625rem;\n    color: var(--ui-muted-foreground);\n    pointer-events: none;\n  }\n\n  .search-field-clear {\n    position: absolute;\n    inset-inline-end: 0.25rem;\n    width: 1.75rem;\n    height: 1.75rem;\n    padding: 0;\n  }\n\n  /* The browser's own clear button would duplicate ours. */\n  .search-field input[type=\"search\"]::-webkit-search-cancel-button {\n    display: none;\n  }\n\n  .search-field-hint {\n    position: absolute;\n    inset-inline-end: 0.5rem;\n    pointer-events: none;\n  }\n\n  .copy-button {\n    gap: 0.375rem;\n  }\n\n  @media (prefers-reduced-motion: reduce) {\n    .skeleton,\n    .spinner {\n      animation-duration: 0s;\n    }\n\n    .spinner {\n      border-top-color: var(--ui-muted-foreground);\n    }\n  }\n\n  @media (forced-colors: active) {\n    .badge,\n    .alert,\n    .kbd {\n      border-color: CanvasText;\n    }\n\n    /* Shadows don't draw here, so the rings become real edges. */\n    .avatar-group > *,\n    .count-badge-count {\n      outline: 1px solid CanvasText;\n    }\n\n    .count-badge-count {\n      background: Canvas;\n      color: CanvasText;\n    }\n\n    .sidebar-link[aria-current=\"page\"] {\n      outline: 2px solid Highlight;\n    }\n\n    .stepper li[data-state=\"complete\"] .stepper-mark {\n      background: Highlight;\n      color: HighlightText;\n    }\n  }\n}\n",
      "type": "registry:file",
      "target": "@ui/shell/shell.css"
    }
  ],
  "type": "registry:ui"
}