{
	"$schema": "https://shadcn-svelte.com/schema/registry-item.json",
	"name": "noise-texture",
	"title": "Noise Texture",
	"type": "registry:block",
	"description": "An SVG fractal noise layer using feTurbulence for subtle texture overlays.",
	"files": [
		{
			"content": "<script lang=\"ts\">\n\timport type { SVGAttributes } from \"svelte/elements\";\n\timport { cn } from \"$UTILS$\";\n\n\tinterface NoiseTextureProps extends SVGAttributes<SVGSVGElement> {\n\t\tclass?: string;\n\t\t/**\n\t\t * `baseFrequency` for `feTurbulence`; higher values yield finer-grained noise.\n\t\t * @default 0.4\n\t\t */\n\t\tfrequency?: number;\n\t\t/**\n\t\t * `numOctaves` for `feTurbulence`; more octaves add detail at smaller scales.\n\t\t * @default 6\n\t\t */\n\t\toctaves?: number;\n\t\t/**\n\t\t * Linear slope on each channel after desaturation; adjusts contrast of the noise.\n\t\t * @default 0.15\n\t\t */\n\t\tslope?: number;\n\t\t/**\n\t\t * Opacity of the filled noise layer (`rect`).\n\t\t * @default 0.6\n\t\t */\n\t\tnoiseOpacity?: number;\n\t}\n\n\tlet {\n\t\tclass: className,\n\t\tfrequency = 0.4,\n\t\toctaves = 6,\n\t\tslope = 0.15,\n\t\tnoiseOpacity = 0.6,\n\t\t...props\n\t}: NoiseTextureProps = $props();\n\n\tlet filterId = $props.id();\n</script>\n\n<svg\n\tclass={cn(\n\t\t\"pointer-events-none absolute inset-0 z-0 size-full opacity-50 select-none dark:opacity-[0.75]\",\n\t\tclassName\n\t)}\n\txmlns=\"http://www.w3.org/2000/svg\"\n\t{...props}\n>\n\t<filter id={filterId}>\n\t\t<feTurbulence\n\t\t\ttype=\"fractalNoise\"\n\t\t\tbaseFrequency={frequency}\n\t\t\tnumOctaves={octaves}\n\t\t\tstitchTiles=\"stitch\"\n\t\t/>\n\t\t<feColorMatrix type=\"saturate\" values=\"0\" />\n\t\t<feComponentTransfer>\n\t\t\t<feFuncR type=\"linear\" {slope} />\n\t\t\t<feFuncG type=\"linear\" {slope} />\n\t\t\t<feFuncB type=\"linear\" {slope} />\n\t\t</feComponentTransfer>\n\t</filter>\n\t<rect width=\"100%\" height=\"100%\" filter={`url(#${filterId})`} opacity={noiseOpacity} />\n</svg>\n",
			"type": "registry:component",
			"target": "magic/noise-texture/noise-texture.svelte"
		},
		{
			"content": "import NoiseTexture from \"./noise-texture.svelte\";\nexport { NoiseTexture };\n",
			"type": "registry:file",
			"target": "magic/noise-texture/index.ts"
		}
	]
}