@payloadcms/richtext-lexical 3.0.0-beta.53 → 3.0.0-beta.55

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 (727) hide show
  1. package/dist/cell/index.d.ts.map +1 -1
  2. package/dist/cell/index.js +1 -1
  3. package/dist/cell/index.js.map +1 -1
  4. package/dist/exports/client/Field-XBUN6QOM.js +2 -0
  5. package/dist/exports/client/Field-XBUN6QOM.js.map +7 -0
  6. package/dist/exports/client/{RelationshipComponent-5OU5HATX.js → RelationshipComponent-AFXEJMZQ.js} +2 -2
  7. package/dist/exports/client/bundled.css +1 -1
  8. package/dist/exports/client/{chunk-QU5MKT75.js → chunk-5RJS5YZT.js} +2 -2
  9. package/dist/exports/client/chunk-5RJS5YZT.js.map +7 -0
  10. package/dist/exports/client/chunk-JIP5PWU3.js +2 -0
  11. package/dist/exports/client/chunk-JIP5PWU3.js.map +7 -0
  12. package/dist/exports/client/{chunk-MLIITFAS.js → chunk-Q5DYR7MH.js} +2 -2
  13. package/dist/exports/client/chunk-Q5DYR7MH.js.map +7 -0
  14. package/dist/exports/client/{chunk-OSR74ZNW.js → chunk-YL52LJO3.js} +2 -2
  15. package/dist/exports/client/chunk-YL52LJO3.js.map +7 -0
  16. package/dist/exports/client/{component-E2NHAHBC.js → component-F6V63OLD.js} +2 -2
  17. package/dist/exports/client/component-F6V63OLD.js.map +7 -0
  18. package/dist/exports/client/component-PEFMKIXI.js +2 -0
  19. package/dist/exports/client/component-PEFMKIXI.js.map +7 -0
  20. package/dist/exports/client/{component-QWIGEOVD.js → component-VM36FRT2.js} +2 -2
  21. package/dist/exports/client/index.d.ts +37 -27
  22. package/dist/exports/client/index.d.ts.map +1 -1
  23. package/dist/exports/client/index.js +7 -5
  24. package/dist/exports/client/index.js.map +4 -4
  25. package/dist/features/align/feature.client.d.ts +1 -2
  26. package/dist/features/align/feature.client.d.ts.map +1 -1
  27. package/dist/features/align/feature.client.js +9 -16
  28. package/dist/features/align/feature.client.js.map +1 -1
  29. package/dist/features/align/feature.server.d.ts +1 -2
  30. package/dist/features/align/feature.server.d.ts.map +1 -1
  31. package/dist/features/align/feature.server.js +9 -15
  32. package/dist/features/align/feature.server.js.map +1 -1
  33. package/dist/features/align/i18n.js.map +1 -1
  34. package/dist/features/align/toolbarAlignGroup.js.map +1 -1
  35. package/dist/features/blockquote/feature.client.d.ts +1 -2
  36. package/dist/features/blockquote/feature.client.d.ts.map +1 -1
  37. package/dist/features/blockquote/feature.client.js +37 -44
  38. package/dist/features/blockquote/feature.client.js.map +1 -1
  39. package/dist/features/blockquote/feature.server.d.ts +6 -2
  40. package/dist/features/blockquote/feature.server.d.ts.map +1 -1
  41. package/dist/features/blockquote/feature.server.js +35 -40
  42. package/dist/features/blockquote/feature.server.js.map +1 -1
  43. package/dist/features/blockquote/i18n.js.map +1 -1
  44. package/dist/features/blockquote/markdownTransformer.js.map +1 -1
  45. package/dist/features/blocks/component/BlockContent.js +2 -2
  46. package/dist/features/blocks/component/BlockContent.js.map +1 -1
  47. package/dist/features/blocks/component/FormSavePlugin.js.map +1 -1
  48. package/dist/features/blocks/component/index.js +1 -1
  49. package/dist/features/blocks/component/index.js.map +1 -1
  50. package/dist/features/blocks/component/removeEmptyArrayValues.js.map +1 -1
  51. package/dist/features/blocks/drawer/index.js +1 -1
  52. package/dist/features/blocks/drawer/index.js.map +1 -1
  53. package/dist/features/blocks/feature.client.d.ts +1 -2
  54. package/dist/features/blocks/feature.client.d.ts.map +1 -1
  55. package/dist/features/blocks/feature.client.js +74 -80
  56. package/dist/features/blocks/feature.client.js.map +1 -1
  57. package/dist/features/blocks/feature.server.d.ts +1 -2
  58. package/dist/features/blocks/feature.server.d.ts.map +1 -1
  59. package/dist/features/blocks/feature.server.js +88 -90
  60. package/dist/features/blocks/feature.server.js.map +1 -1
  61. package/dist/features/blocks/graphQLPopulationPromise.d.ts +1 -1
  62. package/dist/features/blocks/graphQLPopulationPromise.d.ts.map +1 -1
  63. package/dist/features/blocks/graphQLPopulationPromise.js.map +1 -1
  64. package/dist/features/blocks/i18n.js.map +1 -1
  65. package/dist/features/blocks/nodes/BlocksNode.d.ts +2 -0
  66. package/dist/features/blocks/nodes/BlocksNode.d.ts.map +1 -1
  67. package/dist/features/blocks/nodes/BlocksNode.js +1 -1
  68. package/dist/features/blocks/nodes/BlocksNode.js.map +1 -1
  69. package/dist/features/blocks/plugin/commands.js.map +1 -1
  70. package/dist/features/blocks/plugin/index.d.ts +1 -1
  71. package/dist/features/blocks/plugin/index.d.ts.map +1 -1
  72. package/dist/features/blocks/plugin/index.js.map +1 -1
  73. package/dist/features/blocks/validate.d.ts +1 -1
  74. package/dist/features/blocks/validate.d.ts.map +1 -1
  75. package/dist/features/blocks/validate.js.map +1 -1
  76. package/dist/features/converters/html/converter/converters/linebreak.js.map +1 -1
  77. package/dist/features/converters/html/converter/converters/paragraph.js.map +1 -1
  78. package/dist/features/converters/html/converter/converters/text.js.map +1 -1
  79. package/dist/features/converters/html/converter/defaultConverters.js.map +1 -1
  80. package/dist/features/converters/html/converter/index.js.map +1 -1
  81. package/dist/features/converters/html/converter/types.js.map +1 -1
  82. package/dist/features/converters/html/feature.server.d.ts +1 -2
  83. package/dist/features/converters/html/feature.server.d.ts.map +1 -1
  84. package/dist/features/converters/html/feature.server.js +6 -12
  85. package/dist/features/converters/html/feature.server.js.map +1 -1
  86. package/dist/features/converters/html/field/index.js +1 -1
  87. package/dist/features/converters/html/field/index.js.map +1 -1
  88. package/dist/features/createClientComponent.d.ts +3 -2
  89. package/dist/features/createClientComponent.d.ts.map +1 -1
  90. package/dist/features/createClientComponent.js.map +1 -1
  91. package/dist/features/createFeaturePropComponent.d.ts.map +1 -1
  92. package/dist/features/createFeaturePropComponent.js.map +1 -1
  93. package/dist/features/debug/testRecorder/feature.client.d.ts +1 -2
  94. package/dist/features/debug/testRecorder/feature.client.d.ts.map +1 -1
  95. package/dist/features/debug/testRecorder/feature.client.js +9 -16
  96. package/dist/features/debug/testRecorder/feature.client.js.map +1 -1
  97. package/dist/features/debug/testRecorder/feature.server.d.ts +1 -2
  98. package/dist/features/debug/testRecorder/feature.server.d.ts.map +1 -1
  99. package/dist/features/debug/testRecorder/feature.server.js +8 -13
  100. package/dist/features/debug/testRecorder/feature.server.js.map +1 -1
  101. package/dist/features/debug/testRecorder/plugin/index.d.ts +1 -1
  102. package/dist/features/debug/testRecorder/plugin/index.d.ts.map +1 -1
  103. package/dist/features/debug/testRecorder/plugin/index.js.map +1 -1
  104. package/dist/features/debug/treeView/feature.client.d.ts +1 -2
  105. package/dist/features/debug/treeView/feature.client.d.ts.map +1 -1
  106. package/dist/features/debug/treeView/feature.client.js +9 -16
  107. package/dist/features/debug/treeView/feature.client.js.map +1 -1
  108. package/dist/features/debug/treeView/feature.server.d.ts +1 -2
  109. package/dist/features/debug/treeView/feature.server.d.ts.map +1 -1
  110. package/dist/features/debug/treeView/feature.server.js +8 -13
  111. package/dist/features/debug/treeView/feature.server.js.map +1 -1
  112. package/dist/features/debug/treeView/plugin/index.d.ts +1 -1
  113. package/dist/features/debug/treeView/plugin/index.d.ts.map +1 -1
  114. package/dist/features/debug/treeView/plugin/index.js.map +1 -1
  115. package/dist/features/format/bold/feature.client.d.ts +1 -2
  116. package/dist/features/format/bold/feature.client.d.ts.map +1 -1
  117. package/dist/features/format/bold/feature.client.js +16 -23
  118. package/dist/features/format/bold/feature.client.js.map +1 -1
  119. package/dist/features/format/bold/feature.server.d.ts +1 -2
  120. package/dist/features/format/bold/feature.server.d.ts.map +1 -1
  121. package/dist/features/format/bold/feature.server.js +21 -24
  122. package/dist/features/format/bold/feature.server.js.map +1 -1
  123. package/dist/features/format/bold/markdownTransformers.js.map +1 -1
  124. package/dist/features/format/inlineCode/feature.client.d.ts +1 -2
  125. package/dist/features/format/inlineCode/feature.client.d.ts.map +1 -1
  126. package/dist/features/format/inlineCode/feature.client.js +12 -21
  127. package/dist/features/format/inlineCode/feature.client.js.map +1 -1
  128. package/dist/features/format/inlineCode/feature.server.d.ts +1 -2
  129. package/dist/features/format/inlineCode/feature.server.d.ts.map +1 -1
  130. package/dist/features/format/inlineCode/feature.server.js +11 -16
  131. package/dist/features/format/inlineCode/feature.server.js.map +1 -1
  132. package/dist/features/format/inlineCode/markdownTransformers.js.map +1 -1
  133. package/dist/features/format/italic/feature.client.d.ts +1 -2
  134. package/dist/features/format/italic/feature.client.d.ts.map +1 -1
  135. package/dist/features/format/italic/feature.client.js +13 -22
  136. package/dist/features/format/italic/feature.client.js.map +1 -1
  137. package/dist/features/format/italic/feature.server.d.ts +1 -2
  138. package/dist/features/format/italic/feature.server.d.ts.map +1 -1
  139. package/dist/features/format/italic/feature.server.js +12 -17
  140. package/dist/features/format/italic/feature.server.js.map +1 -1
  141. package/dist/features/format/italic/markdownTransformers.js.map +1 -1
  142. package/dist/features/format/shared/toolbarFormatGroup.js.map +1 -1
  143. package/dist/features/format/strikethrough/feature.client.d.ts +1 -2
  144. package/dist/features/format/strikethrough/feature.client.d.ts.map +1 -1
  145. package/dist/features/format/strikethrough/feature.client.js +12 -21
  146. package/dist/features/format/strikethrough/feature.client.js.map +1 -1
  147. package/dist/features/format/strikethrough/feature.server.d.ts +1 -2
  148. package/dist/features/format/strikethrough/feature.server.d.ts.map +1 -1
  149. package/dist/features/format/strikethrough/feature.server.js +11 -16
  150. package/dist/features/format/strikethrough/feature.server.js.map +1 -1
  151. package/dist/features/format/strikethrough/markdownTransformers.js.map +1 -1
  152. package/dist/features/format/subscript/feature.client.d.ts +1 -2
  153. package/dist/features/format/subscript/feature.client.d.ts.map +1 -1
  154. package/dist/features/format/subscript/feature.client.js +9 -18
  155. package/dist/features/format/subscript/feature.client.js.map +1 -1
  156. package/dist/features/format/subscript/feature.server.d.ts +1 -2
  157. package/dist/features/format/subscript/feature.server.d.ts.map +1 -1
  158. package/dist/features/format/subscript/feature.server.js +8 -13
  159. package/dist/features/format/subscript/feature.server.js.map +1 -1
  160. package/dist/features/format/superscript/feature.client.d.ts +1 -2
  161. package/dist/features/format/superscript/feature.client.d.ts.map +1 -1
  162. package/dist/features/format/superscript/feature.client.js +9 -18
  163. package/dist/features/format/superscript/feature.client.js.map +1 -1
  164. package/dist/features/format/superscript/feature.server.d.ts +1 -2
  165. package/dist/features/format/superscript/feature.server.d.ts.map +1 -1
  166. package/dist/features/format/superscript/feature.server.js +8 -13
  167. package/dist/features/format/superscript/feature.server.js.map +1 -1
  168. package/dist/features/format/underline/feature.client.d.ts +1 -2
  169. package/dist/features/format/underline/feature.client.d.ts.map +1 -1
  170. package/dist/features/format/underline/feature.client.js +9 -18
  171. package/dist/features/format/underline/feature.client.js.map +1 -1
  172. package/dist/features/format/underline/feature.server.d.ts +1 -2
  173. package/dist/features/format/underline/feature.server.d.ts.map +1 -1
  174. package/dist/features/format/underline/feature.server.js +8 -13
  175. package/dist/features/format/underline/feature.server.js.map +1 -1
  176. package/dist/features/heading/feature.client.d.ts +1 -2
  177. package/dist/features/heading/feature.client.d.ts.map +1 -1
  178. package/dist/features/heading/feature.client.js +70 -76
  179. package/dist/features/heading/feature.client.js.map +1 -1
  180. package/dist/features/heading/feature.server.d.ts +1 -2
  181. package/dist/features/heading/feature.server.d.ts.map +1 -1
  182. package/dist/features/heading/feature.server.js +51 -53
  183. package/dist/features/heading/feature.server.js.map +1 -1
  184. package/dist/features/heading/i18n.js +2 -2
  185. package/dist/features/heading/i18n.js.map +1 -1
  186. package/dist/features/heading/markdownTransformer.js.map +1 -1
  187. package/dist/features/horizontalRule/component/index.js.map +1 -1
  188. package/dist/features/horizontalRule/feature.client.d.ts +1 -2
  189. package/dist/features/horizontalRule/feature.client.d.ts.map +1 -1
  190. package/dist/features/horizontalRule/feature.client.js +58 -65
  191. package/dist/features/horizontalRule/feature.client.js.map +1 -1
  192. package/dist/features/horizontalRule/feature.server.d.ts +1 -2
  193. package/dist/features/horizontalRule/feature.server.d.ts.map +1 -1
  194. package/dist/features/horizontalRule/feature.server.js +26 -31
  195. package/dist/features/horizontalRule/feature.server.js.map +1 -1
  196. package/dist/features/horizontalRule/i18n.js.map +1 -1
  197. package/dist/features/horizontalRule/markdownTransformer.js.map +1 -1
  198. package/dist/features/horizontalRule/nodes/HorizontalRuleNode.d.ts +5 -2
  199. package/dist/features/horizontalRule/nodes/HorizontalRuleNode.d.ts.map +1 -1
  200. package/dist/features/horizontalRule/nodes/HorizontalRuleNode.js.map +1 -1
  201. package/dist/features/horizontalRule/plugin/index.d.ts +1 -1
  202. package/dist/features/horizontalRule/plugin/index.d.ts.map +1 -1
  203. package/dist/features/horizontalRule/plugin/index.js.map +1 -1
  204. package/dist/features/indent/feature.client.d.ts +1 -2
  205. package/dist/features/indent/feature.client.d.ts.map +1 -1
  206. package/dist/features/indent/feature.client.js +9 -16
  207. package/dist/features/indent/feature.client.js.map +1 -1
  208. package/dist/features/indent/feature.server.d.ts +1 -2
  209. package/dist/features/indent/feature.server.d.ts.map +1 -1
  210. package/dist/features/indent/feature.server.js +9 -15
  211. package/dist/features/indent/feature.server.js.map +1 -1
  212. package/dist/features/indent/i18n.js.map +1 -1
  213. package/dist/features/indent/toolbarIndentGroup.js.map +1 -1
  214. package/dist/features/link/drawer/baseFields.d.ts +2 -2
  215. package/dist/features/link/drawer/baseFields.d.ts.map +1 -1
  216. package/dist/features/link/drawer/baseFields.js.map +1 -1
  217. package/dist/features/link/drawer/index.js.map +1 -1
  218. package/dist/features/link/drawer/types.js.map +1 -1
  219. package/dist/features/link/feature.client.d.ts +3 -4
  220. package/dist/features/link/feature.client.d.ts.map +1 -1
  221. package/dist/features/link/feature.client.js +34 -41
  222. package/dist/features/link/feature.client.js.map +1 -1
  223. package/dist/features/link/feature.server.d.ts +4 -6
  224. package/dist/features/link/feature.server.d.ts.map +1 -1
  225. package/dist/features/link/feature.server.js +123 -125
  226. package/dist/features/link/feature.server.js.map +1 -1
  227. package/dist/features/link/graphQLPopulationPromise.d.ts +1 -1
  228. package/dist/features/link/graphQLPopulationPromise.d.ts.map +1 -1
  229. package/dist/features/link/graphQLPopulationPromise.js.map +1 -1
  230. package/dist/features/link/i18n.js.map +1 -1
  231. package/dist/features/link/markdownTransformer.js.map +1 -1
  232. package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  233. package/dist/features/link/nodes/AutoLinkNode.js +7 -1
  234. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  235. package/dist/features/link/nodes/LinkNode.js +1 -1
  236. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  237. package/dist/features/link/nodes/types.d.ts +7 -4
  238. package/dist/features/link/nodes/types.d.ts.map +1 -1
  239. package/dist/features/link/nodes/types.js.map +1 -1
  240. package/dist/features/link/plugins/autoLink/index.d.ts +1 -1
  241. package/dist/features/link/plugins/autoLink/index.d.ts.map +1 -1
  242. package/dist/features/link/plugins/autoLink/index.js.map +1 -1
  243. package/dist/features/link/plugins/clickableLink/index.d.ts +1 -1
  244. package/dist/features/link/plugins/clickableLink/index.d.ts.map +1 -1
  245. package/dist/features/link/plugins/clickableLink/index.js.map +1 -1
  246. package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -1
  247. package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  248. package/dist/features/link/plugins/floatingLinkEditor/index.d.ts +1 -1
  249. package/dist/features/link/plugins/floatingLinkEditor/index.d.ts.map +1 -1
  250. package/dist/features/link/plugins/floatingLinkEditor/index.js.map +1 -1
  251. package/dist/features/link/plugins/floatingLinkEditor/types.js.map +1 -1
  252. package/dist/features/link/plugins/floatingLinkEditor/utilities.d.ts +2 -2
  253. package/dist/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +1 -1
  254. package/dist/features/link/plugins/floatingLinkEditor/utilities.js.map +1 -1
  255. package/dist/features/link/plugins/link/index.d.ts +1 -1
  256. package/dist/features/link/plugins/link/index.d.ts.map +1 -1
  257. package/dist/features/link/plugins/link/index.js.map +1 -1
  258. package/dist/features/link/validate.d.ts +1 -1
  259. package/dist/features/link/validate.d.ts.map +1 -1
  260. package/dist/features/link/validate.js.map +1 -1
  261. package/dist/features/lists/checklist/feature.client.d.ts +1 -2
  262. package/dist/features/lists/checklist/feature.client.d.ts.map +1 -1
  263. package/dist/features/lists/checklist/feature.client.js +50 -57
  264. package/dist/features/lists/checklist/feature.client.js.map +1 -1
  265. package/dist/features/lists/checklist/feature.server.d.ts +1 -2
  266. package/dist/features/lists/checklist/feature.server.d.ts.map +1 -1
  267. package/dist/features/lists/checklist/feature.server.js +28 -31
  268. package/dist/features/lists/checklist/feature.server.js.map +1 -1
  269. package/dist/features/lists/checklist/i18n.js.map +1 -1
  270. package/dist/features/lists/checklist/markdownTransformers.js.map +1 -1
  271. package/dist/features/lists/checklist/plugin/index.d.ts +1 -1
  272. package/dist/features/lists/checklist/plugin/index.d.ts.map +1 -1
  273. package/dist/features/lists/checklist/plugin/index.js.map +1 -1
  274. package/dist/features/lists/htmlConverter.d.ts +1 -1
  275. package/dist/features/lists/htmlConverter.d.ts.map +1 -1
  276. package/dist/features/lists/htmlConverter.js.map +1 -1
  277. package/dist/features/lists/orderedList/feature.client.d.ts +1 -2
  278. package/dist/features/lists/orderedList/feature.client.d.ts.map +1 -1
  279. package/dist/features/lists/orderedList/feature.client.js +39 -46
  280. package/dist/features/lists/orderedList/feature.client.js.map +1 -1
  281. package/dist/features/lists/orderedList/feature.server.d.ts +1 -2
  282. package/dist/features/lists/orderedList/feature.server.d.ts.map +1 -1
  283. package/dist/features/lists/orderedList/feature.server.js +28 -31
  284. package/dist/features/lists/orderedList/feature.server.js.map +1 -1
  285. package/dist/features/lists/orderedList/i18n.js.map +1 -1
  286. package/dist/features/lists/orderedList/markdownTransformer.js.map +1 -1
  287. package/dist/features/lists/plugin/index.d.ts +11 -1
  288. package/dist/features/lists/plugin/index.d.ts.map +1 -1
  289. package/dist/features/lists/plugin/index.js.map +1 -1
  290. package/dist/features/lists/shared/markdown.d.ts +1 -1
  291. package/dist/features/lists/shared/markdown.js.map +1 -1
  292. package/dist/features/lists/shared/slashMenuListGroup.js.map +1 -1
  293. package/dist/features/lists/unorderedList/feature.client.d.ts +1 -2
  294. package/dist/features/lists/unorderedList/feature.client.d.ts.map +1 -1
  295. package/dist/features/lists/unorderedList/feature.client.js +40 -49
  296. package/dist/features/lists/unorderedList/feature.client.js.map +1 -1
  297. package/dist/features/lists/unorderedList/feature.server.d.ts +1 -2
  298. package/dist/features/lists/unorderedList/feature.server.d.ts.map +1 -1
  299. package/dist/features/lists/unorderedList/feature.server.js +26 -31
  300. package/dist/features/lists/unorderedList/feature.server.js.map +1 -1
  301. package/dist/features/lists/unorderedList/i18n.js.map +1 -1
  302. package/dist/features/lists/unorderedList/markdownTransformer.js.map +1 -1
  303. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.d.ts +0 -1
  304. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.d.ts.map +1 -1
  305. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.js.map +1 -1
  306. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +1 -1
  307. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.js +1 -1
  308. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.js.map +1 -1
  309. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/client.d.ts +0 -1
  310. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/client.d.ts.map +1 -1
  311. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/client.js.map +1 -1
  312. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +1 -1
  313. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/index.js +1 -1
  314. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/index.js.map +1 -1
  315. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/client.d.ts +0 -1
  316. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/client.d.ts.map +1 -1
  317. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/client.js.map +1 -1
  318. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts.map +1 -1
  319. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +1 -1
  320. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/index.js +1 -1
  321. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/index.js.map +1 -1
  322. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.d.ts +0 -1
  323. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.d.ts.map +1 -1
  324. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.js.map +1 -1
  325. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts.map +1 -1
  326. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +1 -1
  327. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.js +1 -1
  328. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.js.map +1 -1
  329. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.d.ts +0 -1
  330. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.d.ts.map +1 -1
  331. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.js.map +1 -1
  332. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts.map +1 -1
  333. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +1 -1
  334. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.js +1 -1
  335. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.js.map +1 -1
  336. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.d.ts +0 -1
  337. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.d.ts.map +1 -1
  338. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.js.map +1 -1
  339. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +1 -1
  340. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.js +1 -1
  341. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.js.map +1 -1
  342. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.d.ts +0 -1
  343. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.d.ts.map +1 -1
  344. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.js.map +1 -1
  345. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -1
  346. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.js +1 -1
  347. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.js.map +1 -1
  348. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +1 -1
  349. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +1 -1
  350. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts +1 -1
  351. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js.map +1 -1
  352. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts +1 -2
  353. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +1 -1
  354. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js +20 -27
  355. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js.map +1 -1
  356. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts +1 -2
  357. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +1 -1
  358. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js +39 -42
  359. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js.map +1 -1
  360. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  361. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  362. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts +0 -1
  363. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts.map +1 -1
  364. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/client.js.map +1 -1
  365. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts.map +1 -1
  366. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +1 -1
  367. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/index.js +1 -1
  368. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/index.js.map +1 -1
  369. package/dist/features/migrations/slateToLexical/converter/converters/heading/client.d.ts +0 -1
  370. package/dist/features/migrations/slateToLexical/converter/converters/heading/client.d.ts.map +1 -1
  371. package/dist/features/migrations/slateToLexical/converter/converters/heading/client.js.map +1 -1
  372. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +1 -1
  373. package/dist/features/migrations/slateToLexical/converter/converters/heading/index.js +1 -1
  374. package/dist/features/migrations/slateToLexical/converter/converters/heading/index.js.map +1 -1
  375. package/dist/features/migrations/slateToLexical/converter/converters/indent/client.d.ts +0 -1
  376. package/dist/features/migrations/slateToLexical/converter/converters/indent/client.d.ts.map +1 -1
  377. package/dist/features/migrations/slateToLexical/converter/converters/indent/client.js.map +1 -1
  378. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +1 -1
  379. package/dist/features/migrations/slateToLexical/converter/converters/indent/index.js +1 -1
  380. package/dist/features/migrations/slateToLexical/converter/converters/indent/index.js.map +1 -1
  381. package/dist/features/migrations/slateToLexical/converter/converters/link/client.d.ts +0 -1
  382. package/dist/features/migrations/slateToLexical/converter/converters/link/client.d.ts.map +1 -1
  383. package/dist/features/migrations/slateToLexical/converter/converters/link/client.js.map +1 -1
  384. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +1 -1
  385. package/dist/features/migrations/slateToLexical/converter/converters/link/index.js +1 -1
  386. package/dist/features/migrations/slateToLexical/converter/converters/link/index.js.map +1 -1
  387. package/dist/features/migrations/slateToLexical/converter/converters/listItem/client.d.ts +0 -1
  388. package/dist/features/migrations/slateToLexical/converter/converters/listItem/client.d.ts.map +1 -1
  389. package/dist/features/migrations/slateToLexical/converter/converters/listItem/client.js.map +1 -1
  390. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts.map +1 -1
  391. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +1 -1
  392. package/dist/features/migrations/slateToLexical/converter/converters/listItem/index.js +1 -1
  393. package/dist/features/migrations/slateToLexical/converter/converters/listItem/index.js.map +1 -1
  394. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/client.d.ts +0 -1
  395. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/client.d.ts.map +1 -1
  396. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/client.js.map +1 -1
  397. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts.map +1 -1
  398. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +1 -1
  399. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/index.js +1 -1
  400. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/index.js.map +1 -1
  401. package/dist/features/migrations/slateToLexical/converter/converters/relationship/client.d.ts +0 -1
  402. package/dist/features/migrations/slateToLexical/converter/converters/relationship/client.d.ts.map +1 -1
  403. package/dist/features/migrations/slateToLexical/converter/converters/relationship/client.js.map +1 -1
  404. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -1
  405. package/dist/features/migrations/slateToLexical/converter/converters/relationship/index.js +1 -1
  406. package/dist/features/migrations/slateToLexical/converter/converters/relationship/index.js.map +1 -1
  407. package/dist/features/migrations/slateToLexical/converter/converters/unknown/client.d.ts +0 -1
  408. package/dist/features/migrations/slateToLexical/converter/converters/unknown/client.d.ts.map +1 -1
  409. package/dist/features/migrations/slateToLexical/converter/converters/unknown/client.js.map +1 -1
  410. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +1 -1
  411. package/dist/features/migrations/slateToLexical/converter/converters/unknown/index.js +1 -1
  412. package/dist/features/migrations/slateToLexical/converter/converters/unknown/index.js.map +1 -1
  413. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/client.d.ts +0 -1
  414. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/client.d.ts.map +1 -1
  415. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/client.js.map +1 -1
  416. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts.map +1 -1
  417. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +1 -1
  418. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/index.js +1 -1
  419. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/index.js.map +1 -1
  420. package/dist/features/migrations/slateToLexical/converter/converters/upload/client.d.ts +0 -1
  421. package/dist/features/migrations/slateToLexical/converter/converters/upload/client.d.ts.map +1 -1
  422. package/dist/features/migrations/slateToLexical/converter/converters/upload/client.js.map +1 -1
  423. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -1
  424. package/dist/features/migrations/slateToLexical/converter/converters/upload/index.js +1 -1
  425. package/dist/features/migrations/slateToLexical/converter/converters/upload/index.js.map +1 -1
  426. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js.map +1 -1
  427. package/dist/features/migrations/slateToLexical/converter/index.js.map +1 -1
  428. package/dist/features/migrations/slateToLexical/converter/types.d.ts +1 -1
  429. package/dist/features/migrations/slateToLexical/converter/types.js.map +1 -1
  430. package/dist/features/migrations/slateToLexical/feature.client.d.ts +1 -2
  431. package/dist/features/migrations/slateToLexical/feature.client.d.ts.map +1 -1
  432. package/dist/features/migrations/slateToLexical/feature.client.js +20 -27
  433. package/dist/features/migrations/slateToLexical/feature.client.js.map +1 -1
  434. package/dist/features/migrations/slateToLexical/feature.server.d.ts +3 -2
  435. package/dist/features/migrations/slateToLexical/feature.server.d.ts.map +1 -1
  436. package/dist/features/migrations/slateToLexical/feature.server.js +41 -42
  437. package/dist/features/migrations/slateToLexical/feature.server.js.map +1 -1
  438. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  439. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  440. package/dist/features/paragraph/feature.client.d.ts +1 -2
  441. package/dist/features/paragraph/feature.client.d.ts.map +1 -1
  442. package/dist/features/paragraph/feature.client.js +33 -40
  443. package/dist/features/paragraph/feature.client.js.map +1 -1
  444. package/dist/features/paragraph/feature.server.d.ts +1 -2
  445. package/dist/features/paragraph/feature.server.d.ts.map +1 -1
  446. package/dist/features/paragraph/feature.server.js +10 -15
  447. package/dist/features/paragraph/feature.server.js.map +1 -1
  448. package/dist/features/paragraph/i18n.js.map +1 -1
  449. package/dist/features/relationship/drawer/commands.js.map +1 -1
  450. package/dist/features/relationship/drawer/index.d.ts.map +1 -1
  451. package/dist/features/relationship/drawer/index.js.map +1 -1
  452. package/dist/features/relationship/feature.client.d.ts +3 -4
  453. package/dist/features/relationship/feature.client.d.ts.map +1 -1
  454. package/dist/features/relationship/feature.client.js +60 -67
  455. package/dist/features/relationship/feature.client.js.map +1 -1
  456. package/dist/features/relationship/feature.server.d.ts +4 -4
  457. package/dist/features/relationship/feature.server.d.ts.map +1 -1
  458. package/dist/features/relationship/feature.server.js +45 -51
  459. package/dist/features/relationship/feature.server.js.map +1 -1
  460. package/dist/features/relationship/graphQLPopulationPromise.d.ts +1 -1
  461. package/dist/features/relationship/graphQLPopulationPromise.d.ts.map +1 -1
  462. package/dist/features/relationship/graphQLPopulationPromise.js.map +1 -1
  463. package/dist/features/relationship/i18n.js.map +1 -1
  464. package/dist/features/relationship/nodes/RelationshipNode.d.ts +6 -2
  465. package/dist/features/relationship/nodes/RelationshipNode.d.ts.map +1 -1
  466. package/dist/features/relationship/nodes/RelationshipNode.js +1 -1
  467. package/dist/features/relationship/nodes/RelationshipNode.js.map +1 -1
  468. package/dist/features/relationship/nodes/components/RelationshipComponent.d.ts.map +1 -1
  469. package/dist/features/relationship/nodes/components/RelationshipComponent.js.map +1 -1
  470. package/dist/features/relationship/plugins/index.d.ts +1 -1
  471. package/dist/features/relationship/plugins/index.d.ts.map +1 -1
  472. package/dist/features/relationship/plugins/index.js.map +1 -1
  473. package/dist/features/relationship/utils/EnabledRelationshipsCondition.js.map +1 -1
  474. package/dist/features/shared/slashMenu/basicGroup.js.map +1 -1
  475. package/dist/features/shared/toolbar/addDropdownGroup.js.map +1 -1
  476. package/dist/features/shared/toolbar/featureButtonsGroup.js.map +1 -1
  477. package/dist/features/shared/toolbar/textDropdownGroup.js.map +1 -1
  478. package/dist/features/toolbars/fixed/Toolbar/index.d.ts +1 -1
  479. package/dist/features/toolbars/fixed/Toolbar/index.d.ts.map +1 -1
  480. package/dist/features/toolbars/fixed/Toolbar/index.js.map +1 -1
  481. package/dist/features/toolbars/fixed/feature.client.d.ts +1 -2
  482. package/dist/features/toolbars/fixed/feature.client.d.ts.map +1 -1
  483. package/dist/features/toolbars/fixed/feature.client.js +9 -16
  484. package/dist/features/toolbars/fixed/feature.client.js.map +1 -1
  485. package/dist/features/toolbars/fixed/feature.server.d.ts +1 -2
  486. package/dist/features/toolbars/fixed/feature.server.d.ts.map +1 -1
  487. package/dist/features/toolbars/fixed/feature.server.js +16 -18
  488. package/dist/features/toolbars/fixed/feature.server.js.map +1 -1
  489. package/dist/features/toolbars/inline/Toolbar/index.d.ts +1 -1
  490. package/dist/features/toolbars/inline/Toolbar/index.d.ts.map +1 -1
  491. package/dist/features/toolbars/inline/Toolbar/index.js.map +1 -1
  492. package/dist/features/toolbars/inline/feature.client.d.ts +1 -2
  493. package/dist/features/toolbars/inline/feature.client.d.ts.map +1 -1
  494. package/dist/features/toolbars/inline/feature.client.js +9 -16
  495. package/dist/features/toolbars/inline/feature.client.js.map +1 -1
  496. package/dist/features/toolbars/inline/feature.server.d.ts +1 -2
  497. package/dist/features/toolbars/inline/feature.server.d.ts.map +1 -1
  498. package/dist/features/toolbars/inline/feature.server.js +8 -13
  499. package/dist/features/toolbars/inline/feature.server.js.map +1 -1
  500. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  501. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  502. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  503. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  504. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  505. package/dist/features/toolbars/types.d.ts +37 -5
  506. package/dist/features/toolbars/types.d.ts.map +1 -1
  507. package/dist/features/toolbars/types.js.map +1 -1
  508. package/dist/features/typeUtilities.d.ts +1 -1
  509. package/dist/features/typeUtilities.d.ts.map +1 -1
  510. package/dist/features/typeUtilities.js.map +1 -1
  511. package/dist/features/typesClient.d.ts +182 -0
  512. package/dist/features/typesClient.d.ts.map +1 -0
  513. package/dist/features/typesClient.js +3 -0
  514. package/dist/features/typesClient.js.map +1 -0
  515. package/dist/features/{types.d.ts → typesServer.d.ts} +40 -193
  516. package/dist/features/typesServer.d.ts.map +1 -0
  517. package/dist/features/typesServer.js +3 -0
  518. package/dist/features/typesServer.js.map +1 -0
  519. package/dist/features/upload/component/ExtraFieldsDrawer/index.js.map +1 -1
  520. package/dist/features/upload/component/index.d.ts.map +1 -1
  521. package/dist/features/upload/component/index.js +1 -1
  522. package/dist/features/upload/component/index.js.map +1 -1
  523. package/dist/features/upload/drawer/commands.js.map +1 -1
  524. package/dist/features/upload/drawer/index.d.ts.map +1 -1
  525. package/dist/features/upload/drawer/index.js.map +1 -1
  526. package/dist/features/upload/feature.client.d.ts +1 -2
  527. package/dist/features/upload/feature.client.d.ts.map +1 -1
  528. package/dist/features/upload/feature.client.js +62 -69
  529. package/dist/features/upload/feature.client.js.map +1 -1
  530. package/dist/features/upload/feature.server.d.ts +3 -4
  531. package/dist/features/upload/feature.server.d.ts.map +1 -1
  532. package/dist/features/upload/feature.server.js +166 -168
  533. package/dist/features/upload/feature.server.js.map +1 -1
  534. package/dist/features/upload/graphQLPopulationPromise.d.ts +1 -1
  535. package/dist/features/upload/graphQLPopulationPromise.d.ts.map +1 -1
  536. package/dist/features/upload/graphQLPopulationPromise.js.map +1 -1
  537. package/dist/features/upload/i18n.js.map +1 -1
  538. package/dist/features/upload/nodes/UploadNode.d.ts +6 -2
  539. package/dist/features/upload/nodes/UploadNode.d.ts.map +1 -1
  540. package/dist/features/upload/nodes/UploadNode.js +1 -1
  541. package/dist/features/upload/nodes/UploadNode.js.map +1 -1
  542. package/dist/features/upload/plugin/index.d.ts +1 -1
  543. package/dist/features/upload/plugin/index.d.ts.map +1 -1
  544. package/dist/features/upload/plugin/index.js.map +1 -1
  545. package/dist/features/upload/validate.d.ts +1 -1
  546. package/dist/features/upload/validate.d.ts.map +1 -1
  547. package/dist/features/upload/validate.js.map +1 -1
  548. package/dist/field/Field.d.ts.map +1 -1
  549. package/dist/field/Field.js.map +1 -1
  550. package/dist/field/index.d.ts.map +1 -1
  551. package/dist/field/index.js +9 -7
  552. package/dist/field/index.js.map +1 -1
  553. package/dist/i18n.js.map +1 -1
  554. package/dist/index.d.ts +12 -8
  555. package/dist/index.d.ts.map +1 -1
  556. package/dist/index.js +19 -17
  557. package/dist/index.js.map +1 -1
  558. package/dist/lexical/EditorPlugin.d.ts +1 -1
  559. package/dist/lexical/EditorPlugin.d.ts.map +1 -1
  560. package/dist/lexical/EditorPlugin.js.map +1 -1
  561. package/dist/lexical/LexicalEditor.js.map +1 -1
  562. package/dist/lexical/LexicalProvider.js.map +1 -1
  563. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  564. package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
  565. package/dist/lexical/config/client/default.js.map +1 -1
  566. package/dist/lexical/config/client/loader.d.ts +1 -1
  567. package/dist/lexical/config/client/loader.d.ts.map +1 -1
  568. package/dist/lexical/config/client/loader.js +2 -2
  569. package/dist/lexical/config/client/loader.js.map +1 -1
  570. package/dist/lexical/config/client/sanitize.d.ts +1 -1
  571. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  572. package/dist/lexical/config/client/sanitize.js +1 -1
  573. package/dist/lexical/config/client/sanitize.js.map +1 -1
  574. package/dist/lexical/config/server/default.d.ts +2 -2
  575. package/dist/lexical/config/server/default.d.ts.map +1 -1
  576. package/dist/lexical/config/server/default.js.map +1 -1
  577. package/dist/lexical/config/server/loader.d.ts +2 -2
  578. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  579. package/dist/lexical/config/server/loader.js +2 -2
  580. package/dist/lexical/config/server/loader.js.map +1 -1
  581. package/dist/lexical/config/server/sanitize.d.ts +1 -1
  582. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  583. package/dist/lexical/config/server/sanitize.js.map +1 -1
  584. package/dist/lexical/config/types.d.ts +4 -3
  585. package/dist/lexical/config/types.d.ts.map +1 -1
  586. package/dist/lexical/config/types.js.map +1 -1
  587. package/dist/lexical/nodes/index.js.map +1 -1
  588. package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  589. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  590. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
  591. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +16 -1
  592. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
  593. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  594. package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
  595. package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js.map +1 -1
  596. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  597. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.js.map +1 -1
  598. package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js.map +1 -1
  599. package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js.map +1 -1
  600. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  601. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts +0 -1
  602. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts.map +1 -1
  603. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  604. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js.map +1 -1
  605. package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -1
  606. package/dist/lexical/plugins/handles/utils/getCollapsedMargins.js.map +1 -1
  607. package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.js.map +1 -1
  608. package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -1
  609. package/dist/lexical/plugins/handles/utils/isOnHandleElement.js.map +1 -1
  610. package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  611. package/dist/lexical/theme/EditorTheme.js.map +1 -1
  612. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  613. package/dist/lexical/ui/icons/AI/index.js.map +1 -1
  614. package/dist/lexical/ui/icons/Add/index.js.map +1 -1
  615. package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
  616. package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
  617. package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
  618. package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
  619. package/dist/lexical/ui/icons/Block/index.js.map +1 -1
  620. package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
  621. package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
  622. package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
  623. package/dist/lexical/ui/icons/Code/index.js.map +1 -1
  624. package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  625. package/dist/lexical/ui/icons/H1/index.js.map +1 -1
  626. package/dist/lexical/ui/icons/H2/index.js.map +1 -1
  627. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  628. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  629. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  630. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  631. package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
  632. package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
  633. package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
  634. package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
  635. package/dist/lexical/ui/icons/Link/index.js.map +1 -1
  636. package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
  637. package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
  638. package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
  639. package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
  640. package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
  641. package/dist/lexical/ui/icons/Text/index.js.map +1 -1
  642. package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
  643. package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
  644. package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
  645. package/dist/lexical/utils/canUseDOM.js.map +1 -1
  646. package/dist/lexical/utils/cloneDeep.js.map +1 -1
  647. package/dist/lexical/utils/environment.js.map +1 -1
  648. package/dist/lexical/utils/getDOMRangeRect.js.map +1 -1
  649. package/dist/lexical/utils/getSelectedNode.js.map +1 -1
  650. package/dist/lexical/utils/guard.js.map +1 -1
  651. package/dist/lexical/utils/invariant.js.map +1 -1
  652. package/dist/lexical/utils/joinClasses.js.map +1 -1
  653. package/dist/lexical/utils/markdown/createBlockNode.d.ts +1 -1
  654. package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
  655. package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
  656. package/dist/lexical/utils/nodeFormat.js.map +1 -1
  657. package/dist/lexical/utils/point.js.map +1 -1
  658. package/dist/lexical/utils/rect.js.map +1 -1
  659. package/dist/lexical/utils/setFloatingElemPosition.js.map +1 -1
  660. package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.js.map +1 -1
  661. package/dist/lexical/utils/swipe.js.map +1 -1
  662. package/dist/lexical/utils/url.js.map +1 -1
  663. package/dist/nodeTypes.d.ts +27 -0
  664. package/dist/nodeTypes.d.ts.map +1 -0
  665. package/dist/nodeTypes.js +3 -0
  666. package/dist/nodeTypes.js.map +1 -0
  667. package/dist/populateGraphQL/defaultValue.js.map +1 -1
  668. package/dist/populateGraphQL/populate.d.ts.map +1 -1
  669. package/dist/populateGraphQL/populate.js.map +1 -1
  670. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts +1 -1
  671. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  672. package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
  673. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts +1 -1
  674. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
  675. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js.map +1 -1
  676. package/dist/types.d.ts +7 -7
  677. package/dist/types.d.ts.map +1 -1
  678. package/dist/types.js.map +1 -1
  679. package/dist/utilities/createClientFeature.d.ts +13 -0
  680. package/dist/utilities/createClientFeature.d.ts.map +1 -0
  681. package/dist/utilities/createClientFeature.js +30 -0
  682. package/dist/utilities/createClientFeature.js.map +1 -0
  683. package/dist/utilities/createServerFeature.d.ts +16 -0
  684. package/dist/utilities/createServerFeature.d.ts.map +1 -0
  685. package/dist/utilities/createServerFeature.js +34 -0
  686. package/dist/utilities/createServerFeature.js.map +1 -0
  687. package/dist/utilities/forEachNodeRecursively.js.map +1 -1
  688. package/dist/utilities/generateComponentMap.d.ts +2 -2
  689. package/dist/utilities/generateComponentMap.d.ts.map +1 -1
  690. package/dist/utilities/generateComponentMap.js +4 -4
  691. package/dist/utilities/generateComponentMap.js.map +1 -1
  692. package/dist/utilities/generateSchemaMap.d.ts +2 -2
  693. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  694. package/dist/utilities/generateSchemaMap.js +1 -1
  695. package/dist/utilities/generateSchemaMap.js.map +1 -1
  696. package/dist/utilities/migrateSlateToLexical/index.d.ts +15 -0
  697. package/dist/utilities/migrateSlateToLexical/index.d.ts.map +1 -0
  698. package/dist/utilities/migrateSlateToLexical/index.js +105 -0
  699. package/dist/utilities/migrateSlateToLexical/index.js.map +1 -0
  700. package/dist/utilities/migrateSlateToLexical/recurse.d.ts +9 -0
  701. package/dist/utilities/migrateSlateToLexical/recurse.d.ts.map +1 -0
  702. package/dist/utilities/migrateSlateToLexical/recurse.js +77 -0
  703. package/dist/utilities/migrateSlateToLexical/recurse.js.map +1 -0
  704. package/dist/utilities/recurseNodeTree.js.map +1 -1
  705. package/dist/utilities/useLexicalFeature.d.ts +1 -1
  706. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  707. package/dist/utilities/useLexicalFeature.js.map +1 -1
  708. package/dist/validate/index.js.map +1 -1
  709. package/dist/validate/validateNodes.d.ts +1 -1
  710. package/dist/validate/validateNodes.d.ts.map +1 -1
  711. package/dist/validate/validateNodes.js.map +1 -1
  712. package/package.json +10 -10
  713. package/dist/exports/client/Field-YMWNSE3A.js +0 -2
  714. package/dist/exports/client/Field-YMWNSE3A.js.map +0 -7
  715. package/dist/exports/client/chunk-MLIITFAS.js.map +0 -7
  716. package/dist/exports/client/chunk-OSR74ZNW.js.map +0 -7
  717. package/dist/exports/client/chunk-QU5MKT75.js.map +0 -7
  718. package/dist/exports/client/chunk-ZITHDR53.js +0 -2
  719. package/dist/exports/client/chunk-ZITHDR53.js.map +0 -7
  720. package/dist/exports/client/component-E2NHAHBC.js.map +0 -7
  721. package/dist/exports/client/component-X4LSLSWF.js +0 -2
  722. package/dist/exports/client/component-X4LSLSWF.js.map +0 -7
  723. package/dist/features/types.d.ts.map +0 -1
  724. package/dist/features/types.js +0 -3
  725. package/dist/features/types.js.map +0 -1
  726. /package/dist/exports/client/{RelationshipComponent-5OU5HATX.js.map → RelationshipComponent-AFXEJMZQ.js.map} +0 -0
  727. /package/dist/exports/client/{component-QWIGEOVD.js.map → component-VM36FRT2.js.map} +0 -0
