{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "core-parameter-controls",
  "type": "registry:ui",
  "title": "Parameter Controls",
  "description": "Descriptor-bound knobs and faders sharing the standard controlled primitives.",
  "dependencies": [
    "maruaudio@>=0.0.3 <0.1.0"
  ],
  "registryDependencies": [
    "https://pluginui.com/r/core-fader.json",
    "https://pluginui.com/r/core-knob.json"
  ],
  "files": [
    {
      "path": "components/ui/parameter-controls.tsx",
      "content": "/**\n * Source: https://maru.audio/ui-kit/parameter-controls\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 {\n  Knob as UiKitKnob,\n  type KnobProps,\n} from \"@/components/ui/knob\"\nimport {\n  Fader as UiKitFader,\n  type FaderProps,\n} from \"@/components/ui/fader\"\nimport {\n  useBoundParameterControl,\n  parameterArgument,\n  type ParameterBinding,\n} from \"maruaudio/ui/shared/parameter-binding\"\n\ntype NumericAppearance<Props> = Omit<\n  Props,\n  | \"value\"\n  | \"min\"\n  | \"max\"\n  | \"step\"\n  | \"defaultValue\"\n  | \"onChange\"\n  | \"onChangeEnd\"\n  | \"path\"\n  | \"unit\"\n  | \"curve\"\n>\nexport type ParameterKnobProps = NumericAppearance<KnobProps> &\n  ParameterBinding<\"float\" | \"enum\">\nexport type ParameterFaderProps = NumericAppearance<FaderProps> &\n  ParameterBinding<\"float\" | \"enum\">\n\n/** Descriptor-bound rotary control; enums intentionally support stepped selection. */\nexport function ParameterKnob({\n  parameter,\n  source,\n  path,\n  ...appearance\n}: ParameterKnobProps) {\n  const { descriptor, control: binding } = useBoundParameterControl(\n    parameterArgument(parameter, path),\n    source\n  )\n  if (descriptor.type === \"bool\")\n    throw new TypeError(\n      `Boolean parameter requires a boolean control: ${binding.path}`\n    )\n  return (\n    <UiKitKnob\n      {...appearance}\n      {...binding}\n      label={appearance.label ?? binding.label}\n      format={appearance.format ?? binding.format}\n    />\n  )\n}\n\n/** Same parameter binding with linear track geometry. */\nexport function ParameterFader({\n  parameter,\n  source,\n  path,\n  ...appearance\n}: ParameterFaderProps) {\n  const { descriptor, control: binding } = useBoundParameterControl(\n    parameterArgument(parameter, path),\n    source\n  )\n  if (descriptor.type === \"bool\")\n    throw new TypeError(\n      `Boolean parameter requires a boolean control: ${binding.path}`\n    )\n  return (\n    <UiKitFader\n      {...appearance}\n      {...binding}\n      label={appearance.label ?? binding.label}\n      format={appearance.format ?? binding.format}\n    />\n  )\n}\n",
      "type": "registry:component",
      "target": "@ui/parameter-controls.tsx"
    }
  ]
}
