{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "rich-text-editor-strike",
  "title": "Strikethrough",
  "description": "The strikethrough mark with a toolbar toggle and keyboard shortcut.",
  "dependencies": [
    "@tiptap/extension-strike@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/strike.tsx",
      "content": "import type { StrikeOptions } from '@tiptap/extension-strike'\nimport type { Editor } from '@tiptap/react'\nimport type { ExtensionComponent } from '@/lib/blocove/rich-text-editor-extension'\nimport { Strike } from '@tiptap/extension-strike'\nimport { useCurrentEditor, useEditorState } from '@tiptap/react'\nimport { StrikethroughIcon } from 'lucide-react'\nimport { EditorToolbarButton } from '@/components/blocove/rich-text-editor/editor'\nimport { defineExtensionComponent } from '@/lib/blocove/rich-text-editor-extension'\n\n/**\n * Registers the Tiptap Strike mark.\n */\nexport const EditorStrike: ExtensionComponent<Partial<StrikeOptions>> = defineExtensionComponent(\n  'strike',\n  (props: Partial<StrikeOptions>) => [\n    Strike.configure(props),\n  ],\n)\n\nexport interface EditorStrikeToolbarProps {\n  className?: string\n}\n\nexport function EditorStrikeToolbar({ className }: EditorStrikeToolbarProps) {\n  const { editor } = useCurrentEditor()\n\n  if (!editor) {\n    return null\n  }\n\n  return <EditorStrikeToolbarContent editor={editor} className={className} />\n}\n\nfunction EditorStrikeToolbarContent({\n  editor,\n  className,\n}: {\n  editor: Editor\n  className?: string\n}) {\n  const active = useEditorState({\n    editor,\n    selector: ({ editor: instance }) => instance.isActive('strike'),\n  })\n\n  return (\n    <EditorToolbarButton\n      label=\"Strikethrough\"\n      shortcut=\"Shift Mod S\"\n      pressed={active}\n      onPressedChange={() => editor.chain().focus().toggleStrike().run()}\n      className={className}\n    >\n      <StrikethroughIcon />\n    </EditorToolbarButton>\n  )\n}\n",
      "type": "registry:ui",
      "target": "components/blocove/rich-text-editor/strike.tsx"
    }
  ],
  "categories": [
    "rich-text-editor",
    "mark"
  ],
  "type": "registry:ui"
}