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

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 (840) 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 +67 -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 +92 -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 +5 -6
  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 +35 -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 -76
  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.d.ts.map +1 -1
  613. package/dist/field/lexical/theme/EditorTheme.js +1 -0
  614. package/dist/field/lexical/theme/EditorTheme.js.map +1 -1
  615. package/dist/field/lexical/theme/EditorTheme.scss +18 -14
  616. package/dist/field/lexical/ui/ContentEditable.d.ts +1 -1
  617. package/dist/field/lexical/ui/ContentEditable.d.ts.map +1 -1
  618. package/dist/field/lexical/ui/ContentEditable.js +3 -3
  619. package/dist/field/lexical/ui/ContentEditable.js.map +1 -1
  620. package/dist/field/lexical/ui/ContentEditable.scss +55 -4
  621. package/dist/field/lexical/ui/icons/AI/index.js +26 -17
  622. package/dist/field/lexical/ui/icons/AI/index.js.map +1 -1
  623. package/dist/field/lexical/ui/icons/Add/index.d.ts +3 -0
  624. package/dist/field/lexical/ui/icons/Add/index.d.ts.map +1 -0
  625. package/dist/field/lexical/ui/icons/Add/index.js +21 -0
  626. package/dist/field/lexical/ui/icons/Add/index.js.map +1 -0
  627. package/dist/field/lexical/ui/icons/Add/light.svg +4 -0
  628. package/dist/field/lexical/ui/icons/AlignCenter/index.js +21 -15
  629. package/dist/field/lexical/ui/icons/AlignCenter/index.js.map +1 -1
  630. package/dist/field/lexical/ui/icons/AlignJustify/index.js +21 -15
  631. package/dist/field/lexical/ui/icons/AlignJustify/index.js.map +1 -1
  632. package/dist/field/lexical/ui/icons/AlignLeft/index.js +21 -15
  633. package/dist/field/lexical/ui/icons/AlignLeft/index.js.map +1 -1
  634. package/dist/field/lexical/ui/icons/AlignRight/index.js +21 -15
  635. package/dist/field/lexical/ui/icons/AlignRight/index.js.map +1 -1
  636. package/dist/field/lexical/ui/icons/Block/index.js +30 -24
  637. package/dist/field/lexical/ui/icons/Block/index.js.map +1 -1
  638. package/dist/field/lexical/ui/icons/Blockquote/index.js +8 -6
  639. package/dist/field/lexical/ui/icons/Blockquote/index.js.map +1 -1
  640. package/dist/field/lexical/ui/icons/Bold/index.js +8 -6
  641. package/dist/field/lexical/ui/icons/Bold/index.js.map +1 -1
  642. package/dist/field/lexical/ui/icons/Checklist/index.js +19 -14
  643. package/dist/field/lexical/ui/icons/Checklist/index.js.map +1 -1
  644. package/dist/field/lexical/ui/icons/Code/index.js +14 -9
  645. package/dist/field/lexical/ui/icons/Code/index.js.map +1 -1
  646. package/dist/field/lexical/ui/icons/CodeBlock/index.js +14 -9
  647. package/dist/field/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  648. package/dist/field/lexical/ui/icons/DraggableBlock/light.svg +9 -0
  649. package/dist/field/lexical/ui/icons/H1/index.js +8 -6
  650. package/dist/field/lexical/ui/icons/H1/index.js.map +1 -1
  651. package/dist/field/lexical/ui/icons/H2/index.js +8 -6
  652. package/dist/field/lexical/ui/icons/H2/index.js.map +1 -1
  653. package/dist/field/lexical/ui/icons/H3/index.js +8 -6
  654. package/dist/field/lexical/ui/icons/H3/index.js.map +1 -1
  655. package/dist/field/lexical/ui/icons/H4/index.js +8 -6
  656. package/dist/field/lexical/ui/icons/H4/index.js.map +1 -1
  657. package/dist/field/lexical/ui/icons/H5/index.js +8 -6
  658. package/dist/field/lexical/ui/icons/H5/index.js.map +1 -1
  659. package/dist/field/lexical/ui/icons/H6/index.js +8 -6
  660. package/dist/field/lexical/ui/icons/H6/index.js.map +1 -1
  661. package/dist/field/lexical/ui/icons/HorizontalRule/index.d.ts +3 -0
  662. package/dist/field/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -0
  663. package/dist/field/lexical/ui/icons/HorizontalRule/index.js +21 -0
  664. package/dist/field/lexical/ui/icons/HorizontalRule/index.js.map +1 -0
  665. package/dist/field/lexical/ui/icons/IndentDecrease/index.js +25 -18
  666. package/dist/field/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
  667. package/dist/field/lexical/ui/icons/IndentIncrease/index.js +25 -18
  668. package/dist/field/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
  669. package/dist/field/lexical/ui/icons/Italic/index.js +8 -6
  670. package/dist/field/lexical/ui/icons/Italic/index.js.map +1 -1
  671. package/dist/field/lexical/ui/icons/Link/index.d.ts.map +1 -1
  672. package/dist/field/lexical/ui/icons/Link/index.js +10 -18
  673. package/dist/field/lexical/ui/icons/Link/index.js.map +1 -1
  674. package/dist/field/lexical/ui/icons/OrderedList/index.js +29 -21
  675. package/dist/field/lexical/ui/icons/OrderedList/index.js.map +1 -1
  676. package/dist/field/lexical/ui/icons/Relationship/index.js +26 -17
  677. package/dist/field/lexical/ui/icons/Relationship/index.js.map +1 -1
  678. package/dist/field/lexical/ui/icons/Strikethrough/index.js +14 -9
  679. package/dist/field/lexical/ui/icons/Strikethrough/index.js.map +1 -1
  680. package/dist/field/lexical/ui/icons/Subscript/index.js +8 -6
  681. package/dist/field/lexical/ui/icons/Subscript/index.js.map +1 -1
  682. package/dist/field/lexical/ui/icons/Superscript/index.js +8 -6
  683. package/dist/field/lexical/ui/icons/Superscript/index.js.map +1 -1
  684. package/dist/field/lexical/ui/icons/Text/index.js +8 -6
  685. package/dist/field/lexical/ui/icons/Text/index.js.map +1 -1
  686. package/dist/field/lexical/ui/icons/Underline/index.js +14 -9
  687. package/dist/field/lexical/ui/icons/Underline/index.js.map +1 -1
  688. package/dist/field/lexical/ui/icons/UnorderedList/index.js +45 -36
  689. package/dist/field/lexical/ui/icons/UnorderedList/index.js.map +1 -1
  690. package/dist/field/lexical/ui/icons/Upload/index.js +24 -18
  691. package/dist/field/lexical/ui/icons/Upload/index.js.map +1 -1
  692. package/dist/field/lexical/utils/getSelectedNode.d.ts.map +1 -1
  693. package/dist/field/lexical/utils/getSelectedNode.js +1 -2
  694. package/dist/field/lexical/utils/getSelectedNode.js.map +1 -1
  695. package/dist/field/lexical/utils/nodeFormat.d.ts +2 -1
  696. package/dist/field/lexical/utils/nodeFormat.d.ts.map +1 -1
  697. package/dist/field/lexical/utils/nodeFormat.js.map +1 -1
  698. package/dist/field/lexical/utils/setFloatingElemPosition.d.ts +11 -1
  699. package/dist/field/lexical/utils/setFloatingElemPosition.d.ts.map +1 -1
  700. package/dist/field/lexical/utils/setFloatingElemPosition.js +16 -13
  701. package/dist/field/lexical/utils/setFloatingElemPosition.js.map +1 -1
  702. package/dist/field/lexical/utils/url.d.ts.map +1 -1
  703. package/dist/field/lexical/utils/url.js +13 -2
  704. package/dist/field/lexical/utils/url.js.map +1 -1
  705. package/dist/forEachNodeRecursively.d.ts +10 -0
  706. package/dist/forEachNodeRecursively.d.ts.map +1 -0
  707. package/dist/forEachNodeRecursively.js +24 -0
  708. package/dist/forEachNodeRecursively.js.map +1 -0
  709. package/dist/generateComponentMap.d.ts.map +1 -1
  710. package/dist/generateComponentMap.js +21 -29
  711. package/dist/generateComponentMap.js.map +1 -1
  712. package/dist/generateSchemaMap.d.ts.map +1 -1
  713. package/dist/generateSchemaMap.js +4 -12
  714. package/dist/generateSchemaMap.js.map +1 -1
  715. package/dist/i18n.d.ts +3 -0
  716. package/dist/i18n.d.ts.map +1 -0
  717. package/dist/i18n.js +164 -0
  718. package/dist/i18n.js.map +1 -0
  719. package/dist/index.d.ts +25 -21
  720. package/dist/index.d.ts.map +1 -1
  721. package/dist/index.js +296 -183
  722. package/dist/index.js.map +1 -1
  723. package/dist/populate/defaultValue.d.ts +0 -1
  724. package/dist/populate/defaultValue.d.ts.map +1 -1
  725. package/dist/populate/defaultValue.js +1 -19
  726. package/dist/populate/defaultValue.js.map +1 -1
  727. package/dist/populate/populate.d.ts +5 -4
  728. package/dist/populate/populate.d.ts.map +1 -1
  729. package/dist/populate/populate.js +13 -11
  730. package/dist/populate/populate.js.map +1 -1
  731. package/dist/populate/populateLexicalPopulationPromises.d.ts +12 -0
  732. package/dist/populate/populateLexicalPopulationPromises.d.ts.map +1 -0
  733. package/dist/populate/populateLexicalPopulationPromises.js +36 -0
  734. package/dist/populate/populateLexicalPopulationPromises.js.map +1 -0
  735. package/dist/populate/recurseNestedFields.d.ts +8 -4
  736. package/dist/populate/recurseNestedFields.d.ts.map +1 -1
  737. package/dist/populate/recurseNestedFields.js +4 -5
  738. package/dist/populate/recurseNestedFields.js.map +1 -1
  739. package/dist/scss/app.scss +2 -3
  740. package/dist/scss/vars.scss +0 -7
  741. package/dist/types.d.ts +45 -6
  742. package/dist/types.d.ts.map +1 -1
  743. package/dist/types.js.map +1 -1
  744. package/dist/useLexicalFeature.d.ts.map +1 -1
  745. package/dist/useLexicalFeature.js +6 -1
  746. package/dist/useLexicalFeature.js.map +1 -1
  747. package/dist/validate/index.d.ts +1 -1
  748. package/dist/validate/index.d.ts.map +1 -1
  749. package/dist/validate/index.js +3 -2
  750. package/dist/validate/index.js.map +1 -1
  751. package/dist/validate/validateNodes.js +1 -1
  752. package/dist/validate/validateNodes.js.map +1 -1
  753. package/package.json +71 -51
  754. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts +0 -3
  755. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.d.ts.map +0 -1
  756. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js +0 -12
  757. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js.map +0 -1
  758. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.d.ts +0 -3
  759. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.d.ts.map +0 -1
  760. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js +0 -10
  761. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js.map +0 -1
  762. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts +0 -3
  763. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.d.ts.map +0 -1
  764. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js +0 -12
  765. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js.map +0 -1
  766. package/dist/field/features/debug/testrecorder/feature.client.d.ts.map +0 -1
  767. package/dist/field/features/debug/testrecorder/plugin/index.d.ts +0 -5
  768. package/dist/field/features/debug/testrecorder/plugin/index.d.ts.map +0 -1
  769. package/dist/field/features/debug/testrecorder/plugin/index.js.map +0 -1
  770. package/dist/field/features/debug/treeview/feature.client.d.ts.map +0 -1
  771. package/dist/field/features/debug/treeview/plugin/index.d.ts +0 -4
  772. package/dist/field/features/debug/treeview/plugin/index.d.ts.map +0 -1
  773. package/dist/field/features/debug/treeview/plugin/index.js.map +0 -1
  774. package/dist/field/features/format/common/floatingSelectToolbarSection.d.ts +0 -3
  775. package/dist/field/features/format/common/floatingSelectToolbarSection.d.ts.map +0 -1
  776. package/dist/field/features/format/common/floatingSelectToolbarSection.js +0 -10
  777. package/dist/field/features/format/common/floatingSelectToolbarSection.js.map +0 -1
  778. package/dist/field/features/format/inlinecode/feature.client.d.ts.map +0 -1
  779. package/dist/field/features/format/inlinecode/feature.client.js +0 -43
  780. package/dist/field/features/format/inlinecode/feature.client.js.map +0 -1
  781. package/dist/field/features/indent/floatingSelectToolbarIndentSection.d.ts +0 -3
  782. package/dist/field/features/indent/floatingSelectToolbarIndentSection.d.ts.map +0 -1
  783. package/dist/field/features/indent/floatingSelectToolbarIndentSection.js +0 -10
  784. package/dist/field/features/indent/floatingSelectToolbarIndentSection.js.map +0 -1
  785. package/dist/field/features/indent/index.scss +0 -4
  786. package/dist/field/features/lists/common/markdown.js.map +0 -1
  787. package/dist/field/features/lists/orderedlist/feature.client.d.ts.map +0 -1
  788. package/dist/field/features/lists/orderedlist/feature.client.js +0 -72
  789. package/dist/field/features/lists/orderedlist/feature.client.js.map +0 -1
  790. package/dist/field/features/lists/orderedlist/feature.server.d.ts.map +0 -1
  791. package/dist/field/features/lists/orderedlist/feature.server.js.map +0 -1
  792. package/dist/field/features/lists/orderedlist/markdownTransformer.d.ts.map +0 -1
  793. package/dist/field/features/lists/orderedlist/markdownTransformer.js.map +0 -1
  794. package/dist/field/features/lists/unorderedlist/feature.client.d.ts.map +0 -1
  795. package/dist/field/features/lists/unorderedlist/feature.client.js +0 -72
  796. package/dist/field/features/lists/unorderedlist/feature.client.js.map +0 -1
  797. package/dist/field/features/lists/unorderedlist/feature.server.d.ts.map +0 -1
  798. package/dist/field/features/lists/unorderedlist/feature.server.js.map +0 -1
  799. package/dist/field/features/lists/unorderedlist/markdownTransformer.d.ts.map +0 -1
  800. package/dist/field/features/lists/unorderedlist/markdownTransformer.js.map +0 -1
  801. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts +0 -8
  802. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.d.ts.map +0 -1
  803. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.js.map +0 -1
  804. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts +0 -17
  805. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.d.ts.map +0 -1
  806. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.js.map +0 -1
  807. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.d.ts +0 -18
  808. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.d.ts.map +0 -1
  809. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js +0 -42
  810. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js.map +0 -1
  811. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts +0 -6
  812. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.d.ts.map +0 -1
  813. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.js +0 -270
  814. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.js.map +0 -1
  815. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts +0 -40
  816. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.d.ts.map +0 -1
  817. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.js.map +0 -1
  818. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.d.ts.map +0 -1
  819. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.js.map +0 -1
  820. package/dist/populate/richTextRelationshipPromise.d.ts +0 -23
  821. package/dist/populate/richTextRelationshipPromise.d.ts.map +0 -1
  822. package/dist/populate/richTextRelationshipPromise.js +0 -68
  823. package/dist/populate/richTextRelationshipPromise.js.map +0 -1
  824. package/dist/scss/fonts.scss +0 -75
  825. package/src/index.ts +0 -423
  826. /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.client.js +0 -0
  827. /package/dist/field/features/debug/{testrecorder → testRecorder}/feature.server.d.ts +0 -0
  828. /package/dist/field/features/debug/{testrecorder → testRecorder}/plugin/index.scss +0 -0
  829. /package/dist/field/features/debug/{treeview → treeView}/feature.client.js +0 -0
  830. /package/dist/field/features/debug/{treeview → treeView}/feature.server.d.ts +0 -0
  831. /package/dist/field/features/debug/{treeview → treeView}/plugin/index.scss +0 -0
  832. /package/dist/field/features/format/{inlinecode → inlineCode}/feature.server.d.ts +0 -0
  833. /package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.d.ts +0 -0
  834. /package/dist/field/features/format/{inlinecode → inlineCode}/markdownTransformers.js +0 -0
  835. /package/dist/field/features/lists/{orderedlist → orderedList}/feature.server.d.ts +0 -0
  836. /package/dist/field/features/lists/{orderedlist → orderedList}/markdownTransformer.d.ts +0 -0
  837. /package/dist/field/features/lists/{common → shared}/markdown.d.ts +0 -0
  838. /package/dist/field/features/lists/{unorderedlist → unorderedList}/feature.server.d.ts +0 -0
  839. /package/dist/field/features/lists/{unorderedlist → unorderedList}/markdownTransformer.d.ts +0 -0
  840. /package/dist/field/{lexical/plugins/FloatingSelectToolbar → features/toolbars}/types.js +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typeUtilities.d.ts","sourceRoot":"","sources":["../../../src/field/features/typeUtilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE/C;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,SAAS,WAAW,EACjD,IAAI,EAAE,aAAa,CAAC,IAAI,CAAC,GACxB,aAAa,CAAC,IAAI,CAAC,CAErB"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Utility function to create a node with hooks. You don't have to use this utility, but it improves type inference
