{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "context-menu",
  "type": "registry:ui",
  "title": "Context menu (MIAN)",
  "description": "A menu that opens at the pointer on right-click, or from the keyboard with Shift+F10.",
  "categories": [
    "overlays",
    "context menu",
    "right click",
    "right-click menu",
    "secondary menu"
  ],
  "registryDependencies": [
    "https://mian.ro/r/mian-base.json"
  ],
  "files": [
    {
      "path": "mian/components/context-menu.css",
      "type": "registry:file",
      "target": "mian/components/context-menu.css",
      "content": ".mn-context-area { position: relative; }\n.mn-context-area:focus-visible { outline: none; box-shadow: var(--mn-focus); }\n.mn-context-area-dashed { display: grid; place-items: center; min-height: 9rem; padding: 1.5rem; border: 1.5px dashed var(--mn-input); border-radius: var(--mn-radius-box); color: var(--mn-muted); font-size: var(--mn-text-sm); text-align: center; user-select: none; }"
    },
    {
      "path": "mian/examples/context-menu.html",
      "type": "registry:file",
      "target": "mian/examples/context-menu.html",
      "content": "<!-- Right-click area -->\n<div class=\"mn-context-area mn-context-area-dashed\" data-mn-context=\"ctx-1\" aria-label=\"Canvas. Right-click or press Shift+F10 for actions\">Right-click here (or focus and press Shift+F10)</div>\n<div class=\"mn-menu\" id=\"ctx-1\" popover>\n  <button class=\"mn-menu-item\"><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"9\" y=\"9\" width=\"12\" height=\"12\" rx=\"2\"/><path d=\"M5 15H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v1\"/></svg> Copy</button>\n  <button class=\"mn-menu-item\"><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M4 20h4L19 9l-4-4L4 16v4Z\"/><path d=\"m14 6 4 4\"/></svg> Rename</button>\n  <button class=\"mn-menu-item\"><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M12 4v12M7 11l5 5 5-5\"/><path d=\"M4 16v3a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-3\"/></svg> Download</button>\n  <div class=\"mn-menu-sep\" role=\"separator\"></div>\n  <button class=\"mn-menu-item mn-danger\"><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M3 6h18M8 6V4h8v2M6 6l1 14h10l1-14\"/></svg> Delete</button>\n</div>"
    }
  ],
  "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/context-menu",
  "meta": {
    "mian": {
      "license": "LicenseRef-MIAN-1.0",
      "requiresJs": true,
      "classes": [
        "[data-mn-context=\"menu-id\"]",
        "mn-menu[popover]",
        "mn-context-area-dashed"
      ],
      "accessibility": [
        "The area is focusable and announces aria-haspopup=\"menu\". Shift+F10 or the Menu key opens it at the area.",
        "Menu keyboard support (arrows, Home/End, typeahead, Escape) comes from the dropdown module; focus returns to the area on close.",
        "Right-click is not discoverable: offer the same actions elsewhere too."
      ],
      "intents": [
        "right click menu",
        "context menu"
      ]
    }
  }
}
