{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "example-pressure-compressor",
  "type": "registry:block",
  "title": "Pressure Compressor",
  "description": "Tailwind dynamics face with a linked transfer curve and output fader. Silent UI assembly.",
  "dependencies": [
    "maruaudio@>=0.0.3 <0.1.0"
  ],
  "registryDependencies": [
    "https://pluginui.com/r/core-dynamics-display.json",
    "https://pluginui.com/r/core-fader.json",
    "https://pluginui.com/r/core-knob.json",
    "https://pluginui.com/r/core-segment-display.json",
    "https://pluginui.com/r/core-toggle-switch.json"
  ],
  "files": [
    {
      "path": "components/blocks/pressure-compressor.tsx",
      "content": "/**\n * Source: https://pluginui.com/examples/pressure-compressor\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  fixed,\n  formatControlValue,\n} from \"maruaudio/ui/shared/format\"\nimport { UI_KIT_TEXT_SELECTION_STYLES } from \"maruaudio/ui/shared/portable-styles\"\nimport { THEMED_DISPLAY_PRESET } from \"maruaudio/ui/shared/display-chrome\"\nimport { useState } from \"react\"\nimport { Knob } from \"@/components/ui/knob\"\nimport { Fader } from \"@/components/ui/fader\"\nimport { DynamicsDisplay } from \"@/components/ui/dynamics-display\"\nimport { SegmentDisplay } from \"@/components/ui/segment-display\"\nimport { ToggleSwitch } from \"@/components/ui/toggle-switch\"\nimport { token } from \"maruaudio/ui/shared/theme\"\n\n/** Interactive transfer-curve assembly. It does not process audio. */\nexport function PressureCompressor() {\n  const [threshold, setThreshold] = useState(-18)\n  const [ratio, setRatio] = useState(4)\n  return (\n    <section\n      data-text-selection=\"editable-only\"\n      className=\"w-full min-w-0 space-y-6 border p-6\"\n      style={{\n        background: token.surface,\n        color: token.text,\n        borderColor: token.border,\n        borderRadius: token.radius,\n        fontFamily: token.font,\n      }}\n    >\n      <style>{UI_KIT_TEXT_SELECTION_STYLES}</style>\n      <header\n        className=\"flex items-end justify-between gap-4 border-b pb-5\"\n        style={{ borderColor: token.border }}\n      >\n        <div>\n          <p\n            className=\"mb-1 text-[10px] tracking-[0.2em] uppercase\"\n            style={{ color: token.textMuted }}\n          >\n            Bus dynamics\n          </p>\n          <h3 className=\"text-2xl font-bold tracking-[0.12em]\">PRESSURE</h3>\n        </div>\n        <span className=\"font-mono text-xs\" style={{ color: token.accent }}>\n          {fixed(1)(ratio)}:1\n        </span>\n      </header>\n      <div className=\"flex flex-wrap items-center justify-between gap-4\">\n        <SegmentDisplay\n          fields={[\n            {\n              label: \"Threshold\",\n              text: formatControlValue(threshold, \"dB\"),\n              digits: 5,\n            },\n            { label: \"Ratio\", text: `${fixed(1)(ratio)}:1`, digits: 5 },\n          ]}\n          preset={THEMED_DISPLAY_PRESET}\n        />\n        <ToggleSwitch label=\"Auto gain\" variant=\"lever\" defaultChecked />\n      </div>\n      <div className=\"grid grid-cols-[1fr_auto] items-center gap-5\">\n        <DynamicsDisplay\n          threshold={threshold}\n          ratio={ratio}\n          knee={6}\n          height={190}\n          showAxisTitles={false}\n        />\n        <Fader\n          label=\"Output\"\n          min={-24}\n          max={12}\n          defaultValue={0}\n          unit=\"dB\"\n          length={150}\n        />\n      </div>\n      <div\n        className=\"flex flex-wrap justify-around gap-5 border-t pt-5\"\n        style={{ borderColor: token.border }}\n      >\n        <Knob\n          label=\"Threshold\"\n          value={threshold}\n          onChange={setThreshold}\n          min={-60}\n          max={0}\n          unit=\"dB\"\n          size={76}\n          indicator=\"dot\"\n        />\n        <Knob\n          label=\"Ratio\"\n          value={ratio}\n          onChange={setRatio}\n          min={1}\n          max={20}\n          size={58}\n        />\n        <Knob\n          label=\"Attack\"\n          min={0.1}\n          max={100}\n          defaultValue={10}\n          unit=\"ms\"\n          size={58}\n        />\n        <Knob\n          label=\"Release\"\n          min={10}\n          max={1000}\n          defaultValue={150}\n          unit=\"ms\"\n          size={58}\n        />\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:component",
      "target": "@components/blocks/pressure-compressor.tsx"
    }
  ]
}
