@cyberyozh/text-editor 0.1.13 → 0.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editor.js +4 -1
- package/dist/editor.js.map +1 -1
- package/dist/editor.mjs +4 -1
- package/dist/editor.mjs.map +1 -1
- package/dist/render.js +2 -1
- package/dist/render.js.map +1 -1
- package/dist/render.mjs +2 -1
- package/dist/render.mjs.map +1 -1
- package/package.json +35 -35
- package/src/editor/dialogs/image-dialog/image-dialog.tsx +1 -0
- package/src/extensions/editor/figure.ts +1 -0
- package/src/utils/html-to-tiptap-content.ts +3 -1
package/dist/render.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/render/tiptap-render.tsx","../src/extensions/render/get-render-extensions.ts","../src/utils/handle-exit-node.ts","../src/utils/migrate-legacy-callouts.ts","../src/extensions/base/callout.ts","../src/extensions/base/code-block.ts","../src/extensions/base/copyable-text.ts","../src/extensions/base/custom-quote.ts","../src/extensions/base/link.ts","../src/extensions/base/myth-reality.ts","../src/extensions/base/prompt.ts","../src/extensions/base/video.ts","../src/extensions/base/figure.ts","../src/utils/image-src-resolver.ts","../src/utils/get-shared-extensions.ts","../node_modules/@tiptap/extension-text-style/src/text-style/index.ts","../node_modules/@tiptap/extension-text-style/src/background-color/background-color.ts","../node_modules/@tiptap/extension-text-style/src/color/color.ts","../node_modules/@tiptap/extension-text-style/src/font-family/font-family.ts","../node_modules/@tiptap/extension-text-style/src/font-size/font-size.ts","../node_modules/@tiptap/extension-text-style/src/line-height/line-height.ts","../node_modules/@tiptap/extension-text-style/src/text-style-kit/index.ts","../src/extensions/base/compatibility.ts","../src/render/static-renderer-config.tsx","../src/icons/color/TiptapCalloutError.tsx","../src/icons/color/TiptapCalloutInfo.tsx","../src/icons/color/TiptapCalloutSuccess.tsx","../src/icons/color/TiptapCalloutWarning.tsx","../src/utils/custom-emoji.ts","../src/extensions/views/components/callout.tsx","../src/extensions/views/components/code-block.tsx","../src/icons/Check.tsx","../src/icons/Copy.tsx","../src/icons/DragIcon.tsx","../src/icons/Edit.tsx","../src/icons/Quote.tsx","../src/icons/X.tsx","../src/icons/menu/AddImage.tsx","../src/icons/menu/AlignCenter.tsx","../src/icons/menu/AlignLeft.tsx","../src/icons/menu/AlignRight.tsx","../src/icons/menu/ArrowDown.tsx","../src/icons/menu/ArrowLeft.tsx","../src/icons/menu/ArrowRight.tsx","../src/icons/menu/ArrowUp.tsx","../src/icons/menu/Blockquote.tsx","../src/icons/menu/Bold.tsx","../src/icons/menu/BulletList.tsx","../src/icons/menu/CalloutError.tsx","../src/icons/menu/CalloutInfo.tsx","../src/icons/menu/CalloutSuccess.tsx","../src/icons/menu/CalloutWarning.tsx","../src/icons/menu/ClearFormatting.tsx","../src/icons/menu/CodeBlock.tsx","../src/icons/menu/Copyable.tsx","../src/icons/menu/CustomQuote.tsx","../src/icons/menu/DeleteColumn.tsx","../src/icons/menu/DeleteRow.tsx","../src/icons/menu/Details.tsx","../src/icons/menu/H2.tsx","../src/icons/menu/H3.tsx","../src/icons/menu/H4.tsx","../src/icons/menu/H5.tsx","../src/icons/menu/H6.tsx","../src/icons/menu/Highlight.tsx","../src/icons/menu/HorizontalRule.tsx","../src/icons/menu/Italic.tsx","../src/icons/menu/LinkOff.tsx","../src/icons/menu/Link.tsx","../src/icons/menu/Math.tsx","../src/icons/menu/MergeCells.tsx","../src/icons/menu/MythReality.tsx","../src/icons/menu/OrderedList.tsx","../src/icons/menu/Prompt.tsx","../src/icons/menu/Redo.tsx","../src/icons/menu/SplitCells.tsx","../src/icons/menu/Strikethrough.tsx","../src/icons/menu/Subscript.tsx","../src/icons/menu/Superscript.tsx","../src/icons/menu/TableColumnHeading.tsx","../src/icons/menu/TableRowHeading.tsx","../src/icons/menu/Table.tsx","../src/icons/menu/TextColor.tsx","../src/icons/menu/Underline.tsx","../src/icons/menu/Undo.tsx","../src/icons/menu/Video.tsx","../src/extensions/views/components/copy-button.tsx","../src/extensions/views/components/copyable-text.tsx","../src/extensions/views/components/custom-quote.tsx","../src/extensions/views/components/figure.tsx","../src/extensions/views/components/prompt.tsx","../src/utils/detect-video-hosting.ts","../src/extensions/views/components/video.tsx","../src/utils/html-to-tiptap-content.ts"],"sourcesContent":["import { renderToReactElement } from \"@tiptap/static-renderer/pm/react\";\nimport { ReactNode } from \"react\";\nimport { getRenderExtensions } from \"../extensions/render\";\nimport { getNodeMapping, markMapping } from \"./static-renderer-config\";\n\nimport \"highlight.js/styles/github-dark.css\";\nimport \"katex/dist/katex.min.css\";\n\ntype JSONContent = Record<string, any>;\n\ninterface TiptapRenderProps {\n /**\n * Tiptap JSON content (parsed object or JSON string)\n */\n content: JSONContent | string;\n /**\n * Function to resolve image URLs from file IDs\n * Used for static rendering of figure nodes with file references\n */\n getImageById?: (fileId: string) => string | null;\n}\n\nexport function renderTiptapToReact(\n content: JSONContent | string,\n getImageById?: (fileId: string) => string | null\n): ReactNode {\n let parsedContent: JSONContent;\n\n try {\n if (typeof content === \"string\") {\n parsedContent = JSON.parse(content);\n } else {\n parsedContent = content;\n }\n } catch (error) {\n console.warn(\"Failed to parse Tiptap content:\", error);\n parsedContent = { type: \"doc\", content: [{ type: \"paragraph\" }] };\n }\n\n const rendered = renderToReactElement({\n extensions: getRenderExtensions(),\n content: parsedContent,\n options: {\n nodeMapping: getNodeMapping(getImageById),\n markMapping,\n },\n });\n\n return (\n <div\n className=\"tiptap\"\n data-tiptap-render\n >\n {rendered}\n </div>\n );\n}\n\n/**\n * Server component that renders Tiptap JSON content as React\n *\n * Designed for Next.js Server Components. Converts Tiptap JSON to rendered React elements\n * without any client-side dependencies.\n *\n * @example\n * ```tsx\n * // app/blog/[slug]/page.tsx (Server Component)\n * import { TiptapRender } from '@cyberyozh/tiptap/server';\n *\n * export default function BlogPost({ article }) {\n * return (\n * <article>\n * <h1>{article.title}</h1>\n * <TiptapRender content={article.content} lang=\"en\" />\n * </article>\n * );\n * }\n * ```\n *\n * @example\n * ```tsx\n * // With custom image resolver\n * import { TiptapRender } from '@cyberyozh/tiptap/server';\n *\n * const getImageById = (fileId: string) => `/api/images/${fileId}`;\n *\n * export default function BlogPost({ article }) {\n * return (\n * <article>\n * <TiptapRender\n * content={article.content}\n * lang=\"en\"\n * getImageById={getImageById}\n * />\n * </article>\n * );\n * }\n * ```\n */\nexport function TiptapRender({ content, getImageById }: TiptapRenderProps) {\n return renderTiptapToReact(content, getImageById);\n}\n","import { Mathematics } from \"@tiptap/extension-mathematics\";\nimport { TableKit } from \"@tiptap/extension-table\";\n\nimport {\n BasePrompt,\n BasePromptContent,\n BasePromptHeader,\n BaseCallout,\n BaseCodeBlock,\n CopyableText,\n BaseCustomQuote,\n BaseCustomQuoteAuthor,\n BaseCustomQuoteSign,\n BaseCustomQuoteText,\n BaseVideo,\n BaseFigure,\n} from \"../base\";\nimport { getSharedExtensions } from \"@/utils/get-shared-extensions\";\nimport {\n BaseLegacyCustomBlockquote,\n BaseLegacyPromptSE,\n BaseLegacyPromptSEContent,\n BaseLegacyPromptSEHeader,\n BaseLegacyBookAlert,\n BaseLegacyBookTip,\n BaseLegacySEQuote,\n BaseLegacyYouTube,\n BaseLegacyFigure,\n} from \"../base/compatibility\";\n\nexport function getRenderExtensions() {\n const sharedExtensions = getSharedExtensions();\n\n return [\n ...sharedExtensions,\n CopyableText,\n BaseCallout,\n BaseCodeBlock,\n BaseCustomQuote,\n BaseCustomQuoteText,\n BaseCustomQuoteAuthor,\n BaseCustomQuoteSign,\n BasePrompt,\n BasePromptHeader,\n BasePromptContent,\n BaseVideo,\n BaseFigure,\n\n TableKit.configure({\n table: { resizable: false, renderWrapper: true },\n }),\n\n Mathematics.configure({\n katexOptions: {\n throwOnError: false,\n },\n }),\n\n // ========================================================================\n // Legacy Extensions (Deprecated - for backward compatibility only)\n // ========================================================================\n BaseLegacyBookAlert,\n BaseLegacyBookTip,\n BaseLegacySEQuote,\n BaseLegacyPromptSE,\n BaseLegacyPromptSEHeader,\n BaseLegacyPromptSEContent,\n BaseLegacyCustomBlockquote,\n BaseLegacyYouTube,\n BaseLegacyFigure,\n // Update\n ];\n}\n","import { Editor } from \"@tiptap/core\";\nimport { TextSelection } from \"@tiptap/pm/state\";\n\n/**\n * Handles exiting a node (like callout) when pressing Enter on an empty paragraph\n * @param editor - The Tiptap editor instance\n * @param nodeName - The name of the node type to exit from (e.g., 'callout')\n * @returns true if the exit was handled, false otherwise\n */\nexport function handleExitNode(editor: Editor, nodeName: string): boolean {\n const { view, schema } = editor;\n const { state } = view;\n const { selection } = state;\n\n const $pos = selection.$from;\n const currentNode = $pos.node();\n\n let depth = $pos.depth;\n let isInsideTargetNode = false;\n let targetNodeDepth = 0;\n while (depth > 0) {\n const parentNode = $pos.node(depth);\n if (parentNode.type.name === nodeName) {\n isInsideTargetNode = true;\n targetNodeDepth = depth;\n break;\n }\n depth--;\n }\n\n const isCurrentNodeEmptyParagraph =\n currentNode.type.name === \"paragraph\" && currentNode.content.size === 0;\n\n if (!isInsideTargetNode || !isCurrentNodeEmptyParagraph) {\n return false;\n }\n\n const { tr } = state;\n const posAfterTargetNode = $pos.after(targetNodeDepth);\n\n const targetNode = $pos.node(targetNodeDepth);\n let newPosAfterTargetNode = posAfterTargetNode;\n\n if (targetNode.childCount > 1) {\n const emptyParagraphStart = $pos.before();\n const emptyParagraphEnd = $pos.after();\n const deletionLength = emptyParagraphEnd - emptyParagraphStart;\n\n tr.delete(emptyParagraphStart, emptyParagraphEnd);\n newPosAfterTargetNode = posAfterTargetNode - deletionLength;\n }\n\n const paragraphNode = schema.nodes.paragraph.createAndFill();\n if (!paragraphNode) return false;\n\n tr.insert(newPosAfterTargetNode, paragraphNode);\n tr.setSelection(TextSelection.create(tr.doc, newPosAfterTargetNode + 1));\n\n view.dispatch(tr);\n return true;\n}\n","import { Editor } from \"@tiptap/core\";\n\nexport type CalloutType = \"info\" | \"warning\" | \"success\" | \"error\";\n\nconst legacyTypeMap: Record<string, CalloutType> = {\n question: \"info\",\n idea: \"warning\",\n info: \"success\",\n error: \"error\",\n};\n\nexport function migrateLegacyCallouts(editor: Editor) {\n const { doc, schema } = editor.state;\n const calloutsToMigrate: Array<{ node: any; pos: number }> = [];\n\n doc.descendants((node, pos) => {\n if (node.type.name === \"callout\" && node.attrs.calloutType) {\n calloutsToMigrate.push({ node, pos });\n }\n });\n\n if (calloutsToMigrate.length === 0) return;\n\n const tr = editor.state.tr;\n calloutsToMigrate.sort((a, b) => b.pos - a.pos);\n\n for (const { node, pos } of calloutsToMigrate) {\n const oldType = node.attrs.calloutType;\n const newType = legacyTypeMap[oldType] || oldType;\n const hasInlineContent = node.content.size > 0 && !node.firstChild?.isBlock;\n\n if (hasInlineContent) {\n const paragraph = schema.nodes.paragraph?.create(null, node.content);\n const newContent = paragraph ? [paragraph] : [];\n\n tr.replaceRangeWith(\n pos,\n pos + node.nodeSize,\n schema.nodes.callout.create(\n {\n type: newType,\n calloutType: null,\n callout: null,\n },\n newContent\n )\n );\n } else {\n tr.setNodeMarkup(pos, undefined, {\n ...node.attrs,\n type: newType,\n calloutType: null,\n callout: null,\n });\n }\n }\n\n editor.view.dispatch(tr);\n}\n","import { handleExitNode } from \"@/utils/handle-exit-node\";\nimport { migrateLegacyCallouts } from \"@/utils/migrate-legacy-callouts\";\nimport { mergeAttributes, Node } from \"@tiptap/core\";\n\nexport type CalloutType = \"info\" | \"warning\" | \"success\" | \"error\";\n\nconst legacyTypeMap: Record<string, CalloutType> = {\n question: \"info\",\n idea: \"warning\",\n info: \"success\",\n error: \"error\",\n};\n\nexport const BaseCallout = Node.create({\n name: \"callout\",\n\n group: \"block\",\n content: \"block+\",\n\n draggable: true,\n isolating: true,\n\n addAttributes() {\n return {\n type: {\n default: \"info\" as CalloutType,\n\n parseHTML: (element) => {\n if (typeof element === \"string\") return \"info\";\n\n const dataCallout = element.getAttribute(\"data-callout\");\n\n if (dataCallout) {\n return dataCallout as CalloutType;\n }\n\n const legacyType = element.getAttribute(\"calloutType\");\n if (legacyType) {\n return legacyTypeMap[legacyType];\n }\n\n if (element.classList) {\n if (element.classList.contains(\"callout--error\")) return \"error\";\n if (element.classList.contains(\"callout--question\")) return \"info\";\n if (element.classList.contains(\"callout--idea\")) return \"warning\";\n if (element.classList.contains(\"callout--info\")) return \"success\";\n }\n\n return \"info\";\n },\n renderHTML: (attributes) => {\n return {\n \"data-callout\": attributes.type,\n };\n },\n },\n bgColor: {\n default: null,\n parseHTML: (element) => {\n if (typeof element === \"string\") return null;\n return element.getAttribute(\"data-bg-color\");\n },\n renderHTML: (attributes) => {\n if (!attributes.bgColor) return {};\n return {\n \"data-bg-color\": attributes.bgColor,\n };\n },\n },\n emoji: {\n default: null,\n parseHTML: (element) => {\n if (typeof element === \"string\") return null;\n return element.getAttribute(\"data-emoji\");\n },\n renderHTML: (attributes) => {\n if (!attributes.emoji) return {};\n return {\n \"data-emoji\": attributes.emoji,\n };\n },\n },\n calloutType: {\n default: null,\n parseHTML: (element) => element.getAttribute(\"calloutType\"),\n renderHTML: () => ({}),\n },\n callout: {\n default: null,\n parseHTML: (element) => element.getAttribute(\"callout\"),\n renderHTML: () => ({}),\n },\n };\n },\n\n onCreate() {\n migrateLegacyCallouts(this.editor);\n },\n\n addKeyboardShortcuts() {\n return {\n Enter: () => handleExitNode(this.editor, this.name),\n };\n },\n\n parseHTML() {\n return [\n {\n tag: \"div[data-callout]\",\n },\n {\n tag: \"callout\",\n priority: 51,\n },\n {\n tag: \"div\",\n priority: 50,\n getAttrs: (element) => {\n if (typeof element === \"string\") return false;\n if (\n element.classList.contains(\"callout\") ||\n element.classList.contains(\"callout--error\") ||\n element.classList.contains(\"callout--question\") ||\n element.classList.contains(\"callout--idea\") ||\n element.classList.contains(\"callout--info\")\n ) {\n return {};\n }\n return false;\n },\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"div\", mergeAttributes(HTMLAttributes), 0];\n },\n});\n","import { CodeBlockLowlight } from \"@tiptap/extension-code-block-lowlight\";\nimport html from \"highlight.js/lib/languages/xml\";\nimport { common, createLowlight } from \"lowlight\";\n\nconst lowlight = createLowlight(common);\nlowlight.register(\"html\", html);\n\nexport const BaseCodeBlock = CodeBlockLowlight.configure({\n lowlight,\n}).extend({\n selectable: false,\n draggable: true,\n\n addAttributes() {\n return {\n language: {\n default: null,\n parseHTML: (element: HTMLElement) => {\n return element.querySelector(\"code\")?.getAttribute(\"data-language\") || \"bash\";\n },\n },\n };\n },\n});\n","import { Mark, mergeAttributes } from \"@tiptap/core\";\n\ndeclare module \"@tiptap/core\" {\n interface Commands<ReturnType> {\n copyable: {\n setCopyable: (attributes?: { class: \"copyable\" }) => ReturnType;\n toggleCopyable: (attributes?: { class: \"copyable\" }) => ReturnType;\n unsetCopyable: () => ReturnType;\n };\n }\n}\n\nexport const CopyableText = Mark.create({\n name: \"copyable-text\",\n\n addOptions() {\n return {\n HTMLAttributes: {\n class: \"copyable\",\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: \"span\",\n getAttrs: (element) => (element.classList.contains(\"copyable\") ? {} : false),\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"span\", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n },\n\n addCommands() {\n return {\n setCopyable:\n (attributes) =>\n ({ commands }) => {\n return commands.setMark(this.name, attributes);\n },\n toggleCopyable:\n (attributes) =>\n ({ commands }) => {\n return commands.toggleMark(this.name, attributes);\n },\n unsetCopyable:\n () =>\n ({ commands }) => {\n return commands.unsetMark(this.name);\n },\n };\n },\n});\n","import { mergeAttributes, Node } from \"@tiptap/core\";\nimport { TextSelection } from \"@tiptap/pm/state\";\n\nexport const BaseCustomQuote = Node.create({\n name: \"customQuote\",\n group: \"block\",\n content: \"customQuoteText customQuoteAuthor customQuoteSign\",\n selectable: false,\n draggable: true,\n isolating: true,\n\n addKeyboardShortcuts() {\n return {\n Enter: () => {\n const { view, schema } = this.editor;\n const { state } = view;\n const { selection } = state;\n\n const $pos = selection.$from;\n let depth = $pos.depth;\n let isInsideCustomQuote = false;\n\n while (depth > 0) {\n const parentNode = $pos.node(depth);\n if (parentNode.type.name === this.name) {\n isInsideCustomQuote = true;\n break;\n }\n depth--;\n }\n\n if (!isInsideCustomQuote) {\n return false;\n }\n\n const { tr } = state;\n const posAfter = $pos.after(depth);\n\n const paragraphNode = schema.nodes.paragraph.createAndFill();\n if (!paragraphNode) return false;\n\n tr.insert(posAfter, paragraphNode);\n tr.setSelection(TextSelection.create(tr.doc, posAfter + 1));\n view.dispatch(tr);\n\n return true;\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: \"div[data-custom-quote]\",\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"div\", mergeAttributes(HTMLAttributes, { \"data-custom-quote\": \"\" }), 0];\n },\n});\n\nexport const BaseCustomQuoteText = Node.create({\n name: \"customQuoteText\",\n group: \"block\",\n content: \"inline*\",\n draggable: false,\n selectable: true,\n\n addAttributes() {\n return {\n open: {\n default: true,\n },\n };\n },\n\n addKeyboardShortcuts() {\n return {\n Enter: () => {\n const { view, state } = this.editor;\n const { tr, selection } = state;\n const { $from } = selection;\n\n if ($from.parent.type.name !== \"customQuoteText\") {\n return false;\n }\n\n const posAfter = $from.after();\n const nextNode = state.doc.nodeAt(posAfter);\n if (!nextNode || nextNode.type.name !== \"customQuoteAuthor\") return false;\n\n const nextNodeEnd = posAfter + nextNode.nodeSize - 1;\n tr.setSelection(TextSelection.create(tr.doc, nextNodeEnd));\n view.dispatch(tr);\n return true;\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: \"div[data-custom-quote-text]\",\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"div\", mergeAttributes(HTMLAttributes, { \"data-custom-quote-text\": \"\" }), 0];\n },\n});\n\nexport const BaseCustomQuoteAuthor = Node.create({\n name: \"customQuoteAuthor\",\n group: \"block\",\n content: \"inline*\",\n selectable: true,\n\n addKeyboardShortcuts() {\n return {\n Enter: () => {\n const { view, state } = this.editor;\n const { tr, selection } = state;\n const { $from } = selection;\n\n if ($from.parent.type.name !== \"customQuoteAuthor\") {\n return false;\n }\n\n const posAfter = $from.after();\n const nextNode = state.doc.nodeAt(posAfter);\n if (!nextNode || nextNode.type.name !== \"customQuoteSign\") return false;\n\n const nextNodeEnd = posAfter + nextNode.nodeSize - 1;\n tr.setSelection(TextSelection.create(tr.doc, nextNodeEnd));\n view.dispatch(tr);\n return true;\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: \"div[data-custom-quote-author]\",\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"div\", mergeAttributes(HTMLAttributes, { \"data-custom-quote-author\": \"\" }), 0];\n },\n});\n\nexport const BaseCustomQuoteSign = Node.create({\n name: \"customQuoteSign\",\n group: \"block\",\n content: \"inline*\",\n selectable: true,\n\n parseHTML() {\n return [\n {\n tag: \"div[data-custom-quote-sign]\",\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"div\", mergeAttributes(HTMLAttributes, { \"data-custom-quote-sign\": \"\" }), 0];\n },\n});\n","import Link from \"@tiptap/extension-link\";\n\nexport const LinkExtension = Link.extend({\n addOptions() {\n return {\n ...this.parent?.(),\n openOnClick: false,\n linkOnPaste: true,\n autolink: true,\n protocols: [\"http\", \"https\", \"mailto\", \"tel\"],\n };\n },\n}).configure({\n openOnClick: false,\n linkOnPaste: true,\n autolink: true,\n protocols: [\"http\", \"https\", \"mailto\", \"tel\"],\n});\n","import { mergeAttributes, Node } from \"@tiptap/core\";\nimport { TextSelection } from \"@tiptap/pm/state\";\nimport { handleExitNode } from \"../../utils/handle-exit-node\";\n\nexport const BaseMythRealityBlock = Node.create({\n name: \"mythRealityBlock\",\n\n group: \"block\",\n content: \"block+\",\n\n parseHTML() {\n return [{ tag: \"div[data-myth-reality-block]\" }];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\n \"div\",\n mergeAttributes(HTMLAttributes, { \"data-myth-reality-block\": \"\" }),\n [\"div\", { class: \"myth-reality-block-content\" }, 0],\n ];\n },\n});\n\nexport const BaseMythReality = Node.create({\n name: \"mythReality\",\n group: \"block\",\n content: \"(mythRealityBlock) (mythRealityBlock)\",\n\n draggable: true,\n isolating: true,\n\n parseHTML() {\n return [{ tag: \"div[data-myth-reality]\" }];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"div\", mergeAttributes(HTMLAttributes, { \"data-myth-reality\": \"\" }), 0];\n },\n\n addKeyboardShortcuts() {\n return {\n Enter: () => handleExitNode(this.editor, this.name),\n };\n },\n});\n","import { Node, mergeAttributes } from \"@tiptap/core\";\nimport { TextSelection } from \"@tiptap/pm/state\";\n\nexport const BasePrompt = Node.create({\n name: \"prompt\",\n group: \"block\",\n content: \"(promptHeader | promptV2Header) (promptContent | promptV2Content)\",\n selectable: false,\n draggable: true,\n\n addKeyboardShortcuts() {\n return {\n Enter: () => {\n const { view, schema } = this.editor;\n const { state } = view;\n const { selection } = state;\n\n const $pos = selection.$from;\n let depth = $pos.depth;\n let isInsidePrompt = false;\n\n while (depth > 0) {\n const parentNode = $pos.node(depth);\n if (parentNode.type.name === this.name) {\n isInsidePrompt = true;\n break;\n }\n depth--;\n }\n\n if (!isInsidePrompt) {\n return false;\n }\n\n const { tr } = state;\n const posAfter = $pos.after(depth);\n\n const paragraphNode = schema.nodes.paragraph.createAndFill();\n if (!paragraphNode) return false;\n\n tr.insert(posAfter, paragraphNode);\n tr.setSelection(TextSelection.create(tr.doc, posAfter + 1));\n view.dispatch(tr);\n\n return true;\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: \"div[data-prompt]\",\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"div\", mergeAttributes(HTMLAttributes, { \"data-prompt\": \"\" }), 0];\n },\n});\n\nexport const BasePromptHeader = Node.create({\n name: \"promptHeader\",\n group: \"block\",\n content: \"inline*\",\n selectable: true,\n draggable: false,\n\n parseHTML() {\n return [\n {\n tag: \"div[data-prompt-header]\",\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"div\", mergeAttributes(HTMLAttributes, { \"data-prompt-header\": \"\" }), 0];\n },\n\n // addNodeView() {\n // return ReactNodeViewRenderer(PromptHeaderView);\n // },\n});\n\nexport const BasePromptContent = Node.create({\n name: \"promptContent\",\n group: \"block\",\n content: \"text*\",\n draggable: false,\n selectable: true,\n\n parseHTML() {\n return [\n {\n tag: \"div[data-prompt-content]\",\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"div\", mergeAttributes(HTMLAttributes, { \"data-prompt-content\": \"\" }), 0];\n },\n\n // addNodeView() {\n // return ReactNodeViewRenderer(PromptContentView);\n // },\n});\n","import { Node } from \"@tiptap/core\";\n\nexport const BaseVideo = Node.create({\n name: \"video\",\n group: \"block\",\n selectable: true,\n draggable: true,\n isolating: true,\n\n addAttributes() {\n return {\n src: {\n default: null,\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: \"video-embed\",\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"video-embed\", HTMLAttributes];\n },\n});\n","import { mergeAttributes, nodePasteRule } from \"@tiptap/core\";\nimport Image, { ImageOptions } from \"@tiptap/extension-image\";\nimport { resolveImageSrc } from \"../../utils/image-src-resolver\";\nimport type { FigureAttrs } from \"../../types\";\n\nexport interface FigureOptions extends ImageOptions {\n getImageById?: (fileId: string) => string | null;\n onFigureClick?: (attrs: FigureAttrs, pos: number) => void;\n}\n\ndeclare module \"@tiptap/core\" {\n interface Commands<ReturnType> {\n figure: {\n setFigure: (options: FigureAttrs) => ReturnType;\n updateFigure: (options: Partial<FigureAttrs>) => ReturnType;\n };\n }\n}\n\nexport const BaseFigure = Image.extend<FigureOptions>({\n name: \"image\",\n group: \"block\",\n content: \"\",\n draggable: true,\n isolating: true,\n selectable: false,\n\n addOptions() {\n const parentOptions = this.parent?.() || {};\n return {\n ...parentOptions,\n getImageById: undefined,\n onFigureClick: undefined,\n } as FigureOptions;\n },\n\n addAttributes() {\n return {\n ...this.parent?.(),\n fileId: {\n default: null,\n parseHTML: (element) => {\n const img = element.querySelector(\"img\") || element;\n return img.getAttribute(\"data-file-id\") || element.getAttribute(\"data-file-id\");\n },\n renderHTML: (attributes) => {\n if (!attributes.fileId) return {};\n return { \"data-file-id\": attributes.fileId };\n },\n },\n caption: {\n default: null,\n parseHTML: (element) => element.querySelector(\"figcaption\")?.textContent || null,\n },\n storageKey: {\n default: null,\n parseHTML: (element) => element.getAttribute(\"data-storage-key\"),\n renderHTML: (attributes) => ({\n \"data-storage-key\": attributes.storageKey,\n }),\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: \"figure\",\n getAttrs: (element) => {\n if (typeof element === \"string\") return false;\n const img = element.querySelector(\"img\");\n return img ? {} : false;\n },\n },\n {\n tag: \"img[src]\",\n getAttrs: (element) => {\n if (typeof element === \"string\") return false;\n return {};\n },\n },\n ];\n },\n\n renderHTML({ node }) {\n const resolvedSrc = resolveImageSrc(\n {\n fileId: node.attrs.fileId,\n src: node.attrs.src,\n },\n { getImageById: this.options.getImageById }\n );\n\n const figureAttrs = mergeAttributes(this.options.HTMLAttributes);\n\n const imgAttrs: Record<string, unknown> = {\n src: resolvedSrc,\n };\n\n if (node.attrs.fileId) imgAttrs[\"data-file-id\"] = node.attrs.fileId;\n if (node.attrs.alt) imgAttrs.alt = node.attrs.alt;\n if (node.attrs.title) imgAttrs.title = node.attrs.title;\n if (node.attrs.width) imgAttrs.width = node.attrs.width;\n if (node.attrs.height) imgAttrs.height = node.attrs.height;\n\n const hasCaption = node.attrs.caption && node.attrs.caption.trim().length > 0;\n const figcaptionContent = hasCaption ? [\"figcaption\", {}, node.attrs.caption] : null;\n\n return [\n \"figure\",\n figureAttrs,\n [\"img\", imgAttrs],\n ...(figcaptionContent ? [figcaptionContent] : []),\n ];\n },\n\n addCommands() {\n return {\n ...this.parent?.(),\n setFigure:\n (options: FigureAttrs) =>\n ({ commands }) => {\n return commands.insertContent({\n type: this.name,\n attrs: options,\n });\n },\n updateFigure:\n (options: Partial<FigureAttrs>) =>\n ({ commands }) => {\n return commands.updateAttributes(this.name, options);\n },\n };\n },\n\n addPasteRules() {\n return [\n nodePasteRule({\n find: /!\\[(.*?)\\]\\((.*?)(?:\\s+\"(.*?)\")?\\)/g,\n type: this.type,\n getAttributes: (match) => {\n const [, alt, src, title] = match;\n return { src, alt, title };\n },\n }),\n ];\n },\n});\n","/**\n * Utility for resolving image sources from fileId or direct src\n */\n\nexport interface ImageSrcResolverOptions {\n /**\n * Optional function to resolve fileId to URL\n * If not provided, fileId will be used as-is or src will be used\n */\n getImageById?: (fileId: string) => string | null;\n}\n\nexport interface ImageAttributes {\n fileId?: string | null;\n src?: string | null;\n}\n\n/**\n * Resolves image src with clear priority:\n * 1. If fileId exists AND getImageById provided → resolve via getImageById(fileId)\n * 2. If no fileId OR no getImageById → use src/fileUrl directly\n * 3. If both missing → return empty string (error state)\n *\n * Clear separation:\n * - fileId workflow: fileId + getImageById() → resolved URL\n * - Direct URL workflow: fileUrl/src → used as-is\n */\nexport function resolveImageSrc(attrs: ImageAttributes, options?: ImageSrcResolverOptions): string {\n const { fileId, src } = attrs;\n const { getImageById } = options || {};\n\n // Path 1: FileId workflow with resolution function\n if (fileId && getImageById) {\n const resolvedSrc = getImageById(fileId);\n if (resolvedSrc) {\n return resolvedSrc;\n }\n // If resolution fails, this is an error - return empty to show broken image\n console.warn(`Failed to resolve fileId: ${fileId}`);\n return \"\";\n }\n\n // Path 2: Direct URL workflow (fileUrl/src)\n if (src) {\n return src;\n }\n\n // Path 3: FileId without getImageById (legacy or misconfigured)\n if (fileId) {\n console.warn(\"fileId provided but no getImageById function - cannot resolve image\");\n return \"\";\n }\n\n // Error state: no way to display image\n return \"\";\n}\n\n/**\n * Normalizes attributes for storage\n * Prefers fileId over src if both are provided\n */\nexport function normalizeImageAttributes(attrs: ImageAttributes): ImageAttributes {\n if (attrs.fileId) {\n // If fileId exists, it's the source of truth\n return {\n fileId: attrs.fileId,\n };\n }\n\n // Otherwise use src\n return {\n src: attrs.src,\n };\n}\n","import StarterKit from \"@tiptap/starter-kit\";\nimport { Details, DetailsContent, DetailsSummary } from \"@tiptap/extension-details\";\nimport Highlight from \"@tiptap/extension-highlight\";\nimport { LinkExtension, BaseMythReality, BaseMythRealityBlock } from \"@/extensions/base\";\nimport Subscript from \"@tiptap/extension-subscript\";\nimport Superscript from \"@tiptap/extension-superscript\";\nimport TextAlign from \"@tiptap/extension-text-align\";\nimport { TextStyleKit } from \"@tiptap/extension-text-style\";\nimport { LegacyInlineLatexSE } from \"@/extensions/base/compatibility\";\n\n/**\n * Get all Tiptap extensions for editing and rendering without ReactNodeViewRenderer for Editor\n * Can be used for both static render and editor\n */\nexport function getSharedExtensions() {\n return [\n StarterKit.configure({\n codeBlock: false,\n link: false,\n }),\n Highlight.configure({ multicolor: true }),\n LinkExtension,\n Superscript,\n Subscript,\n TextAlign.configure({\n types: [\"heading\", \"paragraph\"],\n }),\n TextStyleKit.configure({\n color: {\n types: [\"textStyle\"],\n },\n }),\n Details.configure({\n persist: true,\n HTMLAttributes: {\n class: \"details\",\n },\n }),\n DetailsSummary,\n DetailsContent,\n BaseMythReality,\n BaseMythRealityBlock,\n LegacyInlineLatexSE,\n ];\n}\n","import { Mark, mergeAttributes } from '@tiptap/core'\n\nimport type { TextStyleAttributes } from '../index.js'\n\nexport interface TextStyleOptions {\n /**\n * HTML attributes to add to the span element.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record<string, any>\n /**\n * When enabled, merges the styles of nested spans into the child span during HTML parsing.\n * This prioritizes the style of the child span.\n * Used when parsing content created in other editors.\n * (Fix for ProseMirror's default behavior.)\n * @default true\n */\n mergeNestedSpanStyles: boolean\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n textStyle: {\n /**\n * Remove spans without inline style attributes.\n * @example editor.commands.removeEmptyTextStyle()\n */\n removeEmptyTextStyle: () => ReturnType\n /**\n * Toggle a text style\n * @param attributes The text style attributes\n * @example editor.commands.toggleTextStyle({ fontWeight: 'bold' })\n */\n toggleTextStyle: (attributes?: TextStyleAttributes) => ReturnType\n }\n }\n}\n\nconst MAX_FIND_CHILD_SPAN_DEPTH = 20\n\n/**\n * Returns all next child spans, either direct children or nested deeper\n * but won't traverse deeper into child spans found, will only go MAX_FIND_CHILD_SPAN_DEPTH levels deep (default: 20)\n */\nconst findChildSpans = (element: HTMLElement, depth = 0): HTMLElement[] => {\n const childSpans: HTMLElement[] = []\n\n if (!element.children.length || depth > MAX_FIND_CHILD_SPAN_DEPTH) {\n return childSpans\n }\n\n Array.from(element.children).forEach(child => {\n if (child.tagName === 'SPAN') {\n childSpans.push(child as HTMLElement)\n } else if (child.children.length) {\n childSpans.push(...findChildSpans(child as HTMLElement, depth + 1))\n }\n })\n\n return childSpans\n}\n\nconst mergeNestedSpanStyles = (element: HTMLElement) => {\n if (!element.children.length) {\n return\n }\n\n const childSpans = findChildSpans(element)\n\n if (!childSpans) {\n return\n }\n\n childSpans.forEach(childSpan => {\n const childStyle = childSpan.getAttribute('style')\n const closestParentSpanStyleOfChild = childSpan.parentElement?.closest('span')?.getAttribute('style')\n\n childSpan.setAttribute('style', `${closestParentSpanStyleOfChild};${childStyle}`)\n })\n}\n\n/**\n * This extension allows you to create text styles. It is required by default\n * for the `text-color` and `font-family` extensions.\n * @see https://www.tiptap.dev/api/marks/text-style\n */\nexport const TextStyle = Mark.create<TextStyleOptions>({\n name: 'textStyle',\n\n priority: 101,\n\n addOptions() {\n return {\n HTMLAttributes: {},\n mergeNestedSpanStyles: true,\n }\n },\n\n parseHTML() {\n return [\n {\n tag: 'span',\n consuming: false,\n getAttrs: element => {\n const hasStyles = (element as HTMLElement).hasAttribute('style')\n\n if (!hasStyles) {\n return false\n }\n\n if (this.options.mergeNestedSpanStyles) {\n mergeNestedSpanStyles(element)\n }\n\n return {}\n },\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['span', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n addCommands() {\n return {\n toggleTextStyle:\n attributes =>\n ({ commands }) => {\n return commands.toggleMark(this.name, attributes)\n },\n removeEmptyTextStyle:\n () =>\n ({ tr }) => {\n const { selection } = tr\n\n // Gather all of the nodes within the selection range.\n // We would need to go through each node individually\n // to check if it has any inline style attributes.\n // Otherwise, calling commands.unsetMark(this.name)\n // removes everything from all the nodes\n // within the selection range.\n tr.doc.nodesBetween(selection.from, selection.to, (node, pos) => {\n // Check if it's a paragraph element, if so, skip this node as we apply\n // the text style to inline text nodes only (span).\n if (node.isTextblock) {\n return true\n }\n\n // Check if the node has no inline style attributes.\n // Filter out non-`textStyle` marks.\n if (\n !node.marks\n .filter(mark => mark.type === this.type)\n .some(mark => Object.values(mark.attrs).some(value => !!value))\n ) {\n // Proceed with the removal of the `textStyle` mark for this node only\n tr.removeMark(pos, pos + node.nodeSize, this.type)\n }\n })\n\n return true\n },\n }\n },\n})\n","import '../text-style/index.js'\n\nimport { Extension } from '@tiptap/core'\n\nexport type BackgroundColorOptions = {\n /**\n * The types where the color can be applied\n * @default ['textStyle']\n * @example ['heading', 'paragraph']\n */\n types: string[]\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n backgroundColor: {\n /**\n * Set the text color\n * @param backgroundColor The color to set\n * @example editor.commands.setColor('red')\n */\n setBackgroundColor: (backgroundColor: string) => ReturnType\n\n /**\n * Unset the text backgroundColor\n * @example editor.commands.unsetBackgroundColor()\n */\n unsetBackgroundColor: () => ReturnType\n }\n }\n}\n\n// @ts-ignore because the module is not found during dts build\ndeclare module '@tiptap/extension-text-style' {\n interface TextStyleAttributes {\n backgroundColor?: string | null\n }\n}\n\n/**\n * This extension allows you to color your text.\n * @see https://tiptap.dev/api/extensions/background-color\n */\nexport const BackgroundColor = Extension.create<BackgroundColorOptions>({\n name: 'backgroundColor',\n\n addOptions() {\n return {\n types: ['textStyle'],\n }\n },\n\n addGlobalAttributes() {\n return [\n {\n types: this.options.types,\n attributes: {\n backgroundColor: {\n default: null,\n parseHTML: element => {\n // Prefer the raw inline `style` attribute so we preserve\n // the original format (e.g. `#rrggbb`) instead of the\n // computed `rgb(...)` value returned by `element.style.backgroundColor`.\n // When nested spans are merged the style attribute may contain\n // multiple `background-color:` declarations (parent;child). We should pick\n // the last declaration so the child's background color takes priority.\n const styleAttr = element.getAttribute('style')\n if (styleAttr) {\n const decls = styleAttr\n .split(';')\n .map(s => s.trim())\n .filter(Boolean)\n for (let i = decls.length - 1; i >= 0; i -= 1) {\n const parts = decls[i].split(':')\n if (parts.length >= 2) {\n const prop = parts[0].trim().toLowerCase()\n const val = parts.slice(1).join(':').trim()\n if (prop === 'background-color') {\n return val.replace(/['\"]+/g, '')\n }\n }\n }\n }\n\n return element.style.backgroundColor?.replace(/['\"]+/g, '')\n },\n renderHTML: attributes => {\n if (!attributes.backgroundColor) {\n return {}\n }\n\n return {\n style: `background-color: ${attributes.backgroundColor}`,\n }\n },\n },\n },\n },\n ]\n },\n\n addCommands() {\n return {\n setBackgroundColor:\n backgroundColor =>\n ({ chain }) => {\n return chain().setMark('textStyle', { backgroundColor }).run()\n },\n unsetBackgroundColor:\n () =>\n ({ chain }) => {\n return chain().setMark('textStyle', { backgroundColor: null }).removeEmptyTextStyle().run()\n },\n }\n },\n})\n","import '../text-style/index.js'\n\nimport { Extension } from '@tiptap/core'\n\nexport type ColorOptions = {\n /**\n * The types where the color can be applied\n * @default ['textStyle']\n * @example ['heading', 'paragraph']\n */\n types: string[]\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n color: {\n /**\n * Set the text color\n * @param color The color to set\n * @example editor.commands.setColor('red')\n */\n setColor: (color: string) => ReturnType\n\n /**\n * Unset the text color\n * @example editor.commands.unsetColor()\n */\n unsetColor: () => ReturnType\n }\n }\n}\n\n// @ts-ignore because the module is not found during dts build\ndeclare module '@tiptap/extension-text-style' {\n interface TextStyleAttributes {\n color?: string | null\n }\n}\n\n/**\n * This extension allows you to color your text.\n * @see https://tiptap.dev/api/extensions/color\n */\nexport const Color = Extension.create<ColorOptions>({\n name: 'color',\n\n addOptions() {\n return {\n types: ['textStyle'],\n }\n },\n\n addGlobalAttributes() {\n return [\n {\n types: this.options.types,\n attributes: {\n color: {\n default: null,\n parseHTML: element => {\n // Prefer the raw inline `style` attribute so we preserve\n // the original format (e.g. `#rrggbb`) instead of the\n // computed `rgb(...)` value returned by `element.style.color`.\n // When nested spans are merged the style attribute may contain\n // multiple `color:` declarations (parent;child). We should pick\n // the last declaration so the child's color takes priority.\n const styleAttr = element.getAttribute('style')\n if (styleAttr) {\n const decls = styleAttr\n .split(';')\n .map(s => s.trim())\n .filter(Boolean)\n for (let i = decls.length - 1; i >= 0; i -= 1) {\n const parts = decls[i].split(':')\n if (parts.length >= 2) {\n const prop = parts[0].trim().toLowerCase()\n const val = parts.slice(1).join(':').trim()\n if (prop === 'color') {\n return val.replace(/['\"]+/g, '')\n }\n }\n }\n }\n\n return element.style.color?.replace(/['\"]+/g, '')\n },\n renderHTML: attributes => {\n if (!attributes.color) {\n return {}\n }\n\n return {\n style: `color: ${attributes.color}`,\n }\n },\n },\n },\n },\n ]\n },\n\n addCommands() {\n return {\n setColor:\n color =>\n ({ chain }) => {\n return chain().setMark('textStyle', { color }).run()\n },\n unsetColor:\n () =>\n ({ chain }) => {\n return chain().setMark('textStyle', { color: null }).removeEmptyTextStyle().run()\n },\n }\n },\n})\n","import '../text-style/index.js'\n\nimport { Extension } from '@tiptap/core'\n\nexport type FontFamilyOptions = {\n /**\n * A list of node names where the font family can be applied.\n * @default ['textStyle']\n * @example ['heading', 'paragraph']\n */\n types: string[]\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n fontFamily: {\n /**\n * Set the font family\n * @param fontFamily The font family\n * @example editor.commands.setFontFamily('Arial')\n */\n setFontFamily: (fontFamily: string) => ReturnType\n /**\n * Unset the font family\n * @example editor.commands.unsetFontFamily()\n */\n unsetFontFamily: () => ReturnType\n }\n }\n}\n\n// @ts-ignore because the module is not found during dts build\ndeclare module '@tiptap/extension-text-style' {\n interface TextStyleAttributes {\n fontFamily?: string | null\n }\n}\n\n/**\n * This extension allows you to set a font family for text.\n * @see https://www.tiptap.dev/api/extensions/font-family\n */\nexport const FontFamily = Extension.create<FontFamilyOptions>({\n name: 'fontFamily',\n\n addOptions() {\n return {\n types: ['textStyle'],\n }\n },\n\n addGlobalAttributes() {\n return [\n {\n types: this.options.types,\n attributes: {\n fontFamily: {\n default: null,\n parseHTML: element => element.style.fontFamily,\n renderHTML: attributes => {\n if (!attributes.fontFamily) {\n return {}\n }\n\n return {\n style: `font-family: ${attributes.fontFamily}`,\n }\n },\n },\n },\n },\n ]\n },\n\n addCommands() {\n return {\n setFontFamily:\n fontFamily =>\n ({ chain }) => {\n return chain().setMark('textStyle', { fontFamily }).run()\n },\n unsetFontFamily:\n () =>\n ({ chain }) => {\n return chain().setMark('textStyle', { fontFamily: null }).removeEmptyTextStyle().run()\n },\n }\n },\n})\n","import '../text-style/index.js'\n\nimport { Extension } from '@tiptap/core'\n\nexport type FontSizeOptions = {\n /**\n * A list of node names where the font size can be applied.\n * @default ['textStyle']\n * @example ['heading', 'paragraph']\n */\n types: string[]\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n fontSize: {\n /**\n * Set the font size\n * @param fontSize The font size\n * @example editor.commands.setFontSize('Arial')\n */\n setFontSize: (fontSize: string) => ReturnType\n /**\n * Unset the font size\n * @example editor.commands.unsetFontSize()\n */\n unsetFontSize: () => ReturnType\n }\n }\n}\n\n// @ts-ignore because the module is not found during dts build\ndeclare module '@tiptap/extension-text-style' {\n interface TextStyleAttributes {\n fontSize?: string | null\n }\n}\n\n/**\n * This extension allows you to set a font size for text.\n * @see https://www.tiptap.dev/api/extensions/font-size\n */\nexport const FontSize = Extension.create<FontSizeOptions>({\n name: 'fontSize',\n\n addOptions() {\n return {\n types: ['textStyle'],\n }\n },\n\n addGlobalAttributes() {\n return [\n {\n types: this.options.types,\n attributes: {\n fontSize: {\n default: null,\n parseHTML: element => element.style.fontSize,\n renderHTML: attributes => {\n if (!attributes.fontSize) {\n return {}\n }\n\n return {\n style: `font-size: ${attributes.fontSize}`,\n }\n },\n },\n },\n },\n ]\n },\n\n addCommands() {\n return {\n setFontSize:\n fontSize =>\n ({ chain }) => {\n return chain().setMark('textStyle', { fontSize }).run()\n },\n unsetFontSize:\n () =>\n ({ chain }) => {\n return chain().setMark('textStyle', { fontSize: null }).removeEmptyTextStyle().run()\n },\n }\n },\n})\n","import '../text-style/index.js'\n\nimport { Extension } from '@tiptap/core'\n\nexport type LineHeightOptions = {\n /**\n * A list of node names where the line height can be applied.\n * @default ['textStyle']\n * @example ['heading', 'paragraph']\n */\n types: string[]\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n lineHeight: {\n /**\n * Set the line height\n * @param lineHeight The line height\n * @example editor.commands.setLineHeight('1.5')\n */\n setLineHeight: (lineHeight: string) => ReturnType\n /**\n * Unset the line height\n * @example editor.commands.unsetLineHeight()\n */\n unsetLineHeight: () => ReturnType\n }\n }\n}\n\n// @ts-ignore because the module is not found during dts build\ndeclare module '@tiptap/extension-text-style' {\n interface TextStyleAttributes {\n lineHeight?: string | null\n }\n}\n\n/**\n * This extension allows you to set the line-height for text.\n * @see https://www.tiptap.dev/api/extensions/line-height\n */\nexport const LineHeight = Extension.create<LineHeightOptions>({\n name: 'lineHeight',\n\n addOptions() {\n return {\n types: ['textStyle'],\n }\n },\n\n addGlobalAttributes() {\n return [\n {\n types: this.options.types,\n attributes: {\n lineHeight: {\n default: null,\n parseHTML: element => element.style.lineHeight,\n renderHTML: attributes => {\n if (!attributes.lineHeight) {\n return {}\n }\n\n return {\n style: `line-height: ${attributes.lineHeight}`,\n }\n },\n },\n },\n },\n ]\n },\n\n addCommands() {\n return {\n setLineHeight:\n lineHeight =>\n ({ chain }) => {\n return chain().setMark('textStyle', { lineHeight }).run()\n },\n unsetLineHeight:\n () =>\n ({ chain }) => {\n return chain().setMark('textStyle', { lineHeight: null }).removeEmptyTextStyle().run()\n },\n }\n },\n})\n","import { Extension } from '@tiptap/core'\n\nimport type { BackgroundColorOptions } from '../background-color/index.js'\nimport { BackgroundColor } from '../background-color/index.js'\nimport type { ColorOptions } from '../color/index.js'\nimport { Color } from '../color/index.js'\nimport type { FontFamilyOptions } from '../font-family/index.js'\nimport { FontFamily } from '../font-family/index.js'\nimport type { FontSizeOptions } from '../font-size/index.js'\nimport { FontSize } from '../font-size/index.js'\nimport type { LineHeightOptions } from '../line-height/index.js'\nimport { LineHeight } from '../line-height/index.js'\nimport type { TextStyleOptions } from '../text-style/index.js'\nimport { TextStyle } from '../text-style/index.js'\n\nexport interface TextStyleKitOptions {\n /**\n * If set to false, the background color extension will not be registered\n * @example backgroundColor: false\n */\n backgroundColor: Partial<BackgroundColorOptions> | false\n /**\n * If set to false, the color extension will not be registered\n * @example color: false\n */\n color: Partial<ColorOptions> | false\n /**\n * If set to false, the font family extension will not be registered\n * @example fontFamily: false\n */\n fontFamily: Partial<FontFamilyOptions> | false\n /**\n * If set to false, the font size extension will not be registered\n * @example fontSize: false\n */\n fontSize: Partial<FontSizeOptions> | false\n /**\n * If set to false, the line height extension will not be registered\n * @example lineHeight: false\n */\n lineHeight: Partial<LineHeightOptions> | false\n /**\n * If set to false, the text style extension will not be registered (required for other text style extensions)\n * @example textStyle: false\n */\n textStyle: Partial<TextStyleOptions> | false\n}\n\n/**\n * The table kit is a collection of table editor extensions.\n *\n * It’s a good starting point for building your own table in Tiptap.\n */\nexport const TextStyleKit = Extension.create<TextStyleKitOptions>({\n name: 'textStyleKit',\n\n addExtensions() {\n const extensions = []\n\n if (this.options.backgroundColor !== false) {\n extensions.push(BackgroundColor.configure(this.options.backgroundColor))\n }\n\n if (this.options.color !== false) {\n extensions.push(Color.configure(this.options.color))\n }\n\n if (this.options.fontFamily !== false) {\n extensions.push(FontFamily.configure(this.options.fontFamily))\n }\n\n if (this.options.fontSize !== false) {\n extensions.push(FontSize.configure(this.options.fontSize))\n }\n\n if (this.options.lineHeight !== false) {\n extensions.push(LineHeight.configure(this.options.lineHeight))\n }\n\n if (this.options.textStyle !== false) {\n extensions.push(TextStyle.configure(this.options.textStyle))\n }\n\n return extensions\n },\n})\n","import { mergeAttributes, Node } from \"@tiptap/core\";\nimport { TextSelection } from \"@tiptap/pm/state\";\nimport { resolveImageSrc } from \"../../utils/image-src-resolver\";\nimport Image from \"@tiptap/extension-image\";\nimport { FigureOptions } from \"./figure\";\nimport { handleExitNode } from \"@/utils/handle-exit-node\";\n\n/**\n * Legacy callout extension for backward compatibility with old Tiptap content.\n * @deprecated Use {@link Callout} with `type=\"info\"` instead.\n * This extension is kept only for rendering old content that uses the `calloutTip` node type.\n */\nexport const BaseLegacyBookAlert = Node.create({\n name: \"calloutAlert\",\n\n group: \"block\",\n content: \"block+\",\n\n draggable: true,\n isolating: true,\n\n addAttributes() {\n return {\n type: {\n default: \"error\",\n },\n bgColor: {\n default: null,\n parseHTML: (element) => {\n if (typeof element === \"string\") return null;\n return element.getAttribute(\"data-bg-color\");\n },\n renderHTML: (attributes) => {\n if (!attributes.bgColor) return {};\n return {\n \"data-bg-color\": attributes.bgColor,\n };\n },\n },\n emoji: {\n default: null,\n parseHTML: (element) => {\n if (typeof element === \"string\") return null;\n return element.getAttribute(\"data-emoji\");\n },\n renderHTML: (attributes) => {\n if (!attributes.emoji) return {};\n return {\n \"data-emoji\": attributes.emoji,\n };\n },\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: 'div[data-type=\"callout-alert\"]',\n },\n ];\n },\n\n addKeyboardShortcuts() {\n return {\n Enter: () => handleExitNode(this.editor, this.name),\n };\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"div\", mergeAttributes(HTMLAttributes, { \"data-type\": \"callout-alert\" }), 0];\n },\n});\n\n/**\n * Legacy callout extension for backward compatibility with old Tiptap content.\n * @deprecated Use {@link Callout} with `type=\"info\"` instead.\n * This extension is kept only for rendering old content that uses the `calloutTip` node type.\n */\nexport const BaseLegacyBookTip = Node.create({\n name: \"calloutTip\",\n\n group: \"block\",\n content: \"block+\",\n\n draggable: true,\n isolating: true,\n\n addAttributes() {\n return {\n type: {\n default: \"info\",\n },\n bgColor: {\n default: null,\n parseHTML: (element) => {\n if (typeof element === \"string\") return null;\n return element.getAttribute(\"data-bg-color\");\n },\n renderHTML: (attributes) => {\n if (!attributes.bgColor) return {};\n return {\n \"data-bg-color\": attributes.bgColor,\n };\n },\n },\n emoji: {\n default: null,\n parseHTML: (element) => {\n if (typeof element === \"string\") return null;\n return element.getAttribute(\"data-emoji\");\n },\n renderHTML: (attributes) => {\n if (!attributes.emoji) return {};\n return {\n \"data-emoji\": attributes.emoji,\n };\n },\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: 'div[data-type=\"callout-tip\"]',\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"div\", mergeAttributes(HTMLAttributes, { \"data-type\": \"callout-tip\" }), 0];\n },\n\n addKeyboardShortcuts() {\n return {\n Enter: () => handleExitNode(this.editor, this.name),\n };\n },\n});\n\n/**\n * Legacy callout extension for backward compatibility with old Tiptap content.\n * @deprecated\n */\nexport const BaseLegacySEQuote = Node.create({\n name: \"customQuoteV2\",\n group: \"block\",\n content: \"customQuoteText customQuoteAuthor customQuoteSign\",\n selectable: false,\n draggable: true,\n isolating: true,\n\n addKeyboardShortcuts() {\n return {\n Enter: () => {\n const { view, schema } = this.editor;\n const { state } = view;\n const { selection } = state;\n\n const $pos = selection.$from;\n let depth = $pos.depth;\n let isInsideCustomQuoteV2 = false;\n\n while (depth > 0) {\n const parentNode = $pos.node(depth);\n if (parentNode.type.name === this.name) {\n isInsideCustomQuoteV2 = true;\n break;\n }\n depth--;\n }\n\n if (!isInsideCustomQuoteV2) {\n return false;\n }\n\n const { tr } = state;\n const posAfter = $pos.after(depth);\n\n const paragraphNode = schema.nodes.paragraph.createAndFill();\n if (!paragraphNode) return false;\n\n tr.insert(posAfter, paragraphNode);\n tr.setSelection(TextSelection.create(tr.doc, posAfter + 1));\n view.dispatch(tr);\n\n return true;\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: \"div[data-custom-quote-v2]\",\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"div\", mergeAttributes(HTMLAttributes, { \"data-custom-quote-v2\": \"\" }), 0];\n },\n});\n\n/**\n * Legacy PromptV2 extension for backward compatibility with old Tiptap copy editor content.\n * @deprecated Use {@link Prompt} instead.\n * This extension is kept only for rendering old content that uses the `promptV2` node type.\n */\nexport const BaseLegacyPromptSE = Node.create({\n name: \"promptV2\",\n group: \"block\",\n content: \"(promptHeader | promptV2Header) (promptContent | promptV2Content)\",\n selectable: false,\n draggable: true,\n\n addKeyboardShortcuts() {\n return {\n Enter: () => {\n const { view, schema } = this.editor;\n const { state } = view;\n const { selection } = state;\n\n const $pos = selection.$from;\n let depth = $pos.depth;\n let isInsidePromptV2 = false;\n\n while (depth > 0) {\n const parentNode = $pos.node(depth);\n if (parentNode.type.name === this.name) {\n isInsidePromptV2 = true;\n break;\n }\n depth--;\n }\n\n if (!isInsidePromptV2) {\n return false;\n }\n\n const { tr } = state;\n const posAfter = $pos.after(depth);\n\n const paragraphNode = schema.nodes.paragraph.createAndFill();\n if (!paragraphNode) return false;\n\n tr.insert(posAfter, paragraphNode);\n tr.setSelection(TextSelection.create(tr.doc, posAfter + 1));\n view.dispatch(tr);\n\n return true;\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: \"div[data-prompt-v2]\",\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"div\", mergeAttributes(HTMLAttributes, { \"data-prompt\": \"\" }), 0];\n },\n});\n\n/**\n * Legacy PromptV2Header extension for backward compatibility with old Tiptap copy editor content.\n * @deprecated Use {@link PromptHeader} instead.\n * This extension is kept only for rendering old content that uses the `promptV2Header` node type.\n */\nexport const BaseLegacyPromptSEHeader = Node.create({\n name: \"promptV2Header\",\n group: \"block\",\n content: \"inline*\",\n selectable: true,\n draggable: false,\n\n parseHTML() {\n return [\n {\n tag: \"div[data-prompt-v2-header]\",\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"div\", mergeAttributes(HTMLAttributes, { \"data-prompt-header\": \"\" }), 0];\n },\n\n // addNodeView() {\n // return ReactNodeViewRenderer(PromptHeaderView);\n // },\n});\n\n/**\n * Legacy PromptV2Content extension for backward compatibility with old Tiptap copy editor content.\n * @deprecated Use {@link PromptContent} instead.\n * This extension is kept only for rendering old content that uses the `promptV2Content` node type.\n */\nexport const BaseLegacyPromptSEContent = Node.create({\n name: \"promptV2Content\",\n group: \"block\",\n content: \"text*\",\n draggable: false,\n selectable: true,\n\n parseHTML() {\n return [\n {\n tag: \"div[data-prompt-v2-content]\",\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"div\", mergeAttributes(HTMLAttributes, { \"data-prompt-content\": \"\" }), 0];\n },\n});\n\n/**\n * Legacy Custom Quote extension for backward compatibility with old Tiptap copy editor content.\n * @deprecated\n */\nexport const BaseLegacyCustomBlockquote = Node.create({\n name: \"customBlockquote\",\n\n group: \"block\",\n content: \"block+\",\n\n draggable: true,\n\n parseHTML() {\n return [\n {\n tag: 'div[data-type=\"custom-blockquote\"]',\n },\n ];\n },\n\n renderHTML() {\n return [\"blockquote\", 0];\n },\n});\n\n/**\n * Legacy YouTube extension for backward compatibility with old Tiptap content.\n * @deprecated Use {@link Video} extension instead.\n * This extension is kept only for rendering old content that uses the `youtube` node type.\n * Renders using the same VideoView component.\n */\nexport const BaseLegacyYouTube = Node.create({\n name: \"youtube\",\n\n group: \"block\",\n selectable: true,\n draggable: true,\n isolating: true,\n\n addAttributes() {\n return {\n src: {\n default: null,\n },\n width: {\n default: 640,\n },\n height: {\n default: 480,\n },\n start: {\n default: 0,\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: 'iframe[src*=\"youtube.com\"]',\n },\n {\n tag: 'iframe[src*=\"youtu.be\"]',\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"video-embed\", { src: HTMLAttributes.src }];\n },\n});\n\n/**\n * Legacy InlineLatex extension for backward compatibility with old Tiptap copy editor content.\n * @deprecated Use the Mathematics extension instead.\n * This extension renders old `inlineLatex` nodes as inline code for basic compatibility.\n */\nexport const LegacyInlineLatexSE = Node.create({\n name: \"inlineLatex\",\n group: \"inline\",\n inline: true,\n content: \"text*\",\n atom: true,\n\n addAttributes() {\n return {\n latex: {\n default: \"\",\n parseHTML: (element) => element.getAttribute(\"data-latex\") || element.textContent || \"\",\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: \"span.inline-latex\",\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"code\", mergeAttributes(HTMLAttributes, { class: \"inline-latex\" }), 0];\n },\n});\n\n/**\n * Legacy figure extension for backward compatibility with old Tiptap copy editor content.\n * @deprecated Use {@link Figure} instead.\n * This extension is kept only for rendering old content that uses the `figure` node type.\n */\nexport const BaseLegacyFigure = Image.extend<FigureOptions>({\n name: \"figure\",\n group: \"block\",\n content: \"inline*\",\n draggable: true,\n isolating: true,\n selectable: false,\n\n addOptions() {\n return {\n HTMLAttributes: {},\n getImageById: undefined,\n };\n },\n\n addAttributes() {\n return {\n ...this.parent?.(),\n fileId: {\n default: null,\n parseHTML: (element) => {\n const img = element.querySelector(\"img\");\n const fileIdFromImg = img?.getAttribute(\"fileId\") || img?.getAttribute(\"data-file-id\");\n const fileIdFromFigure =\n element.getAttribute(\"fileId\") || element.getAttribute(\"data-file-id\");\n return fileIdFromImg ?? fileIdFromFigure;\n },\n renderHTML: (attributes) => {\n if (!attributes.fileId) return {};\n return { \"data-file-id\": attributes.fileId };\n },\n },\n src: {\n default: null,\n parseHTML: (element) => {\n const img = element.querySelector(\"img\") || element;\n return img.getAttribute(\"src\");\n },\n },\n alt: {\n default: null,\n parseHTML: (element) => {\n const img = element.querySelector(\"img\") || element;\n return img.getAttribute(\"alt\");\n },\n },\n title: {\n default: null,\n parseHTML: (element) => {\n const img = element.querySelector(\"img\") || element;\n return img.getAttribute(\"title\");\n },\n },\n caption: {\n default: null,\n parseHTML: (element) => {\n const caption = element.querySelector(\"figcaption\");\n return caption ? caption.innerText : null;\n },\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: \"figure\",\n getAttrs: (element) => {\n if (typeof element === \"string\") return false;\n const img = element.querySelector(\"img\");\n return img ? {} : false;\n },\n },\n {\n tag: \"img[src]\",\n },\n ];\n },\n\n renderHTML({ node }) {\n const resolvedSrc = resolveImageSrc(\n {\n fileId: node.attrs.fileId,\n src: node.attrs.src,\n },\n { getImageById: this.options.getImageById }\n );\n\n const figureAttrs = mergeAttributes(this.options.HTMLAttributes);\n\n const imgAttrs: Record<string, unknown> = {\n src: resolvedSrc,\n };\n\n if (node.attrs.fileId) imgAttrs[\"data-file-id\"] = node.attrs.fileId;\n if (node.attrs.alt) imgAttrs.alt = node.attrs.alt;\n if (node.attrs.title) imgAttrs.title = node.attrs.title;\n if (node.attrs.width) imgAttrs.width = node.attrs.width;\n if (node.attrs.height) imgAttrs.height = node.attrs.height;\n\n const hasCaption = node.attrs.caption && node.attrs.caption.trim().length > 0;\n const figcaptionContent = hasCaption ? [\"figcaption\", {}, node.attrs.caption] : null;\n\n return [\n \"figure\",\n figureAttrs,\n [\"img\", imgAttrs],\n ...(figcaptionContent ? [figcaptionContent] : []),\n ];\n },\n});\n","/**\n * Configuration for @tiptap/static-renderer for server-side rendering\n * Provides React component mappings for custom extensions\n *\n * Node and mark mappings control how Tiptap JSON is rendered to React elements\n * during server-side static rendering. These map directly to the extensions\n * defined in extensions/ folder.\n *\n * Note: Node views (addNodeView) are NOT supported by static renderer.\n * We provide custom React component mappings that replicate the NodeView output\n * without using Tiptap's NodeViewWrapper/NodeViewContent APIs.\n */\n\nimport katex from \"katex\";\nimport hljs from \"highlight.js/lib/common\";\nimport type { CalloutType } from \"@/extensions/base/callout\";\nimport {\n Callout,\n CopyableText,\n CodeBlock,\n CustomQuote,\n CustomQuoteText,\n CustomQuoteAuthor,\n CustomQuoteSign,\n PromptHeader,\n PromptContent,\n Video,\n Figure,\n} from \"@/extensions/views/components\";\n\nexport const getNodeMapping = (getImageById?: (fileId: string) => string | null) => ({\n callout({ node, children }: any) {\n return <Callout {...node.attrs}>{children}</Callout>;\n },\n codeBlock({ node, children }: any) {\n const language = (node.attrs.language as string) || \"\";\n\n let codeText = \"\";\n if (Array.isArray(children)) {\n codeText = children\n .map((child: any) => {\n if (child?.props?.node?.text) {\n return child.props.node.text;\n }\n return \"\";\n })\n .join(\"\");\n }\n\n let highlightedHtml = \"\";\n try {\n if (!language) {\n highlightedHtml = hljs.highlightAuto(codeText).value;\n } else {\n highlightedHtml = hljs.highlight(codeText, { language }).value;\n }\n } catch (error) {\n console.warn(`Failed to highlight code for language \"${language}\":`, error);\n highlightedHtml = codeText\n .replace(/&/g, \"&\")\n .replace(/</g, \"<\")\n .replace(/>/g, \">\")\n .replace(/\"/g, \""\")\n .replace(/'/g, \"'\");\n }\n\n return (\n <CodeBlock\n language={language}\n isEditable={false}\n >\n <code dangerouslySetInnerHTML={{ __html: highlightedHtml }} />\n </CodeBlock>\n );\n },\n customQuote({ children }: any) {\n return <CustomQuote>{children}</CustomQuote>;\n },\n customQuoteText({ children }: any) {\n return <CustomQuoteText>{children}</CustomQuoteText>;\n },\n customQuoteAuthor({ children }: any) {\n return <CustomQuoteAuthor>{children}</CustomQuoteAuthor>;\n },\n customQuoteSign({ children }: any) {\n return <CustomQuoteSign>{children}</CustomQuoteSign>;\n },\n promptHeader({ children }: any) {\n return <PromptHeader>{children}</PromptHeader>;\n },\n promptContent({ children }: any) {\n return <PromptContent>{children}</PromptContent>;\n },\n video({ node }: any) {\n return <Video src={node.attrs.src} />;\n },\n figure({ node }: any) {\n return (\n <Figure\n {...node.attrs}\n getImageById={getImageById}\n />\n );\n },\n image({ node }: any) {\n return (\n <Figure\n {...node.attrs}\n getImageById={getImageById}\n />\n );\n },\n inlineMath({ node }: any) {\n const latex = node.attrs.latex || \"\";\n let html = \"\";\n\n try {\n html = katex.renderToString(latex, {\n throwOnError: false,\n output: \"html\",\n });\n } catch (error) {\n console.warn(\"KaTeX rendering error for inline math:\", error);\n }\n\n return (\n <span\n className=\"react-renderer node-inlineMath\"\n dangerouslySetInnerHTML={{ __html: html || latex }}\n />\n );\n },\n\n // Block math (KaTeX) - from @tiptap/extension-mathematics\n blockMath({ node }: any) {\n const latex = node.attrs.latex || \"\";\n let html = \"\";\n\n try {\n html = katex.renderToString(latex, {\n throwOnError: false,\n output: \"html\",\n displayMode: true,\n });\n } catch (error) {\n console.warn(\"KaTeX rendering error for block math:\", error);\n }\n\n return (\n <div className=\"react-renderer node-blockMath\">\n <div\n className=\"tiptap-mathematics-render\"\n data-type=\"math\"\n data-mode=\"block\"\n dangerouslySetInnerHTML={{ __html: html || latex }}\n />\n </div>\n );\n },\n\n inlineLatex({ node }: any) {\n const latex = node.attrs.latex || \"\";\n let html = \"\";\n\n try {\n html = katex.renderToString(latex, {\n throwOnError: false,\n output: \"html\",\n });\n } catch (error) {\n console.warn(\"KaTeX rendering error for inline latex:\", error);\n }\n\n return (\n <span\n className=\"react-renderer node-inlineLatex inline-latex\"\n dangerouslySetInnerHTML={{ __html: html || latex }}\n />\n );\n },\n /*\n COMPATABILITY\n */\n calloutAlert({ node, children }: any) {\n const type = (node.attrs.type as CalloutType) || \"info\";\n return <Callout type={type}>{children}</Callout>;\n },\n\n calloutTip({ node, children }: any) {\n const type = (node.attrs.type as CalloutType) || \"info\";\n return <Callout type={type}>{children}</Callout>;\n },\n customQuoteV2({ children }: any) {\n return <CustomQuote>{children}</CustomQuote>;\n },\n promptV2Header({ children }: any) {\n return <PromptHeader>{children}</PromptHeader>;\n },\n promptV2Content({ children }: any) {\n return <PromptContent>{children}</PromptContent>;\n },\n});\n\nexport const nodeMapping = getNodeMapping();\n\n/**\n * Mark mappings for static renderer\n *\n * Standard marks (bold, italic, code, link, etc.) are handled automatically.\n * Custom marks can be mapped here if needed for special rendering.\n */\nexport const markMapping = {\n \"copyable-text\"({ children }: any) {\n return <CopyableText>{children}</CopyableText>;\n },\n};\n","import type { SVGProps } from 'react';\nconst SvgTiptapCalloutError = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 20 20\" {...props}>\n <g clipPath=\"url(#tiptap-callout-error_svg__a)\">\n <path\n fill=\"#E03757\"\n d=\"M10 0C4.477 0 0 4.477 0 10s4.477 10 10 10 10-4.477 10-10S15.523 0 10 0\"\n />\n <path\n fill=\"#F04760\"\n d=\"M4.692 15.603c6.011 0 10.885-4.874 10.885-10.885a10.9 10.9 0 0 0-.525-3.35A9.95 9.95 0 0 0 10 0C4.477 0 0 4.477 0 10a9.95 9.95 0 0 0 1.394 5.094c1.066.338 2.179.51 3.298.509\"\n />\n <path\n fill=\"#fff\"\n d=\"M9.996 16.783a1.626 1.626 0 1 1 0-3.251 1.626 1.626 0 0 1 0 3.251m1.575-5.598c-.027.252-.14.486-.321.663a1.13 1.13 0 0 1-.674.315h-.008q-.239.027-.48.027a6 6 0 0 1-.575-.027h-.007a1.13 1.13 0 0 1-.674-.315 1.1 1.1 0 0 1-.321-.663c-.04-.366-.059-2.914-.059-3.481 0-.568.02-3.122.059-3.488.027-.252.14-.487.32-.665.183-.177.42-.289.675-.315h.007q.287-.029.576-.017.24-.012.479.017h.008c.254.027.492.14.674.319.18.177.294.412.321.664.04.366.059 2.92.059 3.488 0 .567-.02 3.113-.059 3.478\"\n />\n </g>\n <defs>\n <clipPath id=\"tiptap-callout-error_svg__a\">\n <path fill=\"#fff\" d=\"M0 0h20v20H0z\" />\n </clipPath>\n </defs>\n </svg>\n);\nexport default SvgTiptapCalloutError;\n","import type { SVGProps } from 'react';\nconst SvgTiptapCalloutInfo = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 20 20\" {...props}>\n <path\n fill=\"#FE9738\"\n d=\"m11.654 11.196 3.51-2.75.549-4.789-4.06-2.234-1.647 2.264a2.79 2.79 0 0 1 1.531 2.28 2.8 2.8 0 0 1-1.85 2.84 3.96 3.96 0 0 0-2.624 3.728v.72c0 .937.76 1.697 1.696 1.697h2.482zm-4.895-3.32H4.277c-.937 0-1.697-.76-1.697-1.697q0-.432.06-.86C3.084 2.135 5.954-.196 9.172.015h2.482L9.888 1.797m1.353 14.796H8.759c-.937 0-1.696.76-1.696 1.696v.014c0 .938.76 1.697 1.696 1.697h2.18\"\n />\n <path\n fill=\"#FFD15B\"\n d=\"M11.241 14.951c-.937 0-1.697-.76-1.697-1.697v-.72a3.955 3.955 0 0 1 2.625-3.727 2.8 2.8 0 0 0 1.85-2.84A2.79 2.79 0 0 0 11.432 3.4a2.8 2.8 0 0 0-2.976 2.78 1.697 1.697 0 0 1-3.394 0q0-.434.06-.86C5.566 2.133 8.435-.198 11.654.014c3.055.2 5.527 2.653 5.75 5.706a6.2 6.2 0 0 1-4.104 6.286.56.56 0 0 0-.362.529v.72c0 .936-.76 1.696-1.697 1.696m0 5.05c-.937 0-1.697-.76-1.697-1.698v-.014a1.697 1.697 0 0 1 3.394 0v.014c0 .937-.76 1.697-1.697 1.697\"\n />\n <path\n fill=\"#FFC344\"\n d=\"M6.622 5.32q-.06.427-.06.86c0 .667.386 1.245.947 1.521A1.697 1.697 0 0 1 5.062 6.18q0-.432.06-.86C5.566 2.134 8.436-.197 11.654.014q.173.012.343.033C9.273.382 7.012 2.521 6.622 5.32m7.047 3.486a3.96 3.96 0 0 0-2.625 3.729v.72c0 .667.386 1.245.947 1.521a1.696 1.696 0 0 1-2.447-1.522v-.72a3.955 3.955 0 0 1 2.625-3.728 2.8 2.8 0 0 0 1.85-2.839 2.79 2.79 0 0 0-2.022-2.47 2.786 2.786 0 0 1 3.522 2.47 2.8 2.8 0 0 1-1.85 2.84m-1.678 11.02a1.696 1.696 0 0 1-2.447-1.522v-.015a1.697 1.697 0 0 1 2.448-1.523 1.7 1.7 0 0 0-.948 1.523v.014c0 .668.386 1.246.947 1.522\"\n />\n </svg>\n);\nexport default SvgTiptapCalloutInfo;\n","import type { SVGProps } from 'react';\nconst SvgTiptapCalloutSuccess = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 20 20\" {...props}>\n <g clipPath=\"url(#tiptap-callout-success_svg__a)\">\n <path\n fill=\"#35495E\"\n d=\"M1.972 18.004.06 7.138a2.4 2.4 0 0 1-.035-.317 2.47 2.47 0 0 1 2.073-2.493l3.693-.652-.1 14.328z\"\n />\n <path\n fill=\"#2C3E50\"\n d=\"M16.186 17.528a.69.69 0 0 1-.548.517l-10.87 1.917a2.42 2.42 0 0 1-2.83-2.276 2.46 2.46 0 0 1 1.934-2.462l3.045.855h-.003l-2.742.487a1.037 1.037 0 0 0-.786 1.396 1.066 1.066 0 0 0 1.186.635l8.307-1.466z\"\n />\n <path\n fill=\"#F9EAB0\"\n d=\"m6.914 16.08-2.742.486a1.035 1.035 0 0 0-.786 1.396 1.066 1.066 0 0 0 1.186.635l8.307-1.466z\"\n />\n <path\n fill=\"#E64C3C\"\n d=\"M4.423 11.438 6.339.571a.695.695 0 0 1 .799-.559l10.785 1.902a2.47 2.47 0 0 1 2.074 2.495 3 3 0 0 1-.034.316l-1.917 10.867z\"\n />\n <path\n fill=\"#3F5C6C\"\n d=\"M15.668 3.612a.4.4 0 0 1-.06-.005l-7.81-1.378a.345.345 0 0 1 .12-.677l7.81 1.375a.345.345 0 0 1-.06.685M14.01 5.069a.3.3 0 0 1-.06-.005l-5.094-.897a.345.345 0 0 1 .12-.68l5.094.897a.345.345 0 0 1-.06.685\"\n />\n <path\n fill=\"#ECF0F1\"\n d=\"m14.727 6.608-7.131-1.26a.345.345 0 0 0-.4.28l-.6 3.395a.345.345 0 0 0 .28.4l7.13 1.26a.345.345 0 0 0 .4-.28l.6-3.396a.345.345 0 0 0-.28-.4\"\n />\n <path\n fill=\"#C03A2B\"\n d=\"M19.997 4.407a2 2 0 0 1-.035.317L18.045 15.59l-2.659-.81 1.542-8.738.365-2.063.373-2.11.258.045a2.47 2.47 0 0 1 2.073 2.493\"\n />\n <path\n fill=\"#802F34\"\n d=\"M16.007 12.78 5.22 10.88a.69.69 0 0 0-.238 1.358l10.865 1.914a1.038 1.038 0 0 1 .783 1.4 1.06 1.06 0 0 1-1.183.63L4.624 14.277a.69.69 0 0 0-.241 1.359l10.869 1.913a2.416 2.416 0 0 0 2.83-2.272 2.474 2.474 0 0 0-2.075-2.496\"\n />\n <path\n fill=\"#F9EAB0\"\n d=\"M16.63 15.552a1.06 1.06 0 0 1-1.182.63L4.624 14.277l.359-2.038 10.865 1.914a1.04 1.04 0 0 1 .783 1.4\"\n />\n </g>\n <defs>\n <clipPath id=\"tiptap-callout-success_svg__a\">\n <path fill=\"#fff\" d=\"M0 0h20v20H0z\" />\n </clipPath>\n </defs>\n </svg>\n);\nexport default SvgTiptapCalloutSuccess;\n","import type { SVGProps } from 'react';\nconst SvgTiptapCalloutWarning = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 20 20\" {...props}>\n <path\n fill=\"#FFF59D\"\n fillOpacity={0.6}\n d=\"M1.667 9.167a8.333 8.333 0 1 0 16.666 0 8.333 8.333 0 0 0-16.666 0\"\n />\n <path\n fill=\"#FBC02D\"\n d=\"M15.417 9.167c0-3.209-2.75-5.75-6.042-5.375-2.5.291-4.5 2.291-4.75 4.791a5.27 5.27 0 0 0 1.917 4.709c.583.5.958 1.208.958 2v.125h5v-.042c0-.75.333-1.5.917-2 1.208-1 2-2.5 2-4.208\"\n />\n <path\n fill=\"#FFF59D\"\n d=\"m12.75 8.417-1.25-.834a.45.45 0 0 0-.458 0L10 8.25l-1-.667a.45.45 0 0 0-.458 0l-1.25.834c-.084.083-.167.166-.167.291s0 .25.083.334L8.792 11v4.417h.833v-4.584c0-.083-.042-.166-.083-.25L8.167 8.875l.625-.417 1 .667a.45.45 0 0 0 .458 0l1-.667.625.417-1.375 1.708a.6.6 0 0 0-.083.25v4.584h.833V11l1.583-1.958a.32.32 0 0 0 .084-.334c-.042-.125-.084-.25-.167-.291\"\n />\n <path fill=\"#5C6BC0\" d=\"M8.75 18.334a1.25 1.25 0 1 0 2.5 0 1.25 1.25 0 0 0-2.5 0\" />\n <path\n fill=\"#9FA8DA\"\n d=\"M10.833 18.75H9.167C8.25 18.75 7.5 18 7.5 17.083V15h5v2.083c0 .917-.75 1.667-1.667 1.667\"\n />\n <path\n fill=\"#5C6BC0\"\n d=\"m12.5 17.083-4.833.667c.125.291.375.583.666.75l3.917-.542q.25-.375.25-.875m-5-.958v.833l5-.708v-.834z\"\n />\n </svg>\n);\nexport default SvgTiptapCalloutWarning;\n","import TiptapCalloutInfo from \"../icons/color/TiptapCalloutInfo\";\nimport TiptapCalloutSuccess from \"../icons/color/TiptapCalloutSuccess\";\nimport TiptapCalloutWarning from \"../icons/color/TiptapCalloutWarning\";\nimport TiptapCalloutError from \"../icons/color/TiptapCalloutError\";\n\nexport const calloutIconComponents = {\n \"callout-info\": TiptapCalloutInfo,\n \"callout-success\": TiptapCalloutSuccess,\n \"callout-warning\": TiptapCalloutWarning,\n \"callout-error\": TiptapCalloutError,\n};\n\n// Favorite emojis list - these are regular emojis, not custom\n// Just the Unicode strings that should be suggested/shown first\nexport const favoriteEmojis = [\n \"👋\", // wave\n \"💡\", // bulb\n \"🔥\", // fire\n \"🔒\", // lock\n \"🏆\", // trophy\n \"🔑\", // key\n \"👮\", // police\n \"⭐\", // star\n \"⛔\", // no entry sign\n \"🧠\", // brain\n \"⚠️\", // warning\n \"📕\", // book\n \"💎\", // gem\n \"🚫\", // no entry\n \"❗\", // exclamation\n \"⚡\", // lightning\n \"📝\", // memo\n \"❤️\", // heart\n];\n\n// Mapping from favorite custom emoji IDs to actual emoji characters\nexport const favoriteEmojiIdMap: Record<string, string> = {\n \"fav-wave\": \"👋\",\n \"fav-bulb\": \"💡\",\n \"fav-fire\": \"🔥\",\n \"fav-lock\": \"🔒\",\n \"fav-trophy\": \"🏆\",\n \"fav-key\": \"🔑\",\n \"fav-police\": \"👮\",\n \"fav-star\": \"⭐\",\n \"fav-no-entry-sign\": \"⛔\",\n \"fav-brain\": \"🧠\",\n \"fav-warning\": \"⚠️\",\n \"fav-book\": \"📕\",\n \"fav-gem\": \"💎\",\n \"fav-no-entry\": \"🚫\",\n \"fav-exclamation\": \"❗\",\n \"fav-lightning\": \"⚡\",\n \"fav-memo\": \"📝\",\n \"fav-heart\": \"❤️\",\n};\n\n// Favorites - custom emojis category with specific emojis\n// These will appear in a \"Custom\" category group in the emoji picker\nexport const favoriteCustomEmojis = [\n {\n id: \"fav-wave\",\n names: [\"wave\", \"hand\", \"hello\", \"hi\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f44b.png\",\n },\n {\n id: \"fav-bulb\",\n names: [\"bulb\", \"light\", \"idea\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f4a1.png\",\n },\n {\n id: \"fav-fire\",\n names: [\"fire\", \"flame\", \"hot\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f525.png\",\n },\n {\n id: \"fav-lock\",\n names: [\"lock\", \"locked\", \"secure\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f512.png\",\n },\n {\n id: \"fav-trophy\",\n names: [\"trophy\", \"award\", \"win\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f3c6.png\",\n },\n {\n id: \"fav-key\",\n names: [\"key\", \"password\", \"unlock\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f511.png\",\n },\n {\n id: \"fav-police\",\n names: [\"police\", \"officer\", \"cop\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f46e.png\",\n },\n {\n id: \"fav-star\",\n names: [\"star\", \"favorite\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/2b50.png\",\n },\n {\n id: \"fav-no-entry-sign\",\n names: [\"no entry sign\", \"prohibited\", \"banned\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/26d4.png\",\n },\n {\n id: \"fav-brain\",\n names: [\"brain\", \"think\", \"smart\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f9e0.png\",\n },\n {\n id: \"fav-warning\",\n names: [\"warning\", \"alert\", \"caution\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/26a0-fe0f.png\",\n },\n {\n id: \"fav-book\",\n names: [\"book\", \"read\", \"closed book\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f4d5.png\",\n },\n {\n id: \"fav-gem\",\n names: [\"gem\", \"diamond\", \"jewel\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f48e.png\",\n },\n {\n id: \"fav-no-entry\",\n names: [\"no entry\", \"stop\", \"do not enter\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f6ab.png\",\n },\n {\n id: \"fav-exclamation\",\n names: [\"exclamation\", \"important\", \"alert\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/2757.png\",\n },\n {\n id: \"fav-lightning\",\n names: [\"lightning\", \"bolt\", \"zap\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/26a1.png\",\n },\n {\n id: \"fav-memo\",\n names: [\"memo\", \"note\", \"pencil\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f4dd.png\",\n },\n {\n id: \"fav-heart\",\n names: [\"heart\", \"love\", \"red heart\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/2764-fe0f.png\",\n },\n];\n\nexport const calloutCustomEmojis = [\n {\n id: \"callout-info\",\n names: [\"info\", \"information\", \"callout info\"],\n imgUrl: `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath fill='%23FE9738' d='m11.654 11.196 3.51-2.75.549-4.789-4.06-2.234-1.647 2.264a2.79 2.79 0 0 1 1.531 2.28 2.8 2.8 0 0 1-1.85 2.84 3.96 3.96 0 0 0-2.624 3.728v.72c0 .937.76 1.697 1.696 1.697h2.482zm-4.895-3.32H4.277c-.937 0-1.697-.76-1.697-1.697q0-.432.06-.86C3.084 2.135 5.954-.196 9.172.015h2.482L9.888 1.797m1.353 14.796H8.759c-.937 0-1.696.76-1.696 1.696v.014c0 .938.76 1.697 1.696 1.697h2.18'/%3E%3Cpath fill='%23FFD15B' d='M11.241 14.951c-.937 0-1.697-.76-1.697-1.697v-.72a3.955 3.955 0 0 1 2.625-3.727 2.8 2.8 0 0 0 1.85-2.84A2.79 2.79 0 0 0 11.432 3.4a2.8 2.8 0 0 0-2.976 2.78 1.697 1.697 0 0 1-3.394 0q0-.434.06-.86C5.566 2.133 8.435-.198 11.654.014c3.055.2 5.527 2.653 5.75 5.706a6.2 6.2 0 0 1-4.104 6.286.56.56 0 0 0-.362.529v.72c0 .936-.76 1.696-1.697 1.696m0 5.05c-.937 0-1.697-.76-1.697-1.698v-.014a1.697 1.697 0 0 1 3.394 0v.014c0 .937-.76 1.697-1.697 1.697'/%3E%3Cpath fill='%23FFC344' d='M6.622 5.32q-.06.427-.06.86c0 .667.386 1.245.947 1.521A1.697 1.697 0 0 1 5.062 6.18q0-.432.06-.86C5.566 2.134 8.436-.197 11.654.014q.173.012.343.033C9.273.382 7.012 2.521 6.622 5.32m7.047 3.486a3.96 3.96 0 0 0-2.625 3.729v.72c0 .667.386 1.245.947 1.521a1.696 1.696 0 0 1-2.447-1.522v-.72a3.955 3.955 0 0 1 2.625-3.728 2.8 2.8 0 0 0 1.85-2.839 2.79 2.79 0 0 0-2.022-2.47 2.786 2.786 0 0 1 3.522 2.47 2.8 2.8 0 0 1-1.85 2.84m-1.678 11.02a1.696 1.696 0 0 1-2.447-1.522v-.015a1.697 1.697 0 0 1 2.448-1.523 1.7 1.7 0 0 0-.948 1.523v.014c0 .668.386 1.246.947 1.522'/%3E%3C/svg%3E`,\n },\n {\n id: \"callout-success\",\n names: [\"success\", \"check\", \"done\", \"callout success\"],\n imgUrl: `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cg clip-path='url(%23a)'%3E%3Cpath fill='%2335495E' d='M1.972 18.004.06 7.138a2.4 2.4 0 0 1-.035-.317 2.47 2.47 0 0 1 2.073-2.493l3.693-.652-.1 14.328z'/%3E%3Cpath fill='%232C3E50' d='M16.186 17.528a.69.69 0 0 1-.548.517l-10.87 1.917a2.42 2.42 0 0 1-2.83-2.276 2.46 2.46 0 0 1 1.934-2.462l3.045.855h-.003l-2.742.487a1.037 1.037 0 0 0-.786 1.396 1.066 1.066 0 0 0 1.186.635l8.307-1.466z'/%3E%3Cpath fill='%23F9EAB0' d='m6.914 16.08-2.742.486a1.035 1.035 0 0 0-.786 1.396 1.066 1.066 0 0 0 1.186.635l8.307-1.466z'/%3E%3Cpath fill='%23E64C3C' d='M4.423 11.438 6.339.571a.695.695 0 0 1 .799-.559l10.785 1.902a2.47 2.47 0 0 1 2.074 2.495 3 3 0 0 1-.034.316l-1.917 10.867z'/%3E%3Cpath fill='%233F5C6C' d='M15.668 3.612a.4.4 0 0 1-.06-.005l-7.81-1.378a.345.345 0 0 1 .12-.677l7.81 1.375a.345.345 0 0 1-.06.685M14.01 5.069a.3.3 0 0 1-.06-.005l-5.094-.897a.345.345 0 0 1 .12-.68l5.094.897a.345.345 0 0 1-.06.685'/%3E%3Cpath fill='%23ECF0F1' d='m14.727 6.608-7.131-1.26a.345.345 0 0 0-.4.28l-.6 3.395a.345.345 0 0 0 .28.4l7.13 1.26a.345.345 0 0 0 .4-.28l.6-3.396a.345.345 0 0 0-.28-.4'/%3E%3Cpath fill='%23C03A2B' d='M19.997 4.407a2 2 0 0 1-.035.317L18.045 15.59l-2.659-.81 1.542-8.738.365-2.063.373-2.11.258.045a2.47 2.47 0 0 1 2.073 2.493'/%3E%3Cpath fill='%23802F34' d='M16.007 12.78 5.22 10.88a.69.69 0 0 0-.238 1.358l10.865 1.914a1.038 1.038 0 0 1 .783 1.4 1.06 1.06 0 0 1-1.183.63L4.624 14.277a.69.69 0 0 0-.241 1.359l10.869 1.913a2.416 2.416 0 0 0 2.83-2.272 2.474 2.474 0 0 0-2.075-2.496'/%3E%3Cpath fill='%23F9EAB0' d='M16.63 15.552a1.06 1.06 0 0 1-1.182.63L4.624 14.277l.359-2.038 10.865 1.914a1.04 1.04 0 0 1 .783 1.4'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='a'%3E%3Cpath fill='%23fff' d='M0 0h20v20H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E`,\n },\n {\n id: \"callout-warning\",\n names: [\"warning\", \"alert\", \"caution\", \"callout warning\"],\n imgUrl: `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath fill='%23FFF59D' fill-opacity='0.6' d='M1.667 9.167a8.333 8.333 0 1 0 16.666 0 8.333 8.333 0 0 0-16.666 0'/%3E%3Cpath fill='%23FBC02D' d='M15.417 9.167c0-3.209-2.75-5.75-6.042-5.375-2.5.291-4.5 2.291-4.75 4.791a5.27 5.27 0 0 0 1.917 4.709c.583.5.958 1.208.958 2v.125h5v-.042c0-.75.333-1.5.917-2 1.208-1 2-2.5 2-4.208'/%3E%3Cpath fill='%23FFF59D' d='m12.75 8.417-1.25-.834a.45.45 0 0 0-.458 0L10 8.25l-1-.667a.45.45 0 0 0-.458 0l-1.25.834c-.084.083-.167.166-.167.291s0 .25.083.334L8.792 11v4.417h.833v-4.584c0-.083-.042-.166-.083-.25L8.167 8.875l.625-.417 1 .667a.45.45 0 0 0 .458 0l1-.667.625.417-1.375 1.708a.6.6 0 0 0-.083.25v4.584h.833V11l1.583-1.958a.32.32 0 0 0 .084-.334c-.042-.125-.084-.25-.167-.291'/%3E%3Cpath fill='%235C6BC0' d='M8.75 18.334a1.25 1.25 0 1 0 2.5 0 1.25 1.25 0 0 0-2.5 0'/%3E%3Cpath fill='%239FA8DA' d='M10.833 18.75H9.167C8.25 18.75 7.5 18 7.5 17.083V15h5v2.083c0 .917-.75 1.667-1.667 1.667'/%3E%3Cpath fill='%235C6BC0' d='m12.5 17.083-4.833.667c.125.291.375.583.666.75l3.917-.542q.25-.375.25-.875m-5-.958v.833l5-.708v-.834z'/%3E%3C/svg%3E`,\n },\n {\n id: \"callout-error\",\n names: [\"error\", \"danger\", \"fail\", \"callout error\"],\n imgUrl: `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cg clip-path='url(%23a)'%3E%3Cpath fill='%23E03757' d='M10 0C4.477 0 0 4.477 0 10s4.477 10 10 10 10-4.477 10-10S15.523 0 10 0'/%3E%3Cpath fill='%23F04760' d='M4.692 15.603c6.011 0 10.885-4.874 10.885-10.885a10.9 10.9 0 0 0-.525-3.35A9.95 9.95 0 0 0 10 0C4.477 0 0 4.477 0 10a9.95 9.95 0 0 0 1.394 5.094c1.066.338 2.179.51 3.298.509'/%3E%3Cpath fill='%23fff' d='M9.996 16.783a1.626 1.626 0 1 1 0-3.251 1.626 1.626 0 0 1 0 3.251m1.575-5.598c-.027.252-.14.486-.321.663a1.13 1.13 0 0 1-.674.315h-.008q-.239.027-.48.027a6 6 0 0 1-.575-.027h-.007a1.13 1.13 0 0 1-.674-.315 1.1 1.1 0 0 1-.321-.663c-.04-.366-.059-2.914-.059-3.481 0-.568.02-3.122.059-3.488.027-.252.14-.487.32-.665.183-.177.42-.289.675-.315h.007q.287-.029.576-.017.24-.012.479.017h.008c.254.027.492.14.674.319.18.177.294.412.321.664.04.366.059 2.92.059 3.488 0 .567-.02 3.113-.059 3.478'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='a'%3E%3Cpath fill='%23fff' d='M0 0h20v20H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E`,\n },\n];\n","import type { CalloutType } from \"../../base\";\nimport {\n TiptapCalloutError,\n TiptapCalloutInfo,\n TiptapCalloutSuccess,\n TiptapCalloutWarning,\n} from \"../../../icons/color\";\nimport { ReactNode } from \"react\";\nimport { calloutIconComponents } from \"../../../utils/custom-emoji\";\n\nconst calloutIcons: Record<CalloutType, React.ReactNode> = {\n info: <TiptapCalloutInfo />,\n warning: <TiptapCalloutWarning />,\n success: <TiptapCalloutSuccess />,\n error: <TiptapCalloutError />,\n};\n\nconst legacyTypeMap: Record<string, CalloutType> = {\n question: \"info\",\n idea: \"warning\",\n info: \"success\",\n error: \"error\",\n};\n\ninterface Props {\n type: CalloutType;\n bgColor?: string | null;\n emoji?: string | null;\n children: ReactNode;\n calloutType?: CalloutType;\n iconWrapper?: (icon: ReactNode) => ReactNode;\n}\n\nexport const Callout = ({ type, bgColor, emoji, children, iconWrapper, calloutType }: Props) => {\n const isLegacySECallout = !!calloutType;\n const finalType = isLegacySECallout ? legacyTypeMap[calloutType] : type;\n\n const hasCustomColor = !!bgColor;\n const className = hasCustomColor ? \"callout-node\" : `callout-node callout-${finalType}`;\n const style = hasCustomColor ? { backgroundColor: bgColor } : undefined;\n\n let icon: ReactNode;\n if (emoji) {\n if (emoji in calloutIconComponents) {\n const IconComponent = calloutIconComponents[emoji as keyof typeof calloutIconComponents];\n icon = <IconComponent />;\n } else {\n icon = emoji;\n }\n } else {\n icon = calloutIcons[finalType];\n }\n\n const iconContent = iconWrapper ? iconWrapper(icon) : <div className=\"callout-icon\">{icon}</div>;\n\n return (\n <div\n className={className}\n data-callout-type={hasCustomColor ? undefined : type}\n data-bg-color={bgColor || undefined}\n data-emoji={emoji || undefined}\n style={style}\n >\n {iconContent}\n <div className=\"callout-content-wrapper\">\n <div className=\"callout-content\">{children}</div>\n </div>\n </div>\n );\n};\n","import { ChangeEvent, ReactNode, useMemo } from \"react\";\nimport html from \"highlight.js/lib/languages/xml\";\nimport { common, createLowlight } from \"lowlight\";\n\nimport type { TiptapTranslations } from \"../../../utils/get-translations\";\nimport { CopyButton } from \"./copy-button\";\n\ninterface CodeBlockProps {\n language: string;\n isEditable: boolean;\n onLanguageChange?: (language: string) => void;\n children: ReactNode;\n translations?: TiptapTranslations;\n}\n\nexport const CodeBlock = ({\n language,\n isEditable,\n onLanguageChange,\n children,\n translations,\n}: CodeBlockProps) => {\n const languagesList = useMemo(() => {\n const lowlight = createLowlight(common);\n lowlight.register(\"html\", html);\n const list = lowlight.listLanguages();\n return list.sort();\n }, []);\n\n const handleChange = (e: ChangeEvent<HTMLSelectElement>) => {\n onLanguageChange?.(e.target.value);\n };\n\n return (\n <div className=\"tiptap-code-block-wrapper\">\n <div className=\"tiptap-code-block-header\">\n {isEditable ? (\n <select\n className=\"tiptap-code-block-language-select\"\n value={language}\n onChange={handleChange}\n >\n <option value=\"\">{translations?.codeBlock.selectLanguage}</option>\n {languagesList.map((lang) => (\n <option\n key={lang}\n value={lang}\n >\n {lang}\n </option>\n ))}\n </select>\n ) : (\n <span className=\"tiptap-code-block-language-text\">\n {language || translations?.codeBlock.selectLanguage}\n </span>\n )}\n <CopyButton\n iconSize={20}\n color=\"white\"\n />\n </div>\n <pre className=\"tiptap-code-block\">\n <code\n className=\"tiptap-code-block-content\"\n data-copy-content\n >\n {children}\n </code>\n </pre>\n </div>\n );\n};\n","import type { SVGProps } from 'react';\nconst SvgCheck = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n d=\"M20.707 5.293a1 1 0 0 1 0 1.414l-11 11a1 1 0 0 1-1.414 0l-5-5a1 1 0 1 1 1.414-1.414L9 15.586 19.293 5.293a1 1 0 0 1 1.414 0\"\n clipRule=\"evenodd\"\n />\n </svg>\n);\nexport default SvgCheck;\n","import type { SVGProps } from 'react';\nconst SvgCopy = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 20 20\" {...props}>\n <g fill=\"currentColor\" fillRule=\"evenodd\" clipPath=\"url(#copy_svg__a)\" clipRule=\"evenodd\">\n <path d=\"M9.167 8.333a.833.833 0 0 0-.834.833v7.5c0 .46.373.834.833.834h7.5c.46 0 .834-.373.834-.834v-7.5a.833.833 0 0 0-.834-.833zm-2.5.833a2.5 2.5 0 0 1 2.5-2.5h7.5a2.5 2.5 0 0 1 2.5 2.5v7.5a2.5 2.5 0 0 1-2.5 2.5h-7.5a2.5 2.5 0 0 1-2.5-2.5z\" />\n <path d=\"M3.334 2.5a.833.833 0 0 0-.834.833v7.5a.833.833 0 0 0 .833.834h.834a.833.833 0 0 1 0 1.667h-.833a2.5 2.5 0 0 1-2.5-2.5v-7.5a2.5 2.5 0 0 1 2.5-2.5h7.5a2.5 2.5 0 0 1 2.5 2.5v.833a.833.833 0 1 1-1.667 0v-.833a.834.834 0 0 0-.833-.834z\" />\n </g>\n <defs>\n <clipPath id=\"copy_svg__a\">\n <path fill=\"currentColor\" d=\"M0 0h20v20H0z\" />\n </clipPath>\n </defs>\n </svg>\n);\nexport default SvgCopy;\n","import type { SVGProps } from 'react';\nconst SvgDragIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 20 20\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M9.167 15c0 .917-.75 1.667-1.667 1.667S5.833 15.917 5.833 15c0-.916.75-1.666 1.667-1.666s1.667.75 1.667 1.666M7.5 8.334c-.917 0-1.667.75-1.667 1.666 0 .917.75 1.667 1.667 1.667s1.667-.75 1.667-1.667c0-.916-.75-1.666-1.667-1.666m0-5c-.917 0-1.667.75-1.667 1.666 0 .917.75 1.667 1.667 1.667S9.167 5.917 9.167 5 8.417 3.334 7.5 3.334m5 3.333c.917 0 1.667-.75 1.667-1.667s-.75-1.666-1.667-1.666-1.667.75-1.667 1.666c0 .917.75 1.667 1.667 1.667m0 1.667c-.917 0-1.667.75-1.667 1.666 0 .917.75 1.667 1.667 1.667s1.667-.75 1.667-1.667c0-.916-.75-1.666-1.667-1.666m0 5c-.917 0-1.667.75-1.667 1.666 0 .917.75 1.667 1.667 1.667s1.667-.75 1.667-1.667c0-.916-.75-1.666-1.667-1.666\"\n />\n </svg>\n);\nexport default SvgDragIcon;\n","import type { SVGProps } from 'react';\nconst SvgEdit = (props: SVGProps<SVGSVGElement>) => (\n <svg fill=\"none\" viewBox=\"0 0 18 18\" {...props}>\n <path\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n d=\"M11.745.91a.833.833 0 0 1 1.179 0l4.167 4.167a.833.833 0 0 1 0 1.179L6.257 17.089a.83.83 0 0 1-.589.244H1.501a.833.833 0 0 1-.833-.833v-4.167c0-.22.088-.433.244-.589zM2.335 12.68v2.988h2.988l10-10-2.988-2.988z\"\n clipRule=\"evenodd\"\n />\n </svg>\n);\nexport default SvgEdit;\n","import type { SVGProps } from 'react';\nconst SvgQuote = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 48 48\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M19.284 11.242c1.2-.504 1.703-1.937 1.161-3.098l-1.897-3.989c-.542-1.122-1.859-1.626-3.02-1.122-3.292 1.394-6.119 3.214-8.364 5.42-2.75 2.595-4.608 5.577-5.615 8.868C.542 20.65 0 25.18 0 30.95v11.888a2.33 2.33 0 0 0 2.323 2.323h15.218a2.33 2.33 0 0 0 2.323-2.323V27.62a2.33 2.33 0 0 0-2.323-2.323h-7.28c.078-3.912 1.007-7.048 2.71-9.41 1.395-1.897 3.486-3.446 6.313-4.646m27.337 0c1.2-.504 1.703-1.937 1.162-3.098l-1.898-3.95a2.315 2.315 0 0 0-3.02-1.122c-3.253 1.394-6.04 3.214-8.325 5.382-2.75 2.633-4.647 5.615-5.654 8.906q-1.51 4.879-1.51 13.591V42.84a2.33 2.33 0 0 0 2.324 2.323h15.217a2.33 2.33 0 0 0 2.324-2.323V27.62a2.33 2.33 0 0 0-2.324-2.323H37.6c.077-3.911 1.007-7.047 2.71-9.41 1.394-1.897 3.485-3.446 6.312-4.646\"\n />\n </svg>\n);\nexport default SvgQuote;\n","import type { SVGProps } from 'react';\nconst SvgX = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M18 6 6 18M6 6l12 12\"\n />\n </svg>\n);\nexport default SvgX;\n","import type { SVGProps } from 'react';\nconst SvgAddImage = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-4.86 8.86-3 3.87L9 13.14 6 17h12z\"\n />\n </svg>\n);\nexport default SvgAddImage;\n","import type { SVGProps } from 'react';\nconst SvgAlignCenter = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M4.667 10v1.333h6.666V10zM2 14h12v-1.333H2zm0-5.333h12V7.333H2zm2.667-4V6h6.666V4.667zM2 2v1.333h12V2z\"\n />\n </svg>\n);\nexport default SvgAlignCenter;\n","import type { SVGProps } from 'react';\nconst SvgAlignLeft = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M10 10H2v1.333h8zm0-5.333H2V6h8zm-8 4h12V7.333H2zM2 14h12v-1.333H2zM2 2v1.333h12V2z\"\n />\n </svg>\n);\nexport default SvgAlignLeft;\n","import type { SVGProps } from 'react';\nconst SvgAlignRight = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M2 3.333V2h12v1.333zM6 6V4.667h8V6zM2 8.667V7.333h12v1.334zm4 2.666V10h8v1.333zM2 14v-1.333h12V14z\"\n />\n </svg>\n);\nexport default SvgAlignRight;\n","import type { SVGProps } from 'react';\nconst SvgArrowDown = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M12 5v14m0 0 7-7m-7 7-7-7\"\n />\n </svg>\n);\nexport default SvgArrowDown;\n","import type { SVGProps } from 'react';\nconst SvgArrowLeft = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"m12 19-7-7m0 0 7-7m-7 7h14\"\n />\n </svg>\n);\nexport default SvgArrowLeft;\n","import type { SVGProps } from 'react';\nconst SvgArrowRight = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M5 12h14m0 0-7-7m7 7-7 7\"\n />\n </svg>\n);\nexport default SvgArrowRight;\n","import type { SVGProps } from 'react';\nconst SvgArrowUp = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"m5 12 7-7m0 0 7 7m-7-7v14\"\n />\n </svg>\n);\nexport default SvgArrowUp;\n","import type { SVGProps } from 'react';\nconst SvgBlockquote = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path fill=\"currentColor\" d=\"M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z\" />\n </svg>\n);\nexport default SvgBlockquote;\n","import type { SVGProps } from 'react';\nconst SvgBold = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M10.134 7.827c.646-.447 1.1-1.18 1.1-1.86 0-1.507-1.167-2.667-2.667-2.667H4.4v9.333h4.694c1.393 0 2.473-1.133 2.473-2.526a2.49 2.49 0 0 0-1.433-2.28M6.4 4.967h2c.554 0 1 .446 1 1 0 .553-.446 1-1 1h-2zm2.334 6H6.4v-2h2.334c.553 0 1 .446 1 1 0 .553-.447 1-1 1\"\n />\n </svg>\n);\nexport default SvgBold;\n","import type { SVGProps } from 'react';\nconst SvgBulletList = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5m0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5m0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5M7 19h14v-2H7zm0-6h14v-2H7zm0-8v2h14V5z\"\n />\n </svg>\n);\nexport default SvgBulletList;\n","import type { SVGProps } from 'react';\nconst SvgCalloutError = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M8 1.333A6.66 6.66 0 0 0 1.333 8 6.66 6.66 0 0 0 8 14.667 6.66 6.66 0 0 0 14.667 8 6.66 6.66 0 0 0 8 1.333m3.333 9.06-.94.94L8 8.94l-2.393 2.393-.94-.94L7.06 8 4.667 5.607l.94-.94L8 7.06l2.393-2.393.94.94L8.94 8z\"\n />\n </svg>\n);\nexport default SvgCalloutError;\n","import type { SVGProps } from 'react';\nconst SvgCalloutInfo = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n d=\"M8 14.667A6.667 6.667 0 1 1 8 1.333a6.667 6.667 0 0 1 0 13.334m0-1.334A5.334 5.334 0 1 0 8 2.666a5.334 5.334 0 0 0 0 10.667m-.667-2.666h1.334V12H7.333zm0-1.328s1.334-.006 1.334 0c0-.668 2-1.34 2-2.672A2.657 2.657 0 0 0 8.006 4a2.667 2.667 0 0 0-2.673 2.667h1.334c0-.734.6-1.334 1.333-1.334s1.333.6 1.333 1.334c0 .6-2 1.578-2 2.672\"\n clipRule=\"evenodd\"\n />\n </svg>\n);\nexport default SvgCalloutInfo;\n","import type { SVGProps } from 'react';\nconst SvgCalloutSuccess = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M11.667 3c-1.3 0-2.7.267-3.667 1-.967-.733-2.367-1-3.667-1s-2.7.267-3.666 1v9.767c0 .433.486.3.5.3.9-.434 2.2-.734 3.166-.734 1.3 0 2.7.267 3.667 1 .9-.566 2.533-1 3.667-1 1.1 0 2.233.2 3.166.7.274.14.5-.126.5-.3V4c-.993-.747-2.42-1-3.666-1M14 12.333C13.267 12.1 12.467 12 11.667 12 10.533 12 8.9 12.433 8 13V5.333c.9-.566 2.533-1 3.667-1 .8 0 1.6.1 2.333.334z\"\n />\n </svg>\n);\nexport default SvgCalloutSuccess;\n","import type { SVGProps } from 'react';\nconst SvgCalloutWarning = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path\n fill=\"currentColor\"\n stroke=\"currentColor\"\n strokeWidth={0.2}\n d=\"M9.6 13.9v1.2H6.4v-1.2zm1-2v1.2H5.4v-1.2zM8 .9a5.1 5.1 0 0 1 4.712 3.148 5.1 5.1 0 0 1 .388 1.947 4.7 4.7 0 0 1-.415 2.157 4.7 4.7 0 0 1-1.348 1.725c-.51.477-.737.713-.737 1.123v.1H9.4V11c0-.979.59-1.506 1.121-2.003l.008-.007.166-.135a3.5 3.5 0 0 0 1.205-2.85V6a3.9 3.9 0 0 0-7.8 0v.006A3.5 3.5 0 0 0 5.466 8.99l.007.006.203.189c.473.447.924.968.924 1.815v.1H5.4V11c0-.408-.229-.643-.732-1.111l-.213-.18A4.7 4.7 0 0 1 2.9 5.995 5.1 5.1 0 0 1 8 .9Z\"\n />\n </svg>\n);\nexport default SvgCalloutWarning;\n","import type { SVGProps } from 'react';\nconst SvgClearFormatting = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"m2.18 3.334-.847.847L5.98 8.827l-1.647 3.84h2l1.047-2.44 3.773 3.774.847-.847-9.634-9.64zm1.82 0v.12l1.88 1.88h1.6L7 6.454l1.4 1.4 1.073-2.52h3.86v-2z\"\n />\n </svg>\n);\nexport default SvgClearFormatting;\n","import type { SVGProps } from 'react';\nconst SvgCodeBlock = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"m8 18-6-6 6-6 1.425 1.425-4.6 4.6L9.4 16.6zm8 0-1.425-1.425 4.6-4.6L14.6 7.4 16 6l6 6z\"\n />\n </svg>\n);\nexport default SvgCodeBlock;\n","import type { SVGProps } from 'react';\nconst SvgCopyable = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M12 1.333H6c-.733 0-1.333.6-1.333 1.334v8C4.667 11.4 5.267 12 6 12h6c.733 0 1.333-.6 1.333-1.333v-8c0-.734-.6-1.334-1.333-1.334m0 9.334H6v-8h6zM2 10V8.667h1.333V10zm0-3.667h1.333v1.334H2zm4.667 7H8v1.334H6.667zm-4.667-1V11h1.333v1.333zm1.333 2.334c-.733 0-1.333-.6-1.333-1.334h1.333zm2.334 0H4.333v-1.334h1.334zm3.333 0v-1.334h1.333c0 .734-.6 1.334-1.333 1.334M3.333 4v1.333H2C2 4.6 2.6 4 3.333 4\"\n />\n </svg>\n);\nexport default SvgCopyable;\n","import type { SVGProps } from 'react';\nconst SvgCustomQuote = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <g clipPath=\"url(#custom-quote_svg__a)\">\n <path\n fill=\"currentColor\"\n d=\"M8 6h3v5c0 2.206-1.794 4-4 4v-2c1.103 0 2-.897 2-2H6V8c0-1.103.897-2 2-2m5 2v3h3c0 1.103-.897 2-2 2v2c2.206 0 4-1.794 4-4V6h-3c-1.103 0-2 .897-2 2m11-5v17h-6.853L13.3 23.18a1.94 1.94 0 0 1-1.292.484c-.476 0-.955-.168-1.337-.508L6.922 20H0V3c0-1.654 1.346-3 3-3h18c1.654 0 3 1.346 3 3m-2 0a1 1 0 0 0-1-1H3a1 1 0 0 0-1 1v15h5.653l4.327 3.645L16.428 18h5.571z\"\n />\n </g>\n <defs>\n <clipPath id=\"custom-quote_svg__a\">\n <path fill=\"currentColor\" d=\"M0 0h24v24H0z\" />\n </clipPath>\n </defs>\n </svg>\n);\nexport default SvgCustomQuote;\n","import type { SVGProps } from 'react';\nconst SvgDeleteColumn = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M9 20h1v2H9zm-3 1v1H5v-1zM6 3H5V2h1zm6 0V2h1v1zm1 8v1h-2v-1zM9 22H8v-2h1zm-1 0H6v-2h2zm-3-1V5h2v16zM5 5V3h2v2zm1-3h4v2H6zm4 0h2v2h-2zm3 1v8h-2V3z\"\n />\n <path\n stroke=\"currentColor\"\n strokeLinecap=\"square\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M18 17h-6\"\n />\n </svg>\n);\nexport default SvgDeleteColumn;\n","import type { SVGProps } from 'react';\nconst SvgDeleteRow = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M20 13v1h2v-1zm1-3h1V9h-1zM3 10V9H2v1zm0 6H2v1h1zm8 1h1v-2h-1zm11-4v-1h-2v1zm0-1v-2h-2v2zm-1-3H5v2h16zM5 9H3v2h2zm-3 1v4h2v-4zm0 4v2h2v-2zm1 3h8v-2H3z\"\n />\n <path\n stroke=\"currentColor\"\n strokeLinecap=\"square\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M15 20h6\"\n />\n </svg>\n);\nexport default SvgDeleteRow;\n","import type { SVGProps } from 'react';\nconst SvgDetails = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M20 7.001H4v-2h16zm0 4h-8v-2h8zm-8 4h8v-2h-8zm-8 0 5-3-5-3zm0 2v2h16v-2z\"\n />\n </svg>\n);\nexport default SvgDetails;\n","import type { SVGProps } from 'react';\nconst SvgH2 = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M4.503 16.5V7.773h1.845v3.6h3.746v-3.6h1.84V16.5h-1.84v-3.605H6.348V16.5zm8.902 0v-1.33l3.106-2.876q.396-.384.665-.69a2.6 2.6 0 0 0 .413-.601q.14-.299.14-.644 0-.383-.174-.66a1.15 1.15 0 0 0-.477-.43 1.5 1.5 0 0 0-.686-.154q-.4 0-.699.162a1.1 1.1 0 0 0-.46.464 1.5 1.5 0 0 0-.162.72h-1.752q0-.855.388-1.487A2.6 2.6 0 0 1 14.794 8q.7-.346 1.61-.346.939 0 1.633.333a2.6 2.6 0 0 1 1.086.912q.388.584.388 1.338 0 .495-.196.976-.192.48-.686 1.07-.495.583-1.393 1.401l-1.275 1.249v.06h3.665V16.5z\"\n />\n </svg>\n);\nexport default SvgH2;\n","import type { SVGProps } from 'react';\nconst SvgH3 = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M4.327 16.5V7.773h1.845v3.6h3.746v-3.6h1.84V16.5h-1.84v-3.605H6.172V16.5zm12.128.12q-.955 0-1.7-.329-.743-.331-1.172-.912a2.3 2.3 0 0 1-.44-1.346h1.859a.97.97 0 0 0 .208.562q.196.24.52.37.325.133.729.133.422 0 .746-.15.324-.148.507-.412.183-.265.183-.61a1.02 1.02 0 0 0-.196-.618 1.25 1.25 0 0 0-.554-.426 2.2 2.2 0 0 0-.852-.153h-.814v-1.355h.814q.417 0 .737-.145.324-.145.503-.4a1.04 1.04 0 0 0 .179-.606 1.05 1.05 0 0 0-.593-.967q-.276-.14-.647-.14-.375 0-.686.135a1.2 1.2 0 0 0-.499.38 1 1 0 0 0-.2.58h-1.769q.013-.756.43-1.33a2.8 2.8 0 0 1 1.126-.9q.711-.327 1.606-.328.904 0 1.581.329.678.327 1.053.886.38.554.375 1.244.004.733-.456 1.223-.456.49-1.19.622v.069q.965.123 1.467.669.507.54.503 1.355a2.13 2.13 0 0 1-.43 1.325q-.432.579-1.19.912t-1.738.332\"\n />\n </svg>\n);\nexport default SvgH3;\n","import type { SVGProps } from 'react';\nconst SvgH4 = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M4.216 16.5V7.773H6.06v3.6h3.745v-3.6h1.841V16.5h-1.84v-3.605H6.06V16.5zm8.77-1.534v-1.453l3.643-5.74h1.253v2.011h-.742l-2.297 3.635v.068h5.178v1.479zm4.188 1.534v-1.977l.035-.644V7.773h1.73V16.5z\"\n />\n </svg>\n);\nexport default SvgH4;\n","import type { SVGProps } from 'react';\nconst SvgH5 = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M4.415 16.5V7.773H6.26v3.6h3.746v-3.6h1.84V16.5h-1.84v-3.605H6.26V16.5zm12.09.12q-.904 0-1.611-.333a2.8 2.8 0 0 1-1.117-.916 2.35 2.35 0 0 1-.43-1.338h1.79q.03.507.425.822.398.316.942.316.435 0 .767-.192.338-.196.524-.541.192-.35.192-.802 0-.459-.196-.81a1.4 1.4 0 0 0-.532-.545 1.57 1.57 0 0 0-.78-.2 1.85 1.85 0 0 0-.746.158 1.35 1.35 0 0 0-.558.43l-1.64-.294.412-4.602h5.336V9.28h-3.814l-.226 2.186h.051q.23-.324.695-.537t1.04-.213q.788 0 1.406.371.618.37.976 1.019.357.643.353 1.483.005.881-.409 1.568a2.9 2.9 0 0 1-1.146 1.074q-.733.387-1.705.387\"\n />\n </svg>\n);\nexport default SvgH5;\n","import type { SVGProps } from 'react';\nconst SvgH6 = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M4.321 16.5V7.773h1.845v3.6h3.746v-3.6h1.84V16.5h-1.84v-3.605H6.166V16.5zm12.251.12a4 4 0 0 1-1.3-.227 2.96 2.96 0 0 1-1.116-.72q-.494-.498-.784-1.32-.285-.823-.285-2.02.003-1.1.251-1.965.252-.87.716-1.475.47-.605 1.12-.92.653-.32 1.462-.32.874 0 1.543.341.669.337 1.074.917.409.58.494 1.3h-1.82a1.22 1.22 0 0 0-.447-.717q-.34-.26-.844-.26-.852 0-1.295.742-.44.741-.447 2.015h.06q.195-.387.527-.66a2.4 2.4 0 0 1 .763-.422q.43-.15.908-.15.776 0 1.38.367.606.363.955.998.35.634.35 1.453 0 .885-.414 1.576-.408.69-1.146 1.083-.733.387-1.705.383m-.008-1.45a1.44 1.44 0 0 0 1.291-.758q.192-.35.192-.784t-.192-.78a1.417 1.417 0 0 0-1.278-.754q-.319 0-.593.12-.268.119-.473.332a1.6 1.6 0 0 0-.43 1.086q0 .422.192.771.195.35.528.559.337.209.763.209\"\n />\n </svg>\n);\nexport default SvgH6;\n","import type { SVGProps } from 'react';\nconst SvgHighlight = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 23 22\" {...props}>\n <path\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"m8.056 9.927 8.07-8.06a2.85 2.85 0 1 1 4.03 4.03l-8.06 8.08m-6.03-1.01c-1.66 0-3 1.35-3 3.02 0 1.33-2.5 1.52-2 2.02 1.08 1.1 2.49 2.02 4 2.02 2.2 0 4-1.8 4-4.04a3.01 3.01 0 0 0-3-3.02\"\n />\n </svg>\n);\nexport default SvgHighlight;\n","import type { SVGProps } from 'react';\nconst SvgHorizontalRule = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path stroke=\"currentColor\" d=\"M4.5 12h15\" />\n </svg>\n);\nexport default SvgHorizontalRule;\n","import type { SVGProps } from 'react';\nconst SvgItalic = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M6.667 3.3v2H8.14l-2.28 5.333H4v2h5.333v-2H7.86L10.14 5.3H12v-2z\"\n />\n </svg>\n);\nexport default SvgItalic;\n","import type { SVGProps } from 'react';\nconst SvgLinkOff = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M17 7h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1 0 1.43-.98 2.63-2.31 2.98l1.46 1.46C20.88 15.61 22 13.95 22 12c0-2.76-2.24-5-5-5m-1 4h-2.19l2 2H16zM2 4.27l3.11 3.11A4.99 4.99 0 0 0 2 12c0 2.76 2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1 0-1.59 1.21-2.9 2.76-3.07L8.73 11H8v2h2.73L13 15.27V17h1.73l4.01 4L20 19.74 3.27 3z\"\n />\n </svg>\n);\nexport default SvgLinkOff;\n","import type { SVGProps } from 'react';\nconst SvgLink = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M11.333 13.333v-2h-2V9.999h2V8h1.333v2h2v1.334h-2v2zm-4-2H4.666a3.21 3.21 0 0 1-2.358-.976A3.2 3.2 0 0 1 1.333 8q0-1.383.975-2.358a3.2 3.2 0 0 1 2.358-.975h2.667v1.333H4.666q-.832 0-1.416.584a1.93 1.93 0 0 0-.584 1.416q0 .834.584 1.417.583.583 1.416.583h2.667zm-2-2.667V7.333h5.333v1.333zm9.333-.667h-1.333q0-.832-.583-1.416a1.93 1.93 0 0 0-1.417-.584H8.666V4.666h2.667q1.383 0 2.359.975.975.976.974 2.358\"\n />\n </svg>\n);\nexport default SvgLink;\n","import type { SVGProps } from 'react';\nconst SvgMath = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M12.352 2.952c.078-.522.437-1.077.948-1.077.517 0 .937.42.937.938h1.875A2.816 2.816 0 0 0 13.3 0c-1.577 0-2.603 1.345-2.803 2.675L9.895 6.75H7.019v1.875h2.598L7.78 21.05l-.006.044c-.05.498-.44 1.031-.942 1.031a.94.94 0 0 1-.937-.937H4.019A2.816 2.816 0 0 0 6.83 24c1.578 0 2.661-1.366 2.805-2.695l1.877-12.68h2.818V6.75H11.79zm7.63 8.673H17.73l-1.218 1.832-.812-1.832h-2.051l1.632 3.683-2.6 3.91h2.251l1.25-1.878.833 1.879h2.05l-1.653-3.73z\"\n />\n </svg>\n);\nexport default SvgMath;\n","import type { SVGProps } from 'react';\nconst SvgMergeCells = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M6.41 21 5 19.59l4.83-4.83c.75-.75 1.17-1.77 1.17-2.83v-5.1L9.41 8.41 8 7l4-4 4 4-1.41 1.41L13 6.83v5.1c0 1.06.42 2.08 1.17 2.83L19 19.59 17.59 21 12 15.41z\"\n />\n </svg>\n);\nexport default SvgMergeCells;\n","import type { SVGProps } from 'react';\nconst SvgMythReality = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M4 6a1 1 0 0 0-1 1v3a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1zm0 7a1 1 0 0 0-1 1v3a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1zm6-6a1 1 0 0 1 1-1h9a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-9a1 1 0 0 1-1-1zm1 6a1 1 0 0 0-1 1v3a1 1 0 0 0 1 1h9a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1z\"\n />\n </svg>\n);\nexport default SvgMythReality;\n","import type { SVGProps } from 'react';\nconst SvgOrderedList = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M2 16.999h2v.5H3v1h1v.5H2v1h3v-4H2zm1-9h1v-4H2v1h1zm-1 3h1.8l-1.8 2.1v.9h3v-1H3.2l1.8-2.1v-.9H2zm5-6v2h14v-2zm0 14h14v-2H7zm0-6h14v-2H7z\"\n />\n </svg>\n);\nexport default SvgOrderedList;\n","import type { SVGProps } from 'react';\nconst SvgPrompt = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path\n fill=\"currentColor\"\n stroke=\"currentColor\"\n strokeWidth={0.1}\n d=\"M13.59 2.45a1.466 1.466 0 0 1 1.46 1.46v8.18a1.466 1.466 0 0 1-1.46 1.46H2.41a1.466 1.466 0 0 1-1.46-1.46V3.91a1.466 1.466 0 0 1 1.46-1.46zM2.41 3.55a.36.36 0 0 0-.36.36v8.18a.36.36 0 0 0 .36.36h11.18a.36.36 0 0 0 .36-.36V3.91a.36.36 0 0 0-.36-.36z\"\n />\n <path\n fill=\"currentColor\"\n stroke=\"currentColor\"\n strokeWidth={0.1}\n d=\"M4 4.948a.55.55 0 0 1 .39.161l2.5 2.5a.553.553 0 0 1 0 .782l-2.5 2.5a.55.55 0 0 1-.943-.391.55.55 0 0 1 .162-.39L5.724 8 3.609 5.89A.553.553 0 0 1 4 4.949Zm8 5.002a.55.55 0 0 1 0 1.1H7.5a.55.55 0 0 1 0-1.1z\"\n />\n </svg>\n);\nexport default SvgPrompt;\n","import type { SVGProps } from 'react';\nconst SvgRedo = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M21.328 13.496H15.43a.375.375 0 0 0-.288.615l2.95 3.54a.375.375 0 0 0 .575 0l2.95-3.54a.375.375 0 0 0-.289-.615\"\n />\n <path\n fill=\"currentColor\"\n d=\"M17.48 13.496a7.503 7.503 0 0 0-13.136-3.273.75.75 0 1 1-1.157-.954 9.003 9.003 0 0 1 15.818 4.227z\"\n />\n </svg>\n);\nexport default SvgRedo;\n","import type { SVGProps } from 'react';\nconst SvgSplitCells = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path fill=\"currentColor\" d=\"M3 15h8v-2H3zm0 4h8v-2H3zm0-8h8V9H3zm0-6v2h8V5zm10 0h8v14h-8z\" />\n </svg>\n);\nexport default SvgSplitCells;\n","import type { SVGProps } from 'react';\nconst SvgStrikethrough = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M4.567 5.72C4.567 3.913 6.3 3 8.16 3c1.093 0 2 .327 2.6.853.513.434.973 1.154.973 2.16H9.727q0-.308-.1-.566c-.194-.574-.8-.854-1.5-.854-1.24 0-1.56.68-1.56 1.134 0 .32.166.586.493.806.253.167.513.32.94.467H4.927c-.14-.227-.36-.593-.36-1.28M14 9V7.667H2V9h6.413c.767.3 1.307.5 1.307 1.313 0 .667-.54 1.114-1.52 1.114-1.027 0-1.953-.36-1.953-1.674h-1.98c0 .367.053.754.16 1.054.54 1.526 2.193 2.2 3.78 2.2 1.513 0 3.533-.594 3.533-2.7 0-.2-.007-.774-.32-1.294H14z\"\n />\n </svg>\n);\nexport default SvgStrikethrough;\n","import type { SVGProps } from 'react';\nconst SvgSubscript = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M16.796 8.156V6.094q0-.438.302-.736.303-.297.749-.295h2.102V4.03h-3.153V3h3.153q.446 0 .75.297a.98.98 0 0 1 .301.734v1.032q0 .438-.303.735a1.02 1.02 0 0 1-.748.296h-2.102v1.031H21v1.031zM3 19.5l4.861-7.502-4.52-6.935h2.786l3.258 5.156h.106l3.232-5.156h2.811l-4.546 6.935 4.888 7.502h-2.812l-3.573-5.594h-.106L5.812 19.5z\"\n />\n </svg>\n);\nexport default SvgSubscript;\n","import type { SVGProps } from 'react';\nconst SvgSuperscript = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M16.796 8.156V6.094q0-.438.302-.736.303-.297.749-.295h2.102V4.03h-3.153V3h3.153q.446 0 .75.297a.98.98 0 0 1 .301.734v1.032q0 .438-.303.735a1.02 1.02 0 0 1-.748.296h-2.102v1.031H21v1.031zM3 19.5l4.861-7.502-4.52-6.935h2.786l3.258 5.156h.106l3.232-5.156h2.811l-4.546 6.935 4.888 7.502h-2.812l-3.573-5.594h-.106L5.812 19.5z\"\n />\n </svg>\n);\nexport default SvgSuperscript;\n","import type { SVGProps } from 'react';\nconst SvgTableColumnHeading = (props: SVGProps<SVGSVGElement>) => (\n <svg fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path fill=\"currentColor\" d=\"M14 5.333H2V2.667h12zm0 1.334H2v2.666h12zm0 4H2v2.666h12z\" />\n </svg>\n);\nexport default SvgTableColumnHeading;\n","import type { SVGProps } from 'react';\nconst SvgTableRowHeading = (props: SVGProps<SVGSVGElement>) => (\n <svg fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M6.667 6.68H10V14H6.667zM11.333 14h2c.734 0 1.334-.6 1.334-1.333v-6h-3.334zm2-12h-10C2.6 2 2 2.6 2 3.333v2h12.667v-2c0-.733-.6-1.333-1.334-1.333M2 12.667C2 13.4 2.6 14 3.333 14h2V6.667H2z\"\n />\n </svg>\n);\nexport default SvgTableRowHeading;\n","import type { SVGProps } from 'react';\nconst SvgTable = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path stroke=\"currentColor\" strokeWidth={1.8} d=\"M4 4h8v8H4zM4 12h8v8H4zM12 4h8v8h-8z\" />\n <path\n stroke=\"currentColor\"\n strokeLinecap=\"square\"\n strokeLinejoin=\"round\"\n strokeWidth={1.8}\n d=\"M19 22v-3m0 0v-3m0 3h-3m3 0h3\"\n />\n </svg>\n);\nexport default SvgTable;\n","import type { SVGProps } from 'react';\nconst SvgTextColor = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"m6 20 6-16 6 16m-9-6h6\"\n />\n </svg>\n);\nexport default SvgTextColor;\n","import type { SVGProps } from 'react';\nconst SvgUnderline = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M3.333 14v-1.333h9.333V14zM8 11.333q-1.684 0-2.617-1.05T4.45 7.5V2h1.716v5.6q0 .933.467 1.517T8 9.7t1.366-.583q.467-.585.467-1.517V2h1.717v5.5q0 1.734-.934 2.783-.933 1.05-2.616 1.05\"\n />\n </svg>\n);\nexport default SvgUnderline;\n","import type { SVGProps } from 'react';\nconst SvgUndo = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M3.375 13.496h5.898a.375.375 0 0 1 .288.615l-2.95 3.54a.375.375 0 0 1-.575 0l-2.95-3.54a.375.375 0 0 1 .289-.615\"\n />\n <path\n fill=\"currentColor\"\n d=\"M7.224 13.496a7.503 7.503 0 0 1 13.135-3.273.749.749 0 0 0 1.306-.696.8.8 0 0 0-.15-.258 9.003 9.003 0 0 0-15.817 4.227z\"\n />\n </svg>\n);\nexport default SvgUndo;\n","import type { SVGProps } from 'react';\nconst SvgVideo = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"m15.464 11.588-4.361-3.17a.525.525 0 0 0-.835.424v6.338a.525.525 0 0 0 .835.423l4.36-3.167a.522.522 0 0 0 0-.848\"\n />\n <path\n fill=\"currentColor\"\n d=\"M12 1.5C6.2 1.5 1.5 6.2 1.5 12c0 5.798 4.7 10.497 10.5 10.497S22.5 17.797 22.5 12c0-5.8-4.7-10.5-10.5-10.5m0 19.245A8.745 8.745 0 0 1 3.254 12c0-4.828 3.916-8.747 8.746-8.747S20.745 7.17 20.745 12A8.744 8.744 0 0 1 12 20.745\"\n />\n </svg>\n);\nexport default SvgVideo;\n","import { TiptapCopy, TiptapCheck } from \"../../../icons\";\n\ninterface CopyButtonProps {\n iconSize?: number;\n color?: \"white\" | \"black\" | \"prompt\";\n}\n\n/**\n * Reusable copy button component for server-rendered content\n * Works with a client-side interactivity provider that:\n * - Handles click events via data-copy-action attribute\n * - Copies content from nearest element marked with data-copy-content\n * - Shows TiptapCopy icon by default\n * - Switches to TiptapCheck icon for 1500ms after successful copy\n *\n * @example\n * ```tsx\n * <div>\n * <div data-copy-content>Text to copy</div>\n * <CopyButton iconSize={16} />\n * </div>\n * ```\n */\nexport const CopyButton = ({ iconSize = 16, color = \"black\" }: CopyButtonProps) => {\n return (\n <button\n className={`copy-button copy-icon-${color}`}\n data-copy-action=\"copy\"\n type=\"button\"\n >\n <span\n className=\"copy-icon\"\n data-copy-icon=\"default\"\n >\n <TiptapCopy\n width={iconSize}\n height={iconSize}\n />\n </span>\n <span\n className=\"copy-icon-success\"\n data-copy-icon=\"success\"\n style={{ display: \"none\" }}\n >\n <TiptapCheck\n width={iconSize}\n height={iconSize}\n />\n </span>\n </button>\n );\n};\n","import { ReactNode } from \"react\";\nimport { CopyButton } from \"./copy-button\";\n\nexport const CopyableText = ({ children }: { children: ReactNode }) => {\n return (\n <span className=\"copyable\">\n <span data-copy-content>{children}</span>\n <CopyButton iconSize={16} />\n </span>\n );\n};\n","import { ReactNode } from \"react\";\nimport { TiptapQuote } from \"../../../icons\";\n\ninterface CustomQuoteProps {\n children: ReactNode;\n}\n\nexport const CustomQuote = ({ children }: CustomQuoteProps) => (\n <div data-custom-quote=\"\">\n <div className=\"custom-quote-divider\" />\n <div className=\"custom-quote-svg-wrapper\">\n <TiptapQuote />\n </div>\n {children}\n </div>\n);\n\ninterface CustomQuoteTextProps {\n children: ReactNode;\n isEmpty?: boolean;\n placeholder?: string;\n}\n\nexport const CustomQuoteText = ({ children, isEmpty, placeholder }: CustomQuoteTextProps) => (\n <div\n data-custom-quote-text\n className={isEmpty ? \"is-empty\" : \"\"}\n data-placeholder={placeholder}\n >\n {children}\n </div>\n);\n\ninterface CustomQuoteAuthorProps {\n children: ReactNode;\n isEmpty?: boolean;\n placeholder?: string;\n}\n\nexport const CustomQuoteAuthor = ({ children, isEmpty, placeholder }: CustomQuoteAuthorProps) => (\n <div\n data-custom-quote-author=\"\"\n className={isEmpty ? \"is-empty\" : \"\"}\n data-placeholder={placeholder}\n >\n {children}\n </div>\n);\n\ninterface CustomQuoteSignProps {\n children: ReactNode;\n isEmpty?: boolean;\n placeholder?: string;\n}\n\nexport const CustomQuoteSign = ({ children, isEmpty, placeholder }: CustomQuoteSignProps) => (\n <div\n data-custom-quote-sign=\"\"\n className={isEmpty ? \"is-empty\" : \"\"}\n data-placeholder={placeholder}\n >\n {children}\n </div>\n);\n","import { ReactNode } from \"react\";\n\nimport { TiptapEdit } from \"../../../icons\";\nimport { resolveImageSrc } from \"../../../utils/image-src-resolver\";\n\ninterface FigureProps {\n src?: string;\n alt?: string;\n title?: string;\n caption?: string;\n width?: number | null;\n height?: number | null;\n isEditable?: boolean;\n onEditClick?: () => void;\n children?: ReactNode;\n fileId?: string | null;\n getImageById?: (fileId: string) => string | null;\n}\n\nexport const Figure = ({\n src,\n alt,\n title,\n caption,\n width,\n height,\n isEditable,\n onEditClick,\n children,\n fileId,\n getImageById,\n}: FigureProps) => {\n const resolvedSrc = resolveImageSrc({ fileId, src }, { getImageById });\n\n return (\n <figure>\n {resolvedSrc && (\n <div className=\"figure-image-container\">\n <img\n src={resolvedSrc}\n alt={alt || \"\"}\n title={title}\n width={width || undefined}\n height={height || undefined}\n />\n {isEditable && onEditClick && (\n <button\n type=\"button\"\n className=\"figure-edit-button\"\n onClick={onEditClick}\n contentEditable={false}\n aria-label=\"Редактировать изображение\"\n >\n <TiptapEdit />\n </button>\n )}\n </div>\n )}\n {caption && <figcaption>{caption}</figcaption>}\n {children}\n </figure>\n );\n};\n","import { ReactNode } from \"react\";\nimport { CopyButton } from \"./copy-button\";\n\ninterface PromptHeaderProps {\n children: ReactNode;\n isEmpty?: boolean;\n placeholder?: string;\n}\n\nexport const PromptHeader = ({ children, isEmpty, placeholder }: PromptHeaderProps) => (\n <div className=\"prompt-header-wrapper\">\n <div\n className={isEmpty ? \"is-empty\" : \"\"}\n data-placeholder={placeholder}\n >\n {children}\n </div>\n <span className=\"prompt-copy-icon-wrapper\">\n <CopyButton\n iconSize={16}\n color=\"prompt\"\n />\n </span>\n </div>\n);\n\ninterface PromptContentProps {\n children: ReactNode;\n isEmpty?: boolean;\n placeholder?: string;\n}\n\nexport const PromptContent = ({ children, isEmpty, placeholder }: PromptContentProps) => (\n <div className=\"prompt-content-wrapper\">\n <div\n className={isEmpty ? \"is-empty\" : \"\"}\n data-placeholder={placeholder}\n data-copy-content\n >\n {children}\n </div>\n </div>\n);\n","export enum VideoHosting {\n Youtube = 'youtube',\n Vimeo = 'vimeo',\n Rutube = 'rutube',\n VK = 'vk',\n}\n\nexport interface VideoInfo {\n hosting: VideoHosting;\n videoId: string;\n embedUrl: string;\n}\n\nconst VIDEO_PATTERNS = {\n youtube: /(?:https?:\\/\\/)?(?:www\\.)?(?:youtube\\.com|youtu\\.be)\\/(?:watch\\?v=|shorts\\/)?([a-zA-Z0-9_-]{11})/,\n youtubeEmbed: /(?:https?:\\/\\/)?(?:www\\.)?(?:youtube\\.com|youtube-nocookie\\.com)\\/embed\\/([a-zA-Z0-9_-]{11})/,\n vimeo: /(?:http|https)?:\\/\\/(?:www\\.)?vimeo\\.com\\/(?:channels\\/(?:\\w+\\/)?|groups\\/(?:[^/]*)?\\/videos\\/)?(\\d+)(?:|\\/\\?)/,\n rutube: /^https:\\/\\/rutube\\.ru\\/video\\/([\\w-]+)/,\n vk: /(?:https?:\\/\\/)?(?:vk\\.com|vkvideo\\.ru)\\/video(-?\\d+)_(\\d+)/,\n} as const;\n\n/**\n * Detects video hosting platform and extracts video information from URL\n * Supports YouTube, Vimeo, Rutube, and VK video platforms\n *\n * Note: This function is synchronous as it only performs regex pattern matching.\n * It can be safely used in both client and server-side rendering contexts.\n */\nexport const detectVideoHosting = (src: string): VideoInfo | null => {\n if (!src || typeof src !== 'string') {\n return null;\n }\n\n const cleanSrc = src.trim();\n if (!cleanSrc) {\n return null;\n }\n\n try {\n // Check YouTube embed URLs (already in embed format from old editor)\n const youTubeEmbedMatch = VIDEO_PATTERNS.youtubeEmbed.exec(cleanSrc);\n if (youTubeEmbedMatch?.[1]) {\n const videoId = youTubeEmbedMatch[1];\n return {\n hosting: VideoHosting.Youtube,\n videoId,\n embedUrl: `https://www.youtube-nocookie.com/embed/${videoId}`,\n };\n }\n\n // Check YouTube regular URLs\n const youTubeMatch = VIDEO_PATTERNS.youtube.exec(cleanSrc);\n if (youTubeMatch?.[1]) {\n const videoId = youTubeMatch[1];\n return {\n hosting: VideoHosting.Youtube,\n videoId,\n embedUrl: `https://www.youtube-nocookie.com/embed/${videoId}`,\n };\n }\n\n // Check Vimeo\n const vimeoMatch = VIDEO_PATTERNS.vimeo.exec(cleanSrc);\n if (vimeoMatch?.[1]) {\n const videoId = vimeoMatch[1];\n // Extract hash parameter if present\n const hashRegex = /\\/(\\d+)\\/([a-fA-F0-9]+)/;\n const hashMatch = hashRegex.exec(cleanSrc);\n const hash = hashMatch?.[2] || null;\n const hashParam = hash ? `?h=${hash}` : '';\n\n return {\n hosting: VideoHosting.Vimeo,\n videoId,\n embedUrl: `https://player.vimeo.com/video/${videoId}${hashParam}`,\n };\n }\n\n // Check Rutube\n const ruTubeMatch = VIDEO_PATTERNS.rutube.exec(cleanSrc);\n if (ruTubeMatch?.[1]) {\n const videoId = ruTubeMatch[1];\n return {\n hosting: VideoHosting.Rutube,\n videoId,\n embedUrl: `https://rutube.ru/play/embed/${videoId}`,\n };\n }\n\n // Check VK\n const vkMatch = VIDEO_PATTERNS.vk.exec(cleanSrc);\n if (vkMatch?.[1] && vkMatch?.[2]) {\n const videoId = `${vkMatch[1]}_${vkMatch[2]}`;\n return {\n hosting: VideoHosting.VK,\n videoId,\n embedUrl: `https://vk.com/video_ext.php?oid=${vkMatch[1]}&id=${vkMatch[2]}`,\n };\n }\n } catch {\n // Silent failure for unsupported video URLs\n // Error details available in development via devtools\n }\n\n return null;\n};\n","import { detectVideoHosting } from \"@/utils/detect-video-hosting\";\nimport { ReactNode } from \"react\";\n\ninterface VideoProps {\n src: string;\n children?: ReactNode;\n}\n\nexport const Video = ({ src, children }: VideoProps) => {\n const videoInfo = detectVideoHosting(src);\n\n if (!videoInfo?.embedUrl) {\n return (\n <div className=\"video-node\">\n <div className=\"video-error\">\n <span>Unsupported or invalid video URL</span>\n </div>\n {children}\n </div>\n );\n }\n\n return (\n <div\n className=\"video-node\"\n data-video=\"\"\n >\n <div className=\"video-player-wrapper\">\n <iframe\n className=\"video-iframe\"\n src={videoInfo?.embedUrl}\n title=\"Video Player\"\n allow=\"autoplay; encrypted-media\"\n allowFullScreen\n />\n </div>\n {children}\n </div>\n );\n};\n","import { generateJSON, type JSONContent } from \"@tiptap/core\";\nimport { getSharedExtensions } from \"./get-shared-extensions\";\nimport { BaseFigure } from \"@/extensions/base/figure\";\n\nfunction isJSONContent(value: unknown): value is JSONContent {\n return (\n typeof value === \"object\" && value !== null && \"type\" in value && typeof value.type === \"string\"\n );\n}\n\nexport function htmlToTiptapContent(content: string | JSONContent): JSONContent {\n if (isJSONContent(content)) {\n return content;\n }\n\n if (typeof content === \"string\") {\n try {\n const parsed = JSON.parse(content);\n if (isJSONContent(parsed)) {\n return parsed;\n }\n } catch {\n // Not valid JSON, treat as HTML\n }\n }\n\n if (!content || content.trim() === \"\") {\n return { type: \"doc\", content: [{ type: \"paragraph\" }] };\n }\n\n const sharedExtensions = getSharedExtensions();\n\n const extensions = [...sharedExtensions, BaseFigure];\n\n try {\n return generateJSON(content, extensions);\n } catch (error) {\n console.error(\"Failed to convert HTML to Tiptap content:\", error);\n return { type: \"doc\", content: [{ type: \"paragraph\" }] };\n }\n}\n"],"mappings":";AAAA,SAAS,4BAA4B;;;ACArC,SAAS,mBAAmB;AAC5B,SAAS,gBAAgB;;;ACAzB,SAAS,qBAAqB;AAQvB,SAAS,eAAe,QAAgB,UAA2B;AACxE,QAAM,EAAE,MAAM,OAAO,IAAI;AACzB,QAAM,EAAE,MAAM,IAAI;AAClB,QAAM,EAAE,UAAU,IAAI;AAEtB,QAAM,OAAO,UAAU;AACvB,QAAM,cAAc,KAAK,KAAK;AAE9B,MAAI,QAAQ,KAAK;AACjB,MAAI,qBAAqB;AACzB,MAAI,kBAAkB;AACtB,SAAO,QAAQ,GAAG;AAChB,UAAM,aAAa,KAAK,KAAK,KAAK;AAClC,QAAI,WAAW,KAAK,SAAS,UAAU;AACrC,2BAAqB;AACrB,wBAAkB;AAClB;AAAA,IACF;AACA;AAAA,EACF;AAEA,QAAM,8BACJ,YAAY,KAAK,SAAS,eAAe,YAAY,QAAQ,SAAS;AAExE,MAAI,CAAC,sBAAsB,CAAC,6BAA6B;AACvD,WAAO;AAAA,EACT;AAEA,QAAM,EAAE,GAAG,IAAI;AACf,QAAM,qBAAqB,KAAK,MAAM,eAAe;AAErD,QAAM,aAAa,KAAK,KAAK,eAAe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QAAM,mBAAmB,oBAAoB;AAE7C,QAAM,aAAa,CAAC,GAAG,kBAAkB,UAAU;AAEnD,MAAI;AACF,WAAO,aAAa,SAAS,UAAU;AAAA,EACzC,SAAS,OAAO;AACd,YAAQ,MAAM,6CAA6C,KAAK;AAChE,WAAO,EAAE,MAAM,OAAO,SAAS,CAAC,EAAE,MAAM,YAAY,CAAC,EAAE;AAAA,EACzD;AACF;","names":["legacyTypeMap","mergeAttributes","mergeAttributes","Node","TextSelection","mergeAttributes","Node","Node","mergeAttributes","Node","mergeAttributes","TextSelection","Node","mergeAttributes","mergeAttributes","Mark","mergeAttributes","Extension","mergeAttributes","Node","TextSelection","Image","Node","mergeAttributes","TextSelection","Image","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","legacyTypeMap","html","common","createLowlight","jsx","jsx","jsxs","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsxs","jsx","jsxs","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsxs","jsx","jsx","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","lowlight","createLowlight","common","html","jsx","jsxs","CopyableText","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","html","CopyableText","jsx"]}
|
|
1
|
+
{"version":3,"sources":["../src/render/tiptap-render.tsx","../src/extensions/render/get-render-extensions.ts","../src/utils/handle-exit-node.ts","../src/utils/migrate-legacy-callouts.ts","../src/extensions/base/callout.ts","../src/extensions/base/code-block.ts","../src/extensions/base/copyable-text.ts","../src/extensions/base/custom-quote.ts","../src/extensions/base/link.ts","../src/extensions/base/myth-reality.ts","../src/extensions/base/prompt.ts","../src/extensions/base/video.ts","../src/extensions/base/figure.ts","../src/utils/image-src-resolver.ts","../src/utils/get-shared-extensions.ts","../node_modules/@tiptap/extension-text-style/src/text-style/index.ts","../node_modules/@tiptap/extension-text-style/src/background-color/background-color.ts","../node_modules/@tiptap/extension-text-style/src/color/color.ts","../node_modules/@tiptap/extension-text-style/src/font-family/font-family.ts","../node_modules/@tiptap/extension-text-style/src/font-size/font-size.ts","../node_modules/@tiptap/extension-text-style/src/line-height/line-height.ts","../node_modules/@tiptap/extension-text-style/src/text-style-kit/index.ts","../src/extensions/base/compatibility.ts","../src/render/static-renderer-config.tsx","../src/icons/color/TiptapCalloutError.tsx","../src/icons/color/TiptapCalloutInfo.tsx","../src/icons/color/TiptapCalloutSuccess.tsx","../src/icons/color/TiptapCalloutWarning.tsx","../src/utils/custom-emoji.ts","../src/extensions/views/components/callout.tsx","../src/extensions/views/components/code-block.tsx","../src/icons/Check.tsx","../src/icons/Copy.tsx","../src/icons/DragIcon.tsx","../src/icons/Edit.tsx","../src/icons/Quote.tsx","../src/icons/X.tsx","../src/icons/menu/AddImage.tsx","../src/icons/menu/AlignCenter.tsx","../src/icons/menu/AlignLeft.tsx","../src/icons/menu/AlignRight.tsx","../src/icons/menu/ArrowDown.tsx","../src/icons/menu/ArrowLeft.tsx","../src/icons/menu/ArrowRight.tsx","../src/icons/menu/ArrowUp.tsx","../src/icons/menu/Blockquote.tsx","../src/icons/menu/Bold.tsx","../src/icons/menu/BulletList.tsx","../src/icons/menu/CalloutError.tsx","../src/icons/menu/CalloutInfo.tsx","../src/icons/menu/CalloutSuccess.tsx","../src/icons/menu/CalloutWarning.tsx","../src/icons/menu/ClearFormatting.tsx","../src/icons/menu/CodeBlock.tsx","../src/icons/menu/Copyable.tsx","../src/icons/menu/CustomQuote.tsx","../src/icons/menu/DeleteColumn.tsx","../src/icons/menu/DeleteRow.tsx","../src/icons/menu/Details.tsx","../src/icons/menu/H2.tsx","../src/icons/menu/H3.tsx","../src/icons/menu/H4.tsx","../src/icons/menu/H5.tsx","../src/icons/menu/H6.tsx","../src/icons/menu/Highlight.tsx","../src/icons/menu/HorizontalRule.tsx","../src/icons/menu/Italic.tsx","../src/icons/menu/LinkOff.tsx","../src/icons/menu/Link.tsx","../src/icons/menu/Math.tsx","../src/icons/menu/MergeCells.tsx","../src/icons/menu/MythReality.tsx","../src/icons/menu/OrderedList.tsx","../src/icons/menu/Prompt.tsx","../src/icons/menu/Redo.tsx","../src/icons/menu/SplitCells.tsx","../src/icons/menu/Strikethrough.tsx","../src/icons/menu/Subscript.tsx","../src/icons/menu/Superscript.tsx","../src/icons/menu/TableColumnHeading.tsx","../src/icons/menu/TableRowHeading.tsx","../src/icons/menu/Table.tsx","../src/icons/menu/TextColor.tsx","../src/icons/menu/Underline.tsx","../src/icons/menu/Undo.tsx","../src/icons/menu/Video.tsx","../src/extensions/views/components/copy-button.tsx","../src/extensions/views/components/copyable-text.tsx","../src/extensions/views/components/custom-quote.tsx","../src/extensions/views/components/figure.tsx","../src/extensions/views/components/prompt.tsx","../src/utils/detect-video-hosting.ts","../src/extensions/views/components/video.tsx","../src/utils/html-to-tiptap-content.ts"],"sourcesContent":["import { renderToReactElement } from \"@tiptap/static-renderer/pm/react\";\nimport { ReactNode } from \"react\";\nimport { getRenderExtensions } from \"../extensions/render\";\nimport { getNodeMapping, markMapping } from \"./static-renderer-config\";\n\nimport \"highlight.js/styles/github-dark.css\";\nimport \"katex/dist/katex.min.css\";\n\ntype JSONContent = Record<string, any>;\n\ninterface TiptapRenderProps {\n /**\n * Tiptap JSON content (parsed object or JSON string)\n */\n content: JSONContent | string;\n /**\n * Function to resolve image URLs from file IDs\n * Used for static rendering of figure nodes with file references\n */\n getImageById?: (fileId: string) => string | null;\n}\n\nexport function renderTiptapToReact(\n content: JSONContent | string,\n getImageById?: (fileId: string) => string | null\n): ReactNode {\n let parsedContent: JSONContent;\n\n try {\n if (typeof content === \"string\") {\n parsedContent = JSON.parse(content);\n } else {\n parsedContent = content;\n }\n } catch (error) {\n console.warn(\"Failed to parse Tiptap content:\", error);\n parsedContent = { type: \"doc\", content: [{ type: \"paragraph\" }] };\n }\n\n const rendered = renderToReactElement({\n extensions: getRenderExtensions(),\n content: parsedContent,\n options: {\n nodeMapping: getNodeMapping(getImageById),\n markMapping,\n },\n });\n\n return (\n <div\n className=\"tiptap\"\n data-tiptap-render\n >\n {rendered}\n </div>\n );\n}\n\n/**\n * Server component that renders Tiptap JSON content as React\n *\n * Designed for Next.js Server Components. Converts Tiptap JSON to rendered React elements\n * without any client-side dependencies.\n *\n * @example\n * ```tsx\n * // app/blog/[slug]/page.tsx (Server Component)\n * import { TiptapRender } from '@cyberyozh/tiptap/server';\n *\n * export default function BlogPost({ article }) {\n * return (\n * <article>\n * <h1>{article.title}</h1>\n * <TiptapRender content={article.content} lang=\"en\" />\n * </article>\n * );\n * }\n * ```\n *\n * @example\n * ```tsx\n * // With custom image resolver\n * import { TiptapRender } from '@cyberyozh/tiptap/server';\n *\n * const getImageById = (fileId: string) => `/api/images/${fileId}`;\n *\n * export default function BlogPost({ article }) {\n * return (\n * <article>\n * <TiptapRender\n * content={article.content}\n * lang=\"en\"\n * getImageById={getImageById}\n * />\n * </article>\n * );\n * }\n * ```\n */\nexport function TiptapRender({ content, getImageById }: TiptapRenderProps) {\n return renderTiptapToReact(content, getImageById);\n}\n","import { Mathematics } from \"@tiptap/extension-mathematics\";\nimport { TableKit } from \"@tiptap/extension-table\";\n\nimport {\n BasePrompt,\n BasePromptContent,\n BasePromptHeader,\n BaseCallout,\n BaseCodeBlock,\n CopyableText,\n BaseCustomQuote,\n BaseCustomQuoteAuthor,\n BaseCustomQuoteSign,\n BaseCustomQuoteText,\n BaseVideo,\n BaseFigure,\n} from \"../base\";\nimport { getSharedExtensions } from \"@/utils/get-shared-extensions\";\nimport {\n BaseLegacyCustomBlockquote,\n BaseLegacyPromptSE,\n BaseLegacyPromptSEContent,\n BaseLegacyPromptSEHeader,\n BaseLegacyBookAlert,\n BaseLegacyBookTip,\n BaseLegacySEQuote,\n BaseLegacyYouTube,\n BaseLegacyFigure,\n} from \"../base/compatibility\";\n\nexport function getRenderExtensions() {\n const sharedExtensions = getSharedExtensions();\n\n return [\n ...sharedExtensions,\n CopyableText,\n BaseCallout,\n BaseCodeBlock,\n BaseCustomQuote,\n BaseCustomQuoteText,\n BaseCustomQuoteAuthor,\n BaseCustomQuoteSign,\n BasePrompt,\n BasePromptHeader,\n BasePromptContent,\n BaseVideo,\n BaseFigure,\n\n TableKit.configure({\n table: { resizable: false, renderWrapper: true },\n }),\n\n Mathematics.configure({\n katexOptions: {\n throwOnError: false,\n },\n }),\n\n // ========================================================================\n // Legacy Extensions (Deprecated - for backward compatibility only)\n // ========================================================================\n BaseLegacyBookAlert,\n BaseLegacyBookTip,\n BaseLegacySEQuote,\n BaseLegacyPromptSE,\n BaseLegacyPromptSEHeader,\n BaseLegacyPromptSEContent,\n BaseLegacyCustomBlockquote,\n BaseLegacyYouTube,\n BaseLegacyFigure,\n // Update\n ];\n}\n","import { Editor } from \"@tiptap/core\";\nimport { TextSelection } from \"@tiptap/pm/state\";\n\n/**\n * Handles exiting a node (like callout) when pressing Enter on an empty paragraph\n * @param editor - The Tiptap editor instance\n * @param nodeName - The name of the node type to exit from (e.g., 'callout')\n * @returns true if the exit was handled, false otherwise\n */\nexport function handleExitNode(editor: Editor, nodeName: string): boolean {\n const { view, schema } = editor;\n const { state } = view;\n const { selection } = state;\n\n const $pos = selection.$from;\n const currentNode = $pos.node();\n\n let depth = $pos.depth;\n let isInsideTargetNode = false;\n let targetNodeDepth = 0;\n while (depth > 0) {\n const parentNode = $pos.node(depth);\n if (parentNode.type.name === nodeName) {\n isInsideTargetNode = true;\n targetNodeDepth = depth;\n break;\n }\n depth--;\n }\n\n const isCurrentNodeEmptyParagraph =\n currentNode.type.name === \"paragraph\" && currentNode.content.size === 0;\n\n if (!isInsideTargetNode || !isCurrentNodeEmptyParagraph) {\n return false;\n }\n\n const { tr } = state;\n const posAfterTargetNode = $pos.after(targetNodeDepth);\n\n const targetNode = $pos.node(targetNodeDepth);\n let newPosAfterTargetNode = posAfterTargetNode;\n\n if (targetNode.childCount > 1) {\n const emptyParagraphStart = $pos.before();\n const emptyParagraphEnd = $pos.after();\n const deletionLength = emptyParagraphEnd - emptyParagraphStart;\n\n tr.delete(emptyParagraphStart, emptyParagraphEnd);\n newPosAfterTargetNode = posAfterTargetNode - deletionLength;\n }\n\n const paragraphNode = schema.nodes.paragraph.createAndFill();\n if (!paragraphNode) return false;\n\n tr.insert(newPosAfterTargetNode, paragraphNode);\n tr.setSelection(TextSelection.create(tr.doc, newPosAfterTargetNode + 1));\n\n view.dispatch(tr);\n return true;\n}\n","import { Editor } from \"@tiptap/core\";\n\nexport type CalloutType = \"info\" | \"warning\" | \"success\" | \"error\";\n\nconst legacyTypeMap: Record<string, CalloutType> = {\n question: \"info\",\n idea: \"warning\",\n info: \"success\",\n error: \"error\",\n};\n\nexport function migrateLegacyCallouts(editor: Editor) {\n const { doc, schema } = editor.state;\n const calloutsToMigrate: Array<{ node: any; pos: number }> = [];\n\n doc.descendants((node, pos) => {\n if (node.type.name === \"callout\" && node.attrs.calloutType) {\n calloutsToMigrate.push({ node, pos });\n }\n });\n\n if (calloutsToMigrate.length === 0) return;\n\n const tr = editor.state.tr;\n calloutsToMigrate.sort((a, b) => b.pos - a.pos);\n\n for (const { node, pos } of calloutsToMigrate) {\n const oldType = node.attrs.calloutType;\n const newType = legacyTypeMap[oldType] || oldType;\n const hasInlineContent = node.content.size > 0 && !node.firstChild?.isBlock;\n\n if (hasInlineContent) {\n const paragraph = schema.nodes.paragraph?.create(null, node.content);\n const newContent = paragraph ? [paragraph] : [];\n\n tr.replaceRangeWith(\n pos,\n pos + node.nodeSize,\n schema.nodes.callout.create(\n {\n type: newType,\n calloutType: null,\n callout: null,\n },\n newContent\n )\n );\n } else {\n tr.setNodeMarkup(pos, undefined, {\n ...node.attrs,\n type: newType,\n calloutType: null,\n callout: null,\n });\n }\n }\n\n editor.view.dispatch(tr);\n}\n","import { handleExitNode } from \"@/utils/handle-exit-node\";\nimport { migrateLegacyCallouts } from \"@/utils/migrate-legacy-callouts\";\nimport { mergeAttributes, Node } from \"@tiptap/core\";\n\nexport type CalloutType = \"info\" | \"warning\" | \"success\" | \"error\";\n\nconst legacyTypeMap: Record<string, CalloutType> = {\n question: \"info\",\n idea: \"warning\",\n info: \"success\",\n error: \"error\",\n};\n\nexport const BaseCallout = Node.create({\n name: \"callout\",\n\n group: \"block\",\n content: \"block+\",\n\n draggable: true,\n isolating: true,\n\n addAttributes() {\n return {\n type: {\n default: \"info\" as CalloutType,\n\n parseHTML: (element) => {\n if (typeof element === \"string\") return \"info\";\n\n const dataCallout = element.getAttribute(\"data-callout\");\n\n if (dataCallout) {\n return dataCallout as CalloutType;\n }\n\n const legacyType = element.getAttribute(\"calloutType\");\n if (legacyType) {\n return legacyTypeMap[legacyType];\n }\n\n if (element.classList) {\n if (element.classList.contains(\"callout--error\")) return \"error\";\n if (element.classList.contains(\"callout--question\")) return \"info\";\n if (element.classList.contains(\"callout--idea\")) return \"warning\";\n if (element.classList.contains(\"callout--info\")) return \"success\";\n }\n\n return \"info\";\n },\n renderHTML: (attributes) => {\n return {\n \"data-callout\": attributes.type,\n };\n },\n },\n bgColor: {\n default: null,\n parseHTML: (element) => {\n if (typeof element === \"string\") return null;\n return element.getAttribute(\"data-bg-color\");\n },\n renderHTML: (attributes) => {\n if (!attributes.bgColor) return {};\n return {\n \"data-bg-color\": attributes.bgColor,\n };\n },\n },\n emoji: {\n default: null,\n parseHTML: (element) => {\n if (typeof element === \"string\") return null;\n return element.getAttribute(\"data-emoji\");\n },\n renderHTML: (attributes) => {\n if (!attributes.emoji) return {};\n return {\n \"data-emoji\": attributes.emoji,\n };\n },\n },\n calloutType: {\n default: null,\n parseHTML: (element) => element.getAttribute(\"calloutType\"),\n renderHTML: () => ({}),\n },\n callout: {\n default: null,\n parseHTML: (element) => element.getAttribute(\"callout\"),\n renderHTML: () => ({}),\n },\n };\n },\n\n onCreate() {\n migrateLegacyCallouts(this.editor);\n },\n\n addKeyboardShortcuts() {\n return {\n Enter: () => handleExitNode(this.editor, this.name),\n };\n },\n\n parseHTML() {\n return [\n {\n tag: \"div[data-callout]\",\n },\n {\n tag: \"callout\",\n priority: 51,\n },\n {\n tag: \"div\",\n priority: 50,\n getAttrs: (element) => {\n if (typeof element === \"string\") return false;\n if (\n element.classList.contains(\"callout\") ||\n element.classList.contains(\"callout--error\") ||\n element.classList.contains(\"callout--question\") ||\n element.classList.contains(\"callout--idea\") ||\n element.classList.contains(\"callout--info\")\n ) {\n return {};\n }\n return false;\n },\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"div\", mergeAttributes(HTMLAttributes), 0];\n },\n});\n","import { CodeBlockLowlight } from \"@tiptap/extension-code-block-lowlight\";\nimport html from \"highlight.js/lib/languages/xml\";\nimport { common, createLowlight } from \"lowlight\";\n\nconst lowlight = createLowlight(common);\nlowlight.register(\"html\", html);\n\nexport const BaseCodeBlock = CodeBlockLowlight.configure({\n lowlight,\n}).extend({\n selectable: false,\n draggable: true,\n\n addAttributes() {\n return {\n language: {\n default: null,\n parseHTML: (element: HTMLElement) => {\n return element.querySelector(\"code\")?.getAttribute(\"data-language\") || \"bash\";\n },\n },\n };\n },\n});\n","import { Mark, mergeAttributes } from \"@tiptap/core\";\n\ndeclare module \"@tiptap/core\" {\n interface Commands<ReturnType> {\n copyable: {\n setCopyable: (attributes?: { class: \"copyable\" }) => ReturnType;\n toggleCopyable: (attributes?: { class: \"copyable\" }) => ReturnType;\n unsetCopyable: () => ReturnType;\n };\n }\n}\n\nexport const CopyableText = Mark.create({\n name: \"copyable-text\",\n\n addOptions() {\n return {\n HTMLAttributes: {\n class: \"copyable\",\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: \"span\",\n getAttrs: (element) => (element.classList.contains(\"copyable\") ? {} : false),\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"span\", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];\n },\n\n addCommands() {\n return {\n setCopyable:\n (attributes) =>\n ({ commands }) => {\n return commands.setMark(this.name, attributes);\n },\n toggleCopyable:\n (attributes) =>\n ({ commands }) => {\n return commands.toggleMark(this.name, attributes);\n },\n unsetCopyable:\n () =>\n ({ commands }) => {\n return commands.unsetMark(this.name);\n },\n };\n },\n});\n","import { mergeAttributes, Node } from \"@tiptap/core\";\nimport { TextSelection } from \"@tiptap/pm/state\";\n\nexport const BaseCustomQuote = Node.create({\n name: \"customQuote\",\n group: \"block\",\n content: \"customQuoteText customQuoteAuthor customQuoteSign\",\n selectable: false,\n draggable: true,\n isolating: true,\n\n addKeyboardShortcuts() {\n return {\n Enter: () => {\n const { view, schema } = this.editor;\n const { state } = view;\n const { selection } = state;\n\n const $pos = selection.$from;\n let depth = $pos.depth;\n let isInsideCustomQuote = false;\n\n while (depth > 0) {\n const parentNode = $pos.node(depth);\n if (parentNode.type.name === this.name) {\n isInsideCustomQuote = true;\n break;\n }\n depth--;\n }\n\n if (!isInsideCustomQuote) {\n return false;\n }\n\n const { tr } = state;\n const posAfter = $pos.after(depth);\n\n const paragraphNode = schema.nodes.paragraph.createAndFill();\n if (!paragraphNode) return false;\n\n tr.insert(posAfter, paragraphNode);\n tr.setSelection(TextSelection.create(tr.doc, posAfter + 1));\n view.dispatch(tr);\n\n return true;\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: \"div[data-custom-quote]\",\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"div\", mergeAttributes(HTMLAttributes, { \"data-custom-quote\": \"\" }), 0];\n },\n});\n\nexport const BaseCustomQuoteText = Node.create({\n name: \"customQuoteText\",\n group: \"block\",\n content: \"inline*\",\n draggable: false,\n selectable: true,\n\n addAttributes() {\n return {\n open: {\n default: true,\n },\n };\n },\n\n addKeyboardShortcuts() {\n return {\n Enter: () => {\n const { view, state } = this.editor;\n const { tr, selection } = state;\n const { $from } = selection;\n\n if ($from.parent.type.name !== \"customQuoteText\") {\n return false;\n }\n\n const posAfter = $from.after();\n const nextNode = state.doc.nodeAt(posAfter);\n if (!nextNode || nextNode.type.name !== \"customQuoteAuthor\") return false;\n\n const nextNodeEnd = posAfter + nextNode.nodeSize - 1;\n tr.setSelection(TextSelection.create(tr.doc, nextNodeEnd));\n view.dispatch(tr);\n return true;\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: \"div[data-custom-quote-text]\",\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"div\", mergeAttributes(HTMLAttributes, { \"data-custom-quote-text\": \"\" }), 0];\n },\n});\n\nexport const BaseCustomQuoteAuthor = Node.create({\n name: \"customQuoteAuthor\",\n group: \"block\",\n content: \"inline*\",\n selectable: true,\n\n addKeyboardShortcuts() {\n return {\n Enter: () => {\n const { view, state } = this.editor;\n const { tr, selection } = state;\n const { $from } = selection;\n\n if ($from.parent.type.name !== \"customQuoteAuthor\") {\n return false;\n }\n\n const posAfter = $from.after();\n const nextNode = state.doc.nodeAt(posAfter);\n if (!nextNode || nextNode.type.name !== \"customQuoteSign\") return false;\n\n const nextNodeEnd = posAfter + nextNode.nodeSize - 1;\n tr.setSelection(TextSelection.create(tr.doc, nextNodeEnd));\n view.dispatch(tr);\n return true;\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: \"div[data-custom-quote-author]\",\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"div\", mergeAttributes(HTMLAttributes, { \"data-custom-quote-author\": \"\" }), 0];\n },\n});\n\nexport const BaseCustomQuoteSign = Node.create({\n name: \"customQuoteSign\",\n group: \"block\",\n content: \"inline*\",\n selectable: true,\n\n parseHTML() {\n return [\n {\n tag: \"div[data-custom-quote-sign]\",\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"div\", mergeAttributes(HTMLAttributes, { \"data-custom-quote-sign\": \"\" }), 0];\n },\n});\n","import Link from \"@tiptap/extension-link\";\n\nexport const LinkExtension = Link.extend({\n addOptions() {\n return {\n ...this.parent?.(),\n openOnClick: false,\n linkOnPaste: true,\n autolink: true,\n protocols: [\"http\", \"https\", \"mailto\", \"tel\"],\n };\n },\n}).configure({\n openOnClick: false,\n linkOnPaste: true,\n autolink: true,\n protocols: [\"http\", \"https\", \"mailto\", \"tel\"],\n});\n","import { mergeAttributes, Node } from \"@tiptap/core\";\nimport { TextSelection } from \"@tiptap/pm/state\";\nimport { handleExitNode } from \"../../utils/handle-exit-node\";\n\nexport const BaseMythRealityBlock = Node.create({\n name: \"mythRealityBlock\",\n\n group: \"block\",\n content: \"block+\",\n\n parseHTML() {\n return [{ tag: \"div[data-myth-reality-block]\" }];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\n \"div\",\n mergeAttributes(HTMLAttributes, { \"data-myth-reality-block\": \"\" }),\n [\"div\", { class: \"myth-reality-block-content\" }, 0],\n ];\n },\n});\n\nexport const BaseMythReality = Node.create({\n name: \"mythReality\",\n group: \"block\",\n content: \"(mythRealityBlock) (mythRealityBlock)\",\n\n draggable: true,\n isolating: true,\n\n parseHTML() {\n return [{ tag: \"div[data-myth-reality]\" }];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"div\", mergeAttributes(HTMLAttributes, { \"data-myth-reality\": \"\" }), 0];\n },\n\n addKeyboardShortcuts() {\n return {\n Enter: () => handleExitNode(this.editor, this.name),\n };\n },\n});\n","import { Node, mergeAttributes } from \"@tiptap/core\";\nimport { TextSelection } from \"@tiptap/pm/state\";\n\nexport const BasePrompt = Node.create({\n name: \"prompt\",\n group: \"block\",\n content: \"(promptHeader | promptV2Header) (promptContent | promptV2Content)\",\n selectable: false,\n draggable: true,\n\n addKeyboardShortcuts() {\n return {\n Enter: () => {\n const { view, schema } = this.editor;\n const { state } = view;\n const { selection } = state;\n\n const $pos = selection.$from;\n let depth = $pos.depth;\n let isInsidePrompt = false;\n\n while (depth > 0) {\n const parentNode = $pos.node(depth);\n if (parentNode.type.name === this.name) {\n isInsidePrompt = true;\n break;\n }\n depth--;\n }\n\n if (!isInsidePrompt) {\n return false;\n }\n\n const { tr } = state;\n const posAfter = $pos.after(depth);\n\n const paragraphNode = schema.nodes.paragraph.createAndFill();\n if (!paragraphNode) return false;\n\n tr.insert(posAfter, paragraphNode);\n tr.setSelection(TextSelection.create(tr.doc, posAfter + 1));\n view.dispatch(tr);\n\n return true;\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: \"div[data-prompt]\",\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"div\", mergeAttributes(HTMLAttributes, { \"data-prompt\": \"\" }), 0];\n },\n});\n\nexport const BasePromptHeader = Node.create({\n name: \"promptHeader\",\n group: \"block\",\n content: \"inline*\",\n selectable: true,\n draggable: false,\n\n parseHTML() {\n return [\n {\n tag: \"div[data-prompt-header]\",\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"div\", mergeAttributes(HTMLAttributes, { \"data-prompt-header\": \"\" }), 0];\n },\n\n // addNodeView() {\n // return ReactNodeViewRenderer(PromptHeaderView);\n // },\n});\n\nexport const BasePromptContent = Node.create({\n name: \"promptContent\",\n group: \"block\",\n content: \"text*\",\n draggable: false,\n selectable: true,\n\n parseHTML() {\n return [\n {\n tag: \"div[data-prompt-content]\",\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"div\", mergeAttributes(HTMLAttributes, { \"data-prompt-content\": \"\" }), 0];\n },\n\n // addNodeView() {\n // return ReactNodeViewRenderer(PromptContentView);\n // },\n});\n","import { Node } from \"@tiptap/core\";\n\nexport const BaseVideo = Node.create({\n name: \"video\",\n group: \"block\",\n selectable: true,\n draggable: true,\n isolating: true,\n\n addAttributes() {\n return {\n src: {\n default: null,\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: \"video-embed\",\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"video-embed\", HTMLAttributes];\n },\n});\n","import { mergeAttributes, nodePasteRule } from \"@tiptap/core\";\nimport Image, { ImageOptions } from \"@tiptap/extension-image\";\nimport { resolveImageSrc } from \"../../utils/image-src-resolver\";\nimport type { FigureAttrs } from \"../../types\";\n\nexport interface FigureOptions extends ImageOptions {\n getImageById?: (fileId: string) => string | null;\n onFigureClick?: (attrs: FigureAttrs, pos: number) => void;\n}\n\ndeclare module \"@tiptap/core\" {\n interface Commands<ReturnType> {\n figure: {\n setFigure: (options: FigureAttrs) => ReturnType;\n updateFigure: (options: Partial<FigureAttrs>) => ReturnType;\n };\n }\n}\n\nexport const BaseFigure = Image.extend<FigureOptions>({\n name: \"image\",\n group: \"block\",\n content: \"\",\n draggable: true,\n isolating: true,\n selectable: false,\n\n addOptions() {\n const parentOptions = this.parent?.() || {};\n return {\n ...parentOptions,\n getImageById: undefined,\n onFigureClick: undefined,\n } as FigureOptions;\n },\n\n addAttributes() {\n return {\n ...this.parent?.(),\n fileId: {\n default: null,\n parseHTML: (element) => {\n const img = element.querySelector(\"img\") || element;\n return img.getAttribute(\"data-file-id\") || element.getAttribute(\"data-file-id\");\n },\n renderHTML: (attributes) => {\n if (!attributes.fileId) return {};\n return { \"data-file-id\": attributes.fileId };\n },\n },\n caption: {\n default: null,\n parseHTML: (element) => element.querySelector(\"figcaption\")?.textContent || null,\n },\n storageKey: {\n default: null,\n parseHTML: (element) => element.getAttribute(\"data-storage-key\"),\n renderHTML: (attributes) => ({\n \"data-storage-key\": attributes.storageKey,\n }),\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: \"figure\",\n getAttrs: (element) => {\n if (typeof element === \"string\") return false;\n const img = element.querySelector(\"img\");\n return img ? {} : false;\n },\n },\n {\n tag: \"img[src]\",\n getAttrs: (element) => {\n if (typeof element === \"string\") return false;\n return {};\n },\n },\n ];\n },\n\n renderHTML({ node }) {\n const resolvedSrc = resolveImageSrc(\n {\n fileId: node.attrs.fileId,\n src: node.attrs.src,\n },\n { getImageById: this.options.getImageById }\n );\n\n const figureAttrs = mergeAttributes(this.options.HTMLAttributes);\n\n const imgAttrs: Record<string, unknown> = {\n src: resolvedSrc,\n };\n\n if (node.attrs.fileId) imgAttrs[\"data-file-id\"] = node.attrs.fileId;\n if (node.attrs.alt) imgAttrs.alt = node.attrs.alt;\n if (node.attrs.title) imgAttrs.title = node.attrs.title;\n if (node.attrs.width) imgAttrs.width = node.attrs.width;\n if (node.attrs.height) imgAttrs.height = node.attrs.height;\n\n const hasCaption = node.attrs.caption && node.attrs.caption.trim().length > 0;\n const figcaptionContent = hasCaption ? [\"figcaption\", {}, node.attrs.caption] : null;\n\n return [\n \"figure\",\n figureAttrs,\n [\"img\", imgAttrs],\n ...(figcaptionContent ? [figcaptionContent] : []),\n ];\n },\n\n addCommands() {\n return {\n ...this.parent?.(),\n setFigure:\n (options: FigureAttrs) =>\n ({ commands }) => {\n return commands.insertContent({\n type: this.name,\n attrs: options,\n });\n },\n updateFigure:\n (options: Partial<FigureAttrs>) =>\n ({ commands }) => {\n return commands.updateAttributes(this.name, options);\n },\n };\n },\n\n addPasteRules() {\n return [\n nodePasteRule({\n find: /!\\[(.*?)\\]\\((.*?)(?:\\s+\"(.*?)\")?\\)/g,\n type: this.type,\n getAttributes: (match) => {\n const [, alt, src, title] = match;\n return { src, alt, title };\n },\n }),\n ];\n },\n});\n","/**\n * Utility for resolving image sources from fileId or direct src\n */\n\nexport interface ImageSrcResolverOptions {\n /**\n * Optional function to resolve fileId to URL\n * If not provided, fileId will be used as-is or src will be used\n */\n getImageById?: (fileId: string) => string | null;\n}\n\nexport interface ImageAttributes {\n fileId?: string | null;\n src?: string | null;\n}\n\n/**\n * Resolves image src with clear priority:\n * 1. If fileId exists AND getImageById provided → resolve via getImageById(fileId)\n * 2. If no fileId OR no getImageById → use src/fileUrl directly\n * 3. If both missing → return empty string (error state)\n *\n * Clear separation:\n * - fileId workflow: fileId + getImageById() → resolved URL\n * - Direct URL workflow: fileUrl/src → used as-is\n */\nexport function resolveImageSrc(attrs: ImageAttributes, options?: ImageSrcResolverOptions): string {\n const { fileId, src } = attrs;\n const { getImageById } = options || {};\n\n // Path 1: FileId workflow with resolution function\n if (fileId && getImageById) {\n const resolvedSrc = getImageById(fileId);\n if (resolvedSrc) {\n return resolvedSrc;\n }\n // If resolution fails, this is an error - return empty to show broken image\n console.warn(`Failed to resolve fileId: ${fileId}`);\n return \"\";\n }\n\n // Path 2: Direct URL workflow (fileUrl/src)\n if (src) {\n return src;\n }\n\n // Path 3: FileId without getImageById (legacy or misconfigured)\n if (fileId) {\n console.warn(\"fileId provided but no getImageById function - cannot resolve image\");\n return \"\";\n }\n\n // Error state: no way to display image\n return \"\";\n}\n\n/**\n * Normalizes attributes for storage\n * Prefers fileId over src if both are provided\n */\nexport function normalizeImageAttributes(attrs: ImageAttributes): ImageAttributes {\n if (attrs.fileId) {\n // If fileId exists, it's the source of truth\n return {\n fileId: attrs.fileId,\n };\n }\n\n // Otherwise use src\n return {\n src: attrs.src,\n };\n}\n","import StarterKit from \"@tiptap/starter-kit\";\nimport { Details, DetailsContent, DetailsSummary } from \"@tiptap/extension-details\";\nimport Highlight from \"@tiptap/extension-highlight\";\nimport { LinkExtension, BaseMythReality, BaseMythRealityBlock } from \"@/extensions/base\";\nimport Subscript from \"@tiptap/extension-subscript\";\nimport Superscript from \"@tiptap/extension-superscript\";\nimport TextAlign from \"@tiptap/extension-text-align\";\nimport { TextStyleKit } from \"@tiptap/extension-text-style\";\nimport { LegacyInlineLatexSE } from \"@/extensions/base/compatibility\";\n\n/**\n * Get all Tiptap extensions for editing and rendering without ReactNodeViewRenderer for Editor\n * Can be used for both static render and editor\n */\nexport function getSharedExtensions() {\n return [\n StarterKit.configure({\n codeBlock: false,\n link: false,\n }),\n Highlight.configure({ multicolor: true }),\n LinkExtension,\n Superscript,\n Subscript,\n TextAlign.configure({\n types: [\"heading\", \"paragraph\"],\n }),\n TextStyleKit.configure({\n color: {\n types: [\"textStyle\"],\n },\n }),\n Details.configure({\n persist: true,\n HTMLAttributes: {\n class: \"details\",\n },\n }),\n DetailsSummary,\n DetailsContent,\n BaseMythReality,\n BaseMythRealityBlock,\n LegacyInlineLatexSE,\n ];\n}\n","import { Mark, mergeAttributes } from '@tiptap/core'\n\nimport type { TextStyleAttributes } from '../index.js'\n\nexport interface TextStyleOptions {\n /**\n * HTML attributes to add to the span element.\n * @default {}\n * @example { class: 'foo' }\n */\n HTMLAttributes: Record<string, any>\n /**\n * When enabled, merges the styles of nested spans into the child span during HTML parsing.\n * This prioritizes the style of the child span.\n * Used when parsing content created in other editors.\n * (Fix for ProseMirror's default behavior.)\n * @default true\n */\n mergeNestedSpanStyles: boolean\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n textStyle: {\n /**\n * Remove spans without inline style attributes.\n * @example editor.commands.removeEmptyTextStyle()\n */\n removeEmptyTextStyle: () => ReturnType\n /**\n * Toggle a text style\n * @param attributes The text style attributes\n * @example editor.commands.toggleTextStyle({ fontWeight: 'bold' })\n */\n toggleTextStyle: (attributes?: TextStyleAttributes) => ReturnType\n }\n }\n}\n\nconst MAX_FIND_CHILD_SPAN_DEPTH = 20\n\n/**\n * Returns all next child spans, either direct children or nested deeper\n * but won't traverse deeper into child spans found, will only go MAX_FIND_CHILD_SPAN_DEPTH levels deep (default: 20)\n */\nconst findChildSpans = (element: HTMLElement, depth = 0): HTMLElement[] => {\n const childSpans: HTMLElement[] = []\n\n if (!element.children.length || depth > MAX_FIND_CHILD_SPAN_DEPTH) {\n return childSpans\n }\n\n Array.from(element.children).forEach(child => {\n if (child.tagName === 'SPAN') {\n childSpans.push(child as HTMLElement)\n } else if (child.children.length) {\n childSpans.push(...findChildSpans(child as HTMLElement, depth + 1))\n }\n })\n\n return childSpans\n}\n\nconst mergeNestedSpanStyles = (element: HTMLElement) => {\n if (!element.children.length) {\n return\n }\n\n const childSpans = findChildSpans(element)\n\n if (!childSpans) {\n return\n }\n\n childSpans.forEach(childSpan => {\n const childStyle = childSpan.getAttribute('style')\n const closestParentSpanStyleOfChild = childSpan.parentElement?.closest('span')?.getAttribute('style')\n\n childSpan.setAttribute('style', `${closestParentSpanStyleOfChild};${childStyle}`)\n })\n}\n\n/**\n * This extension allows you to create text styles. It is required by default\n * for the `text-color` and `font-family` extensions.\n * @see https://www.tiptap.dev/api/marks/text-style\n */\nexport const TextStyle = Mark.create<TextStyleOptions>({\n name: 'textStyle',\n\n priority: 101,\n\n addOptions() {\n return {\n HTMLAttributes: {},\n mergeNestedSpanStyles: true,\n }\n },\n\n parseHTML() {\n return [\n {\n tag: 'span',\n consuming: false,\n getAttrs: element => {\n const hasStyles = (element as HTMLElement).hasAttribute('style')\n\n if (!hasStyles) {\n return false\n }\n\n if (this.options.mergeNestedSpanStyles) {\n mergeNestedSpanStyles(element)\n }\n\n return {}\n },\n },\n ]\n },\n\n renderHTML({ HTMLAttributes }) {\n return ['span', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]\n },\n\n addCommands() {\n return {\n toggleTextStyle:\n attributes =>\n ({ commands }) => {\n return commands.toggleMark(this.name, attributes)\n },\n removeEmptyTextStyle:\n () =>\n ({ tr }) => {\n const { selection } = tr\n\n // Gather all of the nodes within the selection range.\n // We would need to go through each node individually\n // to check if it has any inline style attributes.\n // Otherwise, calling commands.unsetMark(this.name)\n // removes everything from all the nodes\n // within the selection range.\n tr.doc.nodesBetween(selection.from, selection.to, (node, pos) => {\n // Check if it's a paragraph element, if so, skip this node as we apply\n // the text style to inline text nodes only (span).\n if (node.isTextblock) {\n return true\n }\n\n // Check if the node has no inline style attributes.\n // Filter out non-`textStyle` marks.\n if (\n !node.marks\n .filter(mark => mark.type === this.type)\n .some(mark => Object.values(mark.attrs).some(value => !!value))\n ) {\n // Proceed with the removal of the `textStyle` mark for this node only\n tr.removeMark(pos, pos + node.nodeSize, this.type)\n }\n })\n\n return true\n },\n }\n },\n})\n","import '../text-style/index.js'\n\nimport { Extension } from '@tiptap/core'\n\nexport type BackgroundColorOptions = {\n /**\n * The types where the color can be applied\n * @default ['textStyle']\n * @example ['heading', 'paragraph']\n */\n types: string[]\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n backgroundColor: {\n /**\n * Set the text color\n * @param backgroundColor The color to set\n * @example editor.commands.setColor('red')\n */\n setBackgroundColor: (backgroundColor: string) => ReturnType\n\n /**\n * Unset the text backgroundColor\n * @example editor.commands.unsetBackgroundColor()\n */\n unsetBackgroundColor: () => ReturnType\n }\n }\n}\n\n// @ts-ignore because the module is not found during dts build\ndeclare module '@tiptap/extension-text-style' {\n interface TextStyleAttributes {\n backgroundColor?: string | null\n }\n}\n\n/**\n * This extension allows you to color your text.\n * @see https://tiptap.dev/api/extensions/background-color\n */\nexport const BackgroundColor = Extension.create<BackgroundColorOptions>({\n name: 'backgroundColor',\n\n addOptions() {\n return {\n types: ['textStyle'],\n }\n },\n\n addGlobalAttributes() {\n return [\n {\n types: this.options.types,\n attributes: {\n backgroundColor: {\n default: null,\n parseHTML: element => {\n // Prefer the raw inline `style` attribute so we preserve\n // the original format (e.g. `#rrggbb`) instead of the\n // computed `rgb(...)` value returned by `element.style.backgroundColor`.\n // When nested spans are merged the style attribute may contain\n // multiple `background-color:` declarations (parent;child). We should pick\n // the last declaration so the child's background color takes priority.\n const styleAttr = element.getAttribute('style')\n if (styleAttr) {\n const decls = styleAttr\n .split(';')\n .map(s => s.trim())\n .filter(Boolean)\n for (let i = decls.length - 1; i >= 0; i -= 1) {\n const parts = decls[i].split(':')\n if (parts.length >= 2) {\n const prop = parts[0].trim().toLowerCase()\n const val = parts.slice(1).join(':').trim()\n if (prop === 'background-color') {\n return val.replace(/['\"]+/g, '')\n }\n }\n }\n }\n\n return element.style.backgroundColor?.replace(/['\"]+/g, '')\n },\n renderHTML: attributes => {\n if (!attributes.backgroundColor) {\n return {}\n }\n\n return {\n style: `background-color: ${attributes.backgroundColor}`,\n }\n },\n },\n },\n },\n ]\n },\n\n addCommands() {\n return {\n setBackgroundColor:\n backgroundColor =>\n ({ chain }) => {\n return chain().setMark('textStyle', { backgroundColor }).run()\n },\n unsetBackgroundColor:\n () =>\n ({ chain }) => {\n return chain().setMark('textStyle', { backgroundColor: null }).removeEmptyTextStyle().run()\n },\n }\n },\n})\n","import '../text-style/index.js'\n\nimport { Extension } from '@tiptap/core'\n\nexport type ColorOptions = {\n /**\n * The types where the color can be applied\n * @default ['textStyle']\n * @example ['heading', 'paragraph']\n */\n types: string[]\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n color: {\n /**\n * Set the text color\n * @param color The color to set\n * @example editor.commands.setColor('red')\n */\n setColor: (color: string) => ReturnType\n\n /**\n * Unset the text color\n * @example editor.commands.unsetColor()\n */\n unsetColor: () => ReturnType\n }\n }\n}\n\n// @ts-ignore because the module is not found during dts build\ndeclare module '@tiptap/extension-text-style' {\n interface TextStyleAttributes {\n color?: string | null\n }\n}\n\n/**\n * This extension allows you to color your text.\n * @see https://tiptap.dev/api/extensions/color\n */\nexport const Color = Extension.create<ColorOptions>({\n name: 'color',\n\n addOptions() {\n return {\n types: ['textStyle'],\n }\n },\n\n addGlobalAttributes() {\n return [\n {\n types: this.options.types,\n attributes: {\n color: {\n default: null,\n parseHTML: element => {\n // Prefer the raw inline `style` attribute so we preserve\n // the original format (e.g. `#rrggbb`) instead of the\n // computed `rgb(...)` value returned by `element.style.color`.\n // When nested spans are merged the style attribute may contain\n // multiple `color:` declarations (parent;child). We should pick\n // the last declaration so the child's color takes priority.\n const styleAttr = element.getAttribute('style')\n if (styleAttr) {\n const decls = styleAttr\n .split(';')\n .map(s => s.trim())\n .filter(Boolean)\n for (let i = decls.length - 1; i >= 0; i -= 1) {\n const parts = decls[i].split(':')\n if (parts.length >= 2) {\n const prop = parts[0].trim().toLowerCase()\n const val = parts.slice(1).join(':').trim()\n if (prop === 'color') {\n return val.replace(/['\"]+/g, '')\n }\n }\n }\n }\n\n return element.style.color?.replace(/['\"]+/g, '')\n },\n renderHTML: attributes => {\n if (!attributes.color) {\n return {}\n }\n\n return {\n style: `color: ${attributes.color}`,\n }\n },\n },\n },\n },\n ]\n },\n\n addCommands() {\n return {\n setColor:\n color =>\n ({ chain }) => {\n return chain().setMark('textStyle', { color }).run()\n },\n unsetColor:\n () =>\n ({ chain }) => {\n return chain().setMark('textStyle', { color: null }).removeEmptyTextStyle().run()\n },\n }\n },\n})\n","import '../text-style/index.js'\n\nimport { Extension } from '@tiptap/core'\n\nexport type FontFamilyOptions = {\n /**\n * A list of node names where the font family can be applied.\n * @default ['textStyle']\n * @example ['heading', 'paragraph']\n */\n types: string[]\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n fontFamily: {\n /**\n * Set the font family\n * @param fontFamily The font family\n * @example editor.commands.setFontFamily('Arial')\n */\n setFontFamily: (fontFamily: string) => ReturnType\n /**\n * Unset the font family\n * @example editor.commands.unsetFontFamily()\n */\n unsetFontFamily: () => ReturnType\n }\n }\n}\n\n// @ts-ignore because the module is not found during dts build\ndeclare module '@tiptap/extension-text-style' {\n interface TextStyleAttributes {\n fontFamily?: string | null\n }\n}\n\n/**\n * This extension allows you to set a font family for text.\n * @see https://www.tiptap.dev/api/extensions/font-family\n */\nexport const FontFamily = Extension.create<FontFamilyOptions>({\n name: 'fontFamily',\n\n addOptions() {\n return {\n types: ['textStyle'],\n }\n },\n\n addGlobalAttributes() {\n return [\n {\n types: this.options.types,\n attributes: {\n fontFamily: {\n default: null,\n parseHTML: element => element.style.fontFamily,\n renderHTML: attributes => {\n if (!attributes.fontFamily) {\n return {}\n }\n\n return {\n style: `font-family: ${attributes.fontFamily}`,\n }\n },\n },\n },\n },\n ]\n },\n\n addCommands() {\n return {\n setFontFamily:\n fontFamily =>\n ({ chain }) => {\n return chain().setMark('textStyle', { fontFamily }).run()\n },\n unsetFontFamily:\n () =>\n ({ chain }) => {\n return chain().setMark('textStyle', { fontFamily: null }).removeEmptyTextStyle().run()\n },\n }\n },\n})\n","import '../text-style/index.js'\n\nimport { Extension } from '@tiptap/core'\n\nexport type FontSizeOptions = {\n /**\n * A list of node names where the font size can be applied.\n * @default ['textStyle']\n * @example ['heading', 'paragraph']\n */\n types: string[]\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n fontSize: {\n /**\n * Set the font size\n * @param fontSize The font size\n * @example editor.commands.setFontSize('16px')\n */\n setFontSize: (fontSize: string) => ReturnType\n /**\n * Unset the font size\n * @example editor.commands.unsetFontSize()\n */\n unsetFontSize: () => ReturnType\n }\n }\n}\n\n// @ts-ignore because the module is not found during dts build\ndeclare module '@tiptap/extension-text-style' {\n interface TextStyleAttributes {\n fontSize?: string | null\n }\n}\n\n/**\n * This extension allows you to set a font size for text.\n * @see https://www.tiptap.dev/api/extensions/font-size\n */\nexport const FontSize = Extension.create<FontSizeOptions>({\n name: 'fontSize',\n\n addOptions() {\n return {\n types: ['textStyle'],\n }\n },\n\n addGlobalAttributes() {\n return [\n {\n types: this.options.types,\n attributes: {\n fontSize: {\n default: null,\n parseHTML: element => element.style.fontSize,\n renderHTML: attributes => {\n if (!attributes.fontSize) {\n return {}\n }\n\n return {\n style: `font-size: ${attributes.fontSize}`,\n }\n },\n },\n },\n },\n ]\n },\n\n addCommands() {\n return {\n setFontSize:\n fontSize =>\n ({ chain }) => {\n return chain().setMark('textStyle', { fontSize }).run()\n },\n unsetFontSize:\n () =>\n ({ chain }) => {\n return chain().setMark('textStyle', { fontSize: null }).removeEmptyTextStyle().run()\n },\n }\n },\n})\n","import '../text-style/index.js'\n\nimport { Extension } from '@tiptap/core'\n\nexport type LineHeightOptions = {\n /**\n * A list of node names where the line height can be applied.\n * @default ['textStyle']\n * @example ['heading', 'paragraph']\n */\n types: string[]\n}\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n lineHeight: {\n /**\n * Set the line height\n * @param lineHeight The line height\n * @example editor.commands.setLineHeight('1.5')\n */\n setLineHeight: (lineHeight: string) => ReturnType\n /**\n * Unset the line height\n * @example editor.commands.unsetLineHeight()\n */\n unsetLineHeight: () => ReturnType\n }\n }\n}\n\n// @ts-ignore because the module is not found during dts build\ndeclare module '@tiptap/extension-text-style' {\n interface TextStyleAttributes {\n lineHeight?: string | null\n }\n}\n\n/**\n * This extension allows you to set the line-height for text.\n * @see https://www.tiptap.dev/api/extensions/line-height\n */\nexport const LineHeight = Extension.create<LineHeightOptions>({\n name: 'lineHeight',\n\n addOptions() {\n return {\n types: ['textStyle'],\n }\n },\n\n addGlobalAttributes() {\n return [\n {\n types: this.options.types,\n attributes: {\n lineHeight: {\n default: null,\n parseHTML: element => element.style.lineHeight,\n renderHTML: attributes => {\n if (!attributes.lineHeight) {\n return {}\n }\n\n return {\n style: `line-height: ${attributes.lineHeight}`,\n }\n },\n },\n },\n },\n ]\n },\n\n addCommands() {\n return {\n setLineHeight:\n lineHeight =>\n ({ chain }) => {\n return chain().setMark('textStyle', { lineHeight }).run()\n },\n unsetLineHeight:\n () =>\n ({ chain }) => {\n return chain().setMark('textStyle', { lineHeight: null }).removeEmptyTextStyle().run()\n },\n }\n },\n})\n","import { Extension } from '@tiptap/core'\n\nimport type { BackgroundColorOptions } from '../background-color/index.js'\nimport { BackgroundColor } from '../background-color/index.js'\nimport type { ColorOptions } from '../color/index.js'\nimport { Color } from '../color/index.js'\nimport type { FontFamilyOptions } from '../font-family/index.js'\nimport { FontFamily } from '../font-family/index.js'\nimport type { FontSizeOptions } from '../font-size/index.js'\nimport { FontSize } from '../font-size/index.js'\nimport type { LineHeightOptions } from '../line-height/index.js'\nimport { LineHeight } from '../line-height/index.js'\nimport type { TextStyleOptions } from '../text-style/index.js'\nimport { TextStyle } from '../text-style/index.js'\n\nexport interface TextStyleKitOptions {\n /**\n * If set to false, the background color extension will not be registered\n * @example backgroundColor: false\n */\n backgroundColor: Partial<BackgroundColorOptions> | false\n /**\n * If set to false, the color extension will not be registered\n * @example color: false\n */\n color: Partial<ColorOptions> | false\n /**\n * If set to false, the font family extension will not be registered\n * @example fontFamily: false\n */\n fontFamily: Partial<FontFamilyOptions> | false\n /**\n * If set to false, the font size extension will not be registered\n * @example fontSize: false\n */\n fontSize: Partial<FontSizeOptions> | false\n /**\n * If set to false, the line height extension will not be registered\n * @example lineHeight: false\n */\n lineHeight: Partial<LineHeightOptions> | false\n /**\n * If set to false, the text style extension will not be registered (required for other text style extensions)\n * @example textStyle: false\n */\n textStyle: Partial<TextStyleOptions> | false\n}\n\n/**\n * The table kit is a collection of table editor extensions.\n *\n * It’s a good starting point for building your own table in Tiptap.\n */\nexport const TextStyleKit = Extension.create<TextStyleKitOptions>({\n name: 'textStyleKit',\n\n addExtensions() {\n const extensions = []\n\n if (this.options.backgroundColor !== false) {\n extensions.push(BackgroundColor.configure(this.options.backgroundColor))\n }\n\n if (this.options.color !== false) {\n extensions.push(Color.configure(this.options.color))\n }\n\n if (this.options.fontFamily !== false) {\n extensions.push(FontFamily.configure(this.options.fontFamily))\n }\n\n if (this.options.fontSize !== false) {\n extensions.push(FontSize.configure(this.options.fontSize))\n }\n\n if (this.options.lineHeight !== false) {\n extensions.push(LineHeight.configure(this.options.lineHeight))\n }\n\n if (this.options.textStyle !== false) {\n extensions.push(TextStyle.configure(this.options.textStyle))\n }\n\n return extensions\n },\n})\n","import { mergeAttributes, Node } from \"@tiptap/core\";\nimport { TextSelection } from \"@tiptap/pm/state\";\nimport { resolveImageSrc } from \"../../utils/image-src-resolver\";\nimport Image from \"@tiptap/extension-image\";\nimport { FigureOptions } from \"./figure\";\nimport { handleExitNode } from \"@/utils/handle-exit-node\";\n\n/**\n * Legacy callout extension for backward compatibility with old Tiptap content.\n * @deprecated Use {@link Callout} with `type=\"info\"` instead.\n * This extension is kept only for rendering old content that uses the `calloutTip` node type.\n */\nexport const BaseLegacyBookAlert = Node.create({\n name: \"calloutAlert\",\n\n group: \"block\",\n content: \"block+\",\n\n draggable: true,\n isolating: true,\n\n addAttributes() {\n return {\n type: {\n default: \"error\",\n },\n bgColor: {\n default: null,\n parseHTML: (element) => {\n if (typeof element === \"string\") return null;\n return element.getAttribute(\"data-bg-color\");\n },\n renderHTML: (attributes) => {\n if (!attributes.bgColor) return {};\n return {\n \"data-bg-color\": attributes.bgColor,\n };\n },\n },\n emoji: {\n default: null,\n parseHTML: (element) => {\n if (typeof element === \"string\") return null;\n return element.getAttribute(\"data-emoji\");\n },\n renderHTML: (attributes) => {\n if (!attributes.emoji) return {};\n return {\n \"data-emoji\": attributes.emoji,\n };\n },\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: 'div[data-type=\"callout-alert\"]',\n },\n ];\n },\n\n addKeyboardShortcuts() {\n return {\n Enter: () => handleExitNode(this.editor, this.name),\n };\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"div\", mergeAttributes(HTMLAttributes, { \"data-type\": \"callout-alert\" }), 0];\n },\n});\n\n/**\n * Legacy callout extension for backward compatibility with old Tiptap content.\n * @deprecated Use {@link Callout} with `type=\"info\"` instead.\n * This extension is kept only for rendering old content that uses the `calloutTip` node type.\n */\nexport const BaseLegacyBookTip = Node.create({\n name: \"calloutTip\",\n\n group: \"block\",\n content: \"block+\",\n\n draggable: true,\n isolating: true,\n\n addAttributes() {\n return {\n type: {\n default: \"info\",\n },\n bgColor: {\n default: null,\n parseHTML: (element) => {\n if (typeof element === \"string\") return null;\n return element.getAttribute(\"data-bg-color\");\n },\n renderHTML: (attributes) => {\n if (!attributes.bgColor) return {};\n return {\n \"data-bg-color\": attributes.bgColor,\n };\n },\n },\n emoji: {\n default: null,\n parseHTML: (element) => {\n if (typeof element === \"string\") return null;\n return element.getAttribute(\"data-emoji\");\n },\n renderHTML: (attributes) => {\n if (!attributes.emoji) return {};\n return {\n \"data-emoji\": attributes.emoji,\n };\n },\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: 'div[data-type=\"callout-tip\"]',\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"div\", mergeAttributes(HTMLAttributes, { \"data-type\": \"callout-tip\" }), 0];\n },\n\n addKeyboardShortcuts() {\n return {\n Enter: () => handleExitNode(this.editor, this.name),\n };\n },\n});\n\n/**\n * Legacy callout extension for backward compatibility with old Tiptap content.\n * @deprecated\n */\nexport const BaseLegacySEQuote = Node.create({\n name: \"customQuoteV2\",\n group: \"block\",\n content: \"customQuoteText customQuoteAuthor customQuoteSign\",\n selectable: false,\n draggable: true,\n isolating: true,\n\n addKeyboardShortcuts() {\n return {\n Enter: () => {\n const { view, schema } = this.editor;\n const { state } = view;\n const { selection } = state;\n\n const $pos = selection.$from;\n let depth = $pos.depth;\n let isInsideCustomQuoteV2 = false;\n\n while (depth > 0) {\n const parentNode = $pos.node(depth);\n if (parentNode.type.name === this.name) {\n isInsideCustomQuoteV2 = true;\n break;\n }\n depth--;\n }\n\n if (!isInsideCustomQuoteV2) {\n return false;\n }\n\n const { tr } = state;\n const posAfter = $pos.after(depth);\n\n const paragraphNode = schema.nodes.paragraph.createAndFill();\n if (!paragraphNode) return false;\n\n tr.insert(posAfter, paragraphNode);\n tr.setSelection(TextSelection.create(tr.doc, posAfter + 1));\n view.dispatch(tr);\n\n return true;\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: \"div[data-custom-quote-v2]\",\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"div\", mergeAttributes(HTMLAttributes, { \"data-custom-quote-v2\": \"\" }), 0];\n },\n});\n\n/**\n * Legacy PromptV2 extension for backward compatibility with old Tiptap copy editor content.\n * @deprecated Use {@link Prompt} instead.\n * This extension is kept only for rendering old content that uses the `promptV2` node type.\n */\nexport const BaseLegacyPromptSE = Node.create({\n name: \"promptV2\",\n group: \"block\",\n content: \"(promptHeader | promptV2Header) (promptContent | promptV2Content)\",\n selectable: false,\n draggable: true,\n\n addKeyboardShortcuts() {\n return {\n Enter: () => {\n const { view, schema } = this.editor;\n const { state } = view;\n const { selection } = state;\n\n const $pos = selection.$from;\n let depth = $pos.depth;\n let isInsidePromptV2 = false;\n\n while (depth > 0) {\n const parentNode = $pos.node(depth);\n if (parentNode.type.name === this.name) {\n isInsidePromptV2 = true;\n break;\n }\n depth--;\n }\n\n if (!isInsidePromptV2) {\n return false;\n }\n\n const { tr } = state;\n const posAfter = $pos.after(depth);\n\n const paragraphNode = schema.nodes.paragraph.createAndFill();\n if (!paragraphNode) return false;\n\n tr.insert(posAfter, paragraphNode);\n tr.setSelection(TextSelection.create(tr.doc, posAfter + 1));\n view.dispatch(tr);\n\n return true;\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: \"div[data-prompt-v2]\",\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"div\", mergeAttributes(HTMLAttributes, { \"data-prompt\": \"\" }), 0];\n },\n});\n\n/**\n * Legacy PromptV2Header extension for backward compatibility with old Tiptap copy editor content.\n * @deprecated Use {@link PromptHeader} instead.\n * This extension is kept only for rendering old content that uses the `promptV2Header` node type.\n */\nexport const BaseLegacyPromptSEHeader = Node.create({\n name: \"promptV2Header\",\n group: \"block\",\n content: \"inline*\",\n selectable: true,\n draggable: false,\n\n parseHTML() {\n return [\n {\n tag: \"div[data-prompt-v2-header]\",\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"div\", mergeAttributes(HTMLAttributes, { \"data-prompt-header\": \"\" }), 0];\n },\n\n // addNodeView() {\n // return ReactNodeViewRenderer(PromptHeaderView);\n // },\n});\n\n/**\n * Legacy PromptV2Content extension for backward compatibility with old Tiptap copy editor content.\n * @deprecated Use {@link PromptContent} instead.\n * This extension is kept only for rendering old content that uses the `promptV2Content` node type.\n */\nexport const BaseLegacyPromptSEContent = Node.create({\n name: \"promptV2Content\",\n group: \"block\",\n content: \"text*\",\n draggable: false,\n selectable: true,\n\n parseHTML() {\n return [\n {\n tag: \"div[data-prompt-v2-content]\",\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"div\", mergeAttributes(HTMLAttributes, { \"data-prompt-content\": \"\" }), 0];\n },\n});\n\n/**\n * Legacy Custom Quote extension for backward compatibility with old Tiptap copy editor content.\n * @deprecated\n */\nexport const BaseLegacyCustomBlockquote = Node.create({\n name: \"customBlockquote\",\n\n group: \"block\",\n content: \"block+\",\n\n draggable: true,\n\n parseHTML() {\n return [\n {\n tag: 'div[data-type=\"custom-blockquote\"]',\n },\n ];\n },\n\n renderHTML() {\n return [\"blockquote\", 0];\n },\n});\n\n/**\n * Legacy YouTube extension for backward compatibility with old Tiptap content.\n * @deprecated Use {@link Video} extension instead.\n * This extension is kept only for rendering old content that uses the `youtube` node type.\n * Renders using the same VideoView component.\n */\nexport const BaseLegacyYouTube = Node.create({\n name: \"youtube\",\n\n group: \"block\",\n selectable: true,\n draggable: true,\n isolating: true,\n\n addAttributes() {\n return {\n src: {\n default: null,\n },\n width: {\n default: 640,\n },\n height: {\n default: 480,\n },\n start: {\n default: 0,\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: 'iframe[src*=\"youtube.com\"]',\n },\n {\n tag: 'iframe[src*=\"youtu.be\"]',\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"video-embed\", { src: HTMLAttributes.src }];\n },\n});\n\n/**\n * Legacy InlineLatex extension for backward compatibility with old Tiptap copy editor content.\n * @deprecated Use the Mathematics extension instead.\n * This extension renders old `inlineLatex` nodes as inline code for basic compatibility.\n */\nexport const LegacyInlineLatexSE = Node.create({\n name: \"inlineLatex\",\n group: \"inline\",\n inline: true,\n content: \"text*\",\n atom: true,\n\n addAttributes() {\n return {\n latex: {\n default: \"\",\n parseHTML: (element) => element.getAttribute(\"data-latex\") || element.textContent || \"\",\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: \"span.inline-latex\",\n },\n ];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\"code\", mergeAttributes(HTMLAttributes, { class: \"inline-latex\" }), 0];\n },\n});\n\n/**\n * Legacy figure extension for backward compatibility with old Tiptap copy editor content.\n * @deprecated Use {@link Figure} instead.\n * This extension is kept only for rendering old content that uses the `figure` node type.\n */\nexport const BaseLegacyFigure = Image.extend<FigureOptions>({\n name: \"figure\",\n group: \"block\",\n content: \"inline*\",\n draggable: true,\n isolating: true,\n selectable: false,\n\n addOptions() {\n return {\n HTMLAttributes: {},\n getImageById: undefined,\n };\n },\n\n addAttributes() {\n return {\n ...this.parent?.(),\n fileId: {\n default: null,\n parseHTML: (element) => {\n const img = element.querySelector(\"img\");\n const fileIdFromImg = img?.getAttribute(\"fileId\") || img?.getAttribute(\"data-file-id\");\n const fileIdFromFigure =\n element.getAttribute(\"fileId\") || element.getAttribute(\"data-file-id\");\n return fileIdFromImg ?? fileIdFromFigure;\n },\n renderHTML: (attributes) => {\n if (!attributes.fileId) return {};\n return { \"data-file-id\": attributes.fileId };\n },\n },\n src: {\n default: null,\n parseHTML: (element) => {\n const img = element.querySelector(\"img\") || element;\n return img.getAttribute(\"src\");\n },\n },\n alt: {\n default: null,\n parseHTML: (element) => {\n const img = element.querySelector(\"img\") || element;\n return img.getAttribute(\"alt\");\n },\n },\n title: {\n default: null,\n parseHTML: (element) => {\n const img = element.querySelector(\"img\") || element;\n return img.getAttribute(\"title\");\n },\n },\n caption: {\n default: null,\n parseHTML: (element) => {\n const caption = element.querySelector(\"figcaption\");\n return caption ? caption.innerText : null;\n },\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: \"figure\",\n getAttrs: (element) => {\n if (typeof element === \"string\") return false;\n const img = element.querySelector(\"img\");\n return img ? {} : false;\n },\n },\n {\n tag: \"img[src]\",\n },\n ];\n },\n\n renderHTML({ node }) {\n const resolvedSrc = resolveImageSrc(\n {\n fileId: node.attrs.fileId,\n src: node.attrs.src,\n },\n { getImageById: this.options.getImageById }\n );\n\n const figureAttrs = mergeAttributes(this.options.HTMLAttributes);\n\n const imgAttrs: Record<string, unknown> = {\n src: resolvedSrc,\n };\n\n if (node.attrs.fileId) imgAttrs[\"data-file-id\"] = node.attrs.fileId;\n if (node.attrs.alt) imgAttrs.alt = node.attrs.alt;\n if (node.attrs.title) imgAttrs.title = node.attrs.title;\n if (node.attrs.width) imgAttrs.width = node.attrs.width;\n if (node.attrs.height) imgAttrs.height = node.attrs.height;\n\n const hasCaption = node.attrs.caption && node.attrs.caption.trim().length > 0;\n const figcaptionContent = hasCaption ? [\"figcaption\", {}, node.attrs.caption] : null;\n\n return [\n \"figure\",\n figureAttrs,\n [\"img\", imgAttrs],\n ...(figcaptionContent ? [figcaptionContent] : []),\n ];\n },\n});\n","/**\n * Configuration for @tiptap/static-renderer for server-side rendering\n * Provides React component mappings for custom extensions\n *\n * Node and mark mappings control how Tiptap JSON is rendered to React elements\n * during server-side static rendering. These map directly to the extensions\n * defined in extensions/ folder.\n *\n * Note: Node views (addNodeView) are NOT supported by static renderer.\n * We provide custom React component mappings that replicate the NodeView output\n * without using Tiptap's NodeViewWrapper/NodeViewContent APIs.\n */\n\nimport katex from \"katex\";\nimport hljs from \"highlight.js/lib/common\";\nimport type { CalloutType } from \"@/extensions/base/callout\";\nimport {\n Callout,\n CopyableText,\n CodeBlock,\n CustomQuote,\n CustomQuoteText,\n CustomQuoteAuthor,\n CustomQuoteSign,\n PromptHeader,\n PromptContent,\n Video,\n Figure,\n} from \"@/extensions/views/components\";\n\nexport const getNodeMapping = (getImageById?: (fileId: string) => string | null) => ({\n callout({ node, children }: any) {\n return <Callout {...node.attrs}>{children}</Callout>;\n },\n codeBlock({ node, children }: any) {\n const language = (node.attrs.language as string) || \"\";\n\n let codeText = \"\";\n if (Array.isArray(children)) {\n codeText = children\n .map((child: any) => {\n if (child?.props?.node?.text) {\n return child.props.node.text;\n }\n return \"\";\n })\n .join(\"\");\n }\n\n let highlightedHtml = \"\";\n try {\n if (!language) {\n highlightedHtml = hljs.highlightAuto(codeText).value;\n } else {\n highlightedHtml = hljs.highlight(codeText, { language }).value;\n }\n } catch (error) {\n console.warn(`Failed to highlight code for language \"${language}\":`, error);\n highlightedHtml = codeText\n .replace(/&/g, \"&\")\n .replace(/</g, \"<\")\n .replace(/>/g, \">\")\n .replace(/\"/g, \""\")\n .replace(/'/g, \"'\");\n }\n\n return (\n <CodeBlock\n language={language}\n isEditable={false}\n >\n <code dangerouslySetInnerHTML={{ __html: highlightedHtml }} />\n </CodeBlock>\n );\n },\n customQuote({ children }: any) {\n return <CustomQuote>{children}</CustomQuote>;\n },\n customQuoteText({ children }: any) {\n return <CustomQuoteText>{children}</CustomQuoteText>;\n },\n customQuoteAuthor({ children }: any) {\n return <CustomQuoteAuthor>{children}</CustomQuoteAuthor>;\n },\n customQuoteSign({ children }: any) {\n return <CustomQuoteSign>{children}</CustomQuoteSign>;\n },\n promptHeader({ children }: any) {\n return <PromptHeader>{children}</PromptHeader>;\n },\n promptContent({ children }: any) {\n return <PromptContent>{children}</PromptContent>;\n },\n video({ node }: any) {\n return <Video src={node.attrs.src} />;\n },\n figure({ node }: any) {\n return (\n <Figure\n {...node.attrs}\n getImageById={getImageById}\n />\n );\n },\n image({ node }: any) {\n return (\n <Figure\n {...node.attrs}\n getImageById={getImageById}\n />\n );\n },\n inlineMath({ node }: any) {\n const latex = node.attrs.latex || \"\";\n let html = \"\";\n\n try {\n html = katex.renderToString(latex, {\n throwOnError: false,\n output: \"html\",\n });\n } catch (error) {\n console.warn(\"KaTeX rendering error for inline math:\", error);\n }\n\n return (\n <span\n className=\"react-renderer node-inlineMath\"\n dangerouslySetInnerHTML={{ __html: html || latex }}\n />\n );\n },\n\n // Block math (KaTeX) - from @tiptap/extension-mathematics\n blockMath({ node }: any) {\n const latex = node.attrs.latex || \"\";\n let html = \"\";\n\n try {\n html = katex.renderToString(latex, {\n throwOnError: false,\n output: \"html\",\n displayMode: true,\n });\n } catch (error) {\n console.warn(\"KaTeX rendering error for block math:\", error);\n }\n\n return (\n <div className=\"react-renderer node-blockMath\">\n <div\n className=\"tiptap-mathematics-render\"\n data-type=\"math\"\n data-mode=\"block\"\n dangerouslySetInnerHTML={{ __html: html || latex }}\n />\n </div>\n );\n },\n\n inlineLatex({ node }: any) {\n const latex = node.attrs.latex || \"\";\n let html = \"\";\n\n try {\n html = katex.renderToString(latex, {\n throwOnError: false,\n output: \"html\",\n });\n } catch (error) {\n console.warn(\"KaTeX rendering error for inline latex:\", error);\n }\n\n return (\n <span\n className=\"react-renderer node-inlineLatex inline-latex\"\n dangerouslySetInnerHTML={{ __html: html || latex }}\n />\n );\n },\n /*\n COMPATABILITY\n */\n calloutAlert({ node, children }: any) {\n const type = (node.attrs.type as CalloutType) || \"info\";\n return <Callout type={type}>{children}</Callout>;\n },\n\n calloutTip({ node, children }: any) {\n const type = (node.attrs.type as CalloutType) || \"info\";\n return <Callout type={type}>{children}</Callout>;\n },\n customQuoteV2({ children }: any) {\n return <CustomQuote>{children}</CustomQuote>;\n },\n promptV2Header({ children }: any) {\n return <PromptHeader>{children}</PromptHeader>;\n },\n promptV2Content({ children }: any) {\n return <PromptContent>{children}</PromptContent>;\n },\n});\n\nexport const nodeMapping = getNodeMapping();\n\n/**\n * Mark mappings for static renderer\n *\n * Standard marks (bold, italic, code, link, etc.) are handled automatically.\n * Custom marks can be mapped here if needed for special rendering.\n */\nexport const markMapping = {\n \"copyable-text\"({ children }: any) {\n return <CopyableText>{children}</CopyableText>;\n },\n};\n","import type { SVGProps } from 'react';\nconst SvgTiptapCalloutError = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 20 20\" {...props}>\n <g clipPath=\"url(#tiptap-callout-error_svg__a)\">\n <path\n fill=\"#E03757\"\n d=\"M10 0C4.477 0 0 4.477 0 10s4.477 10 10 10 10-4.477 10-10S15.523 0 10 0\"\n />\n <path\n fill=\"#F04760\"\n d=\"M4.692 15.603c6.011 0 10.885-4.874 10.885-10.885a10.9 10.9 0 0 0-.525-3.35A9.95 9.95 0 0 0 10 0C4.477 0 0 4.477 0 10a9.95 9.95 0 0 0 1.394 5.094c1.066.338 2.179.51 3.298.509\"\n />\n <path\n fill=\"#fff\"\n d=\"M9.996 16.783a1.626 1.626 0 1 1 0-3.251 1.626 1.626 0 0 1 0 3.251m1.575-5.598c-.027.252-.14.486-.321.663a1.13 1.13 0 0 1-.674.315h-.008q-.239.027-.48.027a6 6 0 0 1-.575-.027h-.007a1.13 1.13 0 0 1-.674-.315 1.1 1.1 0 0 1-.321-.663c-.04-.366-.059-2.914-.059-3.481 0-.568.02-3.122.059-3.488.027-.252.14-.487.32-.665.183-.177.42-.289.675-.315h.007q.287-.029.576-.017.24-.012.479.017h.008c.254.027.492.14.674.319.18.177.294.412.321.664.04.366.059 2.92.059 3.488 0 .567-.02 3.113-.059 3.478\"\n />\n </g>\n <defs>\n <clipPath id=\"tiptap-callout-error_svg__a\">\n <path fill=\"#fff\" d=\"M0 0h20v20H0z\" />\n </clipPath>\n </defs>\n </svg>\n);\nexport default SvgTiptapCalloutError;\n","import type { SVGProps } from 'react';\nconst SvgTiptapCalloutInfo = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 20 20\" {...props}>\n <path\n fill=\"#FE9738\"\n d=\"m11.654 11.196 3.51-2.75.549-4.789-4.06-2.234-1.647 2.264a2.79 2.79 0 0 1 1.531 2.28 2.8 2.8 0 0 1-1.85 2.84 3.96 3.96 0 0 0-2.624 3.728v.72c0 .937.76 1.697 1.696 1.697h2.482zm-4.895-3.32H4.277c-.937 0-1.697-.76-1.697-1.697q0-.432.06-.86C3.084 2.135 5.954-.196 9.172.015h2.482L9.888 1.797m1.353 14.796H8.759c-.937 0-1.696.76-1.696 1.696v.014c0 .938.76 1.697 1.696 1.697h2.18\"\n />\n <path\n fill=\"#FFD15B\"\n d=\"M11.241 14.951c-.937 0-1.697-.76-1.697-1.697v-.72a3.955 3.955 0 0 1 2.625-3.727 2.8 2.8 0 0 0 1.85-2.84A2.79 2.79 0 0 0 11.432 3.4a2.8 2.8 0 0 0-2.976 2.78 1.697 1.697 0 0 1-3.394 0q0-.434.06-.86C5.566 2.133 8.435-.198 11.654.014c3.055.2 5.527 2.653 5.75 5.706a6.2 6.2 0 0 1-4.104 6.286.56.56 0 0 0-.362.529v.72c0 .936-.76 1.696-1.697 1.696m0 5.05c-.937 0-1.697-.76-1.697-1.698v-.014a1.697 1.697 0 0 1 3.394 0v.014c0 .937-.76 1.697-1.697 1.697\"\n />\n <path\n fill=\"#FFC344\"\n d=\"M6.622 5.32q-.06.427-.06.86c0 .667.386 1.245.947 1.521A1.697 1.697 0 0 1 5.062 6.18q0-.432.06-.86C5.566 2.134 8.436-.197 11.654.014q.173.012.343.033C9.273.382 7.012 2.521 6.622 5.32m7.047 3.486a3.96 3.96 0 0 0-2.625 3.729v.72c0 .667.386 1.245.947 1.521a1.696 1.696 0 0 1-2.447-1.522v-.72a3.955 3.955 0 0 1 2.625-3.728 2.8 2.8 0 0 0 1.85-2.839 2.79 2.79 0 0 0-2.022-2.47 2.786 2.786 0 0 1 3.522 2.47 2.8 2.8 0 0 1-1.85 2.84m-1.678 11.02a1.696 1.696 0 0 1-2.447-1.522v-.015a1.697 1.697 0 0 1 2.448-1.523 1.7 1.7 0 0 0-.948 1.523v.014c0 .668.386 1.246.947 1.522\"\n />\n </svg>\n);\nexport default SvgTiptapCalloutInfo;\n","import type { SVGProps } from 'react';\nconst SvgTiptapCalloutSuccess = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 20 20\" {...props}>\n <g clipPath=\"url(#tiptap-callout-success_svg__a)\">\n <path\n fill=\"#35495E\"\n d=\"M1.972 18.004.06 7.138a2.4 2.4 0 0 1-.035-.317 2.47 2.47 0 0 1 2.073-2.493l3.693-.652-.1 14.328z\"\n />\n <path\n fill=\"#2C3E50\"\n d=\"M16.186 17.528a.69.69 0 0 1-.548.517l-10.87 1.917a2.42 2.42 0 0 1-2.83-2.276 2.46 2.46 0 0 1 1.934-2.462l3.045.855h-.003l-2.742.487a1.037 1.037 0 0 0-.786 1.396 1.066 1.066 0 0 0 1.186.635l8.307-1.466z\"\n />\n <path\n fill=\"#F9EAB0\"\n d=\"m6.914 16.08-2.742.486a1.035 1.035 0 0 0-.786 1.396 1.066 1.066 0 0 0 1.186.635l8.307-1.466z\"\n />\n <path\n fill=\"#E64C3C\"\n d=\"M4.423 11.438 6.339.571a.695.695 0 0 1 .799-.559l10.785 1.902a2.47 2.47 0 0 1 2.074 2.495 3 3 0 0 1-.034.316l-1.917 10.867z\"\n />\n <path\n fill=\"#3F5C6C\"\n d=\"M15.668 3.612a.4.4 0 0 1-.06-.005l-7.81-1.378a.345.345 0 0 1 .12-.677l7.81 1.375a.345.345 0 0 1-.06.685M14.01 5.069a.3.3 0 0 1-.06-.005l-5.094-.897a.345.345 0 0 1 .12-.68l5.094.897a.345.345 0 0 1-.06.685\"\n />\n <path\n fill=\"#ECF0F1\"\n d=\"m14.727 6.608-7.131-1.26a.345.345 0 0 0-.4.28l-.6 3.395a.345.345 0 0 0 .28.4l7.13 1.26a.345.345 0 0 0 .4-.28l.6-3.396a.345.345 0 0 0-.28-.4\"\n />\n <path\n fill=\"#C03A2B\"\n d=\"M19.997 4.407a2 2 0 0 1-.035.317L18.045 15.59l-2.659-.81 1.542-8.738.365-2.063.373-2.11.258.045a2.47 2.47 0 0 1 2.073 2.493\"\n />\n <path\n fill=\"#802F34\"\n d=\"M16.007 12.78 5.22 10.88a.69.69 0 0 0-.238 1.358l10.865 1.914a1.038 1.038 0 0 1 .783 1.4 1.06 1.06 0 0 1-1.183.63L4.624 14.277a.69.69 0 0 0-.241 1.359l10.869 1.913a2.416 2.416 0 0 0 2.83-2.272 2.474 2.474 0 0 0-2.075-2.496\"\n />\n <path\n fill=\"#F9EAB0\"\n d=\"M16.63 15.552a1.06 1.06 0 0 1-1.182.63L4.624 14.277l.359-2.038 10.865 1.914a1.04 1.04 0 0 1 .783 1.4\"\n />\n </g>\n <defs>\n <clipPath id=\"tiptap-callout-success_svg__a\">\n <path fill=\"#fff\" d=\"M0 0h20v20H0z\" />\n </clipPath>\n </defs>\n </svg>\n);\nexport default SvgTiptapCalloutSuccess;\n","import type { SVGProps } from 'react';\nconst SvgTiptapCalloutWarning = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 20 20\" {...props}>\n <path\n fill=\"#FFF59D\"\n fillOpacity={0.6}\n d=\"M1.667 9.167a8.333 8.333 0 1 0 16.666 0 8.333 8.333 0 0 0-16.666 0\"\n />\n <path\n fill=\"#FBC02D\"\n d=\"M15.417 9.167c0-3.209-2.75-5.75-6.042-5.375-2.5.291-4.5 2.291-4.75 4.791a5.27 5.27 0 0 0 1.917 4.709c.583.5.958 1.208.958 2v.125h5v-.042c0-.75.333-1.5.917-2 1.208-1 2-2.5 2-4.208\"\n />\n <path\n fill=\"#FFF59D\"\n d=\"m12.75 8.417-1.25-.834a.45.45 0 0 0-.458 0L10 8.25l-1-.667a.45.45 0 0 0-.458 0l-1.25.834c-.084.083-.167.166-.167.291s0 .25.083.334L8.792 11v4.417h.833v-4.584c0-.083-.042-.166-.083-.25L8.167 8.875l.625-.417 1 .667a.45.45 0 0 0 .458 0l1-.667.625.417-1.375 1.708a.6.6 0 0 0-.083.25v4.584h.833V11l1.583-1.958a.32.32 0 0 0 .084-.334c-.042-.125-.084-.25-.167-.291\"\n />\n <path fill=\"#5C6BC0\" d=\"M8.75 18.334a1.25 1.25 0 1 0 2.5 0 1.25 1.25 0 0 0-2.5 0\" />\n <path\n fill=\"#9FA8DA\"\n d=\"M10.833 18.75H9.167C8.25 18.75 7.5 18 7.5 17.083V15h5v2.083c0 .917-.75 1.667-1.667 1.667\"\n />\n <path\n fill=\"#5C6BC0\"\n d=\"m12.5 17.083-4.833.667c.125.291.375.583.666.75l3.917-.542q.25-.375.25-.875m-5-.958v.833l5-.708v-.834z\"\n />\n </svg>\n);\nexport default SvgTiptapCalloutWarning;\n","import TiptapCalloutInfo from \"../icons/color/TiptapCalloutInfo\";\nimport TiptapCalloutSuccess from \"../icons/color/TiptapCalloutSuccess\";\nimport TiptapCalloutWarning from \"../icons/color/TiptapCalloutWarning\";\nimport TiptapCalloutError from \"../icons/color/TiptapCalloutError\";\n\nexport const calloutIconComponents = {\n \"callout-info\": TiptapCalloutInfo,\n \"callout-success\": TiptapCalloutSuccess,\n \"callout-warning\": TiptapCalloutWarning,\n \"callout-error\": TiptapCalloutError,\n};\n\n// Favorite emojis list - these are regular emojis, not custom\n// Just the Unicode strings that should be suggested/shown first\nexport const favoriteEmojis = [\n \"👋\", // wave\n \"💡\", // bulb\n \"🔥\", // fire\n \"🔒\", // lock\n \"🏆\", // trophy\n \"🔑\", // key\n \"👮\", // police\n \"⭐\", // star\n \"⛔\", // no entry sign\n \"🧠\", // brain\n \"⚠️\", // warning\n \"📕\", // book\n \"💎\", // gem\n \"🚫\", // no entry\n \"❗\", // exclamation\n \"⚡\", // lightning\n \"📝\", // memo\n \"❤️\", // heart\n];\n\n// Mapping from favorite custom emoji IDs to actual emoji characters\nexport const favoriteEmojiIdMap: Record<string, string> = {\n \"fav-wave\": \"👋\",\n \"fav-bulb\": \"💡\",\n \"fav-fire\": \"🔥\",\n \"fav-lock\": \"🔒\",\n \"fav-trophy\": \"🏆\",\n \"fav-key\": \"🔑\",\n \"fav-police\": \"👮\",\n \"fav-star\": \"⭐\",\n \"fav-no-entry-sign\": \"⛔\",\n \"fav-brain\": \"🧠\",\n \"fav-warning\": \"⚠️\",\n \"fav-book\": \"📕\",\n \"fav-gem\": \"💎\",\n \"fav-no-entry\": \"🚫\",\n \"fav-exclamation\": \"❗\",\n \"fav-lightning\": \"⚡\",\n \"fav-memo\": \"📝\",\n \"fav-heart\": \"❤️\",\n};\n\n// Favorites - custom emojis category with specific emojis\n// These will appear in a \"Custom\" category group in the emoji picker\nexport const favoriteCustomEmojis = [\n {\n id: \"fav-wave\",\n names: [\"wave\", \"hand\", \"hello\", \"hi\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f44b.png\",\n },\n {\n id: \"fav-bulb\",\n names: [\"bulb\", \"light\", \"idea\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f4a1.png\",\n },\n {\n id: \"fav-fire\",\n names: [\"fire\", \"flame\", \"hot\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f525.png\",\n },\n {\n id: \"fav-lock\",\n names: [\"lock\", \"locked\", \"secure\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f512.png\",\n },\n {\n id: \"fav-trophy\",\n names: [\"trophy\", \"award\", \"win\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f3c6.png\",\n },\n {\n id: \"fav-key\",\n names: [\"key\", \"password\", \"unlock\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f511.png\",\n },\n {\n id: \"fav-police\",\n names: [\"police\", \"officer\", \"cop\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f46e.png\",\n },\n {\n id: \"fav-star\",\n names: [\"star\", \"favorite\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/2b50.png\",\n },\n {\n id: \"fav-no-entry-sign\",\n names: [\"no entry sign\", \"prohibited\", \"banned\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/26d4.png\",\n },\n {\n id: \"fav-brain\",\n names: [\"brain\", \"think\", \"smart\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f9e0.png\",\n },\n {\n id: \"fav-warning\",\n names: [\"warning\", \"alert\", \"caution\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/26a0-fe0f.png\",\n },\n {\n id: \"fav-book\",\n names: [\"book\", \"read\", \"closed book\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f4d5.png\",\n },\n {\n id: \"fav-gem\",\n names: [\"gem\", \"diamond\", \"jewel\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f48e.png\",\n },\n {\n id: \"fav-no-entry\",\n names: [\"no entry\", \"stop\", \"do not enter\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f6ab.png\",\n },\n {\n id: \"fav-exclamation\",\n names: [\"exclamation\", \"important\", \"alert\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/2757.png\",\n },\n {\n id: \"fav-lightning\",\n names: [\"lightning\", \"bolt\", \"zap\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/26a1.png\",\n },\n {\n id: \"fav-memo\",\n names: [\"memo\", \"note\", \"pencil\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/1f4dd.png\",\n },\n {\n id: \"fav-heart\",\n names: [\"heart\", \"love\", \"red heart\"],\n imgUrl: \"https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/2764-fe0f.png\",\n },\n];\n\nexport const calloutCustomEmojis = [\n {\n id: \"callout-info\",\n names: [\"info\", \"information\", \"callout info\"],\n imgUrl: `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath fill='%23FE9738' d='m11.654 11.196 3.51-2.75.549-4.789-4.06-2.234-1.647 2.264a2.79 2.79 0 0 1 1.531 2.28 2.8 2.8 0 0 1-1.85 2.84 3.96 3.96 0 0 0-2.624 3.728v.72c0 .937.76 1.697 1.696 1.697h2.482zm-4.895-3.32H4.277c-.937 0-1.697-.76-1.697-1.697q0-.432.06-.86C3.084 2.135 5.954-.196 9.172.015h2.482L9.888 1.797m1.353 14.796H8.759c-.937 0-1.696.76-1.696 1.696v.014c0 .938.76 1.697 1.696 1.697h2.18'/%3E%3Cpath fill='%23FFD15B' d='M11.241 14.951c-.937 0-1.697-.76-1.697-1.697v-.72a3.955 3.955 0 0 1 2.625-3.727 2.8 2.8 0 0 0 1.85-2.84A2.79 2.79 0 0 0 11.432 3.4a2.8 2.8 0 0 0-2.976 2.78 1.697 1.697 0 0 1-3.394 0q0-.434.06-.86C5.566 2.133 8.435-.198 11.654.014c3.055.2 5.527 2.653 5.75 5.706a6.2 6.2 0 0 1-4.104 6.286.56.56 0 0 0-.362.529v.72c0 .936-.76 1.696-1.697 1.696m0 5.05c-.937 0-1.697-.76-1.697-1.698v-.014a1.697 1.697 0 0 1 3.394 0v.014c0 .937-.76 1.697-1.697 1.697'/%3E%3Cpath fill='%23FFC344' d='M6.622 5.32q-.06.427-.06.86c0 .667.386 1.245.947 1.521A1.697 1.697 0 0 1 5.062 6.18q0-.432.06-.86C5.566 2.134 8.436-.197 11.654.014q.173.012.343.033C9.273.382 7.012 2.521 6.622 5.32m7.047 3.486a3.96 3.96 0 0 0-2.625 3.729v.72c0 .667.386 1.245.947 1.521a1.696 1.696 0 0 1-2.447-1.522v-.72a3.955 3.955 0 0 1 2.625-3.728 2.8 2.8 0 0 0 1.85-2.839 2.79 2.79 0 0 0-2.022-2.47 2.786 2.786 0 0 1 3.522 2.47 2.8 2.8 0 0 1-1.85 2.84m-1.678 11.02a1.696 1.696 0 0 1-2.447-1.522v-.015a1.697 1.697 0 0 1 2.448-1.523 1.7 1.7 0 0 0-.948 1.523v.014c0 .668.386 1.246.947 1.522'/%3E%3C/svg%3E`,\n },\n {\n id: \"callout-success\",\n names: [\"success\", \"check\", \"done\", \"callout success\"],\n imgUrl: `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cg clip-path='url(%23a)'%3E%3Cpath fill='%2335495E' d='M1.972 18.004.06 7.138a2.4 2.4 0 0 1-.035-.317 2.47 2.47 0 0 1 2.073-2.493l3.693-.652-.1 14.328z'/%3E%3Cpath fill='%232C3E50' d='M16.186 17.528a.69.69 0 0 1-.548.517l-10.87 1.917a2.42 2.42 0 0 1-2.83-2.276 2.46 2.46 0 0 1 1.934-2.462l3.045.855h-.003l-2.742.487a1.037 1.037 0 0 0-.786 1.396 1.066 1.066 0 0 0 1.186.635l8.307-1.466z'/%3E%3Cpath fill='%23F9EAB0' d='m6.914 16.08-2.742.486a1.035 1.035 0 0 0-.786 1.396 1.066 1.066 0 0 0 1.186.635l8.307-1.466z'/%3E%3Cpath fill='%23E64C3C' d='M4.423 11.438 6.339.571a.695.695 0 0 1 .799-.559l10.785 1.902a2.47 2.47 0 0 1 2.074 2.495 3 3 0 0 1-.034.316l-1.917 10.867z'/%3E%3Cpath fill='%233F5C6C' d='M15.668 3.612a.4.4 0 0 1-.06-.005l-7.81-1.378a.345.345 0 0 1 .12-.677l7.81 1.375a.345.345 0 0 1-.06.685M14.01 5.069a.3.3 0 0 1-.06-.005l-5.094-.897a.345.345 0 0 1 .12-.68l5.094.897a.345.345 0 0 1-.06.685'/%3E%3Cpath fill='%23ECF0F1' d='m14.727 6.608-7.131-1.26a.345.345 0 0 0-.4.28l-.6 3.395a.345.345 0 0 0 .28.4l7.13 1.26a.345.345 0 0 0 .4-.28l.6-3.396a.345.345 0 0 0-.28-.4'/%3E%3Cpath fill='%23C03A2B' d='M19.997 4.407a2 2 0 0 1-.035.317L18.045 15.59l-2.659-.81 1.542-8.738.365-2.063.373-2.11.258.045a2.47 2.47 0 0 1 2.073 2.493'/%3E%3Cpath fill='%23802F34' d='M16.007 12.78 5.22 10.88a.69.69 0 0 0-.238 1.358l10.865 1.914a1.038 1.038 0 0 1 .783 1.4 1.06 1.06 0 0 1-1.183.63L4.624 14.277a.69.69 0 0 0-.241 1.359l10.869 1.913a2.416 2.416 0 0 0 2.83-2.272 2.474 2.474 0 0 0-2.075-2.496'/%3E%3Cpath fill='%23F9EAB0' d='M16.63 15.552a1.06 1.06 0 0 1-1.182.63L4.624 14.277l.359-2.038 10.865 1.914a1.04 1.04 0 0 1 .783 1.4'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='a'%3E%3Cpath fill='%23fff' d='M0 0h20v20H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E`,\n },\n {\n id: \"callout-warning\",\n names: [\"warning\", \"alert\", \"caution\", \"callout warning\"],\n imgUrl: `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath fill='%23FFF59D' fill-opacity='0.6' d='M1.667 9.167a8.333 8.333 0 1 0 16.666 0 8.333 8.333 0 0 0-16.666 0'/%3E%3Cpath fill='%23FBC02D' d='M15.417 9.167c0-3.209-2.75-5.75-6.042-5.375-2.5.291-4.5 2.291-4.75 4.791a5.27 5.27 0 0 0 1.917 4.709c.583.5.958 1.208.958 2v.125h5v-.042c0-.75.333-1.5.917-2 1.208-1 2-2.5 2-4.208'/%3E%3Cpath fill='%23FFF59D' d='m12.75 8.417-1.25-.834a.45.45 0 0 0-.458 0L10 8.25l-1-.667a.45.45 0 0 0-.458 0l-1.25.834c-.084.083-.167.166-.167.291s0 .25.083.334L8.792 11v4.417h.833v-4.584c0-.083-.042-.166-.083-.25L8.167 8.875l.625-.417 1 .667a.45.45 0 0 0 .458 0l1-.667.625.417-1.375 1.708a.6.6 0 0 0-.083.25v4.584h.833V11l1.583-1.958a.32.32 0 0 0 .084-.334c-.042-.125-.084-.25-.167-.291'/%3E%3Cpath fill='%235C6BC0' d='M8.75 18.334a1.25 1.25 0 1 0 2.5 0 1.25 1.25 0 0 0-2.5 0'/%3E%3Cpath fill='%239FA8DA' d='M10.833 18.75H9.167C8.25 18.75 7.5 18 7.5 17.083V15h5v2.083c0 .917-.75 1.667-1.667 1.667'/%3E%3Cpath fill='%235C6BC0' d='m12.5 17.083-4.833.667c.125.291.375.583.666.75l3.917-.542q.25-.375.25-.875m-5-.958v.833l5-.708v-.834z'/%3E%3C/svg%3E`,\n },\n {\n id: \"callout-error\",\n names: [\"error\", \"danger\", \"fail\", \"callout error\"],\n imgUrl: `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cg clip-path='url(%23a)'%3E%3Cpath fill='%23E03757' d='M10 0C4.477 0 0 4.477 0 10s4.477 10 10 10 10-4.477 10-10S15.523 0 10 0'/%3E%3Cpath fill='%23F04760' d='M4.692 15.603c6.011 0 10.885-4.874 10.885-10.885a10.9 10.9 0 0 0-.525-3.35A9.95 9.95 0 0 0 10 0C4.477 0 0 4.477 0 10a9.95 9.95 0 0 0 1.394 5.094c1.066.338 2.179.51 3.298.509'/%3E%3Cpath fill='%23fff' d='M9.996 16.783a1.626 1.626 0 1 1 0-3.251 1.626 1.626 0 0 1 0 3.251m1.575-5.598c-.027.252-.14.486-.321.663a1.13 1.13 0 0 1-.674.315h-.008q-.239.027-.48.027a6 6 0 0 1-.575-.027h-.007a1.13 1.13 0 0 1-.674-.315 1.1 1.1 0 0 1-.321-.663c-.04-.366-.059-2.914-.059-3.481 0-.568.02-3.122.059-3.488.027-.252.14-.487.32-.665.183-.177.42-.289.675-.315h.007q.287-.029.576-.017.24-.012.479.017h.008c.254.027.492.14.674.319.18.177.294.412.321.664.04.366.059 2.92.059 3.488 0 .567-.02 3.113-.059 3.478'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='a'%3E%3Cpath fill='%23fff' d='M0 0h20v20H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E`,\n },\n];\n","import type { CalloutType } from \"../../base\";\nimport {\n TiptapCalloutError,\n TiptapCalloutInfo,\n TiptapCalloutSuccess,\n TiptapCalloutWarning,\n} from \"../../../icons/color\";\nimport { ReactNode } from \"react\";\nimport { calloutIconComponents } from \"../../../utils/custom-emoji\";\n\nconst calloutIcons: Record<CalloutType, React.ReactNode> = {\n info: <TiptapCalloutInfo />,\n warning: <TiptapCalloutWarning />,\n success: <TiptapCalloutSuccess />,\n error: <TiptapCalloutError />,\n};\n\nconst legacyTypeMap: Record<string, CalloutType> = {\n question: \"info\",\n idea: \"warning\",\n info: \"success\",\n error: \"error\",\n};\n\ninterface Props {\n type: CalloutType;\n bgColor?: string | null;\n emoji?: string | null;\n children: ReactNode;\n calloutType?: CalloutType;\n iconWrapper?: (icon: ReactNode) => ReactNode;\n}\n\nexport const Callout = ({ type, bgColor, emoji, children, iconWrapper, calloutType }: Props) => {\n const isLegacySECallout = !!calloutType;\n const finalType = isLegacySECallout ? legacyTypeMap[calloutType] : type;\n\n const hasCustomColor = !!bgColor;\n const className = hasCustomColor ? \"callout-node\" : `callout-node callout-${finalType}`;\n const style = hasCustomColor ? { backgroundColor: bgColor } : undefined;\n\n let icon: ReactNode;\n if (emoji) {\n if (emoji in calloutIconComponents) {\n const IconComponent = calloutIconComponents[emoji as keyof typeof calloutIconComponents];\n icon = <IconComponent />;\n } else {\n icon = emoji;\n }\n } else {\n icon = calloutIcons[finalType];\n }\n\n const iconContent = iconWrapper ? iconWrapper(icon) : <div className=\"callout-icon\">{icon}</div>;\n\n return (\n <div\n className={className}\n data-callout-type={hasCustomColor ? undefined : type}\n data-bg-color={bgColor || undefined}\n data-emoji={emoji || undefined}\n style={style}\n >\n {iconContent}\n <div className=\"callout-content-wrapper\">\n <div className=\"callout-content\">{children}</div>\n </div>\n </div>\n );\n};\n","import { ChangeEvent, ReactNode, useMemo } from \"react\";\nimport html from \"highlight.js/lib/languages/xml\";\nimport { common, createLowlight } from \"lowlight\";\n\nimport type { TiptapTranslations } from \"../../../utils/get-translations\";\nimport { CopyButton } from \"./copy-button\";\n\ninterface CodeBlockProps {\n language: string;\n isEditable: boolean;\n onLanguageChange?: (language: string) => void;\n children: ReactNode;\n translations?: TiptapTranslations;\n}\n\nexport const CodeBlock = ({\n language,\n isEditable,\n onLanguageChange,\n children,\n translations,\n}: CodeBlockProps) => {\n const languagesList = useMemo(() => {\n const lowlight = createLowlight(common);\n lowlight.register(\"html\", html);\n const list = lowlight.listLanguages();\n return list.sort();\n }, []);\n\n const handleChange = (e: ChangeEvent<HTMLSelectElement>) => {\n onLanguageChange?.(e.target.value);\n };\n\n return (\n <div className=\"tiptap-code-block-wrapper\">\n <div className=\"tiptap-code-block-header\">\n {isEditable ? (\n <select\n className=\"tiptap-code-block-language-select\"\n value={language}\n onChange={handleChange}\n >\n <option value=\"\">{translations?.codeBlock.selectLanguage}</option>\n {languagesList.map((lang) => (\n <option\n key={lang}\n value={lang}\n >\n {lang}\n </option>\n ))}\n </select>\n ) : (\n <span className=\"tiptap-code-block-language-text\">\n {language || translations?.codeBlock.selectLanguage}\n </span>\n )}\n <CopyButton\n iconSize={20}\n color=\"white\"\n />\n </div>\n <pre className=\"tiptap-code-block\">\n <code\n className=\"tiptap-code-block-content\"\n data-copy-content\n >\n {children}\n </code>\n </pre>\n </div>\n );\n};\n","import type { SVGProps } from 'react';\nconst SvgCheck = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n d=\"M20.707 5.293a1 1 0 0 1 0 1.414l-11 11a1 1 0 0 1-1.414 0l-5-5a1 1 0 1 1 1.414-1.414L9 15.586 19.293 5.293a1 1 0 0 1 1.414 0\"\n clipRule=\"evenodd\"\n />\n </svg>\n);\nexport default SvgCheck;\n","import type { SVGProps } from 'react';\nconst SvgCopy = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 20 20\" {...props}>\n <g fill=\"currentColor\" fillRule=\"evenodd\" clipPath=\"url(#copy_svg__a)\" clipRule=\"evenodd\">\n <path d=\"M9.167 8.333a.833.833 0 0 0-.834.833v7.5c0 .46.373.834.833.834h7.5c.46 0 .834-.373.834-.834v-7.5a.833.833 0 0 0-.834-.833zm-2.5.833a2.5 2.5 0 0 1 2.5-2.5h7.5a2.5 2.5 0 0 1 2.5 2.5v7.5a2.5 2.5 0 0 1-2.5 2.5h-7.5a2.5 2.5 0 0 1-2.5-2.5z\" />\n <path d=\"M3.334 2.5a.833.833 0 0 0-.834.833v7.5a.833.833 0 0 0 .833.834h.834a.833.833 0 0 1 0 1.667h-.833a2.5 2.5 0 0 1-2.5-2.5v-7.5a2.5 2.5 0 0 1 2.5-2.5h7.5a2.5 2.5 0 0 1 2.5 2.5v.833a.833.833 0 1 1-1.667 0v-.833a.834.834 0 0 0-.833-.834z\" />\n </g>\n <defs>\n <clipPath id=\"copy_svg__a\">\n <path fill=\"currentColor\" d=\"M0 0h20v20H0z\" />\n </clipPath>\n </defs>\n </svg>\n);\nexport default SvgCopy;\n","import type { SVGProps } from 'react';\nconst SvgDragIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 20 20\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M9.167 15c0 .917-.75 1.667-1.667 1.667S5.833 15.917 5.833 15c0-.916.75-1.666 1.667-1.666s1.667.75 1.667 1.666M7.5 8.334c-.917 0-1.667.75-1.667 1.666 0 .917.75 1.667 1.667 1.667s1.667-.75 1.667-1.667c0-.916-.75-1.666-1.667-1.666m0-5c-.917 0-1.667.75-1.667 1.666 0 .917.75 1.667 1.667 1.667S9.167 5.917 9.167 5 8.417 3.334 7.5 3.334m5 3.333c.917 0 1.667-.75 1.667-1.667s-.75-1.666-1.667-1.666-1.667.75-1.667 1.666c0 .917.75 1.667 1.667 1.667m0 1.667c-.917 0-1.667.75-1.667 1.666 0 .917.75 1.667 1.667 1.667s1.667-.75 1.667-1.667c0-.916-.75-1.666-1.667-1.666m0 5c-.917 0-1.667.75-1.667 1.666 0 .917.75 1.667 1.667 1.667s1.667-.75 1.667-1.667c0-.916-.75-1.666-1.667-1.666\"\n />\n </svg>\n);\nexport default SvgDragIcon;\n","import type { SVGProps } from 'react';\nconst SvgEdit = (props: SVGProps<SVGSVGElement>) => (\n <svg fill=\"none\" viewBox=\"0 0 18 18\" {...props}>\n <path\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n d=\"M11.745.91a.833.833 0 0 1 1.179 0l4.167 4.167a.833.833 0 0 1 0 1.179L6.257 17.089a.83.83 0 0 1-.589.244H1.501a.833.833 0 0 1-.833-.833v-4.167c0-.22.088-.433.244-.589zM2.335 12.68v2.988h2.988l10-10-2.988-2.988z\"\n clipRule=\"evenodd\"\n />\n </svg>\n);\nexport default SvgEdit;\n","import type { SVGProps } from 'react';\nconst SvgQuote = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 48 48\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M19.284 11.242c1.2-.504 1.703-1.937 1.161-3.098l-1.897-3.989c-.542-1.122-1.859-1.626-3.02-1.122-3.292 1.394-6.119 3.214-8.364 5.42-2.75 2.595-4.608 5.577-5.615 8.868C.542 20.65 0 25.18 0 30.95v11.888a2.33 2.33 0 0 0 2.323 2.323h15.218a2.33 2.33 0 0 0 2.323-2.323V27.62a2.33 2.33 0 0 0-2.323-2.323h-7.28c.078-3.912 1.007-7.048 2.71-9.41 1.395-1.897 3.486-3.446 6.313-4.646m27.337 0c1.2-.504 1.703-1.937 1.162-3.098l-1.898-3.95a2.315 2.315 0 0 0-3.02-1.122c-3.253 1.394-6.04 3.214-8.325 5.382-2.75 2.633-4.647 5.615-5.654 8.906q-1.51 4.879-1.51 13.591V42.84a2.33 2.33 0 0 0 2.324 2.323h15.217a2.33 2.33 0 0 0 2.324-2.323V27.62a2.33 2.33 0 0 0-2.324-2.323H37.6c.077-3.911 1.007-7.047 2.71-9.41 1.394-1.897 3.485-3.446 6.312-4.646\"\n />\n </svg>\n);\nexport default SvgQuote;\n","import type { SVGProps } from 'react';\nconst SvgX = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M18 6 6 18M6 6l12 12\"\n />\n </svg>\n);\nexport default SvgX;\n","import type { SVGProps } from 'react';\nconst SvgAddImage = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-4.86 8.86-3 3.87L9 13.14 6 17h12z\"\n />\n </svg>\n);\nexport default SvgAddImage;\n","import type { SVGProps } from 'react';\nconst SvgAlignCenter = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M4.667 10v1.333h6.666V10zM2 14h12v-1.333H2zm0-5.333h12V7.333H2zm2.667-4V6h6.666V4.667zM2 2v1.333h12V2z\"\n />\n </svg>\n);\nexport default SvgAlignCenter;\n","import type { SVGProps } from 'react';\nconst SvgAlignLeft = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M10 10H2v1.333h8zm0-5.333H2V6h8zm-8 4h12V7.333H2zM2 14h12v-1.333H2zM2 2v1.333h12V2z\"\n />\n </svg>\n);\nexport default SvgAlignLeft;\n","import type { SVGProps } from 'react';\nconst SvgAlignRight = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M2 3.333V2h12v1.333zM6 6V4.667h8V6zM2 8.667V7.333h12v1.334zm4 2.666V10h8v1.333zM2 14v-1.333h12V14z\"\n />\n </svg>\n);\nexport default SvgAlignRight;\n","import type { SVGProps } from 'react';\nconst SvgArrowDown = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M12 5v14m0 0 7-7m-7 7-7-7\"\n />\n </svg>\n);\nexport default SvgArrowDown;\n","import type { SVGProps } from 'react';\nconst SvgArrowLeft = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"m12 19-7-7m0 0 7-7m-7 7h14\"\n />\n </svg>\n);\nexport default SvgArrowLeft;\n","import type { SVGProps } from 'react';\nconst SvgArrowRight = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M5 12h14m0 0-7-7m7 7-7 7\"\n />\n </svg>\n);\nexport default SvgArrowRight;\n","import type { SVGProps } from 'react';\nconst SvgArrowUp = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"m5 12 7-7m0 0 7 7m-7-7v14\"\n />\n </svg>\n);\nexport default SvgArrowUp;\n","import type { SVGProps } from 'react';\nconst SvgBlockquote = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path fill=\"currentColor\" d=\"M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z\" />\n </svg>\n);\nexport default SvgBlockquote;\n","import type { SVGProps } from 'react';\nconst SvgBold = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M10.134 7.827c.646-.447 1.1-1.18 1.1-1.86 0-1.507-1.167-2.667-2.667-2.667H4.4v9.333h4.694c1.393 0 2.473-1.133 2.473-2.526a2.49 2.49 0 0 0-1.433-2.28M6.4 4.967h2c.554 0 1 .446 1 1 0 .553-.446 1-1 1h-2zm2.334 6H6.4v-2h2.334c.553 0 1 .446 1 1 0 .553-.447 1-1 1\"\n />\n </svg>\n);\nexport default SvgBold;\n","import type { SVGProps } from 'react';\nconst SvgBulletList = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5m0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5m0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5M7 19h14v-2H7zm0-6h14v-2H7zm0-8v2h14V5z\"\n />\n </svg>\n);\nexport default SvgBulletList;\n","import type { SVGProps } from 'react';\nconst SvgCalloutError = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M8 1.333A6.66 6.66 0 0 0 1.333 8 6.66 6.66 0 0 0 8 14.667 6.66 6.66 0 0 0 14.667 8 6.66 6.66 0 0 0 8 1.333m3.333 9.06-.94.94L8 8.94l-2.393 2.393-.94-.94L7.06 8 4.667 5.607l.94-.94L8 7.06l2.393-2.393.94.94L8.94 8z\"\n />\n </svg>\n);\nexport default SvgCalloutError;\n","import type { SVGProps } from 'react';\nconst SvgCalloutInfo = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n d=\"M8 14.667A6.667 6.667 0 1 1 8 1.333a6.667 6.667 0 0 1 0 13.334m0-1.334A5.334 5.334 0 1 0 8 2.666a5.334 5.334 0 0 0 0 10.667m-.667-2.666h1.334V12H7.333zm0-1.328s1.334-.006 1.334 0c0-.668 2-1.34 2-2.672A2.657 2.657 0 0 0 8.006 4a2.667 2.667 0 0 0-2.673 2.667h1.334c0-.734.6-1.334 1.333-1.334s1.333.6 1.333 1.334c0 .6-2 1.578-2 2.672\"\n clipRule=\"evenodd\"\n />\n </svg>\n);\nexport default SvgCalloutInfo;\n","import type { SVGProps } from 'react';\nconst SvgCalloutSuccess = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M11.667 3c-1.3 0-2.7.267-3.667 1-.967-.733-2.367-1-3.667-1s-2.7.267-3.666 1v9.767c0 .433.486.3.5.3.9-.434 2.2-.734 3.166-.734 1.3 0 2.7.267 3.667 1 .9-.566 2.533-1 3.667-1 1.1 0 2.233.2 3.166.7.274.14.5-.126.5-.3V4c-.993-.747-2.42-1-3.666-1M14 12.333C13.267 12.1 12.467 12 11.667 12 10.533 12 8.9 12.433 8 13V5.333c.9-.566 2.533-1 3.667-1 .8 0 1.6.1 2.333.334z\"\n />\n </svg>\n);\nexport default SvgCalloutSuccess;\n","import type { SVGProps } from 'react';\nconst SvgCalloutWarning = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path\n fill=\"currentColor\"\n stroke=\"currentColor\"\n strokeWidth={0.2}\n d=\"M9.6 13.9v1.2H6.4v-1.2zm1-2v1.2H5.4v-1.2zM8 .9a5.1 5.1 0 0 1 4.712 3.148 5.1 5.1 0 0 1 .388 1.947 4.7 4.7 0 0 1-.415 2.157 4.7 4.7 0 0 1-1.348 1.725c-.51.477-.737.713-.737 1.123v.1H9.4V11c0-.979.59-1.506 1.121-2.003l.008-.007.166-.135a3.5 3.5 0 0 0 1.205-2.85V6a3.9 3.9 0 0 0-7.8 0v.006A3.5 3.5 0 0 0 5.466 8.99l.007.006.203.189c.473.447.924.968.924 1.815v.1H5.4V11c0-.408-.229-.643-.732-1.111l-.213-.18A4.7 4.7 0 0 1 2.9 5.995 5.1 5.1 0 0 1 8 .9Z\"\n />\n </svg>\n);\nexport default SvgCalloutWarning;\n","import type { SVGProps } from 'react';\nconst SvgClearFormatting = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"m2.18 3.334-.847.847L5.98 8.827l-1.647 3.84h2l1.047-2.44 3.773 3.774.847-.847-9.634-9.64zm1.82 0v.12l1.88 1.88h1.6L7 6.454l1.4 1.4 1.073-2.52h3.86v-2z\"\n />\n </svg>\n);\nexport default SvgClearFormatting;\n","import type { SVGProps } from 'react';\nconst SvgCodeBlock = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"m8 18-6-6 6-6 1.425 1.425-4.6 4.6L9.4 16.6zm8 0-1.425-1.425 4.6-4.6L14.6 7.4 16 6l6 6z\"\n />\n </svg>\n);\nexport default SvgCodeBlock;\n","import type { SVGProps } from 'react';\nconst SvgCopyable = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M12 1.333H6c-.733 0-1.333.6-1.333 1.334v8C4.667 11.4 5.267 12 6 12h6c.733 0 1.333-.6 1.333-1.333v-8c0-.734-.6-1.334-1.333-1.334m0 9.334H6v-8h6zM2 10V8.667h1.333V10zm0-3.667h1.333v1.334H2zm4.667 7H8v1.334H6.667zm-4.667-1V11h1.333v1.333zm1.333 2.334c-.733 0-1.333-.6-1.333-1.334h1.333zm2.334 0H4.333v-1.334h1.334zm3.333 0v-1.334h1.333c0 .734-.6 1.334-1.333 1.334M3.333 4v1.333H2C2 4.6 2.6 4 3.333 4\"\n />\n </svg>\n);\nexport default SvgCopyable;\n","import type { SVGProps } from 'react';\nconst SvgCustomQuote = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <g clipPath=\"url(#custom-quote_svg__a)\">\n <path\n fill=\"currentColor\"\n d=\"M8 6h3v5c0 2.206-1.794 4-4 4v-2c1.103 0 2-.897 2-2H6V8c0-1.103.897-2 2-2m5 2v3h3c0 1.103-.897 2-2 2v2c2.206 0 4-1.794 4-4V6h-3c-1.103 0-2 .897-2 2m11-5v17h-6.853L13.3 23.18a1.94 1.94 0 0 1-1.292.484c-.476 0-.955-.168-1.337-.508L6.922 20H0V3c0-1.654 1.346-3 3-3h18c1.654 0 3 1.346 3 3m-2 0a1 1 0 0 0-1-1H3a1 1 0 0 0-1 1v15h5.653l4.327 3.645L16.428 18h5.571z\"\n />\n </g>\n <defs>\n <clipPath id=\"custom-quote_svg__a\">\n <path fill=\"currentColor\" d=\"M0 0h24v24H0z\" />\n </clipPath>\n </defs>\n </svg>\n);\nexport default SvgCustomQuote;\n","import type { SVGProps } from 'react';\nconst SvgDeleteColumn = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M9 20h1v2H9zm-3 1v1H5v-1zM6 3H5V2h1zm6 0V2h1v1zm1 8v1h-2v-1zM9 22H8v-2h1zm-1 0H6v-2h2zm-3-1V5h2v16zM5 5V3h2v2zm1-3h4v2H6zm4 0h2v2h-2zm3 1v8h-2V3z\"\n />\n <path\n stroke=\"currentColor\"\n strokeLinecap=\"square\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M18 17h-6\"\n />\n </svg>\n);\nexport default SvgDeleteColumn;\n","import type { SVGProps } from 'react';\nconst SvgDeleteRow = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M20 13v1h2v-1zm1-3h1V9h-1zM3 10V9H2v1zm0 6H2v1h1zm8 1h1v-2h-1zm11-4v-1h-2v1zm0-1v-2h-2v2zm-1-3H5v2h16zM5 9H3v2h2zm-3 1v4h2v-4zm0 4v2h2v-2zm1 3h8v-2H3z\"\n />\n <path\n stroke=\"currentColor\"\n strokeLinecap=\"square\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M15 20h6\"\n />\n </svg>\n);\nexport default SvgDeleteRow;\n","import type { SVGProps } from 'react';\nconst SvgDetails = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M20 7.001H4v-2h16zm0 4h-8v-2h8zm-8 4h8v-2h-8zm-8 0 5-3-5-3zm0 2v2h16v-2z\"\n />\n </svg>\n);\nexport default SvgDetails;\n","import type { SVGProps } from 'react';\nconst SvgH2 = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M4.503 16.5V7.773h1.845v3.6h3.746v-3.6h1.84V16.5h-1.84v-3.605H6.348V16.5zm8.902 0v-1.33l3.106-2.876q.396-.384.665-.69a2.6 2.6 0 0 0 .413-.601q.14-.299.14-.644 0-.383-.174-.66a1.15 1.15 0 0 0-.477-.43 1.5 1.5 0 0 0-.686-.154q-.4 0-.699.162a1.1 1.1 0 0 0-.46.464 1.5 1.5 0 0 0-.162.72h-1.752q0-.855.388-1.487A2.6 2.6 0 0 1 14.794 8q.7-.346 1.61-.346.939 0 1.633.333a2.6 2.6 0 0 1 1.086.912q.388.584.388 1.338 0 .495-.196.976-.192.48-.686 1.07-.495.583-1.393 1.401l-1.275 1.249v.06h3.665V16.5z\"\n />\n </svg>\n);\nexport default SvgH2;\n","import type { SVGProps } from 'react';\nconst SvgH3 = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M4.327 16.5V7.773h1.845v3.6h3.746v-3.6h1.84V16.5h-1.84v-3.605H6.172V16.5zm12.128.12q-.955 0-1.7-.329-.743-.331-1.172-.912a2.3 2.3 0 0 1-.44-1.346h1.859a.97.97 0 0 0 .208.562q.196.24.52.37.325.133.729.133.422 0 .746-.15.324-.148.507-.412.183-.265.183-.61a1.02 1.02 0 0 0-.196-.618 1.25 1.25 0 0 0-.554-.426 2.2 2.2 0 0 0-.852-.153h-.814v-1.355h.814q.417 0 .737-.145.324-.145.503-.4a1.04 1.04 0 0 0 .179-.606 1.05 1.05 0 0 0-.593-.967q-.276-.14-.647-.14-.375 0-.686.135a1.2 1.2 0 0 0-.499.38 1 1 0 0 0-.2.58h-1.769q.013-.756.43-1.33a2.8 2.8 0 0 1 1.126-.9q.711-.327 1.606-.328.904 0 1.581.329.678.327 1.053.886.38.554.375 1.244.004.733-.456 1.223-.456.49-1.19.622v.069q.965.123 1.467.669.507.54.503 1.355a2.13 2.13 0 0 1-.43 1.325q-.432.579-1.19.912t-1.738.332\"\n />\n </svg>\n);\nexport default SvgH3;\n","import type { SVGProps } from 'react';\nconst SvgH4 = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M4.216 16.5V7.773H6.06v3.6h3.745v-3.6h1.841V16.5h-1.84v-3.605H6.06V16.5zm8.77-1.534v-1.453l3.643-5.74h1.253v2.011h-.742l-2.297 3.635v.068h5.178v1.479zm4.188 1.534v-1.977l.035-.644V7.773h1.73V16.5z\"\n />\n </svg>\n);\nexport default SvgH4;\n","import type { SVGProps } from 'react';\nconst SvgH5 = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M4.415 16.5V7.773H6.26v3.6h3.746v-3.6h1.84V16.5h-1.84v-3.605H6.26V16.5zm12.09.12q-.904 0-1.611-.333a2.8 2.8 0 0 1-1.117-.916 2.35 2.35 0 0 1-.43-1.338h1.79q.03.507.425.822.398.316.942.316.435 0 .767-.192.338-.196.524-.541.192-.35.192-.802 0-.459-.196-.81a1.4 1.4 0 0 0-.532-.545 1.57 1.57 0 0 0-.78-.2 1.85 1.85 0 0 0-.746.158 1.35 1.35 0 0 0-.558.43l-1.64-.294.412-4.602h5.336V9.28h-3.814l-.226 2.186h.051q.23-.324.695-.537t1.04-.213q.788 0 1.406.371.618.37.976 1.019.357.643.353 1.483.005.881-.409 1.568a2.9 2.9 0 0 1-1.146 1.074q-.733.387-1.705.387\"\n />\n </svg>\n);\nexport default SvgH5;\n","import type { SVGProps } from 'react';\nconst SvgH6 = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M4.321 16.5V7.773h1.845v3.6h3.746v-3.6h1.84V16.5h-1.84v-3.605H6.166V16.5zm12.251.12a4 4 0 0 1-1.3-.227 2.96 2.96 0 0 1-1.116-.72q-.494-.498-.784-1.32-.285-.823-.285-2.02.003-1.1.251-1.965.252-.87.716-1.475.47-.605 1.12-.92.653-.32 1.462-.32.874 0 1.543.341.669.337 1.074.917.409.58.494 1.3h-1.82a1.22 1.22 0 0 0-.447-.717q-.34-.26-.844-.26-.852 0-1.295.742-.44.741-.447 2.015h.06q.195-.387.527-.66a2.4 2.4 0 0 1 .763-.422q.43-.15.908-.15.776 0 1.38.367.606.363.955.998.35.634.35 1.453 0 .885-.414 1.576-.408.69-1.146 1.083-.733.387-1.705.383m-.008-1.45a1.44 1.44 0 0 0 1.291-.758q.192-.35.192-.784t-.192-.78a1.417 1.417 0 0 0-1.278-.754q-.319 0-.593.12-.268.119-.473.332a1.6 1.6 0 0 0-.43 1.086q0 .422.192.771.195.35.528.559.337.209.763.209\"\n />\n </svg>\n);\nexport default SvgH6;\n","import type { SVGProps } from 'react';\nconst SvgHighlight = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 23 22\" {...props}>\n <path\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"m8.056 9.927 8.07-8.06a2.85 2.85 0 1 1 4.03 4.03l-8.06 8.08m-6.03-1.01c-1.66 0-3 1.35-3 3.02 0 1.33-2.5 1.52-2 2.02 1.08 1.1 2.49 2.02 4 2.02 2.2 0 4-1.8 4-4.04a3.01 3.01 0 0 0-3-3.02\"\n />\n </svg>\n);\nexport default SvgHighlight;\n","import type { SVGProps } from 'react';\nconst SvgHorizontalRule = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path stroke=\"currentColor\" d=\"M4.5 12h15\" />\n </svg>\n);\nexport default SvgHorizontalRule;\n","import type { SVGProps } from 'react';\nconst SvgItalic = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M6.667 3.3v2H8.14l-2.28 5.333H4v2h5.333v-2H7.86L10.14 5.3H12v-2z\"\n />\n </svg>\n);\nexport default SvgItalic;\n","import type { SVGProps } from 'react';\nconst SvgLinkOff = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M17 7h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1 0 1.43-.98 2.63-2.31 2.98l1.46 1.46C20.88 15.61 22 13.95 22 12c0-2.76-2.24-5-5-5m-1 4h-2.19l2 2H16zM2 4.27l3.11 3.11A4.99 4.99 0 0 0 2 12c0 2.76 2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1 0-1.59 1.21-2.9 2.76-3.07L8.73 11H8v2h2.73L13 15.27V17h1.73l4.01 4L20 19.74 3.27 3z\"\n />\n </svg>\n);\nexport default SvgLinkOff;\n","import type { SVGProps } from 'react';\nconst SvgLink = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M11.333 13.333v-2h-2V9.999h2V8h1.333v2h2v1.334h-2v2zm-4-2H4.666a3.21 3.21 0 0 1-2.358-.976A3.2 3.2 0 0 1 1.333 8q0-1.383.975-2.358a3.2 3.2 0 0 1 2.358-.975h2.667v1.333H4.666q-.832 0-1.416.584a1.93 1.93 0 0 0-.584 1.416q0 .834.584 1.417.583.583 1.416.583h2.667zm-2-2.667V7.333h5.333v1.333zm9.333-.667h-1.333q0-.832-.583-1.416a1.93 1.93 0 0 0-1.417-.584H8.666V4.666h2.667q1.383 0 2.359.975.975.976.974 2.358\"\n />\n </svg>\n);\nexport default SvgLink;\n","import type { SVGProps } from 'react';\nconst SvgMath = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M12.352 2.952c.078-.522.437-1.077.948-1.077.517 0 .937.42.937.938h1.875A2.816 2.816 0 0 0 13.3 0c-1.577 0-2.603 1.345-2.803 2.675L9.895 6.75H7.019v1.875h2.598L7.78 21.05l-.006.044c-.05.498-.44 1.031-.942 1.031a.94.94 0 0 1-.937-.937H4.019A2.816 2.816 0 0 0 6.83 24c1.578 0 2.661-1.366 2.805-2.695l1.877-12.68h2.818V6.75H11.79zm7.63 8.673H17.73l-1.218 1.832-.812-1.832h-2.051l1.632 3.683-2.6 3.91h2.251l1.25-1.878.833 1.879h2.05l-1.653-3.73z\"\n />\n </svg>\n);\nexport default SvgMath;\n","import type { SVGProps } from 'react';\nconst SvgMergeCells = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M6.41 21 5 19.59l4.83-4.83c.75-.75 1.17-1.77 1.17-2.83v-5.1L9.41 8.41 8 7l4-4 4 4-1.41 1.41L13 6.83v5.1c0 1.06.42 2.08 1.17 2.83L19 19.59 17.59 21 12 15.41z\"\n />\n </svg>\n);\nexport default SvgMergeCells;\n","import type { SVGProps } from 'react';\nconst SvgMythReality = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M4 6a1 1 0 0 0-1 1v3a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1zm0 7a1 1 0 0 0-1 1v3a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1zm6-6a1 1 0 0 1 1-1h9a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-9a1 1 0 0 1-1-1zm1 6a1 1 0 0 0-1 1v3a1 1 0 0 0 1 1h9a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1z\"\n />\n </svg>\n);\nexport default SvgMythReality;\n","import type { SVGProps } from 'react';\nconst SvgOrderedList = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M2 16.999h2v.5H3v1h1v.5H2v1h3v-4H2zm1-9h1v-4H2v1h1zm-1 3h1.8l-1.8 2.1v.9h3v-1H3.2l1.8-2.1v-.9H2zm5-6v2h14v-2zm0 14h14v-2H7zm0-6h14v-2H7z\"\n />\n </svg>\n);\nexport default SvgOrderedList;\n","import type { SVGProps } from 'react';\nconst SvgPrompt = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path\n fill=\"currentColor\"\n stroke=\"currentColor\"\n strokeWidth={0.1}\n d=\"M13.59 2.45a1.466 1.466 0 0 1 1.46 1.46v8.18a1.466 1.466 0 0 1-1.46 1.46H2.41a1.466 1.466 0 0 1-1.46-1.46V3.91a1.466 1.466 0 0 1 1.46-1.46zM2.41 3.55a.36.36 0 0 0-.36.36v8.18a.36.36 0 0 0 .36.36h11.18a.36.36 0 0 0 .36-.36V3.91a.36.36 0 0 0-.36-.36z\"\n />\n <path\n fill=\"currentColor\"\n stroke=\"currentColor\"\n strokeWidth={0.1}\n d=\"M4 4.948a.55.55 0 0 1 .39.161l2.5 2.5a.553.553 0 0 1 0 .782l-2.5 2.5a.55.55 0 0 1-.943-.391.55.55 0 0 1 .162-.39L5.724 8 3.609 5.89A.553.553 0 0 1 4 4.949Zm8 5.002a.55.55 0 0 1 0 1.1H7.5a.55.55 0 0 1 0-1.1z\"\n />\n </svg>\n);\nexport default SvgPrompt;\n","import type { SVGProps } from 'react';\nconst SvgRedo = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M21.328 13.496H15.43a.375.375 0 0 0-.288.615l2.95 3.54a.375.375 0 0 0 .575 0l2.95-3.54a.375.375 0 0 0-.289-.615\"\n />\n <path\n fill=\"currentColor\"\n d=\"M17.48 13.496a7.503 7.503 0 0 0-13.136-3.273.75.75 0 1 1-1.157-.954 9.003 9.003 0 0 1 15.818 4.227z\"\n />\n </svg>\n);\nexport default SvgRedo;\n","import type { SVGProps } from 'react';\nconst SvgSplitCells = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path fill=\"currentColor\" d=\"M3 15h8v-2H3zm0 4h8v-2H3zm0-8h8V9H3zm0-6v2h8V5zm10 0h8v14h-8z\" />\n </svg>\n);\nexport default SvgSplitCells;\n","import type { SVGProps } from 'react';\nconst SvgStrikethrough = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M4.567 5.72C4.567 3.913 6.3 3 8.16 3c1.093 0 2 .327 2.6.853.513.434.973 1.154.973 2.16H9.727q0-.308-.1-.566c-.194-.574-.8-.854-1.5-.854-1.24 0-1.56.68-1.56 1.134 0 .32.166.586.493.806.253.167.513.32.94.467H4.927c-.14-.227-.36-.593-.36-1.28M14 9V7.667H2V9h6.413c.767.3 1.307.5 1.307 1.313 0 .667-.54 1.114-1.52 1.114-1.027 0-1.953-.36-1.953-1.674h-1.98c0 .367.053.754.16 1.054.54 1.526 2.193 2.2 3.78 2.2 1.513 0 3.533-.594 3.533-2.7 0-.2-.007-.774-.32-1.294H14z\"\n />\n </svg>\n);\nexport default SvgStrikethrough;\n","import type { SVGProps } from 'react';\nconst SvgSubscript = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M16.796 8.156V6.094q0-.438.302-.736.303-.297.749-.295h2.102V4.03h-3.153V3h3.153q.446 0 .75.297a.98.98 0 0 1 .301.734v1.032q0 .438-.303.735a1.02 1.02 0 0 1-.748.296h-2.102v1.031H21v1.031zM3 19.5l4.861-7.502-4.52-6.935h2.786l3.258 5.156h.106l3.232-5.156h2.811l-4.546 6.935 4.888 7.502h-2.812l-3.573-5.594h-.106L5.812 19.5z\"\n />\n </svg>\n);\nexport default SvgSubscript;\n","import type { SVGProps } from 'react';\nconst SvgSuperscript = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M16.796 8.156V6.094q0-.438.302-.736.303-.297.749-.295h2.102V4.03h-3.153V3h3.153q.446 0 .75.297a.98.98 0 0 1 .301.734v1.032q0 .438-.303.735a1.02 1.02 0 0 1-.748.296h-2.102v1.031H21v1.031zM3 19.5l4.861-7.502-4.52-6.935h2.786l3.258 5.156h.106l3.232-5.156h2.811l-4.546 6.935 4.888 7.502h-2.812l-3.573-5.594h-.106L5.812 19.5z\"\n />\n </svg>\n);\nexport default SvgSuperscript;\n","import type { SVGProps } from 'react';\nconst SvgTableColumnHeading = (props: SVGProps<SVGSVGElement>) => (\n <svg fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path fill=\"currentColor\" d=\"M14 5.333H2V2.667h12zm0 1.334H2v2.666h12zm0 4H2v2.666h12z\" />\n </svg>\n);\nexport default SvgTableColumnHeading;\n","import type { SVGProps } from 'react';\nconst SvgTableRowHeading = (props: SVGProps<SVGSVGElement>) => (\n <svg fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M6.667 6.68H10V14H6.667zM11.333 14h2c.734 0 1.334-.6 1.334-1.333v-6h-3.334zm2-12h-10C2.6 2 2 2.6 2 3.333v2h12.667v-2c0-.733-.6-1.333-1.334-1.333M2 12.667C2 13.4 2.6 14 3.333 14h2V6.667H2z\"\n />\n </svg>\n);\nexport default SvgTableRowHeading;\n","import type { SVGProps } from 'react';\nconst SvgTable = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path stroke=\"currentColor\" strokeWidth={1.8} d=\"M4 4h8v8H4zM4 12h8v8H4zM12 4h8v8h-8z\" />\n <path\n stroke=\"currentColor\"\n strokeLinecap=\"square\"\n strokeLinejoin=\"round\"\n strokeWidth={1.8}\n d=\"M19 22v-3m0 0v-3m0 3h-3m3 0h3\"\n />\n </svg>\n);\nexport default SvgTable;\n","import type { SVGProps } from 'react';\nconst SvgTextColor = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"m6 20 6-16 6 16m-9-6h6\"\n />\n </svg>\n);\nexport default SvgTextColor;\n","import type { SVGProps } from 'react';\nconst SvgUnderline = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M3.333 14v-1.333h9.333V14zM8 11.333q-1.684 0-2.617-1.05T4.45 7.5V2h1.716v5.6q0 .933.467 1.517T8 9.7t1.366-.583q.467-.585.467-1.517V2h1.717v5.5q0 1.734-.934 2.783-.933 1.05-2.616 1.05\"\n />\n </svg>\n);\nexport default SvgUnderline;\n","import type { SVGProps } from 'react';\nconst SvgUndo = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"M3.375 13.496h5.898a.375.375 0 0 1 .288.615l-2.95 3.54a.375.375 0 0 1-.575 0l-2.95-3.54a.375.375 0 0 1 .289-.615\"\n />\n <path\n fill=\"currentColor\"\n d=\"M7.224 13.496a7.503 7.503 0 0 1 13.135-3.273.749.749 0 0 0 1.306-.696.8.8 0 0 0-.15-.258 9.003 9.003 0 0 0-15.817 4.227z\"\n />\n </svg>\n);\nexport default SvgUndo;\n","import type { SVGProps } from 'react';\nconst SvgVideo = (props: SVGProps<SVGSVGElement>) => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" {...props}>\n <path\n fill=\"currentColor\"\n d=\"m15.464 11.588-4.361-3.17a.525.525 0 0 0-.835.424v6.338a.525.525 0 0 0 .835.423l4.36-3.167a.522.522 0 0 0 0-.848\"\n />\n <path\n fill=\"currentColor\"\n d=\"M12 1.5C6.2 1.5 1.5 6.2 1.5 12c0 5.798 4.7 10.497 10.5 10.497S22.5 17.797 22.5 12c0-5.8-4.7-10.5-10.5-10.5m0 19.245A8.745 8.745 0 0 1 3.254 12c0-4.828 3.916-8.747 8.746-8.747S20.745 7.17 20.745 12A8.744 8.744 0 0 1 12 20.745\"\n />\n </svg>\n);\nexport default SvgVideo;\n","import { TiptapCopy, TiptapCheck } from \"../../../icons\";\n\ninterface CopyButtonProps {\n iconSize?: number;\n color?: \"white\" | \"black\" | \"prompt\";\n}\n\n/**\n * Reusable copy button component for server-rendered content\n * Works with a client-side interactivity provider that:\n * - Handles click events via data-copy-action attribute\n * - Copies content from nearest element marked with data-copy-content\n * - Shows TiptapCopy icon by default\n * - Switches to TiptapCheck icon for 1500ms after successful copy\n *\n * @example\n * ```tsx\n * <div>\n * <div data-copy-content>Text to copy</div>\n * <CopyButton iconSize={16} />\n * </div>\n * ```\n */\nexport const CopyButton = ({ iconSize = 16, color = \"black\" }: CopyButtonProps) => {\n return (\n <button\n className={`copy-button copy-icon-${color}`}\n data-copy-action=\"copy\"\n type=\"button\"\n >\n <span\n className=\"copy-icon\"\n data-copy-icon=\"default\"\n >\n <TiptapCopy\n width={iconSize}\n height={iconSize}\n />\n </span>\n <span\n className=\"copy-icon-success\"\n data-copy-icon=\"success\"\n style={{ display: \"none\" }}\n >\n <TiptapCheck\n width={iconSize}\n height={iconSize}\n />\n </span>\n </button>\n );\n};\n","import { ReactNode } from \"react\";\nimport { CopyButton } from \"./copy-button\";\n\nexport const CopyableText = ({ children }: { children: ReactNode }) => {\n return (\n <span className=\"copyable\">\n <span data-copy-content>{children}</span>\n <CopyButton iconSize={16} />\n </span>\n );\n};\n","import { ReactNode } from \"react\";\nimport { TiptapQuote } from \"../../../icons\";\n\ninterface CustomQuoteProps {\n children: ReactNode;\n}\n\nexport const CustomQuote = ({ children }: CustomQuoteProps) => (\n <div data-custom-quote=\"\">\n <div className=\"custom-quote-divider\" />\n <div className=\"custom-quote-svg-wrapper\">\n <TiptapQuote />\n </div>\n {children}\n </div>\n);\n\ninterface CustomQuoteTextProps {\n children: ReactNode;\n isEmpty?: boolean;\n placeholder?: string;\n}\n\nexport const CustomQuoteText = ({ children, isEmpty, placeholder }: CustomQuoteTextProps) => (\n <div\n data-custom-quote-text\n className={isEmpty ? \"is-empty\" : \"\"}\n data-placeholder={placeholder}\n >\n {children}\n </div>\n);\n\ninterface CustomQuoteAuthorProps {\n children: ReactNode;\n isEmpty?: boolean;\n placeholder?: string;\n}\n\nexport const CustomQuoteAuthor = ({ children, isEmpty, placeholder }: CustomQuoteAuthorProps) => (\n <div\n data-custom-quote-author=\"\"\n className={isEmpty ? \"is-empty\" : \"\"}\n data-placeholder={placeholder}\n >\n {children}\n </div>\n);\n\ninterface CustomQuoteSignProps {\n children: ReactNode;\n isEmpty?: boolean;\n placeholder?: string;\n}\n\nexport const CustomQuoteSign = ({ children, isEmpty, placeholder }: CustomQuoteSignProps) => (\n <div\n data-custom-quote-sign=\"\"\n className={isEmpty ? \"is-empty\" : \"\"}\n data-placeholder={placeholder}\n >\n {children}\n </div>\n);\n","import { ReactNode } from \"react\";\n\nimport { TiptapEdit } from \"../../../icons\";\nimport { resolveImageSrc } from \"../../../utils/image-src-resolver\";\n\ninterface FigureProps {\n src?: string;\n alt?: string;\n title?: string;\n caption?: string;\n width?: number | null;\n height?: number | null;\n isEditable?: boolean;\n onEditClick?: () => void;\n children?: ReactNode;\n fileId?: string | null;\n getImageById?: (fileId: string) => string | null;\n}\n\nexport const Figure = ({\n src,\n alt,\n title,\n caption,\n width,\n height,\n isEditable,\n onEditClick,\n children,\n fileId,\n getImageById,\n}: FigureProps) => {\n const resolvedSrc = resolveImageSrc({ fileId, src }, { getImageById });\n\n return (\n <figure>\n {resolvedSrc && (\n <div className=\"figure-image-container\">\n <img\n src={resolvedSrc}\n alt={alt || \"\"}\n title={title}\n width={width || undefined}\n height={height || undefined}\n />\n {isEditable && onEditClick && (\n <button\n type=\"button\"\n className=\"figure-edit-button\"\n onClick={onEditClick}\n contentEditable={false}\n aria-label=\"Редактировать изображение\"\n >\n <TiptapEdit />\n </button>\n )}\n </div>\n )}\n {caption && <figcaption>{caption}</figcaption>}\n {children}\n </figure>\n );\n};\n","import { ReactNode } from \"react\";\nimport { CopyButton } from \"./copy-button\";\n\ninterface PromptHeaderProps {\n children: ReactNode;\n isEmpty?: boolean;\n placeholder?: string;\n}\n\nexport const PromptHeader = ({ children, isEmpty, placeholder }: PromptHeaderProps) => (\n <div className=\"prompt-header-wrapper\">\n <div\n className={isEmpty ? \"is-empty\" : \"\"}\n data-placeholder={placeholder}\n >\n {children}\n </div>\n <span className=\"prompt-copy-icon-wrapper\">\n <CopyButton\n iconSize={16}\n color=\"prompt\"\n />\n </span>\n </div>\n);\n\ninterface PromptContentProps {\n children: ReactNode;\n isEmpty?: boolean;\n placeholder?: string;\n}\n\nexport const PromptContent = ({ children, isEmpty, placeholder }: PromptContentProps) => (\n <div className=\"prompt-content-wrapper\">\n <div\n className={isEmpty ? \"is-empty\" : \"\"}\n data-placeholder={placeholder}\n data-copy-content\n >\n {children}\n </div>\n </div>\n);\n","export enum VideoHosting {\n Youtube = 'youtube',\n Vimeo = 'vimeo',\n Rutube = 'rutube',\n VK = 'vk',\n}\n\nexport interface VideoInfo {\n hosting: VideoHosting;\n videoId: string;\n embedUrl: string;\n}\n\nconst VIDEO_PATTERNS = {\n youtube: /(?:https?:\\/\\/)?(?:www\\.)?(?:youtube\\.com|youtu\\.be)\\/(?:watch\\?v=|shorts\\/)?([a-zA-Z0-9_-]{11})/,\n youtubeEmbed: /(?:https?:\\/\\/)?(?:www\\.)?(?:youtube\\.com|youtube-nocookie\\.com)\\/embed\\/([a-zA-Z0-9_-]{11})/,\n vimeo: /(?:http|https)?:\\/\\/(?:www\\.)?vimeo\\.com\\/(?:channels\\/(?:\\w+\\/)?|groups\\/(?:[^/]*)?\\/videos\\/)?(\\d+)(?:|\\/\\?)/,\n rutube: /^https:\\/\\/rutube\\.ru\\/video\\/([\\w-]+)/,\n vk: /(?:https?:\\/\\/)?(?:vk\\.com|vkvideo\\.ru)\\/video(-?\\d+)_(\\d+)/,\n} as const;\n\n/**\n * Detects video hosting platform and extracts video information from URL\n * Supports YouTube, Vimeo, Rutube, and VK video platforms\n *\n * Note: This function is synchronous as it only performs regex pattern matching.\n * It can be safely used in both client and server-side rendering contexts.\n */\nexport const detectVideoHosting = (src: string): VideoInfo | null => {\n if (!src || typeof src !== 'string') {\n return null;\n }\n\n const cleanSrc = src.trim();\n if (!cleanSrc) {\n return null;\n }\n\n try {\n // Check YouTube embed URLs (already in embed format from old editor)\n const youTubeEmbedMatch = VIDEO_PATTERNS.youtubeEmbed.exec(cleanSrc);\n if (youTubeEmbedMatch?.[1]) {\n const videoId = youTubeEmbedMatch[1];\n return {\n hosting: VideoHosting.Youtube,\n videoId,\n embedUrl: `https://www.youtube-nocookie.com/embed/${videoId}`,\n };\n }\n\n // Check YouTube regular URLs\n const youTubeMatch = VIDEO_PATTERNS.youtube.exec(cleanSrc);\n if (youTubeMatch?.[1]) {\n const videoId = youTubeMatch[1];\n return {\n hosting: VideoHosting.Youtube,\n videoId,\n embedUrl: `https://www.youtube-nocookie.com/embed/${videoId}`,\n };\n }\n\n // Check Vimeo\n const vimeoMatch = VIDEO_PATTERNS.vimeo.exec(cleanSrc);\n if (vimeoMatch?.[1]) {\n const videoId = vimeoMatch[1];\n // Extract hash parameter if present\n const hashRegex = /\\/(\\d+)\\/([a-fA-F0-9]+)/;\n const hashMatch = hashRegex.exec(cleanSrc);\n const hash = hashMatch?.[2] || null;\n const hashParam = hash ? `?h=${hash}` : '';\n\n return {\n hosting: VideoHosting.Vimeo,\n videoId,\n embedUrl: `https://player.vimeo.com/video/${videoId}${hashParam}`,\n };\n }\n\n // Check Rutube\n const ruTubeMatch = VIDEO_PATTERNS.rutube.exec(cleanSrc);\n if (ruTubeMatch?.[1]) {\n const videoId = ruTubeMatch[1];\n return {\n hosting: VideoHosting.Rutube,\n videoId,\n embedUrl: `https://rutube.ru/play/embed/${videoId}`,\n };\n }\n\n // Check VK\n const vkMatch = VIDEO_PATTERNS.vk.exec(cleanSrc);\n if (vkMatch?.[1] && vkMatch?.[2]) {\n const videoId = `${vkMatch[1]}_${vkMatch[2]}`;\n return {\n hosting: VideoHosting.VK,\n videoId,\n embedUrl: `https://vk.com/video_ext.php?oid=${vkMatch[1]}&id=${vkMatch[2]}`,\n };\n }\n } catch {\n // Silent failure for unsupported video URLs\n // Error details available in development via devtools\n }\n\n return null;\n};\n","import { detectVideoHosting } from \"@/utils/detect-video-hosting\";\nimport { ReactNode } from \"react\";\n\ninterface VideoProps {\n src: string;\n children?: ReactNode;\n}\n\nexport const Video = ({ src, children }: VideoProps) => {\n const videoInfo = detectVideoHosting(src);\n\n if (!videoInfo?.embedUrl) {\n return (\n <div className=\"video-node\">\n <div className=\"video-error\">\n <span>Unsupported or invalid video URL</span>\n </div>\n {children}\n </div>\n );\n }\n\n return (\n <div\n className=\"video-node\"\n data-video=\"\"\n >\n <div className=\"video-player-wrapper\">\n <iframe\n className=\"video-iframe\"\n src={videoInfo?.embedUrl}\n title=\"Video Player\"\n allow=\"autoplay; encrypted-media\"\n allowFullScreen\n />\n </div>\n {children}\n </div>\n );\n};\n","import { generateJSON, type JSONContent } from \"@tiptap/core\";\nimport { getSharedExtensions } from \"./get-shared-extensions\";\nimport { BaseFigure } from \"@/extensions/base/figure\";\nimport { TableKit } from \"@tiptap/extension-table\";\nimport { BaseCodeBlock } from \"@/extensions/base\";\n\nfunction isJSONContent(value: unknown): value is JSONContent {\n return (\n typeof value === \"object\" && value !== null && \"type\" in value && typeof value.type === \"string\"\n );\n}\n\nexport function htmlToTiptapContent(content: string | JSONContent): JSONContent {\n if (isJSONContent(content)) {\n return content;\n }\n\n if (typeof content === \"string\") {\n try {\n const parsed = JSON.parse(content);\n if (isJSONContent(parsed)) {\n return parsed;\n }\n } catch {\n // Not valid JSON, treat as HTML\n }\n }\n\n if (!content || content.trim() === \"\") {\n return { type: \"doc\", content: [{ type: \"paragraph\" }] };\n }\n\n const sharedExtensions = getSharedExtensions();\n\n const extensions = [...sharedExtensions, BaseFigure, TableKit, BaseCodeBlock];\n\n try {\n return generateJSON(content, extensions);\n } catch (error) {\n console.error(\"Failed to convert HTML to Tiptap content:\", error);\n return { type: \"doc\", content: [{ type: \"paragraph\" }] };\n }\n}\n"],"mappings":";AAAA,SAAS,4BAA4B;;;ACArC,SAAS,mBAAmB;AAC5B,SAAS,gBAAgB;;;ACAzB,SAAS,qBAAqB;AAQvB,SAAS,eAAe,QAAgB,UAA2B;AACxE,QAAM,EAAE,MA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E,SAAS,aAAa,GAAsB;AACzE,SAAO,oBAAoB,SAAS,YAAY;AAClD;;;A6FrGA,SAAS,oBAAsC;AAG/C,SAAS,YAAAC,iBAAgB;AAGzB,SAAS,cAAc,OAAsC;AAC3D,SACE,OAAO,UAAU,YAAY,UAAU,QAAQ,UAAU,SAAS,OAAO,MAAM,SAAS;AAE5F;AAEO,SAAS,oBAAoB,SAA4C;AAC9E,MAAI,cAAc,OAAO,GAAG;AAC1B,WAAO;AAAA,EACT;AAEA,MAAI,OAAO,YAAY,UAAU;AAC/B,QAAI;AACF,YAAM,SAAS,KAAK,MAAM,OAAO;AACjC,UAAI,cAAc,MAAM,GAAG;AACzB,eAAO;AAAA,MACT;AAAA,IACF,QAAQ;AAAA,IAER;AAAA,EACF;AAEA,MAAI,CAAC,WAAW,QAAQ,KAAK,MAAM,IAAI;AACrC,WAAO,EAAE,MAAM,OAAO,SAAS,CAAC,EAAE,MAAM,YAAY,CAAC,EAAE;AAAA,EACzD;AAEA,QAAM,mBAAmB,oBAAoB;AAE7C,QAAM,aAAa,CAAC,GAAG,kBAAkB,YAAYC,WAAU,aAAa;AAE5E,MAAI;AACF,WAAO,aAAa,SAAS,UAAU;AAAA,EACzC,SAAS,OAAO;AACd,YAAQ,MAAM,6CAA6C,KAAK;AAChE,WAAO,EAAE,MAAM,OAAO,SAAS,CAAC,EAAE,MAAM,YAAY,CAAC,EAAE;AAAA,EACzD;AACF;","names":["legacyTypeMap","mergeAttributes","mergeAttributes","Node","TextSelection","mergeAttributes","Node","Node","mergeAttributes","Node","mergeAttributes","TextSelection","Node","mergeAttributes","mergeAttributes","Mark","mergeAttributes","Extension","mergeAttributes","Node","TextSelection","Image","Node","mergeAttributes","TextSelection","Image","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","legacyTypeMap","html","common","createLowlight","jsx","jsx","jsxs","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsxs","jsx","jsxs","jsx","jsx","jsx","jsx","jsx","jsx","jsx","jsxs","jsx","jsx","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","lowlight","createLowlight","common","html","jsx","jsxs","CopyableText","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","jsxs","jsx","html","CopyableText","jsx","TableKit","TableKit"]}
|