{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "patterns",
  "type": "registry:component",
  "title": "Patterns",
  "description": "Nucleo-based SVG pattern presets (PatternPreset, PatternTile) plus the legacy primitives vendored from @visx/pattern (MIT).",
  "dependencies": [],
  "registryDependencies": [
    "@bklit/utils"
  ],
  "files": [
    {
      "path": "src/charts/pattern-preset.tsx",
      "content": "\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { PatternTile } from \"./pattern-tile\";\n\n/**\n * Pattern presets — minimal repeating cells re-authored from Nucleo's free SVG\n * patterns (https://nucleoapp.com/svg-patterns/). Every cell is painted with\n * `currentColor`, so `color` drives it. Base names use 6px spacing; `-sparse`\n * and `-dense` variants double or halve it.\n */\ninterface PatternPresetDef {\n  label: string;\n  family: PatternPresetFamily;\n  /** Cell size in user units (the pattern repeats every `size × scale` px). */\n  size: number;\n  /** Filled artwork. */\n  fill?: string;\n  /** 1px-stroked artwork (stroke width follows `strokeWidth`). */\n  stroke?: string;\n}\n\nexport type PatternPresetFamily =\n  | \"lines\"\n  | \"grids\"\n  | \"dashed\"\n  | \"dots\"\n  | \"circles\"\n  | \"tiles\";\n\nconst PATTERN_PRESET_DEFS = {\n  vertical: {\n    label: \"Vertical\",\n    family: \"lines\",\n    size: 6,\n    stroke: \"M5.5 0V6M-0.5 0V6\",\n  },\n  \"vertical-dense\": {\n    label: \"Vertical dense\",\n    family: \"lines\",\n    size: 3,\n    stroke: \"M2.5 0V3M-0.5 0V3\",\n  },\n  horizontal: {\n    label: \"Horizontal\",\n    family: \"lines\",\n    size: 6,\n    stroke: \"M0 5.5H6M0 -0.5H6\",\n  },\n  \"horizontal-dense\": {\n    label: \"Horizontal dense\",\n    family: \"lines\",\n    size: 3,\n    stroke: \"M0 2.5H3M0 -0.5H3\",\n  },\n  \"diagonal-up\": {\n    label: \"Diagonal up\",\n    family: \"lines\",\n    size: 6,\n    stroke: \"M-2 1L1 -2M-1 6L6 -1M4 7L7 4\",\n  },\n  \"diagonal-up-sparse\": {\n    label: \"Diagonal up sparse\",\n    family: \"lines\",\n    size: 12,\n    stroke: \"M-2 1L1 -2M-1 12L12 -1M10 13L13 10\",\n  },\n  \"diagonal-down\": {\n    label: \"Diagonal down\",\n    family: \"lines\",\n    size: 6,\n    stroke: \"M-1 -1L7 7M-2 4L2 8M4 -2L8 2\",\n  },\n  \"diagonal-down-sparse\": {\n    label: \"Diagonal down sparse\",\n    family: \"lines\",\n    size: 12,\n    stroke: \"M-1 -1L13 13M-2 10L2 14M10 -2L14 2\",\n  },\n  grid: {\n    label: \"Grid\",\n    family: \"grids\",\n    size: 6,\n    stroke: \"M5.5 0V6M-0.5 0V6M0 5.5H6M0 -0.5H6\",\n  },\n  \"vertical-dashed\": {\n    label: \"Vertical dashed\",\n    family: \"dashed\",\n    size: 6,\n    fill: \"M6 1V4H5V1H6Z\",\n  },\n  \"horizontal-dashed\": {\n    label: \"Horizontal dashed\",\n    family: \"dashed\",\n    size: 6,\n    fill: \"M4 6L1 6L1 5L4 5L4 6Z\",\n  },\n  \"horizontal-dashed-dense\": {\n    label: \"Horizontal dashed dense\",\n    family: \"dashed\",\n    size: 6,\n    fill: \"M4 6L1 6L1 5L4 5L4 6ZM4 3L1 3L1 2L4 2L4 3Z\",\n  },\n  \"grid-dashed\": {\n    label: \"Grid dashed\",\n    family: \"dashed\",\n    size: 6,\n    fill: \"M6 1V4H5V1H6ZM4 6L1 6L1 5L4 5L4 6Z\",\n  },\n  \"grid-dotted\": {\n    label: \"Grid dotted\",\n    family: \"dashed\",\n    size: 6,\n    fill: \"M1 6V5H2V6H1ZM3 6V5H4V6H3ZM5 6V5H6V6H5ZM6 4H5V3H6V4ZM6 2H5V1H6V2Z\",\n  },\n  dots: { label: \"Dots\", family: \"dots\", size: 6, fill: \"M6 5H5V6H6V5Z\" },\n  \"dots-sparse\": {\n    label: \"Dots sparse\",\n    family: \"dots\",\n    size: 12,\n    fill: \"M12 11H11V12H12V11ZM6 5H5V6H6V5Z\",\n  },\n  \"diagonal-dots-up\": {\n    label: \"Diagonal dots up\",\n    family: \"dots\",\n    size: 6,\n    fill: \"M5 5h1v1h-1zM3 1h1v1h-1zM1 3h1v1h-1z\",\n  },\n  \"diagonal-dots-up-sparse\": {\n    label: \"Diagonal dots up sparse\",\n    family: \"dots\",\n    size: 12,\n    fill: \"M5 5h1v1h-1zM11 11h1v1h-1zM3 7h1v1h-1zM1 9h1v1h-1zM7 3h1v1h-1zM9 1h1v1h-1z\",\n  },\n  \"diagonal-dots-down\": {\n    label: \"Diagonal dots down\",\n    family: \"dots\",\n    size: 6,\n    fill: \"M5 5h1v1h-1zM3 3h1v1h-1zM1 1h1v1h-1z\",\n  },\n  \"diagonal-dots-down-sparse\": {\n    label: \"Diagonal dots down sparse\",\n    family: \"dots\",\n    size: 12,\n    fill: \"M11 11h1v1h-1zM9 9h1v1h-1zM7 7h1v1h-1zM5 5h1v1h-1zM3 3h1v1h-1zM1 1h1v1h-1z\",\n  },\n  \"circles-dense\": {\n    label: \"Circles dense\",\n    family: \"circles\",\n    size: 6,\n    fill: \"M1 2.5a1.5 1.5 0 1 0 3 0a1.5 1.5 0 1 0-3 0z\",\n  },\n  circles: {\n    label: \"Circles\",\n    family: \"circles\",\n    size: 12,\n    fill: \"M4 5.5a1.5 1.5 0 1 0 3 0a1.5 1.5 0 1 0-3 0z\",\n  },\n  \"circles-sparse\": {\n    label: \"Circles sparse\",\n    family: \"circles\",\n    size: 24,\n    fill: \"M4 5.5a1.5 1.5 0 1 0 3 0a1.5 1.5 0 1 0-3 0zM16 17.5a1.5 1.5 0 1 0 3 0a1.5 1.5 0 1 0-3 0z\",\n  },\n  blocks: { label: \"Blocks\", family: \"tiles\", size: 6, fill: \"M1 1h3v3h-3z\" },\n  \"checkerboard-xs\": {\n    label: \"Checkerboard XS\",\n    family: \"tiles\",\n    size: 6,\n    fill: \"M0 0h3v3h-3zM3 3h3v3h-3z\",\n  },\n  \"checkerboard-sm\": {\n    label: \"Checkerboard SM\",\n    family: \"tiles\",\n    size: 8,\n    fill: \"M0 0h4v4h-4zM4 4h4v4h-4z\",\n  },\n  checkerboard: {\n    label: \"Checkerboard\",\n    family: \"tiles\",\n    size: 12,\n    fill: \"M0 0h6v6h-6zM6 6h6v6h-6z\",\n  },\n  \"checkerboard-lg\": {\n    label: \"Checkerboard LG\",\n    family: \"tiles\",\n    size: 24,\n    fill: \"M12 0H0V12H12V0ZM24 12H12V24H24V12Z\",\n  },\n  \"checkerboard-inset\": {\n    label: \"Checkerboard inset\",\n    family: \"tiles\",\n    size: 12,\n    fill: \"M0 0h5v5h-5zM6 6h5v5h-5z\",\n  },\n} as const satisfies Record<string, PatternPresetDef>;\n\nexport const PATTERN_PRESET_IDS = [\n  \"none\",\n  \"vertical\",\n  \"vertical-dense\",\n  \"horizontal\",\n  \"horizontal-dense\",\n  \"diagonal-up\",\n  \"diagonal-up-sparse\",\n  \"diagonal-down\",\n  \"diagonal-down-sparse\",\n  \"grid\",\n  \"vertical-dashed\",\n  \"horizontal-dashed\",\n  \"horizontal-dashed-dense\",\n  \"grid-dashed\",\n  \"grid-dotted\",\n  \"dots\",\n  \"dots-sparse\",\n  \"diagonal-dots-up\",\n  \"diagonal-dots-up-sparse\",\n  \"diagonal-dots-down\",\n  \"diagonal-dots-down-sparse\",\n  \"circles-dense\",\n  \"circles\",\n  \"circles-sparse\",\n  \"blocks\",\n  \"checkerboard-xs\",\n  \"checkerboard-sm\",\n  \"checkerboard\",\n  \"checkerboard-lg\",\n  \"checkerboard-inset\",\n] as const;\n\n/** A current preset id (what `PATTERN_PRESET_IDS` lists). */\nexport type PatternPresetKey = (typeof PATTERN_PRESET_IDS)[number];\n\n/** Ids from the pre-Nucleo preset set, still accepted and mapped forward. */\nexport type LegacyPatternPresetId = \"diagonal\" | \"cross\" | \"accent\";\n\n/** Any accepted preset id — current or legacy. */\nexport type PatternPresetId = PatternPresetKey | LegacyPatternPresetId;\n\nconst LEGACY_PATTERN_PRESETS: Record<LegacyPatternPresetId, PatternPresetKey> =\n  {\n    diagonal: \"diagonal-up\",\n    cross: \"grid\",\n    accent: \"diagonal-up\",\n  };\n\n/** Map any preset id (current or legacy) to a current one; unknown → `none`. */\nexport function resolvePatternPresetId(\n  preset: string | null | undefined\n): PatternPresetKey {\n  if (!preset) {\n    return \"none\";\n  }\n  if (preset in LEGACY_PATTERN_PRESETS) {\n    return LEGACY_PATTERN_PRESETS[preset as LegacyPatternPresetId];\n  }\n  return (PATTERN_PRESET_IDS as readonly string[]).includes(preset)\n    ? (preset as PatternPresetKey)\n    : \"none\";\n}\n\nexport interface PatternPresetMeta {\n  id: Exclude<PatternPresetKey, \"none\">;\n  label: string;\n  family: PatternPresetFamily;\n  size: number;\n}\n\n/** Every preset except `none`, in display order. */\nexport const PATTERN_PRESETS: readonly PatternPresetMeta[] = (\n  Object.entries(PATTERN_PRESET_DEFS) as [\n    Exclude<PatternPresetKey, \"none\">,\n    PatternPresetDef,\n  ][]\n).map(([id, def]) => ({\n  id,\n  label: def.label,\n  family: def.family,\n  size: def.size,\n}));\n\nexport interface PatternPresetOptions {\n  /** Artwork colour (`currentColor`). Default: `var(--chart-1)` */\n  color?: string;\n  /** Tile size multiplier. Default: 1 */\n  scale?: number;\n  /** Stroke width for line presets, in cell units. Default: 1 */\n  strokeWidth?: number;\n  /** Artwork opacity. Default: 1 */\n  opacity?: number;\n  /** Solid fill painted under the artwork. */\n  tileBackground?: string;\n  /** @deprecated No effect — only applied to the pre-Nucleo circle presets. */\n  radius?: number;\n  /** @deprecated No effect — only applied to the pre-Nucleo circle presets. */\n  complement?: boolean;\n  /** @deprecated No effect — only applied to the pre-Nucleo circle presets. */\n  fill?: string;\n  /** @deprecated No effect — only applied to the pre-Nucleo dot preset. */\n  dotFill?: boolean;\n}\n\n/** Presets drawn as circles. */\nexport function isCirclePattern(preset: PatternPresetId): boolean {\n  const id = resolvePatternPresetId(preset);\n  return id !== \"none\" && PATTERN_PRESET_DEFS[id].family === \"circles\";\n}\n\n/** @deprecated Use `isCirclePattern`. */\nexport function isCirclesPattern(preset: PatternPresetId): boolean {\n  return isCirclePattern(preset);\n}\n\n/** Rendered tile size for a preset at `scale`. */\nexport function patternPresetTileSize(\n  preset: PatternPresetId,\n  scale = 1\n): { width: number; height: number; strokeWidth: number } {\n  const id = resolvePatternPresetId(preset);\n  const def: PatternPresetDef | undefined =\n    id === \"none\" ? undefined : PATTERN_PRESET_DEFS[id];\n  const size = (def?.size ?? 6) * scale;\n  return {\n    width: size,\n    height: size,\n    strokeWidth: def?.stroke ? scale : 0,\n  };\n}\n\n/** Renders the `<defs><pattern/></defs>` node for a preset. */\nexport function renderPatternPreset(\n  preset: PatternPresetId,\n  id: string,\n  options: PatternPresetOptions = {}\n): ReactNode {\n  const resolved = resolvePatternPresetId(preset);\n  if (resolved === \"none\") {\n    return null;\n  }\n  const def: PatternPresetDef = PATTERN_PRESET_DEFS[resolved];\n  const color =\n    options.color ?? (preset === \"accent\" ? \"#e879f9\" : \"var(--chart-1)\");\n\n  return (\n    <PatternTile\n      background={options.tileBackground}\n      color={color}\n      id={id}\n      opacity={options.opacity}\n      scale={options.scale}\n      size={def.size}\n    >\n      {def.fill ? <path d={def.fill} fill=\"currentColor\" /> : null}\n      {def.stroke ? (\n        <path\n          d={def.stroke}\n          fill=\"none\"\n          stroke=\"currentColor\"\n          strokeWidth={options.strokeWidth ?? 1}\n        />\n      ) : null}\n    </PatternTile>\n  );\n}\n\nexport interface PatternPresetProps extends PatternPresetOptions {\n  /** Unique id — reference it as `fill=\"url(#id)\"`. */\n  id: string;\n  /** Preset to draw. Default: `\"diagonal-up\"` */\n  preset?: PatternPresetId;\n}\n\n/**\n * Pattern definition for any preset. Drop it into a chart's children and\n * reference it with `fill=\"url(#id)\"`.\n *\n * @example <PatternPreset id=\"stripes\" preset=\"diagonal-up\" color=\"var(--chart-2)\" />\n */\nexport function PatternPreset({\n  id,\n  preset = \"diagonal-up\",\n  ...options\n}: PatternPresetProps) {\n  return <>{renderPatternPreset(preset, id, options)}</>;\n}\n\nPatternPreset.displayName = \"PatternPreset\";\n",
      "type": "registry:component",
      "target": "components/charts/pattern-preset.tsx"
    },
    {
      "path": "src/charts/pattern-tile.tsx",
      "content": "\"use client\";\n\nimport type { ReactNode } from \"react\";\n\nexport interface PatternTileProps {\n  /** Unique id — reference it as `fill=\"url(#id)\"`. */\n  id: string;\n  /** Tile artwork. Paint with `currentColor` so `color` drives it. */\n  children: ReactNode;\n  /** Native tile size of the artwork's viewBox (square). Default: 48 */\n  size?: number;\n  /** Multiplier on the rendered tile size. Default: 1 */\n  scale?: number;\n  /** Colour applied as `currentColor`. Default: `var(--chart-1)` */\n  color?: string;\n  /** Opacity of the artwork (not the background). Default: 1 */\n  opacity?: number;\n  /** Optional solid fill painted under the artwork. */\n  background?: string;\n}\n\n/**\n * Square SVG pattern built from tile artwork drawn in a `size × size` viewBox.\n * Hoisted into chart `<defs>` like the other `Pattern*` components.\n */\nexport function PatternTile({\n  id,\n  children,\n  size = 48,\n  scale = 1,\n  color = \"var(--chart-1)\",\n  opacity = 1,\n  background,\n}: PatternTileProps) {\n  const tile = size * scale;\n  return (\n    <defs>\n      <pattern\n        height={tile}\n        id={id}\n        patternUnits=\"userSpaceOnUse\"\n        viewBox={`0 0 ${size} ${size}`}\n        width={tile}\n      >\n        {background ? (\n          <rect fill={background} height={size} width={size} />\n        ) : null}\n        <g opacity={opacity} style={{ color }}>\n          {children}\n        </g>\n      </pattern>\n    </defs>\n  );\n}\n\nPatternTile.displayName = \"PatternTile\";\n",
      "type": "registry:component",
      "target": "components/charts/pattern-tile.tsx"
    },
    {
      "path": "src/charts/patterns/index.ts",
      "content": "/**\n * Ported from @visx/pattern 4.0.0 (https://github.com/airbnb/visx).\n * MIT License — Copyright (c) 2017-2018 Harrison Shoff. See ./LICENSE-visx-pattern.\n */\n\nexport type { PatternCirclesProps } from \"./circles\";\nexport { Circles as PatternCircles } from \"./circles\";\nexport type { PatternOrientationType } from \"./constants\";\nexport { PatternOrientation } from \"./constants\";\nexport type { PatternHexagonsProps } from \"./hexagons\";\nexport { Hexagons as PatternHexagons } from \"./hexagons\";\nexport type { PatternLinesProps } from \"./lines\";\nexport { Lines as PatternLines } from \"./lines\";\nexport type { PatternPathProps } from \"./path\";\nexport { Path as PatternPath } from \"./path\";\nexport type { PatternProps } from \"./pattern\";\nexport { Pattern } from \"./pattern\";\nexport type { PatternWavesProps } from \"./waves\";\nexport { Waves as PatternWaves } from \"./waves\";\n",
      "type": "registry:component",
      "target": "components/charts/patterns/index.ts"
    },
    {
      "path": "src/charts/patterns/pattern.tsx",
      "content": "/**\n * Ported from @visx/pattern 4.0.0 (https://github.com/airbnb/visx).\n * MIT License — Copyright (c) 2017-2018 Harrison Shoff. See ./LICENSE-visx-pattern.\n */\n\nimport type { ReactNode } from \"react\";\n\nexport interface PatternProps {\n  /** Unique id of the pattern element. */\n  id: string;\n  /** Width of the pattern. */\n  width: number;\n  /** Height of the pattern. */\n  height: number;\n  /** Children of pattern element to render. */\n  children: ReactNode;\n}\n\nexport function Pattern({ id, width, height, children }: PatternProps) {\n  return (\n    <defs>\n      <pattern\n        height={height}\n        id={id}\n        patternUnits=\"userSpaceOnUse\"\n        width={width}\n      >\n        {children}\n      </pattern>\n    </defs>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/charts/patterns/pattern.tsx"
    },
    {
      "path": "src/charts/patterns/constants.ts",
      "content": "/**\n * Ported from @visx/pattern 4.0.0 (https://github.com/airbnb/visx).\n * MIT License — Copyright (c) 2017-2018 Harrison Shoff. See ./LICENSE-visx-pattern.\n */\n\nexport const PatternOrientation = {\n  horizontal: \"horizontal\",\n  vertical: \"vertical\",\n  diagonal: \"diagonal\",\n  diagonalRightToLeft: \"diagonalRightToLeft\",\n} as const;\n\nexport type PatternOrientationType =\n  (typeof PatternOrientation)[keyof typeof PatternOrientation];\n",
      "type": "registry:component",
      "target": "components/charts/patterns/constants.ts"
    },
    {
      "path": "src/charts/patterns/lines.tsx",
      "content": "/**\n * Ported from @visx/pattern 4.0.0 (https://github.com/airbnb/visx).\n * MIT License — Copyright (c) 2017-2018 Harrison Shoff. See ./LICENSE-visx-pattern.\n */\nimport { cn } from \"@/lib/utils\";\nimport { PatternOrientation, type PatternOrientationType } from \"./constants\";\nimport { Pattern } from \"./pattern\";\n\nexport function pathForOrientation({\n  height,\n  orientation,\n}: {\n  height: number;\n  orientation: PatternOrientationType;\n}): string {\n  switch (orientation) {\n    case PatternOrientation.horizontal:\n      return `M 0,${height / 2} l ${height},0`;\n    case PatternOrientation.diagonal:\n      return `M 0,${height} l ${height},${-height} M ${-height / 4},${height / 4} l ${height / 2},${-height / 2}\n             M ${(3 / 4) * height},${(5 / 4) * height} l ${height / 2},${-height / 2}`;\n    case PatternOrientation.diagonalRightToLeft:\n      return `M 0,0 l ${height},${height}\n        M ${-height / 4},${(3 / 4) * height} l ${height / 2},${height / 2}\n        M ${(3 / 4) * height},${-height / 4} l ${height / 2},${height / 2}`;\n    default:\n      return `M ${height / 2}, 0 l 0, ${height}`;\n  }\n}\n\nexport interface PatternLinesProps {\n  /** Unique id for the pattern. */\n  id: string;\n  /** Width of the pattern element. */\n  width: number;\n  /** Height of the pattern element. */\n  height: number;\n  /** className applied to line path element. */\n  className?: string;\n  /** Background color applied behind lines. */\n  background?: string;\n  /** Stroke color applied to path elements. */\n  stroke?: string;\n  /** strokeWidth applied to path elements. */\n  strokeWidth?: number | string;\n  /** strokeDasharray applied to path elements. */\n  strokeDasharray?: string | number;\n  /** strokeLinecap applied to path elements. */\n  strokeLinecap?: \"square\" | \"butt\" | \"round\" | \"inherit\";\n  /** shapeRendering applied to path elements. */\n  shapeRendering?: string | number;\n  /** Array of orientations to render (can mix multiple). */\n  orientation?: PatternOrientationType[];\n}\n\nexport function Lines({\n  id,\n  width,\n  height,\n  stroke,\n  strokeWidth,\n  strokeDasharray,\n  strokeLinecap = \"square\",\n  shapeRendering = \"auto\",\n  orientation = [\"vertical\"],\n  background,\n  className,\n}: PatternLinesProps) {\n  const orientations = Array.isArray(orientation)\n    ? orientation\n    : [orientation as PatternOrientationType];\n  return (\n    <Pattern height={height} id={id} width={width}>\n      {!!background && (\n        <rect\n          className={cn(\"visx-pattern-line-background\")}\n          fill={background}\n          height={height}\n          width={width}\n        />\n      )}\n      {orientations.map((o, i) => (\n        <path\n          className={cn(\"visx-pattern-line\", className)}\n          d={pathForOrientation({ orientation: o, height })}\n          // biome-ignore lint/suspicious/noArrayIndexKey: duplicate orientations are allowed; matches upstream key.\n          key={`visx-${id}-line-${o}-${i}`}\n          shapeRendering={shapeRendering}\n          stroke={stroke}\n          strokeDasharray={strokeDasharray}\n          strokeLinecap={strokeLinecap}\n          strokeWidth={strokeWidth}\n        />\n      ))}\n    </Pattern>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/charts/patterns/lines.tsx"
    },
    {
      "path": "src/charts/patterns/circles.tsx",
      "content": "/**\n * Ported from @visx/pattern 4.0.0 (https://github.com/airbnb/visx).\n * MIT License — Copyright (c) 2017-2018 Harrison Shoff. See ./LICENSE-visx-pattern.\n */\nimport { cn } from \"@/lib/utils\";\nimport { Pattern } from \"./pattern\";\n\nexport interface PatternCirclesProps {\n  /** Unique id for the pattern. */\n  id: string;\n  /** Width of the pattern element. */\n  width: number;\n  /** Height of the pattern element. */\n  height: number;\n  /** Radius of the pattern circles. */\n  radius?: number;\n  /** Fill applied to circles. */\n  fill?: string;\n  /** className applied to circles. */\n  className?: string;\n  /** stroke applied to circles. */\n  stroke?: string;\n  /** strokeWidth applied to circles. */\n  strokeWidth?: number | string;\n  /** strokeDasharray applied to circles. */\n  strokeDasharray?: number | string;\n  /** Whether to fill in circles within the pattern gaps to increase pattern density. */\n  complement?: boolean;\n  /** Background color applied behind circles. */\n  background?: string;\n}\n\nexport function Circles({\n  id,\n  width,\n  height,\n  radius = 2,\n  fill,\n  stroke,\n  strokeWidth,\n  strokeDasharray,\n  background,\n  complement = false,\n  className,\n}: PatternCirclesProps) {\n  let corners: [number, number][] | undefined;\n  if (complement) {\n    corners = [\n      [0, 0],\n      [0, height],\n      [width, 0],\n      [width, height],\n    ];\n  }\n  return (\n    <Pattern height={height} id={id} width={width}>\n      {!!background && <rect fill={background} height={height} width={width} />}\n      <circle\n        className={cn(\"visx-pattern-circle\", className)}\n        cx={width / 2}\n        cy={height / 2}\n        fill={fill}\n        r={radius}\n        stroke={stroke}\n        strokeDasharray={strokeDasharray}\n        strokeWidth={strokeWidth}\n      />\n      {corners?.map(([cornerX, cornerY]) => (\n        <circle\n          className={cn(\n            \"visx-pattern-circle visx-pattern-circle-complement\",\n            className\n          )}\n          cx={cornerX}\n          cy={cornerY}\n          fill={fill}\n          key={`${id}-complement-${cornerX}-${cornerY}`}\n          r={radius}\n          stroke={stroke}\n          strokeDasharray={strokeDasharray}\n          strokeWidth={strokeWidth}\n        />\n      ))}\n    </Pattern>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/charts/patterns/circles.tsx"
    },
    {
      "path": "src/charts/patterns/waves.tsx",
      "content": "/**\n * Ported from @visx/pattern 4.0.0 (https://github.com/airbnb/visx).\n * MIT License — Copyright (c) 2017-2018 Harrison Shoff. See ./LICENSE-visx-pattern.\n */\nimport { cn } from \"@/lib/utils\";\nimport { Path } from \"./path\";\n\nexport interface PatternWavesProps {\n  /** Unique id for the pattern. */\n  id: string;\n  /** Width of the pattern element. */\n  width: number;\n  /** Height of the pattern element. */\n  height: number;\n  /** fill color applied to path. */\n  fill?: string;\n  /** className applied to the path element. */\n  className?: string;\n  /** Background color applied behind path. */\n  background?: string;\n  /** Stroke color applied to path. */\n  stroke?: string;\n  /** strokeWidth applied to path. */\n  strokeWidth?: number | string;\n  /** strokeDasharray applied to path. */\n  strokeDasharray?: string | number;\n  /** strokeLinecap applied to path. */\n  strokeLinecap?: \"square\" | \"butt\" | \"round\" | \"inherit\";\n  /** shapeRendering applied to path. */\n  shapeRendering?: string | number;\n}\n\nexport function Waves({\n  id,\n  width,\n  height,\n  fill,\n  stroke,\n  strokeWidth,\n  strokeDasharray,\n  strokeLinecap,\n  shapeRendering,\n  background,\n  className,\n}: PatternWavesProps) {\n  return (\n    <Path\n      background={background}\n      className={cn(\"visx-pattern-wave\", className)}\n      fill={fill}\n      height={height}\n      id={id}\n      path={`M 0 ${height / 2} c ${height / 8} ${-height / 4} , ${(height * 3) / 8} ${-height / 4} , ${height / 2} 0\n             c ${height / 8} ${height / 4} , ${(height * 3) / 8} ${height / 4} , ${height / 2} 0 M ${-height / 2} ${height / 2}\n             c ${height / 8} ${height / 4} , ${(height * 3) / 8} ${height / 4} , ${height / 2} 0 M ${height} ${height / 2}\n             c ${height / 8} ${-height / 4} , ${(height * 3) / 8} ${-height / 4} , ${height / 2} 0`}\n      shapeRendering={shapeRendering}\n      stroke={stroke}\n      strokeDasharray={strokeDasharray}\n      strokeLinecap={strokeLinecap}\n      strokeWidth={strokeWidth}\n      width={width}\n    />\n  );\n}\n",
      "type": "registry:component",
      "target": "components/charts/patterns/waves.tsx"
    },
    {
      "path": "src/charts/patterns/hexagons.tsx",
      "content": "/**\n * Ported from @visx/pattern 4.0.0 (https://github.com/airbnb/visx).\n * MIT License — Copyright (c) 2017-2018 Harrison Shoff. See ./LICENSE-visx-pattern.\n */\nimport { cn } from \"@/lib/utils\";\nimport { Path } from \"./path\";\n\nexport interface PatternHexagonsProps {\n  /** Unique id for the pattern. */\n  id: string;\n  /** Height of the pattern element. */\n  height: number;\n  /** Size of the hexagon shape. */\n  size?: number;\n  /** Fill applied to hexagons. */\n  fill?: string;\n  /** className applied to hexagon path element. */\n  className?: string;\n  /** Background color applied behind hexagons. */\n  background?: string;\n  /** Stroke color applied to hexagon paths. */\n  stroke?: string;\n  /** strokeWidth applied to hexagon paths. */\n  strokeWidth?: number | string;\n  /** strokeDasharray applied to hexagon paths. */\n  strokeDasharray?: string | number;\n  /** strokeLinecap applied to hexagon paths. */\n  strokeLinecap?: \"square\" | \"butt\" | \"round\" | \"inherit\";\n  /** shapeRendering applied to hexagon paths. */\n  shapeRendering?: string | number;\n}\n\nexport function Hexagons({\n  id,\n  height,\n  fill,\n  stroke,\n  strokeWidth,\n  strokeDasharray,\n  strokeLinecap,\n  shapeRendering,\n  background,\n  className,\n  size = 3,\n}: PatternHexagonsProps) {\n  const sqrtSize = Math.sqrt(size);\n  return (\n    <Path\n      background={background}\n      className={cn(\"visx-pattern-hexagon\", className)}\n      fill={fill}\n      height={sqrtSize}\n      id={id}\n      path={`M ${height},0 l ${height},0 l ${height / 2},${(height * sqrtSize) / 2} l ${-height / 2},${(height * sqrtSize) / 2} l ${-height},0 l ${-height / 2},${(-height * sqrtSize) / 2} Z M 0,${(height * sqrtSize) / 2} l ${height / 2},0 M ${3 * height},${(height * sqrtSize) / 2} l ${-height / 2},0`}\n      shapeRendering={shapeRendering}\n      stroke={stroke}\n      strokeDasharray={strokeDasharray}\n      strokeLinecap={strokeLinecap}\n      strokeWidth={strokeWidth}\n      width={size}\n    />\n  );\n}\n",
      "type": "registry:component",
      "target": "components/charts/patterns/hexagons.tsx"
    },
    {
      "path": "src/charts/patterns/path.tsx",
      "content": "/**\n * Ported from @visx/pattern 4.0.0 (https://github.com/airbnb/visx).\n * MIT License — Copyright (c) 2017-2018 Harrison Shoff. See ./LICENSE-visx-pattern.\n */\nimport { cn } from \"@/lib/utils\";\nimport { Pattern } from \"./pattern\";\n\nexport interface PatternPathProps {\n  /** Unique id for the pattern. */\n  id: string;\n  /** Width of the pattern element. */\n  width: number;\n  /** Height of the pattern element. */\n  height: number;\n  /** d attribute of the path element */\n  path?: string;\n  /** fill color applied to path. */\n  fill?: string;\n  /** className applied to the path element. */\n  className?: string;\n  /** Background color applied behind path. */\n  background?: string;\n  /** Stroke color applied to path. */\n  stroke?: string;\n  /** strokeWidth applied to path. */\n  strokeWidth?: number | string;\n  /** strokeDasharray applied to path. */\n  strokeDasharray?: string | number;\n  /** strokeLinecap applied to path. */\n  strokeLinecap?: \"square\" | \"butt\" | \"round\" | \"inherit\";\n  /** shapeRendering applied to path. */\n  shapeRendering?: string | number;\n}\n\nexport function Path({\n  id,\n  width,\n  height,\n  path,\n  fill = \"transparent\",\n  stroke,\n  strokeWidth,\n  strokeDasharray,\n  strokeLinecap = \"square\",\n  shapeRendering = \"auto\",\n  background,\n  className,\n}: PatternPathProps) {\n  return (\n    <Pattern height={height} id={id} width={width}>\n      {!!background && <rect fill={background} height={height} width={width} />}\n      <path\n        className={cn(\"visx-pattern-path\", className)}\n        d={path}\n        fill={fill}\n        shapeRendering={shapeRendering}\n        stroke={stroke}\n        strokeDasharray={strokeDasharray}\n        strokeLinecap={strokeLinecap}\n        strokeWidth={strokeWidth}\n      />\n    </Pattern>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/charts/patterns/path.tsx"
    },
    {
      "path": "src/charts/patterns/LICENSE-visx-pattern",
      "content": "MIT License\n\nCopyright (c) 2017-2018 Harrison Shoff\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n",
      "type": "registry:file",
      "target": "components/charts/patterns/LICENSE-visx-pattern"
    }
  ]
}