@payloadcms/richtext-lexical 3.84.1 → 4.0.0-internal.d28e9fb

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 (331) hide show
  1. package/dist/exports/client/{Field-4UEGQMIN.js → Field-NXLXFFLW.js} +2 -2
  2. package/dist/exports/client/Field-NXLXFFLW.js.map +7 -0
  3. package/dist/exports/client/bundled.css +1 -1
  4. package/dist/exports/client/chunk-DZDHVMML.js +2 -0
  5. package/dist/exports/client/chunk-DZDHVMML.js.map +7 -0
  6. package/dist/exports/client/componentInline-LCHKRXOV.js +2 -0
  7. package/dist/exports/client/index.d.ts +0 -2
  8. package/dist/exports/client/index.d.ts.map +1 -1
  9. package/dist/exports/client/index.js +32 -32
  10. package/dist/exports/client/index.js.map +4 -4
  11. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  12. package/dist/features/blocks/client/component/index.js +17 -2
  13. package/dist/features/blocks/client/component/index.js.map +1 -1
  14. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  15. package/dist/features/blocks/client/componentInline/index.js +13 -3
  16. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  17. package/dist/field/Field.d.ts.map +1 -1
  18. package/dist/field/Field.js +1 -1
  19. package/dist/field/Field.js.map +1 -1
  20. package/dist/field/bundled.css +1 -1
  21. package/dist/index.d.ts +0 -1
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +11 -2
  24. package/dist/index.js.map +1 -1
  25. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  26. package/dist/lexical/config/server/loader.js +12 -9
  27. package/dist/lexical/config/server/loader.js.map +1 -1
  28. package/dist/lexical/ui/icons/Add/index.d.ts +4 -1
  29. package/dist/lexical/ui/icons/Add/index.d.ts.map +1 -1
  30. package/dist/lexical/ui/icons/Add/index.js +19 -12
  31. package/dist/lexical/ui/icons/Add/index.js.map +1 -1
  32. package/dist/lexical/ui/icons/Add/index.svg +2 -3
  33. package/dist/lexical/ui/icons/Add/light.svg +2 -3
  34. package/dist/lexical/ui/icons/AlignCenter/index.d.ts +3 -1
  35. package/dist/lexical/ui/icons/AlignCenter/index.d.ts.map +1 -1
  36. package/dist/lexical/ui/icons/AlignCenter/index.js +15 -19
  37. package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
  38. package/dist/lexical/ui/icons/AlignJustify/index.d.ts +3 -1
  39. package/dist/lexical/ui/icons/AlignJustify/index.d.ts.map +1 -1
  40. package/dist/lexical/ui/icons/AlignJustify/index.js +15 -19
  41. package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
  42. package/dist/lexical/ui/icons/AlignLeft/index.d.ts +3 -1
  43. package/dist/lexical/ui/icons/AlignLeft/index.d.ts.map +1 -1
  44. package/dist/lexical/ui/icons/AlignLeft/index.js +15 -19
  45. package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
  46. package/dist/lexical/ui/icons/AlignRight/index.d.ts +3 -1
  47. package/dist/lexical/ui/icons/AlignRight/index.d.ts.map +1 -1
  48. package/dist/lexical/ui/icons/AlignRight/index.js +15 -19
  49. package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
  50. package/dist/lexical/ui/icons/Block/index.d.ts +3 -1
  51. package/dist/lexical/ui/icons/Block/index.d.ts.map +1 -1
  52. package/dist/lexical/ui/icons/Block/index.js +13 -28
  53. package/dist/lexical/ui/icons/Block/index.js.map +1 -1
  54. package/dist/lexical/ui/icons/Blockquote/index.d.ts +3 -1
  55. package/dist/lexical/ui/icons/Blockquote/index.d.ts.map +1 -1
  56. package/dist/lexical/ui/icons/Blockquote/index.js +9 -6
  57. package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
  58. package/dist/lexical/ui/icons/Bold/index.d.ts +3 -1
  59. package/dist/lexical/ui/icons/Bold/index.d.ts.map +1 -1
  60. package/dist/lexical/ui/icons/Bold/index.js +13 -8
  61. package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
  62. package/dist/lexical/ui/icons/Checklist/index.d.ts +4 -1
  63. package/dist/lexical/ui/icons/Checklist/index.d.ts.map +1 -1
  64. package/dist/lexical/ui/icons/Checklist/index.js +17 -18
  65. package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
  66. package/dist/lexical/ui/icons/Code/index.d.ts +3 -1
  67. package/dist/lexical/ui/icons/Code/index.d.ts.map +1 -1
  68. package/dist/lexical/ui/icons/Code/index.js +15 -13
  69. package/dist/lexical/ui/icons/Code/index.js.map +1 -1
  70. package/dist/lexical/ui/icons/CodeBlock/index.d.ts +4 -1
  71. package/dist/lexical/ui/icons/CodeBlock/index.d.ts.map +1 -1
  72. package/dist/lexical/ui/icons/CodeBlock/index.js +18 -7
  73. package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  74. package/dist/lexical/ui/icons/Collapse/index.d.ts +3 -1
  75. package/dist/lexical/ui/icons/Collapse/index.d.ts.map +1 -1
  76. package/dist/lexical/ui/icons/Collapse/index.js +10 -8
  77. package/dist/lexical/ui/icons/Collapse/index.js.map +1 -1
  78. package/dist/lexical/ui/icons/DraggableBlock/index.svg +7 -7
  79. package/dist/lexical/ui/icons/DraggableBlock/light.svg +7 -7
  80. package/dist/lexical/ui/icons/Expand/index.d.ts +5 -0
  81. package/dist/lexical/ui/icons/Expand/index.d.ts.map +1 -0
  82. package/dist/lexical/ui/icons/Expand/index.js +22 -0
  83. package/dist/lexical/ui/icons/Expand/index.js.map +1 -0
  84. package/dist/lexical/ui/icons/H1/index.d.ts +3 -1
  85. package/dist/lexical/ui/icons/H1/index.d.ts.map +1 -1
  86. package/dist/lexical/ui/icons/H1/index.js +9 -6
  87. package/dist/lexical/ui/icons/H1/index.js.map +1 -1
  88. package/dist/lexical/ui/icons/H2/index.d.ts +3 -1
  89. package/dist/lexical/ui/icons/H2/index.d.ts.map +1 -1
  90. package/dist/lexical/ui/icons/H2/index.js +9 -6
  91. package/dist/lexical/ui/icons/H2/index.js.map +1 -1
  92. package/dist/lexical/ui/icons/H3/index.d.ts +3 -1
  93. package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
  94. package/dist/lexical/ui/icons/H3/index.js +9 -6
  95. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  96. package/dist/lexical/ui/icons/H4/index.d.ts +3 -1
  97. package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
  98. package/dist/lexical/ui/icons/H4/index.js +9 -6
  99. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  100. package/dist/lexical/ui/icons/H5/index.d.ts +3 -1
  101. package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
  102. package/dist/lexical/ui/icons/H5/index.js +9 -6
  103. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  104. package/dist/lexical/ui/icons/H6/index.d.ts +3 -1
  105. package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
  106. package/dist/lexical/ui/icons/H6/index.js +9 -6
  107. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  108. package/dist/lexical/ui/icons/HorizontalRule/index.d.ts +3 -1
  109. package/dist/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -1
  110. package/dist/lexical/ui/icons/HorizontalRule/index.js +11 -11
  111. package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
  112. package/dist/lexical/ui/icons/IndentDecrease/index.d.ts +3 -1
  113. package/dist/lexical/ui/icons/IndentDecrease/index.d.ts.map +1 -1
  114. package/dist/lexical/ui/icons/IndentDecrease/index.js +18 -22
  115. package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
  116. package/dist/lexical/ui/icons/IndentIncrease/index.d.ts +3 -1
  117. package/dist/lexical/ui/icons/IndentIncrease/index.d.ts.map +1 -1
  118. package/dist/lexical/ui/icons/IndentIncrease/index.js +15 -22
  119. package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
  120. package/dist/lexical/ui/icons/InlineBlocks/index.d.ts +3 -1
  121. package/dist/lexical/ui/icons/InlineBlocks/index.d.ts.map +1 -1
  122. package/dist/lexical/ui/icons/InlineBlocks/index.js +9 -6
  123. package/dist/lexical/ui/icons/InlineBlocks/index.js.map +1 -1
  124. package/dist/lexical/ui/icons/Italic/index.d.ts +3 -1
  125. package/dist/lexical/ui/icons/Italic/index.d.ts.map +1 -1
  126. package/dist/lexical/ui/icons/Italic/index.js +13 -8
  127. package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
  128. package/dist/lexical/ui/icons/Link/index.d.ts +4 -1
  129. package/dist/lexical/ui/icons/Link/index.d.ts.map +1 -1
  130. package/dist/lexical/ui/icons/Link/index.js +14 -9
  131. package/dist/lexical/ui/icons/Link/index.js.map +1 -1
  132. package/dist/lexical/ui/icons/Meatballs/index.d.ts +4 -1
  133. package/dist/lexical/ui/icons/Meatballs/index.d.ts.map +1 -1
  134. package/dist/lexical/ui/icons/Meatballs/index.js +19 -15
  135. package/dist/lexical/ui/icons/Meatballs/index.js.map +1 -1
  136. package/dist/lexical/ui/icons/OrderedList/index.d.ts +4 -1
  137. package/dist/lexical/ui/icons/OrderedList/index.d.ts.map +1 -1
  138. package/dist/lexical/ui/icons/OrderedList/index.js +19 -25
  139. package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
  140. package/dist/lexical/ui/icons/Relationship/index.d.ts +3 -1
  141. package/dist/lexical/ui/icons/Relationship/index.d.ts.map +1 -1
  142. package/dist/lexical/ui/icons/Relationship/index.js +13 -25
  143. package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
  144. package/dist/lexical/ui/icons/Strikethrough/index.d.ts +3 -1
  145. package/dist/lexical/ui/icons/Strikethrough/index.d.ts.map +1 -1
  146. package/dist/lexical/ui/icons/Strikethrough/index.js +13 -13
  147. package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
  148. package/dist/lexical/ui/icons/Subscript/index.d.ts +3 -1
  149. package/dist/lexical/ui/icons/Subscript/index.d.ts.map +1 -1
  150. package/dist/lexical/ui/icons/Subscript/index.js +10 -7
  151. package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
  152. package/dist/lexical/ui/icons/Superscript/index.d.ts +3 -1
  153. package/dist/lexical/ui/icons/Superscript/index.d.ts.map +1 -1
  154. package/dist/lexical/ui/icons/Superscript/index.js +10 -7
  155. package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
  156. package/dist/lexical/ui/icons/Table/index.d.ts +4 -1
  157. package/dist/lexical/ui/icons/Table/index.d.ts.map +1 -1
  158. package/dist/lexical/ui/icons/Table/index.js +20 -15
  159. package/dist/lexical/ui/icons/Table/index.js.map +1 -1
  160. package/dist/lexical/ui/icons/Text/index.d.ts +4 -1
  161. package/dist/lexical/ui/icons/Text/index.d.ts.map +1 -1
  162. package/dist/lexical/ui/icons/Text/index.js +17 -8
  163. package/dist/lexical/ui/icons/Text/index.js.map +1 -1
  164. package/dist/lexical/ui/icons/Underline/index.d.ts +3 -1
  165. package/dist/lexical/ui/icons/Underline/index.d.ts.map +1 -1
  166. package/dist/lexical/ui/icons/Underline/index.js +16 -14
  167. package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
  168. package/dist/lexical/ui/icons/UnorderedList/index.d.ts +3 -1
  169. package/dist/lexical/ui/icons/UnorderedList/index.d.ts.map +1 -1
  170. package/dist/lexical/ui/icons/UnorderedList/index.js +13 -40
  171. package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
  172. package/dist/lexical/ui/icons/Upload/index.d.ts +3 -1
  173. package/dist/lexical/ui/icons/Upload/index.d.ts.map +1 -1
  174. package/dist/lexical/ui/icons/Upload/index.js +15 -22
  175. package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
  176. package/dist/utilities/buildEditorState.d.ts.map +1 -1
  177. package/dist/utilities/buildEditorState.js +13 -0
  178. package/dist/utilities/buildEditorState.js.map +1 -1
  179. package/package.json +10 -15
  180. package/dist/exports/client/Component-DOSSWC76.js +0 -2
  181. package/dist/exports/client/Component-DOSSWC76.js.map +0 -7
  182. package/dist/exports/client/Component-MBLHTKDK.js +0 -2
  183. package/dist/exports/client/Component-MBLHTKDK.js.map +0 -7
  184. package/dist/exports/client/Field-4UEGQMIN.js.map +0 -7
  185. package/dist/exports/client/chunk-YWIZCGSY.js +0 -2
  186. package/dist/exports/client/chunk-YWIZCGSY.js.map +0 -7
  187. package/dist/exports/client/componentInline-CBBUBQ7P.js +0 -2
  188. package/dist/exports/server/migrate.d.ts +0 -16
  189. package/dist/exports/server/migrate.d.ts.map +0 -1
  190. package/dist/exports/server/migrate.js +0 -16
  191. package/dist/exports/server/migrate.js.map +0 -1
  192. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts +0 -3
  193. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts.map +0 -1
  194. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js +0 -22
  195. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +0 -1
  196. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts +0 -3
  197. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts.map +0 -1
  198. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js +0 -33
  199. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +0 -1
  200. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts +0 -3
  201. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts.map +0 -1
  202. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js +0 -24
  203. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +0 -1
  204. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts +0 -3
  205. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts.map +0 -1
  206. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js +0 -25
  207. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +0 -1
  208. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts +0 -3
  209. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts.map +0 -1
  210. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js +0 -22
  211. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +0 -1
  212. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts +0 -3
  213. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts.map +0 -1
  214. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js +0 -28
  215. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +0 -1
  216. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts +0 -3
  217. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +0 -1
  218. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +0 -22
  219. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +0 -1
  220. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts +0 -3
  221. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts.map +0 -1
  222. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js +0 -9
  223. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +0 -1
  224. package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts +0 -19
  225. package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts.map +0 -1
  226. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js +0 -78
  227. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +0 -1
  228. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts +0 -23
  229. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts.map +0 -1
  230. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js +0 -2
  231. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js.map +0 -1
  232. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts +0 -2
  233. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +0 -1
  234. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js +0 -10
  235. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js.map +0 -1
  236. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts +0 -10
  237. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +0 -1
  238. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js +0 -49
  239. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js.map +0 -1
  240. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts +0 -9
  241. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts.map +0 -1
  242. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +0 -15
  243. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +0 -1
  244. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +0 -33
  245. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +0 -1
  246. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +0 -74
  247. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +0 -1
  248. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts +0 -3
  249. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts.map +0 -1
  250. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js +0 -23
  251. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +0 -1
  252. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts +0 -3
  253. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts.map +0 -1
  254. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js +0 -24
  255. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +0 -1
  256. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts +0 -3
  257. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts.map +0 -1
  258. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js +0 -33
  259. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +0 -1
  260. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts +0 -3
  261. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts.map +0 -1
  262. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js +0 -30
  263. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +0 -1
  264. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts +0 -3
  265. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts.map +0 -1
  266. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js +0 -26
  267. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +0 -1
  268. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts +0 -3
  269. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts.map +0 -1
  270. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js +0 -26
  271. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +0 -1
  272. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts +0 -3
  273. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +0 -1
  274. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js +0 -15
  275. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +0 -1
  276. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts +0 -3
  277. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts.map +0 -1
  278. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js +0 -27
  279. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +0 -1
  280. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts +0 -3
  281. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts.map +0 -1
  282. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js +0 -26
  283. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +0 -1
  284. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts +0 -3
  285. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +0 -1
  286. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js +0 -18
  287. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +0 -1
  288. package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts +0 -3
  289. package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts.map +0 -1
  290. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js +0 -12
  291. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js.map +0 -1
  292. package/dist/features/migrations/slateToLexical/converter/index.d.ts +0 -19
  293. package/dist/features/migrations/slateToLexical/converter/index.d.ts.map +0 -1
  294. package/dist/features/migrations/slateToLexical/converter/index.js +0 -130
  295. package/dist/features/migrations/slateToLexical/converter/index.js.map +0 -1
  296. package/dist/features/migrations/slateToLexical/converter/types.d.ts +0 -16
  297. package/dist/features/migrations/slateToLexical/converter/types.d.ts.map +0 -1
  298. package/dist/features/migrations/slateToLexical/converter/types.js +0 -2
  299. package/dist/features/migrations/slateToLexical/converter/types.js.map +0 -1
  300. package/dist/features/migrations/slateToLexical/feature.client.d.ts +0 -2
  301. package/dist/features/migrations/slateToLexical/feature.client.d.ts.map +0 -1
  302. package/dist/features/migrations/slateToLexical/feature.client.js +0 -10
  303. package/dist/features/migrations/slateToLexical/feature.client.js.map +0 -1
  304. package/dist/features/migrations/slateToLexical/feature.server.d.ts +0 -40
  305. package/dist/features/migrations/slateToLexical/feature.server.d.ts.map +0 -1
  306. package/dist/features/migrations/slateToLexical/feature.server.js +0 -68
  307. package/dist/features/migrations/slateToLexical/feature.server.js.map +0 -1
  308. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts +0 -9
  309. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts.map +0 -1
  310. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +0 -15
  311. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +0 -1
  312. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +0 -33
  313. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +0 -1
  314. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +0 -74
  315. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +0 -1
  316. package/dist/lexical/ui/icons/AI/index.d.ts +0 -3
  317. package/dist/lexical/ui/icons/AI/index.d.ts.map +0 -1
  318. package/dist/lexical/ui/icons/AI/index.js +0 -34
  319. package/dist/lexical/ui/icons/AI/index.js.map +0 -1
  320. package/dist/lexical/ui/icons/Caret/index.svg +0 -3
  321. package/dist/lexical/ui/icons/Edit/index.svg +0 -10
  322. package/dist/lexical/ui/icons/Remove/index.svg +0 -4
  323. package/dist/utilities/migrateSlateToLexical/index.d.ts +0 -15
  324. package/dist/utilities/migrateSlateToLexical/index.d.ts.map +0 -1
  325. package/dist/utilities/migrateSlateToLexical/index.js +0 -152
  326. package/dist/utilities/migrateSlateToLexical/index.js.map +0 -1
  327. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts +0 -10
  328. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts.map +0 -1
  329. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js +0 -85
  330. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js.map +0 -1
  331. /package/dist/exports/client/{componentInline-CBBUBQ7P.js.map → componentInline-LCHKRXOV.js.map} +0 -0