3
+ * @param node the node
4
+ */ export function createNode(node) {
5
+ return node;
6
+ }
7
+
8
+ //# sourceMappingURL=typeUtilities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/field/features/typeUtilities.ts"],"sourcesContent":["import type { LexicalNode } from 'lexical'\n\nimport type { NodeWithHooks } from './types.js'\n\n/**\n * Utility function to create a node with hooks. You don't have to use this utility, but it improves type inference\n * @param node the node\n */\nexport function createNode<Node extends LexicalNode>(\n node: NodeWithHooks<Node>,\n): NodeWithHooks<Node> {\n return node\n}\n"],"names":["createNode","node"],"rangeMappings":";;;;;","mappings":"AAIA;;;CAGC,GACD,OAAO,SAASA,WACdC,IAAyB;IAEzB,OAAOA;AACT"}
@@ -1,36 +1,41 @@
1
1
  import type { Transformer } from '@lexical/markdown';
2
- import type { I18n } from '@payloadcms/translations';
2
+ import type { GenericLanguages, I18nClient } from '@payloadcms/translations';
3
3
  import type { JSONSchema4 } from 'json-schema';
4
4
  import type { Klass, LexicalEditor, LexicalNode, SerializedEditorState } from 'lexical';
5
5
  import type { SerializedLexicalNode } from 'lexical';
