{
  "name": "preact-sample-sample-doc-typography",
  "title": "preact-sample-sample-doc-typography",
  "type": "registry:component",
  "description": "",
  "registryDependencies": [],
  "dependencies": [
    "prosekit@^0.22.0"
  ],
  "files": [
    {
      "path": "registry/src/preact/sample/sample-doc-typography.ts",
      "type": "registry:component",
      "target": "components/editor/sample/sample-doc-typography.ts",
      "content": "import type { NodeJSON } from 'prosekit/core'\n\nconst EULER_IDENTITY = String.raw`e^{i\\pi} + 1 = 0`\n\nconst QUADRATIC_FORMULA = String.raw`x = \\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a}`\n\nconst GAUSSIAN_INTEGRAL = String.raw`\\int_{-\\infty}^{\\infty} e^{-x^2} \\, dx = \\sqrt{\\pi}`\n\nexport const sampleContent: NodeJSON = {\n  type: 'doc',\n  content: [\n    {\n      type: 'heading',\n      attrs: {\n        level: 1,\n      },\n      content: [\n        {\n          type: 'text',\n          text: 'ProseKit Typography',\n        },\n      ],\n    },\n    {\n      type: 'paragraph',\n      content: [\n        {\n          type: 'text',\n          text: 'This example shows the typography styles provided by ',\n        },\n        {\n          type: 'text',\n          marks: [\n            {\n              type: 'code',\n            },\n          ],\n          text: 'prosekit/basic/typography.css',\n        },\n        {\n          type: 'text',\n          text: '.',\n        },\n      ],\n    },\n    {\n      type: 'heading',\n      attrs: {\n        level: 2,\n      },\n      content: [\n        {\n          type: 'text',\n          text: 'Inline marks',\n        },\n      ],\n    },\n    {\n      type: 'paragraph',\n      content: [\n        {\n          type: 'text',\n          text: 'Text can be formatted in different ways: ',\n        },\n        {\n          type: 'text',\n          marks: [\n            {\n              type: 'bold',\n            },\n          ],\n          text: 'bold text',\n        },\n        {\n          type: 'text',\n          text: ', ',\n        },\n        {\n          type: 'text',\n          marks: [\n            {\n              type: 'italic',\n            },\n          ],\n          text: 'italic text',\n        },\n        {\n          type: 'text',\n          text: ', ',\n        },\n        {\n          type: 'text',\n          marks: [\n            {\n              type: 'underline',\n            },\n          ],\n          text: 'underlined text',\n        },\n        {\n          type: 'text',\n          text: ', ',\n        },\n        {\n          type: 'text',\n          marks: [\n            {\n              type: 'strike',\n            },\n          ],\n          text: 'strikethrough text',\n        },\n        {\n          type: 'text',\n          text: ', ',\n        },\n        {\n          type: 'text',\n          marks: [\n            {\n              type: 'code',\n            },\n          ],\n          text: 'inline code',\n        },\n        {\n          type: 'text',\n          text: ', ',\n        },\n        {\n          type: 'text',\n          marks: [\n            {\n              type: 'link',\n              attrs: {\n                href: 'https://example.com',\n                target: null,\n                rel: null,\n              },\n            },\n          ],\n          text: 'links',\n        },\n        {\n          type: 'text',\n          text: ',',\n        },\n        {\n          type: 'hardBreak',\n        },\n        {\n          type: 'text',\n          text: 'and hard breaks (Shift+Enter).',\n        },\n      ],\n    },\n    {\n      type: 'heading',\n      attrs: {\n        level: 2,\n      },\n      content: [\n        {\n          type: 'text',\n          text: 'Headings',\n        },\n      ],\n    },\n    {\n      type: 'heading',\n      attrs: {\n        level: 1,\n      },\n      content: [\n        {\n          type: 'text',\n          text: 'Heading 1',\n        },\n      ],\n    },\n    {\n      type: 'heading',\n      attrs: {\n        level: 2,\n      },\n      content: [\n        {\n          type: 'text',\n          text: 'Heading 2',\n        },\n      ],\n    },\n    {\n      type: 'heading',\n      attrs: {\n        level: 3,\n      },\n      content: [\n        {\n          type: 'text',\n          text: 'Heading 3',\n        },\n      ],\n    },\n    {\n      type: 'heading',\n      attrs: {\n        level: 4,\n      },\n      content: [\n        {\n          type: 'text',\n          text: 'Heading 4',\n        },\n      ],\n    },\n    {\n      type: 'heading',\n      attrs: {\n        level: 5,\n      },\n      content: [\n        {\n          type: 'text',\n          text: 'Heading 5',\n        },\n      ],\n    },\n    {\n      type: 'heading',\n      attrs: {\n        level: 6,\n      },\n      content: [\n        {\n          type: 'text',\n          text: 'Heading 6',\n        },\n      ],\n    },\n    {\n      type: 'heading',\n      attrs: {\n        level: 2,\n      },\n      content: [\n        {\n          type: 'text',\n          text: 'Lists',\n        },\n      ],\n    },\n    {\n      type: 'paragraph',\n      content: [\n        {\n          type: 'text',\n          text: 'Here are different types of lists:',\n        },\n      ],\n    },\n    {\n      type: 'list',\n      attrs: {\n        kind: 'bullet',\n        order: null,\n        checked: false,\n        collapsed: false,\n      },\n      content: [\n        {\n          type: 'paragraph',\n          content: [\n            {\n              type: 'text',\n              text: 'Unordered list item 1',\n            },\n          ],\n        },\n      ],\n    },\n    {\n      type: 'list',\n      attrs: {\n        kind: 'bullet',\n        order: null,\n        checked: false,\n        collapsed: false,\n      },\n      content: [\n        {\n          type: 'paragraph',\n          content: [\n            {\n              type: 'text',\n              text: 'Unordered list item 2',\n            },\n          ],\n        },\n        {\n          type: 'list',\n          attrs: {\n            kind: 'bullet',\n            order: null,\n            checked: false,\n            collapsed: false,\n          },\n          content: [\n            {\n              type: 'paragraph',\n              content: [\n                {\n                  type: 'text',\n                  text: 'Nested item A',\n                },\n              ],\n            },\n          ],\n        },\n        {\n          type: 'list',\n          attrs: {\n            kind: 'bullet',\n            order: null,\n            checked: false,\n            collapsed: false,\n          },\n          content: [\n            {\n              type: 'paragraph',\n              content: [\n                {\n                  type: 'text',\n                  text: 'Nested item B',\n                },\n              ],\n            },\n          ],\n        },\n      ],\n    },\n    {\n      type: 'list',\n      attrs: {\n        kind: 'ordered',\n        order: null,\n        checked: false,\n        collapsed: false,\n      },\n      content: [\n        {\n          type: 'paragraph',\n          content: [\n            {\n              type: 'text',\n              text: 'First ordered item',\n            },\n          ],\n        },\n      ],\n    },\n    {\n      type: 'list',\n      attrs: {\n        kind: 'ordered',\n        order: null,\n        checked: false,\n        collapsed: false,\n      },\n      content: [\n        {\n          type: 'paragraph',\n          content: [\n            {\n              type: 'text',\n              text: 'Second ordered item',\n            },\n          ],\n        },\n      ],\n    },\n    {\n      type: 'list',\n      attrs: {\n        kind: 'task',\n        order: null,\n        checked: true,\n        collapsed: false,\n      },\n      content: [\n        {\n          type: 'paragraph',\n          content: [\n            {\n              type: 'text',\n              text: 'Completed task',\n            },\n          ],\n        },\n      ],\n    },\n    {\n      type: 'list',\n      attrs: {\n        kind: 'task',\n        order: null,\n        checked: false,\n        collapsed: false,\n      },\n      content: [\n        {\n          type: 'paragraph',\n          content: [\n            {\n              type: 'text',\n              text: 'Pending task',\n            },\n          ],\n        },\n      ],\n    },\n    {\n      type: 'heading',\n      attrs: {\n        level: 2,\n      },\n      content: [\n        {\n          type: 'text',\n          text: 'Blockquotes',\n        },\n      ],\n    },\n    {\n      type: 'blockquote',\n      content: [\n        {\n          type: 'paragraph',\n          content: [\n            {\n              type: 'text',\n              text:\n                'This is a blockquote demonstrating how quoted content appears in the editor. It can span multiple lines and maintains proper formatting.',\n            },\n          ],\n        },\n      ],\n    },\n    {\n      type: 'heading',\n      attrs: {\n        level: 2,\n      },\n      content: [\n        {\n          type: 'text',\n          text: 'Code Blocks',\n        },\n      ],\n    },\n    {\n      type: 'codeBlock',\n      attrs: {\n        language: '',\n      },\n      content: [\n        {\n          type: 'text',\n          text: \"function example() {\\n  const greeting = 'Hello ProseKit!';\\n  console.log(greeting);\\n  return greeting;\\n}\",\n        },\n      ],\n    },\n    {\n      type: 'heading',\n      attrs: {\n        level: 2,\n      },\n      content: [\n        {\n          type: 'text',\n          text: 'Horizontal Rule',\n        },\n      ],\n    },\n    {\n      type: 'horizontalRule',\n    },\n    {\n      type: 'heading',\n      attrs: {\n        level: 2,\n      },\n      content: [\n        {\n          type: 'text',\n          text: 'Images',\n        },\n      ],\n    },\n    {\n      type: 'image',\n      attrs: {\n        src: 'https://static.photos/blurred/640x360/42',\n      },\n    },\n    {\n      type: 'heading',\n      attrs: {\n        level: 2,\n      },\n      content: [\n        {\n          type: 'text',\n          text: 'Tables',\n        },\n      ],\n    },\n    {\n      type: 'table',\n      content: [\n        {\n          type: 'tableRow',\n          content: [\n            {\n              type: 'tableHeaderCell',\n              attrs: {\n                colspan: 1,\n                rowspan: 1,\n                colwidth: null,\n              },\n              content: [\n                {\n                  type: 'paragraph',\n                  content: [\n                    {\n                      type: 'text',\n                      text: 'Header 1',\n                    },\n                  ],\n                },\n              ],\n            },\n            {\n              type: 'tableHeaderCell',\n              attrs: {\n                colspan: 1,\n                rowspan: 1,\n                colwidth: null,\n              },\n              content: [\n                {\n                  type: 'paragraph',\n                  content: [\n                    {\n                      type: 'text',\n                      text: 'Header 2',\n                    },\n                  ],\n                },\n              ],\n            },\n          ],\n        },\n        {\n          type: 'tableRow',\n          content: [\n            {\n              type: 'tableCell',\n              attrs: {\n                colspan: 1,\n                rowspan: 1,\n                colwidth: null,\n              },\n              content: [\n                {\n                  type: 'paragraph',\n                  content: [\n                    {\n                      type: 'text',\n                      text: 'Cell 1',\n                    },\n                  ],\n                },\n              ],\n            },\n            {\n              type: 'tableCell',\n              attrs: {\n                colspan: 1,\n                rowspan: 1,\n                colwidth: null,\n              },\n              content: [\n                {\n                  type: 'paragraph',\n                  content: [\n                    {\n                      type: 'text',\n                      text: 'Cell 2',\n                    },\n                  ],\n                },\n              ],\n            },\n          ],\n        },\n        {\n          type: 'tableRow',\n          content: [\n            {\n              type: 'tableCell',\n              attrs: {\n                colspan: 1,\n                rowspan: 1,\n                colwidth: null,\n              },\n              content: [\n                {\n                  type: 'paragraph',\n                  content: [\n                    {\n                      type: 'text',\n                      text: 'Cell 3',\n                    },\n                  ],\n                },\n              ],\n            },\n            {\n              type: 'tableCell',\n              attrs: {\n                colspan: 1,\n                rowspan: 1,\n                colwidth: null,\n              },\n              content: [\n                {\n                  type: 'paragraph',\n                  content: [\n                    {\n                      type: 'text',\n                      text: 'Cell 4',\n                    },\n                  ],\n                },\n              ],\n            },\n          ],\n        },\n      ],\n    },\n    {\n      type: 'heading',\n      attrs: {\n        level: 2,\n      },\n      content: [\n        {\n          type: 'text',\n          text: 'Math',\n        },\n      ],\n    },\n    {\n      type: 'paragraph',\n      content: [\n        { type: 'text', text: \"Inline math like Euler's identity \" },\n        { type: 'mathInline', content: [{ type: 'text', text: EULER_IDENTITY }] },\n        { type: 'text', text: ' and the quadratic formula ' },\n        { type: 'mathInline', content: [{ type: 'text', text: QUADRATIC_FORMULA }] },\n        { type: 'text', text: ' can appear within text.' },\n      ],\n    },\n    {\n      type: 'paragraph',\n      content: [\n        { type: 'text', text: 'Block-level equations are displayed on their own line:' },\n      ],\n    },\n    {\n      type: 'mathBlock',\n      content: [{ type: 'text', text: GAUSSIAN_INTEGRAL }],\n    },\n  ],\n}\n"
    }
  ],
  "meta": {
    "hasIcons": false,
    "hidden": false,
    "story": "",
    "framework": "preact",
    "accumulatedFiles": [
      "registry/src/preact/sample/sample-doc-typography.ts"
    ],
    "internalDependencies": []
  },
  "$schema": "https://ui.shadcn.com/schema/registry-item.json"
}
