@payloadcms/richtext-lexical 3.0.0-canary.3bd3027 → 3.0.0-canary.483db21

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 (734) hide show
  1. package/dist/cell/index.d.ts +2 -2
  2. package/dist/cell/index.d.ts.map +1 -1
  3. package/dist/cell/index.js +2 -2
  4. package/dist/cell/index.js.map +1 -1
  5. package/dist/exports/client/Field-5GGTGCKC.js +2 -0
  6. package/dist/exports/client/Field-5GGTGCKC.js.map +7 -0
  7. package/dist/exports/client/RelationshipComponent-ZR2OCBGL.js +2 -0
  8. package/dist/exports/client/RelationshipComponent-ZR2OCBGL.js.map +7 -0
  9. package/dist/exports/client/bundled.css +1 -1
  10. package/dist/exports/client/{chunk-OSR74ZNW.js → chunk-6QXGZYUK.js} +2 -2
  11. package/dist/exports/client/chunk-6QXGZYUK.js.map +7 -0
  12. package/dist/exports/client/chunk-EBB2CEB6.js +2 -0
  13. package/dist/exports/client/chunk-EBB2CEB6.js.map +7 -0
  14. package/dist/exports/client/chunk-IPCJ5EVK.js +2 -0
  15. package/dist/exports/client/chunk-IPCJ5EVK.js.map +7 -0
  16. package/dist/exports/client/{chunk-3K3B6PJM.js → chunk-IWZVO3AI.js} +2 -2
  17. package/dist/exports/client/chunk-IWZVO3AI.js.map +7 -0
  18. package/dist/exports/client/{chunk-MLIITFAS.js → chunk-Q5DYR7MH.js} +2 -2
  19. package/dist/exports/client/chunk-Q5DYR7MH.js.map +7 -0
  20. package/dist/exports/client/chunk-VUVXZJJR.js +2 -0
  21. package/dist/exports/client/chunk-VUVXZJJR.js.map +7 -0
  22. package/dist/exports/client/component-D4GWDXK5.js +2 -0
  23. package/dist/exports/client/component-D4GWDXK5.js.map +7 -0
  24. package/dist/exports/client/component-KA7FDRMA.js +2 -0
  25. package/dist/exports/client/component-KA7FDRMA.js.map +7 -0
  26. package/dist/exports/client/{component-QWIGEOVD.js → component-VM36FRT2.js} +2 -2
  27. package/dist/exports/client/componentInline-6EKPZSCV.js +2 -0
  28. package/dist/exports/client/componentInline-6EKPZSCV.js.map +7 -0
  29. package/dist/exports/client/index.d.ts +17 -6
  30. package/dist/exports/client/index.d.ts.map +1 -1
  31. package/dist/exports/client/index.js +8 -6
  32. package/dist/exports/client/index.js.map +4 -4
  33. package/dist/features/align/feature.client.js.map +1 -1
  34. package/dist/features/align/feature.server.d.ts +1 -1
  35. package/dist/features/align/feature.server.d.ts.map +1 -1
  36. package/dist/features/align/feature.server.js.map +1 -1
  37. package/dist/features/align/i18n.js.map +1 -1
  38. package/dist/features/align/toolbarAlignGroup.js.map +1 -1
  39. package/dist/features/blockquote/feature.client.js.map +1 -1
  40. package/dist/features/blockquote/feature.server.d.ts +6 -1
  41. package/dist/features/blockquote/feature.server.d.ts.map +1 -1
  42. package/dist/features/blockquote/feature.server.js +5 -2
  43. package/dist/features/blockquote/feature.server.js.map +1 -1
  44. package/dist/features/blockquote/i18n.js.map +1 -1
  45. package/dist/features/blockquote/markdownTransformer.js.map +1 -1
  46. package/dist/features/blocks/component/BlockContent.d.ts +5 -5
  47. package/dist/features/blocks/component/BlockContent.d.ts.map +1 -1
  48. package/dist/features/blocks/component/BlockContent.js +7 -4
  49. package/dist/features/blocks/component/BlockContent.js.map +1 -1
  50. package/dist/features/blocks/component/FormSavePlugin.js +1 -1
  51. package/dist/features/blocks/component/FormSavePlugin.js.map +1 -1
  52. package/dist/features/blocks/component/index.d.ts +0 -4
  53. package/dist/features/blocks/component/index.d.ts.map +1 -1
  54. package/dist/features/blocks/component/index.js +10 -6
  55. package/dist/features/blocks/component/index.js.map +1 -1
  56. package/dist/features/blocks/component/removeEmptyArrayValues.js.map +1 -1
  57. package/dist/features/blocks/componentInline/index.d.ts +10 -0
  58. package/dist/features/blocks/componentInline/index.d.ts.map +1 -0
  59. package/dist/features/blocks/componentInline/index.js +133 -0
  60. package/dist/features/blocks/componentInline/index.js.map +1 -0
  61. package/dist/features/blocks/feature.client.d.ts +6 -2
  62. package/dist/features/blocks/feature.client.d.ts.map +1 -1
  63. package/dist/features/blocks/feature.client.js +70 -8
  64. package/dist/features/blocks/feature.client.js.map +1 -1
  65. package/dist/features/blocks/feature.server.d.ts +3 -2
  66. package/dist/features/blocks/feature.server.d.ts.map +1 -1
  67. package/dist/features/blocks/feature.server.js +100 -45
  68. package/dist/features/blocks/feature.server.js.map +1 -1
  69. package/dist/features/blocks/graphQLPopulationPromise.d.ts +4 -3
  70. package/dist/features/blocks/graphQLPopulationPromise.d.ts.map +1 -1
  71. package/dist/features/blocks/graphQLPopulationPromise.js +2 -2
  72. package/dist/features/blocks/graphQLPopulationPromise.js.map +1 -1
  73. package/dist/features/blocks/i18n.d.ts.map +1 -1
  74. package/dist/features/blocks/i18n.js +192 -0
  75. package/dist/features/blocks/i18n.js.map +1 -1
  76. package/dist/features/blocks/nodes/BlocksNode.d.ts +7 -5
  77. package/dist/features/blocks/nodes/BlocksNode.d.ts.map +1 -1
  78. package/dist/features/blocks/nodes/BlocksNode.js +3 -3
  79. package/dist/features/blocks/nodes/BlocksNode.js.map +1 -1
  80. package/dist/features/blocks/nodes/InlineBlocksNode.d.ts +39 -0
  81. package/dist/features/blocks/nodes/InlineBlocksNode.d.ts.map +1 -0
  82. package/dist/features/blocks/nodes/InlineBlocksNode.js +94 -0
  83. package/dist/features/blocks/nodes/InlineBlocksNode.js.map +1 -0
  84. package/dist/features/blocks/plugin/commands.d.ts +5 -0
  85. package/dist/features/blocks/plugin/commands.d.ts.map +1 -1
  86. package/dist/features/blocks/plugin/commands.js +2 -0
  87. package/dist/features/blocks/plugin/commands.js.map +1 -1
  88. package/dist/features/blocks/plugin/index.d.ts +1 -1
  89. package/dist/features/blocks/plugin/index.d.ts.map +1 -1
  90. package/dist/features/blocks/plugin/index.js +76 -7
  91. package/dist/features/blocks/plugin/index.js.map +1 -1
  92. package/dist/features/blocks/validate.d.ts +4 -3
  93. package/dist/features/blocks/validate.d.ts.map +1 -1
  94. package/dist/features/blocks/validate.js +4 -3
  95. package/dist/features/blocks/validate.js.map +1 -1
  96. package/dist/features/converters/html/converter/converters/linebreak.js.map +1 -1
  97. package/dist/features/converters/html/converter/converters/paragraph.d.ts.map +1 -1
  98. package/dist/features/converters/html/converter/converters/paragraph.js +5 -2
  99. package/dist/features/converters/html/converter/converters/paragraph.js.map +1 -1
  100. package/dist/features/converters/html/converter/converters/text.js.map +1 -1
  101. package/dist/features/converters/html/converter/defaultConverters.js.map +1 -1
  102. package/dist/features/converters/html/converter/index.d.ts +8 -2
  103. package/dist/features/converters/html/converter/index.d.ts.map +1 -1
  104. package/dist/features/converters/html/converter/index.js +14 -5
  105. package/dist/features/converters/html/converter/index.js.map +1 -1
  106. package/dist/features/converters/html/converter/types.d.ts +7 -4
  107. package/dist/features/converters/html/converter/types.d.ts.map +1 -1
  108. package/dist/features/converters/html/converter/types.js.map +1 -1
  109. package/dist/features/converters/html/feature.server.d.ts +3 -3
  110. package/dist/features/converters/html/feature.server.d.ts.map +1 -1
  111. package/dist/features/converters/html/feature.server.js.map +1 -1
  112. package/dist/features/converters/html/field/index.d.ts.map +1 -1
  113. package/dist/features/converters/html/field/index.js +5 -2
  114. package/dist/features/converters/html/field/index.js.map +1 -1
  115. package/dist/features/createClientComponent.d.ts +2 -1
  116. package/dist/features/createClientComponent.d.ts.map +1 -1
  117. package/dist/features/createClientComponent.js.map +1 -1
  118. package/dist/features/createFeaturePropComponent.js +1 -1
  119. package/dist/features/createFeaturePropComponent.js.map +1 -1
  120. package/dist/features/debug/testRecorder/feature.client.js.map +1 -1
  121. package/dist/features/debug/testRecorder/feature.server.d.ts +1 -1
  122. package/dist/features/debug/testRecorder/feature.server.d.ts.map +1 -1
  123. package/dist/features/debug/testRecorder/feature.server.js.map +1 -1
  124. package/dist/features/debug/testRecorder/plugin/index.d.ts +1 -1
  125. package/dist/features/debug/testRecorder/plugin/index.d.ts.map +1 -1
  126. package/dist/features/debug/testRecorder/plugin/index.js.map +1 -1
  127. package/dist/features/debug/treeView/feature.client.js.map +1 -1
  128. package/dist/features/debug/treeView/feature.server.d.ts +1 -1
  129. package/dist/features/debug/treeView/feature.server.d.ts.map +1 -1
  130. package/dist/features/debug/treeView/feature.server.js.map +1 -1
  131. package/dist/features/debug/treeView/plugin/index.d.ts +1 -1
  132. package/dist/features/debug/treeView/plugin/index.d.ts.map +1 -1
  133. package/dist/features/debug/treeView/plugin/index.js.map +1 -1
  134. package/dist/features/experimental_table/feature.client.d.ts +2 -0
  135. package/dist/features/experimental_table/feature.client.d.ts.map +1 -0
  136. package/dist/features/experimental_table/feature.client.js +71 -0
  137. package/dist/features/experimental_table/feature.client.js.map +1 -0
  138. package/dist/features/experimental_table/feature.server.d.ts +13 -0
  139. package/dist/features/experimental_table/feature.server.d.ts.map +1 -0
  140. package/dist/features/experimental_table/feature.server.js +125 -0
  141. package/dist/features/experimental_table/feature.server.js.map +1 -0
  142. package/dist/features/experimental_table/plugins/TableActionMenuPlugin/index.d.ts +4 -0
  143. package/dist/features/experimental_table/plugins/TableActionMenuPlugin/index.d.ts.map +1 -0
  144. package/dist/features/experimental_table/plugins/TableActionMenuPlugin/index.js +604 -0
  145. package/dist/features/experimental_table/plugins/TableActionMenuPlugin/index.js.map +1 -0
  146. package/dist/features/experimental_table/plugins/TableCellResizerPlugin/index.d.ts +3 -0
  147. package/dist/features/experimental_table/plugins/TableCellResizerPlugin/index.d.ts.map +1 -0
  148. package/dist/features/experimental_table/plugins/TableCellResizerPlugin/index.js +327 -0
  149. package/dist/features/experimental_table/plugins/TableCellResizerPlugin/index.js.map +1 -0
  150. package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.d.ts +12 -0
  151. package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -0
  152. package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.js +181 -0
  153. package/dist/features/experimental_table/plugins/TableHoverActionsPlugin/index.js.map +1 -0
  154. package/dist/features/experimental_table/plugins/TablePlugin/index.d.ts +24 -0
  155. package/dist/features/experimental_table/plugins/TablePlugin/index.d.ts.map +1 -0
  156. package/dist/features/experimental_table/plugins/TablePlugin/index.js +98 -0
  157. package/dist/features/experimental_table/plugins/TablePlugin/index.js.map +1 -0
  158. package/dist/features/experimental_table/utils/debounce.d.ts +61 -0
  159. package/dist/features/experimental_table/utils/debounce.d.ts.map +1 -0
  160. package/dist/features/experimental_table/utils/debounce.js +202 -0
  161. package/dist/features/experimental_table/utils/debounce.js.map +1 -0
  162. package/dist/features/experimental_table/utils/useDebounce.d.ts +6 -0
  163. package/dist/features/experimental_table/utils/useDebounce.d.ts.map +1 -0
  164. package/dist/features/experimental_table/utils/useDebounce.js +18 -0
  165. package/dist/features/experimental_table/utils/useDebounce.js.map +1 -0
  166. package/dist/features/format/bold/feature.client.js.map +1 -1
  167. package/dist/features/format/bold/feature.server.d.ts +1 -1
  168. package/dist/features/format/bold/feature.server.d.ts.map +1 -1
  169. package/dist/features/format/bold/feature.server.js.map +1 -1
  170. package/dist/features/format/bold/markdownTransformers.js.map +1 -1
  171. package/dist/features/format/inlineCode/feature.client.js.map +1 -1
  172. package/dist/features/format/inlineCode/feature.server.d.ts +1 -1
  173. package/dist/features/format/inlineCode/feature.server.d.ts.map +1 -1
  174. package/dist/features/format/inlineCode/feature.server.js.map +1 -1
  175. package/dist/features/format/inlineCode/markdownTransformers.js.map +1 -1
  176. package/dist/features/format/italic/feature.client.js.map +1 -1
  177. package/dist/features/format/italic/feature.server.d.ts +1 -1
  178. package/dist/features/format/italic/feature.server.d.ts.map +1 -1
  179. package/dist/features/format/italic/feature.server.js.map +1 -1
  180. package/dist/features/format/italic/markdownTransformers.js.map +1 -1
  181. package/dist/features/format/shared/toolbarFormatGroup.js.map +1 -1
  182. package/dist/features/format/strikethrough/feature.client.js.map +1 -1
  183. package/dist/features/format/strikethrough/feature.server.d.ts +1 -1
  184. package/dist/features/format/strikethrough/feature.server.d.ts.map +1 -1
  185. package/dist/features/format/strikethrough/feature.server.js.map +1 -1
  186. package/dist/features/format/strikethrough/markdownTransformers.js.map +1 -1
  187. package/dist/features/format/subscript/feature.client.js.map +1 -1
  188. package/dist/features/format/subscript/feature.server.d.ts +1 -1
  189. package/dist/features/format/subscript/feature.server.d.ts.map +1 -1
  190. package/dist/features/format/subscript/feature.server.js.map +1 -1
  191. package/dist/features/format/superscript/feature.client.js.map +1 -1
  192. package/dist/features/format/superscript/feature.server.d.ts +1 -1
  193. package/dist/features/format/superscript/feature.server.d.ts.map +1 -1
  194. package/dist/features/format/superscript/feature.server.js.map +1 -1
  195. package/dist/features/format/underline/feature.client.js.map +1 -1
  196. package/dist/features/format/underline/feature.server.d.ts +1 -1
  197. package/dist/features/format/underline/feature.server.d.ts.map +1 -1
  198. package/dist/features/format/underline/feature.server.js.map +1 -1
  199. package/dist/features/heading/feature.client.js.map +1 -1
  200. package/dist/features/heading/feature.server.d.ts +6 -2
  201. package/dist/features/heading/feature.server.d.ts.map +1 -1
  202. package/dist/features/heading/feature.server.js +5 -2
  203. package/dist/features/heading/feature.server.js.map +1 -1
  204. package/dist/features/heading/i18n.js +2 -2
  205. package/dist/features/heading/i18n.js.map +1 -1
  206. package/dist/features/heading/markdownTransformer.js.map +1 -1
  207. package/dist/features/horizontalRule/component/index.js.map +1 -1
  208. package/dist/features/horizontalRule/feature.client.js.map +1 -1
  209. package/dist/features/horizontalRule/feature.server.d.ts +1 -1
  210. package/dist/features/horizontalRule/feature.server.d.ts.map +1 -1
  211. package/dist/features/horizontalRule/feature.server.js.map +1 -1
  212. package/dist/features/horizontalRule/i18n.js.map +1 -1
  213. package/dist/features/horizontalRule/markdownTransformer.js.map +1 -1
  214. package/dist/features/horizontalRule/nodes/HorizontalRuleNode.d.ts +5 -2
  215. package/dist/features/horizontalRule/nodes/HorizontalRuleNode.d.ts.map +1 -1
  216. package/dist/features/horizontalRule/nodes/HorizontalRuleNode.js.map +1 -1
  217. package/dist/features/horizontalRule/plugin/index.d.ts +1 -1
  218. package/dist/features/horizontalRule/plugin/index.d.ts.map +1 -1
  219. package/dist/features/horizontalRule/plugin/index.js.map +1 -1
  220. package/dist/features/indent/feature.client.js.map +1 -1
  221. package/dist/features/indent/feature.server.d.ts +1 -1
  222. package/dist/features/indent/feature.server.d.ts.map +1 -1
  223. package/dist/features/indent/feature.server.js.map +1 -1
  224. package/dist/features/indent/i18n.js.map +1 -1
  225. package/dist/features/indent/toolbarIndentGroup.js.map +1 -1
  226. package/dist/features/link/drawer/baseFields.d.ts +2 -2
  227. package/dist/features/link/drawer/baseFields.d.ts.map +1 -1
  228. package/dist/features/link/drawer/baseFields.js.map +1 -1
  229. package/dist/features/link/feature.client.d.ts +2 -2
  230. package/dist/features/link/feature.client.js.map +1 -1
  231. package/dist/features/link/feature.server.d.ts +6 -6
  232. package/dist/features/link/feature.server.d.ts.map +1 -1
  233. package/dist/features/link/feature.server.js +12 -16
  234. package/dist/features/link/feature.server.js.map +1 -1
  235. package/dist/features/link/graphQLPopulationPromise.d.ts +1 -1
  236. package/dist/features/link/graphQLPopulationPromise.d.ts.map +1 -1
  237. package/dist/features/link/graphQLPopulationPromise.js.map +1 -1
  238. package/dist/features/link/i18n.js.map +1 -1
  239. package/dist/features/link/markdownTransformer.js.map +1 -1
  240. package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  241. package/dist/features/link/nodes/AutoLinkNode.js +7 -1
  242. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  243. package/dist/features/link/nodes/LinkNode.js +1 -2
  244. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  245. package/dist/features/link/nodes/types.d.ts +10 -6
  246. package/dist/features/link/nodes/types.d.ts.map +1 -1
  247. package/dist/features/link/nodes/types.js.map +1 -1
  248. package/dist/features/link/plugins/autoLink/index.d.ts +1 -1
  249. package/dist/features/link/plugins/autoLink/index.d.ts.map +1 -1
  250. package/dist/features/link/plugins/autoLink/index.js +21 -5
  251. package/dist/features/link/plugins/autoLink/index.js.map +1 -1
  252. package/dist/features/link/plugins/clickableLink/index.d.ts +1 -1
  253. package/dist/features/link/plugins/clickableLink/index.d.ts.map +1 -1
  254. package/dist/features/link/plugins/clickableLink/index.js.map +1 -1
  255. package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -1
  256. package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  257. package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/index.js +11 -7
  258. package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  259. package/dist/features/link/plugins/floatingLinkEditor/index.d.ts +1 -1
  260. package/dist/features/link/plugins/floatingLinkEditor/index.d.ts.map +1 -1
  261. package/dist/features/link/plugins/floatingLinkEditor/index.js.map +1 -1
  262. package/dist/features/link/plugins/floatingLinkEditor/types.js.map +1 -1
  263. package/dist/features/link/plugins/floatingLinkEditor/utilities.d.ts +2 -2
  264. package/dist/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +1 -1
  265. package/dist/features/link/plugins/floatingLinkEditor/utilities.js.map +1 -1
  266. package/dist/features/link/plugins/link/index.d.ts +1 -1
  267. package/dist/features/link/plugins/link/index.d.ts.map +1 -1
  268. package/dist/features/link/plugins/link/index.js.map +1 -1
  269. package/dist/features/link/validate.d.ts +1 -1
  270. package/dist/features/link/validate.d.ts.map +1 -1
  271. package/dist/features/link/validate.js +2 -1
  272. package/dist/features/link/validate.js.map +1 -1
  273. package/dist/features/lists/checklist/feature.client.js.map +1 -1
  274. package/dist/features/lists/checklist/feature.server.d.ts +1 -1
  275. package/dist/features/lists/checklist/feature.server.d.ts.map +1 -1
  276. package/dist/features/lists/checklist/feature.server.js.map +1 -1
  277. package/dist/features/lists/checklist/i18n.js.map +1 -1
  278. package/dist/features/lists/checklist/markdownTransformers.js.map +1 -1
  279. package/dist/features/lists/checklist/plugin/index.d.ts +1 -1
  280. package/dist/features/lists/checklist/plugin/index.d.ts.map +1 -1
  281. package/dist/features/lists/checklist/plugin/index.js.map +1 -1
  282. package/dist/features/lists/htmlConverter.d.ts +1 -1
  283. package/dist/features/lists/htmlConverter.d.ts.map +1 -1
  284. package/dist/features/lists/htmlConverter.js +10 -4
  285. package/dist/features/lists/htmlConverter.js.map +1 -1
  286. package/dist/features/lists/orderedList/feature.client.js.map +1 -1
  287. package/dist/features/lists/orderedList/feature.server.d.ts +1 -2
  288. package/dist/features/lists/orderedList/feature.server.d.ts.map +1 -1
  289. package/dist/features/lists/orderedList/feature.server.js.map +1 -1
  290. package/dist/features/lists/orderedList/i18n.js.map +1 -1
  291. package/dist/features/lists/orderedList/markdownTransformer.js.map +1 -1
  292. package/dist/features/lists/plugin/index.d.ts +11 -1
  293. package/dist/features/lists/plugin/index.d.ts.map +1 -1
  294. package/dist/features/lists/plugin/index.js.map +1 -1
  295. package/dist/features/lists/shared/markdown.js.map +1 -1
  296. package/dist/features/lists/shared/slashMenuListGroup.js.map +1 -1
  297. package/dist/features/lists/unorderedList/feature.client.js.map +1 -1
  298. package/dist/features/lists/unorderedList/feature.server.d.ts +1 -1
  299. package/dist/features/lists/unorderedList/feature.server.d.ts.map +1 -1
  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.js.map +1 -1
  304. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts.map +1 -1
  305. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +1 -1
  306. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.js.map +1 -1
  307. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/client.js.map +1 -1
  308. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +1 -1
  309. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/index.js.map +1 -1
  310. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/client.js.map +1 -1
  311. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts.map +1 -1
  312. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +1 -1
  313. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/index.js.map +1 -1
  314. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.js.map +1 -1
  315. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts.map +1 -1
  316. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +1 -1
  317. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.js.map +1 -1
  318. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.js.map +1 -1
  319. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts.map +1 -1
  320. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +1 -1
  321. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.js.map +1 -1
  322. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.js.map +1 -1
  323. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +1 -1
  324. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.js.map +1 -1
  325. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.js.map +1 -1
  326. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -1
  327. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.js.map +1 -1
  328. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +1 -1
  329. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +1 -1
  330. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts +2 -2
  331. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts.map +1 -1
  332. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js.map +1 -1
  333. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js.map +1 -1
  334. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts +1 -1
  335. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +1 -1
  336. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js.map +1 -1
  337. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  338. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  339. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/client.js.map +1 -1
  340. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts.map +1 -1
  341. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +1 -1
  342. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/index.js.map +1 -1
  343. package/dist/features/migrations/slateToLexical/converter/converters/heading/client.js.map +1 -1
  344. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts.map +1 -1
  345. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +1 -1
  346. package/dist/features/migrations/slateToLexical/converter/converters/heading/index.js.map +1 -1
  347. package/dist/features/migrations/slateToLexical/converter/converters/indent/client.js.map +1 -1
  348. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +1 -1
  349. package/dist/features/migrations/slateToLexical/converter/converters/indent/index.js.map +1 -1
  350. package/dist/features/migrations/slateToLexical/converter/converters/link/client.js.map +1 -1
  351. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +1 -1
  352. package/dist/features/migrations/slateToLexical/converter/converters/link/index.js.map +1 -1
  353. package/dist/features/migrations/slateToLexical/converter/converters/listItem/client.js.map +1 -1
  354. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts.map +1 -1
  355. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +1 -1
  356. package/dist/features/migrations/slateToLexical/converter/converters/listItem/index.js.map +1 -1
  357. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/client.js.map +1 -1
  358. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts.map +1 -1
  359. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +1 -1
  360. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/index.js.map +1 -1
  361. package/dist/features/migrations/slateToLexical/converter/converters/relationship/client.js.map +1 -1
  362. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -1
  363. package/dist/features/migrations/slateToLexical/converter/converters/relationship/index.js.map +1 -1
  364. package/dist/features/migrations/slateToLexical/converter/converters/unknown/client.js.map +1 -1
  365. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +1 -1
  366. package/dist/features/migrations/slateToLexical/converter/converters/unknown/index.js.map +1 -1
  367. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/client.js.map +1 -1
  368. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts.map +1 -1
  369. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +1 -1
  370. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/index.js.map +1 -1
  371. package/dist/features/migrations/slateToLexical/converter/converters/upload/client.js.map +1 -1
  372. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -1
  373. package/dist/features/migrations/slateToLexical/converter/converters/upload/index.js.map +1 -1
  374. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js.map +1 -1
  375. package/dist/features/migrations/slateToLexical/converter/index.d.ts.map +1 -1
  376. package/dist/features/migrations/slateToLexical/converter/index.js +1 -0
  377. package/dist/features/migrations/slateToLexical/converter/index.js.map +1 -1
  378. package/dist/features/migrations/slateToLexical/converter/types.js.map +1 -1
  379. package/dist/features/migrations/slateToLexical/feature.client.js.map +1 -1
  380. package/dist/features/migrations/slateToLexical/feature.server.d.ts +3 -1
  381. package/dist/features/migrations/slateToLexical/feature.server.d.ts.map +1 -1
  382. package/dist/features/migrations/slateToLexical/feature.server.js +3 -1
  383. package/dist/features/migrations/slateToLexical/feature.server.js.map +1 -1
  384. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  385. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  386. package/dist/features/paragraph/feature.client.js.map +1 -1
  387. package/dist/features/paragraph/feature.server.d.ts +1 -1
  388. package/dist/features/paragraph/feature.server.d.ts.map +1 -1
  389. package/dist/features/paragraph/feature.server.js.map +1 -1
  390. package/dist/features/paragraph/i18n.js.map +1 -1
  391. package/dist/features/relationship/drawer/commands.js.map +1 -1
  392. package/dist/features/relationship/drawer/index.js.map +1 -1
  393. package/dist/features/relationship/feature.client.d.ts +6 -6
  394. package/dist/features/relationship/feature.client.js.map +1 -1
  395. package/dist/features/relationship/feature.server.d.ts +6 -5
  396. package/dist/features/relationship/feature.server.d.ts.map +1 -1
  397. package/dist/features/relationship/feature.server.js.map +1 -1
  398. package/dist/features/relationship/graphQLPopulationPromise.d.ts +1 -1
  399. package/dist/features/relationship/graphQLPopulationPromise.d.ts.map +1 -1
  400. package/dist/features/relationship/graphQLPopulationPromise.js.map +1 -1
  401. package/dist/features/relationship/i18n.js.map +1 -1
  402. package/dist/features/relationship/nodes/RelationshipNode.d.ts +6 -2
  403. package/dist/features/relationship/nodes/RelationshipNode.d.ts.map +1 -1
  404. package/dist/features/relationship/nodes/RelationshipNode.js +1 -1
  405. package/dist/features/relationship/nodes/RelationshipNode.js.map +1 -1
  406. package/dist/features/relationship/nodes/components/RelationshipComponent.d.ts +0 -1
  407. package/dist/features/relationship/nodes/components/RelationshipComponent.d.ts.map +1 -1
  408. package/dist/features/relationship/nodes/components/RelationshipComponent.js +2 -3
  409. package/dist/features/relationship/nodes/components/RelationshipComponent.js.map +1 -1
  410. package/dist/features/relationship/plugins/index.d.ts +1 -1
  411. package/dist/features/relationship/plugins/index.d.ts.map +1 -1
  412. package/dist/features/relationship/plugins/index.js.map +1 -1
  413. package/dist/features/relationship/utils/EnabledRelationshipsCondition.js.map +1 -1
  414. package/dist/features/shared/slashMenu/basicGroup.js.map +1 -1
  415. package/dist/features/shared/toolbar/addDropdownGroup.js.map +1 -1
  416. package/dist/features/shared/toolbar/featureButtonsGroup.js.map +1 -1
  417. package/dist/features/shared/toolbar/textDropdownGroup.js.map +1 -1
  418. package/dist/features/toolbars/fixed/Toolbar/index.d.ts +1 -1
  419. package/dist/features/toolbars/fixed/Toolbar/index.d.ts.map +1 -1
  420. package/dist/features/toolbars/fixed/Toolbar/index.js.map +1 -1
  421. package/dist/features/toolbars/fixed/feature.client.d.ts +1 -1
  422. package/dist/features/toolbars/fixed/feature.client.d.ts.map +1 -1
  423. package/dist/features/toolbars/fixed/feature.client.js +8 -15
  424. package/dist/features/toolbars/fixed/feature.client.js.map +1 -1
  425. package/dist/features/toolbars/fixed/feature.server.d.ts +1 -2
  426. package/dist/features/toolbars/fixed/feature.server.d.ts.map +1 -1
  427. package/dist/features/toolbars/fixed/feature.server.js +16 -18
  428. package/dist/features/toolbars/fixed/feature.server.js.map +1 -1
  429. package/dist/features/toolbars/inline/Toolbar/index.d.ts +1 -1
  430. package/dist/features/toolbars/inline/Toolbar/index.d.ts.map +1 -1
  431. package/dist/features/toolbars/inline/Toolbar/index.js.map +1 -1
  432. package/dist/features/toolbars/inline/feature.client.d.ts +1 -1
  433. package/dist/features/toolbars/inline/feature.client.d.ts.map +1 -1
  434. package/dist/features/toolbars/inline/feature.client.js +9 -16
  435. package/dist/features/toolbars/inline/feature.client.js.map +1 -1
  436. package/dist/features/toolbars/inline/feature.server.d.ts +1 -2
  437. package/dist/features/toolbars/inline/feature.server.d.ts.map +1 -1
  438. package/dist/features/toolbars/inline/feature.server.js +8 -11
  439. package/dist/features/toolbars/inline/feature.server.js.map +1 -1
  440. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  441. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  442. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +0 -1
  443. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  444. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  445. package/dist/features/toolbars/types.d.ts +37 -5
  446. package/dist/features/toolbars/types.d.ts.map +1 -1
  447. package/dist/features/toolbars/types.js.map +1 -1
  448. package/dist/features/typeUtilities.d.ts +1 -1
  449. package/dist/features/typeUtilities.d.ts.map +1 -1
  450. package/dist/features/typeUtilities.js.map +1 -1
  451. package/dist/features/typesClient.d.ts +186 -0
  452. package/dist/features/typesClient.d.ts.map +1 -0
  453. package/dist/features/typesClient.js +3 -0
  454. package/dist/features/typesClient.js.map +1 -0
  455. package/dist/features/{types.d.ts → typesServer.d.ts} +50 -202
  456. package/dist/features/typesServer.d.ts.map +1 -0
  457. package/dist/features/typesServer.js +3 -0
  458. package/dist/features/typesServer.js.map +1 -0
  459. package/dist/features/upload/component/index.d.ts.map +1 -1
  460. package/dist/features/upload/component/index.js +34 -11
  461. package/dist/features/upload/component/index.js.map +1 -1
  462. package/dist/features/upload/drawer/commands.js.map +1 -1
  463. package/dist/features/upload/drawer/index.js.map +1 -1
  464. package/dist/features/upload/feature.client.d.ts +1 -1
  465. package/dist/features/upload/feature.client.d.ts.map +1 -1
  466. package/dist/features/upload/feature.client.js +62 -69
  467. package/dist/features/upload/feature.client.js.map +1 -1
  468. package/dist/features/upload/feature.server.d.ts +3 -4
  469. package/dist/features/upload/feature.server.d.ts.map +1 -1
  470. package/dist/features/upload/feature.server.js +157 -169
  471. package/dist/features/upload/feature.server.js.map +1 -1
  472. package/dist/features/upload/graphQLPopulationPromise.d.ts +1 -1
  473. package/dist/features/upload/graphQLPopulationPromise.d.ts.map +1 -1
  474. package/dist/features/upload/graphQLPopulationPromise.js.map +1 -1
  475. package/dist/features/upload/i18n.js.map +1 -1
  476. package/dist/features/upload/nodes/UploadNode.d.ts +7 -5
  477. package/dist/features/upload/nodes/UploadNode.d.ts.map +1 -1
  478. package/dist/features/upload/nodes/UploadNode.js +1 -2
  479. package/dist/features/upload/nodes/UploadNode.js.map +1 -1
  480. package/dist/features/upload/plugin/index.d.ts +1 -1
  481. package/dist/features/upload/plugin/index.d.ts.map +1 -1
  482. package/dist/features/upload/plugin/index.js.map +1 -1
  483. package/dist/features/upload/validate.d.ts +1 -1
  484. package/dist/features/upload/validate.d.ts.map +1 -1
  485. package/dist/features/upload/validate.js +1 -0
  486. package/dist/features/upload/validate.js.map +1 -1
  487. package/dist/field/Field.d.ts +3 -3
  488. package/dist/field/Field.d.ts.map +1 -1
  489. package/dist/field/Field.js +14 -12
  490. package/dist/field/Field.js.map +1 -1
  491. package/dist/field/index.d.ts +3 -3
  492. package/dist/field/index.d.ts.map +1 -1
  493. package/dist/field/index.js +11 -9
  494. package/dist/field/index.js.map +1 -1
  495. package/dist/i18n.js.map +1 -1
  496. package/dist/index.d.ts +14 -9
  497. package/dist/index.d.ts.map +1 -1
  498. package/dist/index.js +16 -16
  499. package/dist/index.js.map +1 -1
  500. package/dist/lexical/EditorPlugin.d.ts +1 -1
  501. package/dist/lexical/EditorPlugin.d.ts.map +1 -1
  502. package/dist/lexical/EditorPlugin.js.map +1 -1
  503. package/dist/lexical/LexicalEditor.d.ts +2 -2
  504. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  505. package/dist/lexical/LexicalEditor.js +0 -6
  506. package/dist/lexical/LexicalEditor.js.map +1 -1
  507. package/dist/lexical/LexicalProvider.d.ts +3 -3
  508. package/dist/lexical/LexicalProvider.d.ts.map +1 -1
  509. package/dist/lexical/LexicalProvider.js +26 -6
  510. package/dist/lexical/LexicalProvider.js.map +1 -1
  511. package/dist/lexical/config/client/EditorConfigProvider.d.ts +5 -5
  512. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  513. package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
  514. package/dist/lexical/config/client/default.js.map +1 -1
  515. package/dist/lexical/config/client/loader.d.ts +1 -1
  516. package/dist/lexical/config/client/loader.d.ts.map +1 -1
  517. package/dist/lexical/config/client/loader.js.map +1 -1
  518. package/dist/lexical/config/client/sanitize.d.ts +1 -1
  519. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  520. package/dist/lexical/config/client/sanitize.js +4 -0
  521. package/dist/lexical/config/client/sanitize.js.map +1 -1
  522. package/dist/lexical/config/server/default.d.ts +2 -2
  523. package/dist/lexical/config/server/default.d.ts.map +1 -1
  524. package/dist/lexical/config/server/default.js.map +1 -1
  525. package/dist/lexical/config/server/loader.d.ts +1 -1
  526. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  527. package/dist/lexical/config/server/loader.js.map +1 -1
  528. package/dist/lexical/config/server/sanitize.d.ts +1 -1
  529. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  530. package/dist/lexical/config/server/sanitize.js.map +1 -1
  531. package/dist/lexical/config/types.d.ts +4 -3
  532. package/dist/lexical/config/types.d.ts.map +1 -1
  533. package/dist/lexical/config/types.js.map +1 -1
  534. package/dist/lexical/nodes/index.js.map +1 -1
  535. package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  536. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +4 -4
  537. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  538. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +0 -2
  539. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  540. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts +0 -1
  541. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts.map +1 -1
  542. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +1 -20
  543. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
  544. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +23 -8
  545. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
  546. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  547. package/dist/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
  548. package/dist/lexical/plugins/SlashMenu/index.js +43 -41
  549. package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
  550. package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js.map +1 -1
  551. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  552. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.js.map +1 -1
  553. package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js.map +1 -1
  554. package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js.map +1 -1
  555. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +1 -1
  556. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  557. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  558. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js.map +1 -1
  559. package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -1
  560. package/dist/lexical/plugins/handles/utils/getCollapsedMargins.js.map +1 -1
  561. package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.js.map +1 -1
  562. package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -1
  563. package/dist/lexical/plugins/handles/utils/isOnHandleElement.js.map +1 -1
  564. package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  565. package/dist/lexical/theme/EditorTheme.js.map +1 -1
  566. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  567. package/dist/lexical/ui/ContentEditable.js +8 -1
  568. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  569. package/dist/lexical/ui/icons/AI/index.js.map +1 -1
  570. package/dist/lexical/ui/icons/Add/index.js.map +1 -1
  571. package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
  572. package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
  573. package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
  574. package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
  575. package/dist/lexical/ui/icons/Block/index.js.map +1 -1
  576. package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
  577. package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
  578. package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
  579. package/dist/lexical/ui/icons/Code/index.js.map +1 -1
  580. package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  581. package/dist/lexical/ui/icons/H1/index.js.map +1 -1
  582. package/dist/lexical/ui/icons/H2/index.js.map +1 -1
  583. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  584. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  585. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  586. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  587. package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
  588. package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
  589. package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
  590. package/dist/lexical/ui/icons/InlineBlocks/index.d.ts +3 -0
  591. package/dist/lexical/ui/icons/InlineBlocks/index.d.ts.map +1 -0
  592. package/dist/lexical/ui/icons/InlineBlocks/index.js +20 -0
  593. package/dist/lexical/ui/icons/InlineBlocks/index.js.map +1 -0
  594. package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
  595. package/dist/lexical/ui/icons/Link/index.js.map +1 -1
  596. package/dist/lexical/ui/icons/Meatballs/index.d.ts +3 -0
  597. package/dist/lexical/ui/icons/Meatballs/index.d.ts.map +1 -0
  598. package/dist/lexical/ui/icons/Meatballs/index.js +25 -0
  599. package/dist/lexical/ui/icons/Meatballs/index.js.map +1 -0
  600. package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
  601. package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
  602. package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
  603. package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
  604. package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
  605. package/dist/lexical/ui/icons/Table/index.d.ts +3 -0
  606. package/dist/lexical/ui/icons/Table/index.d.ts.map +1 -0
  607. package/dist/lexical/ui/icons/Table/index.js +20 -0
  608. package/dist/lexical/ui/icons/Table/index.js.map +1 -0
  609. package/dist/lexical/ui/icons/Text/index.js.map +1 -1
  610. package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
  611. package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
  612. package/dist/lexical/ui/icons/Upload/index.js +1 -1
  613. package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
  614. package/dist/lexical/utils/canUseDOM.js.map +1 -1
  615. package/dist/lexical/utils/environment.js.map +1 -1
  616. package/dist/lexical/utils/getDOMRangeRect.js.map +1 -1
  617. package/dist/lexical/utils/getSelectedNode.js.map +1 -1
  618. package/dist/lexical/utils/guard.js.map +1 -1
  619. package/dist/lexical/utils/invariant.js.map +1 -1
  620. package/dist/lexical/utils/joinClasses.js.map +1 -1
  621. package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
  622. package/dist/lexical/utils/nodeFormat.js.map +1 -1
  623. package/dist/lexical/utils/point.js.map +1 -1
  624. package/dist/lexical/utils/rect.js.map +1 -1
  625. package/dist/lexical/utils/setFloatingElemPosition.js.map +1 -1
  626. package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.js.map +1 -1
  627. package/dist/lexical/utils/swipe.js.map +1 -1
  628. package/dist/lexical/utils/url.js.map +1 -1
  629. package/dist/nodeTypes.d.ts +32 -0
  630. package/dist/nodeTypes.d.ts.map +1 -0
  631. package/dist/nodeTypes.js +3 -0
  632. package/dist/nodeTypes.js.map +1 -0
  633. package/dist/populateGraphQL/defaultValue.d.ts.map +1 -1
  634. package/dist/populateGraphQL/defaultValue.js +1 -0
  635. package/dist/populateGraphQL/defaultValue.js.map +1 -1
  636. package/dist/populateGraphQL/populate.d.ts +4 -4
  637. package/dist/populateGraphQL/populate.d.ts.map +1 -1
  638. package/dist/populateGraphQL/populate.js.map +1 -1
  639. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts +3 -3
  640. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  641. package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
  642. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts +4 -4
  643. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
  644. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js.map +1 -1
  645. package/dist/types.d.ts +6 -6
  646. package/dist/types.d.ts.map +1 -1
  647. package/dist/types.js.map +1 -1
  648. package/dist/utilities/createClientFeature.d.ts +1 -1
  649. package/dist/utilities/createClientFeature.d.ts.map +1 -1
  650. package/dist/utilities/createClientFeature.js.map +1 -1
  651. package/dist/utilities/createServerFeature.d.ts +3 -3
  652. package/dist/utilities/createServerFeature.d.ts.map +1 -1
  653. package/dist/utilities/createServerFeature.js.map +1 -1
  654. package/dist/utilities/fieldsDrawer/Drawer.d.ts +18 -0
  655. package/dist/utilities/fieldsDrawer/Drawer.d.ts.map +1 -0
  656. package/dist/utilities/fieldsDrawer/Drawer.js +26 -0
  657. package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -0
  658. package/dist/utilities/fieldsDrawer/DrawerContent.d.ts +4 -0
  659. package/dist/utilities/fieldsDrawer/DrawerContent.d.ts.map +1 -0
  660. package/dist/utilities/fieldsDrawer/DrawerContent.js +90 -0
  661. package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -0
  662. package/dist/utilities/forEachNodeRecursively.js.map +1 -1
  663. package/dist/utilities/generateComponentMap.d.ts +1 -1
  664. package/dist/utilities/generateComponentMap.d.ts.map +1 -1
  665. package/dist/utilities/generateComponentMap.js +6 -4
  666. package/dist/utilities/generateComponentMap.js.map +1 -1
  667. package/dist/utilities/generateSchemaMap.d.ts +1 -1
  668. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  669. package/dist/utilities/generateSchemaMap.js +10 -1
  670. package/dist/utilities/generateSchemaMap.js.map +1 -1
  671. package/dist/utilities/migrateSlateToLexical/index.d.ts +15 -0
  672. package/dist/utilities/migrateSlateToLexical/index.d.ts.map +1 -0
  673. package/dist/utilities/migrateSlateToLexical/index.js +105 -0
  674. package/dist/utilities/migrateSlateToLexical/index.js.map +1 -0
  675. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts +9 -0
  676. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts.map +1 -0
  677. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js +77 -0
  678. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js.map +1 -0
  679. package/dist/utilities/recurseNodeTree.js.map +1 -1
  680. package/dist/utilities/upgradeLexicalData/index.d.ts +11 -0
  681. package/dist/utilities/upgradeLexicalData/index.d.ts.map +1 -0
  682. package/dist/utilities/upgradeLexicalData/index.js +101 -0
  683. package/dist/utilities/upgradeLexicalData/index.js.map +1 -0
  684. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts +9 -0
  685. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -0
  686. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js +74 -0
  687. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -0
  688. package/dist/utilities/useLexicalFeature.d.ts +1 -1
  689. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  690. package/dist/utilities/useLexicalFeature.js.map +1 -1
  691. package/dist/validate/index.js.map +1 -1
  692. package/dist/validate/validateNodes.d.ts +2 -2
  693. package/dist/validate/validateNodes.d.ts.map +1 -1
  694. package/dist/validate/validateNodes.js.map +1 -1
  695. package/package.json +44 -43
  696. package/dist/exports/client/Field-YMWNSE3A.js +0 -2
  697. package/dist/exports/client/Field-YMWNSE3A.js.map +0 -7
  698. package/dist/exports/client/RelationshipComponent-5OU5HATX.js +0 -2
  699. package/dist/exports/client/RelationshipComponent-5OU5HATX.js.map +0 -7
  700. package/dist/exports/client/chunk-3K3B6PJM.js.map +0 -7
  701. package/dist/exports/client/chunk-MLIITFAS.js.map +0 -7
  702. package/dist/exports/client/chunk-OSR74ZNW.js.map +0 -7
  703. package/dist/exports/client/chunk-WDKKMO4H.js +0 -2
  704. package/dist/exports/client/chunk-WDKKMO4H.js.map +0 -7
  705. package/dist/exports/client/chunk-ZITHDR53.js +0 -2
  706. package/dist/exports/client/chunk-ZITHDR53.js.map +0 -7
  707. package/dist/exports/client/component-IAKI3GRY.js +0 -2
  708. package/dist/exports/client/component-IAKI3GRY.js.map +0 -7
  709. package/dist/exports/client/component-W3PV5MJ7.js +0 -2
  710. package/dist/exports/client/component-W3PV5MJ7.js.map +0 -7
  711. package/dist/features/blocks/drawer/index.d.ts +0 -9
  712. package/dist/features/blocks/drawer/index.d.ts.map +0 -1
  713. package/dist/features/blocks/drawer/index.js +0 -78
  714. package/dist/features/blocks/drawer/index.js.map +0 -1
  715. package/dist/features/link/drawer/index.d.ts +0 -5
  716. package/dist/features/link/drawer/index.d.ts.map +0 -1
  717. package/dist/features/link/drawer/index.js +0 -94
  718. package/dist/features/link/drawer/index.js.map +0 -1
  719. package/dist/features/link/drawer/types.d.ts +0 -10
  720. package/dist/features/link/drawer/types.d.ts.map +0 -1
  721. package/dist/features/link/drawer/types.js +0 -3
  722. package/dist/features/link/drawer/types.js.map +0 -1
  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/features/upload/component/ExtraFieldsDrawer/index.d.ts +0 -12
  727. package/dist/features/upload/component/ExtraFieldsDrawer/index.d.ts.map +0 -1
  728. package/dist/features/upload/component/ExtraFieldsDrawer/index.js +0 -123
  729. package/dist/features/upload/component/ExtraFieldsDrawer/index.js.map +0 -1
  730. package/dist/lexical/utils/cloneDeep.d.ts +0 -2
  731. package/dist/lexical/utils/cloneDeep.d.ts.map +0 -1
  732. package/dist/lexical/utils/cloneDeep.js +0 -50
  733. package/dist/lexical/utils/cloneDeep.js.map +0 -1
  734. /package/dist/exports/client/{component-QWIGEOVD.js.map → component-VM36FRT2.js.map} +0 -0