6
6
  import type { LexicalNodeReplacement } from 'lexical';
7
7
  import type { RequestContext } from 'payload';
8
8
  import type { SanitizedConfig } from 'payload/config';
9
- import type { Field, PayloadRequest, RichTextField, ValidateOptions } from 'payload/types';
9
+ import type { Field, PayloadRequestWithData, ReplaceAny, RichTextField, ValidateOptions } from 'payload/types';
10
10
  import type React from 'react';
11
11
  import type { AdapterProps } from '../../types.js';
12
12
  import type { ClientEditorConfig, ServerEditorConfig } from '../lexical/config/types.js';
13
- import type { FloatingToolbarSection } from '../lexical/plugins/FloatingSelectToolbar/types.js';
14
13
  import type { SlashMenuGroup } from '../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js';
15
14
  import type { HTMLConverter } from './converters/html/converter/types.js';
16
- export type PopulationPromise<T extends SerializedLexicalNode = SerializedLexicalNode> = ({ context, currentDepth, depth, editorPopulationPromises, field, findMany, flattenLocales, node, overrideAccess, populationPromises, req, showHiddenFields, siblingDoc, }: {
15
+ import type { ToolbarGroup } from './toolbars/types.js';
16
+ export type PopulationPromise<T extends SerializedLexicalNode = SerializedLexicalNode> = ({ context, currentDepth, depth, editorPopulationPromises, field, fieldPromises, findMany, flattenLocales, node, overrideAccess, populationPromises, req, showHiddenFields, siblingDoc, }: {
17
17
  context: RequestContext;
18
18
  currentDepth: number;
19
19
  depth: number;
20
+ draft: boolean;
20
21
  /**
21
22
  * This maps all population promises to the node type
22
23
  */
23
24
  editorPopulationPromises: Map<string, Array<PopulationPromise>>;
24
25
  field: RichTextField<SerializedEditorState, AdapterProps>;
26
+ /**
27
+ * fieldPromises are used for things like field hooks. They will be awaited before awaiting populationPromises
28
+ */
29
+ fieldPromises: Promise<void>[];
25
30
  findMany: boolean;
26
31
  flattenLocales: boolean;
27
32
  node: T;
28
33
  overrideAccess: boolean;
29
34
  populationPromises: Promise<void>[];
30
- req: PayloadRequest;
35
+ req: PayloadRequestWithData;
31
36
  showHiddenFields: boolean;
32
37
  siblingDoc: Record<string, unknown>;
33
- }) => Promise<void>[];
38
+ }) => void;
34
39
  export type NodeValidation<T extends SerializedLexicalNode = SerializedLexicalNode> = ({ node, nodeValidations, validation, }: {
35
40
  node: T;
36
41
  nodeValidations: Map<string, Array<NodeValidation>>;
@@ -47,17 +52,22 @@ export type FeatureProviderServer<ServerFeatureProps, ClientFeatureProps> = {
47
52
  dependenciesPriority?: string[];
48
53
  /** Keys of soft-dependencies needed for this feature. The FeatureProviders dependencies are optional, but are considered as last-priority in the loading process */
49
54
  dependenciesSoft?: string[];
55
+ /**
56
+ * This is being called during the payload sanitization process
57
+ */
50
58
  feature: (props: {
59
+ config: SanitizedConfig;
51
60
  /** unSanitizedEditorConfig.features, but mapped */
52
61
  featureProviderMap: ServerFeatureProviderMap;
62
+ isRoot?: boolean;
53
63
  resolvedFeatures: ResolvedServerFeatureMap;
54
64
  unSanitizedEditorConfig: ServerEditorConfig;
55
- }) => ServerFeature<ServerFeatureProps, ClientFeatureProps>;
65
+ }) => Promise<ServerFeature<ServerFeatureProps, ClientFeatureProps>> | ServerFeature<ServerFeatureProps, ClientFeatureProps>;
56
66
  key: string;
57
67
  /** Props which were passed into your feature will have to be passed here. This will allow them to be used / read in other places of the code, e.g. wherever you can use useEditorConfigContext */
58
68
  serverFeatureProps: ServerFeatureProps;
59
69
  };
60
- export type FeatureProviderProviderClient<ClientFeatureProps> = (props?: ClientComponentProps<ClientFeatureProps>) => FeatureProviderClient<ClientFeatureProps>;
70
+ export type FeatureProviderProviderClient<ClientFeatureProps> = (props: ClientComponentProps<ClientFeatureProps>) => FeatureProviderClient<ClientFeatureProps>;
61
71
  /**
62
72
  * No dependencies => Features need to be sorted on the server first, then sent to client in right order
63
73
  */
@@ -74,14 +84,18 @@ export type FeatureProviderClient<ClientFeatureProps> = {
74
84
  unSanitizedEditorConfig: ClientEditorConfig;
75
85
  }) => ClientFeature<ClientFeatureProps>;
76
86
  };
