@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,31 +1,24 @@
1
1
  'use client';
2
2
 
3
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
4
  import React from 'react';
5
- export const UploadIcon = () => /*#__PURE__*/_jsxs("svg", {
5
+ const path = 'M16.2041 6.01074C17.2128 6.113 18 6.96435 18 8V16L17.9893 16.2041C17.8938 17.1457 17.1457 17.8938 16.2041 17.9893L16 18H8C6.96435 18 6.113 17.2128 6.01074 16.2041L6 16V8C6 6.89543 6.89543 6 8 6H16L16.2041 6.01074ZM8 7C7.44772 7 7 7.44772 7 8V16C7 16.5523 7.44772 17 8 17H16C16.5523 17 17 16.5523 17 16V8C17 7.44772 16.5523 7 16 7H8ZM9.72461 11.582C9.91869 11.4539 10.1827 11.4756 10.3535 11.6465L13.8535 15.1465C14.0488 15.3417 14.0488 15.6583 13.8535 15.8535C13.6583 16.0488 13.3417 16.0488 13.1465 15.8535L10 12.707L8.85352 13.8535C8.65825 14.0488 8.34175 14.0488 8.14648 13.8535C7.95122 13.6583 7.95122 13.3417 8.14648 13.1465L9.64648 11.6465L9.72461 11.582ZM14 8C15.1046 8 16 8.89543 16 10C16 11.1046 15.1046 12 14 12C12.8954 12 12 11.1046 12 10C12 8.89543 12.8954 8 14 8ZM14 9C13.4477 9 13 9.44772 13 10C13 10.5523 13.4477 11 14 11C14.5523 11 15 10.5523 15 10C15 9.44772 14.5523 9 14 9Z';
6
+ export const UploadIcon = ({
7
+ className
8
+ }) => /*#__PURE__*/_jsx("svg", {
6
9
  "aria-hidden": "true",
7
- className: "icon",
10
+ className: ['icon', className].filter(Boolean).join(' '),
8
11
  fill: "none",
9
12
  focusable: "false",
10
- height: "20",
11
- viewBox: "0 0 20 20",
12
- width: "20",
13
+ height: 24,
14
+ viewBox: "0 0 24 24",
15
+ width: 24,
13
16
  xmlns: "http://www.w3.org/2000/svg",
14
- children: [/*#__PURE__*/_jsx("path", {
15
- d: "M14.6667 4H5.33333C4.59695 4 4 4.59695 4 5.33333V14.6667C4 15.403 4.59695 16 5.33333 16H14.6667C15.403 16 16 15.403 16 14.6667V5.33333C16 4.59695 15.403 4 14.6667 4Z",
16
- stroke: "currentColor",
17
- strokeLinecap: "round",
18
- strokeLinejoin: "round"
19
- }), /*#__PURE__*/_jsx("path", {
20
- d: "M7.99984 9.33366C8.73622 9.33366 9.33317 8.73671 9.33317 8.00033C9.33317 7.26395 8.73622 6.66699 7.99984 6.66699C7.26346 6.66699 6.6665 7.26395 6.6665 8.00033C6.6665 8.73671 7.26346 9.33366 7.99984 9.33366Z",
21
- stroke: "currentColor",
22
- strokeLinecap: "round",
23
- strokeLinejoin: "round"
24
- }), /*#__PURE__*/_jsx("path", {
25
- d: "M16 11.9995L13.9427 9.94214C13.6926 9.69218 13.3536 9.55176 13 9.55176C12.6464 9.55176 12.3074 9.69218 12.0573 9.94214L6 15.9995",
26
- stroke: "currentColor",
27
- strokeLinecap: "round",
28
- strokeLinejoin: "round"
29
- })]
17
+ children: /*#__PURE__*/_jsx("path", {
18
+ clipRule: "evenodd",
19
+ d: path,
20
+ fill: "currentColor",
21
+ fillRule: "evenodd"
22
+ })
30
23
  });
31
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","UploadIcon","_jsxs","className","fill","focusable","height","viewBox","width","xmlns","_jsx","d","stroke","strokeLinecap","strokeLinejoin"],"sources":["../../../../../src/lexical/ui/icons/Upload/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nexport const UploadIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"icon\"\n fill=\"none\"\n focusable=\"false\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M14.6667 4H5.33333C4.59695 4 4 4.59695 4 5.33333V14.6667C4 15.403 4.59695 16 5.33333 16H14.6667C15.403 16 16 15.403 16 14.6667V5.33333C16 4.59695 15.403 4 14.6667 4Z\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <path\n d=\"M7.99984 9.33366C8.73622 9.33366 9.33317 8.73671 9.33317 8.00033C9.33317 7.26395 8.73622 6.66699 7.99984 6.66699C7.26346 6.66699 6.6665 7.26395 6.6665 8.00033C6.6665 8.73671 7.26346 9.33366 7.99984 9.33366Z\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <path\n d=\"M16 11.9995L13.9427 9.94214C13.6926 9.69218 13.3536 9.55176 13 9.55176C12.6464 9.55176 12.3074 9.69218 12.0573 9.94214L6 15.9995\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n)\n"],"mappings":"AAAA;;;AACA,OAAOA,KAAA,MAAW;AAElB,OAAO,MAAMC,UAAA,GAAuBA,CAAA,kBAClCC,KAAA,CAAC;EACC,eAAY;EACZC,SAAA,EAAU;EACVC,IAAA,EAAK;EACLC,SAAA,EAAU;EACVC,MAAA,EAAO;EACPC,OAAA,EAAQ;EACRC,KAAA,EAAM;EACNC,KAAA,EAAM;0BAENC,IAAA,CAAC;IACCC,CAAA,EAAE;IACFC,MAAA,EAAO;IACPC,aAAA,EAAc;IACdC,cAAA,EAAe;mBAEjBJ,IAAA,CAAC;IACCC,CAAA,EAAE;IACFC,MAAA,EAAO;IACPC,aAAA,EAAc;IACdC,cAAA,EAAe;mBAEjBJ,IAAA,CAAC;IACCC,CAAA,EAAE;IACFC,MAAA,EAAO;IACPC,aAAA,EAAc;IACdC,cAAA,EAAe","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","path","UploadIcon","className","_jsx","filter","Boolean","join","fill","focusable","height","viewBox","width","xmlns","clipRule","d","fillRule"],"sources":["../../../../../src/lexical/ui/icons/Upload/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nconst path =\n 'M16.2041 6.01074C17.2128 6.113 18 6.96435 18 8V16L17.9893 16.2041C17.8938 17.1457 17.1457 17.8938 16.2041 17.9893L16 18H8C6.96435 18 6.113 17.2128 6.01074 16.2041L6 16V8C6 6.89543 6.89543 6 8 6H16L16.2041 6.01074ZM8 7C7.44772 7 7 7.44772 7 8V16C7 16.5523 7.44772 17 8 17H16C16.5523 17 17 16.5523 17 16V8C17 7.44772 16.5523 7 16 7H8ZM9.72461 11.582C9.91869 11.4539 10.1827 11.4756 10.3535 11.6465L13.8535 15.1465C14.0488 15.3417 14.0488 15.6583 13.8535 15.8535C13.6583 16.0488 13.3417 16.0488 13.1465 15.8535L10 12.707L8.85352 13.8535C8.65825 14.0488 8.34175 14.0488 8.14648 13.8535C7.95122 13.6583 7.95122 13.3417 8.14648 13.1465L9.64648 11.6465L9.72461 11.582ZM14 8C15.1046 8 16 8.89543 16 10C16 11.1046 15.1046 12 14 12C12.8954 12 12 11.1046 12 10C12 8.89543 12.8954 8 14 8ZM14 9C13.4477 9 13 9.44772 13 10C13 10.5523 13.4477 11 14 11C14.5523 11 15 10.5523 15 10C15 9.44772 14.5523 9 14 9Z'\n\nexport const UploadIcon: React.FC<{\n readonly className?: string\n}> = ({ className }) => (\n <svg\n aria-hidden=\"true\"\n className={['icon', className].filter(Boolean).join(' ')}\n fill=\"none\"\n focusable=\"false\"\n height={24}\n viewBox=\"0 0 24 24\"\n width={24}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path clipRule=\"evenodd\" d={path} fill=\"currentColor\" fillRule=\"evenodd\" />\n </svg>\n)\n"],"mappings":"AAAA;;;AACA,OAAOA,KAAA,MAAW;AAElB,MAAMC,IAAA,GACJ;AAEF,OAAO,MAAMC,UAAA,GAERA,CAAC;EAAEC;AAAS,CAAE,kBACjBC,IAAA,CAAC;EACC,eAAY;EACZD,SAAA,EAAW,CAAC,QAAQA,SAAA,CAAU,CAACE,MAAM,CAACC,OAAA,EAASC,IAAI,CAAC;EACpDC,IAAA,EAAK;EACLC,SAAA,EAAU;EACVC,MAAA,EAAQ;EACRC,OAAA,EAAQ;EACRC,KAAA,EAAO;EACPC,KAAA,EAAM;YAEN,aAAAT,IAAA,CAAC;IAAKU,QAAA,EAAS;IAAUC,CAAA,EAAGd,IAAA;IAAMO,IAAA,EAAK;IAAeQ,QAAA,EAAS","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"buildEditorState.d.ts","sourceRoot":"","sources":["../../src/utilities/buildEditorState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEpD,OAAO,KAAK,EAAE,gBAAgB,EAA2B,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAElG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,qBAAqB,EAAE,EAChE,KAAK,EACL,IAAI,GACL,EAAE;IACD,KAAK,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,CAAA;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAyCtB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,EAAE,OAAO,gBAAgB,CAAC,gBAAgB,CAC1C,CAAA"}
1
+ {"version":3,"file":"buildEditorState.d.ts","sourceRoot":"","sources":["../../src/utilities/buildEditorState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEpD,OAAO,KAAK,EAAE,gBAAgB,EAA2B,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAElG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,qBAAqB,EAAE,EAChE,KAAK,EACL,IAAI,GACL,EAAE;IACD,KAAK,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,CAAA;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAuDtB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,EAAE,OAAO,gBAAgB,CAAC,gBAAgB,CAC1C,CAAA"}
@@ -72,6 +72,19 @@
72
72
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
73
73
  editorJSON.root.children.push(...nodes);
74
74
  }
