{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "rich-text-editor-drag-handle",
  "title": "Drag Handle",
  "description": "A floating handle that reorders blocks, including the ones nested in lists and quotes.",
  "dependencies": [
    "@tiptap/extension-drag-handle-react@3.32.2",
    "@tiptap/react@3.32.2",
    "cn",
    "lucide-react"
  ],
  "registryDependencies": [
    "litingyes/blocove/rich-text-editor",
    "litingyes/blocove/rich-text-editor-extension"
  ],
  "files": [
    {
      "path": "src/registry/blocove/ui/rich-text-editor/drag-handle.tsx",
      "content": "import { DragHandle } from '@tiptap/extension-drag-handle-react'\nimport { useCurrentEditor } from '@tiptap/react'\nimport { cn } from 'cn'\nimport { GripVerticalIcon } from 'lucide-react'\n\nexport interface EditorDragHandleProps {\n  className?: string\n}\n\n/**\n * Drag handle for block reordering. It is a floating control rather than a\n * Tiptap extension: render it anywhere inside the editor and the plugin it\n * mounts follows the block under the pointer.\n *\n * Nested blocks are draggable too, so list items and quoted blocks can be moved\n * without moving their container.\n */\nexport function EditorDragHandle({ className }: EditorDragHandleProps) {\n  const { editor } = useCurrentEditor()\n\n  if (!editor || !editor.isEditable) {\n    return null\n  }\n\n  return (\n    <DragHandle\n      editor={editor}\n      nested\n      className={cn(\n        'flex size-6 cursor-grab items-center justify-center rounded text-muted-foreground transition-colors hover:bg-accent hover:text-foreground active:cursor-grabbing',\n        className,\n      )}\n    >\n      <GripVerticalIcon className=\"size-4\" />\n    </DragHandle>\n  )\n}\n",
      "type": "registry:ui",
      "target": "components/blocove/rich-text-editor/drag-handle.tsx"
    }
  ],
  "categories": [
    "rich-text-editor",
    "extension"
  ],
  "type": "registry:ui"
}