{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "notch",
  "title": "Notch",
  "description": "A content-sized corner inset for labels and actions on cards and images.",
  "dependencies": [
    "cn"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "packages/ui/src/components/ui/notch/notch.astro",
      "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\nimport { cn } from \"cn\"\n\nimport type { NotchProps } from \"./types.ts\"\n\ntype Props<Tag extends HTMLTag = \"div\"> = Polymorphic<{ as: Tag }> & NotchProps\n\nconst {\n  as: Tag = \"div\",\n  corner = \"top-left\",\n  class: className,\n  ...props\n} = Astro.props\n\nconst positions = {\n  \"top-left\":\n    \"top-0 left-0 rounded-br-(--notch-curve) before:top-0 before:left-full after:top-full after:left-0\",\n  \"top-right\":\n    \"top-0 right-0 rounded-bl-(--notch-curve) before:top-0 before:right-full after:top-full after:right-0\",\n  \"bottom-left\":\n    \"bottom-0 left-0 rounded-tr-(--notch-curve) before:bottom-0 before:left-full after:bottom-full after:left-0\",\n  \"bottom-right\":\n    \"bottom-0 right-0 rounded-tl-(--notch-curve) before:bottom-0 before:right-full after:bottom-full after:right-0\",\n}\n---\n\n<Tag\n  data-slot=\"notch\"\n  data-corner={corner}\n  class={cn(\n    \"absolute z-10 inline-flex max-w-full items-center justify-center gap-2 bg-background px-4 py-2 text-center wrap-anywhere\",\n    positions[corner],\n    className,\n  )}\n  {...props}\n>\n  <slot />\n</Tag>\n\n<style>\n  [data-slot=\"notch\"] {\n    --notch-curve: var(--notch-radius, var(--radius-2xl));\n    --notch-x: 100%;\n    --notch-y: 100%;\n  }\n\n  [data-corner$=\"-right\"] {\n    --notch-x: 0%;\n  }\n  [data-corner^=\"bottom-\"] {\n    --notch-y: 0%;\n  }\n\n  [data-slot=\"notch\"]::before,\n  [data-slot=\"notch\"]::after {\n    content: \"\";\n    position: absolute;\n    width: var(--notch-curve);\n    height: var(--notch-curve);\n    background-color: inherit;\n    pointer-events: none;\n    mask: radial-gradient(\n      circle at var(--notch-x) var(--notch-y),\n      transparent calc(var(--notch-curve) - 0.5px),\n      black var(--notch-curve)\n    );\n  }\n</style>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/notch/notch.astro"
    },
    {
      "path": "packages/ui/src/components/ui/notch/index.ts",
      "content": "export { default as Notch } from './notch.astro'\n\nexport type { NotchProps } from './types.ts'\n",
      "type": "registry:file",
      "target": "~/src/components/ui/notch/index.ts"
    },
    {
      "path": "packages/ui/src/components/ui/notch/types.ts",
      "content": "/** Props for a content-sized corner inset. */\nexport interface NotchProps {\n    /**\n     * Corner of the positioned parent that holds the slot content.\n     *\n     * @default \"top-left\"\n     */\n    corner?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'\n}\n",
      "type": "registry:file",
      "target": "~/src/components/ui/notch/types.ts"
    }
  ],
  "meta": {
    "framework": "astro",
    "source": "@gnostic/ui",
    "testedDependencies": {
      "cn": "0.5.2"
    }
  },
  "docs": "https://gnosticai.com/ui/components/notch",
  "categories": [
    "ui"
  ],
  "type": "registry:ui"
}
