{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "example-sculpted-console",
  "type": "registry:block",
  "title": "Sculpted Console",
  "description": "A silent five-column sculpted console with porcelain knobs, raised faders, luminous character selectors and an illustrative response plot.",
  "dependencies": [
    "maruaudio@>=0.0.3 <0.1.0"
  ],
  "registryDependencies": [
    "https://pluginui.com/r/core-fader.json",
    "https://pluginui.com/r/core-knob.json",
    "https://pluginui.com/r/gallery-sculpted-fader.json",
    "https://pluginui.com/r/gallery-sculpted-knob.json",
    "https://pluginui.com/r/gallery-sculpted-selector.json",
    "https://pluginui.com/r/gallery-sculpted-toggle.json"
  ],
  "files": [
    {
      "path": "components/blocks/sculpted-console.tsx",
      "content": "/**\n * Source: https://pluginui.com/examples/sculpted-console\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  percent,\n  formatControlValue,\n} from \"maruaudio/ui/shared/format\"\nimport { Fader } from \"@/components/ui/fader\"\nimport { Knob } from \"@/components/ui/knob\"\nimport { useState } from \"react\"\nimport type { ReactNode } from \"react\"\nimport { UI_KIT_TEXT_SELECTION_STYLES } from \"maruaudio/ui/shared/portable-styles\"\nimport { SculptedKnobDesign } from \"@/components/ui/sculpted-knob\"\nimport { SculptedFaderDesign } from \"@/components/ui/sculpted-fader\"\nimport { SculptedToggle } from \"@/components/ui/sculpted-toggle\"\nimport { SculptedSelector } from \"@/components/ui/sculpted-selector\"\nimport \"@/components/blocks/sculpted-console.css\"\n\nconst INITIAL = {\n  density: 0.46,\n  compression: 0.46,\n  tone: 0.34,\n  mix: 0.35,\n  roomLevel: 0.36,\n  dirt: 0.34,\n  resonance: 0.35,\n  frequency: 0.5,\n  level: 0.34,\n  input: 0.43,\n  output: 0.5,\n  drive: 0.35,\n  analogLevel: 0.35,\n  color: 0.5,\n}\ntype Parameter = keyof typeof INITIAL\ntype StripId = \"clean\" | \"room\" | \"tape\" | \"analog\"\nconst STRIPS: StripId[] = [\"clean\", \"room\", \"tape\", \"analog\"]\nconst MODE_NAMES = {\n  clean: [\"CLEAN\", \"AIR\", \"FOCUS\"],\n  room: [\"ROOM\", \"HALL\", \"PLATE\"],\n  tape: [\"REEL\", \"CASSETTE\", \"TAPE\"],\n  analog: [\"TUBE\", \"ANALOG\", \"SOLID\"],\n}\n\nfunction PowerGlyph() {\n  return (\n    <svg\n      viewBox=\"0 0 24 24\"\n      fill=\"none\"\n      stroke=\"currentColor\"\n      strokeWidth=\"2.1\"\n      strokeLinecap=\"round\"\n      aria-hidden=\"true\"\n    >\n      <path d=\"M12 3v8M7.1 5.9a8 8 0 1 0 9.8 0\" />\n    </svg>\n  )\n}\nfunction ModeGlyph({ kind }: { kind: StripId }) {\n  return (\n    <svg\n      viewBox=\"0 0 40 40\"\n      fill=\"none\"\n      stroke=\"currentColor\"\n      strokeWidth=\"1.5\"\n      strokeLinejoin=\"round\"\n      strokeLinecap=\"round\"\n      aria-hidden=\"true\"\n    >\n      {kind === \"clean\" ? (\n        <>\n          <path d=\"M15 10q2 9 10 10-8 2-10 10-2-8-10-10 8-1 10-10Z\" />\n          <path d=\"M28 5v8m-4-4h8m-3 19v6m-3-3h6\" />\n        </>\n      ) : kind === \"room\" ? (\n        <>\n          <path d=\"m20 5 13 8v16l-13 8-13-8V13Z M7 13l13 8 13-8 M20 21v16\" />\n        </>\n      ) : kind === \"tape\" ? (\n        <>\n          <rect x=\"5\" y=\"8\" width=\"30\" height=\"24\" rx=\"4\" />\n          <circle cx=\"12\" cy=\"16\" r=\"1.3\" fill=\"currentColor\" />\n          <circle cx=\"28\" cy=\"16\" r=\"1.3\" fill=\"currentColor\" />\n          <path d=\"m7 29 6-6h14l6 6\" />\n        </>\n      ) : (\n        <>\n          <path d=\"M25 6a15 15 0 1 0 10 19 M31 10l-5 15-6 5 M34 7l-1 4\" />\n          <circle cx=\"20\" cy=\"21\" r=\"2\" />\n          <circle cx=\"34\" cy=\"6\" r=\"1.5\" fill=\"currentColor\" />\n        </>\n      )}\n    </svg>\n  )\n}\n\n/** A portable, silent console. The spectrum illustrates local controls, never audio. */\nexport function SculptedConsole() {\n  const [values, setValues] = useState(INITIAL)\n  const [enabled, setEnabled] = useState<Record<StripId, boolean>>({\n    clean: true,\n    room: true,\n    tape: true,\n    analog: true,\n  })\n  const [advanced, setAdvanced] = useState<Record<StripId, boolean>>({\n    clean: false,\n    room: false,\n    tape: false,\n    analog: false,\n  })\n  const [modes, setModes] = useState({ clean: 0, room: 0, tape: 2, analog: 1 })\n  const [power, setPower] = useState(true)\n  const change = (key: Parameter) => (value: number) =>\n    setValues((previous) => ({ ...previous, [key]: value }))\n  const knob = (\n    key: Parameter,\n    label: string,\n    size: number,\n    className: string,\n    pedestal = false\n  ) => (\n    <div className={`sculpted-console__dial ${className}`}>\n      <Knob\n        value={values[key]}\n        onChange={change(key)}\n        label={label}\n        size={size}\n        valueDisplay=\"percent\"\n        defaultValue={INITIAL[key]}\n        hideLabel\n        hideValue\n        renderDesign={(state) => (\n          <SculptedKnobDesign\n            {...state}\n            scale={!pedestal}\n            pedestal={pedestal}\n          />\n        )}\n      />\n      <span className=\"sculpted-console__caption\">{label}</span>\n    </div>\n  )\n  const fader = (\n    key: Parameter,\n    label: string,\n    length: number,\n    meter = false\n  ) => (\n    <div className=\"sculpted-console__channel\">\n      <Fader\n        value={values[key]}\n        onChange={change(key)}\n        label={label}\n        length={length}\n        format={percent()}\n        defaultValue={INITIAL[key]}\n        orientation={\"vertical\"}\n        thickness={34}\n        capInset={12}\n        hideLabel\n        hideValue\n        renderDesign={(state) => (\n          <SculptedFaderDesign {...state} meter={meter} />\n        )}\n      />\n      <span className=\"sculpted-console__caption\">{label}</span>\n    </div>\n  )\n  const stripHeader = (id: StripId) => (\n    <>\n      <header className=\"sculpted-console__strip-header\">\n        <button\n          type=\"button\"\n          aria-label={`${id} enabled`}\n          aria-pressed={enabled[id]}\n          onClick={() =>\n            setEnabled((previous) => ({ ...previous, [id]: !previous[id] }))\n          }\n        >\n          <PowerGlyph />\n        </button>\n        <span className=\"sculpted-console__grip\" aria-hidden=\"true\">\n          ⠿\n        </span>\n        <button\n          className=\"sculpted-console__reset\"\n          type=\"button\"\n          aria-label={`Reset ${id}`}\n          onClick={() => {\n            const keys: Record<StripId, Parameter[]> = {\n              clean: [\"density\", \"compression\", \"tone\", \"mix\"],\n              room: [\"roomLevel\", \"dirt\", \"resonance\", \"frequency\"],\n              tape: [\"drive\"],\n              analog: [\"analogLevel\", \"color\"],\n            }\n            setValues((previous) => {\n              const next = { ...previous }\n              keys[id].forEach((key) => {\n                next[key] = INITIAL[key]\n              })\n              return next\n            })\n            setModes((previous) => ({\n              ...previous,\n              [id]: id === \"tape\" ? 2 : id === \"analog\" ? 1 : 0,\n            }))\n          }}\n        >\n          ↶\n        </button>\n      </header>\n      <div\n        className=\"sculpted-console__display\"\n        data-bypassed={!enabled[id] || !power || undefined}\n      >\n        <SculptedSelector\n          label={`${id} character`}\n          value={modes[id]}\n          onChange={(value) =>\n            setModes((previous) => ({ ...previous, [id]: value }))\n          }\n          options={MODE_NAMES[id].map((label) => ({\n            label,\n            icon: <ModeGlyph kind={id} />,\n          }))}\n        />\n      </div>\n      <div className=\"sculpted-console__advanced\">\n        <span>ADV</span>\n        <SculptedToggle\n          label={`${id} advanced`}\n          checked={advanced[id]}\n          onChange={(value) =>\n            setAdvanced((previous) => ({ ...previous, [id]: value }))\n          }\n        />\n      </div>\n    </>\n  )\n  const strip = (id: StripId, children: ReactNode) => (\n    <section\n      className=\"sculpted-console__strip\"\n      aria-label={`${id} strip`}\n      data-advanced={advanced[id] || undefined}\n    >\n      {stripHeader(id)}\n      {children}\n    </section>\n  )\n  const graph = Array.from({ length: 81 }, (_, index) => {\n    const t = index / 80\n    const envelope =\n      -10 + t * 20 + Math.sin(t * 8) * 5 - Math.max(0, t - 0.92) * 200\n    const ripple =\n      Math.sin(t * 67 + values.color * 4) * 1.7 + Math.sin(t * 121) * 1.2\n    const response =\n      envelope +\n      ripple +\n      (values.analogLevel - 0.35) * 12 +\n      (values.color - 0.5) * Math.cos(t * 5) * 8\n    return `${index ? \"L\" : \"M\"}${28 + t * 111},${48 - response * 2}`\n  }).join(\" \")\n  return (\n    <section\n      className=\"sculpted-console\"\n      data-text-selection=\"editable-only\"\n      aria-label=\"Sculpted Console\"\n    >\n      <style>{UI_KIT_TEXT_SELECTION_STYLES}</style>\n      <div\n        className=\"sculpted-console__well sculpted-console__well--left\"\n        aria-hidden=\"true\"\n      />\n      <div\n        className=\"sculpted-console__well sculpted-console__well--right\"\n        aria-hidden=\"true\"\n      />\n      <div className=\"sculpted-console__layout\">\n        {strip(\n          \"clean\",\n          <>\n            <div className=\"sculpted-console__dual-faders\">\n              <div>\n                <output>\n                  {formatControlValue(values.density * 24 - 18, \"dB\")}\n                </output>\n                {fader(\"density\", \"DS\", 118)}\n              </div>\n              <div>\n                <output>\n                  {formatControlValue(values.compression * 24 - 18, \"dB\")}\n                </output>\n                {fader(\"compression\", \"COMP\", 118)}\n              </div>\n            </div>\n            {knob(\"tone\", \"TONE\", 42, \"sculpted-console__tone\")}\n            {knob(\"mix\", \"MIX\", 42, \"sculpted-console__mix\")}\n          </>\n        )}\n        {strip(\n          \"room\",\n          <>\n            {knob(\"roomLevel\", \"LEVEL\", 42, \"sculpted-console__room-level\")}\n            {knob(\"dirt\", \"DIRT\", 28, \"sculpted-console__dirt\")}\n            {knob(\"resonance\", \"RES\", 28, \"sculpted-console__res\")}\n            <div className=\"sculpted-console__frequency\">\n              <span className=\"sculpted-console__caption\">CENTER-FREQ</span>\n              <Fader\n                label=\"Center frequency\"\n                value={values.frequency}\n                onChange={change(\"frequency\")}\n                length={98}\n                orientation=\"horizontal\"\n                format={percent()}\n                defaultValue={INITIAL.frequency}\n                thickness={26}\n                capInset={12}\n                hideLabel\n                hideValue\n                renderDesign={(state) => (\n                  <SculptedFaderDesign {...state} scale={false} />\n                )}\n              />\n            </div>\n          </>\n        )}\n        <section className=\"sculpted-console__master\" aria-label=\"Master strip\">\n          <button\n            className=\"sculpted-console__power\"\n            type=\"button\"\n            aria-label=\"Console power\"\n            aria-pressed={power}\n            onClick={() => setPower(!power)}\n          >\n            <PowerGlyph />\n          </button>\n          {knob(\"level\", \"LEVEL\", 114, \"sculpted-console__master-level\", true)}\n          <div className=\"sculpted-console__master-faders\">\n            {fader(\"input\", \"IN\", 196, true)}\n            {fader(\"output\", \"OUT\", 196, true)}\n          </div>\n        </section>\n        {strip(\"tape\", knob(\"drive\", \"DRIVE\", 104, \"sculpted-console__drive\"))}\n        {strip(\n          \"analog\",\n          <>\n            <svg\n              className=\"sculpted-console__spectrum\"\n              viewBox=\"0 0 154 106\"\n              role=\"img\"\n              aria-label=\"Illustrative response from local controls, not live audio\"\n            >\n              <path\n                d=\"M28 15H142 M28 80H142\"\n                stroke=\"#93999d\"\n                strokeWidth=\".7\"\n                strokeDasharray=\"1 2\"\n              />\n              <path\n                d=\"M28 48H142 M28 13V86 M65 13V86 M103 13V86 M140 13V86\"\n                stroke=\"#93999d\"\n                strokeWidth=\".7\"\n              />\n              <path\n                d={graph}\n                fill=\"none\"\n                stroke=\"#474c50\"\n                strokeWidth=\"1.2\"\n                strokeLinejoin=\"round\"\n              />\n              <g fill=\"#82888d\" fontFamily=\"Arial,sans-serif\" fontSize=\"6\">\n                <text x=\"4\" y=\"17\">\n                  +12\n                </text>\n                <text x=\"11\" y=\"50\">\n                  0\n                </text>\n                <text x=\"5\" y=\"82\">\n                  -12\n                </text>\n                <text x=\"24\" y=\"100\">\n                  100Hz\n                </text>\n                <text x=\"57\" y=\"100\">\n                  500Hz\n                </text>\n                <text x=\"97\" y=\"100\">\n                  2kHz\n                </text>\n                <text x=\"130\" y=\"100\">\n                  10kHz\n                </text>\n              </g>\n            </svg>\n            {knob(\"analogLevel\", \"LEVEL\", 42, \"sculpted-console__analog-level\")}\n            <div className=\"sculpted-console__color\">\n              <output>\n                {formatControlValue(63 + values.color * 400, \"\", 1)}\n              </output>\n              <Fader\n                label=\"Color frequency\"\n                value={values.color}\n                onChange={change(\"color\")}\n                length={98}\n                orientation=\"horizontal\"\n                format={percent()}\n                defaultValue={INITIAL.color}\n                thickness={26}\n                capInset={12}\n                hideLabel\n                hideValue\n                renderDesign={(state) => (\n                  <SculptedFaderDesign {...state} scale={false} />\n                )}\n              />\n            </div>\n          </>\n        )}\n      </div>\n      <span className=\"sculpted-console__sr-only\">\n        {STRIPS.filter((id) => advanced[id]).join(\", \")} advanced controls\n        enabled. Silent interface example.\n      </span>\n    </section>\n  )\n}\n",
      "type": "registry:component",
      "target": "@components/blocks/sculpted-console.tsx"
    },
    {
      "path": "components/blocks/sculpted-console.css",
      "content": "/**\n * Source: https://pluginui.com/examples/sculpted-console\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.sculpted-console {\n  box-sizing: border-box;\n  position: relative;\n  width: 980px;\n  height: 606px;\n  padding: 21px 19px;\n  isolation: isolate;\n  border-radius: 32px;\n  background: linear-gradient(135deg, #f9fafc, #eceef1 80%);\n  color: #454a4e;\n  font:\n    700 8px/1.2 Arial,\n    Helvetica,\n    sans-serif;\n  letter-spacing: 0.15px;\n  box-shadow:\n    inset 0 9px 1px #ffffffb3,\n    inset 0 -9px 1px #cbd0d459,\n    0 10px 25px #555e671a;\n}\n.sculpted-console *,\n.sculpted-console *:before,\n.sculpted-console *:after {\n  box-sizing: border-box;\n}\n.sculpted-console__well {\n  position: absolute;\n  top: 10px;\n  bottom: 11px;\n  width: 41.8%;\n  z-index: -1;\n  border-radius: 30px;\n  background: linear-gradient(145deg, #d6d9dd99, #edf0f2);\n  box-shadow:\n    inset 4px 5px 9px #bbc1c733,\n    inset -3px -2px 8px #fff;\n}\n.sculpted-console__well--left {\n  left: 9px;\n}\n.sculpted-console__well--right {\n  right: 9px;\n}\n.sculpted-console__layout {\n  display: grid;\n  height: 100%;\n  grid-template-columns: 1fr 1fr 1.12fr 1fr 1fr;\n  gap: 4px;\n}\n.sculpted-console__strip {\n  position: relative;\n  border-radius: 14px;\n  background: linear-gradient(140deg, #fcfdfe 0%, #eff1f4 34%, #e4e7ea 100%);\n  border: 1px solid #f7f8fa;\n  box-shadow:\n    0 3px 5px #686e7530,\n    0 12px 16px #5c626938,\n    -4px -4px 8px #ffffffd9;\n}\n.sculpted-console__strip-header {\n  position: absolute;\n  left: 15px;\n  right: 11px;\n  top: 10px;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n}\n.sculpted-console button {\n  font-family: inherit;\n  cursor: pointer;\n}\n.sculpted-console__strip-header > button,\n.sculpted-console__power {\n  padding: 0;\n  width: 18px;\n  height: 23px;\n  color: #42494d;\n  background: none;\n  border: 0;\n}\n.sculpted-console__strip-header svg {\n  width: 17px;\n  height: 17px;\n}\n.sculpted-console__strip-header > button[aria-pressed=\"false\"],\n.sculpted-console__power[aria-pressed=\"false\"] {\n  opacity: 0.4;\n}\n.sculpted-console__grip {\n  font-size: 14px;\n  color: #a8aeb4;\n  align-self: start;\n  margin-top: 3px;\n  line-height: 16px;\n}\n.sculpted-console__strip-header > .sculpted-console__reset {\n  width: 24px;\n  height: 22px;\n  font-size: 17px;\n  line-height: 18px;\n  border: 1.2px solid #c5cacf;\n  border-radius: 7px;\n  box-shadow: 0 1px 1px #fff;\n}\n.sculpted-console__display {\n  position: absolute;\n  top: 48px;\n  left: 11px;\n  right: 11px;\n}\n.sculpted-console__display[data-bypassed] {\n  opacity: 0.45;\n}\n.sculpted-console__advanced {\n  position: absolute;\n  left: 0;\n  right: 0;\n  bottom: 10px;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  gap: 5px;\n}\n.sculpted-console__strip[data-advanced] {\n  box-shadow:\n    inset 0 0 0 1px #b9bfc6,\n    0 3px 5px #686e7530,\n    0 12px 16px #5c626938;\n}\n.sculpted-console__dial {\n  position: absolute;\n  left: 50%;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  transform: translateX(-50%);\n}\n.sculpted-console__dial > .sculpted-console__caption {\n  margin-top: 6px;\n  font-size: 8px;\n}\n.sculpted-console__tone {\n  top: 353px;\n}\n.sculpted-console__mix {\n  top: 427px;\n}\n.sculpted-console__room-level {\n  top: 208px;\n}\n.sculpted-console__dirt {\n  top: 292px;\n}\n.sculpted-console__res {\n  top: 358px;\n}\n.sculpted-console__frequency {\n  position: absolute;\n  top: 421px;\n  left: 50%;\n  transform: translateX(-50%);\n  text-align: center;\n}\n.sculpted-console__frequency > .sculpted-console__caption {\n  display: block;\n  margin-bottom: 2px;\n  white-space: nowrap;\n}\n.sculpted-console__channel {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  gap: 9px;\n}\n.sculpted-console__dual-faders {\n  position: absolute;\n  left: 38px;\n  right: 38px;\n  top: 178px;\n  display: flex;\n  justify-content: space-between;\n  gap: 10px;\n}\n.sculpted-console__dual-faders > div {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n}\n.sculpted-console__dual-faders output {\n  font-weight: 400;\n  color: #7b838b;\n  font-size: 8px;\n  padding: 2px 6px;\n  margin-bottom: 6px;\n  border-radius: 4px;\n  background: #d8dce0;\n  box-shadow:\n    inset 0 1px 2px #a4abb266,\n    0 1px 1px #fff;\n}\n.sculpted-console__dual-faders .sculpted-fader__rail {\n  width: 10px;\n}\n.sculpted-console__master {\n  position: relative;\n}\n.sculpted-console__power {\n  position: absolute;\n  left: 50%;\n  top: 54px;\n  transform: translateX(-50%);\n  width: 36px;\n  height: 36px;\n  filter: drop-shadow(5px 5px 9px #8a919955);\n}\n.sculpted-console__power > svg {\n  width: 23px;\n  height: 23px;\n}\n.sculpted-console__master-level {\n  top: 132px;\n}\n.sculpted-console__master-level > .sculpted-console__caption {\n  margin-top: 37px;\n}\n.sculpted-console__master-faders {\n  position: absolute;\n  left: 0;\n  right: 0;\n  top: 315px;\n  display: flex;\n  justify-content: center;\n  gap: 26px;\n}\n.sculpted-console__master-faders .sculpted-fader__rail {\n  width: 11px;\n  background: linear-gradient(to right, #fff 0 42%, #d7dce0 43% 57%, #fff 58%);\n}\n.sculpted-console__master-faders .sculpted-fader__scale {\n  background: repeating-linear-gradient(\n    to bottom,\n    #a1a7ad 0 1px,\n    transparent 1px 8px\n  );\n  inset-inline: 2px;\n}\n.sculpted-console__master-faders .sculpted-fader__scale:after {\n  background: #eceef1;\n}\n.sculpted-console__drive {\n  top: 279px;\n}\n.sculpted-console__drive > .sculpted-console__caption {\n  margin-top: 9px;\n}\n.sculpted-console__spectrum {\n  position: absolute;\n  left: 18px;\n  right: 18px;\n  top: 176px;\n  width: calc(100% - 36px);\n  height: 106px;\n  border-radius: 14px;\n  background: linear-gradient(140deg, #d8dce0, #e5e8eb);\n  box-shadow:\n    inset 2px 3px 7px #8e969d40,\n    inset 0 1px 2px #aab1b740;\n}\n.sculpted-console__analog-level {\n  top: 326px;\n}\n.sculpted-console__color {\n  position: absolute;\n  left: 50%;\n  top: 416px;\n  transform: translateX(-50%);\n  text-align: center;\n}\n.sculpted-console__color output {\n  font-size: 11px;\n  display: block;\n  margin-bottom: 2px;\n}\n.sculpted-console__sr-only {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  padding: 0;\n  margin: -1px;\n  overflow: hidden;\n  clip-path: inset(50%);\n  white-space: nowrap;\n}\n.sculpted-console button:focus-visible {\n  outline: 1px solid #8b939a;\n  outline-offset: 2px;\n}\n",
      "type": "registry:file",
      "target": "@components/blocks/sculpted-console.css"
    }
  ]
}
