{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "example-disc-drive",
  "type": "registry:block",
  "title": "Disc Drive",
  "description": "A silent three-band disc interface with frosted trays, porcelain dials, segmented choices and local presets.",
  "dependencies": [
    "@base-ui/react",
    "maruaudio@>=0.0.3 <0.1.0"
  ],
  "registryDependencies": [
    "https://pluginui.com/r/gallery-disc-button.json",
    "https://pluginui.com/r/gallery-disc-knob.json",
    "https://pluginui.com/r/gallery-disc-selector.json",
    "https://pluginui.com/r/gallery-disc-tray.json",
    "https://pluginui.com/r/core-knob.json"
  ],
  "files": [
    {
      "path": "components/blocks/disc-drive.tsx",
      "content": "/**\n * Source: https://pluginui.com/examples/disc-drive\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 { Knob } from \"@/components/ui/knob\"\nimport { useState, type ReactNode } from \"react\"\nimport { DiscKnobDesign } from \"@/components/ui/disc-knob\"\nimport { DiscSelector } from \"@/components/ui/disc-selector\"\nimport { DiscButton } from \"@/components/ui/disc-button\"\nimport { DiscTray } from \"@/components/ui/disc-tray\"\nimport { UI_KIT_TEXT_SELECTION_STYLES } from \"maruaudio/ui/shared/portable-styles\"\nimport \"@/components/blocks/disc-drive.css\"\nexport interface DiscDriveProps {\n  branding?: ReactNode\n}\nconst PRESETS = [\"The Quiet Current\", \"Solar Motion\", \"Glass Horizon\"]\nconst INITIAL = [\n  { gain: 0.63, drive: 0, tone: 0.35, position: 0, enabled: true, solo: false },\n  {\n    gain: 0.5,\n    drive: 0.67,\n    tone: 0.63,\n    position: 1,\n    enabled: true,\n    solo: false,\n  },\n  {\n    gain: 0.16,\n    drive: 0.5,\n    tone: 0.64,\n    position: 2,\n    enabled: true,\n    solo: false,\n  },\n]\n/** Silent three-band visual composition. Disc artwork responds only to local parameter state. */\nexport function DiscDrive({ branding }: DiscDriveProps) {\n  const [bands, setBands] = useState(INITIAL),\n    [preset, setPreset] = useState(0),\n    [power, setPower] = useState(true),\n    [softclip, setSoftclip] = useState(true),\n    [low, setLow] = useState(1),\n    [high, setHigh] = useState(1)\n  const change = (\n    index: number,\n    key: keyof (typeof INITIAL)[number],\n    value: number | boolean\n  ) =>\n    setBands((previous) =>\n      previous.map((band, i) =>\n        i === index ? { ...band, [key]: value } : band\n      )\n    )\n  const load = (next: number) => {\n    setPreset(next)\n    setBands(\n      INITIAL.map((band, i) => ({\n        ...band,\n        drive: next === 0 ? band.drive : (0.2 + next * 0.22 + i * 0.17) % 1,\n        tone: next === 0 ? band.tone : 0.25 + next * 0.15,\n        position: (i + next) % 4,\n      }))\n    )\n  }\n  return (\n    <section\n      className=\"disc-drive\"\n      aria-label=\"Disc Drive, silent interface\"\n      data-text-selection=\"editable-only\"\n      data-powered={power}\n    >\n      <style>{UI_KIT_TEXT_SELECTION_STYLES}</style>\n      <header>\n        <strong>{branding ?? \"DISC DRIVE✳003\"}</strong>\n        <div className=\"disc-drive__presets\">\n          <span className=\"disc-drive__chevron\">⌄</span>\n          <select\n            aria-label=\"Preset\"\n            value={preset}\n            onChange={(event) => load(Number(event.target.value))}\n          >\n            {PRESETS.map((name, i) => (\n              <option key={name} value={i}>\n                {name}\n              </option>\n            ))}\n          </select>\n          <button\n            type=\"button\"\n            aria-label=\"Previous preset\"\n            onClick={() => load((preset + 2) % 3)}\n          >\n            ‹\n          </button>\n          <button\n            type=\"button\"\n            aria-label=\"Next preset\"\n            onClick={() => load((preset + 1) % 3)}\n          >\n            ›\n          </button>\n        </div>\n        <button\n          className=\"disc-drive__softclip\"\n          type=\"button\"\n          aria-pressed={softclip}\n          onClick={() => setSoftclip(!softclip)}\n        >\n          <i />\n          SOFTCLIP\n        </button>\n        <button\n          className=\"disc-drive__power\"\n          type=\"button\"\n          aria-label=\"Power\"\n          aria-pressed={power}\n          onClick={() => setPower(!power)}\n        >\n          <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n            <path d=\"M12 2v10M6 5a9 9 0 1 0 12 0\" />\n          </svg>\n        </button>\n      </header>\n      <div className=\"disc-drive__surface\">\n        {bands.map((band, i) => (\n          <div\n            className=\"disc-drive__band\"\n            key={i}\n            aria-label={`Band ${i + 1}`}\n          >\n            <DiscSelector\n              value={band.position}\n              onChange={(v) => change(i, \"position\", v)}\n              label={`Band ${i + 1} position`}\n              width={264}\n            />\n            <DiscTray\n              drive={band.drive}\n              tone={band.tone}\n              variant={([\"ice\", \"ember\", \"aqua\"] as const)[i]}\n              title={[\"EMBER\", \"WAVE\", \"FLUX\"][i]}\n              subtitle={\n                [\"SUBTLE MOTION\", \"HARMONIC DRIVE\", \"OPEN DIMENSION\"][i]\n              }\n              number={`0${i + 1}`}\n              character={[\"TUBE\", \"TAPE\", \"OVERDRIVE\"][i]}\n              active={power && band.enabled}\n              width={270}\n            />\n            <DiscButton\n              pressed={band.enabled}\n              onPressedChange={(v) => change(i, \"enabled\", v)}\n              aria-label={`Band ${i + 1} enabled`}\n            />\n            <div className=\"disc-drive__knobs\">\n              <div className=\"disc-drive__small\">\n                <Knob\n                  size={82}\n                  value={band.gain}\n                  onChange={(v) => change(i, \"gain\", v)}\n                  label={`Band ${i + 1} gain`}\n                  valueDisplay=\"percent\"\n                  defaultValue={0.5}\n                  hideLabel\n                  hideValue\n                  renderDesign={DiscKnobDesign}\n                />\n                <span>GAIN</span>\n                <DiscButton\n                  appearance=\"solo\"\n                  pressed={band.solo}\n                  onPressedChange={(v) => change(i, \"solo\", v)}\n                  aria-label={`Band ${i + 1} solo`}\n                />\n              </div>\n              <div className=\"disc-drive__large\">\n                <Knob\n                  size={126}\n                  value={band.drive}\n                  onChange={(v) => change(i, \"drive\", v)}\n                  label={`Band ${i + 1} drive`}\n                  valueDisplay=\"percent\"\n                  defaultValue={0.5}\n                  hideLabel\n                  hideValue\n                  renderDesign={DiscKnobDesign}\n                />\n                <span>DRIVE</span>\n              </div>\n              <div className=\"disc-drive__small\">\n                <Knob\n                  size={82}\n                  value={band.tone}\n                  onChange={(v) => change(i, \"tone\", v)}\n                  label={`Band ${i + 1} tone`}\n                  valueDisplay=\"percent\"\n                  defaultValue={0.5}\n                  hideLabel\n                  hideValue\n                  renderDesign={DiscKnobDesign}\n                />\n                <span>TONE</span>\n              </div>\n            </div>\n          </div>\n        ))}\n        <DiscButton\n          appearance=\"pill\"\n          className=\"disc-drive__crossover disc-drive__crossover--low\"\n          aria-label=\"Low crossover frequency\"\n          onClick={() => setLow((low + 1) % 3)}\n        >\n          {[\"200HZ\", \"400HZ\", \"800HZ\"][low]}\n        </DiscButton>\n        <DiscButton\n          appearance=\"pill\"\n          className=\"disc-drive__crossover disc-drive__crossover--high\"\n          aria-label=\"High crossover frequency\"\n          onClick={() => setHigh((high + 1) % 3)}\n        >\n          {[\"1KHZ\", \"1.5KHZ\", \"3KHZ\"][high]}\n        </DiscButton>\n      </div>\n      <footer>\n        <span>V.1.0.0</span>\n        <strong>PLUGINUI AUDIO°</strong>\n        <span>–––</span>\n      </footer>\n    </section>\n  )\n}\n",
      "type": "registry:component",
      "target": "@components/blocks/disc-drive.tsx"
    },
    {
      "path": "components/blocks/disc-drive.css",
      "content": "/**\n * Source: https://pluginui.com/examples/disc-drive\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 */\n.disc-drive {\n  width: 1108px;\n  height: 617px;\n  box-sizing: border-box;\n  background: #101619;\n  color: #b2c7cf;\n  font-family: Arial, sans-serif;\n  overflow: hidden;\n  border-radius: 6px;\n  position: relative;\n}\n.disc-drive * {\n  box-sizing: border-box;\n}\n.disc-drive header {\n  height: 49px;\n  display: flex;\n  align-items: center;\n  gap: 0;\n  padding: 3px 4px 3px 22px;\n}\n.disc-drive header > strong {\n  font:\n    bold 18px Arial,\n    sans-serif;\n  letter-spacing: 1.7px;\n  flex: 1;\n  white-space: nowrap;\n}\n.disc-drive__presets {\n  height: 43px;\n  display: flex;\n  border: 1px solid #293237;\n  border-radius: 8px;\n  padding: 3px;\n  background: #101719;\n  width: 368px;\n  margin-right: 193px;\n}\n.disc-drive__presets select {\n  background: transparent;\n  border: 0;\n  color: #a2a5a7;\n  font:\n    16px Arial,\n    sans-serif;\n  appearance: none;\n  cursor: pointer;\n  width: 238px;\n  text-align: center;\n  outline: none;\n}\n.disc-drive__presets option {\n  color: #e0e8ea;\n  background: #1c2428;\n}\n.disc-drive__presets button,\n.disc-drive__chevron {\n  width: 34px;\n  color: #fff;\n  background: #1c2428;\n  border: 0;\n  border-right: 1px solid #101719;\n  font-size: 24px;\n  text-align: center;\n  cursor: pointer;\n  border-radius: 4px;\n}\n.disc-drive__chevron {\n  width: 64px;\n  margin-right: 4px;\n  line-height: 32px;\n  pointer-events: none;\n}\n.disc-drive__softclip,\n.disc-drive__power {\n  height: 42px;\n  background: #1d2528;\n  border: 0;\n  color: #969b9e;\n  border-radius: 3px;\n  cursor: pointer;\n}\n.disc-drive__softclip {\n  width: 133px;\n  letter-spacing: 1.1px;\n  font-size: 12px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  gap: 13px;\n}\n.disc-drive__softclip i {\n  width: 4px;\n  height: 4px;\n  border-radius: 50%;\n  background: #596665;\n}\n.disc-drive__softclip[aria-pressed=\"true\"] i {\n  background: #5affb2;\n  box-shadow: 0 0 12px #36efa0;\n}\n.disc-drive__power {\n  width: 43px;\n  margin-left: 2px;\n}\n.disc-drive__power svg {\n  height: 23px;\n  width: 23px;\n  stroke: #f6ffff;\n  stroke-width: 1.6;\n  fill: none;\n}\n.disc-drive__surface {\n  position: relative;\n  display: flex;\n  margin: 0 4px;\n  height: 547px;\n  border-radius: 6px;\n  overflow: hidden;\n  background-color: #b8cbd3;\n  background-image:\n    url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E\"),\n    linear-gradient(110deg, #b8cbd3, #c3d4da 40%, #aec2cb);\n  background-size:\n    150px 150px,\n    100% 100%;\n  box-shadow: inset 0 1px 0 #dce9ed;\n}\n.disc-drive__band {\n  width: 33.333%;\n  padding-top: 25px;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  border-right: 1px solid #6e8a986e;\n}\n.disc-drive__band:last-of-type {\n  border-right: 0;\n}\n.disc-drive__band > .disc-choice {\n  margin-bottom: 17px;\n}\n.disc-drive__band > .disc-button--key {\n  margin-top: 17px;\n}\n.disc-drive__knobs {\n  width: 100%;\n  padding: 17px 25px 0;\n  display: flex;\n  align-items: flex-start;\n  justify-content: space-between;\n  gap: 4px;\n  color: #2f434e;\n}\n.disc-drive__knobs span {\n  font:\n    12px Arial,\n    sans-serif;\n  letter-spacing: 0.7px;\n  display: block;\n  text-align: center;\n  margin-top: 4px;\n}\n.disc-drive__small {\n  padding-top: 18px;\n  text-align: center;\n}\n.disc-drive__small > .disc-button {\n  margin-top: 6px;\n}\n.disc-drive__large span {\n  margin-top: 4px;\n}\n.disc-drive__crossover {\n  position: absolute;\n  top: 360px;\n  z-index: 2;\n  font-size: 12px;\n}\n.disc-drive__crossover--low {\n  left: calc(33.333% - 35px);\n}\n.disc-drive__crossover--high {\n  left: calc(66.666% - 36px);\n}\n.disc-drive footer {\n  height: 21px;\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  padding: 0 9px;\n  color: #8f9a9e;\n  font-size: 9px;\n  letter-spacing: 0.5px;\n}\n.disc-drive footer strong {\n  font-size: 9px;\n  color: #abc0c9;\n  letter-spacing: 0.6px;\n}\n.disc-drive[data-powered=\"false\"] .disc-drive__surface {\n  filter: saturate(0.4);\n}\n.disc-drive button:focus-visible,\n.disc-drive select:focus-visible {\n  outline: 1px dotted #afc8d1;\n  outline-offset: -3px;\n}\n.disc-drive button {\n  font-family: inherit;\n}\n.disc-drive button:disabled {\n  cursor: default;\n}\n",
      "type": "registry:file",
      "target": "@components/blocks/disc-drive.css"
    }
  ]
}
