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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (727) hide show
  1. package/dist/cell/index.d.ts.map +1 -1
  2. package/dist/cell/index.js +1 -1
  3. package/dist/cell/index.js.map +1 -1
  4. package/dist/exports/client/Field-XBUN6QOM.js +2 -0
  5. package/dist/exports/client/Field-XBUN6QOM.js.map +7 -0
  6. package/dist/exports/client/{RelationshipComponent-5OU5HATX.js → RelationshipComponent-AFXEJMZQ.js} +2 -2
  7. package/dist/exports/client/bundled.css +1 -1
  8. package/dist/exports/client/{chunk-QU5MKT75.js → chunk-5RJS5YZT.js} +2 -2
  9. package/dist/exports/client/chunk-5RJS5YZT.js.map +7 -0
  10. package/dist/exports/client/chunk-JIP5PWU3.js +2 -0
  11. package/dist/exports/client/chunk-JIP5PWU3.js.map +7 -0
  12. package/dist/exports/client/{chunk-MLIITFAS.js → chunk-Q5DYR7MH.js} +2 -2
  13. package/dist/exports/client/chunk-Q5DYR7MH.js.map +7 -0
  14. package/dist/exports/client/{chunk-OSR74ZNW.js → chunk-YL52LJO3.js} +2 -2
  15. package/dist/exports/client/chunk-YL52LJO3.js.map +7 -0
  16. package/dist/exports/client/{component-E2NHAHBC.js → component-F6V63OLD.js} +2 -2
  17. package/dist/exports/client/component-F6V63OLD.js.map +7 -0
  18. package/dist/exports/client/component-PEFMKIXI.js +2 -0
  19. package/dist/exports/client/component-PEFMKIXI.js.map +7 -0
  20. package/dist/exports/client/{component-QWIGEOVD.js → component-VM36FRT2.js} +2 -2
  21. package/dist/exports/client/index.d.ts +37 -27
  22. package/dist/exports/client/index.d.ts.map +1 -1
  23. package/dist/exports/client/index.js +7 -5
  24. package/dist/exports/client/index.js.map +4 -4
  25. package/dist/features/align/feature.client.d.ts +1 -2
  26. package/dist/features/align/feature.client.d.ts.map +1 -1
  27. package/dist/features/align/feature.client.js +9 -16
  28. package/dist/features/align/feature.client.js.map +1 -1
  29. package/dist/features/align/feature.server.d.ts +1 -2
  30. package/dist/features/align/feature.server.d.ts.map +1 -1
  31. package/dist/features/align/feature.server.js +9 -15
  32. package/dist/features/align/feature.server.js.map +1 -1
  33. package/dist/features/align/i18n.js.map +1 -1
  34. package/dist/features/align/toolbarAlignGroup.js.map +1 -1
  35. package/dist/features/blockquote/feature.client.d.ts +1 -2
  36. package/dist/features/blockquote/feature.client.d.ts.map +1 -1
  37. package/dist/features/blockquote/feature.client.js +37 -44
  38. package/dist/features/blockquote/feature.client.js.map +1 -1
  39. package/dist/features/blockquote/feature.server.d.ts +6 -2
  40. package/dist/features/blockquote/feature.server.d.ts.map +1 -1
  41. package/dist/features/blockquote/feature.server.js +35 -40
  42. package/dist/features/blockquote/feature.server.js.map +1 -1
  43. package/dist/features/blockquote/i18n.js.map +1 -1
  44. package/dist/features/blockquote/markdownTransformer.js.map +1 -1
  45. package/dist/features/blocks/component/BlockContent.js +2 -2
  46. package/dist/features/blocks/component/BlockContent.js.map +1 -1
  47. package/dist/features/blocks/component/FormSavePlugin.js.map +1 -1
  48. package/dist/features/blocks/component/index.js +1 -1
  49. package/dist/features/blocks/component/index.js.map +1 -1
  50. package/dist/features/blocks/component/removeEmptyArrayValues.js.map +1 -1
  51. package/dist/features/blocks/drawer/index.js +1 -1
  52. package/dist/features/blocks/drawer/index.js.map +1 -1
  53. package/dist/features/blocks/feature.client.d.ts +1 -2
  54. package/dist/features/blocks/feature.client.d.ts.map +1 -1
  55. package/dist/features/blocks/feature.client.js +74 -80
  56. package/dist/features/blocks/feature.client.js.map +1 -1
  57. package/dist/features/blocks/feature.server.d.ts +1 -2
  58. package/dist/features/blocks/feature.server.d.ts.map +1 -1
  59. package/dist/features/blocks/feature.server.js +88 -90
  60. package/dist/features/blocks/feature.server.js.map +1 -1
  61. package/dist/features/blocks/graphQLPopulationPromise.d.ts +1 -1
  62. package/dist/features/blocks/graphQLPopulationPromise.d.ts.map +1 -1
  63. package/dist/features/blocks/graphQLPopulationPromise.js.map +1 -1
  64. package/dist/features/blocks/i18n.js.map +1 -1
  65. package/dist/features/blocks/nodes/BlocksNode.d.ts +2 -0
  66. package/dist/features/blocks/nodes/BlocksNode.d.ts.map +1 -1
  67. package/dist/features/blocks/nodes/BlocksNode.js +1 -1
  68. package/dist/features/blocks/nodes/BlocksNode.js.map +1 -1
  69. package/dist/features/blocks/plugin/commands.js.map +1 -1
  70. package/dist/features/blocks/plugin/index.d.ts +1 -1
  71. package/dist/features/blocks/plugin/index.d.ts.map +1 -1
  72. package/dist/features/blocks/plugin/index.js.map +1 -1
  73. package/dist/features/blocks/validate.d.ts +1 -1
  74. package/dist/features/blocks/validate.d.ts.map +1 -1
  75. package/dist/features/blocks/validate.js.map +1 -1
  76. package/dist/features/converters/html/converter/converters/linebreak.js.map +1 -1
  77. package/dist/features/converters/html/converter/converters/paragraph.js.map +1 -1
  78. package/dist/features/converters/html/converter/converters/text.js.map +1 -1
  79. package/dist/features/converters/html/converter/defaultConverters.js.map +1 -1
  80. package/dist/features/converters/html/converter/index.js.map +1 -1
  81. package/dist/features/converters/html/converter/types.js.map +1 -1
  82. package/dist/features/converters/html/feature.server.d.ts +1 -2
  83. package/dist/features/converters/html/feature.server.d.ts.map +1 -1
  84. package/dist/features/converters/html/feature.server.js +6 -12
  85. package/dist/features/converters/html/feature.server.js.map +1 -1
  86. package/dist/features/converters/html/field/index.js +1 -1
  87. package/dist/features/converters/html/field/index.js.map +1 -1
  88. package/dist/features/createClientComponent.d.ts +3 -2
  89. package/dist/features/createClientComponent.d.ts.map +1 -1
  90. package/dist/features/createClientComponent.js.map +1 -1
  91. package/dist/features/createFeaturePropComponent.d.ts.map +1 -1
  92. package/dist/features/createFeaturePropComponent.js.map +1 -1
  93. package/dist/features/debug/testRecorder/feature.client.d.ts +1 -2
  94. package/dist/features/debug/testRecorder/feature.client.d.ts.map +1 -1
  95. package/dist/features/debug/testRecorder/feature.client.js +9 -16
  96. package/dist/features/debug/testRecorder/feature.client.js.map +1 -1
  97. package/dist/features/debug/testRecorder/feature.server.d.ts +1 -2
  98. package/dist/features/debug/testRecorder/feature.server.d.ts.map +1 -1
  99. package/dist/features/debug/testRecorder/feature.server.js +8 -13
  100. package/dist/features/debug/testRecorder/feature.server.js.map +1 -1
  101. package/dist/features/debug/testRecorder/plugin/index.d.ts +1 -1
  102. package/dist/features/debug/testRecorder/plugin/index.d.ts.map +1 -1
  103. package/dist/features/debug/testRecorder/plugin/index.js.map +1 -1
  104. package/dist/features/debug/treeView/feature.client.d.ts +1 -2
  105. package/dist/features/debug/treeView/feature.client.d.ts.map +1 -1
  106. package/dist/features/debug/treeView/feature.client.js +9 -16
  107. package/dist/features/debug/treeView/feature.client.js.map +1 -1
  108. package/dist/features/debug/treeView/feature.server.d.ts +1 -2
  109. package/dist/features/debug/treeView/feature.server.d.ts.map +1 -1
  110. package/dist/features/debug/treeView/feature.server.js +8 -13
  111. package/dist/features/debug/treeView/feature.server.js.map +1 -1
  112. package/dist/features/debug/treeView/plugin/index.d.ts +1 -1
  113. package/dist/features/debug/treeView/plugin/index.d.ts.map +1 -1
  114. package/dist/features/debug/treeView/plugin/index.js.map +1 -1
  115. package/dist/features/format/bold/feature.client.d.ts +1 -2
  116. package/dist/features/format/bold/feature.client.d.ts.map +1 -1
  117. package/dist/features/format/bold/feature.client.js +16 -23
  118. package/dist/features/format/bold/feature.client.js.map +1 -1
  119. package/dist/features/format/bold/feature.server.d.ts +1 -2
  120. package/dist/features/format/bold/feature.server.d.ts.map +1 -1
  121. package/dist/features/format/bold/feature.server.js +21 -24
  122. package/dist/features/format/bold/feature.server.js.map +1 -1
  123. package/dist/features/format/bold/markdownTransformers.js.map +1 -1
  124. package/dist/features/format/inlineCode/feature.client.d.ts +1 -2
  125. package/dist/features/format/inlineCode/feature.client.d.ts.map +1 -1
  126. package/dist/features/format/inlineCode/feature.client.js +12 -21
  127. package/dist/features/format/inlineCode/feature.client.js.map +1 -1
  128. package/dist/features/format/inlineCode/feature.server.d.ts +1 -2
  129. package/dist/features/format/inlineCode/feature.server.d.ts.map +1 -1
  130. package/dist/features/format/inlineCode/feature.server.js +11 -16
  131. package/dist/features/format/inlineCode/feature.server.js.map +1 -1
  132. package/dist/features/format/inlineCode/markdownTransformers.js.map +1 -1
  133. package/dist/features/format/italic/feature.client.d.ts +1 -2
  134. package/dist/features/format/italic/feature.client.d.ts.map +1 -1
  135. package/dist/features/format/italic/feature.client.js +13 -22
  136. package/dist/features/format/italic/feature.client.js.map +1 -1
  137. package/dist/features/format/italic/feature.server.d.ts +1 -2
  138. package/dist/features/format/italic/feature.server.d.ts.map +1 -1
  139. package/dist/features/format/italic/feature.server.js +12 -17
  140. package/dist/features/format/italic/feature.server.js.map +1 -1
  141. package/dist/features/format/italic/markdownTransformers.js.map +1 -1
  142. package/dist/features/format/shared/toolbarFormatGroup.js.map +1 -1
  143. package/dist/features/format/strikethrough/feature.client.d.ts +1 -2
  144. package/dist/features/format/strikethrough/feature.client.d.ts.map +1 -1
  145. package/dist/features/format/strikethrough/feature.client.js +12 -21
  146. package/dist/features/format/strikethrough/feature.client.js.map +1 -1
  147. package/dist/features/format/strikethrough/feature.server.d.ts +1 -2
  148. package/dist/features/format/strikethrough/feature.server.d.ts.map +1 -1
  149. package/dist/features/format/strikethrough/feature.server.js +11 -16
  150. package/dist/features/format/strikethrough/feature.server.js.map +1 -1
  151. package/dist/features/format/strikethrough/markdownTransformers.js.map +1 -1
  152. package/dist/features/format/subscript/feature.client.d.ts +1 -2
  153. package/dist/features/format/subscript/feature.client.d.ts.map +1 -1
  154. package/dist/features/format/subscript/feature.client.js +9 -18
  155. package/dist/features/format/subscript/feature.client.js.map +1 -1
  156. package/dist/features/format/subscript/feature.server.d.ts +1 -2
  157. package/dist/features/format/subscript/feature.server.d.ts.map +1 -1
  158. package/dist/features/format/subscript/feature.server.js +8 -13
  159. package/dist/features/format/subscript/feature.server.js.map +1 -1
  160. package/dist/features/format/superscript/feature.client.d.ts +1 -2
  161. package/dist/features/format/superscript/feature.client.d.ts.map +1 -1
  162. package/dist/features/format/superscript/feature.client.js +9 -18
  163. package/dist/features/format/superscript/feature.client.js.map +1 -1
  164. package/dist/features/format/superscript/feature.server.d.ts +1 -2
  165. package/dist/features/format/superscript/feature.server.d.ts.map +1 -1
  166. package/dist/features/format/superscript/feature.server.js +8 -13
  167. package/dist/features/format/superscript/feature.server.js.map +1 -1
  168. package/dist/features/format/underline/feature.client.d.ts +1 -2
  169. package/dist/features/format/underline/feature.client.d.ts.map +1 -1
  170. package/dist/features/format/underline/feature.client.js +9 -18
  171. package/dist/features/format/underline/feature.client.js.map +1 -1
  172. package/dist/features/format/underline/feature.server.d.ts +1 -2
  173. package/dist/features/format/underline/feature.server.d.ts.map +1 -1
  174. package/dist/features/format/underline/feature.server.js +8 -13
  175. package/dist/features/format/underline/feature.server.js.map +1 -1
  176. package/dist/features/heading/feature.client.d.ts +1 -2
  177. package/dist/features/heading/feature.client.d.ts.map +1 -1
  178. package/dist/features/heading/feature.client.js +70 -76
  179. package/dist/features/heading/feature.client.js.map +1 -1
  180. package/dist/features/heading/feature.server.d.ts +1 -2
  181. package/dist/features/heading/feature.server.d.ts.map +1 -1
  182. package/dist/features/heading/feature.server.js +51 -53
  183. package/dist/features/heading/feature.server.js.map +1 -1
  184. package/dist/features/heading/i18n.js +2 -2
  185. package/dist/features/heading/i18n.js.map +1 -1
  186. package/dist/features/heading/markdownTransformer.js.map +1 -1
  187. package/dist/features/horizontalRule/component/index.js.map +1 -1
  188. package/dist/features/horizontalRule/feature.client.d.ts +1 -2
  189. package/dist/features/horizontalRule/feature.client.d.ts.map +1 -1
  190. package/dist/features/horizontalRule/feature.client.js +58 -65
  191. package/dist/features/horizontalRule/feature.client.js.map +1 -1
  192. package/dist/features/horizontalRule/feature.server.d.ts +1 -2
  193. package/dist/features/horizontalRule/feature.server.d.ts.map +1 -1
  194. package/dist/features/horizontalRule/feature.server.js +26 -31
  195. package/dist/features/horizontalRule/feature.server.js.map +1 -1
  196. package/dist/features/horizontalRule/i18n.js.map +1 -1
  197. package/dist/features/horizontalRule/markdownTransformer.js.map +1 -1
  198. package/dist/features/horizontalRule/nodes/HorizontalRuleNode.d.ts +5 -2
  199. package/dist/features/horizontalRule/nodes/HorizontalRuleNode.d.ts.map +1 -1
  200. package/dist/features/horizontalRule/nodes/HorizontalRuleNode.js.map +1 -1
  201. package/dist/features/horizontalRule/plugin/index.d.ts +1 -1
  202. package/dist/features/horizontalRule/plugin/index.d.ts.map +1 -1
  203. package/dist/features/horizontalRule/plugin/index.js.map +1 -1
  204. package/dist/features/indent/feature.client.d.ts +1 -2
  205. package/dist/features/indent/feature.client.d.ts.map +1 -1
  206. package/dist/features/indent/feature.client.js +9 -16
  207. package/dist/features/indent/feature.client.js.map +1 -1
  208. package/dist/features/indent/feature.server.d.ts +1 -2
  209. package/dist/features/indent/feature.server.d.ts.map +1 -1
  210. package/dist/features/indent/feature.server.js +9 -15
  211. package/dist/features/indent/feature.server.js.map +1 -1
  212. package/dist/features/indent/i18n.js.map +1 -1
  213. package/dist/features/indent/toolbarIndentGroup.js.map +1 -1
  214. package/dist/features/link/drawer/baseFields.d.ts +2 -2
  215. package/dist/features/link/drawer/baseFields.d.ts.map +1 -1
  216. package/dist/features/link/drawer/baseFields.js.map +1 -1
  217. package/dist/features/link/drawer/index.js.map +1 -1
  218. package/dist/features/link/drawer/types.js.map +1 -1
  219. package/dist/features/link/feature.client.d.ts +3 -4
  220. package/dist/features/link/feature.client.d.ts.map +1 -1
  221. package/dist/features/link/feature.client.js +34 -41
  222. package/dist/features/link/feature.client.js.map +1 -1
  223. package/dist/features/link/feature.server.d.ts +4 -6
  224. package/dist/features/link/feature.server.d.ts.map +1 -1
  225. package/dist/features/link/feature.server.js +123 -125
  226. package/dist/features/link/feature.server.js.map +1 -1
  227. package/dist/features/link/graphQLPopulationPromise.d.ts +1 -1
  228. package/dist/features/link/graphQLPopulationPromise.d.ts.map +1 -1
  229. package/dist/features/link/graphQLPopulationPromise.js.map +1 -1
  230. package/dist/features/link/i18n.js.map +1 -1
  231. package/dist/features/link/markdownTransformer.js.map +1 -1
  232. package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  233. package/dist/features/link/nodes/AutoLinkNode.js +7 -1
  234. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  235. package/dist/features/link/nodes/LinkNode.js +1 -1
  236. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  237. package/dist/features/link/nodes/types.d.ts +7 -4
  238. package/dist/features/link/nodes/types.d.ts.map +1 -1
  239. package/dist/features/link/nodes/types.js.map +1 -1
  240. package/dist/features/link/plugins/autoLink/index.d.ts +1 -1
  241. package/dist/features/link/plugins/autoLink/index.d.ts.map +1 -1
  242. package/dist/features/link/plugins/autoLink/index.js.map +1 -1
  243. package/dist/features/link/plugins/clickableLink/index.d.ts +1 -1
  244. package/dist/features/link/plugins/clickableLink/index.d.ts.map +1 -1
  245. package/dist/features/link/plugins/clickableLink/index.js.map +1 -1
  246. package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -1
  247. package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  248. package/dist/features/link/plugins/floatingLinkEditor/index.d.ts +1 -1
  249. package/dist/features/link/plugins/floatingLinkEditor/index.d.ts.map +1 -1
  250. package/dist/features/link/plugins/floatingLinkEditor/index.js.map +1 -1
  251. package/dist/features/link/plugins/floatingLinkEditor/types.js.map +1 -1
  252. package/dist/features/link/plugins/floatingLinkEditor/utilities.d.ts +2 -2
  253. package/dist/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +1 -1
  254. package/dist/features/link/plugins/floatingLinkEditor/utilities.js.map +1 -1
  255. package/dist/features/link/plugins/link/index.d.ts +1 -1
  256. package/dist/features/link/plugins/link/index.d.ts.map +1 -1
  257. package/dist/features/link/plugins/link/index.js.map +1 -1
  258. package/dist/features/link/validate.d.ts +1 -1
  259. package/dist/features/link/validate.d.ts.map +1 -1
  260. package/dist/features/link/validate.js.map +1 -1
  261. package/dist/features/lists/checklist/feature.client.d.ts +1 -2
  262. package/dist/features/lists/checklist/feature.client.d.ts.map +1 -1
  263. package/dist/features/lists/checklist/feature.client.js +50 -57
  264. package/dist/features/lists/checklist/feature.client.js.map +1 -1
  265. package/dist/features/lists/checklist/feature.server.d.ts +1 -2
  266. package/dist/features/lists/checklist/feature.server.d.ts.map +1 -1
  267. package/dist/features/lists/checklist/feature.server.js +28 -31
  268. package/dist/features/lists/checklist/feature.server.js.map +1 -1
  269. package/dist/features/lists/checklist/i18n.js.map +1 -1
  270. package/dist/features/lists/checklist/markdownTransformers.js.map +1 -1
  271. package/dist/features/lists/checklist/plugin/index.d.ts +1 -1
  272. package/dist/features/lists/checklist/plugin/index.d.ts.map +1 -1
  273. package/dist/features/lists/checklist/plugin/index.js.map +1 -1
  274. package/dist/features/lists/htmlConverter.d.ts +1 -1
  275. package/dist/features/lists/htmlConverter.d.ts.map +1 -1
  276. package/dist/features/lists/htmlConverter.js.map +1 -1
  277. package/dist/features/lists/orderedList/feature.client.d.ts +1 -2
  278. package/dist/features/lists/orderedList/feature.client.d.ts.map +1 -1
  279. package/dist/features/lists/orderedList/feature.client.js +39 -46
  280. package/dist/features/lists/orderedList/feature.client.js.map +1 -1
  281. package/dist/features/lists/orderedList/feature.server.d.ts +1 -2
  282. package/dist/features/lists/orderedList/feature.server.d.ts.map +1 -1
  283. package/dist/features/lists/orderedList/feature.server.js +28 -31
  284. package/dist/features/lists/orderedList/feature.server.js.map +1 -1
  285. package/dist/features/lists/orderedList/i18n.js.map +1 -1
  286. package/dist/features/lists/orderedList/markdownTransformer.js.map +1 -1
  287. package/dist/features/lists/plugin/index.d.ts +11 -1
  288. package/dist/features/lists/plugin/index.d.ts.map +1 -1
  289. package/dist/features/lists/plugin/index.js.map +1 -1
  290. package/dist/features/lists/shared/markdown.d.ts +1 -1
  291. package/dist/features/lists/shared/markdown.js.map +1 -1
  292. package/dist/features/lists/shared/slashMenuListGroup.js.map +1 -1
  293. package/dist/features/lists/unorderedList/feature.client.d.ts +1 -2
  294. package/dist/features/lists/unorderedList/feature.client.d.ts.map +1 -1
  295. package/dist/features/lists/unorderedList/feature.client.js +40 -49
  296. package/dist/features/lists/unorderedList/feature.client.js.map +1 -1
  297. package/dist/features/lists/unorderedList/feature.server.d.ts +1 -2
  298. package/dist/features/lists/unorderedList/feature.server.d.ts.map +1 -1
  299. package/dist/features/lists/unorderedList/feature.server.js +26 -31
  300. package/dist/features/lists/unorderedList/feature.server.js.map +1 -1
  301. package/dist/features/lists/unorderedList/i18n.js.map +1 -1
  302. package/dist/features/lists/unorderedList/markdownTransformer.js.map +1 -1
  303. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.d.ts +0 -1
  304. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.d.ts.map +1 -1
  305. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.js.map +1 -1
  306. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +1 -1
  307. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.js +1 -1
  308. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.js.map +1 -1
  309. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/client.d.ts +0 -1
  310. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/client.d.ts.map +1 -1
  311. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/client.js.map +1 -1
  312. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +1 -1
  313. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/index.js +1 -1
  314. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/index.js.map +1 -1
  315. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/client.d.ts +0 -1
  316. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/client.d.ts.map +1 -1
  317. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/client.js.map +1 -1
  318. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts.map +1 -1
  319. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +1 -1
  320. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/index.js +1 -1
  321. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/index.js.map +1 -1
  322. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.d.ts +0 -1
  323. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.d.ts.map +1 -1
  324. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.js.map +1 -1
  325. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts.map +1 -1
  326. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +1 -1
  327. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.js +1 -1
  328. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.js.map +1 -1
  329. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.d.ts +0 -1
  330. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.d.ts.map +1 -1
  331. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.js.map +1 -1
  332. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts.map +1 -1
  333. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +1 -1
  334. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.js +1 -1
  335. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.js.map +1 -1
  336. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.d.ts +0 -1
  337. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.d.ts.map +1 -1
  338. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.js.map +1 -1
  339. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +1 -1
  340. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.js +1 -1
  341. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.js.map +1 -1
  342. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.d.ts +0 -1
  343. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.d.ts.map +1 -1
  344. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.js.map +1 -1
  345. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -1
  346. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.js +1 -1
  347. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.js.map +1 -1
  348. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +1 -1
  349. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +1 -1
  350. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts +1 -1
  351. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js.map +1 -1
  352. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts +1 -2
  353. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +1 -1
  354. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js +20 -27
  355. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js.map +1 -1
  356. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts +1 -2
  357. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +1 -1
  358. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js +39 -42
  359. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js.map +1 -1
  360. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  361. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  362. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts +0 -1
  363. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts.map +1 -1
  364. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/client.js.map +1 -1
  365. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts.map +1 -1
  366. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +1 -1
  367. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/index.js +1 -1
  368. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/index.js.map +1 -1
  369. package/dist/features/migrations/slateToLexical/converter/converters/heading/client.d.ts +0 -1
  370. package/dist/features/migrations/slateToLexical/converter/converters/heading/client.d.ts.map +1 -1
  371. package/dist/features/migrations/slateToLexical/converter/converters/heading/client.js.map +1 -1
  372. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +1 -1
  373. package/dist/features/migrations/slateToLexical/converter/converters/heading/index.js +1 -1
  374. package/dist/features/migrations/slateToLexical/converter/converters/heading/index.js.map +1 -1
  375. package/dist/features/migrations/slateToLexical/converter/converters/indent/client.d.ts +0 -1
  376. package/dist/features/migrations/slateToLexical/converter/converters/indent/client.d.ts.map +1 -1
  377. package/dist/features/migrations/slateToLexical/converter/converters/indent/client.js.map +1 -1
  378. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +1 -1
  379. package/dist/features/migrations/slateToLexical/converter/converters/indent/index.js +1 -1
  380. package/dist/features/migrations/slateToLexical/converter/converters/indent/index.js.map +1 -1
  381. package/dist/features/migrations/slateToLexical/converter/converters/link/client.d.ts +0 -1
  382. package/dist/features/migrations/slateToLexical/converter/converters/link/client.d.ts.map +1 -1
  383. package/dist/features/migrations/slateToLexical/converter/converters/link/client.js.map +1 -1
  384. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +1 -1
  385. package/dist/features/migrations/slateToLexical/converter/converters/link/index.js +1 -1
  386. package/dist/features/migrations/slateToLexical/converter/converters/link/index.js.map +1 -1
  387. package/dist/features/migrations/slateToLexical/converter/converters/listItem/client.d.ts +0 -1
  388. package/dist/features/migrations/slateToLexical/converter/converters/listItem/client.d.ts.map +1 -1
  389. package/dist/features/migrations/slateToLexical/converter/converters/listItem/client.js.map +1 -1
  390. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts.map +1 -1
  391. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +1 -1
  392. package/dist/features/migrations/slateToLexical/converter/converters/listItem/index.js +1 -1
  393. package/dist/features/migrations/slateToLexical/converter/converters/listItem/index.js.map +1 -1
  394. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/client.d.ts +0 -1
  395. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/client.d.ts.map +1 -1
  396. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/client.js.map +1 -1
  397. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts.map +1 -1
  398. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +1 -1
  399. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/index.js +1 -1
  400. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/index.js.map +1 -1
  401. package/dist/features/migrations/slateToLexical/converter/converters/relationship/client.d.ts +0 -1
  402. package/dist/features/migrations/slateToLexical/converter/converters/relationship/client.d.ts.map +1 -1
  403. package/dist/features/migrations/slateToLexical/converter/converters/relationship/client.js.map +1 -1
  404. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -1
  405. package/dist/features/migrations/slateToLexical/converter/converters/relationship/index.js +1 -1
  406. package/dist/features/migrations/slateToLexical/converter/converters/relationship/index.js.map +1 -1
  407. package/dist/features/migrations/slateToLexical/converter/converters/unknown/client.d.ts +0 -1
  408. package/dist/features/migrations/slateToLexical/converter/converters/unknown/client.d.ts.map +1 -1
  409. package/dist/features/migrations/slateToLexical/converter/converters/unknown/client.js.map +1 -1
  410. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +1 -1
  411. package/dist/features/migrations/slateToLexical/converter/converters/unknown/index.js +1 -1
  412. package/dist/features/migrations/slateToLexical/converter/converters/unknown/index.js.map +1 -1
  413. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/client.d.ts +0 -1
  414. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/client.d.ts.map +1 -1
  415. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/client.js.map +1 -1
  416. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts.map +1 -1
  417. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +1 -1
  418. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/index.js +1 -1
  419. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/index.js.map +1 -1
  420. package/dist/features/migrations/slateToLexical/converter/converters/upload/client.d.ts +0 -1
  421. package/dist/features/migrations/slateToLexical/converter/converters/upload/client.d.ts.map +1 -1
  422. package/dist/features/migrations/slateToLexical/converter/converters/upload/client.js.map +1 -1
  423. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -1
  424. package/dist/features/migrations/slateToLexical/converter/converters/upload/index.js +1 -1
  425. package/dist/features/migrations/slateToLexical/converter/converters/upload/index.js.map +1 -1
  426. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js.map +1 -1
  427. package/dist/features/migrations/slateToLexical/converter/index.js.map +1 -1
  428. package/dist/features/migrations/slateToLexical/converter/types.d.ts +1 -1
  429. package/dist/features/migrations/slateToLexical/converter/types.js.map +1 -1
  430. package/dist/features/migrations/slateToLexical/feature.client.d.ts +1 -2
  431. package/dist/features/migrations/slateToLexical/feature.client.d.ts.map +1 -1
  432. package/dist/features/migrations/slateToLexical/feature.client.js +20 -27
  433. package/dist/features/migrations/slateToLexical/feature.client.js.map +1 -1
  434. package/dist/features/migrations/slateToLexical/feature.server.d.ts +3 -2
  435. package/dist/features/migrations/slateToLexical/feature.server.d.ts.map +1 -1
  436. package/dist/features/migrations/slateToLexical/feature.server.js +41 -42
  437. package/dist/features/migrations/slateToLexical/feature.server.js.map +1 -1
  438. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  439. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  440. package/dist/features/paragraph/feature.client.d.ts +1 -2
  441. package/dist/features/paragraph/feature.client.d.ts.map +1 -1
  442. package/dist/features/paragraph/feature.client.js +33 -40
  443. package/dist/features/paragraph/feature.client.js.map +1 -1
  444. package/dist/features/paragraph/feature.server.d.ts +1 -2
  445. package/dist/features/paragraph/feature.server.d.ts.map +1 -1
  446. package/dist/features/paragraph/feature.server.js +10 -15
  447. package/dist/features/paragraph/feature.server.js.map +1 -1
  448. package/dist/features/paragraph/i18n.js.map +1 -1
  449. package/dist/features/relationship/drawer/commands.js.map +1 -1
  450. package/dist/features/relationship/drawer/index.d.ts.map +1 -1
  451. package/dist/features/relationship/drawer/index.js.map +1 -1
  452. package/dist/features/relationship/feature.client.d.ts +3 -4
  453. package/dist/features/relationship/feature.client.d.ts.map +1 -1
  454. package/dist/features/relationship/feature.client.js +60 -67
  455. package/dist/features/relationship/feature.client.js.map +1 -1
  456. package/dist/features/relationship/feature.server.d.ts +4 -4
  457. package/dist/features/relationship/feature.server.d.ts.map +1 -1
  458. package/dist/features/relationship/feature.server.js +45 -51
  459. package/dist/features/relationship/feature.server.js.map +1 -1
  460. package/dist/features/relationship/graphQLPopulationPromise.d.ts +1 -1
  461. package/dist/features/relationship/graphQLPopulationPromise.d.ts.map +1 -1
  462. package/dist/features/relationship/graphQLPopulationPromise.js.map +1 -1
  463. package/dist/features/relationship/i18n.js.map +1 -1
  464. package/dist/features/relationship/nodes/RelationshipNode.d.ts +6 -2
  465. package/dist/features/relationship/nodes/RelationshipNode.d.ts.map +1 -1
  466. package/dist/features/relationship/nodes/RelationshipNode.js +1 -1
  467. package/dist/features/relationship/nodes/RelationshipNode.js.map +1 -1
  468. package/dist/features/relationship/nodes/components/RelationshipComponent.d.ts.map +1 -1
  469. package/dist/features/relationship/nodes/components/RelationshipComponent.js.map +1 -1
  470. package/dist/features/relationship/plugins/index.d.ts +1 -1
  471. package/dist/features/relationship/plugins/index.d.ts.map +1 -1
  472. package/dist/features/relationship/plugins/index.js.map +1 -1
  473. package/dist/features/relationship/utils/EnabledRelationshipsCondition.js.map +1 -1
  474. package/dist/features/shared/slashMenu/basicGroup.js.map +1 -1
  475. package/dist/features/shared/toolbar/addDropdownGroup.js.map +1 -1
  476. package/dist/features/shared/toolbar/featureButtonsGroup.js.map +1 -1
  477. package/dist/features/shared/toolbar/textDropdownGroup.js.map +1 -1
  478. package/dist/features/toolbars/fixed/Toolbar/index.d.ts +1 -1
  479. package/dist/features/toolbars/fixed/Toolbar/index.d.ts.map +1 -1
  480. package/dist/features/toolbars/fixed/Toolbar/index.js.map +1 -1
  481. package/dist/features/toolbars/fixed/feature.client.d.ts +1 -2
  482. package/dist/features/toolbars/fixed/feature.client.d.ts.map +1 -1
  483. package/dist/features/toolbars/fixed/feature.client.js +9 -16
  484. package/dist/features/toolbars/fixed/feature.client.js.map +1 -1
  485. package/dist/features/toolbars/fixed/feature.server.d.ts +1 -2
  486. package/dist/features/toolbars/fixed/feature.server.d.ts.map +1 -1
  487. package/dist/features/toolbars/fixed/feature.server.js +16 -18
  488. package/dist/features/toolbars/fixed/feature.server.js.map +1 -1
  489. package/dist/features/toolbars/inline/Toolbar/index.d.ts +1 -1
  490. package/dist/features/toolbars/inline/Toolbar/index.d.ts.map +1 -1
  491. package/dist/features/toolbars/inline/Toolbar/index.js.map +1 -1
  492. package/dist/features/toolbars/inline/feature.client.d.ts +1 -2
  493. package/dist/features/toolbars/inline/feature.client.d.ts.map +1 -1
  494. package/dist/features/toolbars/inline/feature.client.js +9 -16
  495. package/dist/features/toolbars/inline/feature.client.js.map +1 -1
  496. package/dist/features/toolbars/inline/feature.server.d.ts +1 -2
  497. package/dist/features/toolbars/inline/feature.server.d.ts.map +1 -1
  498. package/dist/features/toolbars/inline/feature.server.js +8 -13
  499. package/dist/features/toolbars/inline/feature.server.js.map +1 -1
  500. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  501. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  502. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  503. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  504. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  505. package/dist/features/toolbars/types.d.ts +37 -5
  506. package/dist/features/toolbars/types.d.ts.map +1 -1
  507. package/dist/features/toolbars/types.js.map +1 -1
  508. package/dist/features/typeUtilities.d.ts +1 -1
  509. package/dist/features/typeUtilities.d.ts.map +1 -1
  510. package/dist/features/typeUtilities.js.map +1 -1
  511. package/dist/features/typesClient.d.ts +182 -0
  512. package/dist/features/typesClient.d.ts.map +1 -0
  513. package/dist/features/typesClient.js +3 -0
  514. package/dist/features/typesClient.js.map +1 -0
  515. package/dist/features/{types.d.ts → typesServer.d.ts} +40 -193
  516. package/dist/features/typesServer.d.ts.map +1 -0
  517. package/dist/features/typesServer.js +3 -0
  518. package/dist/features/typesServer.js.map +1 -0
  519. package/dist/features/upload/component/ExtraFieldsDrawer/index.js.map +1 -1
  520. package/dist/features/upload/component/index.d.ts.map +1 -1
  521. package/dist/features/upload/component/index.js +1 -1
  522. package/dist/features/upload/component/index.js.map +1 -1
  523. package/dist/features/upload/drawer/commands.js.map +1 -1
  524. package/dist/features/upload/drawer/index.d.ts.map +1 -1
  525. package/dist/features/upload/drawer/index.js.map +1 -1
  526. package/dist/features/upload/feature.client.d.ts +1 -2
  527. package/dist/features/upload/feature.client.d.ts.map +1 -1
  528. package/dist/features/upload/feature.client.js +62 -69
  529. package/dist/features/upload/feature.client.js.map +1 -1
  530. package/dist/features/upload/feature.server.d.ts +3 -4
  531. package/dist/features/upload/feature.server.d.ts.map +1 -1
  532. package/dist/features/upload/feature.server.js +166 -168
  533. package/dist/features/upload/feature.server.js.map +1 -1
  534. package/dist/features/upload/graphQLPopulationPromise.d.ts +1 -1
  535. package/dist/features/upload/graphQLPopulationPromise.d.ts.map +1 -1
  536. package/dist/features/upload/graphQLPopulationPromise.js.map +1 -1
  537. package/dist/features/upload/i18n.js.map +1 -1
  538. package/dist/features/upload/nodes/UploadNode.d.ts +6 -2
  539. package/dist/features/upload/nodes/UploadNode.d.ts.map +1 -1
  540. package/dist/features/upload/nodes/UploadNode.js +1 -1
  541. package/dist/features/upload/nodes/UploadNode.js.map +1 -1
  542. package/dist/features/upload/plugin/index.d.ts +1 -1
  543. package/dist/features/upload/plugin/index.d.ts.map +1 -1
  544. package/dist/features/upload/plugin/index.js.map +1 -1
  545. package/dist/features/upload/validate.d.ts +1 -1
  546. package/dist/features/upload/validate.d.ts.map +1 -1
  547. package/dist/features/upload/validate.js.map +1 -1
  548. package/dist/field/Field.d.ts.map +1 -1
  549. package/dist/field/Field.js.map +1 -1
  550. package/dist/field/index.d.ts.map +1 -1
  551. package/dist/field/index.js +9 -7
  552. package/dist/field/index.js.map +1 -1
  553. package/dist/i18n.js.map +1 -1
  554. package/dist/index.d.ts +12 -8
  555. package/dist/index.d.ts.map +1 -1
  556. package/dist/index.js +19 -17
  557. package/dist/index.js.map +1 -1
  558. package/dist/lexical/EditorPlugin.d.ts +1 -1
  559. package/dist/lexical/EditorPlugin.d.ts.map +1 -1
  560. package/dist/lexical/EditorPlugin.js.map +1 -1
  561. package/dist/lexical/LexicalEditor.js.map +1 -1
  562. package/dist/lexical/LexicalProvider.js.map +1 -1
  563. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  564. package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
  565. package/dist/lexical/config/client/default.js.map +1 -1
  566. package/dist/lexical/config/client/loader.d.ts +1 -1
  567. package/dist/lexical/config/client/loader.d.ts.map +1 -1
  568. package/dist/lexical/config/client/loader.js +2 -2
  569. package/dist/lexical/config/client/loader.js.map +1 -1
  570. package/dist/lexical/config/client/sanitize.d.ts +1 -1
  571. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  572. package/dist/lexical/config/client/sanitize.js +1 -1
  573. package/dist/lexical/config/client/sanitize.js.map +1 -1
  574. package/dist/lexical/config/server/default.d.ts +2 -2
  575. package/dist/lexical/config/server/default.d.ts.map +1 -1
  576. package/dist/lexical/config/server/default.js.map +1 -1
  577. package/dist/lexical/config/server/loader.d.ts +2 -2
  578. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  579. package/dist/lexical/config/server/loader.js +2 -2
  580. package/dist/lexical/config/server/loader.js.map +1 -1
  581. package/dist/lexical/config/server/sanitize.d.ts +1 -1
  582. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  583. package/dist/lexical/config/server/sanitize.js.map +1 -1
  584. package/dist/lexical/config/types.d.ts +4 -3
  585. package/dist/lexical/config/types.d.ts.map +1 -1
  586. package/dist/lexical/config/types.js.map +1 -1
  587. package/dist/lexical/nodes/index.js.map +1 -1
  588. package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  589. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  590. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
  591. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +16 -1
  592. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
  593. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  594. package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
  595. package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js.map +1 -1
  596. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  597. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.js.map +1 -1
  598. package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js.map +1 -1
  599. package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js.map +1 -1
  600. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  601. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts +0 -1
  602. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts.map +1 -1
  603. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  604. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js.map +1 -1
  605. package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -1
  606. package/dist/lexical/plugins/handles/utils/getCollapsedMargins.js.map +1 -1
  607. package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.js.map +1 -1
  608. package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -1
  609. package/dist/lexical/plugins/handles/utils/isOnHandleElement.js.map +1 -1
  610. package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  611. package/dist/lexical/theme/EditorTheme.js.map +1 -1
  612. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  613. package/dist/lexical/ui/icons/AI/index.js.map +1 -1
  614. package/dist/lexical/ui/icons/Add/index.js.map +1 -1
  615. package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
  616. package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
  617. package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
  618. package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
  619. package/dist/lexical/ui/icons/Block/index.js.map +1 -1
  620. package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
  621. package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
  622. package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
  623. package/dist/lexical/ui/icons/Code/index.js.map +1 -1
  624. package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  625. package/dist/lexical/ui/icons/H1/index.js.map +1 -1
  626. package/dist/lexical/ui/icons/H2/index.js.map +1 -1
  627. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  628. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  629. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  630. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  631. package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
  632. package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
  633. package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
  634. package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
  635. package/dist/lexical/ui/icons/Link/index.js.map +1 -1
  636. package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
  637. package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
  638. package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
  639. package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
  640. package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
  641. package/dist/lexical/ui/icons/Text/index.js.map +1 -1
  642. package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
  643. package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
  644. package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
  645. package/dist/lexical/utils/canUseDOM.js.map +1 -1
  646. package/dist/lexical/utils/cloneDeep.js.map +1 -1
  647. package/dist/lexical/utils/environment.js.map +1 -1
  648. package/dist/lexical/utils/getDOMRangeRect.js.map +1 -1
  649. package/dist/lexical/utils/getSelectedNode.js.map +1 -1
  650. package/dist/lexical/utils/guard.js.map +1 -1
  651. package/dist/lexical/utils/invariant.js.map +1 -1
  652. package/dist/lexical/utils/joinClasses.js.map +1 -1
  653. package/dist/lexical/utils/markdown/createBlockNode.d.ts +1 -1
  654. package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
  655. package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
  656. package/dist/lexical/utils/nodeFormat.js.map +1 -1
  657. package/dist/lexical/utils/point.js.map +1 -1
  658. package/dist/lexical/utils/rect.js.map +1 -1
  659. package/dist/lexical/utils/setFloatingElemPosition.js.map +1 -1
  660. package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.js.map +1 -1
  661. package/dist/lexical/utils/swipe.js.map +1 -1
  662. package/dist/lexical/utils/url.js.map +1 -1
  663. package/dist/nodeTypes.d.ts +27 -0
  664. package/dist/nodeTypes.d.ts.map +1 -0
  665. package/dist/nodeTypes.js +3 -0
  666. package/dist/nodeTypes.js.map +1 -0
  667. package/dist/populateGraphQL/defaultValue.js.map +1 -1
  668. package/dist/populateGraphQL/populate.d.ts.map +1 -1
  669. package/dist/populateGraphQL/populate.js.map +1 -1
  670. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts +1 -1
  671. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  672. package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
  673. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts +1 -1
  674. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
  675. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js.map +1 -1
  676. package/dist/types.d.ts +7 -7
  677. package/dist/types.d.ts.map +1 -1
  678. package/dist/types.js.map +1 -1
  679. package/dist/utilities/createClientFeature.d.ts +13 -0
  680. package/dist/utilities/createClientFeature.d.ts.map +1 -0
  681. package/dist/utilities/createClientFeature.js +30 -0
  682. package/dist/utilities/createClientFeature.js.map +1 -0
  683. package/dist/utilities/createServerFeature.d.ts +16 -0
  684. package/dist/utilities/createServerFeature.d.ts.map +1 -0
  685. package/dist/utilities/createServerFeature.js +34 -0
  686. package/dist/utilities/createServerFeature.js.map +1 -0
  687. package/dist/utilities/forEachNodeRecursively.js.map +1 -1
  688. package/dist/utilities/generateComponentMap.d.ts +2 -2
  689. package/dist/utilities/generateComponentMap.d.ts.map +1 -1
  690. package/dist/utilities/generateComponentMap.js +4 -4
  691. package/dist/utilities/generateComponentMap.js.map +1 -1
  692. package/dist/utilities/generateSchemaMap.d.ts +2 -2
  693. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  694. package/dist/utilities/generateSchemaMap.js +1 -1
  695. package/dist/utilities/generateSchemaMap.js.map +1 -1
  696. package/dist/utilities/migrateSlateToLexical/index.d.ts +15 -0
  697. package/dist/utilities/migrateSlateToLexical/index.d.ts.map +1 -0
  698. package/dist/utilities/migrateSlateToLexical/index.js +105 -0
  699. package/dist/utilities/migrateSlateToLexical/index.js.map +1 -0
  700. package/dist/utilities/migrateSlateToLexical/recurse.d.ts +9 -0
  701. package/dist/utilities/migrateSlateToLexical/recurse.d.ts.map +1 -0
  702. package/dist/utilities/migrateSlateToLexical/recurse.js +77 -0
  703. package/dist/utilities/migrateSlateToLexical/recurse.js.map +1 -0
  704. package/dist/utilities/recurseNodeTree.js.map +1 -1
  705. package/dist/utilities/useLexicalFeature.d.ts +1 -1
  706. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  707. package/dist/utilities/useLexicalFeature.js.map +1 -1
  708. package/dist/validate/index.js.map +1 -1
  709. package/dist/validate/validateNodes.d.ts +1 -1
  710. package/dist/validate/validateNodes.d.ts.map +1 -1
  711. package/dist/validate/validateNodes.js.map +1 -1
  712. package/package.json +10 -10
  713. package/dist/exports/client/Field-YMWNSE3A.js +0 -2
  714. package/dist/exports/client/Field-YMWNSE3A.js.map +0 -7
  715. package/dist/exports/client/chunk-MLIITFAS.js.map +0 -7
  716. package/dist/exports/client/chunk-OSR74ZNW.js.map +0 -7
  717. package/dist/exports/client/chunk-QU5MKT75.js.map +0 -7
  718. package/dist/exports/client/chunk-ZITHDR53.js +0 -2
  719. package/dist/exports/client/chunk-ZITHDR53.js.map +0 -7
  720. package/dist/exports/client/component-E2NHAHBC.js.map +0 -7
  721. package/dist/exports/client/component-X4LSLSWF.js +0 -2
  722. package/dist/exports/client/component-X4LSLSWF.js.map +0 -7
  723. package/dist/features/types.d.ts.map +0 -1
  724. package/dist/features/types.js +0 -3
  725. package/dist/features/types.js.map +0 -1
  726. /package/dist/exports/client/{RelationshipComponent-5OU5HATX.js.map → RelationshipComponent-AFXEJMZQ.js.map} +0 -0
  727. /package/dist/exports/client/{component-QWIGEOVD.js.map → component-VM36FRT2.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/features/blocks/component/BlockContent.tsx"],"sourcesContent":["import type { FormFieldBase } from '@payloadcms/ui'\nimport type { FieldMap, ReducedBlock } from '@payloadcms/ui/utilities/buildComponentMap'\nimport type { CollapsedPreferences, Data, FormState } from 'payload'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { getTranslation } from '@payloadcms/translations'\nimport {\n Button,\n Collapsible,\n ErrorPill,\n Pill,\n RenderFields,\n SectionTitle,\n useDocumentInfo,\n useFormSubmitted,\n useTranslation,\n} from '@payloadcms/ui'\nimport isDeepEqual from 'deep-equal'\nimport { $getNodeByKey } from 'lexical'\nimport React, { useCallback } from 'react'\n\nimport type { SanitizedClientEditorConfig } from '../../../lexical/config/types.js'\nimport type { BlockFields, BlockNode } from '../nodes/BlocksNode.js'\n\nimport { FormSavePlugin } from './FormSavePlugin.js'\n\ntype Props = {\n baseClass: string\n field: FormFieldBase & {\n editorConfig: SanitizedClientEditorConfig // With rendered features n stuff\n name: string\n richTextComponentMap: Map<string, React.ReactNode>\n }\n formData: BlockFields\n formSchema: FieldMap\n nodeKey: string\n path: string\n reducedBlock: ReducedBlock\n schemaPath: string\n}\n\n/**\n * The actual content of the Block. This should be INSIDE a Form component,\n * scoped to the block. All format operations in here are thus scoped to the block's form, and\n * not the whole document.\n */\nexport const BlockContent: React.FC<Props> = (props) => {\n const {\n baseClass,\n field,\n formData,\n formSchema,\n nodeKey,\n reducedBlock: { labels },\n schemaPath,\n } = props\n\n const { i18n } = useTranslation()\n const [editor] = useLexicalComposerContext()\n // Used for saving collapsed to preferences (and gettin' it from there again)\n // Remember, these preferences are scoped to the whole document, not just this form. This\n // is important to consider for the data path used in setDocFieldPreferences\n const { getDocPreferences, setDocFieldPreferences } = useDocumentInfo()\n\n const [isCollapsed, setIsCollapsed] = React.useState<boolean>(() => {\n let initialState = false\n\n void getDocPreferences().then((currentDocPreferences) => {\n const currentFieldPreferences = currentDocPreferences?.fields[field.name]\n\n const collapsedArray = currentFieldPreferences?.collapsed\n\n if (collapsedArray && collapsedArray.includes(formData.id)) {\n initialState = true\n setIsCollapsed(true)\n }\n })\n return initialState\n })\n\n const hasSubmitted = useFormSubmitted()\n\n const [errorCount, setErrorCount] = React.useState(0)\n\n const fieldHasErrors = hasSubmitted && errorCount > 0\n\n const classNames = [\n `${baseClass}__row`,\n fieldHasErrors ? `${baseClass}__row--has-errors` : `${baseClass}__row--no-errors`,\n ]\n .filter(Boolean)\n .join(' ')\n\n const onFormChange = useCallback(\n ({\n fullFieldsWithValues,\n newFormData,\n }: {\n fullFieldsWithValues: FormState\n newFormData: Data\n }) => {\n newFormData = {\n ...newFormData,\n id: formData.id,\n blockType: formData.blockType,\n }\n\n // Recursively remove all undefined values from even being present in formData, as they will\n // cause isDeepEqual to return false if, for example, formData has a key that fields.data\n // does not have, even if it's undefined.\n // Currently, this happens if a block has another sub-blocks field. Inside formData, that sub-blocks field has an undefined blockName property.\n // Inside of fields.data however, that sub-blocks blockName property does not exist at all.\n function removeUndefinedAndNullAndEmptyArraysRecursively(obj: object) {\n for (const key in obj) {\n const value = obj[key]\n if (Array.isArray(value) && !value?.length) {\n delete obj[key]\n } else if (value && typeof value === 'object') {\n removeUndefinedAndNullAndEmptyArraysRecursively(value)\n } else if (value === undefined || value === null) {\n delete obj[key]\n }\n }\n }\n removeUndefinedAndNullAndEmptyArraysRecursively(newFormData)\n\n removeUndefinedAndNullAndEmptyArraysRecursively(formData)\n\n // Only update if the data has actually changed. Otherwise, we may be triggering an unnecessary value change,\n // which would trigger the \"Leave without saving\" dialog unnecessarily\n if (!isDeepEqual(formData, newFormData)) {\n // Running this in the next tick in the meantime fixes this issue: https://github.com/payloadcms/payload/issues/4108\n // I don't know why. When this is called immediately, it might focus out of a nested lexical editor field if an update is made there.\n // My hypothesis is that the nested editor might not have fully finished its update cycle yet. By updating in the next tick, we\n // ensure that the nested editor has finished its update cycle before we update the block node.\n setTimeout(() => {\n editor.update(() => {\n const node: BlockNode = $getNodeByKey(nodeKey)\n if (node) {\n node.setFields(newFormData as BlockFields)\n }\n })\n }, 0)\n }\n\n // update error count\n if (hasSubmitted) {\n let rowErrorCount = 0\n for (const formField of Object.values(fullFieldsWithValues)) {\n if (formField?.valid === false) {\n rowErrorCount++\n }\n }\n setErrorCount(rowErrorCount)\n }\n },\n [editor, nodeKey, hasSubmitted, formData],\n )\n\n const onCollapsedChange = useCallback(\n (changedCollapsed: boolean) => {\n void getDocPreferences().then((currentDocPreferences) => {\n const currentFieldPreferences = currentDocPreferences?.fields[field.name]\n\n const collapsedArray = currentFieldPreferences?.collapsed\n\n const newCollapsed: CollapsedPreferences =\n collapsedArray && collapsedArray?.length ? collapsedArray : []\n\n if (changedCollapsed) {\n if (!newCollapsed.includes(formData.id)) {\n newCollapsed.push(formData.id)\n }\n } else {\n if (newCollapsed.includes(formData.id)) {\n newCollapsed.splice(newCollapsed.indexOf(formData.id), 1)\n }\n }\n\n setDocFieldPreferences(field.name, {\n collapsed: newCollapsed,\n hello: 'hi',\n })\n })\n },\n [getDocPreferences, field.name, setDocFieldPreferences, formData.id],\n )\n\n const removeBlock = useCallback(() => {\n editor.update(() => {\n $getNodeByKey(nodeKey).remove()\n })\n }, [editor, nodeKey])\n\n return (\n <React.Fragment>\n <Collapsible\n className={classNames}\n collapsibleStyle={fieldHasErrors ? 'error' : 'default'}\n header={\n <div className={`${baseClass}__block-header`}>\n <div>\n <Pill\n className={`${baseClass}__block-pill ${baseClass}__block-pill-${formData?.blockType}`}\n pillStyle=\"white\"\n >\n {typeof labels.singular === 'string'\n ? getTranslation(labels.singular, i18n)\n : '[Singular Label]'}\n </Pill>\n <SectionTitle path=\"blockName\" readOnly={field?.readOnly} />\n {fieldHasErrors && <ErrorPill count={errorCount} i18n={i18n} withMessage />}\n </div>\n {editor.isEditable() && (\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__removeButton`}\n disabled={field?.readOnly}\n icon=\"x\"\n onClick={(e) => {\n e.preventDefault()\n removeBlock()\n }}\n round\n tooltip=\"Remove Block\"\n />\n )}\n </div>\n }\n isCollapsed={isCollapsed}\n key={0}\n onToggle={(incomingCollapsedState) => {\n onCollapsedChange(incomingCollapsedState)\n setIsCollapsed(incomingCollapsedState)\n }}\n >\n <RenderFields\n className={`${baseClass}__fields`}\n fieldMap={Array.isArray(formSchema) ? formSchema : []}\n forceRender\n margins=\"small\"\n path=\"\" // Leaving path empty makes it so field values are not prefixed / scoped by the entire schemaPath. e.g. we can access \"myField\" instead of \"someLexicalField.feature.blocks.someArrayB\" // TODO: Could there be any implications leaving path different than schemaPath?\n readOnly={false}\n schemaPath={schemaPath} // Having the correct schemaPath here allows sub-fields (like array > addRow) to run correct form-state calls and retrieve their needed form state from the server\n />\n </Collapsible>\n\n <FormSavePlugin onChange={onFormChange} />\n </React.Fragment>\n )\n}\n"],"names":["useLexicalComposerContext","getTranslation","Button","Collapsible","ErrorPill","Pill","RenderFields","SectionTitle","useDocumentInfo","useFormSubmitted","useTranslation","isDeepEqual","$getNodeByKey","React","useCallback","FormSavePlugin","BlockContent","props","baseClass","field","formData","formSchema","nodeKey","reducedBlock","labels","schemaPath","i18n","editor","getDocPreferences","setDocFieldPreferences","isCollapsed","setIsCollapsed","useState","initialState","then","currentDocPreferences","currentFieldPreferences","fields","name","collapsedArray","collapsed","includes","id","hasSubmitted","errorCount","setErrorCount","fieldHasErrors","classNames","filter","Boolean","join","onFormChange","fullFieldsWithValues","newFormData","blockType","removeUndefinedAndNullAndEmptyArraysRecursively","obj","key","value","Array","isArray","length","undefined","setTimeout","update","node","setFields","rowErrorCount","formField","Object","values","valid","onCollapsedChange","changedCollapsed","newCollapsed","push","splice","indexOf","hello","removeBlock","remove","Fragment","className","collapsibleStyle","header","div","pillStyle","singular","path","readOnly","count","withMessage","isEditable","buttonStyle","disabled","icon","onClick","e","preventDefault","round","tooltip","onToggle","incomingCollapsedState","fieldMap","forceRender","margins","onChange"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";AAIA,SAASA,yBAAyB,QAAQ,2CAA0C;AACpF,SAASC,cAAc,QAAQ,2BAA0B;AACzD,SACEC,MAAM,EACNC,WAAW,EACXC,SAAS,EACTC,IAAI,EACJC,YAAY,EACZC,YAAY,EACZC,eAAe,EACfC,gBAAgB,EAChBC,cAAc,QACT,iBAAgB;AACvB,OAAOC,iBAAiB,aAAY;AACpC,SAASC,aAAa,QAAQ,UAAS;AACvC,OAAOC,SAASC,WAAW,QAAQ,QAAO;AAK1C,SAASC,cAAc,QAAQ,sBAAqB;AAiBpD;;;;CAIC,GACD,OAAO,MAAMC,eAAgC,CAACC;IAC5C,MAAM,EACJC,SAAS,EACTC,KAAK,EACLC,QAAQ,EACRC,UAAU,EACVC,OAAO,EACPC,cAAc,EAAEC,MAAM,EAAE,EACxBC,UAAU,EACX,GAAGR;IAEJ,MAAM,EAAES,IAAI,EAAE,GAAGhB;IACjB,MAAM,CAACiB,OAAO,GAAG3B;IACjB,6EAA6E;IAC7E,yFAAyF;IACzF,4EAA4E;IAC5E,MAAM,EAAE4B,iBAAiB,EAAEC,sBAAsB,EAAE,GAAGrB;IAEtD,MAAM,CA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AUvD;;;;AAGhC,EAAC"}
1
+ {"version":3,"sources":["../../../../src/features/blocks/component/BlockContent.tsx"],"sourcesContent":["import type { FormFieldBase } from '@payloadcms/ui'\nimport type { FieldMap, ReducedBlock } from '@payloadcms/ui/utilities/buildComponentMap'\nimport type { CollapsedPreferences, Data, FormState } from 'payload'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { getTranslation } from '@payloadcms/translations'\nimport {\n Button,\n Collapsible,\n ErrorPill,\n Pill,\n RenderFields,\n SectionTitle,\n useDocumentInfo,\n useFormSubmitted,\n useTranslation,\n} from '@payloadcms/ui'\nimport { dequal } from 'dequal/lite' // lite: no need for Map and Set support\nimport { $getNodeByKey } from 'lexical'\nimport React, { useCallback } from 'react'\n\nimport type { SanitizedClientEditorConfig } from '../../../lexical/config/types.js'\nimport type { BlockFields, BlockNode } from '../nodes/BlocksNode.js'\n\nimport { FormSavePlugin } from './FormSavePlugin.js'\n\ntype Props = {\n baseClass: string\n field: FormFieldBase & {\n editorConfig: SanitizedClientEditorConfig // With rendered features n stuff\n name: string\n richTextComponentMap: Map<string, React.ReactNode>\n }\n formData: BlockFields\n formSchema: FieldMap\n nodeKey: string\n path: string\n reducedBlock: ReducedBlock\n schemaPath: string\n}\n\n/**\n * The actual content of the Block. This should be INSIDE a Form component,\n * scoped to the block. All format operations in here are thus scoped to the block's form, and\n * not the whole document.\n */\nexport const BlockContent: React.FC<Props> = (props) => {\n const {\n baseClass,\n field,\n formData,\n formSchema,\n nodeKey,\n reducedBlock: { labels },\n schemaPath,\n } = props\n\n const { i18n } = useTranslation()\n const [editor] = useLexicalComposerContext()\n // Used for saving collapsed to preferences (and gettin' it from there again)\n // Remember, these preferences are scoped to the whole document, not just this form. This\n // is important to consider for the data path used in setDocFieldPreferences\n const { getDocPreferences, setDocFieldPreferences } = useDocumentInfo()\n\n const [isCollapsed, setIsCollapsed] = React.useState<boolean>(() => {\n let initialState = false\n\n void getDocPreferences().then((currentDocPreferences) => {\n const currentFieldPreferences = currentDocPreferences?.fields[field.name]\n\n const collapsedArray = currentFieldPreferences?.collapsed\n\n if (collapsedArray && collapsedArray.includes(formData.id)) {\n initialState = true\n setIsCollapsed(true)\n }\n })\n return initialState\n })\n\n const hasSubmitted = useFormSubmitted()\n\n const [errorCount, setErrorCount] = React.useState(0)\n\n const fieldHasErrors = hasSubmitted && errorCount > 0\n\n const classNames = [\n `${baseClass}__row`,\n fieldHasErrors ? `${baseClass}__row--has-errors` : `${baseClass}__row--no-errors`,\n ]\n .filter(Boolean)\n .join(' ')\n\n const onFormChange = useCallback(\n ({\n fullFieldsWithValues,\n newFormData,\n }: {\n fullFieldsWithValues: FormState\n newFormData: Data\n }) => {\n newFormData = {\n ...newFormData,\n id: formData.id,\n blockType: formData.blockType,\n }\n\n // Recursively remove all undefined values from even being present in formData, as they will\n // cause isDeepEqual to return false if, for example, formData has a key that fields.data\n // does not have, even if it's undefined.\n // Currently, this happens if a block has another sub-blocks field. Inside formData, that sub-blocks field has an undefined blockName property.\n // Inside of fields.data however, that sub-blocks blockName property does not exist at all.\n function removeUndefinedAndNullAndEmptyArraysRecursively(obj: object) {\n for (const key in obj) {\n const value = obj[key]\n if (Array.isArray(value) && !value?.length) {\n delete obj[key]\n } else if (value && typeof value === 'object') {\n removeUndefinedAndNullAndEmptyArraysRecursively(value)\n } else if (value === undefined || value === null) {\n delete obj[key]\n }\n }\n }\n removeUndefinedAndNullAndEmptyArraysRecursively(newFormData)\n\n removeUndefinedAndNullAndEmptyArraysRecursively(formData)\n\n // Only update if the data has actually changed. Otherwise, we may be triggering an unnecessary value change,\n // which would trigger the \"Leave without saving\" dialog unnecessarily\n if (!dequal(formData, newFormData)) {\n // Running this in the next tick in the meantime fixes this issue: https://github.com/payloadcms/payload/issues/4108\n // I don't know why. When this is called immediately, it might focus out of a nested lexical editor field if an update is made there.\n // My hypothesis is that the nested editor might not have fully finished its update cycle yet. By updating in the next tick, we\n // ensure that the nested editor has finished its update cycle before we update the block node.\n setTimeout(() => {\n editor.update(() => {\n const node: BlockNode = $getNodeByKey(nodeKey)\n if (node) {\n node.setFields(newFormData as BlockFields)\n }\n })\n }, 0)\n }\n\n // update error count\n if (hasSubmitted) {\n let rowErrorCount = 0\n for (const formField of Object.values(fullFieldsWithValues)) {\n if (formField?.valid === false) {\n rowErrorCount++\n }\n }\n setErrorCount(rowErrorCount)\n }\n },\n [editor, nodeKey, hasSubmitted, formData],\n )\n\n const onCollapsedChange = useCallback(\n (changedCollapsed: boolean) => {\n void getDocPreferences().then((currentDocPreferences) => {\n const currentFieldPreferences = currentDocPreferences?.fields[field.name]\n\n const collapsedArray = currentFieldPreferences?.collapsed\n\n const newCollapsed: CollapsedPreferences =\n collapsedArray && collapsedArray?.length ? collapsedArray : []\n\n if (changedCollapsed) {\n if (!newCollapsed.includes(formData.id)) {\n newCollapsed.push(formData.id)\n }\n } else {\n if (newCollapsed.includes(formData.id)) {\n newCollapsed.splice(newCollapsed.indexOf(formData.id), 1)\n }\n }\n\n setDocFieldPreferences(field.name, {\n collapsed: newCollapsed,\n hello: 'hi',\n })\n })\n },\n [getDocPreferences, field.name, setDocFieldPreferences, formData.id],\n )\n\n const removeBlock = useCallback(() => {\n editor.update(() => {\n $getNodeByKey(nodeKey).remove()\n })\n }, [editor, nodeKey])\n\n return (\n <React.Fragment>\n <Collapsible\n className={classNames}\n collapsibleStyle={fieldHasErrors ? 'error' : 'default'}\n header={\n <div className={`${baseClass}__block-header`}>\n <div>\n <Pill\n className={`${baseClass}__block-pill ${baseClass}__block-pill-${formData?.blockType}`}\n pillStyle=\"white\"\n >\n {typeof labels.singular === 'string'\n ? getTranslation(labels.singular, i18n)\n : '[Singular Label]'}\n </Pill>\n <SectionTitle path=\"blockName\" readOnly={field?.readOnly} />\n {fieldHasErrors && <ErrorPill count={errorCount} i18n={i18n} withMessage />}\n </div>\n {editor.isEditable() && (\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__removeButton`}\n disabled={field?.readOnly}\n icon=\"x\"\n onClick={(e) => {\n e.preventDefault()\n removeBlock()\n }}\n round\n tooltip=\"Remove Block\"\n />\n )}\n </div>\n }\n isCollapsed={isCollapsed}\n key={0}\n onToggle={(incomingCollapsedState) => {\n onCollapsedChange(incomingCollapsedState)\n setIsCollapsed(incomingCollapsedState)\n }}\n >\n <RenderFields\n className={`${baseClass}__fields`}\n fieldMap={Array.isArray(formSchema) ? formSchema : []}\n forceRender\n margins=\"small\"\n path=\"\" // Leaving path empty makes it so field values are not prefixed / scoped by the entire schemaPath. e.g. we can access \"myField\" instead of \"someLexicalField.feature.blocks.someArrayB\" // TODO: Could there be any implications leaving path different than schemaPath?\n readOnly={false}\n schemaPath={schemaPath} // Having the correct schemaPath here allows sub-fields (like array > addRow) to run correct form-state calls and retrieve their needed form state from the server\n />\n </Collapsible>\n\n <FormSavePlugin onChange={onFormChange} />\n </React.Fragment>\n )\n}\n"],"names":["useLexicalComposerContext","getTranslation","Button","Collapsible","ErrorPill","Pill","RenderFields","SectionTitle","useDocumentInfo","useFormSubmitted","useTranslation","dequal","$getNodeByKey","React","useCallback","FormSavePlugin","BlockContent","props","baseClass","field","formData","formSchema","nodeKey","reducedBlock","labels","schemaPath","i18n","editor","getDocPreferences","setDocFieldPreferences","isCollapsed","setIsCollapsed","useState","initialState","then","currentDocPreferences","currentFieldPreferences","fields","name","collapsedArray","collapsed","includes","id","hasSubmitted","errorCount","setErrorCount","fieldHasErrors","classNames","filter","Boolean","join","onFormChange","fullFieldsWithValues","newFormData","blockType","removeUndefinedAndNullAndEmptyArraysRecursively","obj","key","value","Array","isArray","length","undefined","setTimeout","update","node","setFields","rowErrorCount","formField","Object","values","valid","onCollapsedChange","changedCollapsed","newCollapsed","push","splice","indexOf","hello","removeBlock","remove","Fragment","className","collapsibleStyle","header","div","pillStyle","singular","path","readOnly","count","withMessage","isEditable","buttonStyle","disabled","icon","onClick","e","preventDefault","round","tooltip","onToggle","incomingCollapsedState","fieldMap","forceRender","margins","onChange"],"mapp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+D,QAAQ,EAAE7D,QAChC;;8CAEN,KAACnB;oCAAaiF,MAAK;oCAAYC,UAAUtE,OAAOsE;;gCAC/C3C,gCAAkB,KAAC1C;oCAAUsF,OAAO9C;oCAAYlB,MAAMA;oCAAMiE,WAAW;;;;wBAEzEhE,OAAOiE,UAAU,oBAChB,KAAC1F;4BACC2F,aAAY;4BACZX,WAAW,CAAC,EAAEhE,UAAU,cAAc,CAAC;4BACvC4E,UAAU3E,OAAOsE;4BACjBM,MAAK;4BACLC,SAAS,CAACC;gCACRA,EAAEC,cAAc;gCAChBnB;4BACF;4BACAoB,KAAK;4BACLC,SAAQ;;;;gBAKhBtE,aAAaA;gBAEbuE,UAAU,CAACC;oBACT9B,kBAAkB8B;oBAClBvE,eAAeuE;gBACjB;0BAEA,cAAA,KAAChG;oBACC4E,WAAW,CAAC,EAAEhE,UAAU,QAAQ,CAAC;oBACjCqF,UAAU5C,MAAMC,OAAO,CAACvC,cAAcA,aAAa,EAAE;oBACrDmF,WAAW;oBACXC,SAAQ;oBACRjB,MAAK,GAAG,wQAAwQ;;oBAChRC,UAAU;oBACVhE,YAAYA;;eAbT;0BAiBP,KAACV;gBAAe2F,UAAUvD;;;;AAGhC,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/features/blocks/component/FormSavePlugin.tsx"],"sourcesContent":["import type { Data, FormState } from 'payload'\nimport type React from 'react'\n\nimport { useAllFormFields } from '@payloadcms/ui'\nimport { reduceFieldsToValues } from '@payloadcms/ui/shared'\nimport { useEffect } from 'react'\n\nimport { removeEmptyArrayValues } from './removeEmptyArrayValues.js'\n\ntype Props = {\n onChange?: ({\n fullFieldsWithValues,\n newFormData,\n }: {\n fullFieldsWithValues: FormState\n newFormData: Data\n }) => void\n}\n\nexport const FormSavePlugin: React.FC<Props> = (props) => {\n const { onChange } = props\n\n const [_fields] = useAllFormFields()\n\n const fields = removeEmptyArrayValues({ fields: _fields })\n\n // Pass in fields, and indicate if you'd like to \"unflatten\" field data.\n // The result below will reflect the data stored in the form at the given time\n const newFormData = reduceFieldsToValues(fields, true)\n\n useEffect(() => {\n if (onChange) {\n onChange({ fullFieldsWithValues: fields, newFormData })\n }\n }, [newFormData, onChange, fields])\n\n return null\n}\n"],"names":["useAllFormFields","reduceFieldsToValues","useEffect","removeEmptyArrayValues","FormSavePlugin","props","onChange","_fields","fields","newFormData","fullFieldsWithValues"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAGA,SAASA,gBAAgB,QAAQ,iBAAgB;AACjD,SAASC,oBAAoB,QAAQ,wBAAuB;AAC5D,SAASC,SAAS,QAAQ,QAAO;AAEjC,SAASC,sBAAsB,QAAQ,8BAA6B;AAYpE,OAAO,MAAMC,iBAAkC,CAACC;IAC9C,MAAM,EAAEC,QAAQ,EAAE,GAAGD;IAErB,MAAM,CAACE,QAAQ,GAAGP;IAElB,MAAMQ,SAASL,uBAAuB;QAAEK,QAAQD;IAAQ;IAExD,wEAAwE;IACxE,8EAA8E;IAC9E,MAAME,cAAcR,qBAAqBO,QAAQ;IAEjDN,UAAU;QACR,IAAII,UAAU;YACZA,SAAS;gBAAEI,sBAAsBF;gBAAQC;YAAY;QACvD;IACF,GAAG;QAACA;QAAaH;QAAUE;KAAO;IAElC,OAAO;AACT,EAAC"}
1
+ {"version":3,"sources":["../../../../src/features/blocks/component/FormSavePlugin.tsx"],"sourcesContent":["import type { Data, FormState } from 'payload'\nimport type React from 'react'\n\nimport { useAllFormFields } from '@payloadcms/ui'\nimport { reduceFieldsToValues } from '@payloadcms/ui/shared'\nimport { useEffect } from 'react'\n\nimport { removeEmptyArrayValues } from './removeEmptyArrayValues.js'\n\ntype Props = {\n onChange?: ({\n fullFieldsWithValues,\n newFormData,\n }: {\n fullFieldsWithValues: FormState\n newFormData: Data\n }) => void\n}\n\nexport const FormSavePlugin: React.FC<Props> = (props) => {\n const { onChange } = props\n\n const [_fields] = useAllFormFields()\n\n const fields = removeEmptyArrayValues({ fields: _fields })\n\n // Pass in fields, and indicate if you'd like to \"unflatten\" field data.\n // The result below will reflect the data stored in the form at the given time\n const newFormData = reduceFieldsToValues(fields, true)\n\n useEffect(() => {\n if (onChange) {\n onChange({ fullFieldsWithValues: fields, newFormData })\n }\n }, [newFormData, onChange, fields])\n\n return null\n}\n"],"names":["useAllFormFields","reduceFieldsToValues","useEffect","removeEmptyArrayValues","FormSavePlugin","props","onChange","_fields","fields","newFormData","fullFieldsWithValues"],"mappings":"AAGA,SAASA,gBAAgB,QAAQ,iBAAgB;AACjD,SAASC,oBAAoB,QAAQ,wBAAuB;AAC5D,SAASC,SAAS,QAAQ,QAAO;AAEjC,SAASC,sBAAsB,QAAQ,8BAA6B;AAYpE,OAAO,MAAMC,iBAAkC,CAACC;IAC9C,MAAM,EAAEC,QAAQ,EAAE,GAAGD;IAErB,MAAM,CAACE,QAAQ,GAAGP;IAElB,MAAMQ,SAASL,uBAAuB;QAAEK,QAAQD;IAAQ;IAExD,wEAAwE;IACxE,8EAA8E;IAC9E,MAAME,cAAcR,qBAAqBO,QAAQ;IAEjDN,UAAU;QACR,IAAII,UAAU;YACZA,SAAS;gBAAEI,sBAAsBF;gBAAQC;YAAY;QACvD;IACF,GAAG;QAACA;QAAaH;QAAUE;KAAO;IAElC,OAAO;AACT,EAAC"}
@@ -19,7 +19,7 @@ export const BlockComponent = (props)=>{
19
19
  const { field: { richTextComponentMap } } = useEditorConfigContext();
20
20
  const componentMapRenderedFieldsPath = `feature.blocks.fields.${formData?.blockType}`;
21
21
  const schemaFieldsPath = `${schemaPath}.feature.blocks.${formData?.blockType}`;
22
- const reducedBlock = editorConfig?.resolvedFeatureMap?.get('blocks')?.clientFeatureProps?.reducedBlocks?.find((block)=>block.slug === formData?.blockType);
22
+ const reducedBlock = editorConfig?.resolvedFeatureMap?.get('blocks')?.sanitizedClientFeatureProps?.reducedBlocks?.find((block)=>block.slug === formData?.blockType);
23
23
  const fieldMap = richTextComponentMap.get(componentMapRenderedFieldsPath);
24
24
  // Field Schema
25
25
  useEffect(()=>{
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/features/blocks/component/index.tsx"],"sourcesContent":["'use client'\n\nimport type { FormProps } from '@payloadcms/ui'\n\nimport {\n Collapsible,\n Form,\n Pill,\n SectionTitle,\n ShimmerEffect,\n useConfig,\n useDocumentInfo,\n useFieldProps,\n useFormSubmitted,\n useTranslation,\n} from '@payloadcms/ui'\nimport React, { useCallback, useEffect, useMemo, useState } from 'react'\n\nimport { type BlockFields } from '../nodes/BlocksNode.js'\nconst baseClass = 'lexical-block'\nimport type { ReducedBlock } from '@payloadcms/ui/utilities/buildComponentMap'\nimport type { FormState } from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport { getFormState } from '@payloadcms/ui/shared'\nimport { v4 as uuid } from 'uuid'\n\nimport type { ClientComponentProps } from '../../types.js'\nimport type { BlocksFeatureClientProps } from '../feature.client.js'\n\nimport { useEditorConfigContext } from '../../../lexical/config/client/EditorConfigProvider.js'\nimport { BlockContent } from './BlockContent.js'\nimport './index.scss'\n\ntype Props = {\n children?: React.ReactNode\n\n formData: BlockFields\n nodeKey?: string\n /**\n * This transformedFormData already comes wrapped in blockFieldWrapperName\n */\n transformedFormData: BlockFields\n}\n\nexport const BlockComponent: React.FC<Props> = (props) => {\n const { formData, nodeKey } = props\n const config = useConfig()\n const submitted = useFormSubmitted()\n const { id } = useDocumentInfo()\n const { path, schemaPath } = useFieldProps()\n const { editorConfig, field: parentLexicalRichTextField } = useEditorConfigContext()\n\n const [initialState, setInitialState] = useState<FormState | false>(false)\n const {\n field: { richTextComponentMap },\n } = useEditorConfigContext()\n\n const componentMapRenderedFieldsPath = `feature.blocks.fields.${formData?.blockType}`\n const schemaFieldsPath = `${schemaPath}.feature.blocks.${formData?.blockType}`\n\n const reducedBlock: ReducedBlock = (\n editorConfig?.resolvedFeatureMap?.get('blocks')\n ?.clientFeatureProps as ClientComponentProps<BlocksFeatureClientProps>\n )?.reducedBlocks?.find((block) => block.slug === formData?.blockType)\n\n const fieldMap = richTextComponentMap.get(componentMapRenderedFieldsPath)\n // Field Schema\n useEffect(() => {\n const awaitInitialState = async () => {\n const state = await getFormState({\n apiRoute: config.routes.api,\n body: {\n id,\n data: JSON.parse(JSON.stringify(formData)),\n operation: 'update',\n schemaPath: schemaFieldsPath,\n },\n serverURL: config.serverURL,\n }) // Form State\n\n if (state) {\n setInitialState({\n ...state,\n blockName: {\n initialValue: '',\n passesCondition: true,\n valid: true,\n value: formData.blockName,\n },\n })\n }\n }\n\n if (formData) {\n void awaitInitialState()\n }\n }, [config.routes.api, config.serverURL, schemaFieldsPath, id])\n\n const onChange: FormProps['onChange'][0] = useCallback(\n async ({ formState: prevFormState }) => {\n const formState = 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 return {\n ...formState,\n blockName: {\n initialValue: '',\n passesCondition: true,\n valid: true,\n value: formData.blockName,\n },\n }\n },\n\n [config.routes.api, config.serverURL, schemaFieldsPath, id, formData.blockName],\n )\n const { i18n } = useTranslation()\n\n const classNames = [`${baseClass}__row`, `${baseClass}__row--no-errors`].filter(Boolean).join(' ')\n\n // Memoized Form JSX\n const formContent = useMemo(() => {\n return reducedBlock && initialState !== false ? (\n <Form\n beforeSubmit={[onChange]}\n // @ts-expect-error TODO: Fix this\n fields={fieldMap}\n initialState={initialState}\n onChange={[onChange]}\n submitted={submitted}\n uuid={uuid()}\n >\n <BlockContent\n baseClass={baseClass}\n field={parentLexicalRichTextField}\n formData={formData}\n formSchema={Array.isArray(fieldMap) ? fieldMap : []}\n nodeKey={nodeKey}\n path={`${path}.feature.blocks.${formData.blockType}`}\n reducedBlock={reducedBlock}\n schemaPath={schemaFieldsPath}\n />\n </Form>\n ) : (\n <Collapsible\n className={classNames}\n collapsibleStyle=\"default\"\n header={\n <div className={`${baseClass}__block-header`}>\n <div>\n <Pill\n className={`${baseClass}__block-pill ${baseClass}__block-pill-${formData?.blockType}`}\n pillStyle=\"white\"\n >\n {typeof reducedBlock.labels.singular === 'string'\n ? getTranslation(reducedBlock.labels.singular, i18n)\n : '[Singular Label]'}\n </Pill>\n <SectionTitle path=\"blockName\" readOnly={parentLexicalRichTextField?.readOnly} />\n </div>\n </div>\n }\n key={0}\n >\n <ShimmerEffect height=\"35vh\" />\n </Collapsible>\n )\n }, [\n classNames,\n fieldMap,\n parentLexicalRichTextField,\n nodeKey,\n i18n,\n submitted,\n initialState,\n reducedBlock,\n onChange,\n schemaFieldsPath,\n path,\n ]) // Adding formData to the dependencies here might break it\n return <div className={baseClass + ' ' + baseClass + '-' + formData.blockType}>{formContent}</div>\n}\n"],"names":["Collapsible","Form","Pill","SectionTitle","ShimmerEffect","useConfig","useDocumentInfo","useFieldProps","useFormSubmitted","useTranslation","React","useCallback","useEffect","useMemo","useState","baseClass","getTranslation","getFormState","v4","uuid","useEditorConfigContext","BlockContent","BlockComponent","props","formData","nodeKey","config","submitted","id","path","schemaPath","editorConfig","field","parentLexicalRichTextField","initialState","setInitialState","richTextComponentMap","componentMapRenderedFieldsPath","blockType","schemaFieldsPath","reducedBlock","resolvedFeatureMap","get","clientFeatureProps","reducedBlocks","find","block","slug","fieldMap","awaitInitialState","state","apiRoute","routes","api","body","data","JSON","parse","stringify","operation","serverURL","blockName","initialValue","passesCondition","valid","value","onChange","formState","prevFormState","i18n","classNames","filter","Boolean","join","formContent","beforeSubmit","fields","formSchema","Array","isArray","className","collapsibleStyle","header","div","pillStyle","labels","singular","readOnly","height"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AAIA,SACEA,WAAW,EACXC,IAAI,EACJC,IAAI,EACJC,YAAY,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;YAClCU,QAAQ5B;YACRd,cAAcA;YACdgC,UAAU;gBAACA;aAAS;YACpBvC,WAAWA;YACXR,MAAMA;sBAEN,cAAA,KAACE;gBACCN,WAAWA;gBACXiB,OAAOC;gBACPT,UAAUA;gBACVqD,YAAYC,MAAMC,OAAO,CAAC/B,YAAYA,WAAW,EAAE;gBACnDvB,SAASA;gBACTI,MAAM,CAAC,EAAEA,KAAK,gBAAgB,EAAEL,SAASc,SAAS,CAAC,CAAC;gBACpDE,cAAcA;gBACdV,YAAYS;;2BAIhB,KAACvC;YACCgF,WAAWV;YACXW,kBAAiB;YACjBC,sBACE,KAACC;gBAAIH,WAAW,CAAC,EAAEjE,UAAU,cAAc,CAAC;0BAC1C,cAAA,MAACoE;;sCACC,KAACjF;4BACC8E,WAAW,CAAC,EAAEjE,UAAU,aAAa,EAAEA,UAAU,aAAa,EAAES,UAAUc,UAAU,CAAC;4BACrF8C,WAAU;sCAET,OAAO5C,aAAa6C,MAAM,CAACC,QAAQ,KAAK,WACrCtE,eAAewB,aAAa6C,MAAM,CAACC,QAAQ,EAAEjB,QAC7C;;sCAEN,KAAClE;4BAAa0B,MAAK;4BAAY0D,UAAUtD,4BAA4BsD;;;;;sBAM3E,cAAA,KAACnF;gBAAcoF,QAAO;;WAFjB;IAKX,GAAG;QACDlB;QACAtB;QACAf;QACAR;QACA4C;QACA1C;QACAO;QACAM;QACA0B;QACA3B;QACAV;KACD,EAAE,0DAA0D;;IAC7D,qBAAO,KAACsD;QAAIH,WAAWjE,YAAY,MAAMA,YAAY,MAAMS,SAASc,SAAS;kBAAGoC;;AAClF,EAAC"}
1
+ {"version":3,"sources":["../../../../src/features/blocks/component/index.tsx"],"sourcesContent":["'use client'\n\nimport type { FormProps } from '@payloadcms/ui'\n\nimport {\n Collapsible,\n Form,\n Pill,\n SectionTitle,\n ShimmerEffect,\n useConfig,\n useDocumentInfo,\n useFieldProps,\n useFormSubmitted,\n useTranslation,\n} from '@payloadcms/ui'\nimport React, { useCallback, useEffect, useMemo, useState } from 'react'\n\nimport { type BlockFields } from '../nodes/BlocksNode.js'\nconst baseClass = 'lexical-block'\nimport type { ReducedBlock } from '@payloadcms/ui/utilities/buildComponentMap'\nimport type { FormState } from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport { getFormState } from '@payloadcms/ui/shared'\nimport { v4 as uuid } from 'uuid'\n\nimport type { ClientComponentProps } from '../../typesClient.js'\nimport type { BlocksFeatureClientProps } from '../feature.client.js'\n\nimport { useEditorConfigContext } from '../../../lexical/config/client/EditorConfigProvider.js'\nimport { BlockContent } from './BlockContent.js'\nimport './index.scss'\n\ntype Props = {\n children?: React.ReactNode\n\n formData: BlockFields\n nodeKey?: string\n /**\n * This transformedFormData already comes wrapped in blockFieldWrapperName\n */\n transformedFormData: BlockFields\n}\n\nexport const BlockComponent: React.FC<Props> = (props) => {\n const { formData, nodeKey } = props\n const config = useConfig()\n const submitted = useFormSubmitted()\n const { id } = useDocumentInfo()\n const { path, schemaPath } = useFieldProps()\n const { editorConfig, field: parentLexicalRichTextField } = useEditorConfigContext()\n\n const [initialState, setInitialState] = useState<FormState | false>(false)\n const {\n field: { richTextComponentMap },\n } = useEditorConfigContext()\n\n const componentMapRenderedFieldsPath = `feature.blocks.fields.${formData?.blockType}`\n const schemaFieldsPath = `${schemaPath}.feature.blocks.${formData?.blockType}`\n\n const reducedBlock: ReducedBlock = (\n editorConfig?.resolvedFeatureMap?.get('blocks')\n ?.sanitizedClientFeatureProps as ClientComponentProps<BlocksFeatureClientProps>\n )?.reducedBlocks?.find((block) => block.slug === formData?.blockType)\n\n const fieldMap = richTextComponentMap.get(componentMapRenderedFieldsPath)\n // Field Schema\n useEffect(() => {\n const awaitInitialState = async () => {\n const state = await getFormState({\n apiRoute: config.routes.api,\n body: {\n id,\n data: JSON.parse(JSON.stringify(formData)),\n operation: 'update',\n schemaPath: schemaFieldsPath,\n },\n serverURL: config.serverURL,\n }) // Form State\n\n if (state) {\n setInitialState({\n ...state,\n blockName: {\n initialValue: '',\n passesCondition: true,\n valid: true,\n value: formData.blockName,\n },\n })\n }\n }\n\n if (formData) {\n void awaitInitialState()\n }\n }, [config.routes.api, config.serverURL, schemaFieldsPath, id])\n\n const onChange: FormProps['onChange'][0] = useCallback(\n async ({ formState: prevFormState }) => {\n const formState = 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 return {\n ...formState,\n blockName: {\n initialValue: '',\n passesCondition: true,\n valid: true,\n value: formData.blockName,\n },\n }\n },\n\n [config.routes.api, config.serverURL, schemaFieldsPath, id, formData.blockName],\n )\n const { i18n } = useTranslation()\n\n const classNames = [`${baseClass}__row`, `${baseClass}__row--no-errors`].filter(Boolean).join(' ')\n\n // Memoized Form JSX\n const formContent = useMemo(() => {\n return reducedBlock && initialState !== false ? (\n <Form\n beforeSubmit={[onChange]}\n // @ts-expect-error TODO: Fix this\n fields={fieldMap}\n initialState={initialState}\n onChange={[onChange]}\n submitted={submitted}\n uuid={uuid()}\n >\n <BlockContent\n baseClass={baseClass}\n field={parentLexicalRichTextField}\n formData={formData}\n formSchema={Array.isArray(fieldMap) ? fieldMap : []}\n nodeKey={nodeKey}\n path={`${path}.feature.blocks.${formData.blockType}`}\n reducedBlock={reducedBlock}\n schemaPath={schemaFieldsPath}\n />\n </Form>\n ) : (\n <Collapsible\n className={classNames}\n collapsibleStyle=\"default\"\n header={\n <div className={`${baseClass}__block-header`}>\n <div>\n <Pill\n className={`${baseClass}__block-pill ${baseClass}__block-pill-${formData?.blockType}`}\n pillStyle=\"white\"\n >\n {typeof reducedBlock.labels.singular === 'string'\n ? getTranslation(reducedBlock.labels.singular, i18n)\n : '[Singular Label]'}\n </Pill>\n <SectionTitle path=\"blockName\" readOnly={parentLexicalRichTextField?.readOnly} />\n </div>\n </div>\n }\n key={0}\n >\n <ShimmerEffect height=\"35vh\" />\n </Collapsible>\n )\n }, [\n classNames,\n fieldMap,\n parentLexicalRichTextField,\n nodeKey,\n i18n,\n submitted,\n initialState,\n reducedBlock,\n onChange,\n schemaFieldsPath,\n path,\n ]) // Adding formData to the dependencies here might break it\n return <div className={baseClass + ' ' + baseClass + '-' + formData.blockType}>{formContent}</div>\n}\n"],"names":["Collapsible","Form","Pill","SectionTitle","ShimmerEffect","useConfig","useDocumentInfo","useFieldProps","useFormSubmitted","useTranslation","React","useCallback","useEffect","useMemo","useState","baseClass","getTranslation","getFormState","v4","uuid","useEditorConfigContext","BlockContent","BlockComponent","props","formData","nodeKey","config","submitted","id","path","schemaPath","editorConfig","field","parentLexicalRichTextField","initialState","setInitialState","richTextComponentMap","componentMapRenderedFieldsPath","blockType","schemaFieldsPath","reducedBlock","resolvedFeatureMap","get","sanitizedClientFeatureProps","reducedBlocks","find","block","slug","fieldMap","awaitInitialState","state","apiRoute","routes","api","body","data","JSON","parse","stringify","operation","serverURL","blockName","initialValue","passesCondition","valid","value","onChange","formState","prevFormState","i18n","classNames","filter","Boolean","join","formContent","beforeSubmit","fields","formSchema","Array","isArray","className","collapsibleStyle","header","div","pillStyle","labels","singular","readOnly","height"],"mappings":"AAAA;;AAIA,SACEA,WAAW,EACXC,IAAI,EACJC,IAAI,EACJC,YAAY,EACZC,aAAa,EACbC,SAAS,EACTC,eAAe,EACfC,aAAa,EACbC,gBAAgB,EAChBC,cAAc,QACT,iBAAgB;AACvB,OAAOC,SAASC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,QAAO;AAGxE,MAAMC,YAAY;AAIlB,SAASC,cAAc,QAAQ,2BAA0B;AACzD,SAASC,YAAY,QAAQ,wBAAuB;AACpD,SAASC,MAAMC,IAAI,QAAQ,OAAM;AAKjC,SAASC,sBAAsB,QAAQ,yDAAwD;AAC/F,SAASC,YAAY,QAAQ,oBAAmB;AAchD,OAAO,MAAMC,iBAAkC,CAACC;IAC9C,MAAM,EAAEC,QAAQ,EAAEC,OAAO,EAAE,G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,MAACoE;;sCACC,KAACjF;4BACC8E,WAAW,CAAC,EAAEjE,UAAU,aAAa,EAAEA,UAAU,aAAa,EAAES,UAAUc,UAAU,CAAC;4BACrF8C,WAAU;sCAET,OAAO5C,aAAa6C,MAAM,CAACC,QAAQ,KAAK,WACrCtE,eAAewB,aAAa6C,MAAM,CAACC,QAAQ,EAAEjB,QAC7C;;sCAEN,KAAClE;4BAAa0B,MAAK;4BAAY0D,UAAUtD,4BAA4BsD;;;;;sBAM3E,cAAA,KAACnF;gBAAcoF,QAAO;;WAFjB;IAKX,GAAG;QACDlB;QACAtB;QACAf;QACAR;QACA4C;QACA1C;QACAO;QACAM;QACA0B;QACA3B;QACAV;KACD,EAAE,0DAA0D;;IAC7D,qBAAO,KAACsD;QAAIH,WAAWjE,YAAY,MAAMA,YAAY,MAAMS,SAASc,SAAS;kBAAGoC;;AAClF,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/features/blocks/component/removeEmptyArrayValues.ts"],"sourcesContent":["import type { FormState } from 'payload'\n\n/**\n * By default, if an array field is empty, it will be included in the form state with a value of 0.\n * We do not need this behavior here, By setting `disableFormData` to true, we can prevent the field from being included in the form state\n * like that.\n * @param fields form state\n */\nexport function removeEmptyArrayValues({ fields }: { fields: FormState }): FormState {\n for (const key in fields) {\n const field = fields[key]\n if (Array.isArray(field.rows) && 'value' in field) {\n field.disableFormData = true\n }\n }\n return fields\n}\n"],"names":["removeEmptyArrayValues","fields","key","field","Array","isArray","rows","disableFormData"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAEA;;;;;CAKC,GACD,OAAO,SAASA,uBAAuB,EAAEC,MAAM,EAAyB;IACtE,IAAK,MAAMC,OAAOD,OAAQ;QACxB,MAAME,QAAQF,MAAM,CAACC,IAAI;QACzB,IAAIE,MAAMC,OAAO,CAACF,MAAMG,IAAI,KAAK,WAAWH,OAAO;YACjDA,MAAMI,eAAe,GAAG;QAC1B;IACF;IACA,OAAON;AACT"}
1
+ {"version":3,"sources":["../../../../src/features/blocks/component/removeEmptyArrayValues.ts"],"sourcesContent":["import type { FormState } from 'payload'\n\n/**\n * By default, if an array field is empty, it will be included in the form state with a value of 0.\n * We do not need this behavior here, By setting `disableFormData` to true, we can prevent the field from being included in the form state\n * like that.\n * @param fields form state\n */\nexport function removeEmptyArrayValues({ fields }: { fields: FormState }): FormState {\n for (const key in fields) {\n const field = fields[key]\n if (Array.isArray(field.rows) && 'value' in field) {\n field.disableFormData = true\n }\n }\n return fields\n}\n"],"names":["removeEmptyArrayValues","fields","key","field","Array","isArray","rows","disableFormData"],"mappings":"AAEA;;;;;CAKC,GACD,OAAO,SAASA,uBAAuB,EAAEC,MAAM,EAAyB;IACtE,IAAK,MAAMC,OAAOD,OAAQ;QACxB,MAAME,QAAQF,MAAM,CAACC,IAAI;QACzB,IAAIE,MAAMC,OAAO,CAACF,MAAMG,IAAI,KAAK,WAAWH,OAAO;YACjDA,MAAMI,eAAe,GAAG;QAC1B;IACF;IACA,OAAON;AACT"}
@@ -54,7 +54,7 @@ export const BlocksDrawerComponent = ()=>{
54
54
  slug: `lexical-rich-text-blocks-` + uuid,
55
55
  depth: editDepth
56
56
  });
57
- const reducedBlocks = editorConfig?.resolvedFeatureMap?.get('blocks')?.clientFeatureProps?.reducedBlocks;
57
+ const reducedBlocks = editorConfig?.resolvedFeatureMap?.get('blocks')?.sanitizedClientFeatureProps?.reducedBlocks;
58
58
  useEffect(()=>{
59
59
  return editor.registerCommand(INSERT_BLOCK_WITH_DRAWER_COMMAND, (payload)=>{
60
60
  setReplaceNodeKey(payload?.replace ? payload?.replace.nodeKey : null);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/features/blocks/drawer/index.tsx"],"sourcesContent":["'use client'\nimport type { LexicalCommand, LexicalEditor } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport {\n BlocksDrawer,\n formatDrawerSlug,\n useEditDepth,\n useModal,\n useTranslation,\n} from '@payloadcms/ui'\nimport { $getNodeByKey, COMMAND_PRIORITY_EDITOR, createCommand } from 'lexical'\nimport React, { useCallback, useEffect, useState } from 'react'\n\nimport type { ClientComponentProps } from '../../types.js'\nimport type { BlocksFeatureClientProps } from '../feature.client.js'\n\nimport { useEditorConfigContext } from '../../../lexical/config/client/EditorConfigProvider.js'\nimport { $createBlockNode } from '../nodes/BlocksNode.js'\nimport { INSERT_BLOCK_COMMAND } from '../plugin/commands.js'\nconst baseClass = 'lexical-blocks-drawer'\n\nexport const INSERT_BLOCK_WITH_DRAWER_COMMAND: LexicalCommand<{\n replace: { nodeKey: string } | false\n}> = createCommand('INSERT_BLOCK_WITH_DRAWER_COMMAND')\n\nconst insertBlock = ({\n blockType,\n editor,\n replaceNodeKey,\n}: {\n blockType: string\n editor: LexicalEditor\n replaceNodeKey: null | string\n}) => {\n if (!replaceNodeKey) {\n editor.dispatchCommand(INSERT_BLOCK_COMMAND, {\n id: null,\n blockName: '',\n blockType,\n })\n } else {\n editor.update(() => {\n const node = $getNodeByKey(replaceNodeKey)\n if (node) {\n node.replace(\n $createBlockNode({\n id: null,\n blockName: '',\n blockType,\n }),\n )\n }\n })\n }\n}\n\nexport const BlocksDrawerComponent: React.FC = () => {\n const [editor] = useLexicalComposerContext()\n const { editorConfig, uuid } = useEditorConfigContext()\n\n const [replaceNodeKey, setReplaceNodeKey] = useState<null | string>(null)\n const editDepth = useEditDepth()\n const { t } = useTranslation()\n const { openModal } = useModal()\n\n const labels = {\n plural: t('fields:blocks') || 'Blocks',\n singular: t('fields:block') || 'Block',\n }\n\n const addRow = useCallback(\n (rowIndex: number, blockType: string) => {\n insertBlock({\n blockType,\n editor,\n replaceNodeKey,\n })\n },\n [editor, replaceNodeKey],\n )\n\n const drawerSlug = formatDrawerSlug({\n slug: `lexical-rich-text-blocks-` + uuid,\n depth: editDepth,\n })\n\n const reducedBlocks = (\n editorConfig?.resolvedFeatureMap?.get('blocks')\n ?.clientFeatureProps as ClientComponentProps<BlocksFeatureClientProps>\n )?.reducedBlocks\n\n useEffect(() => {\n return editor.registerCommand<{\n replace: { nodeKey: string } | false\n }>(\n INSERT_BLOCK_WITH_DRAWER_COMMAND,\n (payload) => {\n setReplaceNodeKey(payload?.replace ? payload?.replace.nodeKey : null)\n openModal(drawerSlug)\n return true\n },\n COMMAND_PRIORITY_EDITOR,\n )\n }, [editor, drawerSlug, openModal])\n\n return (\n <BlocksDrawer\n addRow={addRow}\n addRowIndex={0}\n blocks={reducedBlocks}\n drawerSlug={drawerSlug}\n labels={labels}\n />\n )\n}\n"],"names":["useLexicalComposerContext","BlocksDrawer","formatDrawerSlug","useEditDepth","useModal","useTranslation","$getNodeByKey","COMMAND_PRIORITY_EDITOR","createCommand","React","useCallback","useEffect","useState","useEditorConfigContext","$createBlockNode","INSERT_BLOCK_COMMAND","baseClass","INSERT_BLOCK_WITH_DRAWER_COMMAND","insertBlock","blockType","editor","replaceNodeKey","dispatchCommand","id","blockName","update","node","replace","BlocksDrawerComponent","editorConfig","uuid","setReplaceNodeKey","editDepth","t","openModal","labels","plural","singular","addRow","rowIndex","drawerSlug","slug","depth","reducedBlocks","resolvedFeatureMap","get","clientFeatureProps","registerCommand","payload","nodeKey","addRowIndex","blocks"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AAGA,SAASA,yBAAyB,QAAQ,2CAA0C;AACpF,SACEC,YAAY,EACZC,gBAAgB,EAChBC,YAAY,EACZC,QAAQ,EACRC,cAAc,QACT,iBAAgB;AACvB,SAASC,aAAa,EAAEC,uBAAuB,EAAEC,aAAa,QAAQ,UAAS;AAC/E,OAAOC,SAASC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,QAAO;AAK/D,SAASC,sBAAsB,QAAQ,yDAAwD;AAC/F,SAASC,gBAAgB,QAAQ,yBAAwB;AACzD,SAASC,oBAAoB,QAAQ,wBAAuB;AAC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ACE,KAACjC;QACCqC,QAAQA;QACRY,aAAa;QACbC,QAAQR;QACRH,YAAYA;QACZL,QAAQA;;AAGd,EAAC"}
1
+ {"version":3,"sources":["../../../../src/features/blocks/drawer/index.tsx"],"sourcesContent":["'use client'\nimport type { LexicalCommand, LexicalEditor } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport {\n BlocksDrawer,\n formatDrawerSlug,\n useEditDepth,\n useModal,\n useTranslation,\n} from '@payloadcms/ui'\nimport { $getNodeByKey, COMMAND_PRIORITY_EDITOR, createCommand } from 'lexical'\nimport React, { useCallback, useEffect, useState } from 'react'\n\nimport type { ClientComponentProps } from '../../typesClient.js'\nimport type { BlocksFeatureClientProps } from '../feature.client.js'\n\nimport { useEditorConfigContext } from '../../../lexical/config/client/EditorConfigProvider.js'\nimport { $createBlockNode } from '../nodes/BlocksNode.js'\nimport { INSERT_BLOCK_COMMAND } from '../plugin/commands.js'\nconst baseClass = 'lexical-blocks-drawer'\n\nexport const INSERT_BLOCK_WITH_DRAWER_COMMAND: LexicalCommand<{\n replace: { nodeKey: string } | false\n}> = createCommand('INSERT_BLOCK_WITH_DRAWER_COMMAND')\n\nconst insertBlock = ({\n blockType,\n editor,\n replaceNodeKey,\n}: {\n blockType: string\n editor: LexicalEditor\n replaceNodeKey: null | string\n}) => {\n if (!replaceNodeKey) {\n editor.dispatchCommand(INSERT_BLOCK_COMMAND, {\n id: null,\n blockName: '',\n blockType,\n })\n } else {\n editor.update(() => {\n const node = $getNodeByKey(replaceNodeKey)\n if (node) {\n node.replace(\n $createBlockNode({\n id: null,\n blockName: '',\n blockType,\n }),\n )\n }\n })\n }\n}\n\nexport const BlocksDrawerComponent: React.FC = () => {\n const [editor] = useLexicalComposerContext()\n const { editorConfig, uuid } = useEditorConfigContext()\n\n const [replaceNodeKey, setReplaceNodeKey] = useState<null | string>(null)\n const editDepth = useEditDepth()\n const { t } = useTranslation()\n const { openModal } = useModal()\n\n const labels = {\n plural: t('fields:blocks') || 'Blocks',\n singular: t('fields:block') || 'Block',\n }\n\n const addRow = useCallback(\n (rowIndex: number, blockType: string) => {\n insertBlock({\n blockType,\n editor,\n replaceNodeKey,\n })\n },\n [editor, replaceNodeKey],\n )\n\n const drawerSlug = formatDrawerSlug({\n slug: `lexical-rich-text-blocks-` + uuid,\n depth: editDepth,\n })\n\n const reducedBlocks = (\n editorConfig?.resolvedFeatureMap?.get('blocks')\n ?.sanitizedClientFeatureProps as ClientComponentProps<BlocksFeatureClientProps>\n )?.reducedBlocks\n\n useEffect(() => {\n return editor.registerCommand<{\n replace: { nodeKey: string } | false\n }>(\n INSERT_BLOCK_WITH_DRAWER_COMMAND,\n (payload) => {\n setReplaceNodeKey(payload?.replace ? payload?.replace.nodeKey : null)\n openModal(drawerSlug)\n return true\n },\n COMMAND_PRIORITY_EDITOR,\n )\n }, [editor, drawerSlug, openModal])\n\n return (\n <BlocksDrawer\n addRow={addRow}\n addRowIndex={0}\n blocks={reducedBlocks}\n drawerSlug={drawerSlug}\n labels={labels}\n />\n )\n}\n"],"names":["useLexicalComposerContext","BlocksDrawer","formatDrawerSlug","useEditDepth","useModal","useTranslation","$getNodeByKey","COMMAND_PRIORITY_EDITOR","createCommand","React","useCallback","useEffect","useState","useEditorConfigContext","$createBlockNode","INSERT_BLOCK_COMMAND","baseClass","INSERT_BLOCK_WITH_DRAWER_COMMAND","insertBlock","blockType","editor","replaceNodeKey","dispatchCommand","id","blockName","update","node","replace","BlocksDrawerComponent","editorConfig","uuid","setReplaceNodeKey","editDepth","t","openModal","labels","plural","singular","addRow","rowIndex","drawerSlug","slug","depth","reducedBlocks","resolvedFeatureMap","get","sanitizedClientFeatureProps","registerCommand","payload","nodeKey","addRowIndex","blocks"],"mappings":"AAAA;;AAGA,SAASA,yBAAyB,QAAQ,2CAA0C;AACpF,SACEC,YAAY,EACZC,gBAAgB,EAChBC,YAAY,EACZC,QAAQ,EACRC,cAAc,QACT,iBAAgB;AACvB,SAASC,aAA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AAI,WAClCC,6BACHH;IAEHhC,UAAU;QACR,OAAOS,OAAO2B,eAAe,CAG3B9B,kCACA,CAAC+B;YACCjB,kBAAkBiB,SAASrB,UAAUqB,SAASrB,QAAQsB,UAAU;YAChEf,UAAUM;YACV,OAAO;QACT,GACAjC;IAEJ,GAAG;QAACa;QAAQoB;QAAYN;KAAU;IAElC,qBACE,KAACjC;QACCqC,QAAQA;QACRY,aAAa;QACbC,QAAQR;QACRH,YAAYA;QACZL,QAAQA;;AAGd,EAAC"}
@@ -1,9 +1,8 @@
1
- /// <reference types="react" resolution-mode="require"/>
2
1
  import type { ReducedBlock } from '@payloadcms/ui/utilities/buildComponentMap';
3
2
  export type BlocksFeatureClientProps = {
4
3
  reducedBlocks: ReducedBlock[];
5
4
  };
6
- export declare const BlocksFeatureClientComponent: import("react").FC<{
5
+ export declare const BlocksFeatureClient: import("react").FC<{
7
6
  featureKey: string;
8
7
  order: number;
9
8
  } & BlocksFeatureClientProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../src/features/blocks/feature.client.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAA;AAY9E,MAAM,MAAM,wBAAwB,GAAG;IACrC,aAAa,EAAE,YAAY,EAAE,CAAA;CAC9B,CAAA;AAiFD,eAAO,MAAM,4BAA4B;;;6BAA6C,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../src/features/blocks/feature.client.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAA;AAU9E,MAAM,MAAM,wBAAwB,GAAG;IACrC,aAAa,EAAE,YAAY,EAAE,CAAA;CAC9B,CAAA;AAED,eAAO,MAAM,mBAAmB;;;6BAwE7B,CAAA"}
@@ -1,92 +1,86 @@
1
1
  'use client';
2
2
  import { getTranslation } from '@payloadcms/translations';
3
3
  import { BlockIcon } from '../../lexical/ui/icons/Block/index.js';
4
- import { createClientComponent } from '../createClientComponent.js';
4
+ import { createClientFeature } from '../../utilities/createClientFeature.js';
5
5
  import { BlockNode } from './nodes/BlocksNode.js';
6
6
  import { INSERT_BLOCK_COMMAND } from './plugin/commands.js';
7
7
  import { BlocksPlugin } from './plugin/index.js';
8
- const BlocksFeatureClient = (props)=>{
9
- return {
10
- clientFeatureProps: props,
11
- feature: ()=>({
12
- clientFeatureProps: props,
13
- nodes: [
14
- BlockNode
15
- ],
16
- plugins: [
17
- {
18
- Component: BlocksPlugin,
19
- position: 'normal'
20
- }
21
- ],
22
- slashMenu: {
23
- groups: [
24
- {
25
- items: props.reducedBlocks.map((block)=>{
26
- return {
27
- Icon: BlockIcon,
28
- key: 'block-' + block.slug,
29
- keywords: [
30
- 'block',
31
- 'blocks',
32
- block.slug
33
- ],
34
- label: ({ i18n })=>{
35
- if (!block.labels.singular) {
36
- return block.slug;
37
- }
38
- return getTranslation(block.labels.singular, i18n);
39
- },
40
- onSelect: ({ editor })=>{
41
- editor.dispatchCommand(INSERT_BLOCK_COMMAND, {
42
- id: null,
43
- blockName: '',
44
- blockType: block.slug
45
- });
46
- }
47
- };
48
- }),
49
- key: 'blocks',
8
+ export const BlocksFeatureClient = createClientFeature(({ props })=>({
9
+ nodes: [
10
+ BlockNode
11
+ ],
12
+ plugins: [
13
+ {
14
+ Component: BlocksPlugin,
15
+ position: 'normal'
16
+ }
17
+ ],
18
+ sanitizedClientFeatureProps: props,
19
+ slashMenu: {
20
+ groups: [
21
+ {
22
+ items: props.reducedBlocks.map((block)=>{
23
+ return {
24
+ Icon: BlockIcon,
25
+ key: 'block-' + block.slug,
26
+ keywords: [
27
+ 'block',
28
+ 'blocks',
29
+ block.slug
30
+ ],
50
31
  label: ({ i18n })=>{
51
- return i18n.t('lexical:blocks:label');
32
+ if (!block.labels.singular) {
33
+ return block.slug;
34
+ }
35
+ return getTranslation(block.labels.singular, i18n);
36
+ },
37
+ onSelect: ({ editor })=>{
38
+ editor.dispatchCommand(INSERT_BLOCK_COMMAND, {
39
+ id: null,
40
+ blockName: '',
41
+ blockType: block.slug
42
+ });
52
43
  }
53
- }
54
- ]
55
- },
56
- toolbarFixed: {
57
- groups: [
58
- {
59
- type: 'dropdown',
44
+ };
45
+ }),
46
+ key: 'blocks',
47
+ label: ({ i18n })=>{
48
+ return i18n.t('lexical:blocks:label');
49
+ }
50
+ }
51
+ ]
52
+ },
53
+ toolbarFixed: {
54
+ groups: [
55
+ {
56
+ type: 'dropdown',
57
+ ChildComponent: BlockIcon,
58
+ items: props.reducedBlocks.map((block, index)=>{
59
+ return {
60
60
  ChildComponent: BlockIcon,
61
- items: props.reducedBlocks.map((block, index)=>{
62
- return {
63
- ChildComponent: BlockIcon,
64
- isActive: undefined,
65
- key: 'block-' + block.slug,
66
- label: ({ i18n })=>{
67
- if (!block.labels.singular) {
68
- return block.slug;
69
- }
70
- return getTranslation(block.labels.singular, i18n);
71
- },
72
- onSelect: ({ editor })=>{
73
- editor.dispatchCommand(INSERT_BLOCK_COMMAND, {
74
- id: null,
75
- blockName: '',
76
- blockType: block.slug
77
- });
78
- },
79
- order: index
80
- };
81
- }),
82
- key: 'blocks',
83
- order: 20
84
- }
85
- ]
61
+ isActive: undefined,
62
+ key: 'block-' + block.slug,
63
+ label: ({ i18n })=>{
64
+ if (!block.labels.singular) {
65
+ return block.slug;
66
+ }
67
+ return getTranslation(block.labels.singular, i18n);
68
+ },
69
+ onSelect: ({ editor })=>{
70
+ editor.dispatchCommand(INSERT_BLOCK_COMMAND, {
71
+ id: null,
72
+ blockName: '',
73
+ blockType: block.slug
74
+ });
75
+ },
76
+ order: index
77
+ };
78
+ }),
79
+ key: 'blocks',
80
+ order: 20
86
81
  }
87
- })
88
- };
89
- };
90
- export const BlocksFeatureClientComponent = createClientComponent(BlocksFeatureClient);
82
+ ]
83
+ }
84
+ }));
91
85
 
92
86
  //# sourceMappingURL=feature.client.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/features/blocks/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport type { ReducedBlock } from '@payloadcms/ui/utilities/buildComponentMap'\n\nimport { getTranslation } from '@payloadcms/translations'\n\nimport type { FeatureProviderProviderClient } from '../types.js'\n\nimport { BlockIcon } from '../../lexical/ui/icons/Block/index.js'\nimport { createClientComponent } from '../createClientComponent.js'\nimport { BlockNode } from './nodes/BlocksNode.js'\nimport { INSERT_BLOCK_COMMAND } from './plugin/commands.js'\nimport { BlocksPlugin } from './plugin/index.js'\n\nexport type BlocksFeatureClientProps = {\n reducedBlocks: ReducedBlock[]\n}\n\nconst BlocksFeatureClient: FeatureProviderProviderClient<BlocksFeatureClientProps> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n nodes: [BlockNode],\n plugins: [\n {\n Component: BlocksPlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n groups: [\n {\n items: props.reducedBlocks.map((block) => {\n return {\n Icon: BlockIcon,\n key: 'block-' + block.slug,\n keywords: ['block', 'blocks', block.slug],\n label: ({ i18n }) => {\n if (!block.labels.singular) {\n return block.slug\n }\n\n return getTranslation(block.labels.singular, i18n)\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_BLOCK_COMMAND, {\n id: null,\n blockName: '',\n blockType: block.slug,\n })\n },\n }\n }),\n key: 'blocks',\n label: ({ i18n }) => {\n return i18n.t('lexical:blocks:label')\n },\n },\n ],\n },\n toolbarFixed: {\n groups: [\n {\n type: 'dropdown',\n ChildComponent: BlockIcon,\n items: props.reducedBlocks.map((block, index) => {\n return {\n ChildComponent: BlockIcon,\n isActive: undefined, // At this point, we would be inside a sub-richtext-editor. And at this point this will be run against the focused sub-editor, not the parent editor which has the actual block. Thus, no point in running this\n key: 'block-' + block.slug,\n label: ({ i18n }) => {\n if (!block.labels.singular) {\n return block.slug\n }\n\n return getTranslation(block.labels.singular, i18n)\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_BLOCK_COMMAND, {\n id: null,\n blockName: '',\n blockType: block.slug,\n })\n },\n order: index,\n }\n }),\n key: 'blocks',\n order: 20,\n },\n ],\n },\n }),\n }\n}\n\nexport const BlocksFeatureClientComponent = createClientComponent(BlocksFeatureClient)\n"],"names":["getTranslation","BlockIcon","createClientComponent","BlockNode","INSERT_BLOCK_COMMAND","BlocksPlugin","BlocksFeatureClient","props","clientFeatureProps","feature","nodes","plugins","Component","position","slashMenu","groups","items","reducedBlocks","map","block","Icon","key","slug","keywords","label","i18n","labels","singular","onSelect","editor","dispatchCommand","id","blockName","blockType","t","toolbarFixed","type","ChildComponent","index","isActive","undefined","order","BlocksFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAIA,SAASA,cAAc,QAAQ,2BAA0B;AAIzD,SAASC,SAAS,QAAQ,wCAAuC;AACjE,SAASC,qBAAqB,QAAQ,8BAA6B;AACnE,SAASC,SAAS,QAAQ,wBAAuB;AACjD,SAASC,oBAAoB,QAAQ,uBAAsB;AAC3D,SAASC,YAAY,QAAQ,oBAAmB;AAMhD,MAAMC,sBAA+E,CAACC;IACpF,OAAO;QACLC,oBAAoBD;QACpBE,SAAS,IAAO,CAAA;gBACdD,oBAAoBD;gBACpBG,OAAO;oBAACP;iBAAU;gBAClBQ,SAAS;oBACP;wBACEC,WAAWP;wBACXQ,UAAU;oBACZ;iBACD;gBACDC,WAAW;oBACTC,QAAQ;wBACN;4BACEC,OAAOT,MAAMU,aAAa,CAACC,GAAG,CAAC,CAACC;gCAC9B,OAAO;oCACLC,MAAMnB;oCACNoB,KAAK,WAAWF,MAAMG,IAAI;oCAC1BC,UAAU;wCAAC;wCAAS;wCAAUJ,MAAMG,IAAI;qCAAC;oCACzCE,OAAO,CAAC,EAAEC,IAAI,EAAE;wCACd,IAAI,CAACN,MAAMO,MAAM,CAACC,QAAQ,EAAE;4CAC1B,OAAOR,MAAMG,IAAI;wCACnB;wCAEA,OAAOtB,eAAemB,MAAMO,MAAM,CAACC,QAAQ,EAAEF;oCAC/C;oCACAG,UAAU,CAAC,EAAEC,MAAM,EAAE;wCACnBA,OAAOC,eAAe,CAAC1B,sBAAsB;4CAC3C2B,IAAI;4CACJC,WAAW;4CACXC,WAAWd,MAAMG,IAAI;wCACvB;oCACF;gCACF;4BACF;4BACAD,KAAK;4BACLG,OAAO,CAAC,EAAEC,IAAI,EAAE;gCACd,OAAOA,KAAKS,CAAC,CAAC;4BAChB;wBACF;qBACD;gBACH;gBACAC,cAAc;oBACZpB,QAAQ;wBACN;4BACEqB,MAAM;4BACNC,gBAAgBpC;4BAChBe,OAAOT,MAAMU,aAAa,CAACC,GAAG,CAAC,CAACC,OAAOmB;gCACrC,OAAO;oCACLD,gBAAgBpC;oCAChBsC,UAAUC;oCACVnB,KAAK,WAAWF,MAAMG,IAAI;oCAC1BE,OAAO,CAAC,EAAEC,IAAI,EAAE;wCACd,IAAI,CAACN,MAAMO,MAAM,CAACC,QAAQ,EAAE;4CAC1B,OAAOR,MAAMG,IAAI;wCACnB;wCAEA,OAAOtB,eAAemB,MAAMO,MAAM,CAACC,QAAQ,EAAEF;oCAC/C;oCACAG,UAAU,CAAC,EAAEC,MAAM,EAAE;wCACnBA,OAAOC,eAAe,CAAC1B,sBAAsB;4CAC3C2B,IAAI;4CACJC,WAAW;4CACXC,WAAWd,MAAMG,IAAI;wCACvB;oCACF;oCACAmB,OAAOH;gCACT;4BACF;4BACAjB,KAAK;4BACLoB,OAAO;wBACT;qBACD;gBACH;YACF,CAAA;IACF;AACF;AAEA,OAAO,MAAMC,+BAA+BxC,sBAAsBI,qBAAoB"}
1
+ {"version":3,"sources":["../../../src/features/blocks/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport type { ReducedBlock } from '@payloadcms/ui/utilities/buildComponentMap'\n\nimport { getTranslation } from '@payloadcms/translations'\n\nimport { BlockIcon } from '../../lexical/ui/icons/Block/index.js'\nimport { createClientFeature } from '../../utilities/createClientFeature.js'\nimport { BlockNode } from './nodes/BlocksNode.js'\nimport { INSERT_BLOCK_COMMAND } from './plugin/commands.js'\nimport { BlocksPlugin } from './plugin/index.js'\n\nexport type BlocksFeatureClientProps = {\n reducedBlocks: ReducedBlock[]\n}\n\nexport const BlocksFeatureClient = createClientFeature<BlocksFeatureClientProps>(({ props }) => ({\n nodes: [BlockNode],\n plugins: [\n {\n Component: BlocksPlugin,\n position: 'normal',\n },\n ],\n sanitizedClientFeatureProps: props,\n slashMenu: {\n groups: [\n {\n items: props.reducedBlocks.map((block) => {\n return {\n Icon: BlockIcon,\n key: 'block-' + block.slug,\n keywords: ['block', 'blocks', block.slug],\n label: ({ i18n }) => {\n if (!block.labels.singular) {\n return block.slug\n }\n\n return getTranslation(block.labels.singular, i18n)\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_BLOCK_COMMAND, {\n id: null,\n blockName: '',\n blockType: block.slug,\n })\n },\n }\n }),\n key: 'blocks',\n label: ({ i18n }) => {\n return i18n.t('lexical:blocks:label')\n },\n },\n ],\n },\n toolbarFixed: {\n groups: [\n {\n type: 'dropdown',\n ChildComponent: BlockIcon,\n items: props.reducedBlocks.map((block, index) => {\n return {\n ChildComponent: BlockIcon,\n isActive: undefined, // At this point, we would be inside a sub-richtext-editor. And at this point this will be run against the focused sub-editor, not the parent editor which has the actual block. Thus, no point in running this\n key: 'block-' + block.slug,\n label: ({ i18n }) => {\n if (!block.labels.singular) {\n return block.slug\n }\n\n return getTranslation(block.labels.singular, i18n)\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_BLOCK_COMMAND, {\n id: null,\n blockName: '',\n blockType: block.slug,\n })\n },\n order: index,\n }\n }),\n key: 'blocks',\n order: 20,\n },\n ],\n },\n}))\n"],"names":["getTranslation","BlockIcon","createClientFeature","BlockNode","INSERT_BLOCK_COMMAND","BlocksPlugin","BlocksFeatureClient","props","nodes","plugins","Component","position","sanitizedClientFeatureProps","slashMenu","groups","items","reducedBlocks","map","block","Icon","key","slug","keywords","label","i18n","labels","singular","onSelect","editor","dispatchCommand","id","blockName","blockType","t","toolbarFixed","type","ChildComponent","index","isActive","undefined","order"],"mappings":"AAAA;AAIA,SAASA,cAAc,QAAQ,2BAA0B;AAEzD,SAASC,SAAS,QAAQ,wCAAuC;AACjE,SAASC,mBAAmB,QAAQ,yCAAwC;AAC5E,SAASC,SAAS,QAAQ,wBAAuB;AACjD,SAASC,oBAAoB,QAAQ,uBAAsB;AAC3D,SAASC,YAAY,QAAQ,oBAAmB;AAMhD,OAAO,MAAMC,sBAAsBJ,oBAA8C,CAAC,EAAEK,KAAK,EAAE,GAAM,CAAA;QAC/FC,OAAO;YAACL;SAAU;QAClBM,SAAS;YACP;gBACEC,WAAWL;gBACXM,UAAU;YACZ;SACD;QACDC,6BAA6BL;QAC7BM,WAAW;YACTC,QAAQ;gBACN;oBACEC,OAAOR,MAAMS,aAAa,CAACC,GAAG,CAAC,CAACC;wBAC9B,OAAO;4BACLC,MAAMlB;4BACNmB,KAAK,WAAWF,MAAMG,IAAI;4BAC1BC,UAAU;gCAAC;gCAAS;gCAAUJ,MAAMG,IAAI;6BAAC;4BACzCE,OAAO,CAAC,EAAEC,IAAI,EAAE;gCACd,IAAI,CAACN,MAAMO,MAAM,CAACC,QAAQ,EAAE;oCAC1B,OAAOR,MAAMG,IAAI;gCACnB;gCAEA,OAAOrB,eAAekB,MAAMO,MAAM,CAACC,QAAQ,EAAEF;4BAC/C;4BACAG,UAAU,CAAC,EAAEC,MAAM,EAAE;gCACnBA,OAAOC,eAAe,CAACzB,sBAAsB;oCAC3C0B,IAAI;oCACJC,WAAW;oCACXC,WAAWd,MAAMG,IAAI;gCACvB;4BACF;wBACF;oBACF;oBACAD,KAAK;oBACLG,OAAO,CAAC,EAAEC,IAAI,EAAE;wBACd,OAAOA,KAAKS,CAAC,CAAC;oBAChB;gBACF;aACD;QACH;QACAC,cAAc;YACZpB,QAAQ;gBACN;oBACEqB,MAAM;oBACNC,gBAAgBnC;oBAChBc,OAAOR,MAAMS,aAAa,CAACC,GAAG,CAAC,CAACC,OAAOmB;wBACrC,OAAO;4BACLD,gBAAgBnC;4BAChBqC,UAAUC;4BACVnB,KAAK,WAAWF,MAAMG,IAAI;4BAC1BE,OAAO,CAAC,EAAEC,IAAI,EAAE;gCACd,IAAI,CAACN,MAAMO,MAAM,CAACC,QAAQ,EAAE;oCAC1B,OAAOR,MAAMG,IAAI;gCACnB;gCAEA,OAAOrB,eAAekB,MAAMO,MAAM,CAACC,QAAQ,EAAEF;4BAC/C;4BACAG,UAAU,CAAC,EAAEC,MAAM,EAAE;gCACnBA,OAAOC,eAAe,CAACzB,sBAAsB;oCAC3C0B,IAAI;oCACJC,WAAW;oCACXC,WAAWd,MAAMG,IAAI;gCACvB;4BACF;4BACAmB,OAAOH;wBACT;oBACF;oBACAjB,KAAK;oBACLoB,OAAO;gBACT;aACD;QACH;IACF,CAAA,GAAG"}
@@ -1,8 +1,7 @@
1
1
  import type { Block } from 'payload';
2
- import type { FeatureProviderProviderServer } from '../types.js';
3
2
  import type { BlocksFeatureClientProps } from './feature.client.js';
4
3
  export type BlocksFeatureProps = {
5
4
  blocks: Block[];
6
5
  };
7
- export declare const BlocksFeature: FeatureProviderProviderServer<BlocksFeatureProps, BlocksFeatureClientProps>;
6
+ export declare const BlocksFeature: import("../typesServer.js").FeatureProviderProviderServer<BlocksFeatureProps, BlocksFeatureProps, BlocksFeatureClientProps>;
8
7
  //# sourceMappingURL=feature.server.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../src/features/blocks/feature.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAA6B,MAAM,SAAS,CAAA;AAK/D,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAA;AAChE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAA;AAUnE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,KAAK,EAAE,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,6BAA6B,CACvD,kBAAkB,EAClB,wBAAwB,CAiHzB,CAAA"}
1
+ {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../src/features/blocks/feature.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAA6B,MAAM,SAAS,CAAA;AAK/D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAA;AAWnE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,KAAK,EAAE,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,aAAa,6HAiHxB,CAAA"}