{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "dot-pattern-with-glow",
  "title": "Dot Pattern with Glow",
  "description": "A dot background that reveals a colored glow under the pointer.",
  "dependencies": [],
  "registryDependencies": [
    "@gnostic/dot-pattern",
    "@gnostic/hover-glow",
    "@gnostic/merge-styles"
  ],
  "files": [
    {
      "path": "packages/ui/src/components/patterns/dot-pattern-with-glow/dot-pattern-with-glow.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { DotPatternWithGlowProps } from \"./types.ts\"\n\nimport { mergeStyles } from \"@/lib/merge-styles.ts\"\n\nimport DotPattern from \"@/components/patterns/dot-pattern/dot-pattern.astro\"\nimport HoverGlow from \"@/components/patterns/hover-glow/hover-glow.astro\"\n\n/**\n * Dot background with a glow clipped to each dot.\n *\n * HoverGlow tracks the pointer. This component adds the base dots and\n * the mask that shows the glow only inside those dots.\n */\ntype Props = HTMLAttributes<\"div\"> & DotPatternWithGlowProps\n\nconst {\n  glowColor,\n  glowSize,\n  maskDotSize = 1.25,\n  dotLayerProps,\n  class: className,\n  style: styleProp,\n  ...props\n} = Astro.props\n\n/** Space between dots. The mask tile uses the same distance. */\nconst dotSpace = dotLayerProps?.dotSpace ?? 16\n/** Radius of each base dot. */\nconst dotSize = dotLayerProps?.dotSize ?? 1\n\n/** The mask repeats so the glow is visible only inside each dot. */\n// const style = mergeStyles(\n//   {\n//     \"--pattern-mask-dot-size\": `${maskDotSize}px`,\n//   },\n//   styleProp,\n// )\nconst style =\n  typeof styleProp === \"string\"\n    ? `--pattern-mask-dot-size: ${maskDotSize}px; ${styleProp}`\n    : {\n        ...styleProp,\n        \"--pattern-mask-dot-size\": `${maskDotSize}px`,\n      }\n---\n\n<HoverGlow\n  glowColor={glowColor}\n  glowSize={glowSize}\n  maskImage=\"radial-gradient(circle, black var(--pattern-mask-dot-size), transparent var(--pattern-mask-dot-size))\"\n  maskSize={`${dotSpace}px ${dotSpace}px`}\n  maskPosition=\"center\"\n  class={className}\n  style={style}\n  {...props}\n>\n  <slot />\n  <DotPattern\n    dotSize={dotSize}\n    dotSpace={`${dotSpace}px`}\n    dotColor={dotLayerProps?.dotColor}\n    dotBg={dotLayerProps?.dotBg}\n    class={dotLayerProps?.class}\n    style={dotLayerProps?.style}\n  />\n</HoverGlow>\n",
      "type": "registry:file",
      "target": "~/src/components/patterns/dot-pattern-with-glow/dot-pattern-with-glow.astro"
    },
    {
      "path": "packages/ui/src/components/patterns/dot-pattern-with-glow/index.ts",
      "content": "export { default as DotPatternWithGlow } from './dot-pattern-with-glow.astro'\nexport type { DotPatternWithGlowProps } from './types.ts'\n",
      "type": "registry:file",
      "target": "~/src/components/patterns/dot-pattern-with-glow/index.ts"
    },
    {
      "path": "packages/ui/src/components/patterns/dot-pattern-with-glow/types.ts",
      "content": "/**\n * Options forwarded to the base dot layer.\n * `dotSize` and `dotSpace` also align the glow mask with those dots.\n */\n\ntype DotLayerProps = {\n    /** Radius of each base dot, in pixels. */\n    dotSize?: number\n    /** Distance from one base dot to the next, in pixels. */\n    dotSpace?: number\n    /** CSS color of each base dot. */\n    dotColor?: string\n    /** CSS color behind the base dots. */\n    dotBg?: string\n    /** Extra classes on the base dot layer. */\n    class?: string\n    /** Extra CSS declarations on the base dot layer. */\n    style?: astroHTML.JSX.CSSProperties\n}\n\n/**\n * Dot background with a glow that follows the pointer.\n *\n * The base dots stay visible. HoverGlow paints the color layer. A dot mask\n * shows that color only inside the dot shapes.\n */\nexport type DotPatternWithGlowProps = {\n    /**\n     * CSS color of the glow.\n     * Use the color's alpha value to set the glow opacity.\n     * The default keeps the glow soft.\n     *\n     * @default \"color-mix(in oklch, var(--primary) 72%, transparent)\"\n     */\n    glowColor?: string\n    /**\n     * Radius of the glow, in pixels.\n     * @default 96\n     */\n    glowSize?: number\n    /**\n     * Radius of each dot in the glow mask, in pixels.\n     * @default 1.25\n     */\n    maskDotSize?: number\n    /**\n     * Props for the base dot layer.\n     *\n     * @link {DotPatternProps}\n     */\n    dotLayerProps?: DotLayerProps\n}\n",
      "type": "registry:file",
      "target": "~/src/components/patterns/dot-pattern-with-glow/types.ts"
    }
  ],
  "meta": {
    "framework": "astro",
    "source": "@gnostic/ui"
  },
  "docs": "https://gnosticai.com/ui/patterns/dot-pattern-with-glow",
  "categories": [
    "patterns"
  ],
  "type": "registry:component"
}