@@ -0,0 +1,26 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { Drawer } from '@payloadcms/ui';
4
+ import React from 'react';
5
+ import { DrawerContent } from './DrawerContent.js';
6
+ /**
7
+ * This FieldsDrawer component can be used to easily create a Drawer that contains a form with fields within your feature.
8
+ * The fields are taken directly from the schema map based on your `featureKey` and `schemaPathSuffix`. Thus, this can only
9
+ * be used if you provide your field schema inside the `generateSchemaMap` prop of your feature.server.ts.
10
+ */ export const FieldsDrawer = ({ className, data, drawerSlug, drawerTitle, featureKey, handleDrawerSubmit, schemaPathSuffix })=>{
11
+ // The Drawer only renders its children (and itself) if it's open. Thus, by extracting the main content
12
+ // to DrawerContent, this should be faster
13
+ return /*#__PURE__*/ _jsx(Drawer, {
14
+ className: className,
15
+ slug: drawerSlug,
16
+ title: drawerTitle ?? '',
17
+ children: /*#__PURE__*/ _jsx(DrawerContent, {
18
+ data: data,
19
+ featureKey: featureKey,
20
+ handleDrawerSubmit: handleDrawerSubmit,
21
+ schemaPathSuffix: schemaPathSuffix
22
+ })
23
+ });
24
+ };
25
+
26
+ //# sourceMappingURL=Drawer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/utilities/fieldsDrawer/Drawer.tsx"],"sourcesContent":["'use client'\nimport type { Data, FormState, JsonObject } from 'payload'\n\nimport { Drawer } from '@payloadcms/ui'\nimport React from 'react'\n\nimport { DrawerContent } from './DrawerContent.js'\n\nexport type FieldsDrawerProps = {\n className?: string\n data?: Data\n drawerSlug: string\n drawerTitle?: string\n featureKey: string\n handleDrawerSubmit: (fields: FormState, data: JsonObject) => void\n schemaPathSuffix?: string\n}\n\n/**\n * This FieldsDrawer component can be used to easily create a Drawer that contains a form with fields within your feature.\n * The fields are taken directly from the schema map based on your `featureKey` and `schemaPathSuffix`. Thus, this can only\n * be used if you provide your field schema inside the `generateSchemaMap` prop of your feature.server.ts.\n */\nexport const FieldsDrawer: React.FC<FieldsDrawerProps> = ({\n className,\n data,\n drawerSlug,\n drawerTitle,\n featureKey,\n handleDrawerSubmit,\n schemaPathSuffix,\n}) => {\n // The Drawer only renders its children (and itself) if it's open. Thus, by extracting the main content\n // to DrawerContent, this should be faster\n return (\n <Drawer className={className} slug={drawerSlug} title={drawerTitle ?? ''}>\n <DrawerContent\n data={data}\n featureKey={featureKey}\n handleDrawerSubmit={handleDrawerSubmit}\n schemaPathSuffix={schemaPathSuffix}\n />\n </Drawer>\n )\n}\n"],"names":["Drawer","React","DrawerContent","FieldsDrawer","className","data","drawerSlug","drawerTitle","featureKey","handleDrawerSubmit","schemaPathSuffix","slug","title"],"mappings":"AAAA;;AAGA,SAASA,MAAM,QAAQ,iBAAgB;AACvC,OAAOC,WAAW,QAAO;AAEzB,SAASC,aAAa,QAAQ,qBAAoB;AAYlD;;;;CAIC,GACD,OAAO,MAAMC,eAA4C,CAAC,EACxDC,SAAS,EACTC,IAAI,EACJC,UAAU,EACVC,WAAW,EACXC,UAAU,EACVC,kBAAkB,EAClBC,gBAAgB,EACjB;IACC,uGAAuG;IACvG,0CAA0C;IAC1C,qBACE,KAACV;QAAOI,WAAWA;QAAWO,MAAML;QAAYM,OAAOL,eAAe;kBACpE,cAAA,KAACL;YACCG,MAAMA;YACNG,YAAYA;YACZC,oBAAoBA;YACpBC,kBAAkBA;;;AAI1B,EAAC"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { FieldsDrawerProps } from './Drawer.js';
3
+ export declare const DrawerContent: React.FC<Omit<FieldsDrawerProps, 'drawerSlug' | 'drawerTitle'>>;
4
+ //# sourceMappingURL=DrawerContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DrawerContent.d.ts","sourceRoot":"","sources":["../../../src/utilities/fieldsDrawer/DrawerContent.tsx"],"names":[],"mappings":"AAcA,OAAO,KAA2C,MAAM,OAAO,CAAA;AAG/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAIpD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,iBAAiB,EAAE,YAAY,GAAG,aAAa,CAAC,CAiFzF,CAAA"}
@@ -0,0 +1,90 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Form, FormSubmit, RenderFields, useConfig, useDocumentInfo, useFieldProps, useTranslation } from '@payloadcms/ui';
4
+ import { getFormState } from '@payloadcms/ui/shared';
5
+ import React, { useCallback, useEffect, useState } from 'react';
6
+ import { v4 as uuid } from 'uuid';
7
+ import { useEditorConfigContext } from '../../lexical/config/client/EditorConfigProvider.js';
8
+ export const DrawerContent = ({ data, featureKey, handleDrawerSubmit, schemaPathSuffix })=>{
9
+ const { t } = useTranslation();
10
+ const { id } = useDocumentInfo();
11
+ const { schemaPath } = useFieldProps();
12
+ const config = useConfig();
13
+ const [initialState, setInitialState] = useState(false);
14
+ const { field: { richTextComponentMap } } = useEditorConfigContext();
15
+ const componentMapRenderedFieldsPath = `lexical_internal_feature.${featureKey}.fields${schemaPathSuffix ? `.${schemaPathSuffix}` : ''}`;
16
+ const schemaFieldsPath = `${schemaPath}.lexical_internal_feature.${featureKey}${schemaPathSuffix ? `.${schemaPathSuffix}` : ''}`;
17
+ const fieldMap = richTextComponentMap.get(componentMapRenderedFieldsPath) // Field Schema
18
+ ;
19
+ useEffect(()=>{
20
+ const awaitInitialState = async ()=>{
21
+ const state = await getFormState({
22
+ apiRoute: config.routes.api,
23
+ body: {
24
+ id,
25
+ data: data ?? {},
26
+ operation: 'update',
27
+ schemaPath: schemaFieldsPath
28
+ },
29
+ serverURL: config.serverURL
30
+ }) // Form State
31
+ ;
32
+ setInitialState(state);
33
+ };
34
+ void awaitInitialState();
35
+ }, [
36
+ config.routes.api,
37
+ config.serverURL,
38
+ schemaFieldsPath,
39
+ id,
40
+ data
41
+ ]);
42
+ const onChange = useCallback(async ({ formState: prevFormState })=>{
43
+ return await getFormState({
44
+ apiRoute: config.routes.api,
45
+ body: {
46
+ id,
47
+ formState: prevFormState,
48
+ operation: 'update',
49
+ schemaPath: schemaFieldsPath
50
+ },
51
+ serverURL: config.serverURL
52
+ });
53
+ }, [
54
+ config.routes.api,
55
+ config.serverURL,
56
+ schemaFieldsPath,
57
+ id
58
+ ]);
59
+ if (initialState === false) {
60
+ return null;
61
+ }
62
+ return /*#__PURE__*/ _jsxs(Form, {
63
+ beforeSubmit: [
64
+ onChange
65
+ ],
66
+ disableValidationOnSubmit: true,
67
+ fields: Array.isArray(fieldMap) ? fieldMap : [],
68
+ initialState: initialState,
69
+ onChange: [
70
+ onChange
71
+ ],
72
+ onSubmit: handleDrawerSubmit,
73
+ uuid: uuid(),
74
+ children: [
75
+ /*#__PURE__*/ _jsx(RenderFields, {
76
+ fieldMap: Array.isArray(fieldMap) ? fieldMap : [],
77
+ forceRender: true,
78
+ path: "" // See Blocks feature path for details as for why this is empty
79
+ ,
80
+ readOnly: false,
81
+ schemaPath: schemaFieldsPath
82
+ }),
83
+ /*#__PURE__*/ _jsx(FormSubmit, {
84
+ children: t('fields:saveChanges')
85
+ })
86
+ ]
87
+ });
88
+ };
89
+
90
+ //# sourceMappingURL=DrawerContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/utilities/fieldsDrawer/DrawerContent.tsx"],"sourcesContent":["'use client'\nimport type { FormProps } from '@payloadcms/ui'\nimport type { FormState } from 'payload'\n\nimport {\n Form,\n FormSubmit,\n RenderFields,\n useConfig,\n useDocumentInfo,\n useFieldProps,\n useTranslation,\n} from '@payloadcms/ui'\nimport { getFormState } from '@payloadcms/ui/shared'\nimport React, { useCallback, useEffect, useState } from 'react'\nimport { v4 as uuid } from 'uuid'\n\nimport type { FieldsDrawerProps } from './Drawer.js'\n\nimport { useEditorConfigContext } from '../../lexical/config/client/EditorConfigProvider.js'\n\nexport const DrawerContent: React.FC<Omit<FieldsDrawerProps, 'drawerSlug' | 'drawerTitle'>> = ({\n data,\n featureKey,\n handleDrawerSubmit,\n schemaPathSuffix,\n}) => {\n const { t } = useTranslation()\n const { id } = useDocumentInfo()\n const { schemaPath } = useFieldProps()\n const config = useConfig()\n const [initialState, setInitialState] = useState<FormState | false>(false)\n const {\n field: { richTextComponentMap },\n } = useEditorConfigContext()\n\n const componentMapRenderedFieldsPath = `lexical_internal_feature.${featureKey}.fields${schemaPathSuffix ? `.${schemaPathSuffix}` : ''}`\n const schemaFieldsPath = `${schemaPath}.lexical_internal_feature.${featureKey}${schemaPathSuffix ? `.${schemaPathSuffix}` : ''}`\n\n const fieldMap = richTextComponentMap.get(componentMapRenderedFieldsPath) // Field Schema\n\n useEffect(() => {\n const awaitInitialState = async () => {\n const state = await getFormState({\n apiRoute: config.routes.api,\n body: {\n id,\n data: data ?? {},\n operation: 'update',\n schemaPath: schemaFieldsPath,\n },\n serverURL: config.serverURL,\n }) // Form State\n\n setInitialState(state)\n }\n\n void awaitInitialState()\n }, [config.routes.api, config.serverURL, schemaFieldsPath, id, data])\n\n const onChange: FormProps['onChange'][0] = useCallback(\n async ({ formState: prevFormState }) => {\n return await getFormState({\n apiRoute: config.routes.api,\n body: {\n id,\n formState: prevFormState,\n operation: 'update',\n schemaPath: schemaFieldsPath,\n },\n serverURL: config.serverURL,\n })\n },\n\n [config.routes.api, config.serverURL, schemaFieldsPath, id],\n )\n\n if (initialState === false) {\n return null\n }\n\n return (\n <Form\n beforeSubmit={[onChange]}\n disableValidationOnSubmit\n fields={Array.isArray(fieldMap) ? fieldMap : []}\n initialState={initialState}\n onChange={[onChange]}\n onSubmit={handleDrawerSubmit}\n uuid={uuid()}\n >\n <RenderFields\n fieldMap={Array.isArray(fieldMap) ? fieldMap : []}\n forceRender\n path=\"\" // See Blocks feature path for details as for why this is empty\n readOnly={false}\n schemaPath={schemaFieldsPath}\n />\n\n <FormSubmit>{t('fields:saveChanges')}</FormSubmit>\n </Form>\n )\n}\n"],"names":["Form","FormSubmit","RenderFields","useConfig","useDocumentInfo","useFieldProps","useTranslation","getFormState","React","useCallback","useEffect","useState","v4","uuid","useEditorConfigContext","DrawerContent","data","featureKey","handleDrawerSubmit","schemaPathSuffix","t","id","schemaPath","config","initialState","setInitialState","field","richTextComponentMap","componentMapRenderedFieldsPath","schemaFieldsPath","fieldMap","get","awaitInitialState","state","apiRoute","routes","api","body","operation","serverURL","onChange","formState","prevFormState","beforeSubmit","disableValidationOnSubmit","fields","Array","isArray","onSubmit","forceRender","path","readOnly"],"mappings":"AAAA;;AAIA,SACEA,IAAI,EACJC,UAAU,EACVC,YAAY,EACZC,SAAS,EACTC,eAAe,EACfC,aAAa,EACbC,cAAc,QACT,iBAAgB;AACvB,SAASC,YAAY,QAAQ,wBAAuB;AACpD,OAAOC,SAASC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,QAAO;AAC/D,SAASC,MAAMC,IAAI,QAAQ,OAAM;AAIjC,SAASC,sBAAsB,QAAQ,sDAAqD;AAE5F,OAAO,MAAMC,gBAAiF,CAAC,EAC7FC,IAAI,EACJC,UAAU,EACVC,kBAAkB,EAClBC,gBAAgB,EACjB;IACC,MAAM,EAAEC,CAAC,EAAE,GAAGd;IACd,MAAM,EAAEe,EAAE,EAAE,GAAGjB;IACf,MAAM,EAAEkB,UAAU,EAAE,GAAGjB;IACvB,MAAMkB,SAASpB;IACf,MAAM,CAACqB,cAAcC,gBAAgB,GAAGd,SAA4B;IACpE,MAAM,EACJe,OAAO,EAAEC,oBAAoB,EAAE,EAChC,GAAGb;IAEJ,MAAMc,iCAAiC,CAAC,yBAAyB,EAAEX,WAAW,OAAO,EAAEE,mBAAmB,CAAC,CAAC,EAAEA,iBAAiB,CAAC,GAAG,GAAG,CAAC;IACvI,MAAMU,mBAAmB,CAAC,EAAEP,WAAW,0BAA0B,EAAEL,WAAW,EAAEE,mBAAmB,CAAC,CAAC,EAAEA,iBAAiB,CAAC,GAAG,GAAG,CAAC;IAEhI,MAAMW,WAAWH,qBAAqBI,GAAG,CAACH,gCAAgC,eAAe;;IAEzFlB,UAAU;QACR,MAAMsB,oBAAoB;YACxB,MAAMC,QAAQ,MAAM1B,aAAa;gBAC/B2B,UAAUX,OAAOY,MAAM,CAACC,GAAG;gBAC3BC,MAAM;oBACJhB;oBACAL,MAAMA,QAAQ,CAAC;oBACfsB,WAAW;oBACXhB,YAAYO;gBACd;gBACAU,WAAWhB,OAAOgB,SAAS;YAC7B,GAAG,aAAa;;YAEhBd,gBAAgBQ;QAClB;QAEA,KAAKD;IACP,GAAG;QAACT,OAAOY,MAAM,CAACC,GAAG;QAAEb,OAAOgB,SAAS;QAAEV;QAAkBR;QAAIL;KAAK;IAEpE,MAAMwB,WAAqC/B,YACzC,OAAO,EAAEgC,WAAWC,aAAa,EAAE;QACjC,OAAO,MAAMnC,aAAa;YACxB2B,UAAUX,OAAOY,MAAM,CAACC,GAAG;YAC3BC,MAAM;gBACJhB;gBACAoB,WAAWC;gBACXJ,WAAW;gBACXhB,YAAYO;YACd;YACAU,WAAWhB,OAAOgB,SAAS;QAC7B;IACF,GAEA;QAAChB,OAAOY,MAAM,CAACC,GAAG;QAAEb,OAAOgB,SAAS;QAAEV;QAAkBR;KAAG;IAG7D,IAAIG,iBAAiB,OAAO;QAC1B,OAAO;IACT;IAEA,qBACE,MAACxB;QACC2C,cAAc;YAACH;SAAS;QACxBI,yBAAyB;QACzBC,QAAQC,MAAMC,OAAO,CAACjB,YAAYA,WAAW,EAAE;QAC/CN,cAAcA;QACdgB,UAAU;YAACA;SAAS;QACpBQ,UAAU9B;QACVL,MAAMA;;0BAEN,KAACX;gBACC4B,UAAUgB,MAAMC,OAAO,CAACjB,YAAYA,WAAW,EAAE;gBACjDmB,WAAW;gBACXC,MAAK,GAAG,+DAA+D;;gBACvEC,UAAU;gBACV7B,YAAYO;;0BAGd,KAAC5B;0BAAYmB,EAAE;;;;AAGrB,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utilities/forEachNodeRecursively.ts"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\nexport function recurseNodes({\n callback,\n nodes,\n}: {\n callback: (node: SerializedLexicalNode) => void\n nodes: SerializedLexicalNode[]\n}) {\n for (const node of nodes) {\n callback(node)\n\n if ('children' in node && Array.isArray(node?.children) && node?.children?.length) {\n recurseNodes({ callback, nodes: node.children as SerializedLexicalNode[] })\n }\n }\n}\n\nexport async function recurseNodesAsync({\n callback,\n nodes,\n}: {\n callback: (node: SerializedLexicalNode) => Promise<void>\n nodes: SerializedLexicalNode[]\n}) {\n for (const node of nodes) {\n await callback(node)\n\n if ('children' in node && Array.isArray(node?.children) && node?.children?.length) {\n await recurseNodesAsync({ callback, nodes: node.children as SerializedLexicalNode[] })\n }\n }\n}\n"],"names":["recurseNodes","callback","nodes","node","Array","isArray","children","length","recurseNodesAsync"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,OAAO,SAASA,aAAa,EAC3BC,QAAQ,EACRC,KAAK,EAIN;IACC,KAAK,MAAMC,QAAQD,MAAO;QACxBD,SAASE;QAET,IAAI,cAAcA,QAAQC,MAAMC,OAAO,CAACF,MAAMG,aAAaH,MAAMG,UAAUC,QAAQ;YACjFP,aAAa;gBAAEC;gBAAUC,OAAOC,KAAKG,QAAQ;YAA4B;QAC3E;IACF;AACF;AAEA,OAAO,eAAeE,kBAAkB,EACtCP,QAAQ,EACRC,KAAK,EAIN;IACC,KAAK,MAAMC,QAAQD,MAAO;QACxB,MAAMD,SAASE;QAEf,IAAI,cAAcA,QAAQC,MAAMC,OAAO,CAACF,MAAMG,aAAaH,MAAMG,UAAUC,QAAQ;YACjF,MAAMC,kBAAkB;gBAAEP;gBAAUC,OAAOC,KAAKG,QAAQ;YAA4B;QACtF;IACF;AACF"}
1
+ {"version":3,"sources":["../../src/utilities/forEachNodeRecursively.ts"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\nexport function recurseNodes({\n callback,\n nodes,\n}: {\n callback: (node: SerializedLexicalNode) => void\n nodes: SerializedLexicalNode[]\n}) {\n for (const node of nodes) {\n callback(node)\n\n if ('children' in node && Array.isArray(node?.children) && node?.children?.length) {\n recurseNodes({ callback, nodes: node.children as SerializedLexicalNode[] })\n }\n }\n}\n\nexport async function recurseNodesAsync({\n callback,\n nodes,\n}: {\n callback: (node: SerializedLexicalNode) => Promise<void>\n nodes: SerializedLexicalNode[]\n}) {\n for (const node of nodes) {\n await callback(node)\n\n if ('children' in node && Array.isArray(node?.children) && node?.children?.length) {\n await recurseNodesAsync({ callback, nodes: node.children as SerializedLexicalNode[] })\n }\n }\n}\n"],"names":["recurseNodes","callback","nodes","node","Array","isArray","children","length","recurseNodesAsync"],"mappings":"AAEA,OAAO,SAASA,aAAa,EAC3BC,QAAQ,EACRC,KAAK,EAIN;IACC,KAAK,MAAMC,QAAQD,MAAO;QACxBD,SAASE;QAET,IAAI,cAAcA,QAAQC,MAAMC,OAAO,CAACF,MAAMG,aAAaH,MAAMG,UAAUC,QAAQ;YACjFP,aAAa;gBAAEC;gBAAUC,OAAOC,KAAKG,QAAQ;YAA4B;QAC3E;IACF;AACF;AAEA,OAAO,eAAeE,kBAAkB,EACtCP,QAAQ,EACRC,KAAK,EAIN;IACC,KAAK,MAAMC,QAAQD,MAAO;QACxB,MAAMD,SAASE;QAEf,IAAI,cAAcA,QAAQC,MAAMC,OAAO,CAACF,MAAMG,aAAaH,MAAMG,UAAUC,QAAQ;YACjF,MAAMC,kBAAkB;gBAAEP;gBAAUC,OAAOC,KAAKG,QAAQ;YAA4B;QACtF;IACF;AACF"}
@@ -1,5 +1,5 @@
1
1
  import type { RichTextAdapter } from 'payload';
2
- import type { ResolvedServerFeatureMap } from '../features/types.js';
2
+ import type { ResolvedServerFeatureMap } from '../features/typesServer.js';
3
3
  export declare const getGenerateComponentMap: (args: {
4
4
  resolvedFeatureMap: ResolvedServerFeatureMap;
5
5
  }) => RichTextAdapter["generateComponentMap"];
@@ -1 +1 @@
1
- {"version":3,"file":"generateComponentMap.d.ts","sourceRoot":"","sources":["../../src/utilities/generateComponentMap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAK9C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAA;AAGpE,eAAO,MAAM,uBAAuB,SAC3B;IACL,kBAAkB,EAAE,wBAAwB,CAAA;CAC7C,KAAG,eAAe,CAAC,sBAAsB,CA2GzC,CAAA"}
1
+ {"version":3,"file":"generateComponentMap.d.ts","sourceRoot":"","sources":["../../src/utilities/generateComponentMap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAK9C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAG1E,eAAO,MAAM,uBAAuB,SAC3B;IACL,kBAAkB,EAAE,wBAAwB,CAAA;CAC7C,KAAG,eAAe,CAAC,sBAAsB,CAgHzC,CAAA"}
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { createElement as _createElement } from "react";
3
3
  import { mapFields } from '@payloadcms/ui/utilities/buildComponentMap';
4
4
  import React from 'react';
5
- export const getGenerateComponentMap = (args)=>({ WithServerSideProps, config, i18n, schemaPath })=>{
5
+ export const getGenerateComponentMap = (args)=>({ WithServerSideProps, config, i18n, payload, schemaPath })=>{
6
6
  const componentMap = new Map();
7
7
  // turn args.resolvedFeatureMap into an array of [key, value] pairs, ordered by value.order, lowest order first:
8
8
  const resolvedFeatureMapArray = Array.from(args.resolvedFeatureMap.entries()).sort((a, b)=>a[1].order - b[1].order);
@@ -15,13 +15,14 @@ export const getGenerateComponentMap = (args)=>({ WithServerSideProps, config, i
15
15
  const components = resolvedFeature.generateComponentMap({
16
16
  config,
17
17
  i18n,
18
+ payload,
18
19
  props: resolvedFeature.sanitizedServerFeatureProps,
19
20
  schemaPath
20
21
  });
21
22
  for(const componentKey in components){
22
23
  const Component = components[componentKey];
23
24
  if (Component) {
24
- componentMap.set(`feature.${featureKey}.components.${componentKey}`, /*#__PURE__*/ _jsx(WithServerSideProps, {
25
+ componentMap.set(`lexical_internal_feature.${featureKey}.lexical_internal_components.${componentKey}`, /*#__PURE__*/ _jsx(WithServerSideProps, {
25
26
  Component: Component,
26
27
  componentKey: componentKey,
27
28
  featureKey: resolvedFeature.key
@@ -47,10 +48,11 @@ export const getGenerateComponentMap = (args)=>({ WithServerSideProps, config, i
47
48
  disableAddingID: true,
48
49
  fieldSchema: fields,
49
50
  i18n,
50
- parentPath: `${schemaPath}.feature.${featureKey}.fields.${schemaKey}`,
51
+ parentPath: `${schemaPath}.lexical_internal_feature.${featureKey}.fields.${schemaKey}`,
52
+ payload,
51
53
  readOnly: false
52
54
  });
53
- componentMap.set(`feature.${featureKey}.fields.${schemaKey}`, mappedFields);
55
+ componentMap.set(`lexical_internal_feature.${featureKey}.fields.${schemaKey}`, mappedFields);
54
56
  }
55
57
  }
56
58
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utilities/generateComponentMap.tsx"],"sourcesContent":["import type { RichTextAdapter } from 'payload'\n\nimport { mapFields } from '@payloadcms/ui/utilities/buildComponentMap'\nimport React from 'react'\n\nimport type { ResolvedServerFeatureMap } from '../features/types.js'\nimport type { GeneratedFeatureProviderComponent } from '../types.js'\n\nexport const getGenerateComponentMap =\n (args: {\n resolvedFeatureMap: ResolvedServerFeatureMap\n }): RichTextAdapter['generateComponentMap'] =>\n ({ WithServerSideProps, config, i18n, schemaPath }) => {\n const componentMap = new Map()\n\n // turn args.resolvedFeatureMap into an array of [key, value] pairs, ordered by value.order, lowest order first:\n const resolvedFeatureMapArray = Array.from(args.resolvedFeatureMap.entries()).sort(\n (a, b) => a[1].order - b[1].order,\n )\n\n componentMap.set(\n `features`,\n resolvedFeatureMapArray\n .map(([featureKey, resolvedFeature]) => {\n const ClientComponent = resolvedFeature.ClientFeature\n const clientComponentProps = resolvedFeature.clientFeatureProps\n\n /**\n * Handle Feature Component Maps\n */\n if (\n 'generateComponentMap' in resolvedFeature &&\n typeof resolvedFeature.generateComponentMap === 'function'\n ) {\n const components = resolvedFeature.generateComponentMap({\n config,\n i18n,\n props: resolvedFeature.sanitizedServerFeatureProps,\n schemaPath,\n })\n\n for (const componentKey in components) {\n const Component = components[componentKey]\n\n if (Component) {\n componentMap.set(\n `feature.${featureKey}.components.${componentKey}`,\n <WithServerSideProps\n Component={Component}\n componentKey={componentKey}\n featureKey={resolvedFeature.key}\n key={`${resolvedFeature.key}-${componentKey}`}\n />,\n )\n }\n }\n }\n\n /**\n * Handle Feature Schema Maps (rendered fields)\n */\n if (\n 'generateSchemaMap' in resolvedFeature &&\n typeof resolvedFeature.generateSchemaMap === 'function'\n ) {\n const schemas = resolvedFeature.generateSchemaMap({\n config,\n i18n,\n props: resolvedFeature.sanitizedServerFeatureProps,\n schemaMap: new Map(),\n schemaPath,\n })\n\n if (schemas) {\n for (const [schemaKey, fields] of schemas.entries()) {\n const mappedFields = mapFields({\n WithServerSideProps,\n config,\n disableAddingID: true,\n fieldSchema: fields,\n i18n,\n parentPath: `${schemaPath}.feature.${featureKey}.fields.${schemaKey}`,\n readOnly: false,\n })\n\n componentMap.set(`feature.${featureKey}.fields.${schemaKey}`, mappedFields)\n }\n }\n }\n\n if (!ClientComponent) {\n return null\n }\n\n return {\n ClientFeature:\n clientComponentProps && typeof clientComponentProps === 'object' ? (\n <ClientComponent\n {...clientComponentProps}\n featureKey={resolvedFeature.key}\n key={resolvedFeature.key}\n order={resolvedFeature.order}\n />\n ) : (\n <ClientComponent\n featureKey={resolvedFeature.key}\n key={resolvedFeature.key}\n order={resolvedFeature.order}\n />\n ),\n key: resolvedFeature.key,\n order: resolvedFeature.order,\n } as GeneratedFeatureProviderComponent\n })\n .filter((feature) => feature !== null),\n )\n\n return componentMap\n }\n"],"names":["mapFields","React","getGenerateComponentMap","args","WithServerSideProps","config","i18n","schemaPath","componentMap","Map","resolvedFeatureMapArray","Array","from","resolvedFeatureMap","entries","sort","a","b","order","set","map","featureKey","resolvedFeature","ClientComponent","ClientFeature","clientComponentProps","clientFeatureProps","generateComponentMap","components","props","sanitizedServerFeatureProps","componentKey","Component","key","generateSchemaMap","schemas","schemaMap","schemaKey","fields","mappedFields","disableAddingID","fieldSchema","parentPath","readOnly","filter","feature"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;AAEA,SAASA,SAAS,QAAQ,6CAA4C;AACtE,OAAOC,WAAW,QAAO;AAKzB,OAAO,MAAMC,0BACX,CAACC,OAGD,CAAC,EAAEC,mBAAmB,EAAEC,MAAM,EAAEC,IAAI,EAAEC,UAAU,EAAE;QAChD,MAAMC,eAAe,IAAIC;QAEzB,gHAAgH;QAChH,MAAMC,0BAA0BC,MAAMC,IAAI,CAACT,KAAKU,kBAAkB,CAACC,OAAO,IAAIC,IAAI,CAChF,CAACC,GAAGC,IAAMD,CAAC,CAAC,EAAE,CAACE,KAAK,GAAGD,CAAC,CAAC,EAAE,CAACC,KAAK;QAGnCV,aAAaW,GAAG,CACd,CAAC,QAAQ,CAAC,EACVT,wBACGU,GAAG,CAAC,CAAC,CAACC,YAAYC,gBAAgB;YACjC,MAAMC,kBAAkBD,gBAAgBE,aAAa;YACrD,MAAMC,uBAAuBH,gBAAgBI,kBAAkB;YAE/D;;WAEC,GACD,IACE,0BAA0BJ,mBAC1B,OAAOA,gBAAgBK,oBAAoB,KAAK,YAChD;gBACA,MAAMC,aAAaN,gBAAgBK,oBAAoB,CAAC;oBACtDtB;oBACAC;oBACAuB,OAAOP,gBAAgBQ,2BAA2B;oBAClDvB;gBACF;gBAEA,IAAK,MAAMwB,gBAAgBH,WAAY;oBACrC,MAAMI,YAAYJ,UAAU,CAACG,aAAa;oBAE1C,IAAIC,WAAW;wBACbxB,aAAaW,GAAG,CACd,CAAC,QAAQ,EAAEE,WAAW,YAAY,EAAEU,aAAa,CAAC,gBAClD,KAAC3B;4BACC4B,WAAWA;4BACXD,cAAcA;4BACdV,YAAYC,gBAAgBW,GAAG;2BAC1B,CAAC,EAAEX,gBAAgBW,GAAG,CAAC,CAAC,EAAEF,aAAa,CAAC;oBAGnD;gBACF;YACF;YAEA;;WAEC,GACD,IACE,uBAAuBT,mBACvB,OAAOA,gBAAgBY,iBAAiB,KAAK,YAC7C;gBACA,MAAMC,UAAUb,gBAAgBY,iBAAiB,CAAC;oBAChD7B;oBACAC;oBACAuB,OAAOP,gBAAgBQ,2BAA2B;oBAClDM,WAAW,IAAI3B;oBACfF;gBACF;gBAEA,IAAI4B,SAAS;oBACX,KAAK,MAAM,CAACE,WAAWC,OAAO,IAAIH,QAAQrB,OAAO,GAAI;wBACnD,MAAMyB,eAAevC,UAAU;4BAC7BI;4BACAC;4BACAmC,iBAAiB;4BACjBC,aAAaH;4BACbhC;4BACAoC,YAAY,CAAC,EAAEnC,WAAW,SAAS,EAAEc,WAAW,QAAQ,EAAEgB,UAAU,CAAC;4BACrEM,UAAU;wBACZ;wBAEAnC,aAAaW,GAAG,CAAC,CAAC,QAAQ,EAAEE,WAAW,QAAQ,EAAEgB,UAAU,CAAC,EAAEE;oBAChE;gBACF;YACF;YAEA,IAAI,CAAChB,iBAAiB;gBACpB,OAAO;YACT;YAEA,OAAO;gBACLC,eACEC,wBAAwB,OAAOA,yBAAyB,yBACtD,eAACF;oBACE,GAAGE,oBAAoB;oBACxBJ,YAAYC,gBAAgBW,GAAG;oBAC/BA,KAAKX,gBAAgBW,GAAG;oBACxBf,OAAOI,gBAAgBJ,KAAK;mCAG9B,KAACK;oBACCF,YAAYC,gBAAgBW,GAAG;oBAE/Bf,OAAOI,gBAAgBJ,KAAK;mBADvBI,gBAAgBW,GAAG;gBAI9BA,KAAKX,gBAAgBW,GAAG;gBACxBf,OAAOI,gBAAgBJ,KAAK;YAC9B;QACF,GACC0B,MAAM,CAAC,CAACC,UAAYA,YAAY;QAGrC,OAAOrC;IACT,EAAC"}
1
+ {"version":3,"sources":["../../src/utilities/generateComponentMap.tsx"],"sourcesContent":["import type { RichTextAdapter } from 'payload'\n\nimport { mapFields } from '@payloadcms/ui/utilities/buildComponentMap'\nimport React from 'react'\n\nimport type { ResolvedServerFeatureMap } from '../features/typesServer.js'\nimport type { GeneratedFeatureProviderComponent } from '../types.js'\n\nexport const getGenerateComponentMap =\n (args: {\n resolvedFeatureMap: ResolvedServerFeatureMap\n }): RichTextAdapter['generateComponentMap'] =>\n ({ WithServerSideProps, config, i18n, payload, schemaPath }) => {\n const componentMap = new Map()\n\n // turn args.resolvedFeatureMap into an array of [key, value] pairs, ordered by value.order, lowest order first:\n const resolvedFeatureMapArray = Array.from(args.resolvedFeatureMap.entries()).sort(\n (a, b) => a[1].order - b[1].order,\n )\n\n componentMap.set(\n `features`,\n resolvedFeatureMapArray\n .map(([featureKey, resolvedFeature]) => {\n const ClientComponent = resolvedFeature.ClientFeature\n const clientComponentProps = resolvedFeature.clientFeatureProps\n\n /**\n * Handle Feature Component Maps\n */\n if (\n 'generateComponentMap' in resolvedFeature &&\n typeof resolvedFeature.generateComponentMap === 'function'\n ) {\n const components = resolvedFeature.generateComponentMap({\n config,\n i18n,\n payload,\n props: resolvedFeature.sanitizedServerFeatureProps,\n schemaPath,\n })\n\n for (const componentKey in components) {\n const Component = components[componentKey]\n\n if (Component) {\n componentMap.set(\n `lexical_internal_feature.${featureKey}.lexical_internal_components.${componentKey}`,\n <WithServerSideProps\n Component={Component}\n componentKey={componentKey}\n featureKey={resolvedFeature.key}\n key={`${resolvedFeature.key}-${componentKey}`}\n />,\n )\n }\n }\n }\n\n /**\n * Handle Feature Schema Maps (rendered fields)\n */\n if (\n 'generateSchemaMap' in resolvedFeature &&\n typeof resolvedFeature.generateSchemaMap === 'function'\n ) {\n const schemas = resolvedFeature.generateSchemaMap({\n config,\n i18n,\n props: resolvedFeature.sanitizedServerFeatureProps,\n schemaMap: new Map(),\n schemaPath,\n })\n\n if (schemas) {\n for (const [schemaKey, fields] of schemas.entries()) {\n const mappedFields = mapFields({\n WithServerSideProps,\n config,\n disableAddingID: true,\n fieldSchema: fields,\n i18n,\n parentPath: `${schemaPath}.lexical_internal_feature.${featureKey}.fields.${schemaKey}`,\n payload,\n readOnly: false,\n })\n\n componentMap.set(\n `lexical_internal_feature.${featureKey}.fields.${schemaKey}`,\n mappedFields,\n )\n }\n }\n }\n\n if (!ClientComponent) {\n return null\n }\n\n return {\n ClientFeature:\n clientComponentProps && typeof clientComponentProps === 'object' ? (\n <ClientComponent\n {...clientComponentProps}\n featureKey={resolvedFeature.key}\n key={resolvedFeature.key}\n order={resolvedFeature.order}\n />\n ) : (\n <ClientComponent\n featureKey={resolvedFeature.key}\n key={resolvedFeature.key}\n order={resolvedFeature.order}\n />\n ),\n key: resolvedFeature.key,\n order: resolvedFeature.order,\n } as GeneratedFeatureProviderComponent\n })\n .filter((feature) => feature !== null),\n )\n\n return componentMap\n }\n"],"names":["mapFields","React","getGenerateComponentMap","args","WithServerSideProps","config","i18n","payload","schemaPath","componentMap","Map","resolvedFeatureMapArray","Array","from","resolvedFeatureMap","entries","sort","a","b","order","set","map","featureKey","resolvedFeature","ClientComponent","ClientFeature","clientComponentProps","clientFeatureProps","generateComponentMap","components","props","sanitizedServerFeatureProps","componentKey","Component","key","generateSchemaMap","schemas","schemaMap","schemaKey","fields","mappedFields","disableAddingID","fieldSchema","parentPath","readOnly","filter","feature"],"mappings":";;AAEA,SAASA,SAAS,QAAQ,6CAA4C;AACtE,OAAOC,WAAW,QAAO;AAKzB,OAAO,MAAMC,0BACX,CAACC,OAGD,CAAC,EAAEC,mBAAmB,EAAEC,MAAM,EAAEC,IAAI,EAAEC,OAAO,EAAEC,UAAU,EAAE;QACzD,MAAMC,eAAe,IAAIC;QAEzB,gHAAgH;QAChH,MAAMC,0BAA0BC,MAAMC,IAAI,CAACV,KAAKW,kBAAkB,CAACC,OAAO,IAAIC,IAAI,CAChF,CAACC,GAAGC,IAAMD,CAAC,CAAC,EAAE,CAACE,KAAK,GAAGD,CAAC,CAAC,EAAE,CAACC,KAAK;QAGnCV,aAAaW,GAAG,CACd,CAAC,QAAQ,CAAC,EACVT,wBACGU,GAAG,CAAC,CAAC,CAACC,YAAYC,gBAAgB;YACjC,MAAMC,kBAAkBD,gBAAgBE,aAAa;YACrD,MAAMC,uBAAuBH,gBAAgBI,kBAAkB;YAE/D;;WAEC,GACD,IACE,0BAA0BJ,mBAC1B,OAAOA,gBAAgBK,oBAAoB,KAAK,YAChD;gBACA,MAAMC,aAAaN,gBAAgBK,oBAAoB,CAAC;oBACtDvB;oBACAC;oBACAC;oBACAuB,OAAOP,gBAAgBQ,2BAA2B;oBAClDvB;gBACF;gBAEA,IAAK,MAAMwB,gBAAgBH,WAAY;oBACrC,MAAMI,YAAYJ,UAAU,CAACG,aAAa;oBAE1C,IAAIC,WAAW;wBACbxB,aAAaW,GAAG,CACd,CAAC,yBAAyB,EAAEE,WAAW,6BAA6B,EAAEU,aAAa,CAAC,gBACpF,KAAC5B;4BACC6B,WAAWA;4BACXD,cAAcA;4BACdV,YAAYC,gBAAgBW,GAAG;2BAC1B,CAAC,EAAEX,gBAAgBW,GAAG,CAAC,CAAC,EAAEF,aAAa,CAAC;oBAGnD;gBACF;YACF;YAEA;;WAEC,GACD,IACE,uBAAuBT,mBACvB,OAAOA,gBAAgBY,iBAAiB,KAAK,YAC7C;gBACA,MAAMC,UAAUb,gBAAgBY,iBAAiB,CAAC;oBAChD9B;oBACAC;oBACAwB,OAAOP,gBAAgBQ,2BAA2B;oBAClDM,WAAW,IAAI3B;oBACfF;gBACF;gBAEA,IAAI4B,SAAS;oBACX,KAAK,MAAM,CAACE,WAAWC,OAAO,IAAIH,QAAQrB,OAAO,GAAI;wBACnD,MAAMyB,eAAexC,UAAU;4BAC7BI;4BACAC;4BACAoC,iBAAiB;4BACjBC,aAAaH;4BACbjC;4BACAqC,YAAY,CAAC,EAAEnC,WAAW,0BAA0B,EAAEc,WAAW,QAAQ,EAAEgB,UAAU,CAAC;4BACtF/B;4BACAqC,UAAU;wBACZ;wBAEAnC,aAAaW,GAAG,CACd,CAAC,yBAAyB,EAAEE,WAAW,QAAQ,EAAEgB,UAAU,CAAC,EAC5DE;oBAEJ;gBACF;YACF;YAEA,IAAI,CAAChB,iBAAiB;gBACpB,OAAO;YACT;YAEA,OAAO;gBACLC,eACEC,wBAAwB,OAAOA,yBAAyB,yBACtD,eAACF;oBACE,GAAGE,oBAAoB;oBACxBJ,YAAYC,gBAAgBW,GAAG;oBAC/BA,KAAKX,gBAAgBW,GAAG;oBACxBf,OAAOI,gBAAgBJ,KAAK;mCAG9B,KAACK;oBACCF,YAAYC,gBAAgBW,GAAG;oBAE/Bf,OAAOI,gBAAgBJ,KAAK;mBADvBI,gBAAgBW,GAAG;gBAI9BA,KAAKX,gBAAgBW,GAAG;gBACxBf,OAAOI,gBAAgBJ,KAAK;YAC9B;QACF,GACC0B,MAAM,CAAC,CAACC,UAAYA,YAAY;QAGrC,OAAOrC;IACT,EAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { RichTextAdapter } from 'payload';
2
- import type { ResolvedServerFeatureMap } from '../features/types.js';
2
+ import type { ResolvedServerFeatureMap } from '../features/typesServer.js';
3
3
  export declare const getGenerateSchemaMap: (args: {
4
4
  resolvedFeatureMap: ResolvedServerFeatureMap;
5
5
  }) => RichTextAdapter["generateSchemaMap"];
@@ -1 +1 @@
1
- {"version":3,"file":"generateSchemaMap.d.ts","sourceRoot":"","sources":["../../src/utilities/generateSchemaMap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAA;AAEpE,eAAO,MAAM,oBAAoB,SACxB;IAAE,kBAAkB,EAAE,wBAAwB,CAAA;CAAE,KAAG,eAAe,CAAC,mBAAmB,CAyB5F,CAAA"}
1
+ {"version":3,"file":"generateSchemaMap.d.ts","sourceRoot":"","sources":["../../src/utilities/generateSchemaMap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAI9C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAE1E,eAAO,MAAM,oBAAoB,SACxB;IAAE,kBAAkB,EAAE,wBAAwB,CAAA;CAAE,KAAG,eAAe,CAAC,mBAAmB,CAkC5F,CAAA"}
@@ -1,3 +1,4 @@
1
+ import { traverseFields } from '@payloadcms/ui/utilities/buildFieldSchemaMap/traverseFields';
1
2
  export const getGenerateSchemaMap = (args)=>({ config, i18n, schemaMap, schemaPath })=>{
2
3
  for (const [featureKey, resolvedFeature] of args.resolvedFeatureMap.entries()){
3
4
  if (!('generateSchemaMap' in resolvedFeature) || typeof resolvedFeature.generateSchemaMap !== 'function') {
@@ -12,7 +13,15 @@ export const getGenerateSchemaMap = (args)=>({ config, i18n, schemaMap, schemaPa
12
13
  });
13
14
  if (schemas) {
14
15
  for (const [schemaKey, fields] of schemas.entries()){
15
- schemaMap.set(`${schemaPath}.feature.${featureKey}.${schemaKey}`, fields);
16
+ // generate schema map entries for sub-fields using traverseFields
17
+ traverseFields({
18
+ config,
19
+ fields,
20
+ i18n,
21
+ schemaMap: schemas,
22
+ schemaPath: schemaKey
23
+ });
24
+ schemaMap.set(`${schemaPath}.lexical_internal_feature.${featureKey}.${schemaKey}`, fields);
16
25
  }
17
26
  }
18
27
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utilities/generateSchemaMap.ts"],"sourcesContent":["import type { RichTextAdapter } from 'payload'\n\nimport type { ResolvedServerFeatureMap } from '../features/types.js'\n\nexport const getGenerateSchemaMap =\n (args: { resolvedFeatureMap: ResolvedServerFeatureMap }): RichTextAdapter['generateSchemaMap'] =>\n ({ config, i18n, schemaMap, schemaPath }) => {\n for (const [featureKey, resolvedFeature] of args.resolvedFeatureMap.entries()) {\n if (\n !('generateSchemaMap' in resolvedFeature) ||\n typeof resolvedFeature.generateSchemaMap !== 'function'\n ) {\n continue\n }\n const schemas = resolvedFeature.generateSchemaMap({\n config,\n i18n,\n props: resolvedFeature.sanitizedServerFeatureProps,\n schemaMap,\n schemaPath,\n })\n\n if (schemas) {\n for (const [schemaKey, fields] of schemas.entries()) {\n schemaMap.set(`${schemaPath}.feature.${featureKey}.${schemaKey}`, fields)\n }\n }\n }\n\n return schemaMap\n }\n"],"names":["getGenerateSchemaMap","args","config","i18n","schemaMap","schemaPath","featureKey","resolvedFeature","resolvedFeatureMap","entries","generateSchemaMap","schemas","props","sanitizedServerFeatureProps","schemaKey","fields","set"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":"AAIA,OAAO,MAAMA,uBACX,CAACC,OACD,CAAC,EAAEC,MAAM,EAAEC,IAAI,EAAEC,SAAS,EAAEC,UAAU,EAAE;QACtC,KAAK,MAAM,CAACC,YAAYC,gBAAgB,IAAIN,KAAKO,kBAAkB,CAACC,OAAO,GAAI;YAC7E,IACE,CAAE,CAAA,uBAAuBF,eAAc,KACvC,OAAOA,gBAAgBG,iBAAiB,KAAK,YAC7C;gBACA;YACF;YACA,MAAMC,UAAUJ,gBAAgBG,iBAAiB,CAAC;gBAChDR;gBACAC;gBACAS,OAAOL,gBAAgBM,2BAA2B;gBAClDT;gBACAC;YACF;YAEA,IAAIM,SAAS;gBACX,KAAK,MAAM,CAACG,WAAWC,OAAO,IAAIJ,QAAQF,OAAO,GAAI;oBACnDL,UAAUY,GAAG,CAAC,CAAC,EAAEX,WAAW,SAAS,EAAEC,WAAW,CAAC,EAAEQ,UAAU,CAAC,EAAEC;gBACpE;YACF;QACF;QAEA,OAAOX;IACT,EAAC"}
1
+ {"version":3,"sources":["../../src/utilities/generateSchemaMap.ts"],"sourcesContent":["import type { RichTextAdapter } from 'payload'\n\nimport { traverseFields } from '@payloadcms/ui/utilities/buildFieldSchemaMap/traverseFields'\n\nimport type { ResolvedServerFeatureMap } from '../features/typesServer.js'\n\nexport const getGenerateSchemaMap =\n (args: { resolvedFeatureMap: ResolvedServerFeatureMap }): RichTextAdapter['generateSchemaMap'] =>\n ({ config, i18n, schemaMap, schemaPath }) => {\n for (const [featureKey, resolvedFeature] of args.resolvedFeatureMap.entries()) {\n if (\n !('generateSchemaMap' in resolvedFeature) ||\n typeof resolvedFeature.generateSchemaMap !== 'function'\n ) {\n continue\n }\n const schemas = resolvedFeature.generateSchemaMap({\n config,\n i18n,\n props: resolvedFeature.sanitizedServerFeatureProps,\n schemaMap,\n schemaPath,\n })\n\n if (schemas) {\n for (const [schemaKey, fields] of schemas.entries()) {\n // generate schema map entries for sub-fields using traverseFields\n traverseFields({\n config,\n fields,\n i18n,\n schemaMap: schemas,\n schemaPath: schemaKey,\n })\n\n schemaMap.set(`${schemaPath}.lexical_internal_feature.${featureKey}.${schemaKey}`, fields)\n }\n }\n }\n\n return schemaMap\n }\n"],"names":["traverseFields","getGenerateSchemaMap","args","config","i18n","schemaMap","schemaPath","featureKey","resolvedFeature","resolvedFeatureMap","entries","generateSchemaMap","schemas","props","sanitizedServerFeatureProps","schemaKey","fields","set"],"mappings":"AAEA,SAASA,cAAc,QAAQ,8DAA6D;AAI5F,OAAO,MAAMC,uBACX,CAACC,OACD,CAAC,EAAEC,MAAM,EAAEC,IAAI,EAAEC,SAAS,EAAEC,UAAU,EAAE;QACtC,KAAK,MAAM,CAACC,YAAYC,gBAAgB,IAAIN,KAAKO,kBAAkB,CAACC,OAAO,GAAI;YAC7E,IACE,CAAE,CAAA,uBAAuBF,eAAc,KACvC,OAAOA,gBAAgBG,iBAAiB,KAAK,YAC7C;gBACA;YACF;YACA,MAAMC,UAAUJ,gBAAgBG,iBAAiB,CAAC;gBAChDR;gBACAC;gBACAS,OAAOL,gBAAgBM,2BAA2B;gBAClDT;gBACAC;YACF;YAEA,IAAIM,SAAS;gBACX,KAAK,MAAM,CAACG,WAAWC,OAAO,IAAIJ,QAAQF,OAAO,GAAI;oBACnD,kEAAkE;oBAClEV,eAAe;wBACbG;wBACAa;wBACAZ;wBACAC,WAAWO;wBACXN,YAAYS;oBACd;oBAEAV,UAAUY,GAAG,CAAC,CAAC,EAAEX,WAAW,0BAA0B,EAAEC,WAAW,CAAC,EAAEQ,UAAU,CAAC,EAAEC;gBACrF;YACF;QACF;QAEA,OAAOX;IACT,EAAC"}
@@ -0,0 +1,15 @@
1
+ import type { Payload } from 'payload';
2
+ /**
3
+ * This goes through every single collection and field in the payload config, and migrates its data from Slate to Lexical. This does not support sub-fields within slate.
4
+ *
5
+ * It will only translate fields fulfilling all these requirements:
6
+ * - field schema uses lexical editor
7
+ * - lexical editor has SlateToLexicalFeature added
8
+ * - saved field data is in Slate format
9
+ *
10
+ * @param payload
11
+ */
12
+ export declare function migrateSlateToLexical({ payload }: {
13
+ payload: Payload;
14
+ }): Promise<void>;
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utilities/migrateSlateToLexical/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAyC,OAAO,EAAE,MAAM,SAAS,CAAA;AAI7E;;;;;;;;;GASG;AACH,wBAAsB,qBAAqB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,iBA0B5E"}
@@ -0,0 +1,105 @@
1
+ import { migrateDocumentFieldsRecursively } from './migrateDocumentFieldsRecursively.js';
2
+ /**
3
+ * This goes through every single collection and field in the payload config, and migrates its data from Slate to Lexical. This does not support sub-fields within slate.
4
+ *
5
+ * It will only translate fields fulfilling all these requirements:
6
+ * - field schema uses lexical editor
7
+ * - lexical editor has SlateToLexicalFeature added
8
+ * - saved field data is in Slate format
9
+ *
10
+ * @param payload
11
+ */ export async function migrateSlateToLexical({ payload }) {
12
+ const collections = payload.config.collections;
13
+ const allLocales = payload.config.localization ? payload.config.localization.localeCodes : [
14
+ null
15
+ ];
16
+ const totalCollections = collections.length;
17
+ for (const locale of allLocales){
18
+ let curCollection = 0;
19
+ for (const collection of collections){
20
+ curCollection++;
21
+ await migrateCollection({
22
+ collection,
23
+ cur: curCollection,
24
+ locale,
25
+ max: totalCollections,
26
+ payload
27
+ });
28
+ }
29
+ for (const global of payload.config.globals){
30
+ await migrateGlobal({
31
+ global,
32
+ locale,
33
+ payload
34
+ });
35
+ }
36
+ }
37
+ }
38
+ async function migrateGlobal({ global, locale, payload }) {
39
+ console.log(`SlateToLexical: ${locale}: Migrating global:`, global.slug);
40
+ const document = await payload.findGlobal({
41
+ slug: global.slug,
42
+ depth: 0,
43
+ locale: locale || undefined,
44
+ overrideAccess: true
45
+ });
46
+ const found = migrateDocument({
47
+ document,
48
+ fields: global.fields
49
+ });
50
+ if (found) {
51
+ await payload.updateGlobal({
52
+ slug: global.slug,
53
+ data: document,
54
+ depth: 0,
55
+ locale: locale || undefined
56
+ });
57
+ }
58
+ }
59
+ async function migrateCollection({ collection, cur, locale, max, payload }) {
60
+ console.log(`SlateToLexical: ${locale}: Migrating collection:`, collection.slug, '(' + cur + '/' + max + ')');
61
+ const documentCount = (await payload.count({
62
+ collection: collection.slug,
63
+ depth: 0,
64
+ locale: locale || undefined
65
+ })).totalDocs;
66
+ let page = 1;
67
+ let migrated = 0;
68
+ while(migrated < documentCount){
69
+ const documents = await payload.find({
70
+ collection: collection.slug,
71
+ depth: 0,
72
+ locale: locale || undefined,
73
+ overrideAccess: true,
74
+ page,
75
+ pagination: true
76
+ });
77
+ for (const document of documents.docs){
78
+ migrated++;
79
+ console.log(`SlateToLexical: ${locale}: Migrating collection:`, collection.slug, '(' + cur + '/' + max + ') - Migrating Document: ' + document.id + ' (' + migrated + '/' + documentCount + ')');
80
+ const found = migrateDocument({
81
+ document,
82
+ fields: collection.fields
83
+ });
84
+ if (found) {
85
+ await payload.update({
86
+ id: document.id,
87
+ collection: collection.slug,
88
+ data: document,
89
+ depth: 0,
90
+ locale: locale || undefined
91
+ });
92
+ }
93
+ }
94
+ page++;
95
+ }
96
+ }
97
+ function migrateDocument({ document, fields }) {
98
+ return !!migrateDocumentFieldsRecursively({
99
+ data: document,
100
+ fields,
101
+ found: 0
102
+ });
103
+ }
104
+
105
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/utilities/migrateSlateToLexical/index.ts"],"sourcesContent":["import type { CollectionConfig, Field, GlobalConfig, Payload } from 'payload'\n\nimport { migrateDocumentFieldsRecursively } from './migrateDocumentFieldsRecursively.js'\n\n/**\n * This goes through every single collection and field in the payload config, and migrates its data from Slate to Lexical. This does not support sub-fields within slate.\n *\n * It will only translate fields fulfilling all these requirements:\n * - field schema uses lexical editor\n * - lexical editor has SlateToLexicalFeature added\n * - saved field data is in Slate format\n *\n * @param payload\n */\nexport async function migrateSlateToLexical({ payload }: { payload: Payload }) {\n const collections = payload.config.collections\n\n const allLocales = payload.config.localization ? payload.config.localization.localeCodes : [null]\n\n const totalCollections = collections.length\n for (const locale of allLocales) {\n let curCollection = 0\n for (const collection of collections) {\n curCollection++\n await migrateCollection({\n collection,\n cur: curCollection,\n locale,\n max: totalCollections,\n payload,\n })\n }\n for (const global of payload.config.globals) {\n await migrateGlobal({\n global,\n locale,\n payload,\n })\n }\n }\n}\n\nasync function migrateGlobal({\n global,\n locale,\n payload,\n}: {\n global: GlobalConfig\n locale: null | string\n payload: Payload\n}) {\n console.log(`SlateToLexical: ${locale}: Migrating global:`, global.slug)\n\n const document = await payload.findGlobal({\n slug: global.slug,\n depth: 0,\n locale: locale || undefined,\n overrideAccess: true,\n })\n\n const found = migrateDocument({\n document,\n fields: global.fields,\n })\n\n if (found) {\n await payload.updateGlobal({\n slug: global.slug,\n data: document,\n depth: 0,\n locale: locale || undefined,\n })\n }\n}\n\nasync function migrateCollection({\n collection,\n cur,\n locale,\n max,\n payload,\n}: {\n collection: CollectionConfig\n cur: number\n locale: null | string\n max: number\n payload: Payload\n}) {\n console.log(\n `SlateToLexical: ${locale}: Migrating collection:`,\n collection.slug,\n '(' + cur + '/' + max + ')',\n )\n\n const documentCount = (\n await payload.count({\n collection: collection.slug,\n depth: 0,\n locale: locale || undefined,\n })\n ).totalDocs\n\n let page = 1\n let migrated = 0\n\n while (migrated < documentCount) {\n const documents = await payload.find({\n collection: collection.slug,\n depth: 0,\n locale: locale || undefined,\n overrideAccess: true,\n page,\n pagination: true,\n })\n\n for (const document of documents.docs) {\n migrated++\n console.log(\n `SlateToLexical: ${locale}: Migrating collection:`,\n collection.slug,\n '(' +\n cur +\n '/' +\n max +\n ') - Migrating Document: ' +\n document.id +\n ' (' +\n migrated +\n '/' +\n documentCount +\n ')',\n )\n const found = migrateDocument({\n document,\n fields: collection.fields,\n })\n\n if (found) {\n await payload.update({\n id: document.id,\n collection: collection.slug,\n data: document,\n depth: 0,\n locale: locale || undefined,\n })\n }\n }\n page++\n }\n}\n\nfunction migrateDocument({\n document,\n fields,\n}: {\n document: Record<string, unknown>\n fields: Field[]\n}): boolean {\n return !!migrateDocumentFieldsRecursively({\n data: document,\n fields,\n found: 0,\n })\n}\n"],"names":["migrateDocumentFieldsRecursively","migrateSlateToLexical","payload","collections","config","allLocales","localization","localeCodes","totalCollections","length","locale","curCollection","collection","migrateCollection","cur","max","global","globals","migrateGlobal","console","log","slug","document","findGlobal","depth","undefined","overrideAccess","found","migrateDocument","fields","updateGlobal","data","documentCount","count","totalDocs","page","migrated","documents","find","pagination","docs","id","update"],"mappings":"AAEA,SAASA,gCAAgC,QAAQ,wCAAuC;AAExF;;;;;;;;;CASC,GACD,OAAO,eAAeC,sBAAsB,EAAEC,OAAO,EAAwB;IAC3E,MAAMC,cAAcD,QAAQE,MAAM,CAACD,WAAW;IAE9C,MAAME,aAAaH,QAAQE,MAAM,CAACE,YAAY,GAAGJ,QAAQE,MAAM,CAACE,YAAY,CAACC,WAAW,GAAG;QAAC;KAAK;IAEjG,MAAMC,mBAAmBL,YAAYM,MAAM;IAC3C,KAAK,MAAMC,UAAUL,WAAY;QAC/B,IAAIM,gBAAgB;QACpB,KAAK,MAAMC,cAAcT,YAAa;YACpCQ;YACA,MAAME,kBAAkB;gBACtBD;gBACAE,KAAKH;gBACLD;gBACAK,KAAKP;gBACLN;YACF;QACF;QACA,KAAK,MAAMc,UAAUd,QAAQE,MAAM,CAACa,OAAO,CAAE;YAC3C,MAAMC,cAAc;gBAClBF;gBACAN;gBACAR;YACF;QACF;IACF;AACF;AAEA,eAAegB,cAAc,EAC3BF,MAAM,EACNN,MAAM,EACNR,OAAO,EAKR;IACCiB,QAAQC,GAAG,CAAC,CAAC,gBAAgB,EAAEV,OAAO,mBAAmB,CAAC,EAAEM,OAAOK,IAAI;IAEvE,MAAMC,WAAW,MAAMpB,QAAQqB,UAAU,CAAC;QACxCF,MAAML,OAAOK,IAAI;QACjBG,OAAO;QACPd,QAAQA,UAAUe;QAClBC,gBAAgB;IAClB;IAEA,MAAMC,QAAQC,gBAAgB;QAC5BN;QACAO,QAAQb,OAAOa,MAAM;IACvB;IAEA,IAAIF,OAAO;QACT,MAAMzB,QAAQ4B,YAAY,CAAC;YACzBT,MAAML,OAAOK,IAAI;YACjBU,MAAMT;YACNE,OAAO;YACPd,QAAQA,UAAUe;QACpB;IACF;AACF;AAEA,eAAeZ,kBAAkB,EAC/BD,UAAU,EACVE,GAAG,EACHJ,MAAM,EACNK,GAAG,EACHb,OAAO,EAOR;IACCiB,QAAQC,GAAG,CACT,CAAC,gBAAgB,EAAEV,OAAO,uBAAuB,CAAC,EAClDE,WAAWS,IAAI,EACf,MAAMP,MAAM,MAAMC,MAAM;IAG1B,MAAMiB,gBAAgB,AACpB,CAAA,MAAM9B,QAAQ+B,KAAK,CAAC;QAClBrB,YAAYA,WAAWS,IAAI;QAC3BG,OAAO;QACPd,QAAQA,UAAUe;IACpB,EAAC,EACDS,SAAS;IAEX,IAAIC,OAAO;IACX,IAAIC,WAAW;IAEf,MAAOA,WAAWJ,cAAe;QAC/B,MAAMK,YAAY,MAAMnC,QAAQoC,IAAI,CAAC;YACnC1B,YAAYA,WAAWS,IAAI;YAC3BG,OAAO;YACPd,QAAQA,UAAUe;YAClBC,gBAAgB;YAChBS;YACAI,YAAY;QACd;QAEA,KAAK,MAAMjB,YAAYe,UAAUG,IAAI,CAAE;YACrCJ;YACAjB,QAAQC,GAAG,CACT,CAAC,gBAAgB,EAAEV,OAAO,uBAAuB,CAAC,EAClDE,WAAWS,IAAI,EACf,MACEP,MACA,MACAC,MACA,6BACAO,SAASmB,EAAE,GACX,OACAL,WACA,MACAJ,gBACA;YAEJ,MAAML,QAAQC,gBAAgB;gBAC5BN;gBACAO,QAAQjB,WAAWiB,MAAM;YAC3B;YAEA,IAAIF,OAAO;gBACT,MAAMzB,QAAQwC,MAAM,CAAC;oBACnBD,IAAInB,SAASmB,EAAE;oBACf7B,YAAYA,WAAWS,IAAI;oBAC3BU,MAAMT;oBACNE,OAAO;oBACPd,QAAQA,UAAUe;gBACpB;YACF;QACF;QACAU;IACF;AACF;AAEA,SAASP,gBAAgB,EACvBN,QAAQ,EACRO,MAAM,EAIP;IACC,OAAO,CAAC,CAAC7B,iCAAiC;QACxC+B,MAAMT;QACNO;QACAF,OAAO;IACT;AACF"}
@@ -0,0 +1,9 @@
1
+ import type { Field } from 'payload';
2
+ type NestedRichTextFieldsArgs = {
3
+ data: unknown;
4
+ fields: Field[];
5
+ found: number;
6
+ };
7
+ export declare const migrateDocumentFieldsRecursively: ({ data, fields, found, }: NestedRichTextFieldsArgs) => number;
8
+ export {};
9
+ //# sourceMappingURL=migrateDocumentFieldsRecursively.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrateDocumentFieldsRecursively.d.ts","sourceRoot":"","sources":["../../../src/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAYpC,KAAK,wBAAwB,GAAG;IAC9B,IAAI,EAAE,OAAO,CAAA;IAEb,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,eAAO,MAAM,gCAAgC,6BAI1C,wBAAwB,KAAG,MAoF7B,CAAA"}
@@ -0,0 +1,77 @@
1
+ import { fieldAffectsData, fieldHasSubFields, fieldIsArrayType, tabHasName } from 'payload/shared';
2
+ import { convertSlateToLexical } from '../../features/migrations/slateToLexical/converter/index.js';
3
+ export const migrateDocumentFieldsRecursively = ({ 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
+ found += migrateDocumentFieldsRecursively({
8
+ data: data[field.name],
9
+ fields: field.fields,
10
+ found
11
+ });
12
+ } else {
13
+ found += migrateDocumentFieldsRecursively({
14
+ data,
15
+ fields: field.fields,
16
+ found
17
+ });
18
+ }
19
+ } else if (field.type === 'tabs') {
20
+ field.tabs.forEach((tab)=>{
21
+ found += migrateDocumentFieldsRecursively({
22
+ data: tabHasName(tab) ? data[tab.name] : data,
23
+ fields: tab.fields,
24
+ found
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
+ found += migrateDocumentFieldsRecursively({
33
+ data: data[field.name][i],
34
+ fields: block.fields,
35
+ found
36
+ });
37
+ }
38
+ });
39
+ }
40
+ if (field.type === 'array') {
41
+ data[field.name].forEach((_, i)=>{
42
+ found += migrateDocumentFieldsRecursively({
43
+ data: data[field.name][i],
44
+ fields: field.fields,
45
+ found
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=migrateDocumentFieldsRecursively.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.ts"],"sourcesContent":["import type { Field } from 'payload'\n\nimport { fieldAffectsData, fieldHasSubFields, fieldIsArrayType, tabHasName } 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 migrateDocumentFieldsRecursively = ({\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 found += migrateDocumentFieldsRecursively({\n data: data[field.name],\n fields: field.fields,\n found,\n })\n } else {\n found += migrateDocumentFieldsRecursively({\n data,\n fields: field.fields,\n found,\n })\n }\n } else if (field.type === 'tabs') {\n field.tabs.forEach((tab) => {\n found += migrateDocumentFieldsRecursively({\n data: tabHasName(tab) ? data[tab.name] : data,\n fields: tab.fields,\n found,\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 found += migrateDocumentFieldsRecursively({\n data: data[field.name][i],\n fields: block.fields,\n found,\n })\n }\n })\n }\n\n if (field.type === 'array') {\n data[field.name].forEach((_, i) => {\n found += migrateDocumentFieldsRecursively({\n data: data[field.name][i],\n fields: field.fields,\n found,\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","tabHasName","convertSlateToLexical","migrateDocumentFieldsRecursively","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,EAAEC,UAAU,QAAQ,iBAAgB;AAQlG,SAASC,qBAAqB,QAAQ,8DAA6D;AASnG,OAAO,MAAMC,mCAAmC,CAAC,EAC/CC,IAAI,EACJC,MAAM,EACNC,KAAK,EACoB;IACzB,KAAK,MAAMC,SAASF,OAAQ;QAC1B,IAAIN,kBAAkBQ,UAAU,CAACP,iBAAiBO,QAAQ;YACxD,IAAIT,iBAAiBS,UAAU,OAAOH,IAAI,CAACG,MAAMC,IAAI,CAAC,KAAK,UAAU;gBACnEF,SAASH,iCAAiC;oBACxCC,MAAMA,IAAI,CAACG,MAAMC,IAAI,CAAC;oBACtBH,QAAQE,MAAMF,MAAM;oBACpBC;gBACF;YACF,OAAO;gBACLA,SAASH,iCAAiC;oBACxCC;oBACAC,QAAQE,MAAMF,MAAM;oBACpBC;gBACF;YACF;QACF,OAAO,IAAIC,MAAME,IAAI,KAAK,QAAQ;YAChCF,MAAMG,IAAI,CAACC,OAAO,CAAC,CAACC;gBAClBN,SAASH,iCAAiC;oBACxCC,MAAMH,WAAWW,OAAOR,IAAI,CAACQ,IAAIJ,IAAI,CAAC,GAAGJ;oBACzCC,QAAQO,IAAIP,MAAM;oBAClBC;gBACF;YACF;QACF,OAAO,IAAIO,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;wBACTX,SAASH,iCAAiC;4BACxCC,MAAMA,IAAI,CAACG,MAAMC,IAAI,CAAC,CAACQ,EAAE;4BACzBX,QAAQY,MAAMZ,MAAM;4BACpBC;wBACF;oBACF;gBACF;YACF;YAEA,IAAIC,MAAME,IAAI,KAAK,SAAS;gBAC1BL,IAAI,CAACG,MAAMC,IAAI,CAAC,CAACG,OAAO,CAAC,CAACW,GAAGN;oBAC3BV,SAASH,iCAAiC;wBACxCC,MAAMA,IAAI,CAACG,MAAMC,IAAI,CAAC,CAACQ,EAAE;wBACzBX,QAAQE,MAAMF,MAAM;wBACpBC;oBACF;gBACF;YACF;QACF;QAEA,IAAIC,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"}
@@ -0,0 +1,11 @@
1
+ import type { Payload } from 'payload';
2
+ /**
3
+ * This goes through every single document in your payload app and re-saves it, if it has a lexical editor.
4
+ * This way, the data is automatically converted to the new format, and that automatic conversion gets applied to every single document in your app.
5
+ *
6
+ * @param payload
7
+ */
8
+ export declare function upgradeLexicalData({ payload }: {
9
+ payload: Payload;
10
+ }): Promise<void>;
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utilities/upgradeLexicalData/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAyC,OAAO,EAAE,MAAM,SAAS,CAAA;AAI7E;;;;;GAKG;AACH,wBAAsB,kBAAkB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,iBA0BzE"}