@payloadcms/richtext-lexical 3.0.0-beta.4 → 3.0.0-beta.40

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 (837) hide show
  1. package/dist/cell/index.d.ts +5 -2
  2. package/dist/cell/index.d.ts.map +1 -1
  3. package/dist/cell/index.js +44 -29
  4. package/dist/cell/index.js.map +1 -1
  5. package/dist/exports/components.d.ts +7 -2
  6. package/dist/exports/components.d.ts.map +1 -1
  7. package/dist/exports/components.js +7 -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 +66 -47
  12. package/dist/field/Field.js.map +1 -1
  13. package/dist/field/features/align/feature.client.d.ts +4 -1
  14. package/dist/field/features/align/feature.client.d.ts.map +1 -1
  15. package/dist/field/features/align/feature.client.js +135 -54
  16. package/dist/field/features/align/feature.client.js.map +1 -1
  17. package/dist/field/features/align/feature.server.d.ts.map +1 -1
  18. package/dist/field/features/align/feature.server.js +2 -0
  19. package/dist/field/features/align/feature.server.js.map +1 -1
  20. package/dist/field/features/align/i18n.d.ts +3 -0
  21. package/dist/field/features/align/i18n.d.ts.map +1 -0
  22. package/dist/field/features/align/i18n.js +196 -0
  23. package/dist/field/features/align/i18n.js.map +1 -0
  24. package/dist/field/features/align/toolbarAlignGroup.d.ts +3 -0
  25. package/dist/field/features/align/toolbarAlignGroup.d.ts.map +1 -0
  26. package/dist/field/features/align/toolbarAlignGroup.js +12 -0
  27. package/dist/field/features/align/toolbarAlignGroup.js.map +1 -0
  28. package/dist/field/features/blockquote/feature.client.d.ts +4 -1
  29. package/dist/field/features/blockquote/feature.client.d.ts.map +1 -1
  30. package/dist/field/features/blockquote/feature.client.js +60 -46
  31. package/dist/field/features/blockquote/feature.client.js.map +1 -1
  32. package/dist/field/features/blockquote/feature.server.d.ts +1 -1
  33. package/dist/field/features/blockquote/feature.server.d.ts.map +1 -1
  34. package/dist/field/features/blockquote/feature.server.js +9 -7
  35. package/dist/field/features/blockquote/feature.server.js.map +1 -1
  36. package/dist/field/features/blockquote/i18n.d.ts +3 -0
  37. package/dist/field/features/blockquote/i18n.d.ts.map +1 -0
  38. package/dist/field/features/blockquote/i18n.js +100 -0
  39. package/dist/field/features/blockquote/i18n.js.map +1 -0
  40. package/dist/field/features/blockquote/markdownTransformer.d.ts.map +1 -1
  41. package/dist/field/features/blockquote/markdownTransformer.js +2 -4
  42. package/dist/field/features/blockquote/markdownTransformer.js.map +1 -1
  43. package/dist/field/features/blocks/component/BlockContent.d.ts.map +1 -1
  44. package/dist/field/features/blocks/component/BlockContent.js +65 -50
  45. package/dist/field/features/blocks/component/BlockContent.js.map +1 -1
  46. package/dist/field/features/blocks/component/index.d.ts.map +1 -1
  47. package/dist/field/features/blocks/component/index.js +60 -17
  48. package/dist/field/features/blocks/component/index.js.map +1 -1
  49. package/dist/field/features/blocks/component/index.scss +0 -4
  50. package/dist/field/features/blocks/drawer/index.d.ts.map +1 -1
  51. package/dist/field/features/blocks/drawer/index.js +4 -5
  52. package/dist/field/features/blocks/drawer/index.js.map +1 -1
  53. package/dist/field/features/blocks/feature.client.d.ts +4 -1
  54. package/dist/field/features/blocks/feature.client.d.ts.map +1 -1
  55. package/dist/field/features/blocks/feature.client.js +58 -27
  56. package/dist/field/features/blocks/feature.client.js.map +1 -1
  57. package/dist/field/features/blocks/feature.server.d.ts +2 -5
  58. package/dist/field/features/blocks/feature.server.d.ts.map +1 -1
  59. package/dist/field/features/blocks/feature.server.js +111 -77
  60. package/dist/field/features/blocks/feature.server.js.map +1 -1
  61. package/dist/field/features/blocks/i18n.d.ts +3 -0
  62. package/dist/field/features/blocks/i18n.d.ts.map +1 -0
  63. package/dist/field/features/blocks/i18n.js +100 -0
  64. package/dist/field/features/blocks/i18n.js.map +1 -0
  65. package/dist/field/features/blocks/nodes/BlocksNode.d.ts +2 -4
  66. package/dist/field/features/blocks/nodes/BlocksNode.d.ts.map +1 -1
  67. package/dist/field/features/blocks/nodes/BlocksNode.js +3 -3
  68. package/dist/field/features/blocks/nodes/BlocksNode.js.map +1 -1
  69. package/dist/field/features/blocks/plugin/commands.d.ts.map +1 -1
  70. package/dist/field/features/blocks/plugin/commands.js +1 -2
  71. package/dist/field/features/blocks/plugin/commands.js.map +1 -1
  72. package/dist/field/features/blocks/plugin/index.d.ts +3 -2
  73. package/dist/field/features/blocks/plugin/index.d.ts.map +1 -1
  74. package/dist/field/features/blocks/plugin/index.js +10 -11
  75. package/dist/field/features/blocks/plugin/index.js.map +1 -1
  76. package/dist/field/features/blocks/populationPromise.d.ts.map +1 -1
  77. package/dist/field/features/blocks/populationPromise.js +5 -19
  78. package/dist/field/features/blocks/populationPromise.js.map +1 -1
  79. package/dist/field/features/blocks/validate.d.ts.map +1 -1
  80. package/dist/field/features/blocks/validate.js +22 -36
  81. package/dist/field/features/blocks/validate.js.map +1 -1
  82. package/dist/field/features/converters/html/field/index.d.ts +8 -2
  83. package/dist/field/features/converters/html/field/index.d.ts.map +1 -1
  84. package/dist/field/features/converters/html/field/index.js +36 -5
  85. package/dist/field/features/converters/html/field/index.js.map +1 -1
  86. package/dist/field/features/createFeaturePropComponent.d.ts.map +1 -1
  87. package/dist/field/features/createFeaturePropComponent.js +6 -1
  88. package/dist/field/features/createFeaturePropComponent.js.map +1 -1
  89. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.d.ts +4 -1
  90. package/dist/field/features/debug/testRecorder/feature.client.d.ts.map +1 -0
  91. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.js.map +1 -1
  92. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.d.ts.map +1 -1
  93. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.js +1 -1
  94. package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.js.map +1 -1
  95. package/dist/field/features/debug/testRecorder/plugin/index.d.ts +5 -0
  96. package/dist/field/features/debug/testRecorder/plugin/index.d.ts.map +1 -0
  97. package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.js +68 -44
  98. package/dist/field/features/debug/testRecorder/plugin/index.js.map +1 -0
  99. package/dist/field/features/debug/{treeview → treeView}/feature.client.d.ts +4 -1
  100. package/dist/field/features/debug/treeView/feature.client.d.ts.map +1 -0
  101. package/dist/field/features/debug/{treeview → treeView}/feature.client.js.map +1 -1
  102. package/dist/field/features/debug/{treeview → treeView}/feature.server.d.ts.map +1 -1
  103. package/dist/field/features/debug/{treeview → treeView}/feature.server.js +1 -1
  104. package/dist/field/features/debug/{treeview → treeView}/feature.server.js.map +1 -1
  105. package/dist/field/features/debug/treeView/plugin/index.d.ts +4 -0
  106. package/dist/field/features/debug/treeView/plugin/index.d.ts.map +1 -0
  107. package/dist/field/features/debug/{treeview → treeView}/plugin/index.js +6 -7
  108. package/dist/field/features/debug/treeView/plugin/index.js.map +1 -0
  109. package/dist/field/features/format/bold/feature.client.d.ts +4 -1
  110. package/dist/field/features/format/bold/feature.client.d.ts.map +1 -1
  111. package/dist/field/features/format/bold/feature.client.js +26 -23
  112. package/dist/field/features/format/bold/feature.client.js.map +1 -1
  113. package/dist/field/features/format/{inlinecode → inlineCode}/feature.client.d.ts +4 -1
  114. package/dist/field/features/format/inlineCode/feature.client.d.ts.map +1 -0
  115. package/dist/field/features/format/inlineCode/feature.client.js +46 -0
  116. package/dist/field/features/format/inlineCode/feature.client.js.map +1 -0
  117. package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.d.ts.map +1 -1
  118. package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.js +1 -1
  119. package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.js.map +1 -1
  120. package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.d.ts.map +1 -1
  121. package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.js.map +1 -1
  122. package/dist/field/features/format/italic/feature.client.d.ts +4 -1
  123. package/dist/field/features/format/italic/feature.client.d.ts.map +1 -1
  124. package/dist/field/features/format/italic/feature.client.js +27 -24
  125. package/dist/field/features/format/italic/feature.client.js.map +1 -1
  126. package/dist/field/features/format/shared/toolbarFormatGroup.d.ts +3 -0
  127. package/dist/field/features/format/shared/toolbarFormatGroup.d.ts.map +1 -0
  128. package/dist/field/features/format/shared/toolbarFormatGroup.js +10 -0
  129. package/dist/field/features/format/shared/toolbarFormatGroup.js.map +1 -0
  130. package/dist/field/features/format/strikethrough/feature.client.d.ts +4 -1
  131. package/dist/field/features/format/strikethrough/feature.client.d.ts.map +1 -1
  132. package/dist/field/features/format/strikethrough/feature.client.js +27 -24
  133. package/dist/field/features/format/strikethrough/feature.client.js.map +1 -1
  134. package/dist/field/features/format/subscript/feature.client.d.ts +4 -1
  135. package/dist/field/features/format/subscript/feature.client.d.ts.map +1 -1
  136. package/dist/field/features/format/subscript/feature.client.js +25 -22
  137. package/dist/field/features/format/subscript/feature.client.js.map +1 -1
  138. package/dist/field/features/format/superscript/feature.client.d.ts +4 -1
  139. package/dist/field/features/format/superscript/feature.client.d.ts.map +1 -1
  140. package/dist/field/features/format/superscript/feature.client.js +25 -22
  141. package/dist/field/features/format/superscript/feature.client.js.map +1 -1
  142. package/dist/field/features/format/underline/feature.client.d.ts +4 -1
  143. package/dist/field/features/format/underline/feature.client.d.ts.map +1 -1
  144. package/dist/field/features/format/underline/feature.client.js +25 -22
  145. package/dist/field/features/format/underline/feature.client.js.map +1 -1
  146. package/dist/field/features/heading/feature.client.d.ts +4 -1
  147. package/dist/field/features/heading/feature.client.d.ts.map +1 -1
  148. package/dist/field/features/heading/feature.client.js +76 -54
  149. package/dist/field/features/heading/feature.client.js.map +1 -1
  150. package/dist/field/features/heading/feature.server.d.ts.map +1 -1
  151. package/dist/field/features/heading/feature.server.js +7 -5
  152. package/dist/field/features/heading/feature.server.js.map +1 -1
  153. package/dist/field/features/heading/i18n.d.ts +3 -0
  154. package/dist/field/features/heading/i18n.d.ts.map +1 -0
  155. package/dist/field/features/heading/i18n.js +100 -0
  156. package/dist/field/features/heading/i18n.js.map +1 -0
  157. package/dist/field/features/heading/markdownTransformer.d.ts.map +1 -1
  158. package/dist/field/features/heading/markdownTransformer.js +1 -2
  159. package/dist/field/features/heading/markdownTransformer.js.map +1 -1
  160. package/dist/field/features/horizontalRule/component/index.d.ts +10 -0
  161. package/dist/field/features/horizontalRule/component/index.d.ts.map +1 -0
  162. package/dist/field/features/horizontalRule/component/index.js +62 -0
  163. package/dist/field/features/horizontalRule/component/index.js.map +1 -0
  164. package/dist/field/features/horizontalRule/feature.client.d.ts +6 -0
  165. package/dist/field/features/horizontalRule/feature.client.d.ts.map +1 -0
  166. package/dist/field/features/horizontalRule/feature.client.js +77 -0
  167. package/dist/field/features/horizontalRule/feature.client.js.map +1 -0
  168. package/dist/field/features/horizontalRule/feature.server.d.ts +3 -0
  169. package/dist/field/features/horizontalRule/feature.server.d.ts.map +1 -0
  170. package/dist/field/features/horizontalRule/feature.server.js +38 -0
  171. package/dist/field/features/horizontalRule/feature.server.js.map +1 -0
  172. package/dist/field/features/horizontalRule/i18n.d.ts +3 -0
  173. package/dist/field/features/horizontalRule/i18n.d.ts.map +1 -0
  174. package/dist/field/features/horizontalRule/i18n.js +100 -0
  175. package/dist/field/features/horizontalRule/i18n.js.map +1 -0
  176. package/dist/field/features/horizontalRule/markdownTransformer.d.ts +3 -0
  177. package/dist/field/features/horizontalRule/markdownTransformer.d.ts.map +1 -0
  178. package/dist/field/features/horizontalRule/markdownTransformer.js +23 -0
  179. package/dist/field/features/horizontalRule/markdownTransformer.js.map +1 -0
  180. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.d.ts +53 -0
  181. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.d.ts.map +1 -0
  182. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.js +89 -0
  183. package/dist/field/features/horizontalRule/nodes/HorizontalRuleNode.js.map +1 -0
  184. package/dist/field/features/horizontalRule/plugin/index.d.ts +7 -0
  185. package/dist/field/features/horizontalRule/plugin/index.d.ts.map +1 -0
  186. package/dist/field/features/horizontalRule/plugin/index.js +31 -0
  187. package/dist/field/features/horizontalRule/plugin/index.js.map +1 -0
  188. package/dist/field/features/horizontalRule/plugin/index.scss +20 -0
  189. package/dist/field/features/indent/feature.client.d.ts +4 -1
  190. package/dist/field/features/indent/feature.client.d.ts.map +1 -1
  191. package/dist/field/features/indent/feature.client.js +47 -42
  192. package/dist/field/features/indent/feature.client.js.map +1 -1
  193. package/dist/field/features/indent/feature.server.d.ts.map +1 -1
  194. package/dist/field/features/indent/feature.server.js +2 -0
  195. package/dist/field/features/indent/feature.server.js.map +1 -1
  196. package/dist/field/features/indent/i18n.d.ts +3 -0
  197. package/dist/field/features/indent/i18n.d.ts.map +1 -0
  198. package/dist/field/features/indent/i18n.js +132 -0
  199. package/dist/field/features/indent/i18n.js.map +1 -0
  200. package/dist/field/features/indent/toolbarIndentGroup.d.ts +3 -0
  201. package/dist/field/features/indent/toolbarIndentGroup.d.ts.map +1 -0
  202. package/dist/field/features/indent/toolbarIndentGroup.js +10 -0
  203. package/dist/field/features/indent/toolbarIndentGroup.js.map +1 -0
  204. package/dist/field/features/link/drawer/baseFields.d.ts +2 -2
  205. package/dist/field/features/link/drawer/baseFields.d.ts.map +1 -1
  206. package/dist/field/features/link/drawer/baseFields.js +30 -43
  207. package/dist/field/features/link/drawer/baseFields.js.map +1 -1
  208. package/dist/field/features/link/drawer/index.js +30 -21
  209. package/dist/field/features/link/drawer/index.js.map +1 -1
  210. package/dist/field/features/link/drawer/types.d.ts +4 -2
  211. package/dist/field/features/link/drawer/types.d.ts.map +1 -1
  212. package/dist/field/features/link/drawer/types.js.map +1 -1
  213. package/dist/field/features/link/feature.client.d.ts +13 -1
  214. package/dist/field/features/link/feature.client.d.ts.map +1 -1
  215. package/dist/field/features/link/feature.client.js +65 -47
  216. package/dist/field/features/link/feature.client.js.map +1 -1
  217. package/dist/field/features/link/feature.server.d.ts +10 -5
  218. package/dist/field/features/link/feature.server.d.ts.map +1 -1
  219. package/dist/field/features/link/feature.server.js +58 -11
  220. package/dist/field/features/link/feature.server.js.map +1 -1
  221. package/dist/field/features/link/i18n.d.ts +3 -0
  222. package/dist/field/features/link/i18n.d.ts.map +1 -0
  223. package/dist/field/features/link/i18n.js +100 -0
  224. package/dist/field/features/link/i18n.js.map +1 -0
  225. package/dist/field/features/link/markdownTransformer.d.ts +6 -0
  226. package/dist/field/features/link/markdownTransformer.d.ts.map +1 -0
  227. package/dist/field/features/link/markdownTransformer.js +50 -0
  228. package/dist/field/features/link/markdownTransformer.js.map +1 -0
  229. package/dist/field/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  230. package/dist/field/features/link/nodes/AutoLinkNode.js +1 -2
  231. package/dist/field/features/link/nodes/AutoLinkNode.js.map +1 -1
  232. package/dist/field/features/link/nodes/LinkNode.d.ts +4 -4
  233. package/dist/field/features/link/nodes/LinkNode.d.ts.map +1 -1
  234. package/dist/field/features/link/nodes/LinkNode.js +6 -7
  235. package/dist/field/features/link/nodes/LinkNode.js.map +1 -1
  236. package/dist/field/features/link/plugins/autoLink/index.d.ts +3 -2
  237. package/dist/field/features/link/plugins/autoLink/index.d.ts.map +1 -1
  238. package/dist/field/features/link/plugins/autoLink/index.js +11 -12
  239. package/dist/field/features/link/plugins/autoLink/index.js.map +1 -1
  240. package/dist/field/features/link/plugins/clickableLink/index.d.ts +3 -2
  241. package/dist/field/features/link/plugins/clickableLink/index.d.ts.map +1 -1
  242. package/dist/field/features/link/plugins/clickableLink/index.js +4 -3
  243. package/dist/field/features/link/plugins/clickableLink/index.js.map +1 -1
  244. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.d.ts.map +1 -1
  245. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js +1 -2
  246. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -1
  247. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  248. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js +177 -135
  249. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  250. package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts +3 -4
  251. package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts.map +1 -1
  252. package/dist/field/features/link/plugins/floatingLinkEditor/index.js +2 -1
  253. package/dist/field/features/link/plugins/floatingLinkEditor/index.js.map +1 -1
  254. package/dist/field/features/link/plugins/floatingLinkEditor/index.scss +11 -3
  255. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts +1 -3
  256. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +1 -1
  257. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js +12 -30
  258. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js.map +1 -1
  259. package/dist/field/features/link/plugins/link/index.d.ts +3 -1
  260. package/dist/field/features/link/plugins/link/index.d.ts.map +1 -1
  261. package/dist/field/features/link/plugins/link/index.js +5 -14
  262. package/dist/field/features/link/plugins/link/index.js.map +1 -1
  263. package/dist/field/features/link/populationPromise.d.ts.map +1 -1
  264. package/dist/field/features/link/populationPromise.js +11 -26
  265. package/dist/field/features/link/populationPromise.js.map +1 -1
  266. package/dist/field/features/link/validate.d.ts +5 -0
  267. package/dist/field/features/link/validate.d.ts.map +1 -0
  268. package/dist/field/features/link/validate.js +32 -0
  269. package/dist/field/features/link/validate.js.map +1 -0
  270. package/dist/field/features/lists/checklist/feature.client.d.ts +4 -1
  271. package/dist/field/features/lists/checklist/feature.client.d.ts.map +1 -1
  272. package/dist/field/features/lists/checklist/feature.client.js +69 -44
  273. package/dist/field/features/lists/checklist/feature.client.js.map +1 -1
  274. package/dist/field/features/lists/checklist/feature.server.d.ts +1 -1
  275. package/dist/field/features/lists/checklist/feature.server.d.ts.map +1 -1
  276. package/dist/field/features/lists/checklist/feature.server.js +12 -10
  277. package/dist/field/features/lists/checklist/feature.server.js.map +1 -1
  278. package/dist/field/features/lists/checklist/i18n.d.ts +3 -0
  279. package/dist/field/features/lists/checklist/i18n.d.ts.map +1 -0
  280. package/dist/field/features/lists/checklist/i18n.js +100 -0
  281. package/dist/field/features/lists/checklist/i18n.js.map +1 -0
  282. package/dist/field/features/lists/checklist/markdownTransformers.d.ts.map +1 -1
  283. package/dist/field/features/lists/checklist/markdownTransformers.js +2 -3
  284. package/dist/field/features/lists/checklist/markdownTransformers.js.map +1 -1
  285. package/dist/field/features/lists/checklist/plugin/index.d.ts +2 -2
  286. package/dist/field/features/lists/checklist/plugin/index.d.ts.map +1 -1
  287. package/dist/field/features/lists/checklist/plugin/index.js +5 -5
  288. package/dist/field/features/lists/checklist/plugin/index.js.map +1 -1
  289. package/dist/field/features/lists/htmlConverter.d.ts.map +1 -1
  290. package/dist/field/features/lists/htmlConverter.js +13 -6
  291. package/dist/field/features/lists/htmlConverter.js.map +1 -1
  292. package/dist/field/features/lists/{orderedlist → orderedList}/feature.client.d.ts +4 -1
  293. package/dist/field/features/lists/orderedList/feature.client.d.ts.map +1 -0
  294. package/dist/field/features/lists/orderedList/feature.client.js +97 -0
  295. package/dist/field/features/lists/orderedList/feature.client.js.map +1 -0
  296. package/dist/field/features/lists/orderedList/feature.server.d.ts.map +1 -0
  297. package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.js +10 -8
  298. package/dist/field/features/lists/orderedList/feature.server.js.map +1 -0
  299. package/dist/field/features/lists/orderedList/i18n.d.ts +3 -0
  300. package/dist/field/features/lists/orderedList/i18n.d.ts.map +1 -0
  301. package/dist/field/features/lists/orderedList/i18n.js +100 -0
  302. package/dist/field/features/lists/orderedList/i18n.js.map +1 -0
  303. package/dist/field/features/lists/orderedList/markdownTransformer.d.ts.map +1 -0
  304. package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.js +2 -3
  305. package/dist/field/features/lists/orderedList/markdownTransformer.js.map +1 -0
  306. package/dist/field/features/lists/plugin/index.d.ts +2 -2
  307. package/dist/field/features/lists/plugin/index.d.ts.map +1 -1
  308. package/dist/field/features/lists/plugin/index.js +5 -5
  309. package/dist/field/features/lists/plugin/index.js.map +1 -1
  310. package/dist/field/features/lists/{common → shared}/markdown.d.ts.map +1 -1
  311. package/dist/field/features/lists/{common → shared}/markdown.js +1 -2
  312. package/dist/field/features/lists/shared/markdown.js.map +1 -0
  313. package/dist/field/features/lists/shared/slashMenuListGroup.d.ts +3 -0
  314. package/dist/field/features/lists/shared/slashMenuListGroup.d.ts.map +1 -0
  315. package/dist/field/features/lists/shared/slashMenuListGroup.js +11 -0
  316. package/dist/field/features/lists/shared/slashMenuListGroup.js.map +1 -0
  317. package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.client.d.ts +4 -1
  318. package/dist/field/features/lists/unorderedList/feature.client.d.ts.map +1 -0
  319. package/dist/field/features/lists/unorderedList/feature.client.js +97 -0
  320. package/dist/field/features/lists/unorderedList/feature.client.js.map +1 -0
  321. package/dist/field/features/lists/unorderedList/feature.server.d.ts.map +1 -0
  322. package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.js +9 -7
  323. package/dist/field/features/lists/unorderedList/feature.server.js.map +1 -0
  324. package/dist/field/features/lists/unorderedList/i18n.d.ts +3 -0
  325. package/dist/field/features/lists/unorderedList/i18n.d.ts.map +1 -0
  326. package/dist/field/features/lists/unorderedList/i18n.js +100 -0
  327. package/dist/field/features/lists/unorderedList/i18n.js.map +1 -0
  328. package/dist/field/features/lists/unorderedList/markdownTransformer.d.ts.map +1 -0
  329. package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.js +2 -3
  330. package/dist/field/features/lists/unorderedList/markdownTransformer.js.map +1 -0
  331. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +1 -1
  332. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +2 -4
  333. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -1
  334. package/dist/field/features/migrations/lexicalPluginToLexical/feature.client.d.ts +4 -1
  335. package/dist/field/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +1 -1
  336. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +9 -1
  337. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  338. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +2 -4
  339. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
  340. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +4 -5
  341. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  342. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts +1 -1
  343. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js +1 -1
  344. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js.map +1 -1
  345. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js +2 -2
  346. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js.map +1 -1
  347. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +1 -1
  348. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.js +2 -4
  349. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -1
  350. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +1 -1
  351. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.js +2 -4
  352. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -1
  353. package/dist/field/features/migrations/slateToLexical/converter/index.d.ts.map +1 -1
  354. package/dist/field/features/migrations/slateToLexical/converter/index.js +2 -1
  355. package/dist/field/features/migrations/slateToLexical/converter/index.js.map +1 -1
  356. package/dist/field/features/migrations/slateToLexical/feature.client.d.ts +4 -1
  357. package/dist/field/features/migrations/slateToLexical/feature.client.d.ts.map +1 -1
  358. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +9 -1
  359. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  360. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +2 -4
  361. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
  362. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +4 -5
  363. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  364. package/dist/field/features/paragraph/feature.client.d.ts +4 -1
  365. package/dist/field/features/paragraph/feature.client.d.ts.map +1 -1
  366. package/dist/field/features/paragraph/feature.client.js +54 -41
  367. package/dist/field/features/paragraph/feature.client.js.map +1 -1
  368. package/dist/field/features/paragraph/feature.server.d.ts.map +1 -1
  369. package/dist/field/features/paragraph/feature.server.js +2 -0
  370. package/dist/field/features/paragraph/feature.server.js.map +1 -1
  371. package/dist/field/features/paragraph/i18n.d.ts +3 -0
  372. package/dist/field/features/paragraph/i18n.d.ts.map +1 -0
  373. package/dist/field/features/paragraph/i18n.js +132 -0
  374. package/dist/field/features/paragraph/i18n.js.map +1 -0
  375. package/dist/field/features/relationship/drawer/commands.d.ts.map +1 -1
  376. package/dist/field/features/relationship/drawer/commands.js +1 -2
  377. package/dist/field/features/relationship/drawer/commands.js.map +1 -1
  378. package/dist/field/features/relationship/drawer/index.d.ts.map +1 -1
  379. package/dist/field/features/relationship/drawer/index.js +17 -15
  380. package/dist/field/features/relationship/drawer/index.js.map +1 -1
  381. package/dist/field/features/relationship/feature.client.d.ts +17 -2
  382. package/dist/field/features/relationship/feature.client.d.ts.map +1 -1
  383. package/dist/field/features/relationship/feature.client.js +51 -28
  384. package/dist/field/features/relationship/feature.client.js.map +1 -1
  385. package/dist/field/features/relationship/feature.server.d.ts +10 -1
  386. package/dist/field/features/relationship/feature.server.d.ts.map +1 -1
  387. package/dist/field/features/relationship/feature.server.js +7 -4
  388. package/dist/field/features/relationship/feature.server.js.map +1 -1
  389. package/dist/field/features/relationship/i18n.d.ts +3 -0
  390. package/dist/field/features/relationship/i18n.d.ts.map +1 -0
  391. package/dist/field/features/relationship/i18n.js +100 -0
  392. package/dist/field/features/relationship/i18n.js.map +1 -0
  393. package/dist/field/features/relationship/nodes/RelationshipNode.d.ts +4 -9
  394. package/dist/field/features/relationship/nodes/RelationshipNode.d.ts.map +1 -1
  395. package/dist/field/features/relationship/nodes/RelationshipNode.js +12 -11
  396. package/dist/field/features/relationship/nodes/RelationshipNode.js.map +1 -1
  397. package/dist/field/features/relationship/nodes/components/RelationshipComponent.d.ts.map +1 -1
  398. package/dist/field/features/relationship/nodes/components/RelationshipComponent.js +119 -50
  399. package/dist/field/features/relationship/nodes/components/RelationshipComponent.js.map +1 -1
  400. package/dist/field/features/relationship/plugins/index.d.ts +2 -2
  401. package/dist/field/features/relationship/plugins/index.d.ts.map +1 -1
  402. package/dist/field/features/relationship/plugins/index.js +14 -15
  403. package/dist/field/features/relationship/plugins/index.js.map +1 -1
  404. package/dist/field/features/relationship/populationPromise.d.ts +2 -1
  405. package/dist/field/features/relationship/populationPromise.d.ts.map +1 -1
  406. package/dist/field/features/relationship/populationPromise.js +25 -19
  407. package/dist/field/features/relationship/populationPromise.js.map +1 -1
  408. package/dist/field/features/shared/slashMenu/basicGroup.d.ts +3 -0
  409. package/dist/field/features/shared/slashMenu/basicGroup.d.ts.map +1 -0
  410. package/dist/field/features/shared/slashMenu/basicGroup.js +11 -0
  411. package/dist/field/features/shared/slashMenu/basicGroup.js.map +1 -0
  412. package/dist/field/features/shared/toolbar/addDropdownGroup.d.ts +3 -0
  413. package/dist/field/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -0
  414. package/dist/field/features/shared/toolbar/addDropdownGroup.js +12 -0
  415. package/dist/field/features/shared/toolbar/addDropdownGroup.js.map +1 -0
  416. package/dist/field/features/shared/toolbar/featureButtonsGroup.d.ts +3 -0
  417. package/dist/field/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -0
  418. package/dist/field/features/shared/toolbar/featureButtonsGroup.js +10 -0
  419. package/dist/field/features/shared/toolbar/featureButtonsGroup.js.map +1 -0
  420. package/dist/field/features/shared/toolbar/textDropdownGroup.d.ts +3 -0
  421. package/dist/field/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -0
  422. package/dist/field/features/shared/toolbar/textDropdownGroup.js +12 -0
  423. package/dist/field/features/shared/toolbar/textDropdownGroup.js.map +1 -0
  424. package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts +5 -0
  425. package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts.map +1 -0
  426. package/dist/field/features/toolbars/fixed/Toolbar/index.js +211 -0
  427. package/dist/field/features/toolbars/fixed/Toolbar/index.js.map +1 -0
  428. package/dist/field/features/toolbars/fixed/Toolbar/index.scss +119 -0
  429. package/dist/field/features/toolbars/fixed/feature.client.d.ts +7 -0
  430. package/dist/field/features/toolbars/fixed/feature.client.d.ts.map +1 -0
  431. package/dist/field/features/toolbars/fixed/feature.client.js +20 -0
  432. package/dist/field/features/toolbars/fixed/feature.client.js.map +1 -0
  433. package/dist/field/features/toolbars/fixed/feature.server.d.ts +19 -0
  434. package/dist/field/features/toolbars/fixed/feature.server.d.ts.map +1 -0
  435. package/dist/field/features/toolbars/fixed/feature.server.js +20 -0
  436. package/dist/field/features/toolbars/fixed/feature.server.js.map +1 -0
  437. package/dist/field/features/toolbars/inline/Toolbar/index.d.ts +4 -0
  438. package/dist/field/features/toolbars/inline/Toolbar/index.d.ts.map +1 -0
  439. package/dist/field/features/toolbars/inline/Toolbar/index.js +320 -0
  440. package/dist/field/features/toolbars/inline/Toolbar/index.js.map +1 -0
  441. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/inline/Toolbar}/index.scss +7 -11
  442. package/dist/field/features/toolbars/inline/feature.client.d.ts +6 -0
  443. package/dist/field/features/toolbars/inline/feature.client.d.ts.map +1 -0
  444. package/dist/field/features/toolbars/inline/feature.client.js +20 -0
  445. package/dist/field/features/toolbars/inline/feature.client.js.map +1 -0
  446. package/dist/field/features/toolbars/inline/feature.server.d.ts +3 -0
  447. package/dist/field/features/toolbars/inline/feature.server.d.ts.map +1 -0
  448. package/dist/field/features/toolbars/inline/feature.server.js +15 -0
  449. package/dist/field/features/toolbars/inline/feature.server.js.map +1 -0
  450. package/dist/field/features/toolbars/shared/ToolbarButton/index.d.ts +10 -0
  451. package/dist/field/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -0
  452. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarButton/index.js +34 -22
  453. package/dist/field/features/toolbars/shared/ToolbarButton/index.js.map +1 -0
  454. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarButton/index.scss +3 -1
  455. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts +23 -0
  456. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -0
  457. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarDropdown/DropDown.js +74 -100
  458. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -0
  459. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.d.ts +23 -0
  460. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -0
  461. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js +142 -0
  462. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -0
  463. package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars/shared}/ToolbarDropdown/index.scss +25 -13
  464. package/dist/field/features/toolbars/types.d.ts +48 -0
  465. package/dist/field/features/toolbars/types.d.ts.map +1 -0
  466. package/dist/field/features/toolbars/types.js.map +1 -0
  467. package/dist/field/features/typeUtilities.d.ts +8 -0
  468. package/dist/field/features/typeUtilities.d.ts.map +1 -0
  469. package/dist/field/features/typeUtilities.js +8 -0
  470. package/dist/field/features/typeUtilities.js.map +1 -0
  471. package/dist/field/features/types.d.ts +172 -63
  472. package/dist/field/features/types.d.ts.map +1 -1
  473. package/dist/field/features/types.js.map +1 -1
  474. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.d.ts.map +1 -1
  475. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js +32 -25
  476. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js.map +1 -1
  477. package/dist/field/features/upload/component/index.d.ts.map +1 -1
  478. package/dist/field/features/upload/component/index.js +159 -76
  479. package/dist/field/features/upload/component/index.js.map +1 -1
  480. package/dist/field/features/upload/drawer/commands.d.ts.map +1 -1
  481. package/dist/field/features/upload/drawer/commands.js +1 -2
  482. package/dist/field/features/upload/drawer/commands.js.map +1 -1
  483. package/dist/field/features/upload/drawer/index.d.ts.map +1 -1
  484. package/dist/field/features/upload/drawer/index.js +16 -16
  485. package/dist/field/features/upload/drawer/index.js.map +1 -1
  486. package/dist/field/features/upload/feature.client.d.ts +4 -1
  487. package/dist/field/features/upload/feature.client.d.ts.map +1 -1
  488. package/dist/field/features/upload/feature.client.js +52 -26
  489. package/dist/field/features/upload/feature.client.js.map +1 -1
  490. package/dist/field/features/upload/feature.server.d.ts +10 -3
  491. package/dist/field/features/upload/feature.server.d.ts.map +1 -1
  492. package/dist/field/features/upload/feature.server.js +41 -11
  493. package/dist/field/features/upload/feature.server.js.map +1 -1
  494. package/dist/field/features/upload/i18n.d.ts +3 -0
  495. package/dist/field/features/upload/i18n.d.ts.map +1 -0
  496. package/dist/field/features/upload/i18n.js +100 -0
  497. package/dist/field/features/upload/i18n.js.map +1 -0
  498. package/dist/field/features/upload/nodes/UploadNode.d.ts +3 -15
  499. package/dist/field/features/upload/nodes/UploadNode.d.ts.map +1 -1
  500. package/dist/field/features/upload/nodes/UploadNode.js +28 -14
  501. package/dist/field/features/upload/nodes/UploadNode.js.map +1 -1
  502. package/dist/field/features/upload/plugin/index.d.ts +5 -4
  503. package/dist/field/features/upload/plugin/index.d.ts.map +1 -1
  504. package/dist/field/features/upload/plugin/index.js +16 -19
  505. package/dist/field/features/upload/plugin/index.js.map +1 -1
  506. package/dist/field/features/upload/populationPromise.d.ts.map +1 -1
  507. package/dist/field/features/upload/populationPromise.js +16 -10
  508. package/dist/field/features/upload/populationPromise.js.map +1 -1
  509. package/dist/field/features/upload/validate.d.ts +2 -1
  510. package/dist/field/features/upload/validate.d.ts.map +1 -1
  511. package/dist/field/features/upload/validate.js +36 -9
  512. package/dist/field/features/upload/validate.js.map +1 -1
  513. package/dist/field/index.d.ts +3 -1
  514. package/dist/field/index.d.ts.map +1 -1
  515. package/dist/field/index.js +39 -26
  516. package/dist/field/index.js.map +1 -1
  517. package/dist/field/index.scss +1 -22
  518. package/dist/field/lexical/EditorPlugin.d.ts +1 -0
  519. package/dist/field/lexical/EditorPlugin.d.ts.map +1 -1
  520. package/dist/field/lexical/EditorPlugin.js +8 -4
  521. package/dist/field/lexical/EditorPlugin.js.map +1 -1
  522. package/dist/field/lexical/LexicalEditor.d.ts +3 -1
  523. package/dist/field/lexical/LexicalEditor.d.ts.map +1 -1
  524. package/dist/field/lexical/LexicalEditor.js +157 -74
  525. package/dist/field/lexical/LexicalEditor.js.map +1 -1
  526. package/dist/field/lexical/LexicalEditor.scss +13 -20
  527. package/dist/field/lexical/LexicalProvider.d.ts +1 -1
  528. package/dist/field/lexical/LexicalProvider.d.ts.map +1 -1
  529. package/dist/field/lexical/LexicalProvider.js +52 -41
  530. package/dist/field/lexical/LexicalProvider.js.map +1 -1
  531. package/dist/field/lexical/config/client/EditorConfigProvider.d.ts +15 -4
  532. package/dist/field/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  533. package/dist/field/lexical/config/client/EditorConfigProvider.js +61 -11
  534. package/dist/field/lexical/config/client/EditorConfigProvider.js.map +1 -1
  535. package/dist/field/lexical/config/client/default.d.ts +1 -1
  536. package/dist/field/lexical/config/client/default.d.ts.map +1 -1
  537. package/dist/field/lexical/config/client/default.js.map +1 -1
  538. package/dist/field/lexical/config/client/sanitize.d.ts +3 -2
  539. package/dist/field/lexical/config/client/sanitize.d.ts.map +1 -1
  540. package/dist/field/lexical/config/client/sanitize.js +83 -33
  541. package/dist/field/lexical/config/client/sanitize.js.map +1 -1
  542. package/dist/field/lexical/config/server/default.d.ts +2 -3
  543. package/dist/field/lexical/config/server/default.d.ts.map +1 -1
  544. package/dist/field/lexical/config/server/default.js +12 -10
  545. package/dist/field/lexical/config/server/default.js.map +1 -1
  546. package/dist/field/lexical/config/server/loader.d.ts +5 -2
  547. package/dist/field/lexical/config/server/loader.d.ts.map +1 -1
  548. package/dist/field/lexical/config/server/loader.js +4 -2
  549. package/dist/field/lexical/config/server/loader.js.map +1 -1
  550. package/dist/field/lexical/config/server/sanitize.d.ts +2 -1
  551. package/dist/field/lexical/config/server/sanitize.d.ts.map +1 -1
  552. package/dist/field/lexical/config/server/sanitize.js +32 -6
  553. package/dist/field/lexical/config/server/sanitize.js.map +1 -1
  554. package/dist/field/lexical/config/types.d.ts +3 -1
  555. package/dist/field/lexical/config/types.d.ts.map +1 -1
  556. package/dist/field/lexical/config/types.js.map +1 -1
  557. package/dist/field/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
  558. package/dist/field/lexical/plugins/MarkdownShortcut/index.js +3 -3
  559. package/dist/field/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  560. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +10 -10
  561. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  562. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +74 -77
  563. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  564. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts +5 -5
  565. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.d.ts.map +1 -1
  566. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js +8 -10
  567. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
  568. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +19 -27
  569. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
  570. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js +1 -37
  571. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  572. package/dist/field/lexical/plugins/SlashMenu/index.d.ts +2 -2
  573. package/dist/field/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
  574. package/dist/field/lexical/plugins/SlashMenu/index.js +108 -92
  575. package/dist/field/lexical/plugins/SlashMenu/index.js.map +1 -1
  576. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts +2 -2
  577. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
  578. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js +47 -125
  579. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  580. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.scss +2 -2
  581. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.d.ts +1 -1
  582. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.d.ts.map +1 -1
  583. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js.map +1 -1
  584. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts +2 -2
  585. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  586. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js +116 -66
  587. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  588. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.scss +20 -3
  589. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts +8 -1
  590. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts.map +1 -1
  591. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +83 -16
  592. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  593. package/dist/field/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts +5 -0
  594. package/dist/field/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -0
  595. package/dist/field/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js +21 -0
  596. package/dist/field/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js.map +1 -0
  597. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts +9 -0
  598. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts.map +1 -0
  599. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.js +35 -0
  600. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -0
  601. package/dist/field/lexical/plugins/handles/{DraggableBlockPlugin → utils}/getNodeCloseToPoint.d.ts +5 -1
  602. package/dist/field/lexical/plugins/handles/utils/getNodeCloseToPoint.d.ts.map +1 -0
  603. package/dist/field/lexical/plugins/handles/{DraggableBlockPlugin → utils}/getNodeCloseToPoint.js +5 -18
  604. package/dist/field/lexical/plugins/handles/utils/getNodeCloseToPoint.js.map +1 -0
  605. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.d.ts.map +1 -1
  606. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js +1 -2
  607. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -1
  608. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.d.ts +1 -1
  609. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
  610. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.js +19 -7
  611. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  612. package/dist/field/lexical/theme/EditorTheme.scss +18 -14
  613. package/dist/field/lexical/ui/ContentEditable.d.ts +1 -1
  614. package/dist/field/lexical/ui/ContentEditable.d.ts.map +1 -1
  615. package/dist/field/lexical/ui/ContentEditable.js +3 -3
  616. package/dist/field/lexical/ui/ContentEditable.js.map +1 -1
  617. package/dist/field/lexical/ui/ContentEditable.scss +55 -4
  618. package/dist/field/lexical/ui/icons/AI/index.js +26 -17
  619. package/dist/field/lexical/ui/icons/AI/index.js.map +1 -1
  620. package/dist/field/lexical/ui/icons/Add/index.d.ts +3 -0
  621. package/dist/field/lexical/ui/icons/Add/index.d.ts.map +1 -0
  622. package/dist/field/lexical/ui/icons/Add/index.js +21 -0
  623. package/dist/field/lexical/ui/icons/Add/index.js.map +1 -0
  624. package/dist/field/lexical/ui/icons/Add/light.svg +4 -0
  625. package/dist/field/lexical/ui/icons/AlignCenter/index.js +21 -15
  626. package/dist/field/lexical/ui/icons/AlignCenter/index.js.map +1 -1
  627. package/dist/field/lexical/ui/icons/AlignJustify/index.js +21 -15
  628. package/dist/field/lexical/ui/icons/AlignJustify/index.js.map +1 -1
  629. package/dist/field/lexical/ui/icons/AlignLeft/index.js +21 -15
  630. package/dist/field/lexical/ui/icons/AlignLeft/index.js.map +1 -1
  631. package/dist/field/lexical/ui/icons/AlignRight/index.js +21 -15
  632. package/dist/field/lexical/ui/icons/AlignRight/index.js.map +1 -1
  633. package/dist/field/lexical/ui/icons/Block/index.js +30 -24
  634. package/dist/field/lexical/ui/icons/Block/index.js.map +1 -1
  635. package/dist/field/lexical/ui/icons/Blockquote/index.js +8 -6
  636. package/dist/field/lexical/ui/icons/Blockquote/index.js.map +1 -1
  637. package/dist/field/lexical/ui/icons/Bold/index.js +8 -6
  638. package/dist/field/lexical/ui/icons/Bold/index.js.map +1 -1
  639. package/dist/field/lexical/ui/icons/Checklist/index.js +19 -14
  640. package/dist/field/lexical/ui/icons/Checklist/index.js.map +1 -1
  641. package/dist/field/lexical/ui/icons/Code/index.js +14 -9
  642. package/dist/field/lexical/ui/icons/Code/index.js.map +1 -1
  643. package/dist/field/lexical/ui/icons/CodeBlock/index.js +14 -9
  644. package/dist/field/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  645. package/dist/field/lexical/ui/icons/DraggableBlock/light.svg +9 -0
  646. package/dist/field/lexical/ui/icons/H1/index.js +8 -6
  647. package/dist/field/lexical/ui/icons/H1/index.js.map +1 -1
  648. package/dist/field/lexical/ui/icons/H2/index.js +8 -6
  649. package/dist/field/lexical/ui/icons/H2/index.js.map +1 -1
  650. package/dist/field/lexical/ui/icons/H3/index.js +8 -6
  651. package/dist/field/lexical/ui/icons/H3/index.js.map +1 -1
  652. package/dist/field/lexical/ui/icons/H4/index.js +8 -6
  653. package/dist/field/lexical/ui/icons/H4/index.js.map +1 -1
  654. package/dist/field/lexical/ui/icons/H5/index.js +8 -6
  655. package/dist/field/lexical/ui/icons/H5/index.js.map +1 -1
  656. package/dist/field/lexical/ui/icons/H6/index.js +8 -6
  657. package/dist/field/lexical/ui/icons/H6/index.js.map +1 -1
  658. package/dist/field/lexical/ui/icons/HorizontalRule/index.d.ts +3 -0
  659. package/dist/field/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -0
  660. package/dist/field/lexical/ui/icons/HorizontalRule/index.js +21 -0
  661. package/dist/field/lexical/ui/icons/HorizontalRule/index.js.map +1 -0
  662. package/dist/field/lexical/ui/icons/IndentDecrease/index.js +25 -18
  663. package/dist/field/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
  664. package/dist/field/lexical/ui/icons/IndentIncrease/index.js +25 -18
  665. package/dist/field/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
  666. package/dist/field/lexical/ui/icons/Italic/index.js +8 -6
  667. package/dist/field/lexical/ui/icons/Italic/index.js.map +1 -1
  668. package/dist/field/lexical/ui/icons/Link/index.d.ts.map +1 -1
  669. package/dist/field/lexical/ui/icons/Link/index.js +10 -18
  670. package/dist/field/lexical/ui/icons/Link/index.js.map +1 -1
  671. package/dist/field/lexical/ui/icons/OrderedList/index.js +29 -21
  672. package/dist/field/lexical/ui/icons/OrderedList/index.js.map +1 -1
  673. package/dist/field/lexical/ui/icons/Relationship/index.js +26 -17
  674. package/dist/field/lexical/ui/icons/Relationship/index.js.map +1 -1
  675. package/dist/field/lexical/ui/icons/Strikethrough/index.js +14 -9
  676. package/dist/field/lexical/ui/icons/Strikethrough/index.js.map +1 -1
  677. package/dist/field/lexical/ui/icons/Subscript/index.js +8 -6
  678. package/dist/field/lexical/ui/icons/Subscript/index.js.map +1 -1
  679. package/dist/field/lexical/ui/icons/Superscript/index.js +8 -6
  680. package/dist/field/lexical/ui/icons/Superscript/index.js.map +1 -1
  681. package/dist/field/lexical/ui/icons/Text/index.js +8 -6
  682. package/dist/field/lexical/ui/icons/Text/index.js.map +1 -1
  683. package/dist/field/lexical/ui/icons/Underline/index.js +14 -9
  684. package/dist/field/lexical/ui/icons/Underline/index.js.map +1 -1
  685. package/dist/field/lexical/ui/icons/UnorderedList/index.js +45 -36
  686. package/dist/field/lexical/ui/icons/UnorderedList/index.js.map +1 -1
  687. package/dist/field/lexical/ui/icons/Upload/index.js +24 -18
  688. package/dist/field/lexical/ui/icons/Upload/index.js.map +1 -1
  689. package/dist/field/lexical/utils/getSelectedNode.d.ts.map +1 -1
  690. package/dist/field/lexical/utils/getSelectedNode.js +1 -2
  691. package/dist/field/lexical/utils/getSelectedNode.js.map +1 -1
  692. package/dist/field/lexical/utils/nodeFormat.d.ts +2 -1
  693. package/dist/field/lexical/utils/nodeFormat.d.ts.map +1 -1
  694. package/dist/field/lexical/utils/nodeFormat.js.map +1 -1
  695. package/dist/field/lexical/utils/setFloatingElemPosition.d.ts +11 -1
  696. package/dist/field/lexical/utils/setFloatingElemPosition.d.ts.map +1 -1
  697. package/dist/field/lexical/utils/setFloatingElemPosition.js +16 -13
  698. package/dist/field/lexical/utils/setFloatingElemPosition.js.map +1 -1
  699. package/dist/field/lexical/utils/url.d.ts.map +1 -1
  700. package/dist/field/lexical/utils/url.js +13 -2
  701. package/dist/field/lexical/utils/url.js.map +1 -1
  702. package/dist/forEachNodeRecursively.d.ts +10 -0
  703. package/dist/forEachNodeRecursively.d.ts.map +1 -0
  704. package/dist/forEachNodeRecursively.js +24 -0
  705. package/dist/forEachNodeRecursively.js.map +1 -0
  706. package/dist/generateComponentMap.d.ts.map +1 -1
  707. package/dist/generateComponentMap.js +21 -29
  708. package/dist/generateComponentMap.js.map +1 -1
  709. package/dist/generateSchemaMap.d.ts.map +1 -1
  710. package/dist/generateSchemaMap.js +4 -12
  711. package/dist/generateSchemaMap.js.map +1 -1
  712. package/dist/i18n.d.ts +3 -0
  713. package/dist/i18n.d.ts.map +1 -0
  714. package/dist/i18n.js +164 -0
  715. package/dist/i18n.js.map +1 -0
  716. package/dist/index.d.ts +25 -21
  717. package/dist/index.d.ts.map +1 -1
  718. package/dist/index.js +296 -183
  719. package/dist/index.js.map +1 -1
  720. package/dist/populate/defaultValue.d.ts +0 -1
  721. package/dist/populate/defaultValue.d.ts.map +1 -1
  722. package/dist/populate/defaultValue.js +1 -19
  723. package/dist/populate/defaultValue.js.map +1 -1
  724. package/dist/populate/populate.d.ts +5 -4
  725. package/dist/populate/populate.d.ts.map +1 -1
  726. package/dist/populate/populate.js +13 -11
  727. package/dist/populate/populate.js.map +1 -1
  728. package/dist/populate/populateLexicalPopulationPromises.d.ts +12 -0
  729. package/dist/populate/populateLexicalPopulationPromises.d.ts.map +1 -0
  730. package/dist/populate/populateLexicalPopulationPromises.js +36 -0
  731. package/dist/populate/populateLexicalPopulationPromises.js.map +1 -0
  732. package/dist/populate/recurseNestedFields.d.ts +8 -4
  733. package/dist/populate/recurseNestedFields.d.ts.map +1 -1
  734. package/dist/populate/recurseNestedFields.js +4 -5
  735. package/dist/populate/recurseNestedFields.js.map +1 -1
  736. package/dist/scss/app.scss +2 -3
  737. package/dist/scss/vars.scss +0 -7
  738. package/dist/types.d.ts +45 -6
  739. package/dist/types.d.ts.map +1 -1
  740. package/dist/types.js.map +1 -1
  741. package/dist/useLexicalFeature.d.ts.map +1 -1
  742. package/dist/useLexicalFeature.js +6 -1
  743. package/dist/useLexicalFeature.js.map +1 -1
  744. package/dist/validate/index.d.ts +1 -1
  745. package/dist/validate/index.d.ts.map +1 -1
  746. package/dist/validate/index.js +3 -2
  747. package/dist/validate/index.js.map +1 -1
  748. package/dist/validate/validateNodes.js +1 -1
  749. package/dist/validate/validateNodes.js.map +1 -1
  750. package/package.json +70 -50
  751. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts +0 -3
  752. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts.map +0 -1
  753. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js +0 -12
  754. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js.map +0 -1
  755. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.d.ts +0 -3
  756. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.d.ts.map +0 -1
  757. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js +0 -10
  758. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js.map +0 -1
  759. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts +0 -3
  760. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts.map +0 -1
  761. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js +0 -12
  762. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js.map +0 -1
  763. package/dist/field/features/debug/testrecorder/feature.client.d.ts.map +0 -1
  764. package/dist/field/features/debug/testrecorder/plugin/index.d.ts +0 -5
  765. package/dist/field/features/debug/testrecorder/plugin/index.d.ts.map +0 -1
  766. package/dist/field/features/debug/testrecorder/plugin/index.js.map +0 -1
  767. package/dist/field/features/debug/treeview/feature.client.d.ts.map +0 -1
  768. package/dist/field/features/debug/treeview/plugin/index.d.ts +0 -4
  769. package/dist/field/features/debug/treeview/plugin/index.d.ts.map +0 -1
  770. package/dist/field/features/debug/treeview/plugin/index.js.map +0 -1
  771. package/dist/field/features/format/common/floatingSelectToolbarSection.d.ts +0 -3
  772. package/dist/field/features/format/common/floatingSelectToolbarSection.d.ts.map +0 -1
  773. package/dist/field/features/format/common/floatingSelectToolbarSection.js +0 -10
  774. package/dist/field/features/format/common/floatingSelectToolbarSection.js.map +0 -1
  775. package/dist/field/features/format/inlinecode/feature.client.d.ts.map +0 -1
  776. package/dist/field/features/format/inlinecode/feature.client.js +0 -43
  777. package/dist/field/features/format/inlinecode/feature.client.js.map +0 -1
  778. package/dist/field/features/indent/floatingSelectToolbarIndentSection.d.ts +0 -3
  779. package/dist/field/features/indent/floatingSelectToolbarIndentSection.d.ts.map +0 -1
  780. package/dist/field/features/indent/floatingSelectToolbarIndentSection.js +0 -10
  781. package/dist/field/features/indent/floatingSelectToolbarIndentSection.js.map +0 -1
  782. package/dist/field/features/indent/index.scss +0 -4
  783. package/dist/field/features/lists/common/markdown.js.map +0 -1
  784. package/dist/field/features/lists/orderedlist/feature.client.d.ts.map +0 -1
  785. package/dist/field/features/lists/orderedlist/feature.client.js +0 -72
  786. package/dist/field/features/lists/orderedlist/feature.client.js.map +0 -1
  787. package/dist/field/features/lists/orderedlist/feature.server.d.ts.map +0 -1
  788. package/dist/field/features/lists/orderedlist/feature.server.js.map +0 -1
  789. package/dist/field/features/lists/orderedlist/markdownTransformer.d.ts.map +0 -1
  790. package/dist/field/features/lists/orderedlist/markdownTransformer.js.map +0 -1
  791. package/dist/field/features/lists/unorderedlist/feature.client.d.ts.map +0 -1
  792. package/dist/field/features/lists/unorderedlist/feature.client.js +0 -72
  793. package/dist/field/features/lists/unorderedlist/feature.client.js.map +0 -1
  794. package/dist/field/features/lists/unorderedlist/feature.server.d.ts.map +0 -1
  795. package/dist/field/features/lists/unorderedlist/feature.server.js.map +0 -1
  796. package/dist/field/features/lists/unorderedlist/markdownTransformer.d.ts.map +0 -1
  797. package/dist/field/features/lists/unorderedlist/markdownTransformer.js.map +0 -1
  798. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts +0 -8
  799. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts.map +0 -1
  800. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.js.map +0 -1
  801. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts +0 -17
  802. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts.map +0 -1
  803. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.js.map +0 -1
  804. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.d.ts +0 -18
  805. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.d.ts.map +0 -1
  806. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js +0 -42
  807. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js.map +0 -1
  808. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts +0 -6
  809. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts.map +0 -1
  810. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.js +0 -270
  811. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.js.map +0 -1
  812. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts +0 -40
  813. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts.map +0 -1
  814. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.js.map +0 -1
  815. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.d.ts.map +0 -1
  816. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.js.map +0 -1
  817. package/dist/populate/richTextRelationshipPromise.d.ts +0 -23
  818. package/dist/populate/richTextRelationshipPromise.d.ts.map +0 -1
  819. package/dist/populate/richTextRelationshipPromise.js +0 -68
  820. package/dist/populate/richTextRelationshipPromise.js.map +0 -1
  821. package/dist/scss/fonts.scss +0 -75
  822. package/src/index.ts +0 -423
  823. /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.js +0 -0
  824. /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.d.ts +0 -0
  825. /package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.scss +0 -0
  826. /package/dist/field/features/debug/{treeview → treeView}/feature.client.js +0 -0
  827. /package/dist/field/features/debug/{treeview → treeView}/feature.server.d.ts +0 -0
  828. /package/dist/field/features/debug/{treeview → treeView}/plugin/index.scss +0 -0
  829. /package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.d.ts +0 -0
  830. /package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.d.ts +0 -0
  831. /package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.js +0 -0
  832. /package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.d.ts +0 -0
  833. /package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.d.ts +0 -0
  834. /package/dist/field/features/lists/{common → shared}/markdown.d.ts +0 -0
  835. /package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.d.ts +0 -0
  836. /package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.d.ts +0 -0
  837. /package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars}/types.js +0 -0
