{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "chart-flows",
  "title": "Chart flows",
  "description": "What the charts drawn as flows between steps share: the graph a chart’s rows make, the column each node stands in, the nodes and bands d3-sankey lays it out in, every way through a node or a flow, what sits under a point, the keys’ way between nodes, and where each shape comes from and goes to when the data changes. The Sankey chart draws on it.",
  "dependencies": [
    "d3-sankey"
  ],
  "devDependencies": [
    "@types/d3-sankey"
  ],
  "registryDependencies": [
    "https://kinoui.com/r/chart-math.json"
  ],
  "files": [
    {
      "path": "registry/lib/chart-flows.ts",
      "content": "import type { ChartDatum, ReadingDirection } from '@/registry/lib/chart-math'\nimport {\n  sankey,\n  sankeyCenter,\n  sankeyJustify,\n  sankeyLeft,\n  sankeyRight,\n  type SankeyLink,\n  type SankeyNode,\n} from 'd3-sankey'\n\n/*\n * The flows of a chart drawn as bands between steps, such as a Sankey: the\n * graph its rows make, the columns its nodes stand in, the boxes and bands\n * d3-sankey lays it out in, the path through a node or a flow, what sits\n * under a point, and where each shape comes from and goes to when the data\n * changes. Pure, so the chart only draws.\n */\n\n/** A step of the flows: everything that goes into it or out of it. */\ninterface FlowNode {\n  /** Its name as text: unique among the nodes. */\n  key: string\n  /** Its name as the rows give it. */\n  name: unknown\n  /** What passes through it: the most of what comes in and what goes out. */\n  value: number\n  /** How many flows lie before it on its longest way in. */\n  depth: number\n  /** How many lie after it on its longest way out. */\n  height: number\n  /** The column it stands in, from the reading start. */\n  layer: number\n  sourceLinks: FlowLink[]\n  targetLinks: FlowLink[]\n}\n\n/** What goes from one node to another: every row between the two, added up. */\ninterface FlowLink {\n  /** Its two nodes' keys, joined. */\n  key: string\n  source: FlowNode\n  target: FlowNode\n  value: number\n  /** The first row between the two. */\n  datum: ChartDatum\n}\n\ninterface FlowGraph {\n  /** Column by column from the reading start, each in the order the rows first name them. */\n  nodes: readonly FlowNode[]\n  /** In the order the rows first give them. */\n  links: readonly FlowLink[]\n  columns: number\n}\n\ntype FlowAlign = 'justify' | 'start' | 'end' | 'center'\n\n/** A node's box, in px from the plot's physical left and its top. */\ninterface LaidNode {\n  key: string\n  x0: number\n  x1: number\n  y0: number\n  y1: number\n}\n\n/**\n * A flow's band, along its middle: from the edge of its source, `x0`, to the\n * edge of its target, `x1`, at the heights where it leaves and arrives, and\n * as thick as its value. In px, from the plot's physical left and its top.\n */\ninterface LaidLink {\n  key: string\n  source: string\n  target: string\n  x0: number\n  x1: number\n  y0: number\n  y1: number\n  width: number\n}\n\ninterface FlowLayout {\n  nodes: readonly LaidNode[]\n  links: readonly LaidLink[]\n}\n\n/** What separates a flow's two nodes in its key. */\nconst KEY_SEPARATOR = '\\u001f'\n\nconst aligns = {\n  justify: sankeyJustify,\n  start: sankeyLeft,\n  end: sankeyRight,\n  center: sankeyCenter,\n} as const\n\n/**\n * The graph the rows make: a node for each name a row goes from or to, and a\n * flow for each pair of them, its rows' values added up. A row without both\n * names, or whose value is missing, zero or below, takes no room, nor does a\n * row from or to a node in `hidden`. Flows can't loop: a row leading back to\n * where it came from throws, naming it.\n */\nfunction flowGraph(\n  rows: readonly ChartDatum[],\n  keys: {\n    source: string\n    target: string\n    dataKey: string\n    hidden?: readonly string[]\n    align?: FlowAlign\n  },\n): FlowGraph {\n  const hidden = new Set(keys.hidden ?? [])\n  const byKey = new Map<string, FlowNode>()\n  const linkByKey = new Map<string, FlowLink>()\n  const nodeOf = (key: string, name: unknown) => {\n    let node = byKey.get(key)\n    if (!node) {\n      node = {\n        key,\n        name,\n        value: 0,\n        depth: 0,\n        height: 0,\n        layer: 0,\n        sourceLinks: [],\n        targetLinks: [],\n      }\n      byKey.set(key, node)\n    }\n    return node\n  }\n  for (const row of rows) {\n    const from = nameText(row[keys.source])\n    const to = nameText(row[keys.target])\n    const value = row[keys.dataKey]\n    if (from === null || to === null) continue\n    if (typeof value !== 'number' || !Number.isFinite(value) || value <= 0) continue\n    if (hidden.has(from) || hidden.has(to)) continue\n    if (from === to) throw new Error(`A flow can't go from \"${from}\" back into itself.`)\n    const key = flowKey(from, to)\n    const link = linkByKey.get(key)\n    if (link) {\n      link.value += value\n      continue\n    }\n    const source = nodeOf(from, row[keys.source])\n    const target = nodeOf(to, row[keys.target])\n    const made: FlowLink = { key, source, target, value, datum: row }\n    linkByKey.set(key, made)\n    source.sourceLinks.push(made)\n    target.targetLinks.push(made)\n  }\n  const named = [...byKey.values()]\n  const links = [...linkByKey.values()]\n  for (const node of named) {\n    node.value = Math.max(sumOf(node.sourceLinks), sumOf(node.targetLinks))\n  }\n  depthsOf(named)\n  const columns =\n    named.length === 0 ? 0 : Math.max(...named.map((node) => node.depth)) + 1\n  const align = aligns[keys.align ?? 'justify']\n  for (const node of named) {\n    // d3-sankey's own alignments, on nodes shaped as its own.\n    const layer = align(node as unknown as SankeyNode<object, object>, columns)\n    node.layer = Math.max(0, Math.min(columns - 1, Math.floor(layer)))\n  }\n  const order = new Map(named.map((node, at) => [node.key, at]))\n  const nodes = named.toSorted(\n    (a, b) => a.layer - b.layer || (order.get(a.key) ?? 0) - (order.get(b.key) ?? 0),\n  )\n  return {\n    nodes,\n    links,\n    columns: nodes.length === 0 ? 0 : Math.max(...nodes.map((node) => node.layer)) + 1,\n  }\n}\n\n/** A node's name as text: a string or a number, or null for a row that names none. */\nfunction nameText(name: unknown): string | null {\n  if (typeof name === 'string') return name === '' ? null : name\n  if (typeof name === 'number' && Number.isFinite(name)) return String(name)\n  return null\n}\n\nfunction sumOf(links: readonly FlowLink[]) {\n  return links.reduce((sum, link) => sum + link.value, 0)\n}\n\n/**\n * Each node's depth, its longest way in, and height, its longest way out,\n * walking the flows from the nodes nothing flows into. A node reached again\n * on its own way is a loop, which throws, naming the flow that closes it.\n */\nfunction depthsOf(nodes: readonly FlowNode[]) {\n  const state = new Map<FlowNode, 'open' | 'done'>()\n  const order: FlowNode[] = []\n  const visit = (node: FlowNode) => {\n    state.set(node, 'open')\n    for (const link of node.sourceLinks) {\n      const seen = state.get(link.target)\n      if (seen === 'open') {\n        throw new Error(\n          `Flows can't loop: the flow from \"${link.source.key}\" to \"${link.target.key}\" leads back to where it came from.`,\n        )\n      }\n      if (seen === undefined) visit(link.target)\n    }\n    state.set(node, 'done')\n    order.push(node)\n  }\n  for (const node of nodes) if (!state.has(node)) visit(node)\n  // `order` runs from the last nodes back to the first.\n  for (const node of order.toReversed()) {\n    for (const link of node.sourceLinks) {\n      link.target.depth = Math.max(link.target.depth, node.depth + 1)\n    }\n  }\n  for (const node of order) {\n    for (const link of node.targetLinks) {\n      link.source.height = Math.max(link.source.height, node.height + 1)\n    }\n  }\n}\n\nfunction flowKey(source: string, target: string) {\n  return `${source}${KEY_SEPARATOR}${target}`\n}\n\n/** A flow's two node keys, from its key. */\nfunction flowEnds(key: string): [string, string] {\n  const at = key.indexOf(KEY_SEPARATOR)\n  return [key.slice(0, at), key.slice(at + 1)]\n}\n\n/**\n * The graph laid out in a plot `width` by `height` px: each column's nodes\n * stacked `nodePadding` apart, as tall as their values, and each flow as\n * thick as its value, by d3-sankey. `start` and `end` keep room clear at the\n * plot's reading start and end, for the outer columns' labels. With `sort`\n * `data`, each column keeps the rows' order; with `auto`, nodes move to\n * where their flows cross least. In right to left, the columns run from the\n * right.\n */\nfunction flowLayout(\n  graph: FlowGraph,\n  options: {\n    width: number\n    height: number\n    nodeWidth: number\n    nodePadding: number\n    start?: number\n    end?: number\n    sort?: 'auto' | 'data'\n    direction?: ReadingDirection\n  },\n): FlowLayout {\n  const { width, height, nodeWidth, nodePadding } = options\n  if (graph.nodes.length === 0 || width <= 0 || height <= 0)\n    return { nodes: [], links: [] }\n  const start = options.start ?? 0\n  const end = options.end ?? 0\n  // At least a node's width across, so a plot too narrow for its labels still draws.\n  const right = Math.max(start + nodeWidth, width - end)\n  const order = new Map(graph.nodes.map((node, at) => [node.key, at]))\n  const layers = new Map(graph.nodes.map((node) => [node.key, node.layer]))\n  type Node = { key: string }\n  type Link = { source: string; target: string; value: number; key: string }\n  const layout = sankey<Node, Link>()\n    .nodeId((node) => node.key)\n    .nodeWidth(nodeWidth)\n    .nodePadding(nodePadding)\n    // The columns the graph already worked out, so the layout and the keys agree.\n    .nodeAlign((node) => layers.get(node.key) ?? 0)\n    .extent([\n      [start, 0],\n      [right, height],\n    ])\n  if (options.sort === 'data') {\n    layout.nodeSort((a, b) => (order.get(a.key) ?? 0) - (order.get(b.key) ?? 0))\n  }\n  const laid = layout({\n    nodes: graph.nodes.map((node) => ({ key: node.key })),\n    links: graph.links.map((link) => ({\n      source: link.source.key,\n      target: link.target.key,\n      value: link.value,\n      key: link.key,\n    })),\n  })\n  const mirror = options.direction === 'rtl'\n  const x = (at: number) => (mirror ? width - at : at)\n  const nodes = laid.nodes.map((node) => {\n    const [x0, x1] = [x(node.x0 ?? 0), x(node.x1 ?? 0)].toSorted((a, b) => a - b) as [\n      number,\n      number,\n    ]\n    return { key: node.key, x0, x1, y0: node.y0 ?? 0, y1: node.y1 ?? 0 }\n  })\n  const links = laid.links.map((link: SankeyLink<Node, Link>) => {\n    const source = link.source as SankeyNode<Node, Link>\n    const target = link.target as SankeyNode<Node, Link>\n    return {\n      key: link.key,\n      source: source.key,\n      target: target.key,\n      x0: x(source.x1 ?? 0),\n      x1: x(target.x0 ?? 0),\n      y0: link.y0 ?? 0,\n      y1: link.y1 ?? 0,\n      width: link.width ?? 0,\n    }\n  })\n  // The keys' order, column by column, so the layout's shapes match the chart's categories.\n  return {\n    nodes: nodes.toSorted((a, b) => (order.get(a.key) ?? 0) - (order.get(b.key) ?? 0)),\n    links,\n  }\n}\n\n/**\n * Every node and flow that lies on a way through `from`: the node itself,\n * or a flow and its two nodes, and everything upstream and downstream of\n * it. Each node is walked once, so a graph of many crossing ways stays quick.\n */\nfunction flowPath(\n  graph: FlowGraph,\n  from: { node: string } | { link: string },\n): { nodes: Set<string>; links: Set<string> } {\n  const nodes = new Set<string>()\n  const links = new Set<string>()\n  const byKey = new Map(graph.nodes.map((node) => [node.key, node]))\n  const walk = (node: FlowNode, way: 'up' | 'down') => {\n    const seen = way === 'up' ? upSeen : downSeen\n    if (seen.has(node)) return\n    seen.add(node)\n    nodes.add(node.key)\n    for (const link of way === 'up' ? node.targetLinks : node.sourceLinks) {\n      links.add(link.key)\n      walk(way === 'up' ? link.source : link.target, way)\n    }\n  }\n  const upSeen = new Set<FlowNode>()\n  const downSeen = new Set<FlowNode>()\n  if ('node' in from) {\n    const node = byKey.get(from.node)\n    if (!node) return { nodes, links }\n    walk(node, 'up')\n    walk(node, 'down')\n    return { nodes, links }\n  }\n  const link = graph.links.find((one) => one.key === from.link)\n  if (!link) return { nodes, links }\n  links.add(link.key)\n  walk(link.source, 'up')\n  walk(link.target, 'down')\n  return { nodes, links }\n}\n\n/**\n * How far along a flow's band a point `along` its length across is, as the\n * curve's own `t`: the band is a cubic from its source to its target with\n * both handles at the middle across, as d3-sankey draws it, so across runs\n * as 1.5t − 1.5t² + t³, which only rises.\n */\nfunction curveAt(along: number) {\n  let low = 0\n  let high = 1\n  for (let step = 0; step < 30; step++) {\n    const t = (low + high) / 2\n    if (1.5 * t - 1.5 * t * t + t * t * t < along) low = t\n    else high = t\n  }\n  return (low + high) / 2\n}\n\n/**\n * The node or flow under a point, in px of the plot: a node within `reach`\n * of it across, or else the flow whose band covers it, nearest its middle\n * where bands overlap. Null over the empty plot.\n */\nfunction flowAt(\n  point: { x: number; y: number },\n  layout: FlowLayout,\n  reach = 0,\n): { node: string } | { link: string } | null {\n  for (const node of layout.nodes) {\n    if (\n      point.x >= node.x0 - reach &&\n      point.x <= node.x1 + reach &&\n      point.y >= Math.min(node.y0, node.y1 - 1) &&\n      point.y <= Math.max(node.y1, node.y0 + 1)\n    ) {\n      return { node: node.key }\n    }\n  }\n  let best: { key: string; off: number } | null = null\n  for (const link of layout.links) {\n    const left = Math.min(link.x0, link.x1)\n    const right = Math.max(link.x0, link.x1)\n    if (right <= left || point.x < left || point.x > right) continue\n    const along = (point.x - link.x0) / (link.x1 - link.x0)\n    const t = curveAt(along)\n    const middle = link.y0 + (link.y1 - link.y0) * (3 * t * t - 2 * t * t * t)\n    // The band's thickness is across its line, so up and down it reaches further where it slopes.\n    const slope =\n      ((link.y1 - link.y0) * (6 * t - 6 * t * t)) /\n      ((link.x1 - link.x0) * (1.5 - 3 * t + 3 * t * t))\n    const half = (Math.max(link.width, 1) / 2) * Math.sqrt(1 + slope * slope)\n    const off = Math.abs(point.y - middle) / half\n    if (off <= 1 && (!best || off < best.off)) best = { key: link.key, off }\n  }\n  return best ? { link: best.key } : null\n}\n\n/** A flow's band as an SVG path along its middle, stroked as thick as the flow. */\nfunction linkPath(link: Pick<LaidLink, 'x0' | 'x1' | 'y0' | 'y1'>) {\n  const middle = (link.x0 + link.x1) / 2\n  return `M${round(link.x0)},${round(link.y0)}C${round(middle)},${round(link.y0)} ${round(middle)},${round(link.y1)} ${round(link.x1)},${round(link.y1)}`\n}\n\nfunction round(value: number) {\n  return Math.round(value * 100) / 100\n}\n\n/**\n * Where a key goes from the node keyed `from`, as a grid's keys move: Up\n * and Down to the node above or below in its column, the arrow pointing\n * along reading order to the next column and the other to the one before,\n * landing on the node there whose middle is nearest, Page Up and Page Down\n * to the top and bottom of the column, and Home and End to the first and\n * last node. Past an edge, the node reached stays. Null for a key the\n * chart doesn't take.\n */\nfunction stepNode(\n  graph: FlowGraph,\n  layout: FlowLayout,\n  from: string,\n  key: string,\n  direction: ReadingDirection,\n): string | null {\n  const boxes = new Map(layout.nodes.map((node) => [node.key, node]))\n  const at = graph.nodes.find((node) => node.key === from)\n  const box = boxes.get(from)\n  if (!at || !box) return null\n  const middle = (node: LaidNode) => (node.y0 + node.y1) / 2\n  const column = (layer: number) =>\n    graph.nodes\n      .filter((node) => node.layer === layer && boxes.has(node.key))\n      .map((node) => boxes.get(node.key) as LaidNode)\n      .toSorted((a, b) => a.y0 - b.y0)\n  const own = column(at.layer)\n  const place = own.findIndex((node) => node.key === from)\n  const forward = direction === 'rtl' ? 'ArrowLeft' : 'ArrowRight'\n  const back = direction === 'rtl' ? 'ArrowRight' : 'ArrowLeft'\n  if (key === 'ArrowUp') return own[Math.max(0, place - 1)]?.key ?? from\n  if (key === 'ArrowDown') return own[Math.min(own.length - 1, place + 1)]?.key ?? from\n  if (key === 'PageUp') return own[0]?.key ?? from\n  if (key === 'PageDown') return own.at(-1)?.key ?? from\n  // The first node drawn, at the top of the first column, and the last, at the bottom of the last.\n  if (key === 'Home') return column(0)[0]?.key ?? from\n  if (key === 'End') return column(graph.columns - 1).at(-1)?.key ?? from\n  if (key !== forward && key !== back) return null\n  const step = key === forward ? 1 : -1\n  for (let layer = at.layer + step; layer >= 0 && layer < graph.columns; layer += step) {\n    const there = column(layer)\n    if (there.length === 0) continue\n    return there.reduce((best, node) =>\n      Math.abs(middle(node) - middle(box)) < Math.abs(middle(best) - middle(box))\n        ? node\n        : best,\n    ).key\n  }\n  return from\n}\n\n/** A node's label to place: where it stands, how wide each of its forms is, and how many lines each takes. */\ninterface FlowLabel {\n  key: string\n  /** Which side of its node it stands. */\n  side: 'left' | 'right'\n  /** Its forms, most first, each as wide as its widest line, in px. */\n  forms: readonly { fit: 'value' | 'name'; width: number; lines: number }[]\n}\n\n/**\n * Which form of its label each node writes, so no two labels and no label\n * and another node cover each other: the biggest nodes first, each taking\n * its fullest form that fits beside what is already placed, its name only,\n * or nothing. A label also stays inside the plot, `width` px wide.\n */\nfunction fitLabels(\n  labels: readonly FlowLabel[],\n  layout: FlowLayout,\n  options: { width: number; gap: number; line: number },\n): Map<string, 'value' | 'name' | 'none'> {\n  const boxes = new Map(layout.nodes.map((node) => [node.key, node]))\n  const placed: { x0: number; x1: number; y0: number; y1: number }[] = []\n  const fits = new Map<string, 'value' | 'name' | 'none'>()\n  const overlaps = (a: LaidNode | (typeof placed)[number], b: typeof a) =>\n    a.x0 < b.x1 && b.x0 < a.x1 && a.y0 < b.y1 && b.y0 < a.y1\n  const order = labels.toSorted((a, b) => {\n    const [boxA, boxB] = [boxes.get(a.key), boxes.get(b.key)]\n    return (boxB ? boxB.y1 - boxB.y0 : 0) - (boxA ? boxA.y1 - boxA.y0 : 0)\n  })\n  for (const label of order) {\n    const node = boxes.get(label.key)\n    fits.set(label.key, 'none')\n    if (!node) continue\n    const middle = (node.y0 + node.y1) / 2\n    for (const form of label.forms) {\n      const half = (form.lines * options.line) / 2\n      const x0 =\n        label.side === 'left' ? node.x0 - options.gap - form.width : node.x1 + options.gap\n      const box = { x0, x1: x0 + form.width, y0: middle - half, y1: middle + half }\n      if (box.x0 < 0 || box.x1 > options.width) continue\n      if (placed.some((other) => overlaps(box, other))) continue\n      if (layout.nodes.some((other) => other.key !== node.key && overlaps(box, other)))\n        continue\n      placed.push(box)\n      fits.set(label.key, form.fit)\n      break\n    }\n  }\n  return fits\n}\n\n/** A shape the chart draws and moves: a node's box, or a flow's band. */\ntype FlowShape = ({ kind: 'node' } & LaidNode) | ({ kind: 'link' } & LaidLink)\n\n/** Every node and flow of a layout, as shapes to move. */\nfunction flowShapes(layout: FlowLayout): FlowShape[] {\n  return [\n    ...layout.nodes.map((node) => ({ kind: 'node' as const, ...node })),\n    ...layout.links.map((link) => ({ kind: 'link' as const, ...link })),\n  ]\n}\n\ninterface FlowMove {\n  from: FlowShape\n  to: FlowShape\n}\n\n/**\n * Where each shape moves from and to, between the shapes drawn now, `from`,\n * and the next, `to`. A shape in both moves between its two places. A node\n * that arrives grows from its middle and one that leaves shrinks to it. A\n * flow that arrives starts where it ends, moved by as much as its nodes move,\n * so it keeps to them; one that leaves stays on its nodes where they stay,\n * and else thins away with them.\n */\nfunction flowMoves(from: readonly FlowShape[], to: readonly FlowShape[]): FlowMove[] {\n  const before = new Map(from.map((shape) => [shape.key, shape]))\n  const after = new Map(to.map((shape) => [shape.key, shape]))\n  const nodeBefore = (key: string) => {\n    const shape = before.get(key)\n    return shape?.kind === 'node' ? shape : undefined\n  }\n  const nodeAfter = (key: string) => {\n    const shape = after.get(key)\n    return shape?.kind === 'node' ? shape : undefined\n  }\n  const shifted = (\n    link: LaidLink,\n    nodes: (key: string) => LaidNode | undefined,\n    others: (key: string) => LaidNode | undefined,\n  ): LaidLink => {\n    const source = nodes(link.source)\n    const target = nodes(link.target)\n    const sourceThere = others(link.source)\n    const targetThere = others(link.target)\n    const gone = !sourceThere && !targetThere\n    return {\n      ...link,\n      y0: link.y0 + (sourceThere && source ? sourceThere.y0 - source.y0 : 0),\n      y1: link.y1 + (targetThere && target ? targetThere.y0 - target.y0 : 0),\n      width: gone ? 0 : link.width,\n    }\n  }\n  const collapsed = (node: LaidNode): LaidNode => {\n    const middle = (node.y0 + node.y1) / 2\n    return { ...node, y0: middle, y1: middle }\n  }\n  const moves: FlowMove[] = []\n  for (const shape of to) {\n    const was = before.get(shape.key)\n    if (was && was.kind === shape.kind) {\n      moves.push({ from: was, to: shape })\n    } else if (shape.kind === 'node') {\n      moves.push({ from: { ...collapsed(shape), kind: 'node' }, to: shape })\n    } else {\n      moves.push({\n        from: { ...shifted(shape, nodeAfter, nodeBefore), kind: 'link' },\n        to: shape,\n      })\n    }\n  }\n  for (const shape of from) {\n    if (after.has(shape.key)) continue\n    moves.push({\n      from: shape,\n      to:\n        shape.kind === 'node'\n          ? { ...collapsed(shape), kind: 'node' }\n          : { ...shifted(shape, nodeBefore, nodeAfter), kind: 'link' },\n    })\n  }\n  return moves\n}\n\n/** Every shape `progress` of the way through its move. */\nfunction flowShapesAt(moves: readonly FlowMove[], progress: number): FlowShape[] {\n  const mix = (a: number, b: number) => a + (b - a) * progress\n  return moves.map(({ from, to }) => {\n    if (from.kind === 'node' || to.kind === 'node') {\n      return {\n        ...to,\n        x0: mix(from.x0, to.x0),\n        x1: mix(from.x1, to.x1),\n        y0: mix(from.y0, to.y0),\n        y1: mix(from.y1, to.y1),\n      }\n    }\n    return {\n      ...to,\n      x0: mix(from.x0, to.x0),\n      x1: mix(from.x1, to.x1),\n      y0: mix(from.y0, to.y0),\n      y1: mix(from.y1, to.y1),\n      width: mix(from.width, to.width),\n    }\n  })\n}\n\nexport {\n  curveAt,\n  type FlowAlign,\n  flowAt,\n  flowEnds,\n  type FlowGraph,\n  flowGraph,\n  type FlowLabel,\n  fitLabels,\n  flowKey,\n  type FlowLayout,\n  flowLayout,\n  type FlowLink,\n  type FlowMove,\n  flowMoves,\n  type FlowNode,\n  flowPath,\n  type FlowShape,\n  flowShapes,\n  flowShapesAt,\n  type LaidLink,\n  type LaidNode,\n  linkPath,\n  stepNode,\n}\n",
      "type": "registry:lib",
      "target": "@lib/chart-flows.ts"
    }
  ],
  "type": "registry:lib"
}