{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "gallery-grain-fader",
  "type": "registry:ui",
  "title": "Grain Fader",
  "description": "Controlled compact grain artwork with shared gestures.",
  "dependencies": [
    "maruaudio@>=0.0.3 <0.1.0"
  ],
  "registryDependencies": [
    "https://pluginui.com/r/core-fader.json",
    "https://pluginui.com/r/gallery-grain-control-styles.json"
  ],
  "files": [
    {
      "path": "components/ui/grain-fader.tsx",
      "content": "/**\n * Source: https://maru.audio/ui-kit/grain-fader\n * Copyright © [Maru](https://maru.audio)\n *\n * Maru UI Kit — https://maru.audio/ui-kit\n *\n * Installed from the Maru UI registry. This file is yours now: edit it\n * freely, it will not be overwritten unless you re-run the add command.\n *\n * Keep this item’s companion files and CSS imports together. Dependencies\n * declared by the registry are installed with the source.\n */\nimport type { CSSProperties } from \"react\"\nimport \"@/components/grain-controls.css\"\nimport {\n  Fader,\n  type FaderProps,\n  type FaderDesignState,\n} from \"@/components/ui/fader\"\n\nexport type GrainFaderProps = FaderProps\n\n/** Pure artwork; the shared Fader owns track gestures and formatted values. */\nexport function GrainFaderDesign({\n  value01,\n  length,\n  orientation,\n  disabled,\n}: FaderDesignState) {\n  return (\n    <div\n      className=\"grain-fader\"\n      data-orientation={orientation}\n      style={\n        {\n          [orientation === \"vertical\" ? \"height\" : \"width\"]: length,\n        } as CSSProperties\n      }\n      aria-disabled={disabled || undefined}\n    >\n      {orientation === \"vertical\" ? (\n        <span\n          className=\"grain-fader__bar\"\n          style={{ height: `${value01 * 100}%` }}\n        />\n      ) : (\n        <>\n          <span className=\"grain-fader__ticks\" />\n          <span\n            className=\"grain-fader__scan\"\n            style={{ left: `${value01 * 100}%` }}\n          />\n        </>\n      )}\n    </div>\n  )\n}\n\n/** Convenience visual preset with the ordinary Fader contract. */\nexport function GrainFader({\n  label = \"Spectral band\",\n  length = 145,\n  orientation = \"vertical\",\n  ...control\n}: GrainFaderProps) {\n  return (\n    <Fader\n      {...control}\n      label={label}\n      hideLabel\n      hideValue\n      length={length}\n      orientation={orientation}\n      thickness={orientation === \"vertical\" ? 15 : 13}\n      capInset={0}\n      renderDesign={(state) => <GrainFaderDesign {...state} />}\n    />\n  )\n}\n",
      "type": "registry:component",
      "target": "@ui/grain-fader.tsx"
    }
  ]
}
