@payloadcms/richtext-lexical 3.68.0-internal-debug.e9b66ee → 3.68.0-internal-debug.654e4ad

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.
Files changed (313) hide show
  1. package/dist/cell/rscEntry.js +21 -2
  2. package/dist/cell/rscEntry.js.map +1 -1
  3. package/dist/exports/client/index.d.ts +1 -0
  4. package/dist/exports/client/index.d.ts.map +1 -1
  5. package/dist/exports/client/index.js +1 -0
  6. package/dist/exports/client/index.js.map +1 -1
  7. package/dist/exports/client/internal-client.d.ts +3 -0
  8. package/dist/exports/client/internal-client.d.ts.map +1 -0
  9. package/dist/exports/client/internal-client.js +4 -0
  10. package/dist/exports/client/internal-client.js.map +1 -0
  11. package/dist/exports/react/index.d.ts +1 -1
  12. package/dist/exports/react/index.d.ts.map +1 -1
  13. package/dist/exports/react/index.js.map +1 -1
  14. package/dist/features/blocks/client/component/BlockContent.js +48 -13
  15. package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
  16. package/dist/features/blocks/client/component/components/BlockCollapsible.js +10 -1
  17. package/dist/features/blocks/client/component/components/BlockCollapsible.js.map +1 -1
  18. package/dist/features/blocks/client/component/components/BlockEditButton.js +7 -1
  19. package/dist/features/blocks/client/component/components/BlockEditButton.js.map +1 -1
  20. package/dist/features/blocks/client/component/components/BlockRemoveButton.js +7 -1
  21. package/dist/features/blocks/client/component/components/BlockRemoveButton.js.map +1 -1
  22. package/dist/features/blocks/client/component/index.js +247 -81
  23. package/dist/features/blocks/client/component/index.js.map +1 -1
  24. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js +9 -1
  25. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js.map +1 -1
  26. package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js +7 -1
  27. package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js.map +1 -1
  28. package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js +7 -1
  29. package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js.map +1 -1
  30. package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js +7 -1
  31. package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js.map +1 -1
  32. package/dist/features/blocks/client/componentInline/index.js +217 -68
  33. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  34. package/dist/features/blocks/client/getBlockImageComponent.js +15 -4
  35. package/dist/features/blocks/client/getBlockImageComponent.js.map +1 -1
  36. package/dist/features/blocks/client/nodes/BlocksNode.js +12 -1
  37. package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
  38. package/dist/features/blocks/client/nodes/InlineBlocksNode.js +12 -2
  39. package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -1
  40. package/dist/features/blocks/premade/CodeBlock/Component/Block.js +127 -26
  41. package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
  42. package/dist/features/blocks/premade/CodeBlock/Component/Code.js +65 -49
  43. package/dist/features/blocks/premade/CodeBlock/Component/Code.js.map +1 -1
  44. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js +16 -3
  45. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js.map +1 -1
  46. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js +25 -4
  47. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js.map +1 -1
  48. package/dist/features/converters/lexicalToJSX/Component/index.d.ts +2 -14
  49. package/dist/features/converters/lexicalToJSX/Component/index.d.ts.map +1 -1
  50. package/dist/features/converters/lexicalToJSX/Component/index.js +16 -10
  51. package/dist/features/converters/lexicalToJSX/Component/index.js.map +1 -1
  52. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js +8 -1
  53. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js.map +1 -1
  54. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js +8 -1
  55. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
  56. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js +6 -1
  57. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js.map +1 -1
  58. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js +6 -1
  59. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js.map +1 -1
  60. package/dist/features/converters/lexicalToJSX/converter/converters/link.js +19 -10
  61. package/dist/features/converters/lexicalToJSX/converter/converters/link.js.map +1 -1
  62. package/dist/features/converters/lexicalToJSX/converter/converters/list.js +63 -16
  63. package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
  64. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js +19 -4
  65. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js.map +1 -1
  66. package/dist/features/converters/lexicalToJSX/converter/converters/table.js +45 -12
  67. package/dist/features/converters/lexicalToJSX/converter/converters/table.js.map +1 -1
  68. package/dist/features/converters/lexicalToJSX/converter/converters/text.js +57 -11
  69. package/dist/features/converters/lexicalToJSX/converter/converters/text.js.map +1 -1
  70. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js +46 -7
  71. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
  72. package/dist/features/converters/lexicalToJSX/converter/index.d.ts +16 -1
  73. package/dist/features/converters/lexicalToJSX/converter/index.d.ts.map +1 -1
  74. package/dist/features/converters/lexicalToJSX/converter/index.js +98 -9
  75. package/dist/features/converters/lexicalToJSX/converter/index.js.map +1 -1
  76. package/dist/features/converters/lexicalToJSX/converter/types.d.ts +14 -10
  77. package/dist/features/converters/lexicalToJSX/converter/types.d.ts.map +1 -1
  78. package/dist/features/converters/lexicalToJSX/converter/types.js.map +1 -1
  79. package/dist/features/debug/jsxConverter/client/plugin/index.js +17 -4
  80. package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
  81. package/dist/features/debug/testRecorder/client/plugin/index.js +113 -38
  82. package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
  83. package/dist/features/debug/treeView/client/plugin/index.js +15 -1
  84. package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
  85. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +357 -79
  86. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
  87. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +41 -7
  88. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
  89. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +39 -9
  90. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
  91. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +59 -28
  92. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -1
  93. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +1 -0
  94. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  95. package/dist/features/indent/client/IndentPlugin.js +6 -1
  96. package/dist/features/indent/client/IndentPlugin.js.map +1 -1
  97. package/dist/features/link/client/plugins/clickableLink/index.js +7 -1
  98. package/dist/features/link/client/plugins/clickableLink/index.js.map +1 -1
  99. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +151 -59
  100. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  101. package/dist/features/link/client/plugins/floatingLinkEditor/index.js +9 -1
  102. package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
  103. package/dist/features/lists/checklist/client/plugin/index.js +7 -1
  104. package/dist/features/lists/checklist/client/plugin/index.js.map +1 -1
  105. package/dist/features/lists/plugin/index.js +7 -1
  106. package/dist/features/lists/plugin/index.js.map +1 -1
  107. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +18 -3
  108. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  109. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +9 -2
  110. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  111. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +18 -3
  112. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  113. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +9 -2
  114. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  115. package/dist/features/relationship/client/components/RelationshipComponent.js +100 -31
  116. package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
  117. package/dist/features/relationship/client/drawer/index.js +21 -4
  118. package/dist/features/relationship/client/drawer/index.js.map +1 -1
  119. package/dist/features/relationship/client/nodes/RelationshipNode.js +12 -2
  120. package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
  121. package/dist/features/relationship/client/plugins/index.js +8 -1
  122. package/dist/features/relationship/client/plugins/index.js.map +1 -1
  123. package/dist/features/textState/feature.client.js +22 -5
  124. package/dist/features/textState/feature.client.js.map +1 -1
  125. package/dist/features/toolbars/fixed/client/Toolbar/index.js +123 -27
  126. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  127. package/dist/features/toolbars/inline/client/Toolbar/index.js +111 -18
  128. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  129. package/dist/features/toolbars/shared/ToolbarButton/index.js +14 -4
  130. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  131. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +135 -56
  132. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  133. package/dist/features/toolbars/shared/ToolbarDropdown/index.js +70 -16
  134. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  135. package/dist/features/upload/client/component/index.js +167 -43
  136. package/dist/features/upload/client/component/index.js.map +1 -1
  137. package/dist/features/upload/client/component/pending/index.js +16 -3
  138. package/dist/features/upload/client/component/pending/index.js.map +1 -1
  139. package/dist/features/upload/client/drawer/index.js +21 -4
  140. package/dist/features/upload/client/drawer/index.js.map +1 -1
  141. package/dist/features/upload/client/nodes/UploadNode.js +17 -3
  142. package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
  143. package/dist/features/upload/client/plugin/index.js +9 -2
  144. package/dist/features/upload/client/plugin/index.js.map +1 -1
  145. package/dist/field/Diff/converters/listitem/index.js +54 -11
  146. package/dist/field/Diff/converters/listitem/index.js.map +1 -1
  147. package/dist/field/Diff/converters/relationship/index.js +60 -18
  148. package/dist/field/Diff/converters/relationship/index.js.map +1 -1
  149. package/dist/field/Diff/converters/unknown/index.js +42 -7
  150. package/dist/field/Diff/converters/unknown/index.js.map +1 -1
  151. package/dist/field/Diff/converters/upload/index.js +91 -21
  152. package/dist/field/Diff/converters/upload/index.js.map +1 -1
  153. package/dist/field/Diff/index.js +17 -4
  154. package/dist/field/Diff/index.js.map +1 -1
  155. package/dist/field/Field.d.ts.map +1 -1
  156. package/dist/field/Field.js +141 -26
  157. package/dist/field/Field.js.map +1 -1
  158. package/dist/field/RenderLexical/index.js +47 -15
  159. package/dist/field/RenderLexical/index.js.map +1 -1
  160. package/dist/field/RichTextViewProvider.d.ts +83 -0
  161. package/dist/field/RichTextViewProvider.d.ts.map +1 -0
  162. package/dist/field/RichTextViewProvider.js +102 -0
  163. package/dist/field/RichTextViewProvider.js.map +1 -0
  164. package/dist/field/ViewSelector.d.ts +4 -0
  165. package/dist/field/ViewSelector.d.ts.map +1 -0
  166. package/dist/field/ViewSelector.js +90 -0
  167. package/dist/field/ViewSelector.js.map +1 -0
  168. package/dist/field/ViewSelector.scss +34 -0
  169. package/dist/field/index.d.ts +1 -0
  170. package/dist/field/index.d.ts.map +1 -1
  171. package/dist/field/index.js +56 -12
  172. package/dist/field/index.js.map +1 -1
  173. package/dist/field/index.scss +12 -0
  174. package/dist/field/rscEntry.d.ts +1 -1
  175. package/dist/field/rscEntry.d.ts.map +1 -1
  176. package/dist/field/rscEntry.js +21 -1
  177. package/dist/field/rscEntry.js.map +1 -1
  178. package/dist/index.d.ts +1 -1
  179. package/dist/index.d.ts.map +1 -1
  180. package/dist/index.js +3 -1
  181. package/dist/index.js.map +1 -1
  182. package/dist/lexical/EditorPlugin.js +17 -2
  183. package/dist/lexical/EditorPlugin.js.map +1 -1
  184. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  185. package/dist/lexical/LexicalEditor.js +238 -69
  186. package/dist/lexical/LexicalEditor.js.map +1 -1
  187. package/dist/lexical/LexicalProvider.d.ts.map +1 -1
  188. package/dist/lexical/LexicalProvider.js +74 -15
  189. package/dist/lexical/LexicalProvider.js.map +1 -1
  190. package/dist/lexical/config/client/EditorConfigProvider.js +11 -2
  191. package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
  192. package/dist/lexical/config/client/sanitize.d.ts +1 -1
  193. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  194. package/dist/lexical/config/client/sanitize.js +3 -2
  195. package/dist/lexical/config/client/sanitize.js.map +1 -1
  196. package/dist/lexical/config/types.d.ts +4 -0
  197. package/dist/lexical/config/types.d.ts.map +1 -1
  198. package/dist/lexical/config/types.js +3 -1
  199. package/dist/lexical/config/types.js.map +1 -1
  200. package/dist/lexical/nodes/index.d.ts +12 -2
  201. package/dist/lexical/nodes/index.d.ts.map +1 -1
  202. package/dist/lexical/nodes/index.js +187 -2
  203. package/dist/lexical/nodes/index.js.map +1 -1
  204. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +28 -5
  205. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  206. package/dist/lexical/plugins/NodeViewOverridePlugin/index.d.ts +2 -0
  207. package/dist/lexical/plugins/NodeViewOverridePlugin/index.d.ts.map +1 -0
  208. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js +31 -0
  209. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js.map +1 -0
  210. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +14 -1
  211. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
  212. package/dist/lexical/plugins/SlashMenu/index.js +98 -31
  213. package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
  214. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +27 -7
  215. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  216. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +45 -7
  217. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  218. package/dist/lexical/ui/ContentEditable.js +18 -3
  219. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  220. package/dist/lexical/ui/icons/AI/index.js +58 -10
  221. package/dist/lexical/ui/icons/AI/index.js.map +1 -1
  222. package/dist/lexical/ui/icons/Add/index.js +31 -4
  223. package/dist/lexical/ui/icons/Add/index.js.map +1 -1
  224. package/dist/lexical/ui/icons/AlignCenter/index.js +45 -5
  225. package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
  226. package/dist/lexical/ui/icons/AlignJustify/index.js +45 -5
  227. package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
  228. package/dist/lexical/ui/icons/AlignLeft/index.js +45 -5
  229. package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
  230. package/dist/lexical/ui/icons/AlignRight/index.js +45 -5
  231. package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
  232. package/dist/lexical/ui/icons/Block/index.js +54 -5
  233. package/dist/lexical/ui/icons/Block/index.js.map +1 -1
  234. package/dist/lexical/ui/icons/Blockquote/index.js +24 -3
  235. package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
  236. package/dist/lexical/ui/icons/Bold/index.js +24 -3
  237. package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
  238. package/dist/lexical/ui/icons/Checklist/index.js +39 -4
  239. package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
  240. package/dist/lexical/ui/icons/Code/index.js +34 -4
  241. package/dist/lexical/ui/icons/Code/index.js.map +1 -1
  242. package/dist/lexical/ui/icons/CodeBlock/index.js +22 -3
  243. package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  244. package/dist/lexical/ui/icons/Collapse/index.js +23 -3
  245. package/dist/lexical/ui/icons/Collapse/index.js.map +1 -1
  246. package/dist/lexical/ui/icons/H1/index.js +24 -3
  247. package/dist/lexical/ui/icons/H1/index.js.map +1 -1
  248. package/dist/lexical/ui/icons/H2/index.js +24 -3
  249. package/dist/lexical/ui/icons/H2/index.js.map +1 -1
  250. package/dist/lexical/ui/icons/H3/index.js +24 -3
  251. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  252. package/dist/lexical/ui/icons/H4/index.js +24 -3
  253. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  254. package/dist/lexical/ui/icons/H5/index.js +24 -3
  255. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  256. package/dist/lexical/ui/icons/H6/index.js +24 -3
  257. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  258. package/dist/lexical/ui/icons/HorizontalRule/index.js +27 -3
  259. package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
  260. package/dist/lexical/ui/icons/IndentDecrease/index.js +53 -6
  261. package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
  262. package/dist/lexical/ui/icons/IndentIncrease/index.js +53 -6
  263. package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
  264. package/dist/lexical/ui/icons/InlineBlocks/index.js +26 -3
  265. package/dist/lexical/ui/icons/InlineBlocks/index.js.map +1 -1
  266. package/dist/lexical/ui/icons/Italic/index.js +24 -3
  267. package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
  268. package/dist/lexical/ui/icons/Link/index.js +25 -3
  269. package/dist/lexical/ui/icons/Link/index.js.map +1 -1
  270. package/dist/lexical/ui/icons/Meatballs/index.js +39 -5
  271. package/dist/lexical/ui/icons/Meatballs/index.js.map +1 -1
  272. package/dist/lexical/ui/icons/OrderedList/index.js +61 -7
  273. package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
  274. package/dist/lexical/ui/icons/Relationship/index.js +58 -10
  275. package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
  276. package/dist/lexical/ui/icons/Strikethrough/index.js +34 -4
  277. package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
  278. package/dist/lexical/ui/icons/Subscript/index.js +24 -3
  279. package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
  280. package/dist/lexical/ui/icons/Superscript/index.js +24 -3
  281. package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
  282. package/dist/lexical/ui/icons/Table/index.js +24 -3
  283. package/dist/lexical/ui/icons/Table/index.js.map +1 -1
  284. package/dist/lexical/ui/icons/Text/index.js +24 -3
  285. package/dist/lexical/ui/icons/Text/index.js.map +1 -1
  286. package/dist/lexical/ui/icons/TextState/index.js +18 -12
  287. package/dist/lexical/ui/icons/TextState/index.js.map +1 -1
  288. package/dist/lexical/ui/icons/Underline/index.js +34 -4
  289. package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
  290. package/dist/lexical/ui/icons/UnorderedList/index.js +81 -8
  291. package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
  292. package/dist/lexical/ui/icons/Upload/index.js +48 -5
  293. package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
  294. package/dist/types.d.ts +152 -2
  295. package/dist/types.d.ts.map +1 -1
  296. package/dist/types.js +55 -0
  297. package/dist/types.js.map +1 -1
  298. package/dist/utilities/fieldsDrawer/Drawer.js +41 -16
  299. package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
  300. package/dist/utilities/fieldsDrawer/DrawerContent.js +42 -10
  301. package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
  302. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js +9 -1
  303. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -1
  304. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js +11 -3
  305. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js.map +1 -1
  306. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  307. package/dist/utilities/generateImportMap.js +1 -0
  308. package/dist/utilities/generateImportMap.js.map +1 -1
  309. package/dist/validate/hasText.d.ts +6 -1
  310. package/dist/validate/hasText.d.ts.map +1 -1
  311. package/dist/validate/hasText.js +10 -4
  312. package/dist/validate/hasText.js.map +1 -1
  313. package/package.json +12 -7
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/features/converters/lexicalToJSX/Component/index.tsx"],"sourcesContent":["import type { SerializedEditorState } from 'lexical'\n\nimport React from 'react'\n\nimport type {\n DefaultNodeTypes,\n SerializedBlockNode,\n SerializedInlineBlockNode,\n} from '../../../../nodeTypes.js'\nimport type { JSXConverters } from '../converter/types.js'\n\nimport { defaultJSXConverters } from '../converter/defaultConverters.js'\nimport { convertLexicalToJSX } from '../converter/index.js'\n\nexport type JSXConvertersFunction<\n T extends { [key: string]: any; type?: string } =\n | DefaultNodeTypes\n | SerializedBlockNode<{ blockName?: null | string }>\n | SerializedInlineBlockNode<{ blockName?: null | string }>,\n> = (args: { defaultConverters: JSXConverters<DefaultNodeTypes> }) => JSXConverters<T>\n\ntype RichTextProps = {\n /**\n * Override class names for the container.\n */\n className?: string\n /**\n * Custom converters to transform your nodes to JSX. Can be an object or a function that receives the default converters.\n */\n converters?: JSXConverters | JSXConvertersFunction\n /**\n * Serialized editor state to render.\n */\n data: SerializedEditorState\n /**\n * If true, removes the container div wrapper.\n */\n disableContainer?: boolean\n /**\n * If true, disables indentation globally. If an array, disables for specific node `type` values.\n */\n disableIndent?: boolean | string[]\n /**\n * If true, disables text alignment globally. If an array, disables for specific node `type` values.\n */\n disableTextAlign?: boolean | string[]\n}\n\nexport const RichText: React.FC<RichTextProps> = ({\n className,\n converters,\n data: editorState,\n disableContainer,\n disableIndent,\n disableTextAlign,\n}) => {\n if (!editorState) {\n return null\n }\n\n let finalConverters: JSXConverters = {}\n if (converters) {\n if (typeof converters === 'function') {\n finalConverters = converters({ defaultConverters: defaultJSXConverters })\n } else {\n finalConverters = converters\n }\n } else {\n finalConverters = defaultJSXConverters\n }\n\n const content =\n editorState &&\n !Array.isArray(editorState) &&\n typeof editorState === 'object' &&\n 'root' in editorState &&\n convertLexicalToJSX({\n converters: finalConverters,\n data: editorState,\n disableIndent,\n disableTextAlign,\n })\n\n if (disableContainer) {\n return <>{content}</>\n }\n\n return <div className={className ?? 'payload-richtext'}>{content}</div>\n}\n"],"names":["defaultJSXConverters","convertLexicalToJSX","RichText","className","converters","data","editorState","disableContainer","disableIndent","disableTextAlign","finalConverters","defaultConverters","content","Array","isArray","div"],"mappings":"AAWA,SAASA,oBAAoB,QAAQ,oCAAmC;AACxE,SAASC,mBAAmB,QAAQ,wBAAuB;AAUzD;;GAEC,GAED;;GAEC,GAED;;GAEC,GAED;;GAEC,GAED;;GAEC,GAED;;GAEC,GAIH,OAAO,MAAMC,WAAoC,CAAC,EAChDC,SAAS,EACTC,UAAU,EACVC,MAAMC,WAAW,EACjBC,gBAAgB,EAChBC,aAAa,EACbC,gBAAgB,EACjB;IACC,IAAI,CAACH,aAAa;QAChB,OAAO;IACT;IAEA,IAAII,kBAAiC,CAAC;IACtC,IAAIN,YAAY;QACd,IAAI,OAAOA,eAAe,YAAY;YACpCM,kBAAkBN,WAAW;gBAAEO,mBAAmBX;YAAqB;QACzE,OAAO;YACLU,kBAAkBN;QACpB;IACF,OAAO;QACLM,kBAAkBV;IACpB;IAEA,MAAMY,UACJN,eACA,CAACO,MAAMC,OAAO,CAACR,gBACf,OAAOA,gBAAgB,YACvB,UAAUA,eACVL,oBAAoB;QAClBG,YAAYM;QACZL,MAAMC;QACNE;QACAC;IACF;IAEF,IAAIF,kBAAkB;QACpB,UAAUK;IACZ;IAEA,QAAQG,IAAIZ,WAAWA,aAAa,qBAAqBS,UAAUG;AACrE,EAAC"}
1
+ {"version":3,"sources":["../../../../../src/features/converters/lexicalToJSX/Component/index.tsx"],"sourcesContent":["import React from 'react'\n\nimport type {\n DefaultNodeTypes,\n SerializedBlockNode,\n SerializedInlineBlockNode,\n} from '../../../../nodeTypes.js'\nimport type { JSXConverters } from '../converter/types.js'\n\nimport { defaultJSXConverters } from '../converter/defaultConverters.js'\nimport { convertLexicalToJSX, type ConvertLexicalToJSXArgs } from '../converter/index.js'\n\nexport type JSXConvertersFunction<\n T extends { [key: string]: any; type?: string } =\n | DefaultNodeTypes\n | SerializedBlockNode<{ blockName?: null | string }>\n | SerializedInlineBlockNode<{ blockName?: null | string }>,\n> = (args: { defaultConverters: JSXConverters<DefaultNodeTypes> }) => JSXConverters<T>\n\ntype RichTextProps = {\n /**\n * Override class names for the container.\n */\n className?: string\n /**\n * Custom converters to transform your nodes to JSX. Can be an object or a function that receives the default converters.\n */\n converters?: JSXConverters | JSXConvertersFunction\n\n /**\n * If true, removes the container div wrapper.\n */\n disableContainer?: boolean\n} & Pick<ConvertLexicalToJSXArgs, 'data' | 'disableIndent' | 'disableTextAlign' | 'nodeMap'>\n\nexport const RichText: React.FC<RichTextProps> = ({\n className,\n converters,\n data: editorState,\n disableContainer,\n disableIndent,\n disableTextAlign,\n nodeMap,\n}) => {\n if (!editorState) {\n return null\n }\n\n let finalConverters: JSXConverters = {}\n if (converters) {\n if (typeof converters === 'function') {\n finalConverters = converters({ defaultConverters: defaultJSXConverters })\n } else {\n finalConverters = converters\n }\n } else {\n finalConverters = defaultJSXConverters\n }\n\n const content =\n editorState &&\n !Array.isArray(editorState) &&\n typeof editorState === 'object' &&\n 'root' in editorState &&\n convertLexicalToJSX({\n converters: finalConverters,\n data: editorState,\n disableIndent,\n disableTextAlign,\n nodeMap,\n })\n\n if (disableContainer) {\n return <>{content}</>\n }\n\n return <div className={className ?? 'payload-richtext'}>{content}</div>\n}\n"],"names":["React","defaultJSXConverters","convertLexicalToJSX","RichText","className","converters","data","editorState","disableContainer","disableIndent","disableTextAlign","nodeMap","finalConverters","defaultConverters","content","Array","isArray","div"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AASzB,SAASC,oBAAoB,QAAQ,oCAAmC;AACxE,SAASC,mBAAmB,QAAsC,wBAAuB;AAUvF;;GAEC,GAED;;GAEC,GAGD;;GAEC,GAIH,OAAO,MAAMC,WAAoC,CAAC,EAChDC,SAAS,EACTC,UAAU,EACVC,MAAMC,WAAW,EACjBC,gBAAgB,EAChBC,aAAa,EACbC,gBAAgB,EAChBC,OAAO,EACR;IACC,IAAI,CAACJ,aAAa;QAChB,OAAO;IACT;IAEA,IAAIK,kBAAiC,CAAC;IACtC,IAAIP,YAAY;QACd,IAAI,OAAOA,eAAe,YAAY;YACpCO,kBAAkBP,WAAW;gBAAEQ,mBAAmBZ;YAAqB;QACzE,OAAO;YACLW,kBAAkBP;QACpB;IACF,OAAO;QACLO,kBAAkBX;IACpB;IAEA,MAAMa,UACJP,eACA,CAACQ,MAAMC,OAAO,CAACT,gBACf,OAAOA,gBAAgB,YACvB,UAAUA,eACVL,oBAAoB;QAClBG,YAAYO;QACZN,MAAMC;QACNE;QACAC;QACAC;IACF;IAEF,IAAIH,kBAAkB;QACpB,qBAAO;sBAAGM;;IACZ;IAEA,qBAAO,QAACG;QAAIb,WAAWA,aAAa;kBAAqBU;;;;;;AAC3D,EAAC"}
@@ -1,9 +1,16 @@
1
+ import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
1
2
  export const BlockquoteJSXConverter = {
2
3
  quote: ({ node, nodesToJSX })=>{
3
4
  const children = nodesToJSX({
4
5
  nodes: node.children
5
6
  });
6
- return <blockquote>{children}</blockquote>;
7
+ return /*#__PURE__*/ _jsxDEV("blockquote", {
8
+ children: children
9
+ }, void 0, false, {
10
+ fileName: "src/features/converters/lexicalToJSX/converter/converters/blockquote.tsx",
11
+ lineNumber: 10,
12
+ columnNumber: 12
13
+ }, this);
7
14
  }
8
15
  };
9
16
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/features/converters/lexicalToJSX/converter/converters/blockquote.tsx"],"sourcesContent":["import type { SerializedQuoteNode } from '../../../../../nodeTypes.js'\nimport type { JSXConverters } from '../types.js'\n\nexport const BlockquoteJSXConverter: JSXConverters<SerializedQuoteNode> = {\n quote: ({ node, nodesToJSX }) => {\n const children = nodesToJSX({\n nodes: node.children,\n })\n\n return <blockquote>{children}</blockquote>\n },\n}\n"],"names":["BlockquoteJSXConverter","quote","node","nodesToJSX","children","nodes","blockquote"],"mappings":"AAGA,OAAO,MAAMA,yBAA6D;IACxEC,OAAO,CAAC,EAAEC,IAAI,EAAEC,UAAU,EAAE;QAC1B,MAAMC,WAAWD,WAAW;YAC1BE,OAAOH,KAAKE,QAAQ;QACtB;QAEA,QAAQE,YAAYF,WAAWE;IACjC;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../../../../src/features/converters/lexicalToJSX/converter/converters/blockquote.tsx"],"sourcesContent":["import type { SerializedQuoteNode } from '../../../../../nodeTypes.js'\nimport type { JSXConverters } from '../types.js'\n\nexport const BlockquoteJSXConverter: JSXConverters<SerializedQuoteNode> = {\n quote: ({ node, nodesToJSX }) => {\n const children = nodesToJSX({\n nodes: node.children,\n })\n\n return <blockquote>{children}</blockquote>\n },\n}\n"],"names":["BlockquoteJSXConverter","quote","node","nodesToJSX","children","nodes","blockquote"],"mappings":";AAGA,OAAO,MAAMA,yBAA6D;IACxEC,OAAO,CAAC,EAAEC,IAAI,EAAEC,UAAU,EAAE;QAC1B,MAAMC,WAAWD,WAAW;YAC1BE,OAAOH,KAAKE,QAAQ;QACtB;QAEA,qBAAO,QAACE;sBAAYF;;;;;;IACtB;AACF,EAAC"}
@@ -1,10 +1,17 @@
1
+ import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
1
2
  export const HeadingJSXConverter = {
2
3
  heading: ({ node, nodesToJSX })=>{
3
4
  const children = nodesToJSX({
4
5
  nodes: node.children
5
6
  });
6
7
  const NodeTag = node.tag;
7
- return <NodeTag>{children}</NodeTag>;
8
+ return /*#__PURE__*/ _jsxDEV(NodeTag, {
9
+ children: children
10
+ }, void 0, false, {
11
+ fileName: "src/features/converters/lexicalToJSX/converter/converters/heading.tsx",
12
+ lineNumber: 12,
13
+ columnNumber: 12
14
+ }, this);
8
15
  }
9
16
  };
10
17
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/features/converters/lexicalToJSX/converter/converters/heading.tsx"],"sourcesContent":["import type { SerializedHeadingNode } from '../../../../../nodeTypes.js'\nimport type { JSXConverters } from '../types.js'\n\nexport const HeadingJSXConverter: JSXConverters<SerializedHeadingNode> = {\n heading: ({ node, nodesToJSX }) => {\n const children = nodesToJSX({\n nodes: node.children,\n })\n\n const NodeTag = node.tag\n\n return <NodeTag>{children}</NodeTag>\n },\n}\n"],"names":["HeadingJSXConverter","heading","node","nodesToJSX","children","nodes","NodeTag","tag"],"mappings":"AAGA,OAAO,MAAMA,sBAA4D;IACvEC,SAAS,CAAC,EAAEC,IAAI,EAAEC,UAAU,EAAE;QAC5B,MAAMC,WAAWD,WAAW;YAC1BE,OAAOH,KAAKE,QAAQ;QACtB;QAEA,MAAME,UAAUJ,KAAKK,GAAG;QAExB,QAAQD,SAASF,WAAWE;IAC9B;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../../../../src/features/converters/lexicalToJSX/converter/converters/heading.tsx"],"sourcesContent":["import type { SerializedHeadingNode } from '../../../../../nodeTypes.js'\nimport type { JSXConverters } from '../types.js'\n\nexport const HeadingJSXConverter: JSXConverters<SerializedHeadingNode> = {\n heading: ({ node, nodesToJSX }) => {\n const children = nodesToJSX({\n nodes: node.children,\n })\n\n const NodeTag = node.tag\n\n return <NodeTag>{children}</NodeTag>\n },\n}\n"],"names":["HeadingJSXConverter","heading","node","nodesToJSX","children","nodes","NodeTag","tag"],"mappings":";AAGA,OAAO,MAAMA,sBAA4D;IACvEC,SAAS,CAAC,EAAEC,IAAI,EAAEC,UAAU,EAAE;QAC5B,MAAMC,WAAWD,WAAW;YAC1BE,OAAOH,KAAKE,QAAQ;QACtB;QAEA,MAAME,UAAUJ,KAAKK,GAAG;QAExB,qBAAO,QAACD;sBAASF;;;;;;IACnB;AACF,EAAC"}
@@ -1,5 +1,10 @@
1
+ import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
1
2
  export const HorizontalRuleJSXConverter = {
2
- horizontalrule: <hr/>
3
+ horizontalrule: /*#__PURE__*/ _jsxDEV("hr", {}, void 0, false, {
4
+ fileName: "src/features/converters/lexicalToJSX/converter/converters/horizontalRule.tsx",
5
+ lineNumber: 4,
6
+ columnNumber: 19
7
+ }, this)
3
8
  };
4
9
 
5
10
  //# sourceMappingURL=horizontalRule.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/features/converters/lexicalToJSX/converter/converters/horizontalRule.tsx"],"sourcesContent":["import type { SerializedHorizontalRuleNode } from '../../../../../nodeTypes.js'\nimport type { JSXConverters } from '../types.js'\nexport const HorizontalRuleJSXConverter: JSXConverters<SerializedHorizontalRuleNode> = {\n horizontalrule: <hr />,\n}\n"],"names":["HorizontalRuleJSXConverter","horizontalrule","hr"],"mappings":"AAEA,OAAO,MAAMA,6BAA0E;IACrFC,iBAAiBC;AACnB,EAAC"}
1
+ {"version":3,"sources":["../../../../../../src/features/converters/lexicalToJSX/converter/converters/horizontalRule.tsx"],"sourcesContent":["import type { SerializedHorizontalRuleNode } from '../../../../../nodeTypes.js'\nimport type { JSXConverters } from '../types.js'\nexport const HorizontalRuleJSXConverter: JSXConverters<SerializedHorizontalRuleNode> = {\n horizontalrule: <hr />,\n}\n"],"names":["HorizontalRuleJSXConverter","horizontalrule","hr"],"mappings":";AAEA,OAAO,MAAMA,6BAA0E;IACrFC,8BAAgB,QAACC;;;;;AACnB,EAAC"}
@@ -1,5 +1,10 @@
1
+ import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
1
2
  export const LinebreakJSXConverter = {
2
- linebreak: <br/>
3
+ linebreak: /*#__PURE__*/ _jsxDEV("br", {}, void 0, false, {
4
+ fileName: "src/features/converters/lexicalToJSX/converter/converters/linebreak.tsx",
5
+ lineNumber: 5,
6
+ columnNumber: 14
7
+ }, this)
3
8
  };
4
9
 
5
10
  //# sourceMappingURL=linebreak.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/features/converters/lexicalToJSX/converter/converters/linebreak.tsx"],"sourcesContent":["import type { SerializedLineBreakNode } from '../../../../../nodeTypes.js'\nimport type { JSXConverters } from '../types.js'\n\nexport const LinebreakJSXConverter: JSXConverters<SerializedLineBreakNode> = {\n linebreak: <br />,\n}\n"],"names":["LinebreakJSXConverter","linebreak","br"],"mappings":"AAGA,OAAO,MAAMA,wBAAgE;IAC3EC,YAAYC;AACd,EAAC"}
1
+ {"version":3,"sources":["../../../../../../src/features/converters/lexicalToJSX/converter/converters/linebreak.tsx"],"sourcesContent":["import type { SerializedLineBreakNode } from '../../../../../nodeTypes.js'\nimport type { JSXConverters } from '../types.js'\n\nexport const LinebreakJSXConverter: JSXConverters<SerializedLineBreakNode> = {\n linebreak: <br />,\n}\n"],"names":["LinebreakJSXConverter","linebreak","br"],"mappings":";AAGA,OAAO,MAAMA,wBAAgE;IAC3EC,yBAAW,QAACC;;;;;AACd,EAAC"}
@@ -1,3 +1,4 @@
1
+ import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
1
2
  export const LinkJSXConverter = ({ internalDocToHref })=>({
2
3
  autolink: ({ node, nodesToJSX })=>{
3
4
  const children = nodesToJSX({
@@ -5,12 +6,16 @@ export const LinkJSXConverter = ({ internalDocToHref })=>({
5
6
  });
6
7
  const rel = node.fields.newTab ? 'noopener noreferrer' : undefined;
7
8
  const target = node.fields.newTab ? '_blank' : undefined;
8
- return <a href={node.fields.url} {...{
9
+ return /*#__PURE__*/ _jsxDEV("a", {
10
+ href: node.fields.url,
9
11
  rel,
10
- target
11
- }}>
12
- {children}
13
- </a>;
12
+ target,
13
+ children: children
14
+ }, void 0, false, {
15
+ fileName: "src/features/converters/lexicalToJSX/converter/converters/link.tsx",
16
+ lineNumber: 16,
17
+ columnNumber: 7
18
+ }, this);
14
19
  },
15
20
  link: ({ node, nodesToJSX })=>{
16
21
  const children = nodesToJSX({
@@ -30,12 +35,16 @@ export const LinkJSXConverter = ({ internalDocToHref })=>({
30
35
  }
31
36
  }
32
37
  // fallback
33
- return <a href={href} {...{
38
+ return /*#__PURE__*/ _jsxDEV("a", {
39
+ href: href,
34
40
  rel,
35
- target
36
- }}>
37
- {children}
38
- </a>;
41
+ target,
42
+ children: children
43
+ }, void 0, false, {
44
+ fileName: "src/features/converters/lexicalToJSX/converter/converters/link.tsx",
45
+ lineNumber: 42,
46
+ columnNumber: 7
47
+ }, this);
39
48
  }
40
49
  });
41
50
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/features/converters/lexicalToJSX/converter/converters/link.tsx"],"sourcesContent":["import type { SerializedAutoLinkNode, SerializedLinkNode } from '../../../../../nodeTypes.js'\nimport type { JSXConverters } from '../types.js'\n\nexport const LinkJSXConverter: (args: {\n internalDocToHref?: (args: { linkNode: SerializedLinkNode }) => string\n}) => JSXConverters<SerializedAutoLinkNode | SerializedLinkNode> = ({ internalDocToHref }) => ({\n autolink: ({ node, nodesToJSX }) => {\n const children = nodesToJSX({\n nodes: node.children,\n })\n\n const rel: string | undefined = node.fields.newTab ? 'noopener noreferrer' : undefined\n const target: string | undefined = node.fields.newTab ? '_blank' : undefined\n\n return (\n <a href={node.fields.url} {...{ rel, target }}>\n {children}\n </a>\n )\n },\n link: ({ node, nodesToJSX }) => {\n const children = nodesToJSX({\n nodes: node.children,\n })\n\n const rel: string | undefined = node.fields.newTab ? 'noopener noreferrer' : undefined\n const target: string | undefined = node.fields.newTab ? '_blank' : undefined\n\n let href: string = node.fields.url ?? ''\n if (node.fields.linkType === 'internal') {\n if (internalDocToHref) {\n href = internalDocToHref({ linkNode: node })\n } else {\n console.error(\n 'Lexical => JSX converter: Link converter: found internal link, but internalDocToHref is not provided',\n )\n href = '#' // fallback\n }\n }\n\n return (\n <a href={href} {...{ rel, target }}>\n {children}\n </a>\n )\n },\n})\n"],"names":["LinkJSXConverter","internalDocToHref","autolink","node","nodesToJSX","children","nodes","rel","fields","newTab","undefined","target","a","href","url","link","linkType","linkNode","console","error"],"mappings":"AAGA,OAAO,MAAMA,mBAEsD,CAAC,EAAEC,iBAAiB,EAAE,GAAM,CAAA;QAC7FC,UAAU,CAAC,EAAEC,IAAI,EAAEC,UAAU,EAAE;YAC7B,MAAMC,WAAWD,WAAW;gBAC1BE,OAAOH,KAAKE,QAAQ;YACtB;YAEA,MAAME,MAA0BJ,KAAKK,MAAM,CAACC,MAAM,GAAG,wBAAwBC;YAC7E,MAAMC,SAA6BR,KAAKK,MAAM,CAACC,MAAM,GAAG,WAAWC;YAEnE,QACGE,EAAEC,MAAMV,KAAKK,MAAM,CAACM,GAAG,GAAG,GAAG;gBAAEP;gBAAKI;YAAO,CAAC,EAAE;QAC7C,CAACN,SAAS;MACZ,EAAEO;QAEN;QACAG,MAAM,CAAC,EAAEZ,IAAI,EAAEC,UAAU,EAAE;YACzB,MAAMC,WAAWD,WAAW;gBAC1BE,OAAOH,KAAKE,QAAQ;YACtB;YAEA,MAAME,MAA0BJ,KAAKK,MAAM,CAACC,MAAM,GAAG,wBAAwBC;YAC7E,MAAMC,SAA6BR,KAAKK,MAAM,CAACC,MAAM,GAAG,WAAWC;YAEnE,IAAIG,OAAeV,KAAKK,MAAM,CAACM,GAAG,IAAI;YACtC,IAAIX,KAAKK,MAAM,CAACQ,QAAQ,KAAK,YAAY;gBACvC,IAAIf,mBAAmB;oBACrBY,OAAOZ,kBAAkB;wBAAEgB,UAAUd;oBAAK;gBAC5C,OAAO;oBACLe,QAAQC,KAAK,CACX;oBAEFN,OAAO;gBACT;YACF;YAFe,WAAW;YAI1B,QACGD,EAAEC,MAAMA,OAAO,GAAG;gBAAEN;gBAAKI;YAAO,CAAC,EAAE;QAClC,CAACN,SAAS;MACZ,EAAEO;QAEN;IACF,CAAA,EAAE"}
1
+ {"version":3,"sources":["../../../../../../src/features/converters/lexicalToJSX/converter/converters/link.tsx"],"sourcesContent":["import type { SerializedAutoLinkNode, SerializedLinkNode } from '../../../../../nodeTypes.js'\nimport type { JSXConverters } from '../types.js'\n\nexport const LinkJSXConverter: (args: {\n internalDocToHref?: (args: { linkNode: SerializedLinkNode }) => string\n}) => JSXConverters<SerializedAutoLinkNode | SerializedLinkNode> = ({ internalDocToHref }) => ({\n autolink: ({ node, nodesToJSX }) => {\n const children = nodesToJSX({\n nodes: node.children,\n })\n\n const rel: string | undefined = node.fields.newTab ? 'noopener noreferrer' : undefined\n const target: string | undefined = node.fields.newTab ? '_blank' : undefined\n\n return (\n <a href={node.fields.url} {...{ rel, target }}>\n {children}\n </a>\n )\n },\n link: ({ node, nodesToJSX }) => {\n const children = nodesToJSX({\n nodes: node.children,\n })\n\n const rel: string | undefined = node.fields.newTab ? 'noopener noreferrer' : undefined\n const target: string | undefined = node.fields.newTab ? '_blank' : undefined\n\n let href: string = node.fields.url ?? ''\n if (node.fields.linkType === 'internal') {\n if (internalDocToHref) {\n href = internalDocToHref({ linkNode: node })\n } else {\n console.error(\n 'Lexical => JSX converter: Link converter: found internal link, but internalDocToHref is not provided',\n )\n href = '#' // fallback\n }\n }\n\n return (\n <a href={href} {...{ rel, target }}>\n {children}\n </a>\n )\n },\n})\n"],"names":["LinkJSXConverter","internalDocToHref","autolink","node","nodesToJSX","children","nodes","rel","fields","newTab","undefined","target","a","href","url","link","linkType","linkNode","console","error"],"mappings":";AAGA,OAAO,MAAMA,mBAEsD,CAAC,EAAEC,iBAAiB,EAAE,GAAM,CAAA;QAC7FC,UAAU,CAAC,EAAEC,IAAI,EAAEC,UAAU,EAAE;YAC7B,MAAMC,WAAWD,WAAW;gBAC1BE,OAAOH,KAAKE,QAAQ;YACtB;YAEA,MAAME,MAA0BJ,KAAKK,MAAM,CAACC,MAAM,GAAG,wBAAwBC;YAC7E,MAAMC,SAA6BR,KAAKK,MAAM,CAACC,MAAM,GAAG,WAAWC;YAEnE,qBACE,QAACE;gBAAEC,MAAMV,KAAKK,MAAM,CAACM,GAAG;gBAAQP;gBAAKI;0BAClCN;;;;;;QAGP;QACAU,MAAM,CAAC,EAAEZ,IAAI,EAAEC,UAAU,EAAE;YACzB,MAAMC,WAAWD,WAAW;gBAC1BE,OAAOH,KAAKE,QAAQ;YACtB;YAEA,MAAME,MAA0BJ,KAAKK,MAAM,CAACC,MAAM,GAAG,wBAAwBC;YAC7E,MAAMC,SAA6BR,KAAKK,MAAM,CAACC,MAAM,GAAG,WAAWC;YAEnE,IAAIG,OAAeV,KAAKK,MAAM,CAACM,GAAG,IAAI;YACtC,IAAIX,KAAKK,MAAM,CAACQ,QAAQ,KAAK,YAAY;gBACvC,IAAIf,mBAAmB;oBACrBY,OAAOZ,kBAAkB;wBAAEgB,UAAUd;oBAAK;gBAC5C,OAAO;oBACLe,QAAQC,KAAK,CACX;oBAEFN,OAAO;gBACT;YACF;YAFe,WAAW;YAI1B,qBACE,QAACD;gBAAEC,MAAMA;gBAAYN;gBAAKI;0BACvBN;;;;;;QAGP;IACF,CAAA,EAAE"}
@@ -1,3 +1,4 @@
1
+ import { jsxDEV as _jsxDEV, Fragment as _Fragment } from "react/jsx-dev-runtime";
1
2
  import { v4 as uuidv4 } from 'uuid';
2
3
  export const ListJSXConverter = {
3
4
  list: ({ node, nodesToJSX })=>{
@@ -5,7 +6,14 @@ export const ListJSXConverter = {
5
6
  nodes: node.children
6
7
  });
7
8
  const NodeTag = node.tag;
8
- return <NodeTag className={`list-${node?.listType}`}>{children}</NodeTag>;
9
+ return /*#__PURE__*/ _jsxDEV(NodeTag, {
10
+ className: `list-${node?.listType}`,
11
+ children: children
12
+ }, void 0, false, {
13
+ fileName: "src/features/converters/lexicalToJSX/converter/converters/list.tsx",
14
+ lineNumber: 14,
15
+ columnNumber: 12
16
+ }, this);
9
17
  },
10
18
  listitem: ({ node, nodesToJSX, parent })=>{
11
19
  const hasSubLists = node.children.some((child)=>child.type === 'list');
@@ -14,22 +22,61 @@ export const ListJSXConverter = {
14
22
  });
15
23
  if ('listType' in parent && parent?.listType === 'check') {
16
24
  const uuid = uuidv4();
17
- return <li aria-checked={node.checked ? 'true' : 'false'} className={`list-item-checkbox${node.checked ? ' list-item-checkbox-checked' : ' list-item-checkbox-unchecked'}${hasSubLists ? ' nestedListItem' : ''}`} // eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role
18
- role="checkbox" style={{
19
- listStyleType: 'none'
20
- }} tabIndex={-1} value={node?.value}>
21
- {hasSubLists ? children : <>
22
- <input checked={node.checked} id={uuid} readOnly={true} type="checkbox"/>
23
- <label htmlFor={uuid}>{children}</label>
24
- <br/>
25
- </>}
26
- </li>;
25
+ return /*#__PURE__*/ _jsxDEV("li", {
26
+ "aria-checked": node.checked ? 'true' : 'false',
27
+ className: `list-item-checkbox${node.checked ? ' list-item-checkbox-checked' : ' list-item-checkbox-unchecked'}${hasSubLists ? ' nestedListItem' : ''}`,
28
+ // eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role
29
+ role: "checkbox",
30
+ style: {
31
+ listStyleType: 'none'
32
+ },
33
+ tabIndex: -1,
34
+ value: node?.value,
35
+ children: hasSubLists ? children : /*#__PURE__*/ _jsxDEV(_Fragment, {
36
+ children: [
37
+ /*#__PURE__*/ _jsxDEV("input", {
38
+ checked: node.checked,
39
+ id: uuid,
40
+ readOnly: true,
41
+ type: "checkbox"
42
+ }, void 0, false, {
43
+ fileName: "src/features/converters/lexicalToJSX/converter/converters/list.tsx",
44
+ lineNumber: 40,
45
+ columnNumber: 15
46
+ }, this),
47
+ /*#__PURE__*/ _jsxDEV("label", {
48
+ htmlFor: uuid,
49
+ children: children
50
+ }, void 0, false, {
51
+ fileName: "src/features/converters/lexicalToJSX/converter/converters/list.tsx",
52
+ lineNumber: 41,
53
+ columnNumber: 15
54
+ }, this),
55
+ /*#__PURE__*/ _jsxDEV("br", {}, void 0, false, {
56
+ fileName: "src/features/converters/lexicalToJSX/converter/converters/list.tsx",
57
+ lineNumber: 42,
58
+ columnNumber: 15
59
+ }, this)
60
+ ]
61
+ }, void 0, true)
62
+ }, void 0, false, {
63
+ fileName: "src/features/converters/lexicalToJSX/converter/converters/list.tsx",
64
+ lineNumber: 27,
65
+ columnNumber: 9
66
+ }, this);
27
67
  } else {
28
- return <li className={`${hasSubLists ? 'nestedListItem' : ''}`} style={hasSubLists ? {
29
- listStyleType: 'none'
30
- } : undefined} value={node?.value}>
31
- {children}
32
- </li>;
68
+ return /*#__PURE__*/ _jsxDEV("li", {
69
+ className: `${hasSubLists ? 'nestedListItem' : ''}`,
70
+ style: hasSubLists ? {
71
+ listStyleType: 'none'
72
+ } : undefined,
73
+ value: node?.value,
74
+ children: children
75
+ }, void 0, false, {
76
+ fileName: "src/features/converters/lexicalToJSX/converter/converters/list.tsx",
77
+ lineNumber: 49,
78
+ columnNumber: 9
79
+ }, this);
33
80
  }
34
81
  }
35
82
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/features/converters/lexicalToJSX/converter/converters/list.tsx"],"sourcesContent":["import { v4 as uuidv4 } from 'uuid'\n\nimport type { SerializedListItemNode, SerializedListNode } from '../../../../../nodeTypes.js'\nimport type { JSXConverters } from '../types.js'\n\nexport const ListJSXConverter: JSXConverters<SerializedListItemNode | SerializedListNode> = {\n list: ({ node, nodesToJSX }) => {\n const children = nodesToJSX({\n nodes: node.children,\n })\n\n const NodeTag = node.tag\n\n return <NodeTag className={`list-${node?.listType}`}>{children}</NodeTag>\n },\n listitem: ({ node, nodesToJSX, parent }) => {\n const hasSubLists = node.children.some((child) => child.type === 'list')\n\n const children = nodesToJSX({\n nodes: node.children,\n })\n\n if ('listType' in parent && parent?.listType === 'check') {\n const uuid = uuidv4()\n\n return (\n <li\n aria-checked={node.checked ? 'true' : 'false'}\n className={`list-item-checkbox${node.checked ? ' list-item-checkbox-checked' : ' list-item-checkbox-unchecked'}${hasSubLists ? ' nestedListItem' : ''}`}\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role\n role=\"checkbox\"\n style={{ listStyleType: 'none' }}\n tabIndex={-1}\n value={node?.value}\n >\n {hasSubLists ? (\n children\n ) : (\n <>\n <input checked={node.checked} id={uuid} readOnly={true} type=\"checkbox\" />\n <label htmlFor={uuid}>{children}</label>\n <br />\n </>\n )}\n </li>\n )\n } else {\n return (\n <li\n className={`${hasSubLists ? 'nestedListItem' : ''}`}\n style={hasSubLists ? { listStyleType: 'none' } : undefined}\n value={node?.value}\n >\n {children}\n </li>\n )\n }\n },\n}\n"],"names":["v4","uuidv4","ListJSXConverter","list","node","nodesToJSX","children","nodes","NodeTag","tag","className","listType","listitem","parent","hasSubLists","some","child","type","uuid","li","aria-checked","checked","role","style","listStyleType","tabIndex","value","input","id","readOnly","label","htmlFor","br","undefined"],"mappings":"AAAA,SAASA,MAAMC,MAAM,QAAQ,OAAM;AAKnC,OAAO,MAAMC,mBAA+E;IAC1FC,MAAM,CAAC,EAAEC,IAAI,EAAEC,UAAU,EAAE;QACzB,MAAMC,WAAWD,WAAW;YAC1BE,OAAOH,KAAKE,QAAQ;QACtB;QAEA,MAAME,UAAUJ,KAAKK,GAAG;QAExB,QAAQD,QAAQE,WAAW,CAAC,KAAK,EAAEN,MAAMO,UAAU,GAAGL,WAAWE;IACnE;IACAI,UAAU,CAAC,EAAER,IAAI,EAAEC,UAAU,EAAEQ,MAAM,EAAE;QACrC,MAAMC,cAAcV,KAAKE,QAAQ,CAACS,IAAI,CAAC,CAACC,QAAUA,MAAMC,IAAI,KAAK;QAEjE,MAAMX,WAAWD,WAAW;YAC1BE,OAAOH,KAAKE,QAAQ;QACtB;QAEA,IAAI,cAAcO,UAAUA,QAAQF,aAAa,SAAS;YACxD,MAAMO,OAAOjB;YAEb,QACGkB,GACCC,cAAchB,KAAKiB,OAAO,GAAG,SAAS,SACtCX,WAAW,CAAC,kBAAkB,EAAEN,KAAKiB,OAAO,GAAG,gCAAgC,kCAAkCP,cAAc,oBAAoB,IAAI,EACvJ,kFAAkF;YAClFQ,KAAK,WACLC,OAAO;gBAAEC,eAAe;YAAO,GAC/BC,UAAU,CAAC,GACXC,OAAOtB,MAAMsB,OACd;UACC,CAACZ,cACCR,aAEE;cACA,CAACqB,MAAMN,SAASjB,KAAKiB,OAAO,EAAEO,IAAIV,MAAMW,UAAU,MAAMZ,KAAK,YAAa;cAC1E,CAACa,MAAMC,SAASb,OAAOZ,WAAWwB,MAAM;cACxC,CAACE,IAAK;YACR,IACA;QACJ,EAAEb;QAEN,OAAO;YACL,QACGA,GACCT,WAAW,GAAGI,cAAc,mBAAmB,IAAI,EACnDS,OAAOT,cAAc;gBAAEU,eAAe;YAAO,IAAIS,WACjDP,OAAOtB,MAAMsB,OACd;UACC,CAACpB,SAAS;QACZ,EAAEa;QAEN;IACF;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../../../../src/features/converters/lexicalToJSX/converter/converters/list.tsx"],"sourcesContent":["import { v4 as uuidv4 } from 'uuid'\n\nimport type { SerializedListItemNode, SerializedListNode } from '../../../../../nodeTypes.js'\nimport type { JSXConverters } from '../types.js'\n\nexport const ListJSXConverter: JSXConverters<SerializedListItemNode | SerializedListNode> = {\n list: ({ node, nodesToJSX }) => {\n const children = nodesToJSX({\n nodes: node.children,\n })\n\n const NodeTag = node.tag\n\n return <NodeTag className={`list-${node?.listType}`}>{children}</NodeTag>\n },\n listitem: ({ node, nodesToJSX, parent }) => {\n const hasSubLists = node.children.some((child) => child.type === 'list')\n\n const children = nodesToJSX({\n nodes: node.children,\n })\n\n if ('listType' in parent && parent?.listType === 'check') {\n const uuid = uuidv4()\n\n return (\n <li\n aria-checked={node.checked ? 'true' : 'false'}\n className={`list-item-checkbox${node.checked ? ' list-item-checkbox-checked' : ' list-item-checkbox-unchecked'}${hasSubLists ? ' nestedListItem' : ''}`}\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role\n role=\"checkbox\"\n style={{ listStyleType: 'none' }}\n tabIndex={-1}\n value={node?.value}\n >\n {hasSubLists ? (\n children\n ) : (\n <>\n <input checked={node.checked} id={uuid} readOnly={true} type=\"checkbox\" />\n <label htmlFor={uuid}>{children}</label>\n <br />\n </>\n )}\n </li>\n )\n } else {\n return (\n <li\n className={`${hasSubLists ? 'nestedListItem' : ''}`}\n style={hasSubLists ? { listStyleType: 'none' } : undefined}\n value={node?.value}\n >\n {children}\n </li>\n )\n }\n },\n}\n"],"names":["v4","uuidv4","ListJSXConverter","list","node","nodesToJSX","children","nodes","NodeTag","tag","className","listType","listitem","parent","hasSubLists","some","child","type","uuid","li","aria-checked","checked","role","style","listStyleType","tabIndex","value","input","id","readOnly","label","htmlFor","br","undefined"],"mappings":";AAAA,SAASA,MAAMC,MAAM,QAAQ,OAAM;AAKnC,OAAO,MAAMC,mBAA+E;IAC1FC,MAAM,CAAC,EAAEC,IAAI,EAAEC,UAAU,EAAE;QACzB,MAAMC,WAAWD,WAAW;YAC1BE,OAAOH,KAAKE,QAAQ;QACtB;QAEA,MAAME,UAAUJ,KAAKK,GAAG;QAExB,qBAAO,QAACD;YAAQE,WAAW,CAAC,KAAK,EAAEN,MAAMO,UAAU;sBAAGL;;;;;;IACxD;IACAM,UAAU,CAAC,EAAER,IAAI,EAAEC,UAAU,EAAEQ,MAAM,EAAE;QACrC,MAAMC,cAAcV,KAAKE,QAAQ,CAACS,IAAI,CAAC,CAACC,QAAUA,MAAMC,IAAI,KAAK;QAEjE,MAAMX,WAAWD,WAAW;YAC1BE,OAAOH,KAAKE,QAAQ;QACtB;QAEA,IAAI,cAAcO,UAAUA,QAAQF,aAAa,SAAS;YACxD,MAAMO,OAAOjB;YAEb,qBACE,QAACkB;gBACCC,gBAAchB,KAAKiB,OAAO,GAAG,SAAS;gBACtCX,WAAW,CAAC,kBAAkB,EAAEN,KAAKiB,OAAO,GAAG,gCAAgC,kCAAkCP,cAAc,oBAAoB,IAAI;gBACvJ,kFAAkF;gBAClFQ,MAAK;gBACLC,OAAO;oBAAEC,eAAe;gBAAO;gBAC/BC,UAAU,CAAC;gBACXC,OAAOtB,MAAMsB;0BAEZZ,cACCR,yBAEA;;sCACE,QAACqB;4BAAMN,SAASjB,KAAKiB,OAAO;4BAAEO,IAAIV;4BAAMW,UAAU;4BAAMZ,MAAK;;;;;;sCAC7D,QAACa;4BAAMC,SAASb;sCAAOZ;;;;;;sCACvB,QAAC0B;;;;;;;;;;;;QAKX,OAAO;YACL,qBACE,QAACb;gBACCT,WAAW,GAAGI,cAAc,mBAAmB,IAAI;gBACnDS,OAAOT,cAAc;oBAAEU,eAAe;gBAAO,IAAIS;gBACjDP,OAAOtB,MAAMsB;0BAEZpB;;;;;;QAGP;IACF;AACF,EAAC"}
@@ -1,14 +1,29 @@
1
+ import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
1
2
  export const ParagraphJSXConverter = {
2
3
  paragraph: ({ node, nodesToJSX })=>{
3
4
  const children = nodesToJSX({
4
5
  nodes: node.children
5
6
  });
6
7
  if (!children?.length) {
7
- return <p>
8
- <br/>
9
- </p>;
8
+ return /*#__PURE__*/ _jsxDEV("p", {
9
+ children: /*#__PURE__*/ _jsxDEV("br", {}, void 0, false, {
10
+ fileName: "src/features/converters/lexicalToJSX/converter/converters/paragraph.tsx",
11
+ lineNumber: 13,
12
+ columnNumber: 11
13
+ }, this)
14
+ }, void 0, false, {
15
+ fileName: "src/features/converters/lexicalToJSX/converter/converters/paragraph.tsx",
16
+ lineNumber: 12,
17
+ columnNumber: 9
18
+ }, this);
10
19
  }
11
- return <p>{children}</p>;
20
+ return /*#__PURE__*/ _jsxDEV("p", {
21
+ children: children
22
+ }, void 0, false, {
23
+ fileName: "src/features/converters/lexicalToJSX/converter/converters/paragraph.tsx",
24
+ lineNumber: 18,
25
+ columnNumber: 12
26
+ }, this);
12
27
  }
13
28
  };
14
29
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/features/converters/lexicalToJSX/converter/converters/paragraph.tsx"],"sourcesContent":["import type { SerializedParagraphNode } from '../../../../../nodeTypes.js'\nimport type { JSXConverters } from '../types.js'\n\nexport const ParagraphJSXConverter: JSXConverters<SerializedParagraphNode> = {\n paragraph: ({ node, nodesToJSX }) => {\n const children = nodesToJSX({\n nodes: node.children,\n })\n\n if (!children?.length) {\n return (\n <p>\n <br />\n </p>\n )\n }\n\n return <p>{children}</p>\n },\n}\n"],"names":["ParagraphJSXConverter","paragraph","node","nodesToJSX","children","nodes","length","p","br"],"mappings":"AAGA,OAAO,MAAMA,wBAAgE;IAC3EC,WAAW,CAAC,EAAEC,IAAI,EAAEC,UAAU,EAAE;QAC9B,MAAMC,WAAWD,WAAW;YAC1BE,OAAOH,KAAKE,QAAQ;QACtB;QAEA,IAAI,CAACA,UAAUE,QAAQ;YACrB,QACGC,EAAE;UACD,CAACC,IAAK;QACR,EAAED;QAEN;QAEA,QAAQA,GAAGH,WAAWG;IACxB;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../../../../src/features/converters/lexicalToJSX/converter/converters/paragraph.tsx"],"sourcesContent":["import type { SerializedParagraphNode } from '../../../../../nodeTypes.js'\nimport type { JSXConverters } from '../types.js'\n\nexport const ParagraphJSXConverter: JSXConverters<SerializedParagraphNode> = {\n paragraph: ({ node, nodesToJSX }) => {\n const children = nodesToJSX({\n nodes: node.children,\n })\n\n if (!children?.length) {\n return (\n <p>\n <br />\n </p>\n )\n }\n\n return <p>{children}</p>\n },\n}\n"],"names":["ParagraphJSXConverter","paragraph","node","nodesToJSX","children","nodes","length","p","br"],"mappings":";AAGA,OAAO,MAAMA,wBAAgE;IAC3EC,WAAW,CAAC,EAAEC,IAAI,EAAEC,UAAU,EAAE;QAC9B,MAAMC,WAAWD,WAAW;YAC1BE,OAAOH,KAAKE,QAAQ;QACtB;QAEA,IAAI,CAACA,UAAUE,QAAQ;YACrB,qBACE,QAACC;0BACC,cAAA,QAACC;;;;;;;;;;QAGP;QAEA,qBAAO,QAACD;sBAAGH;;;;;;IACb;AACF,EAAC"}
@@ -1,15 +1,33 @@
1
+ import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
1
2
  export const TableJSXConverter = {
2
3
  table: ({ node, nodesToJSX })=>{
3
4
  const children = nodesToJSX({
4
5
  nodes: node.children
5
6
  });
6
- return <div className="lexical-table-container">
7
- <table className="lexical-table" style={{
8
- borderCollapse: 'collapse'
9
- }}>
10
- <tbody>{children}</tbody>
11
- </table>
12
- </div>;
7
+ return /*#__PURE__*/ _jsxDEV("div", {
8
+ className: "lexical-table-container",
9
+ children: /*#__PURE__*/ _jsxDEV("table", {
10
+ className: "lexical-table",
11
+ style: {
12
+ borderCollapse: 'collapse'
13
+ },
14
+ children: /*#__PURE__*/ _jsxDEV("tbody", {
15
+ children: children
16
+ }, void 0, false, {
17
+ fileName: "src/features/converters/lexicalToJSX/converter/converters/table.tsx",
18
+ lineNumber: 18,
19
+ columnNumber: 11
20
+ }, this)
21
+ }, void 0, false, {
22
+ fileName: "src/features/converters/lexicalToJSX/converter/converters/table.tsx",
23
+ lineNumber: 17,
24
+ columnNumber: 9
25
+ }, this)
26
+ }, void 0, false, {
27
+ fileName: "src/features/converters/lexicalToJSX/converter/converters/table.tsx",
28
+ lineNumber: 16,
29
+ columnNumber: 7
30
+ }, this);
13
31
  },
14
32
  tablecell: ({ node, nodesToJSX })=>{
15
33
  const children = nodesToJSX({
@@ -27,16 +45,31 @@ export const TableJSXConverter = {
27
45
  // Note: JSX does not support setting attributes directly as strings, so you must convert the colSpan and rowSpan to numbers
28
46
  const colSpan = node.colSpan && node.colSpan > 1 ? node.colSpan : undefined;
29
47
  const rowSpan = node.rowSpan && node.rowSpan > 1 ? node.rowSpan : undefined;
30
- return <TagName className={`lexical-table-cell ${headerStateClass}`} colSpan={colSpan} // colSpan and rowSpan will only be added if they are not null
31
- rowSpan={rowSpan} style={style}>
32
- {children}
33
- </TagName>;
48
+ return /*#__PURE__*/ _jsxDEV(TagName, {
49
+ className: `lexical-table-cell ${headerStateClass}`,
50
+ colSpan: colSpan,
51
+ // colSpan and rowSpan will only be added if they are not null
52
+ rowSpan: rowSpan,
53
+ style: style,
54
+ children: children
55
+ }, void 0, false, {
56
+ fileName: "src/features/converters/lexicalToJSX/converter/converters/table.tsx",
57
+ lineNumber: 41,
58
+ columnNumber: 7
59
+ }, this);
34
60
  },
35
61
  tablerow: ({ node, nodesToJSX })=>{
36
62
  const children = nodesToJSX({
37
63
  nodes: node.children
38
64
  });
39
- return <tr className="lexical-table-row">{children}</tr>;
65
+ return /*#__PURE__*/ _jsxDEV("tr", {
66
+ className: "lexical-table-row",
67
+ children: children
68
+ }, void 0, false, {
69
+ fileName: "src/features/converters/lexicalToJSX/converter/converters/table.tsx",
70
+ lineNumber: 55,
71
+ columnNumber: 12
72
+ }, this);
40
73
  }
41
74
  };
42
75
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/features/converters/lexicalToJSX/converter/converters/table.tsx"],"sourcesContent":["import type {\n SerializedTableCellNode,\n SerializedTableNode,\n SerializedTableRowNode,\n} from '../../../../../nodeTypes.js'\nimport type { JSXConverters } from '../types.js'\n\nexport const TableJSXConverter: JSXConverters<\n SerializedTableCellNode | SerializedTableNode | SerializedTableRowNode\n> = {\n table: ({ node, nodesToJSX }) => {\n const children = nodesToJSX({\n nodes: node.children,\n })\n return (\n <div className=\"lexical-table-container\">\n <table className=\"lexical-table\" style={{ borderCollapse: 'collapse' }}>\n <tbody>{children}</tbody>\n </table>\n </div>\n )\n },\n tablecell: ({ node, nodesToJSX }) => {\n const children = nodesToJSX({\n nodes: node.children,\n })\n\n const TagName = node.headerState > 0 ? 'th' : 'td' // Use capital letter to denote a component\n const headerStateClass = `lexical-table-cell-header-${node.headerState}`\n const style = {\n backgroundColor: node.backgroundColor || undefined, // Use undefined to avoid setting the style property if not needed\n border: '1px solid #ccc',\n padding: '8px',\n }\n\n // Note: JSX does not support setting attributes directly as strings, so you must convert the colSpan and rowSpan to numbers\n const colSpan = node.colSpan && node.colSpan > 1 ? node.colSpan : undefined\n const rowSpan = node.rowSpan && node.rowSpan > 1 ? node.rowSpan : undefined\n\n return (\n <TagName\n className={`lexical-table-cell ${headerStateClass}`}\n colSpan={colSpan} // colSpan and rowSpan will only be added if they are not null\n rowSpan={rowSpan}\n style={style}\n >\n {children}\n </TagName>\n )\n },\n tablerow: ({ node, nodesToJSX }) => {\n const children = nodesToJSX({\n nodes: node.children,\n })\n return <tr className=\"lexical-table-row\">{children}</tr>\n },\n}\n"],"names":["TableJSXConverter","table","node","nodesToJSX","children","nodes","div","className","style","borderCollapse","tbody","tablecell","TagName","headerState","headerStateClass","backgroundColor","undefined","border","padding","colSpan","rowSpan","tablerow","tr"],"mappings":"AAOA,OAAO,MAAMA,oBAET;IACFC,OAAO,CAAC,EAAEC,IAAI,EAAEC,UAAU,EAAE;QAC1B,MAAMC,WAAWD,WAAW;YAC1BE,OAAOH,KAAKE,QAAQ;QACtB;QACA,QACGE,IAAIC,UAAU,0BAA0B;QACvC,CAACN,MAAMM,UAAU,gBAAgBC,OAAO;YAAEC,gBAAgB;QAAW,GAAG;UACtE,CAACC,OAAON,WAAWM,MAAM;QAC3B,EAAET,MAAM;MACV,EAAEK;IAEN;IACAK,WAAW,CAAC,EAAET,IAAI,EAAEC,UAAU,EAAE;QAC9B,MAAMC,WAAWD,WAAW;YAC1BE,OAAOH,KAAKE,QAAQ;QACtB;QAEA,MAAMQ,UAAUV,KAAKW,WAAW,GAAG,IAAI,OAAO;QAAK,2CAA2C;QAC9F,MAAMC,mBAAmB,CAAC,0BAA0B,EAAEZ,KAAKW,WAAW,EAAE;QACxE,MAAML,QAAQ;YACZO,iBAAiBb,KAAKa,eAAe,IAAIC;YAAW,kEAAkE;YACtHC,QAAQ;YACRC,SAAS;QACX;QAEA,4HAA4H;QAC5H,MAAMC,UAAUjB,KAAKiB,OAAO,IAAIjB,KAAKiB,OAAO,GAAG,IAAIjB,KAAKiB,OAAO,GAAGH;QAClE,MAAMI,UAAUlB,KAAKkB,OAAO,IAAIlB,KAAKkB,OAAO,GAAG,IAAIlB,KAAKkB,OAAO,GAAGJ;QAElE,QACGJ,QACCL,WAAW,CAAC,mBAAmB,EAAEO,kBAAkB,EACnDK,SAASA,SAAS,8DAA8D;QAChFC,SAASA,SACTZ,OAAOA,OACR;QACC,CAACJ,SAAS;MACZ,EAAEQ;IAEN;IACAS,UAAU,CAAC,EAAEnB,IAAI,EAAEC,UAAU,EAAE;QAC7B,MAAMC,WAAWD,WAAW;YAC1BE,OAAOH,KAAKE,QAAQ;QACtB;QACA,QAAQkB,GAAGf,UAAU,qBAAqBH,WAAWkB;IACvD;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../../../../src/features/converters/lexicalToJSX/converter/converters/table.tsx"],"sourcesContent":["import type {\n SerializedTableCellNode,\n SerializedTableNode,\n SerializedTableRowNode,\n} from '../../../../../nodeTypes.js'\nimport type { JSXConverters } from '../types.js'\n\nexport const TableJSXConverter: JSXConverters<\n SerializedTableCellNode | SerializedTableNode | SerializedTableRowNode\n> = {\n table: ({ node, nodesToJSX }) => {\n const children = nodesToJSX({\n nodes: node.children,\n })\n return (\n <div className=\"lexical-table-container\">\n <table className=\"lexical-table\" style={{ borderCollapse: 'collapse' }}>\n <tbody>{children}</tbody>\n </table>\n </div>\n )\n },\n tablecell: ({ node, nodesToJSX }) => {\n const children = nodesToJSX({\n nodes: node.children,\n })\n\n const TagName = node.headerState > 0 ? 'th' : 'td' // Use capital letter to denote a component\n const headerStateClass = `lexical-table-cell-header-${node.headerState}`\n const style = {\n backgroundColor: node.backgroundColor || undefined, // Use undefined to avoid setting the style property if not needed\n border: '1px solid #ccc',\n padding: '8px',\n }\n\n // Note: JSX does not support setting attributes directly as strings, so you must convert the colSpan and rowSpan to numbers\n const colSpan = node.colSpan && node.colSpan > 1 ? node.colSpan : undefined\n const rowSpan = node.rowSpan && node.rowSpan > 1 ? node.rowSpan : undefined\n\n return (\n <TagName\n className={`lexical-table-cell ${headerStateClass}`}\n colSpan={colSpan} // colSpan and rowSpan will only be added if they are not null\n rowSpan={rowSpan}\n style={style}\n >\n {children}\n </TagName>\n )\n },\n tablerow: ({ node, nodesToJSX }) => {\n const children = nodesToJSX({\n nodes: node.children,\n })\n return <tr className=\"lexical-table-row\">{children}</tr>\n },\n}\n"],"names":["TableJSXConverter","table","node","nodesToJSX","children","nodes","div","className","style","borderCollapse","tbody","tablecell","TagName","headerState","headerStateClass","backgroundColor","undefined","border","padding","colSpan","rowSpan","tablerow","tr"],"mappings":";AAOA,OAAO,MAAMA,oBAET;IACFC,OAAO,CAAC,EAAEC,IAAI,EAAEC,UAAU,EAAE;QAC1B,MAAMC,WAAWD,WAAW;YAC1BE,OAAOH,KAAKE,QAAQ;QACtB;QACA,qBACE,QAACE;YAAIC,WAAU;sBACb,cAAA,QAACN;gBAAMM,WAAU;gBAAgBC,OAAO;oBAAEC,gBAAgB;gBAAW;0BACnE,cAAA,QAACC;8BAAON;;;;;;;;;;;;;;;;IAIhB;IACAO,WAAW,CAAC,EAAET,IAAI,EAAEC,UAAU,EAAE;QAC9B,MAAMC,WAAWD,WAAW;YAC1BE,OAAOH,KAAKE,QAAQ;QACtB;QAEA,MAAMQ,UAAUV,KAAKW,WAAW,GAAG,IAAI,OAAO;QAAK,2CAA2C;QAC9F,MAAMC,mBAAmB,CAAC,0BAA0B,EAAEZ,KAAKW,WAAW,EAAE;QACxE,MAAML,QAAQ;YACZO,iBAAiBb,KAAKa,eAAe,IAAIC;YAAW,kEAAkE;YACtHC,QAAQ;YACRC,SAAS;QACX;QAEA,4HAA4H;QAC5H,MAAMC,UAAUjB,KAAKiB,OAAO,IAAIjB,KAAKiB,OAAO,GAAG,IAAIjB,KAAKiB,OAAO,GAAGH;QAClE,MAAMI,UAAUlB,KAAKkB,OAAO,IAAIlB,KAAKkB,OAAO,GAAG,IAAIlB,KAAKkB,OAAO,GAAGJ;QAElE,qBACE,QAACJ;YACCL,WAAW,CAAC,mBAAmB,EAAEO,kBAAkB;YACnDK,SAASA;YAAS,8DAA8D;YAChFC,SAASA;YACTZ,OAAOA;sBAENJ;;;;;;IAGP;IACAiB,UAAU,CAAC,EAAEnB,IAAI,EAAEC,UAAU,EAAE;QAC7B,MAAMC,WAAWD,WAAW;YAC1BE,OAAOH,KAAKE,QAAQ;QACtB;QACA,qBAAO,QAACkB;YAAGf,WAAU;sBAAqBH;;;;;;IAC5C;AACF,EAAC"}
@@ -1,31 +1,77 @@
1
+ import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
2
+ import React from 'react';
1
3
  import { NodeFormat } from '../../../../../lexical/utils/nodeFormat.js';
2
4
  export const TextJSXConverter = {
3
5
  text: ({ node })=>{
4
6
  let text = node.text;
5
7
  if (node.format & NodeFormat.IS_BOLD) {
6
- text = <strong>{text}</strong>;
8
+ text = /*#__PURE__*/ _jsxDEV("strong", {
9
+ children: text
10
+ }, void 0, false, {
11
+ fileName: "src/features/converters/lexicalToJSX/converter/converters/text.tsx",
12
+ lineNumber: 13,
13
+ columnNumber: 14
14
+ }, this);
7
15
  }
8
16
  if (node.format & NodeFormat.IS_ITALIC) {
9
- text = <em>{text}</em>;
17
+ text = /*#__PURE__*/ _jsxDEV("em", {
18
+ children: text
19
+ }, void 0, false, {
20
+ fileName: "src/features/converters/lexicalToJSX/converter/converters/text.tsx",
21
+ lineNumber: 16,
22
+ columnNumber: 14
23
+ }, this);
10
24
  }
11
25
  if (node.format & NodeFormat.IS_STRIKETHROUGH) {
12
- text = <span style={{
13
- textDecoration: 'line-through'
14
- }}>{text}</span>;
26
+ text = /*#__PURE__*/ _jsxDEV("span", {
27
+ style: {
28
+ textDecoration: 'line-through'
29
+ },
30
+ children: text
31
+ }, void 0, false, {
32
+ fileName: "src/features/converters/lexicalToJSX/converter/converters/text.tsx",
33
+ lineNumber: 19,
34
+ columnNumber: 14
35
+ }, this);
15
36
  }
16
37
  if (node.format & NodeFormat.IS_UNDERLINE) {
17
- text = <span style={{
18
- textDecoration: 'underline'
19
- }}>{text}</span>;
38
+ text = /*#__PURE__*/ _jsxDEV("span", {
39
+ style: {
40
+ textDecoration: 'underline'
41
+ },
42
+ children: text
43
+ }, void 0, false, {
44
+ fileName: "src/features/converters/lexicalToJSX/converter/converters/text.tsx",
45
+ lineNumber: 22,
46
+ columnNumber: 14
47
+ }, this);
20
48
  }
21
49
  if (node.format & NodeFormat.IS_CODE) {
22
- text = <code>{text}</code>;
50
+ text = /*#__PURE__*/ _jsxDEV("code", {
51
+ children: text
52
+ }, void 0, false, {
53
+ fileName: "src/features/converters/lexicalToJSX/converter/converters/text.tsx",
54
+ lineNumber: 25,
55
+ columnNumber: 14
56
+ }, this);
23
57
  }
24
58
  if (node.format & NodeFormat.IS_SUBSCRIPT) {
25
- text = <sub>{text}</sub>;
59
+ text = /*#__PURE__*/ _jsxDEV("sub", {
60
+ children: text
61
+ }, void 0, false, {
62
+ fileName: "src/features/converters/lexicalToJSX/converter/converters/text.tsx",
63
+ lineNumber: 28,
64
+ columnNumber: 14
65
+ }, this);
26
66
  }
27
67
  if (node.format & NodeFormat.IS_SUPERSCRIPT) {
28
- text = <sup>{text}</sup>;
68
+ text = /*#__PURE__*/ _jsxDEV("sup", {
69
+ children: text
70
+ }, void 0, false, {
71
+ fileName: "src/features/converters/lexicalToJSX/converter/converters/text.tsx",
72
+ lineNumber: 31,
73
+ columnNumber: 14
74
+ }, this);
29
75
  }
30
76
  return text;
31
77
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/features/converters/lexicalToJSX/converter/converters/text.tsx"],"sourcesContent":["import React from 'react'\n\nimport type { SerializedTextNode } from '../../../../../nodeTypes.js'\nimport type { JSXConverters } from '../types.js'\n\nimport { NodeFormat } from '../../../../../lexical/utils/nodeFormat.js'\n\nexport const TextJSXConverter: JSXConverters<SerializedTextNode> = {\n text: ({ node }) => {\n let text: React.ReactNode = node.text\n\n if (node.format & NodeFormat.IS_BOLD) {\n text = <strong>{text}</strong>\n }\n if (node.format & NodeFormat.IS_ITALIC) {\n text = <em>{text}</em>\n }\n if (node.format & NodeFormat.IS_STRIKETHROUGH) {\n text = <span style={{ textDecoration: 'line-through' }}>{text}</span>\n }\n if (node.format & NodeFormat.IS_UNDERLINE) {\n text = <span style={{ textDecoration: 'underline' }}>{text}</span>\n }\n if (node.format & NodeFormat.IS_CODE) {\n text = <code>{text}</code>\n }\n if (node.format & NodeFormat.IS_SUBSCRIPT) {\n text = <sub>{text}</sub>\n }\n if (node.format & NodeFormat.IS_SUPERSCRIPT) {\n text = <sup>{text}</sup>\n }\n\n return text\n },\n}\n"],"names":["NodeFormat","TextJSXConverter","text","node","format","IS_BOLD","strong","IS_ITALIC","em","IS_STRIKETHROUGH","span","style","textDecoration","IS_UNDERLINE","IS_CODE","code","IS_SUBSCRIPT","sub","IS_SUPERSCRIPT","sup"],"mappings":"AAKA,SAASA,UAAU,QAAQ,6CAA4C;AAEvE,OAAO,MAAMC,mBAAsD;IACjEC,MAAM,CAAC,EAAEC,IAAI,EAAE;QACb,IAAID,OAAwBC,KAAKD,IAAI;QAErC,IAAIC,KAAKC,MAAM,GAAGJ,WAAWK,OAAO,EAAE;YACpCH,QAAQI,QAAQJ,OAAOI;QACzB;QACA,IAAIH,KAAKC,MAAM,GAAGJ,WAAWO,SAAS,EAAE;YACtCL,QAAQM,IAAIN,OAAOM;QACrB;QACA,IAAIL,KAAKC,MAAM,GAAGJ,WAAWS,gBAAgB,EAAE;YAC7CP,QAAQQ,KAAKC,OAAO;gBAAEC,gBAAgB;YAAe,IAAIV,OAAOQ;QAClE;QACA,IAAIP,KAAKC,MAAM,GAAGJ,WAAWa,YAAY,EAAE;YACzCX,QAAQQ,KAAKC,OAAO;gBAAEC,gBAAgB;YAAY,IAAIV,OAAOQ;QAC/D;QACA,IAAIP,KAAKC,MAAM,GAAGJ,WAAWc,OAAO,EAAE;YACpCZ,QAAQa,MAAMb,OAAOa;QACvB;QACA,IAAIZ,KAAKC,MAAM,GAAGJ,WAAWgB,YAAY,EAAE;YACzCd,QAAQe,KAAKf,OAAOe;QACtB;QACA,IAAId,KAAKC,MAAM,GAAGJ,WAAWkB,cAAc,EAAE;YAC3ChB,QAAQiB,KAAKjB,OAAOiB;QACtB;QAEA,OAAOjB;IACT;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../../../../src/features/converters/lexicalToJSX/converter/converters/text.tsx"],"sourcesContent":["import React from 'react'\n\nimport type { SerializedTextNode } from '../../../../../nodeTypes.js'\nimport type { JSXConverters } from '../types.js'\n\nimport { NodeFormat } from '../../../../../lexical/utils/nodeFormat.js'\n\nexport const TextJSXConverter: JSXConverters<SerializedTextNode> = {\n text: ({ node }) => {\n let text: React.ReactNode = node.text\n\n if (node.format & NodeFormat.IS_BOLD) {\n text = <strong>{text}</strong>\n }\n if (node.format & NodeFormat.IS_ITALIC) {\n text = <em>{text}</em>\n }\n if (node.format & NodeFormat.IS_STRIKETHROUGH) {\n text = <span style={{ textDecoration: 'line-through' }}>{text}</span>\n }\n if (node.format & NodeFormat.IS_UNDERLINE) {\n text = <span style={{ textDecoration: 'underline' }}>{text}</span>\n }\n if (node.format & NodeFormat.IS_CODE) {\n text = <code>{text}</code>\n }\n if (node.format & NodeFormat.IS_SUBSCRIPT) {\n text = <sub>{text}</sub>\n }\n if (node.format & NodeFormat.IS_SUPERSCRIPT) {\n text = <sup>{text}</sup>\n }\n\n return text\n },\n}\n"],"names":["React","NodeFormat","TextJSXConverter","text","node","format","IS_BOLD","strong","IS_ITALIC","em","IS_STRIKETHROUGH","span","style","textDecoration","IS_UNDERLINE","IS_CODE","code","IS_SUBSCRIPT","sub","IS_SUPERSCRIPT","sup"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAKzB,SAASC,UAAU,QAAQ,6CAA4C;AAEvE,OAAO,MAAMC,mBAAsD;IACjEC,MAAM,CAAC,EAAEC,IAAI,EAAE;QACb,IAAID,OAAwBC,KAAKD,IAAI;QAErC,IAAIC,KAAKC,MAAM,GAAGJ,WAAWK,OAAO,EAAE;YACpCH,qBAAO,QAACI;0BAAQJ;;;;;;QAClB;QACA,IAAIC,KAAKC,MAAM,GAAGJ,WAAWO,SAAS,EAAE;YACtCL,qBAAO,QAACM;0BAAIN;;;;;;QACd;QACA,IAAIC,KAAKC,MAAM,GAAGJ,WAAWS,gBAAgB,EAAE;YAC7CP,qBAAO,QAACQ;gBAAKC,OAAO;oBAAEC,gBAAgB;gBAAe;0BAAIV;;;;;;QAC3D;QACA,IAAIC,KAAKC,MAAM,GAAGJ,WAAWa,YAAY,EAAE;YACzCX,qBAAO,QAACQ;gBAAKC,OAAO;oBAAEC,gBAAgB;gBAAY;0BAAIV;;;;;;QACxD;QACA,IAAIC,KAAKC,MAAM,GAAGJ,WAAWc,OAAO,EAAE;YACpCZ,qBAAO,QAACa;0BAAMb;;;;;;QAChB;QACA,IAAIC,KAAKC,MAAM,GAAGJ,WAAWgB,YAAY,EAAE;YACzCd,qBAAO,QAACe;0BAAKf;;;;;;QACf;QACA,IAAIC,KAAKC,MAAM,GAAGJ,WAAWkB,cAAc,EAAE;YAC3ChB,qBAAO,QAACiB;0BAAKjB;;;;;;QACf;QAEA,OAAOA;IACT;AACF,EAAC"}