{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "rich-text-editor-behavior",
  "title": "Editor Behavior",
  "description": "Focus, gap cursor and trailing node: the editor behaviours that make a document feel finished.",
  "dependencies": [
    "@tiptap/extensions@3.32.2"
  ],
  "registryDependencies": [
    "litingyes/blocove/rich-text-editor",
    "litingyes/blocove/rich-text-editor-extension"
  ],
  "files": [
    {
      "path": "src/registry/blocove/ui/rich-text-editor/behavior.tsx",
      "content": "import type { ExtensionComponent } from '@/lib/blocove/rich-text-editor-extension'\nimport { Focus, Gapcursor, TrailingNode } from '@tiptap/extensions'\nimport { defineExtensionComponent } from '@/lib/blocove/rich-text-editor-extension'\n\nexport interface EditorFocusProps {\n  /**\n   * The class name added to the focused node.\n   * @default 'has-focus'\n   */\n  className?: string\n  /**\n   * The mode by which the focused node is determined.\n   * @default 'all'\n   */\n  mode?: 'all' | 'deepest' | 'shallowest'\n}\n\n/**\n * Registers the Tiptap focus extension. The focused node receives a class, so\n * the focus ring can be styled from the document stylesheet.\n */\nexport const EditorFocus: ExtensionComponent<EditorFocusProps> = defineExtensionComponent(\n  'focus',\n  props => [\n    Focus.configure(props),\n  ],\n)\n\n/**\n * Registers the Tiptap gap cursor extension. The gap cursor lets the caret sit\n * between two blocks, where a regular text cursor cannot go.\n */\nexport const EditorGapcursor: ExtensionComponent = defineExtensionComponent(\n  'gap-cursor',\n  () => [Gapcursor],\n)\n\n/**\n * Registers the Tiptap trailing node extension. An empty block is kept at the\n * end of the document, so there is always somewhere to keep writing.\n */\nexport const EditorTrailingNode: ExtensionComponent = defineExtensionComponent(\n  'trailing-node',\n  () => [TrailingNode],\n)\n",
      "type": "registry:ui",
      "target": "components/blocove/rich-text-editor/behavior.tsx"
    }
  ],
  "categories": [
    "rich-text-editor",
    "extension"
  ],
  "type": "registry:ui"
}