75
+ if (editorJSON.root.children.length === 0) {
76
+ // An error will be thrown if the root node has no children
77
+ editorJSON.root.children.push({
78
+ type: 'paragraph',
79
+ children: [],
80
+ direction: 'ltr',
81
+ format: '',
82
+ indent: 0,
83
+ textFormat: 0,
84
+ textStyle: '',
85
+ version: 1
86
+ });
87
+ }
75
88
  return editorJSON;
76
89
  }
77
90
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"buildEditorState.js","names":["buildEditorState","nodes","text","editorJSON","root","type","children","direction","format","indent","version","push","detail","mode","style","textFormat","textStyle","length","buildDefaultEditorState"],"sources":["../../src/utilities/buildEditorState.ts"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\nimport type { DefaultNodeTypes, DefaultTypedEditorState, TypedEditorState } from '../nodeTypes.js'\n\n/**\n * Helper to build lexical editor state JSON from text and/or nodes.\n *\n * @param nodes - The nodes to include in the editor state. If you pass the `text` argument, this will append your nodes after the first paragraph node.\n * @param text - The text content to include in the editor state. This will create a paragraph node with a text node for you and set that as the first node.\n * @returns The constructed editor state JSON.\n *\n * @example\n *\n * just passing text:\n *\n * ```ts\n * const editorState = buildEditorState<DefaultNodeTypes>({ text: 'Hello world' }) // result typed as DefaultTypedEditorState\n * ```\n *\n * @example\n *\n * passing nodes:\n *\n * ```ts\n * const editorState = // result typed as TypedEditorState<DefaultNodeTypes | SerializedBlockNode> (or TypedEditorState<SerializedBlockNode>)\n * buildEditorState<DefaultNodeTypes | SerializedBlockNode>({ // or just buildEditorState<SerializedBlockNode> if you *only* want to allow block nodes\n * nodes: [\n * {\n * type: 'block',\n * fields: {\n * id: 'id',\n * blockName: 'Cool block',\n * blockType: 'myBlock',\n * },\n * format: 'left',\n * version: 1,\n * }\n * ],\n * })\n * ```\n */\nexport function buildEditorState<T extends SerializedLexicalNode>({\n nodes,\n text,\n}: {\n nodes?: TypedEditorState<T>['root']['children']\n text?: string\n}): TypedEditorState<T> {\n const editorJSON: DefaultTypedEditorState = {\n root: {\n type: 'root',\n children: [],\n direction: 'ltr',\n format: '',\n indent: 0,\n version: 1,\n },\n }\n\n if (text) {\n editorJSON.root.children.push({\n type: 'paragraph',\n children: [\n {\n type: 'text',\n detail: 0,\n format: 0,\n mode: 'normal',\n style: '',\n text,\n version: 1,\n },\n ],\n direction: 'ltr',\n format: '',\n indent: 0,\n textFormat: 0,\n textStyle: '',\n version: 1,\n })\n }\n\n if (nodes?.length) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n editorJSON.root.children.push(...(nodes as any))\n }\n\n return editorJSON as TypedEditorState<T>\n}\n\n/**\n *\n * Alias for `buildEditorState<DefaultNodeTypes>`\n *\n * @experimental this API may change or be removed in a minor release\n * @internal\n */\nexport const buildDefaultEditorState: typeof buildEditorState<DefaultNodeTypes> =\n buildEditorState<DefaultNodeTypes>\n"],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCA,OAAO,SAASA,iBAAkD;EAChEC,KAAK;EACLC;AAAI,CAIL;EACC,MAAMC,UAAA,GAAsC;IAC1CC,IAAA,EAAM;MACJC,IAAA,EAAM;MACNC,QAAA,EAAU,EAAE;MACZC,SAAA,EAAW;MACXC,MAAA,EAAQ;MACRC,MAAA,EAAQ;MACRC,OAAA,EAAS;IACX;EACF;EAEA,IAAIR,IAAA,EAAM;IACRC,UAAA,CAAWC,IAAI,CAACE,QAAQ,CAACK,IAAI,CAAC;MAC5BN,IAAA,EAAM;MACNC,QAAA,EAAU,CACR;QACED,IAAA,EAAM;QACNO,MAAA,EAAQ;QACRJ,MAAA,EAAQ;QACRK,IAAA,EAAM;QACNC,KAAA,EAAO;QACPZ,IAAA;QACAQ,OAAA,EAAS;MACX,EACD;MACDH,SAAA,EAAW;MACXC,MAAA,EAAQ;MACRC,MAAA,EAAQ;MACRM,UAAA,EAAY;MACZC,SAAA,EAAW;MACXN,OAAA,EAAS;IACX;EACF;EAEA,IAAIT,KAAA,EAAOgB,MAAA,EAAQ;IACjB;IACAd,UAAA,CAAWC,IAAI,CAACE,QAAQ,CAACK,IAAI,IAAKV,KAAA;EACpC;EAEA,OAAOE,UAAA;AACT;AAEA;;;;;;;AAOA,OAAO,MAAMe,uBAAA,GACXlB,gBAAA","ignoreList":[]}
1
+ {"version":3,"file":"buildEditorState.js","names":["buildEditorState","nodes","text","editorJSON","root","type","children","direction","format","indent","version","push","detail","mode","style","textFormat","textStyle","length","buildDefaultEditorState"],"sources":["../../src/utilities/buildEditorState.ts"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\nimport type { DefaultNodeTypes, DefaultTypedEditorState, TypedEditorState } from '../nodeTypes.js'\n\n/**\n * Helper to build lexical editor state JSON from text and/or nodes.\n *\n * @param nodes - The nodes to include in the editor state. If you pass the `text` argument, this will append your nodes after the first paragraph node.\n * @param text - The text content to include in the editor state. This will create a paragraph node with a text node for you and set that as the first node.\n * @returns The constructed editor state JSON.\n *\n * @example\n *\n * just passing text:\n *\n * ```ts\n * const editorState = buildEditorState<DefaultNodeTypes>({ text: 'Hello world' }) // result typed as DefaultTypedEditorState\n * ```\n *\n * @example\n *\n * passing nodes:\n *\n * ```ts\n * const editorState = // result typed as TypedEditorState<DefaultNodeTypes | SerializedBlockNode> (or TypedEditorState<SerializedBlockNode>)\n * buildEditorState<DefaultNodeTypes | SerializedBlockNode>({ // or just buildEditorState<SerializedBlockNode> if you *only* want to allow block nodes\n * nodes: [\n * {\n * type: 'block',\n * fields: {\n * id: 'id',\n * blockName: 'Cool block',\n * blockType: 'myBlock',\n * },\n * format: 'left',\n * version: 1,\n * }\n * ],\n * })\n * ```\n */\nexport function buildEditorState<T extends SerializedLexicalNode>({\n nodes,\n text,\n}: {\n nodes?: TypedEditorState<T>['root']['children']\n text?: string\n}): TypedEditorState<T> {\n const editorJSON: DefaultTypedEditorState = {\n root: {\n type: 'root',\n children: [],\n direction: 'ltr',\n format: '',\n indent: 0,\n version: 1,\n },\n }\n\n if (text) {\n editorJSON.root.children.push({\n type: 'paragraph',\n children: [\n {\n type: 'text',\n detail: 0,\n format: 0,\n mode: 'normal',\n style: '',\n text,\n version: 1,\n },\n ],\n direction: 'ltr',\n format: '',\n indent: 0,\n textFormat: 0,\n textStyle: '',\n version: 1,\n })\n }\n\n if (nodes?.length) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n editorJSON.root.children.push(...(nodes as any))\n }\n\n if (editorJSON.root.children.length === 0) {\n // An error will be thrown if the root node has no children\n editorJSON.root.children.push({\n type: 'paragraph',\n children: [],\n direction: 'ltr',\n format: '',\n indent: 0,\n textFormat: 0,\n textStyle: '',\n version: 1,\n })\n }\n\n return editorJSON as TypedEditorState<T>\n}\n\n/**\n *\n * Alias for `buildEditorState<DefaultNodeTypes>`\n *\n * @experimental this API may change or be removed in a minor release\n * @internal\n */\nexport const buildDefaultEditorState: typeof buildEditorState<DefaultNodeTypes> =\n buildEditorState<DefaultNodeTypes>\n"],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCA,OAAO,SAASA,iBAAkD;EAChEC,KAAK;EACLC;AAAI,CAIL;EACC,MAAMC,UAAA,GAAsC;IAC1CC,IAAA,EAAM;MACJC,IAAA,EAAM;MACNC,QAAA,EAAU,EAAE;MACZC,SAAA,EAAW;MACXC,MAAA,EAAQ;MACRC,MAAA,EAAQ;MACRC,OAAA,EAAS;IACX;EACF;EAEA,IAAIR,IAAA,EAAM;IACRC,UAAA,CAAWC,IAAI,CAACE,QAAQ,CAACK,IAAI,CAAC;MAC5BN,IAAA,EAAM;MACNC,QAAA,EAAU,CACR;QACED,IAAA,EAAM;QACNO,MAAA,EAAQ;QACRJ,MAAA,EAAQ;QACRK,IAAA,EAAM;QACNC,KAAA,EAAO;QACPZ,IAAA;QACAQ,OAAA,EAAS;MACX,EACD;MACDH,SAAA,EAAW;MACXC,MAAA,EAAQ;MACRC,MAAA,EAAQ;MACRM,UAAA,EAAY;MACZC,SAAA,EAAW;MACXN,OAAA,EAAS;IACX;EACF;EAEA,IAAIT,KAAA,EAAOgB,MAAA,EAAQ;IACjB;IACAd,UAAA,CAAWC,IAAI,CAACE,QAAQ,CAACK,IAAI,IAAKV,KAAA;EACpC;EAEA,IAAIE,UAAA,CAAWC,IAAI,CAACE,QAAQ,CAACW,MAAM,KAAK,GAAG;IACzC;IACAd,UAAA,CAAWC,IAAI,CAACE,QAAQ,CAACK,IAAI,CAAC;MAC5BN,IAAA,EAAM;MACNC,QAAA,EAAU,EAAE;MACZC,SAAA,EAAW;MACXC,MAAA,EAAQ;MACRC,MAAA,EAAQ;MACRM,UAAA,EAAY;MACZC,SAAA,EAAW;MACXN,OAAA,EAAS;IACX;EACF;EAEA,OAAOP,UAAA;AACT;AAEA;;;;;;;AAOA,OAAO,MAAMe,uBAAA,GACXlB,gBAAA","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/richtext-lexical",
3
- "version": "3.84.1",
3
+ "version": "4.0.0-internal.d28e9fb",
4
4
  "description": "The officially supported Lexical richtext adapter for Payload",
5
5
  "homepage": "https://payloadcms.com",
6
6
  "repository": {
@@ -63,11 +63,6 @@
63
63
  "types": "./dist/exports/server/rsc.d.ts",
64
64
  "default": "./dist/exports/server/rsc.js"
65
65
  },
66
- "./migrate": {
67
- "import": "./dist/exports/server/migrate.js",
68
- "types": "./dist/exports/server/migrate.d.ts",
69
- "default": "./dist/exports/server/migrate.js"
70
- },
71
66
  "./lexical": {
72
67
  "import": "./dist/lexical-proxy/lexical.js",
73
68
  "types": "./dist/lexical-proxy/lexical.d.ts",
@@ -377,9 +372,9 @@
377
372
  "qs-esm": "8.0.1",
378
373
  "react-error-boundary": "4.1.2",
379
374
  "ts-essentials": "10.0.3",
380
- "uuid": "11.1.0",
381
- "@payloadcms/translations": "3.84.1",
382
- "@payloadcms/ui": "3.84.1"
375
+ "uuid": "14.0.0",
376
+ "@payloadcms/translations": "4.0.0-internal.d28e9fb",
377
+ "@payloadcms/ui": "4.0.0-internal.d28e9fb"
383
378
  },
384
379
  "devDependencies": {
385
380
  "@babel/cli": "7.27.2",
@@ -390,8 +385,8 @@
390
385
  "@lexical/eslint-plugin": "0.41.0",
391
386
  "@types/escape-html": "1.0.4",
392
387
  "@types/json-schema": "7.0.15",
393
- "@types/node": "22.15.30",
394
- "@types/react": "19.2.9",
388
+ "@types/node": "24.12.3",
389
+ "@types/react": "19.2.14",
395
390
  "@types/react-dom": "19.2.3",
396
391
  "babel-plugin-react-compiler": "19.1.0-rc.3",
397
392
  "babel-plugin-transform-remove-imports": "^1.8.0",
@@ -399,18 +394,18 @@
399
394
  "esbuild-sass-plugin": "3.3.1",
400
395
  "swc-plugin-transform-remove-imports": "8.3.0",
401
396
  "@payloadcms/eslint-config": "3.28.0",
402
- "payload": "3.84.1"
397
+ "payload": "4.0.0-internal.d28e9fb"
403
398
  },
404
399
  "peerDependencies": {
405
400
  "@faceless-ui/modal": "3.0.0",
406
401
  "@faceless-ui/scroll-info": "2.0.0",
407
402
  "react": "^19.0.1 || ^19.1.2 || ^19.2.1",
408
403
  "react-dom": "^19.0.1 || ^19.1.2 || ^19.2.1",
409
- "@payloadcms/next": "3.84.1",
410
- "payload": "3.84.1"
404
+ "@payloadcms/next": "4.0.0-internal.d28e9fb",
405
+ "payload": "4.0.0-internal.d28e9fb"
411
406
  },
412
407
  "engines": {
413
- "node": "^18.20.2 || >=20.9.0"
408
+ "node": ">=24.15.0"
414
409
  },
415
410
  "publishConfig": {
416
411
  "registry": "https://registry.npmjs.org/"
@@ -1,2 +0,0 @@
1
- "use client";import{jsx as o,jsxs as t}from"react/jsx-runtime";import"react";var c=n=>{let{data:e}=n;return t("div",{children:["Unknown converted Slate node: ",o("strong",{children:e?.nodeType})]})};export{c as UnknownConvertedNodeComponent};
2
- //# sourceMappingURL=Component-DOSSWC76.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.tsx"],
4
- "sourcesContent": ["'use client'\nimport React from 'react'\n\nimport type { UnknownConvertedNodeData } from './index.js'\n\nimport './index.scss'\n\ntype Props = {\n data: UnknownConvertedNodeData\n}\n\nexport const UnknownConvertedNodeComponent: React.FC<Props> = (props) => {\n const { data } = props\n\n return (\n <div>\n Unknown converted Slate node: <strong>{data?.nodeType}</strong>\n </div>\n )\n}\n"],
5
- "mappings": "+DACA,MAAkB,QAUX,IAAMA,EAAkDC,GAAA,CAC7D,GAAM,CAAEC,KAAAA,CAAI,EAAKD,EAEjB,OACEE,EAAC,MAAA,WAAI,iCAC2BC,EAAC,SAAA,UAAQF,GAAMG,aAGnD",
6
- "names": ["UnknownConvertedNodeComponent", "props", "data", "_jsxs", "_jsx", "nodeType"]
7
- }
@@ -1,2 +0,0 @@
1
- "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import"react";var a=n=>{let{data:o}=n;return t("div",{children:["Unknown converted payload-plugin-lexical node: ",e("strong",{children:o?.nodeType})]})};export{a as UnknownConvertedNodeComponent};
2
- //# sourceMappingURL=Component-MBLHTKDK.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.tsx"],
4
- "sourcesContent": ["'use client'\nimport React from 'react'\n\nimport type { UnknownConvertedNodeData } from './index.js'\n\nimport './index.scss'\n\ntype Props = {\n data: UnknownConvertedNodeData\n}\n\nexport const UnknownConvertedNodeComponent: React.FC<Props> = (props) => {\n const { data } = props\n\n return (\n <div>\n Unknown converted payload-plugin-lexical node: <strong>{data?.nodeType}</strong>\n </div>\n )\n}\n"],
5
- "mappings": "+DACA,MAAkB,QAUX,IAAMA,EAAkDC,GAAA,CAC7D,GAAM,CAAEC,KAAAA,CAAI,EAAKD,EAEjB,OACEE,EAAC,MAAA,WAAI,kDAC4CC,EAAC,SAAA,UAAQF,GAAMG,aAGpE",
6
- "names": ["UnknownConvertedNodeComponent", "props", "data", "_jsxs", "_jsx", "nodeType"]
7
- }