{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "funnel-chart",
  "title": "Funnel chart",
  "description": "How many get through each step, such as sign-up to paid, as bars on one baseline, with the step before standing lighter behind each bar for who dropped off and each step’s rate over its column: its share of the first step or of the step before. Two periods compare side by side, upright or lying. The step under the pointer stays bright while the rest step back, and new data moves every bar and rolls every rate.",
  "dependencies": [],
  "registryDependencies": [
    "https://kinoui.com/r/chart-bar-marks.json",
    "https://kinoui.com/r/chart-frame.json",
    "https://kinoui.com/r/chart.json",
    "https://kinoui.com/r/chart-bars.json",
    "https://kinoui.com/r/chart-core.json",
    "https://kinoui.com/r/chart-root.json",
    "https://kinoui.com/r/chart-math.json",
    "https://kinoui.com/r/number-format.json",
    "https://kinoui.com/r/theme.json"
  ],
  "files": [
    {
      "path": "registry/components/kino/funnel-chart.tsx",
      "content": "'use client'\n\nimport { slotBand } from '@/registry/lib/chart-bar-marks'\nimport {\n  barClip,\n  BarLabel,\n  type BarPlace,\n  BarPlaceholder,\n  BarShape,\n  labelFits,\n  labelPlace,\n  missingMark,\n  outsideRoom,\n  placeholderClip,\n} from '@/registry/lib/chart-bars'\nimport {\n  type CategoryChartProps,\n  type ChartWords,\n  type EntrancePhase,\n  figureProps,\n  pickedName,\n  useChartActive,\n  useDeclared,\n} from '@/registry/lib/chart-base'\nimport {\n  CartesianChartFrame,\n  type CartesianChartValue,\n  cartesianSignature,\n  type CartesianStop,\n  cartesianTable,\n  type ChartPartDeclaration,\n  type ChartRoomState,\n  useCartesian,\n  useCartesianChart,\n} from '@/registry/lib/chart-cartesian'\nimport type { MarkKind } from '@/registry/lib/chart-frame'\nimport {\n  cascadeAt,\n  type ChartDatum,\n  type ChartOrientation,\n  numberOf,\n  plotPoint,\n  type SeriesValueOf,\n  seriesSpans,\n} from '@/registry/lib/chart-math'\nimport {\n  ChartNumber,\n  type ChartItem,\n  forcedSeriesColor,\n  formatterOf,\n  plotLayerClassName,\n  seriesColor,\n  swatchClassName,\n  swatchStyle,\n  tooltipQuietClassName,\n} from '@/registry/lib/chart-root'\nimport type { BandGaps } from '@/registry/lib/chart-scale'\nimport { numberFormatter } from '@/registry/lib/number-format'\nimport { type ComponentProps, createContext, Fragment, use } from 'react'\n\nimport { cn } from '@/lib/utils'\n\n/*\n * The Funnel chart: how many get through each step, such as sign-up to\n * paid, as bars on one baseline. Behind each step's bar stands a lighter\n * one as tall as the step before, the people who dropped off between them,\n * and over each column its rate rolls to every new value: its share of the\n * first step, or of the step before. Two periods compare as bars side by\n * side. The bars are the Bar chart's own, on the same cartesian frame, so a\n * funnel moves, dims and loads as every bar does; the step under the\n * pointer stays bright while the rest step back.\n */\n\n/** What each step's rate is a share of: the first step, or the step before it. */\ntype FunnelRate = 'first' | 'previous'\n\ninterface FunnelChartProps extends Omit<CategoryChartProps, 'ordered'> {\n  /** Upright bars over the steps, or bars lying along them. */\n  orientation?: ChartOrientation\n  /**\n   * How the bars arrive the first time the chart comes into view: all\n   * rising together, one step after another, or simply there, the default,\n   * since a page that loads doesn't animate into place.\n   */\n  entrance?: 'rise' | 'cascade' | 'none'\n  /** The space between two steps, as a share of one step. */\n  categoryGap?: number\n  /** The space between bars side by side, as a share of one bar's slot. */\n  barGap?: number\n  /** Draws the step before behind each step's bar, lighter, for those who dropped off between them. */\n  drop?: boolean\n}\n\n/** One step of one series: its value, its shares of the first step and of the step before, and how many dropped off since. */\ninterface FunnelStep {\n  value: number | null\n  /** The step before's value; none for the first step. */\n  previous: number | null\n  ofFirst: number | null\n  ofPrevious: number | null\n  /** How many the step before had that this one hasn't; none when this one has more. */\n  dropped: number | null\n}\n\ninterface FunnelContextValue {\n  /** Each series' steps, in the data's order. */\n  steps: Record<string, readonly FunnelStep[]>\n  drop: boolean\n  phase: EntrancePhase\n  fromPlaceholder: boolean\n  entrance: NonNullable<FunnelChartProps['entrance']>\n  /** How far through the cascade each step's bars start. */\n  cascade: readonly number[]\n  barGap: number\n}\n\nconst FunnelContext = createContext<FunnelContextValue | null>(null)\n\nfunction useFunnelChart() {\n  const funnel = use(FunnelContext)\n  if (!funnel) throw new Error('`Funnel` goes inside a `FunnelChart`.')\n  return funnel\n}\n\n/** How tall the placeholder's bars stand, as fractions of the plot: a typical funnel, knowing nothing of the data. */\nconst PLACEHOLDER_VALUES = [0.92, 0.68, 0.5, 0.36, 0.24] as const\n\n/** How rates are written: whole percents, with a tenth below 10%, where a whole one hides the change. */\nconst RATE_FORMAT = { style: 'percent', maximumFractionDigits: 1 } as const\n\nconst funnelChartKeys = ['orientation', 'entrance', 'categoryGap', 'barGap', 'drop']\n\n/** Every series at a step, read along the steps. */\nconst X_BROWSE = { kind: 'x' } as const\n\n/** The legend's keys are plain swatches. */\nfunction noMarker() {\n  return null\n}\n\n/**\n * The chart's root: it works out each series' steps from the data, and\n * lays out the frame its parts draw in.\n */\nfunction FunnelChart(props: FunnelChartProps) {\n  const {\n    config,\n    orientation = 'vertical',\n    entrance = 'none',\n    categoryGap,\n    barGap = 0.12,\n    drop = true,\n    locale,\n    description,\n    empty,\n    className,\n    children,\n    ref,\n  } = props\n  const gaps: BandGaps = categoryGap === undefined ? {} : { gap: categoryGap }\n  const cartesian = useCartesianChart(\n    { ...props, ordered: false },\n    {\n      kinds: [funnelMarks(drop)],\n      orientation,\n      stack: 'none',\n      entrance: entrance !== 'none',\n      cascade:\n        entrance === 'cascade'\n          ? { variable: '--funnel-chart-cascade', fallback: 0.8 }\n          : undefined,\n      y: { nice: true },\n      gaps,\n    },\n  )\n  const { chart, model, placeholder, fromPlaceholder, phase } = cartesian\n  const stops = chart.current\n  const steps = Object.fromEntries(\n    chart.series.map((key) => [\n      key,\n      funnelSteps(stops.map((stop) => numberOf(chart.valueOf(key, stop)))),\n    ]),\n  )\n  const shown = chart.series.filter((key) => !chart.hidden.includes(key))\n  const cascade = stops.map((_, at) => cascadeAt(at, stops.length, 'start'))\n  const write = chart.valueText\n  const writeRate = numberFormatter(locale, RATE_FORMAT)\n  const { messages } = chart\n  /**\n   * A step's value, its shares and its drop, as written; briefly, the first\n   * step's share of itself and the second's of the first, which is its\n   * share of the step before, are left out.\n   */\n  const figures = (key: string, at: number, brief = true) => {\n    const step = steps[key]?.[at]\n    if (!step) return []\n    return [\n      step.value === null ? messages.noValue : write(step.value),\n      step.ofFirst === null || (brief && at < 2) ? '' : writeRate.format(step.ofFirst),\n      step.ofPrevious === null ? '' : writeRate.format(step.ofPrevious),\n      step.dropped === null ? '' : write(step.dropped),\n    ] as const\n  }\n  const terms = [messages.ofFirst, messages.ofPrevious, messages.droppedOff] as const\n  const nameOf = (key: string) => {\n    const label = config[key]?.label\n    return typeof label === 'string' ? label : key\n  }\n  const words: ChartWords = {\n    describe: (stop) => {\n      const name = pickedName(chart.stopText(stop), chart.selected === stop.key, messages)\n      const said = shown\n        .map((key) => {\n          const [value, ...rest] = figures(key, stop.index)\n          const more = rest.flatMap((figure, w) =>\n            figure ? `${terms[w]} ${figure}` : [],\n          )\n          return [`${nameOf(key)} ${value}`, ...more].join(', ')\n        })\n        .join('; ')\n      return `${name}: ${said}`\n    },\n    tooltip: (stop) => (\n      <FunnelTooltipContent\n        chart={chart}\n        stop={stop}\n        shown={shown}\n        figures={figures}\n        terms={terms}\n      />\n    ),\n    table: cartesianTable(\n      chart,\n      shown.flatMap((key) => {\n        const name = nameOf(key)\n        return shown.length === 1\n          ? [name, ...terms]\n          : [name, ...terms.map((term) => `${name}, ${term}`)]\n      }),\n      (stop) => shown.flatMap((key) => figures(key, stop.index, false)),\n    ),\n  }\n\n  return (\n    <FunnelContext\n      value={{ steps, drop, phase, fromPlaceholder, entrance, cascade, barGap }}\n    >\n      <CartesianChartFrame\n        chart={cartesian}\n        ref={ref}\n        slot='funnel-chart'\n        description={description}\n        empty={empty}\n        className={className}\n        placeholder={\n          placeholder && <BarPlaceholder chart={chart} values={PLACEHOLDER_VALUES} />\n        }\n        markerOf={noMarker}\n        // The tooltip sits on the top of the step's columns: the tallest bar, or the step before's behind it.\n        anchor={(stop) => {\n          const along = chart.entered ? model.reach(stop.index) : null\n          return plotPoint(\n            stop.band,\n            along ?? model.baselines.value,\n            orientation,\n            chart.direction,\n          )\n        }}\n        words={words}\n        browse={X_BROWSE}\n        {...figureProps(props, funnelChartKeys)}\n      >\n        {children}\n      </CartesianChartFrame>\n    </FunnelContext>\n  )\n}\n\n/**\n * A step's values in the tooltip: for each shown series its value, and\n * after the first step its shares of the first step and of the step\n * before, and how many dropped off, each under its series.\n */\nfunction FunnelTooltipContent({\n  chart,\n  stop,\n  shown,\n  figures,\n  terms,\n}: {\n  chart: CartesianChartValue\n  stop: ChartItem\n  shown: readonly string[]\n  figures: (key: string, at: number) => readonly string[]\n  terms: readonly string[]\n}) {\n  const { id, series, config, patternOf, emphasis } = chart\n  return (\n    // The tooltip sits outside the chart, so it carries the chart's id for its colours.\n    <div data-chart={id} className='grid min-w-40 gap-1'>\n      <div className='font-medium'>{chart.stopText(stop)}</div>\n      {shown.map((key) => {\n        const [value, ...rest] = figures(key, stop.index)\n        return (\n          <div\n            key={key}\n            data-lit={emphasis === key ? '' : undefined}\n            className='group/row grid gap-0.5'\n          >\n            <div className='flex items-center gap-2'>\n              <span\n                aria-hidden\n                className={cn(swatchClassName, forcedSeriesColor(series.indexOf(key)))}\n                style={swatchStyle(key, patternOf(key))}\n              />\n              <span className={cn(tooltipQuietClassName, 'min-w-0 flex-1 truncate')}>\n                {config[key]?.label ?? key}\n              </span>\n              <span dir='auto' className='font-medium tabular-nums'>\n                {value}\n              </span>\n            </div>\n            {rest.map(\n              (figure, w) =>\n                figure && (\n                  <div key={terms[w]} className='flex items-center gap-2 ps-4'>\n                    <span className={cn(tooltipQuietClassName, 'flex-1')}>\n                      {terms[w]}\n                    </span>\n                    <span dir='auto' className='tabular-nums'>\n                      {figure}\n                    </span>\n                  </div>\n                ),\n            )}\n          </div>\n        )\n      })}\n    </div>\n  )\n}\n\n/** The part of the step's band that series `key` takes, beside the other shown series. */\nfunction slotOf(\n  chart: CartesianChartValue,\n  funnel: FunnelContextValue,\n  stop: CartesianStop,\n  key: string,\n) {\n  const order = chart.series.filter((k) => k === key || !chart.hidden.includes(k))\n  return slotBand(stop.band, order.indexOf(key), order.length, funnel.barGap)\n}\n\n/**\n * Where the bar of `key` stands on `stop`, and, behind it, the step\n * before's: from zero to each value. A hidden series, a missing value, a\n * bar that hasn't risen yet and a step that leaves all stand at zero; a\n * step that has more than the one before has nothing behind it, so its\n * drop sinks into the bar's end.\n */\nfunction funnelPlaces(\n  chart: CartesianChartValue,\n  funnel: FunnelContextValue,\n  stop: CartesianStop,\n  key: string,\n): { bar: BarPlace; drop: BarPlace } {\n  const band = slotOf(chart, funnel, stop, key)\n  const { scale } = chart.frame.y.value\n  const zero = scale.place(0)\n  const step = funnel.steps[key]?.[stop.index]\n  const standing = step && !stop.leaving && chart.entered && !chart.hidden.includes(key)\n  if (!standing) {\n    return {\n      bar: { band, from: zero, to: zero },\n      drop: { band, from: zero, to: zero },\n    }\n  }\n  const value = scale.place(step.value ?? 0)\n  // A missing step shows its dashed mark alone: nothing is known to have dropped off before it.\n  const before = scale.place(\n    funnel.drop && step.value !== null\n      ? Math.max(step.value, step.previous ?? 0)\n      : (step.value ?? 0),\n  )\n  return {\n    bar: { band, from: zero, to: value },\n    drop: { band, from: zero, to: before },\n  }\n}\n\ntype FunnelProps = Omit<ComponentProps<'div'>, 'children' | 'color'> & {\n  /** The key of this series' values in the data, and of its entry in the config. */\n  dataKey: string\n  /** A colour for one step's bar, such as one that stands out, from its row; the series' colour when it returns nothing. */\n  color?: (datum: ChartDatum, index: number) => string | undefined\n  /** What each column writes over it: the step's rate, its value, or nothing. */\n  label?: 'rate' | 'value' | 'none'\n  /** What each step's rate over its column is a share of; the first step by default. */\n  rate?: FunnelRate\n}\n\n/**\n * One series' steps: a bar for each, in the series' colour, with the step\n * before standing lighter behind it, and its rate or value over the\n * column. While the chart enters, the bars rise on `draw`, one step after\n * another with `entrance='cascade'`; after that every change moves on\n * `layout`. A missing value shows a short dashed mark at zero, so it reads\n * apart from a zero.\n */\nfunction Funnel(props: FunnelProps) {\n  const {\n    dataKey,\n    color,\n    label = 'rate',\n    rate = 'first',\n    className,\n    style,\n    ...rest\n  } = props\n  useDeclared('Funnel', Funnel.declare(props), cartesianSignature)\n  const chart = useCartesian()\n  const { spotlit } = useChartActive()\n  const funnel = useFunnelChart()\n  const { locale } = chart\n  const steps = funnel.steps[dataKey] ?? []\n  const writeRate = numberFormatter(locale, RATE_FORMAT)\n  const textOf = (step: FunnelStep | undefined) =>\n    labelText(step, label, rate, chart.valueText, (share) => writeRate.format(share))\n  if (chart.status === 'empty') return null\n  const slot = chart.series.indexOf(dataKey)\n  const shown = chart.series.filter((key) => !chart.hidden.includes(key))\n  // The widest label of any shown series' steps, so side by side they all fit or all go.\n  const widest = Math.max(\n    0,\n    ...shown.flatMap((key) =>\n      chart.current.map((stop) =>\n        chart.textWidth(textOf(funnel.steps[key]?.[stop.index])),\n      ),\n    ),\n  )\n  const zero = chart.frame.y.value.scale.place(0)\n  const dimmed = (stop: CartesianStop) =>\n    (spotlit !== null && spotlit !== stop.index) ||\n    (chart.emphasis !== null && chart.emphasis !== dataKey)\n  return (\n    <>\n      <div\n        data-slot='funnel-chart-series'\n        data-series={dataKey}\n        aria-hidden\n        className={cn(plotLayerClassName, 'z-10', className)}\n        style={style}\n        {...rest}\n      >\n        {chart.stops.map((stop) => {\n          const places = funnelPlaces(chart, funnel, stop, dataKey)\n          const step = steps[stop.index]\n          const own =\n            (stop.datum ? color?.(stop.datum, stop.index) : undefined) ??\n            seriesColor(dataKey)\n          const at = Math.min(stop.index, PLACEHOLDER_VALUES.length - 1)\n          // A bar that arrives grows out of the placeholder in its place, or up from zero.\n          const from = funnel.fromPlaceholder\n            ? placeholderClip(\n                chart,\n                at,\n                PLACEHOLDER_VALUES[at]!,\n                PLACEHOLDER_VALUES.length,\n              )\n            : barClip(chart, { band: places.bar.band, from: zero, to: zero }, true)\n          const missing =\n            !stop.leaving &&\n            chart.entered &&\n            !chart.hidden.includes(dataKey) &&\n            step?.value === null\n          const delay = cascadeDelay(funnel, stop.index)\n          const dim = dimmed(stop)\n          const entering = funnel.phase === 'entering'\n          return (\n            <Fragment key={stop.key}>\n              {funnel.drop && stop.index > 0 && (\n                <BarShape\n                  clip={barClip(chart, places.drop, true)}\n                  from={from}\n                  dim={dim}\n                  entering={entering}\n                  delay={delay}\n                  color={`color-mix(in oklab, ${own} calc(var(--funnel-chart-drop-opacity, 0.22) * 100%), transparent)`}\n                  images=''\n                  slot={slot}\n                  forced='forced-colors:bg-[GrayText]'\n                  track={undefined}\n                  missing={undefined}\n                />\n              )}\n              <BarShape\n                clip={barClip(chart, places.bar, true)}\n                from={from}\n                dim={dim}\n                entering={entering}\n                delay={delay}\n                color={own}\n                images=''\n                slot={slot}\n                track={undefined}\n                missing={\n                  missing\n                    ? missingMark(chart, places.bar.band, chart.frame.baselines.value)\n                    : undefined\n                }\n              />\n            </Fragment>\n          )\n        })}\n      </div>\n      {label !== 'none' && chart.status === 'ready' && (\n        // Above the reference lines, so a line across a value never runs through it.\n        <div aria-hidden className={cn(plotLayerClassName, 'z-20')}>\n          {chart.stops.map((stop) => {\n            const { bar, drop: behind } = funnelPlaces(chart, funnel, stop, dataKey)\n            const step = steps[stop.index]\n            const text = textOf(step)\n            const top = funnel.drop ? behind : bar\n            const across =\n              top.band.size *\n              (chart.orientation === 'vertical'\n                ? chart.plotSize.width\n                : chart.plotSize.height)\n            const fits =\n              labelFits(chart, top, text, 'outside') &&\n              // Beside another series' labels, each keeps to its own bar's width, and every\n              // series shows its labels or none does, so no rate stands alone.\n              (shown.length === 1 ||\n                chart.orientation === 'horizontal' ||\n                across >= widest + 4)\n            const value = step && (label === 'value' ? step.value : rateOf(step, rate))\n            return (\n              <BarLabel\n                key={stop.key}\n                {...labelPlace(chart, top, 'outside')}\n                // A hidden series' labels fade as its bars sink.\n                // Until the chart has entered, its bars haven't risen, so their labels wait unseen.\n                shown={\n                  chart.entered &&\n                  !stop.leaving &&\n                  !chart.hidden.includes(dataKey) &&\n                  text !== '' &&\n                  fits\n                }\n                dim={dimmed(stop)}\n                entering={funnel.phase === 'entering'}\n                delay={cascadeDelay(funnel, stop.index)}\n              >\n                {value !== null && value !== undefined && (\n                  <ChartNumber\n                    value={value}\n                    locale={locale}\n                    format={label === 'value' ? chart.format : RATE_FORMAT}\n                  />\n                )}\n              </BarLabel>\n            )\n          })}\n        </div>\n      )}\n    </>\n  )\n}\n\n// A funnel is its series; its labels over the columns keep room for themselves past the value\n// axis's far end, worked out from what they will read.\nFunnel.declare = ({\n  dataKey,\n  label = 'rate',\n  rate = 'first',\n}: FunnelProps): ChartPartDeclaration => ({\n  series: { key: dataKey, mark: 'bar' },\n  ...(label === 'none'\n    ? {}\n    : {\n        room: (chart: ChartRoomState) => funnelRoom(chart, dataKey, label, rate),\n      }),\n})\n\n/** The share a step's label writes: of the first step, or of the step before. */\nfunction rateOf(step: FunnelStep, rate: FunnelRate) {\n  return rate === 'first' ? step.ofFirst : step.ofPrevious\n}\n\n/** What a step's label reads: its rate, its value, or nothing for none or a missing one. */\nfunction labelText(\n  step: FunnelStep | undefined,\n  label: NonNullable<FunnelProps['label']>,\n  rate: FunnelRate,\n  write: (value: number) => string,\n  writeRate: (share: number) => string,\n) {\n  if (!step || label === 'none') return ''\n  if (label === 'value') return step.value === null ? '' : write(step.value)\n  const share = rateOf(step, rate)\n  return share === null ? '' : writeRate(share)\n}\n\n/** The room past the value axis's far end that the labels of the series `dataKey` take, in px, from the rows the chart draws. */\nfunction funnelRoom(\n  chart: ChartRoomState,\n  dataKey: string,\n  label: NonNullable<FunnelProps['label']>,\n  rate: FunnelRate,\n) {\n  const write = formatterOf(chart.locale, chart.format)\n  const writeRate = numberFormatter(chart.locale, RATE_FORMAT)\n  const steps = funnelSteps(chart.rows.map((row) => numberOf(row[dataKey])))\n  return outsideRoom(\n    chart,\n    steps.map((step) =>\n      labelText(step, label, rate, write, (share) => writeRate.format(share)),\n    ),\n  )\n}\n\n/** How long the bars of the step at `index` wait in a cascade's entrance; none otherwise. */\nfunction cascadeDelay(funnel: FunnelContextValue, index: number) {\n  return funnel.entrance === 'cascade' && funnel.phase === 'entering'\n    ? `calc(var(--motion-draw-duration) * var(--funnel-chart-cascade, 0.8) * ${funnel.cascade[index] ?? 0})`\n    : undefined\n}\n\n/**\n * Each step of one series from its values in order: its shares of the\n * first step and of the step before, and how many dropped off since. A\n * share of a missing or zero step, and a drop from or to a missing one,\n * is none.\n */\nfunction funnelSteps(values: readonly (number | null)[]): FunnelStep[] {\n  const first = values[0] ?? null\n  return values.map((value, at) => {\n    const previous = at === 0 ? null : (values[at - 1] ?? null)\n    const share = (of: number | null) =>\n      value === null || of === null || of <= 0 ? null : value / of\n    return {\n      value,\n      previous,\n      ofFirst: share(first),\n      ofPrevious: share(previous),\n      dropped:\n        value === null || previous === null || previous < value ? null : previous - value,\n    }\n  })\n}\n\n/**\n * How high the tallest column of `count` steps stands across the `keys`\n * shown, each value read with `valueOf`: each step's own value, or with\n * `drop` the step before's, which stands behind any step that has a value.\n * With `at`, only that step's column, with the step before it standing\n * behind.\n */\nfunction columnTop(\n  count: number,\n  valueOf: SeriesValueOf,\n  keys: readonly string[],\n  drop: boolean,\n  at?: number,\n): number {\n  let top = 0\n  const first = at ?? 0\n  const end = at === undefined ? count : Math.min(at + 1, count)\n  for (let step = first; step < end; step += 1) {\n    for (const key of keys) {\n      const own = numberOf(valueOf(key, step))\n      // A missing step has nothing standing behind it.\n      const behind =\n        drop && step > 0 && own !== null ? (numberOf(valueOf(key, step - 1)) ?? 0) : 0\n      top = Math.max(top, own ?? 0, behind)\n    }\n  }\n  return top\n}\n\n/**\n * A funnel's bars as a kind of mark on the cartesian frame: each step's bar\n * from zero to its value, side by side and never stacked, with the value\n * axis reaching the tallest column, the step before's behind it with\n * `drop`, which the tooltip sits on too.\n */\nfunction funnelMarks(drop: boolean): MarkKind {\n  return {\n    mark: 'bar',\n    stacks: false,\n    spans: ({ count, valueOf, series, shown }) => ({\n      spans: seriesSpans(count, valueOf, series, 'none'),\n      extent: [0, columnTop(count, valueOf, shown, drop)],\n    }),\n    reach: (spans, shown, index, scale) =>\n      scale.place(\n        columnTop(\n          index + 1,\n          (key, at) => spans[key]?.[at]?.[1] ?? null,\n          shown,\n          drop,\n          index,\n        ),\n      ),\n  }\n}\n\nexport {\n  Funnel,\n  FunnelChart,\n  type FunnelChartProps,\n  type FunnelProps,\n  type FunnelRate,\n  type FunnelStep,\n  columnTop,\n  funnelMarks,\n  funnelSteps,\n}\n",
      "type": "registry:component",
      "target": "@components/kino/funnel-chart.tsx"
    }
  ],
  "type": "registry:component"
}