{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "code",
  "type": "registry:ui",
  "title": "Code (MIAN)",
  "description": "Inline code and code blocks in the noodle's monospace font.",
  "categories": [
    "data display",
    "code",
    "pre",
    "snippet",
    "monospace"
  ],
  "registryDependencies": [
    "https://mian.ro/r/mian-base.json"
  ],
  "files": [
    {
      "path": "mian/components/code.css",
      "type": "registry:file",
      "target": "mian/components/code.css",
      "content": ".mn-code { padding: .15em .4em; border-radius: min(5px, var(--mn-radius-field)); background: var(--mn-surface-2); font: 500 .875em/1.4 var(--mn-font-mono); color: var(--mn-fg); }\n.mn-pre {\n  margin: 0; padding: 1rem 1.1rem; overflow: auto;\n  border: var(--mn-border-w) solid var(--mn-border); border-radius: var(--mn-radius-box);\n  background: var(--mn-surface-2); color: var(--mn-fg);\n  font: 400 .8125rem/1.65 var(--mn-font-mono); tab-size: 2;\n}\n.mn-pre code { font: inherit; background: none; padding: 0; }"
    },
    {
      "path": "mian/examples/code.html",
      "type": "registry:file",
      "target": "mian/examples/code.html",
      "content": "<!-- Inline and block -->\n<p>Set the design with <code class=\"mn-code\">data-noodle</code> on the root element.</p>\n<pre class=\"mn-pre\" tabindex=\"0\"><code>&lt;html data-noodle=\"udon\" data-mode=\"dark\"&gt;\n  &lt;button class=\"mn-btn\"&gt;Hello&lt;/button&gt;\n&lt;/html&gt;</code></pre>"
    }
  ],
  "docs": "MIAN components are HTML + CSS classes, not React components. The styles are already included in mian-base; this item adds the component's CSS section and example markup for reference. Docs: https://mian.ro/components/code",
  "meta": {
    "mian": {
      "license": "LicenseRef-MIAN-1.0",
      "requiresJs": false,
      "classes": [
        "mn-code",
        "mn-pre"
      ],
      "accessibility": [
        "Code blocks scroll horizontally; they are focusable only if you add tabindex=\"0\", which you should for long blocks."
      ],
      "intents": [
        "code block",
        "inline code",
        "snippet",
        "terminal command"
      ]
    }
  }
}