@@ -0,0 +1,77 @@
1
+ import { fieldAffectsData, fieldHasSubFields, fieldIsArrayType } from 'payload/shared';
2
+ import { convertSlateToLexical } from '../../features/migrations/slateToLexical/converter/index.js';
3
+ export const migrateDocumentFields = ({ data, fields, found })=>{
4
+ for (const field of fields){
5
+ if (fieldHasSubFields(field) && !fieldIsArrayType(field)) {
6
+ if (fieldAffectsData(field) && typeof data[field.name] === 'object') {
7
+ migrateDocumentFields({
8
+ data: data[field.name],
9
+ fields: field.fields,
10
+ found
11
+ });
12
+ } else {
13
+ migrateDocumentFields({
14
+ data,
15
+ found,
16
+ fields: field.fields
17
+ });
18
+ }
19
+ } else if (field.type === 'tabs') {
20
+ field.tabs.forEach((tab)=>{
21
+ migrateDocumentFields({
22
+ data,
23
+ found,
24
+ fields: tab.fields
25
+ });
26
+ });
27
+ } else if (Array.isArray(data[field.name])) {
28
+ if (field.type === 'blocks') {
29
+ data[field.name].forEach((row, i)=>{
30
+ const block = field.blocks.find(({ slug })=>slug === row?.blockType);
31
+ if (block) {
32
+ migrateDocumentFields({
33
+ data: data[field.name][i],
34
+ found,
35
+ fields: block.fields
36
+ });
37
+ }
38
+ });
39
+ }
40
+ if (field.type === 'array') {
41
+ data[field.name].forEach((_, i)=>{
42
+ migrateDocumentFields({
43
+ data: data[field.name][i],
44
+ found,
45
+ fields: field.fields
46
+ });
47
+ });
48
+ }
49
+ }
50
+ if (field.type === 'richText' && Array.isArray(data[field.name])) {
51
+ // Slate richText
52
+ const editor = field.editor;
53
+ if (editor && typeof editor === 'object') {
54
+ if ('features' in editor && editor.features?.length) {
55
+ // find slatetolexical feature
56
+ const slateToLexicalFeature = editor.editorConfig.resolvedFeatureMap.get('slateToLexical');
57
+ if (slateToLexicalFeature) {
58
+ // DO CONVERSION
59
+ const converterProviders = slateToLexicalFeature.sanitizedServerFeatureProps.converters;
60
+ const converters = [];
61
+ for (const converter of converterProviders){
62
+ converters.push(converter.converter);
63
+ }
64
+ data[field.name] = convertSlateToLexical({
65
+ converters,
66
+ slateData: data[field.name]
67
+ });
68
+ found++;
69
+ }
70
+ }
71
+ }
72
+ }
73
+ }
74
+ return found;
75
+ };
76
+
77
+ //# sourceMappingURL=recurse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/utilities/migrateSlateToLexical/recurse.ts"],"sourcesContent":["import type { Field } from 'payload'\n\nimport { fieldAffectsData, fieldHasSubFields, fieldIsArrayType } from 'payload/shared'\n\nimport type {\n SlateNodeConverter,\n SlateNodeConverterProvider,\n} from '../../features/migrations/slateToLexical/converter/types.js'\nimport type { LexicalRichTextAdapter } from '../../types.js'\n\nimport { convertSlateToLexical } from '../../features/migrations/slateToLexical/converter/index.js'\n\ntype NestedRichTextFieldsArgs = {\n data: unknown\n\n fields: Field[]\n found: number\n}\n\nexport const migrateDocumentFields = ({\n data,\n fields,\n found,\n}: NestedRichTextFieldsArgs): number => {\n for (const field of fields) {\n if (fieldHasSubFields(field) && !fieldIsArrayType(field)) {\n if (fieldAffectsData(field) && typeof data[field.name] === 'object') {\n migrateDocumentFields({\n data: data[field.name],\n fields: field.fields,\n found,\n })\n } else {\n migrateDocumentFields({\n data,\n found,\n\n fields: field.fields,\n })\n }\n } else if (field.type === 'tabs') {\n field.tabs.forEach((tab) => {\n migrateDocumentFields({\n data,\n found,\n\n fields: tab.fields,\n })\n })\n } else if (Array.isArray(data[field.name])) {\n if (field.type === 'blocks') {\n data[field.name].forEach((row, i) => {\n const block = field.blocks.find(({ slug }) => slug === row?.blockType)\n if (block) {\n migrateDocumentFields({\n data: data[field.name][i],\n found,\n\n fields: block.fields,\n })\n }\n })\n }\n\n if (field.type === 'array') {\n data[field.name].forEach((_, i) => {\n migrateDocumentFields({\n data: data[field.name][i],\n found,\n\n fields: field.fields,\n })\n })\n }\n }\n\n if (field.type === 'richText' && Array.isArray(data[field.name])) {\n // Slate richText\n const editor: LexicalRichTextAdapter = field.editor as LexicalRichTextAdapter\n if (editor && typeof editor === 'object') {\n if ('features' in editor && editor.features?.length) {\n // find slatetolexical feature\n const slateToLexicalFeature = editor.editorConfig.resolvedFeatureMap.get('slateToLexical')\n if (slateToLexicalFeature) {\n // DO CONVERSION\n\n const converterProviders = (\n slateToLexicalFeature.sanitizedServerFeatureProps as {\n converters?: SlateNodeConverterProvider[]\n }\n ).converters\n\n const converters: SlateNodeConverter[] = []\n\n for (const converter of converterProviders) {\n converters.push(converter.converter)\n }\n\n data[field.name] = convertSlateToLexical({\n converters,\n slateData: data[field.name],\n })\n\n found++\n }\n }\n }\n }\n }\n\n return found\n}\n"],"names":["fieldAffectsData","fieldHasSubFields","fieldIsArrayType","convertSlateToLexical","migrateDocumentFields","data","fields","found","field","name","type","tabs","forEach","tab","Array","isArray","row","i","block","blocks","find","slug","blockType","_","editor","features","length","slateToLexicalFeature","editorConfig","resolvedFeatureMap","get","converterProviders","sanitizedServerFeatureProps","converters","converter","push","slateData"],"mappings":"AAEA,SAASA,gBAAgB,EAAEC,iBAAiB,EAAEC,gBAAgB,QAAQ,iBAAgB;AAQtF,SAASC,qBAAqB,QAAQ,8DAA6D;AASnG,OAAO,MAAMC,wBAAwB,CAAC,EACpCC,IAAI,EACJC,MAAM,EACNC,KAAK,EACoB;IACzB,KAAK,MAAMC,SAASF,OAAQ;QAC1B,IAAIL,kBAAkBO,UAAU,CAACN,iBAAiBM,QAAQ;YACxD,IAAIR,iBAAiBQ,UAAU,OAAOH,IAAI,CAACG,MAAMC,IAAI,CAAC,KAAK,UAAU;gBACnEL,sBAAsB;oBACpBC,MAAMA,IAAI,CAACG,MAAMC,IAAI,CAAC;oBACtBH,QAAQE,MAAMF,MAAM;oBACpBC;gBACF;YACF,OAAO;gBACLH,sBAAsB;oBACpBC;oBACAE;oBAEAD,QAAQE,MAAMF,MAAM;gBACtB;YACF;QACF,OAAO,IAAIE,MAAME,IAAI,KAAK,QAAQ;YAChCF,MAAMG,IAAI,CAACC,OAAO,CAAC,CAACC;gBAClBT,sBAAsB;oBACpBC;oBACAE;oBAEAD,QAAQO,IAAIP,MAAM;gBACpB;YACF;QACF,OAAO,IAAIQ,MAAMC,OAAO,CAACV,IAAI,CAACG,MAAMC,IAAI,CAAC,GAAG;YAC1C,IAAID,MAAME,IAAI,KAAK,UAAU;gBAC3BL,IAAI,CAACG,MAAMC,IAAI,CAAC,CAACG,OAAO,CAAC,CAACI,KAAKC;oBAC7B,MAAMC,QAAQV,MAAMW,MAAM,CAACC,IAAI,CAAC,CAAC,EAAEC,IAAI,EAAE,GAAKA,SAASL,KAAKM;oBAC5D,IAAIJ,OAAO;wBACTd,sBAAsB;4BACpBC,MAAMA,IAAI,CAACG,MAAMC,IAAI,CAAC,CAACQ,EAAE;4BACzBV;4BAEAD,QAAQY,MAAMZ,MAAM;wBACtB;oBACF;gBACF;YACF;YAEA,IAAIE,MAAME,IAAI,KAAK,SAAS;gBAC1BL,IAAI,CAACG,MAAMC,IAAI,CAAC,CAACG,OAAO,CAAC,CAACW,GAAGN;oBAC3Bb,sBAAsB;wBACpBC,MAAMA,IAAI,CAACG,MAAMC,IAAI,CAAC,CAACQ,EAAE;wBACzBV;wBAEAD,QAAQE,MAAMF,MAAM;oBACtB;gBACF;YACF;QACF;QAEA,IAAIE,MAAME,IAAI,KAAK,cAAcI,MAAMC,OAAO,CAACV,IAAI,CAACG,MAAMC,IAAI,CAAC,GAAG;YAChE,iBAAiB;YACjB,MAAMe,SAAiChB,MAAMgB,MAAM;YACnD,IAAIA,UAAU,OAAOA,WAAW,UAAU;gBACxC,IAAI,cAAcA,UAAUA,OAAOC,QAAQ,EAAEC,QAAQ;oBACnD,8BAA8B;oBAC9B,MAAMC,wBAAwBH,OAAOI,YAAY,CAACC,kBAAkB,CAACC,GAAG,CAAC;oBACzE,IAAIH,uBAAuB;wBACzB,gBAAgB;wBAEhB,MAAMI,qBAAqB,AACzBJ,sBAAsBK,2BAA2B,CAGjDC,UAAU;wBAEZ,MAAMA,aAAmC,EAAE;wBAE3C,KAAK,MAAMC,aAAaH,mBAAoB;4BAC1CE,WAAWE,IAAI,CAACD,UAAUA,SAAS;wBACrC;wBAEA7B,IAAI,CAACG,MAAMC,IAAI,CAAC,GAAGN,sBAAsB;4BACvC8B;4BACAG,WAAW/B,IAAI,CAACG,MAAMC,IAAI,CAAC;wBAC7B;wBAEAF;oBACF;gBACF;YACF;QACF;IACF;IAEA,OAAOA;AACT,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utilities/recurseNodeTree.ts"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\n// Initialize both flattenedNodes and nodeIDMap\nexport const recurseNodeTree = ({\n flattenedNodes,\n nodeIDMap,\n nodes,\n}: {\n flattenedNodes?: SerializedLexicalNode[]\n nodeIDMap?: {\n [key: string]: SerializedLexicalNode\n }\n nodes: SerializedLexicalNode[]\n}): void => {\n if (!nodes?.length) {\n return\n }\n\n for (const node of nodes) {\n if (flattenedNodes) {\n flattenedNodes.push(node)\n }\n if (nodeIDMap) {\n if (node && 'id' in node && node.id) {\n nodeIDMap[node.id as string] = node\n } else if (\n 'fields' in node &&\n typeof node.fields === 'object' &&\n node.fields &&\n 'id' in node.fields &&\n node?.fields?.id\n ) {\n nodeIDMap[node.fields.id as string] = node\n }\n }\n\n if ('children' in node && Array.isArray(node?.children) && node?.children?.length) {\n recurseNodeTree({\n flattenedNodes,\n nodeIDMap,\n nodes: node.children as SerializedLexicalNode[],\n })\n }\n }\n}\n"],"names":["recurseNodeTree","flattenedNodes","nodeIDMap","nodes","length","node","push","id","fields","Array","isArray","children"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,+CAA+C;AAC/C,OAAO,MAAMA,kBAAkB,CAAC,EAC9BC,cAAc,EACdC,SAAS,EACTC,KAAK,EAON;IACC,IAAI,CAACA,OAAOC,QAAQ;QAClB;IACF;IAEA,KAAK,MAAMC,QAAQF,MAAO;QACxB,IAAIF,gBAAgB;YAClBA,eAAeK,IAAI,CAACD;QACtB;QACA,IAAIH,WAAW;YACb,IAAIG,QAAQ,QAAQA,QAAQA,KAAKE,EAAE,EAAE;gBACnCL,SAAS,CAACG,KAAKE,EAAE,CAAW,GAAGF;YACjC,OAAO,IACL,YAAYA,QACZ,OAAOA,KAAKG,MAAM,KAAK,YACvBH,KAAKG,MAAM,IACX,QAAQH,KAAKG,MAAM,IACnBH,MAAMG,QAAQD,IACd;gBACAL,SAAS,CAACG,KAAKG,MAAM,CAACD,EAAE,CAAW,GAAGF;YACxC;QACF;QAEA,IAAI,cAAcA,QAAQI,MAAMC,OAAO,CAACL,MAAMM,aAAaN,MAAMM,UAAUP,QAAQ;YACjFJ,gBAAgB;gBACdC;gBACAC;gBACAC,OAAOE,KAAKM,QAAQ;YACtB;QACF;IACF;AACF,EAAC"}
1
+ {"version":3,"sources":["../../src/utilities/recurseNodeTree.ts"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\n// Initialize both flattenedNodes and nodeIDMap\nexport const recurseNodeTree = ({\n flattenedNodes,\n nodeIDMap,\n nodes,\n}: {\n flattenedNodes?: SerializedLexicalNode[]\n nodeIDMap?: {\n [key: string]: SerializedLexicalNode\n }\n nodes: SerializedLexicalNode[]\n}): void => {\n if (!nodes?.length) {\n return\n }\n\n for (const node of nodes) {\n if (flattenedNodes) {\n flattenedNodes.push(node)\n }\n if (nodeIDMap) {\n if (node && 'id' in node && node.id) {\n nodeIDMap[node.id as string] = node\n } else if (\n 'fields' in node &&\n typeof node.fields === 'object' &&\n node.fields &&\n 'id' in node.fields &&\n node?.fields?.id\n ) {\n nodeIDMap[node.fields.id as string] = node\n }\n }\n\n if ('children' in node && Array.isArray(node?.children) && node?.children?.length) {\n recurseNodeTree({\n flattenedNodes,\n nodeIDMap,\n nodes: node.children as SerializedLexicalNode[],\n })\n }\n }\n}\n"],"names":["recurseNodeTree","flattenedNodes","nodeIDMap","nodes","length","node","push","id","fields","Array","isArray","children"],"mappings":"AAEA,+CAA+C;AAC/C,OAAO,MAAMA,kBAAkB,CAAC,EAC9BC,cAAc,EACdC,SAAS,EACTC,KAAK,EAON;IACC,IAAI,CAACA,OAAOC,QAAQ;QAClB;IACF;IAEA,KAAK,MAAMC,QAAQF,MAAO;QACxB,IAAIF,gBAAgB;YAClBA,eAAeK,IAAI,CAACD;QACtB;QACA,IAAIH,WAAW;YACb,IAAIG,QAAQ,QAAQA,QAAQA,KAAKE,EAAE,EAAE;gBACnCL,SAAS,CAACG,KAAKE,EAAE,CAAW,GAAGF;YACjC,OAAO,IACL,YAAYA,QACZ,OAAOA,KAAKG,MAAM,KAAK,YACvBH,KAAKG,MAAM,IACX,QAAQH,KAAKG,MAAM,IACnBH,MAAMG,QAAQD,IACd;gBACAL,SAAS,CAACG,KAAKG,MAAM,CAACD,EAAE,CAAW,GAAGF;YACxC;QACF;QAEA,IAAI,cAAcA,QAAQI,MAAMC,OAAO,CAACL,MAAMM,aAAaN,MAAMM,UAAUP,QAAQ;YACjFJ,gBAAgB;gBACdC;gBACAC;gBACAC,OAAOE,KAAKM,QAAQ;YACtB;QACF;IACF;AACF,EAAC"}
@@ -1,3 +1,3 @@
1
- import type { FeatureProviderClient } from '../features/types.js';
1
+ import type { FeatureProviderClient } from '../features/typesClient.js';
2
2
  export declare const useLexicalFeature: <ClientFeatureProps>(featureKey: string, feature: FeatureProviderClient<ClientFeatureProps>) => void;
3
3
  //# sourceMappingURL=useLexicalFeature.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLexicalFeature.d.ts","sourceRoot":"","sources":["../../src/utilities/useLexicalFeature.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAEjE,eAAO,MAAM,iBAAiB,mCAChB,MAAM,WACT,sBAAsB,kBAAkB,CAAC,SAUnD,CAAA"}
1
+ {"version":3,"file":"useLexicalFeature.d.ts","sourceRoot":"","sources":["../../src/utilities/useLexicalFeature.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAEvE,eAAO,MAAM,iBAAiB,GAAI,kBAAkB,cACtC,MAAM,WACT,qBAAqB,CAAC,kBAAkB,CAAC,SAUnD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utilities/useLexicalFeature.tsx"],"sourcesContent":["'use client'\n\nimport { useAddClientFunction, useFieldProps, useTableCell } from '@payloadcms/ui'\n\nimport type { FeatureProviderClient } from '../features/types.js'\n\nexport const useLexicalFeature = <ClientFeatureProps,>(\n featureKey: string,\n feature: FeatureProviderClient<ClientFeatureProps>,\n) => {\n const { schemaPath: schemaPathFromFieldProps } = useFieldProps()\n const tableCell = useTableCell()\n\n const schemaPathFromCellProps = tableCell?.cellProps?.schemaPath\n\n const schemaPath = schemaPathFromCellProps || schemaPathFromFieldProps // schemaPathFromCellProps needs to have priority, as there can be cells within fields (e.g. list drawers) and the cell schemaPath needs to be used there - not the parent field schemaPath. There cannot be fields within cells.\n\n useAddClientFunction(`lexicalFeature.${schemaPath}.${featureKey}`, feature)\n}\n"],"names":["useAddClientFunction","useFieldProps","useTableCell","useLexicalFeature","featureKey","feature","schemaPath","schemaPathFromFieldProps","tableCell","schemaPathFromCellProps","cellProps"],"rangeMappings":";;;;;;;;;","mappings":"AAAA;AAEA,SAASA,oBAAoB,EAAEC,aAAa,EAAEC,YAAY,QAAQ,iBAAgB;AAIlF,OAAO,MAAMC,oBAAoB,CAC/BC,YACAC;IAEA,MAAM,EAAEC,YAAYC,wBAAwB,EAAE,GAAGN;IACjD,MAAMO,YAAYN;IAElB,MAAMO,0BAA0BD,WAAWE,WAAWJ;IAEtD,MAAMA,aAAaG,2BAA2BF,yBAAyB,iOAAiO;;IAExSP,qBAAqB,CAAC,eAAe,EAAEM,WAAW,CAAC,EAAEF,WAAW,CAAC,EAAEC;AACrE,EAAC"}
1
+ {"version":3,"sources":["../../src/utilities/useLexicalFeature.tsx"],"sourcesContent":["'use client'\n\nimport { useAddClientFunction, useFieldProps, useTableCell } from '@payloadcms/ui'\n\nimport type { FeatureProviderClient } from '../features/typesClient.js'\n\nexport const useLexicalFeature = <ClientFeatureProps,>(\n featureKey: string,\n feature: FeatureProviderClient<ClientFeatureProps>,\n) => {\n const { schemaPath: schemaPathFromFieldProps } = useFieldProps()\n const tableCell = useTableCell()\n\n const schemaPathFromCellProps = tableCell?.cellProps?.schemaPath\n\n const schemaPath = schemaPathFromCellProps || schemaPathFromFieldProps // schemaPathFromCellProps needs to have priority, as there can be cells within fields (e.g. list drawers) and the cell schemaPath needs to be used there - not the parent field schemaPath. There cannot be fields within cells.\n\n useAddClientFunction(`lexicalFeature.${schemaPath}.${featureKey}`, feature)\n}\n"],"names":["useAddClientFunction","useFieldProps","useTableCell","useLexicalFeature","featureKey","feature","schemaPath","schemaPathFromFieldProps","tableCell","schemaPathFromCellProps","cellProps"],"mappings":"AAAA;AAEA,SAASA,oBAAoB,EAAEC,aAAa,EAAEC,YAAY,QAAQ,iBAAgB;AAIlF,OAAO,MAAMC,oBAAoB,CAC/BC,YACAC;IAEA,MAAM,EAAEC,YAAYC,wBAAwB,EAAE,GAAGN;IACjD,MAAMO,YAAYN;IAElB,MAAMO,0BAA0BD,WAAWE,WAAWJ;IAEtD,MAAMA,aAAaG,2BAA2BF,yBAAyB,iOAAiO;;IAExSP,qBAAqB,CAAC,eAAe,EAAEM,WAAW,CAAC,EAAEF,WAAW,CAAC,EAAEC;AACrE,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/validate/index.ts"],"sourcesContent":["import type { SerializedEditorState, SerializedParagraphNode } from 'lexical'\nimport type { RichTextField, Validate } from 'payload'\n\nimport type { SanitizedServerEditorConfig } from '../lexical/config/types.js'\n\nimport { validateNodes } from './validateNodes.js'\n\nexport const richTextValidateHOC = ({\n editorConfig,\n}: {\n editorConfig: SanitizedServerEditorConfig\n}) => {\n const richTextValidate: Validate<SerializedEditorState, unknown, unknown, RichTextField> = async (\n value,\n options,\n ) => {\n const {\n req: { t },\n required,\n } = options\n\n if (required) {\n const hasChildren = value?.root?.children?.length\n\n const hasOnlyEmptyParagraph =\n (value?.root?.children?.length === 1 &&\n value?.root?.children[0]?.type === 'paragraph' &&\n (value?.root?.children[0] as SerializedParagraphNode)?.children?.length === 0) ||\n ((value?.root?.children[0] as SerializedParagraphNode)?.children?.length === 1 &&\n (value?.root?.children[0] as SerializedParagraphNode)?.children[0]?.type === 'text' &&\n (value?.root?.children[0] as SerializedParagraphNode)?.children[0]?.['text'] === '')\n\n if (!hasChildren || hasOnlyEmptyParagraph) {\n return t('validation:required')\n }\n }\n\n // Traverse through nodes and validate them. Just like a node can hook into the population process (e.g. link or relationship nodes),\n // they can also hook into the validation process. E.g. a block node probably has fields with validation rules.\n\n const rootNodes = value?.root?.children\n if (rootNodes && Array.isArray(rootNodes) && rootNodes?.length) {\n return await validateNodes({\n nodeValidations: editorConfig.features.validations,\n nodes: rootNodes,\n validation: {\n options,\n value,\n },\n })\n }\n\n return true\n }\n\n return richTextValidate\n}\n"],"names":["validateNodes","richTextValidateHOC","editorConfig","richTextValidate","value","options","req","t","required","hasChildren","root","children","length","hasOnlyEmptyParagraph","type","rootNodes","Array","isArray","nodeValidations","features","validations","nodes","validation"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAKA,SAASA,aAAa,QAAQ,qBAAoB;AAElD,OAAO,MAAMC,sBAAsB,CAAC,EAClCC,YAAY,EAGb;IACC,MAAMC,mBAAqF,OACzFC,OACAC;QAEA,MAAM,EACJC,KAAK,EAAEC,CAAC,EAAE,EACVC,QAAQ,EACT,GAAGH;QAEJ,IAAIG,UAAU;YACZ,MAAMC,cAAcL,OAAOM,MAAMC,UAAUC;YAE3C,MAAMC,wBACJ,AAACT,OAAOM,MAAMC,UAAUC,WAAW,KACjCR,OAAOM,MAAMC,QAAQ,CAAC,EAAE,EAAEG,SAAS,eACnC,AAACV,OAAOM,MAAMC,QAAQ,CAAC,EAAE,EAA8BA,UAAUC,WAAW,KAC7E,AAACR,OAAOM,MAAMC,QAAQ,CAAC,EAAE,EAA8BA,UAAUC,WAAW,KAC3E,AAACR,OAAOM,MAAMC,QAAQ,CAAC,EAAE,EAA8BA,QAAQ,CAAC,EAAE,EAAEG,SAAS,UAC7E,AAACV,OAAOM,MAAMC,QAAQ,CAAC,EAAE,EAA8BA,QAAQ,CAAC,EAAE,EAAE,CAAC,OAAO,KAAK;YAErF,IAAI,CAACF,eAAeI,uBAAuB;gBACzC,OAAON,EAAE;YACX;QACF;QAEA,qIAAqI;QACrI,+GAA+G;QAE/G,MAAMQ,YAAYX,OAAOM,MAAMC;QAC/B,IAAII,aAAaC,MAAMC,OAAO,CAACF,cAAcA,WAAWH,QAAQ;YAC9D,OAAO,MAAMZ,cAAc;gBACzBkB,iBAAiBhB,aAAaiB,QAAQ,CAACC,WAAW;gBAClDC,OAAON;gBACPO,YAAY;oBACVjB;oBACAD;gBACF;YACF;QACF;QAEA,OAAO;IACT;IAEA,OAAOD;AACT,EAAC"}
1
+ {"version":3,"sources":["../../src/validate/index.ts"],"sourcesContent":["import type { SerializedEditorState, SerializedParagraphNode } from 'lexical'\nimport type { RichTextField, Validate } from 'payload'\n\nimport type { SanitizedServerEditorConfig } from '../lexical/config/types.js'\n\nimport { validateNodes } from './validateNodes.js'\n\nexport const richTextValidateHOC = ({\n editorConfig,\n}: {\n editorConfig: SanitizedServerEditorConfig\n}) => {\n const richTextValidate: Validate<SerializedEditorState, unknown, unknown, RichTextField> = async (\n value,\n options,\n ) => {\n const {\n req: { t },\n required,\n } = options\n\n if (required) {\n const hasChildren = value?.root?.children?.length\n\n const hasOnlyEmptyParagraph =\n (value?.root?.children?.length === 1 &&\n value?.root?.children[0]?.type === 'paragraph' &&\n (value?.root?.children[0] as SerializedParagraphNode)?.children?.length === 0) ||\n ((value?.root?.children[0] as SerializedParagraphNode)?.children?.length === 1 &&\n (value?.root?.children[0] as SerializedParagraphNode)?.children[0]?.type === 'text' &&\n (value?.root?.children[0] as SerializedParagraphNode)?.children[0]?.['text'] === '')\n\n if (!hasChildren || hasOnlyEmptyParagraph) {\n return t('validation:required')\n }\n }\n\n // Traverse through nodes and validate them. Just like a node can hook into the population process (e.g. link or relationship nodes),\n // they can also hook into the validation process. E.g. a block node probably has fields with validation rules.\n\n const rootNodes = value?.root?.children\n if (rootNodes && Array.isArray(rootNodes) && rootNodes?.length) {\n return await validateNodes({\n nodeValidations: editorConfig.features.validations,\n nodes: rootNodes,\n validation: {\n options,\n value,\n },\n })\n }\n\n return true\n }\n\n return richTextValidate\n}\n"],"names":["validateNodes","richTextValidateHOC","editorConfig","richTextValidate","value","options","req","t","required","hasChildren","root","children","length","hasOnlyEmptyParagraph","type","rootNodes","Array","isArray","nodeValidations","features","validations","nodes","validation"],"mappings":"AAKA,SAASA,aAAa,QAAQ,qBAAoB;AAElD,OAAO,MAAMC,sBAAsB,CAAC,EAClCC,YAAY,EAGb;IACC,MAAMC,mBAAqF,OACzFC,OACAC;QAEA,MAAM,EACJC,KAAK,EAAEC,CAAC,EAAE,EACVC,QAAQ,EACT,GAAGH;QAEJ,IAAIG,UAAU;YACZ,MAAMC,cAAcL,OAAOM,MAAMC,UAAUC;YAE3C,MAAMC,wBACJ,AAACT,OAAOM,MAAMC,UAAUC,WAAW,KACjCR,OAAOM,MAAMC,QAAQ,CAAC,EAAE,EAAEG,SAAS,eACnC,AAACV,OAAOM,MAAMC,QAAQ,CAAC,EAAE,EAA8BA,UAAUC,WAAW,KAC7E,AAACR,OAAOM,MAAMC,QAAQ,CAAC,EAAE,EAA8BA,UAAUC,WAAW,KAC3E,AAACR,OAAOM,MAAMC,QAAQ,CAAC,EAAE,EAA8BA,QAAQ,CAAC,EAAE,EAAEG,SAAS,UAC7E,AAACV,OAAOM,MAAMC,QAAQ,CAAC,EAAE,EAA8BA,QAAQ,CAAC,EAAE,EAAE,CAAC,OAAO,KAAK;YAErF,IAAI,CAACF,eAAeI,uBAAuB;gBACzC,OAAON,EAAE;YACX;QACF;QAEA,qIAAqI;QACrI,+GAA+G;QAE/G,MAAMQ,YAAYX,OAAOM,MAAMC;QAC/B,IAAII,aAAaC,MAAMC,OAAO,CAACF,cAAcA,WAAWH,QAAQ;YAC9D,OAAO,MAAMZ,cAAc;gBACzBkB,iBAAiBhB,aAAaiB,QAAQ,CAACC,WAAW;gBAClDC,OAAON;gBACPO,YAAY;oBACVjB;oBACAD;gBACF;YACF;QACF;QAEA,OAAO;IACT;IAEA,OAAOD;AACT,EAAC"}
@@ -1,6 +1,6 @@
1
1
  import type { SerializedEditorState, SerializedLexicalNode } from 'lexical';
2
2
  import type { RichTextField, ValidateOptions } from 'payload';
3
- import type { NodeValidation } from '../features/types.js';
3
+ import type { NodeValidation } from '../features/typesServer.js';
4
4
  export declare function validateNodes({ nodeValidations, nodes, validation: validationFromProps, }: {
5
5
  nodeValidations: Map<string, Array<NodeValidation>>;
6
6
  nodes: SerializedLexicalNode[];
@@ -1 +1 @@
1
- {"version":3,"file":"validateNodes.d.ts","sourceRoot":"","sources":["../../src/validate/validateNodes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAC3E,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D,wBAAsB,aAAa,CAAC,EAClC,eAAe,EACf,KAAK,EACL,UAAU,EAAE,mBAAmB,GAChC,EAAE;IACD,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,CAAA;IACnD,KAAK,EAAE,qBAAqB,EAAE,CAAA;IAC9B,UAAU,EAAE;QACV,OAAO,EAAE,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,CAAC,CAAA;QACzD,KAAK,EAAE,qBAAqB,CAAA;KAC7B,CAAA;CACF,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAmCzB"}
1
+ {"version":3,"file":"validateNodes.d.ts","sourceRoot":"","sources":["../../src/validate/validateNodes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAC3E,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAEhE,wBAAsB,aAAa,CAAC,EAClC,eAAe,EACf,KAAK,EACL,UAAU,EAAE,mBAAmB,GAChC,EAAE;IACD,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,CAAA;IACnD,KAAK,EAAE,qBAAqB,EAAE,CAAA;IAC9B,UAAU,EAAE;QACV,OAAO,EAAE,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,CAAC,CAAA;QACzD,KAAK,EAAE,qBAAqB,CAAA;KAC7B,CAAA;CACF,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAmCzB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/validate/validateNodes.ts"],"sourcesContent":["import type { SerializedEditorState, SerializedLexicalNode } from 'lexical'\nimport type { RichTextField, ValidateOptions } from 'payload'\n\nimport type { NodeValidation } from '../features/types.js'\n\nexport async function validateNodes({\n nodeValidations,\n nodes,\n validation: validationFromProps,\n}: {\n nodeValidations: Map<string, Array<NodeValidation>>\n nodes: SerializedLexicalNode[]\n validation: {\n options: ValidateOptions<unknown, unknown, RichTextField>\n value: SerializedEditorState\n }\n}): Promise<string | true> {\n for (const node of nodes) {\n // Validate node\n if (\n nodeValidations &&\n typeof nodeValidations?.has === 'function' &&\n nodeValidations?.has(node.type)\n ) {\n const validations = nodeValidations.get(node.type)\n for (const validation of validations) {\n const validationResult = await validation({\n node,\n nodeValidations,\n validation: validationFromProps,\n })\n if (validationResult !== true) {\n return `${node.type} node failed to validate: ${validationResult}`\n }\n }\n }\n\n // Validate node's children\n if ('children' in node && node?.children) {\n const childrenValidationResult = await validateNodes({\n nodeValidations,\n nodes: node.children as SerializedLexicalNode[],\n validation: validationFromProps,\n })\n if (childrenValidationResult !== true) {\n return childrenValidationResult\n }\n }\n }\n\n return true\n}\n"],"names":["validateNodes","nodeValidations","nodes","validation","validationFromProps","node","has","type","validations","get","validationResult","children","childrenValidationResult"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAKA,OAAO,eAAeA,cAAc,EAClCC,eAAe,EACfC,KAAK,EACLC,YAAYC,mBAAmB,EAQhC;IACC,KAAK,MAAMC,QAAQH,MAAO;QACxB,gBAAgB;QAChB,IACED,mBACA,OAAOA,iBAAiBK,QAAQ,cAChCL,iBAAiBK,IAAID,KAAKE,IAAI,GAC9B;YACA,MAAMC,cAAcP,gBAAgBQ,GAAG,CAACJ,KAAKE,IAAI;YACjD,KAAK,MAAMJ,cAAcK,YAAa;gBACpC,MAAME,mBAAmB,MAAMP,WAAW;oBACxCE;oBACAJ;oBACAE,YAAYC;gBACd;gBACA,IAAIM,qBAAqB,MAAM;oBAC7B,OAAO,CAAC,EAAEL,KAAKE,IAAI,CAAC,0BAA0B,EAAEG,iBAAiB,CAAC;gBACpE;YACF;QACF;QAEA,2BAA2B;QAC3B,IAAI,cAAcL,QAAQA,MAAMM,UAAU;YACxC,MAAMC,2BAA2B,MAAMZ,cAAc;gBACnDC;gBACAC,OAAOG,KAAKM,QAAQ;gBACpBR,YAAYC;YACd;YACA,IAAIQ,6BAA6B,MAAM;gBACrC,OAAOA;YACT;QACF;IACF;IAEA,OAAO;AACT"}
1
+ {"version":3,"sources":["../../src/validate/validateNodes.ts"],"sourcesContent":["import type { SerializedEditorState, SerializedLexicalNode } from 'lexical'\nimport type { RichTextField, ValidateOptions } from 'payload'\n\nimport type { NodeValidation } from '../features/typesServer.js'\n\nexport async function validateNodes({\n nodeValidations,\n nodes,\n validation: validationFromProps,\n}: {\n nodeValidations: Map<string, Array<NodeValidation>>\n nodes: SerializedLexicalNode[]\n validation: {\n options: ValidateOptions<unknown, unknown, RichTextField>\n value: SerializedEditorState\n }\n}): Promise<string | true> {\n for (const node of nodes) {\n // Validate node\n if (\n nodeValidations &&\n typeof nodeValidations?.has === 'function' &&\n nodeValidations?.has(node.type)\n ) {\n const validations = nodeValidations.get(node.type)\n for (const validation of validations) {\n const validationResult = await validation({\n node,\n nodeValidations,\n validation: validationFromProps,\n })\n if (validationResult !== true) {\n return `${node.type} node failed to validate: ${validationResult}`\n }\n }\n }\n\n // Validate node's children\n if ('children' in node && node?.children) {\n const childrenValidationResult = await validateNodes({\n nodeValidations,\n nodes: node.children as SerializedLexicalNode[],\n validation: validationFromProps,\n })\n if (childrenValidationResult !== true) {\n return childrenValidationResult\n }\n }\n }\n\n return true\n}\n"],"names":["validateNodes","nodeValidations","nodes","validation","validationFromProps","node","has","type","validations","get","validationResult","children","childrenValidationResult"],"mappings":"AAKA,OAAO,eAAeA,cAAc,EAClCC,eAAe,EACfC,KAAK,EACLC,YAAYC,mBAAmB,EAQhC;IACC,KAAK,MAAMC,QAAQH,MAAO;QACxB,gBAAgB;QAChB,IACED,mBACA,OAAOA,iBAAiBK,QAAQ,cAChCL,iBAAiBK,IAAID,KAAKE,IAAI,GAC9B;YACA,MAAMC,cAAcP,gBAAgBQ,GAAG,CAACJ,KAAKE,IAAI;YACjD,KAAK,MAAMJ,cAAcK,YAAa;gBACpC,MAAME,mBAAmB,MAAMP,WAAW;oBACxCE;oBACAJ;oBACAE,YAAYC;gBACd;gBACA,IAAIM,qBAAqB,MAAM;oBAC7B,OAAO,CAAC,EAAEL,KAAKE,IAAI,CAAC,0BAA0B,EAAEG,iBAAiB,CAAC;gBACpE;YACF;QACF;QAEA,2BAA2B;QAC3B,IAAI,cAAcL,QAAQA,MAAMM,UAAU;YACxC,MAAMC,2BAA2B,MAAMZ,cAAc;gBACnDC;gBACAC,OAAOG,KAAKM,QAAQ;gBACpBR,YAAYC;YACd;YACA,IAAIQ,6BAA6B,MAAM;gBACrC,OAAOA;YACT;QACF;IACF;IAEA,OAAO;AACT"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/richtext-lexical",
3
- "version": "3.0.0-beta.53",
3
+ "version": "3.0.0-beta.55",
4
4
  "description": "The officially supported Lexical richtext adapter for Payload",
5
5
  "homepage": "https://payloadcms.com",
6
6
  "repository": {
@@ -41,7 +41,7 @@
41
41
  "@lexical/utils": "0.16.0",
42
42
  "@types/uuid": "^9.0.8",
43
43
  "bson-objectid": "2.0.4",
44
- "deep-equal": "2.2.3",
44
+ "dequal": "2.0.3",
45
45
  "json-schema": "^0.4.0",
46
46
  "lexical": "0.16.0",
47
47
  "react-error-boundary": "4.0.13",
@@ -56,10 +56,10 @@
56
56
  "esbuild": "^0.21.4",
57
57
  "esbuild-sass-plugin": "^3.3.0",
58
58
  "@payloadcms/eslint-config": "1.1.1",
59
- "@payloadcms/next": "3.0.0-beta.53",
60
- "@payloadcms/ui": "3.0.0-beta.53",
61
- "@payloadcms/translations": "3.0.0-beta.53",
62
- "payload": "3.0.0-beta.53"
59
+ "@payloadcms/next": "3.0.0-beta.55",
60
+ "@payloadcms/ui": "3.0.0-beta.55",
61
+ "@payloadcms/translations": "3.0.0-beta.55",
62
+ "payload": "3.0.0-beta.55"
63
63
  },
64
64
  "peerDependencies": {
65
65
  "@faceless-ui/modal": "3.0.0-beta.0",
@@ -76,10 +76,10 @@
76
76
  "lexical": "0.16.0",
77
77
  "react": "^19.0.0 || ^19.0.0-rc-f994737d14-20240522",
78
78
  "react-dom": "^19.0.0 || ^19.0.0-rc-f994737d14-20240522",
79
- "@payloadcms/next": "3.0.0-beta.53",
80
- "@payloadcms/translations": "3.0.0-beta.53",
81
- "@payloadcms/ui": "3.0.0-beta.53",
82
- "payload": "3.0.0-beta.53"
79
+ "@payloadcms/next": "3.0.0-beta.55",
80
+ "@payloadcms/ui": "3.0.0-beta.55",
81
+ "@payloadcms/translations": "3.0.0-beta.55",
82
+ "payload": "3.0.0-beta.55"
83
83
  },
84
84
  "engines": {
85
85
  "node": "^18.20.2 || >=20.9.0"
@@ -1,2 +0,0 @@
1
- "use client";import{a as he,b as G,c as O,e as Ee}from"./chunk-ZITHDR53.js";import{a as ye,b as N}from"./chunk-3K3B6PJM.js";import{FieldDescription as Nn,FieldError as wn,FieldLabel as In,useField as Pn,useFieldProps as On,withCondition as kn}from"@payloadcms/ui";import{useCallback as An}from"react";import{ErrorBoundary as Dn}from"react-error-boundary";import{LexicalComposer as vn}from"@lexical/react/LexicalComposer.js";import*as ct from"react";import{useMemo as st}from"react";import{useLexicalComposerContext as En}from"@lexical/react/LexicalComposerContext.js";import{LexicalErrorBoundary as xn}from"@lexical/react/LexicalErrorBoundary.js";import{HistoryPlugin as bn}from"@lexical/react/LexicalHistoryPlugin.js";import{OnChangePlugin as Mn}from"@lexical/react/LexicalOnChangePlugin.js";import{RichTextPlugin as Cn}from"@lexical/react/LexicalRichTextPlugin.js";import{TabIndentationPlugin as Tn}from"@lexical/react/LexicalTabIndentationPlugin.js";import{useTranslation as Rn}from"@payloadcms/ui";import{BLUR_COMMAND as Sn,COMMAND_PRIORITY_LOW as rt,FOCUS_COMMAND as Ln}from"lexical";import*as X from"react";import{useEffect as it,useState as lt}from"react";import{jsx as xe}from"react/jsx-runtime";var F=({anchorElem:t,clientProps:e,plugin:n})=>n.position==="floatingAnchorElem"?n.Component&&xe(n.Component,{anchorElem:t,clientProps:e}):n.Component&&xe(n.Component,{clientProps:e});import{MarkdownShortcutPlugin as ft}from"@lexical/react/LexicalMarkdownShortcutPlugin.js";import{jsx as pt}from"react/jsx-runtime";var be=()=>{let{editorConfig:t}=N();return pt(ft,{transformers:t.features.markdownTransformers})};import{useLexicalComposerContext as Kt}from"@lexical/react/LexicalComposerContext.js";import{useTranslation as Fe}from"@payloadcms/ui";import{useCallback as Be,useMemo as Gt,useState as Wt}from"react";import*as He from"react";import*as _e from"react-dom";import{useLexicalComposerContext as Ot}from"@lexical/react/LexicalComposerContext.js";import{mergeRegister as kt}from"@lexical/utils";import{$getSelection as ue,$isRangeSelection as me,$isTextNode as At,COMMAND_PRIORITY_LOW as Dt,createCommand as Bt}from"lexical";import{useCallback as Ne,useEffect as we,useState as Ft}from"react";import*as ce from"react";import{useLexicalComposerContext as Se}from"@lexical/react/LexicalComposerContext.js";import{mergeRegister as Me}from"@lexical/utils";import{$getSelection as gt,$isRangeSelection as ht,COMMAND_PRIORITY_LOW as W,KEY_ARROW_DOWN_COMMAND as yt,KEY_ARROW_UP_COMMAND as Et,KEY_ENTER_COMMAND as xt,KEY_ESCAPE_COMMAND as bt,KEY_TAB_COMMAND as Mt,createCommand as Ct}from"lexical";import{useCallback as J,useEffect as Y,useLayoutEffect as Tt,useMemo as Rt,useRef as St,useState as Lt}from"react";var vt="slash-menu-popup",Ce=t=>{let e=document.getElementById("slash-menu");if(!e)return;let n=e.getBoundingClientRect();n.top+n.height>window.innerHeight&&e.scrollIntoView({block:"center"}),n.top<0&&e.scrollIntoView({block:"center"}),t.scrollIntoView({block:"nearest"})};function Nt(t,e,n){let o=n;for(let r=o;r<=e.length;r++)t.substring(t.length-r)===e.substring(0,r)&&(o=r);return o}function wt(t){let e=gt();if(!ht(e)||!e.isCollapsed())return null;let n=e.anchor;if(n.type!=="text")return null;let o=n.getNode();if(!o.isSimpleText())return null;let r=n.offset,u=o.getTextContent().slice(0,r),d=t.replaceableString.length,g=Nt(u,t.matchingString,d),s=r-g;if(s<0)return null;let a;return s===0?[a]=o.splitText(r):[,a]=o.splitText(s,r),a}function It(t,e){let n=getComputedStyle(t),o=n.position==="absolute",r=e?/(auto|scroll|hidden)/:/(auto|scroll)/;if(n.position==="fixed")return document.body;for(let u=t;u=u.parentElement;)if(n=getComputedStyle(u),!(o&&n.position==="static")&&r.test(n.overflow+n.overflowY+n.overflowX))return u;return document.body}function Te(t,e){let n=t.getBoundingClientRect(),o=e.getBoundingClientRect();return n.top>o.top&&n.top<o.bottom}function Pt(t,e,n,o){let[r]=Se();Y(()=>{if(e!=null&&t!=null){let u=r.getRootElement(),d=u!=null?It(u,!1):document.body,g=!1,s=Te(e,d),a=function(){g||(window.requestAnimationFrame(function(){n(),g=!1}),g=!0);let m=Te(e,d);m!==s&&(s=m,o?.(m))},c=new ResizeObserver(n);return window.addEventListener("resize",n),document.addEventListener("scroll",a,{capture:!0,passive:!0}),c.observe(e),()=>{c.unobserve(e),window.removeEventListener("resize",n),document.removeEventListener("scroll",a,!0)}}},[e,r,o,n,t])}var Re=Ct("SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND");function Le({anchorElementRef:t,close:e,editor:n,groups:o,menuRenderFn:r,onSelectItem:u,resolution:d,shouldSplitNodeWithQuery:g=!1}){let[s,a]=Lt(null),c=d.match&&d.match.matchingString||"",m=J(p=>{let f=n.getRootElement();f!==null&&(f.setAttribute("aria-activedescendant",`${vt}__item-${p.key}`),a(p.key))},[n]),i=J(()=>{if(o!==null&&c!=null){let p=o.flatMap(f=>f.items);if(p.length){let f=p[0];m(f)}}},[o,m,c]);Y(()=>{i()},[c,i]);let l=J(p=>{n.update(()=>{let f=d.match!=null&&g?wt(d.match):null;u(p,f,e,d.match?d.match.matchingString:"")})},[n,g,d.match,u,e]);Y(()=>()=>{let p=n.getRootElement();p!==null&&p.removeAttribute("aria-activedescendant")},[n]),Tt(()=>{o===null?a(null):s===null&&i()},[o,s,m,i]),Y(()=>Me(n.registerCommand(Re,({item:p})=>p.ref&&p.ref.current!=null?(Ce(p.ref.current),!0):!1,W)),[n,m]),Y(()=>Me(n.registerCommand(yt,p=>{let f=p;if(o!==null&&o.length&&s!==null){let y=o.flatMap(b=>b.items),h=y.findIndex(b=>b.key===s),x=h!==y.length-1?h+1:0,M=y[x];m(M),M.ref!=null&&M.ref.current&&n.dispatchCommand(Re,{index:x,item:M}),f.preventDefault(),f.stopImmediatePropagation()}return!0},W),n.registerCommand(Et,p=>{let f=p;if(o!==null&&o.length&&s!==null){let y=o.flatMap(b=>b.items),h=y.findIndex(b=>b.key===s),x=h!==0?h-1:y.length-1,M=y[x];m(M),M.ref!=null&&M.ref.current&&Ce(M.ref.current),f.preventDefault(),f.stopImmediatePropagation()}return!0},W),n.registerCommand(bt,p=>{let f=p;return f.preventDefault(),f.stopImmediatePropagation(),e(),!0},W),n.registerCommand(Mt,p=>{let f=p;if(o===null||s===null)return!1;let h=o.flatMap(x=>x.items).find(x=>x.key===s);return h?(f.preventDefault(),f.stopImmediatePropagation(),l(h),!0):!1},W),n.registerCommand(xt,p=>{if(o===null||s===null)return!1;let y=o.flatMap(h=>h.items).find(h=>h.key===s);return y?(p!==null&&(p.preventDefault(),p.stopImmediatePropagation()),l(y),!0):!1},W)),[l,e,n,o,s,m]);let E=Rt(()=>({groups:o,selectItemAndCleanUp:l,selectedItemKey:s,setSelectedItemKey:a}),[l,s,o]);return r(t,E,d.match?d.match.matchingString:"")}function ve(t,e,n,o){let[r]=Se(),u=St(document.createElement("div")),d=J(()=>{let s=r.getRootElement(),a=u.current,c=32,m=a.firstChild;if(s!==null&&e!==null){let{height:i,width:l}=e.getRect(),{left:E,top:p}=e.getRect(),f=p;if(p-=t.getBoundingClientRect().top+window.scrollY,E-=t.getBoundingClientRect().left+window.scrollX,a.style.left=`${E+window.scrollX}px`,a.style.height=`${i}px`,a.style.width=`${l}px`,m!==null){let y=m.getBoundingClientRect(),h=y.height,x=y.width,M=s.getBoundingClientRect();E+x>M.right&&(a.style.left=`${M.right-x+window.scrollX}px`);let b=f+h+c>window.innerHeight,T=f<0;b&&!T?a.style.top=`${p+c-h+window.scrollY-(i+24)}px`:a.style.top=`${p+window.scrollY+c}px`}a.isConnected||(o!=null&&(a.className=o),a.setAttribute("aria-label","Slash menu"),a.setAttribute("id","slash-menu"),a.setAttribute("role","listbox"),a.style.display="block",a.style.position="absolute",t.append(a)),u.current=a,s.setAttribute("aria-controls","slash-menu")}},[r,e,o,t]);Y(()=>{let s=r.getRootElement();if(e!==null)return d(),()=>{s!==null&&s.removeAttribute("aria-controls");let a=u.current;a!==null&&a.isConnected&&a.remove()}},[r,d,e]);let g=J(s=>{e!==null&&(s||n(null))},[e,n]);return Pt(e,u.current,d,g),u}import{jsx as $t}from"react/jsx-runtime";var ke=`\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'"~=<>_:;`;function Ht(t){let e=t.anchor;if(e.type!=="text")return null;let n=e.getNode();if(!n.isSimpleText())return null;let o=e.offset;return n.getTextContent().slice(0,o)}function Ie(t,e,n){let o=n.getSelection();if(o===null||!o.isCollapsed)return!1;let r=o.anchorNode,u=t,d=o.anchorOffset;if(r==null||d==null)return!1;try{e.setStart(r,u),e.setEnd(r,d>1?d:1)}catch{return!1}return!0}function _t(t){let e=null;return t.getEditorState().read(()=>{let n=ue();me(n)&&(e=Ht(n))}),e}function Pe(t,e){return e!==0?!1:t.getEditorState().read(()=>{let n=ue();if(me(n)){let u=n.anchor.getNode().getPreviousSibling();return At(u)&&u.isTextEntity()}return!1})}function Oe(t){ce.startTransition?ce.startTransition(t):t()}var de=Bt("ENABLE_SLASH_MENU_COMMAND");function Ae({anchorClassName:t,anchorElem:e,groups:n,menuRenderFn:o,onClose:r,onOpen:u,onQueryChange:d,onSelectItem:g,triggerFn:s}){let[a]=Ot(),[c,m]=Ft(null),i=ve(e,c,m,t),l=Ne(()=>{m(null),r!=null&&c!==null&&r()},[r,c]),E=Ne(p=>{m(p),u!=null&&c===null&&u(p)},[u,c]);return we(()=>kt(a.registerCommand(de,({node:p})=>(a.getEditorState().read(()=>{let f={leadOffset:0,matchingString:"",replaceableString:""};if(f!==null&&!Pe(a,f.leadOffset)&&p!==null){let y=a._window??window,h=y.document.createRange();Ie(f.leadOffset,h,y)!==null&&Oe(()=>E({getRect:()=>h.getBoundingClientRect(),match:f}));return}}),!0),Dt)),[a,E]),we(()=>{let p=()=>{a.getEditorState().read(()=>{let y=a._window??window,h=y.document.createRange(),x=ue(),M=_t(a);if(!me(x)||!x.isCollapsed()||M===null||h===null){l();return}let b=s({editor:a,query:M});if(d(b?b.matchingString:null),b!==null&&!Pe(a,b.leadOffset)&&Ie(b.leadOffset,h,y)!==null){Oe(()=>E({getRect:()=>h.getBoundingClientRect(),match:b}));return}l()})},f=a.registerUpdateListener(p);return()=>{f()}},[a,s,d,c,l,E]),c===null||a===null?null:$t(Le,{anchorElementRef:i,close:l,editor:a,groups:n,menuRenderFn:o,onSelectItem:g,resolution:c,shouldSplitNodeWithQuery:!0})}import{useCallback as zt}from"react";function De(t,{maxLength:e=75,minLength:n=1}){return zt(({query:o})=>{let r="[^"+t+ke+"\\s]",d=new RegExp("(^|\\s|\\()(["+t+"]((?:"+r+"){0,"+e+"}))$").exec(o);if(d!==null){let g=d[1],s=d[3];if(s.length>=n)return{leadOffset:d.index+g.length,matchingString:s,replaceableString:d[2]}}return null},[e,n,t])}import{jsx as H,jsxs as ze}from"react/jsx-runtime";var I="slash-menu-popup";function Yt({isSelected:t,item:e,onClick:n,onMouseEnter:o}){let{i18n:r}=Fe(),u=`${I}__item ${I}__item-${e.key}`;t&&(u+=` ${I}__item--selected`);let d=e.key;return e.label&&(d=typeof e.label=="function"?e.label({i18n:r}):e.label),d.length>25&&(d=d.substring(0,25)+"..."),ze("button",{"aria-selected":t,className:u,id:I+"__item-"+e.key,onClick:n,onMouseEnter:o,ref:e.ref,role:"option",tabIndex:-1,type:"button",children:[e?.Icon&&H(e.Icon,{}),H("span",{className:`${I}__item-text`,children:d})]},e.key)}function $e({anchorElem:t=document.body}){let[e]=Kt(),[n,o]=Wt(null),{editorConfig:r}=N(),{i18n:u}=Fe(),d=De("/",{minLength:0}),g=Be(()=>{let c=[];for(let m of r.features.slashMenu.dynamicGroups){let i=m({editor:e,queryString:n});c=c.concat(i)}return c},[e,n,r?.features]),s=Gt(()=>{let c=[];for(let m of r?.features.slashMenu.groups??[])c.push(m);if(n){c=c.map(i=>{let l=i.items.filter(E=>{let p=E.key;return E.label&&(p=typeof E.label=="function"?E.label({i18n:u}):E.label),new RegExp(n,"gi").exec(p)?!0:E.keywords!=null?E.keywords.some(f=>new RegExp(n,"gi").exec(f)):!1});return l.length?{...i,items:l}:null}),c=c.filter(i=>i!=null);let m=g();for(let i of m){let l=c.find(E=>E.key===i.key);l?c=c.filter(E=>E.key!==i.key):l={...i,items:[]},l?.items?.length&&(l.items=l.items.concat(l.items)),c.push(l)}}return c},[g,n,r?.features,u]),a=Be((c,m,i,l)=>{m&&e.update(()=>{m.remove()}),c.onSelect({editor:e,queryString:l}),i()},[e]);return H(He.Fragment,{children:H(Ae,{anchorElem:t,groups:s,menuRenderFn:(c,{selectItemAndCleanUp:m,selectedItemKey:i,setSelectedItemKey:l})=>c.current&&s.length?_e.createPortal(H("div",{className:I,children:s.map(E=>{let p=E.key;return E.label&&(p=typeof E.label=="function"?E.label({i18n:u}):E.label),ze("div",{className:`${I}__group ${I}__group-${E.key}`,children:[H("div",{className:`${I}__group-title`,children:p}),E.items.map((f,y)=>H(Yt,{index:y,isSelected:i===f.key,item:f,onClick:()=>{l(f.key),m(f)},onMouseEnter:()=>{l(f.key)}},f.key))]},E.key)})}),c.current):null,onQueryChange:o,onSelectItem:a,triggerFn:d})})}import{useLexicalComposerContext as qt}from"@lexical/react/LexicalComposerContext.js";import{$createParagraphNode as Qt}from"lexical";import*as Ye from"react";import{useCallback as Zt,useEffect as We,useRef as en,useState as tn}from"react";import{createPortal as nn}from"react-dom";var V=(t,e,n,o,r=50,u=25)=>{let d=0;if(t&&!t.contains(o)){let{bottom:g,left:s,right:a,top:c}=t.getBoundingClientRect(),m=c+window.scrollY,i=g+window.scrollY;if(n<m-u||n>i+u||e<s-r||e>a+r)return-1;(e<s||e>a)&&(d=e<s?e-s:e-a)}return d};import{$getNodeByKey as ee}from"lexical";function k(t){let e=t.getBoundingClientRect(),n=getComputedStyle(t).getPropertyValue("transform");if(!n||n==="none")return e;let o=n.split(",").pop();return e.y=e.y-Number(o.replace(")","")),e}function Z(t){let e=(s,a)=>s?parseFloat(window.getComputedStyle(s)[a]):0,{marginBottom:n,marginTop:o}=window.getComputedStyle(t),r=e(t.previousElementSibling,"marginBottom"),u=e(t.nextElementSibling,"marginTop"),d=Math.max(parseFloat(o),r);return{marginBottom:Math.max(parseFloat(n),u),marginTop:d}}import{$getRoot as Vt}from"lexical";function _(t){return t.getEditorState().read(()=>Vt().getChildrenKeys())}var Ut=1,jt=-1,Ke=0,P={props:null,result:null};function Xt(t,e,n=20){let o=t.x-e.x,r=t.y-e.y;return o*o+r*r<=n*n}function U(t){let{anchorElem:e,cache_threshold:n=20,editor:o,fuzzy:r=!1,horizontalOffset:u=0,point:{x:d,y:g},startIndex:s=0,useEdgeAsDefault:a=!1,verbose:c=!1}=t;if(n>0&&P.props&&P.result&&P.props.fuzzy===t.fuzzy&&P.props.horizontalOffset===t.horizontalOffset&&P.props.useEdgeAsDefault===t.useEdgeAsDefault&&Xt(P.props.point,t.point,n))return P.result;let m=e.getBoundingClientRect(),i=_(o),l={blockElem:null,blockNode:null,distance:1/0,foundAtIndex:-1,isFoundNodeEmptyParagraph:!1};return o.getEditorState().read(()=>{if(a){let[f,y]=[o.getElementByKey(i[0]),o.getElementByKey(i[i.length-1])],[h,x]=[k(f),k(y)];if(h&&x&&(g<h.top?(l.blockElem=f,l.distance=h.top-g,l.blockNode=ee(i[0]),l.foundAtIndex=0):g>x.bottom&&(l.distance=g-x.bottom,l.blockNode=ee(i[i.length-1]),l.blockElem=y,l.foundAtIndex=i.length-1),l?.blockElem))return{blockElem:null,isFoundNodeEmptyParagraph:!1}}let E=s,p=Ke;for(;E>=0&&E<i.length;){let f=i[E],y=o.getElementByKey(f);if(y===null)break;let h=new O(d+u,g),x=Ee.fromDOMRect(k(y)),{marginBottom:M,marginTop:b}=Z(y),T=x.generateNewRect({bottom:x.bottom+M,left:m.left,right:m.right,top:x.top-b}),{distance:L,isOnBottomSide:C,isOnTopSide:A}=T.distanceFromPoint(h);if(L===0){l.blockElem=y,l.blockNode=ee(f),l.foundAtIndex=E,l.distance=L,l.blockNode&&l.blockNode.getType()==="paragraph"&&l.blockNode.getTextContent()===""&&(!r&&!t.returnEmptyParagraphs&&(l.blockElem=null,l.blockNode=null),l.isFoundNodeEmptyParagraph=!0);break}else r&&L<l.distance&&(l.blockElem=y,l.blockNode=ee(f),l.distance=L,l.foundAtIndex=E);p===Ke&&(A?p=jt:C?p=Ut:p=1/0),E+=p}}),P.props=t,P.result={blockElem:l.blockElem,blockNode:l.blockNode,foundAtIndex:l.foundAtIndex,isFoundNodeEmptyParagraph:l.isFoundNodeEmptyParagraph},{blockElem:l.blockElem,blockNode:l.blockNode,foundAtIndex:l.foundAtIndex,isFoundNodeEmptyParagraph:l.isFoundNodeEmptyParagraph}}function te(t,e){return!!t.closest(`.${e}`)}var Jt=["IMG","INPUT","TEXTAREA","SELECT","BUTTON","VIDEO","OBJECT","EMBED","IFRAME","HR"];function Ge(t){if(!t||Jt.includes(t.tagName)||t.offsetHeight===0||t.offsetWidth===0)return!1;let e=window.getComputedStyle(t);return!(e.display==="table-cell"||e.position==="absolute"||e.visibility==="hidden"||e.opacity==="0")}function ne(t,e,n,o=0){if(!t){e.style.opacity="0",e.style.transform="translate(-10000px, -10000px)";return}let r=t.getBoundingClientRect(),u=window.getComputedStyle(t),d=e.getBoundingClientRect(),g=n.getBoundingClientRect(),s;if(r.height<60)s=r.top-d.height/2-g.top+r.height/2-1;else{let m=Ge(t)?parseInt(u.lineHeight,10):0;s=r.top+(m-d.height)/2-g.top-1}let c=o;e.style.opacity="1",e.style.transform=`translate(${c}px, ${s}px)`}import{jsx as fe}from"react/jsx-runtime";var on="add-block-menu",oe=1/0;function rn(t){return t===0?1/0:oe>=0&&oe<t?oe:Math.floor(t/2)}function ln(t,e,n){let o=e.parentElement,{editorConfig:r}=N(),u=r?.admin?.hideGutter?-24:12,d=en(null),[g,s]=tn(null);We(()=>{function c(m){let i=m.target;if(!G(i))return;let l=V(o,m.pageX,m.pageY,i);if(l===-1){s(null);return}if(te(i,on))return;let E=_(t),{blockElem:p,blockNode:f,foundAtIndex:y}=U({anchorElem:e,cache_threshold:0,editor:t,horizontalOffset:-l,point:new O(m.x,m.y),returnEmptyParagraphs:!0,startIndex:rn(E.length),useEdgeAsDefault:!1});oe=y,p&&(g?.node!==f||g?.elem!==p)&&s({elem:p,node:f})}return document?.addEventListener("mousemove",c),()=>{document?.removeEventListener("mousemove",c)}},[o,e,t,g]),We(()=>{d.current&&g?.node&&ne(g?.elem,d.current,e,u)},[e,g,u]);let a=Zt(c=>{let m=g;m?.node&&(t.update(()=>{let i=!0;if((m.node.getType()!=="paragraph"||m.node.getTextContent()!=="")&&(i=!1),!i){let l=Qt();m.node.insertAfter(l),setTimeout(()=>{m={elem:t.getElementByKey(l.getKey()),node:l},s(m)},0)}}),setTimeout(()=>{t.update(()=>{t.focus(),m.node&&"select"in m.node&&typeof m.node.select=="function"&&m.node.select()})},1),setTimeout(()=>{t.dispatchCommand(de,{node:m.node})},2),c.stopPropagation(),c.preventDefault())},[t,g]);return nn(fe(Ye.Fragment,{children:fe("button",{className:"icon add-block-menu",onClick:c=>{a(c)},ref:d,type:"button",children:fe("div",{className:n?"icon":""})})}),e)}function Ve({anchorElem:t=document.body}){let[e]=qt();return ln(e,t,e._editable)}import{useLexicalComposerContext as cn}from"@lexical/react/LexicalComposerContext.js";import{eventFiles as Xe}from"@lexical/rich-text";import{$getNearestNodeFromDOMNode as Je,$getNodeByKey as un}from"lexical";import*as tt from"react";import{useEffect as pe,useRef as re,useState as qe}from"react";import{createPortal as mn}from"react-dom";function Ue(t,e,n){if(!t.current)return;let{left:o,top:r}=n.getBoundingClientRect(),u=k(e),d=u.width,g=u.height,s=u.top-r,a=u.left-o;t.current.style.border="2px solid green",t.current.style.boxSizing="border-box",t.current.style.height=g+"px",t.current.style.pointerEvents="none",t.current.style.position="absolute",t.current.style.top=s+"px",t.current.style.left=a+"px",t.current.style.width=d+"px",t.current.style.zIndex="1000",t.current.style.opacity="0.5"}var j=25,an=-24,sn=!1,$=0;function je(t,e,n,o,r,u,d,g,s,a=!1){let{height:c,top:m}=o.getBoundingClientRect(),{top:i,width:l}=d.getBoundingClientRect(),{marginBottom:E,marginTop:p}=Z(o),f=m,y=u>=m+c/2+window.scrollY,h=!1;if(r?.elem)if(o!==r?.elem)(y&&r?.elem&&r?.elem===o.nextElementSibling||!y&&r?.elem&&r?.elem===o.previousElementSibling)&&($++,$<200&&(h=!0));else{$++;let L=r?.boundingBox?.y,C=o.getBoundingClientRect().y;(y===r?.isBelow&&L===C||$<200)&&(h=!1)}if(h)return{isBelow:y,willStayInSamePosition:h};a?f+=c/2:y?f+=c+E/2:f-=p/2;let x=0;a||(y?x=-j:x=j);let M=f-i+x,b=an-e;n.style.width=`calc(${l}px - ${t})`,n.style.opacity=".4";let T=12;return a?n.style.transform=`translate(${b}px, ${M-j}px)`:y?(o.style.marginBottom=j*2+T+"px",n.style.transform=`translate(${b}px, calc(${M}px - 0px))`):(o.style.marginTop=j*2+T+"px",n.style.transform=`translate(${b}px, calc(${M-j*2}px - 0px))`),sn&&Ue(s,o,d),r.elem.style.opacity="",r?.elem===o?y?r.elem.style.marginTop="":r.elem.style.marginBottom="":(r.elem.style.marginBottom="",r.elem.style.marginTop=""),$=0,{isBelow:y,willStayInSamePosition:h}}import{jsx as ie,jsxs as gn}from"react/jsx-runtime";var dn="draggable-block-menu",Qe="application/x-lexical-drag-block",q=1/0;function Ze(t){return t===0?1/0:q>=0&&q<t?q:Math.floor(t/2)}function fn(t,e){let{transform:n}=e.style;t.setDragImage(e,0,0),setTimeout(()=>{e.style.transform=n})}function et(t,e){t&&(t.style.opacity="0"),e&&(e.style.opacity="",e.style.marginBottom="",e.style.marginTop="")}function pn(t,e,n){let o=e.parentElement,r=re(null),u=re(null),d=re(null),g=re(!1),[s,a]=qe(null),[c,m]=qe(null),{editorConfig:i}=N(),l=i?.admin?.hideGutter?-44:-8;pe(()=>{function f(y){let h=y.target;if(!G(h))return;let x=V(o,y.pageX,y.pageY,h);if(x===-1){a(null);return}if(te(h,dn))return;let M=_(t),{blockElem:b,foundAtIndex:T,isFoundNodeEmptyParagraph:L}=U({anchorElem:e,cache_threshold:0,editor:t,horizontalOffset:-x,point:new O(y.x,y.y),startIndex:Ze(M.length),useEdgeAsDefault:!1,verbose:!1});q=T,!(!b&&!L)&&s!==b&&a(b)}return document?.addEventListener("mousemove",f),()=>{document?.removeEventListener("mousemove",f)}},[o,e,t,s]),pe(()=>{r.current&&ne(s,r.current,e,l)},[e,s,l]),pe(()=>{function f(h){if(!g.current)return!1;let[x]=Xe(h);if(x)return!1;let{pageY:M,target:b}=h;if(!G(b))return!1;let T=V(o,h.pageX,h.pageY,b,100,50),L=_(t),{blockElem:C,foundAtIndex:A,isFoundNodeEmptyParagraph:D}=U({anchorElem:e,editor:t,fuzzy:!0,horizontalOffset:-T,point:new O(h.x,h.y),startIndex:Ze(L.length),useEdgeAsDefault:!0,verbose:!0});q=A;let B=u.current;if(C===null||B===null)return!1;if(s!==C){let{isBelow:v,willStayInSamePosition:w}=je(i?.admin?.hideGutter?"0px":"3rem",l+(i?.admin?.hideGutter?r?.current?.getBoundingClientRect()?.width??0:-r?.current?.getBoundingClientRect()?.width),B,C,c,M,e,h,d,D);h.preventDefault(),w||m({boundingBox:C.getBoundingClientRect(),elem:C,isBelow:v})}else et(B,c?.elem),m({boundingBox:C.getBoundingClientRect(),elem:C,isBelow:!1});return!0}function y(h){if(!g.current)return!1;let[x]=Xe(h);if(x)return!1;let{dataTransfer:M,pageY:b,target:T}=h,L=M?.getData(Qe)||"";return t.update(()=>{let C=un(L);if(!C||!G(T))return!1;let A=V(o,h.pageX,h.pageY,T,100,50),{blockElem:D,isFoundNodeEmptyParagraph:B}=U({anchorElem:e,editor:t,fuzzy:!0,horizontalOffset:-A,point:new O(h.x,h.y),useEdgeAsDefault:!0});if(!D)return!1;let v=Je(D);if(!v)return!1;if(v===C)return!0;let{height:w,top:se}=k(D),mt=b>=se+w/2+window.scrollY;B?(v.insertBefore(C),v.remove()):mt?v.insertAfter(C):v.insertBefore(C),s!==null&&a(null),document.querySelectorAll(".lexical-block-highlighter").forEach(K=>{K.remove()});let dt=t.getElementByKey(C.getKey());setTimeout(()=>{let K=dt.getBoundingClientRect(),S=document.createElement("div");S.className="lexical-block-highlighter",document.documentElement.getAttribute("data-theme")==="dark"?S.style.backgroundColor="white":S.style.backgroundColor="black",S.style.transition="opacity 0.1s ease-in-out",S.style.zIndex="1",S.style.pointerEvents="none",S.style.boxSizing="border-box",S.style.borderRadius="4px",S.style.position="absolute",document.body.appendChild(S),S.style.opacity="0.1",S.style.height=`${K.height+8}px`,S.style.width=`${K.width+8}px`,S.style.top=`${K.top+window.scrollY-4}px`,S.style.left=`${K.left-4}px`,setTimeout(()=>{S.style.opacity="0",setTimeout(()=>{S.remove()},1e3)},3e3)},120)}),!0}return document.addEventListener("dragover",f),document.addEventListener("drop",y),()=>{document.removeEventListener("dragover",f),document.removeEventListener("drop",y)}},[o,l,e,t,c,s,i?.admin?.hideGutter]);function E(f){let y=f.dataTransfer;if(!y||!s)return;fn(y,s);let h="";t.update(()=>{let x=Je(s);x&&(h=x.getKey())}),g.current=!0,y.setData(Qe,h)}function p(){g.current=!1,et(u.current,c?.elem)}return mn(gn(tt.Fragment,{children:[ie("div",{className:"icon draggable-block-menu",draggable:!0,onDragEnd:p,onDragStart:E,ref:r,children:ie("div",{className:n?"icon":""})}),ie("div",{className:"draggable-block-target-line",ref:u}),ie("div",{className:"debug-highlight",ref:d})]}),e)}function nt({anchorElem:t=document.body}){let[e]=cn();return pn(e,t,e._editable)}import{ContentEditable as hn}from"@lexical/react/LexicalContentEditable.js";import{jsx as yn}from"react/jsx-runtime";function ot({className:t}){return yn(hn,{className:t??"ContentEditable__root"})}import{jsx as R,jsxs as Q}from"react/jsx-runtime";var at=t=>{let{editorConfig:e,editorContainerRef:n,onChange:o}=t,r=N(),[u]=En(),{t:d}=Rn(),[g,s]=lt(null),a=i=>{i!==null&&s(i)};it(()=>{if(!r?.uuid){console.error("Lexical Editor must be used within an EditorConfigProvider");return}r?.parentEditor?.uuid&&r.parentEditor?.registerChild(r.uuid,r);let i=()=>{r.focusEditor(r)},l=()=>{r.blurEditor(r)},E=u.registerCommand(Ln,()=>(i(),!0),rt),p=u.registerCommand(Sn,()=>(l(),!0),rt);return()=>{E(),p(),r.parentEditor?.unregisterChild?.(r.uuid)}},[u,r]);let[c,m]=lt(!1);return it(()=>{let i=()=>{let l=window.matchMedia("(max-width: 768px)").matches;l!==c&&m(l)};return i(),window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}},[c]),Q(X.Fragment,{children:[e.features.plugins.map(i=>{if(i.position==="aboveContainer")return R(F,{clientProps:i.clientProps,plugin:i},i.key)}),Q("div",{className:"editor-container",ref:n,children:[e.features.plugins.map(i=>{if(i.position==="top")return R(F,{clientProps:i.clientProps,plugin:i},i.key)}),R(Cn,{ErrorBoundary:xn,contentEditable:R("div",{className:"editor-scroller",children:R("div",{className:"editor",ref:a,children:R(ot,{})})}),placeholder:R("p",{className:"editor-placeholder",children:d("lexical:general:placeholder")})}),R(Mn,{ignoreSelectionChange:!0,onChange:(i,l,E)=>{(!E.has("focus")||E.size>1)&&o?.(i,l,E)}}),g&&Q(X.Fragment,{children:[!c&&u.isEditable()&&Q(X.Fragment,{children:[R(nt,{anchorElem:g}),R(Ve,{anchorElem:g})]}),e.features.plugins.map(i=>{if(i.position==="floatingAnchorElem"&&!(i.desktopOnly===!0&&c))return R(F,{anchorElem:g,clientProps:i.clientProps,plugin:i},i.key)}),u.isEditable()&&R(X.Fragment,{children:R($e,{anchorElem:g})})]}),u.isEditable()&&Q(X.Fragment,{children:[R(bn,{}),e?.features?.markdownTransformers?.length>0&&R(be,{})]}),R(Tn,{}),e.features.plugins.map(i=>{if(i.position==="normal")return R(F,{clientProps:i.clientProps,plugin:i},i.key)}),e.features.plugins.map(i=>{if(i.position==="bottom")return R(F,{clientProps:i.clientProps,plugin:i},i.key)})]}),e.features.plugins.map(i=>{if(i.position==="belowContainer")return R(F,{clientProps:i.clientProps,plugin:i},i.key)})]})};import{jsx as le}from"react/jsx-runtime";var ut=t=>{let{editorConfig:e,fieldProps:n,onChange:o,path:r,readOnly:u,value:d}=t,g=N(),s=ct.useRef(null),a=st(()=>{let m=d;return e?.features?.hooks?.load?.length&&e.features.hooks.load.forEach(i=>{m=i({incomingEditorState:m})}),m},[e,d]),c=st(()=>{if(a&&typeof a!="object")throw new Error("The value passed to the Lexical editor is not an object. This is not supported. Please remove the data from the field and start again. This is the value that was passed in: "+JSON.stringify(a));if(a&&Array.isArray(a)&&!("root"in a))throw new Error("You have tried to pass in data from the old, Slate editor, to the new, Lexical editor. This is not supported. There is no automatic conversion from Slate to Lexical data available yet (coming soon). Please remove the data from the field and start again.");if(a&&"jsonContent"in a)throw new Error("You have tried to pass in data from payload-plugin-lexical. This is not supported. The data structure has changed in this editor, compared to the plugin, and there is no automatic conversion available yet (coming soon). Please remove the data from the field and start again.");return{editable:u!==!0,editorState:a!=null?JSON.stringify(a):void 0,namespace:e.lexical.namespace,nodes:[...he({editorConfig:e})],onError:m=>{throw m},theme:e.lexical.theme}},[e,a,u]);return c?le(vn,{initialConfig:c,children:le(ye,{editorConfig:e,editorContainerRef:s,fieldProps:n,parentContext:g,children:le(at,{editorConfig:e,editorContainerRef:s,onChange:o})})},r):le("p",{children:"Loading..."})};import"./bundled.css";import{jsx as z,jsxs as ge}from"react/jsx-runtime";var ae="rich-text-lexical",Bn=t=>{let{name:e,CustomDescription:n,CustomError:o,CustomLabel:r,className:u,descriptionProps:d,editorConfig:g,errorProps:s,label:a,labelProps:c,path:m,readOnly:i,required:l,style:E,validate:p,width:f}=t,y=An((v,w)=>{if(typeof p=="function")return p(v,{...w,props:t,required:l})},[p,l]),{path:h}=On(),x=Pn({path:h??m??e,validate:y}),{errorMessage:M,initialValue:b,path:T,schemaPath:L,setValue:C,showError:A,value:D}=x,B=[ae,"field-type",u,A&&"error",i&&`${ae}--read-only`,g?.admin?.hideGutter!==!0?`${ae}--show-gutter`:null].filter(Boolean).join(" ");return ge("div",{className:B,style:{...E,width:f},children:[z(In,{CustomLabel:r,label:a,required:l,...c||{}}),ge("div",{className:`${ae}__wrap`,children:[z(wn,{CustomError:o,path:T,...s||{}}),z(Dn,{fallbackRender:Fn,onReset:()=>{},children:z(ut,{editorConfig:g,fieldProps:t,onChange:v=>{let w=v.toJSON();g?.features?.hooks?.save?.length&&g.features.hooks.save.forEach(se=>{w=se({incomingEditorState:w})}),C(w)},path:T,readOnly:i,value:D},JSON.stringify({initialValue:b,path:T}))}),n!==void 0?n:z(Nn,{...d||{}})]})]},T)};function Fn({error:t}){return ge("div",{className:"errorBoundary",role:"alert",children:[z("p",{children:"Something went wrong:"}),z("pre",{style:{color:"red"},children:t.message})]})}var Xr=kn(Bn);export{Xr as RichText};
2
- //# sourceMappingURL=Field-YMWNSE3A.js.map