@@ -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
- flattenLocales,
19
+ flattenLocales: false,
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: false, // Disable localization handling which does not work properly yet. Once we fully support hooks, this can be enabled (pass through flattenLocales again)\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,gBAAgB;YAChBE;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"}
@@ -1,50 +1,36 @@
1
- import { sanitizeFields } from 'payload/config';
1
+ import { buildStateFromSchema } from '@payloadcms/ui/forms/buildStateFromSchema';
2
2
  export const blockValidationHOC = (props)=>{
3
- const blockValidation = async ({ node, validation })=>{
4
- const blockFieldData = node.fields;
5
- const blocks = props.blocks;
6
- const { options: { req, req: { payload: { config } } } } = validation;
7
- // Sanitize block's fields here. This is done here and not in the feature, because the payload config is available here
8
- const validRelationships = config.collections.map((c)=>c.slug) || [];
9
- blocks.forEach((block)=>{
10
- block.fields = sanitizeFields({
11
- config,
12
- fields: block.fields,
13
- requireFieldLevelRichTextEditor: true,
14
- validRelationships
15
- });
16
- });
3
+ return async ({ node, validation })=>{
4
+ const blockFieldData = node.fields ?? {};
5
+ const { options: { id, operation, preferences, req } } = validation;
17
6
  // find block
18
7
  const block = props.blocks.find((block)=>block.slug === blockFieldData.blockType);
19
8
  // validate block
20
9
  if (!block) {
21
10
  return 'Block not found';
22
11
  }
23
- for (const field of block.fields){
24
- if ('validate' in field && typeof field.validate === 'function' && field.validate) {
25
- const fieldValue = 'name' in field ? node.fields[field.name] : null;
26
- const passesCondition = field.admin?.condition ? Boolean(field.admin.condition(fieldValue, node.fields, {
27
- user: req?.user
28
- })) : true;
29
- if (!passesCondition) {
30
- continue; // Fixes https://github.com/payloadcms/payload/issues/4000
31
- }
32
- const validationResult = await field.validate(fieldValue, {
33
- ...field,
34
- id: validation.options.id,
35
- data: fieldValue,
36
- operation: validation.options.operation,
37
- req,
38
- siblingData: validation.options.siblingData
39
- });
40
- if (validationResult !== true) {
41
- return validationResult;
42
- }
12
+ /**
13
+ * Run buildStateFromSchema as that properly validates block and block sub-fields
14
+ */ const result = await buildStateFromSchema({
15
+ id,
16
+ data: blockFieldData,
17
+ fieldSchema: block.fields,
18
+ operation: operation === 'create' || operation === 'update' ? operation : 'update',
19
+ preferences,
20
+ req,
21
+ siblingData: blockFieldData
22
+ });
23
+ let errorPaths = [];
24
+ for(const fieldKey in result){
25
+ if (result[fieldKey].errorPaths) {
26
+ errorPaths = errorPaths.concat(result[fieldKey].errorPaths);
43
27
  }
44
28
  }
29
+ if (errorPaths.length) {
30
+ return 'The following fields are invalid: ' + errorPaths.join(', ');
31
+ }
45
32
  return true;
46
33
  };
47
- return blockValidation;
48
34
  };
49
35
 
50
36
  //# sourceMappingURL=validate.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/features/blocks/validate.ts"],"sourcesContent":["import type { Block } from 'payload/types'\n\nimport { sanitizeFields } from 'payload/config'\n\nimport type { NodeValidation } from '../types.js'\nimport type { BlocksFeatureProps } from './feature.server.js'\nimport type { SerializedBlockNode } from './nodes/BlocksNode.js'\n\nexport const blockValidationHOC = (\n props: BlocksFeatureProps,\n): NodeValidation<SerializedBlockNode> => {\n const blockValidation: NodeValidation<SerializedBlockNode> = async ({ node, validation }) => {\n const blockFieldData = node.fields\n const blocks: Block[] = props.blocks\n\n const {\n options: {\n req,\n req: {\n payload: { config },\n },\n },\n } = validation\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 validRelationships = config.collections.map((c) => c.slug) || []\n blocks.forEach((block) => {\n block.fields = sanitizeFields({\n config,\n fields: block.fields,\n requireFieldLevelRichTextEditor: true,\n validRelationships,\n })\n })\n\n // find block\n const block = props.blocks.find((block) => block.slug === blockFieldData.blockType)\n\n // validate block\n if (!block) {\n return 'Block not found'\n }\n\n for (const field of block.fields) {\n if ('validate' in field && typeof field.validate === 'function' && field.validate) {\n const fieldValue = 'name' in field ? node.fields[field.name] : null\n\n const passesCondition = field.admin?.condition\n ? Boolean(\n field.admin.condition(fieldValue, node.fields, {\n user: req?.user,\n }),\n )\n : true\n if (!passesCondition) {\n continue // Fixes https://github.com/payloadcms/payload/issues/4000\n }\n\n const validationResult = await field.validate(fieldValue, {\n ...field,\n id: validation.options.id,\n data: fieldValue,\n operation: validation.options.operation,\n req,\n siblingData: validation.options.siblingData,\n })\n\n if (validationResult !== true) {\n return validationResult\n }\n }\n }\n\n return true\n }\n\n return blockValidation\n}\n"],"names":["sanitizeFields","blockValidationHOC","props","blockValidation","node","validation","blockFieldData","fields","blocks","options","req","payload","config","validRelationships","collections","map","c","slug","forEach","block","requireFieldLevelRichTextEditor","find","blockType","field","validate","fieldValue","name","passesCondition","admin","condition","Boolean","user","validationResult","id","data","operation","siblingData"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,SAASA,cAAc,QAAQ,iBAAgB;AAM/C,OAAO,MAAMC,qBAAqB,CAChCC;IAEA,MAAMC,kBAAuD,OAAO,EAAEC,IAAI,EAAEC,UAAU,EAAE;QACtF,MAAMC,iBAAiBF,KAAKG,MAAM;QAClC,MAAMC,SAAkBN,MAAMM,MAAM;QAEpC,MAAM,EACJC,SAAS,EACPC,GAAG,EACHA,KAAK,EACHC,SAAS,EAAEC,MAAM,EAAE,EACpB,EACF,EACF,GAAGP;QAEJ,uHAAuH;QACvH,MAAMQ,qBAAqBD,OAAOE,WAAW,CAACC,GAAG,CAAC,CAACC,IAAMA,EAAEC,IAAI,KAAK,EAAE;QACtET,OAAOU,OAAO,CAAC,CAACC;YACdA,MAAMZ,MAAM,GAAGP,eAAe;gBAC5BY;gBACAL,QAAQY,MAAMZ,MAAM;gBACpBa,iCAAiC;gBACjCP;YACF;QACF;QAEA,aAAa;QACb,MAAMM,QAAQjB,MAAMM,MAAM,CAACa,IAAI,CAAC,CAACF,QAAUA,MAAMF,IAAI,KAAKX,eAAegB,SAAS;QAElF,iBAAiB;QACjB,IAAI,CAACH,OAAO;YACV,OAAO;QACT;QAEA,KAAK,MAAMI,SAASJ,MAAMZ,MAAM,CAAE;YAChC,IAAI,cAAcgB,SAAS,OAAOA,MAAMC,QAAQ,KAAK,cAAcD,MAAMC,QAAQ,EAAE;gBACjF,MAAMC,aAAa,UAAUF,QAAQnB,KAAKG,MAAM,CAACgB,MAAMG,IAAI,CAAC,GAAG;gBAE/D,MAAMC,kBAAkBJ,MAAMK,KAAK,EAAEC,YACjCC,QACEP,MAAMK,KAAK,CAACC,SAAS,CAACJ,YAAYrB,KAAKG,MAAM,EAAE;oBAC7CwB,MAAMrB,KAAKqB;gBACb,MAEF;gBACJ,IAAI,CAACJ,iBAAiB;oBACpB,UAAS,0DAA0D;gBACrE;gBAEA,MAAMK,mBAAmB,MAAMT,MAAMC,QAAQ,CAACC,YAAY;oBACxD,GAAGF,KAAK;oBACRU,IAAI5B,WAAWI,OAAO,CAACwB,EAAE;oBACzBC,MAAMT;oBACNU,WAAW9B,WAAWI,OAAO,CAAC0B,SAAS;oBACvCzB;oBACA0B,aAAa/B,WAAWI,OAAO,CAAC2B,WAAW;gBAC7C;gBAEA,IAAIJ,qBAAqB,MAAM;oBAC7B,OAAOA;gBACT;YACF;QACF;QAEA,OAAO;IACT;IAEA,OAAO7B;AACT,EAAC"}
1
+ {"version":3,"sources":["../../../../src/field/features/blocks/validate.ts"],"sourcesContent":["import { buildStateFromSchema } from '@payloadcms/ui/forms/buildStateFromSchema'\n\nimport type { NodeValidation } from '../types.js'\nimport type { BlocksFeatureProps } from './feature.server.js'\nimport type { BlockFields, SerializedBlockNode } from './nodes/BlocksNode.js'\n\nexport const blockValidationHOC = (\n props: BlocksFeatureProps,\n): NodeValidation<SerializedBlockNode> => {\n return async ({ node, validation }) => {\n const blockFieldData = node.fields ?? ({} as BlockFields)\n\n const {\n options: { id, operation, preferences, req },\n } = validation\n\n // find block\n const block = props.blocks.find((block) => block.slug === blockFieldData.blockType)\n\n // validate block\n if (!block) {\n return 'Block not found'\n }\n\n /**\n * Run buildStateFromSchema as that properly validates block and block sub-fields\n */\n\n const result = await buildStateFromSchema({\n id,\n data: blockFieldData,\n fieldSchema: block.fields,\n operation: operation === 'create' || operation === 'update' ? operation : 'update',\n preferences,\n req,\n siblingData: blockFieldData,\n })\n\n let errorPaths = []\n for (const fieldKey in result) {\n if (result[fieldKey].errorPaths) {\n errorPaths = errorPaths.concat(result[fieldKey].errorPaths)\n }\n }\n\n if (errorPaths.length) {\n return 'The following fields are invalid: ' + errorPaths.join(', ')\n }\n\n return true\n }\n}\n"],"names":["buildStateFromSchema","blockValidationHOC","props","node","validation","blockFieldData","fields","options","id","operation","preferences","req","block","blocks","find","slug","blockType","result","data","fieldSchema","siblingData","errorPaths","fieldKey","concat","length","join"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,oBAAoB,QAAQ,4CAA2C;AAMhF,OAAO,MAAMC,qBAAqB,CAChCC;IAEA,OAAO,OAAO,EAAEC,IAAI,EAAEC,UAAU,EAAE;QAChC,MAAMC,iBAAiBF,KAAKG,MAAM,IAAK,CAAC;QAExC,MAAM,EACJC,SAAS,EAAEC,EAAE,EAAEC,SAAS,EAAEC,WAAW,EAAEC,GAAG,EAAE,EAC7C,GAAGP;QAEJ,aAAa;QACb,MAAMQ,QAAQV,MAAMW,MAAM,CAACC,IAAI,CAAC,CAACF,QAAUA,MAAMG,IAAI,KAAKV,eAAeW,SAAS;QAElF,iBAAiB;QACjB,IAAI,CAACJ,OAAO;YACV,OAAO;QACT;QAEA;;KAEC,GAED,MAAMK,SAAS,MAAMjB,qBAAqB;YACxCQ;YACAU,MAAMb;YACNc,aAAaP,MAAMN,MAAM;YACzBG,WAAWA,cAAc,YAAYA,cAAc,WAAWA,YAAY;YAC1EC;YACAC;YACAS,aAAaf;QACf;QAEA,IAAIgB,aAAa,EAAE;QACnB,IAAK,MAAMC,YAAYL,OAAQ;YAC7B,IAAIA,MAAM,CAACK,SAAS,CAACD,UAAU,EAAE;gBAC/BA,aAAaA,WAAWE,MAAM,CAACN,MAAM,CAACK,SAAS,CAACD,UAAU;YAC5D;QACF;QAEA,IAAIA,WAAWG,MAAM,EAAE;YACrB,OAAO,uCAAuCH,WAAWI,IAAI,CAAC;QAChE;QAEA,OAAO;IACT;AACF,EAAC"}
@@ -1,7 +1,13 @@
1
- import type { TextField } from 'payload/types';
1
+ import type { Field } from 'payload/types';
2
2
  import type { SanitizedServerEditorConfig } from '../../../../lexical/config/types.js';
3
3
  import type { HTMLConverter } from '../converter/types.js';
4
4
  type Props = {
5
+ /**
6
+ * Whether the lexicalHTML field should be hidden in the admin panel
7
+ *
8
+ * @default true
9
+ */
10
+ hidden?: boolean;
5
11
  name: string;
6
12
  };
7
13
  /**
@@ -18,6 +24,6 @@ export declare const lexicalHTML: (
18
24
  *
19
25
  * This has to be a SIBLING field of this lexicalHTML field - otherwise, it won't be able to find the lexical field.
20
26
  **/
21
- lexicalFieldName: string, props: Props) => TextField;
27
+ lexicalFieldName: string, props: Props) => Field;
22
28
  export {};
23
29
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/field/features/converters/html/field/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAwB,SAAS,EAAE,MAAM,eAAe,CAAA;AAGpE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAA;AACtF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAM1D,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,sBAEnC;IACD,YAAY,EAAE,2BAA2B,CAAA;CAC1C,oBAqBA,CAAA;AAED,eAAO,MAAM,WAAW,EAAE;AACxB;;;;IAII;AACJ,gBAAgB,EAAE,MAAM,EACxB,KAAK,EAAE,KAAK,KACT,SAsHJ,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/field/features/converters/html/field/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAiB,MAAM,eAAe,CAAA;AAGzD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAA;AACtF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAM1D,KAAK,KAAK,GAAG;IACX;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,sBAEnC;IACD,YAAY,EAAE,2BAA2B,CAAA;CAC1C,KAAG,aAAa,EA+ChB,CAAA;AAED,eAAO,MAAM,WAAW,EAAE;AACxB;;;;IAII;AACJ,gBAAgB,EAAE,MAAM,EACxB,KAAK,EAAE,KAAK,KACT,KAyHJ,CAAA"}
@@ -7,22 +7,53 @@ import { convertLexicalToHTML } from '../converter/index.js';
7
7
  */ export const consolidateHTMLConverters = ({ editorConfig })=>{
8
8
  const htmlConverterFeature = editorConfig.resolvedFeatureMap.get('htmlConverter');
9
9
  const htmlConverterFeatureProps = htmlConverterFeature?.serverFeatureProps;
10
- const defaultConvertersWithConvertersFromFeatures = defaultHTMLConverters;
10
+ const defaultConvertersWithConvertersFromFeatures = [
11
+ ...defaultHTMLConverters
12
+ ];
11
13
  for (const converter of editorConfig.features.converters.html){
12
14
  defaultConvertersWithConvertersFromFeatures.push(converter);
13
15
  }
14
16
  const finalConverters = htmlConverterFeatureProps?.converters && typeof htmlConverterFeatureProps?.converters === 'function' ? htmlConverterFeatureProps.converters({
15
17
  defaultConverters: defaultConvertersWithConvertersFromFeatures
16
18
  }) : htmlConverterFeatureProps?.converters || defaultConvertersWithConvertersFromFeatures;
17
- return finalConverters;
19
+ // filter converters by nodeTypes. The last converter in the list wins. If there are multiple converters for the same nodeType, the last one will be used and the node types will be removed from
20
+ // previous converters. If previous converters do not have any nodeTypes left, they will be removed from the list.
21
+ // This guarantees that user-added converters which are added after the default ones will always have precedence
22
+ const foundNodeTypes = [];
23
+ const filteredConverters = [];
24
+ for (const converter of finalConverters.reverse()){
25
+ if (!converter.nodeTypes?.length) {
26
+ continue;
27
+ }
28
+ const newConverter = {
29
+ converter: converter.converter,
30
+ nodeTypes: [
31
+ ...converter.nodeTypes
32
+ ]
33
+ };
34
+ newConverter.nodeTypes = newConverter.nodeTypes.filter((nodeType)=>{
35
+ if (foundNodeTypes.includes(nodeType)) {
36
+ return false;
37
+ }
38
+ foundNodeTypes.push(nodeType);
39
+ return true;
40
+ });
41
+ if (newConverter.nodeTypes.length) {
42
+ filteredConverters.push(newConverter);
43
+ }
44
+ }
45
+ return filteredConverters;
18
46
  };
19
47
  export const lexicalHTML = (lexicalFieldName, props)=>{
20
- const { name = 'lexicalHTML' } = props;
48
+ const { name = 'lexicalHTML', hidden = true } = props;
21
49
  return {
22
50
  name,
23
- type: 'text',
51
+ type: 'code',
24
52
  admin: {
25
- hidden: true
53
+ editorOptions: {
54
+ language: 'html'
55
+ },
56
+ hidden
26
57
  },
27
58
  hooks: {
28
59
  afterRead: [
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/field/features/converters/html/field/index.ts"],"sourcesContent":["import type { SerializedEditorState } from 'lexical'\nimport type { Field, RichTextField, TextField } from 'payload/types'\n\nimport type { AdapterProps, LexicalRichTextAdapter } from '../../../../../types.js'\nimport type { SanitizedServerEditorConfig } from '../../../../lexical/config/types.js'\nimport type { HTMLConverter } from '../converter/types.js'\nimport type { HTMLConverterFeatureProps } from '../feature.server.js'\n\nimport { defaultHTMLConverters } from '../converter/defaultConverters.js'\nimport { convertLexicalToHTML } from '../converter/index.js'\n\ntype Props = {\n name: string\n}\n\n/**\n * Combines the default HTML converters with HTML converters found in the features, and with HTML converters configured in the htmlConverter feature.\n *\n * @param editorConfig\n */\nexport const consolidateHTMLConverters = ({\n editorConfig,\n}: {\n editorConfig: SanitizedServerEditorConfig\n}) => {\n const htmlConverterFeature = editorConfig.resolvedFeatureMap.get('htmlConverter')\n const htmlConverterFeatureProps: HTMLConverterFeatureProps =\n htmlConverterFeature?.serverFeatureProps\n\n const defaultConvertersWithConvertersFromFeatures = defaultHTMLConverters\n\n for (const converter of editorConfig.features.converters.html) {\n defaultConvertersWithConvertersFromFeatures.push(converter)\n }\n\n const finalConverters =\n htmlConverterFeatureProps?.converters &&\n typeof htmlConverterFeatureProps?.converters === 'function'\n ? htmlConverterFeatureProps.converters({\n defaultConverters: defaultConvertersWithConvertersFromFeatures,\n })\n : (htmlConverterFeatureProps?.converters as HTMLConverter[]) ||\n defaultConvertersWithConvertersFromFeatures\n\n return finalConverters\n}\n\nexport const lexicalHTML: (\n /**\n * A string which matches the lexical field name you want to convert to HTML.\n *\n * This has to be a SIBLING field of this lexicalHTML field - otherwise, it won't be able to find the lexical field.\n **/\n lexicalFieldName: string,\n props: Props,\n) => TextField = (lexicalFieldName, props) => {\n const { name = 'lexicalHTML' } = props\n return {\n name,\n type: 'text',\n admin: {\n hidden: true,\n },\n hooks: {\n afterRead: [\n async ({ collection, field, global, req, siblingData }) => {\n const fields = collection ? collection.fields : global.fields\n\n // find the path of this field, as well as its sibling fields, by looking for this `field` in fields and traversing it recursively\n function findFieldPathAndSiblingFields(\n fields: Field[],\n path: string[],\n ): {\n path: string[]\n siblingFields: Field[]\n } {\n for (const curField of fields) {\n if (curField === field) {\n return {\n path: [...path, curField.name],\n siblingFields: fields,\n }\n }\n\n if ('fields' in curField) {\n const result = findFieldPathAndSiblingFields(\n curField.fields,\n 'name' in curField ? [...path, curField.name] : [...path],\n )\n if (result) {\n return result\n }\n } else if ('tabs' in curField) {\n for (const tab of curField.tabs) {\n const result = findFieldPathAndSiblingFields(\n tab.fields,\n 'name' in tab ? [...path, tab.name] : [...path],\n )\n if (result) {\n return result\n }\n }\n } else if ('blocks' in curField) {\n for (const block of curField.blocks) {\n if (block?.fields?.length) {\n const result = findFieldPathAndSiblingFields(block.fields, [\n ...path,\n curField.name,\n block.slug,\n ])\n if (result) {\n return result\n }\n }\n }\n }\n }\n\n return null\n }\n\n const foundSiblingFields = findFieldPathAndSiblingFields(fields, [])\n\n if (!foundSiblingFields)\n throw new Error(\n `Could not find sibling fields of current lexicalHTML field with name ${field?.name}`,\n )\n\n const { siblingFields } = foundSiblingFields\n const lexicalField: RichTextField<SerializedEditorState, AdapterProps> =\n siblingFields.find(\n (field) => 'name' in field && field.name === lexicalFieldName,\n ) as RichTextField<SerializedEditorState, AdapterProps>\n\n const lexicalFieldData: SerializedEditorState = siblingData[lexicalFieldName]\n\n if (!lexicalFieldData) {\n return ''\n }\n\n if (!lexicalField) {\n throw new Error(\n 'You cannot use the lexicalHTML field because the referenced lexical field was not found',\n )\n }\n\n const config = (lexicalField?.editor as LexicalRichTextAdapter)?.editorConfig\n\n if (!config) {\n throw new Error(\n 'The linked lexical field does not have an editorConfig. This is needed for the lexicalHTML field.',\n )\n }\n\n if (!config?.resolvedFeatureMap?.has('htmlConverter')) {\n throw new Error(\n 'You cannot use the lexicalHTML field because the linked lexical field does not have a HTMLConverterFeature',\n )\n }\n\n const finalConverters = consolidateHTMLConverters({\n editorConfig: config,\n })\n\n return await convertLexicalToHTML({\n converters: finalConverters,\n data: lexicalFieldData,\n payload: req.payload,\n })\n },\n ],\n },\n }\n}\n"],"names":["defaultHTMLConverters","convertLexicalToHTML","consolidateHTMLConverters","editorConfig","htmlConverterFeature","resolvedFeatureMap","get","htmlConverterFeatureProps","serverFeatureProps","defaultConvertersWithConvertersFromFeatures","converter","features","converters","html","push","finalConverters","defaultConverters","lexicalHTML","lexicalFieldName","props","name","type","admin","hidden","hooks","afterRead","collection","field","global","req","siblingData","fields","findFieldPathAndSiblingFields","path","curField","siblingFields","result","tab","tabs","block","blocks","length","slug","foundSiblingFields","Error","lexicalField","find","lexicalFieldData","config","editor","has","data","payload"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"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"}
1
+ {"version":3,"sources":["../../../../../../src/field/features/converters/html/field/index.ts"],"sourcesContent":["import type { SerializedEditorState } from 'lexical'\nimport type { Field, RichTextField } from 'payload/types'\n\nimport type { AdapterProps, LexicalRichTextAdapter } from '../../../../../types.js'\nimport type { SanitizedServerEditorConfig } from '../../../../lexical/config/types.js'\nimport type { HTMLConverter } from '../converter/types.js'\nimport type { HTMLConverterFeatureProps } from '../feature.server.js'\n\nimport { defaultHTMLConverters } from '../converter/defaultConverters.js'\nimport { convertLexicalToHTML } from '../converter/index.js'\n\ntype Props = {\n /**\n * Whether the lexicalHTML field should be hidden in the admin panel\n *\n * @default true\n */\n hidden?: boolean\n name: string\n}\n\n/**\n * Combines the default HTML converters with HTML converters found in the features, and with HTML converters configured in the htmlConverter feature.\n *\n * @param editorConfig\n */\nexport const consolidateHTMLConverters = ({\n editorConfig,\n}: {\n editorConfig: SanitizedServerEditorConfig\n}): HTMLConverter[] => {\n const htmlConverterFeature = editorConfig.resolvedFeatureMap.get('htmlConverter')\n const htmlConverterFeatureProps: HTMLConverterFeatureProps =\n htmlConverterFeature?.serverFeatureProps\n\n const defaultConvertersWithConvertersFromFeatures = [...defaultHTMLConverters]\n\n for (const converter of editorConfig.features.converters.html) {\n defaultConvertersWithConvertersFromFeatures.push(converter)\n }\n\n const finalConverters =\n htmlConverterFeatureProps?.converters &&\n typeof htmlConverterFeatureProps?.converters === 'function'\n ? htmlConverterFeatureProps.converters({\n defaultConverters: defaultConvertersWithConvertersFromFeatures,\n })\n : (htmlConverterFeatureProps?.converters as HTMLConverter[]) ||\n defaultConvertersWithConvertersFromFeatures\n\n // filter converters by nodeTypes. The last converter in the list wins. If there are multiple converters for the same nodeType, the last one will be used and the node types will be removed from\n // previous converters. If previous converters do not have any nodeTypes left, they will be removed from the list.\n // This guarantees that user-added converters which are added after the default ones will always have precedence\n const foundNodeTypes: string[] = []\n const filteredConverters: HTMLConverter[] = []\n for (const converter of finalConverters.reverse()) {\n if (!converter.nodeTypes?.length) {\n continue\n }\n const newConverter: HTMLConverter = {\n converter: converter.converter,\n nodeTypes: [...converter.nodeTypes],\n }\n newConverter.nodeTypes = newConverter.nodeTypes.filter((nodeType) => {\n if (foundNodeTypes.includes(nodeType)) {\n return false\n }\n foundNodeTypes.push(nodeType)\n return true\n })\n\n if (newConverter.nodeTypes.length) {\n filteredConverters.push(newConverter)\n }\n }\n\n return filteredConverters\n}\n\nexport const lexicalHTML: (\n /**\n * A string which matches the lexical field name you want to convert to HTML.\n *\n * This has to be a SIBLING field of this lexicalHTML field - otherwise, it won't be able to find the lexical field.\n **/\n lexicalFieldName: string,\n props: Props,\n) => Field = (lexicalFieldName, props) => {\n const { name = 'lexicalHTML', hidden = true } = props\n return {\n name,\n type: 'code',\n admin: {\n editorOptions: {\n language: 'html',\n },\n hidden,\n },\n hooks: {\n afterRead: [\n async ({ collection, field, global, req, siblingData }) => {\n const fields = collection ? collection.fields : global.fields\n\n // find the path of this field, as well as its sibling fields, by looking for this `field` in fields and traversing it recursively\n function findFieldPathAndSiblingFields(\n fields: Field[],\n path: string[],\n ): {\n path: string[]\n siblingFields: Field[]\n } {\n for (const curField of fields) {\n if (curField === field) {\n return {\n path: [...path, curField.name],\n siblingFields: fields,\n }\n }\n\n if ('fields' in curField) {\n const result = findFieldPathAndSiblingFields(\n curField.fields,\n 'name' in curField ? [...path, curField.name] : [...path],\n )\n if (result) {\n return result\n }\n } else if ('tabs' in curField) {\n for (const tab of curField.tabs) {\n const result = findFieldPathAndSiblingFields(\n tab.fields,\n 'name' in tab ? [...path, tab.name] : [...path],\n )\n if (result) {\n return result\n }\n }\n } else if ('blocks' in curField) {\n for (const block of curField.blocks) {\n if (block?.fields?.length) {\n const result = findFieldPathAndSiblingFields(block.fields, [\n ...path,\n curField.name,\n block.slug,\n ])\n if (result) {\n return result\n }\n }\n }\n }\n }\n\n return null\n }\n\n const foundSiblingFields = findFieldPathAndSiblingFields(fields, [])\n\n if (!foundSiblingFields)\n throw new Error(\n `Could not find sibling fields of current lexicalHTML field with name ${field?.name}`,\n )\n\n const { siblingFields } = foundSiblingFields\n const lexicalField: RichTextField<SerializedEditorState, AdapterProps> =\n siblingFields.find(\n (field) => 'name' in field && field.name === lexicalFieldName,\n ) as RichTextField<SerializedEditorState, AdapterProps>\n\n const lexicalFieldData: SerializedEditorState = siblingData[lexicalFieldName]\n\n if (!lexicalFieldData) {\n return ''\n }\n\n if (!lexicalField) {\n throw new Error(\n 'You cannot use the lexicalHTML field because the referenced lexical field was not found',\n )\n }\n\n const config = (lexicalField?.editor as LexicalRichTextAdapter)?.editorConfig\n\n if (!config) {\n throw new Error(\n 'The linked lexical field does not have an editorConfig. This is needed for the lexicalHTML field.',\n )\n }\n\n if (!config?.resolvedFeatureMap?.has('htmlConverter')) {\n throw new Error(\n 'You cannot use the lexicalHTML field because the linked lexical field does not have a HTMLConverterFeature',\n )\n }\n\n const finalConverters = consolidateHTMLConverters({\n editorConfig: config,\n })\n\n return await convertLexicalToHTML({\n converters: finalConverters,\n data: lexicalFieldData,\n payload: req.payload,\n })\n },\n ],\n },\n }\n}\n"],"names":["defaultHTMLConverters","convertLexicalToHTML","consolidateHTMLConverters","editorConfig","htmlConverterFeature","resolvedFeatureMap","get","htmlConverterFeatureProps","serverFeatureProps","defaultConvertersWithConvertersFromFeatures","converter","features","converters","html","push","finalConverters","defaultConverters","foundNodeTypes","filteredConverters","reverse","nodeTypes","length","newConverter","filter","nodeType","includes","lexicalHTML","lexicalFieldName","props","name","hidden","type","admin","editorOptions","language","hooks","afterRead","collection","field","global","req","siblingData","fields","findFieldPathAndSiblingFields","path","curField","siblingFields","result","tab","tabs","block","blocks","slug","foundSiblingFields","Error","lexicalField","find","lexicalFieldData","config","editor","has","data","payload"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"file":"createFeaturePropComponent.d.ts","sourceRoot":"","sources":["../../../src/field/features/createFeaturePropComponent.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAc9B,eAAO,MAAM,0BAA0B,sBAC/B,CAAC,KACN,MAAM,EAAE,CAAC;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAKvD,CAAA"}
1
+ {"version":3,"file":"createFeaturePropComponent.d.ts","sourceRoot":"","sources":["../../../src/field/features/createFeaturePropComponent.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAoB9B,eAAO,MAAM,0BAA0B,sBAC/B,CAAC,KACN,MAAM,EAAE,CAAC;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAKvD,CAAA"}
@@ -1,8 +1,13 @@
1
1
  'use client';
2
+ import { useTableCell } from '@payloadcms/ui/elements/Table';
2
3
  import { useFieldProps } from '@payloadcms/ui/forms/FieldPropsProvider';
3
4
  import { useAddClientFunction } from '@payloadcms/ui/providers/ClientFunction';
4
5
  const useLexicalFeatureProp = (featureKey, componentKey, prop)=>{
5
- const { schemaPath } = useFieldProps();
6
+ const { schemaPath: schemaPathFromFieldProps } = useFieldProps();
7
+ const tableCell = useTableCell();
8
+ const schemaPathFromCellProps = tableCell?.cellProps?.schemaPath;
9
+ const schemaPath = schemaPathFromCellProps || schemaPathFromFieldProps // schemaPathFromCellProps needs to have priority, as there can be cells within fields (e.g. list drawers) and the cell schemaPath needs to be used there - not the parent field schemaPath. There cannot be fields within cells.
10
+ ;
6
11
  useAddClientFunction(`lexicalFeature.${schemaPath}.${featureKey}.components.${componentKey}`, prop);
7
12
  };
8
13
  export const createFeaturePropComponent = (prop)=>{
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/field/features/createFeaturePropComponent.tsx"],"sourcesContent":["'use client'\n\nimport type React from 'react'\n\nimport { useFieldProps } from '@payloadcms/ui/forms/FieldPropsProvider'\nimport { useAddClientFunction } from '@payloadcms/ui/providers/ClientFunction'\n\nconst useLexicalFeatureProp = <T,>(featureKey: string, componentKey: string, prop: T) => {\n const { schemaPath } = useFieldProps()\n\n useAddClientFunction(\n `lexicalFeature.${schemaPath}.${featureKey}.components.${componentKey}`,\n prop,\n )\n}\n\nexport const createFeaturePropComponent = <T = unknown,>(\n prop: T,\n): React.FC<{ componentKey: string; featureKey: string }> => {\n return (props) => {\n useLexicalFeatureProp(props.featureKey, props.componentKey, prop)\n return null\n }\n}\n"],"names":["useFieldProps","useAddClientFunction","useLexicalFeatureProp","featureKey","componentKey","prop","schemaPath","createFeaturePropComponent","props"],"rangeMappings":";;;;;;;;;;;;","mappings":"AAAA;AAIA,SAASA,aAAa,QAAQ,0CAAyC;AACvE,SAASC,oBAAoB,QAAQ,0CAAyC;AAE9E,MAAMC,wBAAwB,CAAKC,YAAoBC,cAAsBC;IAC3E,MAAM,EAAEC,UAAU,EAAE,GAAGN;IAEvBC,qBACE,CAAC,eAAe,EAAEK,WAAW,CAAC,EAAEH,WAAW,YAAY,EAAEC,aAAa,CAAC,EACvEC;AAEJ;AAEA,OAAO,MAAME,6BAA6B,CACxCF;IAEA,OAAO,CAACG;QACNN,sBAAsBM,MAAML,UAAU,EAAEK,MAAMJ,YAAY,EAAEC;QAC5D,OAAO;IACT;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../src/field/features/createFeaturePropComponent.tsx"],"sourcesContent":["'use client'\n\nimport type React from 'react'\n\nimport { useTableCell } from '@payloadcms/ui/elements/Table'\nimport { useFieldProps } from '@payloadcms/ui/forms/FieldPropsProvider'\nimport { useAddClientFunction } from '@payloadcms/ui/providers/ClientFunction'\n\nconst useLexicalFeatureProp = <T,>(featureKey: string, componentKey: string, prop: T) => {\n const { schemaPath: schemaPathFromFieldProps } = useFieldProps()\n const tableCell = useTableCell()\n\n const schemaPathFromCellProps = tableCell?.cellProps?.schemaPath\n\n const schemaPath = schemaPathFromCellProps || schemaPathFromFieldProps // schemaPathFromCellProps needs to have priority, as there can be cells within fields (e.g. list drawers) and the cell schemaPath needs to be used there - not the parent field schemaPath. There cannot be fields within cells.\n\n useAddClientFunction(\n `lexicalFeature.${schemaPath}.${featureKey}.components.${componentKey}`,\n prop,\n )\n}\n\nexport const createFeaturePropComponent = <T = unknown,>(\n prop: T,\n): React.FC<{ componentKey: string; featureKey: string }> => {\n return (props) => {\n useLexicalFeatureProp(props.featureKey, props.componentKey, prop)\n return null\n }\n}\n"],"names":["useTableCell","useFieldProps","useAddClientFunction","useLexicalFeatureProp","featureKey","componentKey","prop","schemaPath","schemaPathFromFieldProps","tableCell","schemaPathFromCellProps","cellProps","createFeaturePropComponent","props"],"rangeMappings":";;;;;;;;;;;;;;;;;","mappings":"AAAA;AAIA,SAASA,YAAY,QAAQ,gCAA+B;AAC5D,SAASC,aAAa,QAAQ,0CAAyC;AACvE,SAASC,oBAAoB,QAAQ,0CAAyC;AAE9E,MAAMC,wBAAwB,CAAKC,YAAoBC,cAAsBC;IAC3E,MAAM,EAAEC,YAAYC,wBAAwB,EAAE,GAAGP;IACjD,MAAMQ,YAAYT;IAElB,MAAMU,0BAA0BD,WAAWE,WAAWJ;IAEtD,MAAMA,aAAaG,2BAA2BF,yBAAyB,iOAAiO;;IAExSN,qBACE,CAAC,eAAe,EAAEK,WAAW,CAAC,EAAEH,WAAW,YAAY,EAAEC,aAAa,CAAC,EACvEC;AAEJ;AAEA,OAAO,MAAMM,6BAA6B,CACxCN;IAEA,OAAO,CAACO;QACNV,sBAAsBU,MAAMT,UAAU,EAAES,MAAMR,YAAY,EAAEC;QAC5D,OAAO;IACT;AACF,EAAC"}
@@ -1,3 +1,6 @@
1
1
  /// <reference types="react" resolution-mode="require"/>
2
- export declare const TestRecorderFeatureClientComponent: import("react").FC<undefined>;
2
+ export declare const TestRecorderFeatureClientComponent: import("react").FC<{
3
+ featureKey: string;
4
+ order: number;
5
+ }>;
3
6
  //# sourceMappingURL=feature.client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/debug/testRecorder/feature.client.tsx"],"names":[],"mappings":";AAqBA,eAAO,MAAM,kCAAkC;;;EAAmD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/features/debug/testrecorder/feature.client.tsx"],"sourcesContent":["'use client'\nimport type { FeatureProviderProviderClient } from '../../types.js'\n\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { TestRecorderPlugin } from './plugin/index.js'\n\nconst TestRecorderFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n plugins: [\n {\n Component: TestRecorderPlugin,\n position: 'bottom',\n },\n ],\n }),\n }\n}\n\nexport const TestRecorderFeatureClientComponent = createClientComponent(TestRecorderFeatureClient)\n"],"names":["createClientComponent","TestRecorderPlugin","TestRecorderFeatureClient","props","clientFeatureProps","feature","plugins","Component","position","TestRecorderFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;","mappings":"AAAA;AAGA,SAASA,qBAAqB,QAAQ,iCAAgC;AACtE,SAASC,kBAAkB,QAAQ,oBAAmB;AAEtD,MAAMC,4BAAsE,CAACC;IAC3E,OAAO;QACLC,oBAAoBD;QACpBE,SAAS,IAAO,CAAA;gBACdD,oBAAoBD;gBACpBG,SAAS;oBACP;wBACEC,WAAWN;wBACXO,UAAU;oBACZ;iBACD;YACH,CAAA;IACF;AACF;AAEA,OAAO,MAAMC,qCAAqCT,sBAAsBE,2BAA0B"}
1
+ {"version":3,"sources":["../../../../../src/field/features/debug/testRecorder/feature.client.tsx"],"sourcesContent":["'use client'\nimport type { FeatureProviderProviderClient } from '../../types.js'\n\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { TestRecorderPlugin } from './plugin/index.js'\n\nconst TestRecorderFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n plugins: [\n {\n Component: TestRecorderPlugin,\n position: 'bottom',\n },\n ],\n }),\n }\n}\n\nexport const TestRecorderFeatureClientComponent = createClientComponent(TestRecorderFeatureClient)\n"],"names":["createClientComponent","TestRecorderPlugin","TestRecorderFeatureClient","props","clientFeatureProps","feature","plugins","Component","position","TestRecorderFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;","mappings":"AAAA;AAGA,SAASA,qBAAqB,QAAQ,iCAAgC;AACtE,SAASC,kBAAkB,QAAQ,oBAAmB;AAEtD,MAAMC,4BAAsE,CAACC;IAC3E,OAAO;QACLC,oBAAoBD;QACpBE,SAAS,IAAO,CAAA;gBACdD,oBAAoBD;gBACpBG,SAAS;oBACP;wBACEC,WAAWN;wBACXO,UAAU;oBACZ;iBACD;YACH,CAAA;IACF;AACF;AAEA,OAAO,MAAMC,qCAAqCT,sBAAsBE,2BAA0B"}
@@ -1 +1 @@
1
- {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/debug/testrecorder/feature.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAA;AAInE,eAAO,MAAM,mBAAmB,EAAE,6BAA6B,CAAC,SAAS,EAAE,SAAS,CAWnF,CAAA"}
1
+ {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/debug/testRecorder/feature.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAA;AAInE,eAAO,MAAM,mBAAmB,EAAE,6BAA6B,CAAC,SAAS,EAAE,SAAS,CAWnF,CAAA"}
@@ -7,7 +7,7 @@ export const TestRecorderFeature = (props)=>{
7
7
  serverFeatureProps: props
8
8
  };
9
9
  },
10
- key: 'testrecorder',
10
+ key: 'testRecorder',
11
11
  serverFeatureProps: props
12
12
  };
13
13
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/features/debug/testrecorder/feature.server.ts"],"sourcesContent":["import type { FeatureProviderProviderServer } from '../../types.js'\n\nimport { TestRecorderFeatureClientComponent } from './feature.client.js'\n\nexport const TestRecorderFeature: FeatureProviderProviderServer<undefined, undefined> = (props) => {\n return {\n feature: () => {\n return {\n ClientComponent: TestRecorderFeatureClientComponent,\n serverFeatureProps: props,\n }\n },\n key: 'testrecorder',\n serverFeatureProps: props,\n }\n}\n"],"names":["TestRecorderFeatureClientComponent","TestRecorderFeature","props","feature","ClientComponent","serverFeatureProps","key"],"rangeMappings":";;;;;;;;;;;;","mappings":"AAEA,SAASA,kCAAkC,QAAQ,sBAAqB;AAExE,OAAO,MAAMC,sBAA2E,CAACC;IACvF,OAAO;QACLC,SAAS;YACP,OAAO;gBACLC,iBAAiBJ;gBACjBK,oBAAoBH;YACtB;QACF;QACAI,KAAK;QACLD,oBAAoBH;IACtB;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../../../src/field/features/debug/testRecorder/feature.server.ts"],"sourcesContent":["import type { FeatureProviderProviderServer } from '../../types.js'\n\nimport { TestRecorderFeatureClientComponent } from './feature.client.js'\n\nexport const TestRecorderFeature: FeatureProviderProviderServer<undefined, undefined> = (props) => {\n return {\n feature: () => {\n return {\n ClientComponent: TestRecorderFeatureClientComponent,\n serverFeatureProps: props,\n }\n },\n key: 'testRecorder',\n serverFeatureProps: props,\n }\n}\n"],"names":["TestRecorderFeatureClientComponent","TestRecorderFeature","props","feature","ClientComponent","serverFeatureProps","key"],"rangeMappings":";;;;;;;;;;;;","mappings":"AAEA,SAASA,kCAAkC,QAAQ,sBAAqB;AAExE,OAAO,MAAMC,sBAA2E,CAACC;IACvF,OAAO;QACLC,SAAS;YACP,OAAO;gBACLC,iBAAiBJ;gBACjBK,oBAAoBH;YACtB;QACF;QACAI,KAAK;QACLD,oBAAoBH;IACtB;AACF,EAAC"}
@@ -0,0 +1,5 @@
1
+ import type { PluginComponent } from '../../../types.js';
2
+ import './index.scss';
3
+ export declare function isSelectAll(event: KeyboardEvent): boolean;
4
+ export declare const TestRecorderPlugin: PluginComponent<undefined>;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/field/features/debug/testRecorder/plugin/index.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAGxD,OAAO,cAAc,CAAA;AA8ErB,wBAAgB,WAAW,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAEzD;AAmWD,eAAO,MAAM,kBAAkB,EAAE,eAAe,CAAC,SAAS,CAYzD,CAAA"}
@@ -1,8 +1,7 @@
1
1
  'use client';
2
- import lexicalComposerContextImport from '@lexical/react/LexicalComposerContext.js';
3
- const { useLexicalComposerContext } = lexicalComposerContextImport;
4
- import lexicalImport from 'lexical';
5
- const { $createParagraphNode, $createTextNode, $getRoot } = lexicalImport;
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js';
4
+ import { $createParagraphNode, $createTextNode, $getRoot } from 'lexical';
6
5
  import * as React from 'react';
7
6
  import { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
8
7
  import { IS_APPLE } from '../../../../lexical/utils/environment.js';
@@ -91,7 +90,7 @@ const formatStep = (step)=>{
91
90
  }
92
91
  };
93
92
  export function isSelectAll(event) {
94
- return event.keyCode === 65 && (IS_APPLE ? event.metaKey : event.ctrlKey);
93
+ return event.code === 'KeyA' && (IS_APPLE ? event.metaKey : event.ctrlKey);
95
94
  }
96
95
  // stolen from LexicalSelection-test
97
96
  function sanitizeSelection(selection) {
@@ -389,7 +388,7 @@ ${steps.map(formatStep).join(`\n`)}
389
388
  }, [
390
389
  generateTestContent
391
390
  ]);
392
- const button = /*#__PURE__*/ React.createElement("button", {
391
+ const button = /*#__PURE__*/ _jsx("button", {
393
392
  className: `editor-dev-button ${isRecording ? 'active' : ''}`,
394
393
  id: "test-recorder-button",
395
394
  onClick: (e)=>{
@@ -397,43 +396,57 @@ ${steps.map(formatStep).join(`\n`)}
397
396
  e.preventDefault();
398
397
  },
399
398
  title: isRecording ? 'Disable test recorder' : 'Enable test recorder',
400
- type: "button"
401
- }, isRecording ? 'Disable test recorder' : 'Enable test recorder');
402
- const output = isRecording ? /*#__PURE__*/ React.createElement("div", {
403
- className: "test-recorder-output"
404
- }, /*#__PURE__*/ React.createElement("div", {
405
- className: "test-recorder-toolbar"
406
- }, /*#__PURE__*/ React.createElement("button", {
407
- className: "test-recorder-button",
408
- id: "test-recorder-button-snapshot",
409
- onClick: (e)=>{
410
- onSnapshotClick();
411
- e.preventDefault();
412
- },
413
- title: "Insert snapshot",
414
- type: "button"
415
- }, "Insert Snapshot"), /*#__PURE__*/ React.createElement("button", {
416
- className: "test-recorder-button",
417
- id: "test-recorder-button-copy",
418
- onClick: (e)=>{
419
- onCopyClick();
420
- e.preventDefault();
421
- },
422
- title: "Copy to clipboard",
423
- type: "button"
424
- }, "Copy"), /*#__PURE__*/ React.createElement("button", {
425
- className: "test-recorder-button",
426
- id: "test-recorder-button-download",
427
- onClick: (e)=>{
428
- onDownloadClick();
429
- e.preventDefault();
430
- },
431
- title: "Download as a file",
432
- type: "button"
433
- }, "Download")), /*#__PURE__*/ React.createElement("pre", {
434
- id: "test-recorder",
435
- ref: preRef
436
- }, templatedTest)) : null;
399
+ type: "button",
400
+ children: isRecording ? 'Disable test recorder' : 'Enable test recorder'
401
+ });
402
+ const output = isRecording ? /*#__PURE__*/ _jsxs("div", {
403
+ className: "test-recorder-output",
404
+ children: [
405
+ /*#__PURE__*/ _jsxs("div", {
406
+ className: "test-recorder-toolbar",
407
+ children: [
408
+ /*#__PURE__*/ _jsx("button", {
409
+ className: "test-recorder-button",
410
+ id: "test-recorder-button-snapshot",
411
+ onClick: (e)=>{
412
+ onSnapshotClick();
413
+ e.preventDefault();
414
+ },
415
+ title: "Insert snapshot",
416
+ type: "button",
417
+ children: "Insert Snapshot"
418
+ }),
419
+ /*#__PURE__*/ _jsx("button", {
420
+ className: "test-recorder-button",
421
+ id: "test-recorder-button-copy",
422
+ onClick: (e)=>{
423
+ onCopyClick();
424
+ e.preventDefault();
425
+ },
426
+ title: "Copy to clipboard",
427
+ type: "button",
428
+ children: "Copy"
429
+ }),
430
+ /*#__PURE__*/ _jsx("button", {
431
+ className: "test-recorder-button",
432
+ id: "test-recorder-button-download",
433
+ onClick: (e)=>{
434
+ onDownloadClick();
435
+ e.preventDefault();
436
+ },
437
+ title: "Download as a file",
438
+ type: "button",
439
+ children: "Download"
440
+ })
441
+ ]
442
+ }),
443
+ /*#__PURE__*/ _jsx("pre", {
444
+ id: "test-recorder",
445
+ ref: preRef,
446
+ children: templatedTest
447
+ })
448
+ ]
449
+ }) : null;
437
450
  return [
438
451
  button,
439
452
  output
@@ -442,7 +455,18 @@ ${steps.map(formatStep).join(`\n`)}
442
455
  export const TestRecorderPlugin = ()=>{
443
456
  const [editor] = useLexicalComposerContext();
444
457
  const [testRecorderButton, testRecorderOutput] = useTestRecorder(editor);
445
- return /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement("p", null, "HI"), testRecorderButton, testRecorderOutput, /*#__PURE__*/ React.createElement("p", null, "DONE"));
458
+ return /*#__PURE__*/ _jsxs(React.Fragment, {
459
+ children: [
460
+ /*#__PURE__*/ _jsx("p", {
461
+ children: "HI"
462
+ }),
463
+ testRecorderButton,
464
+ testRecorderOutput,
465
+ /*#__PURE__*/ _jsx("p", {
466
+ children: "DONE"
467
+ })
468
+ ]
469
+ });
446
470
  };
447
471
 
448
472
  //# sourceMappingURL=index.js.map