@payloadcms/richtext-lexical 3.0.0-beta.3 → 3.0.0-beta.31

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 (666) hide show
  1. package/dist/cell/index.d.ts +1 -1
  2. package/dist/cell/index.d.ts.map +1 -1
  3. package/dist/cell/index.js +2 -4
  4. package/dist/cell/index.js.map +1 -1
  5. package/dist/exports/components.d.ts +8 -2
  6. package/dist/exports/components.d.ts.map +1 -1
  7. package/dist/exports/components.js +8 -2
  8. package/dist/exports/components.js.map +1 -1
  9. package/dist/field/Field.d.ts +0 -2
  10. package/dist/field/Field.d.ts.map +1 -1
  11. package/dist/field/Field.js.map +1 -1
  12. package/dist/field/features/align/feature.client.d.ts +4 -1
  13. package/dist/field/features/align/feature.client.d.ts.map +1 -1
  14. package/dist/field/features/align/feature.client.js +127 -54
  15. package/dist/field/features/align/feature.client.js.map +1 -1
  16. package/dist/field/features/align/toolbarAlignGroup.d.ts +3 -0
  17. package/dist/field/features/align/toolbarAlignGroup.d.ts.map +1 -0
  18. package/dist/field/features/align/toolbarAlignGroup.js +12 -0
  19. package/dist/field/features/align/toolbarAlignGroup.js.map +1 -0
  20. package/dist/field/features/blockquote/feature.client.d.ts +4 -1
  21. package/dist/field/features/blockquote/feature.client.d.ts.map +1 -1
  22. package/dist/field/features/blockquote/feature.client.js +53 -40
  23. package/dist/field/features/blockquote/feature.client.js.map +1 -1
  24. package/dist/field/features/blockquote/feature.server.d.ts +1 -1
  25. package/dist/field/features/blockquote/feature.server.d.ts.map +1 -1
  26. package/dist/field/features/blockquote/feature.server.js +7 -7
  27. package/dist/field/features/blockquote/feature.server.js.map +1 -1
  28. package/dist/field/features/blockquote/markdownTransformer.d.ts.map +1 -1
  29. package/dist/field/features/blockquote/markdownTransformer.js +2 -4
  30. package/dist/field/features/blockquote/markdownTransformer.js.map +1 -1
  31. package/dist/field/features/blocks/component/BlockContent.d.ts.map +1 -1
  32. package/dist/field/features/blocks/component/BlockContent.js +3 -5
  33. package/dist/field/features/blocks/component/BlockContent.js.map +1 -1
  34. package/dist/field/features/blocks/component/index.d.ts.map +1 -1
  35. package/dist/field/features/blocks/component/index.js +37 -4
  36. package/dist/field/features/blocks/component/index.js.map +1 -1
  37. package/dist/field/features/blocks/drawer/index.d.ts.map +1 -1
  38. package/dist/field/features/blocks/drawer/index.js +2 -4
  39. package/dist/field/features/blocks/drawer/index.js.map +1 -1
  40. package/dist/field/features/blocks/feature.client.d.ts +4 -1
  41. package/dist/field/features/blocks/feature.client.d.ts.map +1 -1
  42. package/dist/field/features/blocks/feature.client.js +56 -27
  43. package/dist/field/features/blocks/feature.client.js.map +1 -1
  44. package/dist/field/features/blocks/feature.server.d.ts +2 -5
  45. package/dist/field/features/blocks/feature.server.d.ts.map +1 -1
  46. package/dist/field/features/blocks/feature.server.js +109 -77
  47. package/dist/field/features/blocks/feature.server.js.map +1 -1
  48. package/dist/field/features/blocks/nodes/BlocksNode.d.ts +1 -3
  49. package/dist/field/features/blocks/nodes/BlocksNode.d.ts.map +1 -1
  50. package/dist/field/features/blocks/nodes/BlocksNode.js +1 -2
  51. package/dist/field/features/blocks/nodes/BlocksNode.js.map +1 -1
  52. package/dist/field/features/blocks/plugin/commands.d.ts.map +1 -1
  53. package/dist/field/features/blocks/plugin/commands.js +1 -2
  54. package/dist/field/features/blocks/plugin/commands.js.map +1 -1
  55. package/dist/field/features/blocks/plugin/index.d.ts +3 -2
  56. package/dist/field/features/blocks/plugin/index.d.ts.map +1 -1
  57. package/dist/field/features/blocks/plugin/index.js +5 -8
  58. package/dist/field/features/blocks/plugin/index.js.map +1 -1
  59. package/dist/field/features/blocks/populationPromise.d.ts.map +1 -1
  60. package/dist/field/features/blocks/populationPromise.js +4 -18
  61. package/dist/field/features/blocks/populationPromise.js.map +1 -1
  62. package/dist/field/features/blocks/validate.d.ts.map +1 -1
  63. package/dist/field/features/blocks/validate.js +22 -36
  64. package/dist/field/features/blocks/validate.js.map +1 -1
  65. package/dist/field/features/converters/html/field/index.d.ts +8 -2
  66. package/dist/field/features/converters/html/field/index.d.ts.map +1 -1
  67. package/dist/field/features/converters/html/field/index.js +6 -3
  68. package/dist/field/features/converters/html/field/index.js.map +1 -1
  69. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.d.ts +4 -1
  70. package/dist/field/features/debug/testRecorder/feature.client.d.ts.map +1 -0
  71. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.js.map +1 -1
  72. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.d.ts.map +1 -1
  73. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.js +1 -1
  74. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.js.map +1 -1
  75. package/dist/field/features/debug/testRecorder/plugin/index.d.ts +5 -0
  76. package/dist/field/features/debug/testRecorder/plugin/index.d.ts.map +1 -0
  77. package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.js +2 -4
  78. package/dist/field/features/debug/testRecorder/plugin/index.js.map +1 -0
  79. package/dist/field/features/debug/{treeview → treeView}/feature.client.d.ts +4 -1
  80. package/dist/field/features/debug/treeView/feature.client.d.ts.map +1 -0
  81. package/dist/field/features/debug/{treeview → treeView}/feature.client.js.map +1 -1
  82. package/dist/field/features/debug/{treeview → treeView}/feature.server.d.ts.map +1 -1
  83. package/dist/field/features/debug/{treeview → treeView}/feature.server.js +1 -1
  84. package/dist/field/features/debug/{treeview → treeView}/feature.server.js.map +1 -1
  85. package/dist/field/features/debug/treeView/plugin/index.d.ts +4 -0
  86. package/dist/field/features/debug/treeView/plugin/index.d.ts.map +1 -0
  87. package/dist/field/features/debug/{treeview → treeView}/plugin/index.js +4 -6
  88. package/dist/field/features/debug/treeView/plugin/index.js.map +1 -0
  89. package/dist/field/features/format/bold/feature.client.d.ts +4 -1
  90. package/dist/field/features/format/bold/feature.client.d.ts.map +1 -1
  91. package/dist/field/features/format/bold/feature.client.js +26 -23
  92. package/dist/field/features/format/bold/feature.client.js.map +1 -1
  93. package/dist/field/features/format/{inlinecode → inlineCode}/feature.client.d.ts +4 -1
  94. package/dist/field/features/format/inlineCode/feature.client.d.ts.map +1 -0
  95. package/dist/field/features/format/inlineCode/feature.client.js +46 -0
  96. package/dist/field/features/format/inlineCode/feature.client.js.map +1 -0
  97. package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.d.ts.map +1 -1
  98. package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.js +1 -1
  99. package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.js.map +1 -1
  100. package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.d.ts.map +1 -1
  101. package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.js.map +1 -1
  102. package/dist/field/features/format/italic/feature.client.d.ts +4 -1
  103. package/dist/field/features/format/italic/feature.client.d.ts.map +1 -1
  104. package/dist/field/features/format/italic/feature.client.js +27 -24
  105. package/dist/field/features/format/italic/feature.client.js.map +1 -1
  106. package/dist/field/features/format/shared/toolbarFormatGroup.d.ts +3 -0
  107. package/dist/field/features/format/shared/toolbarFormatGroup.d.ts.map +1 -0
  108. package/dist/field/features/format/shared/toolbarFormatGroup.js +10 -0
  109. package/dist/field/features/format/shared/toolbarFormatGroup.js.map +1 -0
  110. package/dist/field/features/format/strikethrough/feature.client.d.ts +4 -1
  111. package/dist/field/features/format/strikethrough/feature.client.d.ts.map +1 -1
  112. package/dist/field/features/format/strikethrough/feature.client.js +27 -24
  113. package/dist/field/features/format/strikethrough/feature.client.js.map +1 -1
  114. package/dist/field/features/format/subscript/feature.client.d.ts +4 -1
  115. package/dist/field/features/format/subscript/feature.client.d.ts.map +1 -1
  116. package/dist/field/features/format/subscript/feature.client.js +25 -22
  117. package/dist/field/features/format/subscript/feature.client.js.map +1 -1
  118. package/dist/field/features/format/superscript/feature.client.d.ts +4 -1
  119. package/dist/field/features/format/superscript/feature.client.d.ts.map +1 -1
  120. package/dist/field/features/format/superscript/feature.client.js +25 -22
  121. package/dist/field/features/format/superscript/feature.client.js.map +1 -1
  122. package/dist/field/features/format/underline/feature.client.d.ts +4 -1
  123. package/dist/field/features/format/underline/feature.client.d.ts.map +1 -1
  124. package/dist/field/features/format/underline/feature.client.js +25 -22
  125. package/dist/field/features/format/underline/feature.client.js.map +1 -1
  126. package/dist/field/features/heading/feature.client.d.ts +4 -1
  127. package/dist/field/features/heading/feature.client.d.ts.map +1 -1
  128. package/dist/field/features/heading/feature.client.js +71 -54
  129. package/dist/field/features/heading/feature.client.js.map +1 -1
  130. package/dist/field/features/heading/feature.server.d.ts.map +1 -1
  131. package/dist/field/features/heading/feature.server.js +5 -5
  132. package/dist/field/features/heading/feature.server.js.map +1 -1
  133. package/dist/field/features/heading/markdownTransformer.d.ts.map +1 -1
  134. package/dist/field/features/heading/markdownTransformer.js +1 -2
  135. package/dist/field/features/heading/markdownTransformer.js.map +1 -1
  136. package/dist/field/features/horizontalRule/component/index.d.ts +10 -0
  137. package/dist/field/features/horizontalRule/component/index.d.ts.map +1 -0
  138. package/dist/field/features/horizontalRule/component/index.js +62 -0
  139. package/dist/field/features/horizontalRule/component/index.js.map +1 -0
  140. package/dist/field/features/horizontalRule/feature.client.d.ts +6 -0
  141. package/dist/field/features/horizontalRule/feature.client.d.ts.map +1 -0
  142. package/dist/field/features/horizontalRule/feature.client.js +76 -0
  143. package/dist/field/features/horizontalRule/feature.client.js.map +1 -0
  144. package/dist/field/features/horizontalRule/feature.server.d.ts +3 -0
  145. package/dist/field/features/horizontalRule/feature.server.d.ts.map +1 -0
  146. package/dist/field/features/horizontalRule/feature.server.js +36 -0
  147. package/dist/field/features/horizontalRule/feature.server.js.map +1 -0
  148. package/dist/field/features/horizontalRule/markdownTransformer.d.ts +3 -0
  149. package/dist/field/features/horizontalRule/markdownTransformer.d.ts.map +1 -0
  150. package/dist/field/features/horizontalRule/markdownTransformer.js +23 -0
  151. package/dist/field/features/horizontalRule/markdownTransformer.js.map +1 -0
  152. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.d.ts +53 -0
  153. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.d.ts.map +1 -0
  154. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.js +88 -0
  155. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.js.map +1 -0
  156. package/dist/field/features/horizontalRule/plugin/index.d.ts +7 -0
  157. package/dist/field/features/horizontalRule/plugin/index.d.ts.map +1 -0
  158. package/dist/field/features/horizontalRule/plugin/index.js +31 -0
  159. package/dist/field/features/horizontalRule/plugin/index.js.map +1 -0
  160. package/dist/field/features/horizontalRule/plugin/index.scss +20 -0
  161. package/dist/field/features/indent/feature.client.d.ts +4 -1
  162. package/dist/field/features/indent/feature.client.d.ts.map +1 -1
  163. package/dist/field/features/indent/feature.client.js +43 -42
  164. package/dist/field/features/indent/feature.client.js.map +1 -1
  165. package/dist/field/features/indent/toolbarIndentGroup.d.ts +3 -0
  166. package/dist/field/features/indent/toolbarIndentGroup.d.ts.map +1 -0
  167. package/dist/field/features/indent/toolbarIndentGroup.js +10 -0
  168. package/dist/field/features/indent/toolbarIndentGroup.js.map +1 -0
  169. package/dist/field/features/link/drawer/baseFields.d.ts +2 -2
  170. package/dist/field/features/link/drawer/baseFields.d.ts.map +1 -1
  171. package/dist/field/features/link/drawer/baseFields.js +30 -43
  172. package/dist/field/features/link/drawer/baseFields.js.map +1 -1
  173. package/dist/field/features/link/drawer/index.js +3 -2
  174. package/dist/field/features/link/drawer/index.js.map +1 -1
  175. package/dist/field/features/link/drawer/types.d.ts +4 -2
  176. package/dist/field/features/link/drawer/types.d.ts.map +1 -1
  177. package/dist/field/features/link/drawer/types.js.map +1 -1
  178. package/dist/field/features/link/feature.client.d.ts +13 -1
  179. package/dist/field/features/link/feature.client.d.ts.map +1 -1
  180. package/dist/field/features/link/feature.client.js +59 -47
  181. package/dist/field/features/link/feature.client.js.map +1 -1
  182. package/dist/field/features/link/feature.server.d.ts +10 -5
  183. package/dist/field/features/link/feature.server.d.ts.map +1 -1
  184. package/dist/field/features/link/feature.server.js +48 -9
  185. package/dist/field/features/link/feature.server.js.map +1 -1
  186. package/dist/field/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  187. package/dist/field/features/link/nodes/AutoLinkNode.js +1 -2
  188. package/dist/field/features/link/nodes/AutoLinkNode.js.map +1 -1
  189. package/dist/field/features/link/nodes/LinkNode.d.ts +1 -3
  190. package/dist/field/features/link/nodes/LinkNode.d.ts.map +1 -1
  191. package/dist/field/features/link/nodes/LinkNode.js +2 -4
  192. package/dist/field/features/link/nodes/LinkNode.js.map +1 -1
  193. package/dist/field/features/link/plugins/autoLink/index.d.ts +3 -2
  194. package/dist/field/features/link/plugins/autoLink/index.d.ts.map +1 -1
  195. package/dist/field/features/link/plugins/autoLink/index.js +5 -8
  196. package/dist/field/features/link/plugins/autoLink/index.js.map +1 -1
  197. package/dist/field/features/link/plugins/clickableLink/index.d.ts +3 -2
  198. package/dist/field/features/link/plugins/clickableLink/index.d.ts.map +1 -1
  199. package/dist/field/features/link/plugins/clickableLink/index.js +2 -2
  200. package/dist/field/features/link/plugins/clickableLink/index.js.map +1 -1
  201. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +1 -1
  202. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js +1 -2
  203. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -1
  204. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  205. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js +93 -69
  206. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  207. package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts +3 -4
  208. package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts.map +1 -1
  209. package/dist/field/features/link/plugins/floatingLinkEditor/index.js.map +1 -1
  210. package/dist/field/features/link/plugins/floatingLinkEditor/index.scss +11 -3
  211. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts +1 -3
  212. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +1 -1
  213. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js +12 -30
  214. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js.map +1 -1
  215. package/dist/field/features/link/plugins/link/index.d.ts +3 -1
  216. package/dist/field/features/link/plugins/link/index.d.ts.map +1 -1
  217. package/dist/field/features/link/plugins/link/index.js +5 -14
  218. package/dist/field/features/link/plugins/link/index.js.map +1 -1
  219. package/dist/field/features/link/populationPromise.d.ts.map +1 -1
  220. package/dist/field/features/link/populationPromise.js +10 -25
  221. package/dist/field/features/link/populationPromise.js.map +1 -1
  222. package/dist/field/features/link/validate.d.ts +5 -0
  223. package/dist/field/features/link/validate.d.ts.map +1 -0
  224. package/dist/field/features/link/validate.js +32 -0
  225. package/dist/field/features/link/validate.js.map +1 -0
  226. package/dist/field/features/lists/checklist/feature.client.d.ts +4 -1
  227. package/dist/field/features/lists/checklist/feature.client.d.ts.map +1 -1
  228. package/dist/field/features/lists/checklist/feature.client.js +56 -32
  229. package/dist/field/features/lists/checklist/feature.client.js.map +1 -1
  230. package/dist/field/features/lists/checklist/feature.server.d.ts +1 -1
  231. package/dist/field/features/lists/checklist/feature.server.d.ts.map +1 -1
  232. package/dist/field/features/lists/checklist/feature.server.js +10 -10
  233. package/dist/field/features/lists/checklist/feature.server.js.map +1 -1
  234. package/dist/field/features/lists/checklist/markdownTransformers.d.ts.map +1 -1
  235. package/dist/field/features/lists/checklist/markdownTransformers.js +2 -3
  236. package/dist/field/features/lists/checklist/markdownTransformers.js.map +1 -1
  237. package/dist/field/features/lists/checklist/plugin/index.d.ts +2 -2
  238. package/dist/field/features/lists/checklist/plugin/index.d.ts.map +1 -1
  239. package/dist/field/features/lists/checklist/plugin/index.js +3 -4
  240. package/dist/field/features/lists/checklist/plugin/index.js.map +1 -1
  241. package/dist/field/features/lists/htmlConverter.d.ts.map +1 -1
  242. package/dist/field/features/lists/htmlConverter.js +13 -6
  243. package/dist/field/features/lists/htmlConverter.js.map +1 -1
  244. package/dist/field/features/lists/{orderedlist → orderedList}/feature.client.d.ts +4 -1
  245. package/dist/field/features/lists/orderedList/feature.client.d.ts.map +1 -0
  246. package/dist/field/features/lists/orderedList/feature.client.js +96 -0
  247. package/dist/field/features/lists/orderedList/feature.client.js.map +1 -0
  248. package/dist/field/features/lists/orderedList/feature.server.d.ts.map +1 -0
  249. package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.js +7 -7
  250. package/dist/field/features/lists/orderedList/feature.server.js.map +1 -0
  251. package/dist/field/features/lists/orderedList/markdownTransformer.d.ts.map +1 -0
  252. package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.js +2 -3
  253. package/dist/field/features/lists/orderedList/markdownTransformer.js.map +1 -0
  254. package/dist/field/features/lists/plugin/index.d.ts +2 -2
  255. package/dist/field/features/lists/plugin/index.d.ts.map +1 -1
  256. package/dist/field/features/lists/plugin/index.js +3 -4
  257. package/dist/field/features/lists/plugin/index.js.map +1 -1
  258. package/dist/field/features/lists/{common → shared}/markdown.d.ts.map +1 -1
  259. package/dist/field/features/lists/{common → shared}/markdown.js +1 -2
  260. package/dist/field/features/lists/shared/markdown.js.map +1 -0
  261. package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.client.d.ts +4 -1
  262. package/dist/field/features/lists/unorderedList/feature.client.d.ts.map +1 -0
  263. package/dist/field/features/lists/unorderedList/feature.client.js +96 -0
  264. package/dist/field/features/lists/unorderedList/feature.client.js.map +1 -0
  265. package/dist/field/features/lists/unorderedList/feature.server.d.ts.map +1 -0
  266. package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.js +7 -7
  267. package/dist/field/features/lists/unorderedList/feature.server.js.map +1 -0
  268. package/dist/field/features/lists/unorderedList/markdownTransformer.d.ts.map +1 -0
  269. package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.js +2 -3
  270. package/dist/field/features/lists/unorderedList/markdownTransformer.js.map +1 -0
  271. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +1 -1
  272. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +2 -4
  273. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -1
  274. package/dist/field/features/migrations/lexicalPluginToLexical/feature.client.d.ts +4 -1
  275. package/dist/field/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +1 -1
  276. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +1 -3
  277. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
  278. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +2 -4
  279. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  280. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts +1 -1
  281. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js +1 -1
  282. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js.map +1 -1
  283. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js +2 -2
  284. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js.map +1 -1
  285. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +1 -1
  286. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.js +2 -4
  287. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -1
  288. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +1 -1
  289. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.js +2 -4
  290. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -1
  291. package/dist/field/features/migrations/slateToLexical/converter/index.d.ts.map +1 -1
  292. package/dist/field/features/migrations/slateToLexical/converter/index.js +2 -1
  293. package/dist/field/features/migrations/slateToLexical/converter/index.js.map +1 -1
  294. package/dist/field/features/migrations/slateToLexical/feature.client.d.ts +4 -1
  295. package/dist/field/features/migrations/slateToLexical/feature.client.d.ts.map +1 -1
  296. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +1 -3
  297. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
  298. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +2 -4
  299. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  300. package/dist/field/features/paragraph/feature.client.d.ts +4 -1
  301. package/dist/field/features/paragraph/feature.client.d.ts.map +1 -1
  302. package/dist/field/features/paragraph/feature.client.js +45 -33
  303. package/dist/field/features/paragraph/feature.client.js.map +1 -1
  304. package/dist/field/features/relationship/drawer/commands.d.ts.map +1 -1
  305. package/dist/field/features/relationship/drawer/commands.js +1 -2
  306. package/dist/field/features/relationship/drawer/commands.js.map +1 -1
  307. package/dist/field/features/relationship/drawer/index.d.ts.map +1 -1
  308. package/dist/field/features/relationship/drawer/index.js +7 -13
  309. package/dist/field/features/relationship/drawer/index.js.map +1 -1
  310. package/dist/field/features/relationship/feature.client.d.ts +17 -2
  311. package/dist/field/features/relationship/feature.client.d.ts.map +1 -1
  312. package/dist/field/features/relationship/feature.client.js +37 -15
  313. package/dist/field/features/relationship/feature.client.js.map +1 -1
  314. package/dist/field/features/relationship/feature.server.d.ts +10 -1
  315. package/dist/field/features/relationship/feature.server.d.ts.map +1 -1
  316. package/dist/field/features/relationship/feature.server.js +5 -4
  317. package/dist/field/features/relationship/feature.server.js.map +1 -1
  318. package/dist/field/features/relationship/nodes/RelationshipNode.d.ts +3 -8
  319. package/dist/field/features/relationship/nodes/RelationshipNode.d.ts.map +1 -1
  320. package/dist/field/features/relationship/nodes/RelationshipNode.js +8 -8
  321. package/dist/field/features/relationship/nodes/RelationshipNode.js.map +1 -1
  322. package/dist/field/features/relationship/nodes/components/RelationshipComponent.d.ts.map +1 -1
  323. package/dist/field/features/relationship/nodes/components/RelationshipComponent.js +56 -7
  324. package/dist/field/features/relationship/nodes/components/RelationshipComponent.js.map +1 -1
  325. package/dist/field/features/relationship/plugins/index.d.ts +2 -2
  326. package/dist/field/features/relationship/plugins/index.d.ts.map +1 -1
  327. package/dist/field/features/relationship/plugins/index.js +9 -12
  328. package/dist/field/features/relationship/plugins/index.js.map +1 -1
  329. package/dist/field/features/relationship/populationPromise.d.ts +2 -1
  330. package/dist/field/features/relationship/populationPromise.d.ts.map +1 -1
  331. package/dist/field/features/relationship/populationPromise.js +25 -19
  332. package/dist/field/features/relationship/populationPromise.js.map +1 -1
  333. package/dist/field/features/shared/toolbar/addDropdownGroup.d.ts +3 -0
  334. package/dist/field/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -0
  335. package/dist/field/features/shared/toolbar/addDropdownGroup.js +12 -0
  336. package/dist/field/features/shared/toolbar/addDropdownGroup.js.map +1 -0
  337. package/dist/field/features/shared/toolbar/featureButtonsGroup.d.ts +3 -0
  338. package/dist/field/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -0
  339. package/dist/field/features/shared/toolbar/featureButtonsGroup.js +10 -0
  340. package/dist/field/features/shared/toolbar/featureButtonsGroup.js.map +1 -0
  341. package/dist/field/features/shared/toolbar/textDropdownGroup.d.ts +3 -0
  342. package/dist/field/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -0
  343. package/dist/field/features/shared/toolbar/textDropdownGroup.js +12 -0
  344. package/dist/field/features/shared/toolbar/textDropdownGroup.js.map +1 -0
  345. package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts +4 -0
  346. package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts.map +1 -0
  347. package/dist/field/features/toolbars/fixed/Toolbar/index.js +152 -0
  348. package/dist/field/features/toolbars/fixed/Toolbar/index.js.map +1 -0
  349. package/dist/field/features/toolbars/fixed/Toolbar/index.scss +91 -0
  350. package/dist/field/features/toolbars/fixed/feature.client.d.ts +6 -0
  351. package/dist/field/features/toolbars/fixed/feature.client.d.ts.map +1 -0
  352. package/dist/field/features/toolbars/fixed/feature.client.js +20 -0
  353. package/dist/field/features/toolbars/fixed/feature.client.js.map +1 -0
  354. package/dist/field/features/toolbars/fixed/feature.server.d.ts +3 -0
  355. package/dist/field/features/toolbars/fixed/feature.server.d.ts.map +1 -0
  356. package/dist/field/features/toolbars/fixed/feature.server.js +15 -0
  357. package/dist/field/features/toolbars/fixed/feature.server.js.map +1 -0
  358. package/dist/field/features/toolbars/inline/Toolbar/index.d.ts +4 -0
  359. package/dist/field/features/toolbars/inline/Toolbar/index.d.ts.map +1 -0
  360. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/inline/Toolbar}/index.js +112 -70
  361. package/dist/field/features/toolbars/inline/Toolbar/index.js.map +1 -0
  362. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/inline/Toolbar}/index.scss +7 -11
  363. package/dist/field/features/toolbars/inline/feature.client.d.ts +6 -0
  364. package/dist/field/features/toolbars/inline/feature.client.d.ts.map +1 -0
  365. package/dist/field/features/toolbars/inline/feature.client.js +20 -0
  366. package/dist/field/features/toolbars/inline/feature.client.js.map +1 -0
  367. package/dist/field/features/toolbars/inline/feature.server.d.ts +3 -0
  368. package/dist/field/features/toolbars/inline/feature.server.d.ts.map +1 -0
  369. package/dist/field/features/toolbars/inline/feature.server.js +15 -0
  370. package/dist/field/features/toolbars/inline/feature.server.js.map +1 -0
  371. package/dist/field/features/toolbars/shared/ToolbarButton/index.d.ts +10 -0
  372. package/dist/field/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -0
  373. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarButton/index.js +29 -19
  374. package/dist/field/features/toolbars/shared/ToolbarButton/index.js.map +1 -0
  375. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarButton/index.scss +3 -1
  376. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts +23 -0
  377. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -0
  378. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarDropdown/DropDown.js +27 -72
  379. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -0
  380. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.d.ts +23 -0
  381. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -0
  382. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js +139 -0
  383. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -0
  384. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarDropdown/index.scss +25 -13
  385. package/dist/field/features/toolbars/types.d.ts +48 -0
  386. package/dist/field/features/toolbars/types.d.ts.map +1 -0
  387. package/dist/field/features/toolbars/types.js.map +1 -0
  388. package/dist/field/features/typeUtilities.d.ts +8 -0
  389. package/dist/field/features/typeUtilities.d.ts.map +1 -0
  390. package/dist/field/features/typeUtilities.js +8 -0
  391. package/dist/field/features/typeUtilities.js.map +1 -0
  392. package/dist/field/features/types.d.ts +136 -62
  393. package/dist/field/features/types.d.ts.map +1 -1
  394. package/dist/field/features/types.js.map +1 -1
  395. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.d.ts.map +1 -1
  396. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js +5 -6
  397. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js.map +1 -1
  398. package/dist/field/features/upload/component/index.d.ts.map +1 -1
  399. package/dist/field/features/upload/component/index.js +59 -9
  400. package/dist/field/features/upload/component/index.js.map +1 -1
  401. package/dist/field/features/upload/drawer/commands.d.ts.map +1 -1
  402. package/dist/field/features/upload/drawer/commands.js +1 -2
  403. package/dist/field/features/upload/drawer/commands.js.map +1 -1
  404. package/dist/field/features/upload/drawer/index.d.ts.map +1 -1
  405. package/dist/field/features/upload/drawer/index.js +8 -12
  406. package/dist/field/features/upload/drawer/index.js.map +1 -1
  407. package/dist/field/features/upload/feature.client.d.ts +4 -1
  408. package/dist/field/features/upload/feature.client.d.ts.map +1 -1
  409. package/dist/field/features/upload/feature.client.js +35 -10
  410. package/dist/field/features/upload/feature.client.js.map +1 -1
  411. package/dist/field/features/upload/feature.server.d.ts +10 -3
  412. package/dist/field/features/upload/feature.server.d.ts.map +1 -1
  413. package/dist/field/features/upload/feature.server.js +39 -11
  414. package/dist/field/features/upload/feature.server.js.map +1 -1
  415. package/dist/field/features/upload/nodes/UploadNode.d.ts +2 -14
  416. package/dist/field/features/upload/nodes/UploadNode.d.ts.map +1 -1
  417. package/dist/field/features/upload/nodes/UploadNode.js +24 -11
  418. package/dist/field/features/upload/nodes/UploadNode.js.map +1 -1
  419. package/dist/field/features/upload/plugin/index.d.ts +5 -4
  420. package/dist/field/features/upload/plugin/index.d.ts.map +1 -1
  421. package/dist/field/features/upload/plugin/index.js +6 -11
  422. package/dist/field/features/upload/plugin/index.js.map +1 -1
  423. package/dist/field/features/upload/populationPromise.d.ts.map +1 -1
  424. package/dist/field/features/upload/populationPromise.js +15 -9
  425. package/dist/field/features/upload/populationPromise.js.map +1 -1
  426. package/dist/field/features/upload/validate.d.ts +2 -1
  427. package/dist/field/features/upload/validate.d.ts.map +1 -1
  428. package/dist/field/features/upload/validate.js +37 -12
  429. package/dist/field/features/upload/validate.js.map +1 -1
  430. package/dist/field/index.d.ts +1 -1
  431. package/dist/field/index.d.ts.map +1 -1
  432. package/dist/field/index.js.map +1 -1
  433. package/dist/field/index.scss +4 -0
  434. package/dist/field/lexical/EditorFocusProvider.d.ts +20 -0
  435. package/dist/field/lexical/EditorFocusProvider.d.ts.map +1 -0
  436. package/dist/field/lexical/EditorFocusProvider.js +78 -0
  437. package/dist/field/lexical/EditorFocusProvider.js.map +1 -0
  438. package/dist/field/lexical/EditorPlugin.d.ts +1 -0
  439. package/dist/field/lexical/EditorPlugin.d.ts.map +1 -1
  440. package/dist/field/lexical/EditorPlugin.js +6 -3
  441. package/dist/field/lexical/EditorPlugin.js.map +1 -1
  442. package/dist/field/lexical/LexicalEditor.d.ts.map +1 -1
  443. package/dist/field/lexical/LexicalEditor.js +31 -15
  444. package/dist/field/lexical/LexicalEditor.js.map +1 -1
  445. package/dist/field/lexical/LexicalEditor.scss +3 -19
  446. package/dist/field/lexical/LexicalProvider.d.ts +1 -1
  447. package/dist/field/lexical/LexicalProvider.d.ts.map +1 -1
  448. package/dist/field/lexical/LexicalProvider.js +4 -4
  449. package/dist/field/lexical/LexicalProvider.js.map +1 -1
  450. package/dist/field/lexical/config/client/EditorConfigProvider.d.ts +2 -3
  451. package/dist/field/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  452. package/dist/field/lexical/config/client/EditorConfigProvider.js.map +1 -1
  453. package/dist/field/lexical/config/client/default.d.ts +1 -1
  454. package/dist/field/lexical/config/client/default.d.ts.map +1 -1
  455. package/dist/field/lexical/config/client/default.js.map +1 -1
  456. package/dist/field/lexical/config/client/sanitize.d.ts +1 -1
  457. package/dist/field/lexical/config/client/sanitize.d.ts.map +1 -1
  458. package/dist/field/lexical/config/client/sanitize.js +81 -32
  459. package/dist/field/lexical/config/client/sanitize.js.map +1 -1
  460. package/dist/field/lexical/config/server/default.d.ts +2 -3
  461. package/dist/field/lexical/config/server/default.d.ts.map +1 -1
  462. package/dist/field/lexical/config/server/default.js +12 -10
  463. package/dist/field/lexical/config/server/default.js.map +1 -1
  464. package/dist/field/lexical/config/server/loader.d.ts +5 -2
  465. package/dist/field/lexical/config/server/loader.d.ts.map +1 -1
  466. package/dist/field/lexical/config/server/loader.js +4 -2
  467. package/dist/field/lexical/config/server/loader.js.map +1 -1
  468. package/dist/field/lexical/config/server/sanitize.d.ts +2 -1
  469. package/dist/field/lexical/config/server/sanitize.d.ts.map +1 -1
  470. package/dist/field/lexical/config/server/sanitize.js +23 -8
  471. package/dist/field/lexical/config/server/sanitize.js.map +1 -1
  472. package/dist/field/lexical/config/types.d.ts +1 -1
  473. package/dist/field/lexical/config/types.d.ts.map +1 -1
  474. package/dist/field/lexical/config/types.js.map +1 -1
  475. package/dist/field/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
  476. package/dist/field/lexical/plugins/MarkdownShortcut/index.js +1 -2
  477. package/dist/field/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  478. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +9 -9
  479. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  480. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +74 -77
  481. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  482. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts +4 -4
  483. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts.map +1 -1
  484. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +6 -9
  485. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
  486. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +19 -27
  487. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
  488. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js +1 -37
  489. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  490. package/dist/field/lexical/plugins/SlashMenu/index.d.ts +2 -2
  491. package/dist/field/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
  492. package/dist/field/lexical/plugins/SlashMenu/index.js +72 -67
  493. package/dist/field/lexical/plugins/SlashMenu/index.js.map +1 -1
  494. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
  495. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js +13 -10
  496. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  497. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.d.ts +1 -1
  498. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.d.ts.map +1 -1
  499. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.js +3 -4
  500. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.js.map +1 -1
  501. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  502. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js +16 -10
  503. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  504. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.scss +8 -0
  505. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts.map +1 -1
  506. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +25 -6
  507. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  508. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts +9 -0
  509. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts.map +1 -0
  510. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.js +35 -0
  511. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -0
  512. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.d.ts.map +1 -1
  513. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js +1 -2
  514. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -1
  515. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.d.ts +1 -1
  516. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
  517. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.js +17 -7
  518. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  519. package/dist/field/lexical/theme/EditorTheme.scss +13 -14
  520. package/dist/field/lexical/ui/ContentEditable.d.ts.map +1 -1
  521. package/dist/field/lexical/ui/ContentEditable.js +1 -2
  522. package/dist/field/lexical/ui/ContentEditable.js.map +1 -1
  523. package/dist/field/lexical/ui/icons/Add/index.d.ts +3 -0
  524. package/dist/field/lexical/ui/icons/Add/index.d.ts.map +1 -0
  525. package/dist/field/lexical/ui/icons/Add/index.js +16 -0
  526. package/dist/field/lexical/ui/icons/Add/index.js.map +1 -0
  527. package/dist/field/lexical/ui/icons/HorizontalRule/index.d.ts +3 -0
  528. package/dist/field/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -0
  529. package/dist/field/lexical/ui/icons/HorizontalRule/index.js +19 -0
  530. package/dist/field/lexical/ui/icons/HorizontalRule/index.js.map +1 -0
  531. package/dist/field/lexical/utils/getSelectedNode.d.ts.map +1 -1
  532. package/dist/field/lexical/utils/getSelectedNode.js +1 -2
  533. package/dist/field/lexical/utils/getSelectedNode.js.map +1 -1
  534. package/dist/field/lexical/utils/nodeFormat.d.ts +2 -1
  535. package/dist/field/lexical/utils/nodeFormat.d.ts.map +1 -1
  536. package/dist/field/lexical/utils/nodeFormat.js.map +1 -1
  537. package/dist/field/lexical/utils/setFloatingElemPosition.d.ts +11 -1
  538. package/dist/field/lexical/utils/setFloatingElemPosition.d.ts.map +1 -1
  539. package/dist/field/lexical/utils/setFloatingElemPosition.js +16 -13
  540. package/dist/field/lexical/utils/setFloatingElemPosition.js.map +1 -1
  541. package/dist/field/lexical/utils/url.d.ts.map +1 -1
  542. package/dist/field/lexical/utils/url.js +3 -0
  543. package/dist/field/lexical/utils/url.js.map +1 -1
  544. package/dist/forEachNodeRecursively.d.ts +10 -0
  545. package/dist/forEachNodeRecursively.d.ts.map +1 -0
  546. package/dist/forEachNodeRecursively.js +24 -0
  547. package/dist/forEachNodeRecursively.js.map +1 -0
  548. package/dist/generateComponentMap.d.ts.map +1 -1
  549. package/dist/generateComponentMap.js +16 -22
  550. package/dist/generateComponentMap.js.map +1 -1
  551. package/dist/generateSchemaMap.d.ts.map +1 -1
  552. package/dist/generateSchemaMap.js +4 -12
  553. package/dist/generateSchemaMap.js.map +1 -1
  554. package/dist/index.d.ts +24 -20
  555. package/dist/index.d.ts.map +1 -1
  556. package/dist/index.js +275 -184
  557. package/dist/index.js.map +1 -1
  558. package/dist/populate/defaultValue.d.ts.map +1 -1
  559. package/dist/populate/defaultValue.js +1 -0
  560. package/dist/populate/defaultValue.js.map +1 -1
  561. package/dist/populate/populate.d.ts +5 -4
  562. package/dist/populate/populate.d.ts.map +1 -1
  563. package/dist/populate/populate.js +13 -11
  564. package/dist/populate/populate.js.map +1 -1
  565. package/dist/populate/populateLexicalPopulationPromises.d.ts +12 -0
  566. package/dist/populate/populateLexicalPopulationPromises.d.ts.map +1 -0
  567. package/dist/populate/populateLexicalPopulationPromises.js +36 -0
  568. package/dist/populate/populateLexicalPopulationPromises.js.map +1 -0
  569. package/dist/populate/recurseNestedFields.d.ts +8 -4
  570. package/dist/populate/recurseNestedFields.d.ts.map +1 -1
  571. package/dist/populate/recurseNestedFields.js +4 -5
  572. package/dist/populate/recurseNestedFields.js.map +1 -1
  573. package/dist/scss/app.scss +2 -3
  574. package/dist/scss/vars.scss +0 -7
  575. package/dist/types.d.ts +12 -5
  576. package/dist/types.d.ts.map +1 -1
  577. package/dist/types.js.map +1 -1
  578. package/dist/validate/index.d.ts +1 -1
  579. package/dist/validate/index.d.ts.map +1 -1
  580. package/package.json +48 -47
  581. package/components.d.ts +0 -6
  582. package/components.js +0 -7
  583. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts +0 -3
  584. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts.map +0 -1
  585. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js +0 -12
  586. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js.map +0 -1
  587. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.d.ts +0 -3
  588. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.d.ts.map +0 -1
  589. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js +0 -10
  590. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js.map +0 -1
  591. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts +0 -3
  592. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts.map +0 -1
  593. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js +0 -12
  594. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js.map +0 -1
  595. package/dist/field/features/debug/testrecorder/feature.client.d.ts.map +0 -1
  596. package/dist/field/features/debug/testrecorder/plugin/index.d.ts +0 -5
  597. package/dist/field/features/debug/testrecorder/plugin/index.d.ts.map +0 -1
  598. package/dist/field/features/debug/testrecorder/plugin/index.js.map +0 -1
  599. package/dist/field/features/debug/treeview/feature.client.d.ts.map +0 -1
  600. package/dist/field/features/debug/treeview/plugin/index.d.ts +0 -4
  601. package/dist/field/features/debug/treeview/plugin/index.d.ts.map +0 -1
  602. package/dist/field/features/debug/treeview/plugin/index.js.map +0 -1
  603. package/dist/field/features/format/common/floatingSelectToolbarSection.d.ts +0 -3
  604. package/dist/field/features/format/common/floatingSelectToolbarSection.d.ts.map +0 -1
  605. package/dist/field/features/format/common/floatingSelectToolbarSection.js +0 -10
  606. package/dist/field/features/format/common/floatingSelectToolbarSection.js.map +0 -1
  607. package/dist/field/features/format/inlinecode/feature.client.d.ts.map +0 -1
  608. package/dist/field/features/format/inlinecode/feature.client.js +0 -43
  609. package/dist/field/features/format/inlinecode/feature.client.js.map +0 -1
  610. package/dist/field/features/indent/floatingSelectToolbarIndentSection.d.ts +0 -3
  611. package/dist/field/features/indent/floatingSelectToolbarIndentSection.d.ts.map +0 -1
  612. package/dist/field/features/indent/floatingSelectToolbarIndentSection.js +0 -10
  613. package/dist/field/features/indent/floatingSelectToolbarIndentSection.js.map +0 -1
  614. package/dist/field/features/indent/index.scss +0 -4
  615. package/dist/field/features/lists/common/markdown.js.map +0 -1
  616. package/dist/field/features/lists/orderedlist/feature.client.d.ts.map +0 -1
  617. package/dist/field/features/lists/orderedlist/feature.client.js +0 -72
  618. package/dist/field/features/lists/orderedlist/feature.client.js.map +0 -1
  619. package/dist/field/features/lists/orderedlist/feature.server.d.ts.map +0 -1
  620. package/dist/field/features/lists/orderedlist/feature.server.js.map +0 -1
  621. package/dist/field/features/lists/orderedlist/markdownTransformer.d.ts.map +0 -1
  622. package/dist/field/features/lists/orderedlist/markdownTransformer.js.map +0 -1
  623. package/dist/field/features/lists/unorderedlist/feature.client.d.ts.map +0 -1
  624. package/dist/field/features/lists/unorderedlist/feature.client.js +0 -72
  625. package/dist/field/features/lists/unorderedlist/feature.client.js.map +0 -1
  626. package/dist/field/features/lists/unorderedlist/feature.server.d.ts.map +0 -1
  627. package/dist/field/features/lists/unorderedlist/feature.server.js.map +0 -1
  628. package/dist/field/features/lists/unorderedlist/markdownTransformer.d.ts.map +0 -1
  629. package/dist/field/features/lists/unorderedlist/markdownTransformer.js.map +0 -1
  630. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts +0 -8
  631. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts.map +0 -1
  632. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.js.map +0 -1
  633. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts +0 -17
  634. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts.map +0 -1
  635. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.js.map +0 -1
  636. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.d.ts +0 -18
  637. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.d.ts.map +0 -1
  638. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js +0 -42
  639. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js.map +0 -1
  640. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts +0 -6
  641. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts.map +0 -1
  642. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.js.map +0 -1
  643. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts +0 -40
  644. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts.map +0 -1
  645. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.js.map +0 -1
  646. package/dist/populate/richTextRelationshipPromise.d.ts +0 -23
  647. package/dist/populate/richTextRelationshipPromise.d.ts.map +0 -1
  648. package/dist/populate/richTextRelationshipPromise.js +0 -68
  649. package/dist/populate/richTextRelationshipPromise.js.map +0 -1
  650. package/dist/scss/fonts.scss +0 -75
  651. package/src/index.ts +0 -423
  652. /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.js +0 -0
  653. /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.d.ts +0 -0
  654. /package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.scss +0 -0
  655. /package/dist/field/features/debug/{treeview → treeView}/feature.client.js +0 -0
  656. /package/dist/field/features/debug/{treeview → treeView}/feature.server.d.ts +0 -0
  657. /package/dist/field/features/debug/{treeview → treeView}/plugin/index.scss +0 -0
  658. /package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.d.ts +0 -0
  659. /package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.d.ts +0 -0
  660. /package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.js +0 -0
  661. /package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.d.ts +0 -0
  662. /package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.d.ts +0 -0
  663. /package/dist/field/features/lists/{common → shared}/markdown.d.ts +0 -0
  664. /package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.d.ts +0 -0
  665. /package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.d.ts +0 -0
  666. /package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars}/types.js +0 -0
