{
  "name": "preact-sample-sample-doc-code-block",
  "title": "preact-sample-sample-doc-code-block",
  "type": "registry:component",
  "description": "",
  "registryDependencies": [],
  "dependencies": [
    "prosekit@^0.22.0"
  ],
  "files": [
    {
      "path": "registry/src/preact/sample/sample-doc-code-block.ts",
      "type": "registry:component",
      "target": "components/editor/sample/sample-doc-code-block.ts",
      "content": "import type { NodeJSON } from 'prosekit/core'\n\nconst js = `\nasync function start() {\n  while (true) {\n    await sleep()\n    await eat()\n    await code('JavaScript!')\n  }\n}\n`.trim()\n\nconst py = `\nasync def start():\n    while True:\n        await sleep()\n        await eat()\n        await code('Python!')\n`.trim()\n\nconst go = `\nfunc start() {\n\tfor {\n\t\tsleep()\n\t\teat()\n\t\tcode('Go!')\n\t}\n}\n`.trim()\n\nconst flowchart = [\n  'graph TD',\n  '  A[Start] --> B{Is it working?}',\n  '  B -->|Yes| C[Great!]',\n  '  B -->|No| D[Debug]',\n  '  D --> B',\n  '  C --> E[End]',\n].join('\\n')\n\nconst sequence = [\n  'sequenceDiagram',\n  '  Alice->>Bob: Hello Bob!',\n  '  Bob-->>Alice: Hi Alice!',\n  '  Alice->>Bob: How are you?',\n  '  Bob-->>Alice: Great, thanks!',\n].join('\\n')\n\nexport const sampleContent: NodeJSON = {\n  type: 'doc',\n  content: [\n    {\n      type: 'codeBlock',\n      attrs: { language: 'javascript' },\n      content: [{ type: 'text', text: js }],\n    },\n    {\n      type: 'codeBlock',\n      attrs: { language: 'python' },\n      content: [{ type: 'text', text: py }],\n    },\n    {\n      type: 'codeBlock',\n      attrs: { language: 'go' },\n      content: [{ type: 'text', text: go }],\n    },\n    {\n      type: 'codeBlock',\n      attrs: { language: 'mermaid' },\n      content: [{ type: 'text', text: flowchart }],\n    },\n    {\n      type: 'codeBlock',\n      attrs: { language: 'mermaid' },\n      content: [{ type: 'text', text: sequence }],\n    },\n  ],\n}\n"
    }
  ],
  "meta": {
    "hasIcons": false,
    "hidden": false,
    "story": "",
    "framework": "preact",
    "accumulatedFiles": [
      "registry/src/preact/sample/sample-doc-code-block.ts"
    ],
    "internalDependencies": []
  },
  "$schema": "https://ui.shadcn.com/schema/registry-item.json"
}