@@ -1,16 +0,0 @@
1
- export { LexicalPluginToLexicalFeature } from '../../features/migrations/lexicalPluginToLexical/feature.server.js';
2
- export { SlateBlockquoteConverter } from '../../features/migrations/slateToLexical/converter/converters/blockquote/converter.js';
3
- export { SlateHeadingConverter } from '../../features/migrations/slateToLexical/converter/converters/heading/converter.js';
4
- export { SlateIndentConverter } from '../../features/migrations/slateToLexical/converter/converters/indent/converter.js';
5
- export { SlateLinkConverter } from '../../features/migrations/slateToLexical/converter/converters/link/converter.js';
6
- export { SlateListItemConverter } from '../../features/migrations/slateToLexical/converter/converters/listItem/converter.js';
7
- export { SlateOrderedListConverter } from '../../features/migrations/slateToLexical/converter/converters/orderedList/converter.js';
8
- export { SlateRelationshipConverter } from '../../features/migrations/slateToLexical/converter/converters/relationship/converter.js';
9
- export { SlateUnknownConverter } from '../../features/migrations/slateToLexical/converter/converters/unknown/converter.js';
10
- export { SlateUnorderedListConverter } from '../../features/migrations/slateToLexical/converter/converters/unorderedList/converter.js';
11
- export { SlateUploadConverter } from '../../features/migrations/slateToLexical/converter/converters/upload/converter.js';
12
- export { defaultSlateConverters } from '../../features/migrations/slateToLexical/converter/defaultConverters.js';
13
- export { convertSlateNodesToLexical, convertSlateToLexical } from '../../features/migrations/slateToLexical/converter/index.js';
14
- export { SlateToLexicalFeature } from '../../features/migrations/slateToLexical/feature.server.js';
15
- export { migrateSlateToLexical } from '../../utilities/migrateSlateToLexical/index.js';
16
- //# sourceMappingURL=migrate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"migrate.js","names":["LexicalPluginToLexicalFeature","SlateBlockquoteConverter","SlateHeadingConverter","SlateIndentConverter","SlateLinkConverter","SlateListItemConverter","SlateOrderedListConverter","SlateRelationshipConverter","SlateUnknownConverter","SlateUnorderedListConverter","SlateUploadConverter","defaultSlateConverters","convertSlateNodesToLexical","convertSlateToLexical","SlateToLexicalFeature","migrateSlateToLexical"],"sources":["../../../src/exports/server/migrate.ts"],"sourcesContent":["export { LexicalPluginToLexicalFeature } from '../../features/migrations/lexicalPluginToLexical/feature.server.js'\nexport { SlateBlockquoteConverter } from '../../features/migrations/slateToLexical/converter/converters/blockquote/converter.js'\nexport { SlateHeadingConverter } from '../../features/migrations/slateToLexical/converter/converters/heading/converter.js'\nexport { SlateIndentConverter } from '../../features/migrations/slateToLexical/converter/converters/indent/converter.js'\nexport { SlateLinkConverter } from '../../features/migrations/slateToLexical/converter/converters/link/converter.js'\nexport { SlateListItemConverter } from '../../features/migrations/slateToLexical/converter/converters/listItem/converter.js'\nexport { SlateOrderedListConverter } from '../../features/migrations/slateToLexical/converter/converters/orderedList/converter.js'\nexport { SlateRelationshipConverter } from '../../features/migrations/slateToLexical/converter/converters/relationship/converter.js'\nexport { SlateUnknownConverter } from '../../features/migrations/slateToLexical/converter/converters/unknown/converter.js'\nexport { SlateUnorderedListConverter } from '../../features/migrations/slateToLexical/converter/converters/unorderedList/converter.js'\nexport { SlateUploadConverter } from '../../features/migrations/slateToLexical/converter/converters/upload/converter.js'\nexport { defaultSlateConverters } from '../../features/migrations/slateToLexical/converter/defaultConverters.js'\nexport {\n convertSlateNodesToLexical,\n convertSlateToLexical,\n} from '../../features/migrations/slateToLexical/converter/index.js'\n\nexport { SlateToLexicalFeature } from '../../features/migrations/slateToLexical/feature.server.js'\nexport { migrateSlateToLexical } from '../../utilities/migrateSlateToLexical/index.js'\n"],"mappings":"AAAA,SAASA,6BAA6B,QAAQ;AAC9C,SAASC,wBAAwB,QAAQ;AACzC,SAASC,qBAAqB,QAAQ;AACtC,SAASC,oBAAoB,QAAQ;AACrC,SAASC,kBAAkB,QAAQ;AACnC,SAASC,sBAAsB,QAAQ;AACvC,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,0BAA0B,QAAQ;AAC3C,SAASC,qBAAqB,QAAQ;AACtC,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,oBAAoB,QAAQ;AACrC,SAASC,sBAAsB,QAAQ;AACvC,SACEC,0BAA0B,EAC1BC,qBAAqB,QAChB;AAEP,SAASC,qBAAqB,QAAQ;AACtC,SAASC,qBAAqB,QAAQ","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- import type { LexicalPluginNodeConverter } from '../../types.js';
2
- export declare const HeadingConverter: LexicalPluginNodeConverter;
3
- //# sourceMappingURL=converter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"converter.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAIhE,eAAO,MAAM,gBAAgB,EAAE,0BAe9B,CAAA"}
@@ -1,22 +0,0 @@
1
- import { convertLexicalPluginNodesToLexical } from '../../index.js';
2
- export const HeadingConverter = {
3
- converter({
4
- converters,
5
- lexicalPluginNode,
6
- quiet
7
- }) {
8
- return {
9
- ...lexicalPluginNode,
10
- type: 'heading',
11
- children: convertLexicalPluginNodesToLexical({
12
- converters,
13
- lexicalPluginNodes: lexicalPluginNode.children,
14
- parentNodeType: 'heading',
15
- quiet
16
- }),
17
- version: 1
18
- };
19
- },
20
- nodeTypes: ['heading']
21
- };
22
- //# sourceMappingURL=converter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"converter.js","names":["convertLexicalPluginNodesToLexical","HeadingConverter","converter","converters","lexicalPluginNode","quiet","type","children","lexicalPluginNodes","parentNodeType","version","nodeTypes"],"sources":["../../../../../../../src/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.ts"],"sourcesContent":["import type { SerializedHeadingNode } from '../../../../../heading/server/index.js'\nimport type { LexicalPluginNodeConverter } from '../../types.js'\n\nimport { convertLexicalPluginNodesToLexical } from '../../index.js'\n\nexport const HeadingConverter: LexicalPluginNodeConverter = {\n converter({ converters, lexicalPluginNode, quiet }) {\n return {\n ...lexicalPluginNode,\n type: 'heading',\n children: convertLexicalPluginNodesToLexical({\n converters,\n lexicalPluginNodes: lexicalPluginNode.children,\n parentNodeType: 'heading',\n quiet,\n }),\n version: 1,\n } as const as SerializedHeadingNode\n },\n nodeTypes: ['heading'],\n}\n"],"mappings":"AAGA,SAASA,kCAAkC,QAAQ;AAEnD,OAAO,MAAMC,gBAAA,GAA+C;EAC1DC,UAAU;IAAEC,UAAU;IAAEC,iBAAiB;IAAEC;EAAK,CAAE;IAChD,OAAO;MACL,GAAGD,iBAAiB;MACpBE,IAAA,EAAM;MACNC,QAAA,EAAUP,kCAAA,CAAmC;QAC3CG,UAAA;QACAK,kBAAA,EAAoBJ,iBAAA,CAAkBG,QAAQ;QAC9CE,cAAA,EAAgB;QAChBJ;MACF;MACAK,OAAA,EAAS;IACX;EACF;EACAC,SAAA,EAAW,CAAC;AACd","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- import type { LexicalPluginNodeConverter } from '../../types.js';
2
- export declare const LinkConverter: LexicalPluginNodeConverter;
3
- //# sourceMappingURL=converter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"converter.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAIhE,eAAO,MAAM,aAAa,EAAE,0BA4B3B,CAAA"}
@@ -1,33 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */import { convertLexicalPluginNodesToLexical } from '../../index.js';
2
- export const LinkConverter = {
3
- converter({
4
- converters,
5
- lexicalPluginNode,
6
- quiet
7
- }) {
8
- return {
9
- type: 'link',
10
- children: convertLexicalPluginNodesToLexical({
11
- converters,
12
- lexicalPluginNodes: lexicalPluginNode.children,
13
- parentNodeType: 'link',
14
- quiet
15
- }),
16
- direction: lexicalPluginNode.direction || 'ltr',
17
- fields: {
18
- doc: lexicalPluginNode.attributes?.doc ? {
19
- relationTo: lexicalPluginNode.attributes?.doc?.relationTo,
20
- value: lexicalPluginNode.attributes?.doc?.value
21
- } : undefined,
22
- linkType: lexicalPluginNode.attributes?.linkType || 'custom',
23
- newTab: lexicalPluginNode.attributes?.newTab || false,
24
- url: lexicalPluginNode.attributes?.url || undefined
25
- },
26
- format: lexicalPluginNode.format || '',
27
- indent: lexicalPluginNode.indent || 0,
28
- version: 2
29
- };
30
- },
31
- nodeTypes: ['link']
32
- };
33
- //# sourceMappingURL=converter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"converter.js","names":["convertLexicalPluginNodesToLexical","LinkConverter","converter","converters","lexicalPluginNode","quiet","type","children","lexicalPluginNodes","parentNodeType","direction","fields","doc","attributes","relationTo","value","undefined","linkType","newTab","url","format","indent","version","nodeTypes"],"sources":["../../../../../../../src/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { SerializedLinkNode } from '../../../../../link/nodes/types.js'\nimport type { LexicalPluginNodeConverter } from '../../types.js'\n\nimport { convertLexicalPluginNodesToLexical } from '../../index.js'\n\nexport const LinkConverter: LexicalPluginNodeConverter = {\n converter({ converters, lexicalPluginNode, quiet }) {\n return {\n type: 'link',\n children: convertLexicalPluginNodesToLexical({\n converters,\n lexicalPluginNodes: lexicalPluginNode.children,\n parentNodeType: 'link',\n quiet,\n }),\n direction: (lexicalPluginNode as any).direction || 'ltr',\n fields: {\n doc: (lexicalPluginNode as any).attributes?.doc\n ? {\n relationTo: (lexicalPluginNode as any).attributes?.doc?.relationTo,\n value: (lexicalPluginNode as any).attributes?.doc?.value,\n }\n : undefined,\n linkType: (lexicalPluginNode as any).attributes?.linkType || 'custom',\n newTab: (lexicalPluginNode as any).attributes?.newTab || false,\n url: (lexicalPluginNode as any).attributes?.url || undefined,\n },\n format: (lexicalPluginNode as any).format || '',\n indent: (lexicalPluginNode as any).indent || 0,\n version: 2,\n } as const as SerializedLinkNode\n },\n nodeTypes: ['link'],\n}\n"],"mappings":"AAAA,uDAKA,SAASA,kCAAkC,QAAQ;AAEnD,OAAO,MAAMC,aAAA,GAA4C;EACvDC,UAAU;IAAEC,UAAU;IAAEC,iBAAiB;IAAEC;EAAK,CAAE;IAChD,OAAO;MACLC,IAAA,EAAM;MACNC,QAAA,EAAUP,kCAAA,CAAmC;QAC3CG,UAAA;QACAK,kBAAA,EAAoBJ,iBAAA,CAAkBG,QAAQ;QAC9CE,cAAA,EAAgB;QAChBJ;MACF;MACAK,SAAA,EAAWN,iBAAC,CAA0BM,SAAS,IAAI;MACnDC,MAAA,EAAQ;QACNC,GAAA,EAAKR,iBAAC,CAA0BS,UAAU,EAAED,GAAA,GACxC;UACEE,UAAA,EAAYV,iBAAC,CAA0BS,UAAU,EAAED,GAAA,EAAKE,UAAA;UACxDC,KAAA,EAAOX,iBAAC,CAA0BS,UAAU,EAAED,GAAA,EAAKG;QACrD,IACAC,SAAA;QACJC,QAAA,EAAUb,iBAAC,CAA0BS,UAAU,EAAEI,QAAA,IAAY;QAC7DC,MAAA,EAAQd,iBAAC,CAA0BS,UAAU,EAAEK,MAAA,IAAU;QACzDC,GAAA,EAAKf,iBAAC,CAA0BS,UAAU,EAAEM,GAAA,IAAOH;MACrD;MACAI,MAAA,EAAQhB,iBAAC,CAA0BgB,MAAM,IAAI;MAC7CC,MAAA,EAAQjB,iBAAC,CAA0BiB,MAAM,IAAI;MAC7CC,OAAA,EAAS;IACX;EACF;EACAC,SAAA,EAAW,CAAC;AACd","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- import type { LexicalPluginNodeConverter } from '../../types.js';
2
- export declare const ListConverter: LexicalPluginNodeConverter;
3
- //# sourceMappingURL=converter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"converter.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAIhE,eAAO,MAAM,aAAa,EAAE,0BAiB3B,CAAA"}
@@ -1,24 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */import { convertLexicalPluginNodesToLexical } from '../../index.js';
2
- export const ListConverter = {
3
- converter({
4
- converters,
5
- lexicalPluginNode,
6
- quiet
7
- }) {
8
- return {
9
- ...lexicalPluginNode,
10
- type: 'list',
11
- children: convertLexicalPluginNodesToLexical({
12
- converters,
13
- lexicalPluginNodes: lexicalPluginNode.children,
14
- parentNodeType: 'list',
15
- quiet
16
- }),
17
- listType: lexicalPluginNode?.listType || 'number',
18
- tag: lexicalPluginNode?.tag || 'ol',
19
- version: 1
20
- };
21
- },
22
- nodeTypes: ['list']
23
- };
24
- //# sourceMappingURL=converter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"converter.js","names":["convertLexicalPluginNodesToLexical","ListConverter","converter","converters","lexicalPluginNode","quiet","type","children","lexicalPluginNodes","parentNodeType","listType","tag","version","nodeTypes"],"sources":["../../../../../../../src/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { SerializedListNode } from '../../../../../lists/plugin/index.js'\nimport type { LexicalPluginNodeConverter } from '../../types.js'\n\nimport { convertLexicalPluginNodesToLexical } from '../../index.js'\n\nexport const ListConverter: LexicalPluginNodeConverter = {\n converter({ converters, lexicalPluginNode, quiet }) {\n return {\n ...lexicalPluginNode,\n type: 'list',\n children: convertLexicalPluginNodesToLexical({\n converters,\n lexicalPluginNodes: lexicalPluginNode.children,\n parentNodeType: 'list',\n quiet,\n }),\n listType: (lexicalPluginNode as any)?.listType || 'number',\n tag: (lexicalPluginNode as any)?.tag || 'ol',\n version: 1,\n } as const as SerializedListNode\n },\n nodeTypes: ['list'],\n}\n"],"mappings":"AAAA,uDAKA,SAASA,kCAAkC,QAAQ;AAEnD,OAAO,MAAMC,aAAA,GAA4C;EACvDC,UAAU;IAAEC,UAAU;IAAEC,iBAAiB;IAAEC;EAAK,CAAE;IAChD,OAAO;MACL,GAAGD,iBAAiB;MACpBE,IAAA,EAAM;MACNC,QAAA,EAAUP,kCAAA,CAAmC;QAC3CG,UAAA;QACAK,kBAAA,EAAoBJ,iBAAA,CAAkBG,QAAQ;QAC9CE,cAAA,EAAgB;QAChBJ;MACF;MACAK,QAAA,EAAUN,iBAAC,EAA2BM,QAAA,IAAY;MAClDC,GAAA,EAAKP,iBAAC,EAA2BO,GAAA,IAAO;MACxCC,OAAA,EAAS;IACX;EACF;EACAC,SAAA,EAAW,CAAC;AACd","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- import type { LexicalPluginNodeConverter } from '../../types.js';
2
- export declare const ListItemConverter: LexicalPluginNodeConverter;
3
- //# sourceMappingURL=converter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"converter.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAIhE,eAAO,MAAM,iBAAiB,EAAE,0BAiB/B,CAAA"}
@@ -1,25 +0,0 @@
1
- import { convertLexicalPluginNodesToLexical } from '../../index.js';
2
- export const ListItemConverter = {
3
- converter({
4
- childIndex,
5
- converters,
6
- lexicalPluginNode,
7
- quiet
8
- }) {
9
- return {
10
- ...lexicalPluginNode,
11
- type: 'listitem',
12
- checked: undefined,
13
- children: convertLexicalPluginNodesToLexical({
14
- converters,
15
- lexicalPluginNodes: lexicalPluginNode.children,
16
- parentNodeType: 'listitem',
17
- quiet
18
- }),
19
- value: childIndex + 1,
20
- version: 1
21
- };
22
- },
23
- nodeTypes: ['listitem']
24
- };
25
- //# sourceMappingURL=converter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"converter.js","names":["convertLexicalPluginNodesToLexical","ListItemConverter","converter","childIndex","converters","lexicalPluginNode","quiet","type","checked","undefined","children","lexicalPluginNodes","parentNodeType","value","version","nodeTypes"],"sources":["../../../../../../../src/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.ts"],"sourcesContent":["import type { SerializedListItemNode } from '../../../../../lists/plugin/index.js'\nimport type { LexicalPluginNodeConverter } from '../../types.js'\n\nimport { convertLexicalPluginNodesToLexical } from '../../index.js'\n\nexport const ListItemConverter: LexicalPluginNodeConverter = {\n converter({ childIndex, converters, lexicalPluginNode, quiet }) {\n return {\n ...lexicalPluginNode,\n type: 'listitem',\n checked: undefined,\n children: convertLexicalPluginNodesToLexical({\n converters,\n lexicalPluginNodes: lexicalPluginNode.children,\n parentNodeType: 'listitem',\n quiet,\n }),\n value: childIndex + 1,\n version: 1,\n } as const as SerializedListItemNode\n },\n nodeTypes: ['listitem'],\n}\n"],"mappings":"AAGA,SAASA,kCAAkC,QAAQ;AAEnD,OAAO,MAAMC,iBAAA,GAAgD;EAC3DC,UAAU;IAAEC,UAAU;IAAEC,UAAU;IAAEC,iBAAiB;IAAEC;EAAK,CAAE;IAC5D,OAAO;MACL,GAAGD,iBAAiB;MACpBE,IAAA,EAAM;MACNC,OAAA,EAASC,SAAA;MACTC,QAAA,EAAUV,kCAAA,CAAmC;QAC3CI,UAAA;QACAO,kBAAA,EAAoBN,iBAAA,CAAkBK,QAAQ;QAC9CE,cAAA,EAAgB;QAChBN;MACF;MACAO,KAAA,EAAOV,UAAA,GAAa;MACpBW,OAAA,EAAS;IACX;EACF;EACAC,SAAA,EAAW,CAAC;AACd","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- import type { LexicalPluginNodeConverter } from '../../types.js';
2
- export declare const QuoteConverter: LexicalPluginNodeConverter;
3
- //# sourceMappingURL=converter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"converter.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAIhE,eAAO,MAAM,cAAc,EAAE,0BAe5B,CAAA"}
@@ -1,22 +0,0 @@
1
- import { convertLexicalPluginNodesToLexical } from '../../index.js';
2
- export const QuoteConverter = {
3
- converter({
4
- converters,
5
- lexicalPluginNode,
6
- quiet
7
- }) {
8
- return {
9
- ...lexicalPluginNode,
10
- type: 'quote',
11
- children: convertLexicalPluginNodesToLexical({
12
- converters,
13
- lexicalPluginNodes: lexicalPluginNode.children,
14
- parentNodeType: 'quote',
15
- quiet
16
- }),
17
- version: 1
18
- };
19
- },
20
- nodeTypes: ['quote']
21
- };
22
- //# sourceMappingURL=converter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"converter.js","names":["convertLexicalPluginNodesToLexical","QuoteConverter","converter","converters","lexicalPluginNode","quiet","type","children","lexicalPluginNodes","parentNodeType","version","nodeTypes"],"sources":["../../../../../../../src/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.ts"],"sourcesContent":["import type { SerializedQuoteNode } from '../../../../../blockquote/server/index.js'\nimport type { LexicalPluginNodeConverter } from '../../types.js'\n\nimport { convertLexicalPluginNodesToLexical } from '../../index.js'\n\nexport const QuoteConverter: LexicalPluginNodeConverter = {\n converter({ converters, lexicalPluginNode, quiet }) {\n return {\n ...lexicalPluginNode,\n type: 'quote',\n children: convertLexicalPluginNodesToLexical({\n converters,\n lexicalPluginNodes: lexicalPluginNode.children,\n parentNodeType: 'quote',\n quiet,\n }),\n version: 1,\n } as const as SerializedQuoteNode\n },\n nodeTypes: ['quote'],\n}\n"],"mappings":"AAGA,SAASA,kCAAkC,QAAQ;AAEnD,OAAO,MAAMC,cAAA,GAA6C;EACxDC,UAAU;IAAEC,UAAU;IAAEC,iBAAiB;IAAEC;EAAK,CAAE;IAChD,OAAO;MACL,GAAGD,iBAAiB;MACpBE,IAAA,EAAM;MACNC,QAAA,EAAUP,kCAAA,CAAmC;QAC3CG,UAAA;QACAK,kBAAA,EAAoBJ,iBAAA,CAAkBG,QAAQ;QAC9CE,cAAA,EAAgB;QAChBJ;MACF;MACAK,OAAA,EAAS;IACX;EACF;EACAC,SAAA,EAAW,CAAC;AACd","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- import type { LexicalPluginNodeConverter } from '../../types.js';
2
- export declare const UnknownConverter: LexicalPluginNodeConverter;
3
- //# sourceMappingURL=converter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"converter.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAIhE,eAAO,MAAM,gBAAgB,EAAE,0BAqB9B,CAAA"}
@@ -1,28 +0,0 @@
1
- import { convertLexicalPluginNodesToLexical } from '../../index.js';
2
- export const UnknownConverter = {
3
- converter({
4
- converters,
5
- lexicalPluginNode,
6
- quiet
7
- }) {
8
- return {
9
- type: 'unknownConverted',
10
- children: convertLexicalPluginNodesToLexical({
11
- converters,
12
- lexicalPluginNodes: lexicalPluginNode.children,
13
- parentNodeType: 'unknownConverted',
14
- quiet
15
- }),
16
- data: {
17
- nodeData: lexicalPluginNode,
18
- nodeType: lexicalPluginNode.type
19
- },
20
- direction: 'ltr',
21
- format: '',
22
- indent: 0,
23
- version: 1
24
- };
25
- },
26
- nodeTypes: ['unknown']
27
- };
28
- //# sourceMappingURL=converter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"converter.js","names":["convertLexicalPluginNodesToLexical","UnknownConverter","converter","converters","lexicalPluginNode","quiet","type","children","lexicalPluginNodes","parentNodeType","data","nodeData","nodeType","direction","format","indent","version","nodeTypes"],"sources":["../../../../../../../src/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.ts"],"sourcesContent":["import type { SerializedUnknownConvertedNode } from '../../../nodes/unknownConvertedNode/index.js'\nimport type { LexicalPluginNodeConverter } from '../../types.js'\n\nimport { convertLexicalPluginNodesToLexical } from '../../index.js'\n\nexport const UnknownConverter: LexicalPluginNodeConverter = {\n converter({ converters, lexicalPluginNode, quiet }) {\n return {\n type: 'unknownConverted',\n children: convertLexicalPluginNodesToLexical({\n converters,\n lexicalPluginNodes: lexicalPluginNode.children,\n parentNodeType: 'unknownConverted',\n quiet,\n }),\n data: {\n nodeData: lexicalPluginNode,\n nodeType: lexicalPluginNode.type,\n },\n direction: 'ltr',\n format: '',\n indent: 0,\n version: 1,\n } as const as SerializedUnknownConvertedNode\n },\n nodeTypes: ['unknown'],\n}\n"],"mappings":"AAGA,SAASA,kCAAkC,QAAQ;AAEnD,OAAO,MAAMC,gBAAA,GAA+C;EAC1DC,UAAU;IAAEC,UAAU;IAAEC,iBAAiB;IAAEC;EAAK,CAAE;IAChD,OAAO;MACLC,IAAA,EAAM;MACNC,QAAA,EAAUP,kCAAA,CAAmC;QAC3CG,UAAA;QACAK,kBAAA,EAAoBJ,iBAAA,CAAkBG,QAAQ;QAC9CE,cAAA,EAAgB;QAChBJ;MACF;MACAK,IAAA,EAAM;QACJC,QAAA,EAAUP,iBAAA;QACVQ,QAAA,EAAUR,iBAAA,CAAkBE;MAC9B;MACAO,SAAA,EAAW;MACXC,MAAA,EAAQ;MACRC,MAAA,EAAQ;MACRC,OAAA,EAAS;IACX;EACF;EACAC,SAAA,EAAW,CAAC;AACd","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- import type { LexicalPluginNodeConverter } from '../../types.js';
2
- export declare const UploadConverter: LexicalPluginNodeConverter;
3
- //# sourceMappingURL=converter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"converter.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAEhE,eAAO,MAAM,eAAe,EAAE,0BAkB7B,CAAA"}
@@ -1,22 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */export const UploadConverter = {
2
- converter({
3
- lexicalPluginNode
4
- }) {
5
- let fields = {};
6
- if (lexicalPluginNode?.caption?.editorState) {
7
- fields = {
8
- caption: lexicalPluginNode?.caption
9
- };
10
- }
11
- return {
12
- type: 'upload',
13
- fields,
14
- format: lexicalPluginNode?.format || '',
15
- relationTo: lexicalPluginNode?.rawImagePayload?.relationTo,
16
- value: lexicalPluginNode?.rawImagePayload?.value?.id || '',
17
- version: 2
18
- };
19
- },
20
- nodeTypes: ['upload']
21
- };
22
- //# sourceMappingURL=converter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"converter.js","names":["UploadConverter","converter","lexicalPluginNode","fields","caption","editorState","type","format","relationTo","rawImagePayload","value","id","version","nodeTypes"],"sources":["../../../../../../../src/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { SerializedUploadNode } from '../../../../../upload/server/nodes/UploadNode.js'\nimport type { LexicalPluginNodeConverter } from '../../types.js'\n\nexport const UploadConverter: LexicalPluginNodeConverter = {\n converter({ lexicalPluginNode }) {\n let fields = {}\n if ((lexicalPluginNode as any)?.caption?.editorState) {\n fields = {\n caption: (lexicalPluginNode as any)?.caption,\n }\n }\n return {\n type: 'upload',\n fields,\n format: (lexicalPluginNode as any)?.format || '',\n relationTo: (lexicalPluginNode as any)?.rawImagePayload?.relationTo,\n value: (lexicalPluginNode as any)?.rawImagePayload?.value?.id || '',\n version: 2,\n } as const as SerializedUploadNode\n },\n nodeTypes: ['upload'],\n}\n"],"mappings":"AAAA,uDAKA,OAAO,MAAMA,eAAA,GAA8C;EACzDC,UAAU;IAAEC;EAAiB,CAAE;IAC7B,IAAIC,MAAA,GAAS,CAAC;IACd,IAAKD,iBAAA,EAA2BE,OAAA,EAASC,WAAA,EAAa;MACpDF,MAAA,GAAS;QACPC,OAAA,EAAUF,iBAAA,EAA2BE;MACvC;IACF;IACA,OAAO;MACLE,IAAA,EAAM;MACNH,MAAA;MACAI,MAAA,EAAQL,iBAAC,EAA2BK,MAAA,IAAU;MAC9CC,UAAA,EAAaN,iBAAA,EAA2BO,eAAA,EAAiBD,UAAA;MACzDE,KAAA,EAAOR,iBAAC,EAA2BO,eAAA,EAAiBC,KAAA,EAAOC,EAAA,IAAM;MACjEC,OAAA,EAAS;IACX;EACF;EACAC,SAAA,EAAW,CAAC;AACd","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- import type { LexicalPluginNodeConverter } from './types.js';
2
- export declare const defaultConverters: LexicalPluginNodeConverter[];
3
- //# sourceMappingURL=defaultConverters.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"defaultConverters.d.ts","sourceRoot":"","sources":["../../../../../src/features/migrations/lexicalPluginToLexical/converter/defaultConverters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAA;AAU5D,eAAO,MAAM,iBAAiB,EAAE,0BAA0B,EAQzD,CAAA"}
@@ -1,9 +0,0 @@
1
- import { HeadingConverter } from './converters/heading/converter.js';
2
- import { LinkConverter } from './converters/link/converter.js';
3
- import { ListConverter } from './converters/list/converter.js';
4
- import { ListItemConverter } from './converters/listItem/converter.js';
5
- import { QuoteConverter } from './converters/quote/converter.js';
6
- import { UnknownConverter } from './converters/unknown/converter.js';
7
- import { UploadConverter } from './converters/upload/converter.js';
8
- export const defaultConverters = [HeadingConverter, LinkConverter, ListConverter, ListItemConverter, QuoteConverter, UnknownConverter, UploadConverter];
9
- //# sourceMappingURL=defaultConverters.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"defaultConverters.js","names":["HeadingConverter","LinkConverter","ListConverter","ListItemConverter","QuoteConverter","UnknownConverter","UploadConverter","defaultConverters"],"sources":["../../../../../src/features/migrations/lexicalPluginToLexical/converter/defaultConverters.ts"],"sourcesContent":["import type { LexicalPluginNodeConverter } from './types.js'\n\nimport { HeadingConverter } from './converters/heading/converter.js'\nimport { LinkConverter } from './converters/link/converter.js'\nimport { ListConverter } from './converters/list/converter.js'\nimport { ListItemConverter } from './converters/listItem/converter.js'\nimport { QuoteConverter } from './converters/quote/converter.js'\nimport { UnknownConverter } from './converters/unknown/converter.js'\nimport { UploadConverter } from './converters/upload/converter.js'\n\nexport const defaultConverters: LexicalPluginNodeConverter[] = [\n HeadingConverter,\n LinkConverter,\n ListConverter,\n ListItemConverter,\n QuoteConverter,\n UnknownConverter,\n UploadConverter,\n]\n"],"mappings":"AAEA,SAASA,gBAAgB,QAAQ;AACjC,SAASC,aAAa,QAAQ;AAC9B,SAASC,aAAa,QAAQ;AAC9B,SAASC,iBAAiB,QAAQ;AAClC,SAASC,cAAc,QAAQ;AAC/B,SAASC,gBAAgB,QAAQ;AACjC,SAASC,eAAe,QAAQ;AAEhC,OAAO,MAAMC,iBAAA,GAAkD,CAC7DP,gBAAA,EACAC,aAAA,EACAC,aAAA,EACAC,iBAAA,EACAC,cAAA,EACAC,gBAAA,EACAC,eAAA,CACD","ignoreList":[]}
@@ -1,19 +0,0 @@
1
- import type { SerializedEditorState, SerializedLexicalNode, SerializedParagraphNode, SerializedTextNode } from 'lexical';
2
- import type { LexicalPluginNodeConverter, PayloadPluginLexicalData } from './types.js';
3
- export declare function convertLexicalPluginToLexical({ converters, lexicalPluginData, quiet, }: {
4
- converters: LexicalPluginNodeConverter[];
5
- lexicalPluginData: PayloadPluginLexicalData;
6
- quiet?: boolean;
7
- }): SerializedEditorState;
8
- export declare function convertLexicalPluginNodesToLexical({ converters, lexicalPluginNodes, parentNodeType, quiet, }: {
9
- converters: LexicalPluginNodeConverter[];
10
- lexicalPluginNodes: SerializedLexicalNode[] | undefined;
11
- /**
12
- * Type of the parent lexical node (not the type of the original, parent payload-plugin-lexical type)
13
- */
14
- parentNodeType: string;
15
- quiet?: boolean;
16
- }): SerializedLexicalNode[];
17
- export declare function convertParagraphNode(converters: LexicalPluginNodeConverter[], node: SerializedLexicalNode, quiet?: boolean): SerializedParagraphNode;
18
- export declare function convertTextNode(node: SerializedLexicalNode): SerializedTextNode;
19
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/migrations/lexicalPluginToLexical/converter/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,kBAAkB,EACnB,MAAM,SAAS,CAAA;AAEhB,OAAO,KAAK,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AAEtF,wBAAgB,6BAA6B,CAAC,EAC5C,UAAU,EACV,iBAAiB,EACjB,KAAK,GACN,EAAE;IACD,UAAU,EAAE,0BAA0B,EAAE,CAAA;IACxC,iBAAiB,EAAE,wBAAwB,CAAA;IAC3C,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,GAAG,qBAAqB,CAgBxB;AAED,wBAAgB,kCAAkC,CAAC,EACjD,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,KAAK,GACN,EAAE;IACD,UAAU,EAAE,0BAA0B,EAAE,CAAA;IACxC,kBAAkB,EAAE,qBAAqB,EAAE,GAAG,SAAS,CAAA;IACvD;;OAEG;IACH,cAAc,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,GAAG,qBAAqB,EAAE,CA4C1B;AAED,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,0BAA0B,EAAE,EACxC,IAAI,EAAE,qBAAqB,EAC3B,KAAK,CAAC,EAAE,OAAO,GACd,uBAAuB,CAazB;AACD,wBAAgB,eAAe,CAAC,IAAI,EAAE,qBAAqB,GAAG,kBAAkB,CAE/E"}
@@ -1,78 +0,0 @@
1
- export function convertLexicalPluginToLexical({
2
- converters,
3
- lexicalPluginData,
4
- quiet
5
- }) {
6
- return {
7
- root: {
8
- type: 'root',
9
- children: convertLexicalPluginNodesToLexical({
10
- converters,
11
- lexicalPluginNodes: lexicalPluginData?.jsonContent?.root?.children || [],
12
- parentNodeType: 'root',
13
- quiet
14
- }),
15
- direction: lexicalPluginData?.jsonContent?.root?.direction || 'ltr',
16
- format: lexicalPluginData?.jsonContent?.root?.format || '',
17
- indent: lexicalPluginData?.jsonContent?.root?.indent || 0,
18
- version: 1
19
- }
20
- };
21
- }
22
- export function convertLexicalPluginNodesToLexical({
23
- converters,
24
- lexicalPluginNodes,
25
- parentNodeType,
26
- quiet
27
- }) {
28
- if (!lexicalPluginNodes?.length || !converters?.length) {
29
- return [];
30
- }
31
- const unknownConverter = converters.find(converter => converter.nodeTypes.includes('unknown'));
32
- // @ts-expect-error - vestiges of the migration to strict mode. Probably not important enough in this file to fix
33
- return lexicalPluginNodes.map((lexicalPluginNode, i) => {
34
- if (lexicalPluginNode.type === 'paragraph') {
35
- return convertParagraphNode(converters, lexicalPluginNode, quiet);
36
- }
37
- if (lexicalPluginNode.type === 'text' || !lexicalPluginNode.type) {
38
- return convertTextNode(lexicalPluginNode);
39
- }
40
- const converter = converters.find(converter => converter.nodeTypes.includes(lexicalPluginNode.type));
41
- if (converter) {
42
- return converter.converter({
43
- childIndex: i,
44
- converters,
45
- lexicalPluginNode,
46
- parentNodeType,
47
- quiet
48
- });
49
- }
50
- if (!quiet) {
51
- console.warn('lexicalPluginToLexical > No converter found for node type: ' + lexicalPluginNode.type);
52
- }
53
- return unknownConverter?.converter({
54
- childIndex: i,
55
- converters,
56
- lexicalPluginNode,
57
- parentNodeType,
58
- quiet
59
- });
60
- }) || [];
61
- }
62
- export function convertParagraphNode(converters, node, quiet) {
63
- return {
64
- ...node,
65
- type: 'paragraph',
66
- children: convertLexicalPluginNodesToLexical({
67
- converters,
68
- lexicalPluginNodes: node.children || [],
69
- parentNodeType: 'paragraph',
70
- quiet
71
- }),
72
- version: 1
73
- };
74
- }
75
- export function convertTextNode(node) {
76
- return node;
77
- }
78
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["convertLexicalPluginToLexical","converters","lexicalPluginData","quiet","root","type","children","convertLexicalPluginNodesToLexical","lexicalPluginNodes","jsonContent","parentNodeType","direction","format","indent","version","length","unknownConverter","find","converter","nodeTypes","includes","map","lexicalPluginNode","i","convertParagraphNode","convertTextNode","childIndex","console","warn","node"],"sources":["../../../../../src/features/migrations/lexicalPluginToLexical/converter/index.ts"],"sourcesContent":["import type {\n SerializedEditorState,\n SerializedLexicalNode,\n SerializedParagraphNode,\n SerializedTextNode,\n} from 'lexical'\n\nimport type { LexicalPluginNodeConverter, PayloadPluginLexicalData } from './types.js'\n\nexport function convertLexicalPluginToLexical({\n converters,\n lexicalPluginData,\n quiet,\n}: {\n converters: LexicalPluginNodeConverter[]\n lexicalPluginData: PayloadPluginLexicalData\n quiet?: boolean\n}): SerializedEditorState {\n return {\n root: {\n type: 'root',\n children: convertLexicalPluginNodesToLexical({\n converters,\n lexicalPluginNodes: lexicalPluginData?.jsonContent?.root?.children || [],\n parentNodeType: 'root',\n quiet,\n }),\n direction: lexicalPluginData?.jsonContent?.root?.direction || 'ltr',\n format: lexicalPluginData?.jsonContent?.root?.format || '',\n indent: lexicalPluginData?.jsonContent?.root?.indent || 0,\n version: 1,\n },\n }\n}\n\nexport function convertLexicalPluginNodesToLexical({\n converters,\n lexicalPluginNodes,\n parentNodeType,\n quiet,\n}: {\n converters: LexicalPluginNodeConverter[]\n lexicalPluginNodes: SerializedLexicalNode[] | undefined\n /**\n * Type of the parent lexical node (not the type of the original, parent payload-plugin-lexical type)\n */\n parentNodeType: string\n quiet?: boolean\n}): SerializedLexicalNode[] {\n if (!lexicalPluginNodes?.length || !converters?.length) {\n return []\n }\n const unknownConverter = converters.find((converter) => converter.nodeTypes.includes('unknown'))\n // @ts-expect-error - vestiges of the migration to strict mode. Probably not important enough in this file to fix\n return (\n lexicalPluginNodes.map((lexicalPluginNode, i) => {\n if (lexicalPluginNode.type === 'paragraph') {\n return convertParagraphNode(converters, lexicalPluginNode, quiet)\n }\n if (lexicalPluginNode.type === 'text' || !lexicalPluginNode.type) {\n return convertTextNode(lexicalPluginNode)\n }\n\n const converter = converters.find((converter) =>\n converter.nodeTypes.includes(lexicalPluginNode.type),\n )\n\n if (converter) {\n return converter.converter({\n childIndex: i,\n converters,\n lexicalPluginNode,\n parentNodeType,\n quiet,\n })\n }\n\n if (!quiet) {\n console.warn(\n 'lexicalPluginToLexical > No converter found for node type: ' + lexicalPluginNode.type,\n )\n }\n\n return unknownConverter?.converter({\n childIndex: i,\n converters,\n lexicalPluginNode,\n parentNodeType,\n quiet,\n })\n }) || []\n )\n}\n\nexport function convertParagraphNode(\n converters: LexicalPluginNodeConverter[],\n node: SerializedLexicalNode,\n quiet?: boolean,\n): SerializedParagraphNode {\n return {\n ...node,\n type: 'paragraph',\n\n children: convertLexicalPluginNodesToLexical({\n converters,\n lexicalPluginNodes: (node as any).children || [],\n parentNodeType: 'paragraph',\n quiet,\n }),\n version: 1,\n } as SerializedParagraphNode\n}\nexport function convertTextNode(node: SerializedLexicalNode): SerializedTextNode {\n return node as SerializedTextNode\n}\n"],"mappings":"AASA,OAAO,SAASA,8BAA8B;EAC5CC,UAAU;EACVC,iBAAiB;EACjBC;AAAK,CAKN;EACC,OAAO;IACLC,IAAA,EAAM;MACJC,IAAA,EAAM;MACNC,QAAA,EAAUC,kCAAA,CAAmC;QAC3CN,UAAA;QACAO,kBAAA,EAAoBN,iBAAA,EAAmBO,WAAA,EAAaL,IAAA,EAAME,QAAA,IAAY,EAAE;QACxEI,cAAA,EAAgB;QAChBP;MACF;MACAQ,SAAA,EAAWT,iBAAA,EAAmBO,WAAA,EAAaL,IAAA,EAAMO,SAAA,IAAa;MAC9DC,MAAA,EAAQV,iBAAA,EAAmBO,WAAA,EAAaL,IAAA,EAAMQ,MAAA,IAAU;MACxDC,MAAA,EAAQX,iBAAA,EAAmBO,WAAA,EAAaL,IAAA,EAAMS,MAAA,IAAU;MACxDC,OAAA,EAAS;IACX;EACF;AACF;AAEA,OAAO,SAASP,mCAAmC;EACjDN,UAAU;EACVO,kBAAkB;EAClBE,cAAc;EACdP;AAAK,CASN;EACC,IAAI,CAACK,kBAAA,EAAoBO,MAAA,IAAU,CAACd,UAAA,EAAYc,MAAA,EAAQ;IACtD,OAAO,EAAE;EACX;EACA,MAAMC,gBAAA,GAAmBf,UAAA,CAAWgB,IAAI,CAAEC,SAAA,IAAcA,SAAA,CAAUC,SAAS,CAACC,QAAQ,CAAC;EACrF;EACA,OACEZ,kBAAA,CAAmBa,GAAG,CAAC,CAACC,iBAAA,EAAmBC,CAAA;IACzC,IAAID,iBAAA,CAAkBjB,IAAI,KAAK,aAAa;MAC1C,OAAOmB,oBAAA,CAAqBvB,UAAA,EAAYqB,iBAAA,EAAmBnB,KAAA;IAC7D;IACA,IAAImB,iBAAA,CAAkBjB,IAAI,KAAK,UAAU,CAACiB,iBAAA,CAAkBjB,IAAI,EAAE;MAChE,OAAOoB,eAAA,CAAgBH,iBAAA;IACzB;IAEA,MAAMJ,SAAA,GAAYjB,UAAA,CAAWgB,IAAI,CAAEC,SAAA,IACjCA,SAAA,CAAUC,SAAS,CAACC,QAAQ,CAACE,iBAAA,CAAkBjB,IAAI;IAGrD,IAAIa,SAAA,EAAW;MACb,OAAOA,SAAA,CAAUA,SAAS,CAAC;QACzBQ,UAAA,EAAYH,CAAA;QACZtB,UAAA;QACAqB,iBAAA;QACAZ,cAAA;QACAP;MACF;IACF;IAEA,IAAI,CAACA,KAAA,EAAO;MACVwB,OAAA,CAAQC,IAAI,CACV,gEAAgEN,iBAAA,CAAkBjB,IAAI;IAE1F;IAEA,OAAOW,gBAAA,EAAkBE,SAAA,CAAU;MACjCQ,UAAA,EAAYH,CAAA;MACZtB,UAAA;MACAqB,iBAAA;MACAZ,cAAA;MACAP;IACF;EACF,MAAM,EAAE;AAEZ;AAEA,OAAO,SAASqB,qBACdvB,UAAwC,EACxC4B,IAA2B,EAC3B1B,KAAe;EAEf,OAAO;IACL,GAAG0B,IAAI;IACPxB,IAAA,EAAM;IAENC,QAAA,EAAUC,kCAAA,CAAmC;MAC3CN,UAAA;MACAO,kBAAA,EAAoBqB,IAAC,CAAavB,QAAQ,IAAI,EAAE;MAChDI,cAAA,EAAgB;MAChBP;IACF;IACAW,OAAA,EAAS;EACX;AACF;AACA,OAAO,SAASW,gBAAgBI,IAA2B;EACzD,OAAOA,IAAA;AACT","ignoreList":[]}
@@ -1,23 +0,0 @@
1
- import type { SerializedEditorState, SerializedLexicalNode } from 'lexical';
2
- export type LexicalPluginNodeConverter<T extends SerializedLexicalNode = SerializedLexicalNode> = {
3
- converter: ({ childIndex, converters, lexicalPluginNode, parentNodeType, }: {
4
- childIndex: number;
5
- converters: LexicalPluginNodeConverter[];
6
- lexicalPluginNode: {
7
- children?: SerializedLexicalNode[];
8
- } & SerializedLexicalNode;
9
- parentNodeType: string;
10
- quiet?: boolean;
11
- }) => T;
12
- nodeTypes: string[];
13
- };
14
- export type PayloadPluginLexicalData = {
15
- characters: number;
16
- comments: unknown[];
17
- html?: string;
18
- jsonContent: SerializedEditorState;
19
- markdown?: string;
20
- preview: string;
21
- words: number;
22
- };
23
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/features/migrations/lexicalPluginToLexical/converter/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAE3E,MAAM,MAAM,0BAA0B,CAAC,CAAC,SAAS,qBAAqB,GAAG,qBAAqB,IAAI;IAChG,SAAS,EAAE,CAAC,EACV,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,cAAc,GACf,EAAE;QACD,UAAU,EAAE,MAAM,CAAA;QAClB,UAAU,EAAE,0BAA0B,EAAE,CAAA;QACxC,iBAAiB,EAAE;YAAE,QAAQ,CAAC,EAAE,qBAAqB,EAAE,CAAA;SAAE,GAAG,qBAAqB,CAAA;QACjF,cAAc,EAAE,MAAM,CAAA;QACtB,KAAK,CAAC,EAAE,OAAO,CAAA;KAChB,KAAK,CAAC,CAAA;IACP,SAAS,EAAE,MAAM,EAAE,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,qBAAqB,CAAA;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;CACd,CAAA"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../../../src/features/migrations/lexicalPluginToLexical/converter/types.ts"],"sourcesContent":["import type { SerializedEditorState, SerializedLexicalNode } from 'lexical'\n\nexport type LexicalPluginNodeConverter<T extends SerializedLexicalNode = SerializedLexicalNode> = {\n converter: ({\n childIndex,\n converters,\n lexicalPluginNode,\n parentNodeType,\n }: {\n childIndex: number\n converters: LexicalPluginNodeConverter[]\n lexicalPluginNode: { children?: SerializedLexicalNode[] } & SerializedLexicalNode\n parentNodeType: string\n quiet?: boolean\n }) => T\n nodeTypes: string[]\n}\n\nexport type PayloadPluginLexicalData = {\n characters: number\n comments: unknown[]\n html?: string\n jsonContent: SerializedEditorState\n markdown?: string\n preview: string\n words: number\n}\n"],"mappings":"AAkBA","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- export declare const LexicalPluginToLexicalFeatureClient: import("../../typesClient.js").FeatureProviderProviderClient<undefined, undefined>;
2
- //# sourceMappingURL=feature.client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/features/migrations/lexicalPluginToLexical/feature.client.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,mCAAmC,oFAI9C,CAAA"}
@@ -1,10 +0,0 @@
1
- 'use client';
2
-
3
- import { createClientFeature } from '../../../utilities/createClientFeature.js';
4
- import { UnknownConvertedNode } from './nodes/unknownConvertedNode/index.js';
5
- export const LexicalPluginToLexicalFeatureClient = createClientFeature(() => {
6
- return {
7
- nodes: [UnknownConvertedNode]
8
- };
9
- });
10
- //# sourceMappingURL=feature.client.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"feature.client.js","names":["createClientFeature","UnknownConvertedNode","LexicalPluginToLexicalFeatureClient","nodes"],"sources":["../../../../src/features/migrations/lexicalPluginToLexical/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { UnknownConvertedNode } from './nodes/unknownConvertedNode/index.js'\n\nexport const LexicalPluginToLexicalFeatureClient = createClientFeature(() => {\n return {\n nodes: [UnknownConvertedNode],\n }\n})\n"],"mappings":"AAAA;;AAEA,SAASA,mBAAmB,QAAQ;AACpC,SAASC,oBAAoB,QAAQ;AAErC,OAAO,MAAMC,mCAAA,GAAsCF,mBAAA,CAAoB;EACrE,OAAO;IACLG,KAAA,EAAO,CAACF,oBAAA;EACV;AACF","ignoreList":[]}
@@ -1,10 +0,0 @@
1
- import type { LexicalPluginNodeConverter } from './converter/types.js';
2
- export type LexicalPluginToLexicalFeatureProps = {
3
- converters?: (({ defaultConverters, }: {
4
- defaultConverters: LexicalPluginNodeConverter[];
5
- }) => LexicalPluginNodeConverter[]) | LexicalPluginNodeConverter[];
6
- disableHooks?: boolean;
7
- quiet?: boolean;
8
- };
9
- export declare const LexicalPluginToLexicalFeature: import("../../typesServer.js").FeatureProviderProviderServer<LexicalPluginToLexicalFeatureProps, LexicalPluginToLexicalFeatureProps, undefined>;
10
- //# sourceMappingURL=feature.server.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/features/migrations/lexicalPluginToLexical/feature.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAA4B,MAAM,sBAAsB,CAAA;AAOhG,MAAM,MAAM,kCAAkC,GAAG;IAC/C,UAAU,CAAC,EACP,CAAC,CAAC,EACA,iBAAiB,GAClB,EAAE;QACD,iBAAiB,EAAE,0BAA0B,EAAE,CAAA;KAChD,KAAK,0BAA0B,EAAE,CAAC,GACnC,0BAA0B,EAAE,CAAA;IAChC,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,6BAA6B,iJAiDtC,CAAA"}
@@ -1,49 +0,0 @@
1
- import { createServerFeature } from '../../../utilities/createServerFeature.js';
2
- import { defaultConverters } from './converter/defaultConverters.js';
3
- import { convertLexicalPluginToLexical } from './converter/index.js';
4
- import { UnknownConvertedNode } from './nodes/unknownConvertedNode/index.js';
5
- export const LexicalPluginToLexicalFeature = createServerFeature({
6
- feature: ({
7
- props
8
- }) => {
9
- if (!props) {
10
- props = {};
11
- }
12
- let converters = [];
13
- if (props?.converters && typeof props?.converters === 'function') {
14
- converters = props.converters({
15
- defaultConverters
16
- });
17
- } else if (props.converters && typeof props?.converters !== 'function') {
18
- converters = props.converters;
19
- } else {
20
- converters = defaultConverters;
21
- }
22
- props.converters = converters;
23
- return {
24
- ClientFeature: '@payloadcms/richtext-lexical/client#LexicalPluginToLexicalFeatureClient',
25
- hooks: props.disableHooks ? undefined : {
26
- afterRead: [({
27
- value
28
- }) => {
29
- if (!value || !('jsonContent' in value)) {
30
- // incomingEditorState null or not from Lexical Plugin
31
- return value;
32
- }
33
- // Lexical Plugin => convert to lexical
34
- return convertLexicalPluginToLexical({
35
- converters: props.converters,
36
- lexicalPluginData: value,
37
- quiet: props?.quiet
38
- });
39
- }]
40
- },
41
- nodes: [{
42
- node: UnknownConvertedNode
43
- }],
44
- sanitizedServerFeatureProps: props
45
- };
46
- },
47
- key: 'lexicalPluginToLexical'
48
- });
49
- //# sourceMappingURL=feature.server.js.map