@@ -1,11 +1,8 @@
1
- import type { Block, FieldWithRichTextRequiredEditor } from 'payload/types';
1
+ import type { Block } from 'payload/types';
2
2
  import type { FeatureProviderProviderServer } from '../types.js';
3
3
  import type { BlocksFeatureClientProps } from './feature.client.js';
4
- export type LexicalBlock = Omit<Block, 'fields'> & {
5
- fields: FieldWithRichTextRequiredEditor[];
6
- };
7
4
  export type BlocksFeatureProps = {
8
- blocks: LexicalBlock[];
5
+ blocks: Block[];
9
6
  };
10
7
  export declare const BlocksFeature: FeatureProviderProviderServer<BlocksFeatureProps, BlocksFeatureClientProps>;
11
8
  //# sourceMappingURL=feature.server.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/field/features/blocks/feature.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAqB,+BAA+B,EAAE,MAAM,eAAe,CAAA;AAK9F,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAA;AAChE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAA;AAQnE,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG;IACjD,MAAM,EAAE,+BAA+B,EAAE,CAAA;CAC1C,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,YAAY,EAAE,CAAA;CACvB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,6BAA6B,CACvD,kBAAkB,EAClB,wBAAwB,CAyIzB,CAAA"}
1
+ {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/field/features/blocks/feature.server.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAqB,MAAM,eAAe,CAAA;AAM7D,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAA;AAChE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAA;AAQnE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,KAAK,EAAE,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,6BAA6B,CACvD,kBAAkB,EAClB,wBAAwB,CAsKzB,CAAA"}
@@ -1,75 +1,59 @@
1
+ import { traverseFields } from '@payloadcms/next/utilities';
1
2
  import { baseBlockFields, sanitizeFields } from 'payload/config';
2
3
  import { fieldsToJSONSchema, formatLabels } from 'payload/utilities';
3
- import { cloneDeep } from '../../lexical/utils/cloneDeep.js';
4
+ import { createNode } from '../typeUtilities.js';
4
5
  import { BlocksFeatureClientComponent } from './feature.client.js';
5
6
  import { BlockNode } from './nodes/BlocksNode.js';
6
7
  import { blockPopulationPromiseHOC } from './populationPromise.js';
7
8
  import { blockValidationHOC } from './validate.js';
8
9
  export const BlocksFeature = (props)=>{
9
- // Sanitization taken from payload/src/fields/config/sanitize.ts
10
- if (props?.blocks?.length) {
11
- props.blocks = props.blocks.map((block)=>{
12
- const blockCopy = cloneDeep(block);
13
- return {
14
- ...blockCopy,
15
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
16
- fields: blockCopy.fields.concat(baseBlockFields),
17
- labels: !blockCopy.labels ? formatLabels(blockCopy.slug) : blockCopy.labels
18
- };
19
- });
20
- // unSanitizedBlock.fields are sanitized in the React component and not here.
21
- // That's because we do not have access to the payload config here.
22
- }
23
- // Build clientProps
24
- const clientProps = {
25
- reducedBlocks: []
26
- };
27
- for (const block of props.blocks){
28
- clientProps.reducedBlocks.push({
29
- slug: block.slug,
30
- fieldMap: [],
31
- imageAltText: block.imageAltText,
32
- imageURL: block.imageURL,
33
- labels: block.labels
34
- });
35
- }
36
10
  return {
37
- feature: ()=>{
11
+ feature: async ({ config: _config, isRoot })=>{
12
+ if (props?.blocks?.length) {
13
+ const validRelationships = _config.collections.map((c)=>c.slug) || [];
14
+ for (const block of props.blocks){
15
+ block.fields = block.fields.concat(baseBlockFields);
16
+ block.labels = !block.labels ? formatLabels(block.slug) : block.labels;
17
+ block.fields = await sanitizeFields({
18
+ config: _config,
19
+ fields: block.fields,
20
+ requireFieldLevelRichTextEditor: isRoot,
21
+ validRelationships
22
+ });
23
+ }
24
+ }
25
+ // Build clientProps
26
+ const clientProps = {
27
+ reducedBlocks: []
28
+ };
29
+ for (const block of props.blocks){
30
+ clientProps.reducedBlocks.push({
31
+ slug: block.slug,
32
+ fieldMap: [],
33
+ imageAltText: block.imageAltText,
34
+ imageURL: block.imageURL,
35
+ labels: block.labels
36
+ });
37
+ }
38
38
  return {
39
39
  ClientComponent: BlocksFeatureClientComponent,
40
40
  clientFeatureProps: clientProps,
41
- generateSchemaMap: ({ config, props, schemaMap: schemaMapFromProps, schemaPath })=>{
42
- const schemaMap = {};
41
+ generateSchemaMap: ({ config, i18n, props })=>{
42
+ const validRelationships = config.collections.map((c)=>c.slug) || [];
43
43
  /**
44
- * Add sub-fields to the schemaMap. E.g. if you have an array field as part of the block and it runs addRow, it will request these
45
- * sub-fields from the component map. Thus we need to put them in the component map here.
46
- */ const handleFields = (parentPath, fields)=>{
47
- for (const field of fields){
48
- if ('name' in field && 'fields' in field) {
49
- schemaMap[parentPath + '.' + field.name] = field.fields;
50
- handleFields(parentPath + '.' + field.name, field.fields);
51
- }
52
- if ('blocks' in field) {
53
- for (const block of field.blocks){
54
- schemaMap[parentPath + '.' + field.name + '.' + block.slug] = block.fields || [];
55
- handleFields(parentPath + '.' + field.name + '.' + block.slug, block.fields);
56
- }
57
- }
58
- if ('tabs' in field) {
59
- for (const tab of field.tabs){
60
- if ('name' in tab) {
61
- schemaMap[parentPath + '.' + tab.name] = tab.fields || [];
62
- handleFields(parentPath + '.' + tab.name, tab.fields);
63
- } else {
64
- handleFields(parentPath, tab.fields);
65
- }
66
- }
67
- }
68
- }
69
- };
44
+ * Add sub-fields to the schemaMap. E.g. if you have an array field as part of the block, and it runs addRow, it will request these
45
+ * sub-fields from the component map. Thus, we need to put them in the component map here.
46
+ */ const schemaMap = new Map();
70
47
  for (const block of props.blocks){
71
- schemaMap[block.slug] = block.fields || [];
72
- handleFields(block.slug, block.fields);
48
+ schemaMap.set(block.slug, block.fields || []);
49
+ traverseFields({
50
+ config,
51
+ fields: block.fields,
52
+ i18n,
53
+ schemaMap,
54
+ schemaPath: block.slug,
55
+ validRelationships
56
+ });
73
57
  }
74
58
  return schemaMap;
75
59
  },
@@ -78,24 +62,10 @@ export const BlocksFeature = (props)=>{
78
62
  if (!props?.blocks?.length) {
79
63
  return currentSchema;
80
64
  }
81
- // sanitize blocks
82
- const validRelationships = config.collections.map((c)=>c.slug) || [];
83
- const sanitizedBlocks = props.blocks.map((block)=>{
84
- const blockCopy = cloneDeep(block);
85
- return {
86
- ...blockCopy,
87
- fields: sanitizeFields({
88
- config,
89
- fields: blockCopy.fields,
90
- requireFieldLevelRichTextEditor: true,
91
- validRelationships
92
- })
93
- };
94
- });
95
65
  const blocksField = {
96
66
  name: field?.name + '_lexical_blocks',
97
67
  type: 'blocks',
98
- blocks: sanitizedBlocks
68
+ blocks: props.blocks
99
69
  };
100
70
  // This is only done so that interfaceNameDefinitions sets those block's interfaceNames.
101
71
  // we don't actually use the JSON Schema itself in the generated types yet.
@@ -106,15 +76,77 @@ export const BlocksFeature = (props)=>{
106
76
  }
107
77
  },
108
78
  nodes: [
109
- {
110
- node: BlockNode,
79
+ createNode({
80
+ /* // TODO: Implement these hooks once docWithLocales / originalSiblingDoc => node matching has been figured out
81
+ hooks: {
82
+ beforeChange: [
83
+ async ({ context, findMany, node, operation, overrideAccess, req }) => {
84
+ const blockType = node.fields.blockType
85
+
86
+ const block = deepCopyObject(
87
+ props.blocks.find((block) => block.slug === blockType),
88
+ )
89
+
90
+
91
+ await beforeChangeTraverseFields({
92
+ id: null,
93
+ collection: null,
94
+ context,
95
+ data: node.fields,
96
+ doc: node.fields,
97
+ fields: sanitizedBlock.fields,
98
+ global: null,
99
+ mergeLocaleActions: [],
100
+ operation:
101
+ operation === 'create' || operation === 'update' ? operation : 'update',
102
+ overrideAccess,
103
+ path: '',
104
+ req,
105
+ siblingData: node.fields,
106
+ siblingDoc: node.fields,
107
+ })
108
+
109
+
110
+ return node
111
+ },
112
+ ],
113
+ beforeValidate: [
114
+ async ({ context, findMany, node, operation, overrideAccess, req }) => {
115
+ const blockType = node.fields.blockType
116
+
117
+ const block = deepCopyObject(
118
+ props.blocks.find((block) => block.slug === blockType),
119
+ )
120
+
121
+
122
+
123
+ await beforeValidateTraverseFields({
124
+ id: null,
125
+ collection: null,
126
+ context,
127
+ data: node.fields,
128
+ doc: node.fields,
129
+ fields: sanitizedBlock.fields,
130
+ global: null,
131
+ operation:
132
+ operation === 'create' || operation === 'update' ? operation : 'update',
133
+ overrideAccess,
134
+ req,
135
+ siblingData: node.fields,
136
+ siblingDoc: node.fields,
137
+ })
138
+
139
+ return node
140
+ },
141
+ ],
142
+ },*/ node: BlockNode,
111
143
  populationPromises: [
112
144
  blockPopulationPromiseHOC(props)
113
145
  ],
114
146
  validations: [
115
147
  blockValidationHOC(props)
116
148
  ]
117
- }
149
+ })
118
150
  ],
119
151
  serverFeatureProps: props
120
152
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/features/blocks/feature.server.ts"],"sourcesContent":["import type { Block, BlockField, Field, FieldWithRichTextRequiredEditor } from 'payload/types'\n\nimport { baseBlockFields, sanitizeFields } from 'payload/config'\nimport { fieldsToJSONSchema, formatLabels } from 'payload/utilities'\n\nimport type { FeatureProviderProviderServer } from '../types.js'\nimport type { BlocksFeatureClientProps } from './feature.client.js'\n\nimport { cloneDeep } from '../../lexical/utils/cloneDeep.js'\nimport { BlocksFeatureClientComponent } from './feature.client.js'\nimport { BlockNode } from './nodes/BlocksNode.js'\nimport { blockPopulationPromiseHOC } from './populationPromise.js'\nimport { blockValidationHOC } from './validate.js'\n\nexport type LexicalBlock = Omit<Block, 'fields'> & {\n fields: FieldWithRichTextRequiredEditor[]\n}\n\nexport type BlocksFeatureProps = {\n blocks: LexicalBlock[]\n}\n\nexport const BlocksFeature: FeatureProviderProviderServer<\n BlocksFeatureProps,\n BlocksFeatureClientProps\n> = (props) => {\n // Sanitization taken from payload/src/fields/config/sanitize.ts\n\n if (props?.blocks?.length) {\n props.blocks = props.blocks.map((block) => {\n const blockCopy = cloneDeep(block)\n\n return {\n ...blockCopy,\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n fields: blockCopy.fields.concat(baseBlockFields as FieldWithRichTextRequiredEditor[]),\n labels: !blockCopy.labels ? formatLabels(blockCopy.slug) : blockCopy.labels,\n }\n })\n // unSanitizedBlock.fields are sanitized in the React component and not here.\n // That's because we do not have access to the payload config here.\n }\n\n // Build clientProps\n const clientProps: BlocksFeatureClientProps = {\n reducedBlocks: [],\n }\n for (const block of props.blocks) {\n clientProps.reducedBlocks.push({\n slug: block.slug,\n fieldMap: [],\n imageAltText: block.imageAltText,\n imageURL: block.imageURL,\n labels: block.labels,\n })\n }\n\n return {\n feature: () => {\n return {\n ClientComponent: BlocksFeatureClientComponent,\n clientFeatureProps: clientProps,\n generateSchemaMap: ({ config, props, schemaMap: schemaMapFromProps, schemaPath }) => {\n const schemaMap: {\n [key: string]: Field[]\n } = {}\n\n /**\n * Add sub-fields to the schemaMap. E.g. if you have an array field as part of the block and it runs addRow, it will request these\n * sub-fields from the component map. Thus we need to put them in the component map here.\n */\n const handleFields = (parentPath: string, fields: Field[]) => {\n for (const field of fields) {\n if ('name' in field && 'fields' in field) {\n schemaMap[parentPath + '.' + field.name] = field.fields\n handleFields(parentPath + '.' + field.name, field.fields)\n }\n if ('blocks' in field) {\n for (const block of field.blocks) {\n schemaMap[parentPath + '.' + field.name + '.' + block.slug] = block.fields || []\n handleFields(parentPath + '.' + field.name + '.' + block.slug, block.fields)\n }\n }\n if ('tabs' in field) {\n for (const tab of field.tabs) {\n if ('name' in tab) {\n schemaMap[parentPath + '.' + tab.name] = tab.fields || []\n handleFields(parentPath + '.' + tab.name, tab.fields)\n } else {\n handleFields(parentPath, tab.fields)\n }\n }\n }\n }\n }\n\n for (const block of props.blocks) {\n schemaMap[block.slug] = block.fields || []\n handleFields(block.slug, block.fields)\n }\n\n return schemaMap\n },\n generatedTypes: {\n modifyOutputSchema: ({\n collectionIDFieldTypes,\n config,\n currentSchema,\n field,\n interfaceNameDefinitions,\n }) => {\n if (!props?.blocks?.length) {\n return currentSchema\n }\n\n // sanitize blocks\n const validRelationships = config.collections.map((c) => c.slug) || []\n\n const sanitizedBlocks = props.blocks.map((block) => {\n const blockCopy = cloneDeep(block)\n return {\n ...blockCopy,\n fields: sanitizeFields({\n config,\n fields: blockCopy.fields,\n requireFieldLevelRichTextEditor: true,\n validRelationships,\n }),\n }\n })\n\n const blocksField: BlockField = {\n name: field?.name + '_lexical_blocks',\n type: 'blocks',\n blocks: sanitizedBlocks,\n }\n // This is only done so that interfaceNameDefinitions sets those block's interfaceNames.\n // we don't actually use the JSON Schema itself in the generated types yet.\n fieldsToJSONSchema(\n collectionIDFieldTypes,\n [blocksField],\n interfaceNameDefinitions,\n config,\n )\n\n return currentSchema\n },\n },\n nodes: [\n {\n node: BlockNode,\n populationPromises: [blockPopulationPromiseHOC(props)],\n validations: [blockValidationHOC(props)],\n },\n ],\n serverFeatureProps: props,\n }\n },\n key: 'blocks',\n serverFeatureProps: props,\n }\n}\n"],"names":["baseBlockFields","sanitizeFields","fieldsToJSONSchema","formatLabels","cloneDeep","BlocksFeatureClientComponent","BlockNode","blockPopulationPromiseHOC","blockValidationHOC","BlocksFeature","props","blocks","length","map","block","blockCopy","fields","concat","labels","slug","clientProps","reducedBlocks","push","fieldMap","imageAltText","imageURL","feature","ClientComponent","clientFeatureProps","generateSchemaMap","config","schemaMap","schemaMapFromProps","schemaPath","handleFields","parentPath","field","name","tab","tabs","generatedTypes","modifyOutputSchema","collectionIDFieldTypes","currentSchema","interfaceNameDefinitions","validRelationships","collections","c","sanitizedBlocks","requireFieldLevelRichTextEditor","blocksField","type","nodes","node","populationPromises","validations","serverFeatureProps","key"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"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"}
1
+ {"version":3,"sources":["../../../../src/field/features/blocks/feature.server.ts"],"sourcesContent":["import type { Config } from 'payload/config'\nimport type { Block, BlockField, Field } from 'payload/types'\n\nimport { traverseFields } from '@payloadcms/next/utilities'\nimport { baseBlockFields, sanitizeFields } from 'payload/config'\nimport { fieldsToJSONSchema, formatLabels } from 'payload/utilities'\n\nimport type { FeatureProviderProviderServer } from '../types.js'\nimport type { BlocksFeatureClientProps } from './feature.client.js'\n\nimport { createNode } from '../typeUtilities.js'\nimport { BlocksFeatureClientComponent } from './feature.client.js'\nimport { BlockNode } from './nodes/BlocksNode.js'\nimport { blockPopulationPromiseHOC } from './populationPromise.js'\nimport { blockValidationHOC } from './validate.js'\n\nexport type BlocksFeatureProps = {\n blocks: Block[]\n}\n\nexport const BlocksFeature: FeatureProviderProviderServer<\n BlocksFeatureProps,\n BlocksFeatureClientProps\n> = (props) => {\n return {\n feature: async ({ config: _config, isRoot }) => {\n if (props?.blocks?.length) {\n const validRelationships = _config.collections.map((c) => c.slug) || []\n\n for (const block of props.blocks) {\n block.fields = block.fields.concat(baseBlockFields)\n block.labels = !block.labels ? formatLabels(block.slug) : block.labels\n\n block.fields = await sanitizeFields({\n config: _config as unknown as Config,\n fields: block.fields,\n requireFieldLevelRichTextEditor: isRoot,\n validRelationships,\n })\n }\n }\n\n // Build clientProps\n const clientProps: BlocksFeatureClientProps = {\n reducedBlocks: [],\n }\n for (const block of props.blocks) {\n clientProps.reducedBlocks.push({\n slug: block.slug,\n fieldMap: [],\n imageAltText: block.imageAltText,\n imageURL: block.imageURL,\n labels: block.labels,\n })\n }\n\n return {\n ClientComponent: BlocksFeatureClientComponent,\n clientFeatureProps: clientProps,\n generateSchemaMap: ({ config, i18n, props }) => {\n const validRelationships = config.collections.map((c) => c.slug) || []\n\n /**\n * Add sub-fields to the schemaMap. E.g. if you have an array field as part of the block, and it runs addRow, it will request these\n * sub-fields from the component map. Thus, we need to put them in the component map here.\n */\n const schemaMap = new Map<string, Field[]>()\n\n for (const block of props.blocks) {\n schemaMap.set(block.slug, block.fields || [])\n\n traverseFields({\n config,\n fields: block.fields,\n i18n,\n schemaMap,\n schemaPath: block.slug,\n validRelationships,\n })\n }\n\n return schemaMap\n },\n generatedTypes: {\n modifyOutputSchema: ({\n collectionIDFieldTypes,\n config,\n currentSchema,\n field,\n interfaceNameDefinitions,\n }) => {\n if (!props?.blocks?.length) {\n return currentSchema\n }\n\n const blocksField: BlockField = {\n name: field?.name + '_lexical_blocks',\n type: 'blocks',\n blocks: props.blocks,\n }\n // This is only done so that interfaceNameDefinitions sets those block's interfaceNames.\n // we don't actually use the JSON Schema itself in the generated types yet.\n fieldsToJSONSchema(\n collectionIDFieldTypes,\n [blocksField],\n interfaceNameDefinitions,\n config,\n )\n\n return currentSchema\n },\n },\n nodes: [\n createNode({\n /* // TODO: Implement these hooks once docWithLocales / originalSiblingDoc => node matching has been figured out\n hooks: {\n beforeChange: [\n async ({ context, findMany, node, operation, overrideAccess, req }) => {\n const blockType = node.fields.blockType\n\n const block = deepCopyObject(\n props.blocks.find((block) => block.slug === blockType),\n )\n\n\n await beforeChangeTraverseFields({\n id: null,\n collection: null,\n context,\n data: node.fields,\n doc: node.fields,\n fields: sanitizedBlock.fields,\n global: null,\n mergeLocaleActions: [],\n operation:\n operation === 'create' || operation === 'update' ? operation : 'update',\n overrideAccess,\n path: '',\n req,\n siblingData: node.fields,\n siblingDoc: node.fields,\n })\n\n\n return node\n },\n ],\n beforeValidate: [\n async ({ context, findMany, node, operation, overrideAccess, req }) => {\n const blockType = node.fields.blockType\n\n const block = deepCopyObject(\n props.blocks.find((block) => block.slug === blockType),\n )\n\n\n\n await beforeValidateTraverseFields({\n id: null,\n collection: null,\n context,\n data: node.fields,\n doc: node.fields,\n fields: sanitizedBlock.fields,\n global: null,\n operation:\n operation === 'create' || operation === 'update' ? operation : 'update',\n overrideAccess,\n req,\n siblingData: node.fields,\n siblingDoc: node.fields,\n })\n\n return node\n },\n ],\n },*/\n node: BlockNode,\n populationPromises: [blockPopulationPromiseHOC(props)],\n validations: [blockValidationHOC(props)],\n }),\n ],\n serverFeatureProps: props,\n }\n },\n key: 'blocks',\n serverFeatureProps: props,\n }\n}\n"],"names":["traverseFields","baseBlockFields","sanitizeFields","fieldsToJSONSchema","formatLabels","createNode","BlocksFeatureClientComponent","BlockNode","blockPopulationPromiseHOC","blockValidationHOC","BlocksFeature","props","feature","config","_config","isRoot","blocks","length","validRelationships","collections","map","c","slug","block","fields","concat","labels","requireFieldLevelRichTextEditor","clientProps","reducedBlocks","push","fieldMap","imageAltText","imageURL","ClientComponent","clientFeatureProps","generateSchemaMap","i18n","schemaMap","Map","set","schemaPath","generatedTypes","modifyOutputSchema","collectionIDFieldTypes","currentSchema","field","interfaceNameDefinitions","blocksField","name","type","nodes","node","populationPromises","validations","serverFeatureProps","key"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"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"}
@@ -1,8 +1,7 @@
1
1
  /// <reference types="react" resolution-mode="require"/>
2
2
  import type { SerializedDecoratorBlockNode } from '@lexical/react/LexicalDecoratorBlockNode.js';
3
3
  import type { DOMConversionMap, DOMExportOutput, EditorConfig, ElementFormatType, LexicalEditor, LexicalNode, NodeKey, Spread } from 'lexical';
4
- import lexicalDecoratorBlockNodeImport from '@lexical/react/LexicalDecoratorBlockNode.js';
5
- declare const DecoratorBlockNode: typeof lexicalDecoratorBlockNodeImport.DecoratorBlockNode;
4
+ import { DecoratorBlockNode } from '@lexical/react/LexicalDecoratorBlockNode.js';
6
5
  export type BlockFields = {
7
6
  /** Block form data */
8
7
  [key: string]: any;
@@ -34,5 +33,4 @@ export declare class BlockNode extends DecoratorBlockNode {
34
33
  }
35
34
  export declare function $createBlockNode(fields: Exclude<BlockFields, 'id'>): BlockNode;
36
35
  export declare function $isBlockNode(node: BlockNode | LexicalNode | null | undefined): node is BlockNode;
37
- export {};
38
36
  //# sourceMappingURL=BlocksNode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BlocksNode.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/blocks/nodes/BlocksNode.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAA;AAC/F,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,OAAO,EACP,MAAM,EACP,MAAM,SAAS,CAAA;AAEhB,OAAO,+BAA+B,MAAM,6CAA6C,CAAA;AACzF,QAAA,MAAQ,kBAAkB,2DAAoC,CAAA;AAI9D,MAAM,MAAM,WAAW,GAAG;IACxB,sBAAsB;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,EAAE,EAAE,MAAM,CAAA;CACX,CAAA;AAQD,MAAM,MAAM,mBAAmB,GAAG,MAAM,CACtC;IACE,MAAM,EAAE,WAAW,CAAA;CACpB,EACD,4BAA4B,CAC7B,CAAA;AAED,qBAAa,SAAU,SAAQ,kBAAkB;IAC/C,QAAQ,EAAE,WAAW,CAAA;gBAET,EACV,MAAM,EACN,MAAM,EACN,GAAG,GACJ,EAAE;QACD,MAAM,EAAE,WAAW,CAAA;QACnB,MAAM,CAAC,EAAE,iBAAiB,CAAA;QAC1B,GAAG,CAAC,EAAE,OAAO,CAAA;KACd;IAKD,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS;IAQxC,MAAM,CAAC,OAAO,IAAI,MAAM;IAIxB,MAAM,CAAC,SAAS,IAAI,gBAAgB,CAAC,cAAc,CAAC,GAAG,IAAI;IAI3D,MAAM,CAAC,UAAU,CAAC,cAAc,EAAE,mBAAmB,GAAG,SAAS;IAgBjE,MAAM,CAAC,QAAQ,IAAI,KAAK;IAGxB,QAAQ,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO;IAKlE,SAAS,IAAI,eAAe;IAQ5B,UAAU,IAAI,mBAAmB;IASjC,SAAS,IAAI,WAAW;IAIxB,cAAc,IAAI,MAAM;IAIxB,SAAS,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;CAMrC;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,GAAG,SAAS,CAO9E;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,IAAI,SAAS,CAEhG"}
1
+ {"version":3,"file":"BlocksNode.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/blocks/nodes/BlocksNode.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAA;AAC/F,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,OAAO,EACP,MAAM,EACP,MAAM,SAAS,CAAA;AAEhB,OAAO,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAA;AAIhF,MAAM,MAAM,WAAW,GAAG;IACxB,sBAAsB;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,EAAE,EAAE,MAAM,CAAA;CACX,CAAA;AAQD,MAAM,MAAM,mBAAmB,GAAG,MAAM,CACtC;IACE,MAAM,EAAE,WAAW,CAAA;CACpB,EACD,4BAA4B,CAC7B,CAAA;AAED,qBAAa,SAAU,SAAQ,kBAAkB;IAC/C,QAAQ,EAAE,WAAW,CAAA;gBAET,EACV,MAAM,EACN,MAAM,EACN,GAAG,GACJ,EAAE;QACD,MAAM,EAAE,WAAW,CAAA;QACnB,MAAM,CAAC,EAAE,iBAAiB,CAAA;QAC1B,GAAG,CAAC,EAAE,OAAO,CAAA;KACd;IAKD,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS;IAQxC,MAAM,CAAC,OAAO,IAAI,MAAM;IAIxB,MAAM,CAAC,SAAS,IAAI,gBAAgB,CAAC,cAAc,CAAC,GAAG,IAAI;IAI3D,MAAM,CAAC,UAAU,CAAC,cAAc,EAAE,mBAAmB,GAAG,SAAS;IAgBjE,MAAM,CAAC,QAAQ,IAAI,KAAK;IAGxB,QAAQ,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO;IAKlE,SAAS,IAAI,eAAe;IAQ5B,UAAU,IAAI,mBAAmB;IASjC,SAAS,IAAI,WAAW;IAIxB,cAAc,IAAI,MAAM;IAIxB,SAAS,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;CAMrC;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,GAAG,SAAS,CAO9E;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,IAAI,SAAS,CAEhG"}
@@ -1,5 +1,4 @@
1
- import lexicalDecoratorBlockNodeImport from '@lexical/react/LexicalDecoratorBlockNode.js';
2
- const { DecoratorBlockNode } = lexicalDecoratorBlockNodeImport;
1
+ import { DecoratorBlockNode } from '@lexical/react/LexicalDecoratorBlockNode.js';
3
2
  import ObjectID from 'bson-objectid';
4
3
  import React from 'react';
5
4
  const BlockComponent = /*#__PURE__*/ React.lazy(()=>import('../component/index.js').then((module)=>({
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/features/blocks/nodes/BlocksNode.tsx"],"sourcesContent":["import type { SerializedDecoratorBlockNode } from '@lexical/react/LexicalDecoratorBlockNode.js'\nimport type {\n DOMConversionMap,\n DOMExportOutput,\n EditorConfig,\n ElementFormatType,\n LexicalEditor,\n LexicalNode,\n NodeKey,\n Spread,\n} from 'lexical'\n\nimport lexicalDecoratorBlockNodeImport from '@lexical/react/LexicalDecoratorBlockNode.js'\nconst { DecoratorBlockNode } = lexicalDecoratorBlockNodeImport\nimport ObjectID from 'bson-objectid'\nimport React from 'react'\n\nexport type BlockFields = {\n /** Block form data */\n [key: string]: any\n blockName: string\n blockType: string\n id: string\n}\n\nconst BlockComponent = React.lazy(() =>\n import('../component/index.js').then((module) => ({\n default: module.BlockComponent,\n })),\n)\n\nexport type SerializedBlockNode = Spread<\n {\n fields: BlockFields\n },\n SerializedDecoratorBlockNode\n>\n\nexport class BlockNode extends DecoratorBlockNode {\n __fields: BlockFields\n\n constructor({\n fields,\n format,\n key,\n }: {\n fields: BlockFields\n format?: ElementFormatType\n key?: NodeKey\n }) {\n super(format, key)\n this.__fields = fields\n }\n\n static clone(node: BlockNode): BlockNode {\n return new BlockNode({\n fields: node.__fields,\n format: node.__format,\n key: node.__key,\n })\n }\n\n static getType(): string {\n return 'block'\n }\n\n static importDOM(): DOMConversionMap<HTMLDivElement> | null {\n return {}\n }\n\n static importJSON(serializedNode: SerializedBlockNode): BlockNode {\n if (serializedNode.version === 1) {\n // Convert (version 1 had the fields wrapped in another, unnecessary data property)\n serializedNode = {\n ...serializedNode,\n fields: {\n ...(serializedNode as any).fields.data,\n },\n version: 2,\n }\n }\n const node = $createBlockNode(serializedNode.fields)\n node.setFormat(serializedNode.format)\n return node\n }\n\n static isInline(): false {\n return false\n }\n decorate(editor: LexicalEditor, config: EditorConfig): JSX.Element {\n // @ts-expect-error\n return <BlockComponent formData={this.getFields()} nodeKey={this.getKey()} />\n }\n\n exportDOM(): DOMExportOutput {\n const element = document.createElement('div')\n\n const text = document.createTextNode(this.getTextContent())\n element.append(text)\n return { element }\n }\n\n exportJSON(): SerializedBlockNode {\n return {\n ...super.exportJSON(),\n type: this.getType(),\n fields: this.getFields(),\n version: 2,\n }\n }\n\n getFields(): BlockFields {\n return this.getLatest().__fields\n }\n\n getTextContent(): string {\n return `Block Field`\n }\n\n setFields(fields: BlockFields): void {\n const fieldsCopy = JSON.parse(JSON.stringify(fields)) as BlockFields\n\n const writable = this.getWritable()\n writable.__fields = fieldsCopy\n }\n}\n\nexport function $createBlockNode(fields: Exclude<BlockFields, 'id'>): BlockNode {\n return new BlockNode({\n fields: {\n ...fields,\n id: fields?.id || new ObjectID.default().toHexString(),\n },\n })\n}\n\nexport function $isBlockNode(node: BlockNode | LexicalNode | null | undefined): node is BlockNode {\n return node instanceof BlockNode\n}\n"],"names":["lexicalDecoratorBlockNodeImport","DecoratorBlockNode","ObjectID","React","BlockComponent","lazy","then","module","default","BlockNode","__fields","constructor","fields","format","key","clone","node","__format","__key","getType","importDOM","importJSON","serializedNode","version","data","$createBlockNode","setFormat","isInline","decorate","editor","config","formData","getFields","nodeKey","getKey","exportDOM","element","document","createElement","text","createTextNode","getTextContent","append","exportJSON","type","getLatest","setFields","fieldsCopy","JSON","parse","stringify","writable","getWritable","id","toHexString","$isBlockNode"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAYA,OAAOA,qCAAqC,8CAA6C;AACzF,MAAM,EAAEC,kBAAkB,EAAE,GAAGD;AAC/B,OAAOE,cAAc,gBAAe;AACpC,OAAOC,WAAW,QAAO;AAUzB,MAAMC,+BAAiBD,MAAME,IAAI,CAAC,IAChC,MAAM,CAAC,yBAAyBC,IAAI,CAAC,CAACC,SAAY,CAAA;YAChDC,SAASD,OAAOH,cAAc;QAChC,CAAA;AAUF,OAAO,MAAMK,kBAAkBR;IAC7BS,SAAqB;IAErBC,YAAY,EACVC,MAAM,EACNC,MAAM,EACNC,GAAG,EAKJ,CAAE;QACD,KAAK,CAACD,QAAQC;QACd,IAAI,CAACJ,QAAQ,GAAGE;IAClB;IAEA,OAAOG,MAAMC,IAAe,EAAa;QACvC,OAAO,IAAIP,UAAU;YACnBG,QAAQI,KAAKN,QAAQ;YACrBG,QAAQG,KAAKC,QAAQ;YACrBH,KAAKE,KAAKE,KAAK;QACjB;IACF;IAEA,OAAOC,UAAkB;QACvB,OAAO;IACT;IAEA,OAAOC,YAAqD;QAC1D,OAAO,CAAC;IACV;IAEA,OAAOC,WAAWC,cAAmC,EAAa;QAChE,IAAIA,eAAeC,OAAO,KAAK,GAAG;YAChC,mFAAmF;YACnFD,iBAAiB;gBACf,GAAGA,cAAc;gBACjBV,QAAQ;oBACN,GAAG,AAACU,eAAuBV,MAAM,CAACY,IAAI;gBACxC;gBACAD,SAAS;YACX;QACF;QACA,MAAMP,OAAOS,iBAAiBH,eAAeV,MAAM;QACnDI,KAAKU,SAAS,CAACJ,eAAeT,MAAM;QACpC,OAAOG;IACT;IAEA,OAAOW,WAAkB;QACvB,OAAO;IACT;IACAC,SAASC,MAAqB,EAAEC,MAAoB,EAAe;QACjE,mBAAmB;QACnB,qBAAO,oBAAC1B;YAAe2B,UAAU,IAAI,CAACC,SAAS;YAAIC,SAAS,IAAI,CAACC,MAAM;;IACzE;IAEAC,YAA6B;QAC3B,MAAMC,UAAUC,SAASC,aAAa,CAAC;QAEvC,MAAMC,OAAOF,SAASG,cAAc,CAAC,IAAI,CAACC,cAAc;QACxDL,QAAQM,MAAM,CAACH;QACf,OAAO;YAAEH;QAAQ;IACnB;IAEAO,aAAkC;QAChC,OAAO;YACL,GAAG,KAAK,CAACA,YAAY;YACrBC,MAAM,IAAI,CAACzB,OAAO;YAClBP,QAAQ,IAAI,CAACoB,SAAS;YACtBT,SAAS;QACX;IACF;IAEAS,YAAyB;QACvB,OAAO,IAAI,CAACa,SAAS,GAAGnC,QAAQ;IAClC;IAEA+B,iBAAyB;QACvB,OAAO,CAAC,WAAW,CAAC;IACtB;IAEAK,UAAUlC,MAAmB,EAAQ;QACnC,MAAMmC,aAAaC,KAAKC,KAAK,CAACD,KAAKE,SAAS,CAACtC;QAE7C,MAAMuC,WAAW,IAAI,CAACC,WAAW;QACjCD,SAASzC,QAAQ,GAAGqC;IACtB;AACF;AAEA,OAAO,SAAStB,iBAAiBb,MAAkC;IACjE,OAAO,IAAIH,UAAU;QACnBG,QAAQ;YACN,GAAGA,MAAM;YACTyC,IAAIzC,QAAQyC,MAAM,IAAInD,SAASM,OAAO,GAAG8C,WAAW;QACtD;IACF;AACF;AAEA,OAAO,SAASC,aAAavC,IAAgD;IAC3E,OAAOA,gBAAgBP;AACzB"}
1
+ {"version":3,"sources":["../../../../../src/field/features/blocks/nodes/BlocksNode.tsx"],"sourcesContent":["import type { SerializedDecoratorBlockNode } from '@lexical/react/LexicalDecoratorBlockNode.js'\nimport type {\n DOMConversionMap,\n DOMExportOutput,\n EditorConfig,\n ElementFormatType,\n LexicalEditor,\n LexicalNode,\n NodeKey,\n Spread,\n} from 'lexical'\n\nimport { DecoratorBlockNode } from '@lexical/react/LexicalDecoratorBlockNode.js'\nimport ObjectID from 'bson-objectid'\nimport React from 'react'\n\nexport type BlockFields = {\n /** Block form data */\n [key: string]: any\n blockName: string\n blockType: string\n id: string\n}\n\nconst BlockComponent = React.lazy(() =>\n import('../component/index.js').then((module) => ({\n default: module.BlockComponent,\n })),\n)\n\nexport type SerializedBlockNode = Spread<\n {\n fields: BlockFields\n },\n SerializedDecoratorBlockNode\n>\n\nexport class BlockNode extends DecoratorBlockNode {\n __fields: BlockFields\n\n constructor({\n fields,\n format,\n key,\n }: {\n fields: BlockFields\n format?: ElementFormatType\n key?: NodeKey\n }) {\n super(format, key)\n this.__fields = fields\n }\n\n static clone(node: BlockNode): BlockNode {\n return new BlockNode({\n fields: node.__fields,\n format: node.__format,\n key: node.__key,\n })\n }\n\n static getType(): string {\n return 'block'\n }\n\n static importDOM(): DOMConversionMap<HTMLDivElement> | null {\n return {}\n }\n\n static importJSON(serializedNode: SerializedBlockNode): BlockNode {\n if (serializedNode.version === 1) {\n // Convert (version 1 had the fields wrapped in another, unnecessary data property)\n serializedNode = {\n ...serializedNode,\n fields: {\n ...(serializedNode as any).fields.data,\n },\n version: 2,\n }\n }\n const node = $createBlockNode(serializedNode.fields)\n node.setFormat(serializedNode.format)\n return node\n }\n\n static isInline(): false {\n return false\n }\n decorate(editor: LexicalEditor, config: EditorConfig): JSX.Element {\n // @ts-expect-error\n return <BlockComponent formData={this.getFields()} nodeKey={this.getKey()} />\n }\n\n exportDOM(): DOMExportOutput {\n const element = document.createElement('div')\n\n const text = document.createTextNode(this.getTextContent())\n element.append(text)\n return { element }\n }\n\n exportJSON(): SerializedBlockNode {\n return {\n ...super.exportJSON(),\n type: this.getType(),\n fields: this.getFields(),\n version: 2,\n }\n }\n\n getFields(): BlockFields {\n return this.getLatest().__fields\n }\n\n getTextContent(): string {\n return `Block Field`\n }\n\n setFields(fields: BlockFields): void {\n const fieldsCopy = JSON.parse(JSON.stringify(fields)) as BlockFields\n\n const writable = this.getWritable()\n writable.__fields = fieldsCopy\n }\n}\n\nexport function $createBlockNode(fields: Exclude<BlockFields, 'id'>): BlockNode {\n return new BlockNode({\n fields: {\n ...fields,\n id: fields?.id || new ObjectID.default().toHexString(),\n },\n })\n}\n\nexport function $isBlockNode(node: BlockNode | LexicalNode | null | undefined): node is BlockNode {\n return node instanceof BlockNode\n}\n"],"names":["DecoratorBlockNode","ObjectID","React","BlockComponent","lazy","then","module","default","BlockNode","__fields","constructor","fields","format","key","clone","node","__format","__key","getType","importDOM","importJSON","serializedNode","version","data","$createBlockNode","setFormat","isInline","decorate","editor","config","formData","getFields","nodeKey","getKey","exportDOM","element","document","createElement","text","createTextNode","getTextContent","append","exportJSON","type","getLatest","setFields","fieldsCopy","JSON","parse","stringify","writable","getWritable","id","toHexString","$isBlockNode"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAYA,SAASA,kBAAkB,QAAQ,8CAA6C;AAChF,OAAOC,cAAc,gBAAe;AACpC,OAAOC,WAAW,QAAO;AAUzB,MAAMC,+BAAiBD,MAAME,IAAI,CAAC,IAChC,MAAM,CAAC,yBAAyBC,IAAI,CAAC,CAACC,SAAY,CAAA;YAChDC,SAASD,OAAOH,cAAc;QAChC,CAAA;AAUF,OAAO,MAAMK,kBAAkBR;IAC7BS,SAAqB;IAErBC,YAAY,EACVC,MAAM,EACNC,MAAM,EACNC,GAAG,EAKJ,CAAE;QACD,KAAK,CAACD,QAAQC;QACd,IAAI,CAACJ,QAAQ,GAAGE;IAClB;IAEA,OAAOG,MAAMC,IAAe,EAAa;QACvC,OAAO,IAAIP,UAAU;YACnBG,QAAQI,KAAKN,QAAQ;YACrBG,QAAQG,KAAKC,QAAQ;YACrBH,KAAKE,KAAKE,KAAK;QACjB;IACF;IAEA,OAAOC,UAAkB;QACvB,OAAO;IACT;IAEA,OAAOC,YAAqD;QAC1D,OAAO,CAAC;IACV;IAEA,OAAOC,WAAWC,cAAmC,EAAa;QAChE,IAAIA,eAAeC,OAAO,KAAK,GAAG;YAChC,mFAAmF;YACnFD,iBAAiB;gBACf,GAAGA,cAAc;gBACjBV,QAAQ;oBACN,GAAG,AAACU,eAAuBV,MAAM,CAACY,IAAI;gBACxC;gBACAD,SAAS;YACX;QACF;QACA,MAAMP,OAAOS,iBAAiBH,eAAeV,MAAM;QACnDI,KAAKU,SAAS,CAACJ,eAAeT,MAAM;QACpC,OAAOG;IACT;IAEA,OAAOW,WAAkB;QACvB,OAAO;IACT;IACAC,SAASC,MAAqB,EAAEC,MAAoB,EAAe;QACjE,mBAAmB;QACnB,qBAAO,oBAAC1B;YAAe2B,UAAU,IAAI,CAACC,SAAS;YAAIC,SAAS,IAAI,CAACC,MAAM;;IACzE;IAEAC,YAA6B;QAC3B,MAAMC,UAAUC,SAASC,aAAa,CAAC;QAEvC,MAAMC,OAAOF,SAASG,cAAc,CAAC,IAAI,CAACC,cAAc;QACxDL,QAAQM,MAAM,CAACH;QACf,OAAO;YAAEH;QAAQ;IACnB;IAEAO,aAAkC;QAChC,OAAO;YACL,GAAG,KAAK,CAACA,YAAY;YACrBC,MAAM,IAAI,CAACzB,OAAO;YAClBP,QAAQ,IAAI,CAACoB,SAAS;YACtBT,SAAS;QACX;IACF;IAEAS,YAAyB;QACvB,OAAO,IAAI,CAACa,SAAS,GAAGnC,QAAQ;IAClC;IAEA+B,iBAAyB;QACvB,OAAO,CAAC,WAAW,CAAC;IACtB;IAEAK,UAAUlC,MAAmB,EAAQ;QACnC,MAAMmC,aAAaC,KAAKC,KAAK,CAACD,KAAKE,SAAS,CAACtC;QAE7C,MAAMuC,WAAW,IAAI,CAACC,WAAW;QACjCD,SAASzC,QAAQ,GAAGqC;IACtB;AACF;AAEA,OAAO,SAAStB,iBAAiBb,MAAkC;IACjE,OAAO,IAAIH,UAAU;QACnBG,QAAQ;YACN,GAAGA,MAAM;YACTyC,IAAIzC,QAAQyC,MAAM,IAAInD,SAASM,OAAO,GAAG8C,WAAW;QACtD;IACF;AACF;AAEA,OAAO,SAASC,aAAavC,IAAgD;IAC3E,OAAOA,gBAAgBP;AACzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/blocks/plugin/commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAK7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAEpD,eAAO,MAAM,oBAAoB,EAAE,cAAc,CAAC,kBAAkB,CAC7B,CAAA"}
1
+ {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/blocks/plugin/commands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAI7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAEpD,eAAO,MAAM,oBAAoB,EAAE,cAAc,CAAC,kBAAkB,CAC7B,CAAA"}
@@ -1,5 +1,4 @@
1
- import lexicalImport from 'lexical';
2
- const { createCommand } = lexicalImport;
1
+ import { createCommand } from 'lexical';
3
2
  export const INSERT_BLOCK_COMMAND = createCommand('INSERT_BLOCK_COMMAND');
4
3
 
5
4
  //# sourceMappingURL=commands.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/features/blocks/plugin/commands.ts"],"sourcesContent":["import type { LexicalCommand } from 'lexical'\n\nimport lexicalImport from 'lexical'\nconst { createCommand } = lexicalImport\n\nimport type { InsertBlockPayload } from './index.js'\n\nexport const INSERT_BLOCK_COMMAND: LexicalCommand<InsertBlockPayload> =\n createCommand('INSERT_BLOCK_COMMAND')\n"],"names":["lexicalImport","createCommand","INSERT_BLOCK_COMMAND"],"rangeMappings":";;","mappings":"AAEA,OAAOA,mBAAmB,UAAS;AACnC,MAAM,EAAEC,aAAa,EAAE,GAAGD;AAI1B,OAAO,MAAME,uBACXD,cAAc,wBAAuB"}
1
+ {"version":3,"sources":["../../../../../src/field/features/blocks/plugin/commands.ts"],"sourcesContent":["import type { LexicalCommand } from 'lexical'\n\nimport { createCommand } from 'lexical'\n\nimport type { InsertBlockPayload } from './index.js'\n\nexport const INSERT_BLOCK_COMMAND: LexicalCommand<InsertBlockPayload> =\n createCommand('INSERT_BLOCK_COMMAND')\n"],"names":["createCommand","INSERT_BLOCK_COMMAND"],"rangeMappings":";","mappings":"AAEA,SAASA,aAAa,QAAQ,UAAS;AAIvC,OAAO,MAAMC,uBACXD,cAAc,wBAAuB"}
@@ -1,5 +1,6 @@
1
- import React from 'react';
1
+ import type { PluginComponent } from '../../types.js';
2
+ import type { BlocksFeatureClientProps } from '../feature.client.js';
2
3
  import type { BlockFields } from '../nodes/BlocksNode.js';
3
4
  export type InsertBlockPayload = Exclude<BlockFields, 'id'>;
4
- export declare function BlocksPlugin(): React.ReactNode;
5
+ export declare const BlocksPlugin: PluginComponent<BlocksFeatureClientProps>;
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/blocks/plugin/index.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAoB,MAAM,OAAO,CAAA;AAExC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAMzD,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,CAAA;AAE3D,wBAAgB,YAAY,IAAI,KAAK,CAAC,SAAS,CA8C9C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/blocks/plugin/index.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAA;AACpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAMzD,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,CAAA;AAE3D,eAAO,MAAM,YAAY,EAAE,eAAe,CAAC,wBAAwB,CA8ClE,CAAA"}
@@ -1,15 +1,12 @@
1
1
  'use client';
2
- import lexicalComposerContextImport from '@lexical/react/LexicalComposerContext.js';
3
- const { useLexicalComposerContext } = lexicalComposerContextImport;
4
- import lexicalUtilsImport from '@lexical/utils';
5
- const { $insertNodeToNearestRoot, mergeRegister } = lexicalUtilsImport;
6
- import lexicalImport from 'lexical';
7
- const { $getPreviousSelection, $getSelection, $isParagraphNode, $isRangeSelection, COMMAND_PRIORITY_EDITOR } = lexicalImport;
2
+ import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js';
3
+ import { $insertNodeToNearestRoot, mergeRegister } from '@lexical/utils';
4
+ import { $getPreviousSelection, $getSelection, $isParagraphNode, $isRangeSelection, COMMAND_PRIORITY_EDITOR } from 'lexical';
8
5
  import React, { useEffect } from 'react';
9
6
  import { BlocksDrawerComponent } from '../drawer/index.js';
10
7
  import { $createBlockNode, BlockNode } from '../nodes/BlocksNode.js';
11
8
  import { INSERT_BLOCK_COMMAND } from './commands.js';
12
- export function BlocksPlugin() {
9
+ export const BlocksPlugin = ()=>{
13
10
  const [editor] = useLexicalComposerContext();
14
11
  useEffect(()=>{
15
12
  if (!editor.hasNodes([
@@ -38,6 +35,6 @@ export function BlocksPlugin() {
38
35
  editor
39
36
  ]);
40
37
  return /*#__PURE__*/ React.createElement(BlocksDrawerComponent, null);
41
- }
38
+ };
42
39
 
43
40
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/features/blocks/plugin/index.tsx"],"sourcesContent":["'use client'\nimport lexicalComposerContextImport from '@lexical/react/LexicalComposerContext.js'\nconst { useLexicalComposerContext } = lexicalComposerContextImport\nimport lexicalUtilsImport from '@lexical/utils'\nconst { $insertNodeToNearestRoot, mergeRegister } = lexicalUtilsImport\nimport lexicalImport from 'lexical'\nconst {\n $getPreviousSelection,\n $getSelection,\n $isParagraphNode,\n $isRangeSelection,\n COMMAND_PRIORITY_EDITOR,\n} = lexicalImport\n\nimport React, { useEffect } from 'react'\n\nimport type { BlockFields } from '../nodes/BlocksNode.js'\n\nimport { BlocksDrawerComponent } from '../drawer/index.js'\nimport { $createBlockNode, BlockNode } from '../nodes/BlocksNode.js'\nimport { INSERT_BLOCK_COMMAND } from './commands.js'\n\nexport type InsertBlockPayload = Exclude<BlockFields, 'id'>\n\nexport function BlocksPlugin(): React.ReactNode {\n const [editor] = useLexicalComposerContext()\n\n useEffect(() => {\n if (!editor.hasNodes([BlockNode])) {\n throw new Error('BlocksPlugin: BlocksNode not registered on editor')\n }\n\n return mergeRegister(\n editor.registerCommand<InsertBlockPayload>(\n INSERT_BLOCK_COMMAND,\n (payload: InsertBlockPayload) => {\n editor.update(() => {\n const blockNode = $createBlockNode(payload)\n\n const selection = $getSelection() || $getPreviousSelection()\n\n if ($isRangeSelection(selection)) {\n const { focus } = selection\n const focusNode = focus.getNode()\n\n // First, delete currently selected node if it's an empty paragraph and if there are sufficient\n // paragraph nodes (more than 1) left in the parent node, so that we don't \"trap\" the user\n if (\n $isParagraphNode(focusNode) &&\n focusNode.getTextContentSize() === 0 &&\n focusNode\n .getParent()\n .getChildren()\n .filter((node) => $isParagraphNode(node)).length > 1\n ) {\n focusNode.remove()\n }\n\n $insertNodeToNearestRoot(blockNode)\n }\n })\n\n return true\n },\n COMMAND_PRIORITY_EDITOR,\n ),\n )\n }, [editor])\n\n return <BlocksDrawerComponent />\n}\n"],"names":["lexicalComposerContextImport","useLexicalComposerContext","lexicalUtilsImport","$insertNodeToNearestRoot","mergeRegister","lexicalImport","$getPreviousSelection","$getSelection","$isParagraphNode","$isRangeSelection","COMMAND_PRIORITY_EDITOR","React","useEffect","BlocksDrawerComponent","$createBlockNode","BlockNode","INSERT_BLOCK_COMMAND","BlocksPlugin","editor","hasNodes","Error","registerCommand","payload","update","blockNode","selection","focus","focusNode","getNode","getTextContentSize","getParent","getChildren","filter","node","length","remove"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AACA,OAAOA,kCAAkC,2CAA0C;AACnF,MAAM,EAAEC,yBAAyB,EAAE,GAAGD;AACtC,OAAOE,wBAAwB,iBAAgB;AAC/C,MAAM,EAAEC,wBAAwB,EAAEC,aAAa,EAAE,GAAGF;AACpD,OAAOG,mBAAmB,UAAS;AACnC,MAAM,EACJC,qBAAqB,EACrBC,aAAa,EACbC,gBAAgB,EAChBC,iBAAiB,EACjBC,uBAAuB,EACxB,GAAGL;AAEJ,OAAOM,SAASC,SAAS,QAAQ,QAAO;AAIxC,SAASC,qBAAqB,QAAQ,qBAAoB;AAC1D,SAASC,gBAAgB,EAAEC,SAAS,QAAQ,yBAAwB;AACpE,SAASC,oBAAoB,QAAQ,gBAAe;AAIpD,OAAO,SAASC;IACd,MAAM,CAACC,OAAO,GAAGjB;IAEjBW,UAAU;QACR,IAAI,CAACM,OAAOC,QAAQ,CAAC;YAACJ;SAAU,GAAG;YACjC,MAAM,IAAIK,MAAM;QAClB;QAEA,OAAOhB,cACLc,OAAOG,eAAe,CACpBL,sBACA,CAACM;YACCJ,OAAOK,MAAM,CAAC;gBACZ,MAAMC,YAAYV,iBAAiBQ;gBAEnC,MAAMG,YAAYlB,mBAAmBD;gBAErC,IAAIG,kBAAkBgB,YAAY;oBAChC,MAAM,EAAEC,KAAK,EAAE,GAAGD;oBAClB,MAAME,YAAYD,MAAME,OAAO;oBAE/B,+FAA+F;oBAC/F,0FAA0F;oBAC1F,IACEpB,iBAAiBmB,cACjBA,UAAUE,kBAAkB,OAAO,KACnCF,UACGG,SAAS,GACTC,WAAW,GACXC,MAAM,CAAC,CAACC,OAASzB,iBAAiByB,OAAOC,MAAM,GAAG,GACrD;wBACAP,UAAUQ,MAAM;oBAClB;oBAEAhC,yBAAyBqB;gBAC3B;YACF;YAEA,OAAO;QACT,GACAd;IAGN,GAAG;QAACQ;KAAO;IAEX,qBAAO,oBAACL;AACV"}
1
+ {"version":3,"sources":["../../../../../src/field/features/blocks/plugin/index.tsx"],"sourcesContent":["'use client'\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { $insertNodeToNearestRoot, mergeRegister } from '@lexical/utils'\nimport {\n $getPreviousSelection,\n $getSelection,\n $isParagraphNode,\n $isRangeSelection,\n COMMAND_PRIORITY_EDITOR,\n} from 'lexical'\nimport React, { useEffect } from 'react'\n\nimport type { PluginComponent } from '../../types.js'\nimport type { BlocksFeatureClientProps } from '../feature.client.js'\nimport type { BlockFields } from '../nodes/BlocksNode.js'\n\nimport { BlocksDrawerComponent } from '../drawer/index.js'\nimport { $createBlockNode, BlockNode } from '../nodes/BlocksNode.js'\nimport { INSERT_BLOCK_COMMAND } from './commands.js'\n\nexport type InsertBlockPayload = Exclude<BlockFields, 'id'>\n\nexport const BlocksPlugin: PluginComponent<BlocksFeatureClientProps> = () => {\n const [editor] = useLexicalComposerContext()\n\n useEffect(() => {\n if (!editor.hasNodes([BlockNode])) {\n throw new Error('BlocksPlugin: BlocksNode not registered on editor')\n }\n\n return mergeRegister(\n editor.registerCommand<InsertBlockPayload>(\n INSERT_BLOCK_COMMAND,\n (payload: InsertBlockPayload) => {\n editor.update(() => {\n const blockNode = $createBlockNode(payload)\n\n const selection = $getSelection() || $getPreviousSelection()\n\n if ($isRangeSelection(selection)) {\n const { focus } = selection\n const focusNode = focus.getNode()\n\n // First, delete currently selected node if it's an empty paragraph and if there are sufficient\n // paragraph nodes (more than 1) left in the parent node, so that we don't \"trap\" the user\n if (\n $isParagraphNode(focusNode) &&\n focusNode.getTextContentSize() === 0 &&\n focusNode\n .getParent()\n .getChildren()\n .filter((node) => $isParagraphNode(node)).length > 1\n ) {\n focusNode.remove()\n }\n\n $insertNodeToNearestRoot(blockNode)\n }\n })\n\n return true\n },\n COMMAND_PRIORITY_EDITOR,\n ),\n )\n }, [editor])\n\n return <BlocksDrawerComponent />\n}\n"],"names":["useLexicalComposerContext","$insertNodeToNearestRoot","mergeRegister","$getPreviousSelection","$getSelection","$isParagraphNode","$isRangeSelection","COMMAND_PRIORITY_EDITOR","React","useEffect","BlocksDrawerComponent","$createBlockNode","BlockNode","INSERT_BLOCK_COMMAND","BlocksPlugin","editor","hasNodes","Error","registerCommand","payload","update","blockNode","selection","focus","focusNode","getNode","getTextContentSize","getParent","getChildren","filter","node","length","remove"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AACA,SAASA,yBAAyB,QAAQ,2CAA0C;AACpF,SAASC,wBAAwB,EAAEC,aAAa,QAAQ,iBAAgB;AACxE,SACEC,qBAAqB,EACrBC,aAAa,EACbC,gBAAgB,EAChBC,iBAAiB,EACjBC,uBAAuB,QAClB,UAAS;AAChB,OAAOC,SAASC,SAAS,QAAQ,QAAO;AAMxC,SAASC,qBAAqB,QAAQ,qBAAoB;AAC1D,SAASC,gBAAgB,EAAEC,SAAS,QAAQ,yBAAwB;AACpE,SAASC,oBAAoB,QAAQ,gBAAe;AAIpD,OAAO,MAAMC,eAA0D;IACrE,MAAM,CAACC,OAAO,GAAGf;IAEjBS,UAAU;QACR,IAAI,CAACM,OAAOC,QAAQ,CAAC;YAACJ;SAAU,GAAG;YACjC,MAAM,IAAIK,MAAM;QAClB;QAEA,OAAOf,cACLa,OAAOG,eAAe,CACpBL,sBACA,CAACM;YACCJ,OAAOK,MAAM,CAAC;gBACZ,MAAMC,YAAYV,iBAAiBQ;gBAEnC,MAAMG,YAAYlB,mBAAmBD;gBAErC,IAAIG,kBAAkBgB,YAAY;oBAChC,MAAM,EAAEC,KAAK,EAAE,GAAGD;oBAClB,MAAME,YAAYD,MAAME,OAAO;oBAE/B,+FAA+F;oBAC/F,0FAA0F;oBAC1F,IACEpB,iBAAiBmB,cACjBA,UAAUE,kBAAkB,OAAO,KACnCF,UACGG,SAAS,GACTC,WAAW,GACXC,MAAM,CAAC,CAACC,OAASzB,iBAAiByB,OAAOC,MAAM,GAAG,GACrD;wBACAP,UAAUQ,MAAM;oBAClB;oBAEA/B,yBAAyBoB;gBAC3B;YACF;YAEA,OAAO;QACT,GACAd;IAGN,GAAG;QAACQ;KAAO;IAEX,qBAAO,oBAACL;AACV,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"populationPromise.d.ts","sourceRoot":"","sources":["../../../../src/field/features/blocks/populationPromise.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAIhE,eAAO,MAAM,yBAAyB,UAC7B,kBAAkB,KACxB,kBAAkB,mBAAmB,CA4DvC,CAAA"}
1
+ {"version":3,"file":"populationPromise.d.ts","sourceRoot":"","sources":["../../../../src/field/features/blocks/populationPromise.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAIhE,eAAO,MAAM,yBAAyB,UAC7B,kBAAkB,KACxB,kBAAkB,mBAAmB,CA8CvC,CAAA"}
@@ -1,25 +1,11 @@
1
- import { sanitizeFields } from 'payload/config';
2
1
  import { recurseNestedFields } from '../../../populate/recurseNestedFields.js';
3
2
  export const blockPopulationPromiseHOC = (props)=>{
4
- const blockPopulationPromise = ({ context, currentDepth, depth, editorPopulationPromises, findMany, flattenLocales, node, overrideAccess, populationPromises, req, showHiddenFields, siblingDoc })=>{
5
- const blocks = props.blocks;
3
+ const blockPopulationPromise = ({ context, currentDepth, depth, draft, editorPopulationPromises, fieldPromises, findMany, flattenLocales, node, overrideAccess, populationPromises, req, showHiddenFields, siblingDoc })=>{
6
4
  const blockFieldData = node.fields;
7
- const promises = [];
8
- // Sanitize block's fields here. This is done here and not in the feature, because the payload config is available here
9
- const payloadConfig = req.payload.config;
10
- const validRelationships = payloadConfig.collections.map((c)=>c.slug) || [];
11
- blocks.forEach((block)=>{
12
- block.fields = sanitizeFields({
13
- config: payloadConfig,
14
- fields: block.fields,
15
- requireFieldLevelRichTextEditor: true,
16
- validRelationships
17
- });
18
- });
19
5
  // find block used in this node
20
6
  const block = props.blocks.find((block)=>block.slug === blockFieldData.blockType);
21
7
  if (!block || !block?.fields?.length || !blockFieldData) {
22
- return promises;
8
+ return;
23
9
  }
24
10
  recurseNestedFields({
25
11
  context,
@@ -27,18 +13,18 @@ export const blockPopulationPromiseHOC = (props)=>{
27
13
  data: blockFieldData,
28
14
  depth,
29
15
  editorPopulationPromises,
16
+ fieldPromises,
30
17
  fields: block.fields,
31
18
  findMany,
32
19
  flattenLocales,
33
20
  overrideAccess,
34
21
  populationPromises,
35
- promises,
36
22
  req,
37
23
  showHiddenFields,
38
24
  // The afterReadPromise gets its data from looking for field.name inside the siblingDoc. Thus, here we cannot pass the whole document's siblingDoc, but only the siblingDoc (sibling fields) of the current field.
25
+ draft,
39
26
  siblingDoc: blockFieldData
40
27
  });
41
- return promises;
42
28
  };
43
29
  return blockPopulationPromise;
44
30
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/features/blocks/populationPromise.ts"],"sourcesContent":["import type { Block } from 'payload/types'\n\nimport { sanitizeFields } from 'payload/config'\n\nimport type { PopulationPromise } from '../types.js'\nimport type { BlocksFeatureProps } from './feature.server.js'\nimport type { SerializedBlockNode } from './nodes/BlocksNode.js'\n\nimport { recurseNestedFields } from '../../../populate/recurseNestedFields.js'\n\nexport const blockPopulationPromiseHOC = (\n props: BlocksFeatureProps,\n): PopulationPromise<SerializedBlockNode> => {\n const blockPopulationPromise: PopulationPromise<SerializedBlockNode> = ({\n context,\n currentDepth,\n depth,\n editorPopulationPromises,\n findMany,\n flattenLocales,\n node,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n }) => {\n const blocks: Block[] = props.blocks\n const blockFieldData = node.fields\n\n const promises: Promise<void>[] = []\n\n // Sanitize block's fields here. This is done here and not in the feature, because the payload config is available here\n const payloadConfig = req.payload.config\n const validRelationships = payloadConfig.collections.map((c) => c.slug) || []\n blocks.forEach((block) => {\n block.fields = sanitizeFields({\n config: payloadConfig,\n fields: block.fields,\n requireFieldLevelRichTextEditor: true,\n validRelationships,\n })\n })\n\n // find block used in this node\n const block = props.blocks.find((block) => block.slug === blockFieldData.blockType)\n if (!block || !block?.fields?.length || !blockFieldData) {\n return promises\n }\n\n recurseNestedFields({\n context,\n currentDepth,\n data: blockFieldData,\n depth,\n editorPopulationPromises,\n fields: block.fields,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n promises,\n req,\n showHiddenFields,\n // The afterReadPromise gets its data from looking for field.name inside the siblingDoc. Thus, here we cannot pass the whole document's siblingDoc, but only the siblingDoc (sibling fields) of the current field.\n siblingDoc: blockFieldData,\n })\n\n return promises\n }\n\n return blockPopulationPromise\n}\n"],"names":["sanitizeFields","recurseNestedFields","blockPopulationPromiseHOC","props","blockPopulationPromise","context","currentDepth","depth","editorPopulationPromises","findMany","flattenLocales","node","overrideAccess","populationPromises","req","showHiddenFields","siblingDoc","blocks","blockFieldData","fields","promises","payloadConfig","payload","config","validRelationships","collections","map","c","slug","forEach","block","requireFieldLevelRichTextEditor","find","blockType","length","data"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,SAASA,cAAc,QAAQ,iBAAgB;AAM/C,SAASC,mBAAmB,QAAQ,2CAA0C;AAE9E,OAAO,MAAMC,4BAA4B,CACvCC;IAEA,MAAMC,yBAAiE,CAAC,EACtEC,OAAO,EACPC,YAAY,EACZC,KAAK,EACLC,wBAAwB,EACxBC,QAAQ,EACRC,cAAc,EACdC,IAAI,EACJC,cAAc,EACdC,kBAAkB,EAClBC,GAAG,EACHC,gBAAgB,EAChBC,UAAU,EACX;QACC,MAAMC,SAAkBd,MAAMc,MAAM;QACpC,MAAMC,iBAAiBP,KAAKQ,MAAM;QAElC,MAAMC,WAA4B,EAAE;QAEpC,uHAAuH;QACvH,MAAMC,gBAAgBP,IAAIQ,OAAO,CAACC,MAAM;QACxC,MAAMC,qBAAqBH,cAAcI,WAAW,CAACC,GAAG,CAAC,CAACC,IAAMA,EAAEC,IAAI,KAAK,EAAE;QAC7EX,OAAOY,OAAO,CAAC,CAACC;YACdA,MAAMX,MAAM,GAAGnB,eAAe;gBAC5BuB,QAAQF;gBACRF,QAAQW,MAAMX,MAAM;gBACpBY,iCAAiC;gBACjCP;YACF;QACF;QAEA,+BAA+B;QAC/B,MAAMM,QAAQ3B,MAAMc,MAAM,CAACe,IAAI,CAAC,CAACF,QAAUA,MAAMF,IAAI,KAAKV,eAAee,SAAS;QAClF,IAAI,CAACH,SAAS,CAACA,OAAOX,QAAQe,UAAU,CAAChB,gBAAgB;YACvD,OAAOE;QACT;QAEAnB,oBAAoB;YAClBI;YACAC;YACA6B,MAAMjB;YACNX;YACAC;YACAW,QAAQW,MAAMX,MAAM;YACpBV;YACAC;YACAE;YACAC;YACAO;YACAN;YACAC;YACA,kNAAkN;YAClNC,YAAYE;QACd;QAEA,OAAOE;IACT;IAEA,OAAOhB;AACT,EAAC"}
1
+ {"version":3,"sources":["../../../../src/field/features/blocks/populationPromise.ts"],"sourcesContent":["import type { PopulationPromise } from '../types.js'\nimport type { BlocksFeatureProps } from './feature.server.js'\nimport type { SerializedBlockNode } from './nodes/BlocksNode.js'\n\nimport { recurseNestedFields } from '../../../populate/recurseNestedFields.js'\n\nexport const blockPopulationPromiseHOC = (\n props: BlocksFeatureProps,\n): PopulationPromise<SerializedBlockNode> => {\n const blockPopulationPromise: PopulationPromise<SerializedBlockNode> = ({\n context,\n currentDepth,\n depth,\n draft,\n editorPopulationPromises,\n fieldPromises,\n findMany,\n flattenLocales,\n node,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n }) => {\n const blockFieldData = node.fields\n\n // find block used in this node\n const block = props.blocks.find((block) => block.slug === blockFieldData.blockType)\n if (!block || !block?.fields?.length || !blockFieldData) {\n return\n }\n\n recurseNestedFields({\n context,\n currentDepth,\n data: blockFieldData,\n depth,\n editorPopulationPromises,\n fieldPromises,\n fields: block.fields,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n // The afterReadPromise gets its data from looking for field.name inside the siblingDoc. Thus, here we cannot pass the whole document's siblingDoc, but only the siblingDoc (sibling fields) of the current field.\n draft,\n siblingDoc: blockFieldData,\n })\n }\n\n return blockPopulationPromise\n}\n"],"names":["recurseNestedFields","blockPopulationPromiseHOC","props","blockPopulationPromise","context","currentDepth","depth","draft","editorPopulationPromises","fieldPromises","findMany","flattenLocales","node","overrideAccess","populationPromises","req","showHiddenFields","siblingDoc","blockFieldData","fields","block","blocks","find","slug","blockType","length","data"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAIA,SAASA,mBAAmB,QAAQ,2CAA0C;AAE9E,OAAO,MAAMC,4BAA4B,CACvCC;IAEA,MAAMC,yBAAiE,CAAC,EACtEC,OAAO,EACPC,YAAY,EACZC,KAAK,EACLC,KAAK,EACLC,wBAAwB,EACxBC,aAAa,EACbC,QAAQ,EACRC,cAAc,EACdC,IAAI,EACJC,cAAc,EACdC,kBAAkB,EAClBC,GAAG,EACHC,gBAAgB,EAChBC,UAAU,EACX;QACC,MAAMC,iBAAiBN,KAAKO,MAAM;QAElC,+BAA+B;QAC/B,MAAMC,QAAQlB,MAAMmB,MAAM,CAACC,IAAI,CAAC,CAACF,QAAUA,MAAMG,IAAI,KAAKL,eAAeM,SAAS;QAClF,IAAI,CAACJ,SAAS,CAACA,OAAOD,QAAQM,UAAU,CAACP,gBAAgB;YACvD;QACF;QAEAlB,oBAAoB;YAClBI;YACAC;YACAqB,MAAMR;YACNZ;YACAE;YACAC;YACAU,QAAQC,MAAMD,MAAM;YACpBT;YACAC;YACAE;YACAC;YACAC;YACAC;YACA,kNAAkN;YAClNT;YACAU,YAAYC;QACd;IACF;IAEA,OAAOf;AACT,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../src/field/features/blocks/validate.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAEhE,eAAO,MAAM,kBAAkB,UACtB,kBAAkB,KACxB,eAAe,mBAAmB,CAmEpC,CAAA"}
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../src/field/features/blocks/validate.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAC7D,OAAO,KAAK,EAAe,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAE7E,eAAO,MAAM,kBAAkB,UACtB,kBAAkB,KACxB,eAAe,mBAAmB,CA2CpC,CAAA"}