{
  "name": "vue-example-block-handle",
  "title": "vue-example-block-handle",
  "type": "registry:block",
  "description": "A handle that appears on hover, allowing you to drag and re-order blocks.",
  "registryDependencies": [
    "https://unpkg.com/prosekit-registry/dist/r/vue-sample-sample-doc-block-handle.json",
    "https://unpkg.com/prosekit-registry/dist/r/vue-ui-block-handle.json",
    "https://unpkg.com/prosekit-registry/dist/r/vue-ui-code-block-view.json",
    "https://unpkg.com/prosekit-registry/dist/r/vue-ui-drop-indicator.json"
  ],
  "dependencies": [
    "prosekit@^0.23.2"
  ],
  "files": [
    {
      "path": "registry/src/vue/examples/block-handle/editor.vue",
      "type": "registry:component",
      "target": "components/editor/examples/block-handle/editor.vue",
      "content": "<script setup lang=\"ts\">\nimport 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/vue'\n\nimport { sampleContent } from '../../sample/sample-doc-block-handle.ts'\nimport { BlockHandle } from '../../ui/block-handle/index.ts'\nimport { DropIndicator } from '../../ui/drop-indicator/index.ts'\n\nimport { defineExtension } from './extension.ts'\n\nconst props = defineProps<{\n  initialContent?: NodeJSON\n}>()\n\nconst extension = defineExtension()\nconst defaultContent = props.initialContent ?? sampleContent\nconst editor = createEditor({ extension, defaultContent })\n</script>\n\n<template>\n  <ProseKit :editor=\"editor\">\n    <div class=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-[canvas] text-black dark:text-white\">\n      <div class=\"relative w-full flex-1 box-border overflow-y-auto\">\n        <div :ref=\"(el) => editor.mount(el as HTMLElement | null)\" class=\"ProseMirror box-border min-h-full px-[max(4rem,calc(50%-20rem))] py-8 outline-hidden outline-0 [&_span[data-mention=user]]:text-blue-500 [&_span[data-mention=tag]]:text-violet-500\" />\n        <BlockHandle />\n        <DropIndicator />\n      </div>\n    </div>\n  </ProseKit>\n</template>\n"
    },
    {
      "path": "registry/src/vue/examples/block-handle/extension.ts",
      "type": "registry:component",
      "target": "components/editor/examples/block-handle/extension.ts",
      "content": "import { defineBasicExtension } from 'prosekit/basic'\nimport { union } from 'prosekit/core'\n\nimport { defineCodeBlockView } from '../../ui/code-block-view/index.ts'\n\nexport function defineExtension() {\n  return union([defineBasicExtension(), defineCodeBlockView()])\n}\n\nexport type EditorExtension = ReturnType<typeof defineExtension>\n"
    },
    {
      "path": "registry/src/vue/examples/block-handle/index.ts",
      "type": "registry:component",
      "target": "components/editor/examples/block-handle/index.ts",
      "content": "export { default as ExampleEditor } from './editor.vue'\n"
    }
  ],
  "meta": {
    "hasIcons": false,
    "hidden": false,
    "story": "block-handle",
    "framework": "vue",
    "accumulatedFiles": [
      "registry/src/vue/examples/block-handle/editor.vue",
      "registry/src/vue/examples/block-handle/extension.ts",
      "registry/src/vue/examples/block-handle/index.ts",
      "registry/src/vue/sample/sample-doc-block-handle.ts",
      "registry/src/vue/ui/block-handle/block-handle.vue",
      "registry/src/vue/ui/block-handle/index.ts",
      "registry/src/vue/ui/code-block-view/code-block-view.vue",
      "registry/src/vue/ui/code-block-view/index.ts",
      "registry/src/vue/ui/drop-indicator/drop-indicator.vue",
      "registry/src/vue/ui/drop-indicator/index.ts"
    ],
    "internalDependencies": [
      "vue-sample-sample-doc-block-handle",
      "vue-ui-block-handle",
      "vue-ui-code-block-view",
      "vue-ui-drop-indicator"
    ]
  },
  "$schema": "https://ui.shadcn.com/schema/registry-item.json"
}