87
+ export type PluginComponent<ClientFeatureProps = any> = React.FC<{
88
+ clientProps: ClientFeatureProps;
89
+ }>;
90
+ export type PluginComponentWithAnchor<ClientFeatureProps = any> = React.FC<{
91
+ anchorElem: HTMLElement;
92
+ clientProps: ClientFeatureProps;
93
+ }>;
77
94
  export type ClientFeature<ClientFeatureProps> = {
78
95
  /**
79
96
  * Return props, to make it easy to retrieve passed in props to this Feature for the client if anyone wants to
80
97
  */
81
98
  clientFeatureProps: ClientComponentProps<ClientFeatureProps>;
82
- floatingSelectToolbar?: {
83
- sections: FloatingToolbarSection[];
84
- };
85
99
  hooks?: {
86
100
  load?: ({ incomingEditorState, }: {
87
101
  incomingEditorState: SerializedEditorState;
@@ -92,32 +106,98 @@ export type ClientFeature<ClientFeatureProps> = {
92
106
  };
93
107
  markdownTransformers?: Transformer[];
94
108
  nodes?: Array<Klass<LexicalNode> | LexicalNodeReplacement>;
109
+ /**
110
+ * Plugins are react components which get added to the editor. You can use them to interact with lexical, e.g. to create a command which creates a node, or opens a modal, or some other more "outside" functionality
111
+ */
95
112
  plugins?: Array<{
96
- Component: React.FC;
113
+ Component: PluginComponent<ClientFeatureProps>;
114
+ position: 'aboveContainer';
115
+ } | {
116
+ Component: PluginComponent<ClientFeatureProps>;
97
117
  position: 'bottom';
98
118
  } | {
99
- Component: React.FC;
119
+ Component: PluginComponent<ClientFeatureProps>;
100
120
  position: 'normal';
101
121
  } | {
102
- Component: React.FC;
122
+ Component: PluginComponent<ClientFeatureProps>;
103
123
  position: 'top';
104
124
  } | {
105
- Component: React.FC<{
106
- anchorElem: HTMLElement;
107
- }>;
125
+ Component: PluginComponentWithAnchor<ClientFeatureProps>;
108
126
  position: 'floatingAnchorElem';
127
+ } | {
128
+ Component: PluginComponent<ClientFeatureProps>;
129
+ position: 'belowContainer';
109
130
  }>;
110
131
  slashMenu?: {
111
- dynamicOptions?: ({ editor, queryString, }: {
132
+ /**
133
+ * Dynamic groups allow you to add different groups depending on the query string (so, the text after the slash).
134
+ * Thus, to re-calculate the available groups, this function will be called every time you type after the /.
135
+ *
136
+ * The groups provided by dynamicGroups will be merged with the static groups provided by the groups property.
137
+ */
138
+ dynamicGroups?: ({ editor, queryString, }: {
112
139
  editor: LexicalEditor;
113
140
  queryString: string;
114
141
  }) => SlashMenuGroup[];
115
- options?: SlashMenuGroup[];
142
+ /**
143
+ * Static array of groups together with the items in them. These will always be present.
144
+ * While typing after the /, they will be filtered by the query string and the keywords, key and display name of the items.
145
+ */
146
+ groups?: SlashMenuGroup[];
147
+ };
148
+ /**
149
+ * An opt-in, classic fixed toolbar which stays at the top of the editor
150
+ */
151
+ toolbarFixed?: {
152
+ groups: ToolbarGroup[];
153
+ };
154
+ /**
155
+ * The default, floating toolbar which appears when you select text.
156
+ */
157
+ toolbarInline?: {
158
+ /**
159
+ * Array of toolbar groups / sections. Each section can contain multiple toolbar items.
160
+ */
161
+ groups: ToolbarGroup[];
116
162
  };
117
163
  };
118
- export type ClientComponentProps<ClientFeatureProps> = ClientFeatureProps & {
164
+ export type ClientComponentProps<ClientFeatureProps> = ClientFeatureProps extends undefined ? {
165
+ featureKey: string;
166
+ order: number;
167
+ } : {
119
168
  featureKey: string;
120
169
  order: number;
170
+ } & ClientFeatureProps;
171
+ export type FieldNodeHookArgs<T extends SerializedLexicalNode> = {
172
+ context: RequestContext;
173
+ /** Boolean to denote if this hook is running against finding one, or finding many within the afterRead hook. */
174
+ findMany?: boolean;
175
+ /** The value of the field. */
176
+ node?: T;
177
+ /** A string relating to which operation the field type is currently executing within. Useful within beforeValidate, beforeChange, and afterChange hooks to differentiate between create and update operations. */
178
+ operation?: 'create' | 'delete' | 'read' | 'update';
179
+ overrideAccess?: boolean;
180
+ /** The Express request object. It is mocked for Local API operations. */
181
+ req: PayloadRequestWithData;
182
+ };
183
+ export type FieldNodeHook<T extends SerializedLexicalNode> = (args: FieldNodeHookArgs<T>) => Promise<T> | T;
184
+ export type NodeWithHooks<T extends LexicalNode = any> = {
185
+ converters?: {
186
+ html?: HTMLConverter<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>;
187
+ };
188
+ hooks?: {
189
+ afterChange?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>;
190
+ afterRead?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>;
191
+ beforeChange?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>;
192
+ /**
193
+ * Runs before a document is duplicated to prevent errors in unique fields or return null to use defaultValue.
194
+ */
195
+ beforeDuplicate?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>;
196
+ beforeValidate?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>;
197
+ };
198
+ node: Klass<T> | LexicalNodeReplacement;
199
+ populationPromises?: Array<PopulationPromise<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>;
200
+ validations?: Array<NodeValidation<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>;
121
201
  };
122
202
  export type ServerFeature<ServerProps, ClientFeatureProps> = {
123
203
  ClientComponent?: React.FC<ClientComponentProps<ClientFeatureProps>>;
@@ -127,7 +207,7 @@ export type ServerFeature<ServerProps, ClientFeatureProps> = {
127
207
  clientFeatureProps?: ClientFeatureProps;
128
208
  generateComponentMap?: (args: {
129
209
  config: SanitizedConfig;
130
- i18n: I18n;
210
+ i18n: I18nClient;
131
211
  props: ServerProps;
132
212
  schemaPath: string;
133
213
  }) => {
@@ -138,15 +218,11 @@ export type ServerFeature<ServerProps, ClientFeatureProps> = {
138
218
  };
139
219
  generateSchemaMap?: (args: {
140
220
  config: SanitizedConfig;
141
- i18n: I18n;
221
+ i18n: I18nClient;
142
222
  props: ServerProps;
143
223
  schemaMap: Map<string, Field[]>;
144
224
  schemaPath: string;
145
- }) => {
146
- [key: string]: Field[];
147
- } | Promise<{
148
- [key: string]: Field[];
149
- }>;
225
+ }) => Map<string, Field[]> | null;
150
226
  generatedTypes?: {
151
227
  modifyOutputSchema: ({ collectionIDFieldTypes, config, currentSchema, field, interfaceNameDefinitions, isRequired, }: {
152
228
  collectionIDFieldTypes: {
@@ -165,22 +241,27 @@ export type ServerFeature<ServerProps, ClientFeatureProps> = {
165
241
  isRequired: boolean;
166
242
  }) => JSONSchema4;
167
243
  };
168
- hooks?: {
169
- afterReadPromise?: ({ field, incomingEditorState, siblingDoc, }: {
170
- field: RichTextField<SerializedEditorState, AdapterProps>;
171
- incomingEditorState: SerializedEditorState;
172
- siblingDoc: Record<string, unknown>;
173
- }) => Promise<void> | null;
174
- };
244
+ /**
245
+ * Here you can provide i18n translations for your feature. These will only be available on the server and client.
246
+ *
247
+ * Translations here are automatically scoped to `lexical.featureKey.yourKey`
248
+ *
249
+ * @Example
250
+ * ```ts
251
+ * i18n: {
252
+ * en: {
253
+ * label: 'Horizontal Rule',
254
+ * },
255
+ * de: {
256
+ * label: 'Trennlinie',
257
+ * },
258
+ * }
259
+ * ```
260
+ * In order to access these translations, you would use `i18n.t('lexical:horizontalRule:label')`.
261
+ */
262
+ i18n?: Partial<GenericLanguages>;
175
263
  markdownTransformers?: Transformer[];
176
- nodes?: Array<{
177
- converters?: {
178
- html?: HTMLConverter;
179
- };
180
- node: Klass<LexicalNode> | LexicalNodeReplacement;
181
- populationPromises?: Array<PopulationPromise>;
182
- validations?: Array<NodeValidation>;
183
- }>;
264
+ nodes?: Array<NodeWithHooks>;
184
265
  /** Props which were passed into your feature will have to be passed here. This will allow them to be used / read in other places of the code, e.g. wherever you can use useEditorConfigContext */
185
266
  serverFeatureProps: ServerProps;
186
267
  };
@@ -195,27 +276,42 @@ export type ResolvedServerFeatureMap = Map<string, ResolvedServerFeature<unknown
195
276
  export type ResolvedClientFeatureMap = Map<string, ResolvedClientFeature<unknown>>;
196
277
  export type ServerFeatureProviderMap = Map<string, FeatureProviderServer<unknown, unknown>>;
197
278
  export type ClientFeatureProviderMap = Map<string, FeatureProviderClient<unknown>>;
279
+ /**
280
+ * Plugins are react components which get added to the editor. You can use them to interact with lexical, e.g. to create a command which creates a node, or opens a modal, or some other more "outside" functionality
281
+ */
198
282
  export type SanitizedPlugin = {
199
- Component: React.FC;
283
+ Component: PluginComponent;
284
+ clientProps: any;
200
285
  key: string;
201
286
  position: 'bottom';
202
287
  } | {
203
- Component: React.FC;
288
+ Component: PluginComponent;
289
+ clientProps: any;
204
290
  key: string;
205
291
  position: 'normal';
206
292
  } | {
207
- Component: React.FC;
293
+ Component: PluginComponent;
294
+ clientProps: any;
208
295
  key: string;
209
296
  position: 'top';
210
297
  } | {
211
- Component: React.FC<{
212
- anchorElem: HTMLElement;
213
- }>;
298
+ Component: PluginComponentWithAnchor;
299
+ clientProps: any;
214
300
  desktopOnly?: boolean;
215
301
  key: string;
216
302
  position: 'floatingAnchorElem';
303
+ } | {
304
+ Component: PluginComponent;
305
+ clientProps: any;
306
+ key: string;
307
+ position: 'aboveContainer';
308
+ } | {
309
+ Component: PluginComponent;
310
+ clientProps: any;
311
+ key: string;
312
+ position: 'belowContainer';
217
313
  };
218
- export type SanitizedServerFeatures = Required<Pick<ResolvedServerFeature<unknown, unknown>, 'markdownTransformers' | 'nodes'>> & {
314
+ export type SanitizedServerFeatures = Required<Pick<ResolvedServerFeature<unknown, unknown>, 'i18n' | 'markdownTransformers' | 'nodes'>> & {
219
315
  /** The node types mapped to their converters */
220
316
  converters: {
221
317
  html: HTMLConverter[];
@@ -240,24 +336,24 @@ export type SanitizedServerFeatures = Required<Pick<ResolvedServerFeature<unknow
240
336
  isRequired: boolean;
241
337
  }) => JSONSchema4>;
242
338
  };
243
- hooks: {
244
- afterReadPromises: Array<({ field, incomingEditorState, siblingDoc, }: {
245
- field: RichTextField<SerializedEditorState, AdapterProps>;
246
- incomingEditorState: SerializedEditorState;
247
- siblingDoc: Record<string, unknown>;
248
- }) => Promise<void> | null>;
249
- };
250
- /** The node types mapped to their populationPromises */
339
+ /** The node types mapped to their hooks */
340
+ hooks?: {
341
+ afterChange?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>;
342
+ afterRead?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>;
343
+ beforeChange?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>;
344
+ /**
345
+ * Runs before a document is duplicated to prevent errors in unique fields or return null to use defaultValue.
346
+ */
347
+ beforeDuplicate?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>;
348
+ beforeValidate?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>;
349
+ }; /** The node types mapped to their populationPromises */
251
350
  populationPromises: Map<string, Array<PopulationPromise>>;
252
351
  /** The node types mapped to their validations */
253
352
  validations: Map<string, Array<NodeValidation>>;
254
353
  };
255
- export type SanitizedClientFeatures = Required<Pick<ResolvedClientFeature<unknown>, 'markdownTransformers' | 'nodes'>> & {
354
+ export type SanitizedClientFeatures = Required<Pick<ResolvedClientFeature<unknown>, 'markdownTransformers' | 'nodes' | 'toolbarFixed' | 'toolbarInline'>> & {
256
355
  /** The keys of all enabled features */
257
356
  enabledFeatures: string[];
258
- floatingSelectToolbar: {
259
- sections: FloatingToolbarSection[];
260
- };
261
357
  hooks: {
262
358
  load: Array<({ incomingEditorState, }: {
263
359
  incomingEditorState: SerializedEditorState;
@@ -266,13 +362,26 @@ export type SanitizedClientFeatures = Required<Pick<ResolvedClientFeature<unknow
266
362
  incomingEditorState: SerializedEditorState;
267
363
  }) => SerializedEditorState>;
268
364
  };
365
+ /**
366
+ * Plugins are react components which get added to the editor. You can use them to interact with lexical, e.g. to create a command which creates a node, or opens a modal, or some other more "outside" functionality
367
+ */
269
368
  plugins?: Array<SanitizedPlugin>;
270
369
  slashMenu: {
271
- dynamicOptions: Array<({ editor, queryString }: {
370
+ /**
371
+ * Dynamic groups allow you to add different groups depending on the query string (so, the text after the slash).
372
+ * Thus, to re-calculate the available groups, this function will be called every time you type after the /.
373
+ *
374
+ * The groups provided by dynamicGroups will be merged with the static groups provided by the groups property.
375
+ */
376
+ dynamicGroups: Array<({ editor, queryString }: {
272
377
  editor: LexicalEditor;
273
378
  queryString: string;
274
379
  }) => SlashMenuGroup[]>;
275
- groupsWithOptions: SlashMenuGroup[];
380
+ /**
381
+ * Static array of groups together with the items in them. These will always be present.
382
+ * While typing after the /, they will be filtered by the query string and the keywords, key and display name of the items.
383
+ */
384
+ groups: SlashMenuGroup[];
276
385
  };
277
386
  };
278
387
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/field/features/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACvF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC1F,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAClD,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AACxF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mDAAmD,CAAA;AAC/F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kEAAkE,CAAA;AACtG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAA;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IAClD,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,CAAA;CAChD,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAC5C,IAAI,CACF,qBAAqB,CAAC,OAAO,CAAC,EAC9B,sBAAsB,GAAG,OAAO,GAAG,cAAc,GAAG,eAAe,CACpE,CACF,GAAG;IACF,uCAAuC;IACvC,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB,KAAK,EAAE;QACL,IAAI,EAAE,KAAK,CACT,CAAC,EACC,mBAAmB,GACpB,EAAE;YACD,mBAAmB,EAAE,qBAAqB,CAAA;SAC3C,KAAK,qBAAqB,CAC5B,CAAA;QACD,IAAI,EAAE,KAAK,CACT,CAAC,EACC,mBAAmB,GACpB,EAAE;YACD,mBAAmB,EAAE,qBAAqB,CAAA;SAC3C,KAAK,qBAAqB,CAC5B,CAAA;KACF,CAAA;IACD;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,eAAe,CAAC,CAAA;IAChC,SAAS,EAAE;QACT;;;;;WAKG;QACH,aAAa,EAAE,KAAK,CAClB,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE;YAAE,MAAM,EAAE,aAAa,CAAC;YAAC,WAAW,EAAE,MAAM,CAAA;SAAE,KAAK,cAAc,EAAE,CAC9F,CAAA;QACD;;;WAGG;QACH,MAAM,EAAE,cAAc,EAAE,CAAA;KACzB,CAAA;CACF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/field/features/types.ts"],"sourcesContent":["import type { Transformer } from '@lexical/markdown'\nimport type { I18n } from '@payloadcms/translations'\nimport type { JSONSchema4 } from 'json-schema'\nimport type { Klass, LexicalEditor, LexicalNode, SerializedEditorState } from 'lexical'\nimport type { SerializedLexicalNode } from 'lexical'\nimport type { LexicalNodeReplacement } from 'lexical'\nimport type { RequestContext } from 'payload'\nimport type { SanitizedConfig } from 'payload/config'\nimport type { Field, PayloadRequest, RichTextField, ValidateOptions } from 'payload/types'\nimport type React from 'react'\n\nimport type { AdapterProps } from '../../types.js'\nimport type { ClientEditorConfig, ServerEditorConfig } from '../lexical/config/types.js'\nimport type { FloatingToolbarSection } from '../lexical/plugins/FloatingSelectToolbar/types.js'\nimport type { SlashMenuGroup } from '../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\nimport type { HTMLConverter } from './converters/html/converter/types.js'\n\nexport type PopulationPromise<T extends SerializedLexicalNode = SerializedLexicalNode> = ({\n context,\n currentDepth,\n depth,\n editorPopulationPromises,\n field,\n findMany,\n flattenLocales,\n node,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n}: {\n context: RequestContext\n currentDepth: number\n depth: number\n /**\n * This maps all population promises to the node type\n */\n editorPopulationPromises: Map<string, Array<PopulationPromise>>\n field: RichTextField<SerializedEditorState, AdapterProps>\n findMany: boolean\n flattenLocales: boolean\n node: T\n overrideAccess: boolean\n populationPromises: Promise<void>[]\n req: PayloadRequest\n showHiddenFields: boolean\n siblingDoc: Record<string, unknown>\n}) => Promise<void>[]\n\nexport type NodeValidation<T extends SerializedLexicalNode = SerializedLexicalNode> = ({\n node,\n nodeValidations,\n validation,\n}: {\n node: T\n nodeValidations: Map<string, Array<NodeValidation>>\n validation: {\n options: ValidateOptions<unknown, unknown, RichTextField>\n value: SerializedEditorState\n }\n}) => Promise<string | true> | string | true\n\nexport type FeatureProviderProviderServer<ServerFeatureProps, ClientFeatureProps> = (\n props?: ServerFeatureProps,\n) => FeatureProviderServer<ServerFeatureProps, ClientFeatureProps>\n\nexport type FeatureProviderServer<ServerFeatureProps, ClientFeatureProps> = {\n /** Keys of dependencies needed for this feature. These dependencies do not have to be loaded first */\n dependencies?: string[]\n /** Keys of priority dependencies needed for this feature. These dependencies have to be loaded first and are available in the `feature` property*/\n dependenciesPriority?: string[]\n /** Keys of soft-dependencies needed for this feature. The FeatureProviders dependencies are optional, but are considered as last-priority in the loading process */\n dependenciesSoft?: string[]\n\n feature: (props: {\n /** unSanitizedEditorConfig.features, but mapped */\n featureProviderMap: ServerFeatureProviderMap\n // other resolved features, which have been loaded before this one. All features declared in 'dependencies' should be available here\n resolvedFeatures: ResolvedServerFeatureMap\n // unSanitized EditorConfig,\n unSanitizedEditorConfig: ServerEditorConfig\n }) => ServerFeature<ServerFeatureProps, ClientFeatureProps>\n key: string\n /** Props which were passed into your feature will have to be passed here. This will allow them to be used / read in other places of the code, e.g. wherever you can use useEditorConfigContext */\n serverFeatureProps: ServerFeatureProps\n}\n\nexport type FeatureProviderProviderClient<ClientFeatureProps> = (\n props?: ClientComponentProps<ClientFeatureProps>,\n) => FeatureProviderClient<ClientFeatureProps>\n\n/**\n * No dependencies => Features need to be sorted on the server first, then sent to client in right order\n */\nexport type FeatureProviderClient<ClientFeatureProps> = {\n /**\n * Return props, to make it easy to retrieve passed in props to this Feature for the client if anyone wants to\n */\n clientFeatureProps: ClientComponentProps<ClientFeatureProps>\n feature: (props: {\n clientFunctions: Record<string, any>\n /** unSanitizedEditorConfig.features, but mapped */\n featureProviderMap: ClientFeatureProviderMap\n // other resolved features, which have been loaded before this one. All features declared in 'dependencies' should be available here\n resolvedFeatures: ResolvedClientFeatureMap\n // unSanitized EditorConfig,\n unSanitizedEditorConfig: ClientEditorConfig\n }) => ClientFeature<ClientFeatureProps>\n}\n\nexport type ClientFeature<ClientFeatureProps> = {\n /**\n * Return props, to make it easy to retrieve passed in props to this Feature for the client if anyone wants to\n */\n clientFeatureProps: ClientComponentProps<ClientFeatureProps>\n\n floatingSelectToolbar?: {\n sections: FloatingToolbarSection[]\n }\n hooks?: {\n load?: ({\n incomingEditorState,\n }: {\n incomingEditorState: SerializedEditorState\n }) => SerializedEditorState\n save?: ({\n incomingEditorState,\n }: {\n incomingEditorState: SerializedEditorState\n }) => SerializedEditorState\n }\n markdownTransformers?: Transformer[]\n nodes?: Array<Klass<LexicalNode> | LexicalNodeReplacement>\n plugins?: Array<\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: React.FC\n position: 'bottom' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: React.FC\n position: 'normal' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: React.FC\n position: 'top' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: React.FC<{ anchorElem: HTMLElement }>\n position: 'floatingAnchorElem' // Determines at which position the Component will be added.\n }\n >\n slashMenu?: {\n dynamicOptions?: ({\n editor,\n queryString,\n }: {\n editor: LexicalEditor\n queryString: string\n }) => SlashMenuGroup[]\n options?: SlashMenuGroup[]\n }\n}\n\nexport type ClientComponentProps<ClientFeatureProps> = ClientFeatureProps & {\n featureKey: string\n order: number\n}\n\nexport type ServerFeature<ServerProps, ClientFeatureProps> = {\n ClientComponent?: React.FC<ClientComponentProps<ClientFeatureProps>>\n /**\n * This determines what props will be available on the Client.\n */\n clientFeatureProps?: ClientFeatureProps\n generateComponentMap?: (args: {\n config: SanitizedConfig\n i18n: I18n\n props: ServerProps\n schemaPath: string\n }) => {\n [key: string]: React.FC<{ componentKey: string; featureKey: string }>\n }\n generateSchemaMap?: (args: {\n config: SanitizedConfig\n i18n: I18n\n props: ServerProps\n schemaMap: Map<string, Field[]>\n schemaPath: string\n }) =>\n | {\n [key: string]: Field[]\n }\n | Promise<{\n [key: string]: Field[]\n }>\n generatedTypes?: {\n modifyOutputSchema: ({\n collectionIDFieldTypes,\n config,\n currentSchema,\n field,\n interfaceNameDefinitions,\n isRequired,\n }: {\n collectionIDFieldTypes: { [key: string]: 'number' | 'string' }\n config?: SanitizedConfig\n /**\n * Current schema which will be modified by this function.\n */\n currentSchema: JSONSchema4\n field: RichTextField<SerializedEditorState, AdapterProps>\n /**\n * Allows you to define new top-level interfaces that can be re-used in the output schema.\n */\n interfaceNameDefinitions: Map<string, JSONSchema4>\n isRequired: boolean\n }) => JSONSchema4\n }\n hooks?: {\n afterReadPromise?: ({\n field,\n incomingEditorState,\n siblingDoc,\n }: {\n field: RichTextField<SerializedEditorState, AdapterProps>\n incomingEditorState: SerializedEditorState\n siblingDoc: Record<string, unknown>\n }) => Promise<void> | null\n }\n markdownTransformers?: Transformer[]\n nodes?: Array<{\n converters?: {\n html?: HTMLConverter\n }\n node: Klass<LexicalNode> | LexicalNodeReplacement\n populationPromises?: Array<PopulationPromise>\n validations?: Array<NodeValidation>\n }>\n\n /** Props which were passed into your feature will have to be passed here. This will allow them to be used / read in other places of the code, e.g. wherever you can use useEditorConfigContext */\n serverFeatureProps: ServerProps\n}\n\nexport type ResolvedServerFeature<ServerProps, ClientFeatureProps> = ServerFeature<\n ServerProps,\n ClientFeatureProps\n> &\n Required<\n Pick<\n FeatureProviderServer<ServerProps, ClientFeatureProps>,\n 'dependencies' | 'dependenciesPriority' | 'dependenciesSoft' | 'key'\n >\n > & {\n order: number\n }\n\nexport type ResolvedClientFeature<ClientFeatureProps> = ClientFeature<ClientFeatureProps> & {\n key: string\n order: number\n}\n\nexport type ResolvedServerFeatureMap = Map<string, ResolvedServerFeature<unknown, unknown>>\nexport type ResolvedClientFeatureMap = Map<string, ResolvedClientFeature<unknown>>\n\nexport type ServerFeatureProviderMap = Map<string, FeatureProviderServer<unknown, unknown>>\nexport type ClientFeatureProviderMap = Map<string, FeatureProviderClient<unknown>>\n\nexport type SanitizedPlugin =\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: React.FC\n key: string\n position: 'bottom' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: React.FC\n key: string\n position: 'normal' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: React.FC\n key: string\n position: 'top' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: React.FC<{ anchorElem: HTMLElement }>\n desktopOnly?: boolean\n key: string\n position: 'floatingAnchorElem' // Determines at which position the Component will be added.\n }\n\nexport type SanitizedServerFeatures = Required<\n Pick<ResolvedServerFeature<unknown, unknown>, 'markdownTransformers' | 'nodes'>\n> & {\n /** The node types mapped to their converters */\n converters: {\n html: HTMLConverter[]\n }\n /** The keys of all enabled features */\n enabledFeatures: string[]\n generatedTypes: {\n modifyOutputSchemas: Array<\n ({\n collectionIDFieldTypes,\n config,\n currentSchema,\n field,\n interfaceNameDefinitions,\n isRequired,\n }: {\n collectionIDFieldTypes: { [key: string]: 'number' | 'string' }\n config?: SanitizedConfig\n /**\n * Current schema which will be modified by this function.\n */\n currentSchema: JSONSchema4\n field: RichTextField<SerializedEditorState, AdapterProps>\n /**\n * Allows you to define new top-level interfaces that can be re-used in the output schema.\n */\n interfaceNameDefinitions: Map<string, JSONSchema4>\n isRequired: boolean\n }) => JSONSchema4\n >\n }\n hooks: {\n afterReadPromises: Array<\n ({\n field,\n incomingEditorState,\n siblingDoc,\n }: {\n field: RichTextField<SerializedEditorState, AdapterProps>\n incomingEditorState: SerializedEditorState\n siblingDoc: Record<string, unknown>\n }) => Promise<void> | null\n >\n }\n /** The node types mapped to their populationPromises */\n populationPromises: Map<string, Array<PopulationPromise>>\n /** The node types mapped to their validations */\n validations: Map<string, Array<NodeValidation>>\n}\n\nexport type SanitizedClientFeatures = Required<\n Pick<ResolvedClientFeature<unknown>, 'markdownTransformers' | 'nodes'>\n> & {\n /** The keys of all enabled features */\n enabledFeatures: string[]\n floatingSelectToolbar: {\n sections: FloatingToolbarSection[]\n }\n hooks: {\n load: Array<\n ({\n incomingEditorState,\n }: {\n incomingEditorState: SerializedEditorState\n }) => SerializedEditorState\n >\n save: Array<\n ({\n incomingEditorState,\n }: {\n incomingEditorState: SerializedEditorState\n }) => SerializedEditorState\n >\n }\n plugins?: Array<SanitizedPlugin>\n slashMenu: {\n dynamicOptions: Array<\n ({ editor, queryString }: { editor: LexicalEditor; queryString: string }) => SlashMenuGroup[]\n >\n groupsWithOptions: SlashMenuGroup[]\n }\n}\n"],"names":[],"rangeMappings":"","mappings":"AAgWA,WA+BC"}
1
+ {"version":3,"sources":["../../../src/field/features/types.ts"],"sourcesContent":["import type { Transformer } from '@lexical/markdown'\nimport type { GenericLanguages, I18n, I18nClient } from '@payloadcms/translations'\nimport type { JSONSchema4 } from 'json-schema'\nimport type { Klass, LexicalEditor, LexicalNode, SerializedEditorState } from 'lexical'\nimport type { SerializedLexicalNode } from 'lexical'\nimport type { LexicalNodeReplacement } from 'lexical'\nimport type { RequestContext } from 'payload'\nimport type { SanitizedConfig } from 'payload/config'\nimport type {\n Field,\n PayloadRequestWithData,\n ReplaceAny,\n RichTextField,\n ValidateOptions,\n} from 'payload/types'\nimport type React from 'react'\n\nimport type { AdapterProps } from '../../types.js'\nimport type { ClientEditorConfig, ServerEditorConfig } from '../lexical/config/types.js'\nimport type { SlashMenuGroup } from '../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\nimport type { HTMLConverter } from './converters/html/converter/types.js'\nimport type { ToolbarGroup } from './toolbars/types.js'\n\nexport type PopulationPromise<T extends SerializedLexicalNode = SerializedLexicalNode> = ({\n context,\n currentDepth,\n depth,\n editorPopulationPromises,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n node,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n}: {\n context: RequestContext\n currentDepth: number\n depth: number\n draft: boolean\n /**\n * This maps all population promises to the node type\n */\n editorPopulationPromises: Map<string, Array<PopulationPromise>>\n field: RichTextField<SerializedEditorState, AdapterProps>\n /**\n * fieldPromises are used for things like field hooks. They will be awaited before awaiting populationPromises\n */\n fieldPromises: Promise<void>[]\n findMany: boolean\n flattenLocales: boolean\n node: T\n overrideAccess: boolean\n populationPromises: Promise<void>[]\n req: PayloadRequestWithData\n showHiddenFields: boolean\n siblingDoc: Record<string, unknown>\n}) => void\n\nexport type NodeValidation<T extends SerializedLexicalNode = SerializedLexicalNode> = ({\n node,\n nodeValidations,\n validation,\n}: {\n node: T\n nodeValidations: Map<string, Array<NodeValidation>>\n validation: {\n options: ValidateOptions<unknown, unknown, RichTextField>\n value: SerializedEditorState\n }\n}) => Promise<string | true> | string | true\n\nexport type FeatureProviderProviderServer<ServerFeatureProps, ClientFeatureProps> = (\n props?: ServerFeatureProps,\n) => FeatureProviderServer<ServerFeatureProps, ClientFeatureProps>\n\nexport type FeatureProviderServer<ServerFeatureProps, ClientFeatureProps> = {\n /** Keys of dependencies needed for this feature. These dependencies do not have to be loaded first */\n dependencies?: string[]\n /** Keys of priority dependencies needed for this feature. These dependencies have to be loaded first and are available in the `feature` property*/\n dependenciesPriority?: string[]\n /** Keys of soft-dependencies needed for this feature. The FeatureProviders dependencies are optional, but are considered as last-priority in the loading process */\n dependenciesSoft?: string[]\n\n /**\n * This is being called during the payload sanitization process\n */\n feature: (props: {\n config: SanitizedConfig\n /** unSanitizedEditorConfig.features, but mapped */\n featureProviderMap: ServerFeatureProviderMap\n isRoot?: boolean\n // other resolved features, which have been loaded before this one. All features declared in 'dependencies' should be available here\n resolvedFeatures: ResolvedServerFeatureMap\n // unSanitized EditorConfig,\n unSanitizedEditorConfig: ServerEditorConfig\n }) =>\n | Promise<ServerFeature<ServerFeatureProps, ClientFeatureProps>>\n | ServerFeature<ServerFeatureProps, ClientFeatureProps>\n key: string\n /** Props which were passed into your feature will have to be passed here. This will allow them to be used / read in other places of the code, e.g. wherever you can use useEditorConfigContext */\n serverFeatureProps: ServerFeatureProps\n}\n\nexport type FeatureProviderProviderClient<ClientFeatureProps> = (\n props: ClientComponentProps<ClientFeatureProps>,\n) => FeatureProviderClient<ClientFeatureProps>\n\n/**\n * No dependencies => Features need to be sorted on the server first, then sent to client in right order\n */\nexport type FeatureProviderClient<ClientFeatureProps> = {\n /**\n * Return props, to make it easy to retrieve passed in props to this Feature for the client if anyone wants to\n */\n clientFeatureProps: ClientComponentProps<ClientFeatureProps>\n feature: (props: {\n clientFunctions: Record<string, any>\n /** unSanitizedEditorConfig.features, but mapped */\n featureProviderMap: ClientFeatureProviderMap\n // other resolved features, which have been loaded before this one. All features declared in 'dependencies' should be available here\n resolvedFeatures: ResolvedClientFeatureMap\n // unSanitized EditorConfig,\n unSanitizedEditorConfig: ClientEditorConfig\n }) => ClientFeature<ClientFeatureProps>\n}\n\nexport type PluginComponent<ClientFeatureProps = any> = React.FC<{\n clientProps: ClientFeatureProps\n}>\nexport type PluginComponentWithAnchor<ClientFeatureProps = any> = React.FC<{\n anchorElem: HTMLElement\n clientProps: ClientFeatureProps\n}>\n\nexport type ClientFeature<ClientFeatureProps> = {\n /**\n * Return props, to make it easy to retrieve passed in props to this Feature for the client if anyone wants to\n */\n clientFeatureProps: ClientComponentProps<ClientFeatureProps>\n hooks?: {\n load?: ({\n incomingEditorState,\n }: {\n incomingEditorState: SerializedEditorState\n }) => SerializedEditorState\n save?: ({\n incomingEditorState,\n }: {\n incomingEditorState: SerializedEditorState\n }) => SerializedEditorState\n }\n markdownTransformers?: Transformer[]\n nodes?: Array<Klass<LexicalNode> | LexicalNodeReplacement>\n /**\n * Plugins are react components which get added to the editor. You can use them to interact with lexical, e.g. to create a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n */\n plugins?: Array<\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent<ClientFeatureProps>\n position: 'aboveContainer' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent<ClientFeatureProps>\n position: 'bottom' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent<ClientFeatureProps>\n position: 'normal' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent<ClientFeatureProps>\n position: 'top' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponentWithAnchor<ClientFeatureProps>\n position: 'floatingAnchorElem' // Determines at which position the Component will be added.\n }\n | {\n Component: PluginComponent<ClientFeatureProps>\n position: 'belowContainer' // Determines at which position the Component will be added.\n }\n >\n slashMenu?: {\n /**\n * Dynamic groups allow you to add different groups depending on the query string (so, the text after the slash).\n * Thus, to re-calculate the available groups, this function will be called every time you type after the /.\n *\n * The groups provided by dynamicGroups will be merged with the static groups provided by the groups property.\n */\n dynamicGroups?: ({\n editor,\n queryString,\n }: {\n editor: LexicalEditor\n queryString: string\n }) => SlashMenuGroup[]\n /**\n * Static array of groups together with the items in them. These will always be present.\n * While typing after the /, they will be filtered by the query string and the keywords, key and display name of the items.\n */\n groups?: SlashMenuGroup[]\n }\n /**\n * An opt-in, classic fixed toolbar which stays at the top of the editor\n */\n toolbarFixed?: {\n groups: ToolbarGroup[]\n }\n /**\n * The default, floating toolbar which appears when you select text.\n */\n toolbarInline?: {\n /**\n * Array of toolbar groups / sections. Each section can contain multiple toolbar items.\n */\n groups: ToolbarGroup[]\n }\n}\n\nexport type ClientComponentProps<ClientFeatureProps> = ClientFeatureProps extends undefined\n ? {\n featureKey: string\n order: number\n }\n : {\n featureKey: string\n order: number\n } & ClientFeatureProps\n\nexport type FieldNodeHookArgs<T extends SerializedLexicalNode> = {\n context: RequestContext\n /** Boolean to denote if this hook is running against finding one, or finding many within the afterRead hook. */\n findMany?: boolean\n /** The value of the field. */\n node?: T\n /** A string relating to which operation the field type is currently executing within. Useful within beforeValidate, beforeChange, and afterChange hooks to differentiate between create and update operations. */\n operation?: 'create' | 'delete' | 'read' | 'update'\n overrideAccess?: boolean\n /** The Express request object. It is mocked for Local API operations. */\n req: PayloadRequestWithData\n}\n\nexport type FieldNodeHook<T extends SerializedLexicalNode> = (\n args: FieldNodeHookArgs<T>,\n) => Promise<T> | T\n\n// Define the node with hooks that use the node's exportJSON return type\nexport type NodeWithHooks<T extends LexicalNode = any> = {\n converters?: {\n html?: HTMLConverter<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>\n }\n hooks?: {\n afterChange?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n afterRead?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n beforeChange?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n /**\n * Runs before a document is duplicated to prevent errors in unique fields or return null to use defaultValue.\n */\n beforeDuplicate?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n beforeValidate?: Array<FieldNodeHook<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n }\n node: Klass<T> | LexicalNodeReplacement\n populationPromises?: Array<\n PopulationPromise<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>\n >\n validations?: Array<NodeValidation<ReturnType<ReplaceAny<T, LexicalNode>['exportJSON']>>>\n}\n\nexport type ServerFeature<ServerProps, ClientFeatureProps> = {\n ClientComponent?: React.FC<ClientComponentProps<ClientFeatureProps>>\n /**\n * This determines what props will be available on the Client.\n */\n clientFeatureProps?: ClientFeatureProps\n generateComponentMap?: (args: {\n config: SanitizedConfig\n i18n: I18nClient\n props: ServerProps\n schemaPath: string\n }) => {\n [key: string]: React.FC<{ componentKey: string; featureKey: string }>\n }\n generateSchemaMap?: (args: {\n config: SanitizedConfig\n i18n: I18nClient\n props: ServerProps\n schemaMap: Map<string, Field[]>\n schemaPath: string\n }) => Map<string, Field[]> | null\n generatedTypes?: {\n modifyOutputSchema: ({\n collectionIDFieldTypes,\n config,\n currentSchema,\n field,\n interfaceNameDefinitions,\n isRequired,\n }: {\n collectionIDFieldTypes: { [key: string]: 'number' | 'string' }\n config?: SanitizedConfig\n /**\n * Current schema which will be modified by this function.\n */\n currentSchema: JSONSchema4\n field: RichTextField<SerializedEditorState, AdapterProps>\n /**\n * Allows you to define new top-level interfaces that can be re-used in the output schema.\n */\n interfaceNameDefinitions: Map<string, JSONSchema4>\n isRequired: boolean\n }) => JSONSchema4\n }\n /**\n * Here you can provide i18n translations for your feature. These will only be available on the server and client.\n *\n * Translations here are automatically scoped to `lexical.featureKey.yourKey`\n *\n * @Example\n * ```ts\n * i18n: {\n * en: {\n * label: 'Horizontal Rule',\n * },\n * de: {\n * label: 'Trennlinie',\n * },\n * }\n * ```\n * In order to access these translations, you would use `i18n.t('lexical:horizontalRule:label')`.\n */\n i18n?: Partial<GenericLanguages>\n markdownTransformers?: Transformer[]\n nodes?: Array<NodeWithHooks>\n\n /** Props which were passed into your feature will have to be passed here. This will allow them to be used / read in other places of the code, e.g. wherever you can use useEditorConfigContext */\n serverFeatureProps: ServerProps\n}\n\nexport type ResolvedServerFeature<ServerProps, ClientFeatureProps> = ServerFeature<\n ServerProps,\n ClientFeatureProps\n> &\n Required<\n Pick<\n FeatureProviderServer<ServerProps, ClientFeatureProps>,\n 'dependencies' | 'dependenciesPriority' | 'dependenciesSoft' | 'key'\n >\n > & {\n order: number\n }\n\nexport type ResolvedClientFeature<ClientFeatureProps> = ClientFeature<ClientFeatureProps> & {\n key: string\n order: number\n}\n\nexport type ResolvedServerFeatureMap = Map<string, ResolvedServerFeature<unknown, unknown>>\nexport type ResolvedClientFeatureMap = Map<string, ResolvedClientFeature<unknown>>\n\nexport type ServerFeatureProviderMap = Map<string, FeatureProviderServer<unknown, unknown>>\nexport type ClientFeatureProviderMap = Map<string, FeatureProviderClient<unknown>>\n\n/**\n * Plugins are react components which get added to the editor. You can use them to interact with lexical, e.g. to create a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n */\nexport type SanitizedPlugin =\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent\n clientProps: any\n key: string\n position: 'bottom' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent\n clientProps: any\n key: string\n position: 'normal' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponent\n clientProps: any\n key: string\n position: 'top' // Determines at which position the Component will be added.\n }\n | {\n // plugins are anything which is not directly part of the editor. Like, creating a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n Component: PluginComponentWithAnchor\n clientProps: any\n desktopOnly?: boolean\n key: string\n position: 'floatingAnchorElem' // Determines at which position the Component will be added.\n }\n | {\n Component: PluginComponent\n clientProps: any\n key: string\n position: 'aboveContainer'\n }\n | {\n Component: PluginComponent\n clientProps: any\n key: string\n position: 'belowContainer'\n }\n\nexport type SanitizedServerFeatures = Required<\n Pick<ResolvedServerFeature<unknown, unknown>, 'i18n' | 'markdownTransformers' | 'nodes'>\n> & {\n /** The node types mapped to their converters */\n converters: {\n html: HTMLConverter[]\n }\n /** The keys of all enabled features */\n enabledFeatures: string[]\n generatedTypes: {\n modifyOutputSchemas: Array<\n ({\n collectionIDFieldTypes,\n config,\n currentSchema,\n field,\n interfaceNameDefinitions,\n isRequired,\n }: {\n collectionIDFieldTypes: { [key: string]: 'number' | 'string' }\n config?: SanitizedConfig\n /**\n * Current schema which will be modified by this function.\n */\n currentSchema: JSONSchema4\n field: RichTextField<SerializedEditorState, AdapterProps>\n /**\n * Allows you to define new top-level interfaces that can be re-used in the output schema.\n */\n interfaceNameDefinitions: Map<string, JSONSchema4>\n isRequired: boolean\n }) => JSONSchema4\n >\n }\n /** The node types mapped to their hooks */\n\n hooks?: {\n afterChange?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>\n afterRead?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>\n beforeChange?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>\n /**\n * Runs before a document is duplicated to prevent errors in unique fields or return null to use defaultValue.\n */\n beforeDuplicate?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>\n beforeValidate?: Map<string, Array<FieldNodeHook<SerializedLexicalNode>>>\n } /** The node types mapped to their populationPromises */\n populationPromises: Map<string, Array<PopulationPromise>>\n /** The node types mapped to their validations */\n validations: Map<string, Array<NodeValidation>>\n}\n\nexport type SanitizedClientFeatures = Required<\n Pick<\n ResolvedClientFeature<unknown>,\n 'markdownTransformers' | 'nodes' | 'toolbarFixed' | 'toolbarInline'\n >\n> & {\n /** The keys of all enabled features */\n enabledFeatures: string[]\n hooks: {\n load: Array<\n ({\n incomingEditorState,\n }: {\n incomingEditorState: SerializedEditorState\n }) => SerializedEditorState\n >\n save: Array<\n ({\n incomingEditorState,\n }: {\n incomingEditorState: SerializedEditorState\n }) => SerializedEditorState\n >\n }\n /**\n * Plugins are react components which get added to the editor. You can use them to interact with lexical, e.g. to create a command which creates a node, or opens a modal, or some other more \"outside\" functionality\n */\n plugins?: Array<SanitizedPlugin>\n slashMenu: {\n /**\n * Dynamic groups allow you to add different groups depending on the query string (so, the text after the slash).\n * Thus, to re-calculate the available groups, this function will be called every time you type after the /.\n *\n * The groups provided by dynamicGroups will be merged with the static groups provided by the groups property.\n */\n dynamicGroups: Array<\n ({ editor, queryString }: { editor: LexicalEditor; queryString: string }) => SlashMenuGroup[]\n >\n /**\n * Static array of groups together with the items in them. These will always be present.\n * While typing after the /, they will be filtered by the query string and the keywords, key and display name of the items.\n */\n groups: SlashMenuGroup[]\n }\n}\n"],"names":[],"rangeMappings":"","mappings":"AAodA,WA4CC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/field/features/upload/component/ExtraFieldsDrawer/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAa,MAAM,eAAe,CAAA;AAoBtE,OAAO,KAA2C,MAAM,OAAO,CAAA;AAI/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAI/C;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAC5C,YAAY,GAAG;IACb,UAAU,EAAE,MAAM,CAAA;IAClB,iBAAiB,EAAE,sBAAsB,CAAA;CAC1C,CAkHF,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/field/features/upload/component/ExtraFieldsDrawer/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAa,MAAM,eAAe,CAAA;AAgBtE,OAAO,KAA2C,MAAM,OAAO,CAAA;AAI/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAI/C;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAC5C,YAAY,GAAG;IACb,UAAU,EAAE,MAAM,CAAA;IAClB,iBAAiB,EAAE,sBAAsB,CAAA;CAC1C,CAkHF,CAAA"}
@@ -1,10 +1,8 @@
1
1
  'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
3
  import * as facelessUIImport from '@faceless-ui/modal';
3
- import lexicalComposerContextImport from '@lexical/react/LexicalComposerContext.js';
4
- const { useLexicalComposerContext } = lexicalComposerContextImport;
4
+ import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js';
5
5
  import { getTranslation } from '@payloadcms/translations';
6
- import lexicalImport from 'lexical';
7
- const { $getNodeByKey } = lexicalImport;
8
6
  import { Drawer } from '@payloadcms/ui/elements/Drawer';
9
7
  import { useFieldProps } from '@payloadcms/ui/forms/FieldPropsProvider';
10
8
  import { Form } from '@payloadcms/ui/forms/Form';
@@ -14,6 +12,7 @@ import { useConfig } from '@payloadcms/ui/providers/Config';
14
12
  import { useDocumentInfo } from '@payloadcms/ui/providers/DocumentInfo';
15
13
  import { useTranslation } from '@payloadcms/ui/providers/Translation';
16
14
  import { getFormState } from '@payloadcms/ui/utilities/getFormState';
15
+ import { $getNodeByKey } from 'lexical';
17
16
  import { deepCopyObject } from 'payload/utilities';
18
17
  import React, { useCallback, useEffect, useState } from 'react';
19
18
  import { v4 as uuid } from 'uuid';
@@ -95,31 +94,39 @@ import { useEditorConfigContext } from '../../../../lexical/config/client/Editor
95
94
  drawerSlug,
96
95
  nodeKey
97
96
  ]);
98
- return /*#__PURE__*/ React.createElement(Drawer, {
97
+ return /*#__PURE__*/ _jsx(Drawer, {
99
98
  slug: drawerSlug,
100
99
  title: t('general:editLabel', {
101
100
  label: getTranslation(relatedCollection.labels.singular, i18n)
101
+ }),
102
+ children: initialState !== false && /*#__PURE__*/ _jsxs(Form, {
103
+ beforeSubmit: [
104
+ onChange
105
+ ],
106
+ disableValidationOnSubmit: true,
107
+ // @ts-expect-error TODO: Fix this
108
+ fields: fieldMap,
109
+ initialState: initialState,
110
+ onChange: [
111
+ onChange
112
+ ],
113
+ onSubmit: handleUpdateEditData,
114
+ uuid: uuid(),
115
+ children: [
116
+ /*#__PURE__*/ _jsx(RenderFields, {
117
+ fieldMap: Array.isArray(fieldMap) ? fieldMap : [],
118
+ forceRender: true,
119
+ path: "" // See Blocks feature path for details as for why this is empty
120
+ ,
121
+ readOnly: false,
122
+ schemaPath: schemaFieldsPath
123
+ }),
124
+ /*#__PURE__*/ _jsx(FormSubmit, {
125
+ children: t('fields:saveChanges')
126
+ })
127
+ ]
102
128
  })
103
- }, initialState !== false && /*#__PURE__*/ React.createElement(Form, {
104
- beforeSubmit: [
105
- onChange
106
- ],
107
- disableValidationOnSubmit: true,
108
- // @ts-expect-error TODO: Fix this
109
- fields: fieldMap,
110
- initialState: initialState,
111
- onChange: [
112
- onChange
113
- ],
114
- onSubmit: handleUpdateEditData,
115
- uuid: uuid()
116
- }, /*#__PURE__*/ React.createElement(RenderFields, {
117
- fieldMap: Array.isArray(fieldMap) ? fieldMap : [],
118
- forceRender: true,
119
- path: "",
120
- readOnly: false,
121
- schemaPath: ""
122
- }), /*#__PURE__*/ React.createElement(FormSubmit, null, t('fields:saveChanges'))));
129
+ });
123
130
  };
124
131
 
125
132
  //# sourceMappingURL=index.js.map